@gem-sdk/core 1.57.15-staging.12 → 1.58.0-staging.12

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.
@@ -1,8 +1,10 @@
1
1
  'use strict';
2
2
 
3
+ var useSWR = require('swr');
3
4
  var getCollection = require('./queries/get-collection.js');
4
5
  var getProduct = require('./queries/get-product.js');
5
6
  var getProducts = require('./queries/get-products.js');
7
+ var query = require('./query.js');
6
8
 
7
9
  const prefetchQueries = (input, options)=>{
8
10
  const queries = [];
@@ -19,7 +21,7 @@ const prefetchQueries = (input, options)=>{
19
21
  isStorefront: options?.isStorefront
20
22
  };
21
23
  data = {
22
- key: `query/product/${variables.id}`,
24
+ key: useSWR.unstable_serialize(query.generateProductQueryKey(variables)),
23
25
  func: getProduct.getProduct,
24
26
  variables
25
27
  };
@@ -37,7 +39,7 @@ const prefetchQueries = (input, options)=>{
37
39
  isStorefront: options?.isStorefront
38
40
  };
39
41
  data = {
40
- key: `query/collection/${variables.id}`,
42
+ key: useSWR.unstable_serialize(query.generateCollectionQueryKey(variables)),
41
43
  func: getCollection.getCollection,
42
44
  variables
43
45
  };
@@ -50,7 +52,7 @@ const prefetchQueries = (input, options)=>{
50
52
  isStorefront: options?.isStorefront
51
53
  };
52
54
  data = {
53
- key: `query/products/${variables.ids.join(',')}`,
55
+ key: useSWR.unstable_serialize(query.generateProductsQueryKey(variables)),
54
56
  func: getProducts.getProducts,
55
57
  variables
56
58
  };
@@ -180,6 +180,12 @@ const GloboProductOptionsVariantConfig = {
180
180
  appId: 'fdc9fad5-1a0f-4bd4-9c8a-1af6a6eef6b8'
181
181
  }
182
182
  };
183
+ const KachingBundlesConfig = {
184
+ KachingBundles: {
185
+ appName: 'kaching-bundles',
186
+ appId: '6c637362-a106-4a32-94ac-94dcfd68cdb8'
187
+ }
188
+ };
183
189
 
184
190
  exports.AppointmentBookingCowlendarConfig = AppointmentBookingCowlendarConfig;
185
191
  exports.BoldSubscriptionsConfig = BoldSubscriptionsConfig;
@@ -191,6 +197,7 @@ exports.GloboProductOptionsVariantConfig = GloboProductOptionsVariantConfig;
191
197
  exports.GrowaveConfig = GrowaveConfig;
192
198
  exports.InstasellShoppableInstagramConfig = InstasellShoppableInstagramConfig;
193
199
  exports.JunipProductReviewsUgcConfig = JunipProductReviewsUgcConfig;
200
+ exports.KachingBundlesConfig = KachingBundlesConfig;
194
201
  exports.KiteFreeGiftDiscountConfig = KiteFreeGiftDiscountConfig;
195
202
  exports.LoloyalLoyaltyReferralsConfig = LoloyalLoyaltyReferralsConfig;
196
203
  exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
@@ -426,6 +426,13 @@ const PowerfulContactFormBuilder = {
426
426
  }
427
427
  }
428
428
  };
429
+ const KachingBundles = {
430
+ KachingBundles: {
431
+ 'app-block': {
432
+ product: '{{product}}'
433
+ }
434
+ }
435
+ };
429
436
  const WishlistKing = {
430
437
  WishlistKing: {
431
438
  'wishlist-button-block': null
@@ -466,7 +473,8 @@ const composeSettingsByWidgetType = {
466
473
  ...SelleasyWidget,
467
474
  ...YotpoReviews,
468
475
  ...BoldSubscriptions,
469
- ...Growave
476
+ ...Growave,
477
+ ...KachingBundles
470
478
  };
471
479
 
472
480
  exports.composeSettingsByWidgetType = composeSettingsByWidgetType;
@@ -32,7 +32,8 @@ const mapShopifyAppMeta = {
32
32
  ...appConfig.LoloyalLoyaltyReferralsConfig,
33
33
  ...appConfig.PowerfulContactFormBuilderConfig,
34
34
  ...appConfig.WishlistKingConfig,
35
- ...appConfig.GloboProductOptionsVariantConfig
35
+ ...appConfig.GloboProductOptionsVariantConfig,
36
+ ...appConfig.KachingBundlesConfig
36
37
  };
37
38
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
38
39
 
@@ -1,6 +1,8 @@
1
+ import { unstable_serialize } from 'swr';
1
2
  import { getCollection } from './queries/get-collection.js';
2
3
  import { getProduct } from './queries/get-product.js';
3
4
  import { getProducts } from './queries/get-products.js';
5
+ import { generateCollectionQueryKey, generateProductsQueryKey, generateProductQueryKey } from './query.js';
4
6
 
5
7
  const prefetchQueries = (input, options)=>{
6
8
  const queries = [];
@@ -17,7 +19,7 @@ const prefetchQueries = (input, options)=>{
17
19
  isStorefront: options?.isStorefront
18
20
  };
19
21
  data = {
20
- key: `query/product/${variables.id}`,
22
+ key: unstable_serialize(generateProductQueryKey(variables)),
21
23
  func: getProduct,
22
24
  variables
23
25
  };
@@ -35,7 +37,7 @@ const prefetchQueries = (input, options)=>{
35
37
  isStorefront: options?.isStorefront
36
38
  };
37
39
  data = {
38
- key: `query/collection/${variables.id}`,
40
+ key: unstable_serialize(generateCollectionQueryKey(variables)),
39
41
  func: getCollection,
40
42
  variables
41
43
  };
@@ -48,7 +50,7 @@ const prefetchQueries = (input, options)=>{
48
50
  isStorefront: options?.isStorefront
49
51
  };
50
52
  data = {
51
- key: `query/products/${variables.ids.join(',')}`,
53
+ key: unstable_serialize(generateProductsQueryKey(variables)),
52
54
  func: getProducts,
53
55
  variables
54
56
  };
@@ -178,5 +178,11 @@ const GloboProductOptionsVariantConfig = {
178
178
  appId: 'fdc9fad5-1a0f-4bd4-9c8a-1af6a6eef6b8'
179
179
  }
180
180
  };
181
+ const KachingBundlesConfig = {
182
+ KachingBundles: {
183
+ appName: 'kaching-bundles',
184
+ appId: '6c637362-a106-4a32-94ac-94dcfd68cdb8'
185
+ }
186
+ };
181
187
 
182
- export { AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloboProductOptionsVariantConfig, GrowaveConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, PowerfulContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
188
+ export { AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloboProductOptionsVariantConfig, GrowaveConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, PowerfulContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
@@ -424,6 +424,13 @@ const PowerfulContactFormBuilder = {
424
424
  }
425
425
  }
426
426
  };
427
+ const KachingBundles = {
428
+ KachingBundles: {
429
+ 'app-block': {
430
+ product: '{{product}}'
431
+ }
432
+ }
433
+ };
427
434
  const WishlistKing = {
428
435
  WishlistKing: {
429
436
  'wishlist-button-block': null
@@ -464,7 +471,8 @@ const composeSettingsByWidgetType = {
464
471
  ...SelleasyWidget,
465
472
  ...YotpoReviews,
466
473
  ...BoldSubscriptions,
467
- ...Growave
474
+ ...Growave,
475
+ ...KachingBundles
468
476
  };
469
477
 
470
478
  export { composeSettingsByWidgetType, overrideSettings };
@@ -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 } 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 } from './appConfig.js';
2
2
 
3
3
  const mapShopifyAppMeta = {
4
4
  ...RechargeSubscriptionsConfig,
@@ -30,7 +30,8 @@ const mapShopifyAppMeta = {
30
30
  ...LoloyalLoyaltyReferralsConfig,
31
31
  ...PowerfulContactFormBuilderConfig,
32
32
  ...WishlistKingConfig,
33
- ...GloboProductOptionsVariantConfig
33
+ ...GloboProductOptionsVariantConfig,
34
+ ...KachingBundlesConfig
34
35
  };
35
36
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
36
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.57.15-staging.12",
3
+ "version": "1.58.0-staging.12",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",