@gem-sdk/core 1.40.2 → 1.41.0-dev.14
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 +43 -5
- package/dist/cjs/components/ComponentWrapperPreview.js +43 -1
- package/dist/cjs/components/Render.liquid.js +6 -6
- package/dist/cjs/contexts/BuilderPreviewContext.js +6 -5
- package/dist/cjs/graphql/fragments/product-little.generated.js +9 -0
- package/dist/cjs/graphql/fragments/product.generated.js +9 -0
- package/dist/cjs/graphql/queries/products.generated.js +9 -0
- package/dist/cjs/helpers/GlobalEvent.js +7 -7
- package/dist/cjs/helpers/queries/get-products.js +24 -0
- package/dist/cjs/helpers/size.js +13 -0
- package/dist/cjs/hooks/shop/use-products-query.js +10 -0
- package/dist/cjs/index.js +2 -0
- package/dist/esm/components/ComponentToolbarPreview.js +43 -5
- package/dist/esm/components/ComponentWrapperPreview.js +43 -1
- package/dist/esm/components/Render.liquid.js +6 -6
- package/dist/esm/contexts/BuilderPreviewContext.js +6 -5
- package/dist/esm/graphql/fragments/product-little.generated.js +9 -0
- package/dist/esm/graphql/fragments/product.generated.js +9 -0
- package/dist/esm/graphql/queries/products.generated.js +9 -0
- package/dist/esm/helpers/GlobalEvent.js +7 -7
- package/dist/esm/helpers/queries/get-products.js +24 -1
- package/dist/esm/helpers/size.js +13 -1
- package/dist/esm/hooks/shop/use-products-query.js +11 -2
- package/dist/esm/index.js +2 -2
- package/dist/types/index.d.ts +69 -14
- package/package.json +3 -3
|
@@ -30,6 +30,7 @@ const isSection = (el)=>{
|
|
|
30
30
|
};
|
|
31
31
|
const ComponentToolbarPreview = (props)=>{
|
|
32
32
|
const isThemeSection = props.isThemeSection;
|
|
33
|
+
const isShopifySection = props.isShopifySection;
|
|
33
34
|
const editingPageType = ShopContext.useShopStore((s)=>s.pageType);
|
|
34
35
|
const getParents = BuilderPreviewContext.useBuilderPreviewStore((s)=>s.getParents);
|
|
35
36
|
const root = BuilderPreviewContext.useBuilderPreviewStore((s)=>s.getItem('ROOT'));
|
|
@@ -175,7 +176,8 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
175
176
|
bubbles: true,
|
|
176
177
|
detail: {
|
|
177
178
|
componentUid: props.uid,
|
|
178
|
-
isThemeSection
|
|
179
|
+
isThemeSection,
|
|
180
|
+
isShopifySection
|
|
179
181
|
}
|
|
180
182
|
});
|
|
181
183
|
window.dispatchEvent(event);
|
|
@@ -191,7 +193,8 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
191
193
|
bubbles: true,
|
|
192
194
|
detail: {
|
|
193
195
|
componentUid: props.uid,
|
|
194
|
-
isThemeSection
|
|
196
|
+
isThemeSection,
|
|
197
|
+
isShopifySection
|
|
195
198
|
}
|
|
196
199
|
});
|
|
197
200
|
window.dispatchEvent(event);
|
|
@@ -240,6 +243,9 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
240
243
|
return false;
|
|
241
244
|
};
|
|
242
245
|
const getSectionName = ()=>{
|
|
246
|
+
if (isShopifySection) {
|
|
247
|
+
return `Shopify section: ${props.name}`;
|
|
248
|
+
}
|
|
243
249
|
const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
|
|
244
250
|
if (getSectionNumber() >= SECTION_LIMIT - 5) {
|
|
245
251
|
return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
|
|
@@ -256,6 +262,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
256
262
|
"data-toolbar": true,
|
|
257
263
|
"data-toolbar-section": props.tag == 'Section',
|
|
258
264
|
"data-toolbar-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
|
|
265
|
+
"data-toolbar-shopify-section": props.tag == 'Section' && !!isShopifySection,
|
|
259
266
|
"data-toolbar-limit": getIndexSection() >= SECTION_LIMIT,
|
|
260
267
|
children: [
|
|
261
268
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
@@ -298,9 +305,39 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
298
305
|
]
|
|
299
306
|
})
|
|
300
307
|
}),
|
|
301
|
-
props.tag == 'Section' ? /*#__PURE__*/ jsxRuntime.
|
|
308
|
+
props.tag == 'Section' ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
302
309
|
"data-toolbar-name": true,
|
|
303
|
-
children:
|
|
310
|
+
children: [
|
|
311
|
+
getSectionName(),
|
|
312
|
+
props.isShopifySection && !props.isShopifyVisibility && /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
313
|
+
"data-toolbar-visibility": true,
|
|
314
|
+
width: "20",
|
|
315
|
+
height: "20",
|
|
316
|
+
viewBox: "0 0 20 20",
|
|
317
|
+
fill: "none",
|
|
318
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
319
|
+
children: [
|
|
320
|
+
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
321
|
+
fillRule: "evenodd",
|
|
322
|
+
clipRule: "evenodd",
|
|
323
|
+
d: "M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",
|
|
324
|
+
fill: "#F9F9F9"
|
|
325
|
+
}),
|
|
326
|
+
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
327
|
+
fillRule: "evenodd",
|
|
328
|
+
clipRule: "evenodd",
|
|
329
|
+
d: "M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",
|
|
330
|
+
fill: "#F9F9F9"
|
|
331
|
+
}),
|
|
332
|
+
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
333
|
+
fillRule: "evenodd",
|
|
334
|
+
clipRule: "evenodd",
|
|
335
|
+
d: "M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",
|
|
336
|
+
fill: "#F9F9F9"
|
|
337
|
+
})
|
|
338
|
+
]
|
|
339
|
+
})
|
|
340
|
+
]
|
|
304
341
|
}) : /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
305
342
|
"data-toolbar-name": true,
|
|
306
343
|
children: toolbarName()
|
|
@@ -380,7 +417,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
380
417
|
]
|
|
381
418
|
}, parent.uid);
|
|
382
419
|
}),
|
|
383
|
-
props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
|
|
420
|
+
props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && !props.isShopifySection && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsxRuntime.jsx(CreateThemeSection.CreateThemeSection, {
|
|
384
421
|
...props
|
|
385
422
|
}),
|
|
386
423
|
props.tag == 'Sticky' && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
@@ -454,6 +491,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
454
491
|
"data-outline": true,
|
|
455
492
|
"data-outline-section": props.tag == 'Section',
|
|
456
493
|
"data-outline-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
|
|
494
|
+
"data-outline-shopify-section": props.tag == 'Section' && !!isShopifySection,
|
|
457
495
|
"data-outline-limit": getIndexSection() >= SECTION_LIMIT
|
|
458
496
|
}, 'outline-' + props.uid),
|
|
459
497
|
props.tag == 'Section' && !isThemeSectionEditor && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -16,6 +16,7 @@ require('swr/mutation');
|
|
|
16
16
|
var shop = require('../hooks/shop.js');
|
|
17
17
|
require('vanilla-lazyload');
|
|
18
18
|
require('../hooks/useCartUI.js');
|
|
19
|
+
var cls = require('../helpers/cls.js');
|
|
19
20
|
require('../helpers/convert.js');
|
|
20
21
|
|
|
21
22
|
const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
@@ -41,6 +42,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
41
42
|
if (props.tag === 'Section' && props.isThemeSection) {
|
|
42
43
|
customProps['data-theme-section'] = true;
|
|
43
44
|
}
|
|
45
|
+
if (props.tag === 'Section' && props.isShopifySection) {
|
|
46
|
+
customProps['data-shopify-section'] = true;
|
|
47
|
+
customProps['data-toolbar-wrap'] = true;
|
|
48
|
+
}
|
|
44
49
|
// Build editor configs
|
|
45
50
|
if (props.editorConfigs) {
|
|
46
51
|
const editorConfigs = props.editorConfigs;
|
|
@@ -95,6 +100,40 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
95
100
|
'data-component-label': props.label,
|
|
96
101
|
'data-not-droppable': isNotDroppable(props.tag)
|
|
97
102
|
};
|
|
103
|
+
const ShopifySection = ({ name, visibility })=>{
|
|
104
|
+
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
105
|
+
className: cls.cls('gp-flex gp-items-center gp-justify-center gp-gap-[8px] gp-bg-[#F4F4F4] gp-p-[16px] gp-border gp-border-[#D6D6D6]', {
|
|
106
|
+
'gp-opacity-60': !visibility
|
|
107
|
+
}),
|
|
108
|
+
children: [
|
|
109
|
+
/*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
110
|
+
width: "24",
|
|
111
|
+
height: "24",
|
|
112
|
+
viewBox: "0 0 24 24",
|
|
113
|
+
fill: "none",
|
|
114
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
115
|
+
children: [
|
|
116
|
+
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
117
|
+
d: "M19.1475 5.16194C19.1416 5.1148 19.1197 5.0713 19.0857 5.03911C19.0516 5.00692 19.0076 4.9881 18.9614 4.98597C18.8835 4.98597 17.3469 4.95397 17.3469 4.95397C17.3469 4.95397 16.0588 3.67419 15.9342 3.5311C15.8104 3.40312 15.5619 3.43512 15.4684 3.46711L14.8166 3.67508C14.7361 3.40491 14.6323 3.14259 14.5067 2.89121C14.0566 1.99536 13.3727 1.51544 12.5659 1.51544C12.5044 1.51544 12.4577 1.51544 12.3954 1.53144C12.3642 1.49945 12.3486 1.46745 12.3175 1.45145C11.9608 1.06752 11.5107 0.875552 10.967 0.891549C9.92824 0.923543 8.88772 1.70741 8.03419 3.08318C7.44467 4.05901 6.99453 5.27392 6.8543 6.21776C5.65969 6.6017 4.82087 6.87365 4.79057 6.87365C4.18461 7.06562 4.16903 7.08161 4.09199 7.67351C4.06082 8.12144 2.47754 20.7415 2.47754 20.7415L15.7636 23.1091L21.522 21.6374C21.5064 21.6374 19.1631 5.27392 19.1475 5.16194ZM14.1492 3.89904C13.8062 4.00572 13.4648 4.11772 13.1251 4.23498C13.1251 3.69108 13.0472 2.92321 12.8143 2.28331C13.6064 2.41129 13.9942 3.33914 14.1492 3.89904ZM12.4265 4.44206C11.7279 4.66602 10.9679 4.90598 10.207 5.14594C10.4243 4.29808 10.8277 3.46623 11.3245 2.90632C11.533 2.66965 11.7863 2.47913 12.069 2.34641C12.3806 2.9712 12.4421 3.85105 12.4265 4.44206ZM10.9982 1.61143C11.2466 1.61143 11.4483 1.65942 11.6197 1.7874C11.3127 1.95192 11.0387 2.17444 10.8121 2.44329C10.1455 3.17916 9.63305 4.31408 9.43135 5.4179C8.79423 5.62586 8.17356 5.81783 7.61521 5.9938C7.98744 4.25009 9.39933 1.65942 10.9982 1.61143Z",
|
|
118
|
+
fill: "#95BF47"
|
|
119
|
+
}),
|
|
120
|
+
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
121
|
+
d: "M18.9647 4.94709C18.8851 4.94709 17.3155 4.91503 17.3155 4.91503C17.3155 4.91503 15.9981 3.63242 15.8716 3.48812C15.8261 3.43951 15.7635 3.41074 15.6973 3.40796V23.1094L21.5828 21.6344L19.1709 5.12345C19.1399 5.01122 19.0444 4.94709 18.9647 4.94709Z",
|
|
122
|
+
fill: "#5E8E3E"
|
|
123
|
+
}),
|
|
124
|
+
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
125
|
+
d: "M13.0575 8.51577L12.3029 10.8908C12.3029 10.8908 11.4602 10.5663 10.4599 10.6253C8.98595 10.6991 8.98595 11.4809 8.98595 11.6727C9.07404 12.7348 12.39 12.9709 12.5828 15.4631C12.7238 17.4251 11.3545 18.7675 9.35396 18.8708C6.96778 18.9733 5.65137 17.7939 5.65137 17.7939L6.16032 15.9794C6.16032 15.9794 7.49435 16.8203 8.5465 16.7613C9.23162 16.7318 9.4949 16.245 9.45967 15.9204C9.35396 14.5337 6.65165 14.6223 6.47645 12.3365C6.33551 10.4188 7.82712 8.48626 11.1265 8.30924C12.4076 8.23548 13.0575 8.51577 13.0575 8.51577Z",
|
|
126
|
+
fill: "white"
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
131
|
+
className: "gp-text-[#212121] gp-text-[14px] gp-leading-[24px] gp-font-medium",
|
|
132
|
+
children: name
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
};
|
|
98
137
|
if (constant.disableWrap.includes(props.tag) && /*#__PURE__*/ react.isValidElement(children)) {
|
|
99
138
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
100
139
|
children: [
|
|
@@ -109,7 +148,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
109
148
|
builderAttrs,
|
|
110
149
|
advanced,
|
|
111
150
|
children: [
|
|
112
|
-
|
|
151
|
+
props.isShopifySection ? /*#__PURE__*/ jsxRuntime.jsx(ShopifySection, {
|
|
152
|
+
name: props.name ?? '',
|
|
153
|
+
visibility: !!props.isShopifyVisibility
|
|
154
|
+
}) : children.props['children'],
|
|
113
155
|
/*#__PURE__*/ jsxRuntime.jsx(ComponentToolbarPreview.default, {
|
|
114
156
|
...props
|
|
115
157
|
})
|
|
@@ -219,14 +219,14 @@ const appendAnimation = (props, liquid)=>{
|
|
|
219
219
|
const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
|
|
220
220
|
const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
|
|
221
221
|
if (!enableAnimation) return liquid;
|
|
222
|
-
const
|
|
222
|
+
const getInitVisibility = (device)=>getSettingsByDevice(device)?.enabled && ![
|
|
223
223
|
'shake',
|
|
224
224
|
'none'
|
|
225
|
-
].includes(getAnimationType(getSettingsByDevice(device), 'appear'))
|
|
225
|
+
].includes(getAnimationType(getSettingsByDevice(device), 'appear')) ? 'hidden' : 'visible';
|
|
226
226
|
const opacityObject = {
|
|
227
|
-
desktop:
|
|
228
|
-
tablet:
|
|
229
|
-
mobile:
|
|
227
|
+
desktop: getInitVisibility('desktop'),
|
|
228
|
+
tablet: getInitVisibility('tablet'),
|
|
229
|
+
mobile: getInitVisibility('mobile')
|
|
230
230
|
};
|
|
231
231
|
return render.template`
|
|
232
232
|
<gp-animation
|
|
@@ -240,7 +240,7 @@ const appendAnimation = (props, liquid)=>{
|
|
|
240
240
|
}}"
|
|
241
241
|
>
|
|
242
242
|
<div style="${{
|
|
243
|
-
...makeStyle.makeStyleResponsive('
|
|
243
|
+
...makeStyle.makeStyleResponsive('v', opacityObject),
|
|
244
244
|
display: 'contents'
|
|
245
245
|
}}">${liquid}</div>
|
|
246
246
|
</gp-animation>
|
|
@@ -428,15 +428,16 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>zustand.creat
|
|
|
428
428
|
updateItemAttribute: (id, value, attr)=>{
|
|
429
429
|
if (!attr || ![
|
|
430
430
|
'label',
|
|
431
|
-
'customLabel'
|
|
431
|
+
'customLabel',
|
|
432
|
+
'isShopifyVisibility'
|
|
432
433
|
].includes(attr)) return;
|
|
433
434
|
const state = get().state;
|
|
434
435
|
const item = state[id];
|
|
435
|
-
// Ignore section
|
|
436
|
-
if (item?.type === 'section') return;
|
|
437
436
|
if (item) {
|
|
438
|
-
|
|
439
|
-
|
|
437
|
+
if (item.type !== 'section') {
|
|
438
|
+
const dateModified = Date.now();
|
|
439
|
+
item.dateModified = dateModified;
|
|
440
|
+
}
|
|
440
441
|
const updatedItem = {
|
|
441
442
|
...item,
|
|
442
443
|
[attr]: value
|
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
/* eslint-disable */ const ProductSelect = `
|
|
4
4
|
fragment ProductSelect on Product {
|
|
5
5
|
...ProductLittleSelect
|
|
6
|
+
collections {
|
|
7
|
+
edges {
|
|
8
|
+
node {
|
|
9
|
+
id
|
|
10
|
+
title
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
tags
|
|
6
15
|
medias(first: $firstMedia, after: $afterMedia, orderBy: $orderByMedia) {
|
|
7
16
|
edges {
|
|
8
17
|
cursor
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const globalEvent = {
|
|
6
|
-
subscribe (callback) {
|
|
7
|
-
document.addEventListener(
|
|
6
|
+
subscribe (eventName, callback) {
|
|
7
|
+
document.addEventListener(eventName, (e)=>callback(e.detail));
|
|
8
8
|
},
|
|
9
|
-
dispatch (
|
|
10
|
-
document.dispatchEvent(new CustomEvent(
|
|
11
|
-
detail
|
|
9
|
+
dispatch (eventName, detail) {
|
|
10
|
+
document.dispatchEvent(new CustomEvent(eventName, {
|
|
11
|
+
detail
|
|
12
12
|
}));
|
|
13
13
|
},
|
|
14
|
-
remove (callback) {
|
|
15
|
-
document.removeEventListener(
|
|
14
|
+
remove (eventName, callback) {
|
|
15
|
+
document.removeEventListener(eventName, callback);
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -57,6 +57,29 @@ const getProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelect
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
+
const getProductQueryAll = async (fetcher, arg)=>{
|
|
61
|
+
const limit = arg?.limit || 4;
|
|
62
|
+
delete arg.limit;
|
|
63
|
+
const variables = {
|
|
64
|
+
first: limit,
|
|
65
|
+
firstMedia: 1,
|
|
66
|
+
firstVariant: 1,
|
|
67
|
+
orderBy: {
|
|
68
|
+
field: 'PLATFORM_CREATED_AT',
|
|
69
|
+
direction: 'DESC'
|
|
70
|
+
},
|
|
71
|
+
orderByMedia: {
|
|
72
|
+
field: 'POSITION',
|
|
73
|
+
direction: 'ASC'
|
|
74
|
+
},
|
|
75
|
+
where: {
|
|
76
|
+
status: 'ACTIVE',
|
|
77
|
+
...arg
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const pageData = await fetchProducts(fetcher, variables);
|
|
81
|
+
return pageData;
|
|
82
|
+
};
|
|
60
83
|
const fetchProducts = async (fetcher, variables)=>{
|
|
61
84
|
return fetcher([
|
|
62
85
|
products_generated.ProductsDocument,
|
|
@@ -164,4 +187,5 @@ const mergeMediasToProducts = async ({ fetcher, products, isSample, isStorefront
|
|
|
164
187
|
// );
|
|
165
188
|
// };
|
|
166
189
|
|
|
190
|
+
exports.getProductQueryAll = getProductQueryAll;
|
|
167
191
|
exports.getProducts = getProducts;
|
package/dist/cjs/helpers/size.js
CHANGED
|
@@ -43,6 +43,18 @@ const makeGlobalSize = (globalSize)=>{
|
|
|
43
43
|
gap: getGlobalSizeGap(globalSize)
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
const makeGlobalSizeIcon = (globalSize)=>{
|
|
47
|
+
return {
|
|
48
|
+
width: makeStyleWithDefault('w', getWidthHeightGlobalSize('width', globalSize), {
|
|
49
|
+
desktop: '--g-ct-w',
|
|
50
|
+
tablet: '--g-ct-w',
|
|
51
|
+
mobile: '--g-ct-w'
|
|
52
|
+
}),
|
|
53
|
+
height: makeStyle.makeStyleResponsive('h', getWidthHeightGlobalSize('width', globalSize)),
|
|
54
|
+
minWidth: makeStyle.makeStyleResponsive('minw', getWidthHeightGlobalSize('width', globalSize)),
|
|
55
|
+
padding: getPaddingGlobalSize(globalSize)
|
|
56
|
+
};
|
|
57
|
+
};
|
|
46
58
|
const getGlobalSizeGap = (globalSize)=>{
|
|
47
59
|
return {
|
|
48
60
|
'--gg': globalSize?.desktop?.gap,
|
|
@@ -180,4 +192,5 @@ exports.getPaddingGlobalSize = getPaddingGlobalSize;
|
|
|
180
192
|
exports.getWidthByShapeGlobalSize = getWidthByShapeGlobalSize;
|
|
181
193
|
exports.getWidthHeightGlobalSize = getWidthHeightGlobalSize;
|
|
182
194
|
exports.makeGlobalSize = makeGlobalSize;
|
|
195
|
+
exports.makeGlobalSizeIcon = makeGlobalSizeIcon;
|
|
183
196
|
exports.makeStyleWithDefault = makeStyleWithDefault;
|
|
@@ -20,5 +20,15 @@ const useProductsQuery = (ids, options, params)=>{
|
|
|
20
20
|
return getProducts.getProducts(params?.fetcher || fetcher, arg);
|
|
21
21
|
}, options);
|
|
22
22
|
};
|
|
23
|
+
const useProductsQueryAll = (variable, options)=>{
|
|
24
|
+
const fetcher = useFetchHandle.useFetchHandle();
|
|
25
|
+
return useSWR(variable ? [
|
|
26
|
+
'query/products',
|
|
27
|
+
variable
|
|
28
|
+
] : null, async ([, arg])=>{
|
|
29
|
+
return getProducts.getProductQueryAll(fetcher, arg);
|
|
30
|
+
}, options);
|
|
31
|
+
};
|
|
23
32
|
|
|
24
33
|
exports.useProductsQuery = useProductsQuery;
|
|
34
|
+
exports.useProductsQueryAll = useProductsQueryAll;
|
package/dist/cjs/index.js
CHANGED
|
@@ -258,6 +258,7 @@ exports.getPaddingGlobalSize = size.getPaddingGlobalSize;
|
|
|
258
258
|
exports.getWidthByShapeGlobalSize = size.getWidthByShapeGlobalSize;
|
|
259
259
|
exports.getWidthHeightGlobalSize = size.getWidthHeightGlobalSize;
|
|
260
260
|
exports.makeGlobalSize = size.makeGlobalSize;
|
|
261
|
+
exports.makeGlobalSizeIcon = size.makeGlobalSizeIcon;
|
|
261
262
|
exports.makeStyleWithDefault = size.makeStyleWithDefault;
|
|
262
263
|
exports.composeFallbackTypographyStyle = typography.composeFallbackTypographyStyle;
|
|
263
264
|
exports.composeTypography = typography.composeTypography;
|
|
@@ -301,6 +302,7 @@ exports.useCollectionQuery = useCollectionQuery.useCollectionQuery;
|
|
|
301
302
|
exports.useCollectionsQuery = useCollectionsQuery.useCollectionsQuery;
|
|
302
303
|
exports.useProductQuery = useProductQuery.useProductQuery;
|
|
303
304
|
exports.useProductsQuery = useProductsQuery.useProductsQuery;
|
|
305
|
+
exports.useProductsQueryAll = useProductsQuery.useProductsQueryAll;
|
|
304
306
|
exports.useCurrentDevice = useCurrentDevice.useCurrentDevice;
|
|
305
307
|
exports.shopifyPriceRounding = useFormatMoney.shopifyPriceRounding;
|
|
306
308
|
exports.useFormatMoney = useFormatMoney.useFormatMoney;
|
|
@@ -26,6 +26,7 @@ const isSection = (el)=>{
|
|
|
26
26
|
};
|
|
27
27
|
const ComponentToolbarPreview = (props)=>{
|
|
28
28
|
const isThemeSection = props.isThemeSection;
|
|
29
|
+
const isShopifySection = props.isShopifySection;
|
|
29
30
|
const editingPageType = useShopStore((s)=>s.pageType);
|
|
30
31
|
const getParents = useBuilderPreviewStore((s)=>s.getParents);
|
|
31
32
|
const root = useBuilderPreviewStore((s)=>s.getItem('ROOT'));
|
|
@@ -171,7 +172,8 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
171
172
|
bubbles: true,
|
|
172
173
|
detail: {
|
|
173
174
|
componentUid: props.uid,
|
|
174
|
-
isThemeSection
|
|
175
|
+
isThemeSection,
|
|
176
|
+
isShopifySection
|
|
175
177
|
}
|
|
176
178
|
});
|
|
177
179
|
window.dispatchEvent(event);
|
|
@@ -187,7 +189,8 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
187
189
|
bubbles: true,
|
|
188
190
|
detail: {
|
|
189
191
|
componentUid: props.uid,
|
|
190
|
-
isThemeSection
|
|
192
|
+
isThemeSection,
|
|
193
|
+
isShopifySection
|
|
191
194
|
}
|
|
192
195
|
});
|
|
193
196
|
window.dispatchEvent(event);
|
|
@@ -236,6 +239,9 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
236
239
|
return false;
|
|
237
240
|
};
|
|
238
241
|
const getSectionName = ()=>{
|
|
242
|
+
if (isShopifySection) {
|
|
243
|
+
return `Shopify section: ${props.name}`;
|
|
244
|
+
}
|
|
239
245
|
const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
|
|
240
246
|
if (getSectionNumber() >= SECTION_LIMIT - 5) {
|
|
241
247
|
return `${checkRenamedSection ? 'Section' : props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
|
|
@@ -252,6 +258,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
252
258
|
"data-toolbar": true,
|
|
253
259
|
"data-toolbar-section": props.tag == 'Section',
|
|
254
260
|
"data-toolbar-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
|
|
261
|
+
"data-toolbar-shopify-section": props.tag == 'Section' && !!isShopifySection,
|
|
255
262
|
"data-toolbar-limit": getIndexSection() >= SECTION_LIMIT,
|
|
256
263
|
children: [
|
|
257
264
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -294,9 +301,39 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
294
301
|
]
|
|
295
302
|
})
|
|
296
303
|
}),
|
|
297
|
-
props.tag == 'Section' ? /*#__PURE__*/
|
|
304
|
+
props.tag == 'Section' ? /*#__PURE__*/ jsxs("div", {
|
|
298
305
|
"data-toolbar-name": true,
|
|
299
|
-
children:
|
|
306
|
+
children: [
|
|
307
|
+
getSectionName(),
|
|
308
|
+
props.isShopifySection && !props.isShopifyVisibility && /*#__PURE__*/ jsxs("svg", {
|
|
309
|
+
"data-toolbar-visibility": true,
|
|
310
|
+
width: "20",
|
|
311
|
+
height: "20",
|
|
312
|
+
viewBox: "0 0 20 20",
|
|
313
|
+
fill: "none",
|
|
314
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
315
|
+
children: [
|
|
316
|
+
/*#__PURE__*/ jsx("path", {
|
|
317
|
+
fillRule: "evenodd",
|
|
318
|
+
clipRule: "evenodd",
|
|
319
|
+
d: "M13.1252 9.99773C13.1243 8.27226 11.7248 6.87423 9.99935 6.87506C8.27386 6.87561 6.87518 8.27455 6.87518 10.0001C6.87518 11.7259 8.27429 13.1251 10.0002 13.1251C11.7257 13.1251 13.125 11.727 13.1252 10.0011V9.99773ZM9.99985 8.12506C11.035 8.12451 11.8746 8.96322 11.8752 9.99839V10.0004C11.8752 11.0357 11.0359 11.8751 10.0002 11.8751C8.96465 11.8751 8.12518 11.0356 8.12518 10.0001C8.12518 8.96472 8.96451 8.12533 9.99985 8.12506Z",
|
|
320
|
+
fill: "#F9F9F9"
|
|
321
|
+
}),
|
|
322
|
+
/*#__PURE__*/ jsx("path", {
|
|
323
|
+
fillRule: "evenodd",
|
|
324
|
+
clipRule: "evenodd",
|
|
325
|
+
d: "M9.99885 4.37593C5.66421 4.37604 2.80603 7.64523 1.79548 9.00983C1.35636 9.60279 1.35918 10.4 1.80012 10.9902C2.81706 12.3514 5.69374 15.6241 9.99886 15.6241C14.3806 15.6241 17.2194 12.3452 18.2168 10.9808C18.6473 10.392 18.6442 9.60472 18.211 9.01902C17.2056 7.65938 14.3429 4.37583 9.99885 4.37593ZM2.80002 9.75374C3.77049 8.44326 6.30207 5.62602 9.99888 5.62593C13.7041 5.62585 16.24 8.45598 17.206 9.76225C17.3146 9.9091 17.3149 10.0965 17.2077 10.2431C16.254 11.5477 13.7416 14.3741 9.99886 14.3741C6.33149 14.3741 3.78173 11.5541 2.80152 10.242C2.69021 10.0931 2.69001 9.90229 2.80002 9.75374Z",
|
|
326
|
+
fill: "#F9F9F9"
|
|
327
|
+
}),
|
|
328
|
+
/*#__PURE__*/ jsx("path", {
|
|
329
|
+
fillRule: "evenodd",
|
|
330
|
+
clipRule: "evenodd",
|
|
331
|
+
d: "M18.0763 3.26988C18.3415 3.58809 18.2985 4.06101 17.9803 4.32619L2.98032 16.8262C2.66211 17.0914 2.18919 17.0484 1.92402 16.7302C1.65884 16.412 1.70184 15.939 2.02004 15.6739L17.02 3.17385C17.3383 2.90868 17.8112 2.95167 18.0763 3.26988Z",
|
|
332
|
+
fill: "#F9F9F9"
|
|
333
|
+
})
|
|
334
|
+
]
|
|
335
|
+
})
|
|
336
|
+
]
|
|
300
337
|
}) : /*#__PURE__*/ jsx("div", {
|
|
301
338
|
"data-toolbar-name": true,
|
|
302
339
|
children: toolbarName()
|
|
@@ -376,7 +413,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
376
413
|
]
|
|
377
414
|
}, parent.uid);
|
|
378
415
|
}),
|
|
379
|
-
props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
|
|
416
|
+
props.tag === 'Section' && !props.isThemeSection && isEnableCreateThemeSection() && !props.isShopifySection && getIndexSection() < SECTION_LIMIT && /*#__PURE__*/ jsx(CreateThemeSection, {
|
|
380
417
|
...props
|
|
381
418
|
}),
|
|
382
419
|
props.tag == 'Sticky' && /*#__PURE__*/ jsx("div", {
|
|
@@ -450,6 +487,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
450
487
|
"data-outline": true,
|
|
451
488
|
"data-outline-section": props.tag == 'Section',
|
|
452
489
|
"data-outline-theme-section": props.tag == 'Section' && !!isThemeSection || isThemeSectionEditor,
|
|
490
|
+
"data-outline-shopify-section": props.tag == 'Section' && !!isShopifySection,
|
|
453
491
|
"data-outline-limit": getIndexSection() >= SECTION_LIMIT
|
|
454
492
|
}, 'outline-' + props.uid),
|
|
455
493
|
props.tag == 'Section' && !isThemeSectionEditor && /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -12,6 +12,7 @@ import 'swr/mutation';
|
|
|
12
12
|
import { usePageType } from '../hooks/shop.js';
|
|
13
13
|
import 'vanilla-lazyload';
|
|
14
14
|
import '../hooks/useCartUI.js';
|
|
15
|
+
import { cls } from '../helpers/cls.js';
|
|
15
16
|
import '../helpers/convert.js';
|
|
16
17
|
|
|
17
18
|
const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
@@ -37,6 +38,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
37
38
|
if (props.tag === 'Section' && props.isThemeSection) {
|
|
38
39
|
customProps['data-theme-section'] = true;
|
|
39
40
|
}
|
|
41
|
+
if (props.tag === 'Section' && props.isShopifySection) {
|
|
42
|
+
customProps['data-shopify-section'] = true;
|
|
43
|
+
customProps['data-toolbar-wrap'] = true;
|
|
44
|
+
}
|
|
40
45
|
// Build editor configs
|
|
41
46
|
if (props.editorConfigs) {
|
|
42
47
|
const editorConfigs = props.editorConfigs;
|
|
@@ -91,6 +96,40 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
91
96
|
'data-component-label': props.label,
|
|
92
97
|
'data-not-droppable': isNotDroppable(props.tag)
|
|
93
98
|
};
|
|
99
|
+
const ShopifySection = ({ name, visibility })=>{
|
|
100
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
101
|
+
className: cls('gp-flex gp-items-center gp-justify-center gp-gap-[8px] gp-bg-[#F4F4F4] gp-p-[16px] gp-border gp-border-[#D6D6D6]', {
|
|
102
|
+
'gp-opacity-60': !visibility
|
|
103
|
+
}),
|
|
104
|
+
children: [
|
|
105
|
+
/*#__PURE__*/ jsxs("svg", {
|
|
106
|
+
width: "24",
|
|
107
|
+
height: "24",
|
|
108
|
+
viewBox: "0 0 24 24",
|
|
109
|
+
fill: "none",
|
|
110
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ jsx("path", {
|
|
113
|
+
d: "M19.1475 5.16194C19.1416 5.1148 19.1197 5.0713 19.0857 5.03911C19.0516 5.00692 19.0076 4.9881 18.9614 4.98597C18.8835 4.98597 17.3469 4.95397 17.3469 4.95397C17.3469 4.95397 16.0588 3.67419 15.9342 3.5311C15.8104 3.40312 15.5619 3.43512 15.4684 3.46711L14.8166 3.67508C14.7361 3.40491 14.6323 3.14259 14.5067 2.89121C14.0566 1.99536 13.3727 1.51544 12.5659 1.51544C12.5044 1.51544 12.4577 1.51544 12.3954 1.53144C12.3642 1.49945 12.3486 1.46745 12.3175 1.45145C11.9608 1.06752 11.5107 0.875552 10.967 0.891549C9.92824 0.923543 8.88772 1.70741 8.03419 3.08318C7.44467 4.05901 6.99453 5.27392 6.8543 6.21776C5.65969 6.6017 4.82087 6.87365 4.79057 6.87365C4.18461 7.06562 4.16903 7.08161 4.09199 7.67351C4.06082 8.12144 2.47754 20.7415 2.47754 20.7415L15.7636 23.1091L21.522 21.6374C21.5064 21.6374 19.1631 5.27392 19.1475 5.16194ZM14.1492 3.89904C13.8062 4.00572 13.4648 4.11772 13.1251 4.23498C13.1251 3.69108 13.0472 2.92321 12.8143 2.28331C13.6064 2.41129 13.9942 3.33914 14.1492 3.89904ZM12.4265 4.44206C11.7279 4.66602 10.9679 4.90598 10.207 5.14594C10.4243 4.29808 10.8277 3.46623 11.3245 2.90632C11.533 2.66965 11.7863 2.47913 12.069 2.34641C12.3806 2.9712 12.4421 3.85105 12.4265 4.44206ZM10.9982 1.61143C11.2466 1.61143 11.4483 1.65942 11.6197 1.7874C11.3127 1.95192 11.0387 2.17444 10.8121 2.44329C10.1455 3.17916 9.63305 4.31408 9.43135 5.4179C8.79423 5.62586 8.17356 5.81783 7.61521 5.9938C7.98744 4.25009 9.39933 1.65942 10.9982 1.61143Z",
|
|
114
|
+
fill: "#95BF47"
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ jsx("path", {
|
|
117
|
+
d: "M18.9647 4.94709C18.8851 4.94709 17.3155 4.91503 17.3155 4.91503C17.3155 4.91503 15.9981 3.63242 15.8716 3.48812C15.8261 3.43951 15.7635 3.41074 15.6973 3.40796V23.1094L21.5828 21.6344L19.1709 5.12345C19.1399 5.01122 19.0444 4.94709 18.9647 4.94709Z",
|
|
118
|
+
fill: "#5E8E3E"
|
|
119
|
+
}),
|
|
120
|
+
/*#__PURE__*/ jsx("path", {
|
|
121
|
+
d: "M13.0575 8.51577L12.3029 10.8908C12.3029 10.8908 11.4602 10.5663 10.4599 10.6253C8.98595 10.6991 8.98595 11.4809 8.98595 11.6727C9.07404 12.7348 12.39 12.9709 12.5828 15.4631C12.7238 17.4251 11.3545 18.7675 9.35396 18.8708C6.96778 18.9733 5.65137 17.7939 5.65137 17.7939L6.16032 15.9794C6.16032 15.9794 7.49435 16.8203 8.5465 16.7613C9.23162 16.7318 9.4949 16.245 9.45967 15.9204C9.35396 14.5337 6.65165 14.6223 6.47645 12.3365C6.33551 10.4188 7.82712 8.48626 11.1265 8.30924C12.4076 8.23548 13.0575 8.51577 13.0575 8.51577Z",
|
|
122
|
+
fill: "white"
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
}),
|
|
126
|
+
/*#__PURE__*/ jsx("span", {
|
|
127
|
+
className: "gp-text-[#212121] gp-text-[14px] gp-leading-[24px] gp-font-medium",
|
|
128
|
+
children: name
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
};
|
|
94
133
|
if (disableWrap.includes(props.tag) && /*#__PURE__*/ isValidElement(children)) {
|
|
95
134
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
96
135
|
children: [
|
|
@@ -105,7 +144,10 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
105
144
|
builderAttrs,
|
|
106
145
|
advanced,
|
|
107
146
|
children: [
|
|
108
|
-
|
|
147
|
+
props.isShopifySection ? /*#__PURE__*/ jsx(ShopifySection, {
|
|
148
|
+
name: props.name ?? '',
|
|
149
|
+
visibility: !!props.isShopifyVisibility
|
|
150
|
+
}) : children.props['children'],
|
|
109
151
|
/*#__PURE__*/ jsx(ComponentToolbarPreview, {
|
|
110
152
|
...props
|
|
111
153
|
})
|
|
@@ -215,14 +215,14 @@ const appendAnimation = (props, liquid)=>{
|
|
|
215
215
|
const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
|
|
216
216
|
const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
|
|
217
217
|
if (!enableAnimation) return liquid;
|
|
218
|
-
const
|
|
218
|
+
const getInitVisibility = (device)=>getSettingsByDevice(device)?.enabled && ![
|
|
219
219
|
'shake',
|
|
220
220
|
'none'
|
|
221
|
-
].includes(getAnimationType(getSettingsByDevice(device), 'appear'))
|
|
221
|
+
].includes(getAnimationType(getSettingsByDevice(device), 'appear')) ? 'hidden' : 'visible';
|
|
222
222
|
const opacityObject = {
|
|
223
|
-
desktop:
|
|
224
|
-
tablet:
|
|
225
|
-
mobile:
|
|
223
|
+
desktop: getInitVisibility('desktop'),
|
|
224
|
+
tablet: getInitVisibility('tablet'),
|
|
225
|
+
mobile: getInitVisibility('mobile')
|
|
226
226
|
};
|
|
227
227
|
return template`
|
|
228
228
|
<gp-animation
|
|
@@ -236,7 +236,7 @@ const appendAnimation = (props, liquid)=>{
|
|
|
236
236
|
}}"
|
|
237
237
|
>
|
|
238
238
|
<div style="${{
|
|
239
|
-
...makeStyleResponsive('
|
|
239
|
+
...makeStyleResponsive('v', opacityObject),
|
|
240
240
|
display: 'contents'
|
|
241
241
|
}}">${liquid}</div>
|
|
242
242
|
</gp-animation>
|
|
@@ -426,15 +426,16 @@ const createBuilderPreviewProvider = (args, isThemeSectionEditor)=>createStore((
|
|
|
426
426
|
updateItemAttribute: (id, value, attr)=>{
|
|
427
427
|
if (!attr || ![
|
|
428
428
|
'label',
|
|
429
|
-
'customLabel'
|
|
429
|
+
'customLabel',
|
|
430
|
+
'isShopifyVisibility'
|
|
430
431
|
].includes(attr)) return;
|
|
431
432
|
const state = get().state;
|
|
432
433
|
const item = state[id];
|
|
433
|
-
// Ignore section
|
|
434
|
-
if (item?.type === 'section') return;
|
|
435
434
|
if (item) {
|
|
436
|
-
|
|
437
|
-
|
|
435
|
+
if (item.type !== 'section') {
|
|
436
|
+
const dateModified = Date.now();
|
|
437
|
+
item.dateModified = dateModified;
|
|
438
|
+
}
|
|
438
439
|
const updatedItem = {
|
|
439
440
|
...item,
|
|
440
441
|
[attr]: value
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/* eslint-disable */ const ProductSelect = `
|
|
2
2
|
fragment ProductSelect on Product {
|
|
3
3
|
...ProductLittleSelect
|
|
4
|
+
collections {
|
|
5
|
+
edges {
|
|
6
|
+
node {
|
|
7
|
+
id
|
|
8
|
+
title
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
tags
|
|
4
13
|
medias(first: $firstMedia, after: $afterMedia, orderBy: $orderByMedia) {
|
|
5
14
|
edges {
|
|
6
15
|
cursor
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const globalEvent = {
|
|
2
|
-
subscribe (callback) {
|
|
3
|
-
document.addEventListener(
|
|
2
|
+
subscribe (eventName, callback) {
|
|
3
|
+
document.addEventListener(eventName, (e)=>callback(e.detail));
|
|
4
4
|
},
|
|
5
|
-
dispatch (
|
|
6
|
-
document.dispatchEvent(new CustomEvent(
|
|
7
|
-
detail
|
|
5
|
+
dispatch (eventName, detail) {
|
|
6
|
+
document.dispatchEvent(new CustomEvent(eventName, {
|
|
7
|
+
detail
|
|
8
8
|
}));
|
|
9
9
|
},
|
|
10
|
-
remove (callback) {
|
|
11
|
-
document.removeEventListener(
|
|
10
|
+
remove (eventName, callback) {
|
|
11
|
+
document.removeEventListener(eventName, callback);
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -55,6 +55,29 @@ const getProducts = async (fetcher, { ids, isSample, isStorefront, defaultSelect
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
|
+
const getProductQueryAll = async (fetcher, arg)=>{
|
|
59
|
+
const limit = arg?.limit || 4;
|
|
60
|
+
delete arg.limit;
|
|
61
|
+
const variables = {
|
|
62
|
+
first: limit,
|
|
63
|
+
firstMedia: 1,
|
|
64
|
+
firstVariant: 1,
|
|
65
|
+
orderBy: {
|
|
66
|
+
field: 'PLATFORM_CREATED_AT',
|
|
67
|
+
direction: 'DESC'
|
|
68
|
+
},
|
|
69
|
+
orderByMedia: {
|
|
70
|
+
field: 'POSITION',
|
|
71
|
+
direction: 'ASC'
|
|
72
|
+
},
|
|
73
|
+
where: {
|
|
74
|
+
status: 'ACTIVE',
|
|
75
|
+
...arg
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const pageData = await fetchProducts(fetcher, variables);
|
|
79
|
+
return pageData;
|
|
80
|
+
};
|
|
58
81
|
const fetchProducts = async (fetcher, variables)=>{
|
|
59
82
|
return fetcher([
|
|
60
83
|
ProductsDocument,
|
|
@@ -162,4 +185,4 @@ const mergeMediasToProducts = async ({ fetcher, products, isSample, isStorefront
|
|
|
162
185
|
// );
|
|
163
186
|
// };
|
|
164
187
|
|
|
165
|
-
export { getProducts };
|
|
188
|
+
export { getProductQueryAll, getProducts };
|
package/dist/esm/helpers/size.js
CHANGED
|
@@ -41,6 +41,18 @@ const makeGlobalSize = (globalSize)=>{
|
|
|
41
41
|
gap: getGlobalSizeGap(globalSize)
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
+
const makeGlobalSizeIcon = (globalSize)=>{
|
|
45
|
+
return {
|
|
46
|
+
width: makeStyleWithDefault('w', getWidthHeightGlobalSize('width', globalSize), {
|
|
47
|
+
desktop: '--g-ct-w',
|
|
48
|
+
tablet: '--g-ct-w',
|
|
49
|
+
mobile: '--g-ct-w'
|
|
50
|
+
}),
|
|
51
|
+
height: makeStyleResponsive('h', getWidthHeightGlobalSize('width', globalSize)),
|
|
52
|
+
minWidth: makeStyleResponsive('minw', getWidthHeightGlobalSize('width', globalSize)),
|
|
53
|
+
padding: getPaddingGlobalSize(globalSize)
|
|
54
|
+
};
|
|
55
|
+
};
|
|
44
56
|
const getGlobalSizeGap = (globalSize)=>{
|
|
45
57
|
return {
|
|
46
58
|
'--gg': globalSize?.desktop?.gap,
|
|
@@ -168,4 +180,4 @@ const getPaddingGlobalSize = (globalSize)=>{
|
|
|
168
180
|
return Object.assign({}, getCustomPaddingSizeCSSByDevice(globalSize, 'desktop'), getCustomPaddingSizeCSSByDevice(globalSize, 'tablet'), getCustomPaddingSizeCSSByDevice(globalSize, 'mobile'));
|
|
169
181
|
};
|
|
170
182
|
|
|
171
|
-
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeStyleWithDefault };
|
|
183
|
+
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import useSWR from 'swr';
|
|
2
|
-
import { getProducts } from '../../helpers/queries/get-products.js';
|
|
2
|
+
import { getProducts, getProductQueryAll } from '../../helpers/queries/get-products.js';
|
|
3
3
|
import { generateProductsQueryKey } from '../../helpers/query.js';
|
|
4
4
|
import { useIsSampleProduct, useIsStorefrontProduct } from '../shop.js';
|
|
5
5
|
import { useFetchHandle } from '../useFetchHandle.js';
|
|
@@ -18,5 +18,14 @@ const useProductsQuery = (ids, options, params)=>{
|
|
|
18
18
|
return getProducts(params?.fetcher || fetcher, arg);
|
|
19
19
|
}, options);
|
|
20
20
|
};
|
|
21
|
+
const useProductsQueryAll = (variable, options)=>{
|
|
22
|
+
const fetcher = useFetchHandle();
|
|
23
|
+
return useSWR(variable ? [
|
|
24
|
+
'query/products',
|
|
25
|
+
variable
|
|
26
|
+
] : null, async ([, arg])=>{
|
|
27
|
+
return getProductQueryAll(fetcher, arg);
|
|
28
|
+
}, options);
|
|
29
|
+
};
|
|
21
30
|
|
|
22
|
-
export { useProductsQuery };
|
|
31
|
+
export { useProductsQuery, useProductsQueryAll };
|
package/dist/esm/index.js
CHANGED
|
@@ -54,7 +54,7 @@ export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQu
|
|
|
54
54
|
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
|
|
55
55
|
export { RenderIf, composeMemo, dataStringify, props, removeUndefinedValuesFromObject, styles, template } from './helpers/render.js';
|
|
56
56
|
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
57
|
-
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeStyleWithDefault } from './helpers/size.js';
|
|
57
|
+
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault } from './helpers/size.js';
|
|
58
58
|
export { composeFallbackTypographyStyle, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
|
|
59
59
|
export { validateEmail } from './helpers/email.js';
|
|
60
60
|
export { loadScript } from './helpers/load-script.js';
|
|
@@ -77,7 +77,7 @@ export { useCheckoutUrl, useConnectedShopify, useCurrency, useEditorMode, useIsS
|
|
|
77
77
|
export { useCollectionQuery } from './hooks/shop/use-collection-query.js';
|
|
78
78
|
export { useCollectionsQuery } from './hooks/shop/use-collections-query.js';
|
|
79
79
|
export { useProductQuery } from './hooks/shop/use-product-query.js';
|
|
80
|
-
export { useProductsQuery } from './hooks/shop/use-products-query.js';
|
|
80
|
+
export { useProductsQuery, useProductsQueryAll } from './hooks/shop/use-products-query.js';
|
|
81
81
|
export { useCurrentDevice } from './hooks/use-current-device.js';
|
|
82
82
|
export { shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
|
|
83
83
|
export { useLazyVideo } from './hooks/use-lazy-video.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5183,6 +5183,7 @@ type PublishedThemePage$1 = {
|
|
|
5183
5183
|
themePageOnlineStoreData?: Maybe$1<Array<Maybe$1<PublishedThemePageOnlineStoreData$1>>>;
|
|
5184
5184
|
type: PublishedThemePageType$1;
|
|
5185
5185
|
updatedAt?: Maybe$1<Scalars$2['Time']>;
|
|
5186
|
+
publishedAt?: Maybe$1<Scalars$2['Time']>;
|
|
5186
5187
|
};
|
|
5187
5188
|
type PublishedThemePageCustomSection$1 = {
|
|
5188
5189
|
id: Scalars$2['ID'];
|
|
@@ -6477,6 +6478,8 @@ type BlockEntity = {
|
|
|
6477
6478
|
type?: 'component';
|
|
6478
6479
|
isThemeSection?: boolean;
|
|
6479
6480
|
needPublishing?: boolean;
|
|
6481
|
+
isShopifySection?: boolean;
|
|
6482
|
+
isShopifyVisibility?: boolean;
|
|
6480
6483
|
};
|
|
6481
6484
|
type SectionEntity = {
|
|
6482
6485
|
uid: string;
|
|
@@ -6486,6 +6489,8 @@ type SectionEntity = {
|
|
|
6486
6489
|
name?: string;
|
|
6487
6490
|
isThemeSection?: boolean;
|
|
6488
6491
|
needPublishing?: boolean;
|
|
6492
|
+
isShopifySection?: boolean;
|
|
6493
|
+
isShopifyVisibility?: boolean;
|
|
6489
6494
|
};
|
|
6490
6495
|
type BuilderEntity = BlockEntity | SectionEntity;
|
|
6491
6496
|
type BuilderEntityNested = Omit<BlockEntity, 'childrens'> & {
|
|
@@ -6536,8 +6541,8 @@ type SaleFunnelDiscountEdge$1 = {
|
|
|
6536
6541
|
cursor: Scalars$1['Cursor'];
|
|
6537
6542
|
node?: Maybe$1<SaleFunnelDiscount$1>;
|
|
6538
6543
|
};
|
|
6539
|
-
type ProductOffer = Maybe$1<Pick<SaleFunnelDiscountEdge$1,
|
|
6540
|
-
node?: Maybe$1<Pick<SaleFunnelDiscount$1,
|
|
6544
|
+
type ProductOffer = Maybe$1<Pick<SaleFunnelDiscountEdge$1, 'cursor'> & {
|
|
6545
|
+
node?: Maybe$1<Pick<SaleFunnelDiscount$1, 'id' | 'value' | 'type' | 'position' | 'objectBaseID' | 'objectType' | 'title' | 'valueType' | 'isEnabled'>>;
|
|
6541
6546
|
}>;
|
|
6542
6547
|
|
|
6543
6548
|
type InitComponentType<T = any> = {
|
|
@@ -6604,7 +6609,7 @@ type Component = InitComponentType & {
|
|
|
6604
6609
|
};
|
|
6605
6610
|
type NameDevices$1 = 'desktop' | 'tablet' | 'mobile';
|
|
6606
6611
|
type ObjectDevices<T> = Partial<Record<NameDevices$1, T>>;
|
|
6607
|
-
type StateType = 'normal' | 'hover' | 'focus' | 'active';
|
|
6612
|
+
type StateType = 'normal' | 'hover' | 'focus' | 'active' | 'price' | 'compareAtPrice';
|
|
6608
6613
|
type StateProp<T> = Partial<Record<StateType, T>>;
|
|
6609
6614
|
type ResponsiveStateProp<T> = ObjectDevices<StateProp<T>>;
|
|
6610
6615
|
type AlignItemProp = 'left' | 'center' | 'right';
|
|
@@ -6725,6 +6730,8 @@ type Mapped$7<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
|
6725
6730
|
hover?: boolean;
|
|
6726
6731
|
focus?: boolean;
|
|
6727
6732
|
active?: boolean;
|
|
6733
|
+
price?: boolean;
|
|
6734
|
+
compareAtPrice?: boolean;
|
|
6728
6735
|
};
|
|
6729
6736
|
emptyOnClear?: boolean;
|
|
6730
6737
|
showVideo?: boolean;
|
|
@@ -7378,6 +7385,10 @@ type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
|
|
|
7378
7385
|
id?: string;
|
|
7379
7386
|
type: 'variant:presets';
|
|
7380
7387
|
};
|
|
7388
|
+
type VariantSwatchesOnlyDefaultVariantControlType<T> = SharedControlType<T> & {
|
|
7389
|
+
id?: string;
|
|
7390
|
+
type: 'variant:default';
|
|
7391
|
+
};
|
|
7381
7392
|
|
|
7382
7393
|
type LayoutControlType<T> = SharedControlType<T> & {
|
|
7383
7394
|
type: 'layout';
|
|
@@ -7439,6 +7450,7 @@ type TypographyV2ControlType<T> = SharedControlType<T> & {
|
|
|
7439
7450
|
color?: boolean;
|
|
7440
7451
|
transform?: boolean;
|
|
7441
7452
|
};
|
|
7453
|
+
disableCollapse?: boolean;
|
|
7442
7454
|
};
|
|
7443
7455
|
|
|
7444
7456
|
type StickyDisplayControlType<T> = SharedControlType<T> & {
|
|
@@ -7698,7 +7710,16 @@ type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
|
|
|
7698
7710
|
}[];
|
|
7699
7711
|
};
|
|
7700
7712
|
|
|
7701
|
-
type
|
|
7713
|
+
type NotesControlType<T> = SharedControlType<T> & {
|
|
7714
|
+
type: 'notes';
|
|
7715
|
+
value?: string;
|
|
7716
|
+
};
|
|
7717
|
+
|
|
7718
|
+
type ButtonLayoutType<T> = SharedControlType<T> & {
|
|
7719
|
+
type: 'button-layout';
|
|
7720
|
+
};
|
|
7721
|
+
|
|
7722
|
+
type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | VariantSwatchesOnlyDefaultVariantControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | SneakPeakControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T> | NotesControlType<T> | NotesControlType<T> | ButtonLayoutType<T>;
|
|
7702
7723
|
type ControlTriggerAction = {
|
|
7703
7724
|
controlId: string;
|
|
7704
7725
|
newValue?: any;
|
|
@@ -27319,7 +27340,12 @@ declare const useCartLineStore: <U>(selector: (state: ExtractState<StoreApi<Cart
|
|
|
27319
27340
|
type CollectionProductSelectFragment = Pick<Collection$1, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
27320
27341
|
products?: Maybe$1<{
|
|
27321
27342
|
edges: Array<Pick<ProductEdge$1, 'cursor'> & {
|
|
27322
|
-
node?: Maybe$1<Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27343
|
+
node?: Maybe$1<Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27344
|
+
collections?: Maybe$1<{
|
|
27345
|
+
edges: Array<{
|
|
27346
|
+
node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
|
|
27347
|
+
}>;
|
|
27348
|
+
}>;
|
|
27323
27349
|
medias?: Maybe$1<{
|
|
27324
27350
|
edges: Array<Pick<MediaEdge$1, 'cursor'> & {
|
|
27325
27351
|
node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
|
|
@@ -27392,7 +27418,12 @@ type ProductListProviderProps = ProductListContextProps & {
|
|
|
27392
27418
|
declare const ProductListProvider: React.FC<ProductListProviderProps>;
|
|
27393
27419
|
declare const useProductListStore: <U>(selector: (state: ExtractState<StoreApi<ProductListContextProps>>) => U, equalityFn?: ((a: U, b: U) => boolean) | undefined) => U;
|
|
27394
27420
|
|
|
27395
|
-
type ProductSelectFragment = Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27421
|
+
type ProductSelectFragment = Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27422
|
+
collections?: Maybe$1<{
|
|
27423
|
+
edges: Array<{
|
|
27424
|
+
node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
|
|
27425
|
+
}>;
|
|
27426
|
+
}>;
|
|
27396
27427
|
medias?: Maybe$1<{
|
|
27397
27428
|
edges: Array<Pick<MediaEdge$1, 'cursor'> & {
|
|
27398
27429
|
node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
|
|
@@ -27590,7 +27621,12 @@ type CollectionDetailFilterQueryResponse = {
|
|
|
27590
27621
|
node?: Maybe$1<Pick<Collection$1, 'id' | 'createdAt' | 'updatedAt' | 'deletedAt' | 'title' | 'handle' | 'description' | 'descriptionHtml' | 'templateSuffix' | 'titleMeta' | 'descriptionMeta' | 'baseID' | 'platform' | 'tags' | 'isStorefront' | 'isSample'> & {
|
|
27591
27622
|
products?: Maybe$1<{
|
|
27592
27623
|
edges: Array<Pick<ProductEdge$1, 'cursor'> & {
|
|
27593
|
-
node?: Maybe$1<Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27624
|
+
node?: Maybe$1<Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27625
|
+
collections?: Maybe$1<{
|
|
27626
|
+
edges: Array<{
|
|
27627
|
+
node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
|
|
27628
|
+
}>;
|
|
27629
|
+
}>;
|
|
27594
27630
|
medias?: Maybe$1<{
|
|
27595
27631
|
edges: Array<Pick<MediaEdge$1, 'cursor'> & {
|
|
27596
27632
|
node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
|
|
@@ -27720,7 +27756,12 @@ type ProductsQueryVariables = Exact$1<{
|
|
|
27720
27756
|
type ProductsQueryResponse = {
|
|
27721
27757
|
products?: Maybe$1<{
|
|
27722
27758
|
edges: Array<Pick<ProductEdge$1, 'cursor'> & {
|
|
27723
|
-
node?: Maybe$1<Pick<Product$1, 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27759
|
+
node?: Maybe$1<Pick<Product$1, 'tags' | 'id' | 'title' | 'description' | 'descriptionHtml' | 'handle' | 'averageRating' | 'isStorefront' | 'isSample' | 'baseID' | 'sku' | 'vendor'> & {
|
|
27760
|
+
collections?: Maybe$1<{
|
|
27761
|
+
edges: Array<{
|
|
27762
|
+
node?: Maybe$1<Pick<Collection$1, 'id' | 'title'>>;
|
|
27763
|
+
}>;
|
|
27764
|
+
}>;
|
|
27724
27765
|
medias?: Maybe$1<{
|
|
27725
27766
|
edges: Array<Pick<MediaEdge$1, 'cursor'> & {
|
|
27726
27767
|
node?: Maybe$1<Pick<Media$1, 'id' | 'contentType' | 'previewImage' | 'src' | 'width' | 'height' | 'alt'>>;
|
|
@@ -27745,6 +27786,13 @@ type ProductsQueryResponse = {
|
|
|
27745
27786
|
pageInfo?: Maybe$1<Pick<PageInfo$1, 'endCursor' | 'hasNextPage'>>;
|
|
27746
27787
|
}>;
|
|
27747
27788
|
};
|
|
27789
|
+
type VariableRelatedStyles = {
|
|
27790
|
+
limit?: number | undefined;
|
|
27791
|
+
vendor?: string;
|
|
27792
|
+
idNEQ?: string;
|
|
27793
|
+
hasProductTagsWith?: InputMaybe$1<ProductTagWhereInput$1[]>;
|
|
27794
|
+
hasCollectionProductsWith?: InputMaybe$1<CollectionProductWhereInput$1[]>;
|
|
27795
|
+
};
|
|
27748
27796
|
declare const ProductsDocument: string;
|
|
27749
27797
|
|
|
27750
27798
|
type StorePropertyQueryVariables = Exact$1<{
|
|
@@ -27890,9 +27938,9 @@ declare const isColumnDirectionExist: (layout: ObjectDevices<ObjectLayoutValue>,
|
|
|
27890
27938
|
declare function getShortName(name: string): string;
|
|
27891
27939
|
|
|
27892
27940
|
declare const globalEvent: {
|
|
27893
|
-
subscribe(callback: (detail: any) => void): void;
|
|
27894
|
-
dispatch(
|
|
27895
|
-
remove(callback: (
|
|
27941
|
+
subscribe(eventName: string, callback: (detail: any) => void): void;
|
|
27942
|
+
dispatch(eventName: string, detail: any): void;
|
|
27943
|
+
remove(eventName: string, callback: (detail: any) => void): void;
|
|
27896
27944
|
};
|
|
27897
27945
|
|
|
27898
27946
|
declare function isBrowser(): boolean;
|
|
@@ -34074,6 +34122,12 @@ declare const makeGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) =>
|
|
|
34074
34122
|
'--gg-mobile': string | undefined;
|
|
34075
34123
|
};
|
|
34076
34124
|
};
|
|
34125
|
+
declare const makeGlobalSizeIcon: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
|
|
34126
|
+
width: Record<ResponsiveKey<"w">, string | number>;
|
|
34127
|
+
height: Record<ResponsiveKey<"h">, string | number>;
|
|
34128
|
+
minWidth: Record<ResponsiveKey<"minw">, string | number>;
|
|
34129
|
+
padding: React.CSSProperties;
|
|
34130
|
+
};
|
|
34077
34131
|
declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
|
|
34078
34132
|
'--gg': string | undefined;
|
|
34079
34133
|
'--gg-tablet': string | undefined;
|
|
@@ -35740,6 +35794,7 @@ declare const useProductsQuery: (ids?: string[], options?: SWRConfiguration<Prod
|
|
|
35740
35794
|
allStatus?: boolean;
|
|
35741
35795
|
fetcher?: FetchFunc;
|
|
35742
35796
|
}) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", FetchProductsParams]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
|
|
35797
|
+
declare const useProductsQueryAll: (variable?: VariableRelatedStyles | undefined, options?: SWRConfiguration<ProductsQueryResponse>) => swr__internal.SWRResponse<ProductsQueryResponse, any, Partial<swr__internal.PublicConfiguration<ProductsQueryResponse, any, (arg: ["query/products", any]) => swr__internal.FetcherResponse<ProductsQueryResponse>>> | undefined>;
|
|
35743
35798
|
|
|
35744
35799
|
declare const useCurrentDevice: () => NameDevices$1;
|
|
35745
35800
|
|
|
@@ -35843,11 +35898,11 @@ declare const useSelectedOption: () => {
|
|
|
35843
35898
|
setSelectedOption: (optionId?: Maybe$1<string>, optionValue?: Maybe$1<string>, productId?: Maybe$1<string>, noEmit?: boolean) => void;
|
|
35844
35899
|
forceSelectedOption: (selectedOption?: Record<string, string>, productId?: Maybe$1<string>, noEmit?: boolean) => void;
|
|
35845
35900
|
};
|
|
35846
|
-
declare const useVariants: () => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "
|
|
35901
|
+
declare const useVariants: () => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "price" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "salePrice" | "soldIndividually"> & {
|
|
35847
35902
|
selectedOptions: Pick<SelectedOption$1, "name" | "value" | "optionType">[];
|
|
35848
35903
|
media?: Maybe$1<Pick<Media$1, "id" | "width" | "height" | "src" | "alt" | "contentType" | "previewImage">>;
|
|
35849
35904
|
}>[];
|
|
35850
|
-
declare const useVariant: (id: string) => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "
|
|
35905
|
+
declare const useVariant: (id: string) => Maybe$1<Pick<ProductVariant$1, "id" | "title" | "price" | "width" | "height" | "length" | "weight" | "baseID" | "platform" | "sku" | "barcode" | "costPrice" | "inventoryPolicy" | "inventoryQuantity" | "inventoryStatus" | "isDigital" | "lowInventoryAmount" | "manageInventory" | "mediaId" | "salePrice" | "soldIndividually"> & {
|
|
35851
35906
|
selectedOptions: Pick<SelectedOption$1, "name" | "value" | "optionType">[];
|
|
35852
35907
|
media?: Maybe$1<Pick<Media$1, "id" | "width" | "height" | "src" | "alt" | "contentType" | "previewImage">>;
|
|
35853
35908
|
}>;
|
|
@@ -35902,4 +35957,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage$1, 'id' | 'name'
|
|
|
35902
35957
|
|
|
35903
35958
|
declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
|
|
35904
35959
|
|
|
35905
|
-
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, 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, 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, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, 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, 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, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, 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, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, 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, 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, useInitialSwatchesOptions, 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, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|
|
35960
|
+
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, Background, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, 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, 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, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, 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, 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, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, 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, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, 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, 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, useInitialSwatchesOptions, 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.
|
|
3
|
+
"version": "1.41.0-dev.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"type-check": "yarn tsc --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/adapter-shopify": "1.
|
|
31
|
-
"@gem-sdk/styles": "1.
|
|
30
|
+
"@gem-sdk/adapter-shopify": "1.41.0-staging.13",
|
|
31
|
+
"@gem-sdk/styles": "1.41.0-dev.14"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"react-error-boundary": "4.0.10",
|