@gem-sdk/core 1.56.0-staging.39 → 1.56.0-staging.46
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 +9 -10
- package/dist/cjs/components/InteractionSuffix.js +15 -27
- package/dist/cjs/helpers/interaction/index.js +21 -1
- package/dist/cjs/index.js +2 -0
- package/dist/esm/components/ComponentToolbarPreview.js +9 -10
- package/dist/esm/components/InteractionSuffix.js +15 -27
- package/dist/esm/helpers/interaction/index.js +21 -1
- package/dist/esm/index.js +1 -0
- package/dist/types/index.d.ts +9 -1
- package/package.json +2 -2
|
@@ -386,9 +386,9 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
386
386
|
fill: "none",
|
|
387
387
|
xmlns: "http://www.w3.org/2000/svg",
|
|
388
388
|
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
d: "M4.
|
|
389
|
+
"fill-rule": "evenodd",
|
|
390
|
+
"clip-rule": "evenodd",
|
|
391
|
+
d: "M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",
|
|
392
392
|
fill: "#F9F9F9"
|
|
393
393
|
})
|
|
394
394
|
})
|
|
@@ -396,15 +396,15 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
396
396
|
isShowIconInteractionTarget && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
397
397
|
className: "gp-hidden gp-w-[14px] interaction-use-custom-element",
|
|
398
398
|
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
399
|
-
width: "
|
|
400
|
-
height: "
|
|
401
|
-
viewBox: "0 0
|
|
399
|
+
width: "16",
|
|
400
|
+
height: "16",
|
|
401
|
+
viewBox: "0 0 16 16",
|
|
402
402
|
fill: "none",
|
|
403
403
|
xmlns: "http://www.w3.org/2000/svg",
|
|
404
404
|
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
d: "
|
|
405
|
+
"fill-rule": "evenodd",
|
|
406
|
+
"clip-rule": "evenodd",
|
|
407
|
+
d: "M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",
|
|
408
408
|
fill: "#F9F9F9"
|
|
409
409
|
})
|
|
410
410
|
})
|
|
@@ -667,7 +667,6 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
667
667
|
]
|
|
668
668
|
}),
|
|
669
669
|
/*#__PURE__*/ jsxRuntime.jsx(InteractionSuffix.InteractionSuffix, {
|
|
670
|
-
tag: props.tag,
|
|
671
670
|
uid: props.uid
|
|
672
671
|
})
|
|
673
672
|
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
4
|
require('zustand');
|
|
5
|
+
require('react');
|
|
6
6
|
require('swr');
|
|
7
7
|
var PageContext = require('../contexts/PageContext.js');
|
|
8
8
|
require('@gem-sdk/adapter-shopify');
|
|
@@ -18,35 +18,23 @@ var index = require('../helpers/interaction/index.js');
|
|
|
18
18
|
require('../helpers/convert.js');
|
|
19
19
|
|
|
20
20
|
const InteractionSuffix = ({ uid })=>{
|
|
21
|
-
const { closeSelectOnPage } = index.useInteraction();
|
|
22
|
-
const
|
|
21
|
+
const { closeSelectOnPage, selectInteractionElement } = index.useInteraction();
|
|
22
|
+
const settingType = PageContext.usePageStore((s)=>s.interactionData?.settingType || '');
|
|
23
23
|
const isSelectOnPage = PageContext.usePageStore((s)=>s.interactionData?.isSelectOnPage);
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
currentInteraction,
|
|
34
|
-
uid
|
|
35
|
-
]);
|
|
36
|
-
const isDisplay = react.useMemo(()=>{
|
|
37
|
-
return isCurrentInteractionTarget || isCurrentInteractionTrigger;
|
|
38
|
-
}, [
|
|
39
|
-
isCurrentInteractionTarget,
|
|
40
|
-
isCurrentInteractionTrigger
|
|
41
|
-
]);
|
|
42
|
-
if (!isDisplay) {
|
|
43
|
-
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
44
|
-
}
|
|
24
|
+
const onClick = (e)=>{
|
|
25
|
+
selectInteractionElement({
|
|
26
|
+
$target: e.target,
|
|
27
|
+
componentUid: uid,
|
|
28
|
+
settingType
|
|
29
|
+
});
|
|
30
|
+
closeSelectOnPage();
|
|
31
|
+
};
|
|
45
32
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
46
33
|
children: isSelectOnPage && /*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
47
|
-
className: "gp-bg-[#F4F4F4] gp-px-2
|
|
48
|
-
onClick:
|
|
49
|
-
|
|
34
|
+
className: "gp-bg-[#F4F4F4] gp-px-2 gp-h-[24px] gp-py-0.5 gp-rounded-lg gp-text-[#212121] gp-text-xs gp-font-medium gp-hidden interaction-use-custom-element ",
|
|
35
|
+
onClick: onClick,
|
|
36
|
+
"data-setup-interaction": true,
|
|
37
|
+
children: settingType === 'TRIGGER' ? 'Set as trigger' : 'Set as target'
|
|
50
38
|
})
|
|
51
39
|
});
|
|
52
40
|
};
|
|
@@ -71,6 +71,24 @@ const useInteraction = ()=>{
|
|
|
71
71
|
});
|
|
72
72
|
window.dispatchEvent(event);
|
|
73
73
|
};
|
|
74
|
+
const changeSelectMode = (mode)=>{
|
|
75
|
+
const event = new CustomEvent('editor:interaction:change-select-mode', {
|
|
76
|
+
bubbles: true,
|
|
77
|
+
detail: mode
|
|
78
|
+
});
|
|
79
|
+
window.dispatchEvent(event);
|
|
80
|
+
};
|
|
81
|
+
const selectInteractionElement = ({ componentUid, settingType, $target })=>{
|
|
82
|
+
const event = new CustomEvent('editor:interaction:select-element', {
|
|
83
|
+
bubbles: true,
|
|
84
|
+
detail: {
|
|
85
|
+
componentUid,
|
|
86
|
+
settingType,
|
|
87
|
+
$target
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
window.dispatchEvent(event);
|
|
91
|
+
};
|
|
74
92
|
return {
|
|
75
93
|
onListener,
|
|
76
94
|
trigger,
|
|
@@ -78,7 +96,9 @@ const useInteraction = ()=>{
|
|
|
78
96
|
closeSelectOnPage,
|
|
79
97
|
ref,
|
|
80
98
|
findElementIncludingSelf,
|
|
81
|
-
getInteractionPreviousData
|
|
99
|
+
getInteractionPreviousData,
|
|
100
|
+
changeSelectMode,
|
|
101
|
+
selectInteractionElement
|
|
82
102
|
};
|
|
83
103
|
};
|
|
84
104
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -62,6 +62,7 @@ var isDefined = require('./helpers/is-defined.js');
|
|
|
62
62
|
var layout = require('./helpers/layout.js');
|
|
63
63
|
var makeStyle = require('./helpers/make-style.js');
|
|
64
64
|
var align = require('./helpers/align.js');
|
|
65
|
+
var variant = require('./helpers/variant.js');
|
|
65
66
|
var product = require('./helpers/product.js');
|
|
66
67
|
var query = require('./helpers/query.js');
|
|
67
68
|
var radius = require('./helpers/radius.js');
|
|
@@ -249,6 +250,7 @@ exports.makeStyleState = makeStyle.makeStyleState;
|
|
|
249
250
|
exports.makeWidth = makeStyle.makeWidth;
|
|
250
251
|
exports.removeNullUndefined = makeStyle.removeNullUndefined;
|
|
251
252
|
exports.convertTextAlignToJustify = align.convertTextAlignToJustify;
|
|
253
|
+
exports.checkInStock = variant.checkInStock;
|
|
252
254
|
exports.checkAvailableVariantInStock = product.checkAvailableVariantInStock;
|
|
253
255
|
exports.getSelectedVariant = product.getSelectedVariant;
|
|
254
256
|
exports.parseSelectedOption = product.parseSelectedOption;
|
|
@@ -382,9 +382,9 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
382
382
|
fill: "none",
|
|
383
383
|
xmlns: "http://www.w3.org/2000/svg",
|
|
384
384
|
children: /*#__PURE__*/ jsx("path", {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
d: "M4.
|
|
385
|
+
"fill-rule": "evenodd",
|
|
386
|
+
"clip-rule": "evenodd",
|
|
387
|
+
d: "M4.36799 0.430523C4.51596 0.205675 4.76709 0.0703125 5.03626 0.0703125H9.88576C10.2042 0.0703125 10.395 0.424378 10.2198 0.69034L8.36968 3.4992C8.28209 3.63218 8.37747 3.80922 8.53671 3.80922H10.749C11.1111 3.80922 11.2869 4.25204 11.0233 4.50036L3.03971 12.0217C2.7572 12.2878 2.29932 12.0361 2.37262 11.655L3.27994 6.93698C3.30366 6.81364 3.20915 6.69921 3.08354 6.69921H0.984651C0.66625 6.69921 0.475479 6.34529 0.650515 6.07932L4.36799 0.430523Z",
|
|
388
388
|
fill: "#F9F9F9"
|
|
389
389
|
})
|
|
390
390
|
})
|
|
@@ -392,15 +392,15 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
392
392
|
isShowIconInteractionTarget && /*#__PURE__*/ jsx("div", {
|
|
393
393
|
className: "gp-hidden gp-w-[14px] interaction-use-custom-element",
|
|
394
394
|
children: /*#__PURE__*/ jsx("svg", {
|
|
395
|
-
width: "
|
|
396
|
-
height: "
|
|
397
|
-
viewBox: "0 0
|
|
395
|
+
width: "16",
|
|
396
|
+
height: "16",
|
|
397
|
+
viewBox: "0 0 16 16",
|
|
398
398
|
fill: "none",
|
|
399
399
|
xmlns: "http://www.w3.org/2000/svg",
|
|
400
400
|
children: /*#__PURE__*/ jsx("path", {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
d: "
|
|
401
|
+
"fill-rule": "evenodd",
|
|
402
|
+
"clip-rule": "evenodd",
|
|
403
|
+
d: "M7.32785 3.66159C7.87459 3.58351 8.25451 3.077 8.17643 2.53026C8.09836 1.98353 7.59184 1.6036 7.0451 1.68168C3.92866 2.12673 1.5332 4.80488 1.5332 8.04424C1.5332 11.594 4.41085 14.4716 7.9606 14.4716C11.1706 14.4716 13.8294 12.1194 14.3105 9.04446C14.3959 8.49881 14.0227 7.98727 13.4771 7.9019C12.9314 7.81654 12.4199 8.18967 12.3345 8.73531C12.0034 10.852 10.1702 12.4716 7.9606 12.4716C5.51541 12.4716 3.5332 10.4894 3.5332 8.04424C3.5332 5.81431 5.18273 3.96793 7.32785 3.66159ZM10.3432 1.97548C10.6232 1.69551 11.102 1.83654 11.1855 2.22355L11.6106 4.19339C11.6313 4.28936 11.7063 4.36432 11.8023 4.38503L13.7721 4.81013C14.1591 4.89365 14.3001 5.37247 14.0202 5.65243L12.3432 7.32945C12.1244 7.54819 11.8168 7.65338 11.5099 7.61436L10.1528 7.44178C9.84592 7.40276 9.53827 7.50795 9.31953 7.72669L8.66719 8.37903C8.35477 8.69145 7.86633 8.70954 7.57623 8.41943C7.28613 8.12933 7.30421 7.64089 7.61663 7.32847L8.26898 6.67613C8.48771 6.45739 8.5929 6.14974 8.55388 5.84287L8.38131 4.48575C8.34228 4.17888 8.44748 3.87123 8.66621 3.6525L10.3432 1.97548ZM8.19853 5.1916C8.35319 5.72179 8.04877 6.27697 7.51858 6.43163C6.83078 6.63226 6.32988 7.2683 6.32988 8.01873C6.32988 8.9316 7.06991 9.67164 7.98279 9.67164C8.73014 9.67164 9.36406 9.17486 9.56743 8.49131C9.72492 7.96195 10.2817 7.6605 10.8111 7.81799C11.3404 7.97548 11.6419 8.53227 11.4844 9.06163C11.0356 10.57 9.63916 11.6716 7.98279 11.6716C5.96535 11.6716 4.32988 10.0362 4.32988 8.01873C4.32988 6.35558 5.44054 4.95445 6.95851 4.51165C7.4887 4.35699 8.04387 4.66141 8.19853 5.1916Z",
|
|
404
404
|
fill: "#F9F9F9"
|
|
405
405
|
})
|
|
406
406
|
})
|
|
@@ -663,7 +663,6 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
663
663
|
]
|
|
664
664
|
}),
|
|
665
665
|
/*#__PURE__*/ jsx(InteractionSuffix, {
|
|
666
|
-
tag: props.tag,
|
|
667
666
|
uid: props.uid
|
|
668
667
|
})
|
|
669
668
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
2
|
import 'zustand';
|
|
3
|
+
import 'react';
|
|
4
4
|
import 'swr';
|
|
5
5
|
import { usePageStore } from '../contexts/PageContext.js';
|
|
6
6
|
import '@gem-sdk/adapter-shopify';
|
|
@@ -16,35 +16,23 @@ import { useInteraction } from '../helpers/interaction/index.js';
|
|
|
16
16
|
import '../helpers/convert.js';
|
|
17
17
|
|
|
18
18
|
const InteractionSuffix = ({ uid })=>{
|
|
19
|
-
const { closeSelectOnPage } = useInteraction();
|
|
20
|
-
const
|
|
19
|
+
const { closeSelectOnPage, selectInteractionElement } = useInteraction();
|
|
20
|
+
const settingType = usePageStore((s)=>s.interactionData?.settingType || '');
|
|
21
21
|
const isSelectOnPage = usePageStore((s)=>s.interactionData?.isSelectOnPage);
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
currentInteraction,
|
|
32
|
-
uid
|
|
33
|
-
]);
|
|
34
|
-
const isDisplay = useMemo(()=>{
|
|
35
|
-
return isCurrentInteractionTarget || isCurrentInteractionTrigger;
|
|
36
|
-
}, [
|
|
37
|
-
isCurrentInteractionTarget,
|
|
38
|
-
isCurrentInteractionTrigger
|
|
39
|
-
]);
|
|
40
|
-
if (!isDisplay) {
|
|
41
|
-
return /*#__PURE__*/ jsx(Fragment, {});
|
|
42
|
-
}
|
|
22
|
+
const onClick = (e)=>{
|
|
23
|
+
selectInteractionElement({
|
|
24
|
+
$target: e.target,
|
|
25
|
+
componentUid: uid,
|
|
26
|
+
settingType
|
|
27
|
+
});
|
|
28
|
+
closeSelectOnPage();
|
|
29
|
+
};
|
|
43
30
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
44
31
|
children: isSelectOnPage && /*#__PURE__*/ jsx("button", {
|
|
45
|
-
className: "gp-bg-[#F4F4F4] gp-px-2
|
|
46
|
-
onClick:
|
|
47
|
-
|
|
32
|
+
className: "gp-bg-[#F4F4F4] gp-px-2 gp-h-[24px] gp-py-0.5 gp-rounded-lg gp-text-[#212121] gp-text-xs gp-font-medium gp-hidden interaction-use-custom-element ",
|
|
33
|
+
onClick: onClick,
|
|
34
|
+
"data-setup-interaction": true,
|
|
35
|
+
children: settingType === 'TRIGGER' ? 'Set as trigger' : 'Set as target'
|
|
48
36
|
})
|
|
49
37
|
});
|
|
50
38
|
};
|
|
@@ -69,6 +69,24 @@ const useInteraction = ()=>{
|
|
|
69
69
|
});
|
|
70
70
|
window.dispatchEvent(event);
|
|
71
71
|
};
|
|
72
|
+
const changeSelectMode = (mode)=>{
|
|
73
|
+
const event = new CustomEvent('editor:interaction:change-select-mode', {
|
|
74
|
+
bubbles: true,
|
|
75
|
+
detail: mode
|
|
76
|
+
});
|
|
77
|
+
window.dispatchEvent(event);
|
|
78
|
+
};
|
|
79
|
+
const selectInteractionElement = ({ componentUid, settingType, $target })=>{
|
|
80
|
+
const event = new CustomEvent('editor:interaction:select-element', {
|
|
81
|
+
bubbles: true,
|
|
82
|
+
detail: {
|
|
83
|
+
componentUid,
|
|
84
|
+
settingType,
|
|
85
|
+
$target
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
window.dispatchEvent(event);
|
|
89
|
+
};
|
|
72
90
|
return {
|
|
73
91
|
onListener,
|
|
74
92
|
trigger,
|
|
@@ -76,7 +94,9 @@ const useInteraction = ()=>{
|
|
|
76
94
|
closeSelectOnPage,
|
|
77
95
|
ref,
|
|
78
96
|
findElementIncludingSelf,
|
|
79
|
-
getInteractionPreviousData
|
|
97
|
+
getInteractionPreviousData,
|
|
98
|
+
changeSelectMode,
|
|
99
|
+
selectInteractionElement
|
|
80
100
|
};
|
|
81
101
|
};
|
|
82
102
|
|
package/dist/esm/index.js
CHANGED
|
@@ -63,6 +63,7 @@ export { isDefined } from './helpers/is-defined.js';
|
|
|
63
63
|
export { composeGridLayout, convertOldLayout, gridToArrayRegex, optionLayoutStyle } from './helpers/layout.js';
|
|
64
64
|
export { makeAspectRatio, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined } from './helpers/make-style.js';
|
|
65
65
|
export { convertTextAlignToJustify } from './helpers/align.js';
|
|
66
|
+
export { checkInStock } from './helpers/variant.js';
|
|
66
67
|
export { checkAvailableVariantInStock, getSelectedVariant, parseSelectedOption } from './helpers/product.js';
|
|
67
68
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
68
69
|
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -38043,6 +38043,8 @@ declare const convertOldLayout: (layout?: ObjectDevices<string>) => ObjectDevice
|
|
|
38043
38043
|
|
|
38044
38044
|
declare const convertTextAlignToJustify: (align: Partial<Record<NameDevices$1, AlignProp>> | undefined) => Record<string, boolean>;
|
|
38045
38045
|
|
|
38046
|
+
declare function checkInStock(variant?: VariantSelectFragment, product?: ProductSelectFragment): boolean;
|
|
38047
|
+
|
|
38046
38048
|
declare function getSelectedVariant(variants?: Maybe$1<VariantSelectFragment>[], choices?: Record<string, string>, variantId?: string | null): Maybe$1<VariantSelectFragment>;
|
|
38047
38049
|
declare function parseSelectedOption(options: SelectedOption$1[]): SelectedOption$1 | undefined;
|
|
38048
38050
|
declare function checkAvailableVariantInStock(variants: Maybe$1<VariantSelectFragment>[] | undefined, optionId: string, optionValue: string): boolean;
|
|
@@ -41552,6 +41554,12 @@ declare const useInteraction: () => {
|
|
|
41552
41554
|
previousData: any;
|
|
41553
41555
|
interactionDataJson: any;
|
|
41554
41556
|
};
|
|
41557
|
+
changeSelectMode: (mode: 'ELEMENT' | 'PAGE') => void;
|
|
41558
|
+
selectInteractionElement: ({ componentUid, settingType, $target, }: {
|
|
41559
|
+
componentUid: string;
|
|
41560
|
+
settingType: string;
|
|
41561
|
+
$target: HTMLElement;
|
|
41562
|
+
}) => void;
|
|
41555
41563
|
};
|
|
41556
41564
|
|
|
41557
|
-
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAppBlocks, getAspectRatioGlobalSize, getBgImageByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStyleShadow, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBgColor, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useHasPreSelected, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
41565
|
+
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAppBlocks, getAspectRatioGlobalSize, getBgImageByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStyleShadow, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBgColor, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useHasPreSelected, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.56.0-staging.
|
|
3
|
+
"version": "1.56.0-staging.46",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@gem-sdk/adapter-shopify": "1.56.0-staging.0",
|
|
31
|
-
"@gem-sdk/styles": "1.56.0-staging.
|
|
31
|
+
"@gem-sdk/styles": "1.56.0-staging.46",
|
|
32
32
|
"@types/classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|