@onemrvapublic/design-system 20.3.0-develop.4 → 20.3.0-develop.6
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.
- package/fesm2022/onemrvapublic-design-system-layout.mjs +1 -1
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs +9 -2
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +15 -31
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +18 -27
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-shared.mjs +12 -8
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system.mjs +66 -80
- package/fesm2022/onemrvapublic-design-system.mjs.map +1 -1
- package/index.d.ts +24 -21
- package/mat-address/src/onemrva-address.scss +3 -39
- package/mat-avatar/src/onemrva-mat-avatar.component.scss +0 -2
- package/mat-breadcrumb/src/onemrva-mat-breadcrumb.component.scss +0 -2
- package/mat-choice-chip/index.d.ts +1 -0
- package/mat-country-item/src/onemrva-mat-country-item.component.scss +6 -0
- package/mat-input-birthplace/index.d.ts +9 -9
- package/mat-input-country/index.d.ts +12 -10
- package/mat-multi-select/index.d.ts +1 -1
- package/mat-multi-select/src/onemrva-mat-multi-select.component.scss +0 -2
- package/mat-notification/src/onemrva-mat-notification.component.scss +0 -2
- package/mat-selectable-box/src/onemrva-mat-selectable-box.component.scss +6 -1
- package/mat-sticker/src/onemrva-mat-sticker.component.scss +0 -2
- package/mat-task-list/src/onemrva-mat-task-list.component.scss +0 -4
- package/mat-toast/src/onemrva-mat-toast.component.scss +0 -2
- package/package.json +13 -13
- package/shared/index.d.ts +3 -3
- package/_utils.scss +0 -30
|
@@ -78,7 +78,7 @@ class OnemRvaAddress {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaAddress, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
81
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaAddress, isStandalone: true, selector: "onemrva-address", inputs: { defaultCountry: "defaultCountry", form: "form" }, outputs: { update: "update" }, ngImport: i0, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"
|
|
81
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemRvaAddress, isStandalone: true, selector: "onemrva-address", inputs: { defaultCountry: "defaultCountry", form: "form" }, outputs: { update: "update" }, ngImport: i0, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12-small col-8-medium\">\n <onemrva-mat-input-address\n class=\"mr-m\"\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n />\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium\">\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium ml-s-small\">\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12-small col-4-medium\">\n <mat-form-field class=\"mr-m-medium\">\n <mat-label\n >{{ 'input.address.postal-code.label' | translate}}</mat-label\n >\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-12-small col-8-medium\">\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host mat-form-field{display:flex}:host onemrva-mat-input-country{display:flex;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: OnemrvaMatInputCountryComponent, selector: "onemrva-mat-input-country", inputs: ["country", "readonly", "disabled", "label", "noEntriesFoundLabel", "hint", "placeholderLabel", "searchAriaLabel"], outputs: ["getCountry"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: OnemrvaMatInputAddressComponent, selector: "onemrva-mat-input-address", inputs: ["placeholder", "readonly", "address", "mode", "label", "noEntriesFoundLabel", "hint", "countryCodes"], outputs: ["getAddress"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] }); }
|
|
82
82
|
}
|
|
83
83
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemRvaAddress, decorators: [{
|
|
84
84
|
type: Component,
|
|
@@ -90,7 +90,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
90
90
|
MatInputModule,
|
|
91
91
|
TranslateModule,
|
|
92
92
|
OnemrvaMatInputAddressComponent,
|
|
93
|
-
], standalone: true, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"
|
|
93
|
+
], standalone: true, template: "<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12-small col-8-medium\">\n <onemrva-mat-input-address\n class=\"mr-m\"\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n />\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium\">\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium ml-s-small\">\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12-small col-4-medium\">\n <mat-form-field class=\"mr-m-medium\">\n <mat-label\n >{{ 'input.address.postal-code.label' | translate}}</mat-label\n >\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-12-small col-8-medium\">\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host mat-form-field{display:flex}:host onemrva-mat-input-country{display:flex;width:100%}\n"] }]
|
|
94
94
|
}], propDecorators: { defaultCountry: [{
|
|
95
95
|
type: Input
|
|
96
96
|
}], form: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.ts","../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.html","../../../../projects/onemrva/design-system/mat-address/index.ts","../../../../projects/onemrva/design-system/mat-address/onemrvapublic-design-system-mat-address.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { OnemrvaMatInputAddressComponent } from '@onemrvapublic/design-system/mat-input-address';\nimport { OnemrvaMatInputCountryComponent } from '@onemrvapublic/design-system/mat-input-country';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\nimport { MatInputModule } from '@angular/material/input';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { merge } from 'rxjs';\n\n@Component({\n selector: 'onemrva-address',\n imports: [\n CommonModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n OnemrvaMatInputCountryComponent,\n MatInputModule,\n TranslateModule,\n OnemrvaMatInputAddressComponent,\n ],\n templateUrl: './onemrva-address.html',\n standalone: true,\n styleUrl: './onemrva-address.scss',\n})\nexport class OnemRvaAddress implements OnInit {\n @Input()\n defaultCountry = 'be';\n\n @Input()\n form = new FormGroup({\n country: new FormControl(''),\n street: new FormControl(''),\n postal_code: new FormControl(''),\n city: new FormControl(''),\n street_number: new FormControl(''),\n box: new FormControl(''),\n });\n\n @Output()\n update = new EventEmitter<{\n country?: string;\n street?: string;\n postal_code?: string;\n city?: string;\n street_number?: string;\n box?: string;\n }>();\n\n // Keep existing property names as getters to avoid template changes\n get countryForm(): FormControl<string | null> {\n return this.form.get('country') as FormControl<string | null>;\n }\n get streetControl(): FormControl<string | null> {\n return this.form.get('street') as FormControl<string | null>;\n }\n get postalCodeControl(): FormControl<string | null> {\n return this.form.get('postal_code') as FormControl<string | null>;\n }\n get cityControl(): FormControl<string | null> {\n return this.form.get('city') as FormControl<string | null>;\n }\n get boxControl(): FormControl<string | null> {\n return this.form.get('box') as FormControl<string | null>;\n }\n get numeroControl(): FormControl<string | null> {\n return this.form.get('street_number') as FormControl<string | null>;\n }\n\n ngOnInit() {\n // Emit on any form change\n merge(this.form.valueChanges).subscribe(() => {\n const v = this.form.value;\n const change = {\n country: v.country || undefined,\n street: v.street || undefined,\n postal_code: v.postal_code || undefined,\n city: v.city || undefined,\n street_number: v.street_number || undefined,\n };\n this.update.emit(change);\n });\n }\n\n onAddressSelected(result: OSMResult) {\n const city =\n result.address.city || result.address.village || result.address.town;\n const patch: any = {};\n\n if (city) {\n patch.city = city;\n }\n\n const houseNumber = result.address.house_number;\n if (houseNumber) {\n patch.street_number = houseNumber;\n }\n\n const postalCode = result.address.postcode;\n if (postalCode) {\n patch.postal_code = postalCode;\n }\n\n if (Object.keys(patch).length > 0) {\n this.form.patchValue(patch);\n }\n }\n}\n","<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"line-2\">\n <onemrva-mat-input-address\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n >\n </onemrva-mat-input-address>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n\n<div class=\"line-3\">\n <mat-form-field>\n <mat-label>{{ 'input.address.postal-code.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n</div>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-address';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA0Ba,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;QAiBE,IAAA,CAAA,cAAc,GAAG,IAAI;QAGrB,IAAA,CAAA,IAAI,GAAG,IAAI,SAAS,CAAC;AACnB,Y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EAAA,CAAA;sBADb;gBAID,IAAI,EAAA,CAAA;sBADH;gBAWD,MAAM,EAAA,CAAA;sBADL;;;AExCH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.ts","../../../../projects/onemrva/design-system/mat-address/src/onemrva-address.html","../../../../projects/onemrva/design-system/mat-address/index.ts","../../../../projects/onemrva/design-system/mat-address/onemrvapublic-design-system-mat-address.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { OnemrvaMatInputAddressComponent } from '@onemrvapublic/design-system/mat-input-address';\nimport { OnemrvaMatInputCountryComponent } from '@onemrvapublic/design-system/mat-input-country';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\nimport { MatInputModule } from '@angular/material/input';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { merge } from 'rxjs';\n\n@Component({\n selector: 'onemrva-address',\n imports: [\n CommonModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n OnemrvaMatInputCountryComponent,\n MatInputModule,\n TranslateModule,\n OnemrvaMatInputAddressComponent,\n ],\n templateUrl: './onemrva-address.html',\n standalone: true,\n styleUrl: './onemrva-address.scss',\n})\nexport class OnemRvaAddress implements OnInit {\n @Input()\n defaultCountry = 'be';\n\n @Input()\n form = new FormGroup({\n country: new FormControl(''),\n street: new FormControl(''),\n postal_code: new FormControl(''),\n city: new FormControl(''),\n street_number: new FormControl(''),\n box: new FormControl(''),\n });\n\n @Output()\n update = new EventEmitter<{\n country?: string;\n street?: string;\n postal_code?: string;\n city?: string;\n street_number?: string;\n box?: string;\n }>();\n\n // Keep existing property names as getters to avoid template changes\n get countryForm(): FormControl<string | null> {\n return this.form.get('country') as FormControl<string | null>;\n }\n get streetControl(): FormControl<string | null> {\n return this.form.get('street') as FormControl<string | null>;\n }\n get postalCodeControl(): FormControl<string | null> {\n return this.form.get('postal_code') as FormControl<string | null>;\n }\n get cityControl(): FormControl<string | null> {\n return this.form.get('city') as FormControl<string | null>;\n }\n get boxControl(): FormControl<string | null> {\n return this.form.get('box') as FormControl<string | null>;\n }\n get numeroControl(): FormControl<string | null> {\n return this.form.get('street_number') as FormControl<string | null>;\n }\n\n ngOnInit() {\n // Emit on any form change\n merge(this.form.valueChanges).subscribe(() => {\n const v = this.form.value;\n const change = {\n country: v.country || undefined,\n street: v.street || undefined,\n postal_code: v.postal_code || undefined,\n city: v.city || undefined,\n street_number: v.street_number || undefined,\n };\n this.update.emit(change);\n });\n }\n\n onAddressSelected(result: OSMResult) {\n const city =\n result.address.city || result.address.village || result.address.town;\n const patch: any = {};\n\n if (city) {\n patch.city = city;\n }\n\n const houseNumber = result.address.house_number;\n if (houseNumber) {\n patch.street_number = houseNumber;\n }\n\n const postalCode = result.address.postcode;\n if (postalCode) {\n patch.postal_code = postalCode;\n }\n\n if (Object.keys(patch).length > 0) {\n this.form.patchValue(patch);\n }\n }\n}\n","<onemrva-mat-input-country\n [country]=\"countryForm\"\n label=\"{{ 'input.country.label' | translate }}\"\n noEntriesFoundLabel=\"{{ 'input.country.not.found' | translate }}\"\n placeholderLabel=\"{{ 'input.country.search' | translate }}\"\n searchAriaLabel=\"{{ 'input.country.search' | translate }}\"\n></onemrva-mat-input-country>\n\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12-small col-8-medium\">\n <onemrva-mat-input-address\n class=\"mr-m\"\n mode=\"road-only\"\n [countryCodes]=\"[countryForm.value || '']\"\n [address]=\"streetControl\"\n (getAddress)=\"onAddressSelected($event)\"\n />\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium\">\n <mat-label>{{ 'input.address.number.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"numeroControl\"\n [placeholder]=\"'input.address.number.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-6-small col-2-medium\">\n <mat-form-field class=\"ml-m-medium ml-s-small\">\n <mat-label>{{'input.address.box.label' | translate}}</mat-label>\n <input\n matInput\n [formControl]=\"boxControl\"\n [placeholder]=\"'input.address.box.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12-small col-4-medium\">\n <mat-form-field class=\"mr-m-medium\">\n <mat-label\n >{{ 'input.address.postal-code.label' | translate}}</mat-label\n >\n <input\n matInput\n [formControl]=\"postalCodeControl\"\n [placeholder]=\"'input.address.postal-code.label' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"col-12-small col-8-medium\">\n <mat-form-field>\n <mat-label>{{ 'input.address.city.label' | translate }}</mat-label>\n <input\n matInput\n [formControl]=\"cityControl\"\n [placeholder]=\"'input.address.city.placeholder' | translate\"\n />\n </mat-form-field>\n </div>\n </div>\n</div>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/onemrva-address';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA0Ba,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;QAiBE,IAAA,CAAA,cAAc,GAAG,IAAI;QAGrB,IAAA,CAAA,IAAI,GAAG,IAAI,SAAS,CAAC;AACnB,YAAA,OAAO,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC5B,YAAA,MAAM,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAC3B,YAAA,WAAW,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAChC,YAAA,IAAI,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AACzB,YAAA,aAAa,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AAClC,YAAA,GAAG,EAAE,IAAI,WAAW,CAAC,EAAE,CAAC;AACzB,SAAA,CAAC;AAGF,QAA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A,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACd,eAAe,+BACf,+BAA+B,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAMtB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAf1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB;wBACP,YAAY;wBACZ,kBAAkB;wBAClB,mBAAmB;wBACnB,+BAA+B;wBAC/B,cAAc;wBACd,eAAe;wBACf,+BAA+B;AAChC,qBAAA,EAAA,UAAA,EAEW,IAAI,EAAA,QAAA,EAAA,+sEAAA,EAAA,MAAA,EAAA,CAAA,kJAAA,CAAA,EAAA;8BAKhB,cAAc,EAAA,CAAA;sBADb;gBAID,IAAI,EAAA,CAAA;sBADH;gBAWD,MAAM,EAAA,CAAA;sBADL;;;AExCH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { forwardRef, Input, ViewEncapsulation, Component } from '@angular/core';
|
|
2
|
+
import { forwardRef, HostBinding, Input, ViewEncapsulation, Component } from '@angular/core';
|
|
3
3
|
import { MatCheckbox } from '@angular/material/checkbox';
|
|
4
4
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
5
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
@@ -8,6 +8,7 @@ class OnemrvaMatChoiceChipComponent extends MatFormFieldControl {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.checked = false;
|
|
11
|
+
// TODO : disabled state
|
|
11
12
|
this.disabled = false;
|
|
12
13
|
this._value = null;
|
|
13
14
|
// Function to call when the rating changes.
|
|
@@ -19,6 +20,9 @@ class OnemrvaMatChoiceChipComponent extends MatFormFieldControl {
|
|
|
19
20
|
//
|
|
20
21
|
};
|
|
21
22
|
}
|
|
23
|
+
get opacity() {
|
|
24
|
+
return this.disabled ? 0.4 : 1;
|
|
25
|
+
}
|
|
22
26
|
onContainerClick(event) {
|
|
23
27
|
//
|
|
24
28
|
}
|
|
@@ -42,7 +46,7 @@ class OnemrvaMatChoiceChipComponent extends MatFormFieldControl {
|
|
|
42
46
|
this.onTouched = fn;
|
|
43
47
|
}
|
|
44
48
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatChoiceChipComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
45
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemrvaMatChoiceChipComponent, isStandalone: true, selector: "onemrva-mat-choice-chip", inputs: { checked: "checked", disabled: "disabled" }, providers: [
|
|
49
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemrvaMatChoiceChipComponent, isStandalone: true, selector: "onemrva-mat-choice-chip", inputs: { checked: "checked", disabled: "disabled" }, host: { properties: { "style.opacity": "this.opacity" } }, providers: [
|
|
46
50
|
{
|
|
47
51
|
provide: NG_VALUE_ACCESSOR,
|
|
48
52
|
useExisting: forwardRef(() => OnemrvaMatChoiceChipComponent),
|
|
@@ -63,6 +67,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
63
67
|
type: Input
|
|
64
68
|
}], disabled: [{
|
|
65
69
|
type: Input
|
|
70
|
+
}], opacity: [{
|
|
71
|
+
type: HostBinding,
|
|
72
|
+
args: ['style.opacity']
|
|
66
73
|
}] } });
|
|
67
74
|
|
|
68
75
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-choice-chip.mjs","sources":["../../../../projects/onemrva/design-system/mat-choice-chip/src/onemrva-mat-choice-chip.component.ts","../../../../projects/onemrva/design-system/mat-choice-chip/src/onemrva-mat-choice-chip.component.html","../../../../projects/onemrva/design-system/mat-choice-chip/index.ts","../../../../projects/onemrva/design-system/mat-choice-chip/onemrvapublic-design-system-mat-choice-chip.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-choice-chip.mjs","sources":["../../../../projects/onemrva/design-system/mat-choice-chip/src/onemrva-mat-choice-chip.component.ts","../../../../projects/onemrva/design-system/mat-choice-chip/src/onemrva-mat-choice-chip.component.html","../../../../projects/onemrva/design-system/mat-choice-chip/index.ts","../../../../projects/onemrva/design-system/mat-choice-chip/onemrvapublic-design-system-mat-choice-chip.ts"],"sourcesContent":["import {\n Component,\n forwardRef,\n HostBinding,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'onemrva-mat-choice-chip',\n templateUrl: 'onemrva-mat-choice-chip.component.html',\n styleUrl: 'onemrva-mat-choice-chip.component.scss',\n imports: [MatCheckbox],\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OnemrvaMatChoiceChipComponent),\n multi: true,\n },\n ],\n})\nexport class OnemrvaMatChoiceChipComponent extends MatFormFieldControl<any> {\n @Input()\n checked = false;\n\n // TODO : disabled state\n @Input()\n override disabled = false;\n\n _value: any = null;\n\n @HostBinding('style.opacity')\n get opacity() {\n return this.disabled ? 0.4 : 1;\n }\n\n onContainerClick(event: MouseEvent): void {\n //\n }\n\n setDescribedByIds(ids: string[]): void {\n //\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(value: any): void {\n this._value = value;\n this.onChange(this._value);\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","<mat-checkbox [checked]=\"checked\" [disabled]=\"disabled\" color=\"primary\"\n ><ng-content></ng-content\n></mat-checkbox>\n","/*\n * Public API Surface of mat-sticker\n */\n\nexport * from './src/onemrva-mat-choice-chip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA0BM,MAAO,6BAA8B,SAAQ,mBAAwB,CAAA;AAf3E,IAAA,WAAA,GAAA;;QAiBE,IAAA,CAAA,OAAO,GAAG,KAAK;;QAIN,IAAA,CAAA,QAAQ,GAAG,KAAK;QAEzB,IAAA,CAAA,MAAM,GAAQ,IAAI;;AAgBlB,QAAA,IAAA,CAAA,QAAQ,GAAG,CAAC,OAAc,KAAI;;AAE9B,SAAC;;QAGD,IAAA,CAAA,SAAS,GAAG,MAAK;;AAEjB,SAAC;AAoBF;AAzCC,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,CAAC;;AAGhC,IAAA,gB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A,EAAA,eAAA,EAAA,MAAA,EAAA,OAAA,EAAA,eAAA,EAAA,UAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,EAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAWV,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAfzC,SAAS;+BACE,yBAAyB,EAAA,OAAA,EAG1B,CAAC,WAAW,CAAC,EAAA,aAAA,EACP,iBAAiB,CAAC,IAAI,EAAA,UAAA,EACzB,IAAI,EAAA,SAAA,EACL;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,mCAAmC,CAAC;AAC5D,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,gIAAA,EAAA,MAAA,EAAA,CAAA,qjEAAA,CAAA,EAAA;8BAID,OAAO,EAAA,CAAA;sBADN;gBAKQ,QAAQ,EAAA,CAAA;sBADhB;gBAMG,OAAO,EAAA,CAAA;sBADV,WAAW;uBAAC,eAAe;;;AEpC9B;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -10,11 +10,11 @@ class OnemrvaCountryItemComponent {
|
|
|
10
10
|
this.countryName = '';
|
|
11
11
|
}
|
|
12
12
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaCountryItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemrvaCountryItemComponent, isStandalone: true, selector: "mat-country-item", inputs: { countryCode: "countryCode", countryName: "countryName" }, ngImport: i0, template: "<div class=\"onemrva-country-item\">\n <flag-icon [countryCode]=\"countryCode\" />\n <span class=\"description\">{{ countryName }}</span>\n</div>\n", styles: [".onemrva-country-item{display:flex;align-items:center}.onemrva-country-item .description{display:flex;margin-left:.5em;text-transform:capitalize}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: FlagIconComponent, selector: "flag-icon", inputs: ["countryCode", "mode", "width"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: OnemrvaCountryItemComponent, isStandalone: true, selector: "mat-country-item", inputs: { countryCode: "countryCode", countryName: "countryName" }, ngImport: i0, template: "<div class=\"onemrva-country-item\">\n <flag-icon [countryCode]=\"countryCode\" />\n <span class=\"description\">{{ countryName }}</span>\n</div>\n", styles: [".onemrva-country-item{display:flex;align-items:center}.onemrva-country-item .description{display:flex;margin-left:.5em;text-transform:capitalize}.mat-form-field-disabled .onemrva-country-item flag-icon{opacity:.4}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: FlagIconComponent, selector: "flag-icon", inputs: ["countryCode", "mode", "width"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
14
14
|
}
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaCountryItemComponent, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
|
-
args: [{ selector: 'mat-country-item', standalone: true, imports: [CommonModule, TranslateModule, FlagIconComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"onemrva-country-item\">\n <flag-icon [countryCode]=\"countryCode\" />\n <span class=\"description\">{{ countryName }}</span>\n</div>\n", styles: [".onemrva-country-item{display:flex;align-items:center}.onemrva-country-item .description{display:flex;margin-left:.5em;text-transform:capitalize}\n"] }]
|
|
17
|
+
args: [{ selector: 'mat-country-item', standalone: true, imports: [CommonModule, TranslateModule, FlagIconComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"onemrva-country-item\">\n <flag-icon [countryCode]=\"countryCode\" />\n <span class=\"description\">{{ countryName }}</span>\n</div>\n", styles: [".onemrva-country-item{display:flex;align-items:center}.onemrva-country-item .description{display:flex;margin-left:.5em;text-transform:capitalize}.mat-form-field-disabled .onemrva-country-item flag-icon{opacity:.4}\n"] }]
|
|
18
18
|
}], propDecorators: { countryCode: [{
|
|
19
19
|
type: Input
|
|
20
20
|
}], countryName: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-country-item.mjs","sources":["../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.ts","../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.html","../../../../projects/onemrva/design-system/mat-country-item/index.ts","../../../../projects/onemrva/design-system/mat-country-item/onemrvapublic-design-system-mat-country-item.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';\n\n@Component({\n selector: 'mat-country-item',\n styleUrls: ['./onemrva-mat-country-item.component.scss'],\n templateUrl: './onemrva-mat-country-item.component.html',\n standalone: true,\n imports: [CommonModule, TranslateModule, FlagIconComponent],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaCountryItemComponent {\n @Input() countryCode: string | null = 'xx';\n @Input() countryName: string | null | undefined = '';\n}\n","<div class=\"onemrva-country-item\">\n <flag-icon [countryCode]=\"countryCode\" />\n <span class=\"description\">{{ countryName }}</span>\n</div>\n","/*\n * Public API Surface of mat-country-item\n */\n\nexport * from './src/onemrva-mat-country-item.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAca,2BAA2B,CAAA;AARxC,IAAA,WAAA,GAAA;QASW,IAAA,CAAA,WAAW,GAAkB,IAAI;QACjC,IAAA,CAAA,WAAW,GAA8B,EAAE;AACrD;8GAHY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,gJCdxC,uJAIA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-country-item.mjs","sources":["../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.ts","../../../../projects/onemrva/design-system/mat-country-item/src/onemrva-mat-country-item.component.html","../../../../projects/onemrva/design-system/mat-country-item/index.ts","../../../../projects/onemrva/design-system/mat-country-item/onemrvapublic-design-system-mat-country-item.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input, ViewEncapsulation } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';\n\n@Component({\n selector: 'mat-country-item',\n styleUrls: ['./onemrva-mat-country-item.component.scss'],\n templateUrl: './onemrva-mat-country-item.component.html',\n standalone: true,\n imports: [CommonModule, TranslateModule, FlagIconComponent],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaCountryItemComponent {\n @Input() countryCode: string | null = 'xx';\n @Input() countryName: string | null | undefined = '';\n}\n","<div class=\"onemrva-country-item\">\n <flag-icon [countryCode]=\"countryCode\" />\n <span class=\"description\">{{ countryName }}</span>\n</div>\n","/*\n * Public API Surface of mat-country-item\n */\n\nexport * from './src/onemrva-mat-country-item.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;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();
|
|
87
87
|
}
|
|
88
88
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputAddressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputAddressComponent, isStandalone: true, selector: "onemrva-mat-input-address", inputs: { placeholder: "placeholder", readonly: "readonly", address: "address", mode: "mode", label: "label", noEntriesFoundLabel: "noEntriesFoundLabel", hint: "hint", countryCodes: "countryCodes" }, outputs: { getAddress: "getAddress" }, viewQueries: [{ propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "<mat-form-field appearance=\"outline\">\n <mat-label>{{ label | translate }}</mat-label>\n <mat-icon matPrefix [ngClass]=\"{ spin: isLoading }\">\n {{ isLoading ? 'refresh' : 'search' }}\n </mat-icon>\n\n @if (address.value !== '') {\n <mat-icon matSuffix class=\"clickable\" (click)=\"clear()\">close</mat-icon>\n }\n <input\n type=\"text\"\n matInput\n [formControl]=\"address\"\n [readonly]=\"readonly\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder | translate\"\n (keydown.enter)=\"handleEnter()\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectAddress($event.option.value)\"\n >\n @for (result of results$ | async; track result.place_id) {\n <mat-option [value]=\"result\">\n <span class=\"country\">\n <flag-icon [countryCode]=\"result.address['country_code']\" />\n {{ result | addressFormatter }}\n </span>\n </mat-option>\n }\n @if (showNoResult) {\n <mat-option>\n {{ noEntriesFoundLabel | translate }}\n </mat-option>\n }\n </mat-autocomplete>\n</mat-form-field>\n", styles: ["onemrva-mat-input-address mat-form-field{width:100%}onemrva-mat-input-address .spin{animation:spin 1s linear infinite}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.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: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.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: 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: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FlagIconComponent, selector: "flag-icon", inputs: ["countryCode", "mode", "width"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: OSMAddressFormatPipe, name: "addressFormatter" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputAddressComponent, isStandalone: true, selector: "onemrva-mat-input-address", inputs: { placeholder: "placeholder", readonly: "readonly", address: "address", mode: "mode", label: "label", noEntriesFoundLabel: "noEntriesFoundLabel", hint: "hint", countryCodes: "countryCodes" }, outputs: { getAddress: "getAddress" }, viewQueries: [{ propertyName: "autocompleteTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], ngImport: i0, template: "<mat-form-field appearance=\"outline\">\n <mat-label>{{ label | translate }}</mat-label>\n <mat-icon matPrefix [ngClass]=\"{ spin: isLoading }\">\n {{ isLoading ? 'refresh' : 'search' }}\n </mat-icon>\n\n @if (address.value !== '') {\n <mat-icon matSuffix class=\"clickable\" (click)=\"clear()\">close</mat-icon>\n }\n <input\n type=\"text\"\n matInput\n [formControl]=\"address\"\n [readonly]=\"readonly\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder | translate\"\n (keydown.enter)=\"handleEnter()\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectAddress($event.option.value)\"\n >\n @for (result of results$ | async; track result.place_id) {\n <mat-option [value]=\"result\">\n <span class=\"country\">\n <flag-icon [countryCode]=\"result.address['country_code']\" />\n {{ result | addressFormatter }}\n </span>\n </mat-option>\n }\n @if (showNoResult) {\n <mat-option>\n {{ noEntriesFoundLabel | translate }}\n </mat-option>\n }\n </mat-autocomplete>\n @if (address.invalid) {\n <mat-error>{{ 'input.field.invalid' | translate }}</mat-error>\n }\n</mat-form-field>\n", styles: ["onemrva-mat-input-address mat-form-field{width:100%}onemrva-mat-input-address .spin{animation:spin 1s linear infinite}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.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: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.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: 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: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FlagIconComponent, selector: "flag-icon", inputs: ["countryCode", "mode", "width"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "pipe", type: OSMAddressFormatPipe, name: "addressFormatter" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
90
90
|
}
|
|
91
91
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputAddressComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
@@ -102,7 +102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
102
102
|
MatIcon,
|
|
103
103
|
FlagIconComponent,
|
|
104
104
|
OSMAddressFormatPipe,
|
|
105
|
-
], encapsulation: ViewEncapsulation.None, template: "<mat-form-field appearance=\"outline\">\n <mat-label>{{ label | translate }}</mat-label>\n <mat-icon matPrefix [ngClass]=\"{ spin: isLoading }\">\n {{ isLoading ? 'refresh' : 'search' }}\n </mat-icon>\n\n @if (address.value !== '') {\n <mat-icon matSuffix class=\"clickable\" (click)=\"clear()\">close</mat-icon>\n }\n <input\n type=\"text\"\n matInput\n [formControl]=\"address\"\n [readonly]=\"readonly\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder | translate\"\n (keydown.enter)=\"handleEnter()\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectAddress($event.option.value)\"\n >\n @for (result of results$ | async; track result.place_id) {\n <mat-option [value]=\"result\">\n <span class=\"country\">\n <flag-icon [countryCode]=\"result.address['country_code']\" />\n {{ result | addressFormatter }}\n </span>\n </mat-option>\n }\n @if (showNoResult) {\n <mat-option>\n {{ noEntriesFoundLabel | translate }}\n </mat-option>\n }\n </mat-autocomplete>\n</mat-form-field>\n", styles: ["onemrva-mat-input-address mat-form-field{width:100%}onemrva-mat-input-address .spin{animation:spin 1s linear infinite}\n"] }]
|
|
105
|
+
], encapsulation: ViewEncapsulation.None, template: "<mat-form-field appearance=\"outline\">\n <mat-label>{{ label | translate }}</mat-label>\n <mat-icon matPrefix [ngClass]=\"{ spin: isLoading }\">\n {{ isLoading ? 'refresh' : 'search' }}\n </mat-icon>\n\n @if (address.value !== '') {\n <mat-icon matSuffix class=\"clickable\" (click)=\"clear()\">close</mat-icon>\n }\n <input\n type=\"text\"\n matInput\n [formControl]=\"address\"\n [readonly]=\"readonly\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder | translate\"\n (keydown.enter)=\"handleEnter()\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectAddress($event.option.value)\"\n >\n @for (result of results$ | async; track result.place_id) {\n <mat-option [value]=\"result\">\n <span class=\"country\">\n <flag-icon [countryCode]=\"result.address['country_code']\" />\n {{ result | addressFormatter }}\n </span>\n </mat-option>\n }\n @if (showNoResult) {\n <mat-option>\n {{ noEntriesFoundLabel | translate }}\n </mat-option>\n }\n </mat-autocomplete>\n @if (address.invalid) {\n <mat-error>{{ 'input.field.invalid' | translate }}</mat-error>\n }\n</mat-form-field>\n", styles: ["onemrva-mat-input-address mat-form-field{width:100%}onemrva-mat-input-address .spin{animation:spin 1s linear infinite}\n"] }]
|
|
106
106
|
}], propDecorators: { placeholder: [{
|
|
107
107
|
type: Input
|
|
108
108
|
}], readonly: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-input-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-address/src/format-osm.directive.ts","../../../../projects/onemrva/design-system/mat-input-address/src/onemrva-mat-input-address.component.ts","../../../../projects/onemrva/design-system/mat-input-address/src/onemrva-mat-input-address.component.html","../../../../projects/onemrva/design-system/mat-input-address/index.ts","../../../../projects/onemrva/design-system/mat-input-address/onemrvapublic-design-system-mat-input-address.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\n\n@Pipe({\n name: 'addressFormatter',\n standalone: true,\n})\nexport class OSMAddressFormatPipe implements PipeTransform {\n transform(result: OSMResult): string {\n if (result.address.country_code !== 'be') {\n return result.display_name;\n }\n\n const town =\n result.address.village || result.address.city || result.address.town;\n if (result.address.house_number) {\n return `${result.address.road} ${result.address.house_number}, ${result.address.postcode} ${town}`;\n }\n\n return `${result.address.road}, ${result.address.postcode} ${town}`;\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n OnInit,\n ViewChild,\n inject,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { debounceTime, switchMap, Observable, startWith, map, of } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule } from '@ngx-translate/core';\nimport {\n MatAutocomplete,\n MatAutocompleteTrigger,\n} from '@angular/material/autocomplete';\nimport { MatIcon } from '@angular/material/icon';\nimport { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';\nimport {\n OnemRvaOSMService,\n OSMResult,\n} from '@onemrvapublic/design-system/shared';\nimport { OSMAddressFormatPipe } from './format-osm.directive';\n\n@Component({\n selector: 'onemrva-mat-input-address',\n styleUrls: ['onemrva-mat-input-address.component.scss'],\n templateUrl: 'onemrva-mat-input-address.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n ReactiveFormsModule,\n TranslateModule,\n MatAutocompleteTrigger,\n MatAutocomplete,\n MatIcon,\n FlagIconComponent,\n OSMAddressFormatPipe,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputAddressComponent implements OnInit {\n @Input() placeholder = 'input.address.placeholder';\n @Input() readonly = false;\n @Input() address!: FormControl;\n @Input() mode: 'road-only' | 'full' = 'full';\n @Input() label = 'input.address.label';\n @Input() noEntriesFoundLabel = 'input.address.not-found';\n @Input() hint = '';\n @Input() countryCodes = ['be'];\n @Output() getAddress = new EventEmitter<OSMResult>();\n\n @ViewChild(MatAutocompleteTrigger, { static: false })\n autocompleteTrigger!: MatAutocompleteTrigger;\n\n results$!: Observable<OSMResult[]>;\n\n private readonly osm = inject(OnemRvaOSMService);\n\n isLoading = false;\n\n firstResult: null | OSMResult = null;\n showNoResult = false;\n\n ngOnInit(): void {\n this.results$ = this.address.valueChanges.pipe(\n startWith(''),\n debounceTime(300),\n switchMap((value: string) => {\n this.showNoResult = false;\n this.firstResult = null;\n if (!value || value.length <= 2) {\n this.isLoading = false;\n this.autocompleteTrigger.closePanel();\n return of([]);\n }\n\n this.isLoading = true;\n return this.osm.searchAddress(value, this.countryCodes).pipe(\n map(results => {\n this.showNoResult = results.length === 0;\n this.isLoading = false;\n this.firstResult = results[0];\n return results;\n }),\n );\n }),\n );\n }\n\n selectAddress(address: OSMResult, emit = true) {\n const finalValue =\n this.mode === 'road-only' ? address.address.road : address.display_name;\n\n this.address.setValue(finalValue, { emitEvent: emit });\n this.getAddress.emit(address);\n }\n\n clear() {\n this.address.setValue('');\n }\n\n handleEnter() {\n if (this.firstResult !== null) this.selectAddress(this.firstResult, false);\n this.autocompleteTrigger.closePanel();\n }\n}\n","<mat-form-field appearance=\"outline\">\n <mat-label>{{ label | translate }}</mat-label>\n <mat-icon matPrefix [ngClass]=\"{ spin: isLoading }\">\n {{ isLoading ? 'refresh' : 'search' }}\n </mat-icon>\n\n @if (address.value !== '') {\n <mat-icon matSuffix class=\"clickable\" (click)=\"clear()\">close</mat-icon>\n }\n <input\n type=\"text\"\n matInput\n [formControl]=\"address\"\n [readonly]=\"readonly\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder | translate\"\n (keydown.enter)=\"handleEnter()\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectAddress($event.option.value)\"\n >\n @for (result of results$ | async; track result.place_id) {\n <mat-option [value]=\"result\">\n <span class=\"country\">\n <flag-icon [countryCode]=\"result.address['country_code']\" />\n {{ result | addressFormatter }}\n </span>\n </mat-option>\n }\n @if (showNoResult) {\n <mat-option>\n {{ noEntriesFoundLabel | translate }}\n </mat-option>\n }\n </mat-autocomplete>\n</mat-form-field>\n","/*\n * Public API Surface of mat-bank-account-input\n */\n\nexport * from './src/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AA,EAAA,CAAA,0HAAA,CAAA,EAAA;8BAG5B,WAAW,EAAA,CAAA;sBAAnB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBAGD,mBAAmB,EAAA,CAAA;sBADlB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;;AE5DtD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-input-address.mjs","sources":["../../../../projects/onemrva/design-system/mat-input-address/src/format-osm.directive.ts","../../../../projects/onemrva/design-system/mat-input-address/src/onemrva-mat-input-address.component.ts","../../../../projects/onemrva/design-system/mat-input-address/src/onemrva-mat-input-address.component.html","../../../../projects/onemrva/design-system/mat-input-address/index.ts","../../../../projects/onemrva/design-system/mat-input-address/onemrvapublic-design-system-mat-input-address.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { OSMResult } from '@onemrvapublic/design-system/shared';\n\n@Pipe({\n name: 'addressFormatter',\n standalone: true,\n})\nexport class OSMAddressFormatPipe implements PipeTransform {\n transform(result: OSMResult): string {\n if (result.address.country_code !== 'be') {\n return result.display_name;\n }\n\n const town =\n result.address.village || result.address.city || result.address.town;\n if (result.address.house_number) {\n return `${result.address.road} ${result.address.house_number}, ${result.address.postcode} ${town}`;\n }\n\n return `${result.address.road}, ${result.address.postcode} ${town}`;\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n OnInit,\n ViewChild,\n inject,\n} from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { debounceTime, switchMap, Observable, startWith, map, of } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule } from '@ngx-translate/core';\nimport {\n MatAutocomplete,\n MatAutocompleteTrigger,\n} from '@angular/material/autocomplete';\nimport { MatIcon } from '@angular/material/icon';\nimport { FlagIconComponent } from '@onemrvapublic/design-system/flag-icon';\nimport {\n OnemRvaOSMService,\n OSMResult,\n} from '@onemrvapublic/design-system/shared';\nimport { OSMAddressFormatPipe } from './format-osm.directive';\n\n@Component({\n selector: 'onemrva-mat-input-address',\n styleUrls: ['onemrva-mat-input-address.component.scss'],\n templateUrl: 'onemrva-mat-input-address.component.html',\n standalone: true,\n imports: [\n CommonModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n ReactiveFormsModule,\n TranslateModule,\n MatAutocompleteTrigger,\n MatAutocomplete,\n MatIcon,\n FlagIconComponent,\n OSMAddressFormatPipe,\n ],\n encapsulation: ViewEncapsulation.None,\n})\nexport class OnemrvaMatInputAddressComponent implements OnInit {\n @Input() placeholder = 'input.address.placeholder';\n @Input() readonly = false;\n @Input() address!: FormControl;\n @Input() mode: 'road-only' | 'full' = 'full';\n @Input() label = 'input.address.label';\n @Input() noEntriesFoundLabel = 'input.address.not-found';\n @Input() hint = '';\n @Input() countryCodes = ['be'];\n @Output() getAddress = new EventEmitter<OSMResult>();\n\n @ViewChild(MatAutocompleteTrigger, { static: false })\n autocompleteTrigger!: MatAutocompleteTrigger;\n\n results$!: Observable<OSMResult[]>;\n\n private readonly osm = inject(OnemRvaOSMService);\n\n isLoading = false;\n\n firstResult: null | OSMResult = null;\n showNoResult = false;\n\n ngOnInit(): void {\n this.results$ = this.address.valueChanges.pipe(\n startWith(''),\n debounceTime(300),\n switchMap((value: string) => {\n this.showNoResult = false;\n this.firstResult = null;\n if (!value || value.length <= 2) {\n this.isLoading = false;\n this.autocompleteTrigger.closePanel();\n return of([]);\n }\n\n this.isLoading = true;\n return this.osm.searchAddress(value, this.countryCodes).pipe(\n map(results => {\n this.showNoResult = results.length === 0;\n this.isLoading = false;\n this.firstResult = results[0];\n return results;\n }),\n );\n }),\n );\n }\n\n selectAddress(address: OSMResult, emit = true) {\n const finalValue =\n this.mode === 'road-only' ? address.address.road : address.display_name;\n\n this.address.setValue(finalValue, { emitEvent: emit });\n this.getAddress.emit(address);\n }\n\n clear() {\n this.address.setValue('');\n }\n\n handleEnter() {\n if (this.firstResult !== null) this.selectAddress(this.firstResult, false);\n this.autocompleteTrigger.closePanel();\n }\n}\n","<mat-form-field appearance=\"outline\">\n <mat-label>{{ label | translate }}</mat-label>\n <mat-icon matPrefix [ngClass]=\"{ spin: isLoading }\">\n {{ isLoading ? 'refresh' : 'search' }}\n </mat-icon>\n\n @if (address.value !== '') {\n <mat-icon matSuffix class=\"clickable\" (click)=\"clear()\">close</mat-icon>\n }\n <input\n type=\"text\"\n matInput\n [formControl]=\"address\"\n [readonly]=\"readonly\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder | translate\"\n (keydown.enter)=\"handleEnter()\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectAddress($event.option.value)\"\n >\n @for (result of results$ | async; track result.place_id) {\n <mat-option [value]=\"result\">\n <span class=\"country\">\n <flag-icon [countryCode]=\"result.address['country_code']\" />\n {{ result | addressFormatter }}\n </span>\n </mat-option>\n }\n @if (showNoResult) {\n <mat-option>\n {{ noEntriesFoundLabel | translate }}\n </mat-option>\n }\n </mat-autocomplete>\n @if (address.invalid) {\n <mat-error>{{ 'input.field.invalid' | 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-address.component';\n","/**\n * Generated bundle index. Do not edit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BACjB,oBAAoB;qBACrB,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,oxCAAA,EAAA,MAAA,EAAA,CAAA,0HAAA,CAAA,EAAA;8BAG5B,WAAW,EAAA,CAAA;sBAAnB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,mBAAmB,EAAA,CAAA;sBAA3B;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBAGD,mBAAmB,EAAA,CAAA;sBADlB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;;AE5DtD;;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, signal, inject, Output,
|
|
4
|
+
import { input, EventEmitter, signal, 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,14 +19,14 @@ import { OnemrvaCountryItemComponent } from '@onemrvapublic/design-system/mat-co
|
|
|
19
19
|
|
|
20
20
|
class OnemrvaMatInputBirthPlaceComponent {
|
|
21
21
|
constructor() {
|
|
22
|
-
this.readonly = false;
|
|
23
|
-
this.countryCode = new FormControl(null);
|
|
24
|
-
this.label = 'Country';
|
|
25
|
-
this.noEntriesFoundLabel = 'Not found';
|
|
26
|
-
this.hint = '';
|
|
27
|
-
this.placeholderLabel = 'Search';
|
|
28
|
-
this.searchAriaLabel = '';
|
|
29
|
-
this.returnValue = 'object';
|
|
22
|
+
this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
|
|
23
|
+
this.countryCode = input(new FormControl(null), ...(ngDevMode ? [{ debugName: "countryCode" }] : []));
|
|
24
|
+
this.label = input('Country', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
25
|
+
this.noEntriesFoundLabel = input('Not found', ...(ngDevMode ? [{ debugName: "noEntriesFoundLabel" }] : []));
|
|
26
|
+
this.hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : []));
|
|
27
|
+
this.placeholderLabel = input('Search', ...(ngDevMode ? [{ debugName: "placeholderLabel" }] : []));
|
|
28
|
+
this.searchAriaLabel = input('', ...(ngDevMode ? [{ debugName: "searchAriaLabel" }] : []));
|
|
29
|
+
this.returnValue = input('object', ...(ngDevMode ? [{ debugName: "returnValue" }] : []));
|
|
30
30
|
this.getCountry = new EventEmitter();
|
|
31
31
|
this.selectedCountryName = signal(null, ...(ngDevMode ? [{ debugName: "selectedCountryName" }] : []));
|
|
32
32
|
this.selectedCountryCode = signal(null, ...(ngDevMode ? [{ debugName: "selectedCountryCode" }] : []));
|
|
@@ -62,8 +62,8 @@ class OnemrvaMatInputBirthPlaceComponent {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
ngOnInit() {
|
|
65
|
-
this.countryCode
|
|
66
|
-
.pipe(startWith(this.countryCode.value), takeUntil(this.destroyNotifier$))
|
|
65
|
+
this.countryCode()
|
|
66
|
+
.valueChanges.pipe(startWith(this.countryCode().value), takeUntil(this.destroyNotifier$))
|
|
67
67
|
.subscribe(country => {
|
|
68
68
|
this.selectedCountryName.set(null);
|
|
69
69
|
this.selectedCountryCode.set(null);
|
|
@@ -94,7 +94,7 @@ class OnemrvaMatInputBirthPlaceComponent {
|
|
|
94
94
|
return 'input.country.unknown.error';
|
|
95
95
|
}
|
|
96
96
|
getValue(country) {
|
|
97
|
-
switch (this.returnValue) {
|
|
97
|
+
switch (this.returnValue()) {
|
|
98
98
|
case 'id':
|
|
99
99
|
return country.id;
|
|
100
100
|
case 'code':
|
|
@@ -105,7 +105,7 @@ class OnemrvaMatInputBirthPlaceComponent {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputBirthPlaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputBirthPlaceComponent, isStandalone: true, selector: "onemrva-mat-input-birthplace", inputs: { readonly: "readonly", countryCode: "countryCode", label: "label", noEntriesFoundLabel: "noEntriesFoundLabel", hint: "hint", placeholderLabel: "placeholderLabel", searchAriaLabel: "searchAriaLabel", returnValue: "returnValue" }, outputs: { getCountry: "getCountry" }, ngImport: i0, template: "<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", styles: ["mat-option.mdc-list-item .mdc-list-item__primary-text{width:100%}\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 }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: OnemrvaMatInputBirthPlaceComponent, isStandalone: true, selector: "onemrva-mat-input-birthplace", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, countryCode: { classPropertyName: "countryCode", publicName: "countryCode", 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 }, returnValue: { classPropertyName: "returnValue", publicName: "returnValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { getCountry: "getCountry" }, ngImport: i0, template: "<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", styles: ["mat-option.mdc-list-item .mdc-list-item__primary-text{width:100%}\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 }); }
|
|
109
109
|
}
|
|
110
110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: OnemrvaMatInputBirthPlaceComponent, decorators: [{
|
|
111
111
|
type: Component,
|
|
@@ -118,24 +118,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
118
118
|
ReactiveFormsModule,
|
|
119
119
|
TranslateModule,
|
|
120
120
|
OnemrvaCountryItemComponent,
|
|
121
|
-
], encapsulation: ViewEncapsulation.None, template: "<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", styles: ["mat-option.mdc-list-item .mdc-list-item__primary-text{width:100%}\n"] }]
|
|
122
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
123
|
-
type: Input
|
|
124
|
-
}], countryCode: [{
|
|
125
|
-
type: Input
|
|
126
|
-
}], label: [{
|
|
127
|
-
type: Input
|
|
128
|
-
}], noEntriesFoundLabel: [{
|
|
129
|
-
type: Input
|
|
130
|
-
}], hint: [{
|
|
131
|
-
type: Input
|
|
132
|
-
}], placeholderLabel: [{
|
|
133
|
-
type: Input
|
|
134
|
-
}], searchAriaLabel: [{
|
|
135
|
-
type: Input
|
|
136
|
-
}], returnValue: [{
|
|
137
|
-
type: Input
|
|
138
|
-
}], getCountry: [{
|
|
121
|
+
], encapsulation: ViewEncapsulation.None, template: "<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", styles: ["mat-option.mdc-list-item .mdc-list-item__primary-text{width:100%}\n"] }]
|
|
122
|
+
}], ctorParameters: () => [], propDecorators: { getCountry: [{
|
|
139
123
|
type: Output
|
|
140
124
|
}] } });
|
|
141
125
|
|
|
@@ -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;AAE9C,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAgB,IAAI,+DAAC;AACjD,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAgB,IAAI,+DAAC;AAE1C,QAAA,IAAA,CAAA,UAAU,GAA+B,IAAI,WAAW,CAAS,EAAE,CAAC;AAE3E,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAQ;AAE/B,QAAA,IAAA,CAAA,kBAAkB,GAAuC,EAAE,CAAC,EAAE,CAAC;AAE9D,QAAA,IAAA,CAAA,0BAA0B,GAAG,MAAM,CAAC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;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,QAAQ,uDAAC;AAEnB,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAO;AAE9C,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAgB,IAAI,+DAAC;AACjD,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAgB,IAAI,+DAAC;AAE1C,QAAA,IAAA,CAAA,UAAU,GAA+B,IAAI,WAAW,CAAS,EAAE,CAAC;AAE3E,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAQ;AAE/B,QAAA,IAAA,CAAA,kBAAkB,GAA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