@hmcts/rpx-xui-common-lib 1.8.7-address-lookup → 1.8.7-address-component
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/bundles/hmcts-rpx-xui-common-lib.umd.js +7 -7
- package/bundles/hmcts-rpx-xui-common-lib.umd.js.map +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js +1 -1
- package/bundles/hmcts-rpx-xui-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/components/write-address/write-address.component.js +8 -8
- package/fesm2015/hmcts-rpx-xui-common-lib.js +7 -7
- package/fesm2015/hmcts-rpx-xui-common-lib.js.map +1 -1
- package/hmcts-rpx-xui-common-lib.metadata.json +1 -1
- package/lib/components/write-address/write-address.component.d.ts +0 -1
- package/package.json +1 -1
|
@@ -4850,6 +4850,9 @@
|
|
|
4850
4850
|
this.addressesService = addressesService;
|
|
4851
4851
|
}
|
|
4852
4852
|
WriteAddressFieldComponent.prototype.ngOnInit = function () {
|
|
4853
|
+
if (!this.formGroup.get('address')) {
|
|
4854
|
+
this.formGroup.addControl('address', new forms.FormControl({}));
|
|
4855
|
+
}
|
|
4853
4856
|
this.postcode = new forms.FormControl('');
|
|
4854
4857
|
this.addressFormGroup.addControl('postcode', this.postcode);
|
|
4855
4858
|
this.addressList = new forms.FormControl('');
|
|
@@ -4891,7 +4894,7 @@
|
|
|
4891
4894
|
if (this.isExpanded) {
|
|
4892
4895
|
return true;
|
|
4893
4896
|
}
|
|
4894
|
-
var address = this.
|
|
4897
|
+
var address = this.formGroup.get('address').value;
|
|
4895
4898
|
var hasAddress = false;
|
|
4896
4899
|
if (address) {
|
|
4897
4900
|
Object.keys(address).forEach(function (key) {
|
|
@@ -4904,7 +4907,6 @@
|
|
|
4904
4907
|
};
|
|
4905
4908
|
WriteAddressFieldComponent.prototype.addressSelected = function () {
|
|
4906
4909
|
this.addressField = this.addressList.value;
|
|
4907
|
-
console.log('address fields', this.addressField);
|
|
4908
4910
|
this.setFormValue();
|
|
4909
4911
|
};
|
|
4910
4912
|
WriteAddressFieldComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -4921,10 +4923,9 @@
|
|
|
4921
4923
|
: "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
|
|
4922
4924
|
};
|
|
4923
4925
|
WriteAddressFieldComponent.prototype.setFormValue = function () {
|
|
4924
|
-
if (this.
|
|
4925
|
-
this.
|
|
4926
|
+
if (this.formGroup) {
|
|
4927
|
+
this.formGroup.get('address').patchValue(this.addressField);
|
|
4926
4928
|
}
|
|
4927
|
-
console.log(this.lookupFormControl, 'is form control');
|
|
4928
4929
|
};
|
|
4929
4930
|
return WriteAddressFieldComponent;
|
|
4930
4931
|
}());
|
|
@@ -4940,8 +4941,7 @@
|
|
|
4940
4941
|
]; };
|
|
4941
4942
|
WriteAddressFieldComponent.propDecorators = {
|
|
4942
4943
|
formGroup: [{ type: i0.Input }],
|
|
4943
|
-
isExpanded: [{ type: i0.Input }]
|
|
4944
|
-
lookupFormControl: [{ type: i0.Input }]
|
|
4944
|
+
isExpanded: [{ type: i0.Input }]
|
|
4945
4945
|
};
|
|
4946
4946
|
|
|
4947
4947
|
var FeatureToggleDirective = /** @class */ (function () {
|