@onemrvapublic/design-system 20.3.0-develop.2 → 20.3.0-develop.4

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,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Component } from '@angular/core';
2
+ import { EventEmitter, Output, Input, Component } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import * as i1 from '@angular/material/form-field';
5
5
  import { MatFormFieldModule } from '@angular/material/form-field';
6
6
  import * as i2 from '@angular/forms';
7
- import { FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
7
+ import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
8
8
  import { OnemrvaMatInputAddressComponent } from '@onemrvapublic/design-system/mat-input-address';
9
9
  import { OnemrvaMatInputCountryComponent } from '@onemrvapublic/design-system/mat-input-country';
10
10
  import * as i3 from '@angular/material/input';
@@ -15,42 +15,70 @@ import { merge } from 'rxjs';
15
15
 
16
16
  class OnemRvaAddress {
17
17
  constructor() {
18
+ this.defaultCountry = 'be';
19
+ this.form = new FormGroup({
20
+ country: new FormControl(''),
21
+ street: new FormControl(''),
22
+ postal_code: new FormControl(''),
23
+ city: new FormControl(''),
24
+ street_number: new FormControl(''),
25
+ box: new FormControl(''),
26
+ });
18
27
  this.update = new EventEmitter();
19
- this.countryForm = new FormControl('be', [Validators.required]);
20
- this.addressControl = new FormControl('');
21
- this.postalCodeControl = new FormControl('');
22
- this.cityControl = new FormControl('');
23
- this.boiteControl = new FormControl('');
24
- this.numeroControl = new FormControl('');
28
+ }
29
+ // Keep existing property names as getters to avoid template changes
30
+ get countryForm() {
31
+ return this.form.get('country');
32
+ }
33
+ get streetControl() {
34
+ return this.form.get('street');
35
+ }
36
+ get postalCodeControl() {
37
+ return this.form.get('postal_code');
38
+ }
39
+ get cityControl() {
40
+ return this.form.get('city');
41
+ }
42
+ get boxControl() {
43
+ return this.form.get('box');
44
+ }
45
+ get numeroControl() {
46
+ return this.form.get('street_number');
25
47
  }
26
48
  ngOnInit() {
27
- merge(this.countryForm.valueChanges, this.addressControl.valueChanges, this.postalCodeControl.valueChanges, this.cityControl.valueChanges, this.boiteControl.valueChanges, this.numeroControl.valueChanges).subscribe(() => {
49
+ // Emit on any form change
50
+ merge(this.form.valueChanges).subscribe(() => {
51
+ const v = this.form.value;
28
52
  const change = {
29
- country: this.countryForm.value || undefined,
30
- street: this.addressControl.value || undefined,
31
- postal_code: this.postalCodeControl.value || undefined,
32
- city: this.cityControl.value || undefined,
33
- street_number: this.numeroControl.value || undefined,
53
+ country: v.country || undefined,
54
+ street: v.street || undefined,
55
+ postal_code: v.postal_code || undefined,
56
+ city: v.city || undefined,
57
+ street_number: v.street_number || undefined,
34
58
  };
35
59
  this.update.emit(change);
36
60
  });
37
61
  }
38
62
  onAddressSelected(result) {
39
63
  const city = result.address.city || result.address.village || result.address.town;
64
+ const patch = {};
40
65
  if (city) {
41
- this.cityControl.setValue(city);
66
+ patch.city = city;
42
67
  }
43
68
  const houseNumber = result.address.house_number;
44
69
  if (houseNumber) {
45
- this.numeroControl.setValue(houseNumber);
70
+ patch.street_number = houseNumber;
46
71
  }
47
72
  const postalCode = result.address.postcode;
48
73
  if (postalCode) {
49
- this.postalCodeControl.setValue(postalCode);
74
+ patch.postal_code = postalCode;
75
+ }
76
+ if (Object.keys(patch).length > 0) {
77
+ this.form.patchValue(patch);
50
78
  }
51
79
  }
52
80
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaAddress, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
53
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaAddress, isStandalone: true, selector: "onemrva-address", outputs: { update: "update" }, ngImport: i0, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"line-2\">\n <onemrva-mat-input-address\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"addressControl\"\n (getAddress)=\"onAddressSelected($event)\"\n >\n </onemrva-mat-input-address>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boiteControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n\n<div class=\"line-3\">\n <mat-form-field>\n <mat-label>{{ 'input.address.postal-code.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:400px}:host onemrva-mat-input-country{display:flex;width:100%}:host .line-2{display:flex}:host .line-2 onemrva-mat-input-address{width:248px;max-width:248px;margin-right:var(--spacer)}:host .line-2 mat-form-field:first-of-type{margin-right:var(--spacer)}:host .line-3{width:100%;display:flex}:host .line-3 mat-form-field:first-child{display:flex;width:30%;margin-right:var(--spacer)}:host .line-3 mat-form-field:last-child{display:flex;width:auto;flex-grow:1}:host .line-4{width:100%;display:flex}:host .line-4 mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OnemrvaMatInputCountryComponent, selector: "onemrva-mat-input-country", inputs: ["readonly", "country", "label", "noEntriesFoundLabel", "hint", "placeholderLabel", "searchAriaLabel"], outputs: ["getCountry"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: OnemrvaMatInputAddressComponent, selector: "onemrva-mat-input-address", inputs: ["placeholder", "readonly", "address", "mode", "label", "noEntriesFoundLabel", "hint", "countryCodes"], outputs: ["getAddress"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] }); }
81
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaAddress, isStandalone: true, selector: "onemrva-address", inputs: { defaultCountry: "defaultCountry", form: "form" }, outputs: { update: "update" }, ngImport: i0, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"line-2\">\n <onemrva-mat-input-address\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n >\n </onemrva-mat-input-address>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n\n<div class=\"line-3\">\n <mat-form-field>\n <mat-label>{{ 'input.address.postal-code.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:400px}:host onemrva-mat-input-country{display:flex;width:100%}:host .line-2{display:flex}:host .line-2 onemrva-mat-input-address{width:248px;max-width:248px;margin-right:var(--spacer)}:host .line-2 mat-form-field:first-of-type{margin-right:var(--spacer)}:host .line-3{width:100%;display:flex}:host .line-3 mat-form-field:first-child{display:flex;width:30%;margin-right:var(--spacer)}:host .line-3 mat-form-field:last-child{display:flex;width:auto;flex-grow:1}:host .line-4{width:100%;display:flex}:host .line-4 mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OnemrvaMatInputCountryComponent, selector: "onemrva-mat-input-country", inputs: ["readonly", "country", "label", "noEntriesFoundLabel", "hint", "placeholderLabel", "searchAriaLabel"], outputs: ["getCountry"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: OnemrvaMatInputAddressComponent, selector: "onemrva-mat-input-address", inputs: ["placeholder", "readonly", "address", "mode", "label", "noEntriesFoundLabel", "hint", "countryCodes"], outputs: ["getAddress"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] }); }
54
82
  }
55
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaAddress, decorators: [{
56
84
  type: Component,
@@ -62,8 +90,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
62
90
  MatInputModule,
63
91
  TranslateModule,
64
92
  OnemrvaMatInputAddressComponent,
65
- ], standalone: true, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"line-2\">\n <onemrva-mat-input-address\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"addressControl\"\n (getAddress)=\"onAddressSelected($event)\"\n >\n </onemrva-mat-input-address>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boiteControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n\n<div class=\"line-3\">\n <mat-form-field>\n <mat-label>{{ 'input.address.postal-code.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:400px}:host onemrva-mat-input-country{display:flex;width:100%}:host .line-2{display:flex}:host .line-2 onemrva-mat-input-address{width:248px;max-width:248px;margin-right:var(--spacer)}:host .line-2 mat-form-field:first-of-type{margin-right:var(--spacer)}:host .line-3{width:100%;display:flex}:host .line-3 mat-form-field:first-child{display:flex;width:30%;margin-right:var(--spacer)}:host .line-3 mat-form-field:last-child{display:flex;width:auto;flex-grow:1}:host .line-4{width:100%;display:flex}:host .line-4 mat-form-field{width:100%}\n"] }]
66
- }], propDecorators: { update: [{
93
+ ], standalone: true, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"line-2\">\n <onemrva-mat-input-address\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n >\n </onemrva-mat-input-address>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n\n<div class=\"line-3\">\n <mat-form-field>\n <mat-label>{{ 'input.address.postal-code.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:400px}:host onemrva-mat-input-country{display:flex;width:100%}:host .line-2{display:flex}:host .line-2 onemrva-mat-input-address{width:248px;max-width:248px;margin-right:var(--spacer)}:host .line-2 mat-form-field:first-of-type{margin-right:var(--spacer)}:host .line-3{width:100%;display:flex}:host .line-3 mat-form-field:first-child{display:flex;width:30%;margin-right:var(--spacer)}:host .line-3 mat-form-field:last-child{display:flex;width:auto;flex-grow:1}:host .line-4{width:100%;display:flex}:host .line-4 mat-form-field{width:100%}\n"] }]
94
+ }], propDecorators: { defaultCountry: [{
95
+ type: Input
96
+ }], form: [{
97
+ type: Input
98
+ }], update: [{
67
99
  type: Output
68
100
  }] } });
69
101
 
@@ -1 +1 @@
1
- {"version":3,"file":"onemrvapublic-design-system-mat-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.ts","../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.html","../../../../projects/onemrva/design-system/mat-address/index.ts","../../../../projects/onemrva/design-system/mat-address/onemrvapublic-design-system-mat-address.ts"],"sourcesContent":["import { Component, EventEmitter, OnInit, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { OnemrvaMatInputAddressComponent } from '@onemrvapublic/design-system/mat-input-address';\nimport { OnemrvaMatInputCountryComponent } from '@onemrvapublic/design-system/mat-input-country';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\nimport { MatInputModule } from '@angular/material/input';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { merge } from 'rxjs';\n\n@Component({\n selector: 'onemrva-address',\n imports: [\n CommonModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n OnemrvaMatInputCountryComponent,\n MatInputModule,\n TranslateModule,\n OnemrvaMatInputAddressComponent,\n ],\n templateUrl: './onemrva-address.html',\n standalone: true,\n styleUrl: './onemrva-address.scss',\n})\nexport class OnemRvaAddress implements OnInit {\n @Output()\n update = new EventEmitter<{\n country?: string;\n street?: string;\n postal_code?: string;\n city?: string;\n street_number?: string;\n }>();\n\n countryForm = new FormControl('be', [Validators.required]);\n\n addressControl = new FormControl('');\n\n postalCodeControl = new FormControl('');\n cityControl = new FormControl('');\n boiteControl = new FormControl('');\n numeroControl = new FormControl('');\n\n ngOnInit() {\n merge(\n this.countryForm.valueChanges,\n this.addressControl.valueChanges,\n this.postalCodeControl.valueChanges,\n this.cityControl.valueChanges,\n this.boiteControl.valueChanges,\n this.numeroControl.valueChanges,\n ).subscribe(() => {\n const change = {\n country: this.countryForm.value || undefined,\n street: this.addressControl.value || undefined,\n postal_code: this.postalCodeControl.value || undefined,\n city: this.cityControl.value || undefined,\n street_number: this.numeroControl.value || undefined,\n };\n\n this.update.emit(change);\n });\n }\n\n onAddressSelected(result: OSMResult) {\n const city =\n result.address.city || result.address.village || result.address.town;\n if (city) {\n this.cityControl.setValue(city);\n }\n\n const houseNumber = result.address.house_number;\n if (houseNumber) {\n this.numeroControl.setValue(houseNumber);\n }\n\n const postalCode = result.address.postcode;\n if (postalCode) {\n this.postalCodeControl.setValue(postalCode);\n }\n }\n}\n","<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"line-2\">\n <onemrva-mat-input-address\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"addressControl\"\n (getAddress)=\"onAddressSelected($event)\"\n >\n </onemrva-mat-input-address>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boiteControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n\n<div class=\"line-3\">\n <mat-form-field>\n <mat-label>{{ 'input.address.postal-code.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-address';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA0Ba,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;AAiBE,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAMrB;AAEJ,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAE1D,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AAEpC,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AACvC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AACjC,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AAClC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC;AAwCpC;IAtCC,QAAQ,GAAA;AACN,QAAA,KAAK,CACH,IAAI,CAAC,WAAW,CAAC,YAAY,EAC7B,IAAI,CAAC,cAAc,CAAC,YAAY,EAChC,IAAI,CAAC,iBAAiB,CAAC,YAAY,EACnC,IAAI,CAAC,WAAW,CAAC,YAAY,EAC7B,IAAI,CAAC,YAAY,CAAC,YAAY,EAC9B,IAAI,CAAC,aAAa,CAAC,YAAY,CAChC,CAAC,SAAS,CAAC,MAAK;AACf,YAAA,MAAM,MAAM,GAAG;AACb,gBAAA,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,SAAS;AAC5C,gBAAA,MAAM,EAAE,IAAI,CAAC,cA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,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAC/B,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,yHAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACd,eAAe,+BACf,+BAA+B,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAMtB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB;wBACP,YAAY;wBACZ,kBAAkB;wBAClB,mBAAmB;wBACnB,+BAA+B;wBAC/B,cAAc;wBACd,eAAe;wBACf,+BAA+B;AAChC,qBAAA,EAAA,UAAA,EAEW,IAAI,EAAA,QAAA,EAAA,opDAAA,EAAA,MAAA,EAAA,CAAA,4kBAAA,CAAA,EAAA;8BAKhB,MAAM,EAAA,CAAA;sBADL;;;AE3BH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.ts","../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.html","../../../../projects/onemrva/design-system/mat-address/index.ts","../../../../projects/onemrva/design-system/mat-address/onemrvapublic-design-system-mat-address.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { OnemrvaMatInputAddressComponent } from '@onemrvapublic/design-system/mat-input-address';\nimport { OnemrvaMatInputCountryComponent } from '@onemrvapublic/design-system/mat-input-country';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\nimport { MatInputModule } from '@angular/material/input';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { merge } from 'rxjs';\n\n@Component({\n selector: 'onemrva-address',\n imports: [\n CommonModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n OnemrvaMatInputCountryComponent,\n MatInputModule,\n TranslateModule,\n OnemrvaMatInputAddressComponent,\n ],\n templateUrl: './onemrva-address.html',\n standalone: true,\n styleUrl: './onemrva-address.scss',\n})\nexport class OnemRvaAddress implements OnInit {\n @Input()\n defaultCountry = 'be';\n\n @Input()\n form = new FormGroup({\n country: new FormControl(''),\n street: new FormControl(''),\n postal_code: new FormControl(''),\n city: new FormControl(''),\n street_number: new FormControl(''),\n box: new FormControl(''),\n });\n\n @Output()\n update = new EventEmitter<{\n country?: string;\n street?: string;\n postal_code?: string;\n city?: string;\n street_number?: string;\n box?: string;\n }>();\n\n // Keep existing property names as getters to avoid template changes\n get countryForm(): FormControl<string | null> {\n return this.form.get('country') as FormControl<string | null>;\n }\n get streetControl(): FormControl<string | null> {\n return this.form.get('street') as FormControl<string | null>;\n }\n get postalCodeControl(): FormControl<string | null> {\n return this.form.get('postal_code') as FormControl<string | null>;\n }\n get cityControl(): FormControl<string | null> {\n return this.form.get('city') as FormControl<string | null>;\n }\n get boxControl(): FormControl<string | null> {\n return this.form.get('box') as FormControl<string | null>;\n }\n get numeroControl(): FormControl<string | null> {\n return this.form.get('street_number') as FormControl<string | null>;\n }\n\n ngOnInit() {\n // Emit on any form change\n merge(this.form.valueChanges).subscribe(() => {\n const v = this.form.value;\n const change = {\n country: v.country || undefined,\n street: v.street || undefined,\n postal_code: v.postal_code || undefined,\n city: v.city || undefined,\n street_number: v.street_number || undefined,\n };\n this.update.emit(change);\n });\n }\n\n onAddressSelected(result: OSMResult) {\n const city =\n result.address.city || result.address.village || result.address.town;\n const patch: any = {};\n\n if (city) {\n patch.city = city;\n }\n\n const houseNumber = result.address.house_number;\n if (houseNumber) {\n patch.street_number = houseNumber;\n }\n\n const postalCode = result.address.postcode;\n if (postalCode) {\n patch.postal_code = postalCode;\n }\n\n if (Object.keys(patch).length > 0) {\n this.form.patchValue(patch);\n }\n }\n}\n","<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"line-2\">\n <onemrva-mat-input-address\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n >\n </onemrva-mat-input-address>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n\n<div class=\"line-3\">\n <mat-form-field>\n <mat-label>{{ 'input.address.postal-code.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-address';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA0Ba,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;QAiBE,IAAA,CAAA,cAAc,GAAG,IAAI;QAGrB,IAAA,CAAA,IAAI,GAAG,IAAI,SAAS,CAAC;AACnB,YAAA,OAAO,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC5B,YAAA,MAAM,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC3B,YAAA,WAAW,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAChC,YAAA,IAAI,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AACzB,YAAA,aAAa,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAClC,YAAA,GAAG,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AACzB,SAAA,CAAC;AAGF,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAOrB;AA4DL;;AAzDC,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAA+B;;AAE/D,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAA+B;;AAE9D,IAAA,IAAI,iBAAiB,GAAA;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAA+B;;AAEnE,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAA+B;;AAE5D,IAAA,IAA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AA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAMtB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB;wBACP,YAAY;wBACZ,kBAAkB;wBAClB,mBAAmB;wBACnB,+BAA+B;wBAC/B,cAAc;wBACd,eAAe;wBACf,+BAA+B;AAChC,qBAAA,EAAA,UAAA,EAEW,IAAI,EAAA,QAAA,EAAA,ipDAAA,EAAA,MAAA,EAAA,CAAA,4kBAAA,CAAA,EAAA;8BAKhB,cAAc,EAAA,CAAA;sBADb;gBAID,IAAI,EAAA,CAAA;sBADH;gBAWD,MAAM,EAAA,CAAA;sBADL;;;AExCH;;AAEG;;ACFH;;AAEG;;;;"}
@@ -140,7 +140,7 @@ class OnemrvaMatInputEnterpriseNumberComponent {
140
140
  return 'input.vies.unknown.error';
141
141
  }
142
142
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputEnterpriseNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
143
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputEnterpriseNumberComponent, isStandalone: true, selector: "onemrva-mat-input-enterprise-number", inputs: { readonly: "readonly", enterpriseNumber: "enterpriseNumber", label: "label", noEntriesFoundLabel: "noEntriesFoundLabel", placeholderLabel: "placeholderLabel", defaultCountry: "defaultCountry", searchAriaLabel: "searchAriaLabel", hint: "hint" }, outputs: { getCountry: "getCountry" }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: ["numberInput"], descendants: true }], ngImport: i0, template: "<ng-container>\n <mat-form-field class=\"onemrva-input-enterprise-number\">\n <mat-label>{{ label }}</mat-label>\n <input\n (click)=\"handleClick($event)\"\n type=\"text\"\n matInput\n #numberInput\n placeholder=\"\"\n [formControl]=\"enterpriseNumber\"\n class=\"onemrva-text-enterprise-number\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />&nbsp;&nbsp;{{\n country.name\n }}\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n", styles: [".onemrva-input-enterprise-number mat-select{padding:0 0 0 8px}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder{width:1em!important;display:block!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder:before{width:1em!important;height:1em!important;background:#eee!important;visibility:visible!important;margin:10px 0!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-value{padding-right:8px}.onemrva-input-enterprise-number .onemrva-text-enterprise-number{padding-left:12px!important;vertical-align:middle}.onemrva-input-enterprise-number .mat-mdc-form-field-text-prefix mat-select{line-height:14px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: FlagIconComponent, selector: "flag-icon", inputs: ["countryCode", "mode", "width"] }, { kind: "ngmodule", type: MatSelectSearchModule }, { kind: "component", type: i4.MatSelectSearchComponent, selector: "mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
143
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputEnterpriseNumberComponent, isStandalone: true, selector: "onemrva-mat-input-enterprise-number", inputs: { readonly: "readonly", enterpriseNumber: "enterpriseNumber", label: "label", noEntriesFoundLabel: "noEntriesFoundLabel", placeholderLabel: "placeholderLabel", defaultCountry: "defaultCountry", searchAriaLabel: "searchAriaLabel", hint: "hint" }, outputs: { getCountry: "getCountry" }, viewQueries: [{ propertyName: "numberInput", first: true, predicate: ["numberInput"], descendants: true }], ngImport: i0, template: "<ng-container>\n <mat-form-field class=\"onemrva-input-enterprise-number\">\n <mat-label>{{ label }}</mat-label>\n <input\n (click)=\"handleClick($event)\"\n type=\"text\"\n matInput\n #numberInput\n placeholder=\"\"\n [formControl]=\"enterpriseNumber\"\n class=\"onemrva-text-enterprise-number\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />&nbsp;&nbsp;{{\n country.name\n }}\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n", styles: [".onemrva-input-enterprise-number .mdc-text-field--disabled mat-select .mat-mdc-select-arrow{opacity:.5}.onemrva-input-enterprise-number mat-select{padding:0 0 0 8px}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder{width:1em!important;display:block!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder:before{width:1em!important;height:1em!important;background:#eee!important;visibility:visible!important;margin:10px 0!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-value{padding-right:8px}.onemrva-input-enterprise-number .onemrva-text-enterprise-number{padding-left:12px!important;vertical-align:middle}.onemrva-input-enterprise-number .mat-mdc-form-field-text-prefix mat-select{line-height:14px!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i2.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: FlagIconComponent, selector: "flag-icon", inputs: ["countryCode", "mode", "width"] }, { kind: "ngmodule", type: MatSelectSearchModule }, { kind: "component", type: i4.MatSelectSearchComponent, selector: "mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
144
144
  }
145
145
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputEnterpriseNumberComponent, decorators: [{
146
146
  type: Component,
@@ -153,7 +153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
153
153
  TranslateModule,
154
154
  FlagIconComponent,
155
155
  MatSelectSearchModule,
156
- ], encapsulation: ViewEncapsulation.None, template: "<ng-container>\n <mat-form-field class=\"onemrva-input-enterprise-number\">\n <mat-label>{{ label }}</mat-label>\n <input\n (click)=\"handleClick($event)\"\n type=\"text\"\n matInput\n #numberInput\n placeholder=\"\"\n [formControl]=\"enterpriseNumber\"\n class=\"onemrva-text-enterprise-number\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />&nbsp;&nbsp;{{\n country.name\n }}\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n", styles: [".onemrva-input-enterprise-number mat-select{padding:0 0 0 8px}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder{width:1em!important;display:block!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder:before{width:1em!important;height:1em!important;background:#eee!important;visibility:visible!important;margin:10px 0!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-value{padding-right:8px}.onemrva-input-enterprise-number .onemrva-text-enterprise-number{padding-left:12px!important;vertical-align:middle}.onemrva-input-enterprise-number .mat-mdc-form-field-text-prefix mat-select{line-height:14px!important}\n"] }]
156
+ ], encapsulation: ViewEncapsulation.None, template: "<ng-container>\n <mat-form-field class=\"onemrva-input-enterprise-number\">\n <mat-label>{{ label }}</mat-label>\n <input\n (click)=\"handleClick($event)\"\n type=\"text\"\n matInput\n #numberInput\n placeholder=\"\"\n [formControl]=\"enterpriseNumber\"\n class=\"onemrva-text-enterprise-number\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />&nbsp;&nbsp;{{\n country.name\n }}\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n", styles: [".onemrva-input-enterprise-number .mdc-text-field--disabled mat-select .mat-mdc-select-arrow{opacity:.5}.onemrva-input-enterprise-number mat-select{padding:0 0 0 8px}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder{width:1em!important;display:block!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-placeholder:before{width:1em!important;height:1em!important;background:#eee!important;visibility:visible!important;margin:10px 0!important}.onemrva-input-enterprise-number mat-select .mat-mdc-select-value{padding-right:8px}.onemrva-input-enterprise-number .onemrva-text-enterprise-number{padding-left:12px!important;vertical-align:middle}.onemrva-input-enterprise-number .mat-mdc-form-field-text-prefix mat-select{line-height:14px!important}\n"] }]
157
157
  }], ctorParameters: () => [], propDecorators: { readonly: [{
158
158
  type: Input
159
159
  }], enterpriseNumber: [{
@@ -1 +1 @@
1
- {"version":3,"file":"onemrvapublic-design-system-mat-input-enterprise-number.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.ts","../../../../projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.html","../../../../projects/onemrva/design-system/mat-input-enterprise-number/index.ts","../../../../projects/onemrva/design-system/mat-input-enterprise-number/onemrvapublic-design-system-mat-input-enterprise-number.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule } from '@ngx-translate/core';\nimport {\n combineLatestWith,\n debounceTime,\n map,\n Observable,\n startWith,\n Subject,\n takeUntil,\n zip,\n} from 'rxjs';\nimport { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';\nimport {\n OnemRvaCDNCountryService,\n OnemrvaMaterialCountry,\n} from '@onemrvapublic/design-system/shared';\nimport { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';\n\n@Component({\n selector: 'onemrva-mat-input-enterprise-number',\n styleUrls: ['onemrva-mat-input-enterprise-number.component.scss'],\n templateUrl: 'onemrva-mat-input-enterprise-number.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n ReactiveFormsModule,\n TranslateModule,\n FlagIconComponent,\n MatSelectSearchModule,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputEnterpriseNumberComponent\n implements OnInit, OnDestroy\n{\n @Input()\n readonly = false;\n\n @Input() enterpriseNumber!: FormControl;\n @Input() label = 'VIES';\n @Input() noEntriesFoundLabel = 'Not found';\n @Input() placeholderLabel = 'Search';\n @Input() defaultCountry = 'BE';\n @Input() searchAriaLabel = '';\n @Input() hint = '';\n @Output() getCountry = new EventEmitter<any>();\n @ViewChild('numberInput') numberInput!: ElementRef;\n\n countryCode: FormControl = new FormControl('');\n\n public filterCtrl: FormControl<string | null> = new FormControl<string>('');\n\n destroyNotifier$ = new Subject<void>();\n\n private readonly cdn = inject(OnemRvaCDNCountryService);\n public countries$: Observable<OnemrvaMaterialCountry[]> =\n this.cdn.getCountriesByZone('EU');\n public filteredCountries$: Observable<OnemrvaMaterialCountry[]>;\n\n constructor() {\n this.filteredCountries$ = this.filterCtrl.valueChanges.pipe(\n debounceTime(400),\n startWith<string | null>(''), // ✅ Explicitly define type\n combineLatestWith(this.countries$),\n map(([search, countries]: [string | null, OnemrvaMaterialCountry[]]) => {\n // ✅ Explicit Tuple Types\n return countries.filter((country: OnemrvaMaterialCountry) => {\n if (!search || search.trim() === '') return true;\n return country.name?.toLowerCase().includes(search.toLowerCase());\n });\n }),\n );\n }\n\n get number(): FormControl {\n return this.enterpriseNumber as FormControl;\n }\n\n setCode(country: OnemrvaMaterialCountry | null) {\n this.clearValidators();\n if (country) {\n this.countryCode.setValue(country.code);\n this.formatEnterpriseNumber(country);\n }\n }\n\n ngOnInit(): void {\n this.number.valueChanges\n .pipe(\n startWith(this.number.getRawValue()),\n takeUntil(this.destroyNotifier$),\n )\n .subscribe(number => {\n if (number === '0') {\n this.cdn\n .findCountryFromCode(this.defaultCountry)\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(country => {\n if (country) {\n number = country.pattern.substring(0, 2) + number;\n this.number.setValue(number, { emitEvent: false });\n this.countryCode.setValue(country.code);\n } else {\n this.countryCode.setValue('');\n }\n });\n } else {\n if (number.length > 1) {\n this.cdn\n .findCountryFromVIESCode(number)\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(country => {\n if (country) {\n this.countryCode.setValue(country.code);\n }\n });\n }\n }\n });\n\n this.countryCode.valueChanges\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(value => {\n let number = this.number.getRawValue();\n zip(\n this.cdn.findCountryFromVIESCode(number),\n this.cdn.findCountryFromCode(value),\n ).subscribe(([countryFromVies, countryFromCode]) => {\n if (countryFromVies) {\n number = number.replace(\n countryFromVies.pattern.substring(0, 2),\n '',\n );\n }\n if (countryFromCode) {\n this.getCountry.next(countryFromCode);\n number = countryFromCode.pattern.substring(0, 2) + number;\n //this.formatEnterpriseNumber(countryFromCode); /// done twice ?\n }\n this.number.setValue(number, { emitEvent: false });\n this.formatEnterpriseNumber(countryFromCode);\n setTimeout(() => {\n this.numberInput.nativeElement.focus();\n }, 100);\n });\n });\n }\n\n clearValidators() {\n let required = false;\n if (this.number.hasValidator(Validators.required)) {\n required = true;\n }\n this.number.clearValidators();\n if (required) {\n this.number.addValidators(Validators.required);\n }\n }\n\n formatEnterpriseNumber(country: OnemrvaMaterialCountry | undefined) {\n this.clearValidators();\n if (this.countryCode.getRawValue() !== '' && country) {\n this.enterpriseNumber.addValidators(\n Validators.pattern(new RegExp(country.pattern)),\n );\n }\n }\n\n ngOnDestroy() {\n this.destroyNotifier$.next();\n this.destroyNotifier$.complete();\n }\n\n handleClick(e: any) {\n e.stopPropagation();\n }\n\n errors() {\n for (const k in this.number.errors) {\n if (k === 'required') {\n return 'input.vies.required';\n } else {\n return 'input.vies.invalid';\n }\n }\n return 'input.vies.unknown.error';\n }\n}\n","<ng-container>\n <mat-form-field class=\"onemrva-input-enterprise-number\">\n <mat-label>{{ label }}</mat-label>\n <input\n (click)=\"handleClick($event)\"\n type=\"text\"\n matInput\n #numberInput\n placeholder=\"\"\n [formControl]=\"enterpriseNumber\"\n class=\"onemrva-text-enterprise-number\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />&nbsp;&nbsp;{{\n country.name\n }}\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-mat-input-enterprise-number.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAoDa,wCAAwC,CAAA;AA2BnD,IAAA,WAAA,GAAA;QAvBA,IAAA,CAAA,QAAQ,GAAG,KAAK;QAGP,IAAA,CAAA,KAAK,GAAG,MAAM;QACd,IAAA,CAAA,mBAAmB,GAAG,WAAW;QACjC,IAAA,CAAA,gBAAgB,GAAG,QAAQ;QAC3B,IAAA,CAAA,cAAc,GAAG,IAAI;QACrB,IAAA,CAAA,eAAe,GAAG,EAAE;QACpB,IAAA,CAAA,IAAI,GAAG,EAAE;AACR,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAO;AAG9C,QAAA,IAAA,CAAA,W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AI,EAAA,QAAA,EAAA,m2CAAA,EAAA,MAAA,EAAA,CAAA,2qBAAA,CAAA,EAAA;wDAMrC,QAAQ,EAAA,CAAA;sBADP;gBAGQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,cAAc,EAAA,CAAA;sBAAtB;gBACQ,eAAe,EAAA,CAAA;sBAAvB;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACyB,WAAW,EAAA,CAAA;sBAApC,SAAS;uBAAC,aAAa;;;AElE1B;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-input-enterprise-number.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.ts","../../../../projects/onemrva/design-system/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.html","../../../../projects/onemrva/design-system/mat-input-enterprise-number/index.ts","../../../../projects/onemrva/design-system/mat-input-enterprise-number/onemrvapublic-design-system-mat-input-enterprise-number.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule } from '@ngx-translate/core';\nimport {\n combineLatestWith,\n debounceTime,\n map,\n Observable,\n startWith,\n Subject,\n takeUntil,\n zip,\n} from 'rxjs';\nimport { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';\nimport {\n OnemRvaCDNCountryService,\n OnemrvaMaterialCountry,\n} from '@onemrvapublic/design-system/shared';\nimport { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';\n\n@Component({\n selector: 'onemrva-mat-input-enterprise-number',\n styleUrls: ['onemrva-mat-input-enterprise-number.component.scss'],\n templateUrl: 'onemrva-mat-input-enterprise-number.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n ReactiveFormsModule,\n TranslateModule,\n FlagIconComponent,\n MatSelectSearchModule,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputEnterpriseNumberComponent\n implements OnInit, OnDestroy\n{\n @Input()\n readonly = false;\n\n @Input() enterpriseNumber!: FormControl;\n @Input() label = 'VIES';\n @Input() noEntriesFoundLabel = 'Not found';\n @Input() placeholderLabel = 'Search';\n @Input() defaultCountry = 'BE';\n @Input() searchAriaLabel = '';\n @Input() hint = '';\n @Output() getCountry = new EventEmitter<any>();\n @ViewChild('numberInput') numberInput!: ElementRef;\n\n countryCode: FormControl = new FormControl('');\n\n public filterCtrl: FormControl<string | null> = new FormControl<string>('');\n\n destroyNotifier$ = new Subject<void>();\n\n private readonly cdn = inject(OnemRvaCDNCountryService);\n public countries$: Observable<OnemrvaMaterialCountry[]> =\n this.cdn.getCountriesByZone('EU');\n public filteredCountries$: Observable<OnemrvaMaterialCountry[]>;\n\n constructor() {\n this.filteredCountries$ = this.filterCtrl.valueChanges.pipe(\n debounceTime(400),\n startWith<string | null>(''), // ✅ Explicitly define type\n combineLatestWith(this.countries$),\n map(([search, countries]: [string | null, OnemrvaMaterialCountry[]]) => {\n // ✅ Explicit Tuple Types\n return countries.filter((country: OnemrvaMaterialCountry) => {\n if (!search || search.trim() === '') return true;\n return country.name?.toLowerCase().includes(search.toLowerCase());\n });\n }),\n );\n }\n\n get number(): FormControl {\n return this.enterpriseNumber as FormControl;\n }\n\n setCode(country: OnemrvaMaterialCountry | null) {\n this.clearValidators();\n if (country) {\n this.countryCode.setValue(country.code);\n this.formatEnterpriseNumber(country);\n }\n }\n\n ngOnInit(): void {\n this.number.valueChanges\n .pipe(\n startWith(this.number.getRawValue()),\n takeUntil(this.destroyNotifier$),\n )\n .subscribe(number => {\n if (number === '0') {\n this.cdn\n .findCountryFromCode(this.defaultCountry)\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(country => {\n if (country) {\n number = country.pattern.substring(0, 2) + number;\n this.number.setValue(number, { emitEvent: false });\n this.countryCode.setValue(country.code);\n } else {\n this.countryCode.setValue('');\n }\n });\n } else {\n if (number.length > 1) {\n this.cdn\n .findCountryFromVIESCode(number)\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(country => {\n if (country) {\n this.countryCode.setValue(country.code);\n }\n });\n }\n }\n });\n\n this.countryCode.valueChanges\n .pipe(takeUntil(this.destroyNotifier$))\n .subscribe(value => {\n let number = this.number.getRawValue();\n zip(\n this.cdn.findCountryFromVIESCode(number),\n this.cdn.findCountryFromCode(value),\n ).subscribe(([countryFromVies, countryFromCode]) => {\n if (countryFromVies) {\n number = number.replace(\n countryFromVies.pattern.substring(0, 2),\n '',\n );\n }\n if (countryFromCode) {\n this.getCountry.next(countryFromCode);\n number = countryFromCode.pattern.substring(0, 2) + number;\n //this.formatEnterpriseNumber(countryFromCode); /// done twice ?\n }\n this.number.setValue(number, { emitEvent: false });\n this.formatEnterpriseNumber(countryFromCode);\n setTimeout(() => {\n this.numberInput.nativeElement.focus();\n }, 100);\n });\n });\n }\n\n clearValidators() {\n let required = false;\n if (this.number.hasValidator(Validators.required)) {\n required = true;\n }\n this.number.clearValidators();\n if (required) {\n this.number.addValidators(Validators.required);\n }\n }\n\n formatEnterpriseNumber(country: OnemrvaMaterialCountry | undefined) {\n this.clearValidators();\n if (this.countryCode.getRawValue() !== '' && country) {\n this.enterpriseNumber.addValidators(\n Validators.pattern(new RegExp(country.pattern)),\n );\n }\n }\n\n ngOnDestroy() {\n this.destroyNotifier$.next();\n this.destroyNotifier$.complete();\n }\n\n handleClick(e: any) {\n e.stopPropagation();\n }\n\n errors() {\n for (const k in this.number.errors) {\n if (k === 'required') {\n return 'input.vies.required';\n } else {\n return 'input.vies.invalid';\n }\n }\n return 'input.vies.unknown.error';\n }\n}\n","<ng-container>\n <mat-form-field class=\"onemrva-input-enterprise-number\">\n <mat-label>{{ label }}</mat-label>\n <input\n (click)=\"handleClick($event)\"\n type=\"text\"\n matInput\n #numberInput\n placeholder=\"\"\n [formControl]=\"enterpriseNumber\"\n class=\"onemrva-text-enterprise-number\"\n />\n <mat-select\n matTextPrefix\n class=\"onemrva-phone-number-select\"\n [formControl]=\"countryCode\"\n >\n <mat-select-trigger>\n <flag-icon [countryCode]=\"countryCode.getRawValue()\" />\n </mat-select-trigger>\n\n <mat-option>\n <mat-select-search\n [formControl]=\"filterCtrl\"\n [ariaLabel]=\"searchAriaLabel\"\n [noEntriesFoundLabel]=\"noEntriesFoundLabel\"\n [placeholderLabel]=\"placeholderLabel\"\n ></mat-select-search>\n </mat-option>\n\n @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country.code\">\n <flag-icon [countryCode]=\"country.code\" />&nbsp;&nbsp;{{\n country.name\n }}\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (number.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n </mat-form-field>\n</ng-container>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-mat-input-enterprise-number.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAoDa,wCAAwC,CAAA;AA2BnD,IAAA,WAAA,GAAA;QAvBA,IAAA,CAAA,QAAQ,GAAG,KAAK;QAGP,IAAA,CAAA,KAAK,GAAG,MAAM;QACd,IAAA,CAAA,mBAAmB,GAAG,WAAW;QACjC,IAAA,CAAA,gBAAgB,GAAG,QAAQ;QAC3B,IAAA,CAAA,cAAc,GAAG,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,EACP;wBACP,YAAY;wBACZ,cAAc;wBACd,kBAAkB;wBAClB,eAAe;wBACf,mBAAmB;wBACnB,eAAe;wBACf,iBAAiB;wBACjB,qBAAqB;qBACtB,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,m2CAAA,EAAA,MAAA,EAAA,CAAA,kxBAAA,CAAA,EAAA;wDAMrC,QAAQ,EAAA,CAAA;sBADP;gBAGQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,cAAc,EAAA,CAAA;sBAAtB;gBACQ,eAAe,EAAA,CAAA;sBAAvB;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACyB,WAAW,EAAA,CAAA;sBAApC,SAAS;uBAAC,aAAa;;;AElE1B;;AAEG;;ACFH;;AAEG;;;;"}
@@ -10,6 +10,7 @@ import { NgClass, AsyncPipe } from '@angular/common';
10
10
  import { MatIcon } from '@angular/material/icon';
11
11
  import * as i2 from '@angular/material/select';
12
12
  import { MatSelectModule } from '@angular/material/select';
13
+ import { MatSelectSearchComponent } from '@onemrvapublic/design-system/mat-select-search';
13
14
 
14
15
  let NEXT_ID = 0;
15
16
  class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
@@ -150,7 +151,7 @@ class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
150
151
  useExisting: forwardRef(() => OnemrvaMatMultiSelectComponent),
151
152
  multi: true,
152
153
  },
153
- ], queries: [{ propertyName: "matOptions", predicate: MatOption }], usesInheritance: true, ngImport: i0, template: "<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"'select.select.placeholder' | translate\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [ngClass]=\"{ 'mat-disabled': isAllSelected() }\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\">&nbsp;&nbsp;|&nbsp;&nbsp;</span>\n <a\n tabindex=\"2\"\n [ngClass]=\"{ 'mat-disabled': isNoneSelected() }\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n <!-- @if (showFilter) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n ></mat-select-search>\n </mat-option>\n } -->\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n", styles: [":host{display:inline-block;width:100%}:host .mat-select-counter{top:var(--spacer);right:var(--triple-spacer);display:block;padding:var(--quarter-spacer) var(--half-spacer) var(--quarter-spacer) var(--spacer);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);min-width:var(--triple-spacer);font-family:var(--brand-font);border:1px solid var(--mat-sys-primary);border-radius:var(--button-border-radius)}:host .mat-select-counter span.text{font-family:var(--sys-label-large-font);font-style:normal;font-weight:500;font-size:.75rem;line-height:1.25rem}:host .mat-select-counter mat-icon{font-size:.75rem;height:.75rem;width:.75rem;line-height:1rem;padding:0 var(--quarter-spacer) 0 var(--quarter-spacer);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
154
+ ], queries: [{ propertyName: "matOptions", predicate: MatOption }], usesInheritance: true, ngImport: i0, template: "<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"'select.select.placeholder' | translate\"\n [disabled]=\"disabled\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [ngClass]=\"{ 'mat-disabled': isAllSelected() }\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\">&nbsp;&nbsp;|&nbsp;&nbsp;</span>\n <a\n tabindex=\"2\"\n [ngClass]=\"{ 'mat-disabled': isNoneSelected() }\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n @if (showFilter) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n ></mat-select-search>\n </mat-option>\n }\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n", styles: [":host{display:inline-block;width:100%}:host .mat-select-counter{top:var(--spacer);right:var(--triple-spacer);display:block;padding:var(--quarter-spacer) var(--half-spacer) var(--quarter-spacer) var(--spacer);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);min-width:var(--triple-spacer);font-family:var(--brand-font);border:1px solid var(--mat-sys-primary);border-radius:var(--button-border-radius)}:host .mat-select-counter span.text{font-family:var(--sys-label-large-font);font-style:normal;font-weight:500;font-size:.75rem;line-height:1.25rem}:host .mat-select-counter mat-icon{font-size:.75rem;height:.75rem;width:.75rem;line-height:1rem;padding:0 var(--quarter-spacer) 0 var(--quarter-spacer);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatSelectSearchComponent, selector: "mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
154
155
  }
155
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatMultiSelectComponent, decorators: [{
156
157
  type: Component,
@@ -172,7 +173,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
172
173
  MatSelectModule,
173
174
  AsyncPipe,
174
175
  MatIcon,
175
- ], standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"'select.select.placeholder' | translate\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [ngClass]=\"{ 'mat-disabled': isAllSelected() }\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\">&nbsp;&nbsp;|&nbsp;&nbsp;</span>\n <a\n tabindex=\"2\"\n [ngClass]=\"{ 'mat-disabled': isNoneSelected() }\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n <!-- @if (showFilter) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n ></mat-select-search>\n </mat-option>\n } -->\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n", styles: [":host{display:inline-block;width:100%}:host .mat-select-counter{top:var(--spacer);right:var(--triple-spacer);display:block;padding:var(--quarter-spacer) var(--half-spacer) var(--quarter-spacer) var(--spacer);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);min-width:var(--triple-spacer);font-family:var(--brand-font);border:1px solid var(--mat-sys-primary);border-radius:var(--button-border-radius)}:host .mat-select-counter span.text{font-family:var(--sys-label-large-font);font-style:normal;font-weight:500;font-size:.75rem;line-height:1.25rem}:host .mat-select-counter mat-icon{font-size:.75rem;height:.75rem;width:.75rem;line-height:1rem;padding:0 var(--quarter-spacer) 0 var(--quarter-spacer);cursor:pointer}\n"] }]
176
+ MatSelectSearchComponent,
177
+ ], standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"'select.select.placeholder' | translate\"\n [disabled]=\"disabled\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [ngClass]=\"{ 'mat-disabled': isAllSelected() }\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\">&nbsp;&nbsp;|&nbsp;&nbsp;</span>\n <a\n tabindex=\"2\"\n [ngClass]=\"{ 'mat-disabled': isNoneSelected() }\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n @if (showFilter) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n ></mat-select-search>\n </mat-option>\n }\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n", styles: [":host{display:inline-block;width:100%}:host .mat-select-counter{top:var(--spacer);right:var(--triple-spacer);display:block;padding:var(--quarter-spacer) var(--half-spacer) var(--quarter-spacer) var(--spacer);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);min-width:var(--triple-spacer);font-family:var(--brand-font);border:1px solid var(--mat-sys-primary);border-radius:var(--button-border-radius)}:host .mat-select-counter span.text{font-family:var(--sys-label-large-font);font-style:normal;font-weight:500;font-size:.75rem;line-height:1.25rem}:host .mat-select-counter mat-icon{font-size:.75rem;height:.75rem;width:.75rem;line-height:1rem;padding:0 var(--quarter-spacer) 0 var(--quarter-spacer);cursor:pointer}\n"] }]
176
178
  }], ctorParameters: () => [], propDecorators: { multiple: [{
177
179
  type: Input
178
180
  }], formControl: [{
@@ -1 +1 @@
1
- {"version":3,"file":"onemrvapublic-design-system-mat-multi-select.mjs","sources":["../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.ts","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.html","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.module.ts","../../../../projects/onemrva/design-system/mat-multi-select/onemrvapublic-design-system-mat-multi-select.ts"],"sourcesContent":["import {\n AfterContentChecked,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n forwardRef,\n HostBinding,\n inject,\n Input,\n OnDestroy,\n OnInit,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { MatOption } from '@angular/material/core';\nimport {\n debounceTime,\n map,\n Observable,\n startWith,\n Subject,\n takeUntil,\n} from 'rxjs';\nimport { AsyncPipe, NgClass } from '@angular/common';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatSelectModule } from '@angular/material/select';\n\nlet NEXT_ID = 0;\n\n@Component({\n selector: 'onemrva-mat-multi-select',\n templateUrl: 'onemrva-mat-multi-select.component.html',\n styleUrl: 'onemrva-mat-multi-select.component.scss',\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: OnemrvaMatMultiSelectComponent,\n multi: false,\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OnemrvaMatMultiSelectComponent),\n multi: true,\n },\n ],\n imports: [\n NgClass,\n TranslatePipe,\n ReactiveFormsModule,\n MatSelectModule,\n AsyncPipe,\n MatIcon,\n ],\n standalone: true,\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class OnemrvaMatMultiSelectComponent\n extends MatFormFieldControl<any>\n implements OnInit, OnDestroy, AfterContentChecked\n{\n counter = 0;\n _values: any[] = [];\n public override stateChanges = new Subject<void>();\n\n @Input()\n multiple = true;\n\n @Input()\n formControl!: FormControl;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.role')\n public role = 'select';\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.aria-label')\n public label = '';\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.aria-invalid')\n public invalid = false;\n\n @Input()\n showFilter = true;\n\n @Input()\n selectionToggle = true;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.data-cy')\n public dataCy = `onemrva-mat-multi-select-${NEXT_ID++}`;\n\n searchFilter: FormControl = new FormControl<string>('');\n\n @ContentChildren(MatOption)\n matOptions: QueryList<MatOption> = new QueryList<MatOption>();\n matOptions$?: Observable<MatOption<any>[]>;\n onDestroy$: Subject<any> = new Subject<any>();\n\n @HostBinding('style.opacity')\n get opacity() {\n return this.disabled ? 0.25 : 1;\n }\n\n override focused = false;\n\n onFocus() {\n this.focused = true;\n this.stateChanges.next();\n }\n\n onBlur() {\n this.focused = false;\n this.stateChanges.next();\n }\n\n translate = inject(TranslateService);\n cd = inject(ChangeDetectorRef);\n\n constructor() {\n super();\n setTimeout(() => {\n this.focused = false;\n }, 3000);\n }\n\n // Function to call when the rating changes.\n onChange = (_values: any[]) => {\n //\n };\n\n // Function to call when the input is touched (when a star is clicked).\n onTouched = () => {\n //\n };\n\n // Allows Angular to update the model (rating).\n // Update the model and changes needed for the view here.\n writeValue(values: any[] | any | undefined | null): void {\n if (this.multiple) {\n this.counter = 0;\n if (Array.isArray(values)) this.counter = values.length;\n //else if (Array.isArray(this._values)) this.counter = this._values.length;\n }\n this._values = values;\n this.onChange(this._values);\n }\n\n // Allows Angular to register a function to call when the model (rating) changes.\n // Save the function as a property to call later here.\n registerOnChange(fn: (value: any[]) => void): void {\n this.onChange = fn;\n }\n\n // Allows Angular to register a function to call when the input has been touched.\n // Save the function as a property to call later here.\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n isAllSelected() {\n return this.counter === this.matOptions.length;\n }\n\n selectAll() {\n this._values = this.matOptions.map(option => {\n return option.value;\n });\n this.formControl.setValue(this._values);\n }\n\n isNoneSelected() {\n return this.counter === 0;\n }\n\n deselectAll(_$event: MouseEvent) {\n this._values = [];\n this.formControl.setValue(this._values);\n }\n\n onContainerClick(_event: MouseEvent): void {\n //\n }\n\n setDescribedByIds(_ids: string[]): void {\n //\n }\n\n ngOnDestroy(): void {\n this.onDestroy$.next('');\n this.onDestroy$.complete();\n }\n\n optionSize = 0;\n\n ngOnInit(): void {\n this.matOptions$ = this.searchFilter.valueChanges.pipe(\n debounceTime(200),\n startWith(''),\n map((value: string) => {\n this.optionSize = this.matOptions.length;\n if (this._values !== null) {\n this.counter = this._values.length;\n }\n if (value === '') {\n return this.matOptions.filter(_o => {\n return true;\n });\n }\n return this.matOptions.filter(option => {\n return option?._text?.nativeElement.innerHTML\n .toLowerCase()\n .includes(value.toLowerCase());\n });\n }),\n );\n this.formControl.valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe(values => {\n this._values = values;\n this.counter = this._values.length;\n });\n }\n\n ngAfterContentChecked(): void {\n if (this.matOptions.length !== this.optionSize) {\n this.optionSize = this.matOptions.length;\n this.counter = 0;\n this.searchFilter.updateValueAndValidity({ emitEvent: true });\n }\n }\n}\n","<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"'select.select.placeholder' | translate\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [ngClass]=\"{ 'mat-disabled': isAllSelected() }\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\">&nbsp;&nbsp;|&nbsp;&nbsp;</span>\n <a\n tabindex=\"2\"\n [ngClass]=\"{ 'mat-disabled': isNoneSelected() }\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n <!-- @if (showFilter) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n ></mat-select-search>\n </mat-option>\n } -->\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { OnemrvaMatMultiSelectComponent } from './onemrva-mat-multi-select.component';\n\n@NgModule({\n declarations: [],\n imports: [OnemrvaMatMultiSelectComponent],\n exports: [],\n})\nexport class OnemrvaMatMultiSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAkCA,IAAI,OAAO,GAAG,CAAC;AA6BT,MAAO,8BACX,SAAQ,mBAAwB,CAAA;AA0ChC,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC;;IAKjC,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;;IAG1B,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACpB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;;AAM1B,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QA5DT,IAAA,CAAA,OAAO,GAAG,CAAC;QACX,IAAA,CAAA,OAAO,GAAU,EAAE;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAGlD,IAAA,CAAA,QAAQ,GAAG,IAAI;;QAOR,IAAA,CAAA,IAAI,GAAG,QAAQ;;QAIf,IAAA,CAAA,KAAK,GAAG,EAAE;;QAIV,IAAA,CAAA,OAAO,GAAG,KAAK;QAGtB,IAAA,CAAA,UAAU,GAAG,IAAI;QAGjB,IAAA,CAAA,eAAe,GAAG,IAAI;;AAIf,QAAA,IAAA,CAAA,MAAM,GAAG,CAAA,yBAAA,EAA4B,OAAO,EAAE,EAAE;AAEvD,QAAA,IAAA,CAAA,YAAY,GAAgB,IAAI,WAAW,CAAS,EAAE,CAAC;AAGvD,QAAA,IAAA,CAAA,UAAU,G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,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAH5B,8BAA8B,CAAA,EAAA,CAAA,CAAA;;2FAG7B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBALvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,8BAA8B,CAAC;AACzC,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-multi-select.mjs","sources":["../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.ts","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.html","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.module.ts","../../../../projects/onemrva/design-system/mat-multi-select/onemrvapublic-design-system-mat-multi-select.ts"],"sourcesContent":["import {\n AfterContentChecked,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n forwardRef,\n HostBinding,\n inject,\n Input,\n OnDestroy,\n OnInit,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { MatOption } from '@angular/material/core';\nimport {\n debounceTime,\n map,\n Observable,\n startWith,\n Subject,\n takeUntil,\n} from 'rxjs';\nimport { AsyncPipe, NgClass } from '@angular/common';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatSelectSearchComponent } from '@onemrvapublic/design-system/mat-select-search';\n\nlet NEXT_ID = 0;\n\n@Component({\n selector: 'onemrva-mat-multi-select',\n templateUrl: 'onemrva-mat-multi-select.component.html',\n styleUrl: 'onemrva-mat-multi-select.component.scss',\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: OnemrvaMatMultiSelectComponent,\n multi: false,\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OnemrvaMatMultiSelectComponent),\n multi: true,\n },\n ],\n imports: [\n NgClass,\n TranslatePipe,\n ReactiveFormsModule,\n MatSelectModule,\n AsyncPipe,\n MatIcon,\n MatSelectSearchComponent,\n ],\n standalone: true,\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class OnemrvaMatMultiSelectComponent\n extends MatFormFieldControl<any>\n implements OnInit, OnDestroy, AfterContentChecked\n{\n counter = 0;\n _values: any[] = [];\n public override stateChanges = new Subject<void>();\n\n @Input()\n multiple = true;\n\n @Input()\n formControl!: FormControl;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.role')\n public role = 'select';\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.aria-label')\n public label = '';\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.aria-invalid')\n public invalid = false;\n\n @Input()\n showFilter = true;\n\n @Input()\n selectionToggle = true;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.data-cy')\n public dataCy = `onemrva-mat-multi-select-${NEXT_ID++}`;\n\n searchFilter: FormControl = new FormControl<string>('');\n\n @ContentChildren(MatOption)\n matOptions: QueryList<MatOption> = new QueryList<MatOption>();\n matOptions$?: Observable<MatOption<any>[]>;\n onDestroy$: Subject<any> = new Subject<any>();\n\n @HostBinding('style.opacity')\n get opacity() {\n return this.disabled ? 0.25 : 1;\n }\n\n override focused = false;\n\n onFocus() {\n this.focused = true;\n this.stateChanges.next();\n }\n\n onBlur() {\n this.focused = false;\n this.stateChanges.next();\n }\n\n translate = inject(TranslateService);\n cd = inject(ChangeDetectorRef);\n\n constructor() {\n super();\n setTimeout(() => {\n this.focused = false;\n }, 3000);\n }\n\n // Function to call when the rating changes.\n onChange = (_values: any[]) => {\n //\n };\n\n // Function to call when the input is touched (when a star is clicked).\n onTouched = () => {\n //\n };\n\n // Allows Angular to update the model (rating).\n // Update the model and changes needed for the view here.\n writeValue(values: any[] | any | undefined | null): void {\n if (this.multiple) {\n this.counter = 0;\n if (Array.isArray(values)) this.counter = values.length;\n //else if (Array.isArray(this._values)) this.counter = this._values.length;\n }\n this._values = values;\n this.onChange(this._values);\n }\n\n // Allows Angular to register a function to call when the model (rating) changes.\n // Save the function as a property to call later here.\n registerOnChange(fn: (value: any[]) => void): void {\n this.onChange = fn;\n }\n\n // Allows Angular to register a function to call when the input has been touched.\n // Save the function as a property to call later here.\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n isAllSelected() {\n return this.counter === this.matOptions.length;\n }\n\n selectAll() {\n this._values = this.matOptions.map(option => {\n return option.value;\n });\n this.formControl.setValue(this._values);\n }\n\n isNoneSelected() {\n return this.counter === 0;\n }\n\n deselectAll(_$event: MouseEvent) {\n this._values = [];\n this.formControl.setValue(this._values);\n }\n\n onContainerClick(_event: MouseEvent): void {\n //\n }\n\n setDescribedByIds(_ids: string[]): void {\n //\n }\n\n ngOnDestroy(): void {\n this.onDestroy$.next('');\n this.onDestroy$.complete();\n }\n\n optionSize = 0;\n\n ngOnInit(): void {\n this.matOptions$ = this.searchFilter.valueChanges.pipe(\n debounceTime(200),\n startWith(''),\n map((value: string) => {\n this.optionSize = this.matOptions.length;\n if (this._values !== null) {\n this.counter = this._values.length;\n }\n if (value === '') {\n return this.matOptions.filter(_o => {\n return true;\n });\n }\n return this.matOptions.filter(option => {\n return option?._text?.nativeElement.innerHTML\n .toLowerCase()\n .includes(value.toLowerCase());\n });\n }),\n );\n this.formControl.valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe(values => {\n this._values = values;\n this.counter = this._values.length;\n });\n }\n\n ngAfterContentChecked(): void {\n if (this.matOptions.length !== this.optionSize) {\n this.optionSize = this.matOptions.length;\n this.counter = 0;\n this.searchFilter.updateValueAndValidity({ emitEvent: true });\n }\n }\n}\n","<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"'select.select.placeholder' | translate\"\n [disabled]=\"disabled\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [ngClass]=\"{ 'mat-disabled': isAllSelected() }\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\">&nbsp;&nbsp;|&nbsp;&nbsp;</span>\n <a\n tabindex=\"2\"\n [ngClass]=\"{ 'mat-disabled': isNoneSelected() }\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n @if (showFilter) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n ></mat-select-search>\n </mat-option>\n }\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { OnemrvaMatMultiSelectComponent } from './onemrva-mat-multi-select.component';\n\n@NgModule({\n declarations: [],\n imports: [OnemrvaMatMultiSelectComponent],\n exports: [],\n})\nexport class OnemrvaMatMultiSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;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,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAH5B,8BAA8B,CAAA,EAAA,CAAA,CAAA;;2FAG7B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBALvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,8BAA8B,CAAC;AACzC,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Component, InjectionToken, Injectable, HostListener, Directive, HostBinding, Input, EventEmitter, Output, TemplateRef, ViewContainerRef, Renderer2, ComponentFactoryResolver, ContentChildren, Pipe, RendererFactory2, NgModule, ErrorHandler } from '@angular/core';
2
+ import { inject, ElementRef, Component, InjectionToken, Injectable, HostListener, Directive, HostBinding, Input, EventEmitter, Output, TemplateRef, ViewContainerRef, Renderer2, ComponentFactoryResolver, Pipe, RendererFactory2, NgModule, ErrorHandler } from '@angular/core';
3
3
  import * as i1 from '@angular/material/icon';
4
4
  import { MatIconModule } from '@angular/material/icon';
5
5
  import * as i2 from '@angular/material/tooltip';
@@ -10,7 +10,6 @@ import { Platform, _isTestEnvironment } from '@angular/cdk/platform';
10
10
  import { Subject, merge, NEVER, take, tap, catchError, startWith, switchMap, shareReplay, filter, finalize, of, forkJoin, ReplaySubject, skip, distinctUntilChanged, map as map$1, combineLatestWith, from, takeUntil } from 'rxjs';
11
11
  import { OnemrvaMatColor, OnemrvaMatSize } from '@onemrvapublic/design-system/utils';
12
12
  import { BreakpointObserver } from '@angular/cdk/layout';
13
- import { MatInput } from '@angular/material/input';
14
13
  import { catchError as catchError$1, map, startWith as startWith$1 } from 'rxjs/operators';
15
14
  import { HttpClient, HttpParams } from '@angular/common/http';
16
15
  import { __decorate } from 'tslib';
@@ -1074,27 +1073,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
1074
1073
  args: ['blur']
1075
1074
  }] } });
1076
1075
 
1077
- class ReadOnlyFormDirective {
1076
+ class OnemRvaReadonlyDirective {
1078
1077
  constructor() {
1079
- this.isReadOnly = true;
1078
+ this.readonly = true;
1080
1079
  }
1081
- ngAfterViewInit() {
1082
- this.matInputs.forEach(matFormField => {
1083
- matFormField.readonly = true;
1084
- });
1080
+ /** @hidden @internal */
1081
+ get isReadOnly() {
1082
+ return this.readonly;
1085
1083
  }
1086
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ReadOnlyFormDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1087
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: ReadOnlyFormDirective, isStandalone: true, selector: "form[onemrva-readonly], mat-form-field[onemrva-readonly]", host: { properties: { "class.onemrva-readonly": "this.isReadOnly" } }, queries: [{ propertyName: "matInputs", predicate: MatInput, descendants: true }], ngImport: i0 }); }
1084
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaReadonlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1085
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaReadonlyDirective, isStandalone: true, selector: "form[readonly], mat-checkbox[readonly], mat-form-field[readonly], onemrva-mat-input-phone[readonly],onemrva-mat-input-birthplace[readonly],onemrva-mat-input-country[readonly],onemrva-mat-input-enterprise-number[readonly]", inputs: { readonly: "readonly" }, host: { properties: { "class.onemrva-readonly": "this.isReadOnly" } }, ngImport: i0 }); }
1088
1086
  }
1089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ReadOnlyFormDirective, decorators: [{
1087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaReadonlyDirective, decorators: [{
1090
1088
  type: Directive,
1091
1089
  args: [{
1092
- selector: 'form[onemrva-readonly], mat-form-field[onemrva-readonly]',
1090
+ selector: 'form[readonly], ' +
1091
+ 'mat-checkbox[readonly], ' +
1092
+ 'mat-form-field[readonly], ' +
1093
+ 'onemrva-mat-input-phone[readonly],' +
1094
+ 'onemrva-mat-input-birthplace[readonly],' +
1095
+ 'onemrva-mat-input-country[readonly],' +
1096
+ 'onemrva-mat-input-enterprise-number[readonly]',
1093
1097
  standalone: true,
1094
1098
  }]
1095
- }], propDecorators: { matInputs: [{
1096
- type: ContentChildren,
1097
- args: [MatInput, { descendants: true }]
1099
+ }], propDecorators: { readonly: [{
1100
+ type: Input
1098
1101
  }], isReadOnly: [{
1099
1102
  type: HostBinding,
1100
1103
  args: ['class.onemrva-readonly']
@@ -1164,7 +1167,7 @@ const directives = [
1164
1167
  OnemRvaColorDirective,
1165
1168
  OnemrvaMaskDirective,
1166
1169
  OnemrvaDateFormatDirective,
1167
- ReadOnlyFormDirective,
1170
+ OnemRvaReadonlyDirective,
1168
1171
  ];
1169
1172
 
1170
1173
  /**
@@ -1759,7 +1762,7 @@ const bankAccountValidator = (allowEmptyCountry = true) => {
1759
1762
 
1760
1763
  class OnemrvaSharedModule {
1761
1764
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1762
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, imports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, ReadOnlyFormDirective], exports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, ReadOnlyFormDirective] }); }
1765
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, imports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, OnemRvaReadonlyDirective], exports: [DigitOnlyDirective, MatRowClickableDirective, OnemRvaClipboardDirective, OnemRvaIconRightDirective, IfWidthIsDirective, OnemRvaColorDirective, OnemrvaMaskDirective, OnemrvaDateFormatDirective, OnemRvaReadonlyDirective] }); }
1763
1766
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule }); }
1764
1767
  }
1765
1768
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaSharedModule, decorators: [{
@@ -2177,5 +2180,5 @@ function onemrvaThemeProvider() {
2177
2180
  * Generated bundle index. Do not edit.
2178
2181
  */
2179
2182
 
2180
- export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, CacheService, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, LOOKUP_COUNTRY_SERVICE_URL, LOOKUP_COUNTRY_URL, 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, ONEMRVA_THEME, ONEMRVA_THEME_CLASS, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemRvaOSMService, OnemRvaSizeDirective, OnemrvaBcePipe, OnemrvaDateFormatDirective, OnemrvaErrorHandler, OnemrvaLuxonDateAdapter, OnemrvaMaskDirective, OnemrvaMissingTranslationHandler, OnemrvaNativeDateAdapter, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, ReadOnlyFormDirective, RequestTimes, SEPA_ONLY_SUPPORTED_COUNTRIES, WebComponentOverlayContainer, bankAccountValidator, directives, onemrvaDateLuxonProvider, onemrvaDateLuxonYearMonthProvider, onemrvaDateNativeProvider, onemrvaDateNativeYearMonthProvider, onemrvaThemeProvider, setTranslationLanguage, setTranslationLanguageFromWO };
2183
+ export { CDNUrlModeOptions, CDN_URLS, CDN_URL_MODE, CacheService, ClipboardIconComponent, CommonCountryLookupService, DefaultStorage, DigitOnlyDirective, HttpRequestCache, IBAN_SUPPORTED_COUNTRIES, IfWidthIsDirective, LOOKUP_COUNTRY_SERVICE_URL, LOOKUP_COUNTRY_URL, 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, ONEMRVA_THEME, ONEMRVA_THEME_CLASS, OnemRvaCDNCountryService, OnemRvaCDNMimeService, OnemRvaCDNService, OnemRvaClipboardDirective, OnemRvaColorDirective, OnemRvaIconRightDirective, OnemRvaOSMService, OnemRvaReadonlyDirective, OnemRvaSizeDirective, OnemrvaBcePipe, OnemrvaDateFormatDirective, OnemrvaErrorHandler, OnemrvaLuxonDateAdapter, OnemrvaMaskDirective, OnemrvaMissingTranslationHandler, OnemrvaNativeDateAdapter, OnemrvaNissPipe, OnemrvaSharedModule, OnemrvaTranslateCDNLoader, OnemrvaTranslateHttpLoader, OnemrvaValidators, RequestTimes, SEPA_ONLY_SUPPORTED_COUNTRIES, WebComponentOverlayContainer, bankAccountValidator, directives, onemrvaDateLuxonProvider, onemrvaDateLuxonYearMonthProvider, onemrvaDateNativeProvider, onemrvaDateNativeYearMonthProvider, onemrvaThemeProvider, setTranslationLanguage, setTranslationLanguageFromWO };
2181
2184
  //# sourceMappingURL=onemrvapublic-design-system-shared.mjs.map