mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6662 from kwiateusz/toastr-update
Toastr and mCustomScrollbar update
This commit is contained in:
@@ -22,9 +22,9 @@ class SimpleTestAllParams {
|
||||
this.element = $(".content");
|
||||
|
||||
this.element.mCustomScrollbar({
|
||||
set_width: false,
|
||||
set_height: false,
|
||||
horizontalScroll: false,
|
||||
setWidth: false,
|
||||
setHeight: false,
|
||||
axis: "y",
|
||||
scrollInertia: 950,
|
||||
mouseWheel: true,
|
||||
mouseWheelPixels: "auto",
|
||||
@@ -147,4 +147,4 @@ class DisableDestroyTest {
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-5
@@ -10,15 +10,27 @@ declare module MCustomScrollbar {
|
||||
/**
|
||||
* Set the width of your content (overwrites CSS width), value in pixels (integer) or percentage (string)
|
||||
*/
|
||||
set_width?: any;
|
||||
setWidth?: any;
|
||||
/**
|
||||
* Set the height of your content (overwirtes CSS height), value in pixels (integer) or percentage (string)
|
||||
*/
|
||||
set_height?: any;
|
||||
setHeight?: any;
|
||||
/**
|
||||
* Add horizontal scrollbar (default is vertical), value: true, false
|
||||
* Define content’s scrolling axis (the type of scrollbars added to the element: vertical and/of horizontal).
|
||||
* Available values: "y", "x", "yx". y -vertical, x - horizontal
|
||||
*/
|
||||
axis?: string;
|
||||
/**
|
||||
* Always keep scrollbar(s) visible, even when there’s nothing to scroll.
|
||||
* 0 – disable (default)
|
||||
* 1 – keep dragger rail visible
|
||||
* 2 – keep all scrollbar components (dragger, rail, buttons etc.) visible
|
||||
*/
|
||||
horizontalScroll?: boolean;
|
||||
alwaysShowScrollbar?: number;
|
||||
/**
|
||||
* Enable or disable auto-expanding the scrollbar when cursor is over or dragging the scrollbar.
|
||||
*/
|
||||
autoExpandScrollbar?: boolean;
|
||||
/**
|
||||
* Scrolling inertia (easing), value in milliseconds (0 for no scrolling inertia)
|
||||
*/
|
||||
@@ -119,6 +131,12 @@ declare module MCustomScrollbar {
|
||||
* User defined callback function, triggered while scrolling
|
||||
*/
|
||||
whileScrolling?: () => void;
|
||||
/**
|
||||
* Set the behavior of calling onTotalScroll and onTotalScrollBack offsets.
|
||||
* By default, callback offsets will trigger repeatedly while content is scrolling within the offsets.
|
||||
* Set alwaysTriggerOffsets: false when you need to trigger onTotalScroll and onTotalScrollBack callbacks once, each time scroll end or beginning is reached.
|
||||
*/
|
||||
alwaysTriggerOffsets?: boolean;
|
||||
}
|
||||
/**
|
||||
* Set a scrollbar ready-to-use theme. See themes demo for all themes - http://manos.malihu.gr/tuts/custom-scrollbar-plugin/scrollbar_themes_demo.html
|
||||
@@ -132,10 +150,18 @@ declare module MCustomScrollbar {
|
||||
*/
|
||||
scrollInertia?: number;
|
||||
/**
|
||||
* Scroll-to animation easing, values: "linear", "easeOut", "easeInOut".
|
||||
*/
|
||||
scrollEasing?: string;
|
||||
/**
|
||||
* Scroll scrollbar dragger (instead of content) to a number of pixels, values: true, false
|
||||
*/
|
||||
moveDragger?: boolean;
|
||||
/**
|
||||
* Set a timeout for the method (the default timeout is 60 ms in order to work with automatic scrollbar update), value in milliseconds.
|
||||
*/
|
||||
timeout?: number;
|
||||
/**
|
||||
* Trigger user defined callback after scroll-to completes, value: true, false
|
||||
*/
|
||||
callbacks?: boolean;
|
||||
@@ -163,4 +189,4 @@ interface JQuery {
|
||||
* @param options Override default options
|
||||
*/
|
||||
mCustomScrollbar(options?: MCustomScrollbar.CustomScrollbarOptions): JQuery;
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+16
-11
@@ -113,21 +113,26 @@ interface ToastrOptions {
|
||||
* Set newest toast to appear on top
|
||||
**/
|
||||
newestOnTop?: boolean;
|
||||
|
||||
/**
|
||||
* Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content.
|
||||
*/
|
||||
preventDuplicates?: boolean;
|
||||
|
||||
/**
|
||||
* Visually indicates how long before a toast expires.
|
||||
*/
|
||||
progressBar?: boolean;
|
||||
|
||||
/**
|
||||
* The element to put the toastr container
|
||||
**/
|
||||
target?: string;
|
||||
/**
|
||||
* Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content.
|
||||
*/
|
||||
preventDuplicates?: boolean;
|
||||
/**
|
||||
* Visually indicates how long before a toast expires.
|
||||
*/
|
||||
progressBar?: boolean;
|
||||
/**
|
||||
* Function to execute on toast click
|
||||
*/
|
||||
onclick?: () => void;
|
||||
/**
|
||||
* Set if toastr should parse containing html
|
||||
**/
|
||||
allowHtml?: boolean;
|
||||
}
|
||||
|
||||
interface ToastrDisplayMethod {
|
||||
|
||||
Reference in New Issue
Block a user