@ikas/storefront-next 4.0.0-alpha.78 → 4.0.0-alpha.8

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.
Files changed (187) hide show
  1. package/package.json +17 -18
  2. package/src/api/getComponentDirs.ts +39 -0
  3. package/src/api/getTheme.ts +22 -0
  4. package/{build/api/index.d.ts → src/api/index.ts} +14 -11
  5. package/src/api/middleware.ts +24 -0
  6. package/src/api/updateTheme.ts +33 -0
  7. package/src/api/uploadTheme.ts +307 -0
  8. package/{build/index.d.ts → src/index.ts} +4 -4
  9. package/src/pages/404.tsx +18 -0
  10. package/src/pages/[slug]/index.tsx +18 -0
  11. package/src/pages/account/addresses.tsx +10 -0
  12. package/src/pages/account/favorite-products.tsx +10 -0
  13. package/src/pages/account/forgot-password.tsx +10 -0
  14. package/src/pages/account/index.tsx +10 -0
  15. package/src/pages/account/login.tsx +10 -0
  16. package/src/pages/account/orders/[id].tsx +10 -0
  17. package/src/pages/account/orders/index.tsx +10 -0
  18. package/src/pages/account/raffles.tsx +10 -0
  19. package/src/pages/account/recover-password.tsx +10 -0
  20. package/src/pages/account/register.tsx +10 -0
  21. package/src/pages/blog/[slug].tsx +17 -0
  22. package/src/pages/blog/index.tsx +10 -0
  23. package/src/pages/cart.tsx +10 -0
  24. package/src/pages/checkout.tsx +10 -0
  25. package/src/pages/editor.tsx +11 -0
  26. package/src/pages/home.tsx +10 -0
  27. package/{build/pages/index.d.ts → src/pages/index.ts} +22 -22
  28. package/src/pages/pages/[slug].tsx +72 -0
  29. package/src/pages/raffle/[slug].tsx +17 -0
  30. package/src/pages/raffle/index.tsx +10 -0
  31. package/src/pages/search.tsx +10 -0
  32. package/src/provider/page-data-next.ts +618 -0
  33. package/src/utils/fs.ts +93 -0
  34. package/src/utils/google-fonts.ts +52 -0
  35. package/src/utils/i18n.ts +80 -0
  36. package/build/api/getComponentDirs.d.ts +0 -3
  37. package/build/api/getComponentDirs.js +0 -1
  38. package/build/api/getTheme.d.ts +0 -3
  39. package/build/api/getTheme.js +0 -1
  40. package/build/api/index.js +0 -1
  41. package/build/api/middleware.d.ts +0 -3
  42. package/build/api/middleware.js +0 -1
  43. package/build/api/updateTheme.d.ts +0 -9
  44. package/build/api/updateTheme.js +0 -1
  45. package/build/api/uploadTheme.d.ts +0 -3
  46. package/build/api/uploadTheme.js +0 -1
  47. package/build/ext/tslib/tslib.es6.js +0 -1
  48. package/build/index.js +0 -1
  49. package/build/packages/cmd/build/_virtual/_cloneBuffer.js +0 -1
  50. package/build/packages/cmd/build/_virtual/_commonjsHelpers.js +0 -1
  51. package/build/packages/cmd/build/_virtual/_nodeUtil.js +0 -1
  52. package/build/packages/cmd/build/_virtual/isBuffer.js +0 -1
  53. package/build/packages/cmd/build/ext/lodash/_DataView.js +0 -1
  54. package/build/packages/cmd/build/ext/lodash/_Hash.js +0 -1
  55. package/build/packages/cmd/build/ext/lodash/_ListCache.js +0 -1
  56. package/build/packages/cmd/build/ext/lodash/_Map.js +0 -1
  57. package/build/packages/cmd/build/ext/lodash/_MapCache.js +0 -1
  58. package/build/packages/cmd/build/ext/lodash/_Promise.js +0 -1
  59. package/build/packages/cmd/build/ext/lodash/_Set.js +0 -1
  60. package/build/packages/cmd/build/ext/lodash/_SetCache.js +0 -1
  61. package/build/packages/cmd/build/ext/lodash/_Symbol.js +0 -1
  62. package/build/packages/cmd/build/ext/lodash/_Uint8Array.js +0 -1
  63. package/build/packages/cmd/build/ext/lodash/_WeakMap.js +0 -1
  64. package/build/packages/cmd/build/ext/lodash/_arrayIncludes.js +0 -1
  65. package/build/packages/cmd/build/ext/lodash/_arrayIncludesWith.js +0 -1
  66. package/build/packages/cmd/build/ext/lodash/_arrayLikeKeys.js +0 -1
  67. package/build/packages/cmd/build/ext/lodash/_assocIndexOf.js +0 -1
  68. package/build/packages/cmd/build/ext/lodash/_baseClone.js +0 -1
  69. package/build/packages/cmd/build/ext/lodash/_baseFindIndex.js +0 -1
  70. package/build/packages/cmd/build/ext/lodash/_baseGetTag.js +0 -1
  71. package/build/packages/cmd/build/ext/lodash/_baseIndexOf.js +0 -1
  72. package/build/packages/cmd/build/ext/lodash/_baseIsArguments.js +0 -1
  73. package/build/packages/cmd/build/ext/lodash/_baseIsNaN.js +0 -1
  74. package/build/packages/cmd/build/ext/lodash/_baseIsNative.js +0 -1
  75. package/build/packages/cmd/build/ext/lodash/_baseUniq.js +0 -1
  76. package/build/packages/cmd/build/ext/lodash/_cacheHas.js +0 -1
  77. package/build/packages/cmd/build/ext/lodash/_cloneBuffer.js +0 -1
  78. package/build/packages/cmd/build/ext/lodash/_cloneSymbol.js +0 -1
  79. package/build/packages/cmd/build/ext/lodash/_coreJsData.js +0 -1
  80. package/build/packages/cmd/build/ext/lodash/_createSet.js +0 -1
  81. package/build/packages/cmd/build/ext/lodash/_defineProperty.js +0 -1
  82. package/build/packages/cmd/build/ext/lodash/_freeGlobal.js +0 -1
  83. package/build/packages/cmd/build/ext/lodash/_getMapData.js +0 -1
  84. package/build/packages/cmd/build/ext/lodash/_getNative.js +0 -1
  85. package/build/packages/cmd/build/ext/lodash/_getRawTag.js +0 -1
  86. package/build/packages/cmd/build/ext/lodash/_getTag.js +0 -1
  87. package/build/packages/cmd/build/ext/lodash/_getValue.js +0 -1
  88. package/build/packages/cmd/build/ext/lodash/_hashClear.js +0 -1
  89. package/build/packages/cmd/build/ext/lodash/_hashDelete.js +0 -1
  90. package/build/packages/cmd/build/ext/lodash/_hashGet.js +0 -1
  91. package/build/packages/cmd/build/ext/lodash/_hashHas.js +0 -1
  92. package/build/packages/cmd/build/ext/lodash/_hashSet.js +0 -1
  93. package/build/packages/cmd/build/ext/lodash/_isKeyable.js +0 -1
  94. package/build/packages/cmd/build/ext/lodash/_isMasked.js +0 -1
  95. package/build/packages/cmd/build/ext/lodash/_listCacheClear.js +0 -1
  96. package/build/packages/cmd/build/ext/lodash/_listCacheDelete.js +0 -1
  97. package/build/packages/cmd/build/ext/lodash/_listCacheGet.js +0 -1
  98. package/build/packages/cmd/build/ext/lodash/_listCacheHas.js +0 -1
  99. package/build/packages/cmd/build/ext/lodash/_listCacheSet.js +0 -1
  100. package/build/packages/cmd/build/ext/lodash/_mapCacheClear.js +0 -1
  101. package/build/packages/cmd/build/ext/lodash/_mapCacheDelete.js +0 -1
  102. package/build/packages/cmd/build/ext/lodash/_mapCacheGet.js +0 -1
  103. package/build/packages/cmd/build/ext/lodash/_mapCacheHas.js +0 -1
  104. package/build/packages/cmd/build/ext/lodash/_mapCacheSet.js +0 -1
  105. package/build/packages/cmd/build/ext/lodash/_nativeCreate.js +0 -1
  106. package/build/packages/cmd/build/ext/lodash/_nodeUtil.js +0 -1
  107. package/build/packages/cmd/build/ext/lodash/_objectToString.js +0 -1
  108. package/build/packages/cmd/build/ext/lodash/_root.js +0 -1
  109. package/build/packages/cmd/build/ext/lodash/_setCacheAdd.js +0 -1
  110. package/build/packages/cmd/build/ext/lodash/_setCacheHas.js +0 -1
  111. package/build/packages/cmd/build/ext/lodash/_setToArray.js +0 -1
  112. package/build/packages/cmd/build/ext/lodash/_strictIndexOf.js +0 -1
  113. package/build/packages/cmd/build/ext/lodash/_toSource.js +0 -1
  114. package/build/packages/cmd/build/ext/lodash/eq.js +0 -1
  115. package/build/packages/cmd/build/ext/lodash/isArguments.js +0 -1
  116. package/build/packages/cmd/build/ext/lodash/isBuffer.js +0 -1
  117. package/build/packages/cmd/build/ext/lodash/isFunction.js +0 -1
  118. package/build/packages/cmd/build/ext/lodash/isMap.js +0 -1
  119. package/build/packages/cmd/build/ext/lodash/isObject.js +0 -1
  120. package/build/packages/cmd/build/ext/lodash/isObjectLike.js +0 -1
  121. package/build/packages/cmd/build/ext/lodash/isSet.js +0 -1
  122. package/build/packages/cmd/build/ext/lodash/isTypedArray.js +0 -1
  123. package/build/packages/cmd/build/ext/lodash/noop.js +0 -1
  124. package/build/packages/cmd/build/ext/lodash/stubFalse.js +0 -1
  125. package/build/packages/cmd/build/ext/lodash/uniq.js +0 -1
  126. package/build/packages/cmd/build/ext/tslib/tslib.es6.js +0 -1
  127. package/build/packages/cmd/build/scripts/generators/api/index.js +0 -1
  128. package/build/packages/cmd/build/scripts/generators/api/info.js +0 -1
  129. package/build/packages/cmd/build/scripts/generators/components/index.js +0 -1
  130. package/build/packages/cmd/build/scripts/generators/pages/index.js +0 -1
  131. package/build/packages/cmd/build/scripts/generators/pages/info.js +0 -1
  132. package/build/packages/cmd/build/scripts/generators/theme/index.js +0 -1
  133. package/build/packages/cmd/build/scripts/generators/types/index.js +0 -1
  134. package/build/packages/cmd/build/utils/fs.js +0 -1
  135. package/build/packages/cmd/build/utils/helper.js +0 -1
  136. package/build/pages/404.d.ts +0 -2
  137. package/build/pages/404.js +0 -1
  138. package/build/pages/[slug]/index.d.ts +0 -3
  139. package/build/pages/_slug_/index.js +0 -1
  140. package/build/pages/account/addresses.d.ts +0 -2
  141. package/build/pages/account/addresses.js +0 -1
  142. package/build/pages/account/favorite-products.d.ts +0 -2
  143. package/build/pages/account/favorite-products.js +0 -1
  144. package/build/pages/account/forgot-password.d.ts +0 -2
  145. package/build/pages/account/forgot-password.js +0 -1
  146. package/build/pages/account/index.d.ts +0 -2
  147. package/build/pages/account/index.js +0 -1
  148. package/build/pages/account/login.d.ts +0 -2
  149. package/build/pages/account/login.js +0 -1
  150. package/build/pages/account/orders/[id].d.ts +0 -2
  151. package/build/pages/account/orders/_id_.js +0 -1
  152. package/build/pages/account/orders/index.d.ts +0 -2
  153. package/build/pages/account/orders/index.js +0 -1
  154. package/build/pages/account/raffles.d.ts +0 -2
  155. package/build/pages/account/raffles.js +0 -1
  156. package/build/pages/account/recover-password.d.ts +0 -2
  157. package/build/pages/account/recover-password.js +0 -1
  158. package/build/pages/account/register.d.ts +0 -2
  159. package/build/pages/account/register.js +0 -1
  160. package/build/pages/blog/[slug].d.ts +0 -3
  161. package/build/pages/blog/_slug_.js +0 -1
  162. package/build/pages/blog/index.d.ts +0 -2
  163. package/build/pages/blog/index.js +0 -1
  164. package/build/pages/cart.d.ts +0 -2
  165. package/build/pages/cart.js +0 -1
  166. package/build/pages/checkout.d.ts +0 -2
  167. package/build/pages/checkout.js +0 -1
  168. package/build/pages/editor.d.ts +0 -2
  169. package/build/pages/editor.js +0 -1
  170. package/build/pages/home.d.ts +0 -2
  171. package/build/pages/home.js +0 -1
  172. package/build/pages/pages/[slug].d.ts +0 -3
  173. package/build/pages/pages/_slug_.js +0 -1
  174. package/build/pages/raffle/[slug].d.ts +0 -3
  175. package/build/pages/raffle/_slug_.js +0 -1
  176. package/build/pages/raffle/index.d.ts +0 -2
  177. package/build/pages/raffle/index.js +0 -1
  178. package/build/pages/search.d.ts +0 -2
  179. package/build/pages/search.js +0 -1
  180. package/build/provider/page-data-next.d.ts +0 -94
  181. package/build/provider/page-data-next.js +0 -1
  182. package/build/utils/fs.d.ts +0 -28
  183. package/build/utils/fs.js +0 -1
  184. package/build/utils/google-fonts.d.ts +0 -2
  185. package/build/utils/google-fonts.js +0 -1
  186. package/build/utils/i18n.d.ts +0 -9
  187. package/build/utils/i18n.js +0 -1
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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};
@@ -1,3 +0,0 @@
1
- import { GetStaticPaths, GetStaticProps } from "next";
2
- export declare const getStaticPaths: GetStaticPaths;
3
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetServerSideProps } from "next";
2
- export declare const getServerSideProps: GetServerSideProps;
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.ORDERS)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.RAFFLE_ACCOUNT)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.RECOVER_PASSWORD)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.REGISTER)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,3 +0,0 @@
1
- import { GetStaticPaths, GetStaticProps } from "next";
2
- export declare const getStaticPaths: GetStaticPaths;
3
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
1
- import{__awaiter as t,__generator as o}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as r}from"@ikas/storefront-models";import{IkasNextPageDataProvider as i}from"../../provider/page-data-next.js";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,i.getStaticProps(n,void 0,[r.BLOG,r.BLOG_CATEGORY])];case 1:return[2,t.sent()]}}))}))};export{n as getStaticPaths,e as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.BLOG_INDEX)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.CART)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.CHECKOUT)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
1
- import{__awaiter as t,__generator as o}from'./../ext/tslib/tslib.es6.js';import{IkasNextPageDataProvider as r}from"../provider/page-data-next.js";var e=function(e){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,r.getStaticProps(e,void 0,void 0,!0)];case 1:return[2,t.sent()]}}))}))};export{e as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.INDEX)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,3 +0,0 @@
1
- import { GetStaticProps, GetStaticPaths } from "next";
2
- export declare const getStaticPaths: GetStaticPaths;
3
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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 n=function(n){return t(void 0,void 0,void 0,(function(){var t,a;return r(this,(function(r){switch(r.label){case 0:return n.locales?[4,Promise.all(n.locales.map((function(t){return e.getSettings(t)})))]:[2,{paths:[],fallback:"blocking"}];case 1:return t=r.sent(),a=[],t.forEach((function(t){var r=t.themeLocalization,e=t.routing;r&&r.themeJson.pages.filter((function(t){return t.type===o.CUSTOM})).forEach((function(t){t.slug&&!a.some((function(r){return r.params.slug===t.slug}))&&("local"===process.env.NEXT_PUBLIC_ENV?a.push({params:{slug:t.slug}}):a.push({params:{slug:t.slug},locale:e.path||e.id}))}))})),[2,{paths:a.map((function(t){return{params:t.params,locale:t.locale}})),fallback:"blocking"}]}}))}))},a=function(n){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,e.getStaticProps(n,o.CUSTOM)];case 1:return[2,t.sent()]}}))}))};export{n as getStaticPaths,a as getStaticProps};
@@ -1,3 +0,0 @@
1
- import { GetStaticProps, GetStaticPaths } from "next";
2
- export declare const getStaticPaths: GetStaticPaths;
3
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
1
- import{__awaiter as t,__generator as o}from'./../../ext/tslib/tslib.es6.js';import{IkasThemeJsonPageType as r}from"@ikas/storefront-models";import{IkasNextPageDataProvider as i}from"../../provider/page-data-next.js";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,i.getStaticProps(n,r.RAFFLE_DETAIL)];case 1:return[2,t.sent()]}}))}))};export{n as getStaticPaths,e as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.RAFFLE)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,2 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- export declare const getStaticProps: GetStaticProps;
@@ -1 +0,0 @@
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.SEARCH)];case 1:return[2,t.sent()]}}))}))};export{i as getStaticProps};
@@ -1,94 +0,0 @@
1
- /// <reference types="node" />
2
- import { GetServerSidePropsContext, GetStaticPropsContext } from "next";
3
- import { ParsedUrlQuery } from "querystring";
4
- import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannel, IkasStorefront, IkasStorefrontRouting, IkasStorefrontThemeLocalization, IkasThemeJson, IkasThemeJsonFavicon, IkasThemeJsonPageType, IkasThemeJsonSettings, IkasThemeJsonStockPreference } from "@ikas/storefront-models";
5
- import { IkasPageDataProvider } from "@ikas/storefront-providers";
6
- import { IkasStorefrontSettings } from "@ikas/storefront-api";
7
- export declare class IkasNextPageDataProvider {
8
- static startTime: number;
9
- static readLocalTheme(): Promise<IkasThemeJson>;
10
- static readSettingsFile(): Promise<SettingsData | null>;
11
- static cacheLocalSettingsFile(settings: IkasStorefrontSettings): Promise<void>;
12
- static readLocalSettingsFile(): any;
13
- static getLocalSettings(locale: string): Promise<SettingsData | null>;
14
- static getProdSettings(locale: string): Promise<SettingsData | null>;
15
- static getSettings(locale: string): Promise<SettingsData | null>;
16
- static setStorefrontConfig(settings: SettingsData): Promise<void>;
17
- static setTranslations(settings: SettingsData, componentIds: string[], pageType?: IkasThemeJsonPageType, isEditor?: boolean): Promise<void>;
18
- static getExtraProps(settings: SettingsData, provider: IkasPageDataProvider, pageType?: IkasThemeJsonPageType): Promise<Record<string, any>>;
19
- static getPageData(context: GetStaticPropsContext<ParsedUrlQuery> | GetServerSidePropsContext<ParsedUrlQuery>, isServer: boolean, pageType?: IkasThemeJsonPageType, possiblePageTypes?: IkasThemeJsonPageType[], isEditor?: boolean): Promise<{
20
- props: {};
21
- notFound: boolean;
22
- revalidate?: undefined;
23
- } | {
24
- props: any;
25
- notFound?: undefined;
26
- revalidate?: undefined;
27
- } | {
28
- props: any;
29
- revalidate: number;
30
- notFound?: undefined;
31
- }>;
32
- static getStaticProps(context: GetStaticPropsContext<ParsedUrlQuery>, pageType?: IkasThemeJsonPageType, possiblePageTypes?: IkasThemeJsonPageType[], isEditor?: boolean): Promise<{
33
- props: {};
34
- notFound: boolean;
35
- revalidate?: undefined;
36
- } | {
37
- props: any;
38
- notFound?: undefined;
39
- revalidate?: undefined;
40
- } | {
41
- props: any;
42
- revalidate: number;
43
- notFound?: undefined;
44
- }>;
45
- static getServerSideProps(context: GetServerSidePropsContext<ParsedUrlQuery>, pageType?: IkasThemeJsonPageType): Promise<{
46
- props: {};
47
- notFound: boolean;
48
- revalidate?: undefined;
49
- } | {
50
- props: any;
51
- notFound?: undefined;
52
- revalidate?: undefined;
53
- } | {
54
- props: any;
55
- revalidate: number;
56
- notFound?: undefined;
57
- }>;
58
- static createColorScript(settings: IkasThemeJsonSettings): string | undefined;
59
- static createFontScript(settings: IkasThemeJsonSettings): string | undefined;
60
- }
61
- export declare type SettingsData = {
62
- storefront: IkasStorefront;
63
- themeLocalization: IkasStorefrontThemeLocalization;
64
- salesChannel: IkasSalesChannel;
65
- routing: IkasStorefrontRouting;
66
- localizationMap?: Record<string, any>;
67
- favicon: IkasThemeJsonFavicon;
68
- stockPreference: IkasThemeJsonStockPreference;
69
- storefrontJSScripts: string[];
70
- domain: string;
71
- productBackInStockSettings: IkasProductBackInStockSettings | null;
72
- customerReviewSettings: IkasCustomerReviewSettings | null;
73
- merchantSettings: IkasMerchantSettings;
74
- customerSettings?: IkasCustomerSettings;
75
- };
76
- export declare type IkasCheckoutCustomizationProps = {
77
- showTax?: boolean;
78
- buttonBgColor?: string;
79
- buttonTextColor?: string;
80
- buttonDisabledBgColor?: string;
81
- buttonDisabledTextColor?: string;
82
- primaryTextColor?: string;
83
- secondaryTextColor?: string;
84
- primaryBgColor?: string;
85
- secondaryBgColor?: string;
86
- borderColor?: string;
87
- cardBgColor?: string;
88
- errorColor?: string;
89
- errorLightColor?: string;
90
- warningColor?: string;
91
- warningLightColor?: string;
92
- successColor?: string;
93
- successLightColor?: string;
94
- };
@@ -1 +0,0 @@
1
- import{__awaiter as t,__generator as e,__spreadArray as r,__assign as n}from'./../ext/tslib/tslib.es6.js';import o from"fs";import i from"next/config.js";import{IkasThemeJsonPageType as s}from"@ikas/storefront-models";import{IkasPageDataProvider as c}from"@ikas/storefront-providers";import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{getStorefrontSettings as u,listMerchantSettings as l,setAPIClientConfig as p,listCheckoutSettings as d}from"@ikas/storefront-api";import{getGoogleFontHref as g}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(t,e){o.readFile("./src/theme.json",{flag:"a+"},(function(r,n){if(r)return e(r);var o=n.length?JSON.parse(n.toString()):{};t(o)}))}))},S.readSettingsFile=function(){return new Promise((function(t){var e=i().serverRuntimeConfig.SETTINGS;o.readFile(e,{flag:"a+"},(function(e,r){if(e)return console.error("SETTINGS FILE READ ERROR!!!"),console.error(e),t(null);var n=r.length?JSON.parse(r.toString()):{};t(n)}))}))},S.cacheLocalSettingsFile=function(r){return t(this,void 0,void 0,(function(){var t,n;return e(this,(function(e){switch(e.label){case 0:return[4,h(t=".ikas")];case 1:return e.sent(),n="settings-".concat(this.startTime,".json"),[4,m(t,n,JSON.stringify(r,null,2))];case 2:return e.sent(),[2]}}))}))},S.readLocalSettingsFile=function(){try{var t=o.readFileSync(".ikas/settings-".concat(this.startTime,".json"));if(t&&t.length)return JSON.parse(t.toString())}catch(t){}},S.getLocalSettings=function(r){return t(this,void 0,void 0,(function(){var t,n,o,i,s,c,a,l,p,d;return e(this,(function(e){switch(e.label){case 0:return[4,S.readLocalSettingsFile()];case 1:return(t=e.sent())?[3,4]:[4,u()];case 2:return(n=e.sent()).isSuccess&&n.data?(t=n.data,[4,this.cacheLocalSettingsFile(t)]):(console.error("Storefront settings fetch failed!"),console.error(n),[2,null]);case 3:e.sent(),e.label=4;case 4:return o=t.storefront,i=t.salesChannel,s=[],c=t.productBackInStockSettings?{customerLoginRequired:t.productBackInStockSettings.customerLoginRequired}:null,a=t.customerReviewSettings?{customerLoginRequired:t.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:t.customerReviewSettings.customerPurchaseRequired||!1}:null,[4,S.readLocalTheme()];case 5:return l=e.sent(),p=S.createColorScript(l.settings),d=S.createFontScript(l.settings),p&&s.push(p),d&&s.push(d),[2,{storefront:o,themeLocalization:{id:"",locale:"en",privacyPolicy:null,returnPolicy:null,storefrontId:o.id,storefrontThemeId:"",termsOfService:null,imprint:null,shippingPolicy:null,themeJson:l},salesChannel:i,routing:o.routings.length?o.routings.find((function(t){return t.locale===r||t.id===r}))||o.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,domain:"localhost:3333",productBackInStockSettings:c,customerReviewSettings:a,merchantSettings:t.merchantSettings,customerSettings:t.customerSettings}]}}))}))},S.getProdSettings=function(r){return t(this,void 0,void 0,(function(){var n=this;return e(this,(function(i){return[2,new Promise((function(i){return t(n,void 0,void 0,(function(){var t,n,s,c,a,u,p,d,g,f,m,h;return e(this,(function(e){switch(e.label){case 0:return[4,S.readSettingsFile()];case 1:return(t=e.sent())&&t.localizationMap?(n=t.storefront,s=t.salesChannel,c=t.localizationMap,a=t.storefrontJSScripts||[],u=t.domain,p=t.productBackInStockSettings?{customerLoginRequired:t.productBackInStockSettings.customerLoginRequired}:null,d=t.customerReviewSettings?{customerLoginRequired:t.customerReviewSettings.customerLoginRequired||!1,customerPurchaseRequired:t.customerReviewSettings.customerPurchaseRequired||!1}:null,(g=t.merchantSettings)?[3,3]:[4,l({})]):[2,i(null)];case 2:if(!(f=e.sent()).isSuccess||!f.data)return console.error("MERCHANT SETTINGS FETCH FAILED!"),[2,i(null)];g=f.data,e.label=3;case 3:return m=c[r],h=n.routings.find((function(t){return t.id===r||t.path===r})),m&&h?(o.readFile(m,{flag:"a+"},(function(e,r){if(e)return console.error("THEME LOCALIZATION FILE READ ERROR!!!"),console.error(e),i(null);var o=r.length?JSON.parse(r.toString()):{},c=o.themeJson.settings.favicon,l=o.themeJson.settings.stockPreference;if(o.themeJson.settings){var f=S.createColorScript(o.themeJson.settings),m=S.createFontScript(o.themeJson.settings);f&&a.push(f),m&&a.push(m)}var v=t.customerSettings;i({storefront:n,themeLocalization:o,salesChannel:s,routing:h,favicon:c,stockPreference:l,storefrontJSScripts:a,domain:u,productBackInStockSettings:p,customerReviewSettings:d,merchantSettings:g,customerSettings:v})})),[2]):(console.error("THEME LOCALIZATION PATH OR ROUTING MISSING!!!"),[2,i(null)])}}))}))}))]}))}))},S.getSettings=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return"local"===process.env.NEXT_PUBLIC_ENV?[4,this.getLocalSettings(r)]:[3,2];case 1:case 3:return[2,t.sent()];case 2:return[4,this.getProdSettings(r)]}}))}))},S.setStorefrontConfig=function(r){var n;return t(this,void 0,void 0,(function(){var t,o,i,s,c,u,l,d,g,f,m;return e(this,(function(e){return t=r.storefront,o=r.salesChannel,i=r.routing,s=r.favicon,c=r.stockPreference,u=r.storefrontJSScripts,l=r.domain,d=r.productBackInStockSettings,g=r.customerReviewSettings,f=r.merchantSettings,m=r.customerSettings,a.init({apiUrl:process.env.NEXT_PUBLIC_GQL_URL,adminApiUrl:process.env.NEXT_PUBLIC_UPLOAD_GQL_URL,cdnUrl:process.env.NEXT_PUBLIC_IMG_BASE_URL,storefrontId:t.id,storefrontRoutingId:i.id,storefrontThemeId:t.mainStorefrontThemeId,salesChannelId:t.salesChannelId,priceListId:i.priceListId||void 0,stockLocationIds:null===(n=o.stockLocations)||void 0===n?void 0:n.map((function(t){return t.id})),routings:t.routings,paymentGateways:o.paymentGateways||[],gtmId:t.gtmId||void 0,fbpId:t.fbpId||void 0,analytics4Id:t.analytics4Id||void 0,universalAnalyticsId:t.universalAnalyticsId||void 0,tiktokPixelId:t.tiktokPixelId||void 0,favicon:s||null,pickUpStockLocationIds:t.pickUpStockLocationIds&&t.pickUpStockLocationIds.length?t.pickUpStockLocationIds:null,stockPreference:c||null,storefrontJSScripts:u||[],domain:l,productBackInStockSettings:d,customerReviewSettings:g,merchantSettings:f,customerSettings:m,metaTemplates:t.metaTemplates||null}),p(),[2]}))}))},S.setTranslations=function(n,o,c,u){return t(this,void 0,void 0,(function(){var t,l,p,d,g,m,h,S;return e(this,(function(e){switch(e.label){case 0:return t=i().serverRuntimeConfig,l=n.routing,p="local"===process.env.NEXT_PUBLIC_ENV,d=n.themeLocalization.themeJson.components.filter((function(t){return u||o.includes(t.id)})),g=r(["common"],d.map((function(t){return t.dir})),!0),(c===s.CHECKOUT||u)&&g.push("checkout-page"),m=t.nextI18nConf,h=l.locale,[4,new f(h,g,p?void 0:m.localePath).read()];case 1:return S=e.sent(),a.init({translations:S}),[2]}}))}))},S.getExtraProps=function(r,n,o){var i,c,a;return t(this,void 0,void 0,(function(){var t,u,l,p,g;return e(this,(function(e){switch(e.label){case 0:return t={},u=r.themeLocalization,o!==s.CHECKOUT?[3,2]:(l=null===(i=n.page)||void 0===i?void 0:i.components[0])?[4,d({})]:[3,2];case 1:p=e.sent(),g={showTax:null===(c=l.propValues.showTax)||void 0===c||c,buttonBgColor:l.propValues.buttonBgColor,buttonTextColor:l.propValues.buttonTextColor,buttonDisabledBgColor:l.propValues.buttonDisabledBgColor,buttonDisabledTextColor:l.propValues.buttonDisabledTextColor,primaryTextColor:l.propValues.primaryTextColor,secondaryTextColor:l.propValues.secondaryTextColor,primaryBgColor:l.propValues.primaryBgColor,secondaryBgColor:l.propValues.secondaryBgColor,borderColor:l.propValues.borderColor,cardBgColor:l.propValues.cardBgColor,errorColor:l.propValues.errorColor,errorLightColor:l.propValues.errorLightColor,warningColor:l.propValues.warningColor,warningLightColor:l.propValues.warningLightColor,successColor:l.propValues.successColor,successLightColor:l.propValues.successLightColor},t.customizationProps=g,t.returnPolicy=u.returnPolicy,t.privacyPolicy=u.privacyPolicy,t.termsOfService=u.termsOfService,t.imprint=u.imprint,t.shippingPolicy=u.shippingPolicy,t.checkoutSettings=(null===(a=null==p?void 0:p.data)||void 0===a?void 0:a.length)?p.data[0]:null,e.label=2;case 2:return[2,t]}}))}))},S.getPageData=function(r,o,i,s,u){var l;return t(this,void 0,void 0,(function(){var t,d,g,f,m,h,v,C;return e(this,(function(e){switch(e.label){case 0:return t="local"===process.env.NEXT_PUBLIC_ENV,d=!t&&u,a.init({apiUrl:process.env.NEXT_PUBLIC_GQL_URL,adminApiUrl:process.env.NEXT_PUBLIC_UPLOAD_GQL_URL,cdnUrl:process.env.NEXT_PUBLIC_IMG_BASE_URL}),p(),d?[3,7]:(g=r.locale)?[4,S.getSettings(g)]:[2,{props:{},notFound:!0}];case 1:return(f=e.sent())&&f.storefront.mainStorefrontThemeId&&f.storefront.salesChannelId?[4,this.setStorefrontConfig(f)]:[2,{props:{},notFound:!0}];case 2:return e.sent(),m=f.themeLocalization,(h=new c(m.themeJson,r.params,i)).possiblePageTypes=s||(i?[i]:[]),u?[3,4]:[4,h.getPageData()];case 3:if(e.sent(),!h.page)return[2,{props:{},notFound:!0}];e.label=4;case 4:return v=u?h.theme.components.map((function(t){return t.id})):(null===(l=h.page)||void 0===l?void 0:l.components.map((function(t){return t.componentId})))||[],[4,this.setTranslations(f,v,i,u)];case 5:return e.sent(),[4,this.getExtraProps(f,h,i)];case 6:return C=e.sent(),o?[2,{props:n(n({},h.nextPageData.props),C)}]:[2,{props:n(n({},h.nextPageData.props),C),revalidate:60}];case 7:return[2,{props:{}}];case 8:return[2]}}))}))},S.getStaticProps=function(r,n,o,i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,S.getPageData(r,!1,n,o,i)];case 1:return[2,t.sent()]}}))}))},S.getServerSideProps=function(r,n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,S.getPageData(r,!0,n)];case 1:return[2,t.sent()]}}))}))},S.createColorScript=function(t){if(t.colors)return"<script>".concat(t.colors.map((function(t){return'document.documentElement.style.setProperty("'.concat(t.key,'","').concat(t.color,'");')})).join("\r\n"),"<\/script> \n ")},S.createFontScript=function(t){var e=g(t.fontFamily);if(e)return'<link id="ikas-font" rel="stylesheet" href="'.concat(e,"\"> \n <style>\n body { \n font-family: '").concat(t.fontFamily.name,'\', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;\n } \n </style>')},S.startTime=Date.now(),S}();export{S as IkasNextPageDataProvider};
@@ -1,28 +0,0 @@
1
- /**
2
- * Divides the given filePath string into directory part and fileName part
3
- * @param path Path for the file
4
- */
5
- export declare function getFilePathParts(path: string): {
6
- dirParts: string[];
7
- filePart: string;
8
- } | {
9
- filePart: string;
10
- dirParts?: undefined;
11
- };
12
- /**
13
- * Deletes the contents of the given directory, exluding the ignoreFiles
14
- * @param dirPath Path for the directory
15
- * @param ignoreFiles List of files to keep in directory. Does not accept recursive paths, only first level files
16
- *
17
- * @returns true for successfull operation, false otherwise
18
- */
19
- export declare function deleteDirContent(dirPath: string, ignoreFiles?: string[]): Promise<boolean>;
20
- /**
21
- * Creates the given file and directories for the filePath
22
- * @param basePath Base directory path for the file
23
- * @param fileSubPath Filename or the sub directory path for the file to write
24
- * @param fileStr File contents
25
- *
26
- * @returns true for successfull operation, false otherwise
27
- */
28
- export declare function createFile(basePath: string, fileSubPath: string, fileStr: string): Promise<boolean>;
package/build/utils/fs.js DELETED
@@ -1 +0,0 @@
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 u(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 c(u,c,l){var s;return r(this,void 0,void 0,(function(){var r,d,f;return t(this,(function(t){try{return r=u,d=o(c),(null===(s=d.dirParts)||void 0===s?void 0:s.length)&&(r=e.join.apply(e,n([r],d.dirParts,!1))),i.existsSync(r)||i.mkdirSync(r,{recursive:!0}),f=e.join(r,d.filePart),i.writeFileSync(f,l),[2,!0]}catch(r){return console.error(r),[2,!1]}return[2]}))}))}export{c as createFile,u as deleteDirContent,o as getFilePathParts};
@@ -1,2 +0,0 @@
1
- import { IkasThemeJsonFontFamily } from "@ikas/storefront-models";
2
- export declare const getGoogleFontHref: (fontFamily: IkasThemeJsonFontFamily) => string | undefined;
@@ -1 +0,0 @@
1
- var a=function(a){if(a.name){var t=a.name.replace(/ /g,"+"),e="";if(a.variants){e+=":";var r=a.variants.some((function(a){return"italic"===a}));if(r&&(e+="ital,"),e+="wght@",r){var n=new RegExp("italic","i");e+=a.variants.reduce((function(a,t){return n.test(t)?a:a+"0,".concat(t.replace("regular","400"),";")}),""),e+=a.variants.reduce((function(a,t){return n.test(t)?a+"1,".concat("italic"===t?"400":t.replace("italic",""),";"):a}),"")}else e+=a.variants.reduce((function(a,t){return a+"".concat(t.replace("regular","400"),";")}),"");e=e.substring(0,e.length-1),e+="&display=swap"}return"https://fonts.googleapis.com/css2?family=".concat(t).concat(e)}};export{a as getGoogleFontHref};
@@ -1,9 +0,0 @@
1
- export declare const CHECKOUT_TRANSLATION_NAMESPACE = "checkout-page";
2
- export declare class I18NFileReader {
3
- locale: string;
4
- namespaces: string[];
5
- localePath?: string;
6
- constructor(locale: string, namespaces: string[], localePath?: string);
7
- read(): Promise<Record<string, any>>;
8
- private readLocaleFile;
9
- }
@@ -1 +0,0 @@
1
- import{__awaiter as e,__generator as t}from'./../ext/tslib/tslib.es6.js';import s from"fs";import r from"path";var o="checkout-page",n=function(){function o(e,t,s){this.locale=e,this.namespaces=t,this.localePath=s}return o.prototype.read=function(){return e(this,void 0,void 0,(function(){var e,o,n,a,c,i,l,u,h;return t(this,(function(t){switch(t.label){case 0:e={},o=0,n=this.namespaces,t.label=1;case 1:if(!(o<n.length))return[3,14];a=n[o],t.label=2;case 2:return t.trys.push([2,12,,13]),c=this.localePath?r.join(this.localePath,this.locale,a+".json"):r.join(process.cwd(),"public","locales",this.locale,a+".json"),s.existsSync(c)?[4,this.readLocaleFile(c)]:[3,4];case 3:return i=t.sent(),e[a]=i,[3,11];case 4:return"checkout-page"!==a?[3,11]:(l={},"tr"!==this.locale?[3,6]:[4,import("@ikas/storefront-assets/checkout/tr.js")]);case 5:return u=t.sent(),l=u.default,[3,10];case 6:return"de"!==this.locale?[3,8]:[4,import("@ikas/storefront-assets/checkout/de.js")];case 7:return u=t.sent(),l=u.default,[3,10];case 8:return[4,import("@ikas/storefront-assets/checkout/en.js")];case 9:u=t.sent(),l=u.default,t.label=10;case 10:e[a]=l,t.label=11;case 11:return[3,13];case 12:return h=t.sent(),console.error(h),[3,13];case 13:return o++,[3,1];case 14:return[2,e]}}))}))},o.prototype.readLocaleFile=function(r){return e(this,void 0,void 0,(function(){return t(this,(function(e){return[2,new Promise((function(e,t){s.readFile(r,{flag:"r"},(function(s,r){if(s)return t(s);var o=r.length?JSON.parse(r.toString()):{};e(o)}))}))]}))}))},o}();export{o as CHECKOUT_TRANSLATION_NAMESPACE,n as I18NFileReader};