ng-easycommerce 0.0.600 → 0.0.601
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/README.md +2 -0
- package/bundles/ng-easycommerce.umd.js +7 -6
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +8 -7
- package/esm5/lib/ec-component/checkout-ec/dataform-ec/dataform-ec.component.js +8 -7
- package/fesm2015/ng-easycommerce.js +7 -6
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +7 -6
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -8114,14 +8114,15 @@ var DataFormEcComponent = /** @class */ (function (_super) {
|
|
|
8114
8114
|
:
|
|
8115
8115
|
[];
|
|
8116
8116
|
_this.provincesSubject.next(provinces);
|
|
8117
|
-
|
|
8117
|
+
if (provinces.length) {
|
|
8118
|
+
_this.checkoutForm.controls['provinceCode'].setValue(provinces[0].code);
|
|
8119
|
+
}
|
|
8118
8120
|
//Document types
|
|
8119
|
-
var documentTypes =
|
|
8120
|
-
_this.countriesSubject.value.find(function (country) { return country.code == value; }).documentTypes
|
|
8121
|
-
:
|
|
8122
|
-
[];
|
|
8121
|
+
var documentTypes = selectedCountry ? selectedCountry.documentTypes : [];
|
|
8123
8122
|
_this.documentTypesSubject.next(documentTypes);
|
|
8124
|
-
|
|
8123
|
+
if (documentTypes.length) {
|
|
8124
|
+
_this.checkoutForm.controls['documentType'].setValue(documentTypes[0].code);
|
|
8125
|
+
}
|
|
8125
8126
|
var selectedDocumentType = documentTypes.find(function (doc) { return doc.code == _this.checkoutForm.controls['documentType'].value; });
|
|
8126
8127
|
if (selectedDocumentType) {
|
|
8127
8128
|
_this.updateDocumentValidation(selectedDocumentType);
|