@ikas/storefront 4.0.0-alpha.20 → 4.0.0-alpha.22
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.22",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "Umut Ozan Yıldırım",
|
|
6
6
|
"license": "ISC",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"libphonenumber-js": "^1.10.6"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@ikas/storefront-api": "^4.0.0-alpha.
|
|
28
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
29
|
-
"@ikas/storefront-model-functions": "^4.0.0-alpha.
|
|
30
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
31
|
-
"@ikas/storefront-providers": "^4.0.0-alpha.
|
|
27
|
+
"@ikas/storefront-api": "^4.0.0-alpha.22",
|
|
28
|
+
"@ikas/storefront-config": "^4.0.0-alpha.22",
|
|
29
|
+
"@ikas/storefront-model-functions": "^4.0.0-alpha.22",
|
|
30
|
+
"@ikas/storefront-models": "^4.0.0-alpha.22",
|
|
31
|
+
"@ikas/storefront-providers": "^4.0.0-alpha.22",
|
|
32
32
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
33
33
|
"@rollup/plugin-json": "^4.1.0",
|
|
34
34
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"html-react-parser": "^1.4.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@ikas/storefront-api": "^4.0.0-alpha.
|
|
56
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
57
|
-
"@ikas/storefront-model-functions": "^4.0.0-alpha.
|
|
58
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
59
|
-
"@ikas/storefront-providers": "^4.0.0-alpha.
|
|
55
|
+
"@ikas/storefront-api": "^4.0.0-alpha.22",
|
|
56
|
+
"@ikas/storefront-config": "^4.0.0-alpha.22",
|
|
57
|
+
"@ikas/storefront-model-functions": "^4.0.0-alpha.22",
|
|
58
|
+
"@ikas/storefront-models": "^4.0.0-alpha.22",
|
|
59
|
+
"@ikas/storefront-providers": "^4.0.0-alpha.22",
|
|
60
60
|
"mobx": "^6.1.3",
|
|
61
61
|
"mobx-react-lite": "^3.1.5",
|
|
62
62
|
"next": "12.0.7",
|
|
@@ -573,8 +573,6 @@ export default class IkasPageEditorViewModel {
|
|
|
573
573
|
cdnUrl: data.cdnUrl,
|
|
574
574
|
});
|
|
575
575
|
|
|
576
|
-
console.log(data);
|
|
577
|
-
|
|
578
576
|
IkasAPIClientConfig.URL = IkasStorefrontConfig.getApiUrl() || "";
|
|
579
577
|
IkasAPIClientConfig.HEADERS = {
|
|
580
578
|
"x-api-key": IkasStorefrontConfig.getApiKey() || "",
|
|
@@ -638,8 +636,6 @@ export default class IkasPageEditorViewModel {
|
|
|
638
636
|
await this.pageDataProvider.setLinkSlugs();
|
|
639
637
|
|
|
640
638
|
if (pageComponentPropValues) {
|
|
641
|
-
pageComponentPropValues.propValues[propName] = propValue;
|
|
642
|
-
|
|
643
639
|
if (prop.type === IkasThemeJsonComponentPropType.CUSTOM) {
|
|
644
640
|
IkasPageDataInit.initCustomDataPropValue(
|
|
645
641
|
prop,
|
|
@@ -670,6 +666,12 @@ export default class IkasPageEditorViewModel {
|
|
|
670
666
|
propValue,
|
|
671
667
|
pageComponentPropValues
|
|
672
668
|
);
|
|
669
|
+
} else if (prop.type === IkasThemeJsonComponentPropType.PRODUCT_LIST) {
|
|
670
|
+
IkasPageDataInit.initProductListPropValue(
|
|
671
|
+
prop,
|
|
672
|
+
propValue,
|
|
673
|
+
pageComponentPropValues
|
|
674
|
+
);
|
|
673
675
|
} else if (prop.type === IkasThemeJsonComponentPropType.CATEGORY) {
|
|
674
676
|
IkasPageDataInit.initCategoryPropValue(
|
|
675
677
|
prop,
|
|
@@ -709,6 +711,8 @@ export default class IkasPageEditorViewModel {
|
|
|
709
711
|
propValue,
|
|
710
712
|
pageComponentPropValues
|
|
711
713
|
);
|
|
714
|
+
} else {
|
|
715
|
+
pageComponentPropValues.propValues[propName] = propValue;
|
|
712
716
|
}
|
|
713
717
|
}
|
|
714
718
|
};
|
package/src/pages/editor.tsx
CHANGED
|
@@ -8,7 +8,7 @@ const IkasPageEditor = dynamic(
|
|
|
8
8
|
);
|
|
9
9
|
|
|
10
10
|
type Props = {
|
|
11
|
-
configJson
|
|
11
|
+
configJson?: Record<string, any>; // local only
|
|
12
12
|
components?: Record<string, any>;
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -19,9 +19,12 @@ export default class Page extends React.Component<Props> {
|
|
|
19
19
|
if (configJson) {
|
|
20
20
|
IkasStorefrontConfig.init({
|
|
21
21
|
...configJson,
|
|
22
|
-
currentPageComponents: components || {},
|
|
23
22
|
});
|
|
24
23
|
}
|
|
24
|
+
|
|
25
|
+
IkasStorefrontConfig.init({
|
|
26
|
+
currentPageComponents: components || {},
|
|
27
|
+
});
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
render() {
|