@gem-sdk/core 1.14.0-next.96 → 1.14.0
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 +18 -1
- package/dist/cjs/components/ComponentWrapper.js +28 -1
- package/dist/cjs/components/ComponentWrapperPreview.js +72 -1
- package/dist/cjs/components/Empty.js +7 -1
- package/dist/cjs/components/Render.js +65 -1
- package/dist/cjs/components/Render.liquid.js +158 -3
- package/dist/cjs/components/RenderBlock.js +54 -1
- package/dist/cjs/components/RenderPreview.js +66 -1
- package/dist/cjs/components/RenderSection.js +23 -1
- package/dist/cjs/components/constant.js +39 -1
- package/dist/cjs/contexts/AddonContext.js +36 -1
- package/dist/cjs/contexts/BuilderComponent.js +34 -1
- package/dist/cjs/contexts/BuilderContext.js +35 -1
- package/dist/cjs/contexts/BuilderPreviewContext.js +370 -1
- package/dist/cjs/contexts/CartLineContext.js +29 -1
- package/dist/cjs/contexts/CollectionContext.js +38 -1
- package/dist/cjs/contexts/ModalContext.js +47 -1
- package/dist/cjs/contexts/ProductContext.js +149 -1
- package/dist/cjs/contexts/ProductListContext.js +32 -1
- package/dist/cjs/contexts/SectionContext.js +53 -1
- package/dist/cjs/contexts/ShopContext.js +70 -1
- package/dist/cjs/graphql/fragments/analytic.generated.js +6 -2
- package/dist/cjs/graphql/fragments/collection-detail.generated.js +6 -2
- package/dist/cjs/graphql/fragments/collection-product.generated.js +6 -2
- package/dist/cjs/graphql/fragments/collection.generated.js +6 -2
- package/dist/cjs/graphql/fragments/custom-code.generated.js +6 -2
- package/dist/cjs/graphql/fragments/data-seo.generated.js +6 -2
- package/dist/cjs/graphql/fragments/media.generated.js +6 -3
- package/dist/cjs/graphql/fragments/product-little.generated.js +6 -2
- package/dist/cjs/graphql/fragments/product-option-value.generated.js +6 -2
- package/dist/cjs/graphql/fragments/product-option.generated.js +6 -2
- package/dist/cjs/graphql/fragments/product.generated.js +6 -2
- package/dist/cjs/graphql/fragments/published-custom-section.generated.js +6 -2
- package/dist/cjs/graphql/fragments/published-page-section.generated.js +6 -2
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +6 -2
- package/dist/cjs/graphql/fragments/published-theme-style.generated.js +6 -2
- package/dist/cjs/graphql/fragments/selected-option.generated.js +6 -2
- package/dist/cjs/graphql/fragments/variant.generated.js +6 -2
- package/dist/cjs/graphql/mutations/page-view-up.generated.js +7 -3
- package/dist/cjs/graphql/queries/collection-detail-filter.generated.js +16 -2
- package/dist/cjs/graphql/queries/collection.generated.js +14 -2
- package/dist/cjs/graphql/queries/collections.generated.js +9 -2
- package/dist/cjs/graphql/queries/preview-page.generated.js +14 -2
- package/dist/cjs/graphql/queries/product-little-detail.generated.js +11 -2
- package/dist/cjs/graphql/queries/product-medias.generated.js +8 -2
- package/dist/cjs/graphql/queries/product-variants.generated.js +10 -2
- package/dist/cjs/graphql/queries/products.generated.js +17 -3
- package/dist/cjs/graphql/queries/published-theme-pages.generated.js +14 -2
- package/dist/cjs/graphql/queries/store-property.generated.js +6 -2
- package/dist/cjs/helpers/GlobalEvent.js +19 -1
- package/dist/cjs/helpers/background.js +109 -1
- package/dist/cjs/helpers/borders.js +183 -4
- package/dist/cjs/helpers/clone-deep.js +5 -1
- package/dist/cjs/helpers/cls.js +16 -1
- package/dist/cjs/helpers/colors.js +183 -1
- package/dist/cjs/helpers/compose-advance-style.js +188 -1
- package/dist/cjs/helpers/constant.js +23 -1
- package/dist/cjs/helpers/convert.js +7 -1
- package/dist/cjs/helpers/css-variable.js +7 -1
- package/dist/cjs/helpers/email.js +11 -1
- package/dist/cjs/helpers/flatten-connection.js +9 -1
- package/dist/cjs/helpers/get-resonsive-value.js +31 -1
- package/dist/cjs/helpers/get-shortname.js +92 -1
- package/dist/cjs/helpers/is-browser.js +9 -1
- package/dist/cjs/helpers/is-defined.js +7 -1
- package/dist/cjs/helpers/is-empty-children.js +12 -1
- package/dist/cjs/helpers/is-safari.js +9 -1
- package/dist/cjs/helpers/layout.js +59 -1
- package/dist/cjs/helpers/load-script.js +31 -1
- package/dist/cjs/helpers/make-style.js +128 -1
- package/dist/cjs/helpers/normalize-builder-data.js +23 -1
- package/dist/cjs/helpers/prefetch-queries.js +78 -1
- package/dist/cjs/helpers/product.js +45 -1
- package/dist/cjs/helpers/queries/get-collection.js +220 -1
- package/dist/cjs/helpers/queries/get-collections.js +21 -1
- package/dist/cjs/helpers/queries/get-product-by-slug.js +125 -1
- package/dist/cjs/helpers/queries/get-product.js +154 -1
- package/dist/cjs/helpers/queries/get-products.js +161 -1
- package/dist/cjs/helpers/query.js +29 -1
- package/dist/cjs/helpers/radius.js +131 -6
- package/dist/cjs/helpers/render.js +71 -1
- package/dist/cjs/helpers/shadow.js +56 -1
- package/dist/cjs/helpers/size.js +35 -4
- package/dist/cjs/helpers/spacing.js +43 -1
- package/dist/cjs/helpers/tracking/fpixel.js +28 -1
- package/dist/cjs/helpers/tracking/gtag.js +93 -1
- package/dist/cjs/helpers/tracking/tiktokpixel.js +17 -1
- package/dist/cjs/helpers/typography.js +105 -17
- package/dist/cjs/helpers/variant.js +8 -1
- package/dist/cjs/hooks/cart/use-add-to-cart.js +20 -1
- package/dist/cjs/hooks/cart/use-cart-data.js +28 -1
- package/dist/cjs/hooks/cart/use-cart-discount-codes-update.js +20 -1
- package/dist/cjs/hooks/cart/use-cart-note-update.js +20 -1
- package/dist/cjs/hooks/cart/use-create-cart.js +22 -1
- package/dist/cjs/hooks/cart/use-remove-cart-item.js +20 -1
- package/dist/cjs/hooks/cart/use-update-cart-item.js +20 -1
- package/dist/cjs/hooks/shop/use-collection-query.js +22 -1
- package/dist/cjs/hooks/shop/use-collections-query.js +17 -1
- package/dist/cjs/hooks/shop/use-product-query.js +22 -1
- package/dist/cjs/hooks/shop/use-products-query.js +22 -1
- package/dist/cjs/hooks/shop.js +126 -1
- package/dist/cjs/hooks/use-current-device.js +21 -1
- package/dist/cjs/hooks/use-lazy-video.js +15 -1
- package/dist/cjs/hooks/useCartId.js +44 -1
- package/dist/cjs/hooks/useCartLine.js +11 -1
- package/dist/cjs/hooks/useCartUI.js +48 -1
- package/dist/cjs/hooks/useCollection.js +9 -1
- package/dist/cjs/hooks/useFetchHandle.js +13 -1
- package/dist/cjs/hooks/useFormatMoney.js +58 -1
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +10 -1
- package/dist/cjs/hooks/useLoadScript.js +32 -1
- package/dist/cjs/hooks/useMoney.js +84 -1
- package/dist/cjs/hooks/usePrevious.js +19 -1
- package/dist/cjs/hooks/useProduct.js +124 -1
- package/dist/cjs/hooks/useProductList.js +21 -1
- package/dist/cjs/hooks/useSuspenseFetch.js +27 -1
- package/dist/cjs/hooks/useSwatchesOptions.js +41 -1
- package/dist/cjs/index.js +291 -1
- package/dist/cjs/types/global-style.js +14 -1
- package/dist/cjs/types/shop.js +2 -1
- package/dist/esm/components/AddOn.js +14 -1
- package/dist/esm/components/ComponentWrapper.js +24 -1
- package/dist/esm/components/ComponentWrapperPreview.js +68 -1
- package/dist/esm/components/Empty.js +3 -1
- package/dist/esm/components/Render.js +61 -1
- package/dist/esm/components/Render.liquid.js +153 -3
- package/dist/esm/components/RenderBlock.js +50 -1
- package/dist/esm/components/RenderPreview.js +62 -1
- package/dist/esm/components/RenderSection.js +19 -1
- package/dist/esm/components/constant.js +37 -1
- package/dist/esm/contexts/AddonContext.js +32 -1
- package/dist/esm/contexts/BuilderComponent.js +31 -1
- package/dist/esm/contexts/BuilderContext.js +32 -1
- package/dist/esm/contexts/BuilderPreviewContext.js +367 -1
- package/dist/esm/contexts/CartLineContext.js +26 -1
- package/dist/esm/contexts/CollectionContext.js +35 -1
- package/dist/esm/contexts/ModalContext.js +44 -1
- package/dist/esm/contexts/ProductContext.js +146 -1
- package/dist/esm/contexts/ProductListContext.js +28 -1
- package/dist/esm/contexts/SectionContext.js +49 -1
- package/dist/esm/contexts/ShopContext.js +67 -1
- package/dist/esm/graphql/fragments/analytic.generated.js +4 -2
- package/dist/esm/graphql/fragments/collection-detail.generated.js +4 -2
- package/dist/esm/graphql/fragments/collection-product.generated.js +4 -2
- package/dist/esm/graphql/fragments/collection.generated.js +4 -2
- package/dist/esm/graphql/fragments/custom-code.generated.js +4 -2
- package/dist/esm/graphql/fragments/data-seo.generated.js +4 -2
- package/dist/esm/graphql/fragments/media.generated.js +4 -3
- package/dist/esm/graphql/fragments/product-little.generated.js +4 -2
- package/dist/esm/graphql/fragments/product-option-value.generated.js +4 -2
- package/dist/esm/graphql/fragments/product-option.generated.js +4 -2
- package/dist/esm/graphql/fragments/product.generated.js +4 -2
- package/dist/esm/graphql/fragments/published-custom-section.generated.js +4 -2
- package/dist/esm/graphql/fragments/published-page-section.generated.js +4 -2
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +4 -2
- package/dist/esm/graphql/fragments/published-theme-style.generated.js +4 -2
- package/dist/esm/graphql/fragments/selected-option.generated.js +4 -2
- package/dist/esm/graphql/fragments/variant.generated.js +4 -2
- package/dist/esm/graphql/mutations/page-view-up.generated.js +5 -3
- package/dist/esm/graphql/queries/collection-detail-filter.generated.js +22 -10
- package/dist/esm/graphql/queries/collection.generated.js +18 -8
- package/dist/esm/graphql/queries/collections.generated.js +8 -3
- package/dist/esm/graphql/queries/preview-page.generated.js +18 -8
- package/dist/esm/graphql/queries/product-little-detail.generated.js +12 -5
- package/dist/esm/graphql/queries/product-medias.generated.js +6 -2
- package/dist/esm/graphql/queries/product-variants.generated.js +10 -4
- package/dist/esm/graphql/queries/products.generated.js +20 -9
- package/dist/esm/graphql/queries/published-theme-pages.generated.js +18 -8
- package/dist/esm/graphql/queries/store-property.generated.js +4 -2
- package/dist/esm/helpers/GlobalEvent.js +15 -1
- package/dist/esm/helpers/background.js +106 -1
- package/dist/esm/helpers/borders.js +175 -4
- package/dist/esm/helpers/clone-deep.js +3 -1
- package/dist/esm/helpers/cls.js +14 -1
- package/dist/esm/helpers/colors.js +168 -1
- package/dist/esm/helpers/compose-advance-style.js +185 -1
- package/dist/esm/helpers/constant.js +19 -1
- package/dist/esm/helpers/convert.js +4 -1
- package/dist/esm/helpers/css-variable.js +5 -1
- package/dist/esm/helpers/email.js +6 -1
- package/dist/esm/helpers/flatten-connection.js +7 -1
- package/dist/esm/helpers/get-resonsive-value.js +27 -1
- package/dist/esm/helpers/get-shortname.js +90 -1
- package/dist/esm/helpers/is-browser.js +5 -1
- package/dist/esm/helpers/is-defined.js +5 -1
- package/dist/esm/helpers/is-empty-children.js +7 -1
- package/dist/esm/helpers/is-safari.js +5 -1
- package/dist/esm/helpers/layout.js +54 -1
- package/dist/esm/helpers/load-script.js +29 -1
- package/dist/esm/helpers/make-style.js +117 -1
- package/dist/esm/helpers/normalize-builder-data.js +21 -1
- package/dist/esm/helpers/prefetch-queries.js +76 -1
- package/dist/esm/helpers/product.js +41 -1
- package/dist/esm/helpers/queries/get-collection.js +217 -1
- package/dist/esm/helpers/queries/get-collections.js +19 -1
- package/dist/esm/helpers/queries/get-product-by-slug.js +123 -1
- package/dist/esm/helpers/queries/get-product.js +150 -1
- package/dist/esm/helpers/queries/get-products.js +159 -1
- package/dist/esm/helpers/query.js +25 -1
- package/dist/esm/helpers/radius.js +124 -6
- package/dist/esm/helpers/render.js +64 -1
- package/dist/esm/helpers/shadow.js +51 -1
- package/dist/esm/helpers/size.js +31 -4
- package/dist/esm/helpers/spacing.js +40 -1
- package/dist/esm/helpers/tracking/fpixel.js +24 -1
- package/dist/esm/helpers/tracking/gtag.js +87 -1
- package/dist/esm/helpers/tracking/tiktokpixel.js +15 -1
- package/dist/esm/helpers/typography.js +96 -17
- package/dist/esm/helpers/variant.js +6 -1
- package/dist/esm/hooks/cart/use-add-to-cart.js +18 -1
- package/dist/esm/hooks/cart/use-cart-data.js +26 -1
- package/dist/esm/hooks/cart/use-cart-discount-codes-update.js +18 -1
- package/dist/esm/hooks/cart/use-cart-note-update.js +18 -1
- package/dist/esm/hooks/cart/use-create-cart.js +20 -1
- package/dist/esm/hooks/cart/use-remove-cart-item.js +18 -1
- package/dist/esm/hooks/cart/use-update-cart-item.js +18 -1
- package/dist/esm/hooks/shop/use-collection-query.js +20 -1
- package/dist/esm/hooks/shop/use-collections-query.js +15 -1
- package/dist/esm/hooks/shop/use-product-query.js +20 -1
- package/dist/esm/hooks/shop/use-products-query.js +20 -1
- package/dist/esm/hooks/shop.js +111 -1
- package/dist/esm/hooks/use-current-device.js +19 -1
- package/dist/esm/hooks/use-lazy-video.js +13 -1
- package/dist/esm/hooks/useCartId.js +40 -1
- package/dist/esm/hooks/useCartLine.js +7 -1
- package/dist/esm/hooks/useCartUI.js +44 -1
- package/dist/esm/hooks/useCollection.js +7 -1
- package/dist/esm/hooks/useFetchHandle.js +11 -1
- package/dist/esm/hooks/useFormatMoney.js +56 -1
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +6 -1
- package/dist/esm/hooks/useLoadScript.js +28 -1
- package/dist/esm/hooks/useMoney.js +80 -1
- package/dist/esm/hooks/usePrevious.js +17 -1
- package/dist/esm/hooks/useProduct.js +111 -1
- package/dist/esm/hooks/useProductList.js +16 -1
- package/dist/esm/hooks/useSuspenseFetch.js +23 -1
- package/dist/esm/hooks/useSwatchesOptions.js +37 -1
- package/dist/esm/index.js +92 -1
- package/dist/esm/types/global-style.js +11 -1
- package/dist/types/index.d.ts +26 -28
- package/package.json +2 -2
|
@@ -1 +1,49 @@
|
|
|
1
|
-
import{jsx
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useStore, createStore } from 'zustand';
|
|
3
|
+
import { useContext, createContext } from 'react';
|
|
4
|
+
import { cloneDeep } from '../helpers/clone-deep.js';
|
|
5
|
+
import { normalizeBuilderData } from '../helpers/normalize-builder-data.js';
|
|
6
|
+
|
|
7
|
+
const SectionContext = /*#__PURE__*/ createContext(null);
|
|
8
|
+
const createSectionProvider = (data)=>createStore((set, get)=>({
|
|
9
|
+
data: data ?? {},
|
|
10
|
+
getSection: (id)=>{
|
|
11
|
+
const section = get().data[id];
|
|
12
|
+
return section ?? undefined;
|
|
13
|
+
},
|
|
14
|
+
addSection: (id, data)=>{
|
|
15
|
+
const item = normalizeBuilderData(data);
|
|
16
|
+
set((prev)=>({
|
|
17
|
+
data: {
|
|
18
|
+
...prev.data,
|
|
19
|
+
[id]: cloneDeep(item)
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
},
|
|
23
|
+
removeSection: (id)=>{
|
|
24
|
+
set((prev)=>{
|
|
25
|
+
const { [id]: _, ...rest } = prev.data;
|
|
26
|
+
return {
|
|
27
|
+
data: rest
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
const SectionProvider = ({ children, data, ...passProps })=>{
|
|
33
|
+
return /*#__PURE__*/ jsx(SectionContext.Provider, {
|
|
34
|
+
...passProps,
|
|
35
|
+
value: createSectionProvider(data),
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
// export const useSectionStore = useStore;
|
|
40
|
+
const useSectionStore = (selector, equalityFn)=>{
|
|
41
|
+
const store = useContext(SectionContext);
|
|
42
|
+
if (!store) {
|
|
43
|
+
throw new Error('useSectionStore must be used within a SectionProvider');
|
|
44
|
+
}
|
|
45
|
+
return useStore(store, selector, equalityFn);
|
|
46
|
+
};
|
|
47
|
+
const useSection = (id)=>useSectionStore((s)=>s.getSection(id));
|
|
48
|
+
|
|
49
|
+
export { SectionProvider, useSection, useSectionStore };
|
|
@@ -1 +1,67 @@
|
|
|
1
|
-
import{jsx
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SWRConfig } from 'swr';
|
|
3
|
+
import { useStore, createStore } from 'zustand';
|
|
4
|
+
import { useMemo, useContext, createContext } from 'react';
|
|
5
|
+
import { AddonProvider } from './AddonContext.js';
|
|
6
|
+
import { ModalProvider } from './ModalContext.js';
|
|
7
|
+
|
|
8
|
+
const ShopContext = /*#__PURE__*/ createContext(null);
|
|
9
|
+
const createShopStoreProvider = (data)=>createStore((set)=>({
|
|
10
|
+
mobileOnly: false,
|
|
11
|
+
isStorefront: true,
|
|
12
|
+
...data,
|
|
13
|
+
changeLocale: (locale)=>{
|
|
14
|
+
set({
|
|
15
|
+
locale
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
changeCurrency: (currency)=>{
|
|
19
|
+
set({
|
|
20
|
+
currency
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
changeSwatches: (swatches)=>{
|
|
24
|
+
set({
|
|
25
|
+
swatches
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
changeLayoutSettings: (layoutSettings)=>{
|
|
29
|
+
set({
|
|
30
|
+
layoutSettings
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
changeStorefrontInfo: ({ url, token })=>{
|
|
34
|
+
set({
|
|
35
|
+
storefrontUrl: url,
|
|
36
|
+
storefrontToken: token
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps })=>{
|
|
41
|
+
const store = useMemo(()=>createShopStoreProvider(storeOption), [
|
|
42
|
+
storeOption
|
|
43
|
+
]);
|
|
44
|
+
return /*#__PURE__*/ jsx(AddonProvider, {
|
|
45
|
+
components: addons,
|
|
46
|
+
children: /*#__PURE__*/ jsx(SWRConfig, {
|
|
47
|
+
value: queryOption,
|
|
48
|
+
children: /*#__PURE__*/ jsx(ShopContext.Provider, {
|
|
49
|
+
...passProps,
|
|
50
|
+
value: store,
|
|
51
|
+
children: /*#__PURE__*/ jsx(ModalProvider, {
|
|
52
|
+
children: children
|
|
53
|
+
})
|
|
54
|
+
}, JSON.stringify(storeOption))
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
// export const useShopStore = useStore;
|
|
59
|
+
const useShopStore = (selector, equalityFn)=>{
|
|
60
|
+
const store = useContext(ShopContext);
|
|
61
|
+
if (!store) {
|
|
62
|
+
throw new Error('useShopStore must be used within a ShopProvider');
|
|
63
|
+
}
|
|
64
|
+
return useStore(store, selector, equalityFn);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { ShopProvider, useShopStore };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const CollectionDetailSelect = `
|
|
2
2
|
fragment CollectionDetailSelect on Collection {
|
|
3
3
|
id
|
|
4
4
|
createdAt
|
|
@@ -20,4 +20,6 @@ let CollectionDetailSelect=`
|
|
|
20
20
|
isStorefront
|
|
21
21
|
isSample
|
|
22
22
|
}
|
|
23
|
-
`;
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export { CollectionDetailSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const CollectionProductSelect = `
|
|
2
2
|
fragment CollectionProductSelect on Collection {
|
|
3
3
|
...CollectionDetailSelect
|
|
4
4
|
products(
|
|
@@ -19,4 +19,6 @@ let CollectionProductSelect=`
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export { CollectionProductSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const CollectionSelect = `
|
|
2
2
|
fragment CollectionSelect on Collection {
|
|
3
3
|
...CollectionDetailSelect
|
|
4
4
|
products {
|
|
@@ -17,4 +17,6 @@ let CollectionSelect=`
|
|
|
17
17
|
totalCount
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
`;
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export { CollectionSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const ProductLittleSelect = `
|
|
2
2
|
fragment ProductLittleSelect on Product {
|
|
3
3
|
id
|
|
4
4
|
title
|
|
@@ -18,4 +18,6 @@ let ProductLittleSelect=`
|
|
|
18
18
|
...MediaSelect
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
`;
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export { ProductLittleSelect };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const ProductOptionValueSelect = `
|
|
2
2
|
fragment ProductOptionValueSelect on ProductOptionValue {
|
|
3
3
|
id
|
|
4
4
|
label
|
|
5
5
|
isDefault
|
|
6
6
|
baseID
|
|
7
7
|
}
|
|
8
|
-
`;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export { ProductOptionValueSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const ProductOptionSelect = `
|
|
2
2
|
fragment ProductOptionSelect on ProductOption {
|
|
3
3
|
id
|
|
4
4
|
name
|
|
@@ -7,4 +7,6 @@ let ProductOptionSelect=`
|
|
|
7
7
|
...ProductOptionValueSelect
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
`;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export { ProductOptionSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const ProductSelect = `
|
|
2
2
|
fragment ProductSelect on Product {
|
|
3
3
|
...ProductLittleSelect
|
|
4
4
|
medias(first: $firstMedia, after: $afterMedia, orderBy: $orderByMedia) {
|
|
@@ -26,4 +26,6 @@ let ProductSelect=`
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`;
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
export { ProductSelect };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const PublishedCustomSectionSelect = `
|
|
2
2
|
fragment PublishedCustomSectionSelect on PublishedCustomSection {
|
|
3
3
|
cid
|
|
4
4
|
component
|
|
5
5
|
id
|
|
6
6
|
type
|
|
7
7
|
}
|
|
8
|
-
`;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export { PublishedCustomSectionSelect };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const PublishedPageSectionSelect = `
|
|
2
2
|
fragment PublishedPageSectionSelect on PublishedPageSection {
|
|
3
3
|
cid
|
|
4
4
|
component
|
|
5
5
|
id
|
|
6
6
|
}
|
|
7
|
-
`;
|
|
7
|
+
`;
|
|
8
|
+
|
|
9
|
+
export { PublishedPageSectionSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const PublishedThemePageSelect = `
|
|
2
2
|
fragment PublishedThemePageSelect on PublishedThemePage {
|
|
3
3
|
id
|
|
4
4
|
name
|
|
@@ -24,4 +24,6 @@ let PublishedThemePageSelect=`
|
|
|
24
24
|
...CustomCodeSelect
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
`;
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
export { PublishedThemePageSelect };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const PublishedThemeStyleSelect = `
|
|
2
2
|
fragment PublishedThemeStyleSelect on PublishedThemeStyle {
|
|
3
3
|
id
|
|
4
4
|
data
|
|
5
5
|
name
|
|
6
6
|
}
|
|
7
|
-
`;
|
|
7
|
+
`;
|
|
8
|
+
|
|
9
|
+
export { PublishedThemeStyleSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable */ const VariantSelect = `
|
|
2
2
|
fragment VariantSelect on ProductVariant {
|
|
3
3
|
id
|
|
4
4
|
title
|
|
@@ -28,4 +28,6 @@ let VariantSelect=`
|
|
|
28
28
|
...MediaSelect
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
`;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
export { VariantSelect };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
mutation pageViewUp($pageHandle: String!, $userAgent: String) {
|
|
1
|
+
/* eslint-disable */ const PageViewUpDocument = `
|
|
2
|
+
mutation pageViewUp($pageHandle: String!, $userAgent: String!) {
|
|
3
3
|
pageViewUp(pageHandle: $pageHandle, userAgent: $userAgent)
|
|
4
4
|
}
|
|
5
|
-
`;
|
|
5
|
+
`;
|
|
6
|
+
|
|
7
|
+
export { PageViewUpDocument };
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CollectionProductSelect } from '../fragments/collection-product.generated.js';
|
|
2
|
+
import { CollectionDetailSelect } from '../fragments/collection-detail.generated.js';
|
|
3
|
+
import { ProductSelect } from '../fragments/product.generated.js';
|
|
4
|
+
import { ProductLittleSelect } from '../fragments/product-little.generated.js';
|
|
5
|
+
import { ProductOptionSelect } from '../fragments/product-option.generated.js';
|
|
6
|
+
import { ProductOptionValueSelect } from '../fragments/product-option-value.generated.js';
|
|
7
|
+
import { MediaSelect } from '../fragments/media.generated.js';
|
|
8
|
+
import { VariantSelect } from '../fragments/variant.generated.js';
|
|
9
|
+
import { SelectedOptionSelect } from '../fragments/selected-option.generated.js';
|
|
10
|
+
|
|
11
|
+
const CollectionDetailFilterDocument = `
|
|
2
12
|
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) {
|
|
3
13
|
collections(first: 1, orderBy: $orderBy, where: $where) {
|
|
4
14
|
edges {
|
|
@@ -9,12 +19,14 @@ import{CollectionProductSelect as e}from"../fragments/collection-product.generat
|
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
21
|
}
|
|
12
|
-
${
|
|
13
|
-
${
|
|
14
|
-
${
|
|
15
|
-
${
|
|
16
|
-
${
|
|
17
|
-
${
|
|
18
|
-
${
|
|
19
|
-
${
|
|
20
|
-
${
|
|
22
|
+
${CollectionProductSelect}
|
|
23
|
+
${CollectionDetailSelect}
|
|
24
|
+
${ProductSelect}
|
|
25
|
+
${ProductLittleSelect}
|
|
26
|
+
${ProductOptionSelect}
|
|
27
|
+
${ProductOptionValueSelect}
|
|
28
|
+
${MediaSelect}
|
|
29
|
+
${VariantSelect}
|
|
30
|
+
${SelectedOptionSelect}`;
|
|
31
|
+
|
|
32
|
+
export { CollectionDetailFilterDocument };
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ProductSelect } from '../fragments/product.generated.js';
|
|
2
|
+
import { ProductLittleSelect } from '../fragments/product-little.generated.js';
|
|
3
|
+
import { ProductOptionSelect } from '../fragments/product-option.generated.js';
|
|
4
|
+
import { ProductOptionValueSelect } from '../fragments/product-option-value.generated.js';
|
|
5
|
+
import { MediaSelect } from '../fragments/media.generated.js';
|
|
6
|
+
import { VariantSelect } from '../fragments/variant.generated.js';
|
|
7
|
+
import { SelectedOptionSelect } from '../fragments/selected-option.generated.js';
|
|
8
|
+
|
|
9
|
+
const CollectionDocument = `
|
|
2
10
|
query collection($first: Int = 5, $firstMedia: Int = 20, $orderByMedia: MediaOrder, $afterMedia: Cursor, $firstVariant: Int = 20, $afterVariant: Cursor, $handle: String, $id: ID) {
|
|
3
11
|
collection(handle: $handle, id: $id) {
|
|
4
12
|
baseID
|
|
@@ -31,10 +39,12 @@ import{ProductSelect as e}from"../fragments/product.generated.js";import{Product
|
|
|
31
39
|
updatedAt
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
|
-
${
|
|
35
|
-
${
|
|
36
|
-
${
|
|
37
|
-
${
|
|
38
|
-
${
|
|
39
|
-
${
|
|
40
|
-
${
|
|
42
|
+
${ProductSelect}
|
|
43
|
+
${ProductLittleSelect}
|
|
44
|
+
${ProductOptionSelect}
|
|
45
|
+
${ProductOptionValueSelect}
|
|
46
|
+
${MediaSelect}
|
|
47
|
+
${VariantSelect}
|
|
48
|
+
${SelectedOptionSelect}`;
|
|
49
|
+
|
|
50
|
+
export { CollectionDocument };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import{CollectionSelect
|
|
1
|
+
import { CollectionSelect } from '../fragments/collection.generated.js';
|
|
2
|
+
import { CollectionDetailSelect } from '../fragments/collection-detail.generated.js';
|
|
3
|
+
|
|
4
|
+
const CollectionsDocument = `
|
|
2
5
|
query Collections($after: Cursor, $first: Int, $before: Cursor, $last: Int, $where: CollectionWhereInput, $orderBy: CollectionOrder) {
|
|
3
6
|
collections(
|
|
4
7
|
after: $after
|
|
@@ -15,5 +18,7 @@ import{CollectionSelect as e}from"../fragments/collection.generated.js";import{C
|
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
|
-
${
|
|
19
|
-
${
|
|
21
|
+
${CollectionSelect}
|
|
22
|
+
${CollectionDetailSelect}`;
|
|
23
|
+
|
|
24
|
+
export { CollectionsDocument };
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PublishedThemePageSelect } from '../fragments/published-theme-page.generated.js';
|
|
2
|
+
import { PublishedPageSectionSelect } from '../fragments/published-page-section.generated.js';
|
|
3
|
+
import { PublishedCustomSectionSelect } from '../fragments/published-custom-section.generated.js';
|
|
4
|
+
import { DataSeoSelect } from '../fragments/data-seo.generated.js';
|
|
5
|
+
import { PublishedThemeStyleSelect } from '../fragments/published-theme-style.generated.js';
|
|
6
|
+
import { AnalyticSelect } from '../fragments/analytic.generated.js';
|
|
7
|
+
import { CustomCodeSelect } from '../fragments/custom-code.generated.js';
|
|
8
|
+
|
|
9
|
+
const PreviewPageDocument = `
|
|
2
10
|
query previewPage($handleURL: String, $pageType: PublishedThemePageType!) {
|
|
3
11
|
previewPage(handleURL: $handleURL, pageType: $pageType) {
|
|
4
12
|
...PublishedThemePageSelect
|
|
5
13
|
}
|
|
6
14
|
}
|
|
7
|
-
${
|
|
8
|
-
${
|
|
9
|
-
${
|
|
10
|
-
${
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
${
|
|
15
|
+
${PublishedThemePageSelect}
|
|
16
|
+
${PublishedPageSectionSelect}
|
|
17
|
+
${PublishedCustomSectionSelect}
|
|
18
|
+
${DataSeoSelect}
|
|
19
|
+
${PublishedThemeStyleSelect}
|
|
20
|
+
${AnalyticSelect}
|
|
21
|
+
${CustomCodeSelect}`;
|
|
22
|
+
|
|
23
|
+
export { PreviewPageDocument };
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import{ProductLittleSelect
|
|
1
|
+
import { ProductLittleSelect } from '../fragments/product-little.generated.js';
|
|
2
|
+
import { ProductOptionSelect } from '../fragments/product-option.generated.js';
|
|
3
|
+
import { ProductOptionValueSelect } from '../fragments/product-option-value.generated.js';
|
|
4
|
+
import { MediaSelect } from '../fragments/media.generated.js';
|
|
5
|
+
|
|
6
|
+
const ProductLittleDetailDocument = `
|
|
2
7
|
query productLittleDetail($orderBy: ProductOrder, $where: ProductWhereInput) {
|
|
3
8
|
product: products(first: 1, orderBy: $orderBy, where: $where) {
|
|
4
9
|
edges {
|
|
@@ -9,7 +14,9 @@ import{ProductLittleSelect as e}from"../fragments/product-little.generated.js";i
|
|
|
9
14
|
}
|
|
10
15
|
}
|
|
11
16
|
}
|
|
12
|
-
${
|
|
13
|
-
${
|
|
14
|
-
${
|
|
15
|
-
${
|
|
17
|
+
${ProductLittleSelect}
|
|
18
|
+
${ProductOptionSelect}
|
|
19
|
+
${ProductOptionValueSelect}
|
|
20
|
+
${MediaSelect}`;
|
|
21
|
+
|
|
22
|
+
export { ProductLittleDetailDocument };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import{MediaSelect
|
|
1
|
+
import { MediaSelect } from '../fragments/media.generated.js';
|
|
2
|
+
|
|
3
|
+
const ProductMediasDocument = `
|
|
2
4
|
query productMedias($firstMedia: Int = 50, $afterMedia: Cursor, $orderBy: ProductOrder, $where: ProductWhereInput, $orderByMedia: MediaOrder) {
|
|
3
5
|
medias: products(first: 1, orderBy: $orderBy, where: $where) {
|
|
4
6
|
edges {
|
|
@@ -20,4 +22,6 @@ import{MediaSelect as e}from"../fragments/media.generated.js";let ProductMediasD
|
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
|
-
${
|
|
25
|
+
${MediaSelect}`;
|
|
26
|
+
|
|
27
|
+
export { ProductMediasDocument };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import{VariantSelect
|
|
1
|
+
import { VariantSelect } from '../fragments/variant.generated.js';
|
|
2
|
+
import { SelectedOptionSelect } from '../fragments/selected-option.generated.js';
|
|
3
|
+
import { MediaSelect } from '../fragments/media.generated.js';
|
|
4
|
+
|
|
5
|
+
const ProductVariantsDocument = `
|
|
2
6
|
query productVariants($firstVariant: Int = 100, $afterVariant: Cursor, $orderBy: ProductOrder, $orderByVariant: ProductVariantOrder, $where: ProductWhereInput, $first: Int = 1) {
|
|
3
7
|
variants: products(first: $first, orderBy: $orderBy, where: $where) {
|
|
4
8
|
edges {
|
|
@@ -20,6 +24,8 @@ import{VariantSelect as r}from"../fragments/variant.generated.js";import{Selecte
|
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
${
|
|
27
|
+
${VariantSelect}
|
|
28
|
+
${SelectedOptionSelect}
|
|
29
|
+
${MediaSelect}`;
|
|
30
|
+
|
|
31
|
+
export { ProductVariantsDocument };
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ProductSelect } from '../fragments/product.generated.js';
|
|
2
|
+
import { ProductLittleSelect } from '../fragments/product-little.generated.js';
|
|
3
|
+
import { ProductOptionSelect } from '../fragments/product-option.generated.js';
|
|
4
|
+
import { ProductOptionValueSelect } from '../fragments/product-option-value.generated.js';
|
|
5
|
+
import { MediaSelect } from '../fragments/media.generated.js';
|
|
6
|
+
import { VariantSelect } from '../fragments/variant.generated.js';
|
|
7
|
+
import { SelectedOptionSelect } from '../fragments/selected-option.generated.js';
|
|
8
|
+
|
|
9
|
+
const ProductsEdgeDetail = `
|
|
2
10
|
fragment ProductsEdgeDetail on ProductEdge {
|
|
3
11
|
cursor
|
|
4
12
|
node {
|
|
5
13
|
...ProductSelect
|
|
6
14
|
}
|
|
7
15
|
}
|
|
8
|
-
|
|
16
|
+
`;
|
|
17
|
+
const ProductsDocument = `
|
|
9
18
|
query products($first: Int, $where: ProductWhereInput, $firstMedia: Int, $orderBy: ProductOrder, $after: Cursor, $firstVariant: Int, $afterVariant: Cursor, $afterMedia: Cursor, $orderByMedia: MediaOrder) {
|
|
10
19
|
products(first: $first, where: $where, orderBy: $orderBy, after: $after) {
|
|
11
20
|
edges {
|
|
@@ -18,10 +27,12 @@ import{ProductSelect as r}from"../fragments/product.generated.js";import{Product
|
|
|
18
27
|
}
|
|
19
28
|
}
|
|
20
29
|
${ProductsEdgeDetail}
|
|
21
|
-
${
|
|
22
|
-
${
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
${
|
|
27
|
-
${
|
|
30
|
+
${ProductSelect}
|
|
31
|
+
${ProductLittleSelect}
|
|
32
|
+
${ProductOptionSelect}
|
|
33
|
+
${ProductOptionValueSelect}
|
|
34
|
+
${MediaSelect}
|
|
35
|
+
${VariantSelect}
|
|
36
|
+
${SelectedOptionSelect}`;
|
|
37
|
+
|
|
38
|
+
export { ProductsDocument, ProductsEdgeDetail };
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PublishedThemePageSelect } from '../fragments/published-theme-page.generated.js';
|
|
2
|
+
import { PublishedPageSectionSelect } from '../fragments/published-page-section.generated.js';
|
|
3
|
+
import { PublishedCustomSectionSelect } from '../fragments/published-custom-section.generated.js';
|
|
4
|
+
import { DataSeoSelect } from '../fragments/data-seo.generated.js';
|
|
5
|
+
import { PublishedThemeStyleSelect } from '../fragments/published-theme-style.generated.js';
|
|
6
|
+
import { AnalyticSelect } from '../fragments/analytic.generated.js';
|
|
7
|
+
import { CustomCodeSelect } from '../fragments/custom-code.generated.js';
|
|
8
|
+
|
|
9
|
+
const PublishedThemePagesDocument = `
|
|
2
10
|
query publishedThemePages($slug: String, $slugType: PublishedThemePageType!) {
|
|
3
11
|
publishedThemePages(slug: $slug, slugType: $slugType) {
|
|
4
12
|
...PublishedThemePageSelect
|
|
5
13
|
}
|
|
6
14
|
}
|
|
7
|
-
${
|
|
8
|
-
${
|
|
9
|
-
${
|
|
10
|
-
${
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
${
|
|
15
|
+
${PublishedThemePageSelect}
|
|
16
|
+
${PublishedPageSectionSelect}
|
|
17
|
+
${PublishedCustomSectionSelect}
|
|
18
|
+
${DataSeoSelect}
|
|
19
|
+
${PublishedThemeStyleSelect}
|
|
20
|
+
${AnalyticSelect}
|
|
21
|
+
${CustomCodeSelect}`;
|
|
22
|
+
|
|
23
|
+
export { PublishedThemePagesDocument };
|