@acorex/core 5.0.52 → 5.0.55
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/esm2020/lib/core.module.mjs +4 -4
- package/esm2020/lib/dateTime/datetime.module.mjs +4 -4
- package/esm2020/lib/dateTime/datetime.pipe.mjs +3 -3
- package/esm2020/lib/events/event.service.mjs +3 -3
- package/esm2020/lib/hotkeys/hotkeys.service.mjs +3 -3
- package/esm2020/lib/platform/platform.service.mjs +3 -3
- package/esm2020/lib/translation/translation.module.mjs +4 -4
- package/esm2020/lib/translation/translator.mjs +19 -3
- package/esm2020/lib/translation/translator.pipe.mjs +3 -3
- package/esm2020/lib/utils/safe.pipe.mjs +3 -3
- package/fesm2015/acorex-core.mjs +50 -33
- package/fesm2015/acorex-core.mjs.map +1 -1
- package/fesm2020/acorex-core.mjs +49 -33
- package/fesm2020/acorex-core.mjs.map +1 -1
- package/lib/translation/translator.d.ts +3 -1
- package/package.json +3 -3
|
@@ -3,10 +3,10 @@ import { AXSafePipe } from "./utils";
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export class AXCoreModule {
|
|
5
5
|
}
|
|
6
|
-
AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
7
|
-
AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
8
|
-
AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
6
|
+
AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7
|
+
AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
|
|
8
|
+
AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, providers: [], imports: [[]] });
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, decorators: [{
|
|
10
10
|
type: NgModule,
|
|
11
11
|
args: [{
|
|
12
12
|
imports: [],
|
|
@@ -18,10 +18,10 @@ export class AXDateTimeModule {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
22
|
-
AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
23
|
-
AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
21
|
+
AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
22
|
+
AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
|
|
23
|
+
AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, providers: [], imports: [[]] });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, decorators: [{
|
|
25
25
|
type: NgModule,
|
|
26
26
|
args: [{
|
|
27
27
|
imports: [],
|
|
@@ -17,9 +17,9 @@ export class AXDateTimePipe {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
21
|
-
AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
20
|
+
AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
21
|
+
AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, name: "axDate" });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
|
23
23
|
type: Pipe,
|
|
24
24
|
args: [{ name: 'axDate' }]
|
|
25
25
|
}], ctorParameters: function () { return []; } });
|
|
@@ -27,9 +27,9 @@ export class AXEventService {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
31
|
-
AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
30
|
+
AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
31
|
+
AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, providedIn: 'root' });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, decorators: [{
|
|
33
33
|
type: Injectable,
|
|
34
34
|
args: [{ providedIn: 'root' }]
|
|
35
35
|
}] });
|
|
@@ -26,9 +26,9 @@ export class AXHotkeysService {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
AXHotkeysService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
30
|
-
AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
29
|
+
AXHotkeysService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
30
|
+
AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService, decorators: [{
|
|
32
32
|
type: Injectable
|
|
33
33
|
}], ctorParameters: function () { return [{ type: i1.EventManager }, { type: Document, decorators: [{
|
|
34
34
|
type: Inject,
|
|
@@ -123,9 +123,9 @@ export class AXPlatform {
|
|
|
123
123
|
document.querySelector(':root').style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
127
|
-
AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
126
|
+
AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
127
|
+
AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, decorators: [{
|
|
129
129
|
type: Injectable,
|
|
130
130
|
args: [{
|
|
131
131
|
providedIn: 'platform',
|
|
@@ -3,10 +3,10 @@ import { AXTranslatorPipe } from './translator.pipe';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export class AXTranslationModule {
|
|
5
5
|
}
|
|
6
|
-
AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
7
|
-
AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
8
|
-
AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
6
|
+
AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7
|
+
AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
|
|
8
|
+
AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, decorators: [{
|
|
10
10
|
type: NgModule,
|
|
11
11
|
args: [{
|
|
12
12
|
imports: [],
|
|
@@ -17,10 +17,26 @@ export class AXTranslator {
|
|
|
17
17
|
static use(lang) {
|
|
18
18
|
AXTranslator.lang = lang;
|
|
19
19
|
}
|
|
20
|
-
static get(key, lang) {
|
|
21
|
-
|
|
20
|
+
static get(key, lang, params) {
|
|
21
|
+
lang = lang || AXTranslator.lang;
|
|
22
|
+
let result = _.get(AXTranslator[`__data__${lang}`], key, key);
|
|
23
|
+
const vars = typeof (result) == 'string' ? result?.match(this._varsRegx) : [];
|
|
24
|
+
if (vars?.length) {
|
|
25
|
+
vars.forEach(v => {
|
|
26
|
+
const varKey = v.match(this._varNameRegx)?.length ? v.match(this._varNameRegx)[0] : null;
|
|
27
|
+
if (varKey) {
|
|
28
|
+
const p = _.get(params, varKey) || this.get(varKey, lang);
|
|
29
|
+
if (p) {
|
|
30
|
+
result = result.replace(v, p);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return typeof (result) == 'string' ? result : JSON.stringify(result);
|
|
22
36
|
}
|
|
23
37
|
}
|
|
24
38
|
AXTranslator.lang = 'en';
|
|
25
39
|
AXTranslator.dataChangeSubject = new Subject();
|
|
26
|
-
|
|
40
|
+
AXTranslator._varsRegx = /((\$\{[a-zA-Z_0-9\.]+\})+)/gm;
|
|
41
|
+
AXTranslator._varNameRegx = /[a-zA-Z_0-9\.]+/gm;
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Fjb3JleC9jb3JlL3NyYy9saWIvdHJhb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AgICAgICAgICAgY29uc3QgcCA9IF8uZ2V0KHBhcmFtcywgdmFyS2V5KSB8fCB0aGlzLmdldCh2YXJLZXksIGxhbmcpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdC5yZXBsYWNlKHYsIHApO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSlcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHR5cGVvZiAocmVzdWx0KSA9PSAnc3RyaW5nJyA/IHJlc3VsdCA6IEpTT04uc3RyaW5naWZ5KHJlc3VsdCk7XHJcbiAgICB9XHJcbn0iXX0=
|
|
@@ -6,9 +6,9 @@ export class AXTranslatorPipe {
|
|
|
6
6
|
return AXTranslator.get(value, lang);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
10
|
-
AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
9
|
+
AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
10
|
+
AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, decorators: [{
|
|
12
12
|
type: Pipe,
|
|
13
13
|
args: [{ name: 'trans', pure: true }]
|
|
14
14
|
}] });
|
|
@@ -18,9 +18,9 @@ export class AXSafePipe {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
AXSafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
22
|
-
AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
21
|
+
AXSafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
22
|
+
AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, name: "safe" });
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, decorators: [{
|
|
24
24
|
type: Pipe,
|
|
25
25
|
args: [{
|
|
26
26
|
name: 'safe',
|
package/fesm2015/acorex-core.mjs
CHANGED
|
@@ -109,9 +109,9 @@ class AXSafePipe {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
AXSafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
113
|
-
AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
112
|
+
AXSafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
113
|
+
AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, name: "safe" });
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, decorators: [{
|
|
115
115
|
type: Pipe,
|
|
116
116
|
args: [{
|
|
117
117
|
name: 'safe',
|
|
@@ -121,10 +121,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImpor
|
|
|
121
121
|
|
|
122
122
|
class AXCoreModule {
|
|
123
123
|
}
|
|
124
|
-
AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
125
|
-
AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
126
|
-
AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
124
|
+
AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
125
|
+
AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
|
|
126
|
+
AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, providers: [], imports: [[]] });
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, decorators: [{
|
|
128
128
|
type: NgModule,
|
|
129
129
|
args: [{
|
|
130
130
|
imports: [],
|
|
@@ -469,9 +469,9 @@ class AXDateTimePipe {
|
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
473
|
-
AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
472
|
+
AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
473
|
+
AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, name: "axDate" });
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
|
475
475
|
type: Pipe,
|
|
476
476
|
args: [{ name: 'axDate' }]
|
|
477
477
|
}], ctorParameters: function () { return []; } });
|
|
@@ -1036,10 +1036,10 @@ class AXDateTimeModule {
|
|
|
1036
1036
|
});
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1040
|
-
AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1041
|
-
AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1039
|
+
AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1040
|
+
AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
|
|
1041
|
+
AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, providers: [], imports: [[]] });
|
|
1042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, decorators: [{
|
|
1043
1043
|
type: NgModule,
|
|
1044
1044
|
args: [{
|
|
1045
1045
|
imports: [],
|
|
@@ -1076,9 +1076,9 @@ class AXEventService {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
|
-
AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1080
|
-
AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
1081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1079
|
+
AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1080
|
+
AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, providedIn: 'root' });
|
|
1081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, decorators: [{
|
|
1082
1082
|
type: Injectable,
|
|
1083
1083
|
args: [{ providedIn: 'root' }]
|
|
1084
1084
|
}] });
|
|
@@ -1106,9 +1106,9 @@ class AXHotkeysService {
|
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
|
-
AXHotkeysService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1110
|
-
AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
1111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1109
|
+
AXHotkeysService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1110
|
+
AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService });
|
|
1111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService, decorators: [{
|
|
1112
1112
|
type: Injectable
|
|
1113
1113
|
}], ctorParameters: function () {
|
|
1114
1114
|
return [{ type: i1.EventManager }, { type: Document, decorators: [{
|
|
@@ -1133,31 +1133,48 @@ class AXTranslator {
|
|
|
1133
1133
|
static use(lang) {
|
|
1134
1134
|
AXTranslator.lang = lang;
|
|
1135
1135
|
}
|
|
1136
|
-
static get(key, lang) {
|
|
1137
|
-
|
|
1136
|
+
static get(key, lang, params) {
|
|
1137
|
+
lang = lang || AXTranslator.lang;
|
|
1138
|
+
let result = _.get(AXTranslator[`__data__${lang}`], key, key);
|
|
1139
|
+
const vars = typeof (result) == 'string' ? result === null || result === void 0 ? void 0 : result.match(this._varsRegx) : [];
|
|
1140
|
+
if (vars === null || vars === void 0 ? void 0 : vars.length) {
|
|
1141
|
+
vars.forEach(v => {
|
|
1142
|
+
var _a;
|
|
1143
|
+
const varKey = ((_a = v.match(this._varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? v.match(this._varNameRegx)[0] : null;
|
|
1144
|
+
if (varKey) {
|
|
1145
|
+
const p = _.get(params, varKey) || this.get(varKey, lang);
|
|
1146
|
+
if (p) {
|
|
1147
|
+
result = result.replace(v, p);
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
return typeof (result) == 'string' ? result : JSON.stringify(result);
|
|
1138
1153
|
}
|
|
1139
1154
|
}
|
|
1140
1155
|
AXTranslator.lang = 'en';
|
|
1141
|
-
AXTranslator.dataChangeSubject = new Subject();
|
|
1156
|
+
AXTranslator.dataChangeSubject = new Subject();
|
|
1157
|
+
AXTranslator._varsRegx = /((\$\{[a-zA-Z_0-9\.]+\})+)/gm;
|
|
1158
|
+
AXTranslator._varNameRegx = /[a-zA-Z_0-9\.]+/gm;
|
|
1142
1159
|
|
|
1143
1160
|
class AXTranslatorPipe {
|
|
1144
1161
|
transform(value, lang) {
|
|
1145
1162
|
return AXTranslator.get(value, lang);
|
|
1146
1163
|
}
|
|
1147
1164
|
}
|
|
1148
|
-
AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1149
|
-
AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
1150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1165
|
+
AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1166
|
+
AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
|
|
1167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, decorators: [{
|
|
1151
1168
|
type: Pipe,
|
|
1152
1169
|
args: [{ name: 'trans', pure: true }]
|
|
1153
1170
|
}] });
|
|
1154
1171
|
|
|
1155
1172
|
class AXTranslationModule {
|
|
1156
1173
|
}
|
|
1157
|
-
AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1158
|
-
AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1159
|
-
AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1174
|
+
AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1175
|
+
AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
|
|
1176
|
+
AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
|
|
1177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, decorators: [{
|
|
1161
1178
|
type: NgModule,
|
|
1162
1179
|
args: [{
|
|
1163
1180
|
imports: [],
|
|
@@ -1289,9 +1306,9 @@ class AXPlatform {
|
|
|
1289
1306
|
document.querySelector(':root').style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
|
|
1290
1307
|
}
|
|
1291
1308
|
}
|
|
1292
|
-
AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1293
|
-
AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
1294
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1309
|
+
AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1310
|
+
AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
|
|
1311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, decorators: [{
|
|
1295
1312
|
type: Injectable,
|
|
1296
1313
|
args: [{
|
|
1297
1314
|
providedIn: 'platform',
|