@gem-sdk/core 1.23.0-staging.35 → 1.23.0-staging.37
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/dist/cjs/components/ComponentToolbarPreview.js +1 -1
- package/dist/cjs/components/theme-section/CreateThemeSection.js +3 -4
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +3 -2
- package/dist/esm/components/ComponentToolbarPreview.js +1 -1
- package/dist/esm/components/theme-section/CreateThemeSection.js +3 -4
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +3 -2
- package/package.json +2 -2
|
@@ -319,7 +319,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
319
319
|
})
|
|
320
320
|
]
|
|
321
321
|
}, parent.uid)),
|
|
322
|
-
editingPageType !== 'STATIC' && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
|
|
322
|
+
props.tag === 'Section' && !props.isThemeSection && editingPageType !== 'STATIC' && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
|
|
323
323
|
...props
|
|
324
324
|
}),
|
|
325
325
|
props.tag == 'Sticky' && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
@@ -15,15 +15,14 @@ require('../../helpers/convert.js');
|
|
|
15
15
|
const SHOW_TOOLTIP_TIMEOUT = 600;
|
|
16
16
|
const NUMBER_OF_THEME_SECTION_CREATED_TO_SHOW_TOOLTIP = 1;
|
|
17
17
|
const LIMIT_PLANS = [
|
|
18
|
+
'starter',
|
|
18
19
|
'trial',
|
|
19
20
|
'trial2022'
|
|
20
21
|
];
|
|
21
22
|
const CreateThemeSection = ({ ...props })=>{
|
|
22
|
-
const isThemeSection = props.isThemeSection;
|
|
23
23
|
const shopPlan = ShopContext.useShopStore((s)=>s.plan);
|
|
24
24
|
const createThemeSectionCount = ShopContext.useShopStore((s)=>s.createThemeSectionCount);
|
|
25
25
|
const isLimit = LIMIT_PLANS.includes(shopPlan ?? '');
|
|
26
|
-
const isRenderCreateThemeSection = props.tag === 'Section' && !isThemeSection;
|
|
27
26
|
const isRenderTooltip = isLimit || createThemeSectionCount === undefined || createThemeSectionCount < NUMBER_OF_THEME_SECTION_CREATED_TO_SHOW_TOOLTIP;
|
|
28
27
|
const timeoutRef = react.useRef();
|
|
29
28
|
const [isShowTooltip, setIsShowTooltip] = react.useState(false);
|
|
@@ -71,11 +70,11 @@ const CreateThemeSection = ({ ...props })=>{
|
|
|
71
70
|
onMouseEnter: showTooltip,
|
|
72
71
|
onMouseLeave: hideTooltip,
|
|
73
72
|
children: [
|
|
74
|
-
|
|
73
|
+
isRenderTooltip && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
75
74
|
"data-toolbar-create-theme-section": true,
|
|
76
75
|
children: "You can create reusable sections"
|
|
77
76
|
}),
|
|
78
|
-
|
|
77
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
79
78
|
"data-toolbar-active-create-theme-section-wrapper": true,
|
|
80
79
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
81
80
|
"data-toolbar-active-create-theme-section": true,
|
|
@@ -29,8 +29,9 @@ const transitions = {
|
|
|
29
29
|
};
|
|
30
30
|
const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter, onMouseLeave, onActions })=>{
|
|
31
31
|
const nodeRef = react.useRef(null);
|
|
32
|
+
const actionBtnLabel = isLimit ? 'Upgrade to create Theme Section' : 'Create Theme Section';
|
|
32
33
|
const openHelpCenter = ()=>{
|
|
33
|
-
const url = '
|
|
34
|
+
const url = 'https://help.gempages.net/articles/theme-section';
|
|
34
35
|
window.open(url, '_blank');
|
|
35
36
|
};
|
|
36
37
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -80,7 +81,7 @@ const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter
|
|
|
80
81
|
children: [
|
|
81
82
|
/*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
82
83
|
onClick: (e)=>onActions(e),
|
|
83
|
-
children:
|
|
84
|
+
children: actionBtnLabel
|
|
84
85
|
}),
|
|
85
86
|
isLimit && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
86
87
|
onClick: openHelpCenter,
|
|
@@ -317,7 +317,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
317
317
|
})
|
|
318
318
|
]
|
|
319
319
|
}, parent.uid)),
|
|
320
|
-
editingPageType !== 'STATIC' && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
|
|
320
|
+
props.tag === 'Section' && !props.isThemeSection && editingPageType !== 'STATIC' && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
|
|
321
321
|
...props
|
|
322
322
|
}),
|
|
323
323
|
props.tag == 'Sticky' && /*#__PURE__*/ jsx("div", {
|
|
@@ -13,15 +13,14 @@ import '../../helpers/convert.js';
|
|
|
13
13
|
const SHOW_TOOLTIP_TIMEOUT = 600;
|
|
14
14
|
const NUMBER_OF_THEME_SECTION_CREATED_TO_SHOW_TOOLTIP = 1;
|
|
15
15
|
const LIMIT_PLANS = [
|
|
16
|
+
'starter',
|
|
16
17
|
'trial',
|
|
17
18
|
'trial2022'
|
|
18
19
|
];
|
|
19
20
|
const CreateThemeSection = ({ ...props })=>{
|
|
20
|
-
const isThemeSection = props.isThemeSection;
|
|
21
21
|
const shopPlan = useShopStore((s)=>s.plan);
|
|
22
22
|
const createThemeSectionCount = useShopStore((s)=>s.createThemeSectionCount);
|
|
23
23
|
const isLimit = LIMIT_PLANS.includes(shopPlan ?? '');
|
|
24
|
-
const isRenderCreateThemeSection = props.tag === 'Section' && !isThemeSection;
|
|
25
24
|
const isRenderTooltip = isLimit || createThemeSectionCount === undefined || createThemeSectionCount < NUMBER_OF_THEME_SECTION_CREATED_TO_SHOW_TOOLTIP;
|
|
26
25
|
const timeoutRef = useRef();
|
|
27
26
|
const [isShowTooltip, setIsShowTooltip] = useState(false);
|
|
@@ -69,11 +68,11 @@ const CreateThemeSection = ({ ...props })=>{
|
|
|
69
68
|
onMouseEnter: showTooltip,
|
|
70
69
|
onMouseLeave: hideTooltip,
|
|
71
70
|
children: [
|
|
72
|
-
|
|
71
|
+
isRenderTooltip && /*#__PURE__*/ jsx("div", {
|
|
73
72
|
"data-toolbar-create-theme-section": true,
|
|
74
73
|
children: "You can create reusable sections"
|
|
75
74
|
}),
|
|
76
|
-
|
|
75
|
+
/*#__PURE__*/ jsx("div", {
|
|
77
76
|
"data-toolbar-active-create-theme-section-wrapper": true,
|
|
78
77
|
children: /*#__PURE__*/ jsxs("div", {
|
|
79
78
|
"data-toolbar-active-create-theme-section": true,
|
|
@@ -27,8 +27,9 @@ const transitions = {
|
|
|
27
27
|
};
|
|
28
28
|
const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter, onMouseLeave, onActions })=>{
|
|
29
29
|
const nodeRef = useRef(null);
|
|
30
|
+
const actionBtnLabel = isLimit ? 'Upgrade to create Theme Section' : 'Create Theme Section';
|
|
30
31
|
const openHelpCenter = ()=>{
|
|
31
|
-
const url = '
|
|
32
|
+
const url = 'https://help.gempages.net/articles/theme-section';
|
|
32
33
|
window.open(url, '_blank');
|
|
33
34
|
};
|
|
34
35
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
@@ -78,7 +79,7 @@ const ThemeSectionTooltip = ({ isShow, isLimit, isRender, children, onMouseEnter
|
|
|
78
79
|
children: [
|
|
79
80
|
/*#__PURE__*/ jsx("button", {
|
|
80
81
|
onClick: (e)=>onActions(e),
|
|
81
|
-
children:
|
|
82
|
+
children: actionBtnLabel
|
|
82
83
|
}),
|
|
83
84
|
isLimit && /*#__PURE__*/ jsx("div", {
|
|
84
85
|
onClick: openHelpCenter,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.23.0-staging.
|
|
3
|
+
"version": "1.23.0-staging.37",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@gem-sdk/adapter-shopify": "1.23.0-staging.26",
|
|
28
|
-
"@gem-sdk/styles": "1.23.0-staging.
|
|
28
|
+
"@gem-sdk/styles": "1.23.0-staging.37"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"react-error-boundary": "4.0.10",
|