@ikas/storefront 5.0.1 → 5.0.2
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/build/pages/checkout.js +1 -1
- package/package.json +11 -11
package/build/pages/checkout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o,__awaiter as t,__generator as e,__assign as r}from'./../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as s}from"mobx-react-lite";import d from"../components/checkout/index.js";import{useRouter as
|
|
1
|
+
import{__rest as o,__awaiter as t,__generator as e,__assign as r}from'./../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as s}from"mobx-react-lite";import d from"../components/checkout/index.js";import{useRouter as m}from"next/router.js";import{FullscreenLoading as a}from"../components/checkout/components/fullscreen-loading/index.js";import{CheckoutStep as n}from"../components/checkout/model.js";import{setAPIClientConfig as l,getCartById as c}from"@ikas/storefront-api";import{IkasStorefrontConfig as p}from"@ikas/storefront-config";import"../analytics/analytics.js";import"../analytics/head/index.js";import"../components/page/index.js";import"../components/page/head.js";import"next/image.js";import"@ikas/storefront-model-functions";import"../components/link/index.js";import"../components/page-editor/loader/style.module.scss.js";import"../components/google-captcha/index.js";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import{IkasCheckout as u}from"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";import"./home.js";import"./_slug_/index.js";import"./pages/_slug_.js";import"./account/index.js";import"./account/addresses.js";import"./account/orders/index.js";import"./account/orders/_id_.js";import"./account/login.js";import"./account/register.js";import"./account/forgot-password.js";import"./account/recover-password.js";import"./cart.js";import"./editor.js";import"./account/favorite-products.js";import"./search.js";import"next/error.js";import"./blog/index.js";import"./blog/_slug_.js";import"./raffle/_slug_.js";import"./raffle/index.js";import"./account/raffles.js";import"./account/activate.js";import{IkasBaseStore as j}from"../store/base.js";import"../store/customer/index.js";import"../store/cart/index.js";import"lodash/get";import{initIkasEvents as x}from"../analytics/events.js";import{APIErrorCode as g}from'./../ext/@ikas/fe-api-client/build/utils/api.js';import'./../ext/axios/index.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import f from"../store/checkout/index.js";var y=s((function(s){var y=s.customizationProps,v=s.configJson,h=o(s,["customizationProps","configJson"]),b=m(),k=i.useState(),E=k[0],F=k[1],C=i.useState(h.checkoutSettings),P=C[0],_=C[1];p.init(v),l(),i.useEffect((function(){!function(o){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==o?void 0:o.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==o?void 0:o.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==o?void 0:o.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==o?void 0:o.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==o?void 0:o.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==o?void 0:o.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==o?void 0:o.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==o?void 0:o.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==o?void 0:o.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==o?void 0:o.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==o?void 0:o.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==o?void 0:o.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==o?void 0:o.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==o?void 0:o.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==o?void 0:o.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==o?void 0:o.successLightColor)||"#F6FFED")}(y)}),[y]),i.useEffect((function(){j.getInstance().checkLocalization(),w(),x()}),[]);var w=i.useCallback((function(){return t(void 0,void 0,void 0,(function(){var o,t,r,i,s,d,m,a;return e(this,(function(e){switch(e.label){case 0:return o=new URLSearchParams(window.location.search),t=o.get("id"),r=o.get("step"),t?(i=!1,r&&r===n.SUCCESS&&(i=!0),[4,c({id:t,getCompletedCart:i})]):[2,b.replace("/")];case 1:return s=e.sent(),P?[3,3]:[4,f.listCheckoutSettings({})];case 2:(d=e.sent()).isSuccess&&(null===(a=d.data)||void 0===a?void 0:a.length)?_(d.data[0]):(console.error("CHECKOUT SETTINGS FETCH FAILED!"),console.error(d),console.error(d.graphQLErrors),console.error(d.errorCodes)),e.label=3;case 3:return s.isSuccess&&s.data?(m=s.data,F(new u(m))):s.errorCodes.some((function(o){return o===g.LOGIN_REQUIRED}))?b.replace("/account/login?redirect="+encodeURIComponent(window.location.href)):b.replace("/"),[2]}}))}))}),[]);return E&&P?i.createElement(d,r({checkout:E,customizationProps:y},h,{checkoutSettings:P})):i.createElement(a,null)}));export{y as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@ikas/storefront-api": "^5.0.
|
|
21
|
-
"@ikas/storefront-config": "^5.0.
|
|
22
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
23
|
-
"@ikas/storefront-models": "^5.0.
|
|
24
|
-
"@ikas/storefront-providers": "^5.0.
|
|
20
|
+
"@ikas/storefront-api": "^5.0.2",
|
|
21
|
+
"@ikas/storefront-config": "^5.0.2",
|
|
22
|
+
"@ikas/storefront-model-functions": "^5.0.2",
|
|
23
|
+
"@ikas/storefront-models": "^5.0.2",
|
|
24
|
+
"@ikas/storefront-providers": "^5.0.2",
|
|
25
25
|
"@ikas/localized-address": "1.0.0-beta.3",
|
|
26
26
|
"@adyen/adyen-web": "^5.28.2",
|
|
27
27
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@ikas/localized-address": "1.0.0-beta.3",
|
|
58
|
-
"@ikas/storefront-api": "^5.0.
|
|
59
|
-
"@ikas/storefront-config": "^5.0.
|
|
60
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
61
|
-
"@ikas/storefront-models": "^5.0.
|
|
62
|
-
"@ikas/storefront-providers": "^5.0.
|
|
58
|
+
"@ikas/storefront-api": "^5.0.2",
|
|
59
|
+
"@ikas/storefront-config": "^5.0.2",
|
|
60
|
+
"@ikas/storefront-model-functions": "^5.0.2",
|
|
61
|
+
"@ikas/storefront-models": "^5.0.2",
|
|
62
|
+
"@ikas/storefront-providers": "^5.0.2",
|
|
63
63
|
"mobx": "^6.1.3",
|
|
64
64
|
"mobx-react-lite": "^3.1.5",
|
|
65
65
|
"next": "12.2.0",
|