@gem-sdk/pages 1.43.0-staging.9 → 1.43.3-staging.33
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.
|
@@ -85,7 +85,7 @@ const Toolbar = ()=>{
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
const setHoverComponent = react.useCallback(({ $component, componentUid, focus,
|
|
88
|
+
const setHoverComponent = react.useCallback(({ $component, componentUid, focus, isPreventSection, isParent })=>{
|
|
89
89
|
if (!$component && !componentUid) return;
|
|
90
90
|
if (!$component) {
|
|
91
91
|
const $c = document.querySelector(`[data-uid="${componentUid}"]`);
|
|
@@ -102,7 +102,7 @@ const Toolbar = ()=>{
|
|
|
102
102
|
const $btnAddTop = getChildrenByAttrSelector($component, 'data-toolbar-add-top');
|
|
103
103
|
const $btnAddBottom = getChildrenByAttrSelector($component, 'data-toolbar-add-bottom');
|
|
104
104
|
const $themeSectionStatus = getChildrenByAttrSelector($component, 'data-theme-section-status');
|
|
105
|
-
if (
|
|
105
|
+
if (isPreventSection && $themeSectionStatus) {
|
|
106
106
|
$themeSectionStatus.setAttribute('data-theme-section-status-active', 'true');
|
|
107
107
|
}
|
|
108
108
|
if ($toolbar) {
|
|
@@ -124,7 +124,7 @@ const Toolbar = ()=>{
|
|
|
124
124
|
if (isParent) {
|
|
125
125
|
$outline.setAttribute('data-outline-parent-hover', 'true');
|
|
126
126
|
}
|
|
127
|
-
if (
|
|
127
|
+
if (isPreventSection) {
|
|
128
128
|
$outline.setAttribute('data-outline-overlay-theme-section', 'true');
|
|
129
129
|
}
|
|
130
130
|
if (focus) {
|
|
@@ -632,23 +632,23 @@ const Toolbar = ()=>{
|
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
const $
|
|
636
|
-
if ($
|
|
635
|
+
const $preventSection = $target.closest('[data-theme-section]') || $target.closest('[data-shopify-section]');
|
|
636
|
+
if ($preventSection) {
|
|
637
637
|
setHoverComponent({
|
|
638
|
-
$component: $
|
|
638
|
+
$component: $preventSection,
|
|
639
639
|
focus: true,
|
|
640
|
-
|
|
640
|
+
isPreventSection: true
|
|
641
641
|
});
|
|
642
642
|
} else {
|
|
643
643
|
return;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
-
const $
|
|
647
|
-
if ($
|
|
646
|
+
const $preventSection = $target.closest('[data-theme-section]') || $target.closest('[data-shopify-section]');
|
|
647
|
+
if ($preventSection) {
|
|
648
648
|
setHoverComponent({
|
|
649
|
-
$component: $
|
|
649
|
+
$component: $preventSection,
|
|
650
650
|
focus: true,
|
|
651
|
-
|
|
651
|
+
isPreventSection: true
|
|
652
652
|
});
|
|
653
653
|
} else {
|
|
654
654
|
setHoverComponent({
|
|
@@ -15,7 +15,7 @@ var AddSectionImageToLayout = require('../components/image-to-layout/AddSectionI
|
|
|
15
15
|
var Toolbar = require('../components/builder/Toolbar.js');
|
|
16
16
|
var SwitchView = require('../components/builder/SwitchView.js');
|
|
17
17
|
|
|
18
|
-
const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar })=>{
|
|
18
|
+
const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
19
19
|
const [loadSuccess, setLoadSuccess] = react.useState(false);
|
|
20
20
|
const isDisableHeaderFooter = ()=>{
|
|
21
21
|
return isThemeSectionEditor;
|
|
@@ -60,6 +60,7 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
60
60
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.SectionProvider, {
|
|
61
61
|
data: sectionData,
|
|
62
62
|
children: /*#__PURE__*/ jsxRuntime.jsxs(core.BuilderPreviewProvider, {
|
|
63
|
+
pageName: pageName,
|
|
63
64
|
state: initState,
|
|
64
65
|
isThemeSectionEditor: isThemeSectionEditor,
|
|
65
66
|
children: [
|
|
@@ -70,10 +71,11 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
70
71
|
className: "builder gp-z-1 gp-relative",
|
|
71
72
|
children: [
|
|
72
73
|
!hiddenToolbar && (isDisableHeaderFooter() ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
73
|
-
className: "gp-h-[40px] bg-[#f4f4f4]",
|
|
74
|
+
className: "gp-h-[40px] gp-bg-[#f4f4f4]",
|
|
74
75
|
children: /*#__PURE__*/ jsxRuntime.jsx(SwitchView.default, {})
|
|
75
76
|
}) : /*#__PURE__*/ jsxRuntime.jsx(Header.default, {
|
|
76
|
-
pageType: pageType
|
|
77
|
+
pageType: pageType,
|
|
78
|
+
isOriginTemplate: isOriginTemplate
|
|
77
79
|
})),
|
|
78
80
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
79
81
|
id: "storefront",
|
|
@@ -96,7 +98,8 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
96
98
|
id: "visual-content"
|
|
97
99
|
}),
|
|
98
100
|
!isDisableHeaderFooter() && !hiddenToolbar && /*#__PURE__*/ jsxRuntime.jsx(Footer.default, {
|
|
99
|
-
pageType: pageType
|
|
101
|
+
pageType: pageType,
|
|
102
|
+
isOriginTemplate: isOriginTemplate
|
|
100
103
|
})
|
|
101
104
|
]
|
|
102
105
|
})
|
|
@@ -81,7 +81,7 @@ const Toolbar = ()=>{
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
const setHoverComponent = useCallback(({ $component, componentUid, focus,
|
|
84
|
+
const setHoverComponent = useCallback(({ $component, componentUid, focus, isPreventSection, isParent })=>{
|
|
85
85
|
if (!$component && !componentUid) return;
|
|
86
86
|
if (!$component) {
|
|
87
87
|
const $c = document.querySelector(`[data-uid="${componentUid}"]`);
|
|
@@ -98,7 +98,7 @@ const Toolbar = ()=>{
|
|
|
98
98
|
const $btnAddTop = getChildrenByAttrSelector($component, 'data-toolbar-add-top');
|
|
99
99
|
const $btnAddBottom = getChildrenByAttrSelector($component, 'data-toolbar-add-bottom');
|
|
100
100
|
const $themeSectionStatus = getChildrenByAttrSelector($component, 'data-theme-section-status');
|
|
101
|
-
if (
|
|
101
|
+
if (isPreventSection && $themeSectionStatus) {
|
|
102
102
|
$themeSectionStatus.setAttribute('data-theme-section-status-active', 'true');
|
|
103
103
|
}
|
|
104
104
|
if ($toolbar) {
|
|
@@ -120,7 +120,7 @@ const Toolbar = ()=>{
|
|
|
120
120
|
if (isParent) {
|
|
121
121
|
$outline.setAttribute('data-outline-parent-hover', 'true');
|
|
122
122
|
}
|
|
123
|
-
if (
|
|
123
|
+
if (isPreventSection) {
|
|
124
124
|
$outline.setAttribute('data-outline-overlay-theme-section', 'true');
|
|
125
125
|
}
|
|
126
126
|
if (focus) {
|
|
@@ -628,23 +628,23 @@ const Toolbar = ()=>{
|
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
const $
|
|
632
|
-
if ($
|
|
631
|
+
const $preventSection = $target.closest('[data-theme-section]') || $target.closest('[data-shopify-section]');
|
|
632
|
+
if ($preventSection) {
|
|
633
633
|
setHoverComponent({
|
|
634
|
-
$component: $
|
|
634
|
+
$component: $preventSection,
|
|
635
635
|
focus: true,
|
|
636
|
-
|
|
636
|
+
isPreventSection: true
|
|
637
637
|
});
|
|
638
638
|
} else {
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
const $
|
|
643
|
-
if ($
|
|
642
|
+
const $preventSection = $target.closest('[data-theme-section]') || $target.closest('[data-shopify-section]');
|
|
643
|
+
if ($preventSection) {
|
|
644
644
|
setHoverComponent({
|
|
645
|
-
$component: $
|
|
645
|
+
$component: $preventSection,
|
|
646
646
|
focus: true,
|
|
647
|
-
|
|
647
|
+
isPreventSection: true
|
|
648
648
|
});
|
|
649
649
|
} else {
|
|
650
650
|
setHoverComponent({
|
|
@@ -13,7 +13,7 @@ import AddSectionImageToLayout from '../components/image-to-layout/AddSectionIma
|
|
|
13
13
|
import Toolbar from '../components/builder/Toolbar.js';
|
|
14
14
|
import Devices from '../components/builder/SwitchView.js';
|
|
15
15
|
|
|
16
|
-
const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar })=>{
|
|
16
|
+
const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
17
17
|
const [loadSuccess, setLoadSuccess] = useState(false);
|
|
18
18
|
const isDisableHeaderFooter = ()=>{
|
|
19
19
|
return isThemeSectionEditor;
|
|
@@ -58,6 +58,7 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
58
58
|
children: /*#__PURE__*/ jsx(SectionProvider, {
|
|
59
59
|
data: sectionData,
|
|
60
60
|
children: /*#__PURE__*/ jsxs(BuilderPreviewProvider, {
|
|
61
|
+
pageName: pageName,
|
|
61
62
|
state: initState,
|
|
62
63
|
isThemeSectionEditor: isThemeSectionEditor,
|
|
63
64
|
children: [
|
|
@@ -68,10 +69,11 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
68
69
|
className: "builder gp-z-1 gp-relative",
|
|
69
70
|
children: [
|
|
70
71
|
!hiddenToolbar && (isDisableHeaderFooter() ? /*#__PURE__*/ jsx("div", {
|
|
71
|
-
className: "gp-h-[40px] bg-[#f4f4f4]",
|
|
72
|
+
className: "gp-h-[40px] gp-bg-[#f4f4f4]",
|
|
72
73
|
children: /*#__PURE__*/ jsx(Devices, {})
|
|
73
74
|
}) : /*#__PURE__*/ jsx(Header, {
|
|
74
|
-
pageType: pageType
|
|
75
|
+
pageType: pageType,
|
|
76
|
+
isOriginTemplate: isOriginTemplate
|
|
75
77
|
})),
|
|
76
78
|
/*#__PURE__*/ jsx("div", {
|
|
77
79
|
id: "storefront",
|
|
@@ -94,7 +96,8 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
94
96
|
id: "visual-content"
|
|
95
97
|
}),
|
|
96
98
|
!isDisableHeaderFooter() && !hiddenToolbar && /*#__PURE__*/ jsx(Footer, {
|
|
97
|
-
pageType: pageType
|
|
99
|
+
pageType: pageType,
|
|
100
|
+
isOriginTemplate: isOriginTemplate
|
|
98
101
|
})
|
|
99
102
|
]
|
|
100
103
|
})
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.3-staging.33",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"next": "latest"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "1.43.
|
|
30
|
-
"@gem-sdk/plugin-cookie-bar": "1.43.
|
|
31
|
-
"@gem-sdk/plugin-quick-view": "1.43.
|
|
32
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "1.43.
|
|
29
|
+
"@gem-sdk/core": "1.43.3-staging.33",
|
|
30
|
+
"@gem-sdk/plugin-cookie-bar": "1.43.3-staging.33",
|
|
31
|
+
"@gem-sdk/plugin-quick-view": "1.43.3-staging.33",
|
|
32
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "1.43.3-staging.33"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"next": ">=13"
|