@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.
- 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/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 +19 -18
- 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
|
@@ -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
|
-
};
|
package/src/pages/blog/index.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/pages/cart.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/pages/checkout.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/pages/editor.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/pages/home.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/pages/search.tsx
DELETED
|
@@ -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
|
-
};
|