@onemrvapublic/design-system 18.2.14-develop.7 → 18.2.14-develop.8

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, InjectionToken, Injectable, Inject, Directive, HostListener, EventEmitter, Output, Input, HostBinding, Pipe, Optional, NgModule } from '@angular/core';
2
+ import { Component, InjectionToken, Injectable, Inject, Directive, HostListener, EventEmitter, Output, Input, HostBinding, Pipe, Optional, NgModule, inject } from '@angular/core';
3
3
  import * as i2 from '@angular/material/icon';
4
4
  import { MatIconModule } from '@angular/material/icon';
5
5
  import * as i3 from '@angular/material/tooltip';
@@ -14,11 +14,12 @@ import * as i1$2 from '@angular/cdk/layout';
14
14
  import { catchError as catchError$1, map, startWith as startWith$1 } from 'rxjs/operators';
15
15
  import * as i1$3 from '@angular/common/http';
16
16
  import { __decorate } from 'tslib';
17
- import * as i2$1 from '@ngx-translate/core';
17
+ import * as i1$4 from '@ngx-translate/core';
18
18
  import { TranslateModule, TranslateService } from '@ngx-translate/core';
19
19
  import { countrySpecs, validateIBAN, electronicFormatIBAN, ValidationErrorsIBAN } from 'ibantools';
20
- import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
20
+ import { DateAdapter, MatNativeDateModule, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
21
21
  import { MatDatepickerModule } from '@angular/material/datepicker';
22
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
22
23
  import { provideLuxonDateAdapter } from '@angular/material-luxon-adapter';
23
24
 
24
25
  class ClipboardIconComponent {
@@ -46,7 +47,7 @@ const CDN_URLS = {
46
47
  };
47
48
  const NISS_MASK = '000000/000-00';
48
49
 
49
- const parseDateFormats = [
50
+ const parseNativeDateFormats = [
50
51
  'ddMMyyyy',
51
52
  'd/M/yyyy',
52
53
  'dd/M/yyyy',
@@ -54,17 +55,49 @@ const parseDateFormats = [
54
55
  'd.M.yyyy',
55
56
  'dd.M.yyyy',
56
57
  'd.MM.yyyy',
58
+ 'd/M/yy',
59
+ 'dd/M/yy',
60
+ 'd/MM/yy',
61
+ 'd.M.yy',
62
+ 'dd.M.yy',
63
+ 'd.MM.yy',
57
64
  ];
58
- const parseYearMonthFormats = [
65
+ const parseNativeYearMonthFormats = [
59
66
  'MMyyyy',
60
67
  'M/yyyy',
68
+ 'M/yy',
61
69
  'MM/yyyy',
70
+ 'MM/yy',
62
71
  'M.yyyy',
63
72
  'MM.yyyy',
64
73
  ];
74
+ const parseLuxonYearMonthFormats = [
75
+ 'LLyyyy',
76
+ 'L/yyyy',
77
+ 'L/yy',
78
+ 'LL/yyyy',
79
+ 'LL/yy',
80
+ 'L.yyyy',
81
+ 'LL.yyyy',
82
+ ];
83
+ const parseLuxonDateFormat = [
84
+ 'ddLLyyyy',
85
+ 'd/L/yyyy',
86
+ 'dd/L/yyyy',
87
+ 'd/LL/yyyy',
88
+ 'd.L.yyyy',
89
+ 'dd.L.yyyy',
90
+ 'd.LL.yyyy',
91
+ 'd/L/yy',
92
+ 'dd/L/yy',
93
+ 'd/LL/yy',
94
+ 'd.L.yy',
95
+ 'dd.L.yy',
96
+ 'd.LL.yy',
97
+ ];
65
98
  const ONEMRVA_MAT_NATIVE_DATE_FORMAT = {
66
99
  parse: {
67
- dateInput: parseDateFormats,
100
+ dateInput: parseNativeDateFormats,
68
101
  },
69
102
  display: {
70
103
  dateInput: 'dd/MM/yyyy',
@@ -73,28 +106,31 @@ const ONEMRVA_MAT_NATIVE_DATE_FORMAT = {
73
106
  monthYearA11yLabel: 'MMMM yyyy',
74
107
  },
75
108
  };
76
- const ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS = {
109
+ const ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT = {
77
110
  parse: {
78
- dateInput: parseYearMonthFormats,
111
+ dateInput: parseNativeYearMonthFormats,
79
112
  },
80
113
  display: {
81
- dateInput: 'MM/yyyy',
114
+ dateInput: 'dd/MM/yyyy',
82
115
  monthYearLabel: 'MMM yyyy',
83
116
  dateA11yLabel: 'DDD',
84
- monthYearA11yLabel: 'MMMM yyyy',
117
+ monthYearA11yLabel: 'MMM yyyy',
118
+ },
119
+ };
120
+ const ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS = {
121
+ parse: {
122
+ dateInput: parseLuxonYearMonthFormats,
123
+ },
124
+ display: {
125
+ dateInput: 'LL/yyyy',
126
+ monthYearLabel: 'LLL yyyy',
127
+ dateA11yLabel: 'DDD',
128
+ monthYearA11yLabel: 'LLLL yyyy',
85
129
  },
86
130
  };
87
131
  const ONEMRVA_MAT_LUXON_DATE_FORMATS = {
88
132
  parse: {
89
- dateInput: [
90
- 'ddLLyyyy',
91
- 'd/L/yyyy',
92
- 'dd/L/yyyy',
93
- 'd/LL/yyyy',
94
- 'd.L.yyyy',
95
- 'dd.L.yyyy',
96
- 'd.LL.yyyy',
97
- ],
133
+ dateInput: parseLuxonDateFormat,
98
134
  },
99
135
  display: {
100
136
  dateInput: 'dd/LL/yyyy',
@@ -1105,7 +1141,7 @@ class OnemRvaCDNCountryService {
1105
1141
  });
1106
1142
  }));
1107
1143
  }
1108
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, deps: [{ token: OnemRvaCDNService }, { token: i2$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1144
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, deps: [{ token: OnemRvaCDNService }, { token: i1$4.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1109
1145
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, providedIn: 'root' }); }
1110
1146
  }
1111
1147
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, decorators: [{
@@ -1113,7 +1149,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1113
1149
  args: [{
1114
1150
  providedIn: 'root',
1115
1151
  }]
1116
- }], ctorParameters: () => [{ type: OnemRvaCDNService }, { type: i2$1.TranslateService }] });
1152
+ }], ctorParameters: () => [{ type: OnemRvaCDNService }, { type: i1$4.TranslateService }] });
1117
1153
 
1118
1154
  class OnemRvaCDNMimeService {
1119
1155
  static { this.mimetypeFile = '/json/mimetypes.json'; }
@@ -1300,8 +1336,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1300
1336
  }]
1301
1337
  }] });
1302
1338
 
1339
+ class OnemrvaDatepickerLuxonSharedModule {
1340
+ constructor(translateService) {
1341
+ this._adapter = inject(DateAdapter);
1342
+ translateService.onLangChange
1343
+ .pipe(takeUntilDestroyed())
1344
+ .subscribe(value => {
1345
+ this._adapter.setLocale(value.lang);
1346
+ });
1347
+ }
1348
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonSharedModule, deps: [{ token: i1$4.TranslateService }], target: i0.ɵɵFactoryTarget.NgModule }); }
1349
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1350
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonSharedModule, providers: [
1351
+ {
1352
+ provide: MAT_DATE_LOCALE,
1353
+ useFactory: (translateService) => translateService.currentLang,
1354
+ deps: [TranslateService],
1355
+ },
1356
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_DATE_FORMATS),
1357
+ ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1358
+ }
1359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonSharedModule, decorators: [{
1360
+ type: NgModule,
1361
+ args: [{
1362
+ declarations: [],
1363
+ imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule],
1364
+ exports: [],
1365
+ providers: [
1366
+ {
1367
+ provide: MAT_DATE_LOCALE,
1368
+ useFactory: (translateService) => translateService.currentLang,
1369
+ deps: [TranslateService],
1370
+ },
1371
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_DATE_FORMATS),
1372
+ ],
1373
+ }]
1374
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1375
+
1303
1376
  class OnemrvaDatepickerSharedModule {
1304
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1377
+ constructor(translateService) {
1378
+ this._adapter = inject(DateAdapter);
1379
+ translateService.onLangChange
1380
+ .pipe(takeUntilDestroyed())
1381
+ .subscribe(value => {
1382
+ this._adapter.setLocale(value.lang);
1383
+ });
1384
+ }
1385
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, deps: [{ token: i1$4.TranslateService }], target: i0.ɵɵFactoryTarget.NgModule }); }
1305
1386
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1306
1387
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, providers: [
1307
1388
  {
@@ -1309,7 +1390,10 @@ class OnemrvaDatepickerSharedModule {
1309
1390
  useFactory: (translateService) => translateService.currentLang,
1310
1391
  deps: [TranslateService],
1311
1392
  },
1312
- provideLuxonDateAdapter(ONEMRVA_MAT_NATIVE_DATE_FORMAT),
1393
+ {
1394
+ provide: MAT_DATE_FORMATS,
1395
+ useValue: ONEMRVA_MAT_NATIVE_DATE_FORMAT,
1396
+ },
1313
1397
  ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1314
1398
  }
1315
1399
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, decorators: [{
@@ -1324,10 +1408,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1324
1408
  useFactory: (translateService) => translateService.currentLang,
1325
1409
  deps: [TranslateService],
1326
1410
  },
1327
- provideLuxonDateAdapter(ONEMRVA_MAT_NATIVE_DATE_FORMAT),
1411
+ {
1412
+ provide: MAT_DATE_FORMATS,
1413
+ useValue: ONEMRVA_MAT_NATIVE_DATE_FORMAT,
1414
+ },
1328
1415
  ],
1329
1416
  }]
1330
- }] });
1417
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1418
+
1419
+ class OnemrvaDatepickerYearMonthSharedModule {
1420
+ constructor(translateService) {
1421
+ this._adapter = inject(DateAdapter);
1422
+ translateService.onLangChange
1423
+ .pipe(takeUntilDestroyed())
1424
+ .subscribe(value => {
1425
+ this._adapter.setLocale(value.lang);
1426
+ });
1427
+ }
1428
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerYearMonthSharedModule, deps: [{ token: i1$4.TranslateService }], target: i0.ɵɵFactoryTarget.NgModule }); }
1429
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerYearMonthSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1430
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerYearMonthSharedModule, providers: [
1431
+ {
1432
+ provide: MAT_DATE_LOCALE,
1433
+ useFactory: (translateService) => translateService.currentLang,
1434
+ deps: [TranslateService],
1435
+ },
1436
+ {
1437
+ provide: MAT_DATE_FORMATS,
1438
+ useValue: ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT,
1439
+ },
1440
+ ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1441
+ }
1442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerYearMonthSharedModule, decorators: [{
1443
+ type: NgModule,
1444
+ args: [{
1445
+ declarations: [],
1446
+ imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule],
1447
+ exports: [],
1448
+ providers: [
1449
+ {
1450
+ provide: MAT_DATE_LOCALE,
1451
+ useFactory: (translateService) => translateService.currentLang,
1452
+ deps: [TranslateService],
1453
+ },
1454
+ {
1455
+ provide: MAT_DATE_FORMATS,
1456
+ useValue: ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT,
1457
+ },
1458
+ ],
1459
+ }]
1460
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1461
+
1462
+ class OnemrvaDatepickerLuxonYearMonthSharedModule {
1463
+ constructor(translateService) {
1464
+ this._adapter = inject(DateAdapter);
1465
+ translateService.onLangChange
1466
+ .pipe(takeUntilDestroyed())
1467
+ .subscribe(value => {
1468
+ this._adapter.setLocale(value.lang);
1469
+ });
1470
+ }
1471
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonYearMonthSharedModule, deps: [{ token: i1$4.TranslateService }], target: i0.ɵɵFactoryTarget.NgModule }); }
1472
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonYearMonthSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1473
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonYearMonthSharedModule, providers: [
1474
+ {
1475
+ provide: MAT_DATE_LOCALE,
1476
+ useFactory: (translateService) => translateService.currentLang,
1477
+ deps: [TranslateService],
1478
+ },
1479
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS),
1480
+ ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1481
+ }
1482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonYearMonthSharedModule, decorators: [{
1483
+ type: NgModule,
1484
+ args: [{
1485
+ declarations: [],
1486
+ imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule],
1487
+ exports: [],
1488
+ providers: [
1489
+ {
1490
+ provide: MAT_DATE_LOCALE,
1491
+ useFactory: (translateService) => translateService.currentLang,
1492
+ deps: [TranslateService],
1493
+ },
1494
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS),
1495
+ ],
1496
+ }]
1497
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1331
1498
 
1332
1499
  /*
1333
1500
  * Public API Surface of shared
@@ -1337,5 +1504,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1337
1504
  * Generated bundle index. Do not edit.
1338
1505
  */
1339
1506
 
1340
- export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, MatRowClickableDirective, NISS_MASK, ONEMRVA_MAT_LUXON_DATE_FORMATS, ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS, ONEMRVA_MAT_NATIVE_DATE_FORMAT, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemrvaBcePipe, OnemrvaDatepickerSharedModule, OnemrvaMaskDirective, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, RequestTimes, WebComponentOverlayContainer, bankAccountValidator, directives, setTranslationLanguage, setTranslationLanguageFromWO };
1507
+ export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, MatRowClickableDirective, NISS_MASK, ONEMRVA_MAT_LUXON_DATE_FORMATS, ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS, ONEMRVA_MAT_NATIVE_DATE_FORMAT, ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemrvaBcePipe, OnemrvaDatepickerLuxonSharedModule, OnemrvaDatepickerLuxonYearMonthSharedModule, OnemrvaDatepickerSharedModule, OnemrvaDatepickerYearMonthSharedModule, OnemrvaMaskDirective, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, RequestTimes, WebComponentOverlayContainer, bankAccountValidator, directives, setTranslationLanguage, setTranslationLanguageFromWO };
1341
1508
  //# sourceMappingURL=onemrvapublic-design-system-shared.mjs.map