@ikas/storefront-next 6.1.0-beta.379 → 6.1.0-beta.380
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/index.js +1 -1
- package/build/packages/cmd/build/scripts/generators/pages/index.js +1 -1
- package/build/packages/cmd/build/scripts/generators/pages/info.js +1 -1
- package/build/pages/checkout.d.ts +2 -1
- package/build/pages/checkout.js +1 -1
- package/build/provider/page-data-next.d.ts +48 -12
- package/build/provider/page-data-next.js +1 -1
- package/build/utils/i18n.d.ts +1 -0
- package/build/utils/i18n.js +1 -1
- package/package.json +12 -12
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{IkasLocalThemeAPI}from"./api/index.js";import*as a from"./pages/home.js";export{a as IndexPage};import*as
|
|
1
|
+
export{IkasLocalThemeAPI}from"./api/index.js";import*as a from"./pages/home.js";export{a as IndexPage};import*as o from"./pages/_slug_/index.js";export{o as SlugPage};import*as s from"./pages/pages/_slug_.js";export{s as CustomPage};import*as e from"./pages/checkout.js";export{e as CheckoutPage};import*as r from"./pages/account/index.js";export{r as AccountPage};import*as t from"./pages/account/addresses.js";export{t as AddressesPage};import*as p from"./pages/account/orders/index.js";export{p as OrdersPage};import*as g from"./pages/account/orders/_id_.js";export{g as OrderDetailPage};import*as m from"./pages/account/login.js";export{m as LoginPage};import*as i from"./pages/account/register.js";export{i as RegisterPage};import*as f from"./pages/account/forgot-password.js";export{f as ForgotPasswordPage};import*as c from"./pages/account/recover-password.js";export{c as RecoverPasswordPage};import*as x from"./pages/cart.js";export{x as CartPage};import*as P from"./pages/editor.js";export{P as EditorPage};import*as d from"./pages/account/favorite-products.js";export{d as FavoriteProductsPage};import*as u from"./pages/search.js";export{u as SearchPage};import*as n from"./pages/404.js";export{n as NotFoundPage};import*as j from"./pages/blog/index.js";export{j as BlogPage};import*as l from"./pages/blog/_slug_.js";export{l as BlogSlugPage};import*as _ from"./pages/raffle/_slug_.js";export{_ as RafflePage};import*as v from"./pages/raffle/index.js";export{v as RafflesPage};import*as h from"./pages/account/raffles.js";export{h as AccountRafflesPage};import*as k from"./pages/account/activate.js";export{k as ActivateCustomerPage};export{CheckoutStorefrontType,IkasNextPageDataProvider}from"./provider/page-data-next.js";export{getGoogleFontHref}from"./utils/google-fonts.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from"../../../ext/tslib/tslib.es6.js";import n from"path";import{deleteDirContent as r,createFile as a}from"../../../utils/fs.js";import{PAGE_INFO as o,CHECKOUT_PAGE_CONTENT as s,EDITOR_PAGE_CONTENT as c}from"./info.js";var i=function(){function i(){}return i.generate=function(a){return e(this,void 0,void 0,(function(){var e,
|
|
1
|
+
import{__awaiter as e,__generator as t}from"../../../ext/tslib/tslib.es6.js";import n from"path";import{deleteDirContent as r,createFile as a}from"../../../utils/fs.js";import{PAGE_INFO as o,CHECKOUT_PAGE_CONTENT as s,EDITOR_PAGE_CONTENT as c}from"./info.js";var i=function(){function i(){}return i.generate=function(a,s){return void 0===s&&(s=!0),e(this,void 0,void 0,(function(){var e,c,p,u,f,g,m,l,h,d,P,C,_;return t(this,(function(t){switch(t.label){case 0:return e=n.join(a||process.cwd(),"src","pages"),[4,r(e,["_app.tsx","_document.tsx","api"])];case 1:t.sent(),c=!0,p=0,u=o,t.label=2;case 2:return p<u.length?(f=u[p]).isCheckout&&!s?[3,5]:(g=c)?[4,i.generatePageWithInfo(f,a)]:[3,4]:[3,6];case 3:g=t.sent(),t.label=4;case 4:c=g,t.label=5;case 5:return p++,[3,2];case 6:return m=o.find((function(e){return e.isCheckout})),l=o.find((function(e){return e.isEditor})),s?[3,7]:(d=!0,[3,11]);case 7:return m?[4,i.generatePageWithInfo(m,a)]:[3,9];case 8:return P=t.sent(),[3,10];case 9:P=!1,t.label=10;case 10:d=P,t.label=11;case 11:return h=d,l?[4,i.generatePageWithInfo(l,a)]:[3,13];case 12:return _=t.sent(),[3,14];case 13:_=!1,t.label=14;case 14:return C=_,[2,c&&h&&C]}}))}))},i.generatePageWithInfo=function(r,o){return e(this,void 0,void 0,(function(){var e,i,p,u,f,g,m,l,h;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e="",r.isCheckout?e=s:r.isEditor?e=c:(i=r.pageComponentName+"Next",p="import { ".concat(r.pageComponentName,' } from "@ikas/storefront";\r\n'),u="import { ".concat(r.pageComponentName," as ").concat(i,' } from "@ikas/storefront-next";\r\n'),f='import Components from "src/components/__generated__/pages/'.concat(r.path.replace(".tsx",""),'";\r\n'),g="\nconst PageComponent = ".concat(r.pageComponentName,".default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\r\n"),m=r.isDynamicSSG?"export const getStaticPaths = ".concat(i,".getStaticPaths;\r\n"):"",l=r.isSSR?"export const getServerSideProps = ".concat(i,".getServerSideProps;\r\n"):"export const getStaticProps = ".concat(i,".getStaticProps;\r\n"),e=p+u+f+g+m+l),[4,a(n.join(o||process.cwd(),"src","pages"),r.path,e)];case 1:return[2,t.sent()];case 2:return h=t.sent(),console.error(h),[2,!1];case 3:return[2]}}))}))},i.generatePageWithType=function(n){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return(e=o.find((function(e){return e.pageTypes.includes(n)})))?[4,i.generatePageWithInfo(e)]:[3,2];case 1:return[2,t.sent()];case 2:return[2,!1]}}))}))},i}();export{i as PageGenerator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IkasThemeJsonPageType as e}from"@ikas/storefront-models";var a="checkout",t=[{path:"[slug]/index.tsx",pageComponentName:"SlugPage",pageTypes:[e.PRODUCT,e.CATEGORY,e.BRAND],isDynamicSSG:!0},{path:"account/orders/[id].tsx",pageComponentName:"OrderDetailPage",pageTypes:[e.ORDER_DETAIL],isSSR:!0},{path:"account/orders/index.tsx",pageComponentName:"OrdersPage",pageTypes:[e.ORDERS]},{path:"account/addresses.tsx",pageComponentName:"AddressesPage",pageTypes:[e.ADDRESSES]},{path:"account/favorite-products.tsx",pageComponentName:"FavoriteProductsPage",pageTypes:[e.FAVORITE_PRODUCTS]},{path:"account/forgot-password.tsx",pageComponentName:"ForgotPasswordPage",pageTypes:[e.FORGOT_PASSWORD]},{path:"account/activate.tsx",pageComponentName:"ActivateCustomerPage",pageTypes:[e.ACTIVATE_CUSTOMER]},{path:"account/index.tsx",pageComponentName:"AccountPage",pageTypes:[e.ACCOUNT]},{path:"account/login.tsx",pageComponentName:"LoginPage",pageTypes:[e.LOGIN]},{path:"account/raffles.tsx",pageComponentName:"AccountRafflesPage",pageTypes:[e.RAFFLE_ACCOUNT]},{path:"account/recover-password.tsx",pageComponentName:"RecoverPasswordPage",pageTypes:[e.RECOVER_PASSWORD]},{path:"account/register.tsx",pageComponentName:"RegisterPage",pageTypes:[e.REGISTER]},{path:"blog/[slug].tsx",pageComponentName:"BlogSlugPage",pageTypes:[e.BLOG,e.BLOG_CATEGORY],isDynamicSSG:!0},{path:"blog/index.tsx",pageComponentName:"BlogPage",pageTypes:[e.BLOG_INDEX]},{path:"pages/[slug].tsx",pageComponentName:"CustomPage",pageTypes:[e.CUSTOM],isDynamicSSG:!0},{path:"raffle/[slug].tsx",pageComponentName:"RafflePage",pageTypes:[e.RAFFLE_DETAIL],isDynamicSSG:!0},{path:"raffle/index.tsx",pageComponentName:"RafflesPage",pageTypes:[e.RAFFLE]},{path:"404.tsx",pageComponentName:"NotFoundPage",pageTypes:[e.NOT_FOUND]},{path:"cart.tsx",pageComponentName:"CartPage",pageTypes:[e.CART]},{path:"index.tsx",pageComponentName:"IndexPage",pageTypes:[e.INDEX]},{path:"search.tsx",pageComponentName:"SearchPage",pageTypes:[e.SEARCH]},{path:"checkout.tsx",pageComponentName:"CheckoutPage",pageTypes:[],isCheckout:!0},{path:"editor.tsx",pageComponentName:"EditorPage",pageTypes:[],isEditor:!0}],o='import { CheckoutPage } from "@ikas/storefront";\nimport { CheckoutPage as CheckoutPageNext } from "@ikas/storefront-next";\n\nexport default CheckoutPage.default;\nexport const
|
|
1
|
+
import{IkasThemeJsonPageType as e}from"@ikas/storefront-models";var a="checkout",t=[{path:"[slug]/index.tsx",pageComponentName:"SlugPage",pageTypes:[e.PRODUCT,e.CATEGORY,e.BRAND],isDynamicSSG:!0},{path:"account/orders/[id].tsx",pageComponentName:"OrderDetailPage",pageTypes:[e.ORDER_DETAIL],isSSR:!0},{path:"account/orders/index.tsx",pageComponentName:"OrdersPage",pageTypes:[e.ORDERS]},{path:"account/addresses.tsx",pageComponentName:"AddressesPage",pageTypes:[e.ADDRESSES]},{path:"account/favorite-products.tsx",pageComponentName:"FavoriteProductsPage",pageTypes:[e.FAVORITE_PRODUCTS]},{path:"account/forgot-password.tsx",pageComponentName:"ForgotPasswordPage",pageTypes:[e.FORGOT_PASSWORD]},{path:"account/activate.tsx",pageComponentName:"ActivateCustomerPage",pageTypes:[e.ACTIVATE_CUSTOMER]},{path:"account/index.tsx",pageComponentName:"AccountPage",pageTypes:[e.ACCOUNT]},{path:"account/login.tsx",pageComponentName:"LoginPage",pageTypes:[e.LOGIN]},{path:"account/raffles.tsx",pageComponentName:"AccountRafflesPage",pageTypes:[e.RAFFLE_ACCOUNT]},{path:"account/recover-password.tsx",pageComponentName:"RecoverPasswordPage",pageTypes:[e.RECOVER_PASSWORD]},{path:"account/register.tsx",pageComponentName:"RegisterPage",pageTypes:[e.REGISTER]},{path:"blog/[slug].tsx",pageComponentName:"BlogSlugPage",pageTypes:[e.BLOG,e.BLOG_CATEGORY],isDynamicSSG:!0},{path:"blog/index.tsx",pageComponentName:"BlogPage",pageTypes:[e.BLOG_INDEX]},{path:"pages/[slug].tsx",pageComponentName:"CustomPage",pageTypes:[e.CUSTOM],isDynamicSSG:!0},{path:"raffle/[slug].tsx",pageComponentName:"RafflePage",pageTypes:[e.RAFFLE_DETAIL],isDynamicSSG:!0},{path:"raffle/index.tsx",pageComponentName:"RafflesPage",pageTypes:[e.RAFFLE]},{path:"404.tsx",pageComponentName:"NotFoundPage",pageTypes:[e.NOT_FOUND]},{path:"cart.tsx",pageComponentName:"CartPage",pageTypes:[e.CART]},{path:"index.tsx",pageComponentName:"IndexPage",pageTypes:[e.INDEX]},{path:"search.tsx",pageComponentName:"SearchPage",pageTypes:[e.SEARCH]},{path:"checkout.tsx",pageComponentName:"CheckoutPage",pageTypes:[],isCheckout:!0},{path:"editor.tsx",pageComponentName:"EditorPage",pageTypes:[],isEditor:!0}],o='import { CheckoutPage } from "@ikas/storefront";\nimport { CheckoutPage as CheckoutPageNext } from "@ikas/storefront-next";\n\nexport default CheckoutPage.default;\nexport const getServerSideProps = CheckoutPageNext.getServerSideProps;\n',p='import { EditorPage } from "@ikas/storefront";\nimport { EditorPage as EditorPageNext } from "@ikas/storefront-next";\nimport Components from "../components/__generated__/editor";\n\nconst PageComponent = EditorPage.default;\n\nconst Page = (props: any) => {\n return <PageComponent components={Components} {...props} />;\n};\n\nexport default Page;\nexport const getStaticProps = EditorPageNext.getStaticProps;\n';export{a as CHECKOUT_COMPONENT_ID,o as CHECKOUT_PAGE_CONTENT,p as EDITOR_PAGE_CONTENT,t as PAGE_INFO};
|
package/build/pages/checkout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as r}from'./../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as e}from"@ikas/storefront-models";import{IkasNextPageDataProvider as o}from"../provider/page-data-next.js";var i=function(i){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,o.getServerSideProps(i,e.CHECKOUT)];case 1:return[2,t.sent()]}}))}))},n=function(i){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,o.getStaticProps(i,e.CHECKOUT)];case 1:return[2,t.sent()]}}))}))};export{i as getServerSideProps,n as getStaticProps};
|
|
@@ -3,9 +3,19 @@ import { GetServerSidePropsContext, GetStaticPropsContext } from "next";
|
|
|
3
3
|
import { ParsedUrlQuery } from "querystring";
|
|
4
4
|
import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasImage, IkasLoyaltyProgram, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannel, IkasStorefront, IkasStorefrontPopup, IkasStorefrontRouting, IkasStorefrontThemeLocalization, IkasThemeJson, IkasThemeJsonFavicon, IkasThemeJsonPageType, IkasThemeJsonSettings, IkasThemeJsonStockPreference } from "@ikas/storefront-models";
|
|
5
5
|
import { IkasPageDataProvider } from "@ikas/storefront-providers";
|
|
6
|
-
import { IkasStorefrontSettings } from "@ikas/storefront-api";
|
|
6
|
+
import { listCheckoutSettings, IkasStorefrontSettings } from "@ikas/storefront-api";
|
|
7
7
|
export declare class IkasNextPageDataProvider {
|
|
8
8
|
static startTime: number;
|
|
9
|
+
static getStandaloneCheckoutRequest(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>): StandaloneCheckoutRequest | null;
|
|
10
|
+
private static getRequestPath;
|
|
11
|
+
static readJsonFile(filePath: string): any;
|
|
12
|
+
static ensureCheckoutPage(themeJson: IkasThemeJson): IkasThemeJson;
|
|
13
|
+
static getCheckoutThemeJson(settings: SettingsData): IkasThemeJson;
|
|
14
|
+
static getHeadlessRouting(routings: IkasStorefrontRouting[], requestPath: string, host?: string): IkasStorefrontRouting;
|
|
15
|
+
static getStudioRouting(routings: IkasStorefrontRouting[], requestPath: string): IkasStorefrontRouting | undefined;
|
|
16
|
+
static getHeadlessLocalizationPath(deployDir: string, storefront: IkasStorefront, locale: string): string | undefined;
|
|
17
|
+
static getStandaloneApiConfig(apiKey: string | undefined, storefrontId: string, storefrontRoutingId: string): StandaloneApiConfig;
|
|
18
|
+
static getStandaloneCheckoutSettings(request: StandaloneCheckoutRequest): Promise<SettingsData | null>;
|
|
9
19
|
static readLocalTheme(): Promise<IkasThemeJson>;
|
|
10
20
|
static readSettingsFile(): Promise<SettingsData | null>;
|
|
11
21
|
static cacheLocalSettingsFile(settings: IkasStorefrontSettings): Promise<void>;
|
|
@@ -14,51 +24,74 @@ export declare class IkasNextPageDataProvider {
|
|
|
14
24
|
static getProdSettings(locale: string): Promise<SettingsData | null>;
|
|
15
25
|
static getSettings(locale: string): Promise<SettingsData | null>;
|
|
16
26
|
static setStorefrontConfig(settings: SettingsData): Promise<void>;
|
|
27
|
+
static applyStorefrontConfig(settings: SettingsData, isStandalone?: boolean): void;
|
|
17
28
|
static setTranslations(settings: SettingsData, componentIds: string[], pageType?: IkasThemeJsonPageType, isEditor?: boolean, contextLocale?: string): Promise<void>;
|
|
29
|
+
static loadStandaloneCheckoutTranslations(settings: SettingsData): Promise<Record<string, any>>;
|
|
18
30
|
static getExtraProps(settings: SettingsData, provider: IkasPageDataProvider, pageType?: IkasThemeJsonPageType): Promise<Record<string, any>>;
|
|
31
|
+
static buildCheckoutExtraProps(settings: SettingsData, provider: IkasPageDataProvider, checkoutSettings: Awaited<ReturnType<typeof listCheckoutSettings>>): Record<string, any>;
|
|
19
32
|
static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemeJsonPageType, possiblePageTypes?: IkasThemeJsonPageType[], isEditor?: boolean): Promise<{
|
|
33
|
+
props: any;
|
|
34
|
+
} | {
|
|
20
35
|
props: {};
|
|
21
36
|
notFound: boolean;
|
|
22
37
|
revalidate?: undefined;
|
|
23
38
|
} | {
|
|
24
39
|
props: any;
|
|
40
|
+
revalidate: number;
|
|
25
41
|
notFound?: undefined;
|
|
26
|
-
|
|
42
|
+
}>;
|
|
43
|
+
static getStandaloneCheckoutPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, request: StandaloneCheckoutRequest): Promise<{
|
|
44
|
+
props: {};
|
|
45
|
+
notFound: true;
|
|
27
46
|
} | {
|
|
28
47
|
props: any;
|
|
29
|
-
revalidate: number;
|
|
30
|
-
notFound?: undefined;
|
|
31
48
|
}>;
|
|
32
49
|
static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemeJsonPageType, possiblePageTypes?: IkasThemeJsonPageType[], isEditor?: boolean): Promise<{
|
|
50
|
+
props: any;
|
|
51
|
+
} | {
|
|
33
52
|
props: {};
|
|
34
53
|
notFound: boolean;
|
|
35
54
|
revalidate?: undefined;
|
|
36
|
-
} | {
|
|
37
|
-
props: any;
|
|
38
|
-
notFound?: undefined;
|
|
39
|
-
revalidate?: undefined;
|
|
40
55
|
} | {
|
|
41
56
|
props: any;
|
|
42
57
|
revalidate: number;
|
|
43
58
|
notFound?: undefined;
|
|
44
59
|
}>;
|
|
45
60
|
static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemeJsonPageType): Promise<{
|
|
61
|
+
props: any;
|
|
62
|
+
} | {
|
|
46
63
|
props: {};
|
|
47
64
|
notFound: boolean;
|
|
48
65
|
revalidate?: undefined;
|
|
49
|
-
} | {
|
|
50
|
-
props: any;
|
|
51
|
-
notFound?: undefined;
|
|
52
|
-
revalidate?: undefined;
|
|
53
66
|
} | {
|
|
54
67
|
props: any;
|
|
55
68
|
revalidate: number;
|
|
56
69
|
notFound?: undefined;
|
|
57
70
|
}>;
|
|
71
|
+
static createColorStyle(settings: IkasThemeJsonSettings): string | undefined;
|
|
58
72
|
static createColorScript(settings: IkasThemeJsonSettings): string | undefined;
|
|
73
|
+
private static fontScriptCache;
|
|
74
|
+
static getCachedFontScript(settings: IkasThemeJsonSettings): Promise<string | undefined>;
|
|
59
75
|
static createFontScript(settings: IkasThemeJsonSettings): Promise<string | undefined>;
|
|
60
76
|
}
|
|
77
|
+
export declare enum CheckoutStorefrontType {
|
|
78
|
+
STUDIO = "studio",
|
|
79
|
+
HEADLESS = "headless"
|
|
80
|
+
}
|
|
81
|
+
export declare type StandaloneApiConfig = {
|
|
82
|
+
URL: string;
|
|
83
|
+
HEADERS: Record<string, string>;
|
|
84
|
+
};
|
|
85
|
+
export declare type StandaloneCheckoutRequest = {
|
|
86
|
+
requestPath: string;
|
|
87
|
+
settingsPath: string;
|
|
88
|
+
projectJsonPath?: string;
|
|
89
|
+
deployDir?: string;
|
|
90
|
+
host?: string;
|
|
91
|
+
storefrontType: CheckoutStorefrontType;
|
|
92
|
+
};
|
|
61
93
|
export declare type SettingsData = {
|
|
94
|
+
storefrontType: CheckoutStorefrontType;
|
|
62
95
|
storefront: IkasStorefront;
|
|
63
96
|
themeLocalization: IkasStorefrontThemeLocalization;
|
|
64
97
|
salesChannel: IkasSalesChannel;
|
|
@@ -77,6 +110,9 @@ export declare type SettingsData = {
|
|
|
77
110
|
storefrontPopups: IkasStorefrontPopup[];
|
|
78
111
|
loyaltyPrograms: IkasLoyaltyProgram[];
|
|
79
112
|
payWithIkasUrl?: string | null;
|
|
113
|
+
projectJson?: Record<string, any>;
|
|
114
|
+
deployDir?: string;
|
|
115
|
+
apiKey?: string;
|
|
80
116
|
};
|
|
81
117
|
export declare type IkasCheckoutCustomizationProps = {
|
|
82
118
|
logo?: IkasImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t,__spreadArray as o,__assign as r}from'./../ext/tslib/tslib.es6.js';import n from"fs";import s from"next/config.js";import{IkasThemeJsonPageType as i}from"@ikas/storefront-models";import{IkasPageDataProvider as a}from"@ikas/storefront-providers";import{IkasStorefrontConfig as l}from"@ikas/storefront-config";import{getStorefrontSettings as c,listMerchantSettings as u,setAPIClientConfig as p,listCheckoutSettings as g}from"@ikas/storefront-api";import{getGoogleFontHref as d}from"../utils/google-fonts.js";import{I18NFileReader as f}from"../utils/i18n.js";import{createFile as m,deleteDirContent as h}from"../utils/fs.js";var S=function(){function S(){}return S.readLocalTheme=function(){return new Promise((function(e,t){n.readFile("./src/theme.json",{flag:"a+"},(function(o,r){if(o)return t(o);var n=r.length?JSON.parse(r.toString()):{};e(n)}))}))},S.readSettingsFile=function(){return new Promise((function(e){var t=s().serverRuntimeConfig.SETTINGS;n.readFile(t,{flag:"a+"},(function(t,o){if(t)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(t),e(null);var r=o.length?JSON.parse(o.toString()):{};e(r)}))}))},S.cacheLocalSettingsFile=function(o){return e(this,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return[4,h(e=".ikas")];case 1:return t.sent(),r="settings-".concat(this.startTime,".json"),[4,m(e,r,JSON.stringify(o,null,2))];case 2:return t.sent(),[2]}}))}))},S.readLocalSettingsFile=function(){try{var e=n.readFileSync(".ikas/settings-".concat(this.startTime,".json"));if(e&&e.length)return JSON.parse(e.toString())}catch(e){}},S.getLocalSettings=function(o){return e(this,void 0,void 0,(function(){var e,r,n,s,i,a,l,u,p,g;return t(this,(function(t){switch(t.label){case 0:return[4,S.readLocalSettingsFile()];case 1:return(e=t.sent())?[3,4]:[4,c()];case 2:return(r=t.sent()).isSuccess&&r.data?(e=r.data,[4,this.cacheLocalSettingsFile(e)]):(console.error("Storefront settings fetch failed!"),console.error(r),[2,null]);case 3:t.sent(),t.label=4;case 4:return n=e.storefront,s=e.salesChannel,i=[],a=e.productBackInStockSettings?{customerLoginRequired:e.productBackInStockSettings.customerLoginRequired}:null,l=e.customerReviewSettings?{customerLoginRequired:e.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:e.customerReviewSettings.customerPurchaseRequired||!1}:null,[4,S.readLocalTheme()];case 5:return u=t.sent(),p=S.createColorScript(u.settings),[4,S.createFontScript(u.settings)];case 6:return g=t.sent(),p&&i.push(p),g&&i.push(g),[2,{storefront:n,themeLocalization:{id:"",locale:"en",privacyPolicy:null,returnPolicy:null,storefrontId:n.id,storefrontThemeId:"",termsOfService:null,imprint:null,shippingPolicy:null,themeJson:u},salesChannel:s,routing:n.routings.length?n.routings.find((function(e){return e.locale===o||e.id===o}))||n.routings[0]:{countryCodes:[],domain:"",dynamicCurrencySettings:{roundingFormat:null,targetCurrencyCode:""},id:"",locale:"en",path:null,priceListId:null,currencyCode:"USD",currencySymbol:"$"},favicon:u.settings.favicon,stockPreference:u.settings.stockPreference,storefrontJSScripts:i,highPriorityStoreFrontJSScripts:[],domain:"localhost:3333",productBackInStockSettings:a,customerReviewSettings:l,merchantSettings:e.merchantSettings,customerSettings:e.customerSettings,storefrontPopups:e.storefrontPopups,loyaltyPrograms:e.loyaltyPrograms}]}}))}))},S.getProdSettings=function(o){return e(this,void 0,void 0,(function(){var r=this;return t(this,(function(s){return[2,new Promise((function(s){return e(r,void 0,void 0,(function(){var r,i,a,l,c,p,g,d,f,m,h,v,C;return t(this,(function(y){switch(y.label){case 0:return[4,S.readSettingsFile()];case 1:return(r=y.sent())&&r.localizationMap?(i=r.storefront,a=r.salesChannel,l=r.localizationMap,c=r.storefrontJSScripts||[],p=r.highPriorityStoreFrontJSScripts||[],g=r.domain,d=r.productBackInStockSettings?{customerLoginRequired:r.productBackInStockSettings.customerLoginRequired}:null,f=r.customerReviewSettings?{customerLoginRequired:r.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:r.customerReviewSettings.customerPurchaseRequired||!1}:null,(m=r.merchantSettings)?[3,3]:[4,u({})]):[2,s(null)];case 2:if(!(h=y.sent()).isSuccess||!h.data)return console.error("MERCHANT SETTINGS FETCH FAILED!"),[2,s(null)];m=h.data,y.label=3;case 3:return m&&(m.address=null,delete m.merchantAddress),v=l[o],C=i.routings.find((function(e){return e.id===o||e.path===o})),v&&C?(n.readFile(v,{flag:"a+"},(function(o,n){return e(this,void 0,void 0,(function(){var e,l,u,h,v,y,P;return t(this,(function(t){switch(t.label){case 0:return o?(console.error("THEME LOCALIZATION FILE READ ERROR!!!"),console.error(o),[2,s(null)]):(e=n.length?JSON.parse(n.toString()):{},u=(l=e).themeJson.settings.favicon,h=l.themeJson.settings.stockPreference,l.themeJson.settings?(v=S.createColorScript(l.themeJson.settings),[4,S.createFontScript(l.themeJson.settings)]):[3,2]);case 1:y=t.sent(),v&&c.push(v),y&&c.push(y),t.label=2;case 2:return P=r.customerSettings,s({storefront:i,themeLocalization:l,salesChannel:a,routing:C,favicon:u,stockPreference:h,storefrontJSScripts:c,highPriorityStoreFrontJSScripts:p,domain:g,productBackInStockSettings:d,customerReviewSettings:f,merchantSettings:m,customerSettings:P,custom:r.custom,storefrontPopups:r.storefrontPopups,loyaltyPrograms:r.loyaltyPrograms,payWithIkasUrl:r.payWithIkasUrl}),[2]}}))}))})),[2]):(console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,s(null)])}}))}))}))]}))}))},S.getSettings=function(o){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?[4,this.getLocalSettings(o)]:[3,2];case 1:case 3:return[2,e.sent()];case 2:return[4,this.getProdSettings(o)]}}))}))},S.setStorefrontConfig=function(o){var r,n;return e(this,void 0,void 0,(function(){var e,s,i,a,c,u,g,d,f,m,h,S,v,C,y,P;return t(this,(function(t){return e=o.storefront,s=o.salesChannel,i=o.routing,a=o.favicon,c=o.stockPreference,u=o.storefrontJSScripts,g=o.highPriorityStoreFrontJSScripts,d=o.domain,f=o.productBackInStockSettings,m=o.customerReviewSettings,h=o.merchantSettings,S=o.customerSettings,v=o.custom,C=o.storefrontPopups,y=o.loyaltyPrograms,P=o.payWithIkasUrl,l.init({apiUrl:process.env.INTERNAL_GQL_URL||process.env.NEXT_PUBLIC_GQL_URL,cdnUrl:process.env.NEXT_PUBLIC_CDN_URL,storefrontId:e.id,storefrontRoutingId:i.id,storefrontThemeId:e.mainStorefrontThemeId,storefrontB2BSettings:e.b2bSettings||void 0,storefrontType:e.type,salesChannelId:e.salesChannelId,priceListId:i.priceListId||void 0,stockLocationIds:null===(r=s.stockLocations)||void 0===r?void 0:r.map((function(e){return e.id})),routings:e.routings,paymentGateways:s.paymentGateways||[],gtmId:e.gtmId||void 0,fbpId:e.fbpId||void 0,analytics4Id:e.analytics4Id||void 0,universalAnalyticsId:e.universalAnalyticsId||void 0,tiktokPixelId:e.tiktokPixelId||void 0,openAiPixelId:e.openAiPixelId||void 0,favicon:a||null,pickUpStockLocationIds:e.pickUpStockLocationIds&&e.pickUpStockLocationIds.length?e.pickUpStockLocationIds:null,stockPreference:c||null,storefrontJSScripts:u||[],highPriorityStoreFrontJSScripts:g||[],domain:d,productBackInStockSettings:f,customerReviewSettings:m,merchantSettings:h,customerSettings:S,metaTemplates:e.metaTemplates||null,custom:v||null,indexPageSeoSettings:e.indexPageSeoSettings,storefrontPopups:C,loyaltyPrograms:y,payWithIkasUrl:P,milesSmilesSettings:(null===(n=e.socialLoginSettings)||void 0===n?void 0:n.find((function(e){return"miles_smiles"===e.provider})))||null}),p(),[2]}))}))},S.setTranslations=function(r,n,a,c,u){return e(this,void 0,void 0,(function(){var e,p,g,d,m,h,S,v;return t(this,(function(t){switch(t.label){case 0:return e=s().serverRuntimeConfig,p=r.routing,g="local"===process.env.NEXT_PUBLIC_ENV,d=r.themeLocalization.themeJson.components.filter((function(e){return c||n.includes(e.id)})),m=o(["common"],d.map((function(e){return e.dir})),!0),(a===i.CHECKOUT||c)&&m.push("checkout-page"),h=e.nextI18nConf,S=g&&u?u:p.locale,[4,new f(S,m,g?void 0:h.localePath).read()];case 1:return v=t.sent(),l.init({translations:v}),[2]}}))}))},S.getExtraProps=function(o,r,n){var s,a,l,c,u,p,d,f,m,h,S,v,C,y,P,I,L,T,w,k,O,B,R,b;return e(this,void 0,void 0,(function(){var e,V,E,F,U;return t(this,(function(t){switch(t.label){case 0:return e={},V=o.themeLocalization,n!==i.CHECKOUT?[3,2]:(E=null===(s=r.page)||void 0===s?void 0:s.components[0])?[4,g({})]:[3,2];case 1:(F=t.sent()).isSuccess||(console.error("CHECKOUT SETTINGS FETCH FAILED!"),console.error(F.graphQLErrors),console.error(F.errorCodes)),U={logo:null!==(a=E.propValues.logo)&&void 0!==a?a:null,showTax:null===(l=E.propValues.showTax)||void 0===l||l,showLoyaltyPoints:null!==(c=E.propValues.showLoyaltyPoints)&&void 0!==c&&c,showCampaignOffersDesign:null!==(u=E.propValues.showCampaignOffersDesign)&&void 0!==u&&u,showCampaignIsBiggerImage:null!==(p=E.propValues.showCampaignIsBiggerImage)&&void 0!==p&&p,campaignOfferIsSmallDesign:null!==(d=E.propValues.campaignOfferIsSmallDesign)&&void 0!==d&&d,showCampaignHideDiscountBadge:null!==(f=E.propValues.showCampaignHideDiscountBadge)&&void 0!==f&&f,campaignOfferCountdownStyleIsLine:null!==(m=E.propValues.campaignOfferCountdownStyleIsLine)&&void 0!==m&&m,campaignOfferCountdownStyleIsLineSuccessPage:null!==(h=E.propValues.campaignOfferCountdownStyleIsLineSuccessPage)&&void 0!==h&&h,campaignOffersEnableMiddlePhase:null!==(S=E.propValues.campaignOffersEnableMiddlePhase)&&void 0!==S&&S,campaignOffersTitleColor:null!==(v=E.propValues.campaignOffersTitleColor)&&void 0!==v?v:null,campaignOffersDescriptionColor:null!==(C=E.propValues.campaignOffersDescriptionColor)&&void 0!==C?C:null,campaignOffersContainerBgColor:null!==(y=E.propValues.campaignOffersContainerBgColor)&&void 0!==y?y:null,campaignOffersDiscountPercentageColor:null!==(P=E.propValues.campaignOffersDiscountPercentageColor)&&void 0!==P?P:null,campaignOffersDiscountPercentageBgColor:null!==(I=E.propValues.campaignOffersDiscountPercentageBgColor)&&void 0!==I?I:null,campaignOffersCountdownTextColor:null!==(L=E.propValues.campaignOffersCountdownTextColor)&&void 0!==L?L:null,campaignOffersCountdownTimeColor:null!==(T=E.propValues.campaignOffersCountdownTimeColor)&&void 0!==T?T:null,campaignOffersCountdownBgColor:null!==(w=E.propValues.campaignOffersCountdownBgColor)&&void 0!==w?w:null,campaignOffersMiddlePhaseOverlayColor:null!==(k=E.propValues.campaignOffersMiddlePhaseOverlayColor)&&void 0!==k?k:null,buttonBgColor:E.propValues.buttonBgColor,buttonTextColor:E.propValues.buttonTextColor,buttonDisabledBgColor:E.propValues.buttonDisabledBgColor,buttonDisabledTextColor:E.propValues.buttonDisabledTextColor,primaryTextColor:E.propValues.primaryTextColor,secondaryTextColor:E.propValues.secondaryTextColor,primaryBgColor:E.propValues.primaryBgColor,secondaryBgColor:E.propValues.secondaryBgColor,borderColor:E.propValues.borderColor,cardBgColor:E.propValues.cardBgColor,errorColor:E.propValues.errorColor,errorLightColor:E.propValues.errorLightColor,warningColor:E.propValues.warningColor,warningLightColor:E.propValues.warningLightColor,successColor:E.propValues.successColor,successLightColor:E.propValues.successLightColor,secondaryButtonBgColor:null!==(O=E.propValues.secondaryButtonBgColor)&&void 0!==O?O:null,secondaryButtonTextColor:null!==(B=E.propValues.secondaryButtonTextColor)&&void 0!==B?B:null,secondaryButtonBorderColor:null!==(R=E.propValues.secondaryButtonBorderColor)&&void 0!==R?R:null},e.customizationProps=U,e.returnPolicy=V.returnPolicy,e.privacyPolicy=V.privacyPolicy,e.termsOfService=V.termsOfService,e.imprint=V.imprint,e.shippingPolicy=V.shippingPolicy,e.checkoutSettings=(null===(b=null==F?void 0:F.data)||void 0===b?void 0:b.length)?F.data[0]:null,t.label=2;case 2:return[2,e]}}))}))},S.getPageData=function(o,n,s,i,c){var u;return e(this,void 0,void 0,(function(){var e,g,d,f,m,h,v,C;return t(this,(function(t){switch(t.label){case 0:return e="local"===process.env.NEXT_PUBLIC_ENV,g=!e&&c,l.init({apiUrl:process.env.NEXT_PUBLIC_GQL_URL,cdnUrl:process.env.NEXT_PUBLIC_CDN_URL}),p(),g?[3,7]:(d=o.locale)?[4,S.getSettings(d)]:[2,{props:{},notFound:!0}];case 1:return(f=t.sent())&&f.storefront.mainStorefrontThemeId&&f.storefront.salesChannelId?[4,this.setStorefrontConfig(f)]:[2,{props:{},notFound:!0}];case 2:return t.sent(),m=f.themeLocalization,(h=new a(m.themeJson,o.params,s,f.merchantSettings)).possiblePageTypes=i||(s?[s]:[]),c?[3,4]:[4,h.getPageData()];case 3:if(t.sent(),!h.page)return[2,{props:{},notFound:!0}];t.label=4;case 4:return v=c?h.theme.components.map((function(e){return e.id})):(null===(u=h.page)||void 0===u?void 0:u.components.map((function(e){return e.componentId})))||[],[4,this.setTranslations(f,v,s,c,d)];case 5:return t.sent(),[4,this.getExtraProps(f,h,s)];case 6:return C=t.sent(),n?[2,{props:r(r({},h.nextPageData.props),C)}]:[2,{props:r(r({},h.nextPageData.props),C),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},S.getStaticProps=function(o,r,n,s){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,S.getPageData(o,!1,r,n,s)];case 1:return[2,e.sent()]}}))}))},S.getServerSideProps=function(o,r){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,S.getPageData(o,!0,r)];case 1:return[2,e.sent()]}}))}))},S.createColorScript=function(e){if(e.colors)return"<script>".concat(e.colors.map((function(e){return'document.documentElement.style.setProperty("'.concat(e.key,'","').concat(e.color,'");')})).join("\r\n"),"<\/script> \n ")},S.createFontScript=function(o){return e(this,void 0,void 0,(function(){var e,r,n;return t(this,(function(t){switch(t.label){case 0:return(e=d(o.fontFamily))?[4,fetch(e,{headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"}})]:[3,3];case 1:return[4,t.sent().text()];case 2:return r=t.sent(),n=r.replace(new RegExp("fonts.gstatic.com","g"),"fonts.myikas.com"),[2,"<style>\n ".concat(n,"\n\n body { \n font-family: '").concat(o.fontFamily.name,'\', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;\n } \n\n </style>')];case 3:return[2]}}))}))},S.startTime=Date.now(),S}();export{S as IkasNextPageDataProvider};
|
|
1
|
+
import{__assign as e,__spreadArray as t,__awaiter as o,__generator as n}from'./../ext/tslib/tslib.es6.js';import r from"fs";import i from"path";import s from"next/config.js";import{IkasThemeJsonPageType as a,IkasThemeJsonStockPreference as c}from"@ikas/storefront-models";import{IkasPageDataProvider as l}from"@ikas/storefront-providers";import{IkasStorefrontConfig as u}from"@ikas/storefront-config";import{setAPIClientConfig as p,getStorefrontSettings as d,listMerchantSettings as g,listCheckoutSettings as f}from"@ikas/storefront-api";import{getGoogleFontHref as h}from"../utils/google-fonts.js";import{I18NFileReader as m,CHECKOUT_TRANSLATION_NAMESPACE as S,readDefaultCheckoutTranslations as v}from"../utils/i18n.js";import{createFile as C,deleteDirContent as y}from"../utils/fs.js";var P,I=function(){function I(){}return I.getStandaloneCheckoutRequest=function(e){var t,o=e.req,n=null===(t=null==o?void 0:o.headers)||void 0===t?void 0:t["x-settings-path"];if(!n||"string"!=typeof n)return null;var r=function(e){var t=o.headers[e];return"string"==typeof t&&t?t:void 0},i=r("x-storefront-type");return{requestPath:I.getRequestPath(o)||"",settingsPath:n,projectJsonPath:r("x-project-json-path"),deployDir:r("x-deploy-dir"),host:r("x-host"),storefrontType:i===P.HEADLESS?P.HEADLESS:P.STUDIO}},I.getRequestPath=function(e){var t;try{var o=null===(t=e[Object.getOwnPropertySymbols(e).find((function(e){return"Symbol(NextRequestMeta)"===e.toString()}))])||void 0===t?void 0:t.__NEXT_INIT_URL;if(!o)return e.url;var n=new URL(o,"http://localhost");return n.pathname+n.search}catch(t){return e.url}},I.readJsonFile=function(e){return JSON.parse(r.readFileSync(e,"utf8"))},I.ensureCheckoutPage=function(o){var n=o.components||[],r=o.pages||[],i=n.some((function(e){return"checkout"===e.id})),s=r.some((function(e){return e.type===a.CHECKOUT}));return i&&s?o:e(e({},o),{components:i?n:t(t([],n,!0),[{id:"checkout",dir:"",displayName:"Checkout",props:[],isHeader:!1,isFooter:!1,defaultPropValuesTranslations:{}}],!1),pages:s?r:t(t([],r,!0),[{id:"checkout",name:"Checkout",type:a.CHECKOUT,slug:null,pageTitle:null,description:null,components:[{id:"checkout",componentId:"checkout",propValues:{}}],specifications:null,canonicals:null,disableIndex:null}],!1)})},I.getCheckoutThemeJson=function(e){return e.storefrontType===P.STUDIO?e.projectJson.checkoutThemeJson:e.themeLocalization.themeJson},I.getHeadlessRouting=function(e,t,o){var n=null==o?void 0:o.toLowerCase(),r=n?e.find((function(e){var t;return(null===(t=e.domain)||void 0===t?void 0:t.toLowerCase())===n})):void 0;if(r)return r;var i=t.split("?")[0].split("/")[1],s=i?e.find((function(e){return e.path===i})):void 0;return s||(e.find((function(e){return!e.domain&&!e.path}))||e[0])},I.getStudioRouting=function(e,t){var o=t.split("?")[0].split("/")[1];return o="checkout"===o?null:o,e.find((function(e){return o?e.path===o:!e.path}))},I.getHeadlessLocalizationPath=function(e,t,o){var n=i.join(e,"localizations"),s=i.join(n,"".concat(t.mainStorefrontThemeId,"_").concat(o,".json"));if(r.existsSync(s))return s;try{var a=r.readdirSync(n).filter((function(e){return e.endsWith("_".concat(o,".json"))}));if(1===a.length)return i.join(n,a[0])}catch(e){}},I.getStandaloneApiConfig=function(e,t,o){return{URL:process.env.INTERNAL_GQL_URL||process.env.NEXT_PUBLIC_GQL_URL||"",HEADERS:{"x-api-key":e||"","x-sfid":t,"x-sfrid":o,"x-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone||""}}},I.getStandaloneCheckoutSettings=function(e){var r,i;return o(this,void 0,void 0,(function(){var o,s,a,l,u,p,d,f,h,m,S,v,C,y,T,k,L,R,w,O,E,b,D,B;return n(this,(function(n){switch(n.label){case 0:o=e.requestPath,s=e.settingsPath,a=e.projectJsonPath,l=e.deployDir,u=e.host,p=e.storefrontType,d=p===P.STUDIO,n.label=1;case 1:if(n.trys.push([1,11,,12]),!d&&!l)return console.error("[checkout] Deploy dir missing for headless"),[2,null];if(!(null==(f=I.readJsonFile(s))?void 0:f.storefront))return console.error("[checkout] Settings missing"),[2,null];if(h=void 0,d){if(!a)return console.error("[checkout] Project json path missing for studio"),[2,null];h=I.readJsonFile(a)}return m=f.storefront,S=d?I.getStudioRouting(m.routings,o):I.getHeadlessRouting(m.routings,o,u),(v=S?d?null===(r=f.localizationMap)||void 0===r?void 0:r[S.id]:I.getHeadlessLocalizationPath(l,m,S.locale):void 0)&&S?(C=f.merchantSettings)?[3,3]:[4,g({},I.getStandaloneApiConfig(f.apiKey,m.id,S.id))]:(console.error("[checkout] Theme localization path or routing missing"),[2,null]);case 2:if(!(y=n.sent()).isSuccess||!y.data)return console.error("[checkout] Merchant settings fetch failed"),[2,null];C=y.data,n.label=3;case 3:return C.address=null,delete C.merchantAddress,T=I.readJsonFile(v),k=t([],f.storefrontJSScripts||[],!0),L=void 0,R=void 0,d?(h.checkoutThemeJson=I.ensureCheckoutPage(h.checkoutThemeJson||{}),w=null===(i=m.indexPageSeoSettings)||void 0===i?void 0:i.find((function(e){return e.locale===S.locale})),L={id:(null==w?void 0:w.favIcon)||null},R=c.SHOW_ALL,[3,10]):[3,4];case 4:if(T.themeJson=I.ensureCheckoutPage(T.themeJson),O=T.themeJson.settings,L=null==O?void 0:O.favicon,R=null==O?void 0:O.stockPreference,!O)return[3,10];E=I.createColorStyle(O),b=void 0,n.label=5;case 5:return n.trys.push([5,8,,9]),O.fontFamily?[4,I.getCachedFontScript(O)]:[3,7];case 6:b=n.sent(),n.label=7;case 7:return[3,9];case 8:return D=n.sent(),console.error("[checkout] Font fetch failed",D),[3,9];case 9:E&&k.push(E),b&&k.push(b),n.label=10;case 10:return[2,{storefrontType:p,storefront:m,themeLocalization:T,salesChannel:f.salesChannel,routing:S,favicon:L,stockPreference:R,storefrontJSScripts:k,highPriorityStoreFrontJSScripts:f.highPriorityStoreFrontJSScripts||[],domain:f.domain,productBackInStockSettings:f.productBackInStockSettings?{customerLoginRequired:f.productBackInStockSettings.customerLoginRequired}:null,customerReviewSettings:f.customerReviewSettings?{customerLoginRequired:f.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:f.customerReviewSettings.customerPurchaseRequired||!1}:null,merchantSettings:C,customerSettings:f.customerSettings,custom:f.custom,storefrontPopups:f.storefrontPopups||[],loyaltyPrograms:f.loyaltyPrograms||[],payWithIkasUrl:f.payWithIkasUrl,projectJson:h,deployDir:l,apiKey:f.apiKey}];case 11:return B=n.sent(),console.error("[checkout] Settings read error",B),[2,null];case 12:return[2]}}))}))},I.readLocalTheme=function(){return new Promise((function(e,t){r.readFile("./src/theme.json",{flag:"a+"},(function(o,n){if(o)return t(o);var r=n.length?JSON.parse(n.toString()):{};e(r)}))}))},I.readSettingsFile=function(){return new Promise((function(e){var t,o,n=null===(o=null===(t=s())||void 0===t?void 0:t.serverRuntimeConfig)||void 0===o?void 0:o.SETTINGS;if(!n)return console.error("SETTINGS PATH MISSING!!!"),e(null);r.readFile(n,{flag:"a+"},(function(t,o){if(t)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(t),e(null);var n=o.length?JSON.parse(o.toString()):{};e(n)}))}))},I.cacheLocalSettingsFile=function(e){return o(this,void 0,void 0,(function(){var t,o;return n(this,(function(n){switch(n.label){case 0:return[4,y(t=".ikas")];case 1:return n.sent(),o="settings-".concat(this.startTime,".json"),[4,C(t,o,JSON.stringify(e,null,2))];case 2:return n.sent(),[2]}}))}))},I.readLocalSettingsFile=function(){try{var e=r.readFileSync(".ikas/settings-".concat(this.startTime,".json"));if(e&&e.length)return JSON.parse(e.toString())}catch(e){}},I.getLocalSettings=function(e){return o(this,void 0,void 0,(function(){var t,o,r,i,s,a,c,l,u,p;return n(this,(function(n){switch(n.label){case 0:return[4,I.readLocalSettingsFile()];case 1:return(t=n.sent())?[3,4]:[4,d()];case 2:return(o=n.sent()).isSuccess&&o.data?(t=o.data,[4,this.cacheLocalSettingsFile(t)]):(console.error("Storefront settings fetch failed!"),console.error(o),[2,null]);case 3:n.sent(),n.label=4;case 4:return r=t.storefront,i=t.salesChannel,s=[],a=t.productBackInStockSettings?{customerLoginRequired:t.productBackInStockSettings.customerLoginRequired}:null,c=t.customerReviewSettings?{customerLoginRequired:t.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:t.customerReviewSettings.customerPurchaseRequired||!1}:null,[4,I.readLocalTheme()];case 5:return l=n.sent(),u=I.createColorScript(l.settings),[4,I.createFontScript(l.settings)];case 6:return p=n.sent(),u&&s.push(u),p&&s.push(p),[2,{storefrontType:P.HEADLESS,storefront:r,themeLocalization:{id:"",locale:"en",privacyPolicy:null,returnPolicy:null,storefrontId:r.id,storefrontThemeId:"",termsOfService:null,imprint:null,shippingPolicy:null,themeJson:l},salesChannel:i,routing:r.routings.length?r.routings.find((function(t){return t.locale===e||t.id===e}))||r.routings[0]:{countryCodes:[],domain:"",dynamicCurrencySettings:{roundingFormat:null,targetCurrencyCode:""},id:"",locale:"en",path:null,priceListId:null,currencyCode:"USD",currencySymbol:"$"},favicon:l.settings.favicon,stockPreference:l.settings.stockPreference,storefrontJSScripts:s,highPriorityStoreFrontJSScripts:[],domain:"localhost:3333",productBackInStockSettings:a,customerReviewSettings:c,merchantSettings:t.merchantSettings,customerSettings:t.customerSettings,storefrontPopups:t.storefrontPopups,loyaltyPrograms:t.loyaltyPrograms}]}}))}))},I.getProdSettings=function(e){return o(this,void 0,void 0,(function(){var t=this;return n(this,(function(i){return[2,new Promise((function(i){return o(t,void 0,void 0,(function(){var t,s,a,c,l,u,p,d,f,h,m,S,v;return n(this,(function(C){switch(C.label){case 0:return[4,I.readSettingsFile()];case 1:return(t=C.sent())&&t.localizationMap?(s=t.storefront,a=t.salesChannel,c=t.localizationMap,l=t.storefrontJSScripts||[],u=t.highPriorityStoreFrontJSScripts||[],p=t.domain,d=t.productBackInStockSettings?{customerLoginRequired:t.productBackInStockSettings.customerLoginRequired}:null,f=t.customerReviewSettings?{customerLoginRequired:t.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:t.customerReviewSettings.customerPurchaseRequired||!1}:null,(h=t.merchantSettings)?[3,3]:[4,g({})]):[2,i(null)];case 2:if(!(m=C.sent()).isSuccess||!m.data)return console.error("MERCHANT SETTINGS FETCH FAILED!"),[2,i(null)];h=m.data,C.label=3;case 3:return h&&(h.address=null,delete h.merchantAddress),S=c[e],v=s.routings.find((function(t){return t.id===e||t.path===e})),S&&v?(r.readFile(S,{flag:"a+"},(function(e,r){return o(this,void 0,void 0,(function(){var o,c,g,m,S,C,y;return n(this,(function(n){switch(n.label){case 0:return e?(console.error("THEME LOCALIZATION FILE READ ERROR!!!"),console.error(e),[2,i(null)]):(o=r.length?JSON.parse(r.toString()):{},g=(c=o).themeJson.settings.favicon,m=c.themeJson.settings.stockPreference,c.themeJson.settings?(S=I.createColorScript(c.themeJson.settings),[4,I.createFontScript(c.themeJson.settings)]):[3,2]);case 1:C=n.sent(),S&&l.push(S),C&&l.push(C),n.label=2;case 2:return y=t.customerSettings,i({storefrontType:P.HEADLESS,storefront:s,themeLocalization:c,salesChannel:a,routing:v,favicon:g,stockPreference:m,storefrontJSScripts:l,highPriorityStoreFrontJSScripts:u,domain:p,productBackInStockSettings:d,customerReviewSettings:f,merchantSettings:h,customerSettings:y,custom:t.custom,storefrontPopups:t.storefrontPopups,loyaltyPrograms:t.loyaltyPrograms,payWithIkasUrl:t.payWithIkasUrl}),[2]}}))}))})),[2]):(console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,i(null)])}}))}))}))]}))}))},I.getSettings=function(e){return o(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?[4,this.getLocalSettings(e)]:[3,2];case 1:case 3:return[2,t.sent()];case 2:return[4,this.getProdSettings(e)]}}))}))},I.setStorefrontConfig=function(e){return o(this,void 0,void 0,(function(){return n(this,(function(t){return I.applyStorefrontConfig(e),[2]}))}))},I.applyStorefrontConfig=function(t,o){var n,r;void 0===o&&(o=!1);var i=t.storefront,s=t.salesChannel,a=t.routing,c=t.favicon,l=t.stockPreference,d=t.storefrontJSScripts,g=t.highPriorityStoreFrontJSScripts,f=t.domain,h=t.productBackInStockSettings,m=t.customerReviewSettings,S=t.merchantSettings,v=t.customerSettings,C=t.custom,y=t.storefrontPopups,P=t.loyaltyPrograms,I=t.payWithIkasUrl,T=t.apiKey;o&&u.clear(),u.init(e(e({},T?{apiKey:T}:{}),{apiUrl:process.env.INTERNAL_GQL_URL||process.env.NEXT_PUBLIC_GQL_URL,cdnUrl:process.env.NEXT_PUBLIC_CDN_URL,storefrontId:i.id,storefrontRoutingId:a.id,storefrontThemeId:i.mainStorefrontThemeId,storefrontB2BSettings:i.b2bSettings||void 0,storefrontType:i.type,salesChannelId:i.salesChannelId,priceListId:a.priceListId||void 0,stockLocationIds:null===(n=s.stockLocations)||void 0===n?void 0:n.map((function(e){return e.id})),routings:i.routings,paymentGateways:s.paymentGateways||[],gtmId:i.gtmId||void 0,fbpId:i.fbpId||void 0,analytics4Id:i.analytics4Id||void 0,universalAnalyticsId:i.universalAnalyticsId||void 0,tiktokPixelId:i.tiktokPixelId||void 0,openAiPixelId:i.openAiPixelId||void 0,favicon:c||null,pickUpStockLocationIds:i.pickUpStockLocationIds&&i.pickUpStockLocationIds.length?i.pickUpStockLocationIds:null,stockPreference:l||null,storefrontJSScripts:d||[],highPriorityStoreFrontJSScripts:g||[],domain:f,productBackInStockSettings:h,customerReviewSettings:m,merchantSettings:S,customerSettings:v,metaTemplates:i.metaTemplates||null,custom:C||null,indexPageSeoSettings:i.indexPageSeoSettings,storefrontPopups:y,loyaltyPrograms:P,payWithIkasUrl:I,milesSmilesSettings:(null===(r=i.socialLoginSettings)||void 0===r?void 0:r.find((function(e){return"miles_smiles"===e.provider})))||null})),p()},I.setTranslations=function(e,r,i,c,l){return o(this,void 0,void 0,(function(){var o,p,d,g,f,h,S,v;return n(this,(function(n){switch(n.label){case 0:return o=s().serverRuntimeConfig,p=e.routing,d="local"===process.env.NEXT_PUBLIC_ENV,g=e.themeLocalization.themeJson.components.filter((function(e){return c||r.includes(e.id)})),f=t(["common"],g.map((function(e){return e.dir})),!0),(i===a.CHECKOUT||c)&&f.push("checkout-page"),h=o.nextI18nConf,S=d&&l?l:p.locale,[4,new m(S,f,d?void 0:h.localePath).read()];case 1:return v=n.sent(),u.init({translations:v}),[2]}}))}))},I.loadStandaloneCheckoutTranslations=function(e){var t,s,a;return o(this,void 0,void 0,(function(){var o,c,l,u,p,d;return n(this,(function(n){switch(n.label){case 0:o=e.routing.locale;try{e.storefrontType===P.STUDIO?c=null===(a=null===(s=null===(t=e.projectJson)||void 0===t?void 0:t.i18nTranslations)||void 0===s?void 0:s[o])||void 0===a?void 0:a.checkout_page:e.deployDir&&(l=i.join(e.deployDir,"public","locales",o,"checkout.json"),r.existsSync(l)&&(c=I.readJsonFile(l)))}catch(e){console.error("[checkout] Translations read error",e)}return d={},u=S,(p=c)?[3,2]:[4,v(o)];case 1:p=n.sent(),n.label=2;case 2:return[2,(d[u]=p,d)]}}))}))},I.getExtraProps=function(e,t,r){var i;return o(this,void 0,void 0,(function(){var o;return n(this,(function(n){switch(n.label){case 0:return r===a.CHECKOUT&&(null===(i=t.page)||void 0===i?void 0:i.components[0])?[4,f({})]:[2,{}];case 1:return o=n.sent(),[2,I.buildCheckoutExtraProps(e,t,o)]}}))}))},I.buildCheckoutExtraProps=function(e,t,o){var n,r,i,s,a,c,l,u,p,d,g,f,h,m,S,v,C,y,P,I,T,k,L,R,w={},O=e.themeLocalization,E=null===(n=t.page)||void 0===n?void 0:n.components[0];if(E){o.isSuccess||(console.error("CHECKOUT SETTINGS FETCH FAILED!"),console.error(o.graphQLErrors),console.error(o.errorCodes));var b={logo:null!==(r=E.propValues.logo)&&void 0!==r?r:null,showTax:null===(i=E.propValues.showTax)||void 0===i||i,showLoyaltyPoints:null!==(s=E.propValues.showLoyaltyPoints)&&void 0!==s&&s,showCampaignOffersDesign:null!==(a=E.propValues.showCampaignOffersDesign)&&void 0!==a&&a,showCampaignIsBiggerImage:null!==(c=E.propValues.showCampaignIsBiggerImage)&&void 0!==c&&c,campaignOfferIsSmallDesign:null!==(l=E.propValues.campaignOfferIsSmallDesign)&&void 0!==l&&l,showCampaignHideDiscountBadge:null!==(u=E.propValues.showCampaignHideDiscountBadge)&&void 0!==u&&u,campaignOfferCountdownStyleIsLine:null!==(p=E.propValues.campaignOfferCountdownStyleIsLine)&&void 0!==p&&p,campaignOfferCountdownStyleIsLineSuccessPage:null!==(d=E.propValues.campaignOfferCountdownStyleIsLineSuccessPage)&&void 0!==d&&d,campaignOffersEnableMiddlePhase:null!==(g=E.propValues.campaignOffersEnableMiddlePhase)&&void 0!==g&&g,campaignOffersTitleColor:null!==(f=E.propValues.campaignOffersTitleColor)&&void 0!==f?f:null,campaignOffersDescriptionColor:null!==(h=E.propValues.campaignOffersDescriptionColor)&&void 0!==h?h:null,campaignOffersContainerBgColor:null!==(m=E.propValues.campaignOffersContainerBgColor)&&void 0!==m?m:null,campaignOffersDiscountPercentageColor:null!==(S=E.propValues.campaignOffersDiscountPercentageColor)&&void 0!==S?S:null,campaignOffersDiscountPercentageBgColor:null!==(v=E.propValues.campaignOffersDiscountPercentageBgColor)&&void 0!==v?v:null,campaignOffersCountdownTextColor:null!==(C=E.propValues.campaignOffersCountdownTextColor)&&void 0!==C?C:null,campaignOffersCountdownTimeColor:null!==(y=E.propValues.campaignOffersCountdownTimeColor)&&void 0!==y?y:null,campaignOffersCountdownBgColor:null!==(P=E.propValues.campaignOffersCountdownBgColor)&&void 0!==P?P:null,campaignOffersMiddlePhaseOverlayColor:null!==(I=E.propValues.campaignOffersMiddlePhaseOverlayColor)&&void 0!==I?I:null,buttonBgColor:E.propValues.buttonBgColor,buttonTextColor:E.propValues.buttonTextColor,buttonDisabledBgColor:E.propValues.buttonDisabledBgColor,buttonDisabledTextColor:E.propValues.buttonDisabledTextColor,primaryTextColor:E.propValues.primaryTextColor,secondaryTextColor:E.propValues.secondaryTextColor,primaryBgColor:E.propValues.primaryBgColor,secondaryBgColor:E.propValues.secondaryBgColor,borderColor:E.propValues.borderColor,cardBgColor:E.propValues.cardBgColor,errorColor:E.propValues.errorColor,errorLightColor:E.propValues.errorLightColor,warningColor:E.propValues.warningColor,warningLightColor:E.propValues.warningLightColor,successColor:E.propValues.successColor,successLightColor:E.propValues.successLightColor,secondaryButtonBgColor:null!==(T=E.propValues.secondaryButtonBgColor)&&void 0!==T?T:null,secondaryButtonTextColor:null!==(k=E.propValues.secondaryButtonTextColor)&&void 0!==k?k:null,secondaryButtonBorderColor:null!==(L=E.propValues.secondaryButtonBorderColor)&&void 0!==L?L:null};w.customizationProps=b,w.returnPolicy=O.returnPolicy,w.privacyPolicy=O.privacyPolicy,w.termsOfService=O.termsOfService,w.imprint=O.imprint,w.shippingPolicy=O.shippingPolicy,w.checkoutSettings=(null===(R=null==o?void 0:o.data)||void 0===R?void 0:R.length)?o.data[0]:null}return w},I.getPageData=function(t,r,i,s,c){var d;return o(this,void 0,void 0,(function(){var o,g,f,h,m,S,v,C,y;return n(this,(function(n){switch(n.label){case 0:return(o=i===a.CHECKOUT?I.getStandaloneCheckoutRequest(t):null)?[2,I.getStandaloneCheckoutPageData(t,o)]:(g="local"===process.env.NEXT_PUBLIC_ENV,f=!g&&c,u.init({apiUrl:process.env.NEXT_PUBLIC_GQL_URL,cdnUrl:process.env.NEXT_PUBLIC_CDN_URL}),p(),f?[3,7]:(h=t.locale)?[4,I.getSettings(h)]:[2,{props:{},notFound:!0}]);case 1:return(m=n.sent())&&m.storefront.mainStorefrontThemeId&&m.storefront.salesChannelId?[4,this.setStorefrontConfig(m)]:[2,{props:{},notFound:!0}];case 2:return n.sent(),S=m.themeLocalization,(v=new l(S.themeJson,t.params,i,m.merchantSettings)).possiblePageTypes=s||(i?[i]:[]),c?[3,4]:[4,v.getPageData()];case 3:if(n.sent(),!v.page)return[2,{props:{},notFound:!0}];n.label=4;case 4:return C=c?v.theme.components.map((function(e){return e.id})):(null===(d=v.page)||void 0===d?void 0:d.components.map((function(e){return e.componentId})))||[],[4,this.setTranslations(m,C,i,c,h)];case 5:return n.sent(),[4,this.getExtraProps(m,v,i)];case 6:return y=n.sent(),r?[2,{props:e(e({},v.nextPageData.props),y)}]:[2,{props:e(e({},v.nextPageData.props),y),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},I.getStandaloneCheckoutPageData=function(t,r){var i,s;return o(this,void 0,void 0,(function(){var o,c,p,d,g,h,m,S;return n(this,(function(n){switch(n.label){case 0:return o={props:{},notFound:!0},t.locale?[4,I.getStandaloneCheckoutSettings(r)]:[2,o];case 1:return(c=n.sent())&&c.storefront.mainStorefrontThemeId&&c.storefront.salesChannelId?((p=new l(I.getCheckoutThemeJson(c),t.params,a.CHECKOUT,c.merchantSettings)).possiblePageTypes=[a.CHECKOUT],[4,p.getPageData()]):[2,o];case 2:return n.sent(),p.page?(d=I.getStandaloneApiConfig(c.apiKey,c.storefront.id,c.routing.id),[4,Promise.all([f({},d),I.loadStandaloneCheckoutTranslations(c)])]):[2,o];case 3:return g=n.sent(),h=g[0],m=g[1],I.applyStorefrontConfig(c,!0),u.init({translations:m}),S=e(e({},p.nextPageData.props),I.buildCheckoutExtraProps(c,p,h)),(null===(i=S.configJson)||void 0===i?void 0:i.storefrontId)!==c.storefront.id?(console.error("[checkout] CONFIG STOREFRONT MISMATCH",{expected:c.storefront.id,actual:null===(s=S.configJson)||void 0===s?void 0:s.storefrontId}),[2,o]):[2,{props:S}]}}))}))},I.getStaticProps=function(e,t,r,i){return o(this,void 0,void 0,(function(){return n(this,(function(o){switch(o.label){case 0:return[4,I.getPageData(e,!1,t,r,i)];case 1:return[2,o.sent()]}}))}))},I.getServerSideProps=function(e,t){return o(this,void 0,void 0,(function(){return n(this,(function(o){switch(o.label){case 0:return[4,I.getPageData(e,!0,t)];case 1:return[2,o.sent()]}}))}))},I.createColorStyle=function(e){var t;if(null===(t=e.colors)||void 0===t?void 0:t.length){var o=function(e){return"".concat(e).replace(/[<>{};]/g,"")};return"<style>:root{".concat(e.colors.map((function(e){return"".concat(o(e.key),":").concat(o(e.color),";")})).join(""),"}</style>")}},I.createColorScript=function(e){if(e.colors)return"<script>".concat(e.colors.map((function(e){return'document.documentElement.style.setProperty("'.concat(e.key,'","').concat(e.color,'");')})).join("\r\n"),"<\/script> \n ")},I.getCachedFontScript=function(e){return o(this,void 0,void 0,(function(){var t,o,r,i;return n(this,(function(n){switch(n.label){case 0:return(t=h(e.fontFamily))?(o="".concat(t,"|").concat(e.fontFamily.name),(r=I.fontScriptCache.get(o))&&r.expiresAt>Date.now()?[2,r.script]:[4,I.createFontScript(e)]):[2];case 1:return(i=n.sent())&&I.fontScriptCache.set(o,{script:i,expiresAt:Date.now()+864e5}),[2,i]}}))}))},I.createFontScript=function(e){return o(this,void 0,void 0,(function(){var t,o,r;return n(this,(function(n){switch(n.label){case 0:return(t=h(e.fontFamily))?[4,fetch(t,{headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"}})]:[3,3];case 1:return[4,n.sent().text()];case 2:return o=n.sent(),r=o.replace(new RegExp("fonts.gstatic.com","g"),"fonts.myikas.com"),[2,"<style>\n ".concat(r,"\n\n body { \n font-family: '").concat(e.fontFamily.name,'\', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;\n } \n\n </style>')];case 3:return[2]}}))}))},I.startTime=Date.now(),I.fontScriptCache=new Map,I}();!function(e){e.STUDIO="studio",e.HEADLESS="headless"}(P||(P={}));export{P as CheckoutStorefrontType,I as IkasNextPageDataProvider};
|
package/build/utils/i18n.d.ts
CHANGED
package/build/utils/i18n.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../ext/tslib/tslib.es6.js';import
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../ext/tslib/tslib.es6.js';import r from"fs";import s from"path";var o="checkout-page";function n(r){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return"tr"!==r?[3,2]:[4,import("@ikas/storefront-assets/checkout/tr.js")];case 1:case 3:case 5:case 7:return[2,e.sent().default];case 2:return"de"!==r?[3,4]:[4,import("@ikas/storefront-assets/checkout/de.js")];case 4:return"fr"!==r?[3,6]:[4,import("@ikas/storefront-assets/checkout/fr.js")];case 6:return[4,import("@ikas/storefront-assets/checkout/en.js")]}}))}))}var c=function(){function o(e,t,r){this.locale=e,this.namespaces=t,this.localePath=r}return o.prototype.read=function(){return e(this,void 0,void 0,(function(){var e,o,c,a,i,u,l,h,f;return t(this,(function(t){switch(t.label){case 0:e={},o=0,c=this.namespaces,t.label=1;case 1:if(!(o<c.length))return[3,9];a=c[o],t.label=2;case 2:return t.trys.push([2,7,,8]),i=this.localePath?s.join(this.localePath,this.locale,a+".json"):s.join(process.cwd(),"public","locales",this.locale,a+".json"),r.existsSync(i)?[4,this.readLocaleFile(i)]:[3,4];case 3:return u=t.sent(),e[a]=u,[3,6];case 4:return"checkout-page"!==a?[3,6]:(l=e,h=a,[4,n(this.locale)]);case 5:l[h]=t.sent(),t.label=6;case 6:return[3,8];case 7:return f=t.sent(),console.error("I18N FILE READ ERROR!"),console.error(f),[3,8];case 8:return o++,[3,1];case 9:return[2,e]}}))}))},o.prototype.readLocaleFile=function(s){return e(this,void 0,void 0,(function(){return t(this,(function(e){return[2,new Promise((function(e,t){r.readFile(s,{flag:"r"},(function(r,s){if(r)return t(r);var o=s.length?JSON.parse(s.toString()):{};e(o)}))}))]}))}))},o}();export{o as CHECKOUT_TRANSLATION_NAMESPACE,c as I18NFileReader,n as readDefaultCheckoutTranslations};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-next",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.380",
|
|
4
4
|
"description": "Next.js specific functions for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"next": "12.2.0",
|
|
20
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
21
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
22
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
23
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
24
|
-
"@ikas/storefront-assets": "^6.1.0-beta.
|
|
20
|
+
"@ikas/storefront-config": "^6.1.0-beta.380",
|
|
21
|
+
"@ikas/storefront-providers": "^6.1.0-beta.380",
|
|
22
|
+
"@ikas/storefront-models": "^6.1.0-beta.380",
|
|
23
|
+
"@ikas/storefront-api": "^6.1.0-beta.380",
|
|
24
|
+
"@ikas/storefront-assets": "^6.1.0-beta.380",
|
|
25
25
|
"axios": "^0.26.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"cors": "^2.8.5",
|
|
28
28
|
"adm-zip": "^0.5.9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@ikas/storefront-cmd": "^6.1.0-beta.
|
|
32
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
33
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
34
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
35
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
36
|
-
"@ikas/storefront-assets": "^6.1.0-beta.
|
|
31
|
+
"@ikas/storefront-cmd": "^6.1.0-beta.380",
|
|
32
|
+
"@ikas/storefront-config": "^6.1.0-beta.380",
|
|
33
|
+
"@ikas/storefront-providers": "^6.1.0-beta.380",
|
|
34
|
+
"@ikas/storefront-models": "^6.1.0-beta.380",
|
|
35
|
+
"@ikas/storefront-api": "^6.1.0-beta.380",
|
|
36
|
+
"@ikas/storefront-assets": "^6.1.0-beta.380",
|
|
37
37
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
38
38
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
39
39
|
"@rollup/plugin-json": "^4.1.0",
|