@gem-sdk/core 2.0.0-staging.160 → 2.0.0-staging.165

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.
@@ -100,9 +100,11 @@ const ComponentToolbarPreview = (props)=>{
100
100
  return;
101
101
  }
102
102
  };
103
- const getSectionNumber = ()=>{
103
+ const getSectionNumber = react.useCallback(()=>{
104
104
  return root?.childrens?.length || 0;
105
- };
105
+ }, [
106
+ root?.childrens?.length
107
+ ]);
106
108
  const getDeleteTooltipPosition = react.useCallback(()=>{
107
109
  if (props.tag == 'Section') return 'bottom';
108
110
  const $toolbar = document.body.querySelector('#storefront')?.querySelector('[data-toolbar-active="true"]');
@@ -57,6 +57,7 @@ const useInteraction = ()=>{
57
57
  element.dispatchEvent(eventDispatch);
58
58
  };
59
59
  const saveToElementInteractionData = (element, key, value)=>{
60
+ if (!element) return;
60
61
  const interactionData = element.getAttribute('gp-data-interaction');
61
62
  const interactionDataJson = JSON.parse(interactionData || '{}');
62
63
  element.setAttribute('gp-data-interaction', JSON.stringify({
@@ -264,6 +264,18 @@ const EssentialAnnouncementBarConfig = {
264
264
  appId: '93b5429f-c8d6-4c33-ae14-250fd84f361b'
265
265
  }
266
266
  };
267
+ const OkendoReviewsLoyaltyConfig = {
268
+ OkendoReviewsLoyalty: {
269
+ appName: 'okendo',
270
+ appId: 'bb689e69-ea70-4661-8fb7-ad24a2e23c29'
271
+ }
272
+ };
273
+ const EstimatedDeliveryDatePlusConfig = {
274
+ EstimatedDeliveryDatePlus: {
275
+ appName: 'estimated-delivery-date-plus',
276
+ appId: '4a0685bc-c234-45b2-8382-5ad6a8e3e3fd'
277
+ }
278
+ };
267
279
 
268
280
  exports.AftershipEmailMarketingsmsConfig = AftershipEmailMarketingsmsConfig;
269
281
  exports.AppointmentBookingCowlendarConfig = AppointmentBookingCowlendarConfig;
@@ -273,6 +285,7 @@ exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
273
285
  exports.EasyBundleBuilderSkailamaConfig = EasyBundleBuilderSkailamaConfig;
274
286
  exports.EssentialAnnouncementBarConfig = EssentialAnnouncementBarConfig;
275
287
  exports.EssentialCountdownTimerBarConfig = EssentialCountdownTimerBarConfig;
288
+ exports.EstimatedDeliveryDatePlusConfig = EstimatedDeliveryDatePlusConfig;
276
289
  exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
277
290
  exports.FlyBundlesUpsellsFbtConfig = FlyBundlesUpsellsFbtConfig;
278
291
  exports.GloboProductOptionsVariantConfig = GloboProductOptionsVariantConfig;
@@ -286,6 +299,7 @@ exports.LoloyalLoyaltyReferralsConfig = LoloyalLoyaltyReferralsConfig;
286
299
  exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
287
300
  exports.LooxReviewsConfig = LooxReviewsConfig;
288
301
  exports.MyappgurusProductReviewsConfig = MyappgurusProductReviewsConfig;
302
+ exports.OkendoReviewsLoyaltyConfig = OkendoReviewsLoyaltyConfig;
289
303
  exports.PowerfulContactFormBuilderConfig = PowerfulContactFormBuilderConfig;
290
304
  exports.PreorderNowPreOrderPqConfig = PreorderNowPreOrderPqConfig;
291
305
  exports.PreorderNowWodPresaleConfig = PreorderNowWodPresaleConfig;
@@ -204,6 +204,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
204
204
  id: appSetting?.announcementId
205
205
  };
206
206
  }
207
+ case 'OkendoReviewsLoyalty':
208
+ {
209
+ return {
210
+ ...currentSetting,
211
+ product: appSetting?.['productHandle'] || '{{ product }}'
212
+ };
213
+ }
207
214
  default:
208
215
  return currentSetting;
209
216
  }
@@ -1015,7 +1022,43 @@ const EssentialAnnouncementBar = {
1015
1022
  }
1016
1023
  }
1017
1024
  };
1025
+ const OkendoReviewsLoyalty = {
1026
+ OkendoReviewsLoyalty: {
1027
+ 'reviews-widget': {
1028
+ product: '{{product}}',
1029
+ widget_type: 'reviews_widget'
1030
+ },
1031
+ 'reviews-badge': {
1032
+ horizontal_alignment: 'center'
1033
+ },
1034
+ 'media-carousel': {
1035
+ product: '{{product}}'
1036
+ },
1037
+ 'media-grid': {
1038
+ product: '{{product}}'
1039
+ },
1040
+ 'reviews-carousel': {
1041
+ show_heading: false,
1042
+ heading: '',
1043
+ badge_link: '',
1044
+ product: '{{product}}'
1045
+ },
1046
+ 'star-rating': {
1047
+ product: '{{product}}'
1048
+ },
1049
+ 'questions-widget': {
1050
+ product: '{{product}}'
1051
+ }
1052
+ }
1053
+ };
1054
+ const EstimatedDeliveryDatePlus = {
1055
+ EstimatedDeliveryDatePlus: {
1056
+ delivery_coder_theme: null
1057
+ }
1058
+ };
1018
1059
  const composeSettingsByWidgetType = {
1060
+ ...EstimatedDeliveryDatePlus,
1061
+ ...OkendoReviewsLoyalty,
1019
1062
  ...EssentialAnnouncementBar,
1020
1063
  ...EssentialCountdownTimerBar,
1021
1064
  ...Stamped,
@@ -46,7 +46,9 @@ const mapShopifyAppMeta = {
46
46
  ...appConfig.TrustshopProductReviewsConfig,
47
47
  ...appConfig.StampedConfig,
48
48
  ...appConfig.EssentialCountdownTimerBarConfig,
49
- ...appConfig.EssentialAnnouncementBarConfig
49
+ ...appConfig.EssentialAnnouncementBarConfig,
50
+ ...appConfig.OkendoReviewsLoyaltyConfig,
51
+ ...appConfig.EstimatedDeliveryDatePlusConfig
50
52
  };
51
53
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
52
54
 
@@ -96,9 +96,11 @@ const ComponentToolbarPreview = (props)=>{
96
96
  return;
97
97
  }
98
98
  };
99
- const getSectionNumber = ()=>{
99
+ const getSectionNumber = useCallback(()=>{
100
100
  return root?.childrens?.length || 0;
101
- };
101
+ }, [
102
+ root?.childrens?.length
103
+ ]);
102
104
  const getDeleteTooltipPosition = useCallback(()=>{
103
105
  if (props.tag == 'Section') return 'bottom';
104
106
  const $toolbar = document.body.querySelector('#storefront')?.querySelector('[data-toolbar-active="true"]');
@@ -55,6 +55,7 @@ const useInteraction = ()=>{
55
55
  element.dispatchEvent(eventDispatch);
56
56
  };
57
57
  const saveToElementInteractionData = (element, key, value)=>{
58
+ if (!element) return;
58
59
  const interactionData = element.getAttribute('gp-data-interaction');
59
60
  const interactionDataJson = JSON.parse(interactionData || '{}');
60
61
  element.setAttribute('gp-data-interaction', JSON.stringify({
@@ -262,5 +262,17 @@ const EssentialAnnouncementBarConfig = {
262
262
  appId: '93b5429f-c8d6-4c33-ae14-250fd84f361b'
263
263
  }
264
264
  };
265
+ const OkendoReviewsLoyaltyConfig = {
266
+ OkendoReviewsLoyalty: {
267
+ appName: 'okendo',
268
+ appId: 'bb689e69-ea70-4661-8fb7-ad24a2e23c29'
269
+ }
270
+ };
271
+ const EstimatedDeliveryDatePlusConfig = {
272
+ EstimatedDeliveryDatePlus: {
273
+ appName: 'estimated-delivery-date-plus',
274
+ appId: '4a0685bc-c234-45b2-8382-5ad6a8e3e3fd'
275
+ }
276
+ };
265
277
 
266
- export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, EssentialAnnouncementBarConfig, EssentialCountdownTimerBarConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, PowerfulContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
278
+ export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, EssentialAnnouncementBarConfig, EssentialCountdownTimerBarConfig, EstimatedDeliveryDatePlusConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, OkendoReviewsLoyaltyConfig, PowerfulContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
@@ -202,6 +202,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
202
202
  id: appSetting?.announcementId
203
203
  };
204
204
  }
205
+ case 'OkendoReviewsLoyalty':
206
+ {
207
+ return {
208
+ ...currentSetting,
209
+ product: appSetting?.['productHandle'] || '{{ product }}'
210
+ };
211
+ }
205
212
  default:
206
213
  return currentSetting;
207
214
  }
@@ -1013,7 +1020,43 @@ const EssentialAnnouncementBar = {
1013
1020
  }
1014
1021
  }
1015
1022
  };
1023
+ const OkendoReviewsLoyalty = {
1024
+ OkendoReviewsLoyalty: {
1025
+ 'reviews-widget': {
1026
+ product: '{{product}}',
1027
+ widget_type: 'reviews_widget'
1028
+ },
1029
+ 'reviews-badge': {
1030
+ horizontal_alignment: 'center'
1031
+ },
1032
+ 'media-carousel': {
1033
+ product: '{{product}}'
1034
+ },
1035
+ 'media-grid': {
1036
+ product: '{{product}}'
1037
+ },
1038
+ 'reviews-carousel': {
1039
+ show_heading: false,
1040
+ heading: '',
1041
+ badge_link: '',
1042
+ product: '{{product}}'
1043
+ },
1044
+ 'star-rating': {
1045
+ product: '{{product}}'
1046
+ },
1047
+ 'questions-widget': {
1048
+ product: '{{product}}'
1049
+ }
1050
+ }
1051
+ };
1052
+ const EstimatedDeliveryDatePlus = {
1053
+ EstimatedDeliveryDatePlus: {
1054
+ delivery_coder_theme: null
1055
+ }
1056
+ };
1016
1057
  const composeSettingsByWidgetType = {
1058
+ ...EstimatedDeliveryDatePlus,
1059
+ ...OkendoReviewsLoyalty,
1017
1060
  ...EssentialAnnouncementBar,
1018
1061
  ...EssentialCountdownTimerBar,
1019
1062
  ...Stamped,
@@ -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, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, TrustooConfig, LooxReviewsConfig, SeoantTrustBadgesIconConfig, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig } 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, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig, OkendoReviewsLoyaltyConfig, EstimatedDeliveryDatePlusConfig } from './appConfig.js';
2
2
 
3
3
  const mapShopifyAppMeta = {
4
4
  ...RechargeSubscriptionsConfig,
@@ -44,7 +44,9 @@ const mapShopifyAppMeta = {
44
44
  ...TrustshopProductReviewsConfig,
45
45
  ...StampedConfig,
46
46
  ...EssentialCountdownTimerBarConfig,
47
- ...EssentialAnnouncementBarConfig
47
+ ...EssentialAnnouncementBarConfig,
48
+ ...OkendoReviewsLoyaltyConfig,
49
+ ...EstimatedDeliveryDatePlusConfig
48
50
  };
49
51
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
50
52
 
@@ -45010,7 +45010,7 @@ declare const useInteraction: () => {
45010
45010
  onListener: ({ event, selector, elementRef, }: {
45011
45011
  event: string;
45012
45012
  selector: string;
45013
- elementRef?: React.MutableRefObject<HTMLElement> | undefined;
45013
+ elementRef?: React.MutableRefObject<HTMLElement | undefined> | undefined;
45014
45014
  }, callback: (data: any) => void) => (() => void) | undefined;
45015
45015
  trigger: ({ event, data, selector, element: elementParam, }: {
45016
45016
  event: string;
@@ -45018,7 +45018,7 @@ declare const useInteraction: () => {
45018
45018
  selector: string;
45019
45019
  element?: HTMLElement | undefined;
45020
45020
  }) => void;
45021
- saveToElementInteractionData: (element: HTMLElement, key: string, value: string) => void;
45021
+ saveToElementInteractionData: (element: HTMLElement | undefined, key: string, value: string) => void;
45022
45022
  closeSelectOnPage: () => void;
45023
45023
  ref: React.MutableRefObject<any>;
45024
45024
  findElementIncludingSelf: (element: any, selector: string) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "2.0.0-staging.160",
3
+ "version": "2.0.0-staging.165",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",