@gem-sdk/core 1.58.0-dev.13 → 1.58.0-dev.133
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 -0
- package/dist/cjs/components/ComponentAnimation.js +1 -0
- package/dist/cjs/components/ComponentToolbarPreview.js +33 -19
- package/dist/cjs/components/ComponentWrapper.js +1 -0
- package/dist/cjs/components/ComponentWrapperPreview.js +1 -0
- package/dist/cjs/components/Empty.js +1 -0
- package/dist/cjs/components/InteractionSuffix.js +2 -1
- package/dist/cjs/components/Render.js +1 -0
- package/dist/cjs/components/Render.liquid.js +14 -5
- package/dist/cjs/components/RenderBlock.js +1 -0
- package/dist/cjs/components/RenderCustomCode.js +1 -0
- package/dist/cjs/components/RenderPreview.js +1 -0
- package/dist/cjs/components/RenderSection.js +1 -0
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +2 -1
- 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/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/SearchIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/UpgradeIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/WarningIcon.js +1 -0
- package/dist/cjs/components/resize/Resize.js +1 -0
- package/dist/cjs/components/resize/Spacing.js +1 -0
- package/dist/cjs/components/theme-section/CreateThemeSection.js +2 -1
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +1 -0
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +1 -0
- package/dist/cjs/components/toolbar/Tooltip.js +1 -0
- package/dist/cjs/contexts/AddonContext.js +1 -0
- package/dist/cjs/contexts/ArticleContext.js +1 -0
- package/dist/cjs/contexts/ArticleListContext.js +1 -0
- package/dist/cjs/contexts/BuilderComponent.js +1 -0
- package/dist/cjs/contexts/BuilderContext.js +1 -0
- package/dist/cjs/contexts/BuilderPreviewContext.js +1 -0
- package/dist/cjs/contexts/CartLineContext.js +1 -0
- package/dist/cjs/contexts/CollectionContext.js +1 -0
- package/dist/cjs/contexts/ModalContext.js +1 -0
- package/dist/cjs/contexts/PageContext.js +1 -0
- package/dist/cjs/contexts/ProductContext.js +17 -1
- package/dist/cjs/contexts/ProductListContext.js +1 -0
- package/dist/cjs/contexts/SectionContext.js +1 -0
- package/dist/cjs/contexts/ShopContext.js +1 -0
- package/dist/cjs/graphql/fragments/preview-theme-page.generated.js +35 -0
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +4 -28
- package/dist/cjs/graphql/queries/articles.generated.js +1 -0
- package/dist/cjs/graphql/queries/preview-page.generated.js +9 -13
- package/dist/cjs/graphql/queries/shop-shopify.generated.js +11 -0
- package/dist/cjs/helpers/align.js +18 -0
- package/dist/cjs/helpers/backgroundImage.js +184 -0
- package/dist/cjs/helpers/compose-advance-style.js +53 -3
- package/dist/cjs/helpers/filter-toolbar-preview.js +1 -0
- package/dist/cjs/helpers/interaction/index.js +2 -1
- package/dist/cjs/helpers/is-empty-children.js +1 -0
- package/dist/cjs/helpers/layout.js +17 -0
- package/dist/cjs/helpers/prefetch-queries.js +5 -3
- package/dist/cjs/helpers/radius.js +3 -1
- package/dist/cjs/helpers/shadow.js +25 -0
- package/dist/cjs/helpers/size.js +30 -2
- package/dist/cjs/helpers/third-party/appConfig.js +63 -0
- package/dist/cjs/helpers/third-party/appSetting.js +339 -2
- package/dist/cjs/helpers/third-party/constant.js +10 -1
- package/dist/cjs/helpers/third-party/getAppBlockConfig.js +17 -1
- package/dist/cjs/helpers/typography.js +9 -1
- package/dist/cjs/hooks/animation/useAnimationActions.js +1 -0
- package/dist/cjs/hooks/animation/useAnimationConfig.js +1 -0
- package/dist/cjs/hooks/animation/useAnimationPreview.js +1 -0
- package/dist/cjs/hooks/animation/useAnimationTarget.js +1 -0
- package/dist/cjs/hooks/animation/useApplyAnimation.js +1 -0
- package/dist/cjs/hooks/articles/useArticlesQuery.js +1 -0
- package/dist/cjs/hooks/cart/use-add-to-cart.js +1 -0
- package/dist/cjs/hooks/cart/use-cart-data.js +1 -0
- package/dist/cjs/hooks/cart/use-cart-discount-codes-update.js +1 -0
- package/dist/cjs/hooks/cart/use-cart-note-update.js +1 -0
- package/dist/cjs/hooks/cart/use-create-cart.js +1 -0
- package/dist/cjs/hooks/cart/use-remove-cart-item.js +1 -0
- package/dist/cjs/hooks/cart/use-update-cart-item.js +1 -0
- package/dist/cjs/hooks/shop/use-collection-query.js +1 -0
- package/dist/cjs/hooks/shop/use-collections-query.js +1 -0
- package/dist/cjs/hooks/shop/use-product-query.js +1 -0
- package/dist/cjs/hooks/shop/use-products-query.js +1 -0
- package/dist/cjs/hooks/shop/useShopifyLink.js +47 -0
- package/dist/cjs/hooks/shop.js +10 -0
- package/dist/cjs/hooks/use-current-device.js +1 -0
- package/dist/cjs/hooks/use-lazy-video.js +1 -0
- package/dist/cjs/hooks/useAnimations.js +1 -0
- package/dist/cjs/hooks/useCartId.js +1 -0
- package/dist/cjs/hooks/useCartLine.js +1 -0
- package/dist/cjs/hooks/useCartUI.js +1 -0
- package/dist/cjs/hooks/useCollection.js +1 -0
- package/dist/cjs/hooks/useFetchHandle.js +1 -0
- package/dist/cjs/hooks/useFormatMoney.js +1 -0
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +1 -0
- package/dist/cjs/hooks/useInteraction.js +1 -0
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +1 -0
- package/dist/cjs/hooks/useLoadScript.js +1 -0
- package/dist/cjs/hooks/useMoney.js +1 -0
- package/dist/cjs/hooks/usePrevious.js +1 -0
- package/dist/cjs/hooks/useProduct.js +28 -1
- package/dist/cjs/hooks/useProductList.js +1 -0
- package/dist/cjs/hooks/useSuspenseFetch.js +1 -0
- package/dist/cjs/hooks/useSwatchesOptions.js +1 -0
- package/dist/cjs/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/cjs/index.js +28 -10
- package/dist/esm/components/AddOn.js +1 -0
- package/dist/esm/components/ComponentAnimation.js +1 -0
- package/dist/esm/components/ComponentToolbarPreview.js +33 -19
- package/dist/esm/components/ComponentWrapper.js +1 -0
- package/dist/esm/components/ComponentWrapperPreview.js +1 -0
- package/dist/esm/components/Empty.js +1 -0
- package/dist/esm/components/InteractionSuffix.js +2 -1
- package/dist/esm/components/Render.js +1 -0
- package/dist/esm/components/Render.liquid.js +14 -5
- package/dist/esm/components/RenderBlock.js +1 -0
- package/dist/esm/components/RenderCustomCode.js +1 -0
- package/dist/esm/components/RenderPreview.js +1 -0
- package/dist/esm/components/RenderSection.js +1 -0
- package/dist/esm/components/ai-generator/AIContentGenerator.js +2 -1
- 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/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/SearchIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/UpgradeIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/WarningIcon.js +1 -0
- package/dist/esm/components/resize/Resize.js +1 -0
- package/dist/esm/components/resize/Spacing.js +1 -0
- package/dist/esm/components/theme-section/CreateThemeSection.js +2 -1
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +1 -0
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +1 -0
- package/dist/esm/components/toolbar/Tooltip.js +1 -0
- package/dist/esm/contexts/AddonContext.js +1 -0
- package/dist/esm/contexts/ArticleContext.js +1 -0
- package/dist/esm/contexts/ArticleListContext.js +1 -0
- package/dist/esm/contexts/BuilderComponent.js +1 -0
- package/dist/esm/contexts/BuilderContext.js +1 -0
- package/dist/esm/contexts/BuilderPreviewContext.js +1 -0
- package/dist/esm/contexts/CartLineContext.js +1 -0
- package/dist/esm/contexts/CollectionContext.js +1 -0
- package/dist/esm/contexts/ModalContext.js +1 -0
- package/dist/esm/contexts/PageContext.js +1 -0
- package/dist/esm/contexts/ProductContext.js +17 -1
- package/dist/esm/contexts/ProductListContext.js +1 -0
- package/dist/esm/contexts/SectionContext.js +1 -0
- package/dist/esm/contexts/ShopContext.js +1 -0
- package/dist/esm/graphql/fragments/preview-theme-page.generated.js +33 -0
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +5 -28
- package/dist/esm/graphql/queries/articles.generated.js +1 -0
- package/dist/esm/graphql/queries/preview-page.generated.js +8 -12
- package/dist/esm/graphql/queries/shop-shopify.generated.js +9 -0
- package/dist/esm/helpers/align.js +18 -1
- package/dist/esm/helpers/backgroundImage.js +179 -0
- package/dist/esm/helpers/compose-advance-style.js +53 -3
- package/dist/esm/helpers/filter-toolbar-preview.js +1 -0
- package/dist/esm/helpers/interaction/index.js +2 -1
- package/dist/esm/helpers/is-empty-children.js +1 -0
- package/dist/esm/helpers/layout.js +17 -1
- package/dist/esm/helpers/prefetch-queries.js +5 -3
- package/dist/esm/helpers/radius.js +3 -1
- package/dist/esm/helpers/shadow.js +25 -1
- package/dist/esm/helpers/size.js +29 -3
- package/dist/esm/helpers/third-party/appConfig.js +55 -1
- package/dist/esm/helpers/third-party/appSetting.js +339 -2
- package/dist/esm/helpers/third-party/constant.js +11 -2
- package/dist/esm/helpers/third-party/getAppBlockConfig.js +17 -1
- package/dist/esm/helpers/typography.js +9 -2
- package/dist/esm/hooks/animation/useAnimationActions.js +1 -0
- package/dist/esm/hooks/animation/useAnimationConfig.js +1 -0
- package/dist/esm/hooks/animation/useAnimationPreview.js +1 -0
- package/dist/esm/hooks/animation/useAnimationTarget.js +1 -0
- package/dist/esm/hooks/animation/useApplyAnimation.js +1 -0
- package/dist/esm/hooks/articles/useArticlesQuery.js +1 -0
- package/dist/esm/hooks/cart/use-add-to-cart.js +1 -0
- package/dist/esm/hooks/cart/use-cart-data.js +1 -0
- package/dist/esm/hooks/cart/use-cart-discount-codes-update.js +1 -0
- package/dist/esm/hooks/cart/use-cart-note-update.js +1 -0
- package/dist/esm/hooks/cart/use-create-cart.js +1 -0
- package/dist/esm/hooks/cart/use-remove-cart-item.js +1 -0
- package/dist/esm/hooks/cart/use-update-cart-item.js +1 -0
- package/dist/esm/hooks/shop/use-collection-query.js +1 -0
- package/dist/esm/hooks/shop/use-collections-query.js +1 -0
- package/dist/esm/hooks/shop/use-product-query.js +1 -0
- package/dist/esm/hooks/shop/use-products-query.js +1 -0
- package/dist/esm/hooks/shop/useShopifyLink.js +45 -0
- package/dist/esm/hooks/shop.js +10 -1
- package/dist/esm/hooks/use-current-device.js +1 -0
- package/dist/esm/hooks/use-lazy-video.js +1 -0
- package/dist/esm/hooks/useAnimations.js +1 -0
- package/dist/esm/hooks/useCartId.js +1 -0
- package/dist/esm/hooks/useCartLine.js +1 -0
- package/dist/esm/hooks/useCartUI.js +1 -0
- package/dist/esm/hooks/useCollection.js +1 -0
- package/dist/esm/hooks/useFetchHandle.js +1 -0
- package/dist/esm/hooks/useFormatMoney.js +1 -0
- package/dist/esm/hooks/useInitialSwatchesOptions.js +1 -0
- package/dist/esm/hooks/useInteraction.js +1 -0
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +1 -0
- package/dist/esm/hooks/useLoadScript.js +1 -0
- package/dist/esm/hooks/useMoney.js +1 -0
- package/dist/esm/hooks/usePrevious.js +1 -0
- package/dist/esm/hooks/useProduct.js +27 -2
- package/dist/esm/hooks/useProductList.js +1 -0
- package/dist/esm/hooks/useSuspenseFetch.js +1 -0
- package/dist/esm/hooks/useSwatchesOptions.js +1 -0
- package/dist/esm/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/esm/index.js +14 -11
- package/dist/types/index.d.ts +825 -263
- package/package.json +4 -4
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var react = require('react');
|
|
4
5
|
var ProductContext = require('../contexts/ProductContext.js');
|
|
5
6
|
require('react/jsx-runtime');
|
|
6
7
|
require('zustand');
|
|
7
|
-
require('swr');
|
|
8
8
|
var PageContext = require('../contexts/PageContext.js');
|
|
9
|
+
require('swr');
|
|
9
10
|
require('@gem-sdk/adapter-shopify');
|
|
10
11
|
require('swr/mutation');
|
|
11
12
|
require('swr/infinite');
|
|
12
13
|
require('vanilla-lazyload');
|
|
13
14
|
require('./useCartUI.js');
|
|
14
15
|
var variant = require('../helpers/variant.js');
|
|
16
|
+
var useShopifyLink = require('./shop/useShopifyLink.js');
|
|
15
17
|
require('react-transition-group');
|
|
16
18
|
require('@gem-sdk/core');
|
|
17
19
|
require('classnames');
|
|
@@ -35,6 +37,29 @@ const useProductProperties = ()=>{
|
|
|
35
37
|
const useIsSyncProduct = ()=>{
|
|
36
38
|
return ProductContext.useProductStore((s)=>s.isSyncProduct);
|
|
37
39
|
};
|
|
40
|
+
const useProductBundleDiscount = ()=>{
|
|
41
|
+
const useProductCompareAtPrice = ProductContext.useProductStore((s)=>s.useProductCompareAtPrice);
|
|
42
|
+
const seUseProductCompareAtPrice = ProductContext.useProductStore((s)=>s.setUseProductCompareAtPrice);
|
|
43
|
+
return {
|
|
44
|
+
useProductCompareAtPrice,
|
|
45
|
+
seUseProductCompareAtPrice
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const useProductShopifyEditLink = ()=>{
|
|
49
|
+
const product = ProductContext.useProductStore((s)=>s.product);
|
|
50
|
+
const productId = product?.baseID?.replace('gid://shopify/Product/', '');
|
|
51
|
+
const { linkEditProduct } = useShopifyLink.useShopifyLink({
|
|
52
|
+
productId
|
|
53
|
+
});
|
|
54
|
+
const redirectProductShopifyLink = ()=>{
|
|
55
|
+
if (!linkEditProduct) return;
|
|
56
|
+
window.open(linkEditProduct, '_blank');
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
linkEditProduct,
|
|
60
|
+
redirectProductShopifyLink
|
|
61
|
+
};
|
|
62
|
+
};
|
|
38
63
|
const useQuantity = ()=>{
|
|
39
64
|
const quantity = ProductContext.useProductStore((s)=>s.quantity);
|
|
40
65
|
const hasUpdatePrice = ProductContext.useProductStore((s)=>s.updatePrice);
|
|
@@ -226,8 +251,10 @@ exports.useFeaturedImageGlobal = useFeaturedImageGlobal;
|
|
|
226
251
|
exports.useHasPreSelected = useHasPreSelected;
|
|
227
252
|
exports.useIsSyncProduct = useIsSyncProduct;
|
|
228
253
|
exports.useProduct = useProduct;
|
|
254
|
+
exports.useProductBundleDiscount = useProductBundleDiscount;
|
|
229
255
|
exports.useProductOfferDiscount = useProductOfferDiscount;
|
|
230
256
|
exports.useProductProperties = useProductProperties;
|
|
257
|
+
exports.useProductShopifyEditLink = useProductShopifyEditLink;
|
|
231
258
|
exports.useQuantity = useQuantity;
|
|
232
259
|
exports.useSelectedOption = useSelectedOption;
|
|
233
260
|
exports.useUniqProductID = useUniqProductID;
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,6 +27,7 @@ var publishedThemePages_generated = require('./graphql/queries/published-theme-p
|
|
|
27
27
|
var products_generated = require('./graphql/queries/products.generated.js');
|
|
28
28
|
var storeProperty_generated = require('./graphql/queries/store-property.generated.js');
|
|
29
29
|
var previewPage_generated = require('./graphql/queries/preview-page.generated.js');
|
|
30
|
+
var shopShopify_generated = require('./graphql/queries/shop-shopify.generated.js');
|
|
30
31
|
var LibraryTemplate_generated = require('./graphql-app-api/queries/LibraryTemplate.generated.js');
|
|
31
32
|
var ThemePage_generated = require('./graphql-app-api/queries/ThemePage.generated.js');
|
|
32
33
|
var SaleFunnelDiscounts_generated = require('./graphql-app-api/queries/SaleFunnelDiscounts.generated.js');
|
|
@@ -54,6 +55,7 @@ var fpixel = require('./helpers/tracking/fpixel.js');
|
|
|
54
55
|
var gtag = require('./helpers/tracking/gtag.js');
|
|
55
56
|
var tiktokpixel = require('./helpers/tracking/tiktokpixel.js');
|
|
56
57
|
var background = require('./helpers/background.js');
|
|
58
|
+
var backgroundImage = require('./helpers/backgroundImage.js');
|
|
57
59
|
var colors = require('./helpers/colors.js');
|
|
58
60
|
var composeAdvanceStyle = require('./helpers/compose-advance-style.js');
|
|
59
61
|
var convert = require('./helpers/convert.js');
|
|
@@ -71,6 +73,7 @@ var render = require('./helpers/render.js');
|
|
|
71
73
|
var shadow = require('./helpers/shadow.js');
|
|
72
74
|
var size = require('./helpers/size.js');
|
|
73
75
|
var typography = require('./helpers/typography.js');
|
|
76
|
+
var useArticlesQuery = require('./hooks/articles/useArticlesQuery.js');
|
|
74
77
|
var useAddToCart = require('./hooks/cart/use-add-to-cart.js');
|
|
75
78
|
var useCartData = require('./hooks/cart/use-cart-data.js');
|
|
76
79
|
var useCartDiscountCodesUpdate = require('./hooks/cart/use-cart-discount-codes-update.js');
|
|
@@ -84,23 +87,23 @@ var useCollectionsQuery = require('./hooks/shop/use-collections-query.js');
|
|
|
84
87
|
var useProductQuery = require('./hooks/shop/use-product-query.js');
|
|
85
88
|
var useProductsQuery = require('./hooks/shop/use-products-query.js');
|
|
86
89
|
var useCurrentDevice = require('./hooks/use-current-device.js');
|
|
87
|
-
var useFormatMoney = require('./hooks/useFormatMoney.js');
|
|
88
90
|
var useLazyVideo = require('./hooks/use-lazy-video.js');
|
|
89
91
|
var useCartId = require('./hooks/useCartId.js');
|
|
90
92
|
var useCartLine = require('./hooks/useCartLine.js');
|
|
91
93
|
var useCartUI = require('./hooks/useCartUI.js');
|
|
92
94
|
var useCollection = require('./hooks/useCollection.js');
|
|
95
|
+
var useFormatMoney = require('./hooks/useFormatMoney.js');
|
|
93
96
|
var react = require('react');
|
|
97
|
+
var useInitialSwatchesOptions = require('./hooks/useInitialSwatchesOptions.js');
|
|
94
98
|
var useIsomorphicLayoutEffect = require('./hooks/useIsomorphicLayoutEffect.js');
|
|
95
99
|
var useLoadScript = require('./hooks/useLoadScript.js');
|
|
96
100
|
var useMoney = require('./hooks/useMoney.js');
|
|
97
101
|
var usePrevious = require('./hooks/usePrevious.js');
|
|
98
|
-
var useArticlesQuery = require('./hooks/articles/useArticlesQuery.js');
|
|
99
102
|
var useProduct = require('./hooks/useProduct.js');
|
|
103
|
+
var useShopifyLink = require('./hooks/shop/useShopifyLink.js');
|
|
100
104
|
var useProductList = require('./hooks/useProductList.js');
|
|
101
105
|
var useSuspenseFetch = require('./hooks/useSuspenseFetch.js');
|
|
102
106
|
var useSwatchesOptions = require('./hooks/useSwatchesOptions.js');
|
|
103
|
-
var useInitialSwatchesOptions = require('./hooks/useInitialSwatchesOptions.js');
|
|
104
107
|
var custom = require('./types/custom.js');
|
|
105
108
|
var shop$1 = require('./types/shop.js');
|
|
106
109
|
var appAPI = require('./types/appAPI.js');
|
|
@@ -159,7 +162,8 @@ exports.CollectionsDocument = collections_generated.CollectionsDocument;
|
|
|
159
162
|
exports.PublishedThemePagesDocument = publishedThemePages_generated.PublishedThemePagesDocument;
|
|
160
163
|
exports.ProductsDocument = products_generated.ProductsDocument;
|
|
161
164
|
exports.StorePropertyDocument = storeProperty_generated.StorePropertyDocument;
|
|
162
|
-
exports.
|
|
165
|
+
exports.PreviewThemePageDocument = previewPage_generated.PreviewThemePageDocument;
|
|
166
|
+
exports.ShopShopifyDocument = shopShopify_generated.ShopShopifyDocument;
|
|
163
167
|
exports.LibraryTemplateDocument = LibraryTemplate_generated.LibraryTemplateDocument;
|
|
164
168
|
exports.ThemePageDocument = ThemePage_generated.ThemePageDocument;
|
|
165
169
|
exports.SaleFunnelDiscountsDocument = SaleFunnelDiscounts_generated.SaleFunnelDiscountsDocument;
|
|
@@ -208,6 +212,10 @@ exports.getGradientBgrStyleForButton = background.getGradientBgrStyleForButton;
|
|
|
208
212
|
exports.getStyleBackgroundByDevice = background.getStyleBackgroundByDevice;
|
|
209
213
|
exports.getStyleBgColor = background.getStyleBgColor;
|
|
210
214
|
exports.makeFixedBgAttachment = background.makeFixedBgAttachment;
|
|
215
|
+
exports.composeBackgroundImageCss = backgroundImage.composeBackgroundImageCss;
|
|
216
|
+
exports.getBgImageSourceByDevice = backgroundImage.getBgImageSourceByDevice;
|
|
217
|
+
exports.getStyleBackgroundImageByDevice = backgroundImage.getStyleBackgroundImageByDevice;
|
|
218
|
+
exports.getStyleBgImageSource = backgroundImage.getStyleBgImageSource;
|
|
211
219
|
exports.composeTextColorCss = colors.composeTextColorCss;
|
|
212
220
|
exports.getGlobalColorCSSProp = colors.getGlobalColorCSSProp;
|
|
213
221
|
exports.getGlobalColorClass = colors.getGlobalColorClass;
|
|
@@ -237,6 +245,7 @@ exports.composePostionIconList = iconList.composePostionIconList;
|
|
|
237
245
|
exports.isDefined = isDefined.isDefined;
|
|
238
246
|
exports.composeGridLayout = layout.composeGridLayout;
|
|
239
247
|
exports.convertOldLayout = layout.convertOldLayout;
|
|
248
|
+
exports.getLayoutClasses = layout.getLayoutClasses;
|
|
240
249
|
exports.gridToArrayRegex = layout.gridToArrayRegex;
|
|
241
250
|
exports.optionLayoutStyle = layout.optionLayoutStyle;
|
|
242
251
|
exports.makeAspectRatio = makeStyle.makeAspectRatio;
|
|
@@ -253,6 +262,7 @@ exports.makeStyleState = makeStyle.makeStyleState;
|
|
|
253
262
|
exports.makeWidth = makeStyle.makeWidth;
|
|
254
263
|
exports.removeNullUndefined = makeStyle.removeNullUndefined;
|
|
255
264
|
exports.convertTextAlignToJustify = align.convertTextAlignToJustify;
|
|
265
|
+
exports.getAlignmentClasses = align.getAlignmentClasses;
|
|
256
266
|
exports.checkInStock = variant.checkInStock;
|
|
257
267
|
exports.checkAvailableVariantInStock = product.checkAvailableVariantInStock;
|
|
258
268
|
exports.getSelectedVariant = product.getSelectedVariant;
|
|
@@ -276,6 +286,7 @@ exports.styles = render.styles;
|
|
|
276
286
|
exports.template = render.template;
|
|
277
287
|
exports.composeShadowCss = shadow.composeShadowCss;
|
|
278
288
|
exports.getResponsiveStyleShadow = shadow.getResponsiveStyleShadow;
|
|
289
|
+
exports.getResponsiveStyleShadowWithoutState = shadow.getResponsiveStyleShadowWithoutState;
|
|
279
290
|
exports.getStyleShadow = shadow.getStyleShadow;
|
|
280
291
|
exports.getStyleShadowState = shadow.getStyleShadowState;
|
|
281
292
|
exports.parseValueWithUnit = shadow.parseValueWithUnit;
|
|
@@ -286,6 +297,8 @@ exports.getAspectRatioGlobalSize = size.getAspectRatioGlobalSize;
|
|
|
286
297
|
exports.getGlobalSizeGap = size.getGlobalSizeGap;
|
|
287
298
|
exports.getHeightByShapeGlobalSize = size.getHeightByShapeGlobalSize;
|
|
288
299
|
exports.getPaddingGlobalSize = size.getPaddingGlobalSize;
|
|
300
|
+
exports.getPaddingStyleByDevice = size.getPaddingStyleByDevice;
|
|
301
|
+
exports.getResponsiveStylePadding = size.getResponsiveStylePadding;
|
|
289
302
|
exports.getValueByDevice = size.getValueByDevice;
|
|
290
303
|
exports.getWidthByShapeGlobalSize = size.getWidthByShapeGlobalSize;
|
|
291
304
|
exports.getWidthHeightGlobalSize = size.getWidthHeightGlobalSize;
|
|
@@ -294,6 +307,7 @@ exports.makeGlobalSizeIcon = size.makeGlobalSizeIcon;
|
|
|
294
307
|
exports.makeStyleWithDefault = size.makeStyleWithDefault;
|
|
295
308
|
exports.composeFallbackTypographyStyle = typography.composeFallbackTypographyStyle;
|
|
296
309
|
exports.composeFontFamilyTypographyV2 = typography.composeFontFamilyTypographyV2;
|
|
310
|
+
exports.composeTextHoverColorCss = typography.composeTextHoverColorCss;
|
|
297
311
|
exports.composeTypography = typography.composeTypography;
|
|
298
312
|
exports.composeTypographyAttr = typography.composeTypographyAttr;
|
|
299
313
|
exports.composeTypographyClassName = typography.composeTypographyClassName;
|
|
@@ -302,6 +316,8 @@ exports.composeTypographyStyle = typography.composeTypographyStyle;
|
|
|
302
316
|
exports.composeTypographyV2 = typography.composeTypographyV2;
|
|
303
317
|
exports.composeTypographyV2Css = typography.composeTypographyV2Css;
|
|
304
318
|
exports.genTypoClass = typography.genTypoClass;
|
|
319
|
+
exports.useArticlesQuery = useArticlesQuery.useArticlesQuery;
|
|
320
|
+
exports.useBlogsQuery = useArticlesQuery.useBlogsQuery;
|
|
305
321
|
exports.useAddToCart = useAddToCart.useAddToCart;
|
|
306
322
|
exports.useCartData = useCartData.useCartData;
|
|
307
323
|
exports.useCartDiscountCodesUpdate = useCartDiscountCodesUpdate.useCartDiscountCodesUpdate;
|
|
@@ -323,30 +339,30 @@ exports.usePageType = shop.usePageType;
|
|
|
323
339
|
exports.usePluginEnable = shop.usePluginEnable;
|
|
324
340
|
exports.useStoreFront = shop.useStoreFront;
|
|
325
341
|
exports.useSwatches = shop.useSwatches;
|
|
342
|
+
exports.useTimezone = shop.useTimezone;
|
|
326
343
|
exports.useCollectionQuery = useCollectionQuery.useCollectionQuery;
|
|
327
344
|
exports.useCollectionsQuery = useCollectionsQuery.useCollectionsQuery;
|
|
328
345
|
exports.useProductQuery = useProductQuery.useProductQuery;
|
|
329
346
|
exports.useProductsQuery = useProductsQuery.useProductsQuery;
|
|
330
347
|
exports.useProductsQueryAll = useProductsQuery.useProductsQueryAll;
|
|
331
348
|
exports.useCurrentDevice = useCurrentDevice.useCurrentDevice;
|
|
332
|
-
exports.formatMoney = useFormatMoney.formatMoney;
|
|
333
|
-
exports.shopifyPriceRounding = useFormatMoney.shopifyPriceRounding;
|
|
334
|
-
exports.useFormatMoney = useFormatMoney.useFormatMoney;
|
|
335
349
|
exports.useLazyVideo = useLazyVideo.useLazyVideo;
|
|
336
350
|
exports.useCartId = useCartId.default;
|
|
337
351
|
exports.useCartLine = useCartLine.default;
|
|
338
352
|
exports.useCartUI = useCartUI.default;
|
|
339
353
|
exports.useCollection = useCollection.useCollection;
|
|
354
|
+
exports.formatMoney = useFormatMoney.formatMoney;
|
|
355
|
+
exports.shopifyPriceRounding = useFormatMoney.shopifyPriceRounding;
|
|
356
|
+
exports.useFormatMoney = useFormatMoney.useFormatMoney;
|
|
340
357
|
Object.defineProperty(exports, 'useId', {
|
|
341
358
|
enumerable: true,
|
|
342
359
|
get: function () { return react.useId; }
|
|
343
360
|
});
|
|
361
|
+
exports.useInitialSwatchesOptions = useInitialSwatchesOptions.default;
|
|
344
362
|
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect.default;
|
|
345
363
|
exports.useLoadScript = useLoadScript.default;
|
|
346
364
|
exports.useMoney = useMoney.default;
|
|
347
365
|
exports.usePrevious = usePrevious.usePrevious;
|
|
348
|
-
exports.useArticlesQuery = useArticlesQuery.useArticlesQuery;
|
|
349
|
-
exports.useBlogsQuery = useArticlesQuery.useBlogsQuery;
|
|
350
366
|
exports.useCheckAvailableVariantInStock = useProduct.useCheckAvailableVariantInStock;
|
|
351
367
|
exports.useCurrentVariant = useProduct.useCurrentVariant;
|
|
352
368
|
exports.useCurrentVariantInStock = useProduct.useCurrentVariantInStock;
|
|
@@ -354,21 +370,23 @@ exports.useFeaturedImageGlobal = useProduct.useFeaturedImageGlobal;
|
|
|
354
370
|
exports.useHasPreSelected = useProduct.useHasPreSelected;
|
|
355
371
|
exports.useIsSyncProduct = useProduct.useIsSyncProduct;
|
|
356
372
|
exports.useProduct = useProduct.useProduct;
|
|
373
|
+
exports.useProductBundleDiscount = useProduct.useProductBundleDiscount;
|
|
357
374
|
exports.useProductOfferDiscount = useProduct.useProductOfferDiscount;
|
|
358
375
|
exports.useProductProperties = useProduct.useProductProperties;
|
|
376
|
+
exports.useProductShopifyEditLink = useProduct.useProductShopifyEditLink;
|
|
359
377
|
exports.useQuantity = useProduct.useQuantity;
|
|
360
378
|
exports.useSelectedOption = useProduct.useSelectedOption;
|
|
361
379
|
exports.useUniqProductID = useProduct.useUniqProductID;
|
|
362
380
|
exports.useVariant = useProduct.useVariant;
|
|
363
381
|
exports.useVariantOutStock = useProduct.useVariantOutStock;
|
|
364
382
|
exports.useVariants = useProduct.useVariants;
|
|
383
|
+
exports.useShopifyLink = useShopifyLink.useShopifyLink;
|
|
365
384
|
exports.useProductList = useProductList.useProductList;
|
|
366
385
|
exports.useProductListProducts = useProductList.useProductListProducts;
|
|
367
386
|
exports.useProductListSettings = useProductList.useProductListSettings;
|
|
368
387
|
exports.useProductListStyles = useProductList.useProductListStyles;
|
|
369
388
|
exports.useSuspenseFetch = useSuspenseFetch.default;
|
|
370
389
|
exports.useSwatchesOptions = useSwatchesOptions.default;
|
|
371
|
-
exports.useInitialSwatchesOptions = useInitialSwatchesOptions.default;
|
|
372
390
|
Object.defineProperty(exports, 'InteractionTargetEvent', {
|
|
373
391
|
enumerable: true,
|
|
374
392
|
get: function () { return custom.InteractionTargetEvent; }
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
3
|
import { memo, useState, useMemo, useCallback, useEffect } from 'react';
|
|
3
4
|
import 'zustand';
|
|
4
5
|
import { useBuilderPreviewStore } from '../contexts/BuilderPreviewContext.js';
|
|
5
|
-
import { useShopStore } from '../contexts/ShopContext.js';
|
|
6
6
|
import { usePageStore } from '../contexts/PageContext.js';
|
|
7
|
-
import '
|
|
7
|
+
import { useShopStore } from '../contexts/ShopContext.js';
|
|
8
8
|
import 'swr';
|
|
9
|
+
import '@gem-sdk/adapter-shopify';
|
|
9
10
|
import 'swr/mutation';
|
|
10
11
|
import 'swr/infinite';
|
|
11
12
|
import 'vanilla-lazyload';
|
|
@@ -32,7 +33,7 @@ const isSection = (el)=>{
|
|
|
32
33
|
};
|
|
33
34
|
const ComponentToolbarPreview = (props)=>{
|
|
34
35
|
const isThemeSection = props.isThemeSection;
|
|
35
|
-
const isShopifySection = props.isShopifySection;
|
|
36
|
+
const isShopifySection = !!props.isShopifySection;
|
|
36
37
|
const storefrontUrl = useShopStore((s)=>s.storefrontUrl);
|
|
37
38
|
const editingPageType = useShopStore((s)=>s.pageType);
|
|
38
39
|
const getParents = useBuilderPreviewStore((s)=>s.getParents);
|
|
@@ -43,7 +44,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
43
44
|
const [isShowParentRevert, setIsShowParentRevert] = useState(false);
|
|
44
45
|
const [parents, setParents] = useState([]);
|
|
45
46
|
const [deleteTooltipPosition, setDeleteTooltipPosition] = useState('top');
|
|
46
|
-
const [
|
|
47
|
+
const [isDisableDeleteInSaleFunelPage, setIsDisableDeleteInSaleFunelPage] = useState(false);
|
|
47
48
|
const [isActiveToolbarComponent, setIsActiveToolbarComponent] = useState(false);
|
|
48
49
|
const [productId, setProductId] = useState('');
|
|
49
50
|
const [articleUid, setArticleUid] = useState('');
|
|
@@ -51,7 +52,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
51
52
|
width: '',
|
|
52
53
|
text: ''
|
|
53
54
|
});
|
|
54
|
-
const [
|
|
55
|
+
const [isDisableDuplicateInSaleFunnelPage, setIsDisableDuplicateInSaleFunnelPage] = useState(false);
|
|
55
56
|
const interactionData = usePageStore((s)=>s.interactionData);
|
|
56
57
|
const isSaleFunnelPage = useMemo(()=>editingPageType === 'POST_PURCHASE', [
|
|
57
58
|
editingPageType
|
|
@@ -95,6 +96,9 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
95
96
|
return;
|
|
96
97
|
}
|
|
97
98
|
};
|
|
99
|
+
const getSectionNumber = ()=>{
|
|
100
|
+
return root?.childrens?.length || 0;
|
|
101
|
+
};
|
|
98
102
|
const getDeleteTooltipPosition = useCallback(()=>{
|
|
99
103
|
if (props.tag == 'Section') return 'bottom';
|
|
100
104
|
const $toolbar = document.body.querySelector('#storefront')?.querySelector('[data-toolbar-active="true"]');
|
|
@@ -159,6 +163,20 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
159
163
|
isShowIconInteractionTarget,
|
|
160
164
|
isShowIconInteractionTrigger
|
|
161
165
|
]);
|
|
166
|
+
const isDisableDelete = useMemo(()=>{
|
|
167
|
+
return isDisableDeleteInSaleFunelPage || isShopifySection;
|
|
168
|
+
}, [
|
|
169
|
+
isDisableDeleteInSaleFunelPage,
|
|
170
|
+
isShopifySection
|
|
171
|
+
]);
|
|
172
|
+
const isDisableDuplicate = useMemo(()=>{
|
|
173
|
+
return isDisableDuplicateInSaleFunnelPage || isShopifySection || getSectionNumber() > SECTION_LIMIT && props.tag === 'Section';
|
|
174
|
+
}, [
|
|
175
|
+
getSectionNumber,
|
|
176
|
+
isDisableDuplicateInSaleFunnelPage,
|
|
177
|
+
isShopifySection,
|
|
178
|
+
props.tag
|
|
179
|
+
]);
|
|
162
180
|
// Get parents
|
|
163
181
|
const onActiveComponent = useCallback((e)=>{
|
|
164
182
|
const detail = e.detail;
|
|
@@ -172,9 +190,9 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
172
190
|
setIsActiveToolbarComponent(true);
|
|
173
191
|
getDeleteTooltipPosition();
|
|
174
192
|
if (isSaleFunnelPage) {
|
|
175
|
-
|
|
193
|
+
setIsDisableDeleteInSaleFunelPage(checkDisableDelete());
|
|
176
194
|
setTooltipText(getTooltipText());
|
|
177
|
-
|
|
195
|
+
setIsDisableDuplicateInSaleFunnelPage(checkDisableDuplicate());
|
|
178
196
|
}
|
|
179
197
|
const currentParents = getParents(props.uid).filter((parent)=>{
|
|
180
198
|
if (parent.uid === 'ROOT') return false;
|
|
@@ -214,9 +232,6 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
214
232
|
if (props.editorConfigs?.toolbar?.hide) {
|
|
215
233
|
return null;
|
|
216
234
|
}
|
|
217
|
-
const getSectionNumber = ()=>{
|
|
218
|
-
return root?.childrens?.length || 0;
|
|
219
|
-
};
|
|
220
235
|
const getIndexSection = ()=>{
|
|
221
236
|
if (props.tag !== 'Section') {
|
|
222
237
|
return -1;
|
|
@@ -284,9 +299,6 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
284
299
|
const onDuplicate = (e)=>{
|
|
285
300
|
e.preventDefault();
|
|
286
301
|
e.stopPropagation();
|
|
287
|
-
if (getSectionNumber() >= SECTION_LIMIT && props.tag == 'Section') {
|
|
288
|
-
return false;
|
|
289
|
-
}
|
|
290
302
|
const event = new CustomEvent('editor:toolbar:duplicate-component', {
|
|
291
303
|
bubbles: true,
|
|
292
304
|
detail: {
|
|
@@ -444,7 +456,7 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
444
456
|
"data-toolbar-name": true,
|
|
445
457
|
children: [
|
|
446
458
|
getSectionName(),
|
|
447
|
-
isActiveToolbarComponent &&
|
|
459
|
+
isActiveToolbarComponent && isShopifySection && !props.isShopifyVisibility && /*#__PURE__*/ jsxs("svg", {
|
|
448
460
|
"data-toolbar-visibility": true,
|
|
449
461
|
width: "20",
|
|
450
462
|
height: "20",
|
|
@@ -617,11 +629,12 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
617
629
|
})
|
|
618
630
|
}),
|
|
619
631
|
/*#__PURE__*/ jsx(Tooltip, {
|
|
620
|
-
enable: props.tag == 'Section' && getSectionNumber() >= SECTION_LIMIT,
|
|
621
|
-
text:
|
|
632
|
+
enable: props.tag == 'Section' && getSectionNumber() >= SECTION_LIMIT || isShopifySection,
|
|
633
|
+
text: isShopifySection ? 'Disabled. Please edit in Shopify Editor' : 'Page has reached Shopify’s 25 section-limit',
|
|
622
634
|
position: "bottom",
|
|
635
|
+
width: "200px",
|
|
623
636
|
"data-toolbar-duplicate": true,
|
|
624
|
-
"data-toolbar-disable":
|
|
637
|
+
"data-toolbar-disable": isDisableDuplicate,
|
|
625
638
|
onClick: isDisableDuplicate ? undefined : (e)=>onDuplicate(e),
|
|
626
639
|
"aria-hidden": "true",
|
|
627
640
|
className: isDisableDuplicate ? '!gp-cursor-not-allowed' : '',
|
|
@@ -643,10 +656,11 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
643
656
|
onClick: (e)=>isDisableDelete ? null : onDelete(e),
|
|
644
657
|
enable: isDisableDelete,
|
|
645
658
|
"data-toolbar-disable": isDisableDelete,
|
|
659
|
+
text: isShopifySection ? 'Disabled. Please edit in Shopify Editor' : tooltipText.text,
|
|
646
660
|
width: tooltipText.width,
|
|
647
|
-
|
|
648
|
-
position: deleteTooltipPosition,
|
|
661
|
+
position: isShopifySection ? 'bottom' : deleteTooltipPosition,
|
|
649
662
|
"aria-hidden": "true",
|
|
663
|
+
className: isDisableDelete ? '!gp-cursor-not-allowed' : '',
|
|
650
664
|
children: /*#__PURE__*/ jsx("svg", {
|
|
651
665
|
width: "16",
|
|
652
666
|
height: "16",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
3
|
import 'zustand';
|
|
3
4
|
import 'react';
|
|
4
|
-
import 'swr';
|
|
5
5
|
import { usePageStore } from '../contexts/PageContext.js';
|
|
6
|
+
import 'swr';
|
|
6
7
|
import '@gem-sdk/adapter-shopify';
|
|
7
8
|
import 'swr/mutation';
|
|
8
9
|
import 'swr/infinite';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { makeStyleResponsive } from '../helpers/make-style.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
@@ -31,7 +32,7 @@ const componentIconList = [
|
|
|
31
32
|
const componentUsingAdvanced = [
|
|
32
33
|
'IconList'
|
|
33
34
|
];
|
|
34
|
-
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
|
|
35
|
+
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, additionalSettings, ...passProps })=>{
|
|
35
36
|
const item = builder[uid];
|
|
36
37
|
const Component = components[item?.tag];
|
|
37
38
|
if (!Component) {
|
|
@@ -70,6 +71,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
70
71
|
advanced: item.advanced,
|
|
71
72
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
72
73
|
pageContext,
|
|
74
|
+
...additionalSettings,
|
|
73
75
|
...passProps,
|
|
74
76
|
builderAttrs: {
|
|
75
77
|
...passProps.builderAttrs
|
|
@@ -81,7 +83,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
81
83
|
builder,
|
|
82
84
|
components,
|
|
83
85
|
customProps,
|
|
84
|
-
pageContext
|
|
86
|
+
pageContext,
|
|
87
|
+
...additionalSettings
|
|
85
88
|
};
|
|
86
89
|
}),
|
|
87
90
|
children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -93,7 +96,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
93
96
|
components,
|
|
94
97
|
customProps,
|
|
95
98
|
parentTag: item.tag,
|
|
96
|
-
pageContext
|
|
99
|
+
pageContext,
|
|
100
|
+
...additionalSettings
|
|
97
101
|
}))) : ''
|
|
98
102
|
});
|
|
99
103
|
}, ()=>{
|
|
@@ -109,6 +113,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
109
113
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
110
114
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
111
115
|
pageContext,
|
|
116
|
+
...additionalSettings,
|
|
112
117
|
...passProps,
|
|
113
118
|
builderAttrs: {
|
|
114
119
|
...passProps.builderAttrs
|
|
@@ -130,6 +135,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
130
135
|
cssClass: item?.advanced?.cssClass
|
|
131
136
|
},
|
|
132
137
|
pageContext,
|
|
138
|
+
...additionalSettings,
|
|
133
139
|
...passProps,
|
|
134
140
|
builderAttrs: {
|
|
135
141
|
...passProps.builderAttrs
|
|
@@ -141,7 +147,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
141
147
|
builder,
|
|
142
148
|
components,
|
|
143
149
|
customProps,
|
|
144
|
-
pageContext
|
|
150
|
+
pageContext,
|
|
151
|
+
...additionalSettings
|
|
145
152
|
};
|
|
146
153
|
}),
|
|
147
154
|
children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -153,7 +160,8 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
153
160
|
components,
|
|
154
161
|
customProps,
|
|
155
162
|
parentTag: item.tag,
|
|
156
|
-
pageContext
|
|
163
|
+
pageContext,
|
|
164
|
+
...additionalSettings
|
|
157
165
|
}))) : ''
|
|
158
166
|
});
|
|
159
167
|
}, ()=>{
|
|
@@ -168,6 +176,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
168
176
|
cssClass: item?.advanced?.cssClass
|
|
169
177
|
},
|
|
170
178
|
pageContext,
|
|
179
|
+
...additionalSettings,
|
|
171
180
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
172
181
|
style: componentIconList.includes(item.tag) ? style : null,
|
|
173
182
|
...passProps,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
3
|
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
3
4
|
import { AIIcon } from './icons/AIIcon.js';
|
|
@@ -14,8 +15,8 @@ import { useFlipPopup } from './hooks/useFlipPopup.js';
|
|
|
14
15
|
import { useCheckingProductInside } from './hooks/useCheckingProductInside.js';
|
|
15
16
|
import 'zustand';
|
|
16
17
|
import { useShopStore } from '../../contexts/ShopContext.js';
|
|
17
|
-
import '@gem-sdk/adapter-shopify';
|
|
18
18
|
import 'swr';
|
|
19
|
+
import '@gem-sdk/adapter-shopify';
|
|
19
20
|
import 'swr/mutation';
|
|
20
21
|
import 'swr/infinite';
|
|
21
22
|
import 'vanilla-lazyload';
|