@gem-sdk/core 1.37.5 → 2.0.0-dev.832
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/ComponentToolbarPreview.js +1 -465
- package/dist/cjs/components/ComponentWrapper.js +1 -46
- package/dist/cjs/components/ComponentWrapperPreview.js +1 -136
- package/dist/cjs/components/Empty.js +1 -7
- package/dist/cjs/components/Render.js +1 -65
- package/dist/cjs/components/Render.liquid.js +14 -288
- package/dist/cjs/components/RenderBlock.js +1 -54
- package/dist/cjs/components/RenderCustomCode.js +3 -56
- package/dist/cjs/components/RenderPreview.js +1 -66
- package/dist/cjs/components/RenderSection.js +1 -23
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +1 -0
- package/dist/cjs/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/cjs/components/ai-generator/components/PickProduct.js +1 -0
- package/dist/cjs/components/ai-generator/components/ToneAndVoice.js +1 -0
- package/dist/cjs/components/ai-generator/hooks/useGettingGenerateRequest.js +1 -0
- package/dist/cjs/components/ai-generator/hooks/useListenEventGenerate.js +1 -0
- package/dist/cjs/components/ai-generator/icons/AIIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/CloseIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/DropdownIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/cjs/components/animation/AnimationWrapper.js +1 -0
- package/dist/cjs/components/constant.js +1 -54
- package/dist/cjs/components/resize/Resize.js +1 -16
- package/dist/cjs/components/resize/Spacing.js +1 -248
- package/dist/cjs/components/src/product/helpers/variant-presets.js +1 -56
- package/dist/cjs/components/theme-section/CreateThemeSection.js +1 -117
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +1 -36
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +1 -102
- package/dist/cjs/components/toolbar/Tooltip.js +1 -22
- 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 -479
- 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/PageContext.js +1 -44
- package/dist/cjs/contexts/ProductContext.js +1 -156
- package/dist/cjs/contexts/ProductListContext.js +1 -32
- package/dist/cjs/contexts/SectionContext.js +1 -53
- package/dist/cjs/contexts/ShopContext.js +1 -80
- 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/custom-font.generated.js +2 -6
- package/dist/cjs/graphql/fragments/data-seo.generated.js +2 -6
- package/dist/cjs/graphql/fragments/media.generated.js +2 -6
- package/dist/cjs/graphql/fragments/product-little.generated.js +11 -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 +11 -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 +3 -9
- 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 +2 -6
- package/dist/cjs/graphql/queries/product-variants.generated.js +2 -10
- package/dist/cjs/graphql/queries/products.generated.js +12 -17
- package/dist/cjs/graphql/queries/published-theme-pages.generated.js +2 -15
- package/dist/cjs/graphql/queries/store-property.generated.js +2 -6
- package/dist/cjs/graphql-app-api/queries/LibraryTemplate.generated.js +13 -0
- package/dist/cjs/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +34 -0
- package/dist/cjs/graphql-app-api/queries/ThemePage.generated.js +22 -0
- package/dist/cjs/helpers/GlobalEvent.js +1 -19
- package/dist/cjs/helpers/animations.js +1 -213
- package/dist/cjs/helpers/background.js +1 -230
- package/dist/cjs/helpers/borders.js +4 -183
- package/dist/cjs/helpers/carousel.js +1 -58
- package/dist/cjs/helpers/clone-deep.js +1 -5
- package/dist/cjs/helpers/cls.js +1 -16
- package/dist/cjs/helpers/colors.js +1 -184
- package/dist/cjs/helpers/compose-advance-style.js +1 -268
- package/dist/cjs/helpers/constant.js +1 -23
- package/dist/cjs/helpers/convert.js +1 -7
- package/dist/cjs/helpers/covert-entities-html.js +1 -19
- package/dist/cjs/helpers/css-variable.js +1 -7
- package/dist/cjs/helpers/email.js +1 -11
- package/dist/cjs/helpers/filter-toolbar-preview.js +1 -14
- package/dist/cjs/helpers/flatten-connection.js +1 -9
- package/dist/cjs/helpers/get-resonsive-value.js +1 -36
- package/dist/cjs/helpers/get-shortname.js +1 -92
- package/dist/cjs/helpers/icon-list.js +1 -61
- 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 -15
- 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 -163
- 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 -48
- package/dist/cjs/helpers/queries/get-collection.js +1 -226
- 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 -163
- package/dist/cjs/helpers/query.js +1 -29
- package/dist/cjs/helpers/radius.js +6 -140
- package/dist/cjs/helpers/render.js +1 -76
- package/dist/cjs/helpers/shadow.js +1 -57
- package/dist/cjs/helpers/size.js +4 -183
- 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 -126
- package/dist/cjs/helpers/variant.js +1 -11
- package/dist/cjs/hooks/animation/animations.js +1 -0
- package/dist/cjs/hooks/animation/useAnimationActions.js +1 -39
- package/dist/cjs/hooks/animation/useAnimationConfig.js +1 -29
- package/dist/cjs/hooks/animation/useAnimationPreview.js +1 -31
- package/dist/cjs/hooks/animation/useAnimationTarget.js +1 -120
- package/dist/cjs/hooks/animation/useApplyAnimation.js +1 -87
- package/dist/cjs/hooks/animation/useLivePageAnimation.js +1 -0
- 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 -23
- 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/useAnimations.js +1 -26
- 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 -113
- 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 -206
- 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/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/cjs/index.js +1 -361
- package/dist/cjs/types/animations.js +1 -47
- package/dist/cjs/types/appAPI.js +1 -0
- package/dist/cjs/types/global-style.js +1 -15
- package/dist/cjs/types/shop.js +1 -2
- package/dist/cjs/web-components/src/helpers/styles/constant.js +1 -9
- package/dist/esm/components/AddOn.js +1 -14
- package/dist/esm/components/ComponentToolbarPreview.js +1 -463
- package/dist/esm/components/ComponentWrapper.js +1 -42
- package/dist/esm/components/ComponentWrapperPreview.js +1 -132
- package/dist/esm/components/Empty.js +1 -3
- package/dist/esm/components/Render.js +1 -61
- package/dist/esm/components/Render.liquid.js +14 -282
- package/dist/esm/components/RenderBlock.js +1 -50
- package/dist/esm/components/RenderCustomCode.js +3 -52
- package/dist/esm/components/RenderPreview.js +1 -62
- package/dist/esm/components/RenderSection.js +1 -19
- package/dist/esm/components/ai-generator/AIContentGenerator.js +1 -0
- package/dist/esm/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/esm/components/ai-generator/components/PickProduct.js +1 -0
- package/dist/esm/components/ai-generator/components/ToneAndVoice.js +1 -0
- package/dist/esm/components/ai-generator/hooks/useGettingGenerateRequest.js +1 -0
- package/dist/esm/components/ai-generator/hooks/useListenEventGenerate.js +1 -0
- package/dist/esm/components/ai-generator/icons/AIIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/CloseIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/DropdownIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/esm/components/animation/AnimationWrapper.js +1 -0
- package/dist/esm/components/constant.js +1 -50
- package/dist/esm/components/resize/Resize.js +1 -12
- package/dist/esm/components/resize/Spacing.js +1 -244
- package/dist/esm/components/src/product/helpers/variant-presets.js +1 -54
- package/dist/esm/components/theme-section/CreateThemeSection.js +1 -115
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +1 -34
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +1 -100
- package/dist/esm/components/toolbar/Tooltip.js +1 -18
- 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 -476
- 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/PageContext.js +1 -41
- package/dist/esm/contexts/ProductContext.js +1 -153
- package/dist/esm/contexts/ProductListContext.js +1 -28
- package/dist/esm/contexts/SectionContext.js +1 -49
- package/dist/esm/contexts/ShopContext.js +1 -77
- 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/custom-font.generated.js +2 -4
- package/dist/esm/graphql/fragments/data-seo.generated.js +2 -4
- package/dist/esm/graphql/fragments/media.generated.js +2 -4
- package/dist/esm/graphql/fragments/product-little.generated.js +11 -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 +11 -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 +3 -6
- 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 +2 -4
- package/dist/esm/graphql/queries/product-variants.generated.js +4 -10
- package/dist/esm/graphql/queries/products.generated.js +18 -20
- package/dist/esm/graphql/queries/published-theme-pages.generated.js +9 -20
- package/dist/esm/graphql/queries/store-property.generated.js +2 -4
- package/dist/esm/graphql-app-api/queries/LibraryTemplate.generated.js +13 -0
- package/dist/esm/graphql-app-api/queries/SaleFunnelDiscounts.generated.js +34 -0
- package/dist/esm/graphql-app-api/queries/ThemePage.generated.js +22 -0
- package/dist/esm/helpers/GlobalEvent.js +1 -15
- package/dist/esm/helpers/animations.js +1 -211
- package/dist/esm/helpers/background.js +1 -222
- package/dist/esm/helpers/borders.js +4 -175
- package/dist/esm/helpers/carousel.js +1 -54
- package/dist/esm/helpers/clone-deep.js +1 -3
- package/dist/esm/helpers/cls.js +1 -14
- package/dist/esm/helpers/colors.js +1 -169
- package/dist/esm/helpers/compose-advance-style.js +1 -261
- package/dist/esm/helpers/constant.js +1 -19
- package/dist/esm/helpers/convert.js +1 -4
- package/dist/esm/helpers/covert-entities-html.js +1 -17
- package/dist/esm/helpers/css-variable.js +1 -5
- package/dist/esm/helpers/email.js +1 -6
- package/dist/esm/helpers/filter-toolbar-preview.js +1 -9
- package/dist/esm/helpers/flatten-connection.js +1 -7
- package/dist/esm/helpers/get-resonsive-value.js +1 -31
- package/dist/esm/helpers/get-shortname.js +1 -90
- package/dist/esm/helpers/icon-list.js +1 -58
- 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 -10
- 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 -149
- 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 -44
- package/dist/esm/helpers/queries/get-collection.js +1 -223
- 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 -161
- package/dist/esm/helpers/query.js +1 -25
- package/dist/esm/helpers/radius.js +6 -132
- package/dist/esm/helpers/render.js +1 -68
- package/dist/esm/helpers/shadow.js +1 -52
- package/dist/esm/helpers/size.js +4 -171
- 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 -116
- package/dist/esm/helpers/variant.js +1 -9
- package/dist/esm/hooks/animation/animations.js +1 -0
- package/dist/esm/hooks/animation/useAnimationActions.js +1 -37
- package/dist/esm/hooks/animation/useAnimationConfig.js +1 -27
- package/dist/esm/hooks/animation/useAnimationPreview.js +1 -29
- package/dist/esm/hooks/animation/useAnimationTarget.js +1 -118
- package/dist/esm/hooks/animation/useApplyAnimation.js +1 -83
- package/dist/esm/hooks/animation/useLivePageAnimation.js +1 -0
- 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 -21
- 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/useAnimations.js +1 -24
- 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 -109
- 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 -192
- 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/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/esm/index.js +1 -100
- package/dist/esm/types/animations.js +1 -47
- package/dist/esm/types/appAPI.js +1 -0
- package/dist/esm/types/global-style.js +1 -12
- package/dist/esm/web-components/src/helpers/styles/constant.js +1 -7
- package/dist/types/index.d.ts +24802 -6237
- package/package.json +8 -3
|
@@ -1,153 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useStore, createStore } from 'zustand';
|
|
3
|
-
import { useId, useMemo, useContext, createContext } from 'react';
|
|
4
|
-
import { flattenConnection } from '../helpers/flatten-connection.js';
|
|
5
|
-
import { checkInStock } from '../helpers/variant.js';
|
|
6
|
-
|
|
7
|
-
// const { Provider, useStore } = createContext<StoreApi<ProductContextProps>>();
|
|
8
|
-
const ProductContext = /*#__PURE__*/ createContext(null);
|
|
9
|
-
const createProductStoreProvider = (data)=>createStore((set, get)=>({
|
|
10
|
-
...data,
|
|
11
|
-
updateProperty: (name, data)=>{
|
|
12
|
-
set((state)=>{
|
|
13
|
-
return {
|
|
14
|
-
properties: state.properties?.map((v)=>{
|
|
15
|
-
if (v.key === name) {
|
|
16
|
-
return {
|
|
17
|
-
...v,
|
|
18
|
-
...data
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return v;
|
|
22
|
-
})
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
addProperty: (data)=>{
|
|
27
|
-
const properties = get().properties;
|
|
28
|
-
if (!properties?.some((v)=>v.key === data.key)) {
|
|
29
|
-
set((state)=>({
|
|
30
|
-
properties: [
|
|
31
|
-
...state.properties ?? [],
|
|
32
|
-
data
|
|
33
|
-
]
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
removeProperty: (name)=>{
|
|
38
|
-
set((state)=>({
|
|
39
|
-
properties: state.properties?.filter((v)=>v.key !== name)
|
|
40
|
-
}));
|
|
41
|
-
},
|
|
42
|
-
setQuantity: (num)=>{
|
|
43
|
-
set({
|
|
44
|
-
quantity: num > 0 ? num : 1
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
setProductFeaturedImage: (image)=>{
|
|
48
|
-
set({
|
|
49
|
-
featuredImageGlobal: image
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
incrementQuantity: ()=>{
|
|
53
|
-
set((state)=>{
|
|
54
|
-
const quantity = state.quantity ?? 1;
|
|
55
|
-
return {
|
|
56
|
-
quantity: quantity + 1
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
decrementQuantity: ()=>{
|
|
61
|
-
set((state)=>{
|
|
62
|
-
const quantity = state.quantity ?? 1;
|
|
63
|
-
return {
|
|
64
|
-
quantity: quantity > 2 ? quantity - 1 : 1
|
|
65
|
-
};
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
setSelectedOption: (optionId, optionValue)=>{
|
|
69
|
-
set((state)=>{
|
|
70
|
-
if (optionId && optionValue) {
|
|
71
|
-
return {
|
|
72
|
-
selectedOptions: {
|
|
73
|
-
...state?.selectedOptions,
|
|
74
|
-
[optionId]: optionValue
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
return state;
|
|
79
|
-
});
|
|
80
|
-
},
|
|
81
|
-
forceSelectedOption: (value)=>{
|
|
82
|
-
set((state)=>{
|
|
83
|
-
return {
|
|
84
|
-
selectedOptions: {
|
|
85
|
-
...state?.selectedOptions,
|
|
86
|
-
...value
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
updateIsSubmit: (value)=>{
|
|
92
|
-
set({
|
|
93
|
-
isSubmit: value
|
|
94
|
-
});
|
|
95
|
-
},
|
|
96
|
-
setHasUpdatePriceFollowQuantity: (updatePrice)=>{
|
|
97
|
-
set({
|
|
98
|
-
updatePrice
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}));
|
|
102
|
-
const ProductProvider = ({ children, product, initialVariantId, quantity = 1, isSyncProduct })=>{
|
|
103
|
-
const uiqueId = useId();
|
|
104
|
-
const store = useMemo(()=>{
|
|
105
|
-
let selectedOptions = {};
|
|
106
|
-
let featuredImageGlobal = undefined;
|
|
107
|
-
if (product) {
|
|
108
|
-
const variants = flattenConnection(product.variants);
|
|
109
|
-
const firstVariant = variants[0];
|
|
110
|
-
const firstVariantInStock = variants.find((item)=>checkInStock(item));
|
|
111
|
-
const initialVariant = variants.find((v)=>v?.id === initialVariantId) ?? firstVariantInStock ?? firstVariant;
|
|
112
|
-
selectedOptions = initialVariant?.selectedOptions.reduce((acc, option)=>{
|
|
113
|
-
if (option.name) {
|
|
114
|
-
return {
|
|
115
|
-
...acc,
|
|
116
|
-
[option.name]: option.value
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
return acc;
|
|
120
|
-
}, {});
|
|
121
|
-
featuredImageGlobal = product.medias?.edges.find((v)=>v.node?.id === initialVariant?.mediaId)?.node ?? product.featuredImage;
|
|
122
|
-
}
|
|
123
|
-
return createProductStoreProvider({
|
|
124
|
-
product,
|
|
125
|
-
quantity,
|
|
126
|
-
selectedOptions,
|
|
127
|
-
uiqueId,
|
|
128
|
-
featuredImageGlobal,
|
|
129
|
-
isSyncProduct
|
|
130
|
-
});
|
|
131
|
-
}, [
|
|
132
|
-
initialVariantId,
|
|
133
|
-
product,
|
|
134
|
-
quantity,
|
|
135
|
-
uiqueId,
|
|
136
|
-
isSyncProduct
|
|
137
|
-
]);
|
|
138
|
-
return /*#__PURE__*/ jsx(ProductContext.Provider, {
|
|
139
|
-
value: store,
|
|
140
|
-
children: /*#__PURE__*/ jsx(Fragment, {
|
|
141
|
-
children: children
|
|
142
|
-
})
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
const useProductStore = (selector, equalityFn)=>{
|
|
146
|
-
const store = useContext(ProductContext);
|
|
147
|
-
if (!store) {
|
|
148
|
-
throw new Error('Element of product must be used inside a Product');
|
|
149
|
-
}
|
|
150
|
-
return useStore(store, selector, equalityFn);
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export { ProductProvider, useProductStore };
|
|
1
|
+
import{jsx as e,Fragment as t}from"react/jsx-runtime";import{useStore as r,createStore as o}from"zustand";import{useId as i,useMemo as d,useContext as n,createContext as u}from"react";import{flattenConnection as a}from"../helpers/flatten-connection.js";import{checkInStock as s}from"../helpers/variant.js";let ProductContext=u(null),createProductStoreProvider=e=>o((t,r)=>({...e,updateProperty:(e,r)=>{t(t=>({properties:t.properties?.map(t=>t.key===e?{...t,...r}:t)}))},addProperty:e=>{let o=r().properties;o?.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})},setHasUpdatePriceFollowQuantity:e=>{t({updatePrice:e})}})),ProductProvider=({children:r,product:o,initialVariantId:n,quantity:u=1,isSyncProduct:p})=>{let c=i(),l=d(()=>{let e,t={};if(o){let r=a(o.variants),i=r[0],d=r.find(e=>s(e)),u=r.find(e=>e?.id===n)??d??i;t=u?.selectedOptions.reduce((e,t)=>t.name?{...e,[t.name]:t.value}:e,{}),e=o.medias?.edges.find(e=>e.node?.id===u?.mediaId)?.node??o.featuredImage}return createProductStoreProvider({product:o,quantity:u,selectedOptions:t,uiqueId:c,featuredImageGlobal:e,isSyncProduct:p})},[n,o,u,c,p]);return e(ProductContext.Provider,{value:l,children:e(t,{children:r})})},useProductStore=(e,t)=>{let o=n(ProductContext);if(!o)throw Error("Element of product must be used inside a Product");return r(o,e,t)};export{ProductProvider,useProductStore};
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useContext, createContext } from 'react';
|
|
3
|
-
import { useStore, createStore } from 'zustand';
|
|
4
|
-
|
|
5
|
-
const ProductListContext = /*#__PURE__*/ createContext(null);
|
|
6
|
-
const createProductListProvider = (data)=>createStore(()=>({
|
|
7
|
-
...data
|
|
8
|
-
}));
|
|
9
|
-
const ProductListProvider = ({ children, collection, products, settings, styles })=>{
|
|
10
|
-
return /*#__PURE__*/ jsx(ProductListContext.Provider, {
|
|
11
|
-
value: createProductListProvider({
|
|
12
|
-
products,
|
|
13
|
-
collection,
|
|
14
|
-
settings,
|
|
15
|
-
styles
|
|
16
|
-
}),
|
|
17
|
-
children: children
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
const useProductListStore = (selector, equalityFn)=>{
|
|
21
|
-
const store = useContext(ProductListContext);
|
|
22
|
-
if (!store) {
|
|
23
|
-
throw new Error('useProductListStore must be used within a useProductListStore');
|
|
24
|
-
}
|
|
25
|
-
return useStore(store, selector, equalityFn);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { ProductListContext, ProductListProvider, useProductListStore };
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useContext as r,createContext as o}from"react";import{useStore as e,createStore as i}from"zustand";let ProductListContext=o(null),createProductListProvider=t=>i(()=>({...t})),ProductListProvider=({children:r,collection:o,products:e,settings:i,styles:u})=>t(ProductListContext.Provider,{value:createProductListProvider({products:e,collection:o,settings:i,styles:u}),children:r}),useProductListStore=(t,o)=>{let i=r(ProductListContext);if(!i)throw Error("useProductListStore must be used within a useProductListStore");return e(i,t,o)};export{ProductListContext,ProductListProvider,useProductListStore};
|
|
@@ -1,49 +1 @@
|
|
|
1
|
-
import
|
|
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
|
+
import{jsx as e}from"react/jsx-runtime";import{useStore as t,createStore as o}from"zustand";import{useContext as r,createContext as i}from"react";import{cloneDeep as n}from"../helpers/clone-deep.js";import{normalizeBuilderData as c}from"../helpers/normalize-builder-data.js";let SectionContext=i(null),createSectionProvider=e=>o((t,o)=>({data:e??{},getSection:e=>{let t=o().data[e];return t??void 0},addSection:(e,o)=>{let r=c(o);t(t=>({data:{...t.data,[e]:n(r)}}))},removeSection:e=>{t(t=>{let{[e]:o,...r}=t.data;return{data:r}})}})),SectionProvider=({children:t,data:o,...r})=>e(SectionContext.Provider,{...r,value:createSectionProvider(o),children:t}),useSectionStore=(e,o)=>{let i=r(SectionContext);if(!i)throw Error("useSectionStore must be used within a SectionProvider");return t(i,e,o)},useSection=e=>useSectionStore(t=>t.getSection(e));export{SectionProvider,useSection,useSectionStore};
|
|
@@ -1,77 +1 @@
|
|
|
1
|
-
import
|
|
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
|
-
changeCreateThemeSectionCount: (count)=>{
|
|
40
|
-
set({
|
|
41
|
-
createThemeSectionCount: count
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
changeShopPlan: (plan)=>{
|
|
45
|
-
set({
|
|
46
|
-
plan
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}));
|
|
50
|
-
const ShopProvider = ({ children, addons, storeOption, queryOption, ...passProps })=>{
|
|
51
|
-
const store = useMemo(()=>createShopStoreProvider(storeOption), [
|
|
52
|
-
storeOption
|
|
53
|
-
]);
|
|
54
|
-
return /*#__PURE__*/ jsx(AddonProvider, {
|
|
55
|
-
components: addons,
|
|
56
|
-
children: /*#__PURE__*/ jsx(SWRConfig, {
|
|
57
|
-
value: queryOption,
|
|
58
|
-
children: /*#__PURE__*/ jsx(ShopContext.Provider, {
|
|
59
|
-
...passProps,
|
|
60
|
-
value: store,
|
|
61
|
-
children: /*#__PURE__*/ jsx(ModalProvider, {
|
|
62
|
-
children: children
|
|
63
|
-
})
|
|
64
|
-
}, JSON.stringify(storeOption))
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
// export const useShopStore = useStore;
|
|
69
|
-
const useShopStore = (selector, equalityFn)=>{
|
|
70
|
-
const store = useContext(ShopContext);
|
|
71
|
-
if (!store) {
|
|
72
|
-
throw new Error('useShopStore must be used within a ShopProvider');
|
|
73
|
-
}
|
|
74
|
-
return useStore(store, selector, equalityFn);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export { ShopProvider, useShopStore };
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{SWRConfig as o}from"swr";import{useStore as r,createStore as t}from"zustand";import{useMemo as n,useContext as h,createContext as i}from"react";import{AddonProvider as S}from"./AddonContext.js";import{ModalProvider as a}from"./ModalContext.js";let ShopContext=i(null),createShopStoreProvider=e=>t(o=>({mobileOnly:!1,isStorefront:!0,...e,changeLocale:e=>{o({locale:e})},changeCurrency:e=>{o({currency:e})},changeSwatches:e=>{o({swatches:e})},changeLayoutSettings:e=>{o({layoutSettings:e})},changeStorefrontInfo:({url:e,token:r})=>{o({storefrontUrl:e,storefrontToken:r})},changeCreateThemeSectionCount:e=>{o({createThemeSectionCount:e})},changeShopPlan:e=>{o({plan:e})}})),ShopProvider=({children:r,addons:t,storeOption:h,queryOption:i,...c})=>{let p=n(()=>createShopStoreProvider(h),[h]);return e(S,{components:t,children:e(o,{value:i,children:e(ShopContext.Provider,{...c,value:p,children:e(a,{children:r})},JSON.stringify(h))})})},useShopStore=(e,o)=>{let t=h(ShopContext);if(!t)throw Error("useShopStore must be used within a ShopProvider");return r(t,e,o)};export{ShopProvider,useShopStore};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
let CollectionDetailSelect=`
|
|
2
2
|
fragment CollectionDetailSelect on Collection {
|
|
3
3
|
id
|
|
4
4
|
createdAt
|
|
@@ -20,6 +20,4 @@
|
|
|
20
20
|
isStorefront
|
|
21
21
|
isSample
|
|
22
22
|
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
export { CollectionDetailSelect };
|
|
23
|
+
`;export{CollectionDetailSelect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
let CollectionProductSelect=`
|
|
2
2
|
fragment CollectionProductSelect on Collection {
|
|
3
3
|
...CollectionDetailSelect
|
|
4
4
|
products(
|
|
@@ -19,6 +19,4 @@
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
export { CollectionProductSelect };
|
|
22
|
+
`;export{CollectionProductSelect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
let CollectionSelect=`
|
|
2
2
|
fragment CollectionSelect on Collection {
|
|
3
3
|
...CollectionDetailSelect
|
|
4
4
|
products {
|
|
@@ -17,6 +17,4 @@
|
|
|
17
17
|
totalCount
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
export { CollectionSelect };
|
|
20
|
+
`;export{CollectionSelect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
let CustomFontSelect=`
|
|
2
2
|
fragment CustomFontSelect on CustomFont {
|
|
3
3
|
backupFilePath
|
|
4
4
|
fontFamily
|
|
@@ -7,6 +7,4 @@
|
|
|
7
7
|
mimeType
|
|
8
8
|
filePath
|
|
9
9
|
}
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
export { CustomFontSelect };
|
|
10
|
+
`;export{CustomFontSelect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
let ProductLittleSelect=`
|
|
2
2
|
fragment ProductLittleSelect on Product {
|
|
3
3
|
id
|
|
4
4
|
title
|
|
@@ -17,7 +17,14 @@
|
|
|
17
17
|
featuredImage {
|
|
18
18
|
...MediaSelect
|
|
19
19
|
}
|
|
20
|
+
collections {
|
|
21
|
+
edges {
|
|
22
|
+
node {
|
|
23
|
+
id
|
|
24
|
+
title
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
tags
|
|
20
29
|
}
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
export { ProductLittleSelect };
|
|
30
|
+
`;export{ProductLittleSelect};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
let ProductOptionValueSelect=`
|
|
2
2
|
fragment ProductOptionValueSelect on ProductOptionValue {
|
|
3
3
|
id
|
|
4
4
|
label
|
|
5
5
|
isDefault
|
|
6
6
|
baseID
|
|
7
7
|
}
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
export { ProductOptionValueSelect };
|
|
8
|
+
`;export{ProductOptionValueSelect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
let ProductOptionSelect=`
|
|
2
2
|
fragment ProductOptionSelect on ProductOption {
|
|
3
3
|
id
|
|
4
4
|
name
|
|
@@ -7,6 +7,4 @@
|
|
|
7
7
|
...ProductOptionValueSelect
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
export { ProductOptionSelect };
|
|
10
|
+
`;export{ProductOptionSelect};
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
let 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
|
|
@@ -26,6 +35,4 @@
|
|
|
26
35
|
}
|
|
27
36
|
}
|
|
28
37
|
}
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
export { ProductSelect };
|
|
38
|
+
`;export{ProductSelect};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
let PublishedCustomSectionSelect=`
|
|
2
2
|
fragment PublishedCustomSectionSelect on PublishedCustomSection {
|
|
3
3
|
cid
|
|
4
4
|
component
|
|
5
5
|
id
|
|
6
6
|
type
|
|
7
7
|
}
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
export { PublishedCustomSectionSelect };
|
|
8
|
+
`;export{PublishedCustomSectionSelect};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
let PublishedPageSectionSelect=`
|
|
2
2
|
fragment PublishedPageSectionSelect on PublishedPageSection {
|
|
3
3
|
cid
|
|
4
4
|
component
|
|
5
5
|
id
|
|
6
6
|
}
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
export { PublishedPageSectionSelect };
|
|
7
|
+
`;export{PublishedPageSectionSelect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
let PublishedThemePageSelect=`
|
|
2
2
|
fragment PublishedThemePageSelect on PublishedThemePage {
|
|
3
3
|
id
|
|
4
4
|
name
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
...CustomFontSelect
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
const PreviewThemePageSelect = `
|
|
30
|
+
`,PreviewThemePageSelect=`
|
|
32
31
|
fragment PreviewThemePageSelect on PublishedThemePage {
|
|
33
32
|
id
|
|
34
33
|
name
|
|
@@ -54,6 +53,4 @@ const PreviewThemePageSelect = `
|
|
|
54
53
|
...CustomCodeSelect
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
export { PreviewThemePageSelect, PublishedThemePageSelect };
|
|
56
|
+
`;export{PreviewThemePageSelect,PublishedThemePageSelect};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
let PublishedThemeStyleSelect=`
|
|
2
2
|
fragment PublishedThemeStyleSelect on PublishedThemeStyle {
|
|
3
3
|
id
|
|
4
4
|
data
|
|
5
5
|
name
|
|
6
6
|
}
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
export { PublishedThemeStyleSelect };
|
|
7
|
+
`;export{PublishedThemeStyleSelect};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
mutation pageViewUp($pageHandle: String!, $userAgent: String
|
|
1
|
+
let PageViewUpDocument=`
|
|
2
|
+
mutation pageViewUp($pageHandle: String!, $userAgent: String) {
|
|
3
3
|
pageViewUp(pageHandle: $pageHandle, userAgent: $userAgent)
|
|
4
4
|
}
|
|
5
|
-
`;
|
|
6
|
-
|
|
7
|
-
export { PageViewUpDocument };
|
|
5
|
+
`;export{PageViewUpDocument};
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 = `
|
|
1
|
+
import{CollectionProductSelect as e}from"../fragments/collection-product.generated.js";import{CollectionDetailSelect as r}from"../fragments/collection-detail.generated.js";import{ProductSelect as t}from"../fragments/product.generated.js";import{ProductLittleSelect as o}from"../fragments/product-little.generated.js";import{ProductOptionSelect as i}from"../fragments/product-option.generated.js";import{ProductOptionValueSelect as n}from"../fragments/product-option-value.generated.js";import{MediaSelect as d}from"../fragments/media.generated.js";import{VariantSelect as a}from"../fragments/variant.generated.js";import{SelectedOptionSelect as l}from"../fragments/selected-option.generated.js";let CollectionDetailFilterDocument=`
|
|
12
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) {
|
|
13
3
|
collections(first: 1, orderBy: $orderBy, where: $where) {
|
|
14
4
|
edges {
|
|
@@ -19,14 +9,12 @@ const CollectionDetailFilterDocument = `
|
|
|
19
9
|
}
|
|
20
10
|
}
|
|
21
11
|
}
|
|
22
|
-
${
|
|
23
|
-
${
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
${
|
|
27
|
-
${
|
|
28
|
-
${
|
|
29
|
-
${
|
|
30
|
-
${
|
|
31
|
-
|
|
32
|
-
export { CollectionDetailFilterDocument };
|
|
12
|
+
${e}
|
|
13
|
+
${r}
|
|
14
|
+
${t}
|
|
15
|
+
${o}
|
|
16
|
+
${i}
|
|
17
|
+
${n}
|
|
18
|
+
${d}
|
|
19
|
+
${a}
|
|
20
|
+
${l}`;export{CollectionDetailFilterDocument};
|