@onemrvapublic/design-system 18.2.14-develop.1 → 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 (38) hide show
  1. package/esm2022/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.mjs +43 -32
  2. package/esm2022/mat-input-iban/src/onemrva-mat-input-iban.component.mjs +10 -6
  3. package/esm2022/mat-select-search/src/mat-select-search.component.mjs +2 -2
  4. package/esm2022/shared/index.mjs +2 -3
  5. package/esm2022/shared/src/lib/constants/date.format.mjs +87 -4
  6. package/esm2022/shared/src/lib/helpers/translation-helper.mjs +1 -1
  7. package/esm2022/shared/src/lib/loaders/index.mjs +2 -2
  8. package/esm2022/shared/src/lib/modules/index.mjs +5 -0
  9. package/esm2022/shared/src/lib/modules/shared.datepicker.luxon.module.mjs +46 -0
  10. package/esm2022/shared/src/lib/modules/shared.datepicker.luxon.year.month.module.mjs +46 -0
  11. package/esm2022/shared/src/lib/modules/shared.datepicker.native.module.mjs +51 -0
  12. package/esm2022/shared/src/lib/modules/shared.datepicker.native.year.month.module.mjs +51 -0
  13. package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +42 -31
  14. package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -1
  15. package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +9 -5
  16. package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -1
  17. package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs +1 -1
  18. package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs.map +1 -1
  19. package/fesm2022/onemrvapublic-design-system-shared.mjs +250 -179
  20. package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
  21. package/mat-file-upload/src/components/onemrva-mat-file-upload/onemrva-mat-file-upload.component.d.ts +2 -1
  22. package/mat-input-iban/src/onemrva-mat-input-iban.component.d.ts +2 -1
  23. package/package.json +1 -1
  24. package/shared/index.d.ts +1 -2
  25. package/shared/src/lib/constants/date.format.d.ts +4 -1
  26. package/shared/src/lib/loaders/index.d.ts +1 -1
  27. package/shared/src/lib/modules/index.d.ts +4 -0
  28. package/shared/src/lib/modules/shared.datepicker.luxon.module.d.ts +12 -0
  29. package/shared/src/lib/modules/shared.datepicker.luxon.year.month.module.d.ts +12 -0
  30. package/shared/src/lib/{shared.datepicker.module.d.ts → modules/shared.datepicker.native.module.d.ts} +3 -0
  31. package/shared/src/lib/modules/shared.datepicker.native.year.month.module.d.ts +12 -0
  32. package/esm2022/shared/src/lib/adapters/date.adapter.mjs +0 -62
  33. package/esm2022/shared/src/lib/adapters/index.mjs +0 -3
  34. package/esm2022/shared/src/lib/adapters/year-month.adapter.mjs +0 -62
  35. package/esm2022/shared/src/lib/shared.datepicker.module.mjs +0 -71
  36. package/shared/src/lib/adapters/date.adapter.d.ts +0 -16
  37. package/shared/src/lib/adapters/index.d.ts +0 -2
  38. package/shared/src/lib/adapters/year-month.adapter.d.ts +0 -16
@@ -1,25 +1,39 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Component, 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';
22
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
23
+ import { provideLuxonDateAdapter } from '@angular/material-luxon-adapter';
24
+
25
+ class ClipboardIconComponent {
26
+ constructor(_elementRef, clipboardService) {
27
+ this._elementRef = _elementRef;
28
+ this.clipboardService = clipboardService;
29
+ }
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 }); }
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"] }] }); }
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ClipboardIconComponent, decorators: [{
34
+ type: Component,
35
+ args: [{ selector: 'lib-clipboard-icon', standalone: true, imports: [MatIconModule, MatTooltipModule], template: "<mat-icon [matTooltip]=\"'TEST'\">content_copy</mat-icon>\n" }]
36
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.Clipboard }] });
23
37
 
24
38
  var CDNUrlModeOptions;
25
39
  (function (CDNUrlModeOptions) {
@@ -33,143 +47,103 @@ const CDN_URLS = {
33
47
  };
34
48
  const NISS_MASK = '000000/000-00';
35
49
 
36
- const ONEMRVA_FORMAT = {
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 = {
37
101
  parse: {
38
- dateInput: 'LL',
102
+ dateInput: parseNativeDateFormats,
39
103
  },
40
104
  display: {
41
105
  dateInput: 'dd/MM/yyyy',
42
106
  monthYearLabel: 'MMM yyyy',
43
- dateA11yLabel: 'LL',
107
+ dateA11yLabel: 'DDD',
44
108
  monthYearA11yLabel: 'MMMM yyyy',
45
109
  },
46
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
+ };
47
144
 
48
145
  const CDN_URL_MODE = new InjectionToken('This is cdn url that will be used (val/prod)');
49
146
 
50
- class OnemrvaDateAdapter extends NativeDateAdapter {
51
- constructor(translateService) {
52
- super();
53
- this.translateService = translateService;
54
- this.dateFormat = ONEMRVA_FORMAT.display.dateInput;
55
- this.destroyNotifier$ = new Subject();
56
- this.setLocale(this.translateService.currentLang);
57
- this.translateService.onLangChange
58
- .pipe(takeUntil(this.destroyNotifier$))
59
- .subscribe(({ lang }) => {
60
- this.setLocale(lang);
61
- });
62
- }
63
- format(date) {
64
- const dt = DateTime.fromJSDate(date);
65
- return dt.toFormat(this.dateFormat);
66
- }
67
- parse(value) {
68
- if (value && typeof value === 'string') {
69
- value = value.replace(/\D/g, '/');
70
- }
71
- if (value === null || value === '') {
72
- return null;
73
- }
74
- const dt = DateTime.fromFormat(value, this.dateFormat, {
75
- locale: this.locale,
76
- });
77
- if (dt.isValid) {
78
- return dt.toJSDate();
79
- }
80
- const formats = ['ddMMyyyy', 'd/M/yyyy', 'dd/M/yyyy', 'd/MM/yyyy'];
81
- for (const format of formats) {
82
- const parsed = DateTime.fromFormat(value, format, {
83
- locale: this.locale,
84
- });
85
- if (parsed.isValid) {
86
- return parsed.toJSDate();
87
- }
88
- }
89
- return this.invalid();
90
- }
91
- getFirstDayOfWeek() {
92
- return 1;
93
- }
94
- ngOnDestroy() {
95
- this.destroyNotifier$.next();
96
- this.destroyNotifier$.complete();
97
- }
98
- 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 }); }
99
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDateAdapter }); }
100
- }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDateAdapter, decorators: [{
102
- type: Injectable
103
- }], ctorParameters: () => [{ type: i1.TranslateService }] });
104
-
105
- class OnemrvaYearMonthAdapter extends NativeDateAdapter {
106
- constructor(translateService) {
107
- super();
108
- this.translateService = translateService;
109
- this.dateFormat = ONEMRVA_FORMAT.display.monthYearLabel;
110
- this.destroyNotifier$ = new Subject();
111
- this.setLocale(this.translateService.currentLang);
112
- this.translateService.onLangChange
113
- .pipe(takeUntil(this.destroyNotifier$))
114
- .subscribe(({ lang }) => {
115
- this.setLocale(lang);
116
- });
117
- }
118
- format(date) {
119
- const dt = DateTime.fromJSDate(date);
120
- return dt.toFormat(this.dateFormat);
121
- }
122
- parse(value) {
123
- if (value && typeof value === 'string') {
124
- value = value.replace(/\D/g, '/');
125
- }
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 }] });
159
-
160
- class ClipboardIconComponent {
161
- constructor(_elementRef, clipboardService) {
162
- this._elementRef = _elementRef;
163
- this.clipboardService = clipboardService;
164
- }
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 }); }
166
- 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
- }
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ClipboardIconComponent, decorators: [{
169
- type: Component,
170
- 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 }] });
172
-
173
147
  /**
174
148
  * @license
175
149
  * Copyright Google LLC All Rights Reserved.
@@ -238,7 +212,7 @@ class WebComponentOverlayContainer {
238
212
  this._document.body.appendChild(containerwrap);
239
213
  this._containerElement = container;
240
214
  }
241
- 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 }); }
242
216
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WebComponentOverlayContainer, providedIn: 'root' }); }
243
217
  }
244
218
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WebComponentOverlayContainer, decorators: [{
@@ -247,7 +221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
247
221
  }], ctorParameters: () => [{ type: undefined, decorators: [{
248
222
  type: Inject,
249
223
  args: [DOCUMENT]
250
- }] }, { type: i1$2.Platform }] });
224
+ }] }, { type: i1$1.Platform }] });
251
225
 
252
226
  class DefaultStorage {
253
227
  constructor() {
@@ -511,7 +485,7 @@ class IfWidthIsDirective {
511
485
  }
512
486
  });
513
487
  }
514
- 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 }); }
515
489
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.8", type: IfWidthIsDirective, selector: "[ifWidthIs]", inputs: { ifWidthIs: "ifWidthIs" }, ngImport: i0 }); }
516
490
  }
517
491
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: IfWidthIsDirective, decorators: [{
@@ -519,7 +493,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
519
493
  args: [{
520
494
  selector: '[ifWidthIs]',
521
495
  }]
522
- }], 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: [{
523
497
  type: Input
524
498
  }] } });
525
499
 
@@ -800,7 +774,7 @@ class OnemRvaClipboardDirective {
800
774
  this.vcRef.clear();
801
775
  this.renderer.appendChild(this.elementRef.nativeElement, this.iconEl);
802
776
  }
803
- 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 }); }
804
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 }); }
805
779
  }
806
780
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaClipboardDirective, decorators: [{
@@ -808,7 +782,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
808
782
  args: [{
809
783
  selector: 'span[clipboard]',
810
784
  }]
811
- }], 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: [{
812
786
  type: HostBinding,
813
787
  args: ['class']
814
788
  }], clipboard: [{
@@ -1002,7 +976,7 @@ class CommonCountryLookupService {
1002
976
  return country || null;
1003
977
  }));
1004
978
  }
1005
- 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 }); }
1006
980
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: CommonCountryLookupService, providedIn: 'root' }); }
1007
981
  }
1008
982
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: CommonCountryLookupService, decorators: [{
@@ -1010,7 +984,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1010
984
  args: [{
1011
985
  providedIn: 'root',
1012
986
  }]
1013
- }], ctorParameters: () => [{ type: i1$4.HttpClient }] });
987
+ }], ctorParameters: () => [{ type: i1$3.HttpClient }] });
1014
988
 
1015
989
  class CacheService {
1016
990
  setItem(key, item) {
@@ -1088,7 +1062,7 @@ class OnemRvaCDNService {
1088
1062
  return all.filter(v => !!v).reduce((s, c) => ({ ...s, ...c }), {});
1089
1063
  }));
1090
1064
  }
1091
- 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 }); }
1092
1066
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNService, providedIn: 'root' }); }
1093
1067
  }
1094
1068
  __decorate([
@@ -1103,7 +1077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1103
1077
  args: [{
1104
1078
  providedIn: 'root',
1105
1079
  }]
1106
- }], ctorParameters: () => [{ type: CacheService }, { type: i1$4.HttpClient }, { type: CDNUrlModeOptions, decorators: [{
1080
+ }], ctorParameters: () => [{ type: CacheService }, { type: i1$3.HttpClient }, { type: CDNUrlModeOptions, decorators: [{
1107
1081
  type: Optional
1108
1082
  }, {
1109
1083
  type: Inject,
@@ -1169,7 +1143,7 @@ class OnemRvaCDNCountryService {
1169
1143
  });
1170
1144
  }));
1171
1145
  }
1172
- 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 }); }
1173
1147
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, providedIn: 'root' }); }
1174
1148
  }
1175
1149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemRvaCDNCountryService, decorators: [{
@@ -1177,7 +1151,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1177
1151
  args: [{
1178
1152
  providedIn: 'root',
1179
1153
  }]
1180
- }], ctorParameters: () => [{ type: OnemRvaCDNService }, { type: i1.TranslateService }] });
1154
+ }], ctorParameters: () => [{ type: OnemRvaCDNService }, { type: i1$4.TranslateService }] });
1181
1155
 
1182
1156
  class OnemRvaCDNMimeService {
1183
1157
  static { this.mimetypeFile = '/json/mimetypes.json'; }
@@ -1364,37 +1338,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1364
1338
  }]
1365
1339
  }] });
1366
1340
 
1367
- function translateDatepicker(translateService, adapter) {
1368
- return () => {
1369
- // For some cosmic reason, return translateService.onLangChange().asObservable()) + pipe(tap()) does not work
1370
- translateService.onLangChange.subscribe(event => {
1371
- 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);
1372
1348
  });
1373
- // But this works fine...
1374
- return of('sin (a +- b) = sin a . cos b +- cos a . sin b');
1375
- };
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] }); }
1376
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
+
1377
1378
  class OnemrvaDatepickerSharedModule {
1378
- 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 }); }
1379
1388
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1380
1389
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: OnemrvaDatepickerSharedModule, providers: [
1381
1390
  {
1382
1391
  provide: MAT_DATE_LOCALE,
1383
- useValue: 'fr',
1384
- },
1385
- {
1386
- provide: DateAdapter,
1387
- useClass: OnemrvaDateAdapter,
1392
+ useFactory: (translateService) => translateService.currentLang,
1393
+ deps: [TranslateService],
1388
1394
  },
1389
1395
  {
1390
1396
  provide: MAT_DATE_FORMATS,
1391
- useValue: ONEMRVA_FORMAT,
1392
- },
1393
- {
1394
- provide: APP_INITIALIZER,
1395
- useFactory: translateDatepicker,
1396
- deps: [TranslateService, (DateAdapter)],
1397
- multi: true,
1397
+ useValue: ONEMRVA_MAT_NATIVE_DATE_FORMAT,
1398
1398
  },
1399
1399
  ], imports: [MatDatepickerModule, TranslateModule, MatNativeDateModule] }); }
1400
1400
  }
@@ -1407,25 +1407,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1407
1407
  providers: [
1408
1408
  {
1409
1409
  provide: MAT_DATE_LOCALE,
1410
- useValue: 'fr',
1410
+ useFactory: (translateService) => translateService.currentLang,
1411
+ deps: [TranslateService],
1411
1412
  },
1412
1413
  {
1413
- provide: DateAdapter,
1414
- 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],
1415
1455
  },
1416
1456
  {
1417
1457
  provide: MAT_DATE_FORMATS,
1418
- useValue: ONEMRVA_FORMAT,
1458
+ useValue: ONEMRVA_MAT_NATIVE_YEAR_MONTH_FORMAT,
1419
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: [
1420
1491
  {
1421
- provide: APP_INITIALIZER,
1422
- useFactory: translateDatepicker,
1423
- deps: [TranslateService, (DateAdapter)],
1424
- multi: true,
1492
+ provide: MAT_DATE_LOCALE,
1493
+ useFactory: (translateService) => translateService.currentLang,
1494
+ deps: [TranslateService],
1425
1495
  },
1496
+ provideLuxonDateAdapter(ONEMRVA_MAT_LUXON_YEAR_MONTH_FORMATS),
1426
1497
  ],
1427
1498
  }]
1428
- }] });
1499
+ }], ctorParameters: () => [{ type: i1$4.TranslateService }] });
1429
1500
 
1430
1501
  /*
1431
1502
  * Public API Surface of shared
@@ -1435,5 +1506,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
1435
1506
  * Generated bundle index. Do not edit.
1436
1507
  */
1437
1508
 
1438
- export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, MatRowClickableDirective, NISS_MASK, ONEMRVA_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 };
1439
1510
  //# sourceMappingURL=onemrvapublic-design-system-shared.mjs.map