@gem-sdk/core 1.58.0-dev.13 → 1.58.0-dev.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/AddOn.js +1 -0
- package/dist/cjs/components/ComponentAnimation.js +1 -0
- package/dist/cjs/components/ComponentToolbarPreview.js +33 -19
- package/dist/cjs/components/ComponentWrapper.js +1 -0
- package/dist/cjs/components/ComponentWrapperPreview.js +1 -0
- package/dist/cjs/components/Empty.js +1 -0
- package/dist/cjs/components/InteractionSuffix.js +2 -1
- package/dist/cjs/components/Render.js +1 -0
- package/dist/cjs/components/Render.liquid.js +14 -5
- package/dist/cjs/components/RenderBlock.js +1 -0
- package/dist/cjs/components/RenderCustomCode.js +1 -0
- package/dist/cjs/components/RenderPreview.js +1 -0
- package/dist/cjs/components/RenderSection.js +1 -0
- package/dist/cjs/components/ai-generator/AIContentGenerator.js +2 -1
- package/dist/cjs/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/cjs/components/ai-generator/components/PickProduct.js +1 -0
- package/dist/cjs/components/ai-generator/components/ToneAndVoice.js +1 -0
- package/dist/cjs/components/ai-generator/icons/AIIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/CloseIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/DropdownIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/SearchIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/UpgradeIcon.js +1 -0
- package/dist/cjs/components/ai-generator/icons/WarningIcon.js +1 -0
- package/dist/cjs/components/resize/Resize.js +1 -0
- package/dist/cjs/components/resize/Spacing.js +1 -0
- package/dist/cjs/components/theme-section/CreateThemeSection.js +2 -1
- package/dist/cjs/components/theme-section/ThemeSectionStatus.js +1 -0
- package/dist/cjs/components/theme-section/ThemeSectionTooltip.js +1 -0
- package/dist/cjs/components/toolbar/Tooltip.js +1 -0
- package/dist/cjs/contexts/AddonContext.js +1 -0
- package/dist/cjs/contexts/ArticleContext.js +1 -0
- package/dist/cjs/contexts/ArticleListContext.js +1 -0
- package/dist/cjs/contexts/BuilderComponent.js +1 -0
- package/dist/cjs/contexts/BuilderContext.js +1 -0
- package/dist/cjs/contexts/BuilderPreviewContext.js +1 -0
- package/dist/cjs/contexts/CartLineContext.js +1 -0
- package/dist/cjs/contexts/CollectionContext.js +1 -0
- package/dist/cjs/contexts/ModalContext.js +1 -0
- package/dist/cjs/contexts/PageContext.js +1 -0
- package/dist/cjs/contexts/ProductContext.js +17 -1
- package/dist/cjs/contexts/ProductListContext.js +1 -0
- package/dist/cjs/contexts/SectionContext.js +1 -0
- package/dist/cjs/contexts/ShopContext.js +1 -0
- package/dist/cjs/graphql/fragments/preview-theme-page.generated.js +35 -0
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +4 -28
- package/dist/cjs/graphql/queries/articles.generated.js +1 -0
- package/dist/cjs/graphql/queries/preview-page.generated.js +9 -13
- package/dist/cjs/graphql/queries/shop-shopify.generated.js +11 -0
- package/dist/cjs/helpers/align.js +18 -0
- package/dist/cjs/helpers/backgroundImage.js +184 -0
- package/dist/cjs/helpers/compose-advance-style.js +57 -3
- package/dist/cjs/helpers/filter-toolbar-preview.js +1 -0
- package/dist/cjs/helpers/interaction/index.js +2 -1
- package/dist/cjs/helpers/is-empty-children.js +1 -0
- package/dist/cjs/helpers/layout.js +17 -0
- package/dist/cjs/helpers/prefetch-queries.js +5 -3
- package/dist/cjs/helpers/radius.js +3 -1
- package/dist/cjs/helpers/shadow.js +25 -0
- package/dist/cjs/helpers/size.js +30 -2
- package/dist/cjs/helpers/third-party/appConfig.js +70 -0
- package/dist/cjs/helpers/third-party/appSetting.js +345 -2
- package/dist/cjs/helpers/third-party/constant.js +11 -1
- package/dist/cjs/helpers/third-party/getAppBlockConfig.js +17 -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 +1 -0
- package/dist/cjs/hooks/use-lazy-video.js +1 -0
- package/dist/cjs/hooks/useAnimations.js +1 -0
- package/dist/cjs/hooks/useCartId.js +1 -0
- package/dist/cjs/hooks/useCartLine.js +1 -0
- package/dist/cjs/hooks/useCartUI.js +1 -0
- package/dist/cjs/hooks/useCollection.js +1 -0
- package/dist/cjs/hooks/useFetchHandle.js +1 -0
- package/dist/cjs/hooks/useFormatMoney.js +1 -0
- package/dist/cjs/hooks/useInitialSwatchesOptions.js +1 -0
- package/dist/cjs/hooks/useInteraction.js +1 -0
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +1 -0
- package/dist/cjs/hooks/useLoadScript.js +1 -0
- package/dist/cjs/hooks/useMoney.js +1 -0
- package/dist/cjs/hooks/usePrevious.js +1 -0
- package/dist/cjs/hooks/useProduct.js +28 -1
- package/dist/cjs/hooks/useProductList.js +1 -0
- package/dist/cjs/hooks/useSuspenseFetch.js +1 -0
- package/dist/cjs/hooks/useSwatchesOptions.js +1 -0
- package/dist/cjs/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/cjs/index.js +28 -10
- package/dist/esm/components/AddOn.js +1 -0
- package/dist/esm/components/ComponentAnimation.js +1 -0
- package/dist/esm/components/ComponentToolbarPreview.js +33 -19
- package/dist/esm/components/ComponentWrapper.js +1 -0
- package/dist/esm/components/ComponentWrapperPreview.js +1 -0
- package/dist/esm/components/Empty.js +1 -0
- package/dist/esm/components/InteractionSuffix.js +2 -1
- package/dist/esm/components/Render.js +1 -0
- package/dist/esm/components/Render.liquid.js +14 -5
- package/dist/esm/components/RenderBlock.js +1 -0
- package/dist/esm/components/RenderCustomCode.js +1 -0
- package/dist/esm/components/RenderPreview.js +1 -0
- package/dist/esm/components/RenderSection.js +1 -0
- package/dist/esm/components/ai-generator/AIContentGenerator.js +2 -1
- package/dist/esm/components/ai-generator/AIGenContentLoading.js +1 -0
- package/dist/esm/components/ai-generator/components/PickProduct.js +1 -0
- package/dist/esm/components/ai-generator/components/ToneAndVoice.js +1 -0
- package/dist/esm/components/ai-generator/icons/AIIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/CloseIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/DropdownIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/SearchIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/ShowMoreIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/UpgradeIcon.js +1 -0
- package/dist/esm/components/ai-generator/icons/WarningIcon.js +1 -0
- package/dist/esm/components/resize/Resize.js +1 -0
- package/dist/esm/components/resize/Spacing.js +1 -0
- package/dist/esm/components/theme-section/CreateThemeSection.js +2 -1
- package/dist/esm/components/theme-section/ThemeSectionStatus.js +1 -0
- package/dist/esm/components/theme-section/ThemeSectionTooltip.js +1 -0
- package/dist/esm/components/toolbar/Tooltip.js +1 -0
- package/dist/esm/contexts/AddonContext.js +1 -0
- package/dist/esm/contexts/ArticleContext.js +1 -0
- package/dist/esm/contexts/ArticleListContext.js +1 -0
- package/dist/esm/contexts/BuilderComponent.js +1 -0
- package/dist/esm/contexts/BuilderContext.js +1 -0
- package/dist/esm/contexts/BuilderPreviewContext.js +1 -0
- package/dist/esm/contexts/CartLineContext.js +1 -0
- package/dist/esm/contexts/CollectionContext.js +1 -0
- package/dist/esm/contexts/ModalContext.js +1 -0
- package/dist/esm/contexts/PageContext.js +1 -0
- package/dist/esm/contexts/ProductContext.js +17 -1
- package/dist/esm/contexts/ProductListContext.js +1 -0
- package/dist/esm/contexts/SectionContext.js +1 -0
- package/dist/esm/contexts/ShopContext.js +1 -0
- package/dist/esm/graphql/fragments/preview-theme-page.generated.js +33 -0
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +5 -28
- package/dist/esm/graphql/queries/articles.generated.js +1 -0
- package/dist/esm/graphql/queries/preview-page.generated.js +8 -12
- package/dist/esm/graphql/queries/shop-shopify.generated.js +9 -0
- package/dist/esm/helpers/align.js +18 -1
- package/dist/esm/helpers/backgroundImage.js +179 -0
- package/dist/esm/helpers/compose-advance-style.js +57 -3
- package/dist/esm/helpers/filter-toolbar-preview.js +1 -0
- package/dist/esm/helpers/interaction/index.js +2 -1
- package/dist/esm/helpers/is-empty-children.js +1 -0
- package/dist/esm/helpers/layout.js +17 -1
- package/dist/esm/helpers/prefetch-queries.js +5 -3
- package/dist/esm/helpers/radius.js +3 -1
- package/dist/esm/helpers/shadow.js +25 -1
- package/dist/esm/helpers/size.js +29 -3
- package/dist/esm/helpers/third-party/appConfig.js +61 -1
- package/dist/esm/helpers/third-party/appSetting.js +345 -2
- package/dist/esm/helpers/third-party/constant.js +12 -2
- package/dist/esm/helpers/third-party/getAppBlockConfig.js +17 -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 +1 -0
- package/dist/esm/hooks/use-lazy-video.js +1 -0
- package/dist/esm/hooks/useAnimations.js +1 -0
- package/dist/esm/hooks/useCartId.js +1 -0
- package/dist/esm/hooks/useCartLine.js +1 -0
- package/dist/esm/hooks/useCartUI.js +1 -0
- package/dist/esm/hooks/useCollection.js +1 -0
- package/dist/esm/hooks/useFetchHandle.js +1 -0
- package/dist/esm/hooks/useFormatMoney.js +1 -0
- package/dist/esm/hooks/useInitialSwatchesOptions.js +1 -0
- package/dist/esm/hooks/useInteraction.js +1 -0
- package/dist/esm/hooks/useIsomorphicLayoutEffect.js +1 -0
- package/dist/esm/hooks/useLoadScript.js +1 -0
- package/dist/esm/hooks/useMoney.js +1 -0
- package/dist/esm/hooks/usePrevious.js +1 -0
- package/dist/esm/hooks/useProduct.js +27 -2
- package/dist/esm/hooks/useProductList.js +1 -0
- package/dist/esm/hooks/useSuspenseFetch.js +1 -0
- package/dist/esm/hooks/useSwatchesOptions.js +1 -0
- package/dist/esm/hooks/useToolbarPostPurchase.js +1 -0
- package/dist/esm/index.js +14 -11
- package/dist/types/index.d.ts +826 -263
- package/package.json +4 -4
|
@@ -99,7 +99,14 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
99
99
|
{
|
|
100
100
|
return {
|
|
101
101
|
...currentSetting,
|
|
102
|
-
|
|
102
|
+
'show-views': appSetting?.showViews,
|
|
103
|
+
heading: appSetting?.heading,
|
|
104
|
+
'template-type': appSetting?.templateType,
|
|
105
|
+
'title-font-size': parseFloat(appSetting?.titleFontSize),
|
|
106
|
+
'landscape-padding': parseFloat(appSetting?.landscapePadding),
|
|
107
|
+
'top-bottom-padding': parseFloat(appSetting?.topBottomPadding),
|
|
108
|
+
'scroll-video-tile-size': parseFloat(appSetting?.scrollVideoTitleSize),
|
|
109
|
+
'scroll-video-tile-size-portrait': parseFloat(appSetting?.scrollVideoTitleSizePortrait)
|
|
103
110
|
};
|
|
104
111
|
}
|
|
105
112
|
case 'PowerfulContactFormBuilder':
|
|
@@ -109,6 +116,27 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
109
116
|
shortcode: appSetting?.shortcode
|
|
110
117
|
};
|
|
111
118
|
}
|
|
119
|
+
case 'AftershipEmailMarketingsms':
|
|
120
|
+
{
|
|
121
|
+
return {
|
|
122
|
+
...currentSetting,
|
|
123
|
+
embedded_form_id: appSetting?.formId
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
case 'SeoantTrustBadgesIcon':
|
|
127
|
+
{
|
|
128
|
+
return {
|
|
129
|
+
...currentSetting,
|
|
130
|
+
badge_id: appSetting?.BadgeId
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
case 'PowrContactFormBuilder':
|
|
134
|
+
{
|
|
135
|
+
return {
|
|
136
|
+
...currentSetting,
|
|
137
|
+
app_id: appSetting?.appId
|
|
138
|
+
};
|
|
139
|
+
}
|
|
112
140
|
default:
|
|
113
141
|
return currentSetting;
|
|
114
142
|
}
|
|
@@ -443,7 +471,320 @@ const GloboProductOptionsVariant = {
|
|
|
443
471
|
'app-block': null
|
|
444
472
|
}
|
|
445
473
|
};
|
|
474
|
+
const BestBuyFulfillment = {
|
|
475
|
+
BestBuyFulfillment: {
|
|
476
|
+
'pickup-selector': null
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
const AftershipEmailMarketingsms = {
|
|
480
|
+
AftershipEmailMarketingsms: {
|
|
481
|
+
embeded_form: {
|
|
482
|
+
embedded_form_id: ''
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
const SegunoEmailMarketing = {
|
|
487
|
+
SegunoEmailMarketing: {
|
|
488
|
+
back_in_stock: {
|
|
489
|
+
heading: '<h3>Get notified when this is back in stock</h3>',
|
|
490
|
+
label_email: 'Email',
|
|
491
|
+
placeholder_email: '',
|
|
492
|
+
show_permission_checkbox: true,
|
|
493
|
+
label_permission: '<p>Also, sign up to receive newsletters</p>',
|
|
494
|
+
label_notify: 'Notify me',
|
|
495
|
+
label_success: '<p>Thanks! You will be notified once the product is back in stock.</p>',
|
|
496
|
+
product_exclusion_tag: 'back-in-stock-excluded',
|
|
497
|
+
default_variant: 'available',
|
|
498
|
+
padding: 0,
|
|
499
|
+
form_gap: 16,
|
|
500
|
+
button_alignment: 'stretch',
|
|
501
|
+
font_size: 16,
|
|
502
|
+
input_font_size: 16,
|
|
503
|
+
button_font_size: 16,
|
|
504
|
+
background_color: '#ffffff',
|
|
505
|
+
text_color: '#121212',
|
|
506
|
+
button_background_color: '#121212',
|
|
507
|
+
button_border_color: '#121212',
|
|
508
|
+
button_text_color: '#ffffff',
|
|
509
|
+
input_background_color: '#ffffff',
|
|
510
|
+
input_border_color: '#121212',
|
|
511
|
+
input_text_color: '#121212',
|
|
512
|
+
custom_css: ''
|
|
513
|
+
},
|
|
514
|
+
newsletter_form: {
|
|
515
|
+
heading: 'Subscribe to our newsletter',
|
|
516
|
+
subheading: '<p>Be the first to know about new collections and exclusive offers.</p>',
|
|
517
|
+
show_first_name: false,
|
|
518
|
+
show_last_name: false,
|
|
519
|
+
show_permission_checkbox: false,
|
|
520
|
+
tags: 'newsletter',
|
|
521
|
+
return_to: '',
|
|
522
|
+
label_first_name: 'First name',
|
|
523
|
+
placeholder_first_name: '',
|
|
524
|
+
label_last_name: 'Last name',
|
|
525
|
+
placeholder_last_name: '',
|
|
526
|
+
label_email: 'Email',
|
|
527
|
+
placeholder_email: '',
|
|
528
|
+
label_permission: '<p>I agree to receive marketing emails</p>',
|
|
529
|
+
label_subscribe: 'Subscribe',
|
|
530
|
+
success_message: 'Thanks for subscribing',
|
|
531
|
+
background_color: '#ffffff',
|
|
532
|
+
text_color: '#1a1b18',
|
|
533
|
+
button_background_color: '#445958',
|
|
534
|
+
button_text_color: '#ffffff'
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
const Trustoo = {
|
|
539
|
+
Trustoo: {
|
|
540
|
+
'barrage-carousel': null,
|
|
541
|
+
'review-widget': null,
|
|
542
|
+
'photo-carousel': null,
|
|
543
|
+
'star-rating-widget': {
|
|
544
|
+
star_size: 20,
|
|
545
|
+
font_size: 16,
|
|
546
|
+
block_aligment: 'flex-start'
|
|
547
|
+
},
|
|
548
|
+
'text-carousel': null,
|
|
549
|
+
'card-carousel': null
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
const LooxReviews = {
|
|
553
|
+
LooxReviews: {
|
|
554
|
+
'loox-card-carousel-section': {
|
|
555
|
+
maxWidth: 1100,
|
|
556
|
+
borderRadius: 8,
|
|
557
|
+
itemsPerView: 4,
|
|
558
|
+
mobileItemsPerView: 1,
|
|
559
|
+
maxNumberOfCharacters: 100,
|
|
560
|
+
imageRatio: '0.72',
|
|
561
|
+
reviewerNameColor: '#000000',
|
|
562
|
+
textColor: '#000000',
|
|
563
|
+
itemBackgroundColor: '#ffffff',
|
|
564
|
+
starsColor: '',
|
|
565
|
+
starsBackgroundColor: '#ffffff',
|
|
566
|
+
arrows_backgroundColor: '#FFFFFF',
|
|
567
|
+
arrows_iconColor: '#9A9A9A',
|
|
568
|
+
shadow: 'offset-dark',
|
|
569
|
+
border_active: false,
|
|
570
|
+
border_width: 2,
|
|
571
|
+
border_color: '#000000',
|
|
572
|
+
productIds: ''
|
|
573
|
+
},
|
|
574
|
+
'loox-gallery-carousel-section': {
|
|
575
|
+
maxWidth: 1100,
|
|
576
|
+
borderRadius: 60,
|
|
577
|
+
itemsPerView: 5,
|
|
578
|
+
mobileItemsPerView: 1,
|
|
579
|
+
imageRatio: '1',
|
|
580
|
+
reviewerNameColor: '#ffffff',
|
|
581
|
+
starsColor: '#ffffff',
|
|
582
|
+
arrows_backgroundColor: '#FFFFFF',
|
|
583
|
+
arrows_iconColor: '#9A9A9A',
|
|
584
|
+
shadow: 'none',
|
|
585
|
+
border_active: false,
|
|
586
|
+
border_width: 2,
|
|
587
|
+
border_color: '#000000',
|
|
588
|
+
productIds: ''
|
|
589
|
+
},
|
|
590
|
+
'loox-referrals-section': {
|
|
591
|
+
max_width: 1100,
|
|
592
|
+
layout: 'with-photo',
|
|
593
|
+
primary_color: '',
|
|
594
|
+
text_color: '#000000',
|
|
595
|
+
text_field_border_color: '#C9CDD4',
|
|
596
|
+
background: ''
|
|
597
|
+
},
|
|
598
|
+
'loox-dynamic-section': {
|
|
599
|
+
only_photos: false,
|
|
600
|
+
aggregated: false,
|
|
601
|
+
limit: 20,
|
|
602
|
+
hide_thumbnails: false,
|
|
603
|
+
maxwidth: 1080,
|
|
604
|
+
is_sample: true
|
|
605
|
+
},
|
|
606
|
+
'loox-snippets-widget': {
|
|
607
|
+
alignment: 'left',
|
|
608
|
+
'max-width': '',
|
|
609
|
+
'color-scheme': 'default',
|
|
610
|
+
shadow: '',
|
|
611
|
+
'show-rating': true,
|
|
612
|
+
'show-image': true,
|
|
613
|
+
'hide-arrows-mobile': false,
|
|
614
|
+
'font-size': 14,
|
|
615
|
+
'show-border': false,
|
|
616
|
+
'border-radius': 16,
|
|
617
|
+
'background-color': '',
|
|
618
|
+
'text-color': '',
|
|
619
|
+
'name-color': '',
|
|
620
|
+
'rating-icon-color': '',
|
|
621
|
+
'border-color': '',
|
|
622
|
+
'shadow-color': '',
|
|
623
|
+
'reviews-limit': 10
|
|
624
|
+
},
|
|
625
|
+
'loox-rating': {
|
|
626
|
+
contentSize: 16,
|
|
627
|
+
pattern: '',
|
|
628
|
+
hideText: false,
|
|
629
|
+
alignment: '',
|
|
630
|
+
layout: '',
|
|
631
|
+
textColor: '',
|
|
632
|
+
starColor: '',
|
|
633
|
+
showAllReviews: false,
|
|
634
|
+
looxOpenFloatingWidget: false,
|
|
635
|
+
emptyRatingWidget: false
|
|
636
|
+
},
|
|
637
|
+
'loox-testimonial-carousel-section': {
|
|
638
|
+
maxWidth: 1100,
|
|
639
|
+
desktopFontSize: 32,
|
|
640
|
+
mobileFontSize: 20,
|
|
641
|
+
maxNumberOfCharacters: 100,
|
|
642
|
+
quoteMarkIcon: 'style-1',
|
|
643
|
+
reviewerNameColor: '#000000',
|
|
644
|
+
textColor: '#000000',
|
|
645
|
+
starsColor: '',
|
|
646
|
+
quotesIconColor: '#EAEAEA',
|
|
647
|
+
arrows_iconColor: '#000000',
|
|
648
|
+
arrows_hideOnMobile: true,
|
|
649
|
+
pagination_active: true,
|
|
650
|
+
pagination_selectedDotColor: '#000000',
|
|
651
|
+
pagination_dotColor: '#000000',
|
|
652
|
+
autoplay_active: false,
|
|
653
|
+
autoplay_duration: 2,
|
|
654
|
+
productIds: ''
|
|
655
|
+
},
|
|
656
|
+
'loox-trust-badge': {
|
|
657
|
+
layout: 'horizontal',
|
|
658
|
+
alignment: 'left',
|
|
659
|
+
'scheme-type': 'default',
|
|
660
|
+
'review-title': 'reviews',
|
|
661
|
+
'rating-icon': true,
|
|
662
|
+
'average-rating': true,
|
|
663
|
+
'loox-branding': true,
|
|
664
|
+
'review-count': true,
|
|
665
|
+
'open-reviews': true,
|
|
666
|
+
'show-border': true,
|
|
667
|
+
'border-radius': 8,
|
|
668
|
+
'font-size': 20,
|
|
669
|
+
'background-color': '',
|
|
670
|
+
'secondary-background-color': '',
|
|
671
|
+
'text-color': '',
|
|
672
|
+
'rating-icon-color': '',
|
|
673
|
+
'border-color': ''
|
|
674
|
+
},
|
|
675
|
+
'loox-video-slider': {
|
|
676
|
+
'show-by-tag': false,
|
|
677
|
+
layout: 'spotlight',
|
|
678
|
+
shadow: '',
|
|
679
|
+
'show-rating': true,
|
|
680
|
+
'show-reviewer-name': true,
|
|
681
|
+
'hide-arrows-mobile': true,
|
|
682
|
+
'auto-play': true,
|
|
683
|
+
'show-border': false,
|
|
684
|
+
'border-width': 1,
|
|
685
|
+
'border-radius': 16,
|
|
686
|
+
'text-color': '',
|
|
687
|
+
'rating-icon-color': '',
|
|
688
|
+
'border-color': '',
|
|
689
|
+
'play-button-color': '',
|
|
690
|
+
'shadow-color': '',
|
|
691
|
+
'product-id': ''
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
const SeoantTrustBadgesIcon = {
|
|
696
|
+
SeoantTrustBadgesIcon: {
|
|
697
|
+
star_rating: {
|
|
698
|
+
badge_id: null
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
const PowrContactFormBuilder = {
|
|
703
|
+
PowrContactFormBuilder: {
|
|
704
|
+
'app-block': {
|
|
705
|
+
app_id: ''
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
const MyappgurusProductReviews = {
|
|
710
|
+
MyappgurusProductReviews: {
|
|
711
|
+
allReviews: {
|
|
712
|
+
Show_by_label: ''
|
|
713
|
+
},
|
|
714
|
+
allReviewsCounter: {
|
|
715
|
+
out_of_label: '',
|
|
716
|
+
stars_based_on_label: '',
|
|
717
|
+
reviews_label: ''
|
|
718
|
+
},
|
|
719
|
+
form: {
|
|
720
|
+
block_heading: '',
|
|
721
|
+
no_rating: '',
|
|
722
|
+
subtitle2: '',
|
|
723
|
+
review_btn: '',
|
|
724
|
+
see_all_reviews_label: '',
|
|
725
|
+
form_heading: '',
|
|
726
|
+
name_label: '',
|
|
727
|
+
email_label: '',
|
|
728
|
+
review_title_label: '',
|
|
729
|
+
review_description_label: '',
|
|
730
|
+
ratings_label: '',
|
|
731
|
+
delivery_ratings_label: '',
|
|
732
|
+
payment_ratings_label: '',
|
|
733
|
+
price_ratings_label: '',
|
|
734
|
+
review_image_label: '',
|
|
735
|
+
submit_btn_label: '',
|
|
736
|
+
cancel_btn_label: '',
|
|
737
|
+
sort_label: '',
|
|
738
|
+
sort1_label: '',
|
|
739
|
+
sort2_label: '',
|
|
740
|
+
sort3_label: '',
|
|
741
|
+
showing_label: '',
|
|
742
|
+
to_label: '',
|
|
743
|
+
of_label: '',
|
|
744
|
+
results_label: ''
|
|
745
|
+
},
|
|
746
|
+
star: null
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
const TrustreviewsProductReviews = {
|
|
750
|
+
TrustreviewsProductReviews: {
|
|
751
|
+
questions_widget: {
|
|
752
|
+
product: '{{ product }}'
|
|
753
|
+
},
|
|
754
|
+
'review-carousel': null,
|
|
755
|
+
reviews_text_widget: null,
|
|
756
|
+
reviews_widget: {
|
|
757
|
+
product: '{{ product }}'
|
|
758
|
+
},
|
|
759
|
+
shop_reviews_widget: null,
|
|
760
|
+
star_rating: {
|
|
761
|
+
product: '{{product}}',
|
|
762
|
+
hide_on_no_reviews: false,
|
|
763
|
+
enable_jsonld: false,
|
|
764
|
+
starsize: 16,
|
|
765
|
+
addtional_text: ''
|
|
766
|
+
},
|
|
767
|
+
'reviews-testimonials': null,
|
|
768
|
+
all_reviews_widget: null,
|
|
769
|
+
'review-cards': null,
|
|
770
|
+
'review-gallery': null,
|
|
771
|
+
medals: null
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
const HulkProductOptions = {
|
|
775
|
+
HulkProductOptions: {
|
|
776
|
+
option_block: null
|
|
777
|
+
}
|
|
778
|
+
};
|
|
446
779
|
const composeSettingsByWidgetType = {
|
|
780
|
+
...HulkProductOptions,
|
|
781
|
+
...MyappgurusProductReviews,
|
|
782
|
+
...TrustreviewsProductReviews,
|
|
783
|
+
...PowrContactFormBuilder,
|
|
784
|
+
...SeoantTrustBadgesIcon,
|
|
785
|
+
...SegunoEmailMarketing,
|
|
786
|
+
...AftershipEmailMarketingsms,
|
|
787
|
+
...BestBuyFulfillment,
|
|
447
788
|
...GloboProductOptionsVariant,
|
|
448
789
|
...WishlistKing,
|
|
449
790
|
...LoloyalLoyaltyReferrals,
|
|
@@ -474,7 +815,9 @@ const composeSettingsByWidgetType = {
|
|
|
474
815
|
...YotpoReviews,
|
|
475
816
|
...BoldSubscriptions,
|
|
476
817
|
...Growave,
|
|
477
|
-
...KachingBundles
|
|
818
|
+
...KachingBundles,
|
|
819
|
+
...Trustoo,
|
|
820
|
+
...LooxReviews
|
|
478
821
|
};
|
|
479
822
|
|
|
480
823
|
exports.composeSettingsByWidgetType = composeSettingsByWidgetType;
|
|
@@ -33,7 +33,17 @@ const mapShopifyAppMeta = {
|
|
|
33
33
|
...appConfig.PowerfulContactFormBuilderConfig,
|
|
34
34
|
...appConfig.WishlistKingConfig,
|
|
35
35
|
...appConfig.GloboProductOptionsVariantConfig,
|
|
36
|
-
...appConfig.KachingBundlesConfig
|
|
36
|
+
...appConfig.KachingBundlesConfig,
|
|
37
|
+
...appConfig.BestBuyFulfillmentConfig,
|
|
38
|
+
...appConfig.AftershipEmailMarketingsmsConfig,
|
|
39
|
+
...appConfig.SegunoEmailMarketingConfig,
|
|
40
|
+
...appConfig.TrustooConfig,
|
|
41
|
+
...appConfig.LooxReviewsConfig,
|
|
42
|
+
...appConfig.SeoantTrustBadgesIconConfig,
|
|
43
|
+
...appConfig.PowrContactFormBuilderConfig,
|
|
44
|
+
...appConfig.MyappgurusProductReviewsConfig,
|
|
45
|
+
...appConfig.TrustreviewsProductReviewsConfig,
|
|
46
|
+
...appConfig.HulkProductOptionsConfig
|
|
37
47
|
};
|
|
38
48
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
39
49
|
|
|
@@ -4,9 +4,25 @@ var appSetting = require('./appSetting.js');
|
|
|
4
4
|
var getAppBlockType = require('./getAppBlockType.js');
|
|
5
5
|
|
|
6
6
|
const listAppUpdateNewVersion = [
|
|
7
|
-
'Growave'
|
|
7
|
+
'Growave',
|
|
8
|
+
'Trustoo',
|
|
9
|
+
'LooxReviews'
|
|
8
10
|
];
|
|
11
|
+
const listThirdPartyRejectAppBlock = {
|
|
12
|
+
YotpoReviews: {
|
|
13
|
+
conditionToReject: 'settings?.version === "v1"'
|
|
14
|
+
},
|
|
15
|
+
Trustoo: {
|
|
16
|
+
conditionToReject: 'settings?.version === "v1"'
|
|
17
|
+
},
|
|
18
|
+
LooxReviews: {
|
|
19
|
+
conditionToReject: 'settings?.version === "v1"'
|
|
20
|
+
}
|
|
21
|
+
};
|
|
9
22
|
const getAppBlockConfig = (tag, appBlockId, settings)=>{
|
|
23
|
+
if (listThirdPartyRejectAppBlock[tag] && eval(listThirdPartyRejectAppBlock[tag]?.conditionToReject ?? '')) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
10
26
|
let widgetType = settings?.widgetType;
|
|
11
27
|
if (listAppUpdateNewVersion.includes(tag)) {
|
|
12
28
|
widgetType = settings?.widgetTypeV2;
|
|
@@ -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;
|