@gem-sdk/core 1.63.17 → 2.0.0-dev.156
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 +187 -6
- package/dist/cjs/helpers/third-party/constant.js +10 -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 +187 -6
- package/dist/esm/helpers/third-party/constant.js +11 -2
- 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 +728 -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,32 @@ 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
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
case 'SeoantTrustBadgesIcon':
|
|
134
|
+
{
|
|
135
|
+
return {
|
|
136
|
+
...currentSetting,
|
|
137
|
+
badge_id: appSetting?.BadgeId
|
|
124
138
|
};
|
|
125
139
|
}
|
|
126
|
-
case '
|
|
140
|
+
case 'PowrContactFormBuilder':
|
|
127
141
|
{
|
|
128
142
|
return {
|
|
129
143
|
...currentSetting,
|
|
130
|
-
|
|
144
|
+
app_id: appSetting?.appId
|
|
131
145
|
};
|
|
132
146
|
}
|
|
133
147
|
default:
|
|
@@ -464,6 +478,70 @@ const GloboProductOptionsVariant = {
|
|
|
464
478
|
'app-block': null
|
|
465
479
|
}
|
|
466
480
|
};
|
|
481
|
+
const BestBuyFulfillment = {
|
|
482
|
+
BestBuyFulfillment: {
|
|
483
|
+
'pickup-selector': null
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
const AftershipEmailMarketingsms = {
|
|
487
|
+
AftershipEmailMarketingsms: {
|
|
488
|
+
embeded_form: {
|
|
489
|
+
embedded_form_id: ''
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
const SegunoEmailMarketing = {
|
|
494
|
+
SegunoEmailMarketing: {
|
|
495
|
+
back_in_stock: {
|
|
496
|
+
heading: '<h3>Get notified when this is back in stock</h3>',
|
|
497
|
+
label_email: 'Email',
|
|
498
|
+
placeholder_email: '',
|
|
499
|
+
show_permission_checkbox: true,
|
|
500
|
+
label_permission: '<p>Also, sign up to receive newsletters</p>',
|
|
501
|
+
label_notify: 'Notify me',
|
|
502
|
+
label_success: '<p>Thanks! You will be notified once the product is back in stock.</p>',
|
|
503
|
+
product_exclusion_tag: 'back-in-stock-excluded',
|
|
504
|
+
default_variant: 'available',
|
|
505
|
+
padding: 0,
|
|
506
|
+
form_gap: 16,
|
|
507
|
+
button_alignment: 'stretch',
|
|
508
|
+
font_size: 16,
|
|
509
|
+
input_font_size: 16,
|
|
510
|
+
button_font_size: 16,
|
|
511
|
+
background_color: '#ffffff',
|
|
512
|
+
text_color: '#121212',
|
|
513
|
+
button_background_color: '#121212',
|
|
514
|
+
button_border_color: '#121212',
|
|
515
|
+
button_text_color: '#ffffff',
|
|
516
|
+
input_background_color: '#ffffff',
|
|
517
|
+
input_border_color: '#121212',
|
|
518
|
+
input_text_color: '#121212',
|
|
519
|
+
custom_css: ''
|
|
520
|
+
},
|
|
521
|
+
newsletter_form: {
|
|
522
|
+
heading: 'Subscribe to our newsletter',
|
|
523
|
+
subheading: '<p>Be the first to know about new collections and exclusive offers.</p>',
|
|
524
|
+
show_first_name: false,
|
|
525
|
+
show_last_name: false,
|
|
526
|
+
show_permission_checkbox: false,
|
|
527
|
+
tags: 'newsletter',
|
|
528
|
+
return_to: '',
|
|
529
|
+
label_first_name: 'First name',
|
|
530
|
+
placeholder_first_name: '',
|
|
531
|
+
label_last_name: 'Last name',
|
|
532
|
+
placeholder_last_name: '',
|
|
533
|
+
label_email: 'Email',
|
|
534
|
+
placeholder_email: '',
|
|
535
|
+
label_permission: '<p>I agree to receive marketing emails</p>',
|
|
536
|
+
label_subscribe: 'Subscribe',
|
|
537
|
+
success_message: 'Thanks for subscribing',
|
|
538
|
+
background_color: '#ffffff',
|
|
539
|
+
text_color: '#1a1b18',
|
|
540
|
+
button_background_color: '#445958',
|
|
541
|
+
button_text_color: '#ffffff'
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
};
|
|
467
545
|
const Trustoo = {
|
|
468
546
|
Trustoo: {
|
|
469
547
|
'barrage-carousel': null,
|
|
@@ -621,7 +699,110 @@ const LooxReviews = {
|
|
|
621
699
|
}
|
|
622
700
|
}
|
|
623
701
|
};
|
|
702
|
+
const SeoantTrustBadgesIcon = {
|
|
703
|
+
SeoantTrustBadgesIcon: {
|
|
704
|
+
star_rating: {
|
|
705
|
+
badge_id: null
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
const PowrContactFormBuilder = {
|
|
710
|
+
PowrContactFormBuilder: {
|
|
711
|
+
'app-block': {
|
|
712
|
+
app_id: ''
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
const MyappgurusProductReviews = {
|
|
717
|
+
MyappgurusProductReviews: {
|
|
718
|
+
allReviews: {
|
|
719
|
+
Show_by_label: ''
|
|
720
|
+
},
|
|
721
|
+
allReviewsCounter: {
|
|
722
|
+
out_of_label: '',
|
|
723
|
+
stars_based_on_label: '',
|
|
724
|
+
reviews_label: ''
|
|
725
|
+
},
|
|
726
|
+
form: {
|
|
727
|
+
block_heading: '',
|
|
728
|
+
no_rating: '',
|
|
729
|
+
subtitle2: '',
|
|
730
|
+
review_btn: '',
|
|
731
|
+
see_all_reviews_label: '',
|
|
732
|
+
form_heading: '',
|
|
733
|
+
name_label: '',
|
|
734
|
+
email_label: '',
|
|
735
|
+
review_title_label: '',
|
|
736
|
+
review_description_label: '',
|
|
737
|
+
ratings_label: '',
|
|
738
|
+
delivery_ratings_label: '',
|
|
739
|
+
payment_ratings_label: '',
|
|
740
|
+
price_ratings_label: '',
|
|
741
|
+
review_image_label: '',
|
|
742
|
+
submit_btn_label: '',
|
|
743
|
+
cancel_btn_label: '',
|
|
744
|
+
sort_label: '',
|
|
745
|
+
sort1_label: '',
|
|
746
|
+
sort2_label: '',
|
|
747
|
+
sort3_label: '',
|
|
748
|
+
showing_label: '',
|
|
749
|
+
to_label: '',
|
|
750
|
+
of_label: '',
|
|
751
|
+
results_label: ''
|
|
752
|
+
},
|
|
753
|
+
star: null
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
const TrustreviewsProductReviews = {
|
|
757
|
+
TrustreviewsProductReviews: {
|
|
758
|
+
questions_widget: {
|
|
759
|
+
product: '{{ product }}'
|
|
760
|
+
},
|
|
761
|
+
'review-carousel': null,
|
|
762
|
+
reviews_text_widget: null,
|
|
763
|
+
reviews_widget: {
|
|
764
|
+
product: '{{ product }}'
|
|
765
|
+
},
|
|
766
|
+
shop_reviews_widget: null,
|
|
767
|
+
star_rating: {
|
|
768
|
+
product: '{{product}}',
|
|
769
|
+
hide_on_no_reviews: false,
|
|
770
|
+
enable_jsonld: false,
|
|
771
|
+
starsize: 16,
|
|
772
|
+
addtional_text: ''
|
|
773
|
+
},
|
|
774
|
+
'reviews-testimonials': null,
|
|
775
|
+
all_reviews_widget: null,
|
|
776
|
+
'review-cards': null,
|
|
777
|
+
'review-gallery': null,
|
|
778
|
+
medals: null
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
const HulkProductOptions = {
|
|
782
|
+
HulkProductOptions: {
|
|
783
|
+
option_block: null
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
const TrustshopProductReviews = {
|
|
787
|
+
TrustshopProductReviews: {
|
|
788
|
+
'widget-product-rating': {
|
|
789
|
+
selected_product: '{{ product }}'
|
|
790
|
+
},
|
|
791
|
+
'all-reviews': null,
|
|
792
|
+
'widget-box': null,
|
|
793
|
+
'review-testimonial': null
|
|
794
|
+
}
|
|
795
|
+
};
|
|
624
796
|
const composeSettingsByWidgetType = {
|
|
797
|
+
...TrustshopProductReviews,
|
|
798
|
+
...HulkProductOptions,
|
|
799
|
+
...MyappgurusProductReviews,
|
|
800
|
+
...TrustreviewsProductReviews,
|
|
801
|
+
...PowrContactFormBuilder,
|
|
802
|
+
...SeoantTrustBadgesIcon,
|
|
803
|
+
...SegunoEmailMarketing,
|
|
804
|
+
...AftershipEmailMarketingsms,
|
|
805
|
+
...BestBuyFulfillment,
|
|
625
806
|
...GloboProductOptionsVariant,
|
|
626
807
|
...WishlistKing,
|
|
627
808
|
...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
|
|
|
@@ -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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var react = require('react');
|
|
@@ -19,7 +20,7 @@ const useCurrentDevice = ()=>{
|
|
|
19
20
|
return react.useSyncExternalStore(subscribe, ()=>{
|
|
20
21
|
if (window.innerWidth < 768) {
|
|
21
22
|
return 'mobile';
|
|
22
|
-
} else if (window.innerWidth >= 768 && window.innerWidth <
|
|
23
|
+
} else if (window.innerWidth >= 768 && window.innerWidth < 1025) {
|
|
23
24
|
return 'tablet';
|
|
24
25
|
} else {
|
|
25
26
|
return 'desktop';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var react = require('react');
|
|
@@ -12,6 +13,7 @@ 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');
|
|
@@ -43,6 +45,21 @@ const useProductBundleDiscount = ()=>{
|
|
|
43
45
|
seUseProductCompareAtPrice
|
|
44
46
|
};
|
|
45
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
|
+
};
|
|
46
63
|
const useQuantity = ()=>{
|
|
47
64
|
const quantity = ProductContext.useProductStore((s)=>s.quantity);
|
|
48
65
|
const hasUpdatePrice = ProductContext.useProductStore((s)=>s.updatePrice);
|
|
@@ -237,6 +254,7 @@ exports.useProduct = useProduct;
|
|
|
237
254
|
exports.useProductBundleDiscount = useProductBundleDiscount;
|
|
238
255
|
exports.useProductOfferDiscount = useProductOfferDiscount;
|
|
239
256
|
exports.useProductProperties = useProductProperties;
|
|
257
|
+
exports.useProductShopifyEditLink = useProductShopifyEditLink;
|
|
240
258
|
exports.useQuantity = useQuantity;
|
|
241
259
|
exports.useSelectedOption = useSelectedOption;
|
|
242
260
|
exports.useUniqProductID = useUniqProductID;
|