@ikas/storefront 0.0.163-alpha.14 → 0.0.163-alpha.16
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.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IkasOrderAddress } from "../../../../models/data/order/address/index";
|
|
2
2
|
import { IkasCountry, IkasState, IkasCity, IkasDistrict, IkasCustomerAddress } from "../../../../models/index";
|
|
3
|
+
import CheckoutViewModel from "../../model";
|
|
3
4
|
declare type Callback = ((value: string) => void) | null | undefined;
|
|
4
5
|
export interface AddressFormViewModelParams {
|
|
6
|
+
checkoutViewModel: CheckoutViewModel;
|
|
5
7
|
address: IkasOrderAddress | IkasCustomerAddress;
|
|
6
8
|
isCorporate?: boolean;
|
|
7
9
|
isErrorsVisible: boolean;
|
|
@@ -13,6 +15,7 @@ export interface AddressFormViewModelParams {
|
|
|
13
15
|
lastNameChangeCallback?: Callback;
|
|
14
16
|
}
|
|
15
17
|
export default class AddressFormViewModel {
|
|
18
|
+
checkoutViewModel: CheckoutViewModel;
|
|
16
19
|
address: IkasOrderAddress | IkasCustomerAddress;
|
|
17
20
|
isCorporate: boolean;
|
|
18
21
|
isErrorsVisible: boolean;
|
package/build/index.es.js
CHANGED
|
@@ -59996,7 +59996,8 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
59996
59996
|
});
|
|
59997
59997
|
}); };
|
|
59998
59998
|
this.listCountries = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
59999
|
-
var countries, currentRouting_1;
|
|
59999
|
+
var countries, currentRouting_1, currentCountry;
|
|
60000
|
+
var _this = this;
|
|
60000
60001
|
var _a, _b;
|
|
60001
60002
|
return __generator(this, function (_c) {
|
|
60002
60003
|
switch (_c.label) {
|
|
@@ -60012,6 +60013,12 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
60012
60013
|
this.countries = countries;
|
|
60013
60014
|
if (this.countries.length === 1 && !this.country)
|
|
60014
60015
|
this.onCountryChange(this.countries[0].id);
|
|
60016
|
+
else if (this.checkoutViewModel.store.currentCountryCode) {
|
|
60017
|
+
currentCountry = this.countries.find(function (c) { return c.iso2 === _this.checkoutViewModel.store.currentCountryCode; });
|
|
60018
|
+
if (currentCountry) {
|
|
60019
|
+
this.onCountryChange(currentCountry.id);
|
|
60020
|
+
}
|
|
60021
|
+
}
|
|
60015
60022
|
return [3 /*break*/, 3];
|
|
60016
60023
|
case 2:
|
|
60017
60024
|
_c.sent();
|
|
@@ -60213,6 +60220,7 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
60213
60220
|
this.onTaxOfficeChange = function (value) {
|
|
60214
60221
|
_this.address.taxOffice = value;
|
|
60215
60222
|
};
|
|
60223
|
+
this.checkoutViewModel = data.checkoutViewModel;
|
|
60216
60224
|
this.address = data.address;
|
|
60217
60225
|
this.isCorporate = data.isCorporate || false;
|
|
60218
60226
|
this.isErrorsVisible = data.isErrorsVisible || false;
|
|
@@ -60653,7 +60661,7 @@ var CustomerAddresses = function (_a) {
|
|
|
60653
60661
|
var CustomerAddresses$1 = observer(CustomerAddresses);
|
|
60654
60662
|
var CustomerAddressForm = observer(function (_a) {
|
|
60655
60663
|
var vm = _a.vm;
|
|
60656
|
-
return (createElement(AddressForm$1, { address: vm.editingCustomerAddress || vm.address, isErrorsVisible: vm.isEditAddressErrorsVisible || vm.vm.isErrorsVisible, allowedCountryIds: vm.vm.shippingCountryIds || undefined, firstNameChangeCallback: vm.firstNameChangeCallback, lastNameChangeCallback: vm.lastNameChangeCallback, allowTitleChange: !!vm.editingCustomerAddress }));
|
|
60664
|
+
return (createElement(AddressForm$1, { checkoutViewModel: vm.vm, address: vm.editingCustomerAddress || vm.address, isErrorsVisible: vm.isEditAddressErrorsVisible || vm.vm.isErrorsVisible, allowedCountryIds: vm.vm.shippingCountryIds || undefined, firstNameChangeCallback: vm.firstNameChangeCallback, lastNameChangeCallback: vm.lastNameChangeCallback, allowTitleChange: !!vm.editingCustomerAddress }));
|
|
60657
60665
|
});
|
|
60658
60666
|
var SaveAddressCheckboxAndTitle = observer(function (_a) {
|
|
60659
60667
|
var vm = _a.vm;
|
|
@@ -61633,6 +61641,15 @@ var StockError = observer(function (_a) {
|
|
|
61633
61641
|
}, text: t("checkout-page:actions.continue"), isLoading: isLoading, onClick: onContinueClick }))) }));
|
|
61634
61642
|
});
|
|
61635
61643
|
|
|
61644
|
+
var css_248z$o = ".style-module_Container__1f6or {\n width: 100vw;\n height: 100vh;\n background-color: var(--checkout-primary-bg-color);\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Container__1f6or .style-module_loader__VCfEE,\n .style-module_Container__1f6or .style-module_loader__VCfEE:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Container__1f6or .style-module_loader__VCfEE {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid var(--checkout-button-bg-color);\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__3N32j 1.1s infinite linear;\n animation: style-module_load8__3N32j 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
|
|
61645
|
+
var styles$n = {"Container":"style-module_Container__1f6or","loader":"style-module_loader__VCfEE","load8":"style-module_load8__3N32j"};
|
|
61646
|
+
styleInject(css_248z$o);
|
|
61647
|
+
|
|
61648
|
+
var FullscreenLoading = function () {
|
|
61649
|
+
return (createElement("div", { className: styles$n.Container },
|
|
61650
|
+
createElement("div", { className: styles$n.loader })));
|
|
61651
|
+
};
|
|
61652
|
+
|
|
61636
61653
|
var IkasCheckoutPage = function (_a) {
|
|
61637
61654
|
var _b, _c, _d;
|
|
61638
61655
|
var checkout = _a.checkout, checkoutSettings = _a.checkoutSettings, customizationProps = _a.customizationProps, returnPolicy = _a.returnPolicy, privacyPolicy = _a.privacyPolicy, termsOfService = _a.termsOfService, queryParams = _a.queryParams;
|
|
@@ -61670,7 +61687,7 @@ var IkasCheckoutPage = function (_a) {
|
|
|
61670
61687
|
document.documentElement.style.setProperty("--checkout-success-light-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.successLightColor) || "#F6FFED");
|
|
61671
61688
|
}, [customizationProps]);
|
|
61672
61689
|
if (!vm.isCheckoutLoaded || !vm.store.customerStore.initialized)
|
|
61673
|
-
return null;
|
|
61690
|
+
return createElement(FullscreenLoading, null);
|
|
61674
61691
|
if (vm.checkout.hasCustomer &&
|
|
61675
61692
|
((_b = vm.store.customerStore.customer) === null || _b === void 0 ? void 0 : _b.id) !== ((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.id)) {
|
|
61676
61693
|
router.push("/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl));
|
|
@@ -62433,15 +62450,6 @@ var _slug_ = /*#__PURE__*/Object.freeze({
|
|
|
62433
62450
|
getStaticProps: getStaticProps$2
|
|
62434
62451
|
});
|
|
62435
62452
|
|
|
62436
|
-
var css_248z$o = ".style-module_Container__1f6or {\n width: 100vw;\n height: 100vh;\n background-color: var(--checkout-primary-bg-color);\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Container__1f6or .style-module_loader__VCfEE,\n .style-module_Container__1f6or .style-module_loader__VCfEE:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Container__1f6or .style-module_loader__VCfEE {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid var(--checkout-button-bg-color);\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__3N32j 1.1s infinite linear;\n animation: style-module_load8__3N32j 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
|
|
62437
|
-
var styles$n = {"Container":"style-module_Container__1f6or","loader":"style-module_loader__VCfEE","load8":"style-module_load8__3N32j"};
|
|
62438
|
-
styleInject(css_248z$o);
|
|
62439
|
-
|
|
62440
|
-
var FullscreenLoading = function () {
|
|
62441
|
-
return (createElement("div", { className: styles$n.Container },
|
|
62442
|
-
createElement("div", { className: styles$n.loader })));
|
|
62443
|
-
};
|
|
62444
|
-
|
|
62445
62453
|
var CheckoutPage = function (_a) {
|
|
62446
62454
|
var checkoutId = _a.checkoutId, checkoutSettingsStr = _a.checkoutSettingsStr, customizationProps = _a.customizationProps, configJson = _a.configJson, others = __rest(_a, ["checkoutId", "checkoutSettingsStr", "customizationProps", "configJson"]);
|
|
62447
62455
|
var router = useRouter();
|
|
@@ -62451,10 +62459,6 @@ var CheckoutPage = function (_a) {
|
|
|
62451
62459
|
var checkoutSettings = checkoutSettingsStr
|
|
62452
62460
|
? new IkasCheckoutSettings(JSON.parse(checkoutSettingsStr))
|
|
62453
62461
|
: new IkasCheckoutSettings();
|
|
62454
|
-
useEffect(function () {
|
|
62455
|
-
store.checkLocalization();
|
|
62456
|
-
getCheckout();
|
|
62457
|
-
}, []);
|
|
62458
62462
|
useEffect(function () {
|
|
62459
62463
|
document.documentElement.style.setProperty("--checkout-button-bg-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.buttonBgColor) || "#272727");
|
|
62460
62464
|
document.documentElement.style.setProperty("--checkout-button-text-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.buttonTextColor) || "#FFFFFF");
|
|
@@ -62473,6 +62477,10 @@ var CheckoutPage = function (_a) {
|
|
|
62473
62477
|
document.documentElement.style.setProperty("--checkout-success-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.successColor) || "#2DCA73");
|
|
62474
62478
|
document.documentElement.style.setProperty("--checkout-success-light-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.successLightColor) || "#F6FFED");
|
|
62475
62479
|
}, [customizationProps]);
|
|
62480
|
+
useEffect(function () {
|
|
62481
|
+
store.checkLocalization();
|
|
62482
|
+
getCheckout();
|
|
62483
|
+
}, []);
|
|
62476
62484
|
var getCheckout = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
62477
62485
|
var checkout;
|
|
62478
62486
|
return __generator(this, function (_a) {
|
|
@@ -62492,7 +62500,7 @@ var CheckoutPage = function (_a) {
|
|
|
62492
62500
|
}); }, [checkoutId]);
|
|
62493
62501
|
if (!checkout)
|
|
62494
62502
|
return createElement(FullscreenLoading, null);
|
|
62495
|
-
return (createElement(IkasCheckoutPage$1, __assign({ checkout: checkout, checkoutSettings: checkoutSettings }, others)));
|
|
62503
|
+
return (createElement(IkasCheckoutPage$1, __assign({ checkout: checkout, checkoutSettings: checkoutSettings, customizationProps: customizationProps }, others)));
|
|
62496
62504
|
};
|
|
62497
62505
|
var _id_ = observer(CheckoutPage);
|
|
62498
62506
|
var getServerSideProps = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|
package/build/index.js
CHANGED
|
@@ -59975,7 +59975,8 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
59975
59975
|
});
|
|
59976
59976
|
}); };
|
|
59977
59977
|
this.listCountries = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
59978
|
-
var countries, currentRouting_1;
|
|
59978
|
+
var countries, currentRouting_1, currentCountry;
|
|
59979
|
+
var _this = this;
|
|
59979
59980
|
var _a, _b;
|
|
59980
59981
|
return __generator(this, function (_c) {
|
|
59981
59982
|
switch (_c.label) {
|
|
@@ -59991,6 +59992,12 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
59991
59992
|
this.countries = countries;
|
|
59992
59993
|
if (this.countries.length === 1 && !this.country)
|
|
59993
59994
|
this.onCountryChange(this.countries[0].id);
|
|
59995
|
+
else if (this.checkoutViewModel.store.currentCountryCode) {
|
|
59996
|
+
currentCountry = this.countries.find(function (c) { return c.iso2 === _this.checkoutViewModel.store.currentCountryCode; });
|
|
59997
|
+
if (currentCountry) {
|
|
59998
|
+
this.onCountryChange(currentCountry.id);
|
|
59999
|
+
}
|
|
60000
|
+
}
|
|
59994
60001
|
return [3 /*break*/, 3];
|
|
59995
60002
|
case 2:
|
|
59996
60003
|
_c.sent();
|
|
@@ -60192,6 +60199,7 @@ var AddressFormViewModel = /** @class */ (function () {
|
|
|
60192
60199
|
this.onTaxOfficeChange = function (value) {
|
|
60193
60200
|
_this.address.taxOffice = value;
|
|
60194
60201
|
};
|
|
60202
|
+
this.checkoutViewModel = data.checkoutViewModel;
|
|
60195
60203
|
this.address = data.address;
|
|
60196
60204
|
this.isCorporate = data.isCorporate || false;
|
|
60197
60205
|
this.isErrorsVisible = data.isErrorsVisible || false;
|
|
@@ -60632,7 +60640,7 @@ var CustomerAddresses = function (_a) {
|
|
|
60632
60640
|
var CustomerAddresses$1 = mobxReactLite.observer(CustomerAddresses);
|
|
60633
60641
|
var CustomerAddressForm = mobxReactLite.observer(function (_a) {
|
|
60634
60642
|
var vm = _a.vm;
|
|
60635
|
-
return (React.createElement(AddressForm$1, { address: vm.editingCustomerAddress || vm.address, isErrorsVisible: vm.isEditAddressErrorsVisible || vm.vm.isErrorsVisible, allowedCountryIds: vm.vm.shippingCountryIds || undefined, firstNameChangeCallback: vm.firstNameChangeCallback, lastNameChangeCallback: vm.lastNameChangeCallback, allowTitleChange: !!vm.editingCustomerAddress }));
|
|
60643
|
+
return (React.createElement(AddressForm$1, { checkoutViewModel: vm.vm, address: vm.editingCustomerAddress || vm.address, isErrorsVisible: vm.isEditAddressErrorsVisible || vm.vm.isErrorsVisible, allowedCountryIds: vm.vm.shippingCountryIds || undefined, firstNameChangeCallback: vm.firstNameChangeCallback, lastNameChangeCallback: vm.lastNameChangeCallback, allowTitleChange: !!vm.editingCustomerAddress }));
|
|
60636
60644
|
});
|
|
60637
60645
|
var SaveAddressCheckboxAndTitle = mobxReactLite.observer(function (_a) {
|
|
60638
60646
|
var vm = _a.vm;
|
|
@@ -61612,6 +61620,15 @@ var StockError = mobxReactLite.observer(function (_a) {
|
|
|
61612
61620
|
}, text: t("checkout-page:actions.continue"), isLoading: isLoading, onClick: onContinueClick }))) }));
|
|
61613
61621
|
});
|
|
61614
61622
|
|
|
61623
|
+
var css_248z$o = ".style-module_Container__1f6or {\n width: 100vw;\n height: 100vh;\n background-color: var(--checkout-primary-bg-color);\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Container__1f6or .style-module_loader__VCfEE,\n .style-module_Container__1f6or .style-module_loader__VCfEE:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Container__1f6or .style-module_loader__VCfEE {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid var(--checkout-button-bg-color);\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__3N32j 1.1s infinite linear;\n animation: style-module_load8__3N32j 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
|
|
61624
|
+
var styles$n = {"Container":"style-module_Container__1f6or","loader":"style-module_loader__VCfEE","load8":"style-module_load8__3N32j"};
|
|
61625
|
+
styleInject(css_248z$o);
|
|
61626
|
+
|
|
61627
|
+
var FullscreenLoading = function () {
|
|
61628
|
+
return (React.createElement("div", { className: styles$n.Container },
|
|
61629
|
+
React.createElement("div", { className: styles$n.loader })));
|
|
61630
|
+
};
|
|
61631
|
+
|
|
61615
61632
|
var IkasCheckoutPage = function (_a) {
|
|
61616
61633
|
var _b, _c, _d;
|
|
61617
61634
|
var checkout = _a.checkout, checkoutSettings = _a.checkoutSettings, customizationProps = _a.customizationProps, returnPolicy = _a.returnPolicy, privacyPolicy = _a.privacyPolicy, termsOfService = _a.termsOfService, queryParams = _a.queryParams;
|
|
@@ -61649,7 +61666,7 @@ var IkasCheckoutPage = function (_a) {
|
|
|
61649
61666
|
document.documentElement.style.setProperty("--checkout-success-light-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.successLightColor) || "#F6FFED");
|
|
61650
61667
|
}, [customizationProps]);
|
|
61651
61668
|
if (!vm.isCheckoutLoaded || !vm.store.customerStore.initialized)
|
|
61652
|
-
return null;
|
|
61669
|
+
return React.createElement(FullscreenLoading, null);
|
|
61653
61670
|
if (vm.checkout.hasCustomer &&
|
|
61654
61671
|
((_b = vm.store.customerStore.customer) === null || _b === void 0 ? void 0 : _b.id) !== ((_c = vm.checkout.customer) === null || _c === void 0 ? void 0 : _c.id)) {
|
|
61655
61672
|
router$1.push("/account/login?redirect=" + encodeURIComponent(vm.checkoutUrl));
|
|
@@ -62412,15 +62429,6 @@ var _slug_ = /*#__PURE__*/Object.freeze({
|
|
|
62412
62429
|
getStaticProps: getStaticProps$2
|
|
62413
62430
|
});
|
|
62414
62431
|
|
|
62415
|
-
var css_248z$o = ".style-module_Container__1f6or {\n width: 100vw;\n height: 100vh;\n background-color: var(--checkout-primary-bg-color);\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Container__1f6or .style-module_loader__VCfEE,\n .style-module_Container__1f6or .style-module_loader__VCfEE:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Container__1f6or .style-module_loader__VCfEE {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid var(--checkout-button-bg-color);\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__3N32j 1.1s infinite linear;\n animation: style-module_load8__3N32j 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__3N32j {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
|
|
62416
|
-
var styles$n = {"Container":"style-module_Container__1f6or","loader":"style-module_loader__VCfEE","load8":"style-module_load8__3N32j"};
|
|
62417
|
-
styleInject(css_248z$o);
|
|
62418
|
-
|
|
62419
|
-
var FullscreenLoading = function () {
|
|
62420
|
-
return (React.createElement("div", { className: styles$n.Container },
|
|
62421
|
-
React.createElement("div", { className: styles$n.loader })));
|
|
62422
|
-
};
|
|
62423
|
-
|
|
62424
62432
|
var CheckoutPage = function (_a) {
|
|
62425
62433
|
var checkoutId = _a.checkoutId, checkoutSettingsStr = _a.checkoutSettingsStr, customizationProps = _a.customizationProps, configJson = _a.configJson, others = __rest(_a, ["checkoutId", "checkoutSettingsStr", "customizationProps", "configJson"]);
|
|
62426
62434
|
var router$1 = router.useRouter();
|
|
@@ -62430,10 +62438,6 @@ var CheckoutPage = function (_a) {
|
|
|
62430
62438
|
var checkoutSettings = checkoutSettingsStr
|
|
62431
62439
|
? new IkasCheckoutSettings(JSON.parse(checkoutSettingsStr))
|
|
62432
62440
|
: new IkasCheckoutSettings();
|
|
62433
|
-
React.useEffect(function () {
|
|
62434
|
-
store.checkLocalization();
|
|
62435
|
-
getCheckout();
|
|
62436
|
-
}, []);
|
|
62437
62441
|
React.useEffect(function () {
|
|
62438
62442
|
document.documentElement.style.setProperty("--checkout-button-bg-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.buttonBgColor) || "#272727");
|
|
62439
62443
|
document.documentElement.style.setProperty("--checkout-button-text-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.buttonTextColor) || "#FFFFFF");
|
|
@@ -62452,6 +62456,10 @@ var CheckoutPage = function (_a) {
|
|
|
62452
62456
|
document.documentElement.style.setProperty("--checkout-success-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.successColor) || "#2DCA73");
|
|
62453
62457
|
document.documentElement.style.setProperty("--checkout-success-light-color", (customizationProps === null || customizationProps === void 0 ? void 0 : customizationProps.successLightColor) || "#F6FFED");
|
|
62454
62458
|
}, [customizationProps]);
|
|
62459
|
+
React.useEffect(function () {
|
|
62460
|
+
store.checkLocalization();
|
|
62461
|
+
getCheckout();
|
|
62462
|
+
}, []);
|
|
62455
62463
|
var getCheckout = React.useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
62456
62464
|
var checkout;
|
|
62457
62465
|
return __generator(this, function (_a) {
|
|
@@ -62471,7 +62479,7 @@ var CheckoutPage = function (_a) {
|
|
|
62471
62479
|
}); }, [checkoutId]);
|
|
62472
62480
|
if (!checkout)
|
|
62473
62481
|
return React.createElement(FullscreenLoading, null);
|
|
62474
|
-
return (React.createElement(IkasCheckoutPage$1, __assign({ checkout: checkout, checkoutSettings: checkoutSettings }, others)));
|
|
62482
|
+
return (React.createElement(IkasCheckoutPage$1, __assign({ checkout: checkout, checkoutSettings: checkoutSettings, customizationProps: customizationProps }, others)));
|
|
62475
62483
|
};
|
|
62476
62484
|
var _id_ = mobxReactLite.observer(CheckoutPage);
|
|
62477
62485
|
var getServerSideProps = function (context) { return __awaiter(void 0, void 0, void 0, function () {
|