@ikas/storefront 2.0.63-alpha.2 → 2.0.63-alpha.4

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 e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
1
+ import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
@@ -1 +1 @@
1
- import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
1
+ import e from'../ext/decode-uri-component/index.js';export{default}from"../node_modules/decode-uri-component/index.js";
@@ -1 +1 @@
1
- import e from'../ext/strict-uri-encode/index.js';export{default}from"../node_modules/strict-uri-encode/index.js";
1
+ import o from'../ext/split-on-first/index.js';export{default}from"../node_modules/split-on-first/index.js";
@@ -1 +1 @@
1
- import{__assign as e}from'../../ext/tslib/tslib.es6.js';import r,{useState as t}from"react";import n from"next/link";import{observer as i}from"mobx-react-lite";i((function(i){var o=t(!1),m=o[0],f=o[1];return r.useEffect((function(){var e="string"==typeof i.href,r=navigator.userAgent.includes("Instagram");f(r&&e)}),[]),m?r.createElement("a",{href:i.href},i.children):r.createElement(n,e({},i),i.children)}));
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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./components/image";
2
2
  export * from "./components/page-editor/loader";
3
+ export * from "./components/link";
3
4
  export * from "./models";
4
5
  export * from "./pages";
5
6
  export * from "./scripts/generators";
package/build/index.js CHANGED
@@ -1 +1 @@
1
- export{Image}from"./components/image/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{IkasBlog,IkasBlogCategory,IkasBlogContent,IkasBlogMetaData,IkasBlogMetadataTargetType,IkasBlogTag,IkasBlogWriter}from"./models/data/blog/index.js";export{IkasBrand}from"./models/data/brand/index.js";export{IkasCategory,IkasCategoryPath,IkasFilterCategory}from"./models/data/category/index.js";export{IkasCheckout,IkasCheckoutCustomer,IkasCheckoutRecoveryEmailStatus,IkasCheckoutRecoveryStatus,IkasCheckoutStatus,IkasPaymentMethod,IkasShippingMethod,IkasShippingMethodEnum}from"./models/data/checkout/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerReview}from"./models/data/customer-review/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer-review-summary/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasCardAssociation,IkasCardType}from"./models/data/installment-info/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasAmountTypeEnum,IkasOrder,IkasOrderCancelledReason,IkasOrderPackageFulfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,OrderLineItemStatusEnum}from"./models/data/order/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings.js";export{IkasOrderLineOptions}from"./models/data/order/line-item/options/index.js";export{IkasOrderLineOptionsValue}from"./models/data/order/line-item/options/options-value/index.js";export{IkasProduct,IkasProductType}from"./models/data/product/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductAttribute,IkasProductAttributeType}from"./models/data/product-attribute/index.js";export{IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasApplicableProductFilterValue,IkasProductFilter,IkasProductFilterDisplayType,IkasProductFilterSettings,IkasProductFilterSortType,IkasProductFilterType,IkasProductFilterValue,IkasProductStockFilterValue,RangeValue,parseRangeStr}from"./models/data/product-filter/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasVariantSelectionType,IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasOrderTransaction,IkasTransactionStatusEnum,IkasTransactionTypeEnum}from"./models/data/order-transaction/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionSelectSettings,IkasProductOptionSelectType,IkasProductOptionSelectValue,IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTextSettings,IkasProductOptionTranslations,IkasProductOptionType}from"./models/data/product-option-set/index.js";export{IkasRaffle,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSlider}from"./models/data/slider/index.js";export{IkasProductCampaign}from"./models/data/product-campaing/index.js";export{IkasCustomerAttribute}from"./models/data/customer-attribute/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute-value/index.js";export{IkasCustomerAttributePermissionEnum,IkasCustomerAttributeRegisterPageRequirementEnum,IkasCustomerAttributeSalesChannel}from"./models/data/customer-attribute/customer-attribute-sales-channel/index.js";export{IkasCustomerAttributeOption}from"./models/data/customer-attribute/customer-attribute-option/index.js";export{IkasTheme}from"./models/theme/theme.js";export{IkasThemePage,IkasThemePageType}from"./models/theme/page/index.js";export{IkasThemePageComponent}from"./models/theme/page/component/index.js";export{IkasThemeComponent}from"./models/theme/component/index.js";export{IkasThemeComponentProp,IkasThemeComponentPropType}from"./models/theme/component/prop/index.js";export{IkasLinkPropValue,IkasLinkType}from"./models/theme/page/component/prop-value/link.js";export{IkasBrandPropValue}from"./models/theme/page/component/prop-value/brand.js";export{IkasBrandListPropValue}from"./models/theme/page/component/prop-value/brand-list.js";export{IkasProductListPropValue}from"./models/theme/page/component/prop-value/product-list.js";export{IkasProductDetailPropValue}from"./models/theme/page/component/prop-value/product-detail.js";export{IkasCategoryPropValue}from"./models/theme/page/component/prop-value/category.js";export{IkasCategoryListPropValue}from"./models/theme/page/component/prop-value/category-list.js";export{IkasThemeSettings}from"./models/theme/settings/index.js";export{IkasThemeCustomData}from"./models/theme/custom-data/index.js";export{IkasBlogPropValue}from"./models/theme/page/component/prop-value/blog.js";export{IkasBlogListPropValue}from"./models/theme/page/component/prop-value/blog-list.js";export{IkasBlogCategoryPropValue}from"./models/theme/page/component/prop-value/blog-category.js";export{IkasBlogCategoryListPropValue}from"./models/theme/page/component/prop-value/blog-category-list.js";export{IkasRafflePropValue}from"./models/theme/page/component/prop-value/raffle.js";export{IkasRaffleListPropValue}from"./models/theme/page/component/prop-value/raffle-list.js";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductDetail}from"./models/ui/product-detail/index.js";export{IkasProductList,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as o from"./pages/_slug_/index.js";export{o as SlugPage};import*as t from"./pages/pages/_slug_.js";export{t as CustomPage};import*as r from"./pages/checkout.js";export{r as CheckoutPage};import*as a from"./pages/account/index.js";export{a as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as m from"./pages/account/orders/index.js";export{m as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as d from"./pages/account/login.js";export{d as LoginPage};import*as p from"./pages/account/register.js";export{p as RegisterPage};import*as n from"./pages/account/forgot-password.js";export{n as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as u from"./pages/cart.js";export{u as CartPage};import*as x from"./pages/editor.js";export{x as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as g from"./pages/404.js";export{g as NotFoundPage};import*as k from"./pages/blog/index.js";export{k as BlogPage};import*as I from"./pages/blog/_slug_.js";export{I as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as P from"./pages/raffle/index.js";export{P as RafflesPage};import*as y from"./pages/account/raffles.js";export{y as AccountRafflesPage};export{APIGenerator}from"./scripts/generators/api/index.js";export{ComponentImportsGenerator}from"./scripts/generators/components/index.js";export{ConfigGenerator}from"./scripts/generators/config/index.js";export{PageGenerator}from"./scripts/generators/pages/index.js";export{StoreGenerator}from"./scripts/generators/store/index.js";export{ThemeJsonGenerator}from"./scripts/generators/theme/index.js";export{CustomDataTypesGenerator,PropTypeGenarator}from"./scripts/generators/types/index.js";export{IkasBaseStore}from"./store/base.js";export{IkasStorefrontConfig}from"./storefront/index.js";export{decodeBase64,findAllByKey,findAllIndexes,formatDate,pascalCase,sortObject,stringSorter,stringToSlug,tryForEach,validateEmail,validatePhoneNumber}from"./utils/helper.js";export{formatMoney,getCurrencySymbol}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";
1
+ export{Image}from"./components/image/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";import"./components/link/index.js";export{IkasBlog,IkasBlogCategory,IkasBlogContent,IkasBlogMetaData,IkasBlogMetadataTargetType,IkasBlogTag,IkasBlogWriter}from"./models/data/blog/index.js";export{IkasBrand}from"./models/data/brand/index.js";export{IkasCategory,IkasCategoryPath,IkasFilterCategory}from"./models/data/category/index.js";export{IkasCheckout,IkasCheckoutCustomer,IkasCheckoutRecoveryEmailStatus,IkasCheckoutRecoveryStatus,IkasCheckoutStatus,IkasPaymentMethod,IkasShippingMethod,IkasShippingMethodEnum}from"./models/data/checkout/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerReview}from"./models/data/customer-review/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer-review-summary/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasCardAssociation,IkasCardType}from"./models/data/installment-info/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasAmountTypeEnum,IkasOrder,IkasOrderCancelledReason,IkasOrderPackageFulfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,OrderLineItemStatusEnum}from"./models/data/order/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings.js";export{IkasOrderLineOptions}from"./models/data/order/line-item/options/index.js";export{IkasOrderLineOptionsValue}from"./models/data/order/line-item/options/options-value/index.js";export{IkasProduct,IkasProductType}from"./models/data/product/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductAttribute,IkasProductAttributeType}from"./models/data/product-attribute/index.js";export{IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasApplicableProductFilterValue,IkasProductFilter,IkasProductFilterDisplayType,IkasProductFilterSettings,IkasProductFilterSortType,IkasProductFilterType,IkasProductFilterValue,IkasProductStockFilterValue,RangeValue,parseRangeStr}from"./models/data/product-filter/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasVariantSelectionType,IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasOrderTransaction,IkasTransactionStatusEnum,IkasTransactionTypeEnum}from"./models/data/order-transaction/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionSelectSettings,IkasProductOptionSelectType,IkasProductOptionSelectValue,IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTextSettings,IkasProductOptionTranslations,IkasProductOptionType}from"./models/data/product-option-set/index.js";export{IkasRaffle,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSlider}from"./models/data/slider/index.js";export{IkasProductCampaign}from"./models/data/product-campaing/index.js";export{IkasCustomerAttribute}from"./models/data/customer-attribute/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute-value/index.js";export{IkasCustomerAttributePermissionEnum,IkasCustomerAttributeRegisterPageRequirementEnum,IkasCustomerAttributeSalesChannel}from"./models/data/customer-attribute/customer-attribute-sales-channel/index.js";export{IkasCustomerAttributeOption}from"./models/data/customer-attribute/customer-attribute-option/index.js";export{IkasTheme}from"./models/theme/theme.js";export{IkasThemePage,IkasThemePageType}from"./models/theme/page/index.js";export{IkasThemePageComponent}from"./models/theme/page/component/index.js";export{IkasThemeComponent}from"./models/theme/component/index.js";export{IkasThemeComponentProp,IkasThemeComponentPropType}from"./models/theme/component/prop/index.js";export{IkasLinkPropValue,IkasLinkType}from"./models/theme/page/component/prop-value/link.js";export{IkasBrandPropValue}from"./models/theme/page/component/prop-value/brand.js";export{IkasBrandListPropValue}from"./models/theme/page/component/prop-value/brand-list.js";export{IkasProductListPropValue}from"./models/theme/page/component/prop-value/product-list.js";export{IkasProductDetailPropValue}from"./models/theme/page/component/prop-value/product-detail.js";export{IkasCategoryPropValue}from"./models/theme/page/component/prop-value/category.js";export{IkasCategoryListPropValue}from"./models/theme/page/component/prop-value/category-list.js";export{IkasThemeSettings}from"./models/theme/settings/index.js";export{IkasThemeCustomData}from"./models/theme/custom-data/index.js";export{IkasBlogPropValue}from"./models/theme/page/component/prop-value/blog.js";export{IkasBlogListPropValue}from"./models/theme/page/component/prop-value/blog-list.js";export{IkasBlogCategoryPropValue}from"./models/theme/page/component/prop-value/blog-category.js";export{IkasBlogCategoryListPropValue}from"./models/theme/page/component/prop-value/blog-category-list.js";export{IkasRafflePropValue}from"./models/theme/page/component/prop-value/raffle.js";export{IkasRaffleListPropValue}from"./models/theme/page/component/prop-value/raffle-list.js";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductDetail}from"./models/ui/product-detail/index.js";export{IkasProductList,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as o from"./pages/_slug_/index.js";export{o as SlugPage};import*as t from"./pages/pages/_slug_.js";export{t as CustomPage};import*as r from"./pages/checkout.js";export{r as CheckoutPage};import*as a from"./pages/account/index.js";export{a as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as m from"./pages/account/orders/index.js";export{m as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as d from"./pages/account/login.js";export{d as LoginPage};import*as p from"./pages/account/register.js";export{p as RegisterPage};import*as n from"./pages/account/forgot-password.js";export{n as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as u from"./pages/cart.js";export{u as CartPage};import*as x from"./pages/editor.js";export{x as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as g from"./pages/404.js";export{g as NotFoundPage};import*as k from"./pages/blog/index.js";export{k as BlogPage};import*as I from"./pages/blog/_slug_.js";export{I as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as P from"./pages/raffle/index.js";export{P as RafflesPage};import*as y from"./pages/account/raffles.js";export{y as AccountRafflesPage};export{APIGenerator}from"./scripts/generators/api/index.js";export{ComponentImportsGenerator}from"./scripts/generators/components/index.js";export{ConfigGenerator}from"./scripts/generators/config/index.js";export{PageGenerator}from"./scripts/generators/pages/index.js";export{StoreGenerator}from"./scripts/generators/store/index.js";export{ThemeJsonGenerator}from"./scripts/generators/theme/index.js";export{CustomDataTypesGenerator,PropTypeGenarator}from"./scripts/generators/types/index.js";export{IkasBaseStore}from"./store/base.js";export{IkasStorefrontConfig}from"./storefront/index.js";export{decodeBase64,findAllByKey,findAllIndexes,formatDate,pascalCase,sortObject,stringSorter,stringToSlug,tryForEach,validateEmail,validatePhoneNumber}from"./utils/helper.js";export{formatMoney,getCurrencySymbol}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";
@@ -9,6 +9,7 @@ export declare class IkasBaseStore {
9
9
  localeOptions: IkasLocaleOption[];
10
10
  showLocaleOptions: boolean;
11
11
  currentCountryCode?: string | null;
12
+ spaLinksDisabled: boolean;
12
13
  private localeChecked;
13
14
  private settingsSet;
14
15
  constructor();
@@ -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]:void 0===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};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "2.0.63-alpha.2",
3
+ "version": "2.0.63-alpha.4",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.js",
6
6
  "author": "Umut Ozan Yıldırım",