@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.
@@ -109,9 +109,9 @@ class AXSafePipe {
109
109
  }
110
110
  }
111
111
  }
112
- AXSafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
113
- AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXSafePipe, name: "safe" });
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXSafePipe, decorators: [{
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.1", ngImport: i0, type: AXCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
125
- AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
126
- AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXCoreModule, providers: [], imports: [[]] });
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXCoreModule, decorators: [{
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.1", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
473
- AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimePipe, name: "axDate" });
474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimePipe, decorators: [{
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.1", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1040
- AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
1041
- AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimeModule, providers: [], imports: [[]] });
1042
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimeModule, decorators: [{
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.1", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1080
- AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXEventService, providedIn: 'root' });
1081
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXEventService, decorators: [{
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.1", 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.2.1", ngImport: i0, type: AXHotkeysService });
1111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXHotkeysService, decorators: [{
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 () { return [{ type: i1.EventManager }, { type: Document, decorators: [{
1114
1114
  type: Inject,
@@ -1131,31 +1131,47 @@ class AXTranslator {
1131
1131
  static use(lang) {
1132
1132
  AXTranslator.lang = lang;
1133
1133
  }
1134
- static get(key, lang) {
1135
- return _.get(AXTranslator[`__data__${lang || AXTranslator.lang}`], key, key);
1134
+ static get(key, lang, params) {
1135
+ lang = lang || AXTranslator.lang;
1136
+ let result = _.get(AXTranslator[`__data__${lang}`], key, key);
1137
+ const vars = typeof (result) == 'string' ? result?.match(this._varsRegx) : [];
1138
+ if (vars?.length) {
1139
+ vars.forEach(v => {
1140
+ const varKey = v.match(this._varNameRegx)?.length ? v.match(this._varNameRegx)[0] : null;
1141
+ if (varKey) {
1142
+ const p = _.get(params, varKey) || this.get(varKey, lang);
1143
+ if (p) {
1144
+ result = result.replace(v, p);
1145
+ }
1146
+ }
1147
+ });
1148
+ }
1149
+ return typeof (result) == 'string' ? result : JSON.stringify(result);
1136
1150
  }
1137
1151
  }
1138
1152
  AXTranslator.lang = 'en';
1139
- AXTranslator.dataChangeSubject = new Subject();
1153
+ AXTranslator.dataChangeSubject = new Subject();
1154
+ AXTranslator._varsRegx = /((\$\{[a-zA-Z_0-9\.]+\})+)/gm;
1155
+ AXTranslator._varNameRegx = /[a-zA-Z_0-9\.]+/gm;
1140
1156
 
1141
1157
  class AXTranslatorPipe {
1142
1158
  transform(value, lang) {
1143
1159
  return AXTranslator.get(value, lang);
1144
1160
  }
1145
1161
  }
1146
- AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1147
- AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
1148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslatorPipe, decorators: [{
1162
+ AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1163
+ AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
1164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, decorators: [{
1149
1165
  type: Pipe,
1150
1166
  args: [{ name: 'trans', pure: true }]
1151
1167
  }] });
1152
1168
 
1153
1169
  class AXTranslationModule {
1154
1170
  }
1155
- AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1156
- AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1157
- AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
1158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, decorators: [{
1171
+ AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1172
+ AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1173
+ AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
1174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, decorators: [{
1159
1175
  type: NgModule,
1160
1176
  args: [{
1161
1177
  imports: [],
@@ -1287,9 +1303,9 @@ class AXPlatform {
1287
1303
  document.querySelector(':root').style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
1288
1304
  }
1289
1305
  }
1290
- AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1291
- AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
1292
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXPlatform, decorators: [{
1306
+ AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1307
+ AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
1308
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, decorators: [{
1293
1309
  type: Injectable,
1294
1310
  args: [{
1295
1311
  providedIn: 'platform',