@ikas/storefront 5.0.0-beta.22 → 5.0.0-beta.24
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/analytics/analytics.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/adyen/adyen.module.scss.js +1 -1
- package/build/components/checkout/components/adyen/index.d.ts +0 -1
- package/build/components/checkout/components/adyen/index.js +1 -1
- package/build/components/checkout/components/button/style.module.scss.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/style.module.scss.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/svg/arrow-right.d.ts +1 -0
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/checkbox/style.module.scss.js +1 -1
- package/build/components/checkout/components/credit-card-form/style.module.scss.js +1 -1
- package/build/components/checkout/components/customer-addresses/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/customer-addresses/style.module.scss.js +1 -1
- package/build/components/checkout/components/delivery-methods/icon-button/style.module.scss.js +1 -1
- package/build/components/checkout/components/delivery-methods/style.module.scss.js +1 -1
- package/build/components/checkout/components/epaykolay-button/index.d.ts +1 -0
- package/build/components/checkout/components/epaykolay-button/style.module.scss.js +1 -1
- package/build/components/checkout/components/error/no-shipping-error/index.d.ts +1 -0
- package/build/components/checkout/components/error/stock-error/index.js +1 -1
- package/build/components/checkout/components/error/stock-error/style.module.scss.js +1 -1
- package/build/components/checkout/components/expandable-section/style.module.scss.js +1 -1
- package/build/components/checkout/components/form-item/style.module.scss.js +1 -1
- package/build/components/checkout/components/fullscreen-loading/style.module.scss.js +1 -1
- package/build/components/checkout/components/input-with-button/style.module.scss.js +1 -1
- package/build/components/checkout/components/master-pass/credit-card-form/index.d.ts +1 -0
- package/build/components/checkout/components/master-pass/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/master-pass/credit-card-form/style.module.scss.js +1 -1
- package/build/components/checkout/components/master-pass/link-card-to-client/index.d.ts +1 -0
- package/build/components/checkout/components/master-pass/link-card-to-client/style.module.scss.js +1 -1
- package/build/components/checkout/components/master-pass/link-card-to-client/svg/close.d.ts +1 -0
- package/build/components/checkout/components/master-pass/link-card-to-client/svg/info-mark.d.ts +1 -0
- package/build/components/checkout/components/master-pass/link-card-to-client/svg/master-pass-by-master-card-big.d.ts +1 -0
- package/build/components/checkout/components/master-pass/modal/style.module.scss.js +1 -1
- package/build/components/checkout/components/master-pass/modal/svg/master-pass-by-master-card-small.d.ts +1 -0
- package/build/components/checkout/components/master-pass/modal/svg/modal-close.d.ts +1 -0
- package/build/components/checkout/components/master-pass/modal-otp/style.module.scss.js +1 -1
- package/build/components/checkout/components/master-pass/modal-otp/svg/master-pass.d.ts +1 -0
- package/build/components/checkout/components/master-pass/modal-response/index.d.ts +1 -0
- package/build/components/checkout/components/master-pass/modal-response/style.module.scss.js +1 -1
- package/build/components/checkout/components/master-pass/modal-success/index.d.ts +1 -0
- package/build/components/checkout/components/master-pass/modal-success/style.module.scss.js +1 -1
- package/build/components/checkout/components/master-pass/modal-success/svg/success.d.ts +1 -0
- package/build/components/checkout/components/master-pass/payment-gateway/svg/master-card.d.ts +1 -0
- package/build/components/checkout/components/modal/style.module.scss.js +1 -1
- package/build/components/checkout/components/notification-box/style.module.scss.js +1 -1
- package/build/components/checkout/components/offer-product/select/style.module.scss.js +1 -1
- package/build/components/checkout/components/offer-product/style.module.scss.js +1 -1
- package/build/components/checkout/components/paypal/index.js +1 -1
- package/build/components/checkout/components/paypal/style.module.scss.js +1 -1
- package/build/components/checkout/components/phone-number-input/get-countries.js +1 -1
- package/build/components/checkout/components/phone-number-input/index.js +1 -1
- package/build/components/checkout/components/phone-number-input/style.module.scss.js +1 -1
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/components/quick-registration/style.module.scss.js +1 -1
- package/build/components/checkout/components/select-box/style.module.scss.js +1 -1
- package/build/components/checkout/components/step-container/style.module.scss.js +1 -1
- package/build/components/checkout/components/stripe/checkout-form.js +1 -1
- package/build/components/checkout/components/stripe/index.js +1 -1
- package/build/components/checkout/components/stripe/style.module.scss.js +1 -1
- package/build/components/checkout/components/toggle/style.module.scss.js +1 -1
- package/build/components/checkout/components/tooltip/style.module.scss.js +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/modelMasterPass.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/installments/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-payment/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-shipping/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-success/style.module.scss.js +1 -1
- package/build/components/checkout/style.module.scss.js +1 -1
- package/build/components/checkout/styles/common.module.scss.js +1 -1
- package/build/components/google-captcha/index.js +1 -1
- package/build/components/image/index.js +1 -1
- package/build/components/link/index.js +1 -1
- package/build/components/page/ThemeComponent.js +1 -1
- package/build/components/page/functions.d.ts +1 -0
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/error/index.d.ts +1 -0
- package/build/components/page-editor/index.js +1 -1
- package/build/components/page-editor/loader/style.module.scss.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/model-helpers/order/line-item/option/value/functions.js +1 -1
- package/build/model-helpers/product/attribute-value/functions.js +1 -1
- package/build/model-helpers/product/functions.js +1 -1
- package/build/model-helpers/product/option-set/option/functions.js +1 -1
- package/build/model-helpers/product/variant/functions.js +1 -1
- package/build/models/data/localized-customer-address/functions.js +1 -1
- package/build/models/data/theme-json/custom-data/index.js +1 -1
- package/build/models/data/theme-json/index.js +1 -1
- package/build/models/ui/blog-category-list/functions.js +1 -1
- package/build/models/ui/blog-list/functions.js +1 -1
- package/build/models/ui/brand-list/functions.js +1 -1
- package/build/models/ui/category-list/functions.js +1 -1
- package/build/models/ui/customer-review-list/functions.js +1 -1
- package/build/models/ui/customer-review-summary-list/functions.js +1 -1
- package/build/models/ui/product-list/functions.js +1 -1
- package/build/models/ui/raffle-list/functions.js +1 -1
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/contact-form.js +1 -1
- package/build/models/ui/validator/form/customer-review.js +1 -1
- package/build/models/ui/validator/form/forgot-password.js +1 -1
- package/build/models/ui/validator/form/ikas-address.js +1 -1
- package/build/models/ui/validator/form/login.js +1 -1
- package/build/models/ui/validator/form/raffle-form.js +1 -1
- package/build/models/ui/validator/form/recover-password.js +1 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/models/ui/validator/index.js +1 -1
- package/build/models/ui/validator/rules/index.js +1 -1
- package/build/page-data-init/index.js +1 -1
- package/build/pages/404.js +1 -1
- package/build/pages/_slug_/index.js +1 -1
- package/build/pages/account/activate.js +1 -1
- package/build/pages/account/addresses.js +1 -1
- package/build/pages/account/favorite-products.js +1 -1
- package/build/pages/account/forgot-password.js +1 -1
- package/build/pages/account/index.js +1 -1
- package/build/pages/account/login.js +1 -1
- package/build/pages/account/orders/_id_.js +1 -1
- package/build/pages/account/orders/index.js +1 -1
- package/build/pages/account/raffles.js +1 -1
- package/build/pages/account/recover-password.js +1 -1
- package/build/pages/account/register.js +1 -1
- package/build/pages/blog/_slug_.js +1 -1
- package/build/pages/blog/index.js +1 -1
- package/build/pages/cart.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/pages/editor.js +1 -1
- package/build/pages/home.js +1 -1
- package/build/pages/pages/_slug_.js +1 -1
- package/build/pages/raffle/_slug_.js +1 -1
- package/build/pages/raffle/index.js +1 -1
- package/build/pages/search.js +1 -1
- package/build/store/base/functions.js +1 -1
- package/build/store/cart/functions.js +1 -1
- package/build/store/customer/account-auth/functions.js +1 -1
- package/build/store/customer/captcha/functions.js +1 -1
- package/build/store/customer/consent/functions.js +1 -1
- package/build/store/customer/functions.js +1 -1
- package/build/store/customer/marketing/functions.js +1 -1
- package/build/store/customer/order/functions.js +1 -1
- package/build/store/customer/product/functions.js +1 -1
- package/build/store/customer/raffle/functions.js +1 -1
- package/package.json +10 -43
- package/build/_virtual/axios.js +0 -1
- package/build/_virtual/index.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/_commonjsHelpers.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/axios-error-format.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/core.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/_virtual/index.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/axios-error-format.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/core.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/index.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/index.mjs.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_Hash.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_ListCache.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_Map.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_MapCache.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_Symbol.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_assocIndexOf.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_baseIsNative.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_coreJsData.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_freeGlobal.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getMapData.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getNative.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getRawTag.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_getValue.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashClear.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashDelete.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashGet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashHas.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_hashSet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_isKeyable.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_isMasked.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheClear.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheDelete.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheGet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheHas.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_listCacheSet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheClear.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheDelete.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheGet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheHas.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_mapCacheSet.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_memoizeCapped.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_nativeCreate.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_objectToString.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_root.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/_toSource.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/eq.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/isFunction.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/isObject.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/ext/lodash/memoize.js +0 -1
- package/build/ext/@ikas/fe-api-client/build/utils/api.js +0 -1
- package/build/ext/axios/index.js +0 -1
- package/build/ext/axios/lib/adapters/xhr.js +0 -1
- package/build/ext/axios/lib/axios.js +0 -1
- package/build/ext/axios/lib/cancel/Cancel.js +0 -1
- package/build/ext/axios/lib/cancel/CancelToken.js +0 -1
- package/build/ext/axios/lib/cancel/isCancel.js +0 -1
- package/build/ext/axios/lib/core/Axios.js +0 -1
- package/build/ext/axios/lib/core/InterceptorManager.js +0 -1
- package/build/ext/axios/lib/core/buildFullPath.js +0 -1
- package/build/ext/axios/lib/core/createError.js +0 -1
- package/build/ext/axios/lib/core/dispatchRequest.js +0 -1
- package/build/ext/axios/lib/core/enhanceError.js +0 -1
- package/build/ext/axios/lib/core/mergeConfig.js +0 -1
- package/build/ext/axios/lib/core/settle.js +0 -1
- package/build/ext/axios/lib/core/transformData.js +0 -1
- package/build/ext/axios/lib/defaults/index.js +0 -1
- package/build/ext/axios/lib/defaults/transitional.js +0 -1
- package/build/ext/axios/lib/env/data.js +0 -1
- package/build/ext/axios/lib/helpers/bind.js +0 -1
- package/build/ext/axios/lib/helpers/buildURL.js +0 -1
- package/build/ext/axios/lib/helpers/combineURLs.js +0 -1
- package/build/ext/axios/lib/helpers/cookies.js +0 -1
- package/build/ext/axios/lib/helpers/isAbsoluteURL.js +0 -1
- package/build/ext/axios/lib/helpers/isAxiosError.js +0 -1
- package/build/ext/axios/lib/helpers/isURLSameOrigin.js +0 -1
- package/build/ext/axios/lib/helpers/normalizeHeaderName.js +0 -1
- package/build/ext/axios/lib/helpers/parseHeaders.js +0 -1
- package/build/ext/axios/lib/helpers/spread.js +0 -1
- package/build/ext/axios/lib/helpers/validator.js +0 -1
- package/build/ext/axios/lib/utils.js +0 -1
- package/build/ext/style-inject/dist/style-inject.es.js +0 -1
- package/build/ext/tslib/tslib.es6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from
|
|
1
|
+
import{__assign as t}from"../node_modules/tslib/tslib.es6.js";import{IkasAttributeList as e}from"../models/ui/product-attribute-list/index.js";import{IkasThemeJsonPageType as i,IkasThemeJsonComponentPropType as a}from"@ikas/storefront-models";import"@ikas/localized-address";import{observable as r}from"mobx";import"@ikas/storefront-api";import"../models/ui/blog-category-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import{IkasComponentRenderer as o}from"../models/ui/component-renderer/index.js";import"@ikas/storefront-config";import{IkasAttributeDetail as n}from"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-list/functions.js";import"../models/ui/product-list/index.js";import{IkasPageComponentPropValue as u,getPlaceholderBrand as s,getPlaceholderCategory as p,getPlaceholderProduct as l,getPlaceholderBlog as c,getPlaceholderBlogCategory as f,getPlaceholderRaffle as m}from"@ikas/storefront-providers";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 d from"lodash/flatten";import{IkasThemeJsonPageComponent as P}from"../models/data/theme-json/page/component/index.js";import{IkasVariantTypeFunctions as g,IkasVariantValueFunctions as V}from"@ikas/storefront-model-functions";import{renderComponent as D}from"../components/page/functions.js";var C=function(){function C(){}return C.setPageSpecificData=function(t,e,a){if(this.isBrowser=a,t){if(e===i.PRODUCT){var o=t;o.selectedVariantValues=o.selectedVariantValues||o.variants[0].variantValues,a&&this._initProductOnBrowser(o)}return this.pageSpecificData=r(t),this.pageSpecificData}this.pageSpecificData=void 0},C.initPagePropValues=function(t,e,i,a,r){return this.flatCustomDataList=d(i.map((function(t){return t.flat}))),t.map((function(t){return C.initPageComponentPropValue(t,e,a,r)}))},C.initPageComponentPropValue=function(e,i,a,r){var o=i.find((function(t){return t.id===e.pageComponent.componentId})),n=null==o?void 0:o.props,s={};return null==n||n.map((function(t){var i=e.propValues[t.name];s[t.name]=C.initPropValue(t,i,a,r)})),new u(t(t({},e),{pageComponent:new P(t(t({},e.pageComponent),{propValues:s,componentId:o.id})),component:o,propValues:s}))},C.initPropValue=function(t,e,i,r){if(null==e)return null;return function(){switch(t.type){case a.BRAND:return C.initBrandPropValue(e);case a.CATEGORY:return C.initCategoryPropValue(e);case a.PRODUCT_DETAIL:return C.initProductPropValue(e);case a.PRODUCT_ATTRIBUTE:return C.initAttributePropValue(e);case a.PRODUCT_ATTRIBUTE_LIST:return C.initAttributeListPropValue(e);case a.COMPONENT:return C.initComponentPropValue(e,i,r);case a.COMPONENT_LIST:return C.initComponentListPropValue(e,i,r);case a.CUSTOM:return C.initCustomDataPropValue(e,i,r);case a.BLOG:return C.initBlogPropValue(e);case a.BLOG_CATEGORY:return C.initBlogCategoryPropValue(e);case a.RAFFLE:return C.initRafflePropValue(e);default:return e}}()},C.initBrandPropValue=function(t){return t.brandPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:t.brand?t.brand:s()},C.initCategoryPropValue=function(t){return t.categoryPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:t.category?t.category:p()},C.initProductPropValue=function(t){var e=l();return t.productDetailPropValue.usePageData&&this.pageSpecificData?e=this.pageSpecificData:t.productDetail&&(e=t.productDetail),e},C._initProductOnBrowser=function(t){var e=new URLSearchParams(window.location.search),i=e.get("vid");if(i){var a=t.variants.find((function(t){return t.id===i}));a&&(t.selectedVariantValues=a.variantValues)}else{var r=g.getVariantTypeSlug,o=V.getVariantValueSlug,n=t.variantTypes.map((function(t){return r(t.variantType)})),u=[];n.forEach((function(i,a){var r=t.variantTypes[a],n=e.get(i);if(n){var s=r.variantType.values.find((function(t){return o(t)===n}));s&&u.push(s)}})),u.length===t.selectedVariantValues.length&&(t.selectedVariantValues=u)}},C.initAttributePropValue=function(t){var e=null;return t.attributePropValue.usePageData&&this.pageSpecificData?e=this.pageSpecificData:t.productDetail&&(e=t.productDetail),new n(e,t.attributePropValue)},C.initAttributeListPropValue=function(t){var i=null;return t.attributeListPropValue.usePageData&&this.pageSpecificData?i=this.pageSpecificData:t.productDetail&&(i=t.productDetail),new e(i,t.attributeListPropValue)},C.initCustomDataPropValue=function(t,e,i){if(t&&t.value&&t.customDataId){var a=this.flatCustomDataList.find((function(e){return e.id===t.customDataId}));if(a)return this._initCustomDataPropValue(t,a,e,i)}},C._initCustomDataPropValue=function(t,e,i,r){var o=this;if(!t)return null;var n=t.value;if(null==n)return null;return function(){switch(e.type){case a.BRAND:return o.initBrandPropValue(n);case a.CATEGORY:return o.initCategoryPropValue(n);case a.PRODUCT_DETAIL:return o.initProductPropValue(n);case a.PRODUCT_ATTRIBUTE:return o.initAttributePropValue(n);case a.PRODUCT_ATTRIBUTE_LIST:return o.initAttributeListPropValue(n);case a.BLOG:return o.initBlogPropValue(n);case a.BLOG_CATEGORY:return o.initBlogCategoryPropValue(n);case a.RAFFLE:return o.initRafflePropValue(n);case a.OBJECT:for(var t={},u=function(e){var a=n[e.key],u=void 0;e.customDataId&&(u=o.flatCustomDataList.find((function(t){return t.id===a.customDataId}))),t[e.key]=o._initCustomDataPropValue(a,u||e,i,r)},s=0,p=e.nestedData||[];s<p.length;s++){u(p[s])}return t;case a.DYNAMIC_LIST:case a.STATIC_LIST:try{if(!n||!n.length)return null;var l=[],c=e.nestedData[0];return n.forEach((function(t){var e;c.customDataId&&(e=o.flatCustomDataList.find((function(e){return e.id===t.customDataId}))),l.push(o._initCustomDataPropValue(t,e||c,i,r))})),l}catch(t){return[]}case a.COMPONENT:return o.initComponentPropValue(n,i,r);case a.COMPONENT_LIST:return o.initComponentListPropValue(n,i,r);default:return n}}()},C.initComponentPropValue=function(t,e,i){return this._initComponentPropValue(t,e,i)},C._initComponentPropValue=function(t,e,i){var a=t.length?t[0]:void 0;if(a){var r=new u(a),n=C.initPageComponentPropValue(r,[r.component],e,i);if(n)return new o((function(){return D(n,e,-10)}))}},C.initComponentListPropValue=function(t,e,i){return this._initComponentListPropValue(t,e,i)},C._initComponentListPropValue=function(t,e,i){return t&&t.length?t.map((function(t){var a=new u(t),r=C.initPageComponentPropValue(a,[a.component],e,i);return new o((function(){return D(r,e,-1)}))})):[]},C.initBlogPropValue=function(t){return t.blogPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:t.blog?t.blog:c()},C.initBlogCategoryPropValue=function(t){return t.blogCategoryPropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:t.blogCategory?t.blogCategory:f()},C.initRafflePropValue=function(t){return t.rafflePropValue.usePageData&&this.pageSpecificData?this.pageSpecificData:t.raffle?t.raffle:m()},C.pageSpecificData={},C.flatCustomDataList=[],C.isBrowser=!1,C}();export{C as IkasPageDataInit};
|
package/build/pages/404.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import*as r from"react";import t from"next/error.js";import{IkasPage as o}from"../components/page/index.js";var s=function(s){return s.propValues?r.createElement(o,e({},s)):r.createElement(t,{statusCode:404})};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as r from"react";import{observer as t}from"mobx-react-lite";import{IkasPage as o}from"../../components/page/index.js";var m=t((function(t){return r.createElement(o,e({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{IkasPage as o}from"../../components/page/index.js";import{observer as r}from"mobx-react-lite";var m=r((function(r){return t.createElement(o,e({},r))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o,{addOgpMetas:!0}))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as r from"react";import{observer as t}from"mobx-react-lite";import{IkasPage as o}from"../../components/page/index.js";var m=t((function(t){return r.createElement(o,e({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{IkasPage as o}from"../../components/page/index.js";import{observer as r}from"mobx-react-lite";var m=r((function(r){return t.createElement(o,e({},r,{addOgpMetas:!0}))}));export{m as default};
|
package/build/pages/cart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
package/build/pages/checkout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o,__awaiter as e,__generator as t,__assign as r}from
|
|
1
|
+
import{__rest as o,__awaiter as e,__generator as t,__assign as r}from"../node_modules/tslib/tslib.es6.js";import*as n from"react";import{observer as c}from"mobx-react-lite";import l from"../components/checkout/index.js";import{useRouter as s}from"next/router.js";import{FullscreenLoading as u}from"../components/checkout/components/fullscreen-loading/index.js";import{setAPIClientConfig as i,getCartById as d}from"@ikas/storefront-api";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{initIkasEvents as a}from"../analytics/events.js";import{APIErrorCode as p}from"@ikas/fe-api-client";import{checkLocalization as y}from"../store/base/functions.js";import{createIkasLocalizedOrderAddress as g}from"../models/data/localized-order-address/functions.js";import{CheckoutStep as h}from"../components/checkout/types.js";var f=c((function(c){var f=c.checkoutSettings,F=c.customizationProps,E=c.configJson,b=o(c,["checkoutSettings","customizationProps","configJson"]),k=s(),C=n.useState(),v=C[0],P=C[1];m.init(E),i(),n.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")}(F)}),[F]),n.useEffect((function(){y(),x(),a()}),[]);var x=n.useCallback((function(){return e(void 0,void 0,void 0,(function(){var o,e,n,c,l,s;return t(this,(function(t){switch(t.label){case 0:return o=new URLSearchParams(window.location.search),e=o.get("id"),n=o.get("step"),e?(c=!1,n&&n===h.SUCCESS&&(c=!0),[4,d({id:e,getCompletedCart:c})]):[2,k.replace("/")];case 1:return(l=t.sent()).isSuccess&&l.data?(s=l.data,P(r(r({},s),{billingAddress:s.billingAddress?g(s.billingAddress):null,shippingAddress:s.shippingAddress?g(s.shippingAddress):null}))):l.errorCodes.some((function(o){return o===p.LOGIN_REQUIRED}))?k.replace("/account/login?redirect="+encodeURIComponent(window.location.href)):k.replace("/"),[2]}}))}))}),[]);return v?n.createElement(l,r({checkout:v,checkoutSettings:f,customizationProps:F},b)):n.createElement(u,null)}));export{f as default};
|
package/build/pages/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as t,__assign as n}from
|
|
1
|
+
import{__extends as t,__assign as n}from"../node_modules/tslib/tslib.es6.js";import*as o from"react";import r from"next/dynamic.js";import{IkasStorefrontConfig as e}from"@ikas/storefront-config";var i=r((function(){return import("../components/page-editor/index.js").then((function(t){return t.default}))}),{ssr:!1}),s=function(r){function s(){return null!==r&&r.apply(this,arguments)||this}return t(s,r),s.prototype.componentDidMount=function(){var t=this.props,o=t.configJson,r=t.components;o&&e.init(n({},o)),e.init({currentPageComponents:r||{}})},s.prototype.render=function(){return o.createElement(i,null)},s}(o.Component);export{s as default};
|
package/build/pages/home.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{observer as o}from"mobx-react-lite";import{IkasPage as r}from"../../components/page/index.js";var m=o((function(o){return t.createElement(r,e({},o))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import*as t from"react";import{IkasPage as o}from"../../components/page/index.js";import{observer as r}from"mobx-react-lite";var m=r((function(r){return t.createElement(o,e({},r,{addOgpMetas:!0}))}));export{m as default};
|
package/build/pages/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from
|
|
1
|
+
import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import*as r from"react";import{observer as t}from"mobx-react-lite";import{IkasPage as o}from"../components/page/index.js";var m=t((function(t){return r.createElement(o,e({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as n,__generator as o}from
|
|
1
|
+
import{__awaiter as n,__generator as o}from"../../node_modules/tslib/tslib.es6.js";import{listCountry as i,getMyCountry as t}from"@ikas/storefront-api";import{IkasStorefrontConfig as e}from"@ikas/storefront-config";import{IkasBaseStore as r}from"./index.js";import a from"lodash/flatten";import u from"lodash/sortBy";import{IkasProductFunctions as c,IkasVariantTypeFunctions as l,IkasVariantValueFunctions as s}from"@ikas/storefront-model-functions";import{initCustomerStore as d}from"../customer/functions.js";import{productView as f}from"../../analytics/analytics.js";import"../../analytics/head/index.js";function g(n){n.routing.domain?window.location.replace("https://"+n.routing.domain):window.location.replace(window.location.origin+(n.routing.path?"/"+n.routing.path:"")+(r.router?r.router.asPath:""))}function m(n){var o=e.getRoutings().find((function(o){return o.id===n.id}));o&&window.location.replace(window.location.origin+(o.path?"/"+o.path:"")+(r.router?r.router.asPath:""))}function v(){return n(this,void 0,void 0,(function(){var n,c,l,s,d,f,g,m,v,p,h;return o(this,(function(o){switch(o.label){case 0:return r.localeChecked?[2]:"undefined"==typeof window?(console.warn("checkLocalization should be called on the client side!"),[2]):[4,t()];case 1:return(n=o.sent()).isSuccess?(c=n.data,l=e.getCurrentRouting(),r.currentCountryCode=c,l&&c?(s=!0,d=e.getRoutings().filter((function(n){var o;return null===(o=n.countryCodes)||void 0===o?void 0:o.includes(c)})),f=e.getRoutings().find((function(n){var o;return!(null===(o=n.countryCodes)||void 0===o?void 0:o.length)})),d.length?d.some((function(n){return n.id===l.id}))||(s=!1):f&&l.id!==f.id&&(s=!1),g=[],m=[],v=a(e.getRoutings().map((function(n){return n.countryCodes||[]}))),[4,i({iso2:{in:v}})]):[3,3]):[2];case 2:if(!(p=o.sent()).isSuccess)return[2];h=p.data||[],e.getRoutings().forEach((function(n){var o;(null===(o=n.countryCodes)||void 0===o?void 0:o.length)?n.countryCodes.forEach((function(o){var i=h.find((function(n){return n.iso2===o}));g.some((function(n){return n.iso2===(null==i?void 0:i.iso2)}))||g.push({id:(null==i?void 0:i.iso2)||(null==i?void 0:i.iso3)||Date.now()+"",countryName:(null==i?void 0:i.native)||(null==i?void 0:i.name)||"",iso2:(null==i?void 0:i.iso2)||void 0,iso3:(null==i?void 0:i.iso3)||void 0,routing:n,isRecommended:o===c})})):g.push({id:n.id,routing:n,isRecommended:!e.getRoutings().some((function(n){var o;return null===(o=n.countryCodes)||void 0===o?void 0:o.includes(c)}))})})),d.length&&(e.getRoutings().forEach((function(n){var o;d.some((function(o){return o.id===n.id}))&&m.push({id:n.id,currencyCode:n.currencyCode,currencySymbol:n.currencySymbol,language:new Intl.DisplayNames([],{type:"language"}).of(n.locale)||"",locale:n.locale,isSelected:n.id===(null===(o=e.getCurrentRouting())||void 0===o?void 0:o.id)||!1})})),r.languageOptions=u(m,"language")),r.localeOptions=u(g,"countryName"),s||(r.showLocaleOptions=!0),r.localeChecked=!0,o.label=3;case 3:return[2]}}))}))}function p(){"undefined"!=typeof window&&(r.spaLinksDisabled=navigator.userAgent.includes("Instagram")),c._setSelectVariantValueCallback(h),d()}function h(n,o,i){var t,e=n.metaData,a=n.variantTypes.map((function(o){var i=o.variantType,t=i.values.find((function(o){return n.selectedVariantValues.some((function(n){return n.id===o.id}))}));if(t)return"".concat(l.getVariantTypeSlug(i),"=").concat(s.getVariantValueSlug(t))})).filter((function(n){return!!n})).join("&");if(!i){var u="/".concat(e.slug);if(a&&(u="/".concat(e.slug,"?").concat(a)),u===window.location.pathname)return;null===(t=r.router)||void 0===t||t.replace(u,void 0,{shallow:!1,scroll:!1})}f(n)}export{v as checkLocalization,p as initBaseStore,h as selectVariantValueCallback,m as setLanguage,g as setLocalization};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n,__spreadArray as e,__assign as r}from
|
|
1
|
+
import{__awaiter as t,__generator as n,__spreadArray as e,__assign as r}from"../../node_modules/tslib/tslib.es6.js";import{useCartStore as i,IkasCartStore as o,IkasCartOperationValidationError as s}from"./index.js";import{IkasProductFunctions as u,IkasProductVariantFunctions as a,IkasProductOptionSetFunctions as c,IkasOrderFunctions as d}from"@ikas/storefront-model-functions";import{addItemToCart as l,saveCartCouponCode as v,SaveCartInput as p,saveCart as f,getCartById as h}from"@ikas/storefront-api";import{IkasStorefrontConfig as I}from"@ikas/storefront-config";import{addToCart as m,removeFromCart as S}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{IkasCustomerStore as g}from"../customer/index.js";var O="cartId";function b(){var t=i().cart;return null==t?void 0:t.id}function C(){var t=b();if(t)return"/checkout?id=".concat(t,"&step=info")}function L(e,r,i){var d;return void 0===i&&(i=1),t(this,void 0,void 0,(function(){var t,v,p,f,h,S,g,b,C,L,T;return n(this,(function(n){switch(n.label){case 0:t=u.hasValidProductOptionValues,v=a.hasVariantStock,p=c.initOptionValues,n.label=1;case 1:return n.trys.push([1,6,,7]),t(r)?v(e)||e.sellIfOutOfStock?[4,x()]:[2,{success:!1,validationError:s.INSUFFICIENT_STOCK}]:[2,{success:!1,validationError:s.INVALID_PRODUCT_OPTION_VALUES}];case 2:return n.sent(),(f=o.cart)&&(h=E(e,r))?(r.productOptionSet&&p(r.productOptionSet),[2,y(h,h.quantity+1)]):((null===(d=r.productOptionSet)||void 0===d?void 0:d.options.length)&&(r.productOptionSet.options=R(r)),S=N(r),g=(null==f?void 0:f.id)||localStorage.getItem(O),[4,l({input:{cartId:g,item:{id:null,quantity:i,variant:{id:e.id,name:r.name}},options:S.length?S:null,priceListId:I.getPriceListId()||null,salesChannelId:I.getSalesChannelId(),storefrontThemeId:I.getStorefrontThemeId()}})]);case 3:return(b=n.sent()).isSuccess&&b.data?[4,q(b.data)]:[3,5];case 4:n.sent(),n.label=5;case 5:return(f=o.cart)&&(C="".concat(f.id,"-").concat(f.updatedAt),(L=f.orderLineItems.find((function(t){return t.variant.id===e.id})))&&m(L,i,C,f)),r.productOptionSet&&p(r.productOptionSet),[2,{success:b.isSuccess,response:b}];case 6:return T=n.sent(),console.log(T),[2,{success:!1}];case 7:return[2]}}))}))}function y(e,r){return t(this,void 0,void 0,(function(){var t,i,s,u,a;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,x()];case 1:return n.sent(),t=o.cart,[4,l({input:{cartId:(null==t?void 0:t.id)||null,item:{id:e.id,quantity:r,variant:{id:e.variant.id,name:e.variant.name}},options:F(e),priceListId:I.getPriceListId()||null,salesChannelId:I.getSalesChannelId(),storefrontThemeId:I.getStorefrontThemeId()}})];case 2:return(i=n.sent()).isSuccess&&i.data?[4,q(i.data)]:[3,4];case 3:n.sent(),n.label=4;case 4:return _(),(t=o.cart)&&(s="".concat(t.id,"-").concat(t.updatedAt),(u=e.quantity)>r?S(e,u-r,t):m(e,r-u,s,t)),[2,{success:i.isSuccess,response:i}];case 5:return a=n.sent(),console.log(a),[2,{success:!1}];case 6:return[2]}}))}))}function T(e){return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,y(e,0)];case 1:return[2,t.sent()]}}))}))}function k(){localStorage.removeItem(O),o.cart=null}function w(){return new Promise((function(t){var n=setInterval((function(){o.isCartLoadFinished&&(clearInterval(n),t(null))}),100)}))}function E(t,n){var e,r,i,s,u=o.cart;if(!n.productOptionSetId)return null==u?void 0:u.orderLineItems.find((function(n){return n.variant.id===t.id}));(null===(e=n.productOptionSet)||void 0===e?void 0:e.options.length)&&(n.productOptionSet.options=R(n));for(var a=N(n),c=(null==u?void 0:u.orderLineItems.filter((function(n){var e;return n.variant.id===t.id&&(null===(e=n.options)||void 0===e?void 0:e.length)===a.length})))||[],d=0,l=c;d<l.length;d++){var v=l[d];if(v.options){for(var p=!0,f=function(t){var e=t.values.map((function(t){return t.value})),o=null===(s=null===(i=null===(r=n.productOptionSet)||void 0===r?void 0:r.options)||void 0===i?void 0:i.find((function(n){return n.id===t.productOptionId})))||void 0===s?void 0:s.values;if(!(p=p&&e.length===(null==o?void 0:o.length)&&e.every((function(t){return null==o?void 0:o.includes(t)}))))return"break"},h=0,I=v.options;h<I.length;h++){if("break"===f(I[h]))break}if(p)return v}}}function P(e){return t(this,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return(t=o.cart)?[4,v({cartId:t.id,couponCode:e})]:[2,{success:!1,validationError:s.EMPTY_CART}];case 1:return(r=n.sent()).isSuccess&&r.data&&(o.cart=r.data),[2,{success:r.isSuccess,response:r}]}}))}))}function j(){return t(this,void 0,void 0,(function(){return n(this,(function(t){return[2,P(null)]}))}))}function V(e){return t(this,void 0,void 0,(function(){var t,r;return n(this,(function(n){switch(n.label){case 0:return t=new p(e),[4,f({input:t})];case 1:return[2,{success:(r=n.sent()).isSuccess,response:r}]}}))}))}function _(){o.cart&&0===d.getItemCount(o.cart)&&k()}function A(){var e,r;return t(this,void 0,void 0,(function(){var t,i,s,u;return n(this,(function(n){switch(n.label){case 0:if(!("undefined"!=typeof localStorage))return[2];n.label=1;case 1:return n.trys.push([1,6,7,8]),o.isLoadingCart=!0,t=null===(e=g.customer)||void 0===e?void 0:e.id,(i=(null===(r=o.cart)||void 0===r?void 0:r.id)||localStorage.getItem(O))||t?[4,h({id:i})]:[2];case 2:return(s=n.sent()).isSuccess&&s.data?[4,q(s.data)]:[3,4];case 3:return n.sent(),[3,5];case 4:k(),n.label=5;case 5:return[3,8];case 6:return u=n.sent(),console.log(u),[3,8];case 7:return o.isLoadingCart=!1,o.isCartLoadFinished=!0,[7];case 8:return[2]}}))}))}function q(e){return t(this,void 0,void 0,(function(){return n(this,(function(t){return localStorage.setItem(O,e.id),o.cart=e,[2]}))}))}function x(){return t(this,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return t=localStorage.getItem(O),!o.cart||t?[3,1]:(k(),[3,3]);case 1:return o.cart||!t?[3,3]:[4,A()];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function F(t){if(t&&t.options){for(var n=[],e=0,r=t.options;e<r.length;e++){var i=r[e],o={productOptionId:i.productOptionId,productOptionsSetId:i.productOptionsSetId,values:i.values.map((function(t){return t.value}))};n.push(o)}return n}return null}function N(t){var n,e=[];return null===(n=t.productOptionSet)||void 0===n||n.options.forEach((function(t){t.values.length&&e.push({productOptionId:t.id,productOptionsSetId:t.productOptionSetId,values:t.values})})),e}function U(t){for(var n=[],e=0,r=t;e<r.length;e++){var i=r[e];n.push(i),n=n.concat(U(i.childOptions))}return n}function D(t){return t.reduce((function(t,n){return t[n.id]?t[n.id].values=e([],t[n.id].values,!0):t[n.id]=r({},n),t}),{})}function R(t){var n,e,r=[],i=(null===(n=t.productOptionSet)||void 0===n?void 0:n.options.length)?U(t.productOptionSet.options):[];return(null===(e=t.productOptionSet)||void 0===e?void 0:e.options.length)&&i.length&&(r=Object.values(D(i))),r}export{O as CART_LS_KEY,L as addItem,x as beforeCartOperationCheck,y as changeItemQuantity,U as checkOptionValues,F as createCartLineOptions,E as findExistingItem,A as getCart,b as getCheckoutId,C as getCheckoutUrl,N as getOptionValues,D as mergedProductOptions,_ as removeCardIfEmpty,k as removeCart,j as removeCouponCode,T as removeItem,V as saveCart,P as saveCouponCode,q as setCart,R as setNewProductOptionValues,w as waitForCartStoreInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as n}from
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as n}from"../../../node_modules/tslib/tslib.es6.js";import{IkasStorefrontConfig as r}from"@ikas/storefront-config";import{IkasCustomerConsentData as o}from"../consent/data.js";import{customerLogout as s,completeRegistration as i,customerLogin as a}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{getCaptcha as c,clearCaptchaToken as u}from"../captcha/functions.js";import{IkasCustomerCaptchaData as d}from"../captcha/data.js";import{saveLocalLastViewedProducts as l}from"../product/functions.js";import{isServer as f}from"../../../utils/helper.js";import{IkasCustomerAuthData as m}from"./data.js";import{saveCustomer as v,SaveMyCustomerInput as h,socialLogin as p,login as k,IkasRegisterError as w,register as b,activateCustomer as S,resendCustomerActivationMail as g,checkEmail as T,forgotPassword as x,recoverPassword as y,refreshToken as E,listCustomerAttribute as j}from"@ikas/storefront-api";import{Config as I}from"@ikas/fe-api-client";import{setCustomer as A,useCustomerStore as C}from"../index.js";import{removeCart as N}from"../../cart/functions.js";var O="customerToken",U="customerTokenExpiry";function L(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,v({input:new h(n)})];case 1:return(t=e.sent()).isSuccess&&t.data?(A(t.data),[2,!0]):[2,!1]}}))}))}function P(n){return t(this,void 0,void 0,(function(){var t,o,s;return e(this,(function(e){switch(e.label){case 0:return"undefined"==typeof window?[2]:(t=new URLSearchParams(window.location.search).get("redirect")||"",o="".concat(process.env.NEXT_PUBLIC_BASE_URL,"/ms/").concat(n,"/login/authenticate?redirect=").concat(t),[4,fetch(o,{headers:{"x-api-key":r.getApiKey()||"","x-sfid":r.getStorefrontId()||"","x-sfrid":r.getStorefrontRoutingId()||""}})]);case 1:return[4,e.sent().json()];case 2:return s=e.sent(),window.location.href=s.redirectUrl,[2]}}))}))}function K(n){var r;return t(this,void 0,void 0,(function(){var t,o;return e(this,(function(e){switch(e.label){case 0:return t=C(),[4,p({code:n})];case 1:return(null==(o=e.sent())?void 0:o.isSuccess)&&(null===(r=o.data)||void 0===r?void 0:r.customer)?(F(o.data.token,o.data.tokenExpiry),A(o.data.customer),t.customer&&a(),[2,!0]):[2,!1]}}))}))}function R(n,r){return t(this,void 0,void 0,(function(){var t,o,s;return e(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return e.sent(),t=C(),[4,k({email:n,password:r,captchaToken:d.captchaToken})];case 2:return o=e.sent(),u(),o&&o.isSuccess&&o.data?(F((s=o.data).token,s.tokenExpiry),s.customer&&A(s.customer),t.customer&&a(),l(),[2,!0]):[2,!1]}}))}))}function _(){Q(),N(),s()}function B(r,s,a,f,m,v,h){var p;return t(this,void 0,void 0,(function(){var t,k;return e(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return e.sent(),t=C(),[4,b({email:a,password:f,firstName:r,lastName:s,isAcceptMarketing:m,attributes:v,captchaToken:d.captchaToken,phone:h})];case 2:return k=e.sent(),u(),k&&k.isSuccess&&(null===(p=k.data)||void 0===p?void 0:p.customer)?(F(k.data.token,k.data.tokenExpiry),A(k.data.customer),l(),i((S=t.customer,n(n({},S),{consentGranted:o.customerConsentGranted}))),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:k.errorCodes.map((function(t){return Object.values(w).includes(t)?t:w.UNKOWN}))}]}var S}))}))}function G(){return t(this,void 0,void 0,(function(){var t,n,r;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(n=t.get("token"))?[4,c()]:[3,3];case 1:return e.sent(),[4,S({token:n,captchaToken:d.captchaToken})];case 2:return r=e.sent(),u(),[2,r.isSuccess];case 3:return[2,!1]}}))}))}function M(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return n?[4,c()]:[3,3];case 1:return e.sent(),[4,g({email:n,captchaToken:d.captchaToken})];case 2:return t=e.sent(),u(),[2,t.isSuccess];case 3:return[2,!1]}}))}))}function W(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return e.sent(),[4,T({email:n,captchaToken:d.captchaToken})];case 2:return t=e.sent(),u(),[2,!!t.isSuccess&&!!(null===(r=t.data)||void 0===r?void 0:r.exists)]}}))}))}function X(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return e.sent(),[4,x({email:n,captchaToken:d.captchaToken})];case 2:return t=e.sent(),u(),[2,t.isSuccess]}}))}))}function q(n,r,o){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return e.sent(),[4,y({password:n,passwordAgain:r,token:o,captchaToken:d.captchaToken})];case 2:return t=e.sent(),u(),[2,t.isSuccess]}}))}))}function z(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return m.token?[4,E({token:m.token})]:[2];case 1:return(t=e.sent()).isSuccess&&t.data?F(t.data.token,t.data.tokenExpiry):(m.token=null,m.tokenExpiry=null,Q()),[2]}}))}))}function D(){var n;return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,j()];case 1:return t=e.sent(),(r=C()).customer&&(null===(n=r.customer.attributes)||void 0===n||n.forEach((function(e){var n,r,o;e.customerAttribute=(null===(n=t.data)||void 0===n?void 0:n.find((function(t){return t.id===e.customerAttributeId})))||null,e.customerAttributeOptionId&&(e.customerAttributeOption=(null===(o=null===(r=e.customerAttribute)||void 0===r?void 0:r.options)||void 0===o?void 0:o.find((function(t){return t.id===e.customerAttributeOptionId})))||null)}))),[2,t.data||[]]}}))}))}function F(t,e){f()||(m.token=t,m.tokenExpiry=e,localStorage.setItem(O,t),localStorage.setItem(U,e+""),r.init({customerToken:t}),I.TOKEN=t)}function H(){if(!f()){var t=localStorage.getItem(O),e=localStorage.getItem(U);t&&e?F(t,parseInt(e)):J()}}function J(){localStorage.removeItem(O),localStorage.removeItem(U),m.token=null,m.tokenExpiry=null}function Q(){J(),C().customer=void 0,r.init({customerToken:""}),I.TOKEN="",u()}export{U as LS_TOKEN_EXPIRY,O as LS_TOKEN_KEY,G as activateCustomer,W as checkEmail,Q as clearLocalData,J as clearLocalTokenData,X as forgotPassword,D as getCustomerAttributes,H as loadToken,R as login,_ as logout,q as recoverPassword,z as refreshToken,B as register,M as resendCustomerActivationMail,L as saveCustomer,F as setToken,P as socialLogin,K as socialLoginToken};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from
|
|
1
|
+
import{__awaiter as t,__generator as e}from"../../../node_modules/tslib/tslib.es6.js";import{IkasStorefrontConfig as n}from"@ikas/storefront-config";import{IkasCustomerCaptchaData as r}from"./data.js";function o(){var t;return(null===(t=n.getCustomerSettings())||void 0===t?void 0:t.requireCaptchaValidation)||!1}function a(){return new Promise((function(t){var e=setInterval((function(){r.captchaToken&&(clearInterval(e),t(null))}),100)}))}function c(){r.captchaToken=null}function i(t){r.captchaToken=t}function s(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),o()?(window.grecaptcha.execute(),[4,a()]):[3,2];case 1:e.sent(),window.grecaptcha.reset(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.log("Get captcha error",t),[3,4];case 4:return[2]}}))}))}export{c as clearCaptchaToken,s as getCaptcha,o as isCaptchaRequired,i as setCaptchaToken,a as waitUntilCaptchaTokenInitialized};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isServer as t}from"../../../utils/helper.js";import{IkasCustomerConsentData as o}from"./data.js";var e="customerConsent";function n(){return o.customerConsentGranted}function r(){s()}function s(){t()||(o.customerConsentGranted=!0,window.localStorage.setItem(
|
|
1
|
+
import{isServer as t}from"../../../utils/helper.js";import{IkasCustomerConsentData as o}from"./data.js";var e="customerConsent";function n(){return o.customerConsentGranted}function r(){s()}function s(){t()||(o.customerConsentGranted=!0,window.localStorage.setItem(e,"true"))}function u(){t()||(o.customerConsentGranted=!!window.localStorage.getItem(e))}export{e as LS_CUSTOMER_CONSENT,n as isCustomerConsentGranted,u as loadCustomerConsent,r as onCustomerConsentGrant,s as saveCustomerConsent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from
|
|
1
|
+
import{__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.js";import{customerVisit as r}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{isServer as o}from"../../utils/helper.js";import{IkasCustomerAuthData as i}from"./account-auth/data.js";import{loadToken as e,refreshToken as s,clearLocalData as u}from"./account-auth/functions.js";import{loadLastViewedProducts as a}from"./product/functions.js";import{loadCustomerConsent as c}from"./consent/functions.js";import{getCustomer as m}from"@ikas/storefront-api";import{IkasCustomerStore as f,setCustomer as l}from"./index.js";function d(){return new Promise((function(t){var n=setInterval((function(){f.initialized&&(clearInterval(n),t(null))}),100)}))}function p(){return t(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return e(),a(),c(),[4,s()];case 1:return t.sent(),[4,j()];case 2:return t.sent(),f.initialized=!0,f.customer&&r(),[2]}}))}))}function h(){e(),!i.token&&f.customer&&u(),i.token&&!f.customer&&j()}function j(){return t(this,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return o()||!i.token?[2]:[4,m()];case 1:return(t=n.sent()).data&&l(t.data),[2]}}))}))}export{j as getCustomer,p as initCustomerStore,h as routeChangeInit,d as waitForCustomerStoreInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as r,__assign as s}from
|
|
1
|
+
import{__awaiter as t,__generator as r,__assign as s}from"../../../node_modules/tslib/tslib.es6.js";import{sendContactFormToMerchant as i,subscribeToMarketingNotifications as o}from"@ikas/storefront-api";import{IkasCustomerFunctions as e}from"@ikas/storefront-model-functions";import{IkasCustomerStore as a}from"../index.js";import{contactForm as c,createEmailSubscripition as n}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasCustomerEmailSubscriptionStatus as u}from"@ikas/storefront-models";import"@ikas/localized-address";import{isServer as m}from"../../../utils/helper.js";import{IkasCustomerCaptchaData as l}from"../captcha/data.js";import{clearCaptchaToken as p,getCaptcha as f}from"../captcha/functions.js";import{IkasCustomerMarketingData as d}from"./data.js";var h="customerEmailSubscription";function b(){var t=a,r=e.isCustomerSubscribedToEmails;return!(t.customer&&r(t.customer)||m()||d.visitorSubscribedEmail)&&!window.localStorage.getItem(h)}function S(o){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return c(o),[4,f()];case 1:return r.sent(),[4,i(s(s({},o),{captchaToken:l.captchaToken}))];case 2:return t=r.sent(),p(),[2,t.isSuccess]}}))}))}function v(s){return t(this,void 0,void 0,(function(){var t,i;return r(this,(function(r){switch(r.label){case 0:return[4,f()];case 1:return r.sent(),t=a,[4,o({input:{email:s,captchaToken:l.captchaToken}})];case 2:return(i=r.sent()).isSuccess&&(window.localStorage.setItem(h,"true"),t.customer?(t.customer.subscriptionStatus,u.SUBSCRIBED):d.visitorSubscribedEmail=!0,n(s)),[2,i.isSuccess]}}))}))}export{h as LS_CUSTOMER_SUB_KEY,b as canCreateEmailSubscription,v as createEmailSubscription,S as saveContactForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from
|
|
1
|
+
import{__awaiter as t,__generator as e}from"../../../node_modules/tslib/tslib.es6.js";import{getOrders as n,getOrderByEmail as r,listOrderTransactions as i,createOrderRefundRequest as u,listOrderRefundSettings as s}from"@ikas/storefront-api";import{IkasCustomerOrderData as a}from"./data.js";function o(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n({})];case 1:return[2,t.sent().data||[]]}}))}))}function d(r){var i;return t(this,void 0,void 0,(function(){var t,u;return e(this,(function(e){switch(e.label){case 0:return[4,n({orderId:r})];case 1:return(t=e.sent()).isSuccess&&(null===(i=t.data)||void 0===i?void 0:i.length)?(u=t.data[0],[4,h()]):[2,null];case 2:return e.sent(),u.refundSettings=a.refundSettings,[2,u]}}))}))}function c(n,i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,r({email:n,orderNumber:i})];case 1:return[2,t.sent().data||null]}}))}))}function l(n){return void 0===n&&(n={}),t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,i({checkoutId:{eq:n.checkoutId},id:{eq:n.checkoutId},orderId:{eq:n.orderId}})];case 1:return[2,t.sent().data||[]]}}))}))}function f(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=[],n.orderLineItems.map((function(e){null!==e.refundQuantity&&(null==t||t.push({orderLineItemId:e.id,quantity:e.refundQuantity?e.refundQuantity:0}))})),[4,u({input:{orderId:n.id,orderLineItems:t}})];case 1:return(r=e.sent()).isSuccess&&r.data?(Object.entries(r.data).forEach((function(t){var e=t[0],r=t[1];n[e]=r})),[2,!0]):[3,3];case 2:return e.sent(),[3,3];case 3:return[2,!1]}}))}))}function h(){var n;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return a.refundSettings?[3,2]:[4,s({})];case 1:(t=e.sent()).isSuccess&&(null===(n=t.data)||void 0===n?void 0:n.length)&&(a.refundSettings=t.data[0]),e.label=2;case 2:return[2]}}))}))}export{d as getOrder,c as getOrderByEmail,h as getOrderRefundSettings,l as getOrderTransactions,o as getOrders,f as refundOrder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as r}from
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as r}from"../../../node_modules/tslib/tslib.es6.js";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{addToWishlist as n}from"../../../analytics/analytics.js";import"../../../analytics/head/index.js";import{IkasCustomerProductData as o}from"./data.js";import{isServer as s}from"../../../utils/helper.js";import u from"lodash/xorBy";import d from"lodash/cloneDeep";import{IkasCustomerStore as a}from"../index.js";import{listFavoriteProducts as c,searchProducts as l,saveFavoriteProduct as v,isFavoriteProduct as f,createCustomerReview as h,saveLastViewedProducts as m,getLastViewedProducts as w}from"@ikas/storefront-api";var p="lastViewedProducts";function I(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return a.customer?[4,c()]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))}function V(){var r,n,o,s;return t(this,void 0,void 0,(function(){var t,u;return e(this,(function(e){switch(e.label){case 0:return a.customer?[4,c()]:[2,[]];case 1:return(t=e.sent()).isSuccess&&(null===(r=t.data)||void 0===r?void 0:r.length)?[4,l({input:{productIdList:t.data.map((function(t){return t.productId})),priceListId:i.getPriceListId(),salesChannelId:i.getSalesChannelId()}})]:[2,[]];case 2:return u=e.sent(),null===(o=null===(n=u.data)||void 0===n?void 0:n.data)||void 0===o||o.forEach((function(t){t.selectedVariantValues=t.variants[0].variantValues})),[2,(null===(s=null==u?void 0:u.data)||void 0===s?void 0:s.data)||[]]}}))}))}function P(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=a.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,v({isFavorite:!0,productId:r})];case 1:return t=e.sent(),n(r),[2,t.data||!1]}}))}))}function g(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=a.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,v({isFavorite:!1,productId:r})];case 1:return t=e.sent(),n(r),[2,t.data||!1]}}))}))}function b(r){var i;return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:if(!(null===(i=a.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,f({productId:r})];case 1:return[2,t.sent().data||!1]}}))}))}function L(n){var o;return t(this,void 0,void 0,(function(){var t,s,u,d;return e(this,(function(e){switch(e.label){case 0:if(t=i.getCustomerReviewSettings(),s=i.getSalesChannelId(),u=a,!t)return[2];if(!(d=null===(o=u.customer)||void 0===o?void 0:o.id)&&t.customerLoginRequired)throw Error("Unauthorized");return[4,h({input:r(r({},n),{customerId:t.customerLoginRequired?d:void 0,salesChannelId:s||""})})];case 1:return[2,e.sent().data]}}))}))}function S(){var t;return!!(null===(t=o.savedLastViewedProducts)||void 0===t?void 0:t.length)&&!!o.savedLastViewedProductsResponse&&0===u(o.lastViewedProducts,o.savedLastViewedProducts,"productId").length}function y(r,i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return(t=a).customer?o.lastViewedProducts.find((function(t){return t.productId===r}))?[2]:[4,m({input:{customerId:t.customer.id,products:[{productId:r,variantId:i}]}})]:[3,2];case 1:return e.sent()&&o.lastViewedProducts.push({productId:r,variantId:i}),[3,3];case 2:o.lastViewedProducts=R(),o.lastViewedProducts=o.lastViewedProducts.filter((function(t){return t.productId!==r})),o.lastViewedProducts.push({productId:r,variantId:i}),o.lastViewedProducts=o.lastViewedProducts.slice(-20),C(),e.label=3;case 3:return[2]}}))}))}function j(){var r;return t(this,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return(t=a).customer?[4,w({customerId:t.customer.id})]:[3,2];case 1:return i=e.sent(),o.lastViewedProducts=(null===(r=i.data)||void 0===r?void 0:r.reverse())||[],[3,3];case 2:E(),e.label=3;case 3:return[2,o.lastViewedProducts]}}))}))}function k(t){o.savedLastViewedProducts=d(o.lastViewedProducts),o.savedLastViewedProductsResponse=t}function C(){s()||window.localStorage.setItem(p,JSON.stringify(o.lastViewedProducts))}function E(){s()||(o.lastViewedProducts=R(),o.lastViewedProducts=d(o.lastViewedProducts).reverse())}function R(){if(s())return[];try{var t=window.localStorage.getItem(p);if(t)return JSON.parse(t)}catch(t){}return[]}function x(){s()||window.localStorage.removeItem(p)}function z(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:if(s())return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),t=a,(r=R()).length?[4,m({input:{customerId:t.customer.id,products:r}})]:[3,3];case 2:e.sent()&&x(),e.label=3;case 3:return[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))}function U(){return i.isBackInStockEnabled()}function q(){return i.isCustomerLoginRequiredForBackInStock()}export{p as LS_LAST_VIEWED_PRODUCTS_KEY,P as addProductToFavorites,V as getFavoriteProducts,I as getFavoriteProductsIds,j as getLastViewedProducts,R as getLocalLastViewedProducts,y as handleProductViewEvent,q as isBackInStockCustomerLoginRequired,U as isBackInStockEnabled,b as isProductFavorite,E as loadLastViewedProducts,x as removeLastViewedProducts,g as removeProductFromFavorites,C as saveLastViewedProducts,z as saveLocalLastViewedProducts,L as sendReview,k as setSavedLastViewedProductsResponse,S as shouldUseLastViewedProductResponse};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as r}from
|
|
1
|
+
import{__awaiter as t,__generator as r}from"../../../node_modules/tslib/tslib.es6.js";import{listRaffleParticipants as e}from"@ikas/storefront-api";import{populateRaffleParticipantProducts as o}from"@ikas/storefront-providers";function s(){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,e()];case 1:return(t=r.sent())&&t.data?[4,o(t.data)]:[3,3];case 2:r.sent(),r.label=3;case 3:return[2,t.data]}}))}))}export{s as getRaffles};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.24",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -16,34 +16,20 @@
|
|
|
16
16
|
"release": "npm publish",
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"@ikas/storefront-api": "^5.0.0-beta.
|
|
21
|
-
"@ikas/storefront-config": "^5.0.0-beta.
|
|
22
|
-
"@ikas/storefront-model-functions": "^5.0.0-beta.
|
|
23
|
-
"@ikas/storefront-models": "^5.0.0-beta.
|
|
24
|
-
"@ikas/storefront-providers": "^5.0.0-beta.
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@ikas/storefront-api": "^5.0.0-beta.24",
|
|
21
|
+
"@ikas/storefront-config": "^5.0.0-beta.24",
|
|
22
|
+
"@ikas/storefront-model-functions": "^5.0.0-beta.24",
|
|
23
|
+
"@ikas/storefront-models": "^5.0.0-beta.24",
|
|
24
|
+
"@ikas/storefront-providers": "^5.0.0-beta.24",
|
|
25
25
|
"@ikas/localized-address": "^1.0.0-beta.2",
|
|
26
|
+
"@ikas/fe-api-client": "^1.0.20-beta.1",
|
|
26
27
|
"@adyen/adyen-web": "^5.28.2",
|
|
27
|
-
"@rollup/plugin-commonjs": "^22.0.0",
|
|
28
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
29
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
30
|
-
"rollup-plugin-rename-node-modules": "^1.2.0",
|
|
31
|
-
"@types/react-phone-number-input": "^3.0.10",
|
|
32
28
|
"mobx": "^6.1.3",
|
|
33
29
|
"mobx-react-lite": "^3.1.5",
|
|
34
30
|
"next": "12.2.0",
|
|
35
|
-
"prettier": "^2.2.1",
|
|
36
31
|
"react": "^17.0.2",
|
|
37
32
|
"react-dom": "^17.0.2",
|
|
38
|
-
"rollup": "^2.75.6",
|
|
39
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
40
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
41
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
42
|
-
"rollup-plugin-typescript2": "^0.32.1",
|
|
43
|
-
"sass": "^1.44.0",
|
|
44
|
-
"ttypescript": "^1.5.12",
|
|
45
|
-
"typescript": "^4.7.2",
|
|
46
|
-
"typescript-transform-paths": "^2.2.2",
|
|
47
33
|
"lodash": "^4.17.21",
|
|
48
34
|
"html-react-parser": "^1.4.0",
|
|
49
35
|
"query-string": "^6.13.8",
|
|
@@ -53,26 +39,7 @@
|
|
|
53
39
|
"libphonenumber-js": "^1.10.6",
|
|
54
40
|
"@paypal/react-paypal-js": "^7.8.2"
|
|
55
41
|
},
|
|
56
|
-
"
|
|
57
|
-
"@
|
|
58
|
-
"@ikas/storefront-api": "^5.0.0-beta.22",
|
|
59
|
-
"@ikas/storefront-config": "^5.0.0-beta.22",
|
|
60
|
-
"@ikas/storefront-model-functions": "^5.0.0-beta.22",
|
|
61
|
-
"@ikas/storefront-models": "^5.0.0-beta.22",
|
|
62
|
-
"@ikas/storefront-providers": "^5.0.0-beta.22",
|
|
63
|
-
"mobx": "^6.1.3",
|
|
64
|
-
"mobx-react-lite": "^3.1.5",
|
|
65
|
-
"next": "12.2.0",
|
|
66
|
-
"react": "^17.0.2",
|
|
67
|
-
"react-dom": "^17.0.2",
|
|
68
|
-
"lodash": "^4.17.21",
|
|
69
|
-
"html-react-parser": "^1.4.0",
|
|
70
|
-
"query-string": "^6.13.8",
|
|
71
|
-
"@stripe/react-stripe-js": "^1.10.0",
|
|
72
|
-
"@stripe/stripe-js": "^1.29.0",
|
|
73
|
-
"react-tooltip": "^4.2.21",
|
|
74
|
-
"libphonenumber-js": "^1.10.6",
|
|
75
|
-
"@adyen/adyen-web": "^5.28.2",
|
|
76
|
-
"@paypal/react-paypal-js": "^7.8.2"
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/react-phone-number-input": "^3.0.10"
|
|
77
44
|
}
|
|
78
45
|
}
|
package/build/_virtual/axios.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a={exports:{}};export{a};
|
package/build/_virtual/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a={exports:{}};export{a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}export{e as commonjsGlobal,o as getDefaultExportFromCjs};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r={};export{r as __exports};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r={};export{r as __exports};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r={};export{r as __exports};
|
package/build/ext/@ikas/fe-api-client/build/ext/@redtea/format-axios-error/axios-error-format.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__exports as e}from"../../../_virtual/axios-error-format.js";export{__exports as default}from"../../../_virtual/axios-error-format.js";Object.defineProperty(e,"__esModule",{value:!0}),e.RESPONSE_KEYS=e.CONFIG_KEYS=void 0,e.CONFIG_KEYS=["url","method","baseURL","headers","params","data","timeout","timeoutErrorMessage","withCredentials","auth","responseType","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","maxRedirects","socketPath","proxy","decompress"],e.RESPONSE_KEYS=["data","status","statusText","headers"];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{commonjsGlobal as o}from"../../../_virtual/_commonjsHelpers.js";import{__exports as r}from"../../../_virtual/core.js";export{__exports as default}from"../../../_virtual/core.js";import"./axios-error-format.js";import s from"stream";import{__exports as e}from"../../../_virtual/axios-error-format.js";Object.defineProperty(r,"__esModule",{value:!0}),r.isAxiosError=r.format=void 0;const i=e;function t(r){return o&&o.process&&r instanceof s.Readable?"[Readable]":r}function n(o){return!!(null==o?void 0:o.isAxiosError)}r.format=function(o){if(!n(o))return o;const r=new Error(o.message);r.name=o.name,r.stack=o.stack,r.code=o.code,r.isAxiosError=o.isAxiosError,r.config={};for(const s of i.CONFIG_KEYS)void 0!==o.config[s]&&(r.config[s]="data"===s?t(o.config[s]):o.config[s]);if(o.response){r.response={};for(const s of i.RESPONSE_KEYS)void 0!==o.response[s]&&(r.response[s]="data"===s?t(o.response[s]):o.response[s])}return r},r.isAxiosError=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getDefaultExportFromCjs as r}from"../../../_virtual/_commonjsHelpers.js";import{__exports as e}from"../../../_virtual/index.js";import"./core.js";import{__exports as o}from"../../../_virtual/core.js";!function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.format=void 0;var e=o;Object.defineProperty(r,"format",{enumerable:!0,get:function(){return e.format}})}(e);var t=r(e);export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import m from"./index.js";m.format;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./_hashClear.js";import r from"./_hashDelete.js";import o from"./_hashGet.js";import e from"./_hashHas.js";import s from"./_hashSet.js";var a=t,p=r,h=o,m=e,l=s;function f(t){var r=-1,o=null==t?0:t.length;for(this.clear();++r<o;){var e=t[r];this.set(e[0],e[1])}}f.prototype.clear=a,f.prototype.delete=p,f.prototype.get=h,f.prototype.has=m,f.prototype.set=l;var i=f;export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./_listCacheClear.js";import e from"./_listCacheDelete.js";import r from"./_listCacheGet.js";import o from"./_listCacheHas.js";import s from"./_listCacheSet.js";var a=t,p=e,l=r,i=o,m=s;function h(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}h.prototype.clear=a,h.prototype.delete=p,h.prototype.get=l,h.prototype.has=i,h.prototype.set=m;var c=h;export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"./_getNative.js";import r from"./_root.js";var t=o(r,"Map");export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./_mapCacheClear.js";import e from"./_mapCacheDelete.js";import r from"./_mapCacheGet.js";import o from"./_mapCacheHas.js";import a from"./_mapCacheSet.js";var p=t,m=e,s=r,h=o,l=a;function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=p,c.prototype.delete=m,c.prototype.get=s,c.prototype.has=h,c.prototype.set=l;var f=c;export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"./_root.js";var r=o.Symbol;export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import r from"./eq.js";var t=r,e=function(r,e){for(var f=r.length;f--;)if(t(r[f][0],e))return f;return-1};export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"./_Symbol.js";import t from"./_getRawTag.js";import r from"./_objectToString.js";var e=t,i=r,n=o?o.toStringTag:void 0,j=function(o){return null==o?void 0===o?"[object Undefined]":"[object Null]":n&&n in Object(o)?e(o):i(o)};export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./isFunction.js";import o from"./_isMasked.js";import r from"./isObject.js";import e from"./_toSource.js";var p=t,n=o,s=r,c=e,i=/^\[object .+?Constructor\]$/,a=Function.prototype,f=Object.prototype,m=a.toString,u=f.hasOwnProperty,j=RegExp("^"+m.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),l=function(t){return!(!s(t)||n(t))&&(p(t)?j:i).test(c(t))};export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"./_Symbol.js";import"./_baseGetTag.js";var t=o?o.prototype:void 0;t&&t.toString;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import r from"./_root.js";var o=r["__core-js_shared__"];export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./_getNative.js";var r=t;!function(){try{var t=r(Object,"defineProperty");t({},"",{})}catch(t){}}();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{commonjsGlobal as o}from"../../_virtual/_commonjsHelpers.js";var e="object"==typeof o&&o&&o.Object===Object&&o;export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import a from"./_isKeyable.js";var r=a,t=function(a,t){var e=a.__data__;return r(t)?e["string"==typeof t?"string":"hash"]:e.map};export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import r from"./_baseIsNative.js";import t from"./_getValue.js";var a=r,e=t,o=function(r,t){var o=e(r,t);return a(o)?o:void 0};export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./_Symbol.js";var r=t,o=Object.prototype,a=o.hasOwnProperty,e=o.toString,l=r?r.toStringTag:void 0,c=function(t){var r=a.call(t,l),o=t[l];try{t[l]=void 0;var c=!0}catch(t){}var i=e.call(t);return c&&(r?t[l]=o:delete t[l]),i};export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=function(n,r){return null==n?void 0:n[r]};export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"./_nativeCreate.js";var a=t,e=function(){this.__data__=a?a(null):{},this.size=0};export{e as default};
|