@ikas/storefront 0.1.18 → 0.1.20
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.
|
@@ -26,7 +26,7 @@ export default class AddressFormViewModel {
|
|
|
26
26
|
states: IkasState[];
|
|
27
27
|
cities: IkasCity[];
|
|
28
28
|
districts: IkasDistrict[];
|
|
29
|
-
myCountryCode?: string;
|
|
29
|
+
myCountryCode?: string | null;
|
|
30
30
|
constructor(data: AddressFormViewModelParams);
|
|
31
31
|
get firstName(): string | null | undefined;
|
|
32
32
|
get lastName(): string | null | undefined;
|
package/build/index.es.js
CHANGED
|
@@ -68376,6 +68376,9 @@ function (_React$Component) {
|
|
|
68376
68376
|
var FormItem = observer(function (props) {
|
|
68377
68377
|
var t = useTranslation().t;
|
|
68378
68378
|
var _a = useState(function () { return new FormItemViewModel(props); }), vm = _a[0], setVM = _a[1];
|
|
68379
|
+
if (props.type === FormItemType.TEL) {
|
|
68380
|
+
console.log("TEL form item.");
|
|
68381
|
+
}
|
|
68379
68382
|
useEffect(function () {
|
|
68380
68383
|
ReactTooltip.rebuild();
|
|
68381
68384
|
}, []);
|
|
@@ -68440,8 +68443,11 @@ var FormItem = observer(function (props) {
|
|
|
68440
68443
|
});
|
|
68441
68444
|
}, [props.onChange]);
|
|
68442
68445
|
useEffect(function () {
|
|
68443
|
-
|
|
68446
|
+
console.log("currentCountry:", props.currentCountryCode);
|
|
68447
|
+
if (!vm.country && props.currentCountryCode) {
|
|
68448
|
+
console.log("onchange");
|
|
68444
68449
|
vm.onPhoneChange(props.currentCountryCode);
|
|
68450
|
+
}
|
|
68445
68451
|
}, [props.currentCountryCode]);
|
|
68446
68452
|
return (createElement("div", { className: vm.formItemStyle, style: props.style },
|
|
68447
68453
|
createElement("div", { className: styles.FormItemWrapper },
|
|
@@ -68696,6 +68702,7 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
68696
68702
|
this.states = [];
|
|
68697
68703
|
this.cities = [];
|
|
68698
68704
|
this.districts = [];
|
|
68705
|
+
this.myCountryCode = null;
|
|
68699
68706
|
this.fillDropdownOptions = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
68700
68707
|
return __generator(this, function (_a) {
|
|
68701
68708
|
switch (_a.label) {
|
package/build/index.js
CHANGED
|
@@ -68355,6 +68355,9 @@ function (_React$Component) {
|
|
|
68355
68355
|
var FormItem = mobxReactLite.observer(function (props) {
|
|
68356
68356
|
var t = useTranslation().t;
|
|
68357
68357
|
var _a = React.useState(function () { return new FormItemViewModel(props); }), vm = _a[0], setVM = _a[1];
|
|
68358
|
+
if (props.type === FormItemType.TEL) {
|
|
68359
|
+
console.log("TEL form item.");
|
|
68360
|
+
}
|
|
68358
68361
|
React.useEffect(function () {
|
|
68359
68362
|
ReactTooltip.rebuild();
|
|
68360
68363
|
}, []);
|
|
@@ -68419,8 +68422,11 @@ var FormItem = mobxReactLite.observer(function (props) {
|
|
|
68419
68422
|
});
|
|
68420
68423
|
}, [props.onChange]);
|
|
68421
68424
|
React.useEffect(function () {
|
|
68422
|
-
|
|
68425
|
+
console.log("currentCountry:", props.currentCountryCode);
|
|
68426
|
+
if (!vm.country && props.currentCountryCode) {
|
|
68427
|
+
console.log("onchange");
|
|
68423
68428
|
vm.onPhoneChange(props.currentCountryCode);
|
|
68429
|
+
}
|
|
68424
68430
|
}, [props.currentCountryCode]);
|
|
68425
68431
|
return (React.createElement("div", { className: vm.formItemStyle, style: props.style },
|
|
68426
68432
|
React.createElement("div", { className: styles.FormItemWrapper },
|
|
@@ -68675,6 +68681,7 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
68675
68681
|
this.states = [];
|
|
68676
68682
|
this.cities = [];
|
|
68677
68683
|
this.districts = [];
|
|
68684
|
+
this.myCountryCode = null;
|
|
68678
68685
|
this.fillDropdownOptions = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
68679
68686
|
return __generator(this, function (_a) {
|
|
68680
68687
|
switch (_a.label) {
|