@gem-sdk/pages 1.23.0-staging.154 → 1.23.0-staging.157
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.
|
@@ -87,10 +87,14 @@ const Toolbar = ()=>{
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
if ($btnAddTop) {
|
|
90
|
-
|
|
90
|
+
if (!isParent) {
|
|
91
|
+
$btnAddTop.setAttribute('data-toolbar-add-hover', 'true');
|
|
92
|
+
}
|
|
91
93
|
}
|
|
92
94
|
if ($btnAddBottom) {
|
|
93
|
-
|
|
95
|
+
if (!isParent) {
|
|
96
|
+
$btnAddBottom.setAttribute('data-toolbar-add-hover', 'true');
|
|
97
|
+
}
|
|
94
98
|
}
|
|
95
99
|
}, []);
|
|
96
100
|
const setHoverComponentParents = react.useCallback(({ $component, componentUid })=>{
|
|
@@ -207,8 +211,7 @@ const Toolbar = ()=>{
|
|
|
207
211
|
'data-spacing-margin-bottom-active',
|
|
208
212
|
'data-toolbar-force-hover',
|
|
209
213
|
'data-outline-force-hover',
|
|
210
|
-
'data-
|
|
211
|
-
'data-outline-parent-hover'
|
|
214
|
+
'data-toolbar-active-overflow'
|
|
212
215
|
];
|
|
213
216
|
const $elms = document.querySelectorAll(clearAttrs.map((attr)=>`[${attr}]`).join(','));
|
|
214
217
|
if ($elms) {
|
|
@@ -257,36 +260,6 @@ const Toolbar = ()=>{
|
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
262
|
}, []);
|
|
260
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
261
|
-
react.useCallback(($component, value)=>{
|
|
262
|
-
const $section = $component.closest('[data-toolbar-wrap][data-component-tag="Section"]');
|
|
263
|
-
if ($section) {
|
|
264
|
-
if (value) {
|
|
265
|
-
const $toolbar = getChildrenByAttrSelector($section, 'data-toolbar');
|
|
266
|
-
const $outline = getChildrenByAttrSelector($section, 'data-outline');
|
|
267
|
-
if ($toolbar) {
|
|
268
|
-
$toolbar.setAttribute('data-toolbar-force-hover', 'true');
|
|
269
|
-
changePositionToolbar({
|
|
270
|
-
$toolbar,
|
|
271
|
-
$component,
|
|
272
|
-
state: 'hover'
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
if ($outline) {
|
|
276
|
-
$outline.setAttribute('data-outline-force-hover', 'true');
|
|
277
|
-
}
|
|
278
|
-
} else {
|
|
279
|
-
const $toolbar = getChildrenByAttrSelector($section, 'data-toolbar');
|
|
280
|
-
const $outline = getChildrenByAttrSelector($section, 'data-outline');
|
|
281
|
-
if ($toolbar) {
|
|
282
|
-
$toolbar.removeAttribute('data-toolbar-force-hover');
|
|
283
|
-
}
|
|
284
|
-
if ($outline) {
|
|
285
|
-
$outline.removeAttribute('data-outline-force-hover');
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}, []);
|
|
290
263
|
const setActiveComponent = react.useCallback(async ({ componentUid, productId, timeAwait = 500, forceReActive })=>{
|
|
291
264
|
if (!componentUid) return;
|
|
292
265
|
let $component = await waitForElementToExist(`${productId ? `[data-product-id="${productId}"] ` : ''}[data-uid="${componentUid}"]`, timeAwait);
|
|
@@ -83,10 +83,14 @@ const Toolbar = ()=>{
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
if ($btnAddTop) {
|
|
86
|
-
|
|
86
|
+
if (!isParent) {
|
|
87
|
+
$btnAddTop.setAttribute('data-toolbar-add-hover', 'true');
|
|
88
|
+
}
|
|
87
89
|
}
|
|
88
90
|
if ($btnAddBottom) {
|
|
89
|
-
|
|
91
|
+
if (!isParent) {
|
|
92
|
+
$btnAddBottom.setAttribute('data-toolbar-add-hover', 'true');
|
|
93
|
+
}
|
|
90
94
|
}
|
|
91
95
|
}, []);
|
|
92
96
|
const setHoverComponentParents = useCallback(({ $component, componentUid })=>{
|
|
@@ -203,8 +207,7 @@ const Toolbar = ()=>{
|
|
|
203
207
|
'data-spacing-margin-bottom-active',
|
|
204
208
|
'data-toolbar-force-hover',
|
|
205
209
|
'data-outline-force-hover',
|
|
206
|
-
'data-
|
|
207
|
-
'data-outline-parent-hover'
|
|
210
|
+
'data-toolbar-active-overflow'
|
|
208
211
|
];
|
|
209
212
|
const $elms = document.querySelectorAll(clearAttrs.map((attr)=>`[${attr}]`).join(','));
|
|
210
213
|
if ($elms) {
|
|
@@ -253,36 +256,6 @@ const Toolbar = ()=>{
|
|
|
253
256
|
}
|
|
254
257
|
}
|
|
255
258
|
}, []);
|
|
256
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
257
|
-
useCallback(($component, value)=>{
|
|
258
|
-
const $section = $component.closest('[data-toolbar-wrap][data-component-tag="Section"]');
|
|
259
|
-
if ($section) {
|
|
260
|
-
if (value) {
|
|
261
|
-
const $toolbar = getChildrenByAttrSelector($section, 'data-toolbar');
|
|
262
|
-
const $outline = getChildrenByAttrSelector($section, 'data-outline');
|
|
263
|
-
if ($toolbar) {
|
|
264
|
-
$toolbar.setAttribute('data-toolbar-force-hover', 'true');
|
|
265
|
-
changePositionToolbar({
|
|
266
|
-
$toolbar,
|
|
267
|
-
$component,
|
|
268
|
-
state: 'hover'
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
if ($outline) {
|
|
272
|
-
$outline.setAttribute('data-outline-force-hover', 'true');
|
|
273
|
-
}
|
|
274
|
-
} else {
|
|
275
|
-
const $toolbar = getChildrenByAttrSelector($section, 'data-toolbar');
|
|
276
|
-
const $outline = getChildrenByAttrSelector($section, 'data-outline');
|
|
277
|
-
if ($toolbar) {
|
|
278
|
-
$toolbar.removeAttribute('data-toolbar-force-hover');
|
|
279
|
-
}
|
|
280
|
-
if ($outline) {
|
|
281
|
-
$outline.removeAttribute('data-outline-force-hover');
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}, []);
|
|
286
259
|
const setActiveComponent = useCallback(async ({ componentUid, productId, timeAwait = 500, forceReActive })=>{
|
|
287
260
|
if (!componentUid) return;
|
|
288
261
|
let $component = await waitForElementToExist(`${productId ? `[data-product-id="${productId}"] ` : ''}[data-uid="${componentUid}"]`, timeAwait);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.23.0-staging.
|
|
3
|
+
"version": "1.23.0-staging.157",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"next-seo": "^6.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "1.23.0-staging.
|
|
28
|
+
"@gem-sdk/core": "1.23.0-staging.157",
|
|
29
29
|
"@gem-sdk/plugin-cookie-bar": "1.23.0-staging.26",
|
|
30
30
|
"@gem-sdk/plugin-quick-view": "1.23.0-staging.26",
|
|
31
31
|
"@gem-sdk/plugin-sticky-add-to-cart": "1.23.0-staging.26"
|