@ikas/storefront-next 4.0.0-alpha.9 → 4.0.0-beta.10

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 (110) hide show
  1. package/build/api/getComponentDirs.d.ts +3 -0
  2. package/build/api/getComponentDirs.js +1 -0
  3. package/build/api/getTheme.d.ts +3 -0
  4. package/build/api/getTheme.js +1 -0
  5. package/{src/api/index.ts → build/api/index.d.ts} +11 -14
  6. package/build/api/index.js +1 -0
  7. package/build/api/middleware.d.ts +3 -0
  8. package/build/api/middleware.js +1 -0
  9. package/build/api/updateTheme.d.ts +9 -0
  10. package/build/api/updateTheme.js +1 -0
  11. package/build/api/uploadTheme.d.ts +3 -0
  12. package/build/api/uploadTheme.js +1 -0
  13. package/build/ext/tslib/tslib.es6.js +1 -0
  14. package/{src/index.ts → build/index.d.ts} +4 -4
  15. package/build/index.js +1 -0
  16. package/build/packages/cmd/build/ext/tslib/tslib.es6.js +1 -0
  17. package/build/packages/cmd/build/scripts/generators/api/index.js +1 -0
  18. package/build/packages/cmd/build/scripts/generators/api/info.js +1 -0
  19. package/build/packages/cmd/build/scripts/generators/components/index.js +1 -0
  20. package/build/packages/cmd/build/scripts/generators/pages/index.js +1 -0
  21. package/build/packages/cmd/build/scripts/generators/pages/info.js +1 -0
  22. package/build/packages/cmd/build/scripts/generators/theme/index.js +1 -0
  23. package/build/packages/cmd/build/scripts/generators/types/index.js +1 -0
  24. package/build/packages/cmd/build/utils/fs.js +1 -0
  25. package/build/packages/cmd/build/utils/helper.js +1 -0
  26. package/build/pages/404.d.ts +2 -0
  27. package/build/pages/404.js +1 -0
  28. package/build/pages/[slug]/index.d.ts +3 -0
  29. package/build/pages/_slug_/index.js +1 -0
  30. package/build/pages/account/addresses.d.ts +2 -0
  31. package/build/pages/account/addresses.js +1 -0
  32. package/build/pages/account/favorite-products.d.ts +2 -0
  33. package/build/pages/account/favorite-products.js +1 -0
  34. package/build/pages/account/forgot-password.d.ts +2 -0
  35. package/build/pages/account/forgot-password.js +1 -0
  36. package/build/pages/account/index.d.ts +2 -0
  37. package/build/pages/account/index.js +1 -0
  38. package/build/pages/account/login.d.ts +2 -0
  39. package/build/pages/account/login.js +1 -0
  40. package/build/pages/account/orders/[id].d.ts +2 -0
  41. package/build/pages/account/orders/_id_.js +1 -0
  42. package/build/pages/account/orders/index.d.ts +2 -0
  43. package/build/pages/account/orders/index.js +1 -0
  44. package/build/pages/account/raffles.d.ts +2 -0
  45. package/build/pages/account/raffles.js +1 -0
  46. package/build/pages/account/recover-password.d.ts +2 -0
  47. package/build/pages/account/recover-password.js +1 -0
  48. package/build/pages/account/register.d.ts +2 -0
  49. package/build/pages/account/register.js +1 -0
  50. package/build/pages/blog/[slug].d.ts +3 -0
  51. package/build/pages/blog/_slug_.js +1 -0
  52. package/build/pages/blog/index.d.ts +2 -0
  53. package/build/pages/blog/index.js +1 -0
  54. package/build/pages/cart.d.ts +2 -0
  55. package/build/pages/cart.js +1 -0
  56. package/build/pages/checkout.d.ts +2 -0
  57. package/build/pages/checkout.js +1 -0
  58. package/build/pages/editor.d.ts +2 -0
  59. package/build/pages/editor.js +1 -0
  60. package/build/pages/home.d.ts +2 -0
  61. package/build/pages/home.js +1 -0
  62. package/{src/pages/index.ts → build/pages/index.d.ts} +22 -22
  63. package/build/pages/pages/[slug].d.ts +3 -0
  64. package/build/pages/pages/_slug_.js +1 -0
  65. package/build/pages/raffle/[slug].d.ts +3 -0
  66. package/build/pages/raffle/_slug_.js +1 -0
  67. package/build/pages/raffle/index.d.ts +2 -0
  68. package/build/pages/raffle/index.js +1 -0
  69. package/build/pages/search.d.ts +2 -0
  70. package/build/pages/search.js +1 -0
  71. package/build/provider/page-data-next.d.ts +94 -0
  72. package/build/provider/page-data-next.js +1 -0
  73. package/build/utils/fs.d.ts +28 -0
  74. package/build/utils/fs.js +1 -0
  75. package/build/utils/google-fonts.d.ts +2 -0
  76. package/build/utils/google-fonts.js +1 -0
  77. package/build/utils/i18n.d.ts +9 -0
  78. package/build/utils/i18n.js +1 -0
  79. package/package.json +19 -18
  80. package/src/api/getComponentDirs.ts +0 -39
  81. package/src/api/getTheme.ts +0 -22
  82. package/src/api/middleware.ts +0 -24
  83. package/src/api/updateTheme.ts +0 -33
  84. package/src/api/uploadTheme.ts +0 -307
  85. package/src/pages/404.tsx +0 -18
  86. package/src/pages/[slug]/index.tsx +0 -18
  87. package/src/pages/account/addresses.tsx +0 -10
  88. package/src/pages/account/favorite-products.tsx +0 -10
  89. package/src/pages/account/forgot-password.tsx +0 -10
  90. package/src/pages/account/index.tsx +0 -10
  91. package/src/pages/account/login.tsx +0 -10
  92. package/src/pages/account/orders/[id].tsx +0 -10
  93. package/src/pages/account/orders/index.tsx +0 -10
  94. package/src/pages/account/raffles.tsx +0 -10
  95. package/src/pages/account/recover-password.tsx +0 -10
  96. package/src/pages/account/register.tsx +0 -10
  97. package/src/pages/blog/[slug].tsx +0 -17
  98. package/src/pages/blog/index.tsx +0 -10
  99. package/src/pages/cart.tsx +0 -10
  100. package/src/pages/checkout.tsx +0 -10
  101. package/src/pages/editor.tsx +0 -11
  102. package/src/pages/home.tsx +0 -10
  103. package/src/pages/pages/[slug].tsx +0 -72
  104. package/src/pages/raffle/[slug].tsx +0 -17
  105. package/src/pages/raffle/index.tsx +0 -10
  106. package/src/pages/search.tsx +0 -10
  107. package/src/provider/page-data-next.ts +0 -618
  108. package/src/utils/fs.ts +0 -93
  109. package/src/utils/google-fonts.ts +0 -52
  110. package/src/utils/i18n.ts +0 -80
@@ -1,10 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.RAFFLE_ACCOUNT
9
- );
10
- };
@@ -1,10 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.RECOVER_PASSWORD
9
- );
10
- };
@@ -1,10 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.REGISTER
9
- );
10
- };
@@ -1,17 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticPaths, GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../../provider/page-data-next";
4
-
5
- export const getStaticPaths: GetStaticPaths = async () => {
6
- return {
7
- paths: [],
8
- fallback: "blocking",
9
- };
10
- };
11
-
12
- export const getStaticProps: GetStaticProps = async (context) => {
13
- return await IkasNextPageDataProvider.getStaticProps(context, undefined, [
14
- IkasThemeJsonPageType.BLOG,
15
- IkasThemeJsonPageType.BLOG_CATEGORY,
16
- ]);
17
- };
@@ -1,10 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.BLOG_INDEX
9
- );
10
- };
@@ -1,10 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.CART
9
- );
10
- };
@@ -1,10 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.CHECKOUT
9
- );
10
- };
@@ -1,11 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- import { IkasNextPageDataProvider } from "../provider/page-data-next";
3
-
4
- export const getStaticProps: GetStaticProps = async (context) => {
5
- return await IkasNextPageDataProvider.getStaticProps(
6
- context,
7
- undefined,
8
- undefined,
9
- true
10
- );
11
- };
@@ -1,10 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
3
- import { IkasNextPageDataProvider } from "../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.INDEX
9
- );
10
- };
@@ -1,72 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps, GetStaticPaths } from "next";
3
- import {
4
- IkasNextPageDataProvider,
5
- SettingsData,
6
- } from "../../provider/page-data-next";
7
-
8
- type SlugParams = {
9
- slug: string;
10
- };
11
-
12
- type SlugPair = {
13
- params: SlugParams;
14
- locale?: string;
15
- };
16
-
17
- export const getStaticPaths: GetStaticPaths = async (context) => {
18
- if (!context.locales)
19
- return {
20
- paths: [],
21
- fallback: "blocking",
22
- };
23
-
24
- const allSettings = (await Promise.all(
25
- context.locales.map((locale) =>
26
- IkasNextPageDataProvider.getSettings(locale)
27
- )
28
- )) as SettingsData[];
29
-
30
- const customPagePaths: SlugPair[] = [];
31
-
32
- allSettings.forEach(({ themeLocalization, routing }) => {
33
- if (!themeLocalization) return;
34
-
35
- const customPages = themeLocalization.themeJson.pages.filter(
36
- (p) => p.type === IkasThemeJsonPageType.CUSTOM
37
- );
38
-
39
- customPages.forEach((customPage) => {
40
- if (
41
- customPage.slug &&
42
- !customPagePaths.some((p) => p.params.slug === customPage.slug)
43
- ) {
44
- if (process.env.NEXT_PUBLIC_ENV === "local") {
45
- customPagePaths.push({
46
- params: { slug: customPage.slug },
47
- });
48
- } else {
49
- customPagePaths.push({
50
- params: { slug: customPage.slug },
51
- locale: routing.path || routing.id,
52
- });
53
- }
54
- }
55
- });
56
- });
57
-
58
- return {
59
- paths: customPagePaths.map((p) => ({
60
- params: p.params,
61
- locale: p.locale,
62
- })),
63
- fallback: "blocking",
64
- };
65
- };
66
-
67
- export const getStaticProps: GetStaticProps = async (context) => {
68
- return await IkasNextPageDataProvider.getStaticProps(
69
- context,
70
- IkasThemeJsonPageType.CUSTOM
71
- );
72
- };
@@ -1,17 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps, GetStaticPaths } from "next";
3
- import { IkasNextPageDataProvider } from "../../provider/page-data-next";
4
-
5
- export const getStaticPaths: GetStaticPaths = async () => {
6
- return {
7
- paths: [],
8
- fallback: "blocking",
9
- };
10
- };
11
-
12
- export const getStaticProps: GetStaticProps = async (context) => {
13
- return await IkasNextPageDataProvider.getStaticProps(
14
- context,
15
- IkasThemeJsonPageType.RAFFLE_DETAIL
16
- );
17
- };
@@ -1,10 +0,0 @@
1
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
2
- import { GetStaticProps } from "next";
3
- import { IkasNextPageDataProvider } from "../../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.RAFFLE
9
- );
10
- };
@@ -1,10 +0,0 @@
1
- import { GetStaticProps } from "next";
2
- import { IkasThemeJsonPageType } from "@ikas/storefront-models";
3
- import { IkasNextPageDataProvider } from "../provider/page-data-next";
4
-
5
- export const getStaticProps: GetStaticProps = async (context) => {
6
- return await IkasNextPageDataProvider.getStaticProps(
7
- context,
8
- IkasThemeJsonPageType.SEARCH
9
- );
10
- };