@ikas/storefront 2.0.63-alpha.1 → 2.0.63-alpha.3
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 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'../../ext/tslib/tslib.es6.js';import r,{useState as t}from"react";import
|
|
1
|
+
import{__assign as e}from'../../ext/tslib/tslib.es6.js';import r,{useState as t}from"react";import o from"next/link";import{observer as i}from"mobx-react-lite";import{IkasStorefrontConfig as n}from"../../storefront/index.js";i((function(i){var s=t(!1),f=s[0],m=s[1];return r.useEffect((function(){var e="string"==typeof i.href,r=n.store.spaLinksDisabled;m(r&&e)}),[n.store.spaLinksDisabled]),f?r.createElement("a",{href:i.href},i.children):r.createElement(o,e({},i),i.children)}));
|
package/build/store/base.d.ts
CHANGED
package/build/store/base.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as o,__generator as t}from'../ext/tslib/tslib.es6.js';import{configure as i,makeObservable as e,observable as r}from"mobx";import s from'../ext/lodash/sortBy.js';import d from'../ext/lodash/flatten.js';import{IkasCartStore as n}from"./cart.js";import{IkasCustomerStore as a}from"./customer.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/data/customer-attribute/index.js";import"../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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{IkasThemeSettings as m}from"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import"../api/blog/index.js";import"../api/brand/index.js";import"../api/cart/index.js";import"../api/category/index.js";import"../api/checkout/index.js";import"../api/city/index.js";import{IkasCountryAPI as p}from"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{IkasStorefrontConfig as l}from"../storefront/index.js";import u from'../ext/uuid/dist/esm-browser/v4.js';i({enforceActions:"never"});var c=function(){function i(){this.currentPageType=null,this.localeOptions=[],this.showLocaleOptions=!1,this.currentCountryCode=null,this.localeChecked=!1,this.settingsSet=!1,this.customerStore=new a(this),this.cartStore=new n(this),e(this,{currentPageType:r,localeOptions:r,showLocaleOptions:r,currentCountryCode:r})}return i.prototype.checkLocalization=function(){return o(this,void 0,void 0,(function(){var o,i,e,r,n,a,m,c;return t(this,(function(t){switch(t.label){case 0:return this.localeChecked?[2]:
|
|
1
|
+
import{__awaiter as o,__generator as t}from'../ext/tslib/tslib.es6.js';import{configure as i,makeObservable as e,observable as r}from"mobx";import s from'../ext/lodash/sortBy.js';import d from'../ext/lodash/flatten.js';import{IkasCartStore as n}from"./cart.js";import{IkasCustomerStore as a}from"./customer.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/index.js";import"../models/data/customer-review/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/installment-info/index.js";import"../models/data/merchant-settings/index.js";import"../models/data/order/index.js";import"../models/data/order/line-item/index.js";import"../api/product-option-file/index.js";import"../models/data/product/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/variant/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product-attribute/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product-filter/index.js";import"../models/data/variant-type/variant-value/index.js";import"../models/data/order-transaction/index.js";import"../models/data/product-option-set/index.js";import"../models/data/raffle/index.js";import"../models/data/product-campaing/campaign/index.js";import"../models/data/customer-attribute/index.js";import"../models/data/customer-attribute/customer-attribute-sales-channel/index.js";import"../models/theme/theme.js";import"../models/theme/page/index.js";import"../models/theme/component/prop/index.js";import"../models/theme/page/component/prop-value/link.js";import"../models/ui/brand-list/index.js";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-detail/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/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{IkasThemeSettings as m}from"../models/theme/settings/index.js";import"../models/theme/custom-data/index.js";import"../api/blog/index.js";import"../api/brand/index.js";import"../api/cart/index.js";import"../api/category/index.js";import"../api/checkout/index.js";import"../api/city/index.js";import{IkasCountryAPI as p}from"../api/country/index.js";import"../api/customer/index.js";import"../api/customer-review/index.js";import"../api/customer-review-summary/index.js";import"../api/district/index.js";import"../api/html-meta-data/index.js";import"../api/merchant/index.js";import"../api/product-search/index.js";import"../api/apollo.js";import"../api/favorite-product/index.js";import"../api/contact-form/index.js";import"../api/state/index.js";import"../api/product-option-set/index.js";import"../api/raffle/index.js";import"../api/back-in-stock-reminder/index.js";import"../api/product-campaign/index.js";import{IkasStorefrontConfig as l}from"../storefront/index.js";import u from'../ext/uuid/dist/esm-browser/v4.js';i({enforceActions:"never"});var c=function(){function i(){this.currentPageType=null,this.localeOptions=[],this.showLocaleOptions=!1,this.currentCountryCode=null,this.spaLinksDisabled=!1,this.localeChecked=!1,this.settingsSet=!1,this.customerStore=new a(this),this.cartStore=new n(this),"undefined"!=typeof window&&(this.spaLinksDisabled=navigator.userAgent.includes("Instagram")),e(this,{currentPageType:r,localeOptions:r,showLocaleOptions:r,currentCountryCode:r,spaLinksDisabled:r})}return i.prototype.checkLocalization=function(){return o(this,void 0,void 0,(function(){var o,i,e,r,n,a,m,c;return t(this,(function(t){switch(t.label){case 0:return this.localeChecked?[2]:"undefined"==typeof window?(console.warn("checkLocalization should be called on the client side!"),[2]):[4,p.getMyCountry()];case 1:return o=t.sent(),i=l.routings.find((function(o){return o.id===l.storefrontRoutingId})),this.currentCountryCode=o,i&&o?(e=!0,r=l.routings.find((function(t){var i;return null===(i=t.countryCodes)||void 0===i?void 0:i.includes(o)})),n=l.routings.find((function(o){var t;return!(null===(t=o.countryCodes)||void 0===t?void 0:t.length)})),r?i.id!==r.id&&(e=!1):n&&i.id!==n.id&&(e=!1),a=d(l.routings.map((function(o){return o.countryCodes||[]}))),[4,p.listCountries(a)]):[3,3];case 2:m=t.sent(),c=[],l.routings.map((function(t){var i;(null===(i=t.countryCodes)||void 0===i?void 0:i.length)?t.countryCodes.forEach((function(i){var e=m.find((function(o){return o.iso2===i}));c.push({id:u(),countryName:(null==e?void 0:e.native)||(null==e?void 0:e.name)||"",iso2:null==e?void 0:e.iso2,iso3:null==e?void 0:e.iso3,routing:t,isRecommended:i===o})})):c.push({id:u(),routing:t,isRecommended:!l.routings.some((function(t){var i;return null===(i=t.countryCodes)||void 0===i?void 0:i.includes(o)}))})})),this.localeOptions=s(c,"countryName"),e||(this.showLocaleOptions=!0),this.localeChecked=!0,t.label=3;case 3:return[2]}}))}))},i.prototype.setLocalization=function(o){o.routing.domain?window.location.replace("https://"+o.routing.domain):window.location.replace(window.location.origin+(o.routing.path?"/"+o.routing.path:""))},i.prototype.setSettings=function(o){this.settingsSet||new m(JSON.parse(o)).colors.map((function(o){return document.documentElement.style.setProperty(o.key,o.color)}))},i}();export{c as IkasBaseStore};
|