@onemrvapublic/design-system 20.3.0-develop.5 → 20.3.0
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-mat-address.mjs +2 -2
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-shared.mjs +1 -0
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system.mjs +3 -2
- package/fesm2022/onemrvapublic-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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=\"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 <
|
|
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=\"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 <
|
|
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=\"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 <mat-form-field class=\"col-12-small col-8-medium\">\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","/*\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,IA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ChC,qBAAA,EAAA,UAAA,EAEW,IAAI,EAAA,QAAA,EAAA,wqEAAA,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
|
+
{"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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