@onemrvapublic/design-system 20.3.0-develop.3 → 20.3.0-develop.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/fesm2022/onemrvapublic-design-system-layout.mjs +1 -1
  2. package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -1
  3. package/fesm2022/onemrvapublic-design-system-mat-address.mjs +52 -20
  4. package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -1
  5. package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs +9 -2
  6. package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs.map +1 -1
  7. package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +2 -2
  8. package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -1
  9. package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +2 -2
  10. package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -1
  11. package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +15 -31
  12. package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -1
  13. package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +18 -27
  14. package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -1
  15. package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +2 -2
  16. package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -1
  17. package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs +5 -3
  18. package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs.map +1 -1
  19. package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +2 -2
  20. package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -1
  21. package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs +2 -2
  22. package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs.map +1 -1
  23. package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs +2 -2
  24. package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs.map +1 -1
  25. package/fesm2022/onemrvapublic-design-system-mat-toast.mjs +1 -1
  26. package/fesm2022/onemrvapublic-design-system-mat-toast.mjs.map +1 -1
  27. package/fesm2022/onemrvapublic-design-system-shared.mjs +26 -20
  28. package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
  29. package/fesm2022/onemrvapublic-design-system.mjs +135 -113
  30. package/fesm2022/onemrvapublic-design-system.mjs.map +1 -1
  31. package/index.d.ts +48 -36
  32. package/mat-address/index.d.ts +18 -8
  33. package/mat-address/src/onemrva-address.scss +3 -39
  34. package/mat-avatar/src/onemrva-mat-avatar.component.scss +0 -2
  35. package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.scss +0 -2
  36. package/mat-choice-chip/index.d.ts +1 -0
  37. package/mat-country-item/src/onemrva-mat-country-item.component.scss +6 -0
  38. package/mat-input-birthplace/index.d.ts +9 -9
  39. package/mat-input-country/index.d.ts +12 -10
  40. package/mat-input-enterprise-number/src/onemrva-mat-input-enterprise-number.component.scss +7 -0
  41. package/mat-multi-select/index.d.ts +1 -1
  42. package/mat-multi-select/src/onemrva-mat-multi-select.component.scss +0 -2
  43. package/mat-notification/src/onemrva-mat-notification.component.scss +0 -2
  44. package/mat-selectable-box/src/onemrva-mat-selectable-box.component.scss +6 -1
  45. package/mat-sticker/src/onemrva-mat-sticker.component.scss +0 -2
  46. package/mat-task-list/src/onemrva-mat-task-list.component.scss +0 -4
  47. package/mat-toast/src/onemrva-mat-toast.component.scss +0 -2
  48. package/package.json +1 -1
  49. package/shared/index.d.ts +10 -11
  50. package/_utils.scss +0 -30
@@ -1 +1 @@
1
- {"version":3,"file":"onemrvapublic-design-system-mat-input-birthplace.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.ts","../../../../projects/onemrva/design-system/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.html","../../../../projects/onemrva/design-system/mat-input-birthplace/index.ts","../../../../projects/onemrva/design-system/mat-input-birthplace/onemrvapublic-design-system-mat-input-birthplace.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport {\n Observable,\n Subject,\n map,\n startWith,\n debounceTime,\n takeUntil,\n of,\n combineLatest,\n} from 'rxjs';\nimport { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';\nimport { CommonCountryLookupService } from '@onemrvapublic/design-system/shared';\nimport { OnemRvaCommonCountry } from '@onemrvapublic/design-system/shared';\nimport { OnemrvaCountryItemComponent } from '@onemrvapublic/design-system/mat-country-item';\n\n@Component({\n selector: 'onemrva-mat-input-birthplace',\n styleUrls: ['onemrva-mat-input-birthplace.component.scss'],\n templateUrl: 'onemrva-mat-input-birthplace.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatSelectSearchModule,\n ReactiveFormsModule,\n TranslateModule,\n OnemrvaCountryItemComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputBirthPlaceComponent implements OnInit, OnDestroy {\n @Input()\n readonly = false;\n\n @Input() countryCode = new FormControl<OnemRvaCommonCountry | null>(null);\n\n @Input() label = 'Country';\n @Input() noEntriesFoundLabel = 'Not found';\n @Input() hint = '';\n @Input() placeholderLabel = 'Search';\n @Input() searchAriaLabel = '';\n @Input() returnValue = 'object';\n @Output() getCountry = new EventEmitter<any>();\n\n selectedCountryName = signal<string | null>(null);\n selectedCountryCode = signal<string | null>(null);\n\n public filterCtrl: FormControl<string | null> = new FormControl<string>('');\n\n destroyNotifier$ = new Subject<void>();\n\n public filteredCountries$: Observable<OnemRvaCommonCountry[]> = of([]);\n\n private commonCountryLookupService = inject(CommonCountryLookupService);\n private translate = inject(TranslateService);\n private countries$ = this.commonCountryLookupService.getCountries();\n\n constructor() {\n this.filteredCountries$ = combineLatest([\n this.filterCtrl.valueChanges.pipe(startWith('')),\n this.countries$,\n ]).pipe(\n debounceTime(400),\n map(([search, countries]) => {\n return countries.filter((country: OnemRvaCommonCountry) => {\n if (!search || search === '') return true;\n // if (country.descNl === undefined) return false;\n return (\n country.descNl.toLowerCase().indexOf(search.toLowerCase()) > -1\n );\n });\n }),\n map(country =>\n country.sort((a, b) => {\n return a.descNl.localeCompare(b.descNl);\n }),\n ),\n );\n }\n\n getCountryName(country: OnemRvaCommonCountry): string | null {\n if (!country) return null;\n switch (this.translate.currentLang) {\n case 'nl':\n return country.descNl ?? '';\n default:\n case 'fr':\n return country.descFr ?? '';\n }\n }\n\n ngOnInit(): void {\n this.countryCode.valueChanges\n .pipe(startWith(this.countryCode.value), takeUntil(this.destroyNotifier$))\n .subscribe(country => {\n this.selectedCountryName.set(null);\n this.selectedCountryCode.set(null);\n\n if (country === null || country === undefined) return;\n const name = this.getCountryName(country);\n\n this.selectedCountryName.set(name);\n this.selectedCountryCode.set(\n country.singlePropertiesMap.codeSepa.toLowerCase(),\n );\n });\n }\n\n ngOnDestroy() {\n this.destroyNotifier$.next();\n this.destroyNotifier$.complete();\n }\n\n trackById(index: number, country: OnemRvaCommonCountry) {\n return country.code;\n }\n\n errors() {\n // if (this.countryCode.errors !== null) {\n // for (const k in this.countryCode.errors) {\n // if (k === 'required') {\n // return 'input.country.required';\n // } else {\n // return 'input.country.invalid';\n // }\n // }\n // }\n return 'input.country.unknown.error';\n }\n\n getValue(country: OnemRvaCommonCountry) {\n switch (this.returnValue) {\n case 'id':\n return country.id;\n case 'code':\n return country.code;\n default:\n case 'object':\n return country;\n }\n }\n}\n","<mat-form-field class=\"onemrva-input-country-common\">\n <mat-label>{{ label }}</mat-label>\n <mat-select\n class=\"onemrva-country-select-common\"\n [formControl]=\"countryCode\"\n [placeholder]=\"placeholderLabel\"\n >\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"selectedCountryCode()\"\n [countryName]=\"selectedCountryName()\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country\">\n <mat-country-item\n [countryCode]=\"country.singlePropertiesMap.codeSepa.toLowerCase()\"\n [countryName]=\"getCountryName(country)\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (countryCode.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-mat-input-birthplace.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAiDa,kCAAkC,CAAA;AA2B7C,IAAA,WAAA,GAAA;QAzBA,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEP,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,WAAW,CAA8B,IAAI,CAAC;QAEhE,IAAA,CAAA,KAAK,GAAG,SAAS;QACjB,IAAA,CAAA,mBAAmB,GAAG,WAAW;QACjC,IAAA,CAAA,IAAI,GAAG,EAAE;QACT,IAAA,CAAA,gBAAgB,GAAG,QAAQ;QAC3B,IAAA,CAAA,eAAe,GAAG,EAAE;QACpB,IAAA,CAAA,WAAW,GAAG,QAAQ;AACrB,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAO;A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AAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAIlB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAjB9C,SAAS;+BACE,8BAA8B,EAAA,UAAA,EAG5B,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,cAAc;wBACd,kBAAkB;wBAClB,eAAe;wBACf,qBAAqB;wBACrB,mBAAmB;wBACnB,eAAe;wBACf,2BAA2B;qBAC5B,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,krCAAA,EAAA,MAAA,EAAA,CAAA,qEAAA,CAAA,EAAA;wDAIrC,QAAQ,EAAA,CAAA;sBADP;gBAGQ,WAAW,EAAA,CAAA;sBAAnB;gBAEQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,eAAe,EAAA,CAAA;sBAAvB;gBACQ,WAAW,EAAA,CAAA;sBAAnB;gBACS,UAAU,EAAA,CAAA;sBAAnB;;;AE7DH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-input-birthplace.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.ts","../../../../projects/onemrva/design-system/mat-input-birthplace/src/onemrva-mat-input-birthplace.component.html","../../../../projects/onemrva/design-system/mat-input-birthplace/index.ts","../../../../projects/onemrva/design-system/mat-input-birthplace/onemrvapublic-design-system-mat-input-birthplace.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n inject,\n input,\n OnDestroy,\n OnInit,\n Output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport {\n Observable,\n Subject,\n map,\n startWith,\n debounceTime,\n takeUntil,\n of,\n combineLatest,\n} from 'rxjs';\nimport { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';\nimport { CommonCountryLookupService } from '@onemrvapublic/design-system/shared';\nimport { OnemRvaCommonCountry } from '@onemrvapublic/design-system/shared';\nimport { OnemrvaCountryItemComponent } from '@onemrvapublic/design-system/mat-country-item';\n\n@Component({\n selector: 'onemrva-mat-input-birthplace',\n styleUrls: ['onemrva-mat-input-birthplace.component.scss'],\n templateUrl: 'onemrva-mat-input-birthplace.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatSelectSearchModule,\n ReactiveFormsModule,\n TranslateModule,\n OnemrvaCountryItemComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputBirthPlaceComponent implements OnInit, OnDestroy {\n readonly = input(false);\n\n countryCode = input(new FormControl<OnemRvaCommonCountry | null>(null));\n\n label = input('Country');\n noEntriesFoundLabel = input('Not found');\n hint = input('');\n placeholderLabel = input('Search');\n searchAriaLabel = input('');\n returnValue = input('object');\n\n @Output() getCountry = new EventEmitter<any>();\n\n selectedCountryName = signal<string | null>(null);\n selectedCountryCode = signal<string | null>(null);\n\n public filterCtrl: FormControl<string | null> = new FormControl<string>('');\n\n destroyNotifier$ = new Subject<void>();\n\n public filteredCountries$: Observable<OnemRvaCommonCountry[]> = of([]);\n\n private commonCountryLookupService = inject(CommonCountryLookupService);\n private translate = inject(TranslateService);\n private countries$ = this.commonCountryLookupService.getCountries();\n\n constructor() {\n this.filteredCountries$ = combineLatest([\n this.filterCtrl.valueChanges.pipe(startWith('')),\n this.countries$,\n ]).pipe(\n debounceTime(400),\n map(([search, countries]) => {\n return countries.filter((country: OnemRvaCommonCountry) => {\n if (!search || search === '') return true;\n // if (country.descNl === undefined) return false;\n return (\n country.descNl.toLowerCase().indexOf(search.toLowerCase()) > -1\n );\n });\n }),\n map(country =>\n country.sort((a, b) => {\n return a.descNl.localeCompare(b.descNl);\n }),\n ),\n );\n }\n\n getCountryName(country: OnemRvaCommonCountry): string | null {\n if (!country) return null;\n switch (this.translate.currentLang) {\n case 'nl':\n return country.descNl ?? '';\n default:\n case 'fr':\n return country.descFr ?? '';\n }\n }\n\n ngOnInit(): void {\n this.countryCode()\n .valueChanges.pipe(\n startWith(this.countryCode().value),\n takeUntil(this.destroyNotifier$),\n )\n .subscribe(country => {\n this.selectedCountryName.set(null);\n this.selectedCountryCode.set(null);\n\n if (country === null || country === undefined) return;\n const name = this.getCountryName(country);\n\n this.selectedCountryName.set(name);\n this.selectedCountryCode.set(\n country.singlePropertiesMap.codeSepa.toLowerCase(),\n );\n });\n }\n\n ngOnDestroy() {\n this.destroyNotifier$.next();\n this.destroyNotifier$.complete();\n }\n\n trackById(index: number, country: OnemRvaCommonCountry) {\n return country.code;\n }\n\n errors() {\n // if (this.countryCode.errors !== null) {\n // for (const k in this.countryCode.errors) {\n // if (k === 'required') {\n // return 'input.country.required';\n // } else {\n // return 'input.country.invalid';\n // }\n // }\n // }\n return 'input.country.unknown.error';\n }\n\n getValue(country: OnemRvaCommonCountry) {\n switch (this.returnValue()) {\n case 'id':\n return country.id;\n case 'code':\n return country.code;\n default:\n case 'object':\n return country;\n }\n }\n}\n","<mat-form-field class=\"onemrva-input-country-common\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select\n class=\"onemrva-country-select-common\"\n [formControl]=\"countryCode()\"\n [placeholder]=\"placeholderLabel()\"\n >\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"selectedCountryCode()\"\n [countryName]=\"selectedCountryName()\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track country.code) {\n <mat-option [value]=\"country\">\n <mat-country-item\n [countryCode]=\"country.singlePropertiesMap.codeSepa.toLowerCase()\"\n [countryName]=\"getCountryName(country)\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint() !== '') {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n @if (countryCode().invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-mat-input-birthplace.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAiDa,kCAAkC,CAAA;AA2B7C,IAAA,WAAA,GAAA;AA1BA,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,oDAAC;QAEvB,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,IAAI,WAAW,CAA8B,IAAI,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AAEvE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,SAAS,iDAAC;AACxB,QAAA,IAAA,CAAA,mBAAmB,GAAG,KAAK,CAAC,WAAW,+DAAC;AACxC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,EAAE,gDAAC;AAChB,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,QAAQ,4DAAC;AAClC,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,EAAE,2DAAC;AAC3B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,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aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAIlB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAjB9C,SAAS;+BACE,8BAA8B,EAAA,UAAA,EAG5B,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,cAAc;wBACd,kBAAkB;wBAClB,eAAe;wBACf,qBAAqB;wBACrB,mBAAmB;wBACnB,eAAe;wBACf,2BAA2B;qBAC5B,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,osCAAA,EAAA,MAAA,EAAA,CAAA,qEAAA,CAAA,EAAA;wDAc3B,UAAU,EAAA,CAAA;sBAAnB;;;AE7DH;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i5 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, inject, Output, Input, ViewEncapsulation, Component } from '@angular/core';
4
+ import { EventEmitter, input, inject, Output, ViewEncapsulation, Component } from '@angular/core';
5
5
  import * as i4 from '@angular/forms';
6
6
  import { FormControl, ReactiveFormsModule } from '@angular/forms';
7
7
  import { MatFormFieldModule } from '@angular/material/form-field';
@@ -19,17 +19,19 @@ import { OnemrvaCountryItemComponent } from '@onemrvapublic/design-system/mat-co
19
19
 
20
20
  class OnemrvaMatInputCountryComponent {
21
21
  setValue(country) {
22
- this.country.setValue(country.code);
22
+ this.country().setValue(country.code);
23
23
  this.getCountry.emit(country);
24
24
  }
25
25
  constructor() {
26
- this.readonly = false;
27
- this.label = 'Country';
28
- this.noEntriesFoundLabel = 'Not found';
29
- this.hint = '';
30
- this.placeholderLabel = 'Search';
31
- this.searchAriaLabel = '';
32
26
  this.getCountry = new EventEmitter();
27
+ this.country = input.required(...(ngDevMode ? [{ debugName: "country" }] : []));
28
+ this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
29
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
30
+ this.label = input('Country', ...(ngDevMode ? [{ debugName: "label" }] : []));
31
+ this.noEntriesFoundLabel = input('Not found', ...(ngDevMode ? [{ debugName: "noEntriesFoundLabel" }] : []));
32
+ this.hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
33
+ this.placeholderLabel = input('Search', ...(ngDevMode ? [{ debugName: "placeholderLabel" }] : []));
34
+ this.searchAriaLabel = input('', ...(ngDevMode ? [{ debugName: "searchAriaLabel" }] : []));
33
35
  this.filterCtrl = new FormControl('');
34
36
  this.cdn = inject(OnemRvaCDNCountryService);
35
37
  this.countries$ = this.cdn.getCountries();
@@ -43,7 +45,7 @@ class OnemrvaMatInputCountryComponent {
43
45
  }));
44
46
  }
45
47
  ngOnInit() {
46
- this.selectedCountry$ = this.country.valueChanges.pipe(startWith(this.country.getRawValue()), // ✅ Explicitly set type
48
+ this.selectedCountry$ = this.country().valueChanges.pipe(startWith(this.country().getRawValue()), // ✅ Explicitly set type
47
49
  combineLatestWith(this.countries$), map(([value, countries]) => {
48
50
  // ✅ Explicitly defining types
49
51
  return countries.find((country) => value !== null &&
@@ -55,15 +57,18 @@ class OnemrvaMatInputCountryComponent {
55
57
  e.stopPropagation();
56
58
  }
57
59
  errors() {
58
- for (const k in this.country.errors) {
60
+ for (const k in this.country().errors) {
59
61
  if (k === 'required') {
60
62
  return 'input.country.required';
61
63
  }
62
64
  }
63
65
  return 'input.country.unknown.error';
64
66
  }
67
+ getCounrtyCode() {
68
+ return this.country().getRawValue()?.toLowerCase() ?? null;
69
+ }
65
70
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputCountryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
66
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputCountryComponent, isStandalone: true, selector: "onemrva-mat-input-country", inputs: { readonly: "readonly", country: "country", label: "label", noEntriesFoundLabel: "noEntriesFoundLabel", hint: "hint", placeholderLabel: "placeholderLabel", searchAriaLabel: "searchAriaLabel" }, outputs: { getCountry: "getCountry" }, ngImport: i0, template: "<mat-form-field class=\"onemrva-input-country\">\n <mat-label>{{ label }}</mat-label>\n <mat-select class=\"onemrva-country-select\" [formControl]=\"country\">\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"country.getRawValue().toLowerCase()\"\n [countryName]=\"(selectedCountry$ | async)?.name\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track $index) {\n <mat-option [value]=\"country.code.toLowerCase()\">\n <mat-country-item\n [countryCode]=\"country.code.toLowerCase()\"\n [countryName]=\"country.name\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (country.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n", styles: ["mat-form-field.onemrva-input-country{width:100%}:host mat-option.mdc-list-item .country{position:relative;display:block;padding-top:var(--half-spacer)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatInputModule }, { 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: "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: MatSelectSearchModule }, { kind: "component", type: i3.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: OnemrvaCountryItemComponent, selector: "mat-country-item", inputs: ["countryCode", "countryName"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
71
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputCountryComponent, isStandalone: true, selector: "onemrva-mat-input-country", inputs: { country: { classPropertyName: "country", publicName: "country", isSignal: true, isRequired: true, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, noEntriesFoundLabel: { classPropertyName: "noEntriesFoundLabel", publicName: "noEntriesFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, placeholderLabel: { classPropertyName: "placeholderLabel", publicName: "placeholderLabel", isSignal: true, isRequired: false, transformFunction: null }, searchAriaLabel: { classPropertyName: "searchAriaLabel", publicName: "searchAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { getCountry: "getCountry" }, ngImport: i0, template: "<mat-form-field class=\"onemrva-input-country\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select class=\"onemrva-country-select\" [formControl]=\"country()\">\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"getCounrtyCode()\"\n [countryName]=\"(selectedCountry$ | async)?.name\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track $index) {\n <mat-option [value]=\"country.code.toLowerCase()\">\n <mat-country-item\n [countryCode]=\"country.code.toLowerCase()\"\n [countryName]=\"country.name\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint() !== '') {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n @if (country().invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n", styles: ["mat-form-field.onemrva-input-country{width:100%}:host mat-option.mdc-list-item .country{position:relative;display:block;padding-top:var(--half-spacer)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatInputModule }, { 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: "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: MatSelectSearchModule }, { kind: "component", type: i3.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: OnemrvaCountryItemComponent, selector: "mat-country-item", inputs: ["countryCode", "countryName"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
67
72
  }
68
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputCountryComponent, decorators: [{
69
74
  type: Component,
@@ -76,22 +81,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
76
81
  ReactiveFormsModule,
77
82
  TranslateModule,
78
83
  OnemrvaCountryItemComponent,
79
- ], encapsulation: ViewEncapsulation.None, template: "<mat-form-field class=\"onemrva-input-country\">\n <mat-label>{{ label }}</mat-label>\n <mat-select class=\"onemrva-country-select\" [formControl]=\"country\">\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"country.getRawValue().toLowerCase()\"\n [countryName]=\"(selectedCountry$ | async)?.name\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track $index) {\n <mat-option [value]=\"country.code.toLowerCase()\">\n <mat-country-item\n [countryCode]=\"country.code.toLowerCase()\"\n [countryName]=\"country.name\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (country.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n", styles: ["mat-form-field.onemrva-input-country{width:100%}:host mat-option.mdc-list-item .country{position:relative;display:block;padding-top:var(--half-spacer)}\n"] }]
80
- }], ctorParameters: () => [], propDecorators: { readonly: [{
81
- type: Input
82
- }], country: [{
83
- type: Input
84
- }], label: [{
85
- type: Input
86
- }], noEntriesFoundLabel: [{
87
- type: Input
88
- }], hint: [{
89
- type: Input
90
- }], placeholderLabel: [{
91
- type: Input
92
- }], searchAriaLabel: [{
93
- type: Input
94
- }], getCountry: [{
84
+ ], encapsulation: ViewEncapsulation.None, template: "<mat-form-field class=\"onemrva-input-country\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select class=\"onemrva-country-select\" [formControl]=\"country()\">\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"getCounrtyCode()\"\n [countryName]=\"(selectedCountry$ | async)?.name\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track $index) {\n <mat-option [value]=\"country.code.toLowerCase()\">\n <mat-country-item\n [countryCode]=\"country.code.toLowerCase()\"\n [countryName]=\"country.name\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint() !== '') {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n @if (country().invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n", styles: ["mat-form-field.onemrva-input-country{width:100%}:host mat-option.mdc-list-item .country{position:relative;display:block;padding-top:var(--half-spacer)}\n"] }]
85
+ }], ctorParameters: () => [], propDecorators: { getCountry: [{
95
86
  type: Output
96
87
  }] } });
97
88
 
@@ -1 +1 @@
1
- {"version":3,"file":"onemrvapublic-design-system-mat-input-country.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.ts","../../../../projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.html","../../../../projects/onemrva/design-system/mat-input-country/index.ts","../../../../projects/onemrva/design-system/mat-input-country/onemrvapublic-design-system-mat-input-country.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } 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 Observable,\n map,\n startWith,\n debounceTime,\n combineLatestWith,\n} from 'rxjs';\nimport { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';\nimport {\n OnemRvaCDNCountryService,\n OnemrvaMaterialCountry,\n} from '@onemrvapublic/design-system/shared';\nimport { OnemrvaCountryItemComponent } from '@onemrvapublic/design-system/mat-country-item';\n\n@Component({\n selector: 'onemrva-mat-input-country',\n styleUrls: ['onemrva-mat-input-country.component.scss'],\n templateUrl: 'onemrva-mat-input-country.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatSelectSearchModule,\n ReactiveFormsModule,\n TranslateModule,\n OnemrvaCountryItemComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputCountryComponent implements OnInit {\n @Input()\n readonly = false;\n\n @Input() country!: FormControl;\n\n @Input() label = 'Country';\n @Input() noEntriesFoundLabel = 'Not found';\n @Input() hint = '';\n @Input() placeholderLabel = 'Search';\n @Input() searchAriaLabel = '';\n @Output() getCountry = new EventEmitter<any>();\n\n public filterCtrl: FormControl<string | null> = new FormControl<string>('');\n\n public countries$: Observable<OnemrvaMaterialCountry[]>;\n public filteredCountries$: Observable<OnemrvaMaterialCountry[]>;\n public selectedCountry$?: Observable<OnemrvaMaterialCountry | undefined>;\n\n public setValue(country: OnemrvaMaterialCountry) {\n this.country.setValue(country.code);\n this.getCountry.emit(country);\n }\n\n private readonly cdn = inject(OnemRvaCDNCountryService);\n\n constructor() {\n this.countries$ = this.cdn.getCountries();\n\n this.filteredCountries$ = this.filterCtrl.valueChanges.pipe(\n debounceTime(400),\n startWith<string | null>(''), // ✅ Explicitly setting type\n combineLatestWith(this.countries$),\n map(([search, countries]: [string | null, OnemrvaMaterialCountry[]]) => {\n return countries.filter((country: OnemrvaMaterialCountry) => {\n if (!search || search.trim() === '') return true; // ✅ Avoids returning an entire array\n return country.name?.toLowerCase().includes(search.toLowerCase());\n });\n }),\n );\n }\n\n ngOnInit(): void {\n this.selectedCountry$ = this.country.valueChanges.pipe(\n startWith<string | null>(this.country.getRawValue()), // ✅ Explicitly set type\n combineLatestWith(this.countries$),\n map(([value, countries]: [string | null, OnemrvaMaterialCountry[]]) => {\n // ✅ Explicitly defining types\n return countries.find(\n (country: OnemrvaMaterialCountry) =>\n value !== null &&\n country.code.toLowerCase() ===\n value.substring(0, country.code.length).toLowerCase(),\n );\n }),\n );\n }\n\n handleClick(e: any) {\n e.stopPropagation();\n }\n\n public errors() {\n for (const k in this.country.errors) {\n if (k === 'required') {\n return 'input.country.required';\n }\n }\n return 'input.country.unknown.error';\n }\n}\n","<mat-form-field class=\"onemrva-input-country\">\n <mat-label>{{ label }}</mat-label>\n <mat-select class=\"onemrva-country-select\" [formControl]=\"country\">\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"country.getRawValue().toLowerCase()\"\n [countryName]=\"(selectedCountry$ | async)?.name\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track $index) {\n <mat-option [value]=\"country.code.toLowerCase()\">\n <mat-country-item\n [countryCode]=\"country.code.toLowerCase()\"\n [countryName]=\"country.name\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint !== '') {\n <mat-hint>{{ hint }}</mat-hint>\n }\n @if (country.invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-mat-input-country.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MA8Ca,+BAA+B,CAAA;AAmBnC,IAAA,QAAQ,CAAC,OAA+B,EAAA;QAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;AACnC,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;;AAK/B,IAAA,WAAA,GAAA;QAxBA,IAAA,CAAA,QAAQ,GAAG,KAAK;QAIP,IAAA,CAAA,KAAK,GAAG,SAAS;QACjB,IAAA,CAAA,mBAAmB,GAAG,WAAW;QACjC,IAAA,CAAA,IAAI,GAAG,EAAE;QACT,IAAA,CAAA,gBAAgB,GAAG,QAAQ;QAC3B,IAAA,CAAA,eAAe,GAAG,EAAE;AACnB,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAO;AAEvC,QAAA,IAAA,CAAA,UAAU,GAA+B,IAAI,WAAW,CAAS,EAAE,CAAC;AAW1D,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,wBAAwB,CAAC;QAGrD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE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AAA,CAAA,CAAA;;2FAIlB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAjB3C,SAAS;+BACE,2BAA2B,EAAA,UAAA,EAGzB,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,cAAc;wBACd,kBAAkB;wBAClB,eAAe;wBACf,qBAAqB;wBACrB,mBAAmB;wBACnB,eAAe;wBACf,2BAA2B;qBAC5B,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,ymCAAA,EAAA,MAAA,EAAA,CAAA,2JAAA,CAAA,EAAA;wDAIrC,QAAQ,EAAA,CAAA;sBADP;gBAGQ,OAAO,EAAA,CAAA;sBAAf;gBAEQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,eAAe,EAAA,CAAA;sBAAvB;gBACS,UAAU,EAAA,CAAA;sBAAnB;;;AEzDH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"onemrvapublic-design-system-mat-input-country.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.ts","../../../../projects/onemrva/design-system/mat-input-country/src/onemrva-mat-input-country.component.html","../../../../projects/onemrva/design-system/mat-input-country/index.ts","../../../../projects/onemrva/design-system/mat-input-country/onemrvapublic-design-system-mat-input-country.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n effect,\n EventEmitter,\n inject,\n input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } 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 Observable,\n map,\n startWith,\n debounceTime,\n combineLatestWith,\n} from 'rxjs';\nimport { MatSelectSearchModule } from '@onemrvapublic/design-system/mat-select-search';\nimport {\n OnemRvaCDNCountryService,\n OnemrvaMaterialCountry,\n} from '@onemrvapublic/design-system/shared';\nimport { OnemrvaCountryItemComponent } from '@onemrvapublic/design-system/mat-country-item';\n\n@Component({\n selector: 'onemrva-mat-input-country',\n styleUrls: ['onemrva-mat-input-country.component.scss'],\n templateUrl: 'onemrva-mat-input-country.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatSelectSearchModule,\n ReactiveFormsModule,\n TranslateModule,\n OnemrvaCountryItemComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputCountryComponent implements OnInit {\n @Output() getCountry = new EventEmitter<any>();\n\n country = input.required<FormControl<string | null>>();\n\n readonly = input(false);\n disabled = input(false);\n\n label = input('Country');\n noEntriesFoundLabel = input('Not found');\n hint = input('');\n placeholderLabel = input('Search');\n searchAriaLabel = input('');\n\n public filterCtrl: FormControl<string | null> = new FormControl<string>('');\n\n public countries$: Observable<OnemrvaMaterialCountry[]>;\n public filteredCountries$: Observable<OnemrvaMaterialCountry[]>;\n public selectedCountry$?: Observable<OnemrvaMaterialCountry | undefined>;\n\n public setValue(country: OnemrvaMaterialCountry) {\n this.country().setValue(country.code);\n this.getCountry.emit(country);\n }\n\n private readonly cdn = inject(OnemRvaCDNCountryService);\n\n constructor() {\n this.countries$ = this.cdn.getCountries();\n\n this.filteredCountries$ = this.filterCtrl.valueChanges.pipe(\n debounceTime(400),\n startWith<string | null>(''), // ✅ Explicitly setting type\n combineLatestWith(this.countries$),\n map(([search, countries]: [string | null, OnemrvaMaterialCountry[]]) => {\n return countries.filter((country: OnemrvaMaterialCountry) => {\n if (!search || search.trim() === '') return true; // ✅ Avoids returning an entire array\n return country.name?.toLowerCase().includes(search.toLowerCase());\n });\n }),\n );\n }\n\n ngOnInit(): void {\n this.selectedCountry$ = this.country().valueChanges.pipe(\n startWith<string | null>(this.country().getRawValue()), // ✅ Explicitly set type\n combineLatestWith(this.countries$),\n map(([value, countries]: [string | null, OnemrvaMaterialCountry[]]) => {\n // ✅ Explicitly defining types\n return countries.find(\n (country: OnemrvaMaterialCountry) =>\n value !== null &&\n country.code.toLowerCase() ===\n value.substring(0, country.code.length).toLowerCase(),\n );\n }),\n );\n }\n\n handleClick(e: any) {\n e.stopPropagation();\n }\n\n public errors() {\n for (const k in this.country().errors) {\n if (k === 'required') {\n return 'input.country.required';\n }\n }\n return 'input.country.unknown.error';\n }\n\n getCounrtyCode() {\n return this.country().getRawValue()?.toLowerCase() ?? null;\n }\n}\n","<mat-form-field class=\"onemrva-input-country\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select class=\"onemrva-country-select\" [formControl]=\"country()\">\n <mat-select-trigger>\n <mat-country-item\n [countryCode]=\"getCounrtyCode()\"\n [countryName]=\"(selectedCountry$ | async)?.name\"\n />\n </mat-select-trigger>\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 @for (country of filteredCountries$ | async; track $index) {\n <mat-option [value]=\"country.code.toLowerCase()\">\n <mat-country-item\n [countryCode]=\"country.code.toLowerCase()\"\n [countryName]=\"country.name\"\n />\n </mat-option>\n }\n </mat-select>\n @if (hint() !== '') {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n @if (country().invalid) {\n <mat-error>{{ errors() | translate }}</mat-error>\n }\n</mat-form-field>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-mat-input-country.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MA+Ca,+BAA+B,CAAA;AAoBnC,IAAA,QAAQ,CAAC,OAA+B,EAAA;QAC7C,IAAI,CAAC,OA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B,mBAAmB;wBACnB,eAAe;wBACf,2BAA2B;qBAC5B,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,smCAAA,EAAA,MAAA,EAAA,CAAA,2JAAA,CAAA,EAAA;wDAG3B,UAAU,EAAA,CAAA;sBAAnB;;;AEhDH;;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,WAAW,GAAgB,IAAI,WAAW,CAAC,EAAE,CAAC;AAEvC,QAAA,IAAA,CAAA,UAAU,GAA+B,IAAI,WAAW,CAAS,EAAE,CAAC;AAE3E,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAQ;AAErB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,wBAAwB,CAAC;QAChD,IAAA,CAAA,UAAU,GACf,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC;QAIjC,IAAI,CAA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I,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,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,WAAW,GAAgB,IAAI,WAAW,CAAC,EAAE,CAAC;AAEvC,QAAA,IAAA,CAAA,UAAU,GAA+B,IAAI,WAAW,CAAS,EAAE,CAAC;AAE3E,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAQ;A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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,11 +10,12 @@ 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 {
16
17
  get opacity() {
17
- return this.disabled ? 0.25 : 1;
18
+ return this.disabled ? 0.4 : 1;
18
19
  }
19
20
  onFocus() {
20
21
  this.focused = true;
@@ -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 ed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AA8B,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.4 : 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":";;;;;;;;;;;;;;AAmCA,IAAI,OAAO,GAAG,CAAC;AA8BT,MAAO,8BACX,SAAQ,mBAAwB,CAAA;AA0ChC,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,CAAC;;IAKhC,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;A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AO,EAAE,CAAC,8BAA8B,CAAC;AACzC,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -63,11 +63,11 @@ class OnemrvaMatNotificationComponent {
63
63
  this.notificationClose.emit();
64
64
  }
65
65
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
66
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatNotificationComponent, isStandalone: true, selector: "onemrva-mat-notification", inputs: { message: "message", closable: "closable", id: "id", dataCy: "dataCy" }, outputs: { notificationClose: "notificationClose" }, host: { properties: { "class.collapse-notification": "this._closed", "attr.id": "this.id", "attr.data-cy": "this.dataCy", "attr.aria-live": "this.ariaLive", "attr.role": "this.role" } }, ngImport: i0, template: "<div class=\"onemrva-mat-notification container\">\n <div class=\"onemrva-mat-notification-content show-icon\">\n @if (message !== '') {\n {{ message | translate }}\n }\n <ng-content></ng-content>\n @if (closable || isSmall) {\n <mat-icon\n class=\"close-notification clickable mr\"\n (click)=\"closeNotification()\"\n >\n close\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{position:fixed;top:var(--layout-header-height, 0);left:0;right:0;transition:max-height .4s ease-out;max-height:100vh;overflow:hidden;z-index:401;background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);border-bottom:1px solid var(--mat-sys-primary)}:host .onemrva-mat-notification{position:relative}:host .onemrva-mat-notification .onemrva-mat-notification-content{font:var(--mat-sys-body-medium);padding:var(--double-spacer) var(--spacer) var(--double-spacer) var(--spacer)}:host .onemrva-mat-notification .onemrva-mat-notification-content:before{margin-right:var(--double-spacer);margin-top:var(--quarter-spacer)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
66
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatNotificationComponent, isStandalone: true, selector: "onemrva-mat-notification", inputs: { message: "message", closable: "closable", id: "id", dataCy: "dataCy" }, outputs: { notificationClose: "notificationClose" }, host: { properties: { "class.collapse-notification": "this._closed", "attr.id": "this.id", "attr.data-cy": "this.dataCy", "attr.aria-live": "this.ariaLive", "attr.role": "this.role" } }, ngImport: i0, template: "<div class=\"onemrva-mat-notification container\">\n <div class=\"onemrva-mat-notification-content show-icon\">\n @if (message !== '') {\n {{ message | translate }}\n }\n <ng-content></ng-content>\n @if (closable || isSmall) {\n <mat-icon\n class=\"close-notification float-right clickable mr\"\n (click)=\"closeNotification()\"\n >\n close\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{position:fixed;top:var(--layout-header-height, 0);left:0;right:0;transition:max-height .4s ease-out;max-height:100vh;overflow:hidden;z-index:401;background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);border-bottom:1px solid var(--mat-sys-primary)}:host .onemrva-mat-notification{position:relative}:host .onemrva-mat-notification .onemrva-mat-notification-content{font:var(--mat-sys-body-medium);padding:var(--double-spacer) var(--spacer) var(--double-spacer) var(--spacer)}:host .onemrva-mat-notification .onemrva-mat-notification-content:before{margin-right:var(--double-spacer);margin-top:var(--quarter-spacer)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
67
67
  }
68
68
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatNotificationComponent, decorators: [{
69
69
  type: Component,
70
- args: [{ selector: 'onemrva-mat-notification', standalone: true, imports: [CommonModule, TranslateModule, MatIconModule], template: "<div class=\"onemrva-mat-notification container\">\n <div class=\"onemrva-mat-notification-content show-icon\">\n @if (message !== '') {\n {{ message | translate }}\n }\n <ng-content></ng-content>\n @if (closable || isSmall) {\n <mat-icon\n class=\"close-notification clickable mr\"\n (click)=\"closeNotification()\"\n >\n close\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{position:fixed;top:var(--layout-header-height, 0);left:0;right:0;transition:max-height .4s ease-out;max-height:100vh;overflow:hidden;z-index:401;background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);border-bottom:1px solid var(--mat-sys-primary)}:host .onemrva-mat-notification{position:relative}:host .onemrva-mat-notification .onemrva-mat-notification-content{font:var(--mat-sys-body-medium);padding:var(--double-spacer) var(--spacer) var(--double-spacer) var(--spacer)}:host .onemrva-mat-notification .onemrva-mat-notification-content:before{margin-right:var(--double-spacer);margin-top:var(--quarter-spacer)}\n"] }]
70
+ args: [{ selector: 'onemrva-mat-notification', standalone: true, imports: [CommonModule, TranslateModule, MatIconModule], template: "<div class=\"onemrva-mat-notification container\">\n <div class=\"onemrva-mat-notification-content show-icon\">\n @if (message !== '') {\n {{ message | translate }}\n }\n <ng-content></ng-content>\n @if (closable || isSmall) {\n <mat-icon\n class=\"close-notification float-right clickable mr\"\n (click)=\"closeNotification()\"\n >\n close\n </mat-icon>\n }\n </div>\n</div>\n", styles: [":host{position:fixed;top:var(--layout-header-height, 0);left:0;right:0;transition:max-height .4s ease-out;max-height:100vh;overflow:hidden;z-index:401;background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);border-bottom:1px solid var(--mat-sys-primary)}:host .onemrva-mat-notification{position:relative}:host .onemrva-mat-notification .onemrva-mat-notification-content{font:var(--mat-sys-body-medium);padding:var(--double-spacer) var(--spacer) var(--double-spacer) var(--spacer)}:host .onemrva-mat-notification .onemrva-mat-notification-content:before{margin-right:var(--double-spacer);margin-top:var(--quarter-spacer)}\n"] }]
71
71
  }], ctorParameters: () => [], propDecorators: { message: [{
72
72
  type: Input
73
73
  }], closable: [{