@ikas/storefront 0.2.0-alpha.6 → 0.2.0-alpha.7
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/cjs/[slug]-c3efec75.js +1 -0
- package/build/cjs/analytics.js +1 -1
- package/build/cjs/api.js +1 -1
- package/build/cjs/{base-87cf6de7.js → base-6b93f997.js} +1 -1
- package/build/cjs/blog-category-list-617dc467.js +1 -0
- package/build/cjs/{cart-f6e4a77c.js → cart-8b6a2951.js} +1 -1
- package/build/cjs/components.js +1 -1
- package/build/cjs/{en-23346d2b.js → en-e3cbabf6.js} +0 -0
- package/build/cjs/{get-d8074995.js → get-7400a559.js} +0 -0
- package/build/cjs/{i18n-64322bef.js → i18n-0303b446.js} +1 -1
- package/build/cjs/{index-23f8268d.js → index-2bed1aff.js} +1 -1
- package/build/cjs/{index-9c362bcc.js → index-30376afa.js} +1 -1
- package/build/cjs/{index-e7773270.js → index-45530bb2.js} +1 -1
- package/build/cjs/{index-2db7c894.js → index-5b6bd214.js} +1 -1
- package/build/cjs/{index-0b53d9bd.js → index-7343404a.js} +1 -1
- package/build/cjs/{index-b0e04fe3.js → index-84548617.js} +1 -1
- package/build/cjs/{index-9b798e08.js → index-af30c815.js} +1 -1
- package/build/cjs/{index-40ded420.js → index-c75f4868.js} +1 -1
- package/build/cjs/{index-ee4bdd5a.js → index-d04fee37.js} +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/models.js +1 -1
- package/build/cjs/pages/index.d.ts +1 -1
- package/build/cjs/pages.js +1 -1
- package/build/cjs/store.js +1 -1
- package/build/cjs/{tr-e96d42a2.js → tr-c4424931.js} +0 -0
- package/build/cjs/utils.js +1 -1
- package/build/esm/[slug]-5be05d9d.js +1 -0
- package/build/esm/analytics.js +1 -1
- package/build/esm/api.js +1 -1
- package/build/esm/{base-af09cf31.js → base-5ced4c24.js} +1 -1
- package/build/esm/{blog-category-list-f6d3e84b.js → blog-category-list-00ac6ea3.js} +1 -1
- package/build/esm/{cart-e7ee5904.js → cart-38151cca.js} +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/{en-3c767374.js → en-669af913.js} +0 -0
- package/build/esm/{get-41aa8e36.js → get-17bc1d35.js} +0 -0
- package/build/esm/{i18n-bdaf13ed.js → i18n-2fdbe5db.js} +1 -1
- package/build/esm/{index-cf81c712.js → index-099b9743.js} +1 -1
- package/build/esm/{index-d26b7878.js → index-6eb9d822.js} +1 -1
- package/build/esm/{index-d2801a81.js → index-94c469ed.js} +1 -1
- package/build/esm/{index-d59c6c67.js → index-9ececcb5.js} +1 -1
- package/build/esm/{index-c9e27f67.js → index-a1d85224.js} +1 -1
- package/build/esm/index-a93921be.js +1 -0
- package/build/esm/{index-4119675c.js → index-ac80179e.js} +1 -1
- package/build/esm/{index-271a4063.js → index-dbba4a4c.js} +1 -1
- package/build/esm/{index-05282f31.js → index-ea9fc314.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/models.js +1 -1
- package/build/esm/pages/index.d.ts +1 -1
- package/build/esm/pages.js +1 -1
- package/build/esm/store.js +1 -1
- package/build/esm/{tr-7d1712d7.js → tr-69f8f304.js} +0 -0
- package/build/esm/utils.js +1 -1
- package/package.json +1 -1
- package/build/cjs/[slug]-03fe2246.js +0 -1
- package/build/cjs/blog-category-list-c0cacf56.js +0 -1
- package/build/esm/[slug]-31f18157.js +0 -1
- package/build/esm/index-84704340.js +0 -1
package/build/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{IkasStorefrontConfig}from"./storefront.js";export{f as IkasBlog,I as IkasBlogAPI,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,a as IkasBrandAPI,b as IkasCategoryAPI,c as IkasCityAPI,d as IkasDistrictAPI,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType,e as IkasStateAPI}from"./index-
|
|
1
|
+
export{IkasStorefrontConfig}from"./storefront.js";export{f as IkasBlog,I as IkasBlogAPI,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,a as IkasBrandAPI,b as IkasCategoryAPI,c as IkasCityAPI,d as IkasDistrictAPI,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType,e as IkasStateAPI}from"./index-9ececcb5.js";export{I as IkasCartAPI}from"./index-a1d85224.js";export{ag as Analytics,V as IkasAmountTypeEnum,a0 as IkasApplicableProductFilterValue,j as IkasBrand,k as IkasCategory,m as IkasCategoryPath,H as IkasCheckout,I as IkasCheckoutAPI,J as IkasCheckoutCustomer,M as IkasCheckoutRecoveryEmailStatus,N as IkasCheckoutRecoveryStatus,L as IkasCheckoutStatus,g as IkasContactFormAPI,a as IkasCountryAPI,n as IkasCustomer,b as IkasCustomerAPI,Q as IkasCustomerAddress,o as IkasCustomerReview,c as IkasCustomerReviewAPI,af as IkasCustomerReviewList,C as IkasFavoriteProduct,f as IkasFavoriteProductAPI,l as IkasFilterCategory,p as IkasHTMLMetaData,q as IkasHTMLMetaDataTargetType,r as IkasImage,d as IkasMerchantAPI,R as IkasMerchantSettings,S as IkasOrder,U as IkasOrderCancelledReason,s as IkasOrderLineItem,Y as IkasOrderPackageFulfillStatus,X as IkasOrderPackageStatus,W as IkasOrderPaymentStatus,t as IkasOrderRefundSettings,Z as IkasOrderShippingMethod,T as IkasOrderStatus,E as IkasOrderTransaction,O as IkasPaymentMethod,u as IkasProduct,z as IkasProductAttribute,A as IkasProductAttributeType,B as IkasProductAttributeValue,h as IkasProductBackInStockReminderAPI,ae as IkasProductDetail,$ as IkasProductFilter,a4 as IkasProductFilterDisplayType,a2 as IkasProductFilterSettings,a5 as IkasProductFilterSortType,a3 as IkasProductFilterType,a1 as IkasProductFilterValue,y as IkasProductPrice,e as IkasProductSearchAPI,v as IkasProductType,x as IkasProductVariant,w as IkasProductVariantType,K as IkasShippingMethod,P as IkasShippingMethodEnum,aa as IkasThemePage,ac as IkasThemePageComponent,ab as IkasThemePageType,ad as IkasThemeSettings,F as IkasTransactionStatusEnum,G as IkasTransactionTypeEnum,a9 as IkasVariantSelectionType,a8 as IkasVariantType,D as IkasVariantValue,_ as OrderLineItemStatusEnum,a6 as RangeValue,i as apollo,a7 as parseRangeStr}from"./index-ea9fc314.js";export{I as IkasHTMLMetaDataAPI,a as IkasProductOptionSetAPI}from"./index-099b9743.js";export{I as IkasProductAttributeAPI,a as IkasVariantTypeAPI}from"./index-a93921be.js";export{I as IkasPage,a as IkasPageHead,b as Image}from"./index-94c469ed.js";export{I as IkasPageEditor}from"./index-dbba4a4c.js";export{j as IkasBlogCategoryListPropValue,i as IkasBlogCategoryPropValue,h as IkasBlogListPropValue,g as IkasBlogPropValue,b as IkasBrandListPropValue,a as IkasBrandPropValue,f as IkasCategoryListPropValue,e as IkasCategoryPropValue,I as IkasContactForm,d as IkasProductDetailPropValue,c as IkasProductListPropValue}from"./blog-category-list-00ac6ea3.js";export{t as AccountInfoForm,A as AddressForm,C as ContactForm,u as CustomerReviewForm,K as EmailRule,N as EqualsRule,F as ForgotPasswordForm,z as IkasAttributeDetail,B as IkasAttributeList,x as IkasBlogCategoryList,y as IkasBlogCategoryListType,v as IkasBlogList,w as IkasBlogListType,i as IkasBrandList,k as IkasBrandListSortType,j as IkasBrandListType,I as IkasCardAssociation,a as IkasCardType,l as IkasCategoryList,n as IkasCategoryListSortType,m as IkasCategoryListType,O as IkasComponentRenderer,f as IkasLinkPropValue,g as IkasLinkType,o as IkasNavigationLink,p as IkasProductList,r as IkasProductListSortType,q as IkasProductListType,b as IkasTheme,c as IkasThemeComponent,d as IkasThemeComponentProp,e as IkasThemeComponentPropType,h as IkasThemeCustomData,J as LessThanRule,L as LoginForm,G as MaxRule,M as MinRule,P as PhoneRule,s as RecoverPasswordForm,R as RegisterForm,H as RequiredRule,E as ValidationRule,V as Validator,D as ValidatorErrorType}from"./index-ac80179e.js";export{b as AccountPage,d as AddressesPage,q as BlogPage,t as BlogSlugPage,m as CartPage,c as CheckoutPage,_ as CustomPage,n as EditorPage,o as FavoriteProductsPage,j as ForgotPasswordPage,h as IndexPage,l as LoginPage,p as NotFoundPage,f as OrderDetailPage,e as OrdersPage,k as RecoverPasswordPage,r as RegisterPage,s as SearchPage,i as SlugPage,g as SlugPageGetStaticPath,a as SlugPageGetStaticProps}from"./[slug]-5be05d9d.js";export{I as IkasBaseStore}from"./base-5ced4c24.js";export{c as createTranslationInputData,f as formatMoney,u as useTranslation}from"./i18n-2fdbe5db.js";export{d as decodeBase64,f as findAllIndexes,b as formatDate,p as pascalCase,a as stringSorter,s as stringToSlug,t as tryForEach,v as validatePhoneNumber}from"./get-17bc1d35.js";export{a as AnalyticsBody,A as AnalyticsHead}from"./index-6eb9d822.js";import"mobx";import"react";import"mobx-react-lite";import"next/router";import"crypto";import"./cart-38151cca.js";import"next/head";import"next/image";import"next/link";import"next/dynamic";import"next/error";import"fs";import"next/config";import"path";
|
package/build/esm/models.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as IkasBlog,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType}from"./index-
|
|
1
|
+
export{f as IkasBlog,k as IkasBlogCategory,g as IkasBlogContent,j as IkasBlogMetaData,i as IkasBlogMetadataTargetType,l as IkasBlogTag,h as IkasBlogWriter,w as IkasProductOption,t as IkasProductOptionDateSettings,v as IkasProductOptionFileSettings,s as IkasProductOptionSelectSettings,n as IkasProductOptionSelectType,r as IkasProductOptionSelectValue,o as IkasProductOptionSelectValueTranslations,x as IkasProductOptionSet,q as IkasProductOptionSetTranslations,u as IkasProductOptionTextSettings,p as IkasProductOptionTranslations,m as IkasProductOptionType}from"./index-9ececcb5.js";export{V as IkasAmountTypeEnum,a0 as IkasApplicableProductFilterValue,j as IkasBrand,k as IkasCategory,m as IkasCategoryPath,H as IkasCheckout,J as IkasCheckoutCustomer,M as IkasCheckoutRecoveryEmailStatus,N as IkasCheckoutRecoveryStatus,L as IkasCheckoutStatus,n as IkasCustomer,Q as IkasCustomerAddress,o as IkasCustomerReview,af as IkasCustomerReviewList,C as IkasFavoriteProduct,l as IkasFilterCategory,p as IkasHTMLMetaData,q as IkasHTMLMetaDataTargetType,r as IkasImage,R as IkasMerchantSettings,S as IkasOrder,U as IkasOrderCancelledReason,s as IkasOrderLineItem,Y as IkasOrderPackageFulfillStatus,X as IkasOrderPackageStatus,W as IkasOrderPaymentStatus,t as IkasOrderRefundSettings,Z as IkasOrderShippingMethod,T as IkasOrderStatus,E as IkasOrderTransaction,O as IkasPaymentMethod,u as IkasProduct,z as IkasProductAttribute,A as IkasProductAttributeType,B as IkasProductAttributeValue,ae as IkasProductDetail,$ as IkasProductFilter,a4 as IkasProductFilterDisplayType,a2 as IkasProductFilterSettings,a5 as IkasProductFilterSortType,a3 as IkasProductFilterType,a1 as IkasProductFilterValue,y as IkasProductPrice,v as IkasProductType,x as IkasProductVariant,w as IkasProductVariantType,K as IkasShippingMethod,P as IkasShippingMethodEnum,aa as IkasThemePage,ac as IkasThemePageComponent,ab as IkasThemePageType,ad as IkasThemeSettings,F as IkasTransactionStatusEnum,G as IkasTransactionTypeEnum,a9 as IkasVariantSelectionType,a8 as IkasVariantType,D as IkasVariantValue,_ as OrderLineItemStatusEnum,a6 as RangeValue,a7 as parseRangeStr}from"./index-ea9fc314.js";export{t as AccountInfoForm,A as AddressForm,C as ContactForm,u as CustomerReviewForm,K as EmailRule,N as EqualsRule,F as ForgotPasswordForm,z as IkasAttributeDetail,B as IkasAttributeList,x as IkasBlogCategoryList,y as IkasBlogCategoryListType,v as IkasBlogList,w as IkasBlogListType,i as IkasBrandList,k as IkasBrandListSortType,j as IkasBrandListType,I as IkasCardAssociation,a as IkasCardType,l as IkasCategoryList,n as IkasCategoryListSortType,m as IkasCategoryListType,O as IkasComponentRenderer,f as IkasLinkPropValue,g as IkasLinkType,o as IkasNavigationLink,p as IkasProductList,r as IkasProductListSortType,q as IkasProductListType,b as IkasTheme,c as IkasThemeComponent,d as IkasThemeComponentProp,e as IkasThemeComponentPropType,h as IkasThemeCustomData,J as LessThanRule,L as LoginForm,G as MaxRule,M as MinRule,P as PhoneRule,s as RecoverPasswordForm,R as RegisterForm,H as RequiredRule,E as ValidationRule,V as Validator,D as ValidatorErrorType}from"./index-ac80179e.js";export{j as IkasBlogCategoryListPropValue,i as IkasBlogCategoryPropValue,h as IkasBlogListPropValue,g as IkasBlogPropValue,b as IkasBrandListPropValue,a as IkasBrandPropValue,f as IkasCategoryListPropValue,e as IkasCategoryPropValue,I as IkasContactForm,d as IkasProductDetailPropValue,c as IkasProductListPropValue}from"./blog-category-list-00ac6ea3.js";import"./get-17bc1d35.js";import"./storefront.js";import"mobx";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as IndexPage from "./home";
|
|
2
|
-
export
|
|
2
|
+
export { default as SlugPage, getStaticPaths as SlugPageGetStaticPath, getStaticProps as SlugPageGetStaticProps, } from "./[slug]/index";
|
|
3
3
|
export * as CustomPage from "./pages/[slug]";
|
|
4
4
|
export * as CheckoutPage from "./checkout";
|
|
5
5
|
export * as AccountPage from "./account/index";
|
package/build/esm/pages.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{b as AccountPage,d as AddressesPage,q as BlogPage,t as BlogSlugPage,m as CartPage,c as CheckoutPage,_ as CustomPage,n as EditorPage,o as FavoriteProductsPage,j as ForgotPasswordPage,h as IndexPage,l as LoginPage,p as NotFoundPage,f as OrderDetailPage,e as OrdersPage,k as RecoverPasswordPage,r as RegisterPage,s as SearchPage,i as SlugPage,g as SlugPageGetStaticPath,a as SlugPageGetStaticProps}from"./[slug]-5be05d9d.js";import"./get-17bc1d35.js";import"./storefront.js";import"react";import"mobx-react-lite";import"./index-94c469ed.js";import"mobx";import"next/router";import"./index-ea9fc314.js";import"crypto";import"./i18n-2fdbe5db.js";import"fs";import"path";import"next/config";import"./index-9ececcb5.js";import"./index-ac80179e.js";import"./cart-38151cca.js";import"./index-a1d85224.js";import"next/head";import"./index-099b9743.js";import"next/image";import"next/link";import"next/dynamic";import"next/error";
|
package/build/esm/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{I as IkasBaseStore}from"./base-
|
|
1
|
+
export{I as IkasBaseStore}from"./base-5ced4c24.js";import"./get-17bc1d35.js";import"./storefront.js";import"mobx";import"./index-ea9fc314.js";import"./cart-38151cca.js";import"./index-a1d85224.js";
|
|
File without changes
|
package/build/esm/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as decodeBase64,f as findAllIndexes,b as formatDate,p as pascalCase,a as stringSorter,s as stringToSlug,t as tryForEach,v as validatePhoneNumber}from"./get-
|
|
1
|
+
export{d as decodeBase64,f as findAllIndexes,b as formatDate,p as pascalCase,a as stringSorter,s as stringToSlug,t as tryForEach,v as validatePhoneNumber}from"./get-17bc1d35.js";export{c as createTranslationInputData,f as formatMoney,u as useTranslation}from"./i18n-2fdbe5db.js";import"./storefront.js";import"fs";import"path";import"next/config";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./get-d8074995.js"),t=require("react"),r=require("mobx-react-lite"),n=require("./index-e7773270.js"),o=require("./index-9b798e08.js"),s=require("./storefront.js"),i=require("next/router"),a=require("next/dynamic"),c=require("next/error"),u=require("fs"),l=require("next/config"),d=require("./index-23f8268d.js");require("mobx");var g=require("./i18n-64322bef.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p,_=f(a),m=f(c),h=f(u),v=f(l),S=function(e){var t,r;void 0===e&&(e={}),this.id=e.id||"",this.name=e.name||"",this.priceListId=e.priceListId||"",this.stockLocations=(null===(t=e.stockLocations)||void 0===t?void 0:t.map((function(e){return new I(e)})))||[],this.paymentGateways=(null===(r=e.paymentGateways)||void 0===r?void 0:r.map((function(e){return new P(e)})))||[]},I=function(e){this.id=e.id||"",this.order=e.order||0},P=function(e){this.id=e.id||"",this.order=e.order||0},k=function(e){this.id=e.id||"",this.locale=e.locale||"",this.storefrontId=e.storefrontId||"",this.storefrontThemeId=e.storefrontThemeId||"",this.themeJson=e.themeJson?new d.IkasTheme(e.themeJson):new d.IkasTheme,this.privacyPolicy=e.privacyPolicy||null,this.returnPolicy=e.returnPolicy||null,this.termsOfService=e.termsOfService||null},C=function(){function t(){}return t.getStorefront=function(t){return e.__awaiter(this,void 0,void 0,(function(){var r,s,i,a,c;return e.__generator(this,(function(u){switch(u.label){case 0:r=o.src(p||(p=e.__makeTemplateObject(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "],["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "]))),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,o.apollo.getClient().query({query:r,variables:{id:t}})];case 2:return s=u.sent(),i=s.data,(a=s.errors)&&a.length&&console.log(a),i?[2,new n.IkasStorefront(i.getStorefront)]:[3,4];case 3:return c=u.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},t}(),b=function(){function t(){}return t.readLocalTheme=function(){return new Promise((function(e,t){h.default.readFile("./src/theme.json",{flag:"a+"},(function(r,n){if(r)return t(r);var o=n.length?JSON.parse(n.toString()):{};e(new d.IkasTheme(o))}))}))},t.readSettingsFile=function(){return new Promise((function(e){var t=v.default().serverRuntimeConfig.SETTINGS;h.default.readFile(t,{flag:"a+"},(function(t,r){if(t)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(t),e(null);var n=r.length?JSON.parse(r.toString()):{};e(n)}))}))},t.getSettings=function(r){var o=this;return new Promise((function(i){return e.__awaiter(o,void 0,void 0,(function(){var o,a,c,u,l,d,g,f,p,_,m,v,I,P;return e.__generator(this,(function(e){switch(e.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?s.IkasStorefrontConfig.storefrontId?[4,C.getStorefront(s.IkasStorefrontConfig.storefrontId)]:(console.error("Missing storefrontId in the config.json file!"),[2,i(null)]):[3,3];case 1:return(o=e.sent())?(a=o,[4,t.readLocalTheme()]):[2,i(null)];case 2:return c=e.sent(),u=t.createColorScript(c.settings),i({storefront:a,themeLocalization:new k({themeJson:c}),salesChannel:new S({id:a.salesChannelId}),routing:a.routings.length?a.routings.find((function(e){return e.locale===r||e.id===r}))||a.routings[0]:new n.IkasStorefrontRouting({}),favicon:c.settings.favicon,stockPreference:c.settings.stockPreference,storefrontJSScripts:u?[u]:[],domain:"",productBackInStockSettings:{customerLoginRequired:!0},customerReviewSettings:{customerLoginRequired:!0,customerPurchaseRequired:!1}}),[3,5];case 3:return[4,t.readSettingsFile()];case 4:if(!(l=e.sent())||!l.localizationMap)return[2,i(null)];if(d=new n.IkasStorefront(l.storefront),g=new S(l.salesChannel),f=l.localizationMap,p=l.storefrontJSScripts||[],_=l.domain,m=l.productBackInStockSettings?{customerLoginRequired:l.productBackInStockSettings.customerLoginRequired}:null,v=l.customerReviewSettings?{customerLoginRequired:l.customerReviewSettings.customerLoginRequired,customerPurchaseRequired:l.customerReviewSettings.customerPurchaseRequired}:null,I=f[r],P=d.routings.find((function(e){return e.id===r||e.path===r})),!I||!P)return console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,i(null)];h.default.readFile(I,{flag:"a+"},(function(e,r){if(e)return console.error("THEME LOCALZIATION FILE READ ERROR!!!"),console.error(e),i(null);var n=r.length?JSON.parse(r.toString()):{},o=new k(n),s=o.themeJson.settings.favicon,a=o.themeJson.settings.stockPreference;if(o.themeJson.settings){var c=t.createColorScript(o.themeJson.settings);c&&p.push(c)}i({storefront:d,themeLocalization:o,salesChannel:g,routing:P,favicon:s,stockPreference:a,storefrontJSScripts:p,domain:_,productBackInStockSettings:m,customerReviewSettings:v})})),e.label=5;case 5:return[2]}}))}))}))},t.getPageData=function(r,i,a,c,u){var l,d;return e.__awaiter(this,void 0,void 0,(function(){var f,p,_,m,h,S,I,P,k,C,b,y,T,w,E,O,R,x,F,L,A,B,z,D,j,q;return e.__generator(this,(function(J){switch(J.label){case 0:return f="local"===process.env.NEXT_PUBLIC_ENV,p=!f&&u,_=v.default().serverRuntimeConfig,p?[3,7]:(m=r.locale)?[4,t.getSettings(m)]:[2,{props:{},notFound:!0}];case 1:return(h=J.sent())&&h.storefront.mainStorefrontThemeId&&h.storefront.salesChannelId?(S=h.storefront,I=h.themeLocalization,P=h.salesChannel,k=h.routing,C=h.favicon,b=h.stockPreference,y=h.storefrontJSScripts,T=h.domain,w=h.productBackInStockSettings,E=h.customerReviewSettings,s.IkasStorefrontConfig.storefrontId=S.id,s.IkasStorefrontConfig.storefrontRoutingId=k.id,s.IkasStorefrontConfig.storefrontThemeId=S.mainStorefrontThemeId,s.IkasStorefrontConfig.salesChannelId=S.salesChannelId,s.IkasStorefrontConfig.priceListId=k.priceListId||void 0,s.IkasStorefrontConfig.stockLocationIds=null===(l=P.stockLocations)||void 0===l?void 0:l.map((function(e){return e.id})),s.IkasStorefrontConfig.routings=S.routings,s.IkasStorefrontConfig.paymentGateways=P.paymentGateways||[],s.IkasStorefrontConfig.gtmId=S.gtmId||void 0,s.IkasStorefrontConfig.fbpId=S.fbpId||void 0,s.IkasStorefrontConfig.favicon=C||null,s.IkasStorefrontConfig.stockPreference=b||null,s.IkasStorefrontConfig.storefrontJSScripts=y||[],s.IkasStorefrontConfig.domain=T,s.IkasStorefrontConfig.productBackInStockSettings=w,s.IkasStorefrontConfig.customerReviewSettings=E,(O=new n.IkasPageDataProvider(I.themeJson,r.params,a)).possiblePageTypes=c,u?[3,3]:[4,O.getPageData()]):[2,{props:{},notFound:!0}];case 2:if(J.sent(),!O.page)return[2,{props:{},notFound:!0}];J.label=3;case 3:return R=u?O.theme.components.map((function(e){return e.id})):O.page.components.map((function(e){return e.componentId})),x=I.themeJson.components.filter((function(e){return u||R.includes(e.id)})),F=e.__spreadArrays(["common"],x.map((function(e){return e.dir}))),(a===o.IkasThemePageType.CHECKOUT||u)&&F.push("checkout-page"),L=_.nextI18nConf,A=k.locale,[4,new g.I18NFileReader(A,F,f?void 0:L.localePath).read()];case 4:return B=J.sent(),s.IkasStorefrontConfig.translations=B,z={},a!==o.IkasThemePageType.CHECKOUT?[3,6]:(D=null===(d=O.page)||void 0===d?void 0:d.components[0])?[4,o.IkasCheckoutAPI.listCheckoutSettings()]:[3,6];case 5:j=J.sent(),q={buttonBgColor:D.propValues.buttonBgColor,buttonTextColor:D.propValues.buttonTextColor,buttonDisabledBgColor:D.propValues.buttonDisabledBgColor,buttonDisabledTextColor:D.propValues.buttonDisabledTextColor,primaryTextColor:D.propValues.primaryTextColor,secondaryTextColor:D.propValues.secondaryTextColor,primaryBgColor:D.propValues.primaryBgColor,secondaryBgColor:D.propValues.secondaryBgColor,borderColor:D.propValues.borderColor,cardBgColor:D.propValues.cardBgColor,errorColor:D.propValues.errorColor,errorLightColor:D.propValues.errorLightColor,warningColor:D.propValues.warningColor,warningLightColor:D.propValues.warningLightColor,successColor:D.propValues.successColor,successLightColor:D.propValues.successLightColor},z.customizationProps=q,z.returnPolicy=I.returnPolicy,z.privacyPolicy=I.privacyPolicy,z.termsOfService=I.termsOfService,z.checkoutSettingsStr=(null==j?void 0:j.length)?JSON.stringify(j[0]):null,J.label=6;case 6:return i?[2,{props:e.__assign(e.__assign({},O.nextPageData.props),z)}]:[2,{props:e.__assign(e.__assign({},O.nextPageData.props),z),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},t.getStaticProps=function(r,n,o,s){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getPageData(r,!1,n,o,s)];case 1:return[2,e.sent()]}}))}))},t.getServerSideProps=function(r,n){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getPageData(r,!0,n)];case 1:return[2,e.sent()]}}))}))},t.createColorScript=function(e){if(e.colors)return"<script>"+e.colors.map((function(e){return'document.documentElement.style.setProperty("'+e.key+'","'+e.color+'");'})).join("\r\n")+"<\/script> \n "},t}(),y=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),T=Object.freeze({__proto__:null,default:y,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.INDEX)];case 1:return[2,e.sent()]}}))}))}}),w=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0,reInitOnBrowser:!0}))})),E=Object.freeze({__proto__:null,default:w,getStaticPaths:function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,{paths:[],fallback:"blocking"}]}))}))},getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,void 0,[o.IkasThemePageType.BRAND,o.IkasThemePageType.CATEGORY,o.IkasThemePageType.PRODUCT])];case 1:return[2,e.sent()]}}))}))}}),O=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),R=Object.freeze({__proto__:null,default:O,getStaticPaths:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){var r,n;return e.__generator(this,(function(e){switch(e.label){case 0:return t.locales?[4,Promise.all(t.locales.map((function(e){return b.getSettings(e)})))]:[2,{paths:[],fallback:"blocking"}];case 1:return r=e.sent(),n=[],r.forEach((function(e){var t=e.themeLocalization,r=e.routing;t&&t.themeJson.pages.filter((function(e){return e.type===o.IkasThemePageType.CUSTOM})).forEach((function(e){e.slug&&!n.some((function(t){return t.params.slug===e.slug}))&&("local"===process.env.NEXT_PUBLIC_ENV?n.push({params:{slug:e.slug}}):n.push({params:{slug:e.slug},locale:r.path||r.id}))}))})),[2,{paths:n.map((function(e){return{params:e.params,locale:e.locale}})),fallback:"blocking"}]}}))}))},getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.CUSTOM)];case 1:return[2,e.sent()]}}))}))}}),x=r.observer((function(r){var a=r.merchantSettingsStr,c=r.checkoutSettingsStr,u=r.customizationProps,l=r.configJson,d=e.__rest(r,["merchantSettingsStr","checkoutSettingsStr","customizationProps","configJson"]),g=i.useRouter(),f=t.useState(),p=f[0],_=f[1];s.IkasStorefrontConfig.initWithJson(l);var m=s.IkasStorefrontConfig.store,h=t.useMemo((function(){return c?new o.IkasCheckoutSettings(JSON.parse(c)):new o.IkasCheckoutSettings}),[c]),v=t.useMemo((function(){return a?new o.IkasMerchantSettings(JSON.parse(a)):null}),[a]);t.useEffect((function(){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==u?void 0:u.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==u?void 0:u.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==u?void 0:u.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==u?void 0:u.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==u?void 0:u.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==u?void 0:u.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==u?void 0:u.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==u?void 0:u.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==u?void 0:u.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==u?void 0:u.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==u?void 0:u.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==u?void 0:u.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==u?void 0:u.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==u?void 0:u.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==u?void 0:u.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==u?void 0:u.successLightColor)||"#F6FFED")}),[u]),t.useEffect((function(){m.checkLocalization(),S(),o.initIkasEvents()}),[]);var S=t.useCallback((function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,r,n;return e.__generator(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(r=t.get("id"))?[4,o.IkasCheckoutAPI.getCheckoutById(r)]:[2,g.replace("/")];case 1:return(n=e.sent())?_(n):g.replace("/"),[2]}}))}))}),[]);return p?t.createElement(n.IkasCheckoutPage,e.__assign({checkout:p,merchantSettings:v,checkoutSettings:h,customizationProps:u},d)):t.createElement(n.FullscreenLoading,null)})),F=Object.freeze({__proto__:null,default:x,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.CHECKOUT)];case 1:return[2,e.sent()]}}))}))}}),L=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),A=Object.freeze({__proto__:null,default:L,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.ACCOUNT)];case 1:return[2,e.sent()]}}))}))}}),B=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),z=Object.freeze({__proto__:null,default:B,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.ADDRESSES)];case 1:return[2,e.sent()]}}))}))}}),D=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0}))})),j=Object.freeze({__proto__:null,default:D,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.ORDERS)];case 1:return[2,e.sent()]}}))}))}}),q=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),J=Object.freeze({__proto__:null,default:q,getServerSideProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getServerSideProps(t,o.IkasThemePageType.ORDER_DETAIL)];case 1:return[2,e.sent()]}}))}))}}),N=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),V=Object.freeze({__proto__:null,default:N,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.LOGIN)];case 1:return[2,e.sent()]}}))}))}}),M=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),G=Object.freeze({__proto__:null,default:M,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.REGISTER)];case 1:return[2,e.sent()]}}))}))}}),U=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),$=Object.freeze({__proto__:null,default:U,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.FORGOT_PASSWORD)];case 1:return[2,e.sent()]}}))}))}}),H=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),X=Object.freeze({__proto__:null,default:H,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.RECOVER_PASSWORD)];case 1:return[2,e.sent()]}}))}))}}),W=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),K=Object.freeze({__proto__:null,default:W,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.CART)];case 1:return[2,e.sent()]}}))}))}}),Y=_.default((function(){return Promise.resolve().then((function(){return require("./components.js")})).then((function(e){return e.IkasPageEditor}))}),{ssr:!1}),Z=r.observer((function(e){var r=e.configJson,n=e.components;return r&&s.IkasStorefrontConfig.initWithJson(r),n&&(s.IkasStorefrontConfig.currentPageComponents=n),t.createElement(Y,null)})),Q=Object.freeze({__proto__:null,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,void 0,void 0,!0)];case 1:return[2,e.sent()]}}))}))},default:Z}),ee=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r))})),te=Object.freeze({__proto__:null,default:ee,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.FAVORITE_PRODUCTS)];case 1:return[2,e.sent()]}}))}))}}),re=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0,reInitOnBrowser:!0}))})),ne=Object.freeze({__proto__:null,default:re,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.SEARCH)];case 1:return[2,e.sent()]}}))}))}}),oe=Object.freeze({__proto__:null,default:function(r){return r.propValuesStr?t.createElement(n.IkasPage,e.__assign({},r)):t.createElement(m.default,{statusCode:404})},getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){var r;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.NOT_FOUND)];case 1:return(r=e.sent()).notFound?[2,{props:{},revalidate:60}]:[2,r]}}))}))}}),se=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0}))})),ie=Object.freeze({__proto__:null,default:se,getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,o.IkasThemePageType.BLOG_INDEX)];case 1:return[2,e.sent()]}}))}))}}),ae=r.observer((function(r){return t.createElement(n.IkasPage,e.__assign({},r,{addOgpMetas:!0,reInitOnBrowser:!0}))})),ce=Object.freeze({__proto__:null,default:ae,getStaticPaths:function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,{paths:[],fallback:"blocking"}]}))}))},getStaticProps:function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,b.getStaticProps(t,void 0,[o.IkasThemePageType.BLOG,o.IkasThemePageType.BLOG_CATEGORY])];case 1:return[2,e.sent()]}}))}))}});exports._404=oe,exports._id_=J,exports._slug_=R,exports._slug_$1=ce,exports.addresses=z,exports.cart=K,exports.checkout=F,exports.editor=Q,exports.favoriteProducts=te,exports.forgotPassword=$,exports.home=T,exports.index=E,exports.index$1=A,exports.index$2=j,exports.index$3=ie,exports.login=V,exports.recoverPassword=X,exports.register=G,exports.search=ne;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=require("mobx"),i=require("./index-23f8268d.js");require("./index-9b798e08.js");var s=function(i){this.email=i.email||"",this.firstName=i.firstName||"",this.lastName=i.lastName||"",this.message=i.message||"",t.makeAutoObservable(this)},a=function(i){this.brandId=null,this.usePageData=null,this.brandId=i.brandId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},e=function(s){this.initialSort=null,this.initialLimit=null,this.brandCount=null,this.brandIds=null,this.brandListType=s.brandListType||i.IkasBrandListType.ALL,this.initialSort=s.initialSort||i.IkasBrandListSortType.A_Z,this.initialLimit=s.initialLimit||20,this.brandCount=s.brandCount,this.brandIds=s.brandIds,t.makeAutoObservable(this)},l=function(s){this.initialSort=null,this.initialLimit=null,this.productCount=null,this.productIds=null,this.usePageFilter=null,this.category=null,this.id=s.id||"",this.productListType=s.productListType||i.IkasProductListType.ALL,this.initialSort=s.initialSort||i.IkasProductListSortType.LAST_ADDED,this.initialLimit=s.initialLimit||20,this.productCount=s.productCount,this.productIds=s.productIds,this.category=s.category,this.usePageFilter=s.usePageFilter,t.makeAutoObservable(this)},o=function(i){this.productId=null,this.variantId=null,this.usePageData=null,this.productId=i.productId,this.variantId=i.variantId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},r=function(i){this.categoryId=null,this.usePageData=null,this.categoryId=i.categoryId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},u=function(s){this.initialSort=null,this.initialLimit=null,this.categoryCount=null,this.categoryIds=null,this.categoryListType=s.categoryListType||i.IkasCategoryListType.ALL,this.initialSort=s.initialSort||i.IkasCategoryListSortType.A_Z,this.initialLimit=s.initialLimit||20,this.categoryCount=s.categoryCount||null,this.categoryIds=s.categoryIds||null,t.makeAutoObservable(this)},n=function(i){this.blogId=null,this.usePageData=null,this.blogId=i.blogId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},h=function(s){this.initialLimit=null,this.blogIds=null,this.usePageFilter=null,this.blogListType=s.blogListType||i.IkasBlogListType.ALL,this.initialLimit=s.initialLimit||20,this.blogIds=s.blogIds,this.categoryId=s.categoryId||null,this.usePageFilter=s.usePageFilter||null,t.makeAutoObservable(this)},g=function(i){this.blogCategoryId=null,this.usePageData=null,this.blogCategoryId=i.blogCategoryId,this.usePageData=i.usePageData,t.makeAutoObservable(this)},d=function(s){this.initialLimit=null,this.blogCategoryIds=null,this.blogCategoryListType=s.blogCategoryListType||i.IkasBlogCategoryListType.ALL,this.initialLimit=s.initialLimit||20,this.blogCategoryIds=s.blogCategoryIds,t.makeAutoObservable(this)};exports.IkasBlogCategoryListPropValue=d,exports.IkasBlogCategoryPropValue=g,exports.IkasBlogListPropValue=h,exports.IkasBlogPropValue=n,exports.IkasBrandListPropValue=e,exports.IkasBrandPropValue=a,exports.IkasCategoryListPropValue=u,exports.IkasCategoryPropValue=r,exports.IkasContactForm=s,exports.IkasProductDetailPropValue=o,exports.IkasProductListPropValue=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t,c as e,e as n,i as r,j as o,l as i}from"./get-41aa8e36.js";import{createElement as s,useState as c,useMemo as u,useEffect as a,useCallback as l}from"react";import{observer as d}from"mobx-react-lite";import{e as f,g as p,d as g,I as m,F as h,f as v}from"./index-d2801a81.js";import{i as S,ah as P,ab as b,I as C,av as _,R as y,al as I}from"./index-05282f31.js";import{IkasStorefrontConfig as w}from"./storefront.js";import{useRouter as O}from"next/router";import E from"next/dynamic";import k from"next/error";import T from"fs";import R from"next/config";import{b as F}from"./index-4119675c.js";import"mobx";import{I as L}from"./i18n-bdaf13ed.js";var B,A=function(t){var e,n;void 0===t&&(t={}),this.id=t.id||"",this.name=t.name||"",this.priceListId=t.priceListId||"",this.stockLocations=(null===(e=t.stockLocations)||void 0===e?void 0:e.map((function(t){return new z(t)})))||[],this.paymentGateways=(null===(n=t.paymentGateways)||void 0===n?void 0:n.map((function(t){return new j(t)})))||[]},z=function(t){this.id=t.id||"",this.order=t.order||0},j=function(t){this.id=t.id||"",this.order=t.order||0},D=function(t){this.id=t.id||"",this.locale=t.locale||"",this.storefrontId=t.storefrontId||"",this.storefrontThemeId=t.storefrontThemeId||"",this.themeJson=t.themeJson?new F(t.themeJson):new F,this.privacyPolicy=t.privacyPolicy||null,this.returnPolicy=t.returnPolicy||null,this.termsOfService=t.termsOfService||null},x=function(){function r(){}return r.getStorefront=function(r){return t(this,void 0,void 0,(function(){var t,o,i,s,c;return e(this,(function(e){switch(e.label){case 0:t=P(B||(B=n(["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "],["\n query getStorefront($id: String!) {\n getStorefront(id: $id) {\n createdAt\n emailSettingsId\n fbpId\n gtmId\n id\n localizations {\n createdAt\n id\n isDefault\n locale\n name\n }\n mainStorefrontThemeId\n name\n salesChannelId\n routings {\n countryCodes\n createdAt\n domain\n id\n locale\n path\n priceListId\n updatedAt\n }\n status\n themes {\n createdAt\n id\n isMainTheme\n name\n status\n themeId\n themeVersionId\n updatedAt\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,S.getClient().query({query:t,variables:{id:r}})];case 2:return o=e.sent(),i=o.data,(s=o.errors)&&s.length&&console.log(s),i?[2,new f(i.getStorefront)]:[3,4];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2]}}))}))},r}(),J=function(){function n(){}return n.readLocalTheme=function(){return new Promise((function(t,e){T.readFile("./src/theme.json",{flag:"a+"},(function(n,r){if(n)return e(n);var o=r.length?JSON.parse(r.toString()):{};t(new F(o))}))}))},n.readSettingsFile=function(){return new Promise((function(t){var e=R().serverRuntimeConfig.SETTINGS;T.readFile(e,{flag:"a+"},(function(e,n){if(e)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(e),t(null);var r=n.length?JSON.parse(n.toString()):{};t(r)}))}))},n.getSettings=function(r){var o=this;return new Promise((function(i){return t(o,void 0,void 0,(function(){var t,o,s,c,u,a,l,d,g,m,h,v,S,P;return e(this,(function(e){switch(e.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?w.storefrontId?[4,x.getStorefront(w.storefrontId)]:(console.error("Missing storefrontId in the config.json file!"),[2,i(null)]):[3,3];case 1:return(t=e.sent())?(o=t,[4,n.readLocalTheme()]):[2,i(null)];case 2:return s=e.sent(),c=n.createColorScript(s.settings),i({storefront:o,themeLocalization:new D({themeJson:s}),salesChannel:new A({id:o.salesChannelId}),routing:o.routings.length?o.routings.find((function(t){return t.locale===r||t.id===r}))||o.routings[0]:new p({}),favicon:s.settings.favicon,stockPreference:s.settings.stockPreference,storefrontJSScripts:c?[c]:[],domain:"",productBackInStockSettings:{customerLoginRequired:!0},customerReviewSettings:{customerLoginRequired:!0,customerPurchaseRequired:!1}}),[3,5];case 3:return[4,n.readSettingsFile()];case 4:if(!(u=e.sent())||!u.localizationMap)return[2,i(null)];if(a=new f(u.storefront),l=new A(u.salesChannel),d=u.localizationMap,g=u.storefrontJSScripts||[],m=u.domain,h=u.productBackInStockSettings?{customerLoginRequired:u.productBackInStockSettings.customerLoginRequired}:null,v=u.customerReviewSettings?{customerLoginRequired:u.customerReviewSettings.customerLoginRequired,customerPurchaseRequired:u.customerReviewSettings.customerPurchaseRequired}:null,S=d[r],P=a.routings.find((function(t){return t.id===r||t.path===r})),!S||!P)return console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,i(null)];T.readFile(S,{flag:"a+"},(function(t,e){if(t)return console.error("THEME LOCALZIATION FILE READ ERROR!!!"),console.error(t),i(null);var r=e.length?JSON.parse(e.toString()):{},o=new D(r),s=o.themeJson.settings.favicon,c=o.themeJson.settings.stockPreference;if(o.themeJson.settings){var u=n.createColorScript(o.themeJson.settings);u&&g.push(u)}i({storefront:a,themeLocalization:o,salesChannel:l,routing:P,favicon:s,stockPreference:c,storefrontJSScripts:g,domain:m,productBackInStockSettings:h,customerReviewSettings:v})})),e.label=5;case 5:return[2]}}))}))}))},n.getPageData=function(i,s,c,u,a){var l,d;return t(this,void 0,void 0,(function(){var t,f,p,m,h,v,S,P,_,y,I,O,E,k,T,F,B,A,z,j,D,x,J,N,V,G;return e(this,(function(e){switch(e.label){case 0:return t="local"===process.env.NEXT_PUBLIC_ENV,f=!t&&a,p=R().serverRuntimeConfig,f?[3,7]:(m=i.locale)?[4,n.getSettings(m)]:[2,{props:{},notFound:!0}];case 1:return(h=e.sent())&&h.storefront.mainStorefrontThemeId&&h.storefront.salesChannelId?(v=h.storefront,S=h.themeLocalization,P=h.salesChannel,_=h.routing,y=h.favicon,I=h.stockPreference,O=h.storefrontJSScripts,E=h.domain,k=h.productBackInStockSettings,T=h.customerReviewSettings,w.storefrontId=v.id,w.storefrontRoutingId=_.id,w.storefrontThemeId=v.mainStorefrontThemeId,w.salesChannelId=v.salesChannelId,w.priceListId=_.priceListId||void 0,w.stockLocationIds=null===(l=P.stockLocations)||void 0===l?void 0:l.map((function(t){return t.id})),w.routings=v.routings,w.paymentGateways=P.paymentGateways||[],w.gtmId=v.gtmId||void 0,w.fbpId=v.fbpId||void 0,w.favicon=y||null,w.stockPreference=I||null,w.storefrontJSScripts=O||[],w.domain=E,w.productBackInStockSettings=k,w.customerReviewSettings=T,(F=new g(S.themeJson,i.params,c)).possiblePageTypes=u,a?[3,3]:[4,F.getPageData()]):[2,{props:{},notFound:!0}];case 2:if(e.sent(),!F.page)return[2,{props:{},notFound:!0}];e.label=3;case 3:return B=a?F.theme.components.map((function(t){return t.id})):F.page.components.map((function(t){return t.componentId})),A=S.themeJson.components.filter((function(t){return a||B.includes(t.id)})),z=o(["common"],A.map((function(t){return t.dir}))),(c===b.CHECKOUT||a)&&z.push("checkout-page"),j=p.nextI18nConf,D=_.locale,[4,new L(D,z,t?void 0:j.localePath).read()];case 4:return x=e.sent(),w.translations=x,J={},c!==b.CHECKOUT?[3,6]:(N=null===(d=F.page)||void 0===d?void 0:d.components[0])?[4,C.listCheckoutSettings()]:[3,6];case 5:V=e.sent(),G={buttonBgColor:N.propValues.buttonBgColor,buttonTextColor:N.propValues.buttonTextColor,buttonDisabledBgColor:N.propValues.buttonDisabledBgColor,buttonDisabledTextColor:N.propValues.buttonDisabledTextColor,primaryTextColor:N.propValues.primaryTextColor,secondaryTextColor:N.propValues.secondaryTextColor,primaryBgColor:N.propValues.primaryBgColor,secondaryBgColor:N.propValues.secondaryBgColor,borderColor:N.propValues.borderColor,cardBgColor:N.propValues.cardBgColor,errorColor:N.propValues.errorColor,errorLightColor:N.propValues.errorLightColor,warningColor:N.propValues.warningColor,warningLightColor:N.propValues.warningLightColor,successColor:N.propValues.successColor,successLightColor:N.propValues.successLightColor},J.customizationProps=G,J.returnPolicy=S.returnPolicy,J.privacyPolicy=S.privacyPolicy,J.termsOfService=S.termsOfService,J.checkoutSettingsStr=(null==V?void 0:V.length)?JSON.stringify(V[0]):null,e.label=6;case 6:return s?[2,{props:r(r({},F.nextPageData.props),J)}]:[2,{props:r(r({},F.nextPageData.props),J),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},n.getStaticProps=function(r,o,i,s){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getPageData(r,!1,o,i,s)];case 1:return[2,t.sent()]}}))}))},n.getServerSideProps=function(r,o){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getPageData(r,!0,o)];case 1:return[2,t.sent()]}}))}))},n.createColorScript=function(t){if(t.colors)return"<script>"+t.colors.map((function(t){return'document.documentElement.style.setProperty("'+t.key+'","'+t.color+'");'})).join("\r\n")+"<\/script> \n "},n}(),N=d((function(t){return s(m,r({},t))})),V=Object.freeze({__proto__:null,default:N,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.INDEX)];case 1:return[2,t.sent()]}}))}))}}),G=d((function(t){return s(m,r({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),M=Object.freeze({__proto__:null,default:G,getStaticPaths:function(){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){return[2,{paths:[],fallback:"blocking"}]}))}))},getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,void 0,[b.BRAND,b.CATEGORY,b.PRODUCT])];case 1:return[2,t.sent()]}}))}))}}),U=d((function(t){return s(m,r({},t))})),q=Object.freeze({__proto__:null,default:U,getStaticPaths:function(n){return t(void 0,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return n.locales?[4,Promise.all(n.locales.map((function(t){return J.getSettings(t)})))]:[2,{paths:[],fallback:"blocking"}];case 1:return t=e.sent(),r=[],t.forEach((function(t){var e=t.themeLocalization,n=t.routing;e&&e.themeJson.pages.filter((function(t){return t.type===b.CUSTOM})).forEach((function(t){t.slug&&!r.some((function(e){return e.params.slug===t.slug}))&&("local"===process.env.NEXT_PUBLIC_ENV?r.push({params:{slug:t.slug}}):r.push({params:{slug:t.slug},locale:n.path||n.id}))}))})),[2,{paths:r.map((function(t){return{params:t.params,locale:t.locale}})),fallback:"blocking"}]}}))}))},getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.CUSTOM)];case 1:return[2,t.sent()]}}))}))}}),H=d((function(n){var o=n.merchantSettingsStr,d=n.checkoutSettingsStr,f=n.customizationProps,p=n.configJson,g=i(n,["merchantSettingsStr","checkoutSettingsStr","customizationProps","configJson"]),m=O(),S=c(),P=S[0],b=S[1];w.initWithJson(p);var E=w.store,k=u((function(){return d?new _(JSON.parse(d)):new _}),[d]),T=u((function(){return o?new y(JSON.parse(o)):null}),[o]);a((function(){document.documentElement.style.setProperty("--checkout-button-bg-color",(null==f?void 0:f.buttonBgColor)||"#272727"),document.documentElement.style.setProperty("--checkout-button-text-color",(null==f?void 0:f.buttonTextColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-button-disabled-bg-color",(null==f?void 0:f.buttonDisabledBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-button-disabled-text-color",(null==f?void 0:f.buttonDisabledTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-text-color",(null==f?void 0:f.primaryTextColor)||"#272727"),document.documentElement.style.setProperty("--checkout-secondary-text-color",(null==f?void 0:f.secondaryTextColor)||"#8A8B94"),document.documentElement.style.setProperty("--checkout-primary-bg-color",(null==f?void 0:f.primaryBgColor)||"#FFFFFF"),document.documentElement.style.setProperty("--checkout-secondary-bg-color",(null==f?void 0:f.secondaryBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-border-color",(null==f?void 0:f.borderColor)||"#E5E4E9"),document.documentElement.style.setProperty("--checkout-card-bg-color",(null==f?void 0:f.cardBgColor)||"#F7F7F9"),document.documentElement.style.setProperty("--checkout-error-color",(null==f?void 0:f.errorColor)||"#FB4E4E"),document.documentElement.style.setProperty("--checkout-error-light-color",(null==f?void 0:f.errorLightColor)||"#FCF3F4"),document.documentElement.style.setProperty("--checkout-warning-color",(null==f?void 0:f.warningColor)||"#FFBC1F"),document.documentElement.style.setProperty("--checkout-warning-light-color",(null==f?void 0:f.warningLightColor)||"#FFFAEE"),document.documentElement.style.setProperty("--checkout-success-color",(null==f?void 0:f.successColor)||"#2DCA73"),document.documentElement.style.setProperty("--checkout-success-light-color",(null==f?void 0:f.successLightColor)||"#F6FFED")}),[f]),a((function(){E.checkLocalization(),R(),I()}),[]);var R=l((function(){return t(void 0,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("id"))?[4,C.getCheckoutById(n)]:[2,m.replace("/")];case 1:return(r=e.sent())?b(r):m.replace("/"),[2]}}))}))}),[]);return P?s(v,r({checkout:P,merchantSettings:T,checkoutSettings:k,customizationProps:f},g)):s(h,null)})),X=Object.freeze({__proto__:null,default:H,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.CHECKOUT)];case 1:return[2,t.sent()]}}))}))}}),W=d((function(t){return s(m,r({},t))})),$=Object.freeze({__proto__:null,default:W,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.ACCOUNT)];case 1:return[2,t.sent()]}}))}))}}),K=d((function(t){return s(m,r({},t))})),Y=Object.freeze({__proto__:null,default:K,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.ADDRESSES)];case 1:return[2,t.sent()]}}))}))}}),Z=d((function(t){return s(m,r({},t,{addOgpMetas:!0}))})),Q=Object.freeze({__proto__:null,default:Z,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.ORDERS)];case 1:return[2,t.sent()]}}))}))}}),tt=d((function(t){return s(m,r({},t))})),et=Object.freeze({__proto__:null,default:tt,getServerSideProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getServerSideProps(n,b.ORDER_DETAIL)];case 1:return[2,t.sent()]}}))}))}}),nt=d((function(t){return s(m,r({},t))})),rt=Object.freeze({__proto__:null,default:nt,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.LOGIN)];case 1:return[2,t.sent()]}}))}))}}),ot=d((function(t){return s(m,r({},t))})),it=Object.freeze({__proto__:null,default:ot,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.REGISTER)];case 1:return[2,t.sent()]}}))}))}}),st=d((function(t){return s(m,r({},t))})),ct=Object.freeze({__proto__:null,default:st,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.FORGOT_PASSWORD)];case 1:return[2,t.sent()]}}))}))}}),ut=d((function(t){return s(m,r({},t))})),at=Object.freeze({__proto__:null,default:ut,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.RECOVER_PASSWORD)];case 1:return[2,t.sent()]}}))}))}}),lt=d((function(t){return s(m,r({},t))})),dt=Object.freeze({__proto__:null,default:lt,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.CART)];case 1:return[2,t.sent()]}}))}))}}),ft=E((function(){return import("./components.js").then((function(t){return t.IkasPageEditor}))}),{ssr:!1}),pt=d((function(t){var e=t.configJson,n=t.components;return e&&w.initWithJson(e),n&&(w.currentPageComponents=n),s(ft,null)})),gt=Object.freeze({__proto__:null,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,void 0,void 0,!0)];case 1:return[2,t.sent()]}}))}))},default:pt}),mt=d((function(t){return s(m,r({},t))})),ht=Object.freeze({__proto__:null,default:mt,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.FAVORITE_PRODUCTS)];case 1:return[2,t.sent()]}}))}))}}),vt=d((function(t){return s(m,r({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),St=Object.freeze({__proto__:null,default:vt,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.SEARCH)];case 1:return[2,t.sent()]}}))}))}}),Pt=Object.freeze({__proto__:null,default:function(t){return t.propValuesStr?s(m,r({},t)):s(k,{statusCode:404})},getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,J.getStaticProps(n,b.NOT_FOUND)];case 1:return(t=e.sent()).notFound?[2,{props:{},revalidate:60}]:[2,t]}}))}))}}),bt=d((function(t){return s(m,r({},t,{addOgpMetas:!0}))})),Ct=Object.freeze({__proto__:null,default:bt,getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,b.BLOG_INDEX)];case 1:return[2,t.sent()]}}))}))}}),_t=d((function(t){return s(m,r({},t,{addOgpMetas:!0,reInitOnBrowser:!0}))})),yt=Object.freeze({__proto__:null,default:_t,getStaticPaths:function(){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){return[2,{paths:[],fallback:"blocking"}]}))}))},getStaticProps:function(n){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,J.getStaticProps(n,void 0,[b.BLOG,b.BLOG_CATEGORY])];case 1:return[2,t.sent()]}}))}))}});export{q as _,$ as a,Y as b,X as c,Q as d,et as e,ct as f,at as g,V as h,M as i,dt as j,gt as k,rt as l,ht as m,Pt as n,Ct as o,yt as p,it as r,St as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as n,c as e,e as t}from"./get-41aa8e36.js";import{z as a,i,ah as r,a8 as d,D as s}from"./index-05282f31.js";var l,o,u=function(){function d(){}return d.listProductAttributes=function(d){return n(this,void 0,void 0,(function(){var n,s,o,u,c;return e(this,(function(e){switch(e.label){case 0:n=r(l||(l=t(["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n translations {\n description\n locale\n name\n options {\n id\n name\n }\n }\n }\n }\n "],["\n query listProductAttribute($id: StringFilterInput!) {\n listProductAttribute(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n description\n type\n options {\n id\n createdAt\n updatedAt\n deleted\n name\n }\n translations {\n description\n locale\n name\n options {\n id\n name\n }\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:{in:d||[]}}})];case 2:return s=e.sent(),o=s.data,(u=s.errors)&&u.length?[2,[]]:[2,o.listProductAttribute.map((function(n){return new a(n)}))];case 3:return c=e.sent(),console.log(c),[3,4];case 4:return[2,[]]}}))}))},d}(),c=function(){function a(){}return a.listVariantTypes=function(a){return n(this,void 0,void 0,(function(){var n,l,u,c,p;return e(this,(function(e){switch(e.label){case 0:n=r(o||(o=t(["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n translations {\n locale\n name\n values {\n id\n name\n }\n }\n }\n }\n "],["\n query listVariantType($id: StringFilterInput!) {\n listVariantType(id: $id) {\n id\n createdAt\n updatedAt\n deleted\n name\n selectionType\n values {\n id\n createdAt\n updatedAt\n deleted\n name\n thumbnailImageId\n colorCode\n }\n translations {\n locale\n name\n values {\n id\n name\n }\n }\n }\n }\n "]))),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,i.getClient().query({query:n,variables:{id:{in:a||[]}}})];case 2:return l=e.sent(),u=l.data,(c=l.errors)&&c.length?[2,[]]:[2,u.listVariantType.map((function(n){return new d({id:n.id,name:n.name,selectionType:n.selectionType,values:n.values.map((function(e){return new s({id:e.id,name:e.name,colorCode:e.colorCode,thumbnailImageId:e.thumbnailImageId,variantTypeId:n.id})})),translations:n.translations})}))];case 3:return p=e.sent(),console.log(p),[3,4];case 4:return[2,[]]}}))}))},a}();export{u as I,c as a};
|