@gem-sdk/pages 2.1.13-staging.4 → 2.1.13
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.
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var core = require('@gem-sdk/core');
|
|
5
4
|
|
|
6
5
|
const DropElement = ()=>{
|
|
7
|
-
const editingPageType = core.useShopStore((s)=>s.pageType);
|
|
8
6
|
const dispatchEventBuildWithSectionActiveTab = (value)=>{
|
|
9
7
|
const event = new CustomEvent('editor:sidebar:build-with-section-active-tab', {
|
|
10
8
|
bubbles: true,
|
|
@@ -14,15 +12,6 @@ const DropElement = ()=>{
|
|
|
14
12
|
});
|
|
15
13
|
window.dispatchEvent(event);
|
|
16
14
|
};
|
|
17
|
-
const dispatchEventBuildWithTemplateActiveTab = (value)=>{
|
|
18
|
-
const event = new CustomEvent('editor:sidebar:build-with-template-active-tab', {
|
|
19
|
-
bubbles: true,
|
|
20
|
-
detail: {
|
|
21
|
-
value
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
window.dispatchEvent(event);
|
|
25
|
-
};
|
|
26
15
|
const handleClickGenerate = (e)=>{
|
|
27
16
|
const event = new CustomEvent('editor:sidebar:click-img-to-layout-gallery-btn', e);
|
|
28
17
|
window.dispatchEvent(event);
|
|
@@ -111,30 +100,22 @@ const DropElement = ()=>{
|
|
|
111
100
|
children: [
|
|
112
101
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
113
102
|
className: "gp-text-16 gp-font-medium gp-mb-4 gp-text-[#212121]",
|
|
114
|
-
children:
|
|
103
|
+
children: "Start with Sections from sidebar"
|
|
115
104
|
}),
|
|
116
105
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
117
|
-
className: "gp-flex gp-
|
|
106
|
+
className: "gp-flex gp-w-[291px] gp-justify-between",
|
|
118
107
|
children: [
|
|
119
108
|
/*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
120
109
|
"data-button-add-section": true,
|
|
121
|
-
onClick: ()=>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
} else dispatchEventBuildWithSectionActiveTab(true);
|
|
125
|
-
},
|
|
126
|
-
className: "gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#1C1C1C] gp-text-[14px] gp-text-white hover:gp-bg-[#3B3B3B]",
|
|
127
|
-
children: editingPageType === 'GP_FUNNEL_PAGE' ? 'Use existing page designs' : 'Add sections'
|
|
110
|
+
onClick: ()=>dispatchEventBuildWithSectionActiveTab(true),
|
|
111
|
+
className: "gp-flex gp-h-[40px] gp-w-[136px] gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#1C1C1C] gp-text-[14px] gp-text-white hover:gp-bg-[#3B3B3B]",
|
|
112
|
+
children: "Add sections"
|
|
128
113
|
}),
|
|
129
114
|
/*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
130
115
|
"data-button-add-elements": true,
|
|
131
|
-
onClick: ()=>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
} else dispatchEventBuildWithSectionActiveTab(false);
|
|
135
|
-
},
|
|
136
|
-
className: "gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#f4f4f4] gp-text-[14px] gp-text-[#212121] hover:gp-bg-[#E2E2E2]",
|
|
137
|
-
children: editingPageType === 'GP_FUNNEL_PAGE' ? 'Explore templates' : 'Add elements'
|
|
116
|
+
onClick: ()=>dispatchEventBuildWithSectionActiveTab(false),
|
|
117
|
+
className: "gp-flex gp-h-[40px] gp-w-[136px] gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#f4f4f4] gp-text-[14px] gp-text-[#212121] hover:gp-bg-[#E2E2E2]",
|
|
118
|
+
children: "Add elements"
|
|
138
119
|
})
|
|
139
120
|
]
|
|
140
121
|
}),
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useShopStore } from '@gem-sdk/core';
|
|
3
2
|
|
|
4
3
|
const DropElement = ()=>{
|
|
5
|
-
const editingPageType = useShopStore((s)=>s.pageType);
|
|
6
4
|
const dispatchEventBuildWithSectionActiveTab = (value)=>{
|
|
7
5
|
const event = new CustomEvent('editor:sidebar:build-with-section-active-tab', {
|
|
8
6
|
bubbles: true,
|
|
@@ -12,15 +10,6 @@ const DropElement = ()=>{
|
|
|
12
10
|
});
|
|
13
11
|
window.dispatchEvent(event);
|
|
14
12
|
};
|
|
15
|
-
const dispatchEventBuildWithTemplateActiveTab = (value)=>{
|
|
16
|
-
const event = new CustomEvent('editor:sidebar:build-with-template-active-tab', {
|
|
17
|
-
bubbles: true,
|
|
18
|
-
detail: {
|
|
19
|
-
value
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
window.dispatchEvent(event);
|
|
23
|
-
};
|
|
24
13
|
const handleClickGenerate = (e)=>{
|
|
25
14
|
const event = new CustomEvent('editor:sidebar:click-img-to-layout-gallery-btn', e);
|
|
26
15
|
window.dispatchEvent(event);
|
|
@@ -109,30 +98,22 @@ const DropElement = ()=>{
|
|
|
109
98
|
children: [
|
|
110
99
|
/*#__PURE__*/ jsx("div", {
|
|
111
100
|
className: "gp-text-16 gp-font-medium gp-mb-4 gp-text-[#212121]",
|
|
112
|
-
children:
|
|
101
|
+
children: "Start with Sections from sidebar"
|
|
113
102
|
}),
|
|
114
103
|
/*#__PURE__*/ jsxs("div", {
|
|
115
|
-
className: "gp-flex gp-
|
|
104
|
+
className: "gp-flex gp-w-[291px] gp-justify-between",
|
|
116
105
|
children: [
|
|
117
106
|
/*#__PURE__*/ jsx("button", {
|
|
118
107
|
"data-button-add-section": true,
|
|
119
|
-
onClick: ()=>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} else dispatchEventBuildWithSectionActiveTab(true);
|
|
123
|
-
},
|
|
124
|
-
className: "gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#1C1C1C] gp-text-[14px] gp-text-white hover:gp-bg-[#3B3B3B]",
|
|
125
|
-
children: editingPageType === 'GP_FUNNEL_PAGE' ? 'Use existing page designs' : 'Add sections'
|
|
108
|
+
onClick: ()=>dispatchEventBuildWithSectionActiveTab(true),
|
|
109
|
+
className: "gp-flex gp-h-[40px] gp-w-[136px] gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#1C1C1C] gp-text-[14px] gp-text-white hover:gp-bg-[#3B3B3B]",
|
|
110
|
+
children: "Add sections"
|
|
126
111
|
}),
|
|
127
112
|
/*#__PURE__*/ jsx("button", {
|
|
128
113
|
"data-button-add-elements": true,
|
|
129
|
-
onClick: ()=>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
} else dispatchEventBuildWithSectionActiveTab(false);
|
|
133
|
-
},
|
|
134
|
-
className: "gp-flex gp-h-[40px] gp-px-6 gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#f4f4f4] gp-text-[14px] gp-text-[#212121] hover:gp-bg-[#E2E2E2]",
|
|
135
|
-
children: editingPageType === 'GP_FUNNEL_PAGE' ? 'Explore templates' : 'Add elements'
|
|
114
|
+
onClick: ()=>dispatchEventBuildWithSectionActiveTab(false),
|
|
115
|
+
className: "gp-flex gp-h-[40px] gp-w-[136px] gp-items-center gp-font-medium gp-justify-center gp-rounded-[8px] gp-bg-[#f4f4f4] gp-text-[14px] gp-text-[#212121] hover:gp-bg-[#E2E2E2]",
|
|
116
|
+
children: "Add elements"
|
|
136
117
|
})
|
|
137
118
|
]
|
|
138
119
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "2.1.13
|
|
3
|
+
"version": "2.1.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"next": "latest"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "2.1.13
|
|
29
|
+
"@gem-sdk/core": "2.1.13",
|
|
30
30
|
"@gem-sdk/plugin-cookie-bar": "2.1.0",
|
|
31
31
|
"@gem-sdk/plugin-quick-view": "2.1.0",
|
|
32
32
|
"@gem-sdk/plugin-sticky-add-to-cart": "2.1.0"
|