@gem-sdk/core 1.63.16 → 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/preview-page.generated.js +3 -1
- 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/preview-page.generated.js +3 -1
- 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
|
@@ -93,6 +93,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
93
93
|
selected_product: appSetting?.['productHandle'] || '{{ product }}'
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
+
case 'TrustshopProductReviews':
|
|
97
|
+
{
|
|
98
|
+
return {
|
|
99
|
+
...currentSetting,
|
|
100
|
+
selected_product: appSetting?.['productHandle'] || '{{ product }}'
|
|
101
|
+
};
|
|
102
|
+
}
|
|
96
103
|
case 'WhatmoreShoppableVideosreel':
|
|
97
104
|
{
|
|
98
105
|
return {
|
|
@@ -107,25 +114,32 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
107
114
|
'scroll-video-tile-size-portrait': parseFloat(appSetting?.scrollVideoTitleSizePortrait)
|
|
108
115
|
};
|
|
109
116
|
}
|
|
110
|
-
case '
|
|
117
|
+
case 'PowerfulContactFormBuilder':
|
|
111
118
|
{
|
|
112
119
|
return {
|
|
113
120
|
...currentSetting,
|
|
114
|
-
|
|
121
|
+
shortcode: appSetting?.shortcode
|
|
115
122
|
};
|
|
116
123
|
}
|
|
117
|
-
case '
|
|
124
|
+
case 'AftershipEmailMarketingsms':
|
|
118
125
|
{
|
|
119
126
|
return {
|
|
120
127
|
...currentSetting,
|
|
121
|
-
|
|
128
|
+
embedded_form_id: appSetting?.formId
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
case 'SeoantTrustBadgesIcon':
|
|
132
|
+
{
|
|
133
|
+
return {
|
|
134
|
+
...currentSetting,
|
|
135
|
+
badge_id: appSetting?.BadgeId
|
|
122
136
|
};
|
|
123
137
|
}
|
|
124
|
-
case '
|
|
138
|
+
case 'PowrContactFormBuilder':
|
|
125
139
|
{
|
|
126
140
|
return {
|
|
127
141
|
...currentSetting,
|
|
128
|
-
|
|
142
|
+
app_id: appSetting?.appId
|
|
129
143
|
};
|
|
130
144
|
}
|
|
131
145
|
default:
|
|
@@ -462,6 +476,70 @@ const GloboProductOptionsVariant = {
|
|
|
462
476
|
'app-block': null
|
|
463
477
|
}
|
|
464
478
|
};
|
|
479
|
+
const BestBuyFulfillment = {
|
|
480
|
+
BestBuyFulfillment: {
|
|
481
|
+
'pickup-selector': null
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
const AftershipEmailMarketingsms = {
|
|
485
|
+
AftershipEmailMarketingsms: {
|
|
486
|
+
embeded_form: {
|
|
487
|
+
embedded_form_id: ''
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
const SegunoEmailMarketing = {
|
|
492
|
+
SegunoEmailMarketing: {
|
|
493
|
+
back_in_stock: {
|
|
494
|
+
heading: '<h3>Get notified when this is back in stock</h3>',
|
|
495
|
+
label_email: 'Email',
|
|
496
|
+
placeholder_email: '',
|
|
497
|
+
show_permission_checkbox: true,
|
|
498
|
+
label_permission: '<p>Also, sign up to receive newsletters</p>',
|
|
499
|
+
label_notify: 'Notify me',
|
|
500
|
+
label_success: '<p>Thanks! You will be notified once the product is back in stock.</p>',
|
|
501
|
+
product_exclusion_tag: 'back-in-stock-excluded',
|
|
502
|
+
default_variant: 'available',
|
|
503
|
+
padding: 0,
|
|
504
|
+
form_gap: 16,
|
|
505
|
+
button_alignment: 'stretch',
|
|
506
|
+
font_size: 16,
|
|
507
|
+
input_font_size: 16,
|
|
508
|
+
button_font_size: 16,
|
|
509
|
+
background_color: '#ffffff',
|
|
510
|
+
text_color: '#121212',
|
|
511
|
+
button_background_color: '#121212',
|
|
512
|
+
button_border_color: '#121212',
|
|
513
|
+
button_text_color: '#ffffff',
|
|
514
|
+
input_background_color: '#ffffff',
|
|
515
|
+
input_border_color: '#121212',
|
|
516
|
+
input_text_color: '#121212',
|
|
517
|
+
custom_css: ''
|
|
518
|
+
},
|
|
519
|
+
newsletter_form: {
|
|
520
|
+
heading: 'Subscribe to our newsletter',
|
|
521
|
+
subheading: '<p>Be the first to know about new collections and exclusive offers.</p>',
|
|
522
|
+
show_first_name: false,
|
|
523
|
+
show_last_name: false,
|
|
524
|
+
show_permission_checkbox: false,
|
|
525
|
+
tags: 'newsletter',
|
|
526
|
+
return_to: '',
|
|
527
|
+
label_first_name: 'First name',
|
|
528
|
+
placeholder_first_name: '',
|
|
529
|
+
label_last_name: 'Last name',
|
|
530
|
+
placeholder_last_name: '',
|
|
531
|
+
label_email: 'Email',
|
|
532
|
+
placeholder_email: '',
|
|
533
|
+
label_permission: '<p>I agree to receive marketing emails</p>',
|
|
534
|
+
label_subscribe: 'Subscribe',
|
|
535
|
+
success_message: 'Thanks for subscribing',
|
|
536
|
+
background_color: '#ffffff',
|
|
537
|
+
text_color: '#1a1b18',
|
|
538
|
+
button_background_color: '#445958',
|
|
539
|
+
button_text_color: '#ffffff'
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
};
|
|
465
543
|
const Trustoo = {
|
|
466
544
|
Trustoo: {
|
|
467
545
|
'barrage-carousel': null,
|
|
@@ -619,7 +697,110 @@ const LooxReviews = {
|
|
|
619
697
|
}
|
|
620
698
|
}
|
|
621
699
|
};
|
|
700
|
+
const SeoantTrustBadgesIcon = {
|
|
701
|
+
SeoantTrustBadgesIcon: {
|
|
702
|
+
star_rating: {
|
|
703
|
+
badge_id: null
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
const PowrContactFormBuilder = {
|
|
708
|
+
PowrContactFormBuilder: {
|
|
709
|
+
'app-block': {
|
|
710
|
+
app_id: ''
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
const MyappgurusProductReviews = {
|
|
715
|
+
MyappgurusProductReviews: {
|
|
716
|
+
allReviews: {
|
|
717
|
+
Show_by_label: ''
|
|
718
|
+
},
|
|
719
|
+
allReviewsCounter: {
|
|
720
|
+
out_of_label: '',
|
|
721
|
+
stars_based_on_label: '',
|
|
722
|
+
reviews_label: ''
|
|
723
|
+
},
|
|
724
|
+
form: {
|
|
725
|
+
block_heading: '',
|
|
726
|
+
no_rating: '',
|
|
727
|
+
subtitle2: '',
|
|
728
|
+
review_btn: '',
|
|
729
|
+
see_all_reviews_label: '',
|
|
730
|
+
form_heading: '',
|
|
731
|
+
name_label: '',
|
|
732
|
+
email_label: '',
|
|
733
|
+
review_title_label: '',
|
|
734
|
+
review_description_label: '',
|
|
735
|
+
ratings_label: '',
|
|
736
|
+
delivery_ratings_label: '',
|
|
737
|
+
payment_ratings_label: '',
|
|
738
|
+
price_ratings_label: '',
|
|
739
|
+
review_image_label: '',
|
|
740
|
+
submit_btn_label: '',
|
|
741
|
+
cancel_btn_label: '',
|
|
742
|
+
sort_label: '',
|
|
743
|
+
sort1_label: '',
|
|
744
|
+
sort2_label: '',
|
|
745
|
+
sort3_label: '',
|
|
746
|
+
showing_label: '',
|
|
747
|
+
to_label: '',
|
|
748
|
+
of_label: '',
|
|
749
|
+
results_label: ''
|
|
750
|
+
},
|
|
751
|
+
star: null
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
const TrustreviewsProductReviews = {
|
|
755
|
+
TrustreviewsProductReviews: {
|
|
756
|
+
questions_widget: {
|
|
757
|
+
product: '{{ product }}'
|
|
758
|
+
},
|
|
759
|
+
'review-carousel': null,
|
|
760
|
+
reviews_text_widget: null,
|
|
761
|
+
reviews_widget: {
|
|
762
|
+
product: '{{ product }}'
|
|
763
|
+
},
|
|
764
|
+
shop_reviews_widget: null,
|
|
765
|
+
star_rating: {
|
|
766
|
+
product: '{{product}}',
|
|
767
|
+
hide_on_no_reviews: false,
|
|
768
|
+
enable_jsonld: false,
|
|
769
|
+
starsize: 16,
|
|
770
|
+
addtional_text: ''
|
|
771
|
+
},
|
|
772
|
+
'reviews-testimonials': null,
|
|
773
|
+
all_reviews_widget: null,
|
|
774
|
+
'review-cards': null,
|
|
775
|
+
'review-gallery': null,
|
|
776
|
+
medals: null
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
const HulkProductOptions = {
|
|
780
|
+
HulkProductOptions: {
|
|
781
|
+
option_block: null
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
const TrustshopProductReviews = {
|
|
785
|
+
TrustshopProductReviews: {
|
|
786
|
+
'widget-product-rating': {
|
|
787
|
+
selected_product: '{{ product }}'
|
|
788
|
+
},
|
|
789
|
+
'all-reviews': null,
|
|
790
|
+
'widget-box': null,
|
|
791
|
+
'review-testimonial': null
|
|
792
|
+
}
|
|
793
|
+
};
|
|
622
794
|
const composeSettingsByWidgetType = {
|
|
795
|
+
...TrustshopProductReviews,
|
|
796
|
+
...HulkProductOptions,
|
|
797
|
+
...MyappgurusProductReviews,
|
|
798
|
+
...TrustreviewsProductReviews,
|
|
799
|
+
...PowrContactFormBuilder,
|
|
800
|
+
...SeoantTrustBadgesIcon,
|
|
801
|
+
...SegunoEmailMarketing,
|
|
802
|
+
...AftershipEmailMarketingsms,
|
|
803
|
+
...BestBuyFulfillment,
|
|
623
804
|
...GloboProductOptionsVariant,
|
|
624
805
|
...WishlistKing,
|
|
625
806
|
...LoloyalLoyaltyReferrals,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, GrowaveConfig, LoloyalLoyaltyReferralsConfig, PowerfulContactFormBuilderConfig, WishlistKingConfig, GloboProductOptionsVariantConfig, KachingBundlesConfig, TrustooConfig, LooxReviewsConfig } from './appConfig.js';
|
|
1
|
+
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, GrowaveConfig, LoloyalLoyaltyReferralsConfig, PowerfulContactFormBuilderConfig, WishlistKingConfig, GloboProductOptionsVariantConfig, KachingBundlesConfig, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, TrustooConfig, LooxReviewsConfig, SeoantTrustBadgesIconConfig, PowrContactFormBuilderConfig, MyappgurusProductReviewsConfig, TrustreviewsProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -32,8 +32,17 @@ const mapShopifyAppMeta = {
|
|
|
32
32
|
...WishlistKingConfig,
|
|
33
33
|
...GloboProductOptionsVariantConfig,
|
|
34
34
|
...KachingBundlesConfig,
|
|
35
|
+
...BestBuyFulfillmentConfig,
|
|
36
|
+
...AftershipEmailMarketingsmsConfig,
|
|
37
|
+
...SegunoEmailMarketingConfig,
|
|
35
38
|
...TrustooConfig,
|
|
36
|
-
...LooxReviewsConfig
|
|
39
|
+
...LooxReviewsConfig,
|
|
40
|
+
...SeoantTrustBadgesIconConfig,
|
|
41
|
+
...PowrContactFormBuilderConfig,
|
|
42
|
+
...MyappgurusProductReviewsConfig,
|
|
43
|
+
...TrustreviewsProductReviewsConfig,
|
|
44
|
+
...HulkProductOptionsConfig,
|
|
45
|
+
...TrustshopProductReviewsConfig
|
|
37
46
|
};
|
|
38
47
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
39
48
|
|
|
@@ -22,7 +22,7 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
22
22
|
const typographyCustom = typography?.custom;
|
|
23
23
|
const { fontFamily, fontSize, fontWeight, lineHeight, letterSpacing } = typographyCustom ?? {};
|
|
24
24
|
const typographyAttrs = typography?.attrs;
|
|
25
|
-
const { bold, italic, underline, transform } = typographyAttrs ?? {};
|
|
25
|
+
const { bold, italic, underline, transform, color } = typographyAttrs ?? {};
|
|
26
26
|
const composeImportant = isImportant ? '!important' : '';
|
|
27
27
|
return `
|
|
28
28
|
${fontFamily ? `font-family: ${composeFontFamilyTypographyV2({
|
|
@@ -30,6 +30,7 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
30
30
|
type: typography?.type
|
|
31
31
|
})} ${composeImportant}` : ''};
|
|
32
32
|
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}` : ''};
|
|
33
|
+
${color ? `color: ${color} ${composeImportant}` : ''};
|
|
33
34
|
${bold ? `font-weight: bold ${composeImportant}` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant}` : ''};
|
|
34
35
|
${letterSpacing ? `letter-spacing: ${letterSpacing} ${composeImportant}` : ''};
|
|
35
36
|
${lineHeight?.desktop ? `line-height: ${lineHeight?.desktop} ${composeImportant}` : ''};
|
|
@@ -38,6 +39,13 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
38
39
|
${transform ? `text-transform: ${transform} ${composeImportant}` : ''};
|
|
39
40
|
`;
|
|
40
41
|
};
|
|
42
|
+
const composeTextHoverColorCss = (device, colorHoverConfig, isImportant)=>{
|
|
43
|
+
if (colorHoverConfig) {
|
|
44
|
+
const composeImportant = isImportant ? '!important' : '';
|
|
45
|
+
const color = colorHoverConfig[device]?.hover;
|
|
46
|
+
return `${color ? `color: ${color} ${composeImportant}` : ''}`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
41
49
|
function getCustomCSSByDevice(typography, device) {
|
|
42
50
|
if (!typography || !device) return {};
|
|
43
51
|
const suffix = device === 'desktop' || !device ? '' : `-${device}`;
|
|
@@ -146,4 +154,4 @@ const isCustomTypo = (customTypo)=>{
|
|
|
146
154
|
return customTypo && Object.keys(customTypo).length > 1 || customTypo && Object.keys(customTypo).length === 1 && !customTypo.fontSize;
|
|
147
155
|
};
|
|
148
156
|
|
|
149
|
-
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass };
|
|
157
|
+
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useShopStore } from '../../contexts/ShopContext.js';
|
|
4
|
+
|
|
5
|
+
const useShopifyLink = ({ productId, articleId })=>{
|
|
6
|
+
const storefrontUrl = useShopStore((s)=>s.storefrontUrl);
|
|
7
|
+
//
|
|
8
|
+
// const productId = useMemo(() => {
|
|
9
|
+
// const ele = document.querySelector(`[data-uid="${parentProductUid}"]`);
|
|
10
|
+
// return ele?.getAttribute('data-product-id');
|
|
11
|
+
// }, [parentProductUid]);
|
|
12
|
+
const shopName = useMemo(()=>{
|
|
13
|
+
const pattern = /^(?:https?:\/\/)?([^/]+)\.myshopify\.com/;
|
|
14
|
+
if (storefrontUrl) {
|
|
15
|
+
return storefrontUrl.match(pattern)?.[1];
|
|
16
|
+
}
|
|
17
|
+
return '';
|
|
18
|
+
}, [
|
|
19
|
+
storefrontUrl
|
|
20
|
+
]);
|
|
21
|
+
const linkShopDefault = useMemo(()=>{
|
|
22
|
+
return `https://admin.shopify.com/store/${shopName}`;
|
|
23
|
+
}, [
|
|
24
|
+
shopName
|
|
25
|
+
]);
|
|
26
|
+
const linkEditProduct = useMemo(()=>{
|
|
27
|
+
return productId ? `${linkShopDefault}/products/${productId}` : '';
|
|
28
|
+
}, [
|
|
29
|
+
linkShopDefault,
|
|
30
|
+
productId
|
|
31
|
+
]);
|
|
32
|
+
const linkEditArticle = useMemo(()=>{
|
|
33
|
+
return articleId ? `${linkShopDefault}/articles/${articleId}` : '';
|
|
34
|
+
}, [
|
|
35
|
+
articleId,
|
|
36
|
+
linkShopDefault
|
|
37
|
+
]);
|
|
38
|
+
return {
|
|
39
|
+
linkShopDefault,
|
|
40
|
+
linkEditProduct,
|
|
41
|
+
linkEditArticle
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { useShopifyLink };
|
package/dist/esm/hooks/shop.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { useMemo } from 'react';
|
|
2
3
|
import { useSWRConfig } from 'swr';
|
|
3
4
|
import { useShopStore } from '../contexts/ShopContext.js';
|
|
@@ -24,6 +25,14 @@ const useCurrency = ()=>{
|
|
|
24
25
|
changeCurrency
|
|
25
26
|
]);
|
|
26
27
|
};
|
|
28
|
+
const useTimezone = ()=>{
|
|
29
|
+
const timezone = useShopStore((state)=>state.timezone);
|
|
30
|
+
return useMemo(()=>({
|
|
31
|
+
timezone
|
|
32
|
+
}), [
|
|
33
|
+
timezone
|
|
34
|
+
]);
|
|
35
|
+
};
|
|
27
36
|
const useMoneyFormat = ()=>{
|
|
28
37
|
const moneyFormat = useShopStore((state)=>state.moneyFormat);
|
|
29
38
|
const moneyWithCurrencyFormat = useShopStore((state)=>state.moneyWithCurrencyFormat);
|
|
@@ -108,4 +117,4 @@ function useCheckoutUrl(url) {
|
|
|
108
117
|
return storefrontToken ? `${url}?access_token=${storefrontToken}` : url;
|
|
109
118
|
}
|
|
110
119
|
|
|
111
|
-
export { useCheckoutUrl, useConnectedShopify, useCurrency, useEditorMode, useIsSampleProduct, useIsStorefrontProduct, useLocale, useMatchMutate, useMobileOnly, useMoneyFormat, usePageType, usePluginEnable, useStoreFront, useSwatches };
|
|
120
|
+
export { useCheckoutUrl, useConnectedShopify, useCurrency, useEditorMode, useIsSampleProduct, useIsStorefrontProduct, useLocale, useMatchMutate, useMobileOnly, useMoneyFormat, usePageType, usePluginEnable, useStoreFront, useSwatches, useTimezone };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { useSyncExternalStore } from 'react';
|
|
2
3
|
|
|
3
4
|
// Hàm debounce với TypeScript
|
|
@@ -17,7 +18,7 @@ const useCurrentDevice = ()=>{
|
|
|
17
18
|
return useSyncExternalStore(subscribe, ()=>{
|
|
18
19
|
if (window.innerWidth < 768) {
|
|
19
20
|
return 'mobile';
|
|
20
|
-
} else if (window.innerWidth >= 768 && window.innerWidth <
|
|
21
|
+
} else if (window.innerWidth >= 768 && window.innerWidth < 1025) {
|
|
21
22
|
return 'tablet';
|
|
22
23
|
} else {
|
|
23
24
|
return 'desktop';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
2
3
|
import { useProductStore } from '../contexts/ProductContext.js';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
@@ -10,6 +11,7 @@ import 'swr/infinite';
|
|
|
10
11
|
import 'vanilla-lazyload';
|
|
11
12
|
import './useCartUI.js';
|
|
12
13
|
import { checkInStock } from '../helpers/variant.js';
|
|
14
|
+
import { useShopifyLink } from './shop/useShopifyLink.js';
|
|
13
15
|
import 'react-transition-group';
|
|
14
16
|
import '@gem-sdk/core';
|
|
15
17
|
import 'classnames';
|
|
@@ -41,6 +43,21 @@ const useProductBundleDiscount = ()=>{
|
|
|
41
43
|
seUseProductCompareAtPrice
|
|
42
44
|
};
|
|
43
45
|
};
|
|
46
|
+
const useProductShopifyEditLink = ()=>{
|
|
47
|
+
const product = useProductStore((s)=>s.product);
|
|
48
|
+
const productId = product?.baseID?.replace('gid://shopify/Product/', '');
|
|
49
|
+
const { linkEditProduct } = useShopifyLink({
|
|
50
|
+
productId
|
|
51
|
+
});
|
|
52
|
+
const redirectProductShopifyLink = ()=>{
|
|
53
|
+
if (!linkEditProduct) return;
|
|
54
|
+
window.open(linkEditProduct, '_blank');
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
linkEditProduct,
|
|
58
|
+
redirectProductShopifyLink
|
|
59
|
+
};
|
|
60
|
+
};
|
|
44
61
|
const useQuantity = ()=>{
|
|
45
62
|
const quantity = useProductStore((s)=>s.quantity);
|
|
46
63
|
const hasUpdatePrice = useProductStore((s)=>s.updatePrice);
|
|
@@ -225,4 +242,4 @@ const useProductOfferDiscount = ()=>{
|
|
|
225
242
|
return currentDiscount || 0;
|
|
226
243
|
};
|
|
227
244
|
|
|
228
|
-
export { useCheckAvailableVariantInStock, useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useHasPreSelected, useIsSyncProduct, useProduct, useProductBundleDiscount, useProductOfferDiscount, useProductProperties, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants };
|
|
245
|
+
export { useCheckAvailableVariantInStock, useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useHasPreSelected, useIsSyncProduct, useProduct, useProductBundleDiscount, useProductOfferDiscount, useProductProperties, useProductShopifyEditLink, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants };
|