@gem-sdk/core 1.63.17 → 2.0.0-dev.157
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 +8 -7
- package/dist/cjs/components/ComponentWrapper.js +1 -0
- package/dist/cjs/components/ComponentWrapperPreview.js +3 -2
- package/dist/cjs/components/Empty.js +1 -0
- package/dist/cjs/components/InteractionSuffix.js +7 -6
- package/dist/cjs/components/Render.js +1 -0
- package/dist/cjs/components/Render.liquid.js +4 -1
- package/dist/cjs/components/RenderBlock.js +1 -0
- package/dist/cjs/components/RenderCustomCode.js +8 -7
- package/dist/cjs/components/RenderPreview.js +1 -0
- package/dist/cjs/components/RenderSection.js +1 -0
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +5 -4
- package/dist/cjs/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/cjs/components/ai-generator/components/PickProduct.js +5 -4
- 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 +8 -7
- package/dist/cjs/components/theme-section/CreateThemeSection.js +5 -4
- 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 +12 -12
- 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 +0 -4
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +4 -0
- package/dist/cjs/graphql/queries/articles.generated.js +1 -0
- package/dist/cjs/graphql/queries/blogs.generated.js +1 -0
- package/dist/cjs/graphql/queries/shop-shopify.generated.js +11 -0
- package/dist/cjs/helpers/align.js +18 -0
- package/dist/cjs/helpers/background.js +6 -2
- package/dist/cjs/helpers/backgroundImage.js +184 -0
- package/dist/cjs/helpers/borders.js +17 -0
- package/dist/cjs/helpers/compose-advance-style.js +71 -1
- package/dist/cjs/helpers/filter-toolbar-preview.js +1 -0
- package/dist/cjs/helpers/interaction/index.js +7 -6
- package/dist/cjs/helpers/is-empty-children.js +1 -0
- package/dist/cjs/helpers/layout.js +17 -0
- package/dist/cjs/helpers/radius.js +13 -1
- package/dist/cjs/helpers/shadow.js +28 -2
- package/dist/cjs/helpers/size.js +22 -0
- package/dist/cjs/helpers/third-party/appConfig.js +63 -0
- package/dist/cjs/helpers/third-party/appSetting.js +382 -6
- package/dist/cjs/helpers/third-party/constant.js +10 -1
- package/dist/cjs/helpers/third-party/getAppBlockConfig.js +5 -1
- package/dist/cjs/helpers/typography.js +10 -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 +2 -1
- 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 +18 -0
- 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 +18 -0
- package/dist/esm/components/AddOn.js +1 -0
- package/dist/esm/components/ComponentAnimation.js +1 -0
- package/dist/esm/components/ComponentToolbarPreview.js +8 -7
- package/dist/esm/components/ComponentWrapper.js +1 -0
- package/dist/esm/components/ComponentWrapperPreview.js +3 -2
- package/dist/esm/components/Empty.js +1 -0
- package/dist/esm/components/InteractionSuffix.js +7 -6
- package/dist/esm/components/Render.js +1 -0
- package/dist/esm/components/Render.liquid.js +4 -1
- package/dist/esm/components/RenderBlock.js +1 -0
- package/dist/esm/components/RenderCustomCode.js +8 -7
- package/dist/esm/components/RenderPreview.js +1 -0
- package/dist/esm/components/RenderSection.js +1 -0
- package/dist/esm/components/ai-generator/AIContentGenerator.js +5 -4
- package/dist/esm/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/esm/components/ai-generator/components/PickProduct.js +5 -4
- 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 +8 -7
- package/dist/esm/components/theme-section/CreateThemeSection.js +5 -4
- 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 +12 -12
- 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 +0 -4
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +4 -0
- package/dist/esm/graphql/queries/articles.generated.js +1 -0
- package/dist/esm/graphql/queries/blogs.generated.js +1 -0
- package/dist/esm/graphql/queries/shop-shopify.generated.js +9 -0
- package/dist/esm/helpers/align.js +18 -1
- package/dist/esm/helpers/background.js +6 -2
- package/dist/esm/helpers/backgroundImage.js +179 -0
- package/dist/esm/helpers/borders.js +17 -1
- package/dist/esm/helpers/compose-advance-style.js +71 -1
- package/dist/esm/helpers/filter-toolbar-preview.js +1 -0
- package/dist/esm/helpers/interaction/index.js +7 -6
- package/dist/esm/helpers/is-empty-children.js +1 -0
- package/dist/esm/helpers/layout.js +17 -1
- package/dist/esm/helpers/radius.js +13 -1
- package/dist/esm/helpers/shadow.js +28 -3
- package/dist/esm/helpers/size.js +21 -1
- package/dist/esm/helpers/third-party/appConfig.js +55 -1
- package/dist/esm/helpers/third-party/appSetting.js +382 -6
- package/dist/esm/helpers/third-party/constant.js +11 -2
- package/dist/esm/helpers/third-party/getAppBlockConfig.js +5 -1
- package/dist/esm/helpers/typography.js +10 -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 +2 -1
- 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 +18 -1
- 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 +11 -8
- package/dist/types/index.d.ts +729 -253
- package/package.json +4 -4
|
@@ -95,6 +95,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
95
95
|
selected_product: appSetting?.['productHandle'] || '{{ product }}'
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
+
case 'TrustshopProductReviews':
|
|
99
|
+
{
|
|
100
|
+
return {
|
|
101
|
+
...currentSetting,
|
|
102
|
+
selected_product: appSetting?.['productHandle'] || '{{ product }}'
|
|
103
|
+
};
|
|
104
|
+
}
|
|
98
105
|
case 'WhatmoreShoppableVideosreel':
|
|
99
106
|
{
|
|
100
107
|
return {
|
|
@@ -109,25 +116,71 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
109
116
|
'scroll-video-tile-size-portrait': parseFloat(appSetting?.scrollVideoTitleSizePortrait)
|
|
110
117
|
};
|
|
111
118
|
}
|
|
112
|
-
case '
|
|
119
|
+
case 'PowerfulContactFormBuilder':
|
|
113
120
|
{
|
|
114
121
|
return {
|
|
115
122
|
...currentSetting,
|
|
116
|
-
|
|
123
|
+
shortcode: appSetting?.shortcode
|
|
117
124
|
};
|
|
118
125
|
}
|
|
119
|
-
case '
|
|
126
|
+
case 'AftershipEmailMarketingsms':
|
|
120
127
|
{
|
|
121
128
|
return {
|
|
122
129
|
...currentSetting,
|
|
123
|
-
|
|
130
|
+
embedded_form_id: appSetting?.formId
|
|
124
131
|
};
|
|
125
132
|
}
|
|
126
|
-
case '
|
|
133
|
+
case 'SeoantTrustBadgesIcon':
|
|
127
134
|
{
|
|
128
135
|
return {
|
|
129
136
|
...currentSetting,
|
|
130
|
-
|
|
137
|
+
badge_id: appSetting?.BadgeId
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
case 'PowrContactFormBuilder':
|
|
141
|
+
{
|
|
142
|
+
return {
|
|
143
|
+
...currentSetting,
|
|
144
|
+
app_id: appSetting?.appId
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
case 'Stamped':
|
|
148
|
+
{
|
|
149
|
+
return {
|
|
150
|
+
...currentSetting,
|
|
151
|
+
feed_type: appSetting.visualGalleryType,
|
|
152
|
+
auto_play: appSetting.autoSlide,
|
|
153
|
+
color_star: appSetting.starColor,
|
|
154
|
+
color_hover: appSetting.hoverColor,
|
|
155
|
+
color_hover_opacity: appSetting.hoverOpacity,
|
|
156
|
+
review_ids: appSetting.reviewIds,
|
|
157
|
+
product_ids: appSetting.productIds,
|
|
158
|
+
category: appSetting.productType,
|
|
159
|
+
product_brand: appSetting.productVendor,
|
|
160
|
+
tags: appSetting.tags,
|
|
161
|
+
min_rating: appSetting.minimumRating,
|
|
162
|
+
fill_empty: appSetting.fillEmpty,
|
|
163
|
+
random: appSetting.random,
|
|
164
|
+
with_photos: appSetting.withPhotos,
|
|
165
|
+
color_link: appSetting.linkColor,
|
|
166
|
+
product_image: appSetting.showProductImage,
|
|
167
|
+
take: appSetting.limitResults,
|
|
168
|
+
color_verified: appSetting.verifiedColor,
|
|
169
|
+
color_text: appSetting.textColor,
|
|
170
|
+
title: appSetting.carouselTitle,
|
|
171
|
+
color_title: appSetting.titleColor,
|
|
172
|
+
api_key: appSetting.publicKey,
|
|
173
|
+
store_hash: appSetting.storeHash,
|
|
174
|
+
label1: appSetting.labelFront,
|
|
175
|
+
label2: appSetting.labelBack,
|
|
176
|
+
width: appSetting.imageWidth,
|
|
177
|
+
height: appSetting.imageHeight,
|
|
178
|
+
product_id: appSetting.productId,
|
|
179
|
+
animation: appSetting.mainWidgetAnimation,
|
|
180
|
+
tags_exclude: appSetting.excludeTags,
|
|
181
|
+
tags_include: appSetting.includeTags,
|
|
182
|
+
search: appSetting.search,
|
|
183
|
+
linkify: appSetting.linkify
|
|
131
184
|
};
|
|
132
185
|
}
|
|
133
186
|
default:
|
|
@@ -464,6 +517,70 @@ const GloboProductOptionsVariant = {
|
|
|
464
517
|
'app-block': null
|
|
465
518
|
}
|
|
466
519
|
};
|
|
520
|
+
const BestBuyFulfillment = {
|
|
521
|
+
BestBuyFulfillment: {
|
|
522
|
+
'pickup-selector': null
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
const AftershipEmailMarketingsms = {
|
|
526
|
+
AftershipEmailMarketingsms: {
|
|
527
|
+
embeded_form: {
|
|
528
|
+
embedded_form_id: ''
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
const SegunoEmailMarketing = {
|
|
533
|
+
SegunoEmailMarketing: {
|
|
534
|
+
back_in_stock: {
|
|
535
|
+
heading: '<h3>Get notified when this is back in stock</h3>',
|
|
536
|
+
label_email: 'Email',
|
|
537
|
+
placeholder_email: '',
|
|
538
|
+
show_permission_checkbox: true,
|
|
539
|
+
label_permission: '<p>Also, sign up to receive newsletters</p>',
|
|
540
|
+
label_notify: 'Notify me',
|
|
541
|
+
label_success: '<p>Thanks! You will be notified once the product is back in stock.</p>',
|
|
542
|
+
product_exclusion_tag: 'back-in-stock-excluded',
|
|
543
|
+
default_variant: 'available',
|
|
544
|
+
padding: 0,
|
|
545
|
+
form_gap: 16,
|
|
546
|
+
button_alignment: 'stretch',
|
|
547
|
+
font_size: 16,
|
|
548
|
+
input_font_size: 16,
|
|
549
|
+
button_font_size: 16,
|
|
550
|
+
background_color: '#ffffff',
|
|
551
|
+
text_color: '#121212',
|
|
552
|
+
button_background_color: '#121212',
|
|
553
|
+
button_border_color: '#121212',
|
|
554
|
+
button_text_color: '#ffffff',
|
|
555
|
+
input_background_color: '#ffffff',
|
|
556
|
+
input_border_color: '#121212',
|
|
557
|
+
input_text_color: '#121212',
|
|
558
|
+
custom_css: ''
|
|
559
|
+
},
|
|
560
|
+
newsletter_form: {
|
|
561
|
+
heading: 'Subscribe to our newsletter',
|
|
562
|
+
subheading: '<p>Be the first to know about new collections and exclusive offers.</p>',
|
|
563
|
+
show_first_name: false,
|
|
564
|
+
show_last_name: false,
|
|
565
|
+
show_permission_checkbox: false,
|
|
566
|
+
tags: 'newsletter',
|
|
567
|
+
return_to: '',
|
|
568
|
+
label_first_name: 'First name',
|
|
569
|
+
placeholder_first_name: '',
|
|
570
|
+
label_last_name: 'Last name',
|
|
571
|
+
placeholder_last_name: '',
|
|
572
|
+
label_email: 'Email',
|
|
573
|
+
placeholder_email: '',
|
|
574
|
+
label_permission: '<p>I agree to receive marketing emails</p>',
|
|
575
|
+
label_subscribe: 'Subscribe',
|
|
576
|
+
success_message: 'Thanks for subscribing',
|
|
577
|
+
background_color: '#ffffff',
|
|
578
|
+
text_color: '#1a1b18',
|
|
579
|
+
button_background_color: '#445958',
|
|
580
|
+
button_text_color: '#ffffff'
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
};
|
|
467
584
|
const Trustoo = {
|
|
468
585
|
Trustoo: {
|
|
469
586
|
'barrage-carousel': null,
|
|
@@ -621,7 +738,266 @@ const LooxReviews = {
|
|
|
621
738
|
}
|
|
622
739
|
}
|
|
623
740
|
};
|
|
741
|
+
const SeoantTrustBadgesIcon = {
|
|
742
|
+
SeoantTrustBadgesIcon: {
|
|
743
|
+
star_rating: {
|
|
744
|
+
badge_id: null
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
const PowrContactFormBuilder = {
|
|
749
|
+
PowrContactFormBuilder: {
|
|
750
|
+
'app-block': {
|
|
751
|
+
app_id: ''
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
const MyappgurusProductReviews = {
|
|
756
|
+
MyappgurusProductReviews: {
|
|
757
|
+
allReviews: {
|
|
758
|
+
Show_by_label: ''
|
|
759
|
+
},
|
|
760
|
+
allReviewsCounter: {
|
|
761
|
+
out_of_label: '',
|
|
762
|
+
stars_based_on_label: '',
|
|
763
|
+
reviews_label: ''
|
|
764
|
+
},
|
|
765
|
+
form: {
|
|
766
|
+
block_heading: '',
|
|
767
|
+
no_rating: '',
|
|
768
|
+
subtitle2: '',
|
|
769
|
+
review_btn: '',
|
|
770
|
+
see_all_reviews_label: '',
|
|
771
|
+
form_heading: '',
|
|
772
|
+
name_label: '',
|
|
773
|
+
email_label: '',
|
|
774
|
+
review_title_label: '',
|
|
775
|
+
review_description_label: '',
|
|
776
|
+
ratings_label: '',
|
|
777
|
+
delivery_ratings_label: '',
|
|
778
|
+
payment_ratings_label: '',
|
|
779
|
+
price_ratings_label: '',
|
|
780
|
+
review_image_label: '',
|
|
781
|
+
submit_btn_label: '',
|
|
782
|
+
cancel_btn_label: '',
|
|
783
|
+
sort_label: '',
|
|
784
|
+
sort1_label: '',
|
|
785
|
+
sort2_label: '',
|
|
786
|
+
sort3_label: '',
|
|
787
|
+
showing_label: '',
|
|
788
|
+
to_label: '',
|
|
789
|
+
of_label: '',
|
|
790
|
+
results_label: ''
|
|
791
|
+
},
|
|
792
|
+
star: null
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
const TrustreviewsProductReviews = {
|
|
796
|
+
TrustreviewsProductReviews: {
|
|
797
|
+
questions_widget: {
|
|
798
|
+
product: '{{ product }}'
|
|
799
|
+
},
|
|
800
|
+
'review-carousel': null,
|
|
801
|
+
reviews_text_widget: null,
|
|
802
|
+
reviews_widget: {
|
|
803
|
+
product: '{{ product }}'
|
|
804
|
+
},
|
|
805
|
+
shop_reviews_widget: null,
|
|
806
|
+
star_rating: {
|
|
807
|
+
product: '{{product}}',
|
|
808
|
+
hide_on_no_reviews: false,
|
|
809
|
+
enable_jsonld: false,
|
|
810
|
+
starsize: 16,
|
|
811
|
+
addtional_text: ''
|
|
812
|
+
},
|
|
813
|
+
'reviews-testimonials': null,
|
|
814
|
+
all_reviews_widget: null,
|
|
815
|
+
'review-cards': null,
|
|
816
|
+
'review-gallery': null,
|
|
817
|
+
medals: null
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
const HulkProductOptions = {
|
|
821
|
+
HulkProductOptions: {
|
|
822
|
+
option_block: null
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
const TrustshopProductReviews = {
|
|
826
|
+
TrustshopProductReviews: {
|
|
827
|
+
'widget-product-rating': {
|
|
828
|
+
selected_product: '{{ product }}'
|
|
829
|
+
},
|
|
830
|
+
'all-reviews': null,
|
|
831
|
+
'widget-box': null,
|
|
832
|
+
'review-testimonial': null
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
const Stamped = {
|
|
836
|
+
Stamped: {
|
|
837
|
+
'main-widget': {
|
|
838
|
+
animation: true,
|
|
839
|
+
tags_exclude: '',
|
|
840
|
+
tags_include: '',
|
|
841
|
+
search: '',
|
|
842
|
+
linkify: true,
|
|
843
|
+
use_metafields: false,
|
|
844
|
+
sku_tagtype: 'sku'
|
|
845
|
+
},
|
|
846
|
+
'product-rating-image': {
|
|
847
|
+
api_key: '',
|
|
848
|
+
store_hash: '',
|
|
849
|
+
product_id: '',
|
|
850
|
+
width: '',
|
|
851
|
+
height: ''
|
|
852
|
+
},
|
|
853
|
+
'badge-double-image': {
|
|
854
|
+
api_key: '',
|
|
855
|
+
store_hash: '',
|
|
856
|
+
label1: '',
|
|
857
|
+
label2: '',
|
|
858
|
+
width: '',
|
|
859
|
+
height: ''
|
|
860
|
+
},
|
|
861
|
+
'badge-single-image': {
|
|
862
|
+
api_key: '',
|
|
863
|
+
store_hash: '',
|
|
864
|
+
label1: '',
|
|
865
|
+
label2: '',
|
|
866
|
+
width: '',
|
|
867
|
+
height: ''
|
|
868
|
+
},
|
|
869
|
+
carousel: {
|
|
870
|
+
title: 'Real Reviews from Real Customers',
|
|
871
|
+
auto_play: false,
|
|
872
|
+
take: 30,
|
|
873
|
+
color_title: '',
|
|
874
|
+
color_star: '',
|
|
875
|
+
color_text: '',
|
|
876
|
+
color_link: '',
|
|
877
|
+
review_ids: '',
|
|
878
|
+
product_ids: '',
|
|
879
|
+
category: '',
|
|
880
|
+
product_brand: '',
|
|
881
|
+
tags: '',
|
|
882
|
+
min_rating: 'none',
|
|
883
|
+
fill_empty: false,
|
|
884
|
+
random: false,
|
|
885
|
+
with_photos: false
|
|
886
|
+
},
|
|
887
|
+
'checkout-comments': {
|
|
888
|
+
product_ids: '',
|
|
889
|
+
style: 'box',
|
|
890
|
+
title: '',
|
|
891
|
+
timeago: false,
|
|
892
|
+
style_color_text: '',
|
|
893
|
+
style_color_link: ''
|
|
894
|
+
},
|
|
895
|
+
'full-page': {
|
|
896
|
+
product_image: true,
|
|
897
|
+
take: 30,
|
|
898
|
+
label_substitute: '',
|
|
899
|
+
color_star: '',
|
|
900
|
+
color_verified: '',
|
|
901
|
+
color_text: '',
|
|
902
|
+
color_link: '',
|
|
903
|
+
review_ids: '',
|
|
904
|
+
product_ids: '',
|
|
905
|
+
category: '',
|
|
906
|
+
product_brand: '',
|
|
907
|
+
tags: '',
|
|
908
|
+
min_rating: 'none',
|
|
909
|
+
fill_empty: false,
|
|
910
|
+
random: false,
|
|
911
|
+
with_photos: false
|
|
912
|
+
},
|
|
913
|
+
'instagram-feed': {
|
|
914
|
+
feed_type: 'carousel',
|
|
915
|
+
color_hover: '',
|
|
916
|
+
hover_text: '',
|
|
917
|
+
shop_button_text: '',
|
|
918
|
+
auto_play: false,
|
|
919
|
+
review_ids: '',
|
|
920
|
+
product_ids: '',
|
|
921
|
+
category: '',
|
|
922
|
+
product_brand: '',
|
|
923
|
+
tags: '',
|
|
924
|
+
min_rating: 'none',
|
|
925
|
+
fill_empty: false,
|
|
926
|
+
random: false,
|
|
927
|
+
with_photos: false
|
|
928
|
+
},
|
|
929
|
+
'single-highlight': {
|
|
930
|
+
review_ids: '',
|
|
931
|
+
product_ids: '',
|
|
932
|
+
category: '',
|
|
933
|
+
product_brand: '',
|
|
934
|
+
tags: ''
|
|
935
|
+
},
|
|
936
|
+
'site-badge': {
|
|
937
|
+
badge_type: 'badge',
|
|
938
|
+
color_outer: '',
|
|
939
|
+
color_inner: '',
|
|
940
|
+
color_ribbon: '',
|
|
941
|
+
color_text: '',
|
|
942
|
+
color_stars: '',
|
|
943
|
+
title_size: 12,
|
|
944
|
+
title: 'Verified Reviews'
|
|
945
|
+
},
|
|
946
|
+
'star-rating-badge': {
|
|
947
|
+
use_metafields: false,
|
|
948
|
+
sku_tagtype: 'sku',
|
|
949
|
+
is_featured_product: false,
|
|
950
|
+
featured_product_handle: ''
|
|
951
|
+
},
|
|
952
|
+
'top-rated': {
|
|
953
|
+
color_star: '',
|
|
954
|
+
color_link: ''
|
|
955
|
+
},
|
|
956
|
+
'visual-gallery': {
|
|
957
|
+
feed_type: 'feed',
|
|
958
|
+
auto_play: false,
|
|
959
|
+
color_star: '',
|
|
960
|
+
color_hover: '',
|
|
961
|
+
color_hover_opacity: 50,
|
|
962
|
+
review_ids: '',
|
|
963
|
+
product_ids: '',
|
|
964
|
+
category: '',
|
|
965
|
+
product_brand: '',
|
|
966
|
+
tags: '',
|
|
967
|
+
min_rating: 'none',
|
|
968
|
+
fill_empty: false,
|
|
969
|
+
random: false,
|
|
970
|
+
with_photos: false
|
|
971
|
+
},
|
|
972
|
+
'wall-photos': {
|
|
973
|
+
feed_type: 'feed',
|
|
974
|
+
auto_play: false,
|
|
975
|
+
color_star: '',
|
|
976
|
+
color_hover: '',
|
|
977
|
+
color_hover_opacity: 50,
|
|
978
|
+
review_ids: '',
|
|
979
|
+
product_ids: '',
|
|
980
|
+
category: '',
|
|
981
|
+
product_brand: '',
|
|
982
|
+
tags: '',
|
|
983
|
+
min_rating: 'none',
|
|
984
|
+
fill_empty: false,
|
|
985
|
+
random: false,
|
|
986
|
+
with_photos: false
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
};
|
|
624
990
|
const composeSettingsByWidgetType = {
|
|
991
|
+
...Stamped,
|
|
992
|
+
...TrustshopProductReviews,
|
|
993
|
+
...HulkProductOptions,
|
|
994
|
+
...MyappgurusProductReviews,
|
|
995
|
+
...TrustreviewsProductReviews,
|
|
996
|
+
...PowrContactFormBuilder,
|
|
997
|
+
...SeoantTrustBadgesIcon,
|
|
998
|
+
...SegunoEmailMarketing,
|
|
999
|
+
...AftershipEmailMarketingsms,
|
|
1000
|
+
...BestBuyFulfillment,
|
|
625
1001
|
...GloboProductOptionsVariant,
|
|
626
1002
|
...WishlistKing,
|
|
627
1003
|
...LoloyalLoyaltyReferrals,
|
|
@@ -34,8 +34,17 @@ const mapShopifyAppMeta = {
|
|
|
34
34
|
...appConfig.WishlistKingConfig,
|
|
35
35
|
...appConfig.GloboProductOptionsVariantConfig,
|
|
36
36
|
...appConfig.KachingBundlesConfig,
|
|
37
|
+
...appConfig.BestBuyFulfillmentConfig,
|
|
38
|
+
...appConfig.AftershipEmailMarketingsmsConfig,
|
|
39
|
+
...appConfig.SegunoEmailMarketingConfig,
|
|
37
40
|
...appConfig.TrustooConfig,
|
|
38
|
-
...appConfig.LooxReviewsConfig
|
|
41
|
+
...appConfig.LooxReviewsConfig,
|
|
42
|
+
...appConfig.SeoantTrustBadgesIconConfig,
|
|
43
|
+
...appConfig.PowrContactFormBuilderConfig,
|
|
44
|
+
...appConfig.MyappgurusProductReviewsConfig,
|
|
45
|
+
...appConfig.TrustreviewsProductReviewsConfig,
|
|
46
|
+
...appConfig.HulkProductOptionsConfig,
|
|
47
|
+
...appConfig.TrustshopProductReviewsConfig
|
|
39
48
|
};
|
|
40
49
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
41
50
|
|
|
@@ -6,7 +6,8 @@ var getAppBlockType = require('./getAppBlockType.js');
|
|
|
6
6
|
const listAppUpdateNewVersion = [
|
|
7
7
|
'Growave',
|
|
8
8
|
'Trustoo',
|
|
9
|
-
'LooxReviews'
|
|
9
|
+
'LooxReviews',
|
|
10
|
+
'Stamped'
|
|
10
11
|
];
|
|
11
12
|
const listThirdPartyRejectAppBlock = {
|
|
12
13
|
YotpoReviews: {
|
|
@@ -17,6 +18,9 @@ const listThirdPartyRejectAppBlock = {
|
|
|
17
18
|
},
|
|
18
19
|
LooxReviews: {
|
|
19
20
|
conditionToReject: 'settings?.version === "v1"'
|
|
21
|
+
},
|
|
22
|
+
Stamped: {
|
|
23
|
+
conditionToReject: 'settings?.version === "v1"'
|
|
20
24
|
}
|
|
21
25
|
};
|
|
22
26
|
const getAppBlockConfig = (tag, appBlockId, settings)=>{
|
|
@@ -24,7 +24,7 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
24
24
|
const typographyCustom = typography?.custom;
|
|
25
25
|
const { fontFamily, fontSize, fontWeight, lineHeight, letterSpacing } = typographyCustom ?? {};
|
|
26
26
|
const typographyAttrs = typography?.attrs;
|
|
27
|
-
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
27
|
+
const { bold, italic, underline, transform, color } = typographyAttrs ?? {};
|
|
28
28
|
const composeImportant = isImportant ? '!important' : '';
|
|
29
29
|
return `
|
|
30
30
|
${fontFamily ? `font-family: ${composeFontFamilyTypographyV2({
|
|
@@ -32,6 +32,7 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
32
32
|
type: typography?.type
|
|
33
33
|
})} ${composeImportant}` : ''};
|
|
34
34
|
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}` : ''};
|
|
35
|
+
${color ? `color: ${color} ${composeImportant}` : ''};
|
|
35
36
|
${bold ? `font-weight: bold ${composeImportant}` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant}` : ''};
|
|
36
37
|
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant}` : ''};
|
|
37
38
|
${lineHeight?.desktop ? `line-height: ${lineHeight?.desktop} ${composeImportant}` : ''};
|
|
@@ -40,6 +41,13 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
40
41
|
${transform ? `text-transform: ${transform} ${composeImportant}` : ''};
|
|
41
42
|
`;
|
|
42
43
|
};
|
|
44
|
+
const composeTextHoverColorCss = (device, colorHoverConfig, isImportant)=>{
|
|
45
|
+
if (colorHoverConfig) {
|
|
46
|
+
const composeImportant = isImportant ? '!important' : '';
|
|
47
|
+
const color = colorHoverConfig[device]?.hover;
|
|
48
|
+
return `${color ? `color: ${color} ${composeImportant}` : ''}`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
43
51
|
function getCustomCSSByDevice(typography, device) {
|
|
44
52
|
if (!typography || !device) return {};
|
|
45
53
|
const suffix = device === 'desktop' || !device ? '' : `-${device}`;
|
|
@@ -150,6 +158,7 @@ const isCustomTypo = (customTypo)=>{
|
|
|
150
158
|
|
|
151
159
|
exports.composeFallbackTypographyStyle = composeFallbackTypographyStyle;
|
|
152
160
|
exports.composeFontFamilyTypographyV2 = composeFontFamilyTypographyV2;
|
|
161
|
+
exports.composeTextHoverColorCss = composeTextHoverColorCss;
|
|
153
162
|
exports.composeTypography = composeTypography;
|
|
154
163
|
exports.composeTypographyAttr = composeTypographyAttr;
|
|
155
164
|
exports.composeTypographyClassName = composeTypographyClassName;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var ShopContext = require('../../contexts/ShopContext.js');
|
|
6
|
+
|
|
7
|
+
const useShopifyLink = ({ productId, articleId })=>{
|
|
8
|
+
const storefrontUrl = ShopContext.useShopStore((s)=>s.storefrontUrl);
|
|
9
|
+
//
|
|
10
|
+
// const productId = useMemo(() => {
|
|
11
|
+
// const ele = document.querySelector(`[data-uid="${parentProductUid}"]`);
|
|
12
|
+
// return ele?.getAttribute('data-product-id');
|
|
13
|
+
// }, [parentProductUid]);
|
|
14
|
+
const shopName = react.useMemo(()=>{
|
|
15
|
+
const pattern = /^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;
|
|
16
|
+
if (storefrontUrl) {
|
|
17
|
+
return storefrontUrl.match(pattern)?.[1];
|
|
18
|
+
}
|
|
19
|
+
return '';
|
|
20
|
+
}, [
|
|
21
|
+
storefrontUrl
|
|
22
|
+
]);
|
|
23
|
+
const linkShopDefault = react.useMemo(()=>{
|
|
24
|
+
return `https://admin.shopify.com/store/${shopName}`;
|
|
25
|
+
}, [
|
|
26
|
+
shopName
|
|
27
|
+
]);
|
|
28
|
+
const linkEditProduct = react.useMemo(()=>{
|
|
29
|
+
return productId ? `${linkShopDefault}/products/${productId}` : '';
|
|
30
|
+
}, [
|
|
31
|
+
linkShopDefault,
|
|
32
|
+
productId
|
|
33
|
+
]);
|
|
34
|
+
const linkEditArticle = react.useMemo(()=>{
|
|
35
|
+
return articleId ? `${linkShopDefault}/articles/${articleId}` : '';
|
|
36
|
+
}, [
|
|
37
|
+
articleId,
|
|
38
|
+
linkShopDefault
|
|
39
|
+
]);
|
|
40
|
+
return {
|
|
41
|
+
linkShopDefault,
|
|
42
|
+
linkEditProduct,
|
|
43
|
+
linkEditArticle
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports.useShopifyLink = useShopifyLink;
|
package/dist/cjs/hooks/shop.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var react = require('react');
|
|
@@ -26,6 +27,14 @@ const useCurrency = ()=>{
|
|
|
26
27
|
changeCurrency
|
|
27
28
|
]);
|
|
28
29
|
};
|
|
30
|
+
const useTimezone = ()=>{
|
|
31
|
+
const timezone = ShopContext.useShopStore((state)=>state.timezone);
|
|
32
|
+
return react.useMemo(()=>({
|
|
33
|
+
timezone
|
|
34
|
+
}), [
|
|
35
|
+
timezone
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
29
38
|
const useMoneyFormat = ()=>{
|
|
30
39
|
const moneyFormat = ShopContext.useShopStore((state)=>state.moneyFormat);
|
|
31
40
|
const moneyWithCurrencyFormat = ShopContext.useShopStore((state)=>state.moneyWithCurrencyFormat);
|
|
@@ -124,3 +133,4 @@ exports.usePageType = usePageType;
|
|
|
124
133
|
exports.usePluginEnable = usePluginEnable;
|
|
125
134
|
exports.useStoreFront = useStoreFront;
|
|
126
135
|
exports.useSwatches = useSwatches;
|
|
136
|
+
exports.useTimezone = useTimezone;
|