@onemrvapublic/design-system 18.2.13 → 18.2.14-develop.10

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.
Files changed (44) hide show
  1. package/assets/i18n/de.json +6 -6
  2. package/assets/i18n/nl.json +6 -6
  3. package/esm2022/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.mjs +43 -32
  4. package/esm2022/mat-input-iban/src/onemrva-mat-input-iban.component.mjs +10 -6
  5. package/esm2022/mat-select-search/src/mat-select-search.component.mjs +2 -2
  6. package/esm2022/mat-stepper/src/onemrva-mat-stepper.component.mjs +26 -2
  7. package/esm2022/shared/index.mjs +2 -3
  8. package/esm2022/shared/src/lib/constants/date.format.mjs +80 -9
  9. package/esm2022/shared/src/lib/helpers/translation-helper.mjs +1 -1
  10. package/esm2022/shared/src/lib/loaders/index.mjs +2 -2
  11. package/esm2022/shared/src/lib/modules/index.mjs +5 -0
  12. package/esm2022/shared/src/lib/modules/shared.datepicker.luxon.module.mjs +46 -0
  13. package/esm2022/shared/src/lib/modules/shared.datepicker.luxon.year.month.module.mjs +46 -0
  14. package/esm2022/shared/src/lib/modules/shared.datepicker.native.module.mjs +51 -0
  15. package/esm2022/shared/src/lib/modules/shared.datepicker.native.year.month.module.mjs +51 -0
  16. package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +42 -31
  17. package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -1
  18. package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +9 -5
  19. package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -1
  20. package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs +1 -1
  21. package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs.map +1 -1
  22. package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs +25 -1
  23. package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs.map +1 -1
  24. package/fesm2022/onemrvapublic-design-system-shared.mjs +248 -191
  25. package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
  26. package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.d.ts +2 -1
  27. package/mat-input-iban/src/onemrva-mat-input-iban.component.d.ts +2 -1
  28. package/mat-stepper/src/onemrva-mat-stepper.component.d.ts +6 -2
  29. package/package.json +1 -1
  30. package/shared/index.d.ts +1 -2
  31. package/shared/src/lib/constants/date.format.d.ts +4 -12
  32. package/shared/src/lib/loaders/index.d.ts +1 -1
  33. package/shared/src/lib/modules/index.d.ts +4 -0
  34. package/shared/src/lib/modules/shared.datepicker.luxon.module.d.ts +12 -0
  35. package/shared/src/lib/modules/shared.datepicker.luxon.year.month.module.d.ts +12 -0
  36. package/shared/src/lib/{shared.datepicker.module.d.ts → modules/shared.datepicker.native.module.d.ts} +3 -0
  37. package/shared/src/lib/modules/shared.datepicker.native.year.month.module.d.ts +12 -0
  38. package/esm2022/shared/src/lib/adapters/date.adapter.mjs +0 -62
  39. package/esm2022/shared/src/lib/adapters/index.mjs +0 -3
  40. package/esm2022/shared/src/lib/adapters/year-month.adapter.mjs +0 -64
  41. package/esm2022/shared/src/lib/shared.datepicker.module.mjs +0 -71
  42. package/shared/src/lib/adapters/date.adapter.d.ts +0 -16
  43. package/shared/src/lib/adapters/index.d.ts +0 -2
  44. package/shared/src/lib/adapters/year-month.adapter.d.ts +0 -16
@@ -1,174 +1,39 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, InjectionToken, Inject, Directive, HostListener, EventEmitter, Output, Input, HostBinding, Pipe, Optional, NgModule, APP_INITIALIZER } from '@angular/core';
3
- import { NativeDateAdapter, MatNativeDateModule, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
4
- import { DateTime } from 'luxon';
5
- import { Subject, takeUntil, merge, NEVER, take, tap, catchError, startWith, switchMap, shareReplay, filter, finalize, of, forkJoin, ReplaySubject, skip, distinctUntilChanged, map as map$1, combineLatestWith, from } from 'rxjs';
6
- import * as i1 from '@ngx-translate/core';
7
- import { TranslateModule, TranslateService } from '@ngx-translate/core';
2
+ import { Component, InjectionToken, Injectable, Inject, Directive, HostListener, EventEmitter, Output, Input, HostBinding, Pipe, Optional, NgModule, inject } from '@angular/core';
8
3
  import * as i2 from '@angular/material/icon';
9
4
  import { MatIconModule } from '@angular/material/icon';
10
5
  import * as i3 from '@angular/material/tooltip';
11
6
  import { MatTooltipModule } from '@angular/material/tooltip';
12
- import * as i1$1 from '@angular/cdk/clipboard';
7
+ import * as i1 from '@angular/cdk/clipboard';
13
8
  import { DOCUMENT, CommonModule } from '@angular/common';
14
- import * as i1$2 from '@angular/cdk/platform';
9
+ import * as i1$1 from '@angular/cdk/platform';
15
10
  import { _isTestEnvironment } from '@angular/cdk/platform';
11
+ import { Subject, merge, NEVER, take, tap, catchError, startWith, switchMap, shareReplay, filter, finalize, of, forkJoin, ReplaySubject, skip, distinctUntilChanged, map as map$1, combineLatestWith, from } from 'rxjs';
16
12
  import { OnemrvaMatColor } from '@onemrvapublic/design-system/utils';
17
- import * as i1$3 from '@angular/cdk/layout';
13
+ import * as i1$2 from '@angular/cdk/layout';
18
14
  import { catchError as catchError$1, map, startWith as startWith$1 } from 'rxjs/operators';
19
- import * as i1$4 from '@angular/common/http';
15
+ import * as i1$3 from '@angular/common/http';
20
16
  import { __decorate } from 'tslib';
17
+ import * as i1$4 from '@ngx-translate/core';
18
+ import { TranslateModule, TranslateService } from '@ngx-translate/core';
21
19
  import { countrySpecs, validateIBAN, electronicFormatIBAN, ValidationErrorsIBAN } from 'ibantools';
20
+ import { DateAdapter, MatNativeDateModule, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
22
21
  import { MatDatepickerModule } from '@angular/material/datepicker';
23
-
24
- const ONEMRVA_FORMAT = {
25
- parse: {
26
- dateInput: 'LL',
27
- },
28
- display: {
29
- dateInput: 'dd/MM/yyyy',
30
- monthYearLabel: 'MMM yyyy',
31
- dateA11yLabel: 'LL',
32
- monthYearA11yLabel: 'MMMM yyyy',
33
- },
34
- };
35
- // KEEP ?
36
- const ONEMRVA_YEAR_MONTH_FORMAT = {
37
- parse: {
38
- dateInput: 'LL/yyyy',
39
- },
40
- display: {
41
- dateInput: 'LL/yyyy',
42
- monthYearLabel: 'LL/yyyy',
43
- dateA11yLabel: 'LL',
44
- monthYearA11yLabel: 'LLL yyyy',
45
- },
46
- };
47
-
48
- class OnemrvaDateAdapter extends NativeDateAdapter {
49
- constructor(translateService) {
50
- super();
51
- this.translateService = translateService;
52
- this.dateFormat = ONEMRVA_FORMAT.display.dateInput;
53
- this.destroyNotifier$ = new Subject();
54
- this.setLocale(this.translateService.currentLang);
55
- this.translateService.onLangChange
56
- .pipe(takeUntil(this.destroyNotifier$))
57
- .subscribe(({ lang }) => {
58
- this.setLocale(lang);
59
- });
60
- }
61
- format(date) {
62
- const dt = DateTime.fromJSDate(date);
63
- return dt.toFormat(this.dateFormat);
64
- }
65
- parse(value) {
66
- if (value && typeof value === 'string') {
67
- value = value.replace(/\D/g, '/');
68
- }
69
- if (value === null || value === '') {
70
- return null;
71
- }
72
- const dt = DateTime.fromFormat(value, this.dateFormat, {
73
- locale: this.locale,
74
- });
75
- if (dt.isValid) {
76
- return dt.toJSDate();
77
- }
78
- const formats = ['ddMMyyyy', 'd/M/yyyy', 'dd/M/yyyy', 'd/MM/yyyy'];
79
- for (const format of formats) {
80
- const parsed = DateTime.fromFormat(value, format, {
81
- locale: this.locale,
82
- });
83
- if (parsed.isValid) {
84
- return parsed.toJSDate();
85
- }
86
- }
87
- return this.invalid();
88
- }
89
- getFirstDayOfWeek() {
90
- return 1;
91
- }
92
- ngOnDestroy() {
93
- this.destroyNotifier$.next();
94
- this.destroyNotifier$.complete();
95
- }
96
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDateAdapter, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
97
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDateAdapter }); }
98
- }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDateAdapter, decorators: [{
100
- type: Injectable
101
- }], ctorParameters: () => [{ type: i1.TranslateService }] });
102
-
103
- class OnemrvaYearMonthAdapter extends NativeDateAdapter {
104
- constructor(translateService) {
105
- super();
106
- this.translateService = translateService;
107
- this.dateFormat = ONEMRVA_FORMAT.display.dateInput;
108
- this.destroyNotifier$ = new Subject();
109
- this.setLocale(this.translateService.currentLang);
110
- this.translateService.onLangChange
111
- .pipe(takeUntil(this.destroyNotifier$))
112
- .subscribe(({ lang }) => {
113
- this.setLocale(lang);
114
- });
115
- }
116
- format(date) {
117
- const dt = DateTime.fromJSDate(date);
118
- console.log(dt.toFormat(this.dateFormat));
119
- return dt.toFormat(this.dateFormat);
120
- }
121
- parse(value) {
122
- if (value && typeof value === 'string') {
123
- value = value.replace(/\D/g, '/');
124
- }
125
- console.warn('*****');
126
- if (value === null || value === '') {
127
- return null;
128
- }
129
- const dt = DateTime.fromFormat(value, this.dateFormat, {
130
- locale: this.locale,
131
- });
132
- if (dt.isValid) {
133
- return dt.toJSDate();
134
- }
135
- const formats = ['MMyyyy', 'M/yyyy', 'MM/yyyy'];
136
- for (const format of formats) {
137
- const parsed = DateTime.fromFormat(value, format, {
138
- locale: this.locale,
139
- });
140
- if (parsed.isValid) {
141
- return parsed.toJSDate();
142
- }
143
- }
144
- return this.invalid();
145
- }
146
- getFirstDayOfWeek() {
147
- return 1;
148
- }
149
- ngOnDestroy() {
150
- this.destroyNotifier$.next();
151
- this.destroyNotifier$.complete();
152
- }
153
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaYearMonthAdapter, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
154
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaYearMonthAdapter }); }
155
- }
156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaYearMonthAdapter, decorators: [{
157
- type: Injectable
158
- }], ctorParameters: () => [{ type: i1.TranslateService }] });
22
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
23
+ import { provideLuxonDateAdapter } from '@angular/material-luxon-adapter';
159
24
 
160
25
  class ClipboardIconComponent {
161
26
  constructor(_elementRef, clipboardService) {
162
27
  this._elementRef = _elementRef;
163
28
  this.clipboardService = clipboardService;
164
29
  }
165
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ClipboardIconComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.Clipboard }], target: i0.ɵɵFactoryTarget.Component }); }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ClipboardIconComponent, deps: [{ token: i0.ElementRef }, { token: i1.Clipboard }], target: i0.ɵɵFactoryTarget.Component }); }
166
31
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: ClipboardIconComponent, isStandalone: true, selector: "lib-clipboard-icon", ngImport: i0, template: "<mat-icon [matTooltip]=\"'TEST'\">content_copy</mat-icon>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
167
32
  }
168
33
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ClipboardIconComponent, decorators: [{
169
34
  type: Component,
170
35
  args: [{ selector: 'lib-clipboard-icon', standalone: true, imports: [MatIconModule, MatTooltipModule], template: "<mat-icon [matTooltip]=\"'TEST'\">content_copy</mat-icon>\n" }]
171
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.Clipboard }] });
36
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.Clipboard }] });
172
37
 
173
38
  var CDNUrlModeOptions;
174
39
  (function (CDNUrlModeOptions) {
@@ -182,6 +47,101 @@ const CDN_URLS = {
182
47
  };
183
48
  const NISS_MASK = '000000/000-00';
184
49
 
50
+ const parseNativeDateFormats = [
51
+ 'ddMMyyyy',
52
+ 'dd/MM/yyyy',
53
+ 'd/M/yyyy',
54
+ 'dd/M/yyyy',
55
+ 'd/MM/yyyy',
56
+ 'd.M.yyyy',
57
+ 'dd.M.yyyy',
58
+ 'd.MM.yyyy',
59
+ 'd/M/yy',
60
+ 'dd/M/yy',
61
+ 'd/MM/yy',
62
+ 'd.M.yy',
63
+ 'dd.M.yy',
64
+ 'd.MM.yy',
65
+ ];
66
+ const parseNativeYearMonthFormats = [
67
+ 'MMyyyy',
68
+ 'M/yyyy',
69
+ 'M/yy',
70
+ 'MM/yyyy',
71
+ 'MM/yy',
72
+ 'M.yyyy',
73
+ 'MM.yyyy',
74
+ ];
75
+ const parseLuxonYearMonthFormats = [
76
+ 'LLyyyy',
77
+ 'L/yyyy',
78
+ 'L/yy',
79
+ 'LL/yyyy',
80
+ 'LL/yy',
81
+ 'L.yyyy',
82
+ 'LL.yyyy',
83
+ ];
84
+ const parseLuxonDateFormat = [
85
+ 'ddLLyyyy',
86
+ 'd/LL/yyyy',
87
+ 'd/L/yyyy',
88
+ 'dd/L/yyyy',
89
+ 'd/LL/yyyy',
90
+ 'd.L.yyyy',
91
+ 'dd.L.yyyy',
92
+ 'd.LL.yyyy',
93
+ 'd/L/yy',
94
+ 'dd/L/yy',
95
+ 'd/LL/yy',
96
+ 'd.L.yy',
97
+ 'dd.L.yy',
98
+ 'd.LL.yy',
99
+ ];
100
+ const ONEMRVA_MAT_NATIVE_DATE_FORMAT = {
101
+ parse: {
102
+ dateInput: parseNativeDateFormats,
103
+ },
104
+ display: {
105
+ dateInput: 'dd/MM/yyyy',
106
+ monthYearLabel: 'MMM yyyy',
107
+ dateA11yLabel: 'DDD',
108
+ monthYearA11yLabel: 'MMMM yyyy',
109
+ },
110
+ };
111
+ const ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT = {
112
+ parse: {
113
+ dateInput: parseNativeYearMonthFormats,
114
+ },
115
+ display: {
116
+ dateInput: 'dd/MM/yyyy',
117
+ monthYearLabel: 'MMM yyyy',
118
+ dateA11yLabel: 'DDD',
119
+ monthYearA11yLabel: 'MMM yyyy',
120
+ },
121
+ };
122
+ const ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS = {
123
+ parse: {
124
+ dateInput: parseLuxonYearMonthFormats,
125
+ },
126
+ display: {
127
+ dateInput: 'LL/yyyy',
128
+ monthYearLabel: 'LLL yyyy',
129
+ dateA11yLabel: 'DDD',
130
+ monthYearA11yLabel: 'LLLL yyyy',
131
+ },
132
+ };
133
+ const ONEMRVA_MAT_LUXON_DATE_FORMATS = {
134
+ parse: {
135
+ dateInput: parseLuxonDateFormat,
136
+ },
137
+ display: {
138
+ dateInput: 'dd/LL/yyyy',
139
+ monthYearLabel: 'LLL yyyy',
140
+ dateA11yLabel: 'DDD',
141
+ monthYearA11yLabel: 'LLL yyyy',
142
+ },
143
+ };
144
+
185
145
  const CDN_URL_MODE = new InjectionToken('This is cdn url that will be used (val/prod)');
186
146
 
187
147
  /**
@@ -252,7 +212,7 @@ class WebComponentOverlayContainer {
252
212
  this._document.body.appendChild(containerwrap);
253
213
  this._containerElement = container;
254
214
  }
255
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WebComponentOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$2.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
215
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WebComponentOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
256
216
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WebComponentOverlayContainer, providedIn: 'root' }); }
257
217
  }
258
218
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WebComponentOverlayContainer, decorators: [{
@@ -261,7 +221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
261
221
  }], ctorParameters: () => [{ type: undefined, decorators: [{
262
222
  type: Inject,
263
223
  args: [DOCUMENT]
264
- }] }, { type: i1$2.Platform }] });
224
+ }] }, { type: i1$1.Platform }] });
265
225
 
266
226
  class DefaultStorage {
267
227
  constructor() {
@@ -525,7 +485,7 @@ class IfWidthIsDirective {
525
485
  }
526
486
  });
527
487
  }
528
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: IfWidthIsDirective, deps: [{ token: i1$3.BreakpointObserver }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
488
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: IfWidthIsDirective, deps: [{ token: i1$2.BreakpointObserver }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
529
489
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: IfWidthIsDirective, selector: "[ifWidthIs]", inputs: { ifWidthIs: "ifWidthIs" }, ngImport: i0 }); }
530
490
  }
531
491
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: IfWidthIsDirective, decorators: [{
@@ -533,7 +493,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
533
493
  args: [{
534
494
  selector: '[ifWidthIs]',
535
495
  }]
536
- }], ctorParameters: () => [{ type: i1$3.BreakpointObserver }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }], propDecorators: { ifWidthIs: [{
496
+ }], ctorParameters: () => [{ type: i1$2.BreakpointObserver }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }], propDecorators: { ifWidthIs: [{
537
497
  type: Input
538
498
  }] } });
539
499
 
@@ -814,7 +774,7 @@ class OnemRvaClipboardDirective {
814
774
  this.vcRef.clear();
815
775
  this.renderer.appendChild(this.elementRef.nativeElement, this.iconEl);
816
776
  }
817
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaClipboardDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: i1$1.Clipboard }], target: i0.ɵɵFactoryTarget.Directive }); }
777
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaClipboardDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: i1.Clipboard }], target: i0.ɵɵFactoryTarget.Directive }); }
818
778
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: OnemRvaClipboardDirective, selector: "span[clipboard]", inputs: { clipboard: "clipboard" }, host: { properties: { "class": "this.class" } }, ngImport: i0 }); }
819
779
  }
820
780
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaClipboardDirective, decorators: [{
@@ -822,7 +782,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
822
782
  args: [{
823
783
  selector: 'span[clipboard]',
824
784
  }]
825
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: i1$1.Clipboard }], propDecorators: { class: [{
785
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: i1.Clipboard }], propDecorators: { class: [{
826
786
  type: HostBinding,
827
787
  args: ['class']
828
788
  }], clipboard: [{
@@ -1016,7 +976,7 @@ class CommonCountryLookupService {
1016
976
  return country || null;
1017
977
  }));
1018
978
  }
1019
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: CommonCountryLookupService, deps: [{ token: i1$4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
979
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: CommonCountryLookupService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
1020
980
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: CommonCountryLookupService, providedIn: 'root' }); }
1021
981
  }
1022
982
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: CommonCountryLookupService, decorators: [{
@@ -1024,7 +984,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1024
984
  args: [{
1025
985
  providedIn: 'root',
1026
986
  }]
1027
- }], ctorParameters: () => [{ type: i1$4.HttpClient }] });
987
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }] });
1028
988
 
1029
989
  class CacheService {
1030
990
  setItem(key, item) {
@@ -1102,7 +1062,7 @@ class OnemRvaCDNService {
1102
1062
  return all.filter(v => !!v).reduce((s, c) => ({ ...s, ...c }), {});
1103
1063
  }));
1104
1064
  }
1105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNService, deps: [{ token: CacheService }, { token: i1$4.HttpClient }, { token: CDN_URL_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1065
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNService, deps: [{ token: CacheService }, { token: i1$3.HttpClient }, { token: CDN_URL_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1106
1066
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNService, providedIn: 'root' }); }
1107
1067
  }
1108
1068
  __decorate([
@@ -1117,7 +1077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1117
1077
  args: [{
1118
1078
  providedIn: 'root',
1119
1079
  }]
1120
- }], ctorParameters: () => [{ type: CacheService }, { type: i1$4.HttpClient }, { type: CDNUrlModeOptions, decorators: [{
1080
+ }], ctorParameters: () => [{ type: CacheService }, { type: i1$3.HttpClient }, { type: CDNUrlModeOptions, decorators: [{
1121
1081
  type: Optional
1122
1082
  }, {
1123
1083
  type: Inject,
@@ -1183,7 +1143,7 @@ class OnemRvaCDNCountryService {
1183
1143
  });
1184
1144
  }));
1185
1145
  }
1186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, deps: [{ token: OnemRvaCDNService }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1146
+ 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 }); }
1187
1147
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, providedIn: 'root' }); }
1188
1148
  }
1189
1149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, decorators: [{
@@ -1191,7 +1151,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1191
1151
  args: [{
1192
1152
  providedIn: 'root',
1193
1153
  }]
1194
- }], ctorParameters: () => [{ type: OnemRvaCDNService }, { type: i1.TranslateService }] });
1154
+ }], ctorParameters: () => [{ type: OnemRvaCDNService }, { type: i1$4.TranslateService }] });
1195
1155
 
1196
1156
  class OnemRvaCDNMimeService {
1197
1157
  static { this.mimetypeFile = '/json/mimetypes.json'; }
@@ -1378,37 +1338,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1378
1338
  }]
1379
1339
  }] });
1380
1340
 
1381
- function translateDatepicker(translateService, adapter) {
1382
- return () => {
1383
- // For some cosmic reason, return translateService.onLangChange().asObservable()) + pipe(tap()) does not work
1384
- translateService.onLangChange.subscribe(event => {
1385
- adapter.setLocale(event.lang);
1341
+ class OnemrvaDatepickerLuxonSharedModule {
1342
+ constructor(translateService) {
1343
+ this._adapter = inject(DateAdapter);
1344
+ translateService.onLangChange
1345
+ .pipe(takeUntilDestroyed())
1346
+ .subscribe(value => {
1347
+ this._adapter.setLocale(value.lang);
1386
1348
  });
1387
- // But this works fine...
1388
- return of('sin (a +- b) = sin a . cos b +- cos a . sin b');
1389
- };
1349
+ }
1350
+ 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 }); }
1351
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1352
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonSharedModule, providers: [
1353
+ {
1354
+ provide: MAT_DATE_LOCALE,
1355
+ useFactory: (translateService) => translateService.currentLang,
1356
+ deps: [TranslateService],
1357
+ },
1358
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_DATE_FORMATS),
1359
+ ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1390
1360
  }
1361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonSharedModule, decorators: [{
1362
+ type: NgModule,
1363
+ args: [{
1364
+ declarations: [],
1365
+ imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule],
1366
+ exports: [],
1367
+ providers: [
1368
+ {
1369
+ provide: MAT_DATE_LOCALE,
1370
+ useFactory: (translateService) => translateService.currentLang,
1371
+ deps: [TranslateService],
1372
+ },
1373
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_DATE_FORMATS),
1374
+ ],
1375
+ }]
1376
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1377
+
1391
1378
  class OnemrvaDatepickerSharedModule {
1392
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1379
+ constructor(translateService) {
1380
+ this._adapter = inject(DateAdapter);
1381
+ translateService.onLangChange
1382
+ .pipe(takeUntilDestroyed())
1383
+ .subscribe(value => {
1384
+ this._adapter.setLocale(value.lang);
1385
+ });
1386
+ }
1387
+ 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 }); }
1393
1388
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1394
1389
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, providers: [
1395
1390
  {
1396
1391
  provide: MAT_DATE_LOCALE,
1397
- useValue: 'fr',
1398
- },
1399
- {
1400
- provide: DateAdapter,
1401
- useClass: OnemrvaDateAdapter,
1392
+ useFactory: (translateService) => translateService.currentLang,
1393
+ deps: [TranslateService],
1402
1394
  },
1403
1395
  {
1404
1396
  provide: MAT_DATE_FORMATS,
1405
- useValue: ONEMRVA_FORMAT,
1406
- },
1407
- {
1408
- provide: APP_INITIALIZER,
1409
- useFactory: translateDatepicker,
1410
- deps: [TranslateService, (DateAdapter)],
1411
- multi: true,
1397
+ useValue: ONEMRVA_MAT_NATIVE_DATE_FORMAT,
1412
1398
  },
1413
1399
  ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1414
1400
  }
@@ -1421,25 +1407,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1421
1407
  providers: [
1422
1408
  {
1423
1409
  provide: MAT_DATE_LOCALE,
1424
- useValue: 'fr',
1410
+ useFactory: (translateService) => translateService.currentLang,
1411
+ deps: [TranslateService],
1425
1412
  },
1426
1413
  {
1427
- provide: DateAdapter,
1428
- useClass: OnemrvaDateAdapter,
1414
+ provide: MAT_DATE_FORMATS,
1415
+ useValue: ONEMRVA_MAT_NATIVE_DATE_FORMAT,
1416
+ },
1417
+ ],
1418
+ }]
1419
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1420
+
1421
+ class OnemrvaDatepickerYearMonthSharedModule {
1422
+ constructor(translateService) {
1423
+ this._adapter = inject(DateAdapter);
1424
+ translateService.onLangChange
1425
+ .pipe(takeUntilDestroyed())
1426
+ .subscribe(value => {
1427
+ this._adapter.setLocale(value.lang);
1428
+ });
1429
+ }
1430
+ 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 }); }
1431
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerYearMonthSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1432
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerYearMonthSharedModule, providers: [
1433
+ {
1434
+ provide: MAT_DATE_LOCALE,
1435
+ useFactory: (translateService) => translateService.currentLang,
1436
+ deps: [TranslateService],
1437
+ },
1438
+ {
1439
+ provide: MAT_DATE_FORMATS,
1440
+ useValue: ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT,
1441
+ },
1442
+ ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1443
+ }
1444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerYearMonthSharedModule, decorators: [{
1445
+ type: NgModule,
1446
+ args: [{
1447
+ declarations: [],
1448
+ imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule],
1449
+ exports: [],
1450
+ providers: [
1451
+ {
1452
+ provide: MAT_DATE_LOCALE,
1453
+ useFactory: (translateService) => translateService.currentLang,
1454
+ deps: [TranslateService],
1429
1455
  },
1430
1456
  {
1431
1457
  provide: MAT_DATE_FORMATS,
1432
- useValue: ONEMRVA_FORMAT,
1458
+ useValue: ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT,
1433
1459
  },
1460
+ ],
1461
+ }]
1462
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1463
+
1464
+ class OnemrvaDatepickerLuxonYearMonthSharedModule {
1465
+ constructor(translateService) {
1466
+ this._adapter = inject(DateAdapter);
1467
+ translateService.onLangChange
1468
+ .pipe(takeUntilDestroyed())
1469
+ .subscribe(value => {
1470
+ this._adapter.setLocale(value.lang);
1471
+ });
1472
+ }
1473
+ 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 }); }
1474
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonYearMonthSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1475
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonYearMonthSharedModule, providers: [
1476
+ {
1477
+ provide: MAT_DATE_LOCALE,
1478
+ useFactory: (translateService) => translateService.currentLang,
1479
+ deps: [TranslateService],
1480
+ },
1481
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS),
1482
+ ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1483
+ }
1484
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerLuxonYearMonthSharedModule, decorators: [{
1485
+ type: NgModule,
1486
+ args: [{
1487
+ declarations: [],
1488
+ imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule],
1489
+ exports: [],
1490
+ providers: [
1434
1491
  {
1435
- provide: APP_INITIALIZER,
1436
- useFactory: translateDatepicker,
1437
- deps: [TranslateService, (DateAdapter)],
1438
- multi: true,
1492
+ provide: MAT_DATE_LOCALE,
1493
+ useFactory: (translateService) => translateService.currentLang,
1494
+ deps: [TranslateService],
1439
1495
  },
1496
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS),
1440
1497
  ],
1441
1498
  }]
1442
- }] });
1499
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1443
1500
 
1444
1501
  /*
1445
1502
  * Public API Surface of shared
@@ -1449,5 +1506,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1449
1506
  * Generated bundle index. Do not edit.
1450
1507
  */
1451
1508
 
1452
- export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, MatRowClickableDirective, NISS_MASK, ONEMRVA_FORMAT, ONEMRVA_YEAR_MONTH_FORMAT, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemrvaBcePipe, OnemrvaDateAdapter, OnemrvaDatepickerSharedModule, OnemrvaMaskDirective, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, OnemrvaYearMonthAdapter, RequestTimes, WebComponentOverlayContainer, bankAccountValidator, directives, setTranslationLanguage, setTranslationLanguageFromWO };
1509
+ 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 };
1453
1510
  //# sourceMappingURL=onemrvapublic-design-system-shared.mjs.map