@acorex/core 7.2.8 → 7.3.1
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/config/lib/configs.service.d.ts +2 -0
- package/esm2022/config/lib/configs.service.mjs +18 -6
- package/esm2022/dateTime/lib/datetime.module.mjs +4 -4
- package/esm2022/dateTime/lib/datetime.pipe.mjs +3 -3
- package/esm2022/events/lib/event.service.mjs +3 -3
- package/esm2022/file/lib/file.service.mjs +3 -3
- package/esm2022/http/lib/http.module.mjs +4 -4
- package/esm2022/http/lib/http.service.mjs +3 -3
- package/esm2022/image/lib/image.service.mjs +3 -3
- package/esm2022/intl/acorex-core-intl.mjs +5 -0
- package/esm2022/intl/index.mjs +3 -0
- package/esm2022/intl/lib/numbers/number-format-options.mjs +10 -0
- package/esm2022/intl/lib/numbers/numbers-utils.mjs +39 -0
- package/esm2022/pipes/lib/pipes.module.mjs +4 -4
- package/esm2022/pipes/lib/safe.pipe.mjs +3 -3
- package/esm2022/platform/lib/platform.service.mjs +3 -3
- package/esm2022/translation/lib/translation.module.mjs +4 -4
- package/esm2022/translation/lib/translator.pipe.mjs +3 -3
- package/esm2022/utils/lib/auto-unsubscribe.mjs +7 -8
- package/fesm2022/acorex-core-config.mjs +17 -5
- package/fesm2022/acorex-core-config.mjs.map +1 -1
- package/fesm2022/acorex-core-dateTime.mjs +7 -7
- package/fesm2022/acorex-core-events.mjs +3 -3
- package/fesm2022/acorex-core-file.mjs +3 -3
- package/fesm2022/acorex-core-http.mjs +7 -7
- package/fesm2022/acorex-core-image.mjs +3 -3
- package/fesm2022/acorex-core-intl.mjs +54 -0
- package/fesm2022/acorex-core-intl.mjs.map +1 -0
- package/fesm2022/acorex-core-pipes.mjs +7 -7
- package/fesm2022/acorex-core-platform.mjs +3 -3
- package/fesm2022/acorex-core-translation.mjs +7 -7
- package/fesm2022/acorex-core-utils.mjs +4 -5
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/intl/README.md +3 -0
- package/intl/index.d.ts +2 -0
- package/intl/lib/numbers/number-format-options.d.ts +7 -0
- package/intl/lib/numbers/numbers-utils.d.ts +3 -0
- package/package.json +10 -4
- package/utils/lib/auto-unsubscribe.d.ts +2 -2
@@ -1,11 +1,23 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
1
|
+
import { EnvironmentInjector, Injectable, InjectionToken, inject, runInInjectionContext } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export class AXConfigService {
|
4
|
-
|
5
|
-
|
4
|
+
constructor() {
|
5
|
+
this.injector = inject(EnvironmentInjector);
|
6
|
+
}
|
7
|
+
async get() {
|
8
|
+
return new Promise((resolve) => {
|
9
|
+
runInInjectionContext(this.injector, () => {
|
10
|
+
debugger;
|
11
|
+
const v = inject(new InjectionToken("AX_TOAST_CONFIG"));
|
12
|
+
resolve(v.gap);
|
13
|
+
});
|
14
|
+
});
|
15
|
+
}
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
17
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXConfigService, providedIn: 'root' }); }
|
6
18
|
}
|
7
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXConfigService, decorators: [{
|
8
20
|
type: Injectable,
|
9
|
-
args: [{ providedIn: '
|
21
|
+
args: [{ providedIn: 'root' }]
|
10
22
|
}] });
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlncy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMi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b290JyB9KVxuZXhwb3J0IGNsYXNzIEFYQ29uZmlnU2VydmljZSB7XG5cbiAgICBwcml2YXRlIGluamVjdG9yID0gaW5qZWN0KEVudmlyb25tZW50SW5qZWN0b3IpO1xuXG5cbiAgICBwdWJsaWMgYXN5bmMgZ2V0PFQgPSBzdHJpbmc+KCkge1xuICAgICAgICByZXR1cm4gbmV3IFByb21pc2U8VD4oKHJlc29sdmUpID0+IHtcbiAgICAgICAgICAgIHJ1bkluSW5qZWN0aW9uQ29udGV4dCh0aGlzLmluamVjdG9yLCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgZGVidWdnZXJcbiAgICAgICAgICAgICAgICBjb25zdCB2ID0gaW5qZWN0KG5ldyBJbmplY3Rpb25Ub2tlbjxzdHJpbmc+KFwiQVhfVE9BU1RfQ09ORklHXCIpKTtcbiAgICAgICAgICAgICAgICByZXNvbHZlKCh2IGFzIGFueSkuZ2FwKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbn0iXX0=
|
@@ -23,11 +23,11 @@ export class AXDateTimeModule {
|
|
23
23
|
}
|
24
24
|
});
|
25
25
|
}
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
27
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
28
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
27
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] }); }
|
28
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule }); }
|
29
29
|
}
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule, decorators: [{
|
31
31
|
type: NgModule,
|
32
32
|
args: [{
|
33
33
|
imports: [],
|
@@ -16,10 +16,10 @@ export class AXDateTimePipe {
|
|
16
16
|
return date.format(format);
|
17
17
|
}
|
18
18
|
}
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
20
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
20
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimePipe, name: "axDate" }); }
|
21
21
|
}
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
23
23
|
type: Pipe,
|
24
24
|
args: [{ name: 'axDate' }]
|
25
25
|
}], ctorParameters: function () { return []; } });
|
@@ -26,10 +26,10 @@ export class AXEventService {
|
|
26
26
|
d.events = [];
|
27
27
|
}
|
28
28
|
}
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
30
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
30
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXEventService, providedIn: 'root' }); }
|
31
31
|
}
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXEventService, decorators: [{
|
33
33
|
type: Injectable,
|
34
34
|
args: [{ providedIn: 'root' }]
|
35
35
|
}] });
|
@@ -92,10 +92,10 @@ export class AXFileService {
|
|
92
92
|
input.click();
|
93
93
|
});
|
94
94
|
}
|
95
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
96
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
95
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXFileService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
96
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXFileService, providedIn: 'root' }); }
|
97
97
|
}
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXFileService, decorators: [{
|
99
99
|
type: Injectable,
|
100
100
|
args: [{ providedIn: 'root' }]
|
101
101
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
@@ -4,15 +4,15 @@ import { HttpClientModule } from '@angular/common/http';
|
|
4
4
|
import { AXHttpService } from './http.service';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export class AXHttpModule {
|
7
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
8
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
8
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, imports: [CommonModule,
|
9
9
|
HttpClientModule], exports: [HttpClientModule] }); }
|
10
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
10
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, providers: [
|
11
11
|
AXHttpService
|
12
12
|
], imports: [CommonModule,
|
13
13
|
HttpClientModule, HttpClientModule] }); }
|
14
14
|
}
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, decorators: [{
|
16
16
|
type: NgModule,
|
17
17
|
args: [{
|
18
18
|
declarations: [],
|
@@ -138,10 +138,10 @@ export class AXHttpService {
|
|
138
138
|
// };
|
139
139
|
// }
|
140
140
|
}
|
141
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
142
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpService, deps: [{ token: i1.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
142
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpService, providedIn: 'root' }); }
|
143
143
|
}
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpService, decorators: [{
|
145
145
|
type: Injectable,
|
146
146
|
args: [{ providedIn: 'root' }]
|
147
147
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Injector }]; } });
|
@@ -33,10 +33,10 @@ export class AXImageService {
|
|
33
33
|
canvas.getContext('2d').drawImage(image, 0, 0, width, height);
|
34
34
|
return new Promise((resolve) => canvas.toBlob(resolve, options.type, options.quality));
|
35
35
|
}
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
37
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXImageService, providedIn: 'root' }); }
|
38
38
|
}
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXImageService, decorators: [{
|
40
40
|
type: Injectable,
|
41
41
|
args: [{ providedIn: 'root' }]
|
42
42
|
}], ctorParameters: function () { return []; } });
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* Generated bundle index. Do not edit.
|
3
|
+
*/
|
4
|
+
export * from './index';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtaW50bC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9pbnRsL3NyYy9hY29yZXgtY29yZS1pbnRsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export * from './lib/numbers/number-format-options';
|
2
|
+
export * from './lib/numbers/numbers-utils';
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvaW50bC9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxxQ0FBcUMsQ0FBQztBQUNwRCxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvbnVtYmVycy9udW1iZXItZm9ybWF0LW9wdGlvbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbnVtYmVycy9udW1iZXJzLXV0aWxzJztcbiJdfQ==
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export class AXNumberFormatOptions {
|
2
|
+
constructor() {
|
3
|
+
this.scale = 0;
|
4
|
+
this.thousandsSeparator = ",";
|
5
|
+
this.fractionalSeparator = ".";
|
6
|
+
this.currency = null;
|
7
|
+
this.style = 'number';
|
8
|
+
}
|
9
|
+
}
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLWZvcm1hdC1vcHRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2ludGwvc3JjL2xpYi9udW1iZXJzL251bWJlci1mb3JtYXQtb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLE9BQU8scUJBQXFCO0lBQWxDO1FBRUksVUFBSyxHQUFXLENBQUMsQ0FBQztRQUVsQix1QkFBa0IsR0FBbUIsR0FBRyxDQUFDO1FBRXpDLHdCQUFtQixHQUFrQixHQUFHLENBQUM7UUFFekMsYUFBUSxHQUFtQixJQUFJLENBQUM7UUFFaEMsVUFBSyxHQUFzQyxRQUFRLENBQUM7SUFDeEQsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNsYXNzIEFYTnVtYmVyRm9ybWF0T3B0aW9ucyB7XG5cbiAgICBzY2FsZTogbnVtYmVyID0gMDtcblxuICAgIHRob3VzYW5kc1NlcGFyYXRvcj86IHN0cmluZyB8IG51bGwgPSBcIixcIjtcblxuICAgIGZyYWN0aW9uYWxTZXBhcmF0b3I6IHN0cmluZyB8IG51bGwgPSBcIi5cIjtcblxuICAgIGN1cnJlbmN5Pzogc3RyaW5nIHwgbnVsbCA9IG51bGw7XG5cbiAgICBzdHlsZTogJ2N1cnJlbmN5JyB8ICdwZXJjZW50JyB8ICdudW1iZXInID0gJ251bWJlcic7XG59Il19
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { AXNumberFormatOptions } from "./number-format-options";
|
2
|
+
export const AXDefaultNumberOptions = {
|
3
|
+
scale: 2,
|
4
|
+
fractionalSeparator: ".",
|
5
|
+
thousandsSeparator: ",",
|
6
|
+
style: 'number'
|
7
|
+
};
|
8
|
+
export function parseNumberOptions(input) {
|
9
|
+
const pattern = /[cdpn]{1}[0-9]+/;
|
10
|
+
if (input?.toLowerCase().match(pattern)) {
|
11
|
+
const style = input[0];
|
12
|
+
const num = input.substring(1)?.trim();
|
13
|
+
const scale = num ? Number(num) : AXDefaultNumberOptions.scale;
|
14
|
+
const options = new AXNumberFormatOptions();
|
15
|
+
switch (style) {
|
16
|
+
case 'n':
|
17
|
+
options.style = 'number';
|
18
|
+
options.scale = scale;
|
19
|
+
options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;
|
20
|
+
options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;
|
21
|
+
break;
|
22
|
+
case 'c':
|
23
|
+
options.style = 'currency';
|
24
|
+
options.scale = scale;
|
25
|
+
options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;
|
26
|
+
options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;
|
27
|
+
break;
|
28
|
+
case 'p':
|
29
|
+
options.style = 'percent';
|
30
|
+
options.scale = scale;
|
31
|
+
options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;
|
32
|
+
options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;
|
33
|
+
break;
|
34
|
+
}
|
35
|
+
return options;
|
36
|
+
}
|
37
|
+
return AXDefaultNumberOptions;
|
38
|
+
}
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVycy11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9pbnRsL3NyYy9saWIvbnVtYmVycy9udW1iZXJzLXV0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBRWhFLE1BQU0sQ0FBQyxNQUFNLHNCQUFzQixHQUEwQjtJQUN6RCxLQUFLL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DYXNlKCkubWF0Y2gocGF0dGVybikpIHtcbiAgICAgICAgY29uc3Qgc3R5bGUgPSBpbnB1dFswXTtcbiAgICAgICAgY29uc3QgbnVtID0gaW5wdXQuc3Vic3RyaW5nKDEpPy50cmltKCkgO1xuICAgICAgICBjb25zdCBzY2FsZSA9IG51bSA/IE51bWJlcihudW0pIDogQVhEZWZhdWx0TnVtYmVyT3B0aW9ucy5zY2FsZTtcbiAgICAgICAgY29uc3Qgb3B0aW9ucyA9IG5ldyBBWE51bWJlckZvcm1hdE9wdGlvbnMoKTtcbiAgICAgICAgc3dpdGNoIChzdHlsZSkge1xuICAgICAgICAgICAgY2FzZSAnbic6XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5zdHlsZSA9ICdudW1iZXInO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuc2NhbGUgPSBzY2FsZTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmZyYWN0aW9uYWxTZXBhcmF0b3IgPSBBWERlZmF1bHROdW1iZXJPcHRpb25zLmZyYWN0aW9uYWxTZXBhcmF0b3I7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy50aG91c2FuZHNTZXBhcmF0b3IgPSBBWERlZmF1bHROdW1iZXJPcHRpb25zLnRob3VzYW5kc1NlcGFyYXRvcjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ2MnOlxuICAgICAgICAgICAgICAgIG9wdGlvbnMuc3R5bGUgPSAnY3VycmVuY3knO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuc2NhbGUgPSBzY2FsZTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmZyYWN0aW9uYWxTZXBhcmF0b3IgPSBBWERlZmF1bHROdW1iZXJPcHRpb25zLmZyYWN0aW9uYWxTZXBhcmF0b3I7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy50aG91c2FuZHNTZXBhcmF0b3IgPSBBWERlZmF1bHROdW1iZXJPcHRpb25zLnRob3VzYW5kc1NlcGFyYXRvcjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ3AnOlxuICAgICAgICAgICAgICAgIG9wdGlvbnMuc3R5bGUgPSAncGVyY2VudCc7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5zY2FsZSA9IHNjYWxlO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuZnJhY3Rpb25hbFNlcGFyYXRvciA9IEFYRGVmYXVsdE51bWJlck9wdGlvbnMuZnJhY3Rpb25hbFNlcGFyYXRvcjtcbiAgICAgICAgICAgICAgICBvcHRpb25zLnRob3VzYW5kc1NlcGFyYXRvciA9IEFYRGVmYXVsdE51bWJlck9wdGlvbnMudGhvdXNhbmRzU2VwYXJhdG9yO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvcHRpb25zO1xuICAgIH1cbiAgICByZXR1cm4gQVhEZWZhdWx0TnVtYmVyT3B0aW9uc1xufSJdfQ==
|
@@ -3,11 +3,11 @@ import { CommonModule } from '@angular/common';
|
|
3
3
|
import { AXSafePipe } from './safe.pipe';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
export class AXPipesModule {
|
6
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
7
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
8
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, declarations: [AXSafePipe], imports: [CommonModule], exports: [AXSafePipe] }); }
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, imports: [CommonModule] }); }
|
9
9
|
}
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, decorators: [{
|
11
11
|
type: NgModule,
|
12
12
|
args: [{
|
13
13
|
declarations: [AXSafePipe],
|
@@ -18,10 +18,10 @@ export class AXSafePipe {
|
|
18
18
|
default: throw new Error(`Invalid safe type specified: ${type}`);
|
19
19
|
}
|
20
20
|
}
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
22
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
22
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXSafePipe, name: "safe" }); }
|
23
23
|
}
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXSafePipe, decorators: [{
|
25
25
|
type: Pipe,
|
26
26
|
args: [{
|
27
27
|
name: 'safe',
|
@@ -143,10 +143,10 @@ export class AXPlatform {
|
|
143
143
|
// init functions
|
144
144
|
this._setFullHeightRatio();
|
145
145
|
}
|
146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
147
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
147
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPlatform, providedIn: 'root' }); }
|
148
148
|
}
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPlatform, decorators: [{
|
150
150
|
type: Injectable,
|
151
151
|
args: [{
|
152
152
|
providedIn: 'root',
|
@@ -2,11 +2,11 @@ import { NgModule } from '@angular/core';
|
|
2
2
|
import { AXTranslatorPipe } from './translator.pipe';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export class AXTranslationModule {
|
5
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
6
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
7
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
5
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
6
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] }); }
|
7
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule }); }
|
8
8
|
}
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule, decorators: [{
|
10
10
|
type: NgModule,
|
11
11
|
args: [{
|
12
12
|
imports: [],
|
@@ -5,10 +5,10 @@ export class AXTranslatorPipe {
|
|
5
5
|
transform(value, arg1, arg2) {
|
6
6
|
return AXTranslator.get(value, arg1, arg2);
|
7
7
|
}
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
9
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXTranslatorPipe, name: "trans" }); }
|
10
10
|
}
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslatorPipe, decorators: [{
|
12
12
|
type: Pipe,
|
13
13
|
args: [{ name: 'trans', pure: true }]
|
14
14
|
}] });
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import { Injectable } from
|
2
|
-
import { Subject, takeUntil } from
|
1
|
+
import { Injectable } from '@angular/core';
|
2
|
+
import { Subject, takeUntil } from 'rxjs';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export function AXAutoUnsubscriber() {
|
5
5
|
return function (constructor) {
|
6
6
|
const orig = constructor.prototype.ngOnDestroy;
|
7
7
|
constructor.prototype.ngOnDestroy = function () {
|
8
|
-
debugger;
|
9
8
|
for (const prop in this) {
|
10
9
|
const property = this[prop];
|
11
|
-
if (typeof property.subscribe ===
|
10
|
+
if (typeof property.subscribe === 'function') {
|
12
11
|
property.unsubscribe();
|
13
12
|
}
|
14
13
|
}
|
@@ -28,10 +27,10 @@ export class AXUnsubscriber {
|
|
28
27
|
ngOnDestroy() {
|
29
28
|
this.unsubscribe();
|
30
29
|
}
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
32
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXUnsubscriber, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
31
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXUnsubscriber }); }
|
33
32
|
}
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXUnsubscriber, decorators: [{
|
35
34
|
type: Injectable
|
36
35
|
}] });
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0by11bnN1YnNjcmliZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS91dGlscy9zcmMvbGliL2F1dG8tdW5zdWJzY3JpYmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBYSxNQUFNLGVBQWUsQ0FBQztBQUN0RCxPQUFPLEVBQWMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFFdEQsTUFBTSxVQUFVLGtCQUFrQjtJQUNoQy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O1xuICB9XG5cbiAgcHVibGljIG5nT25EZXN0cm95KCk6IHZvaWQge1xuICAgIHRoaXMudW5zdWJzY3JpYmUoKTtcbiAgfVxufVxuIl19
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { set, merge, get } from 'lodash-es';
|
2
2
|
import { Subject } from 'rxjs';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Injectable } from '@angular/core';
|
4
|
+
import { inject, EnvironmentInjector, runInInjectionContext, InjectionToken, Injectable } from '@angular/core';
|
5
5
|
|
6
6
|
// @dynamic
|
7
7
|
class AXConfig {
|
@@ -26,12 +26,24 @@ class AXConfig {
|
|
26
26
|
}
|
27
27
|
|
28
28
|
class AXConfigService {
|
29
|
-
|
30
|
-
|
29
|
+
constructor() {
|
30
|
+
this.injector = inject(EnvironmentInjector);
|
31
|
+
}
|
32
|
+
async get() {
|
33
|
+
return new Promise((resolve) => {
|
34
|
+
runInInjectionContext(this.injector, () => {
|
35
|
+
debugger;
|
36
|
+
const v = inject(new InjectionToken("AX_TOAST_CONFIG"));
|
37
|
+
resolve(v.gap);
|
38
|
+
});
|
39
|
+
});
|
40
|
+
}
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
42
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXConfigService, providedIn: 'root' }); }
|
31
43
|
}
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXConfigService, decorators: [{
|
33
45
|
type: Injectable,
|
34
|
-
args: [{ providedIn: '
|
46
|
+
args: [{ providedIn: 'root' }]
|
35
47
|
}] });
|
36
48
|
|
37
49
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-config.mjs","sources":["../../../../libs/core/config/src/lib/configs.ts","../../../../libs/core/config/src/lib/configs.service.ts","../../../../libs/core/config/src/acorex-core-config.ts"],"sourcesContent":["import { get, set, merge } from 'lodash-es';\nimport { Subject, Observable } from 'rxjs';\n\n// @dynamic\nexport class AXConfig {\n private static dataModel: any = {};\n private static dataChangeSubject = new Subject<any>();\n\n static get onChange(): Observable<any> {\n return AXConfig.dataChangeSubject.asObservable();\n }\n\n static set(config: any): void;\n static set(path: string, value?: any): void;\n static set(arg1?: any, arg2?: any): void {\n if (arg1 && typeof arg1 == 'string') {\n set(AXConfig.dataModel, arg1, arg2);\n AXConfig.dataChangeSubject.next(AXConfig.dataModel);\n }\n if (arg1 && typeof arg1 == 'object') {\n merge(AXConfig.dataModel, arg1);\n AXConfig.dataChangeSubject.next(AXConfig.dataModel);\n }\n }\n\n static get(path: string, defaultValue?: any): any {\n return get(AXConfig.dataModel, path, defaultValue);\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({providedIn: '
|
1
|
+
{"version":3,"file":"acorex-core-config.mjs","sources":["../../../../libs/core/config/src/lib/configs.ts","../../../../libs/core/config/src/lib/configs.service.ts","../../../../libs/core/config/src/acorex-core-config.ts"],"sourcesContent":["import { get, set, merge } from 'lodash-es';\nimport { Subject, Observable } from 'rxjs';\n\n// @dynamic\nexport class AXConfig {\n private static dataModel: any = {};\n private static dataChangeSubject = new Subject<any>();\n\n static get onChange(): Observable<any> {\n return AXConfig.dataChangeSubject.asObservable();\n }\n\n static set(config: any): void;\n static set(path: string, value?: any): void;\n static set(arg1?: any, arg2?: any): void {\n if (arg1 && typeof arg1 == 'string') {\n set(AXConfig.dataModel, arg1, arg2);\n AXConfig.dataChangeSubject.next(AXConfig.dataModel);\n }\n if (arg1 && typeof arg1 == 'object') {\n merge(AXConfig.dataModel, arg1);\n AXConfig.dataChangeSubject.next(AXConfig.dataModel);\n }\n }\n\n static get(path: string, defaultValue?: any): any {\n return get(AXConfig.dataModel, path, defaultValue);\n }\n}\n","import { EnvironmentInjector, Injectable, InjectionToken, inject, runInInjectionContext } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class AXConfigService {\n\n private injector = inject(EnvironmentInjector);\n\n\n public async get<T = string>() {\n return new Promise<T>((resolve) => {\n runInInjectionContext(this.injector, () => {\n debugger\n const v = inject(new InjectionToken<string>(\"AX_TOAST_CONFIG\"));\n resolve((v as any).gap);\n });\n });\n }\n\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;MACa,QAAQ,CAAA;aACJ,IAAS,CAAA,SAAA,GAAQ,EAAE,CAAC,EAAA;AACpB,IAAA,SAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,OAAO,EAAO,CAAC,EAAA;AAEtD,IAAA,WAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,QAAQ,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KAClD;AAID,IAAA,OAAO,GAAG,CAAC,IAAU,EAAE,IAAU,EAAA;AAC/B,QAAA,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI,QAAQ,EAAE;YACnC,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACpC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACrD,SAAA;AACD,QAAA,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI,QAAQ,EAAE;AACnC,YAAA,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YAChC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACrD,SAAA;KACF;AAED,IAAA,OAAO,GAAG,CAAC,IAAY,EAAE,YAAkB,EAAA;QACzC,OAAO,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;KACpD;;;MCxBU,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAGY,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAalD,KAAA;AAVU,IAAA,MAAM,GAAG,GAAA;AACZ,QAAA,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,KAAI;AAC9B,YAAA,qBAAqB,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAK;AACtC,gBAAA,SAAQ;gBACR,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,cAAc,CAAS,iBAAiB,CAAC,CAAC,CAAC;AAChE,gBAAA,OAAO,CAAE,CAAS,CAAC,GAAG,CAAC,CAAC;AAC5B,aAAC,CAAC,CAAC;AACP,SAAC,CAAC,CAAC;KACN;8GAbQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACFlC;;AAEG;;;;"}
|
@@ -303,10 +303,10 @@ class AXDateTimePipe {
|
|
303
303
|
return date.format(format);
|
304
304
|
}
|
305
305
|
}
|
306
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
307
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
306
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
307
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimePipe, name: "axDate" }); }
|
308
308
|
}
|
309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
310
310
|
type: Pipe,
|
311
311
|
args: [{ name: 'axDate' }]
|
312
312
|
}], ctorParameters: function () { return []; } });
|
@@ -911,11 +911,11 @@ class AXDateTimeModule {
|
|
911
911
|
}
|
912
912
|
});
|
913
913
|
}
|
914
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
915
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
916
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
914
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
915
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] }); }
|
916
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule }); }
|
917
917
|
}
|
918
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXDateTimeModule, decorators: [{
|
919
919
|
type: NgModule,
|
920
920
|
args: [{
|
921
921
|
imports: [],
|
@@ -27,10 +27,10 @@ class AXEventService {
|
|
27
27
|
d.events = [];
|
28
28
|
}
|
29
29
|
}
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
31
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
31
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXEventService, providedIn: 'root' }); }
|
32
32
|
}
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXEventService, decorators: [{
|
34
34
|
type: Injectable,
|
35
35
|
args: [{ providedIn: 'root' }]
|
36
36
|
}] });
|
@@ -159,10 +159,10 @@ class AXFileService {
|
|
159
159
|
input.click();
|
160
160
|
});
|
161
161
|
}
|
162
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
163
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXFileService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
163
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXFileService, providedIn: 'root' }); }
|
164
164
|
}
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXFileService, decorators: [{
|
166
166
|
type: Injectable,
|
167
167
|
args: [{ providedIn: 'root' }]
|
168
168
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
@@ -161,24 +161,24 @@ class AXHttpService {
|
|
161
161
|
// };
|
162
162
|
// }
|
163
163
|
}
|
164
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
165
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
164
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpService, deps: [{ token: i1.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
165
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpService, providedIn: 'root' }); }
|
166
166
|
}
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpService, decorators: [{
|
168
168
|
type: Injectable,
|
169
169
|
args: [{ providedIn: 'root' }]
|
170
170
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Injector }]; } });
|
171
171
|
|
172
172
|
class AXHttpModule {
|
173
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
174
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
173
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
174
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, imports: [CommonModule,
|
175
175
|
HttpClientModule], exports: [HttpClientModule] }); }
|
176
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
176
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, providers: [
|
177
177
|
AXHttpService
|
178
178
|
], imports: [CommonModule,
|
179
179
|
HttpClientModule, HttpClientModule] }); }
|
180
180
|
}
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXHttpModule, decorators: [{
|
182
182
|
type: NgModule,
|
183
183
|
args: [{
|
184
184
|
declarations: [],
|
@@ -34,10 +34,10 @@ class AXImageService {
|
|
34
34
|
canvas.getContext('2d').drawImage(image, 0, 0, width, height);
|
35
35
|
return new Promise((resolve) => canvas.toBlob(resolve, options.type, options.quality));
|
36
36
|
}
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
38
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
38
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXImageService, providedIn: 'root' }); }
|
39
39
|
}
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXImageService, decorators: [{
|
41
41
|
type: Injectable,
|
42
42
|
args: [{ providedIn: 'root' }]
|
43
43
|
}], ctorParameters: function () { return []; } });
|
@@ -0,0 +1,54 @@
|
|
1
|
+
class AXNumberFormatOptions {
|
2
|
+
constructor() {
|
3
|
+
this.scale = 0;
|
4
|
+
this.thousandsSeparator = ",";
|
5
|
+
this.fractionalSeparator = ".";
|
6
|
+
this.currency = null;
|
7
|
+
this.style = 'number';
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
const AXDefaultNumberOptions = {
|
12
|
+
scale: 2,
|
13
|
+
fractionalSeparator: ".",
|
14
|
+
thousandsSeparator: ",",
|
15
|
+
style: 'number'
|
16
|
+
};
|
17
|
+
function parseNumberOptions(input) {
|
18
|
+
const pattern = /[cdpn]{1}[0-9]+/;
|
19
|
+
if (input?.toLowerCase().match(pattern)) {
|
20
|
+
const style = input[0];
|
21
|
+
const num = input.substring(1)?.trim();
|
22
|
+
const scale = num ? Number(num) : AXDefaultNumberOptions.scale;
|
23
|
+
const options = new AXNumberFormatOptions();
|
24
|
+
switch (style) {
|
25
|
+
case 'n':
|
26
|
+
options.style = 'number';
|
27
|
+
options.scale = scale;
|
28
|
+
options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;
|
29
|
+
options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;
|
30
|
+
break;
|
31
|
+
case 'c':
|
32
|
+
options.style = 'currency';
|
33
|
+
options.scale = scale;
|
34
|
+
options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;
|
35
|
+
options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;
|
36
|
+
break;
|
37
|
+
case 'p':
|
38
|
+
options.style = 'percent';
|
39
|
+
options.scale = scale;
|
40
|
+
options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;
|
41
|
+
options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;
|
42
|
+
break;
|
43
|
+
}
|
44
|
+
return options;
|
45
|
+
}
|
46
|
+
return AXDefaultNumberOptions;
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Generated bundle index. Do not edit.
|
51
|
+
*/
|
52
|
+
|
53
|
+
export { AXDefaultNumberOptions, AXNumberFormatOptions, parseNumberOptions };
|
54
|
+
//# sourceMappingURL=acorex-core-intl.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-core-intl.mjs","sources":["../../../../libs/core/intl/src/lib/numbers/number-format-options.ts","../../../../libs/core/intl/src/lib/numbers/numbers-utils.ts","../../../../libs/core/intl/src/acorex-core-intl.ts"],"sourcesContent":["export class AXNumberFormatOptions {\n\n scale: number = 0;\n\n thousandsSeparator?: string | null = \",\";\n\n fractionalSeparator: string | null = \".\";\n\n currency?: string | null = null;\n\n style: 'currency' | 'percent' | 'number' = 'number';\n}","import { AXNumberFormatOptions } from \"./number-format-options\";\n\nexport const AXDefaultNumberOptions: AXNumberFormatOptions = {\n scale: 2,\n fractionalSeparator: \".\",\n thousandsSeparator: \",\",\n style : 'number'\n}\n\nexport function parseNumberOptions(input: string): AXNumberFormatOptions {\n const pattern = /[cdpn]{1}[0-9]+/;\n if (input?.toLowerCase().match(pattern)) {\n const style = input[0];\n const num = input.substring(1)?.trim() ;\n const scale = num ? Number(num) : AXDefaultNumberOptions.scale;\n const options = new AXNumberFormatOptions();\n switch (style) {\n case 'n':\n options.style = 'number';\n options.scale = scale;\n options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;\n options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;\n break;\n case 'c':\n options.style = 'currency';\n options.scale = scale;\n options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;\n options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;\n break;\n case 'p':\n options.style = 'percent';\n options.scale = scale;\n options.fractionalSeparator = AXDefaultNumberOptions.fractionalSeparator;\n options.thousandsSeparator = AXDefaultNumberOptions.thousandsSeparator;\n break;\n }\n return options;\n }\n return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AAsB,CAAC,kBAAkB,CAAC;gBACvE,MAAM;AACV,YAAA,KAAK,GAAG;AACJ,gBAAA,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC;AAC3B,gBAAA,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB,gBAAA,OAAO,CAAC,mBAAmB,GAAG,sBAAsB,CAAC,mBAAmB,CAAC;AACzE,gBAAA,OAAO,CAAC,kBAAkB,GAAG,sBAAsB,CAAC,kBAAkB,CAAC;gBACvE,MAAM;AACV,YAAA,KAAK,GAAG;AACJ,gBAAA,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC;AAC1B,gBAAA,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AACtB,gBAAA,OAAO,CAAC,mBAAmB,GAAG,sBAAsB,CAAC,mBAAmB,CAAC;AACzE,gBAAA,OAAO,CAAC,kBAAkB,GAAG,sBAAsB,CAAC,kBAAkB,CAAC;gBACvE,MAAM;AACb,SAAA;AACD,QAAA,OAAO,OAAO,CAAC;AAClB,KAAA;AACD,IAAA,OAAO,sBAAsB,CAAA;AACjC;;ACvCA;;AAEG;;;;"}
|
@@ -19,10 +19,10 @@ class AXSafePipe {
|
|
19
19
|
default: throw new Error(`Invalid safe type specified: ${type}`);
|
20
20
|
}
|
21
21
|
}
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
23
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
23
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXSafePipe, name: "safe" }); }
|
24
24
|
}
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXSafePipe, decorators: [{
|
26
26
|
type: Pipe,
|
27
27
|
args: [{
|
28
28
|
name: 'safe',
|
@@ -31,11 +31,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
31
31
|
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
32
32
|
|
33
33
|
class AXPipesModule {
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
35
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
36
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
35
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, declarations: [AXSafePipe], imports: [CommonModule], exports: [AXSafePipe] }); }
|
36
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, imports: [CommonModule] }); }
|
37
37
|
}
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPipesModule, decorators: [{
|
39
39
|
type: NgModule,
|
40
40
|
args: [{
|
41
41
|
declarations: [AXSafePipe],
|
@@ -144,10 +144,10 @@ class AXPlatform {
|
|
144
144
|
// init functions
|
145
145
|
this._setFullHeightRatio();
|
146
146
|
}
|
147
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
148
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
148
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPlatform, providedIn: 'root' }); }
|
149
149
|
}
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXPlatform, decorators: [{
|
151
151
|
type: Injectable,
|
152
152
|
args: [{
|
153
153
|
providedIn: 'root',
|
@@ -48,20 +48,20 @@ class AXTranslatorPipe {
|
|
48
48
|
transform(value, arg1, arg2) {
|
49
49
|
return AXTranslator.get(value, arg1, arg2);
|
50
50
|
}
|
51
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
52
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.
|
51
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
52
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXTranslatorPipe, name: "trans" }); }
|
53
53
|
}
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslatorPipe, decorators: [{
|
55
55
|
type: Pipe,
|
56
56
|
args: [{ name: 'trans', pure: true }]
|
57
57
|
}] });
|
58
58
|
|
59
59
|
class AXTranslationModule {
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
61
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.
|
62
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
61
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] }); }
|
62
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule }); }
|
63
63
|
}
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXTranslationModule, decorators: [{
|
65
65
|
type: NgModule,
|
66
66
|
args: [{
|
67
67
|
imports: [],
|
@@ -8,10 +8,9 @@ function AXAutoUnsubscriber() {
|
|
8
8
|
return function (constructor) {
|
9
9
|
const orig = constructor.prototype.ngOnDestroy;
|
10
10
|
constructor.prototype.ngOnDestroy = function () {
|
11
|
-
debugger;
|
12
11
|
for (const prop in this) {
|
13
12
|
const property = this[prop];
|
14
|
-
if (typeof property.subscribe ===
|
13
|
+
if (typeof property.subscribe === 'function') {
|
15
14
|
property.unsubscribe();
|
16
15
|
}
|
17
16
|
}
|
@@ -31,10 +30,10 @@ class AXUnsubscriber {
|
|
31
30
|
ngOnDestroy() {
|
32
31
|
this.unsubscribe();
|
33
32
|
}
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
35
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXUnsubscriber, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
34
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXUnsubscriber }); }
|
36
35
|
}
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXUnsubscriber, decorators: [{
|
38
37
|
type: Injectable
|
39
38
|
}] });
|
40
39
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/object-util.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from \"@angular/core\"\nimport { Observable, Subject, takeUntil } from \"rxjs\"\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy\n constructor.prototype.ngOnDestroy = function () {\n debugger\n for (const prop in this) {\n const property = this[prop]\n if (typeof property.subscribe === \"function\") {\n property.unsubscribe()\n }\n }\n orig.apply()\n }\n }\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T>): Observable<T> => origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva';\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: any[] | { color: any; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [\n X * 1.656492 - Y * 0.354851 - Z * 0.255038,\n -X * 0.707196 + Y * 1.655397 + Z * 0.036152,\n X * 0.051713 - Y * 0.121364 + Z * 1.01153,\n ];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) =>\n x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055\n );\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left && ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height;\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","// @dynamic\nexport class AXHtmlUtil {\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map(c => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n\n static hasFocus(element: HTMLElement)\n {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n}","// @dynamic\nexport class AXObjectUtil {\n static deepJSONClone(obj: any): any {\n return obj ? JSON.parse(JSON.stringify(obj)) : null;\n }\n\n static deepCopy(obj) {\n let copy;\n // Handle the 3 simple types, and null or undefined\n if (null == obj || 'object' !== typeof obj) { return obj; }\n // Handle Date\n if (obj instanceof Date) {\n copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n // Handle Array\n if (obj instanceof Array) {\n copy = [];\n for (let i = 0, len = obj.length; i < len; i++) {\n copy[i] = AXObjectUtil.deepCopy(obj[i]);\n }\n return copy;\n }\n // Handle Object\n if (obj instanceof Object) {\n copy = {};\n for (const attr in obj) {\n if (obj.hasOwnProperty(attr)) { copy[attr] = AXObjectUtil.deepCopy(obj[attr]); }\n }\n return copy;\n }\n throw new Error('Unable to copy obj! Its type isn\\'t supported.');\n }\n\n // static fetchProp(obj, prop: string) {\n // if (typeof obj === 'undefined') {\n // return false;\n // }\n // const index = prop.indexOf('.');\n\n // if (index > -1) {\n // return AXObjectUtil.fetchProp(obj[prop.substring(0, index)], prop.substr(index + 1));\n // }\n\n // return obj[prop];\n // }\n\n // static getPropByPath(obj, path, defaultVal?) {\n // path = path\n // .replace(/\\[/g, '.')\n // .replace(/]/g, '')\n // .split('.');\n\n // path.forEach((level) => {\n // if (obj) {\n // obj = obj[level];\n // }\n // });\n\n // if (obj === undefined) {\n // return defaultVal;\n // }\n // return obj;\n // }\n\n // static setPropByPath(obj, path, value) {\n // if (Object(obj) !== obj) { return obj; } // When obj is not an object\n // // If not yet an array, get the keys from the string-path\n // if (!Array.isArray(path)) { path = path.toString().match(/[^.[\\]]+/g) || []; }\n // path.slice(0, -1).reduce((a, c, i) => // Iterate all of them except the last one\n // Object(a[c]) === a[c] // Does the key exist and is its value an object?\n // // Yes: then follow that path\n // ? a[c]\n // // No: create the key. Is the next key a potential array-index?\n // : a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1]\n // ? [] // Yes: assign a new array object\n // : {}, // No: assign a new plain object\n // obj)[path[path.length - 1]] = value; // Finally assign the value to the last key\n // return obj; // Return the top-level object to allow chaining\n // }\n}","// @dynamic\nexport class AXStringUtil {\n\n static getWordBoundsAtPosition(str: string, position: number): { start: number, end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString:any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end\n };\n }\n\n\n\n\n\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;SAGgB,kBAAkB,GAAA;AAC9B,IAAA,OAAO,UAAU,WAAW,EAAA;AACxB,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K,GAAG,CAAC,CAAC,CAAC;AAC/B,QAAA,MAAM,cAAc,GAAO,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AACnE,QAAA,KAAK,IAAI,cAAc,CAAC,KAAK,CAAC;QAC9B,IAAI,GAAG,GAAG,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC3C,OAAO;YACH,KAAK;YACL,GAAG;SACN,CAAC;KACL;AAMJ;;ACxBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/object-util.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy;\n constructor.prototype.ngOnDestroy = function () {\n for (const prop in this) {\n const property = this[prop];\n if (typeof property.subscribe === 'function') {\n property.unsubscribe();\n }\n }\n orig.apply();\n };\n };\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T>): Observable<T> =>\n origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}\n","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva';\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: any[] | { color: any; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [\n X * 1.656492 - Y * 0.354851 - Z * 0.255038,\n -X * 0.707196 + Y * 1.655397 + Z * 0.036152,\n X * 0.051713 - Y * 0.121364 + Z * 1.01153,\n ];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) =>\n x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055\n );\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left && ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height;\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","// @dynamic\nexport class AXHtmlUtil {\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map(c => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n\n static hasFocus(element: HTMLElement)\n {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n}","// @dynamic\nexport class AXObjectUtil {\n static deepJSONClone(obj: any): any {\n return obj ? JSON.parse(JSON.stringify(obj)) : null;\n }\n\n static deepCopy(obj) {\n let copy;\n // Handle the 3 simple types, and null or undefined\n if (null == obj || 'object' !== typeof obj) { return obj; }\n // Handle Date\n if (obj instanceof Date) {\n copy = new Date();\n copy.setTime(obj.getTime());\n return copy;\n }\n // Handle Array\n if (obj instanceof Array) {\n copy = [];\n for (let i = 0, len = obj.length; i < len; i++) {\n copy[i] = AXObjectUtil.deepCopy(obj[i]);\n }\n return copy;\n }\n // Handle Object\n if (obj instanceof Object) {\n copy = {};\n for (const attr in obj) {\n if (obj.hasOwnProperty(attr)) { copy[attr] = AXObjectUtil.deepCopy(obj[attr]); }\n }\n return copy;\n }\n throw new Error('Unable to copy obj! Its type isn\\'t supported.');\n }\n\n // static fetchProp(obj, prop: string) {\n // if (typeof obj === 'undefined') {\n // return false;\n // }\n // const index = prop.indexOf('.');\n\n // if (index > -1) {\n // return AXObjectUtil.fetchProp(obj[prop.substring(0, index)], prop.substr(index + 1));\n // }\n\n // return obj[prop];\n // }\n\n // static getPropByPath(obj, path, defaultVal?) {\n // path = path\n // .replace(/\\[/g, '.')\n // .replace(/]/g, '')\n // .split('.');\n\n // path.forEach((level) => {\n // if (obj) {\n // obj = obj[level];\n // }\n // });\n\n // if (obj === undefined) {\n // return defaultVal;\n // }\n // return obj;\n // }\n\n // static setPropByPath(obj, path, value) {\n // if (Object(obj) !== obj) { return obj; } // When obj is not an object\n // // If not yet an array, get the keys from the string-path\n // if (!Array.isArray(path)) { path = path.toString().match(/[^.[\\]]+/g) || []; }\n // path.slice(0, -1).reduce((a, c, i) => // Iterate all of them except the last one\n // Object(a[c]) === a[c] // Does the key exist and is its value an object?\n // // Yes: then follow that path\n // ? a[c]\n // // No: create the key. Is the next key a potential array-index?\n // : a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1]\n // ? [] // Yes: assign a new array object\n // : {}, // No: assign a new plain object\n // obj)[path[path.length - 1]] = value; // Finally assign the value to the last key\n // return obj; // Return the top-level object to allow chaining\n // }\n}","// @dynamic\nexport class AXStringUtil {\n\n static getWordBoundsAtPosition(str: string, position: number): { start: number, end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString:any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end\n };\n }\n\n\n\n\n\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;SAGgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,UAAU,WAAW,EAAA;AAC1B,QAAA,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC;AAC/C,QAAA,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,YAAA;AAClC,YAAA,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;AACvB,gBAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,gBAAA,IAAI,OAAO,QAAQ,CAAC,SAAS,KAAK,U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N,CAAC;KACL;AAMJ;;ACxBD;;AAEG;;;;"}
|
package/intl/README.md
ADDED
package/intl/index.d.ts
ADDED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@acorex/core",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.3.1",
|
4
4
|
"sideEffects": false,
|
5
5
|
"module": "fesm2022/acorex-core.mjs",
|
6
6
|
"typings": "index.d.ts",
|
@@ -50,6 +50,12 @@
|
|
50
50
|
"esm": "./esm2022/image/acorex-core-image.mjs",
|
51
51
|
"default": "./fesm2022/acorex-core-image.mjs"
|
52
52
|
},
|
53
|
+
"./intl": {
|
54
|
+
"types": "./intl/index.d.ts",
|
55
|
+
"esm2022": "./esm2022/intl/acorex-core-intl.mjs",
|
56
|
+
"esm": "./esm2022/intl/acorex-core-intl.mjs",
|
57
|
+
"default": "./fesm2022/acorex-core-intl.mjs"
|
58
|
+
},
|
53
59
|
"./pipes": {
|
54
60
|
"types": "./pipes/index.d.ts",
|
55
61
|
"esm2022": "./esm2022/pipes/acorex-core-pipes.mjs",
|
@@ -79,11 +85,11 @@
|
|
79
85
|
"tslib": "^2.3.0"
|
80
86
|
},
|
81
87
|
"peerDependencies": {
|
82
|
-
"@angular/core": "16.1.
|
88
|
+
"@angular/core": "16.1.7",
|
83
89
|
"lodash-es": "4.17.21",
|
84
90
|
"rxjs": "7.8.1",
|
85
|
-
"@angular/common": "16.1.
|
86
|
-
"@angular/platform-browser": "16.1.
|
91
|
+
"@angular/common": "16.1.7",
|
92
|
+
"@angular/platform-browser": "16.1.7",
|
87
93
|
"tinycolor2": "1.6.0",
|
88
94
|
"tinygradient": "1.1.5"
|
89
95
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { OnDestroy } from
|
2
|
-
import { Observable } from
|
1
|
+
import { OnDestroy } from '@angular/core';
|
2
|
+
import { Observable } from 'rxjs';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare function AXAutoUnsubscriber(): (constructor: any) => void;
|
5
5
|
export declare class AXUnsubscriber implements OnDestroy {
|