aio-class 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/index.js +5 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export declare const ArrayToObject: <T>(keys: T[], fn: (key: T) => any) => any;
|
|
|
78
78
|
export declare const TextFilter: (p: {
|
|
79
79
|
value: string | number;
|
|
80
80
|
chars?: {
|
|
81
|
-
[key: string]: boolean
|
|
81
|
+
[key: string]: boolean;
|
|
82
82
|
};
|
|
83
83
|
number?: boolean;
|
|
84
84
|
symbol?: boolean;
|
package/index.js
CHANGED
|
@@ -242,7 +242,7 @@ export const EventHandler = (selector, event, action, type = 'bind') => {
|
|
|
242
242
|
element.addEventListener(fixedEvent, action);
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
|
-
export const Stall = (
|
|
245
|
+
export const Stall = (stallTime = 3000) => __awaiter(void 0, void 0, void 0, function* () { return yield new Promise(resolve => setTimeout(resolve, stallTime)); });
|
|
246
246
|
export const DetectOS = () => {
|
|
247
247
|
const userAgent = window.navigator.userAgent;
|
|
248
248
|
const platform = window.navigator.platform;
|
|
@@ -2114,13 +2114,15 @@ export class Swip {
|
|
|
2114
2114
|
this.bind = (dom) => {
|
|
2115
2115
|
this.unbind();
|
|
2116
2116
|
this.dom = dom;
|
|
2117
|
-
|
|
2117
|
+
const touch = IsTouch();
|
|
2118
|
+
dom.addEventListener(touch ? 'touchstart' : 'mousedown', this.mouseDown);
|
|
2118
2119
|
};
|
|
2119
2120
|
this.unbind = () => {
|
|
2120
2121
|
if (!this.dom) {
|
|
2121
2122
|
return;
|
|
2122
2123
|
}
|
|
2123
|
-
|
|
2124
|
+
const touch = IsTouch();
|
|
2125
|
+
this.dom.removeEventListener(touch ? 'touchstart' : 'mousedown', this.mouseDown);
|
|
2124
2126
|
this.dom = undefined;
|
|
2125
2127
|
};
|
|
2126
2128
|
this.init = () => {
|