@ikas/storefront-next 4.0.0-alpha.8 → 4.0.0-alpha.80
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/api/getComponentDirs.d.ts +3 -0
- package/build/api/getComponentDirs.js +1 -0
- package/build/api/getTheme.d.ts +3 -0
- package/build/api/getTheme.js +1 -0
- package/{src/api/index.ts → build/api/index.d.ts} +11 -14
- package/build/api/index.js +1 -0
- package/build/api/middleware.d.ts +3 -0
- package/build/api/middleware.js +1 -0
- package/build/api/updateTheme.d.ts +9 -0
- package/build/api/updateTheme.js +1 -0
- package/build/api/uploadTheme.d.ts +3 -0
- package/build/api/uploadTheme.js +1 -0
- package/build/ext/tslib/tslib.es6.js +1 -0
- package/{src/index.ts → build/index.d.ts} +4 -4
- package/build/index.js +1 -0
- package/build/packages/cmd/build/_virtual/_cloneBuffer.js +1 -0
- package/build/packages/cmd/build/_virtual/_commonjsHelpers.js +1 -0
- package/build/packages/cmd/build/_virtual/_nodeUtil.js +1 -0
- package/build/packages/cmd/build/_virtual/isBuffer.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_DataView.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_Hash.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_ListCache.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_Map.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_MapCache.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_Promise.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_Set.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_SetCache.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_Symbol.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_Uint8Array.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_WeakMap.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_arrayIncludes.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_arrayIncludesWith.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_arrayLikeKeys.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_assocIndexOf.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseClone.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseFindIndex.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseGetTag.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseIndexOf.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseIsArguments.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseIsNaN.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseIsNative.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_baseUniq.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_cacheHas.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_cloneBuffer.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_cloneSymbol.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_coreJsData.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_createSet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_defineProperty.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_freeGlobal.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_getMapData.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_getNative.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_getRawTag.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_getTag.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_getValue.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_hashClear.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_hashDelete.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_hashGet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_hashHas.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_hashSet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_isKeyable.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_isMasked.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_listCacheClear.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_listCacheDelete.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_listCacheGet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_listCacheHas.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_listCacheSet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_mapCacheClear.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_mapCacheDelete.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_mapCacheGet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_mapCacheHas.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_mapCacheSet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_nativeCreate.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_nodeUtil.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_objectToString.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_root.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_setCacheAdd.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_setCacheHas.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_setToArray.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_strictIndexOf.js +1 -0
- package/build/packages/cmd/build/ext/lodash/_toSource.js +1 -0
- package/build/packages/cmd/build/ext/lodash/eq.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isArguments.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isBuffer.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isFunction.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isMap.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isObject.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isObjectLike.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isSet.js +1 -0
- package/build/packages/cmd/build/ext/lodash/isTypedArray.js +1 -0
- package/build/packages/cmd/build/ext/lodash/noop.js +1 -0
- package/build/packages/cmd/build/ext/lodash/stubFalse.js +1 -0
- package/build/packages/cmd/build/ext/lodash/uniq.js +1 -0
- package/build/packages/cmd/build/ext/tslib/tslib.es6.js +1 -0
- package/build/packages/cmd/build/scripts/generators/api/index.js +1 -0
- package/build/packages/cmd/build/scripts/generators/api/info.js +1 -0
- package/build/packages/cmd/build/scripts/generators/components/index.js +1 -0
- package/build/packages/cmd/build/scripts/generators/pages/index.js +1 -0
- package/build/packages/cmd/build/scripts/generators/pages/info.js +1 -0
- package/build/packages/cmd/build/scripts/generators/theme/index.js +1 -0
- package/build/packages/cmd/build/scripts/generators/types/index.js +1 -0
- package/build/packages/cmd/build/utils/fs.js +1 -0
- package/build/packages/cmd/build/utils/helper.js +1 -0
- package/build/pages/404.d.ts +2 -0
- package/build/pages/404.js +1 -0
- package/build/pages/[slug]/index.d.ts +3 -0
- package/build/pages/_slug_/index.js +1 -0
- package/build/pages/account/addresses.d.ts +2 -0
- package/build/pages/account/addresses.js +1 -0
- package/build/pages/account/favorite-products.d.ts +2 -0
- package/build/pages/account/favorite-products.js +1 -0
- package/build/pages/account/forgot-password.d.ts +2 -0
- package/build/pages/account/forgot-password.js +1 -0
- package/build/pages/account/index.d.ts +2 -0
- package/build/pages/account/index.js +1 -0
- package/build/pages/account/login.d.ts +2 -0
- package/build/pages/account/login.js +1 -0
- package/build/pages/account/orders/[id].d.ts +2 -0
- package/build/pages/account/orders/_id_.js +1 -0
- package/build/pages/account/orders/index.d.ts +2 -0
- package/build/pages/account/orders/index.js +1 -0
- package/build/pages/account/raffles.d.ts +2 -0
- package/build/pages/account/raffles.js +1 -0
- package/build/pages/account/recover-password.d.ts +2 -0
- package/build/pages/account/recover-password.js +1 -0
- package/build/pages/account/register.d.ts +2 -0
- package/build/pages/account/register.js +1 -0
- package/build/pages/blog/[slug].d.ts +3 -0
- package/build/pages/blog/_slug_.js +1 -0
- package/build/pages/blog/index.d.ts +2 -0
- package/build/pages/blog/index.js +1 -0
- package/build/pages/cart.d.ts +2 -0
- package/build/pages/cart.js +1 -0
- package/build/pages/checkout.d.ts +2 -0
- package/build/pages/checkout.js +1 -0
- package/build/pages/editor.d.ts +2 -0
- package/build/pages/editor.js +1 -0
- package/build/pages/home.d.ts +2 -0
- package/build/pages/home.js +1 -0
- package/{src/pages/index.ts → build/pages/index.d.ts} +22 -22
- package/build/pages/pages/[slug].d.ts +3 -0
- package/build/pages/pages/_slug_.js +1 -0
- package/build/pages/raffle/[slug].d.ts +3 -0
- package/build/pages/raffle/_slug_.js +1 -0
- package/build/pages/raffle/index.d.ts +2 -0
- package/build/pages/raffle/index.js +1 -0
- package/build/pages/search.d.ts +2 -0
- package/build/pages/search.js +1 -0
- package/build/provider/page-data-next.d.ts +94 -0
- package/build/provider/page-data-next.js +1 -0
- package/build/utils/fs.d.ts +28 -0
- package/build/utils/fs.js +1 -0
- package/build/utils/google-fonts.d.ts +2 -0
- package/build/utils/google-fonts.js +1 -0
- package/build/utils/i18n.d.ts +9 -0
- package/build/utils/i18n.js +1 -0
- package/package.json +18 -17
- package/src/api/getComponentDirs.ts +0 -39
- package/src/api/getTheme.ts +0 -22
- package/src/api/middleware.ts +0 -24
- package/src/api/updateTheme.ts +0 -33
- package/src/api/uploadTheme.ts +0 -307
- package/src/pages/404.tsx +0 -18
- package/src/pages/[slug]/index.tsx +0 -18
- package/src/pages/account/addresses.tsx +0 -10
- package/src/pages/account/favorite-products.tsx +0 -10
- package/src/pages/account/forgot-password.tsx +0 -10
- package/src/pages/account/index.tsx +0 -10
- package/src/pages/account/login.tsx +0 -10
- package/src/pages/account/orders/[id].tsx +0 -10
- package/src/pages/account/orders/index.tsx +0 -10
- package/src/pages/account/raffles.tsx +0 -10
- package/src/pages/account/recover-password.tsx +0 -10
- package/src/pages/account/register.tsx +0 -10
- package/src/pages/blog/[slug].tsx +0 -17
- package/src/pages/blog/index.tsx +0 -10
- package/src/pages/cart.tsx +0 -10
- package/src/pages/checkout.tsx +0 -10
- package/src/pages/editor.tsx +0 -11
- package/src/pages/home.tsx +0 -10
- package/src/pages/pages/[slug].tsx +0 -72
- package/src/pages/raffle/[slug].tsx +0 -17
- package/src/pages/raffle/index.tsx +0 -10
- package/src/pages/search.tsx +0 -10
- package/src/provider/page-data-next.ts +0 -618
- package/src/utils/fs.ts +0 -93
- package/src/utils/google-fonts.ts +0 -52
- package/src/utils/i18n.ts +0 -80
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as r,__generator as t}from'./../ext/tslib/tslib.es6.js';import e from"fs";import n from"path";import{corsMiddleware as o}from"./middleware.js";var i=function(i,s){return r(void 0,void 0,void 0,(function(){var r;return t(this,(function(t){switch(t.label){case 0:return[4,o(i,s)];case 1:return t.sent(),[4,new Promise((function(r,t){var o=n.join(process.cwd(),"src","components");e.readdir(o,(function(i,s){if(i)return t(i);r(s.filter((function(r){return e.lstatSync(n.join(o,r)).isDirectory()})))}))}))];case 2:return r=t.sent(),s.statusCode=200,s.setHeader("Content-Type","application/json"),s.json({componentDirNames:r.filter((function(r){return"__generated__"!==r}))}),[2]}}))}))},s={};export{s as config,i as getComponentDirs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as s}from'./../ext/tslib/tslib.es6.js';import{corsMiddleware as t}from"./middleware.js";import"../packages/cmd/build/scripts/generators/api/index.js";import"../packages/cmd/build/scripts/generators/components/index.js";import"path";import"fs";import"../packages/cmd/build/scripts/generators/pages/index.js";import{ThemeJsonGenerator as r}from"../packages/cmd/build/scripts/generators/theme/index.js";import"../packages/cmd/build/scripts/generators/types/index.js";import"../packages/cmd/build/ext/lodash/_baseClone.js";var o=function(o,i){return e(void 0,void 0,void 0,(function(){var e,n;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,t(o,i)];case 1:return s.sent(),[4,r.getTheme()];case 2:return e=s.sent(),i.statusCode=200,i.setHeader("Content-Type","application/json"),i.json({theme:e||{}}),[3,4];case 3:return n=s.sent(),console.error(n),i.statusCode=500,i.send(n),[3,4];case 4:return[2]}}))}))},i={};export{i as config,o as getTheme};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { IkasLocalThemeAPI };
|
|
1
|
+
import * as GetComponentDirs from "./getComponentDirs";
|
|
2
|
+
import * as GetTheme from "./getTheme";
|
|
3
|
+
import * as UpdateTheme from "./updateTheme";
|
|
4
|
+
import * as UploadTheme from "./uploadTheme";
|
|
5
|
+
declare const IkasLocalThemeAPI: {
|
|
6
|
+
GetComponentDirs: typeof GetComponentDirs;
|
|
7
|
+
GetTheme: typeof GetTheme;
|
|
8
|
+
UpdateTheme: typeof UpdateTheme;
|
|
9
|
+
UploadTheme: typeof UploadTheme;
|
|
10
|
+
};
|
|
11
|
+
export { IkasLocalThemeAPI };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"./getComponentDirs.js";import*as m from"./getTheme.js";import*as o from"./updateTheme.js";import*as t from"./uploadTheme.js";var r={GetComponentDirs:e,GetTheme:m,UpdateTheme:o,UploadTheme:t};export{r as IkasLocalThemeAPI};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"cors";var n=r();function o(r,n,o){return new Promise((function(t,e){o(r,n,(function(r){return r instanceof Error?e(r):t(r)}))}))}function t(r,t){return o(r,t,n)}export{t as corsMiddleware,o as runMiddleware};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as r}from'./../ext/tslib/tslib.es6.js';import{corsMiddleware as s}from"./middleware.js";import{APIGenerator as t}from"../packages/cmd/build/scripts/generators/api/index.js";import{ComponentImportsGenerator as a}from"../packages/cmd/build/scripts/generators/components/index.js";import"path";import"fs";import{PageGenerator as n}from"../packages/cmd/build/scripts/generators/pages/index.js";import{ThemeJsonGenerator as o}from"../packages/cmd/build/scripts/generators/theme/index.js";import{CustomDataTypesGenerator as i}from"../packages/cmd/build/scripts/generators/types/index.js";import"../packages/cmd/build/ext/lodash/_baseClone.js";var p=function(p,m){return e(void 0,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return[4,s(p,m)];case 1:return r.sent(),e=p.body,[4,o.generate(e)];case 2:return r.sent(),[4,a.generate(e)];case 3:return r.sent(),[4,n.generate()];case 4:return r.sent(),[4,t.generate()];case 5:return r.sent(),[4,i.generate(e)];case 6:return r.sent(),m.statusCode=200,m.setHeader("Content-Type","application/json"),m.end(),[2]}}))}))},m={api:{bodyParser:{sizeLimit:"50mb"}}};export{m as config,p as updateTheme};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../ext/tslib/tslib.es6.js';import n from"fs";import r from"path";import s from"archiver";import o from"axios";import i from"@ikas/storefront-assets/checkout/de.js";import a from"@ikas/storefront-assets/checkout/en.js";import c from"@ikas/storefront-assets/checkout/tr.js";import{corsMiddleware as u}from"./middleware.js";var l=function(s,o){return e(void 0,void 0,void 0,(function(){var l,d,v,y,T,j,b;return t(this,(function(w){switch(w.label){case 0:return[4,u(s,o)];case 1:w.sent(),w.label=2;case 2:return w.trys.push([2,9,,10]),[4,new Promise((function(e,t){var s=r.join(process.cwd(),"src","theme.json");n.readFile(s,(function(n,r){if(n)return t(n);e(JSON.parse(r.toString()))}))}))];case 3:return l=w.sent(),[4,new Promise((function(e,t){var s=r.join(process.cwd(),"public","locales"),o=function(e){return e.length?e.split(".")[0]:e};n.readdir(s,(function(u,l){if(u)return t(u);var d=l.filter((function(e){return n.lstatSync(r.join(s,e)).isDirectory()})),f={},p=!1;d.forEach((function(e){var t=r.join(process.cwd(),"public","locales",e);f[e]={};try{var s=n.readdirSync(t);s.forEach((function(t){var s=n.readFileSync(r.join(process.cwd(),"public","locales",e,t)),u=o(e).toLowerCase(),l=o(t).toLowerCase();f[u][l]=JSON.parse(s.toString()),f[u]["checkout-page"]="tr"===u?c:"de"===u?i:a}))}catch(e){console.error(e),p=!0}})),p?t(null):e(f)}))}))];case 4:return d=w.sent(),[4,p(l,d)];case 5:return"string"!=typeof(v=w.sent())?[3,8]:[4,f()];case 6:return y=w.sent(),T=n.statSync(y),[4,h(v,n.readFileSync(y),T.size)];case 7:j=w.sent(),console.log(j),j&&function(){e(this,void 0,void 0,(function(){var e,n,r;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),[4,m()];case 1:return e=t.sent(),[4,fetch(process.env.NEXT_PUBLIC_UPLOAD_GQL_URL,{method:"POST",body:JSON.stringify({query:"\n mutation buildTheme($buildThemeThemeId: String!) {\n buildTheme(themeId: $buildThemeThemeId)\n }\n ",variables:{buildThemeThemeId:e.themeId}}),headers:{"x-api-key":e.apiKey,"Content-Type":"application/json"}})];case 2:return[4,t.sent().json()];case 3:return n=t.sent(),console.log(n),[3,5];case 4:return r=t.sent(),console.log(r),[3,5];case 5:return[2]}}))}))}(),function(e){n.unlinkSync(e)}(y),w.label=8;case 8:return o.statusCode=200,o.setHeader("Content-Type","application/json"),o.json({status:"ok"}),[3,10];case 9:return b=w.sent(),console.log(b),o.statusCode=400,o.setHeader("Content-Type","application/json"),o.json({status:"failed"}),[3,10];case 10:return[2]}}))}))},d={};function f(){return e(this,void 0,void 0,(function(){var e,o,i,a,c;return t(this,(function(t){switch(t.label){case 0:return e=r.join(process.cwd()),"theme.zip",o=r.join(process.cwd(),"theme.zip"),i=n.createWriteStream(o),(a=s("zip",{zlib:{level:9}})).on("warning",(function(e){if("ENOENT"!==e.code)throw e})),a.on("error",(function(e){throw e})),a.pipe(i),c=["node_modules",".next","out",".git"],n.readdirSync(e).forEach((function(t){var s=r.join(e,t);if(n.lstatSync(s).isDirectory()){if(c.includes(t))return;a.directory(s,t)}else a.file(s,{name:t})})),[4,a.finalize()];case 1:return t.sent(),[2,new Promise((function(e){setTimeout((function(){e(o)}),2e3)}))]}}))}))}function p(n,r){return e(this,void 0,void 0,(function(){var e,s,i,a,c;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),e=Object.keys(r),s=e.some((function(e){return"en"===e}))?"en":e[0],[4,m()];case 1:return i=t.sent(),[4,o({method:"post",url:process.env.NEXT_PUBLIC_UPLOAD_GQL_URL,headers:{"x-api-key":i.apiKey,"Content-Type":"application/json"},data:JSON.stringify({query:"\n mutation saveTheme($saveThemeInput: SaveThemeInput!) {\n saveTheme(input: $saveThemeInput) {\n themeVersionId\n uploadUrl\n }\n }\n ",variables:{saveThemeInput:{id:i.themeId,themeJson:JSON.stringify(n),locales:Object.entries(r).map((function(e){var t=e[0],n=e[1];return{isDefaultLocale:t===s,locale:t,localeJson:JSON.stringify(n)}}))}}})})];case 2:return[4,t.sent().data];case 3:return(a=t.sent()).data&&a.data.saveTheme?[2,a.data.saveTheme.uploadUrl]:[3,5];case 4:return c=t.sent(),console.log(c),[3,5];case 5:return[2]}}))}))}function h(n,r,s){return e(this,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:e={headers:{"Content-Type":"application/zip","Content-Length":s+""}},t.label=1;case 1:return t.trys.push([1,3,,4]),[4,o.put(n,r,e)];case 2:return[2,200===t.sent().status];case 3:return i=t.sent(),console.log(i),[2,!1];case 4:return[2]}}))}))}function m(){return new Promise((function(e,t){var s=r.join(process.cwd(),"config.json");n.readFile(s,(function(n,r){if(n)return t(n);e(JSON.parse(r.toString()))}))}))}export{d as config,l as uploadTheme};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=function(){return n=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},n.apply(this,arguments)};function t(n,t,e,r){return new(e||(e=Promise))((function(o,a){function l(n){try{i(r.next(n))}catch(n){a(n)}}function c(n){try{i(r.throw(n))}catch(n){a(n)}}function i(n){var t;n.done?o(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(l,c)}i((r=r.apply(n,t||[])).next())}))}function e(n,t){var e,r,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(e)throw new TypeError("Generator is already executing.");for(;l;)try{if(e=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(n,l)}catch(n){a=[6,n],r=0}finally{e=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function r(n,t,e){if(e||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return n.concat(r||Array.prototype.slice.call(t))}export{n as __assign,t as __awaiter,e as __generator,r as __spreadArray};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./api";
|
|
2
|
-
export * from "./pages";
|
|
3
|
-
export * from "./provider/page-data-next";
|
|
4
|
-
export { getGoogleFontHref } from "./utils/google-fonts";
|
|
1
|
+
export * from "./api";
|
|
2
|
+
export * from "./pages";
|
|
3
|
+
export * from "./provider/page-data-next";
|
|
4
|
+
export { getGoogleFontHref } from "./utils/google-fonts";
|
package/build/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{IkasLocalThemeAPI}from"./api/index.js";import*as a from"./pages/home.js";export{a as IndexPage};import*as s from"./pages/_slug_/index.js";export{s as SlugPage};import*as o from"./pages/pages/_slug_.js";export{o 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 d from"./pages/editor.js";export{d as EditorPage};import*as P from"./pages/account/favorite-products.js";export{P as FavoriteProductsPage};import*as j from"./pages/search.js";export{j as SearchPage};import*as n from"./pages/404.js";export{n as NotFoundPage};import*as u from"./pages/blog/index.js";export{u 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 h from"./pages/raffle/index.js";export{h as RafflesPage};import*as v from"./pages/account/raffles.js";export{v as AccountRafflesPage};export{IkasNextPageDataProvider}from"./provider/page-data-next.js";export{getGoogleFontHref}from"./utils/google-fonts.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r={exports:{}};export{r as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};export{e as commonjsGlobal};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r={exports:{}};export{r as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r={exports:{}};export{r as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_getNative.js";import o from"./_root.js";var r=t(o,"DataView");export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_hashClear.js";import r from"./_hashDelete.js";import o from"./_hashGet.js";import e from"./_hashHas.js";import s from"./_hashSet.js";var a=t,p=r,h=o,m=e,l=s;function f(t){var r=-1,o=null==t?0:t.length;for(this.clear();++r<o;){var e=t[r];this.set(e[0],e[1])}}f.prototype.clear=a,f.prototype.delete=p,f.prototype.get=h,f.prototype.has=m,f.prototype.set=l;var i=f;export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_listCacheClear.js";import e from"./_listCacheDelete.js";import r from"./_listCacheGet.js";import o from"./_listCacheHas.js";import s from"./_listCacheSet.js";var a=t,p=e,l=r,i=o,m=s;function h(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}h.prototype.clear=a,h.prototype.delete=p,h.prototype.get=l,h.prototype.has=i,h.prototype.set=m;var c=h;export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./_getNative.js";import r from"./_root.js";var t=o(r,"Map");export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_mapCacheClear.js";import e from"./_mapCacheDelete.js";import r from"./_mapCacheGet.js";import o from"./_mapCacheHas.js";import a from"./_mapCacheSet.js";var p=t,m=e,s=r,h=o,l=a;function c(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=p,c.prototype.delete=m,c.prototype.get=s,c.prototype.has=h,c.prototype.set=l;var f=c;export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./_getNative.js";import r from"./_root.js";var t=o(r,"Promise");export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_getNative.js";import o from"./_root.js";var r=t(o,"Set");export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_MapCache.js";import a from"./_setCacheAdd.js";import o from"./_setCacheHas.js";var r=t,e=a,p=o;function s(t){var a=-1,o=null==t?0:t.length;for(this.__data__=new r;++a<o;)this.add(t[a])}s.prototype.add=s.prototype.push=e,s.prototype.has=p;var d=s;export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./_root.js";var r=o.Symbol;export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_root.js";r.Uint8Array;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./_getNative.js";import r from"./_root.js";var t=o(r,"WeakMap");export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./_baseIndexOf.js";var n=e,r=function(e,r){return!(null==e||!e.length)&&n(e,r,0)>-1};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(r,n,t){for(var e=-1,u=null==r?0:r.length;++e<u;)if(t(n,r[e]))return!0;return!1};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./isArguments.js";import"./isBuffer.js";import"./isTypedArray.js";import{i as r}from"../../_virtual/isBuffer.js";r.exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./eq.js";var t=r,e=function(r,e){for(var f=r.length;f--;)if(t(r[f][0],e))return f;return-1};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_ListCache.js";import"./_Map.js";import"./_MapCache.js";import"./_defineProperty.js";import"./_arrayLikeKeys.js";import"./_baseGetTag.js";import"./_cloneBuffer.js";import"./_getTag.js";import"./_Uint8Array.js";import"./_cloneSymbol.js";import"./isBuffer.js";import"./isMap.js";import"./isSet.js";import{_ as r}from"../../_virtual/_cloneBuffer.js";import{i}from"../../_virtual/isBuffer.js";r.exports,i.exports;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(r,t,e,n){for(var a=r.length,f=e+(n?1:-1);n?f--:++f<a;)if(t(r[f],f,r))return f;return-1};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./_Symbol.js";import t from"./_getRawTag.js";import r from"./_objectToString.js";var e=t,i=r,n=o?o.toStringTag:void 0,j=function(o){return null==o?void 0===o?"[object Undefined]":"[object Null]":n&&n in Object(o)?e(o):i(o)};export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_baseFindIndex.js";import t from"./_baseIsNaN.js";import o from"./_strictIndexOf.js";var s=r,e=t,a=o,f=function(r,t,o){return t==t?a(r,t,o):s(r,e,o)};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_baseGetTag.js";import e from"./isObjectLike.js";var r=t,o=e,s=function(t){return o(t)&&"[object Arguments]"==r(t)};export{s as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(r){return r!=r};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./isFunction.js";import o from"./_isMasked.js";import r from"./isObject.js";import e from"./_toSource.js";var p=t,n=o,s=r,c=e,i=/^\[object .+?Constructor\]$/,a=Function.prototype,f=Object.prototype,m=a.toString,u=f.hasOwnProperty,j=RegExp("^"+m.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),l=function(t){return!(!s(t)||n(t))&&(p(t)?j:i).test(c(t))};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_SetCache.js";import e from"./_arrayIncludes.js";import t from"./_arrayIncludesWith.js";import o from"./_cacheHas.js";import s from"./_createSet.js";import a from"./_setToArray.js";var f=r,i=e,m=t,n=o,u=s,p=a,l=function(r,e,t){var o=-1,s=i,a=r.length,l=!0,h=[],c=h;if(t)l=!1,s=m;else if(a>=200){var j=e?null:u(r);if(j)return p(j);l=!1,s=n,c=new f}else c=e?[]:h;r:for(;++o<a;){var _=r[o],v=e?e(_):_;if(_=t||0!==_?_:0,l&&v==v){for(var d=c.length;d--;)if(c[d]===v)continue r;e&&c.push(v),h.push(_)}else s(c,v,t)||(c!==h&&c.push(v),h.push(_))}return h};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=function(a,r){return a.has(r)};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o}from"../../_virtual/_cloneBuffer.js";import r from"./_root.js";var e,t,n,f,s,i,p;e=o,n=r,i=(s=(f=(t=o.exports)&&!t.nodeType&&t)&&e&&!e.nodeType&&e)&&s.exports===f?n.Buffer:void 0,p=i?i.allocUnsafe:void 0,e.exports=function(o,r){if(r)return o.slice();var e=o.length,t=p?p(e):new o.constructor(e);return o.copy(t),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./_Symbol.js";var r=o?o.prototype:void 0;r&&r.valueOf;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_root.js";var o=r["__core-js_shared__"];export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_Set.js";import o from"./noop.js";import t from"./_setToArray.js";var e=r,m=o,n=e&&1/t(new e([,-0]))[1]==1/0?function(r){return new e(r)}:m;export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_getNative.js";var r=t;!function(){try{var t=r(Object,"defineProperty");t({},"",{})}catch(t){}}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{commonjsGlobal as o}from"../../_virtual/_commonjsHelpers.js";var e="object"==typeof o&&o&&o.Object===Object&&o;export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import a from"./_isKeyable.js";var r=a,t=function(a,t){var e=a.__data__;return r(t)?e["string"==typeof t?"string":"hash"]:e.map};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_baseIsNative.js";import t from"./_getValue.js";var a=r,e=t,o=function(r,t){var o=e(r,t);return a(o)?o:void 0};export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_Symbol.js";var r=t,o=Object.prototype,a=o.hasOwnProperty,e=o.toString,l=r?r.toStringTag:void 0,c=function(t){var r=a.call(t,l),o=t[l];try{t[l]=void 0;var c=!0}catch(t){}var i=e.call(t);return c&&(r?t[l]=o:delete t[l]),i};export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./_DataView.js";import r from"./_Map.js";import t from"./_Promise.js";import o from"./_Set.js";import a from"./_WeakMap.js";import c from"./_baseGetTag.js";import j from"./_toSource.js";var s=e,i=r,m=t,n=o,b=a,p=c,f=j,u=f(s),w=f(i),_=f(m),M=f(n),v=f(b),S=p;(s&&"[object DataView]"!=S(new s(new ArrayBuffer(1)))||i&&"[object Map]"!=S(new i)||m&&"[object Promise]"!=S(m.resolve())||n&&"[object Set]"!=S(new n)||b&&"[object WeakMap]"!=S(new b))&&(S=function(e){var r=p(e),t="[object Object]"==r?e.constructor:void 0,o=t?f(t):"";if(o)switch(o){case u:return"[object DataView]";case w:return"[object Map]";case _:return"[object Promise]";case M:return"[object Set]";case v:return"[object WeakMap]"}return r});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=function(n,r){return null==n?void 0:n[r]};export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_nativeCreate.js";var a=t,e=function(){this.__data__=a?a(null):{},this.size=0};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=function(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_nativeCreate.js";var t=r,a=Object.prototype.hasOwnProperty,e=function(r){var e=this.__data__;if(t){var _=e[r];return"__lodash_hash_undefined__"===_?void 0:_}return a.call(e,r)?e[r]:void 0};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_nativeCreate.js";var r=t,a=Object.prototype.hasOwnProperty,e=function(t){var e=this.__data__;return r?void 0!==e[t]:a.call(e,t)};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_nativeCreate.js";var a=t,_=function(t,_){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=a&&void 0===_?"__lodash_hash_undefined__":_,this};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=function(o){var r=typeof o;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==o:null===o};export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./_coreJsData.js";var r,o=e,s=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",t=function(e){return!!s&&s in e};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=function(){this.__data__=[],this.size=0};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_assocIndexOf.js";var r=t,a=Array.prototype.splice,e=function(t){var e=this.__data__,o=r(e,t);return!(o<0||(o==e.length-1?e.pop():a.call(e,o,1),--this.size,0))};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import a from"./_assocIndexOf.js";var r=a,t=function(a){var t=this.__data__,o=r(t,a);return o<0?void 0:t[o][1]};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_assocIndexOf.js";var a=t,r=function(t){return a(this.__data__,t)>-1};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import s from"./_assocIndexOf.js";var t=s,a=function(s,a){var r=this.__data__,i=t(r,s);return i<0?(++this.size,r.push([s,a])):r[i][1]=a,this};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import s from"./_Hash.js";import t from"./_ListCache.js";import a from"./_Map.js";var i=s,r=t,o=a,e=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_getMapData.js";var e=t,a=function(t){var a=e(this,t).delete(t);return this.size-=a?1:0,a};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_getMapData.js";var a=t,r=function(t){return a(this,t).get(t)};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_getMapData.js";var a=t,r=function(t){return a(this,t).has(t)};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_getMapData.js";var s=t,e=function(t,e){var i=s(this,t),a=i.size;return i.set(t,e),this.size+=i.size==a?0:1,this};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./_getNative.js";var t=e(Object,"create");export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as r}from"../../_virtual/_nodeUtil.js";import e from"./_freeGlobal.js";var t,i,o,n,p,s,u;t=r,o=e,n=(i=r.exports)&&!i.nodeType&&i,p=n&&t&&!t.nodeType&&t,s=p&&p.exports===n&&o.process,u=function(){try{return p&&p.require&&p.require("util").types||s&&s.binding&&s.binding("util")}catch(r){}}(),t.exports=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=Object.prototype.toString,r=function(r){return t.call(r)};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./_freeGlobal.js";var t=e,f="object"==typeof self&&self&&self.Object===Object&&self,l=t||f||Function("return this")();export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _=function(_){return this.__data__.set(_,"__lodash_hash_undefined__"),this};export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=function(a){return this.__data__.has(a)};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(r){var a=-1,n=Array(r.size);return r.forEach((function(r){n[++a]=r})),n};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(r,t,e){for(var n=e-1,a=r.length;++n<a;)if(r[n]===t)return n;return-1};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=Function.prototype.toString,r=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(r,t){return r===t||r!=r&&t!=t};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_baseIsArguments.js";import e from"./isObjectLike.js";var t=r,o=Object.prototype;o.hasOwnProperty,o.propertyIsEnumerable;t(function(){return arguments}());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o}from"../../_virtual/isBuffer.js";import r from"./_root.js";import e from"./stubFalse.js";var s,f,i,t,p,m,u,a;s=o,f=o.exports,i=r,t=e,p=f&&!f.nodeType&&f,m=p&&s&&!s.nodeType&&s,u=m&&m.exports===p?i.Buffer:void 0,a=(u?u.isBuffer:void 0)||t,s.exports=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./_baseGetTag.js";import o from"./isObject.js";var r=t,e=o,n=function(t){if(!e(t))return!1;var o=r(t);return"[object Function]"==o||"[object GeneratorFunction]"==o||"[object AsyncFunction]"==o||"[object Proxy]"==o};export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_getTag.js";import"./_nodeUtil.js";import{_ as t}from"../../_virtual/_nodeUtil.js";var i=t.exports;i&&i.isMap;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=function(t){return null!=t&&"object"==typeof t};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_getTag.js";import"./_nodeUtil.js";import{_ as t}from"../../_virtual/_nodeUtil.js";var i=t.exports;i&&i.isSet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_baseGetTag.js";import"./_nodeUtil.js";import{_ as r}from"../../_virtual/_nodeUtil.js";var t=r.exports;t&&t.isTypedArray;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=function(){};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=function(){return!1};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./_baseUniq.js";var t=r,e=function(r){return r&&r.length?t(r):[]};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,n,t,r){return new(t||(t=Promise))((function(o,a){function l(e){try{i(r.next(e))}catch(e){a(e)}}function c(e){try{i(r.throw(e))}catch(e){a(e)}}function i(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(l,c)}i((r=r.apply(e,n||[])).next())}))}function n(e,n){var t,r,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;l;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=n.call(e,l)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function t(e,n,t){if(t||2===arguments.length)for(var r,o=0,a=n.length;o<a;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}export{e as __awaiter,n as __generator,t as __spreadArray};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from"../../../ext/tslib/tslib.es6.js";import r from"path";import{createFile as n,deleteDirContent as s}from"../../../utils/fs.js";import{API_INFO as a}from"./info.js";var i=function(){function i(){}return i.generate=function(){return e(this,void 0,void 0,(function(){var e,n,o,c,l,u;return t(this,(function(t){switch(t.label){case 0:return e=r.join(process.cwd(),"src","pages","api"),[4,s(e)];case 1:t.sent(),n=!0,o=0,c=a,t.label=2;case 2:return o<c.length?(l=c[o],(u=n)?[4,i.generateAPI(l)]:[3,4]):[3,6];case 3:u=t.sent(),t.label=4;case 4:n=u,t.label=5;case 5:return o++,[3,2];case 6:return[2,n]}}))}))},i.generateAPI=function(e){return n(r.join(process.cwd(),"src","pages","api"),e.fileName,e.content)},i}();export{i as APIGenerator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e='import { IkasLocalThemeAPI } from "@ikas/storefront-next";\n\nexport default IkasLocalThemeAPI.GetComponentDirs.getComponentDirs;\nexport const config = IkasLocalThemeAPI.GetComponentDirs.config;\n',o='import { IkasLocalThemeAPI } from "@ikas/storefront-next";\n\nexport default IkasLocalThemeAPI.GetTheme.getTheme;\nexport const config = IkasLocalThemeAPI.GetTheme.config;\n',t='import { IkasLocalThemeAPI } from "@ikas/storefront-next";\n\nexport default IkasLocalThemeAPI.UpdateTheme.updateTheme;\nexport const config = IkasLocalThemeAPI.UpdateTheme.config;\n',n='import { IkasLocalThemeAPI } from "@ikas/storefront-next";\n\nexport default IkasLocalThemeAPI.UploadTheme.uploadTheme;\nexport const config = IkasLocalThemeAPI.UploadTheme.config;\n',a=[{content:e,fileName:"getComponentDirs.ts"},{content:o,fileName:"getTheme.ts"},{content:t,fileName:"updateTheme.ts"},{content:n,fileName:"uploadTheme.ts"}];export{a as API_INFO,e as GET_COMPONENT_DIRS_API_CONTENT,o as GET_THEME_API_CONTENT,t as UPDATE_THEME_API_CONTENT,n as UPLOAD_THEME_API_CONTENT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as n,__generator as t}from"../../../ext/tslib/tslib.es6.js";import e from"path";import{createFile as o,deleteDirContent as r}from"../../../utils/fs.js";import{IkasThemeJsonPageType as c}from"@ikas/storefront-models";import{PAGE_INFO as i,CHECKOUT_COMPONENT_ID as s}from"../pages/info.js";import{findAllByKey as a}from"../../../utils/helper.js";var u=function(){function u(){}return u.generate=function(o,c){return n(this,void 0,void 0,(function(){var n;return t(this,(function(t){switch(t.label){case 0:return[4,r(e.join(c||process.cwd(),"src","components","__generated__"))];case 1:return t.sent(),[4,u.generateAllPageComponentImportsFiles(o,c)];case 2:return(n=t.sent())?[4,u.generateAllComponentImportsFileForEditor(o,c)]:[3,4];case 3:n=t.sent(),t.label=4;case 4:return[2,n]}}))}))},u.generateAllPageComponentImportsFiles=function(e,o){return n(this,void 0,void 0,(function(){var n,r,c,s,a;return t(this,(function(t){switch(t.label){case 0:n=!0,r=0,c=i,t.label=1;case 1:return r<c.length?(s=c[r],(a=n)?[4,u.generatePageComponentImportsFileWithInfo(s,e,o)]:[3,3]):[3,5];case 2:a=t.sent(),t.label=3;case 3:n=a,t.label=4;case 4:return r++,[3,1];case 5:return[2,n]}}))}))},u.generatePageComponentImportsFileWithInfo=function(e,o,r){return n(this,void 0,void 0,(function(){var n,c,i,p;return t(this,(function(t){switch(t.label){case 0:if(e.isCheckout||e.isEditor)return[2,!0];t.label=1;case 1:return t.trys.push([1,3,,4]),n=o.components,c=[],e.pageTypes.forEach((function(t){var e=o.pages.filter((function(n){return n.type===t}));e.length&&e.forEach((function(t){var e,o=t.components;(null===(e=t.specifications)||void 0===e?void 0:e.length)&&t.specifications.forEach((function(n){o.push.apply(o,n.components)})),c.push.apply(c,o.map((function(n){return n.componentId}))),o.forEach((function(t){if(n.find((function(n){return n.id===t.componentId}))){var e=a(t.propValues,"componentId");c.push.apply(c,e)}}))}))})),i=n.filter((function(n){return c.includes(n.id)&&n.id!==s})),[4,u.generateComponentImportsFile(i,e,r)];case 2:return[2,t.sent()];case 3:return p=t.sent(),console.error(p),[2,!1];case 4:return[2]}}))}))},u.generatePageComponentImportsFileWithType=function(n,t,e){if(n!==c.CHECKOUT){try{var o=i.find((function(t){return t.pageTypes.includes(n)}));if(o)return u.generatePageComponentImportsFileWithInfo(o,t,e)}catch(n){console.error(n)}return!1}},u.generateComponentImportsFile=function(n,t,r){try{var c="";return n.filter((function(n){return"checkout"!==n.id})).forEach((function(n,t){c+="import Component".concat(t,' from "src/components/').concat(n.dir,'";\r\n')})),c+="\n const Components = {\n ".concat(n.map((function(n,t){return'"'.concat(n.id,'": Component').concat(t)})),"\n };\n "),c+="\r\n",c+="export default Components;",o(e.join(r||process.cwd(),"src","components","__generated__","pages"),t.path.replace("tsx","ts"),c)}catch(n){return console.error(n),!1}},u.generateAllComponentImportsFileForEditor=function(r,c){return n(this,void 0,void 0,(function(){var n,i,s,a;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n='import dynamic from "next/dynamic";\r\n',n+='import { IkasEditorComponentLoader } from "@ikas/storefront";\r\n',n+="\r\n",n+="\r\n",(i=r.components.filter((function(n){return"checkout"!==n.id}))).filter((function(n){return"checkout"!==n.id})).forEach((function(t,e){n+="const Component".concat(e,' = dynamic(() => import("../').concat(t.dir,'"), { loading: () => <IkasEditorComponentLoader /> });\r\n')})),n+="\r\n",n+="\nconst Components = {\n ".concat(i.map((function(n,t){return'"'.concat(n.id,'": Component').concat(t)})),"\n};\n"),n+="\r\n",n+="export default Components;",s=e.join(c||process.cwd(),"src","components","__generated__"),[4,o(s,"editor.tsx",n)];case 1:return[2,t.sent()];case 2:return a=t.sent(),console.error(a),[2,!1];case 3:return[2]}}))}))},u.generateAllComponentImportsFile=function(r,c){return n(this,void 0,void 0,(function(){var n,i,s,a;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n="",(i=r.components.filter((function(n){return"checkout"!==n.id}))).filter((function(n){return"checkout"!==n.id})).forEach((function(t,e){n+="import Component".concat(e,' from "../').concat(t.dir,'";\r\n')})),n+="\r\n",n+="\nconst Components = {\n ".concat(i.map((function(n,t){return'"'.concat(n.id,'": Component').concat(t)})),"\n};\n"),n+="\r\n",n+="export default Components;",s=e.join(c||process.cwd(),"src","components","__generated__"),[4,o(s,"index.tsx",n)];case 1:return[2,t.sent()];case 2:return a=t.sent(),console.error(a),[2,!1];case 3:return[2]}}))}))},u}();export{u as ComponentImportsGenerator};
|
|
@@ -0,0 +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,s,c,p,u,f,g,m,l,h,d,P;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(),s=!0,c=0,p=o,t.label=2;case 2:return c<p.length?(u=p[c],(f=s)?[4,i.generatePageWithInfo(u,a)]:[3,4]):[3,6];case 3:f=t.sent(),t.label=4;case 4:s=f,t.label=5;case 5:return c++,[3,2];case 6:return g=o.find((function(e){return e.isCheckout})),m=o.find((function(e){return e.isEditor})),g?[4,i.generatePageWithInfo(g,a)]:[3,8];case 7:return h=t.sent(),[3,9];case 8:h=!1,t.label=9;case 9:return l=h,m?[4,i.generatePageWithInfo(m,a)]:[3,11];case 10:return P=t.sent(),[3,12];case 11:P=!1,t.label=12;case 12:return d=P,[2,s&&l&&d]}}))}))},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};
|
|
@@ -0,0 +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/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 getStaticProps = CheckoutPageNext.getStaticProps;\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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as n}from"../../../ext/tslib/tslib.es6.js";import t from"path";import r from"fs";import{createFile as o}from"../../../utils/fs.js";import{IkasThemeJsonStockPreference as s,IkasThemeJsonPageType as i}from"@ikas/storefront-models";var l=function(){function l(){}return l.generate=function(e){return o(t.join(process.cwd(),"src","theme.json"),"",JSON.stringify(e,null,2))},l.generateInitialThemeJsonFile=function(){var e={pages:[],components:[],name:"My Theme",customData:[],settings:{colors:[],favicon:{id:null},fontFamily:{name:null,variants:null},stockPreference:s.SHOW_ALL}};return e.pages.push({id:"1",components:[],canonicals:null,description:null,disableIndex:null,name:null,pageTitle:null,slug:null,specifications:[],type:i.INDEX}),l.generate(e)},l.getTheme=function(){return e(this,void 0,void 0,(function(){var e,o;return n(this,(function(n){try{return e=t.join(process.cwd(),"src","theme.json"),[2,(o=r.readFileSync(e)).length?JSON.parse(o.toString()):null]}catch(e){console.error(e)}return[2]}))}))},l}();export{l as ThemeJsonGenerator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from"../../../ext/tslib/tslib.es6.js";import{IkasThemeJsonComponentPropType as a}from"@ikas/storefront-models";import s from"path";import{createFile as r,deleteDirContent as n}from"../../../utils/fs.js";import o from"../../../ext/lodash/uniq.js";var c=function(){function c(){}return c.generate=function(a,p){return e(this,void 0,void 0,(function(){var e,u,k,m,I,T,L;return t(this,(function(t){switch(t.label){case 0:return[4,n(s.join(p||process.cwd(),"src","components","__generated__","types"))];case 1:t.sent(),e={content:"",imports:[],internalCustomDatas:[]},t.label=2;case 2:t.trys.push([2,5,,6]),a.customData.forEach((function(t){c.generateAllCustomDataTypes(t,e,a)})),u=0,k=0;do{u=e.internalCustomDatas.length,e.internalCustomDatas.forEach((function(t){c.generateAllCustomDataTypes(t,e,a)})),(k=e.internalCustomDatas.length)!==u&&(e.internalCustomDatas=e.internalCustomDatas.splice(u,k))}while(u!==k);return[4,i.generate(a,e)];case 3:return t.sent(),m=s.join(p||process.cwd(),"src","components","__generated__"),e.imports=o(e.imports),I="import {\r\n",e.imports.forEach((function(e){I+="\t".concat(e,",\r\n")})),T=(I+='} from "@ikas/storefront"\r\n\r\n')+e.content,[4,r(m,"types.ts",T)];case 4:return[2,t.sent()];case 5:return L=t.sent(),console.log(L),[2,!1];case 6:return[2]}}))}))},c.generateAllCustomDataTypes=function(e,t,s){var r=e.type===a.ENUM,n="export ".concat(r?"enum":"type"," ").concat(c.generateTypeName(e)).concat(r?"":" = ","{ \r\n"),o="};\r\n\r\n";e.type!==a.DYNAMIC_LIST&&e.type!==a.STATIC_LIST||!e.nestedData?e.type===a.ENUM&&e.enumOptions?(t.content+=n,e.enumOptions.forEach((function(e){var a=e.value;e.value&&!isNaN(parseInt(e.value))&&(a="_"+e.value),t.content+='\t"'.concat(a,'" = "').concat(null==e?void 0:e.value,'",'),t.content+="\r\n"})),t.content+=o):(t.content+=n,e.nestedData&&e.nestedData.forEach((function(e){c.genenateCustomDataType(e,t,s),t.content+="\r\n"})),t.content+=o):c.generateAllCustomDataTypes(e.nestedData[0],t,s)},c.genenateCustomDataType=function(e,t,s){var r=c.getType(e,t,s);e.key&&e.key[0].match(/^\d/)&&(e.key="_"+e.key),t.content+="\t".concat(e.key).concat(e.isRequired?"":"?",": ").concat(r).concat([a.DYNAMIC_LIST,a.STATIC_LIST].includes(e.type)?"[]":"").concat(e.type===a.ENUM?",":";")},c.getType=function(e,t,s){var r="";switch(e.type){case a.TEXT:case a.RICH_TEXT:case a.COLOR:r="string";break;case a.BOOLEAN:r="boolean";break;case a.IMAGE:r="IkasImage",t.imports.push(r);break;case a.IMAGE_LIST:r="IkasImage[]",t.imports.push("IkasImage");break;case a.LINK:r="IkasNavigationLink",t.imports.push(r);break;case a.LIST_OF_LINK:r="IkasNavigationLink[]",t.imports.push("IkasNavigationLink");break;case a.PRODUCT_DETAIL:r="IkasProduct",t.imports.push(r);break;case a.PRODUCT_LIST:r="IkasProductList",t.imports.push("IkasProductList");break;case a.PRODUCT_ATTRIBUTE:r="IkasAttributeDetail",t.imports.push(r);break;case a.PRODUCT_ATTRIBUTE_LIST:r="IkasAttributeList",t.imports.push("IkasAttributeList");break;case a.BRAND:r="IkasBrand",t.imports.push(r);break;case a.BRAND_LIST:r="IkasBrandList",t.imports.push(r);break;case a.CATEGORY:r="IkasCategory",t.imports.push(r);break;case a.CATEGORY_LIST:r="IkasCategoryList",t.imports.push(r);break;case a.CUSTOM:var n=s.customData.find((function(t){return t.id===e.customDataId}));n&&(r=c.generateTypeName(n));break;case a.COMPONENT:r="IkasComponentRenderer",t.imports.push(r);break;case a.COMPONENT_LIST:r="IkasComponentRenderer[]",t.imports.push("IkasComponentRenderer");break;case a.BLOG:r="IkasBlog",t.imports.push(r);break;case a.BLOG_LIST:r="IkasBlogList",t.imports.push(r);break;case a.BLOG_CATEGORY:r="IkasBlogCategory",t.imports.push(r);break;case a.BLOG_CATEGORY_LIST:r="IkasBlogCategoryList",t.imports.push(r);break;case a.RAFFLE:r="IkasRaffle",t.imports.push(r);break;case a.RAFFLE_LIST:r="IkasRaffleList",t.imports.push(r);break;case a.SLIDER:r="IkasSlider",t.imports.push(r);break;case a.ENUM:r=c.generateTypeName(e),t.content.includes("export enum ".concat(r))||t.internalCustomDatas.push(e);break;case a.OBJECT:r=c.generateTypeName(e);break;case a.DYNAMIC_LIST:case a.STATIC_LIST:e.nestedData&&(e.nestedData[0].type===a.OBJECT||e.nestedData[0].type===a.ENUM?(r=c.generateTypeName(e.nestedData[0]),t.content.includes("export type ".concat(r))||t.internalCustomDatas.push(e.nestedData[0])):r=c.getType(e.nestedData[0],t,s))}return r},c.generateTypeName=function(e){if(e.typescriptName)return e.typescriptName;var t=e.name||"";return(t=(t=t.replace(/\s/g,"")).replace(/\W/g,""))[0].match(/^\d/)&&(t="_"+t),e.type===a.ENUM&&(t+="Enum"),t},c}(),i=function(){function s(){}return s.generate=function(a,r){return e(this,void 0,void 0,(function(){return t(this,(function(e){return a.components.forEach((function(e){e.props.length>0&&"checkout"!==e.id&&(r.content+="export type ".concat(s.generatePropTypeName(e),"Props = {\n"),e.props.forEach((function(e){r.content+="\t".concat(e.name).concat(e.isRequired?"":"?",": ").concat(s.getType(e,a,r),";\n")})),r.content+="};\r\n\r\n")})),[2]}))}))},s.getType=function(e,t,s){var r="";switch(e.type){case a.TEXT:case a.RICH_TEXT:case a.COLOR:r="string";break;case a.BOOLEAN:r="boolean";break;case a.IMAGE:r="IkasImage",s.imports.push(r);break;case a.IMAGE_LIST:r="IkasImage[]",s.imports.push("IkasImage");break;case a.LINK:r="IkasNavigationLink",s.imports.push(r);break;case a.LIST_OF_LINK:r="IkasNavigationLink[]",s.imports.push("IkasNavigationLink");break;case a.PRODUCT_DETAIL:r="IkasProduct",s.imports.push(r);break;case a.PRODUCT_LIST:r="IkasProductList",s.imports.push("IkasProductList");break;case a.PRODUCT_ATTRIBUTE:r="IkasAttributeDetail",s.imports.push(r);break;case a.PRODUCT_ATTRIBUTE_LIST:r="IkasAttributeList[]",s.imports.push("IkasAttributeList");break;case a.BRAND:r="IkasBrand",s.imports.push(r);break;case a.BRAND_LIST:r="IkasBrandList",s.imports.push(r);break;case a.CATEGORY:r="IkasCategory",s.imports.push(r);break;case a.CATEGORY_LIST:r="IkasCategoryList",s.imports.push(r);break;case a.CUSTOM:var n=t.customData.find((function(t){return t.id===e.customDataId}));n&&(r=c.getType(n,s,t),n.type!==a.DYNAMIC_LIST&&n.type!==a.STATIC_LIST||(r+="[]"));break;case a.COMPONENT:r="IkasComponentRenderer",s.imports.push(r);break;case a.COMPONENT_LIST:r="IkasComponentRenderer[]",s.imports.push("IkasComponentRenderer");break;case a.BLOG:r="IkasBlog",s.imports.push(r);break;case a.BLOG_LIST:r="IkasBlogList",s.imports.push(r);break;case a.BLOG_CATEGORY:r="IkasBlogCategory",s.imports.push(r);break;case a.BLOG_CATEGORY_LIST:r="IkasBlogCategoryList",s.imports.push(r);break;case a.RAFFLE:r="IkasRaffle",s.imports.push(r);break;case a.RAFFLE_LIST:r="IkasRaffleList",s.imports.push(r);break;case a.SLIDER:r="IkasSlider",s.imports.push(r)}return r},s.generatePropTypeName=function(e){if(""!==e.displayName){var t=(e.dir||"").split("-"),a="";return t.forEach((function(e,t){return a+=e.charAt(0).toUpperCase()+e.slice(1)})),a[0].match(/^\d/)&&(a="_"+a),a}},s}();export{c as CustomDataTypesGenerator,i as PropTypeGenarator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as r,__generator as t,__spreadArray as n}from"../ext/tslib/tslib.es6.js";import i from"fs";import e from"path";function o(r){var t=r.split("/");return t.length>1?{dirParts:t.slice(0,t.length-1),filePart:t[t.length-1]}:{filePart:r}}function a(n,o){return r(this,void 0,void 0,(function(){return t(this,(function(r){try{return i.readdirSync(n).forEach((function(r){(null==o?void 0:o.includes(r))||i.unlinkSync(e.join(n,r))})),[2,!0]}catch(r){return[2,!1]}return[2]}))}))}function s(a,s,u){var c;return r(this,void 0,void 0,(function(){var r,l,d;return t(this,(function(t){try{return r=a,l=o(s),(null===(c=l.dirParts)||void 0===c?void 0:c.length)&&(r=e.join.apply(e,n([r],l.dirParts,!1))),i.existsSync(r)||i.mkdirSync(r,{recursive:!0}),d=e.join(r,l.filePart),i.writeFileSync(d,u),[2,!0]}catch(r){return console.error(r),[2,!1]}return[2]}))}))}export{s as createFile,a as deleteDirContent,o as getFilePathParts};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t,n){return Object.entries(t||{}).reduce((function(t,c){var r=c[0],o=c[1];return r===n?t.concat(o):"object"==typeof o?t.concat(e(o,n)):t}),[])}export{e as findAllByKey};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import{IkasNextPageDataProvider as e}from"../provider/page-data-next.js";var i=function(i){return t(void 0,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,e.getStaticProps(i,o.NOT_FOUND)];case 1:return(t=r.sent()).notFound?[2,{props:{},revalidate:60}]:[2,t]}}))}))};export{i as getStaticProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as o}from'./../../ext/tslib/tslib.es6.js';import{IkasNextPageDataProvider as r}from"../../provider/page-data-next.js";import{IkasThemeJsonPageType as i}from"@ikas/storefront-models";var n=function(){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,{paths:[],fallback:"blocking"}]}))}))},e=function(n){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,r.getStaticProps(n,void 0,[i.BRAND,i.CATEGORY,i.PRODUCT])];case 1:return[2,t.sent()]}}))}))};export{n as getStaticPaths,e as getStaticProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import{IkasNextPageDataProvider as e}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,e.getStaticProps(i,o.ADDRESSES)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import{IkasNextPageDataProvider as e}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,e.getStaticProps(i,o.FAVORITE_PRODUCTS)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import{IkasNextPageDataProvider as e}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,e.getStaticProps(i,o.FORGOT_PASSWORD)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import{IkasNextPageDataProvider as e}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,e.getStaticProps(i,o.ACCOUNT)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as r}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import{IkasNextPageDataProvider as e}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,e.getStaticProps(i,o.LOGIN)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as r,__generator as e}from'./../../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as t}from"@ikas/storefront-models";import{IkasNextPageDataProvider as o}from"../../../provider/page-data-next.js";var i=function(i){return r(void 0,void 0,void 0,(function(){return e(this,(function(r){switch(r.label){case 0:return[4,o.getServerSideProps(i,t.ORDER_DETAIL)];case 1:return[2,r.sent()]}}))}))};export{i as getServerSideProps};
|