@ev-core/aurelia-v1-resources 1.0.0 → 2.0.0
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/dist/commonjs/converters/datetime-config.d.ts +1 -13
- package/dist/commonjs/converters/datetime-config.js +6 -41
- package/dist/commonjs/converters/datetime-config.js.map +1 -1
- package/dist/commonjs/converters/datetime-duration.d.ts +6 -14
- package/dist/commonjs/converters/datetime-duration.js +3 -54
- package/dist/commonjs/converters/datetime-duration.js.map +1 -1
- package/dist/commonjs/converters/datetime.d.ts +4 -4
- package/dist/commonjs/converters/datetime.js +3 -26
- package/dist/commonjs/converters/datetime.js.map +1 -1
- package/dist/commonjs/converters/filter.d.ts +2 -2
- package/dist/commonjs/converters/filter.js +10 -94
- package/dist/commonjs/converters/filter.js.map +1 -1
- package/dist/commonjs/converters/numberformat.d.ts +3 -3
- package/dist/commonjs/converters/numberformat.js +3 -10
- package/dist/commonjs/converters/numberformat.js.map +1 -1
- package/dist/commonjs/converters/numeral.d.ts +1 -2
- package/dist/commonjs/converters/numeral.js +2 -43
- package/dist/commonjs/converters/numeral.js.map +1 -1
- package/dist/commonjs/converters/sort.d.ts +3 -3
- package/dist/commonjs/converters/sort.js +2 -62
- package/dist/commonjs/converters/sort.js.map +1 -1
- package/dist/commonjs/converters/sum.d.ts +1 -1
- package/dist/commonjs/converters/sum.js +7 -19
- package/dist/commonjs/converters/sum.js.map +1 -1
- package/dist/commonjs/converters/take.d.ts +2 -2
- package/dist/commonjs/converters/take.js +2 -16
- package/dist/commonjs/converters/take.js.map +1 -1
- package/dist/commonjs/interfaces.d.ts +1 -28
- package/dist/commonjs/utils/geolocator.d.ts +1 -8
- package/dist/commonjs/utils/geolocator.js +2 -26
- package/dist/commonjs/utils/geolocator.js.map +1 -1
- package/dist/commonjs/utils/media-device.d.ts +1 -5
- package/dist/commonjs/utils/media-device.js +2 -27
- package/dist/commonjs/utils/media-device.js.map +1 -1
- package/dist/commonjs/utils/notificator.d.ts +1 -5
- package/dist/commonjs/utils/notificator.js +2 -35
- package/dist/commonjs/utils/notificator.js.map +1 -1
- package/dist/commonjs/utils/speech-generator.d.ts +1 -19
- package/dist/commonjs/utils/speech-generator.js +2 -35
- package/dist/commonjs/utils/speech-generator.js.map +1 -1
- package/dist/commonjs/utils/timeout-intervaller.d.ts +1 -28
- package/dist/commonjs/utils/timeout-intervaller.js +6 -131
- package/dist/commonjs/utils/timeout-intervaller.js.map +1 -1
- package/dist/native-modules/converters/datetime-config.d.ts +1 -13
- package/dist/native-modules/converters/datetime-config.js +1 -37
- package/dist/native-modules/converters/datetime-config.js.map +1 -1
- package/dist/native-modules/converters/datetime-duration.d.ts +6 -14
- package/dist/native-modules/converters/datetime-duration.js +3 -54
- package/dist/native-modules/converters/datetime-duration.js.map +1 -1
- package/dist/native-modules/converters/datetime.d.ts +4 -4
- package/dist/native-modules/converters/datetime.js +3 -26
- package/dist/native-modules/converters/datetime.js.map +1 -1
- package/dist/native-modules/converters/filter.d.ts +2 -2
- package/dist/native-modules/converters/filter.js +10 -94
- package/dist/native-modules/converters/filter.js.map +1 -1
- package/dist/native-modules/converters/numberformat.d.ts +3 -3
- package/dist/native-modules/converters/numberformat.js +3 -10
- package/dist/native-modules/converters/numberformat.js.map +1 -1
- package/dist/native-modules/converters/numeral.d.ts +1 -2
- package/dist/native-modules/converters/numeral.js +2 -43
- package/dist/native-modules/converters/numeral.js.map +1 -1
- package/dist/native-modules/converters/sort.d.ts +3 -3
- package/dist/native-modules/converters/sort.js +2 -62
- package/dist/native-modules/converters/sort.js.map +1 -1
- package/dist/native-modules/converters/sum.d.ts +1 -1
- package/dist/native-modules/converters/sum.js +7 -19
- package/dist/native-modules/converters/sum.js.map +1 -1
- package/dist/native-modules/converters/take.d.ts +2 -2
- package/dist/native-modules/converters/take.js +2 -16
- package/dist/native-modules/converters/take.js.map +1 -1
- package/dist/native-modules/interfaces.d.ts +1 -28
- package/dist/native-modules/utils/geolocator.d.ts +1 -8
- package/dist/native-modules/utils/geolocator.js +1 -26
- package/dist/native-modules/utils/geolocator.js.map +1 -1
- package/dist/native-modules/utils/media-device.d.ts +1 -5
- package/dist/native-modules/utils/media-device.js +1 -27
- package/dist/native-modules/utils/media-device.js.map +1 -1
- package/dist/native-modules/utils/notificator.d.ts +1 -5
- package/dist/native-modules/utils/notificator.js +1 -35
- package/dist/native-modules/utils/notificator.js.map +1 -1
- package/dist/native-modules/utils/speech-generator.d.ts +1 -19
- package/dist/native-modules/utils/speech-generator.js +1 -35
- package/dist/native-modules/utils/speech-generator.js.map +1 -1
- package/dist/native-modules/utils/timeout-intervaller.d.ts +1 -28
- package/dist/native-modules/utils/timeout-intervaller.js +1 -131
- package/dist/native-modules/utils/timeout-intervaller.js.map +1 -1
- package/package.json +9 -8
|
@@ -1,28 +1 @@
|
|
|
1
|
-
|
|
2
|
-
disabled?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export type FilterMode = 'exact' | 'startsWith' | 'endsWith' | 'contains' | '>=' | '>' | '<=' | '<' | '==' | 'Array.includes' | '!Array.includes' | 'Array.some' | '!Array.some';
|
|
5
|
-
export interface IFilterOptions extends IValueConverterOptions {
|
|
6
|
-
props: string | string[];
|
|
7
|
-
q: string | string[];
|
|
8
|
-
mode?: FilterMode;
|
|
9
|
-
minLength?: number;
|
|
10
|
-
take?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface INumberFormatOptions extends IValueConverterOptions {
|
|
13
|
-
delimiter?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ITakeOptions extends IValueConverterOptions {
|
|
16
|
-
take: number;
|
|
17
|
-
page: number;
|
|
18
|
-
skip?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface ISortOptions extends IValueConverterOptions {
|
|
21
|
-
key?: string;
|
|
22
|
-
asc: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface IDateTimeValueConverterConfig extends IValueConverterOptions {
|
|
25
|
-
defaultFormat: string;
|
|
26
|
-
locale?: string;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
1
|
+
export { type IValueConverterOptions, type FilterMode, type IFilterOptions, type INumberFormatOptions, type ITakeOptions, type ISortOptions, type IDateTimeValueConverterConfig, type IDurationOptions } from '@ev-core/au-core-resources';
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
private readonly ctr;
|
|
3
|
-
private id?;
|
|
4
|
-
constructor();
|
|
5
|
-
locate(): Promise<GeolocationPosition>;
|
|
6
|
-
watch(success: PositionCallback, error: PositionErrorCallback): void;
|
|
7
|
-
stopWatch(): void;
|
|
8
|
-
}
|
|
1
|
+
export { GeoLocator } from '@ev-core/au-core-resources';
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var GeoLocator = (function () {
|
|
3
|
-
function GeoLocator() {
|
|
4
|
-
this.id = undefined;
|
|
5
|
-
this.ctr = new PLATFORM.global.Geolocation();
|
|
6
|
-
}
|
|
7
|
-
GeoLocator.prototype.locate = function () {
|
|
8
|
-
var _this = this;
|
|
9
|
-
return new Promise(function (resolve, reject) {
|
|
10
|
-
_this.ctr.getCurrentPosition(function (location) {
|
|
11
|
-
return resolve(location);
|
|
12
|
-
}, function (error) { return reject(error); });
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
GeoLocator.prototype.watch = function (success, error) {
|
|
16
|
-
var watcher = this.ctr.watchPosition(success, error);
|
|
17
|
-
};
|
|
18
|
-
GeoLocator.prototype.stopWatch = function () {
|
|
19
|
-
if (this.id) {
|
|
20
|
-
this.ctr.clearWatch(this.id);
|
|
21
|
-
this.id = undefined;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return GeoLocator;
|
|
25
|
-
}());
|
|
26
|
-
export { GeoLocator };
|
|
1
|
+
export { GeoLocator } from '@ev-core/au-core-resources';
|
|
27
2
|
|
|
28
3
|
//# sourceMappingURL=geolocator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/geolocator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["utils/geolocator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC","file":"geolocator.js","sourceRoot":"../../../src/"}
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { PLATFORM } from 'aurelia-framework';
|
|
3
|
-
var MediaDevice = (function () {
|
|
4
|
-
function MediaDevice() {
|
|
5
|
-
}
|
|
6
|
-
MediaDevice.prototype.start = function (options) {
|
|
7
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
8
|
-
var _a;
|
|
9
|
-
return __generator(this, function (_b) {
|
|
10
|
-
switch (_b.label) {
|
|
11
|
-
case 0:
|
|
12
|
-
_a = this;
|
|
13
|
-
return [4, PLATFORM.global.navigator.mediaDevices.getDisplayMedia(options)];
|
|
14
|
-
case 1:
|
|
15
|
-
_a.stream = _b.sent();
|
|
16
|
-
return [2];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
MediaDevice.prototype.stop = function () {
|
|
22
|
-
var _a;
|
|
23
|
-
(_a = this.stream) === null || _a === void 0 ? void 0 : _a.getTracks().forEach(function (t) { return t.stop(); });
|
|
24
|
-
};
|
|
25
|
-
return MediaDevice;
|
|
26
|
-
}());
|
|
27
|
-
export { MediaDevice };
|
|
1
|
+
export { MediaDevice } from '@ev-core/au-core-resources';
|
|
28
2
|
|
|
29
3
|
//# sourceMappingURL=media-device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/media-device.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["utils/media-device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC","file":"media-device.js","sourceRoot":"../../../src/"}
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
get permission(): NotificationPermission;
|
|
3
|
-
requestPermission(): Promise<NotificationPermission>;
|
|
4
|
-
notify(title: string, options?: NotificationOptions): Promise<Notification>;
|
|
5
|
-
}
|
|
1
|
+
export { Notificator } from '@ev-core/au-core-resources';
|
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { PLATFORM } from "aurelia-framework";
|
|
3
|
-
var Notificator = (function () {
|
|
4
|
-
function Notificator() {
|
|
5
|
-
}
|
|
6
|
-
Object.defineProperty(Notificator.prototype, "permission", {
|
|
7
|
-
get: function () { return PLATFORM.global.Notification.permission; },
|
|
8
|
-
enumerable: false,
|
|
9
|
-
configurable: true
|
|
10
|
-
});
|
|
11
|
-
Notificator.prototype.requestPermission = function () { return PLATFORM.global.Notification.requestPermission(); };
|
|
12
|
-
Notificator.prototype.notify = function (title, options) {
|
|
13
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
14
|
-
var permission;
|
|
15
|
-
return __generator(this, function (_a) {
|
|
16
|
-
switch (_a.label) {
|
|
17
|
-
case 0:
|
|
18
|
-
permission = this.permission;
|
|
19
|
-
if (!(this.permission == 'default')) return [3, 2];
|
|
20
|
-
return [4, this.requestPermission()];
|
|
21
|
-
case 1:
|
|
22
|
-
permission = _a.sent();
|
|
23
|
-
_a.label = 2;
|
|
24
|
-
case 2:
|
|
25
|
-
if (permission == 'granted') {
|
|
26
|
-
return [2, new PLATFORM.global.Notification(title, options)];
|
|
27
|
-
}
|
|
28
|
-
return [2, undefined];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
return Notificator;
|
|
34
|
-
}());
|
|
35
|
-
export { Notificator };
|
|
1
|
+
export { Notificator } from '@ev-core/au-core-resources';
|
|
36
2
|
|
|
37
3
|
//# sourceMappingURL=notificator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/notificator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["utils/notificator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC","file":"notificator.js","sourceRoot":"../../../src/"}
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
|
|
2
|
-
lang?: string;
|
|
3
|
-
pitch?: number;
|
|
4
|
-
rate?: number;
|
|
5
|
-
volume?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare class SpeechGenerator {
|
|
8
|
-
private readonly utterance;
|
|
9
|
-
private id?;
|
|
10
|
-
constructor(opts?: IUtteranceOptions);
|
|
11
|
-
setOptions(opts?: IUtteranceOptions): void;
|
|
12
|
-
setVoice(voice: SpeechSynthesisVoice): void;
|
|
13
|
-
resume(): void;
|
|
14
|
-
pause(): void;
|
|
15
|
-
cancel(): void;
|
|
16
|
-
getVoices(): void;
|
|
17
|
-
speak(text: string): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
export { SpeechGenerator } from '@ev-core/au-core-resources';
|
|
@@ -1,37 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var SpeechGenerator = (function () {
|
|
3
|
-
function SpeechGenerator(opts) {
|
|
4
|
-
this.id = undefined;
|
|
5
|
-
this.utterance = new PLATFORM.global.SpeechSynthesisUtterance();
|
|
6
|
-
this.setOptions(opts);
|
|
7
|
-
}
|
|
8
|
-
SpeechGenerator.prototype.setOptions = function (opts) {
|
|
9
|
-
this.utterance.lang = (opts === null || opts === void 0 ? void 0 : opts.lang) || '';
|
|
10
|
-
this.utterance.pitch = (opts === null || opts === void 0 ? void 0 : opts.pitch) || 1;
|
|
11
|
-
this.utterance.rate = (opts === null || opts === void 0 ? void 0 : opts.rate) || 1;
|
|
12
|
-
this.utterance.volume = (opts === null || opts === void 0 ? void 0 : opts.volume) || 1;
|
|
13
|
-
};
|
|
14
|
-
SpeechGenerator.prototype.setVoice = function (voice) {
|
|
15
|
-
this.utterance.voice = voice;
|
|
16
|
-
};
|
|
17
|
-
SpeechGenerator.prototype.resume = function () {
|
|
18
|
-
PLATFORM.global.speechSynthesis.resume();
|
|
19
|
-
};
|
|
20
|
-
SpeechGenerator.prototype.pause = function () {
|
|
21
|
-
PLATFORM.global.speechSynthesis.pause();
|
|
22
|
-
};
|
|
23
|
-
SpeechGenerator.prototype.cancel = function () {
|
|
24
|
-
PLATFORM.global.speechSynthesis.cancel();
|
|
25
|
-
};
|
|
26
|
-
SpeechGenerator.prototype.getVoices = function () {
|
|
27
|
-
PLATFORM.global.speechSynthesis.getVoices();
|
|
28
|
-
};
|
|
29
|
-
SpeechGenerator.prototype.speak = function (text) {
|
|
30
|
-
this.utterance.text = text;
|
|
31
|
-
PLATFORM.global.speechSynthesis.speak(this.utterance);
|
|
32
|
-
};
|
|
33
|
-
return SpeechGenerator;
|
|
34
|
-
}());
|
|
35
|
-
export { SpeechGenerator };
|
|
1
|
+
export { SpeechGenerator } from '@ev-core/au-core-resources';
|
|
36
2
|
|
|
37
3
|
//# sourceMappingURL=speech-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/speech-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["utils/speech-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC","file":"speech-generator.js","sourceRoot":"../../../src/"}
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
|
|
2
|
-
protected id?: number;
|
|
3
|
-
abstract start(...args: any[]): void;
|
|
4
|
-
abstract clear(): TimeIntervalBase;
|
|
5
|
-
}
|
|
6
|
-
export declare class Timeouter extends TimeIntervalBase {
|
|
7
|
-
start<TArgs extends any[]>(handler: TimerHandler, ms: number, ...args: TArgs): void;
|
|
8
|
-
clear(): this;
|
|
9
|
-
}
|
|
10
|
-
export declare class Intervaller extends TimeIntervalBase {
|
|
11
|
-
start<TArgs extends any[]>(handler: TimerHandler, timeout: number, ...args: TArgs): void;
|
|
12
|
-
clear(): this;
|
|
13
|
-
}
|
|
14
|
-
export declare class AnimationFrameScheduler extends TimeIntervalBase {
|
|
15
|
-
start(handler: FrameRequestCallback): void;
|
|
16
|
-
clear(): TimeIntervalBase;
|
|
17
|
-
}
|
|
18
|
-
export declare class WorkerTimer extends TimeIntervalBase {
|
|
19
|
-
private worker?;
|
|
20
|
-
start<TArgs extends any[]>(handler: TimerHandler, timeout: number, ...args: TArgs): void;
|
|
21
|
-
clear(): TimeIntervalBase;
|
|
22
|
-
}
|
|
23
|
-
export declare class PromiseTimer extends TimeIntervalBase {
|
|
24
|
-
private cancel?;
|
|
25
|
-
start<TArgs extends any[]>(handler: TimerHandler, timeout: number, ...args: TArgs): void;
|
|
26
|
-
clear(): TimeIntervalBase;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
1
|
+
export { Timeouter, Intervaller, AnimationFrameScheduler, WorkerTimer, PromiseTimer } from '@ev-core/au-core-resources';
|
|
@@ -1,133 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { PLATFORM } from "aurelia-framework";
|
|
3
|
-
var TimeIntervalBase = (function () {
|
|
4
|
-
function TimeIntervalBase() {
|
|
5
|
-
}
|
|
6
|
-
return TimeIntervalBase;
|
|
7
|
-
}());
|
|
8
|
-
var Timeouter = (function (_super) {
|
|
9
|
-
__extends(Timeouter, _super);
|
|
10
|
-
function Timeouter() {
|
|
11
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
12
|
-
}
|
|
13
|
-
Timeouter.prototype.start = function (handler, ms) {
|
|
14
|
-
var _a;
|
|
15
|
-
var args = [];
|
|
16
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
17
|
-
args[_i - 2] = arguments[_i];
|
|
18
|
-
}
|
|
19
|
-
this.id = (_a = PLATFORM.global).setTimeout.apply(_a, __spreadArray([handler, ms], args, false));
|
|
20
|
-
};
|
|
21
|
-
Timeouter.prototype.clear = function () {
|
|
22
|
-
if (this.id != undefined) {
|
|
23
|
-
PLATFORM.global.clearTimeout(this.id);
|
|
24
|
-
this.id = undefined;
|
|
25
|
-
}
|
|
26
|
-
return this;
|
|
27
|
-
};
|
|
28
|
-
return Timeouter;
|
|
29
|
-
}(TimeIntervalBase));
|
|
30
|
-
export { Timeouter };
|
|
31
|
-
var Intervaller = (function (_super) {
|
|
32
|
-
__extends(Intervaller, _super);
|
|
33
|
-
function Intervaller() {
|
|
34
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
-
}
|
|
36
|
-
Intervaller.prototype.start = function (handler, timeout) {
|
|
37
|
-
var _a;
|
|
38
|
-
var args = [];
|
|
39
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
40
|
-
args[_i - 2] = arguments[_i];
|
|
41
|
-
}
|
|
42
|
-
this.id = (_a = PLATFORM.global).setInterval.apply(_a, __spreadArray([handler, timeout], args, false));
|
|
43
|
-
};
|
|
44
|
-
Intervaller.prototype.clear = function () {
|
|
45
|
-
if (this.id != undefined) {
|
|
46
|
-
PLATFORM.global.clearInterval(this.id);
|
|
47
|
-
this.id = undefined;
|
|
48
|
-
}
|
|
49
|
-
return this;
|
|
50
|
-
};
|
|
51
|
-
return Intervaller;
|
|
52
|
-
}(TimeIntervalBase));
|
|
53
|
-
export { Intervaller };
|
|
54
|
-
var AnimationFrameScheduler = (function (_super) {
|
|
55
|
-
__extends(AnimationFrameScheduler, _super);
|
|
56
|
-
function AnimationFrameScheduler() {
|
|
57
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
58
|
-
}
|
|
59
|
-
AnimationFrameScheduler.prototype.start = function (handler) {
|
|
60
|
-
this.id = PLATFORM.global.requestAnimationFrame(handler);
|
|
61
|
-
};
|
|
62
|
-
AnimationFrameScheduler.prototype.clear = function () {
|
|
63
|
-
if (this.id !== undefined) {
|
|
64
|
-
PLATFORM.global.cancelAnimationFrame(this.id);
|
|
65
|
-
this.id = undefined;
|
|
66
|
-
}
|
|
67
|
-
return this;
|
|
68
|
-
};
|
|
69
|
-
return AnimationFrameScheduler;
|
|
70
|
-
}(TimeIntervalBase));
|
|
71
|
-
export { AnimationFrameScheduler };
|
|
72
|
-
var WorkerTimer = (function (_super) {
|
|
73
|
-
__extends(WorkerTimer, _super);
|
|
74
|
-
function WorkerTimer() {
|
|
75
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
|
-
}
|
|
77
|
-
WorkerTimer.prototype.start = function (handler, timeout) {
|
|
78
|
-
var args = [];
|
|
79
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
80
|
-
args[_i - 2] = arguments[_i];
|
|
81
|
-
}
|
|
82
|
-
if (typeof handler !== 'function') {
|
|
83
|
-
throw new Error('Handler must be a function for WorkerTimer.');
|
|
84
|
-
}
|
|
85
|
-
var blob = new Blob(["\n self.onmessage = function(e) {\n const { timeout, args } = e.data;\n setTimeout(() => postMessage(args), timeout);\n };\n "], { type: 'application/javascript' });
|
|
86
|
-
this.worker = new Worker(URL.createObjectURL(blob));
|
|
87
|
-
this.worker.onmessage = function (e) { return handler.apply(void 0, e.data); };
|
|
88
|
-
this.worker.postMessage({ timeout: timeout, args: args });
|
|
89
|
-
};
|
|
90
|
-
WorkerTimer.prototype.clear = function () {
|
|
91
|
-
if (this.worker) {
|
|
92
|
-
this.worker.terminate();
|
|
93
|
-
this.worker = undefined;
|
|
94
|
-
}
|
|
95
|
-
return this;
|
|
96
|
-
};
|
|
97
|
-
return WorkerTimer;
|
|
98
|
-
}(TimeIntervalBase));
|
|
99
|
-
export { WorkerTimer };
|
|
100
|
-
var PromiseTimer = (function (_super) {
|
|
101
|
-
__extends(PromiseTimer, _super);
|
|
102
|
-
function PromiseTimer() {
|
|
103
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
104
|
-
}
|
|
105
|
-
PromiseTimer.prototype.start = function (handler, timeout) {
|
|
106
|
-
var args = [];
|
|
107
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
108
|
-
args[_i - 2] = arguments[_i];
|
|
109
|
-
}
|
|
110
|
-
if (typeof handler !== 'function') {
|
|
111
|
-
throw new Error('Handler must be a function for WorkerTimer.');
|
|
112
|
-
}
|
|
113
|
-
var canceled = false;
|
|
114
|
-
this.cancel = function () { canceled = true; };
|
|
115
|
-
new Promise(function (resolve) {
|
|
116
|
-
setTimeout(function () {
|
|
117
|
-
if (!canceled)
|
|
118
|
-
resolve();
|
|
119
|
-
}, timeout);
|
|
120
|
-
}).then(function () { return handler.apply(void 0, args); });
|
|
121
|
-
};
|
|
122
|
-
PromiseTimer.prototype.clear = function () {
|
|
123
|
-
if (this.cancel) {
|
|
124
|
-
this.cancel();
|
|
125
|
-
this.cancel = undefined;
|
|
126
|
-
}
|
|
127
|
-
return this;
|
|
128
|
-
};
|
|
129
|
-
return PromiseTimer;
|
|
130
|
-
}(TimeIntervalBase));
|
|
131
|
-
export { PromiseTimer };
|
|
1
|
+
export { Timeouter, Intervaller, AnimationFrameScheduler, WorkerTimer, PromiseTimer } from '@ev-core/au-core-resources';
|
|
132
2
|
|
|
133
3
|
//# sourceMappingURL=timeout-intervaller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/timeout-intervaller.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["utils/timeout-intervaller.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,WAAW,EACX,YAAY,EACf,MAAM,4BAA4B,CAAC","file":"timeout-intervaller.js","sourceRoot":"../../../src/"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ev-core/aurelia-v1-resources",
|
|
3
3
|
"description": "value-converters, binding-behaviors, view-hooks",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"repository": {
|
|
6
|
-
"type": "
|
|
7
|
-
"url": "
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://gitea.productivity.evenoit.no/devson/EV-Core.git",
|
|
8
|
+
"directory": "packages/aurelia/v1/resources"
|
|
8
9
|
},
|
|
9
10
|
"license": "UNLICENSED",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@ev-core/au-core-resources": "2.0.0"
|
|
13
|
+
},
|
|
10
14
|
"peerDependencies": {
|
|
11
15
|
"aurelia-binding": "^1.0.0 || ^2.0.0",
|
|
12
16
|
"aurelia-dependency-injection": "^1.0.0",
|
|
@@ -14,10 +18,7 @@
|
|
|
14
18
|
"aurelia-framework": "^1.0.0",
|
|
15
19
|
"aurelia-logging": "^1.0.0",
|
|
16
20
|
"aurelia-pal": "^1.0.0",
|
|
17
|
-
"aurelia-router": "^1.0.0"
|
|
18
|
-
"javascript-time-ago": "^2.0.0",
|
|
19
|
-
"luxon": "^2.0.0||^3.0.0",
|
|
20
|
-
"numeral": "^2.0.0"
|
|
21
|
+
"aurelia-router": "^1.0.0"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@types/node": "^22.17.0",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"socket.io": "^4.8.1",
|
|
49
50
|
"text": "requirejs/text",
|
|
50
51
|
"tslib": "^2.8.1",
|
|
51
|
-
"typescript": "^5.9.
|
|
52
|
+
"typescript": "^5.9.3",
|
|
52
53
|
"typescript-eslint": "^8.38.0"
|
|
53
54
|
},
|
|
54
55
|
"engines": {
|