@acorex/core 5.0.40 → 5.0.43

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.0", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
113
- AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXSafePipe, name: "safe" });
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXSafePipe, decorators: [{
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: [{
115
115
  type: Pipe,
116
116
  args: [{
117
117
  name: 'safe',
@@ -121,10 +121,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
121
121
 
122
122
  class AXCoreModule {
123
123
  }
124
- AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
125
- AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
126
- AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXCoreModule, providers: [], imports: [[]] });
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXCoreModule, decorators: [{
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: [{
128
128
  type: NgModule,
129
129
  args: [{
130
130
  imports: [],
@@ -244,33 +244,48 @@ class AXDateTime {
244
244
  return this._calendar.endOf(this.date, unit);
245
245
  }
246
246
  format(format = AXConfig.get('dateTime.shortDateFormat')) {
247
- format = format.replace('ss', this.pad(this.date.getSeconds(), 2));
248
- format = format.replace('s', this.date.getSeconds().toString());
249
- format = format.replace('dd', this.pad(this.calendar.dayOfMonth(this.date), 2));
250
- format = format.replace('d', this.calendar.dayOfMonth(this.date).toString());
251
- format = format.replace('mm', this.pad(this.date.getMinutes(), 2));
252
- format = format.replace('m', this.date.getMinutes().toString());
253
- format = format.replace('MMMM', this.calendar.monthNames[this.calendar.monthOfYear(this.date) - 1]);
254
- format = format.replace('MMM', this.calendar.monthShortNames[this.calendar.monthOfYear(this.date) - 1]);
255
- format = format.replace('MM', this.pad(this.calendar.monthOfYear(this.date), 2));
256
- format = format.replace(/M(?![ao])/, this.calendar.monthOfYear(this.date).toString());
257
- format = format.replace('DDDD', this.calendar.dayNames[this.calendar.dayOfWeek(this.date) - 1]);
258
- format = format.replace('DDD', this.calendar.dayShortNames[this.calendar.dayOfWeek(this.date) - 1]);
259
- format = format.replace(/D(?!e)/, this.calendar.dayNames[this.calendar.dayOfWeek(this.date) - 1].substring(0, 3));
260
- format = format.replace('yyyy', this.calendar.year(this.date).toString());
261
- format = format.replace('YYYY', this.calendar.year(this.date).toString());
262
- format = format.replace('yy', this.calendar.year(this.date).toString().substring(2));
263
- format = format.replace('YY', this.calendar.year(this.date).toString().substring(2));
264
- format = format.replace('HH', this.pad(this.date.getHours(), 2));
265
- format = format.replace('H', this.date.getHours().toString());
266
- return format;
247
+ const keys = {
248
+ ss: () => this.pad(this.date.getSeconds(), 2),
249
+ s: () => this.date.getSeconds().toString(),
250
+ //
251
+ dd: () => this.pad(this.calendar.dayOfMonth(this.date), 2),
252
+ d: () => this.calendar.dayOfMonth(this.date).toString(),
253
+ //
254
+ mm: () => this.pad(this.date.getMinutes(), 2),
255
+ m: () => this.date.getMinutes().toString(),
256
+ //
257
+ MMMM: () => this.calendar.monthNames[this.calendar.monthOfYear(this.date) - 1],
258
+ MMM: () => this.calendar.monthShortNames[this.calendar.monthOfYear(this.date) - 1],
259
+ MM: () => this.pad(this.calendar.monthOfYear(this.date), 2),
260
+ //
261
+ DDDD: () => this.calendar.dayNames[this.calendar.dayOfWeek(this.date) - 1],
262
+ DDD: () => this.calendar.dayShortNames[this.calendar.dayOfWeek(this.date) - 1],
263
+ //
264
+ yyyy: () => this.calendar.year(this.date).toString(),
265
+ YYYY: () => this.calendar.year(this.date).toString(),
266
+ yy: () => this.calendar.year(this.date).toString().substring(2),
267
+ YY: () => this.calendar.year(this.date).toString().substring(2),
268
+ //
269
+ HH: () => this.pad(this.date.getHours(), 2),
270
+ H: () => this.date.getHours().toString(),
271
+ //
272
+ hh: () => this.pad((this.date.getHours() % 12 || 12), 2),
273
+ h: () => (this.date.getHours() % 12 || 12).toString(),
274
+ //
275
+ A: () => (this.date.getHours() < 12) ? 'am' : 'pm',
276
+ a: () => (this.date.getHours() < 12) ? 'am' : 'pm',
277
+ };
278
+ const re = new RegExp(_.orderBy(Object.keys(keys), c => c.length, ['desc']).join("|"), "gi");
279
+ return format.replace(re, function (matched) {
280
+ return keys[matched]();
281
+ });
267
282
  }
268
283
  pad(n, width, z = '0') {
269
284
  n = n + '';
270
285
  return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
271
286
  }
272
- toString() {
273
- return this.format();
287
+ toString(format = AXConfig.get('dateTime.shortDateFormat')) {
288
+ return this.format(format);
274
289
  }
275
290
  equal(value, unit = 'day') {
276
291
  return this.compare(value, unit) == 0;
@@ -431,9 +446,9 @@ class AXDateTimePipe {
431
446
  }
432
447
  }
433
448
  }
434
- AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
435
- AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXDateTimePipe, name: "axDate" });
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXDateTimePipe, decorators: [{
449
+ AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
450
+ AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimePipe, name: "axDate" });
451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimePipe, decorators: [{
437
452
  type: Pipe,
438
453
  args: [{ name: 'axDate' }]
439
454
  }], ctorParameters: function () { return []; } });
@@ -963,10 +978,10 @@ class AXDateTimeModule {
963
978
  });
964
979
  }
965
980
  }
966
- AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
967
- AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
968
- AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXDateTimeModule, providers: [], imports: [[]] });
969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXDateTimeModule, decorators: [{
981
+ AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
982
+ AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
983
+ AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimeModule, providers: [], imports: [[]] });
984
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXDateTimeModule, decorators: [{
970
985
  type: NgModule,
971
986
  args: [{
972
987
  imports: [],
@@ -1003,9 +1018,9 @@ class AXEventService {
1003
1018
  }
1004
1019
  }
1005
1020
  }
1006
- AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1007
- AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXEventService, providedIn: 'root' });
1008
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXEventService, decorators: [{
1021
+ AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1022
+ AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXEventService, providedIn: 'root' });
1023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXEventService, decorators: [{
1009
1024
  type: Injectable,
1010
1025
  args: [{ providedIn: 'root' }]
1011
1026
  }] });
@@ -1033,9 +1048,9 @@ class AXHotkeysService {
1033
1048
  });
1034
1049
  }
1035
1050
  }
1036
- AXHotkeysService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
1037
- AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXHotkeysService });
1038
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXHotkeysService, decorators: [{
1051
+ 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 });
1052
+ AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXHotkeysService });
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXHotkeysService, decorators: [{
1039
1054
  type: Injectable
1040
1055
  }], ctorParameters: function () { return [{ type: i1.EventManager }, { type: Document, decorators: [{
1041
1056
  type: Inject,
@@ -1070,19 +1085,19 @@ class AXTranslatorPipe {
1070
1085
  return AXTranslator.get(value, lang);
1071
1086
  }
1072
1087
  }
1073
- AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1074
- AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
1075
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXTranslatorPipe, decorators: [{
1088
+ AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1089
+ AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
1090
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslatorPipe, decorators: [{
1076
1091
  type: Pipe,
1077
1092
  args: [{ name: 'trans', pure: true }]
1078
1093
  }] });
1079
1094
 
1080
1095
  class AXTranslationModule {
1081
1096
  }
1082
- AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1083
- AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1084
- AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
1085
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXTranslationModule, decorators: [{
1097
+ AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1098
+ AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1099
+ AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
1100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXTranslationModule, decorators: [{
1086
1101
  type: NgModule,
1087
1102
  args: [{
1088
1103
  imports: [],
@@ -1207,9 +1222,9 @@ class AXPlatform {
1207
1222
  _html.classList.remove('ax-dark');
1208
1223
  }
1209
1224
  }
1210
- AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1211
- AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
1212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: AXPlatform, decorators: [{
1225
+ AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1226
+ AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
1227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AXPlatform, decorators: [{
1213
1228
  type: Injectable,
1214
1229
  args: [{
1215
1230
  providedIn: 'platform',