@proscom/ui-react
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -1,7 +0,1 @@ | ||
export declare class SingleTimeoutManager { | ||
timeout: any; | ||
set(cb: (() => void) | null, time: number): void; | ||
setDelay(time: number): void; | ||
clear(): void; | ||
active(): any; | ||
} | ||
export { SingleTimeoutManager } from '@proscom/ui-utils'; |
@@ -1,29 +0,2 @@ | ||
var SingleTimeoutManager = /** @class */ (function () { | ||
function SingleTimeoutManager() { | ||
this.timeout = null; | ||
} | ||
SingleTimeoutManager.prototype.set = function (cb, time) { | ||
var _this = this; | ||
if (this.timeout) | ||
clearTimeout(this.timeout); | ||
this.timeout = setTimeout(function () { | ||
_this.timeout = null; | ||
cb === null || cb === void 0 ? void 0 : cb(); | ||
}, time); | ||
}; | ||
SingleTimeoutManager.prototype.setDelay = function (time) { | ||
return this.set(null, time); | ||
}; | ||
SingleTimeoutManager.prototype.clear = function () { | ||
if (this.timeout) { | ||
clearTimeout(this.timeout); | ||
this.timeout = null; | ||
} | ||
}; | ||
SingleTimeoutManager.prototype.active = function () { | ||
return this.timeout; | ||
}; | ||
return SingleTimeoutManager; | ||
}()); | ||
export { SingleTimeoutManager }; | ||
export { SingleTimeoutManager } from '@proscom/ui-utils'; | ||
//# sourceMappingURL=SingleTimeoutManager.js.map |
@@ -1,7 +0,1 @@ | ||
export declare class SingleTimeoutManager { | ||
timeout: any; | ||
set(cb: (() => void) | null, time: number): void; | ||
setDelay(time: number): void; | ||
clear(): void; | ||
active(): any; | ||
} | ||
export { SingleTimeoutManager } from '@proscom/ui-utils'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SingleTimeoutManager = void 0; | ||
var SingleTimeoutManager = /** @class */ (function () { | ||
function SingleTimeoutManager() { | ||
this.timeout = null; | ||
} | ||
SingleTimeoutManager.prototype.set = function (cb, time) { | ||
var _this = this; | ||
if (this.timeout) | ||
clearTimeout(this.timeout); | ||
this.timeout = setTimeout(function () { | ||
_this.timeout = null; | ||
cb === null || cb === void 0 ? void 0 : cb(); | ||
}, time); | ||
}; | ||
SingleTimeoutManager.prototype.setDelay = function (time) { | ||
return this.set(null, time); | ||
}; | ||
SingleTimeoutManager.prototype.clear = function () { | ||
if (this.timeout) { | ||
clearTimeout(this.timeout); | ||
this.timeout = null; | ||
} | ||
}; | ||
SingleTimeoutManager.prototype.active = function () { | ||
return this.timeout; | ||
}; | ||
return SingleTimeoutManager; | ||
}()); | ||
exports.SingleTimeoutManager = SingleTimeoutManager; | ||
var ui_utils_1 = require("@proscom/ui-utils"); | ||
Object.defineProperty(exports, "SingleTimeoutManager", { enumerable: true, get: function () { return ui_utils_1.SingleTimeoutManager; } }); | ||
//# sourceMappingURL=SingleTimeoutManager.js.map |
{ | ||
"name": "@proscom/ui-react", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Proscom React utilities", | ||
@@ -35,2 +35,5 @@ "author": "Andrew Starostin <a.starostin@proscom.ru>", | ||
}, | ||
"dependencies": { | ||
"@proscom/ui-utils": "^0.0.4" | ||
}, | ||
"peerDependencies": { | ||
@@ -42,3 +45,3 @@ "react": "^16.8.0 || ^17.0.0" | ||
}, | ||
"gitHead": "c9f33be94a9fa7ae0448e3d57ed3d811efc81660" | ||
"gitHead": "d5f9dac37bba96f823aba7ba26f6de7bc17755a0" | ||
} |
@@ -1,26 +0,1 @@ | ||
export class SingleTimeoutManager { | ||
timeout: any = null; | ||
public set(cb: (() => void) | null, time: number) { | ||
if (this.timeout) clearTimeout(this.timeout); | ||
this.timeout = setTimeout(() => { | ||
this.timeout = null; | ||
cb?.(); | ||
}, time); | ||
} | ||
public setDelay(time: number) { | ||
return this.set(null, time); | ||
} | ||
public clear() { | ||
if (this.timeout) { | ||
clearTimeout(this.timeout); | ||
this.timeout = null; | ||
} | ||
} | ||
public active() { | ||
return this.timeout; | ||
} | ||
} | ||
export { SingleTimeoutManager } from '@proscom/ui-utils'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50438
2
903
+ Added@proscom/ui-utils@^0.0.4
+ Added@proscom/ui-utils@0.0.4(transitive)
+ Addedlodash-es@4.17.21(transitive)