@gem-sdk/core 1.13.42 → 1.14.0-dev.284
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/AddOn.js +1 -18
- package/dist/cjs/components/ComponentWrapper.js +1 -28
- package/dist/cjs/components/ComponentWrapperPreview.js +1 -72
- package/dist/cjs/components/Empty.js +1 -7
- package/dist/cjs/components/Render.js +1 -65
- package/dist/cjs/components/Render.liquid.js +15 -158
- package/dist/cjs/components/RenderBlock.js +1 -54
- package/dist/cjs/components/RenderCustomCode.js +5 -0
- package/dist/cjs/components/RenderPreview.js +1 -66
- package/dist/cjs/components/RenderSection.js +1 -23
- package/dist/cjs/components/constant.js +1 -39
- package/dist/cjs/components/src/product/helpers/variant-presets.js +1 -0
- package/dist/cjs/contexts/AddonContext.js +1 -36
- package/dist/cjs/contexts/BuilderComponent.js +1 -34
- package/dist/cjs/contexts/BuilderContext.js +1 -35
- package/dist/cjs/contexts/BuilderPreviewContext.js +1 -370
- package/dist/cjs/contexts/CartLineContext.js +1 -29
- package/dist/cjs/contexts/CollectionContext.js +1 -38
- package/dist/cjs/contexts/ModalContext.js +1 -47
- package/dist/cjs/contexts/ProductContext.js +1 -149
- package/dist/cjs/contexts/ProductListContext.js +1 -32
- package/dist/cjs/contexts/SectionContext.js +1 -53
- package/dist/cjs/contexts/ShopContext.js +1 -70
- package/dist/cjs/graphql/fragments/analytic.generated.js +2 -6
- package/dist/cjs/graphql/fragments/collection-detail.generated.js +2 -6
- package/dist/cjs/graphql/fragments/collection-product.generated.js +2 -6
- package/dist/cjs/graphql/fragments/collection.generated.js +2 -6
- package/dist/cjs/graphql/fragments/custom-code.generated.js +2 -6
- package/dist/cjs/graphql/fragments/data-seo.generated.js +2 -6
- package/dist/cjs/graphql/fragments/media.generated.js +3 -6
- package/dist/cjs/graphql/fragments/product-little.generated.js +2 -6
- package/dist/cjs/graphql/fragments/product-option-value.generated.js +2 -6
- package/dist/cjs/graphql/fragments/product-option.generated.js +2 -6
- package/dist/cjs/graphql/fragments/product.generated.js +2 -6
- package/dist/cjs/graphql/fragments/published-custom-section.generated.js +2 -6
- package/dist/cjs/graphql/fragments/published-page-section.generated.js +2 -6
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +2 -6
- package/dist/cjs/graphql/fragments/published-theme-style.generated.js +2 -6
- package/dist/cjs/graphql/fragments/selected-option.generated.js +2 -6
- package/dist/cjs/graphql/fragments/variant.generated.js +2 -6
- package/dist/cjs/graphql/mutations/page-view-up.generated.js +3 -7
- package/dist/cjs/graphql/queries/collection-detail-filter.generated.js +2 -16
- package/dist/cjs/graphql/queries/collection.generated.js +2 -14
- package/dist/cjs/graphql/queries/collections.generated.js +2 -9
- package/dist/cjs/graphql/queries/preview-page.generated.js +2 -14
- package/dist/cjs/graphql/queries/product-little-detail.generated.js +2 -11
- package/dist/cjs/graphql/queries/product-medias.generated.js +2 -8
- package/dist/cjs/graphql/queries/product-value-label.generated.js +7 -0
- package/dist/cjs/graphql/queries/product-variants.generated.js +2 -10
- package/dist/cjs/graphql/queries/products.generated.js +3 -17
- package/dist/cjs/graphql/queries/published-theme-pages.generated.js +2 -14
- package/dist/cjs/graphql/queries/store-property.generated.js +2 -6
- package/dist/cjs/helpers/GlobalEvent.js +1 -19
- package/dist/cjs/helpers/background.js +1 -109
- package/dist/cjs/helpers/borders.js +4 -183
- package/dist/cjs/helpers/clone-deep.js +1 -5
- package/dist/cjs/helpers/cls.js +1 -16
- package/dist/cjs/helpers/colors.js +1 -183
- package/dist/cjs/helpers/compose-advance-style.js +1 -188
- package/dist/cjs/helpers/constant.js +1 -23
- package/dist/cjs/helpers/convert.js +1 -7
- package/dist/cjs/helpers/css-variable.js +1 -7
- package/dist/cjs/helpers/email.js +1 -11
- package/dist/cjs/helpers/flatten-connection.js +1 -9
- package/dist/cjs/helpers/get-resonsive-value.js +1 -31
- package/dist/cjs/helpers/get-shortname.js +1 -92
- package/dist/cjs/helpers/is-browser.js +1 -9
- package/dist/cjs/helpers/is-defined.js +1 -7
- package/dist/cjs/helpers/is-empty-children.js +1 -12
- package/dist/cjs/helpers/is-safari.js +1 -9
- package/dist/cjs/helpers/layout.js +1 -59
- package/dist/cjs/helpers/load-script.js +1 -31
- package/dist/cjs/helpers/make-style.js +1 -128
- package/dist/cjs/helpers/normalize-builder-data.js +1 -23
- package/dist/cjs/helpers/prefetch-queries.js +1 -78
- package/dist/cjs/helpers/product.js +1 -45
- package/dist/cjs/helpers/queries/get-collection.js +1 -220
- package/dist/cjs/helpers/queries/get-collections.js +1 -21
- package/dist/cjs/helpers/queries/get-product-by-slug.js +1 -125
- package/dist/cjs/helpers/queries/get-product.js +1 -154
- package/dist/cjs/helpers/queries/get-products.js +1 -161
- package/dist/cjs/helpers/query.js +1 -29
- package/dist/cjs/helpers/radius.js +6 -134
- package/dist/cjs/helpers/render.js +1 -71
- package/dist/cjs/helpers/shadow.js +1 -56
- package/dist/cjs/helpers/size.js +4 -35
- package/dist/cjs/helpers/spacing.js +1 -43
- package/dist/cjs/helpers/tracking/fpixel.js +1 -28
- package/dist/cjs/helpers/tracking/gtag.js +1 -93
- package/dist/cjs/helpers/tracking/tiktokpixel.js +1 -17
- package/dist/cjs/helpers/typography.js +17 -105
- package/dist/cjs/helpers/variant.js +1 -8
- package/dist/cjs/hooks/cart/use-add-to-cart.js +1 -20
- package/dist/cjs/hooks/cart/use-cart-data.js +1 -28
- package/dist/cjs/hooks/cart/use-cart-discount-codes-update.js +1 -20
- package/dist/cjs/hooks/cart/use-cart-note-update.js +1 -20
- package/dist/cjs/hooks/cart/use-create-cart.js +1 -22
- package/dist/cjs/hooks/cart/use-remove-cart-item.js +1 -20
- package/dist/cjs/hooks/cart/use-update-cart-item.js +1 -20
- package/dist/cjs/hooks/shop/use-collection-query.js +1 -22
- package/dist/cjs/hooks/shop/use-collections-query.js +1 -17
- package/dist/cjs/hooks/shop/use-product-query.js +1 -22
- package/dist/cjs/hooks/shop/use-products-query.js +1 -22
- package/dist/cjs/hooks/shop.js +1 -126
- package/dist/cjs/hooks/use-current-device.js +1 -21
- package/dist/cjs/hooks/use-lazy-video.js +1 -15
- package/dist/cjs/hooks/useCartId.js +1 -44
- package/dist/cjs/hooks/useCartLine.js +1 -11
- package/dist/cjs/hooks/useCartUI.js +1 -48
- package/dist/cjs/hooks/useCollection.js +1 -9
- package/dist/cjs/hooks/useFetchHandle.js +1 -13
- package/dist/cjs/hooks/useFormatMoney.js +1 -58
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +1 -0
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +1 -10
- package/dist/cjs/hooks/useLoadScript.js +1 -32
- package/dist/cjs/hooks/useMoney.js +1 -84
- package/dist/cjs/hooks/usePrevious.js +1 -19
- package/dist/cjs/hooks/useProduct.js +1 -124
- package/dist/cjs/hooks/useProductList.js +1 -21
- package/dist/cjs/hooks/useSuspenseFetch.js +1 -27
- package/dist/cjs/hooks/useSwatchesOptions.js +1 -41
- package/dist/cjs/index.js +1 -291
- package/dist/cjs/types/global-style.js +1 -14
- package/dist/cjs/types/shop.js +1 -2
- package/dist/esm/components/AddOn.js +1 -14
- package/dist/esm/components/ComponentWrapper.js +1 -24
- package/dist/esm/components/ComponentWrapperPreview.js +1 -68
- package/dist/esm/components/Empty.js +1 -3
- package/dist/esm/components/Render.js +1 -61
- package/dist/esm/components/Render.liquid.js +15 -153
- package/dist/esm/components/RenderBlock.js +1 -50
- package/dist/esm/components/RenderCustomCode.js +5 -0
- package/dist/esm/components/RenderPreview.js +1 -62
- package/dist/esm/components/RenderSection.js +1 -19
- package/dist/esm/components/constant.js +1 -37
- package/dist/esm/components/src/product/helpers/variant-presets.js +1 -0
- package/dist/esm/contexts/AddonContext.js +1 -32
- package/dist/esm/contexts/BuilderComponent.js +1 -31
- package/dist/esm/contexts/BuilderContext.js +1 -32
- package/dist/esm/contexts/BuilderPreviewContext.js +1 -367
- package/dist/esm/contexts/CartLineContext.js +1 -26
- package/dist/esm/contexts/CollectionContext.js +1 -35
- package/dist/esm/contexts/ModalContext.js +1 -44
- package/dist/esm/contexts/ProductContext.js +1 -146
- package/dist/esm/contexts/ProductListContext.js +1 -28
- package/dist/esm/contexts/SectionContext.js +1 -49
- package/dist/esm/contexts/ShopContext.js +1 -67
- package/dist/esm/graphql/fragments/analytic.generated.js +2 -4
- package/dist/esm/graphql/fragments/collection-detail.generated.js +2 -4
- package/dist/esm/graphql/fragments/collection-product.generated.js +2 -4
- package/dist/esm/graphql/fragments/collection.generated.js +2 -4
- package/dist/esm/graphql/fragments/custom-code.generated.js +2 -4
- package/dist/esm/graphql/fragments/data-seo.generated.js +2 -4
- package/dist/esm/graphql/fragments/media.generated.js +3 -4
- package/dist/esm/graphql/fragments/product-little.generated.js +2 -4
- package/dist/esm/graphql/fragments/product-option-value.generated.js +2 -4
- package/dist/esm/graphql/fragments/product-option.generated.js +2 -4
- package/dist/esm/graphql/fragments/product.generated.js +2 -4
- package/dist/esm/graphql/fragments/published-custom-section.generated.js +2 -4
- package/dist/esm/graphql/fragments/published-page-section.generated.js +2 -4
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +2 -4
- package/dist/esm/graphql/fragments/published-theme-style.generated.js +2 -4
- package/dist/esm/graphql/fragments/selected-option.generated.js +2 -4
- package/dist/esm/graphql/fragments/variant.generated.js +2 -4
- package/dist/esm/graphql/mutations/page-view-up.generated.js +3 -5
- package/dist/esm/graphql/queries/collection-detail-filter.generated.js +10 -22
- package/dist/esm/graphql/queries/collection.generated.js +8 -18
- package/dist/esm/graphql/queries/collections.generated.js +3 -8
- package/dist/esm/graphql/queries/preview-page.generated.js +8 -18
- package/dist/esm/graphql/queries/product-little-detail.generated.js +5 -12
- package/dist/esm/graphql/queries/product-medias.generated.js +2 -6
- package/dist/esm/graphql/queries/product-value-label.generated.js +7 -0
- package/dist/esm/graphql/queries/product-variants.generated.js +4 -10
- package/dist/esm/graphql/queries/products.generated.js +9 -20
- package/dist/esm/graphql/queries/published-theme-pages.generated.js +8 -18
- package/dist/esm/graphql/queries/store-property.generated.js +2 -4
- package/dist/esm/helpers/GlobalEvent.js +1 -15
- package/dist/esm/helpers/background.js +1 -106
- package/dist/esm/helpers/borders.js +4 -175
- package/dist/esm/helpers/clone-deep.js +1 -3
- package/dist/esm/helpers/cls.js +1 -14
- package/dist/esm/helpers/colors.js +1 -168
- package/dist/esm/helpers/compose-advance-style.js +1 -185
- package/dist/esm/helpers/constant.js +1 -19
- package/dist/esm/helpers/convert.js +1 -4
- package/dist/esm/helpers/css-variable.js +1 -5
- package/dist/esm/helpers/email.js +1 -6
- package/dist/esm/helpers/flatten-connection.js +1 -7
- package/dist/esm/helpers/get-resonsive-value.js +1 -27
- package/dist/esm/helpers/get-shortname.js +1 -90
- package/dist/esm/helpers/is-browser.js +1 -5
- package/dist/esm/helpers/is-defined.js +1 -5
- package/dist/esm/helpers/is-empty-children.js +1 -7
- package/dist/esm/helpers/is-safari.js +1 -5
- package/dist/esm/helpers/layout.js +1 -54
- package/dist/esm/helpers/load-script.js +1 -29
- package/dist/esm/helpers/make-style.js +1 -117
- package/dist/esm/helpers/normalize-builder-data.js +1 -21
- package/dist/esm/helpers/prefetch-queries.js +1 -76
- package/dist/esm/helpers/product.js +1 -41
- package/dist/esm/helpers/queries/get-collection.js +1 -217
- package/dist/esm/helpers/queries/get-collections.js +1 -19
- package/dist/esm/helpers/queries/get-product-by-slug.js +1 -123
- package/dist/esm/helpers/queries/get-product.js +1 -150
- package/dist/esm/helpers/queries/get-products.js +1 -159
- package/dist/esm/helpers/query.js +1 -25
- package/dist/esm/helpers/radius.js +6 -127
- package/dist/esm/helpers/render.js +1 -64
- package/dist/esm/helpers/shadow.js +1 -51
- package/dist/esm/helpers/size.js +4 -31
- package/dist/esm/helpers/spacing.js +1 -40
- package/dist/esm/helpers/tracking/fpixel.js +1 -24
- package/dist/esm/helpers/tracking/gtag.js +1 -87
- package/dist/esm/helpers/tracking/tiktokpixel.js +1 -15
- package/dist/esm/helpers/typography.js +17 -96
- package/dist/esm/helpers/variant.js +1 -6
- package/dist/esm/hooks/cart/use-add-to-cart.js +1 -18
- package/dist/esm/hooks/cart/use-cart-data.js +1 -26
- package/dist/esm/hooks/cart/use-cart-discount-codes-update.js +1 -18
- package/dist/esm/hooks/cart/use-cart-note-update.js +1 -18
- package/dist/esm/hooks/cart/use-create-cart.js +1 -20
- package/dist/esm/hooks/cart/use-remove-cart-item.js +1 -18
- package/dist/esm/hooks/cart/use-update-cart-item.js +1 -18
- package/dist/esm/hooks/shop/use-collection-query.js +1 -20
- package/dist/esm/hooks/shop/use-collections-query.js +1 -15
- package/dist/esm/hooks/shop/use-product-query.js +1 -20
- package/dist/esm/hooks/shop/use-products-query.js +1 -20
- package/dist/esm/hooks/shop.js +1 -111
- package/dist/esm/hooks/use-current-device.js +1 -19
- package/dist/esm/hooks/use-lazy-video.js +1 -13
- package/dist/esm/hooks/useCartId.js +1 -40
- package/dist/esm/hooks/useCartLine.js +1 -7
- package/dist/esm/hooks/useCartUI.js +1 -44
- package/dist/esm/hooks/useCollection.js +1 -7
- package/dist/esm/hooks/useFetchHandle.js +1 -11
- package/dist/esm/hooks/useFormatMoney.js +1 -56
- package/dist/esm/hooks/useInitialSwatchesOptions.js +1 -0
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +1 -6
- package/dist/esm/hooks/useLoadScript.js +1 -28
- package/dist/esm/hooks/useMoney.js +1 -80
- package/dist/esm/hooks/usePrevious.js +1 -17
- package/dist/esm/hooks/useProduct.js +1 -111
- package/dist/esm/hooks/useProductList.js +1 -16
- package/dist/esm/hooks/useSuspenseFetch.js +1 -23
- package/dist/esm/hooks/useSwatchesOptions.js +1 -37
- package/dist/esm/index.js +1 -92
- package/dist/esm/types/global-style.js +1 -11
- package/dist/types/index.d.ts +1212 -1031
- package/package.json +3 -3
|
@@ -1,149 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var zustand = require('zustand');
|
|
5
|
-
var react = require('react');
|
|
6
|
-
var flattenConnection = require('../helpers/flatten-connection.js');
|
|
7
|
-
var variant = require('../helpers/variant.js');
|
|
8
|
-
|
|
9
|
-
// const { Provider, useStore } = createContext<StoreApi<ProductContextProps>>();
|
|
10
|
-
const ProductContext = /*#__PURE__*/ react.createContext(null);
|
|
11
|
-
const createProductStoreProvider = (data)=>zustand.createStore((set, get)=>({
|
|
12
|
-
...data,
|
|
13
|
-
updateProperty: (name, data)=>{
|
|
14
|
-
set((state)=>{
|
|
15
|
-
return {
|
|
16
|
-
properties: state.properties?.map((v)=>{
|
|
17
|
-
if (v.key === name) {
|
|
18
|
-
return {
|
|
19
|
-
...v,
|
|
20
|
-
...data
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
return v;
|
|
24
|
-
})
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
addProperty: (data)=>{
|
|
29
|
-
const properties = get().properties;
|
|
30
|
-
if (!properties?.some((v)=>v.key === data.key)) {
|
|
31
|
-
set((state)=>({
|
|
32
|
-
properties: [
|
|
33
|
-
...state.properties ?? [],
|
|
34
|
-
data
|
|
35
|
-
]
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
removeProperty: (name)=>{
|
|
40
|
-
set((state)=>({
|
|
41
|
-
properties: state.properties?.filter((v)=>v.key !== name)
|
|
42
|
-
}));
|
|
43
|
-
},
|
|
44
|
-
setQuantity: (num)=>{
|
|
45
|
-
set({
|
|
46
|
-
quantity: num > 0 ? num : 1
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
setProductFeaturedImage: (image)=>{
|
|
50
|
-
set({
|
|
51
|
-
featuredImageGlobal: image
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
incrementQuantity: ()=>{
|
|
55
|
-
set((state)=>{
|
|
56
|
-
const quantity = state.quantity ?? 1;
|
|
57
|
-
return {
|
|
58
|
-
quantity: quantity + 1
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
decrementQuantity: ()=>{
|
|
63
|
-
set((state)=>{
|
|
64
|
-
const quantity = state.quantity ?? 1;
|
|
65
|
-
return {
|
|
66
|
-
quantity: quantity > 2 ? quantity - 1 : 1
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
setSelectedOption: (optionId, optionValue)=>{
|
|
71
|
-
set((state)=>{
|
|
72
|
-
if (optionId && optionValue) {
|
|
73
|
-
return {
|
|
74
|
-
selectedOptions: {
|
|
75
|
-
...state?.selectedOptions,
|
|
76
|
-
[optionId]: optionValue
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
return state;
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
forceSelectedOption: (value)=>{
|
|
84
|
-
set((state)=>{
|
|
85
|
-
return {
|
|
86
|
-
selectedOptions: {
|
|
87
|
-
...state?.selectedOptions,
|
|
88
|
-
...value
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
});
|
|
92
|
-
},
|
|
93
|
-
updateIsSubmit: (value)=>{
|
|
94
|
-
set({
|
|
95
|
-
isSubmit: value
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
99
|
-
const ProductProvider = ({ children, product, initialVariantId, quantity = 1 })=>{
|
|
100
|
-
const uiqueId = react.useId();
|
|
101
|
-
const store = react.useMemo(()=>{
|
|
102
|
-
let selectedOptions = {};
|
|
103
|
-
let featuredImageGlobal = undefined;
|
|
104
|
-
if (product) {
|
|
105
|
-
const variants = flattenConnection.flattenConnection(product.variants);
|
|
106
|
-
const firstVariant = variants[0];
|
|
107
|
-
const firstVariantInStock = variants.find((item)=>variant.checkInStock(item));
|
|
108
|
-
const initialVariant = variants.find((v)=>v?.id === initialVariantId) ?? firstVariantInStock ?? firstVariant;
|
|
109
|
-
selectedOptions = initialVariant?.selectedOptions.reduce((acc, option)=>{
|
|
110
|
-
if (option.name) {
|
|
111
|
-
return {
|
|
112
|
-
...acc,
|
|
113
|
-
[option.name]: option.value
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
return acc;
|
|
117
|
-
}, {});
|
|
118
|
-
featuredImageGlobal = product.medias?.edges.find((v)=>v.node?.id === initialVariant?.mediaId)?.node ?? product.featuredImage;
|
|
119
|
-
}
|
|
120
|
-
return createProductStoreProvider({
|
|
121
|
-
product,
|
|
122
|
-
quantity,
|
|
123
|
-
selectedOptions,
|
|
124
|
-
uiqueId,
|
|
125
|
-
featuredImageGlobal
|
|
126
|
-
});
|
|
127
|
-
}, [
|
|
128
|
-
initialVariantId,
|
|
129
|
-
product,
|
|
130
|
-
quantity,
|
|
131
|
-
uiqueId
|
|
132
|
-
]);
|
|
133
|
-
return /*#__PURE__*/ jsxRuntime.jsx(ProductContext.Provider, {
|
|
134
|
-
value: store,
|
|
135
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
136
|
-
children: children
|
|
137
|
-
})
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
const useProductStore = (selector, equalityFn)=>{
|
|
141
|
-
const store = react.useContext(ProductContext);
|
|
142
|
-
if (!store) {
|
|
143
|
-
throw new Error('Element of product must be used inside a Product');
|
|
144
|
-
}
|
|
145
|
-
return zustand.useStore(store, selector, equalityFn);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
exports.ProductProvider = ProductProvider;
|
|
149
|
-
exports.useProductStore = useProductStore;
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),zustand=require("zustand"),react=require("react"),flattenConnection=require("../helpers/flatten-connection.js"),variant=require("../helpers/variant.js");const ProductContext=react.createContext(null),createProductStoreProvider=e=>zustand.createStore((t,r)=>({...e,updateProperty:(e,r)=>{t(t=>({properties:t.properties?.map(t=>t.key===e?{...t,...r}:t)}))},addProperty:e=>{let n=r().properties;n?.some(t=>t.key===e.key)||t(t=>({properties:[...t.properties??[],e]}))},removeProperty:e=>{t(t=>({properties:t.properties?.filter(t=>t.key!==e)}))},setQuantity:e=>{t({quantity:e>0?e:1})},setProductFeaturedImage:e=>{t({featuredImageGlobal:e})},incrementQuantity:()=>{t(e=>{let t=e.quantity??1;return{quantity:t+1}})},decrementQuantity:()=>{t(e=>{let t=e.quantity??1;return{quantity:t>2?t-1:1}})},setSelectedOption:(e,r)=>{t(t=>e&&r?{selectedOptions:{...t?.selectedOptions,[e]:r}}:t)},forceSelectedOption:e=>{t(t=>({selectedOptions:{...t?.selectedOptions,...e}}))},updateIsSubmit:e=>{t({isSubmit:e})}})),ProductProvider=({children:e,product:t,initialVariantId:r,quantity:n=1,isSyncProduct:o})=>{let i=react.useId(),u=react.useMemo(()=>{let e,u={};if(t){let n=flattenConnection.flattenConnection(t.variants),o=n[0],i=n.find(e=>variant.checkInStock(e)),d=n.find(e=>e?.id===r)??i??o;u=d?.selectedOptions.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{}),e=t.medias?.edges.find(e=>e.node?.id===d?.mediaId)?.node??t.featuredImage}return createProductStoreProvider({product:t,quantity:n,selectedOptions:u,uiqueId:i,featuredImageGlobal:e,isSyncProduct:o})},[r,t,n,i,o]);return jsxRuntime.jsx(ProductContext.Provider,{value:u,children:jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})})},useProductStore=(e,t)=>{let r=react.useContext(ProductContext);if(!r)throw Error("Element of product must be used inside a Product");return zustand.useStore(r,e,t)};exports.ProductProvider=ProductProvider,exports.useProductStore=useProductStore;
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var zustand = require('zustand');
|
|
6
|
-
|
|
7
|
-
const ProductListContext = /*#__PURE__*/ react.createContext(null);
|
|
8
|
-
const createProductListProvider = (data)=>zustand.createStore(()=>({
|
|
9
|
-
...data
|
|
10
|
-
}));
|
|
11
|
-
const ProductListProvider = ({ children, collection, products, settings, styles })=>{
|
|
12
|
-
return /*#__PURE__*/ jsxRuntime.jsx(ProductListContext.Provider, {
|
|
13
|
-
value: createProductListProvider({
|
|
14
|
-
products,
|
|
15
|
-
collection,
|
|
16
|
-
settings,
|
|
17
|
-
styles
|
|
18
|
-
}),
|
|
19
|
-
children: children
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
const useProductListStore = (selector, equalityFn)=>{
|
|
23
|
-
const store = react.useContext(ProductListContext);
|
|
24
|
-
if (!store) {
|
|
25
|
-
throw new Error('useProductListStore must be used within a useProductListStore');
|
|
26
|
-
}
|
|
27
|
-
return zustand.useStore(store, selector, equalityFn);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.ProductListContext = ProductListContext;
|
|
31
|
-
exports.ProductListProvider = ProductListProvider;
|
|
32
|
-
exports.useProductListStore = useProductListStore;
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),zustand=require("zustand");const ProductListContext=react.createContext(null),createProductListProvider=t=>zustand.createStore(()=>({...t})),ProductListProvider=({children:t,collection:r,products:e,settings:o,styles:s})=>jsxRuntime.jsx(ProductListContext.Provider,{value:createProductListProvider({products:e,collection:r,settings:o,styles:s}),children:t}),useProductListStore=(t,r)=>{let e=react.useContext(ProductListContext);if(!e)throw Error("useProductListStore must be used within a useProductListStore");return zustand.useStore(e,t,r)};exports.ProductListContext=ProductListContext,exports.ProductListProvider=ProductListProvider,exports.useProductListStore=useProductListStore;
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var zustand = require('zustand');
|
|
5
|
-
var react = require('react');
|
|
6
|
-
var cloneDeep = require('../helpers/clone-deep.js');
|
|
7
|
-
var normalizeBuilderData = require('../helpers/normalize-builder-data.js');
|
|
8
|
-
|
|
9
|
-
const SectionContext = /*#__PURE__*/ react.createContext(null);
|
|
10
|
-
const createSectionProvider = (data)=>zustand.createStore((set, get)=>({
|
|
11
|
-
data: data ?? {},
|
|
12
|
-
getSection: (id)=>{
|
|
13
|
-
const section = get().data[id];
|
|
14
|
-
return section ?? undefined;
|
|
15
|
-
},
|
|
16
|
-
addSection: (id, data)=>{
|
|
17
|
-
const item = normalizeBuilderData.normalizeBuilderData(data);
|
|
18
|
-
set((prev)=>({
|
|
19
|
-
data: {
|
|
20
|
-
...prev.data,
|
|
21
|
-
[id]: cloneDeep.cloneDeep(item)
|
|
22
|
-
}
|
|
23
|
-
}));
|
|
24
|
-
},
|
|
25
|
-
removeSection: (id)=>{
|
|
26
|
-
set((prev)=>{
|
|
27
|
-
const { [id]: _, ...rest } = prev.data;
|
|
28
|
-
return {
|
|
29
|
-
data: rest
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}));
|
|
34
|
-
const SectionProvider = ({ children, data, ...passProps })=>{
|
|
35
|
-
return /*#__PURE__*/ jsxRuntime.jsx(SectionContext.Provider, {
|
|
36
|
-
...passProps,
|
|
37
|
-
value: createSectionProvider(data),
|
|
38
|
-
children: children
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
// export const useSectionStore = useStore;
|
|
42
|
-
const useSectionStore = (selector, equalityFn)=>{
|
|
43
|
-
const store = react.useContext(SectionContext);
|
|
44
|
-
if (!store) {
|
|
45
|
-
throw new Error('useSectionStore must be used within a SectionProvider');
|
|
46
|
-
}
|
|
47
|
-
return zustand.useStore(store, selector, equalityFn);
|
|
48
|
-
};
|
|
49
|
-
const useSection = (id)=>useSectionStore((s)=>s.getSection(id));
|
|
50
|
-
|
|
51
|
-
exports.SectionProvider = SectionProvider;
|
|
52
|
-
exports.useSection = useSection;
|
|
53
|
-
exports.useSectionStore = useSectionStore;
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),zustand=require("zustand"),react=require("react"),cloneDeep=require("../helpers/clone-deep.js"),normalizeBuilderData=require("../helpers/normalize-builder-data.js");const SectionContext=react.createContext(null),createSectionProvider=e=>zustand.createStore((t,r)=>({data:e??{},getSection:e=>{let t=r().data[e];return t??void 0},addSection:(e,r)=>{let o=normalizeBuilderData.normalizeBuilderData(r);t(t=>({data:{...t.data,[e]:cloneDeep.cloneDeep(o)}}))},removeSection:e=>{t(t=>{let{[e]:r,...o}=t.data;return{data:o}})}})),SectionProvider=({children:e,data:t,...r})=>jsxRuntime.jsx(SectionContext.Provider,{...r,value:createSectionProvider(t),children:e}),useSectionStore=(e,t)=>{let r=react.useContext(SectionContext);if(!r)throw Error("useSectionStore must be used within a SectionProvider");return zustand.useStore(r,e,t)},useSection=e=>useSectionStore(t=>t.getSection(e));exports.SectionProvider=SectionProvider,exports.useSection=useSection,exports.useSectionStore=useSectionStore;
|
|
@@ -1,70 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var useSWR = require('swr');
|
|
5
|
-
var zustand = require('zustand');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var AddonContext = require('./AddonContext.js');
|
|
8
|
-
var ModalContext = require('./ModalContext.js');
|
|
9
|
-
|
|
10
|
-
const ShopContext = /*#__PURE__*/ react.createContext(null);
|
|
11
|
-
const createShopStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
12
|
-
mobileOnly: false,
|
|
13
|
-
isStorefront: true,
|
|
14
|
-
...data,
|
|
15
|
-
changeLocale: (locale)=>{
|
|
16
|
-
set({
|
|
17
|
-
locale
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
changeCurrency: (currency)=>{
|
|
21
|
-
set({
|
|
22
|
-
currency
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
changeSwatches: (swatches)=>{
|
|
26
|
-
set({
|
|
27
|
-
swatches
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
changeLayoutSettings: (layoutSettings)=>{
|
|
31
|
-
set({
|
|
32
|
-
layoutSettings
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
changeStorefrontInfo: ({ url, token })=>{
|
|
36
|
-
set({
|
|
37
|
-
storefrontUrl: url,
|
|
38
|
-
storefrontToken: token
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}));
|
|
42
|
-
const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps })=>{
|
|
43
|
-
const store = react.useMemo(()=>createShopStoreProvider(storeOption), [
|
|
44
|
-
storeOption
|
|
45
|
-
]);
|
|
46
|
-
return /*#__PURE__*/ jsxRuntime.jsx(AddonContext.AddonProvider, {
|
|
47
|
-
components: addons,
|
|
48
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(useSWR.SWRConfig, {
|
|
49
|
-
value: queryOption,
|
|
50
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(ShopContext.Provider, {
|
|
51
|
-
...passProps,
|
|
52
|
-
value: store,
|
|
53
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(ModalContext.ModalProvider, {
|
|
54
|
-
children: children
|
|
55
|
-
})
|
|
56
|
-
}, JSON.stringify(storeOption))
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
// export const useShopStore = useStore;
|
|
61
|
-
const useShopStore = (selector, equalityFn)=>{
|
|
62
|
-
const store = react.useContext(ShopContext);
|
|
63
|
-
if (!store) {
|
|
64
|
-
throw new Error('useShopStore must be used within a ShopProvider');
|
|
65
|
-
}
|
|
66
|
-
return zustand.useStore(store, selector, equalityFn);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
exports.ShopProvider = ShopProvider;
|
|
70
|
-
exports.useShopStore = useShopStore;
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),useSWR=require("swr"),zustand=require("zustand"),react=require("react"),AddonContext=require("./AddonContext.js"),ModalContext=require("./ModalContext.js");const ShopContext=react.createContext(null),createShopStoreProvider=e=>zustand.createStore(r=>({mobileOnly:!1,isStorefront:!0,...e,changeLocale:e=>{r({locale:e})},changeCurrency:e=>{r({currency:e})},changeSwatches:e=>{r({swatches:e})},changeLayoutSettings:e=>{r({layoutSettings:e})},changeStorefrontInfo:({url:e,token:t})=>{r({storefrontUrl:e,storefrontToken:t})}})),ShopProvider=({children:e,addons:r,storeOption:t,queryOption:o,...n})=>{let s=react.useMemo(()=>createShopStoreProvider(t),[t]);return jsxRuntime.jsx(AddonContext.AddonProvider,{components:r,children:jsxRuntime.jsx(useSWR.SWRConfig,{value:o,children:jsxRuntime.jsx(ShopContext.Provider,{...n,value:s,children:jsxRuntime.jsx(ModalContext.ModalProvider,{children:e})},JSON.stringify(t))})})},useShopStore=(e,r)=>{let t=react.useContext(ShopContext);if(!t)throw Error("useShopStore must be used within a ShopProvider");return zustand.useStore(t,e,r)};exports.ShopProvider=ShopProvider,exports.useShopStore=useShopStore;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const AnalyticSelect = `
|
|
1
|
+
"use strict";const AnalyticSelect=`
|
|
4
2
|
fragment AnalyticSelect on Analytic {
|
|
5
3
|
fbPixelID
|
|
6
4
|
gaTrackingID
|
|
7
5
|
tiktokPixelID
|
|
8
6
|
}
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
exports.AnalyticSelect = AnalyticSelect;
|
|
7
|
+
`;exports.AnalyticSelect=AnalyticSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const CollectionDetailSelect = `
|
|
1
|
+
"use strict";const CollectionDetailSelect=`
|
|
4
2
|
fragment CollectionDetailSelect on Collection {
|
|
5
3
|
id
|
|
6
4
|
createdAt
|
|
@@ -22,6 +20,4 @@
|
|
|
22
20
|
isStorefront
|
|
23
21
|
isSample
|
|
24
22
|
}
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
exports.CollectionDetailSelect = CollectionDetailSelect;
|
|
23
|
+
`;exports.CollectionDetailSelect=CollectionDetailSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const CollectionProductSelect = `
|
|
1
|
+
"use strict";const CollectionProductSelect=`
|
|
4
2
|
fragment CollectionProductSelect on Collection {
|
|
5
3
|
...CollectionDetailSelect
|
|
6
4
|
products(
|
|
@@ -21,6 +19,4 @@
|
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
exports.CollectionProductSelect = CollectionProductSelect;
|
|
22
|
+
`;exports.CollectionProductSelect=CollectionProductSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const CollectionSelect = `
|
|
1
|
+
"use strict";const CollectionSelect=`
|
|
4
2
|
fragment CollectionSelect on Collection {
|
|
5
3
|
...CollectionDetailSelect
|
|
6
4
|
products {
|
|
@@ -19,6 +17,4 @@
|
|
|
19
17
|
totalCount
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
exports.CollectionSelect = CollectionSelect;
|
|
20
|
+
`;exports.CollectionSelect=CollectionSelect;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const CustomCodeSelect = `
|
|
1
|
+
"use strict";const CustomCodeSelect=`
|
|
4
2
|
fragment CustomCodeSelect on CustomCode {
|
|
5
3
|
body
|
|
6
4
|
header
|
|
7
5
|
}
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
exports.CustomCodeSelect = CustomCodeSelect;
|
|
6
|
+
`;exports.CustomCodeSelect=CustomCodeSelect;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const MediaSelect = `
|
|
1
|
+
"use strict";const MediaSelect=`
|
|
4
2
|
fragment MediaSelect on Media {
|
|
5
3
|
id
|
|
6
4
|
contentType
|
|
5
|
+
previewImage
|
|
7
6
|
src
|
|
8
7
|
width
|
|
9
8
|
height
|
|
10
9
|
alt
|
|
11
10
|
}
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
exports.MediaSelect = MediaSelect;
|
|
11
|
+
`;exports.MediaSelect=MediaSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const ProductLittleSelect = `
|
|
1
|
+
"use strict";const ProductLittleSelect=`
|
|
4
2
|
fragment ProductLittleSelect on Product {
|
|
5
3
|
id
|
|
6
4
|
title
|
|
@@ -20,6 +18,4 @@
|
|
|
20
18
|
...MediaSelect
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
exports.ProductLittleSelect = ProductLittleSelect;
|
|
21
|
+
`;exports.ProductLittleSelect=ProductLittleSelect;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const ProductOptionValueSelect = `
|
|
1
|
+
"use strict";const ProductOptionValueSelect=`
|
|
4
2
|
fragment ProductOptionValueSelect on ProductOptionValue {
|
|
5
3
|
id
|
|
6
4
|
label
|
|
7
5
|
isDefault
|
|
8
6
|
baseID
|
|
9
7
|
}
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
exports.ProductOptionValueSelect = ProductOptionValueSelect;
|
|
8
|
+
`;exports.ProductOptionValueSelect=ProductOptionValueSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const ProductOptionSelect = `
|
|
1
|
+
"use strict";const ProductOptionSelect=`
|
|
4
2
|
fragment ProductOptionSelect on ProductOption {
|
|
5
3
|
id
|
|
6
4
|
name
|
|
@@ -9,6 +7,4 @@
|
|
|
9
7
|
...ProductOptionValueSelect
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
exports.ProductOptionSelect = ProductOptionSelect;
|
|
10
|
+
`;exports.ProductOptionSelect=ProductOptionSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const ProductSelect = `
|
|
1
|
+
"use strict";const ProductSelect=`
|
|
4
2
|
fragment ProductSelect on Product {
|
|
5
3
|
...ProductLittleSelect
|
|
6
4
|
medias(first: $firstMedia, after: $afterMedia, orderBy: $orderByMedia) {
|
|
@@ -28,6 +26,4 @@
|
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
exports.ProductSelect = ProductSelect;
|
|
29
|
+
`;exports.ProductSelect=ProductSelect;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const PublishedCustomSectionSelect = `
|
|
1
|
+
"use strict";const PublishedCustomSectionSelect=`
|
|
4
2
|
fragment PublishedCustomSectionSelect on PublishedCustomSection {
|
|
5
3
|
cid
|
|
6
4
|
component
|
|
7
5
|
id
|
|
8
6
|
type
|
|
9
7
|
}
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
exports.PublishedCustomSectionSelect = PublishedCustomSectionSelect;
|
|
8
|
+
`;exports.PublishedCustomSectionSelect=PublishedCustomSectionSelect;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const PublishedPageSectionSelect = `
|
|
1
|
+
"use strict";const PublishedPageSectionSelect=`
|
|
4
2
|
fragment PublishedPageSectionSelect on PublishedPageSection {
|
|
5
3
|
cid
|
|
6
4
|
component
|
|
7
5
|
id
|
|
8
6
|
}
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
exports.PublishedPageSectionSelect = PublishedPageSectionSelect;
|
|
7
|
+
`;exports.PublishedPageSectionSelect=PublishedPageSectionSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const PublishedThemePageSelect = `
|
|
1
|
+
"use strict";const PublishedThemePageSelect=`
|
|
4
2
|
fragment PublishedThemePageSelect on PublishedThemePage {
|
|
5
3
|
id
|
|
6
4
|
name
|
|
@@ -26,6 +24,4 @@
|
|
|
26
24
|
...CustomCodeSelect
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
exports.PublishedThemePageSelect = PublishedThemePageSelect;
|
|
27
|
+
`;exports.PublishedThemePageSelect=PublishedThemePageSelect;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const PublishedThemeStyleSelect = `
|
|
1
|
+
"use strict";const PublishedThemeStyleSelect=`
|
|
4
2
|
fragment PublishedThemeStyleSelect on PublishedThemeStyle {
|
|
5
3
|
id
|
|
6
4
|
data
|
|
7
5
|
name
|
|
8
6
|
}
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
exports.PublishedThemeStyleSelect = PublishedThemeStyleSelect;
|
|
7
|
+
`;exports.PublishedThemeStyleSelect=PublishedThemeStyleSelect;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const SelectedOptionSelect = `
|
|
1
|
+
"use strict";const SelectedOptionSelect=`
|
|
4
2
|
fragment SelectedOptionSelect on SelectedOption {
|
|
5
3
|
name
|
|
6
4
|
value
|
|
7
5
|
optionType
|
|
8
6
|
}
|
|
9
|
-
`;
|
|
10
|
-
|
|
11
|
-
exports.SelectedOptionSelect = SelectedOptionSelect;
|
|
7
|
+
`;exports.SelectedOptionSelect=SelectedOptionSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const VariantSelect = `
|
|
1
|
+
"use strict";const VariantSelect=`
|
|
4
2
|
fragment VariantSelect on ProductVariant {
|
|
5
3
|
id
|
|
6
4
|
title
|
|
@@ -30,6 +28,4 @@
|
|
|
30
28
|
...MediaSelect
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
exports.VariantSelect = VariantSelect;
|
|
31
|
+
`;exports.VariantSelect=VariantSelect;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */ const PageViewUpDocument = `
|
|
4
|
-
mutation pageViewUp($pageHandle: String!, $userAgent: String!) {
|
|
1
|
+
"use strict";const PageViewUpDocument=`
|
|
2
|
+
mutation pageViewUp($pageHandle: String!, $userAgent: String) {
|
|
5
3
|
pageViewUp(pageHandle: $pageHandle, userAgent: $userAgent)
|
|
6
4
|
}
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
exports.PageViewUpDocument = PageViewUpDocument;
|
|
5
|
+
`;exports.PageViewUpDocument=PageViewUpDocument;
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var collectionProduct_generated = require('../fragments/collection-product.generated.js');
|
|
4
|
-
var collectionDetail_generated = require('../fragments/collection-detail.generated.js');
|
|
5
|
-
var product_generated = require('../fragments/product.generated.js');
|
|
6
|
-
var productLittle_generated = require('../fragments/product-little.generated.js');
|
|
7
|
-
var productOption_generated = require('../fragments/product-option.generated.js');
|
|
8
|
-
var productOptionValue_generated = require('../fragments/product-option-value.generated.js');
|
|
9
|
-
var media_generated = require('../fragments/media.generated.js');
|
|
10
|
-
var variant_generated = require('../fragments/variant.generated.js');
|
|
11
|
-
var selectedOption_generated = require('../fragments/selected-option.generated.js');
|
|
12
|
-
|
|
13
|
-
const CollectionDetailFilterDocument = `
|
|
1
|
+
"use strict";var collectionProduct_generated=require("../fragments/collection-product.generated.js"),collectionDetail_generated=require("../fragments/collection-detail.generated.js"),product_generated=require("../fragments/product.generated.js"),productLittle_generated=require("../fragments/product-little.generated.js"),productOption_generated=require("../fragments/product-option.generated.js"),productOptionValue_generated=require("../fragments/product-option-value.generated.js"),media_generated=require("../fragments/media.generated.js"),variant_generated=require("../fragments/variant.generated.js"),selectedOption_generated=require("../fragments/selected-option.generated.js");const CollectionDetailFilterDocument=`
|
|
14
2
|
query collectionDetailFilter($firstProduct: Int = 10, $orderBy: CollectionOrder, $where: CollectionWhereInput, $orderByProduct: ProductOrder, $productsAfter: Cursor, $firstVariant: Int, $afterVariant: Cursor, $afterMedia: Cursor, $firstMedia: Int, $orderByMedia: MediaOrder, $whereProduct: ProductWhereInput) {
|
|
15
3
|
collections(first: 1, orderBy: $orderBy, where: $where) {
|
|
16
4
|
edges {
|
|
@@ -29,6 +17,4 @@ ${productOption_generated.ProductOptionSelect}
|
|
|
29
17
|
${productOptionValue_generated.ProductOptionValueSelect}
|
|
30
18
|
${media_generated.MediaSelect}
|
|
31
19
|
${variant_generated.VariantSelect}
|
|
32
|
-
${selectedOption_generated.SelectedOptionSelect}`;
|
|
33
|
-
|
|
34
|
-
exports.CollectionDetailFilterDocument = CollectionDetailFilterDocument;
|
|
20
|
+
${selectedOption_generated.SelectedOptionSelect}`;exports.CollectionDetailFilterDocument=CollectionDetailFilterDocument;
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var product_generated = require('../fragments/product.generated.js');
|
|
4
|
-
var productLittle_generated = require('../fragments/product-little.generated.js');
|
|
5
|
-
var productOption_generated = require('../fragments/product-option.generated.js');
|
|
6
|
-
var productOptionValue_generated = require('../fragments/product-option-value.generated.js');
|
|
7
|
-
var media_generated = require('../fragments/media.generated.js');
|
|
8
|
-
var variant_generated = require('../fragments/variant.generated.js');
|
|
9
|
-
var selectedOption_generated = require('../fragments/selected-option.generated.js');
|
|
10
|
-
|
|
11
|
-
const CollectionDocument = `
|
|
1
|
+
"use strict";var product_generated=require("../fragments/product.generated.js"),productLittle_generated=require("../fragments/product-little.generated.js"),productOption_generated=require("../fragments/product-option.generated.js"),productOptionValue_generated=require("../fragments/product-option-value.generated.js"),media_generated=require("../fragments/media.generated.js"),variant_generated=require("../fragments/variant.generated.js"),selectedOption_generated=require("../fragments/selected-option.generated.js");const CollectionDocument=`
|
|
12
2
|
query collection($first: Int = 5, $firstMedia: Int = 20, $orderByMedia: MediaOrder, $afterMedia: Cursor, $firstVariant: Int = 20, $afterVariant: Cursor, $handle: String, $id: ID) {
|
|
13
3
|
collection(handle: $handle, id: $id) {
|
|
14
4
|
baseID
|
|
@@ -47,6 +37,4 @@ ${productOption_generated.ProductOptionSelect}
|
|
|
47
37
|
${productOptionValue_generated.ProductOptionValueSelect}
|
|
48
38
|
${media_generated.MediaSelect}
|
|
49
39
|
${variant_generated.VariantSelect}
|
|
50
|
-
${selectedOption_generated.SelectedOptionSelect}`;
|
|
51
|
-
|
|
52
|
-
exports.CollectionDocument = CollectionDocument;
|
|
40
|
+
${selectedOption_generated.SelectedOptionSelect}`;exports.CollectionDocument=CollectionDocument;
|