@gem-sdk/core 2.1.39 → 2.1.44
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/Render.liquid.js +3 -3
- package/dist/cjs/components/RenderCustomCode.js +2 -1
- package/dist/cjs/helpers/custom-cdoe.js +8 -0
- package/dist/cjs/helpers/third-party/appConfig.js +7 -0
- package/dist/cjs/helpers/third-party/appSetting.js +16 -1
- package/dist/cjs/helpers/third-party/constant.js +2 -1
- package/dist/esm/components/Render.liquid.js +3 -3
- package/dist/esm/components/RenderCustomCode.js +2 -1
- package/dist/esm/helpers/custom-cdoe.js +6 -0
- package/dist/esm/helpers/third-party/appConfig.js +7 -1
- package/dist/esm/helpers/third-party/appSetting.js +16 -1
- package/dist/esm/helpers/third-party/constant.js +3 -2
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ require('dayjs');
|
|
|
20
20
|
var composeAdvanceStyle = require('../helpers/compose-advance-style.js');
|
|
21
21
|
var convert = require('../helpers/convert.js');
|
|
22
22
|
var render = require('../helpers/render.js');
|
|
23
|
+
var customCdoe = require('../helpers/custom-cdoe.js');
|
|
23
24
|
|
|
24
25
|
const componentsRenderWithParentId = [
|
|
25
26
|
'CarouselItem'
|
|
@@ -206,7 +207,7 @@ const RenderCustomCode = (item)=>{
|
|
|
206
207
|
const { css, javascript, rootClassName } = item.advanced?.editorData || {};
|
|
207
208
|
const replacedCSS = css?.replaceAll(rootClassName, item.uid);
|
|
208
209
|
const replacedJS = javascript?.replaceAll(rootClassName, item.uid);
|
|
209
|
-
const cssCode = render.RenderIf(!!css, render.template`
|
|
210
|
+
const cssCode = render.RenderIf(!!css && customCdoe.hasNonEmptyCSSRules(replacedCSS), render.template`
|
|
210
211
|
<style id="${`custom-css-${item?.uid}`}">
|
|
211
212
|
${replacedCSS}
|
|
212
213
|
</style>
|
|
@@ -296,8 +297,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
296
297
|
if (codes?.length) {
|
|
297
298
|
let tempLiquid = '';
|
|
298
299
|
let fileIndex = 0;
|
|
299
|
-
for(
|
|
300
|
-
const code = codes[i];
|
|
300
|
+
for (const code of codes){
|
|
301
301
|
if (code) {
|
|
302
302
|
const textEncoder = new TextEncoder();
|
|
303
303
|
const newTempLiquid = tempLiquid + code;
|
|
@@ -19,6 +19,7 @@ require('@gem-sdk/adapter-shopify');
|
|
|
19
19
|
require('swr/mutation');
|
|
20
20
|
require('vanilla-lazyload');
|
|
21
21
|
require('../hooks/useCartUI.js');
|
|
22
|
+
var customCdoe = require('../helpers/custom-cdoe.js');
|
|
22
23
|
|
|
23
24
|
const RenderCustomCode = ({ uid, advanced })=>{
|
|
24
25
|
const mode = shop.useEditorMode();
|
|
@@ -41,7 +42,7 @@ const RenderCustomCode = ({ uid, advanced })=>{
|
|
|
41
42
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
42
43
|
children: [
|
|
43
44
|
/*#__PURE__*/ jsxRuntime.jsx(Head, {
|
|
44
|
-
children: !!css && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
45
|
+
children: !!css && customCdoe.hasNonEmptyCSSRules(replacedCSS) && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
45
46
|
id: mapId['css'],
|
|
46
47
|
dangerouslySetInnerHTML: {
|
|
47
48
|
__html: replacedCSS
|
|
@@ -336,6 +336,12 @@ const QikifyUpsellConfig = {
|
|
|
336
336
|
appId: '2e94b962-8172-4839-8ad9-7837eb8b017a'
|
|
337
337
|
}
|
|
338
338
|
};
|
|
339
|
+
const EcoboostifyShoppableReelUgcConfig = {
|
|
340
|
+
EcoboostifyShoppableReelUgc: {
|
|
341
|
+
appName: 'ecoboostify',
|
|
342
|
+
appId: '24110205-fc49-453b-ac2b-ceea2bf6a8f3'
|
|
343
|
+
}
|
|
344
|
+
};
|
|
339
345
|
|
|
340
346
|
exports.AftershipEmailMarketingsmsConfig = AftershipEmailMarketingsmsConfig;
|
|
341
347
|
exports.AppointmentBookingCowlendarConfig = AppointmentBookingCowlendarConfig;
|
|
@@ -345,6 +351,7 @@ exports.BoldSubscriptionsConfig = BoldSubscriptionsConfig;
|
|
|
345
351
|
exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
346
352
|
exports.BoostAISearchDiscoveryConfig = BoostAISearchDiscoveryConfig;
|
|
347
353
|
exports.EasyBundleBuilderSkailamaConfig = EasyBundleBuilderSkailamaConfig;
|
|
354
|
+
exports.EcoboostifyShoppableReelUgcConfig = EcoboostifyShoppableReelUgcConfig;
|
|
348
355
|
exports.EssentialAnnouncementBarConfig = EssentialAnnouncementBarConfig;
|
|
349
356
|
exports.EssentialCountdownTimerBarConfig = EssentialCountdownTimerBarConfig;
|
|
350
357
|
exports.EstimatedDeliveryDatePlusConfig = EstimatedDeliveryDatePlusConfig;
|
|
@@ -271,6 +271,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
271
271
|
product: appSetting?.['productHandle'] || '{{ product }}'
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
+
case 'EcoboostifyShoppableReelUgc':
|
|
275
|
+
{
|
|
276
|
+
return {
|
|
277
|
+
...currentSetting,
|
|
278
|
+
playlist_id: appSetting?.['playlistId']
|
|
279
|
+
};
|
|
280
|
+
}
|
|
274
281
|
default:
|
|
275
282
|
return currentSetting;
|
|
276
283
|
}
|
|
@@ -1207,6 +1214,13 @@ const QikifyUpsell = {
|
|
|
1207
1214
|
}
|
|
1208
1215
|
}
|
|
1209
1216
|
};
|
|
1217
|
+
const EcoboostifyShoppableReelUgc = {
|
|
1218
|
+
EcoboostifyShoppableReelUgc: {
|
|
1219
|
+
'reel-playlist': {
|
|
1220
|
+
playlist_id: ''
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1210
1224
|
const composeSettingsByWidgetType = {
|
|
1211
1225
|
...HextomCountdownTimerBar,
|
|
1212
1226
|
...EstimatedDeliveryDatePlus,
|
|
@@ -1263,7 +1277,8 @@ const composeSettingsByWidgetType = {
|
|
|
1263
1277
|
...BfSizeChartSizeGuide,
|
|
1264
1278
|
...HextomFreeShippingBar,
|
|
1265
1279
|
...ShopifySubscriptions,
|
|
1266
|
-
...QikifyUpsell
|
|
1280
|
+
...QikifyUpsell,
|
|
1281
|
+
...EcoboostifyShoppableReelUgc
|
|
1267
1282
|
};
|
|
1268
1283
|
|
|
1269
1284
|
exports.composeSettingsByWidgetType = composeSettingsByWidgetType;
|
|
@@ -58,7 +58,8 @@ const mapShopifyAppMeta = {
|
|
|
58
58
|
...appConfig.BfSizeChartSizeGuideConfig,
|
|
59
59
|
...appConfig.HextomFreeShippingBarConfig,
|
|
60
60
|
...appConfig.ShopifySubscriptionsConfig,
|
|
61
|
-
...appConfig.QikifyUpsellConfig
|
|
61
|
+
...appConfig.QikifyUpsellConfig,
|
|
62
|
+
...appConfig.EcoboostifyShoppableReelUgcConfig
|
|
62
63
|
};
|
|
63
64
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
64
65
|
|
|
@@ -16,6 +16,7 @@ import 'dayjs';
|
|
|
16
16
|
import { composeAdvanceStyle } from '../helpers/compose-advance-style.js';
|
|
17
17
|
import { baseAssetURL, isLocalEnv } from '../helpers/convert.js';
|
|
18
18
|
import { RenderIf, template } from '../helpers/render.js';
|
|
19
|
+
import { hasNonEmptyCSSRules } from '../helpers/custom-cdoe.js';
|
|
19
20
|
|
|
20
21
|
const componentsRenderWithParentId = [
|
|
21
22
|
'CarouselItem'
|
|
@@ -202,7 +203,7 @@ const RenderCustomCode = (item)=>{
|
|
|
202
203
|
const { css, javascript, rootClassName } = item.advanced?.editorData || {};
|
|
203
204
|
const replacedCSS = css?.replaceAll(rootClassName, item.uid);
|
|
204
205
|
const replacedJS = javascript?.replaceAll(rootClassName, item.uid);
|
|
205
|
-
const cssCode = RenderIf(!!css, template`
|
|
206
|
+
const cssCode = RenderIf(!!css && hasNonEmptyCSSRules(replacedCSS), template`
|
|
206
207
|
<style id="${`custom-css-${item?.uid}`}">
|
|
207
208
|
${replacedCSS}
|
|
208
209
|
</style>
|
|
@@ -292,8 +293,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
292
293
|
if (codes?.length) {
|
|
293
294
|
let tempLiquid = '';
|
|
294
295
|
let fileIndex = 0;
|
|
295
|
-
for(
|
|
296
|
-
const code = codes[i];
|
|
296
|
+
for (const code of codes){
|
|
297
297
|
if (code) {
|
|
298
298
|
const textEncoder = new TextEncoder();
|
|
299
299
|
const newTempLiquid = tempLiquid + code;
|
|
@@ -15,6 +15,7 @@ import '@gem-sdk/adapter-shopify';
|
|
|
15
15
|
import 'swr/mutation';
|
|
16
16
|
import 'vanilla-lazyload';
|
|
17
17
|
import '../hooks/useCartUI.js';
|
|
18
|
+
import { hasNonEmptyCSSRules } from '../helpers/custom-cdoe.js';
|
|
18
19
|
|
|
19
20
|
const RenderCustomCode = ({ uid, advanced })=>{
|
|
20
21
|
const mode = useEditorMode();
|
|
@@ -37,7 +38,7 @@ const RenderCustomCode = ({ uid, advanced })=>{
|
|
|
37
38
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
38
39
|
children: [
|
|
39
40
|
/*#__PURE__*/ jsx(Head, {
|
|
40
|
-
children: !!css && /*#__PURE__*/ jsx("style", {
|
|
41
|
+
children: !!css && hasNonEmptyCSSRules(replacedCSS) && /*#__PURE__*/ jsx("style", {
|
|
41
42
|
id: mapId['css'],
|
|
42
43
|
dangerouslySetInnerHTML: {
|
|
43
44
|
__html: replacedCSS
|
|
@@ -334,5 +334,11 @@ const QikifyUpsellConfig = {
|
|
|
334
334
|
appId: '2e94b962-8172-4839-8ad9-7837eb8b017a'
|
|
335
335
|
}
|
|
336
336
|
};
|
|
337
|
+
const EcoboostifyShoppableReelUgcConfig = {
|
|
338
|
+
EcoboostifyShoppableReelUgc: {
|
|
339
|
+
appName: 'ecoboostify',
|
|
340
|
+
appId: '24110205-fc49-453b-ac2b-ceea2bf6a8f3'
|
|
341
|
+
}
|
|
342
|
+
};
|
|
337
343
|
|
|
338
|
-
export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BfSizeChartSizeGuideConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, BoostAISearchDiscoveryConfig, EasyBundleBuilderSkailamaConfig, EssentialAnnouncementBarConfig, EssentialCountdownTimerBarConfig, EstimatedDeliveryDatePlusConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloColorSwatchvariantImageConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HextomCountdownTimerBarConfig, HextomFreeShippingBarConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, OkendoReviewsLoyaltyConfig, PowerfulContactFormBuilderConfig, PowrContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, QikifyUpsellConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, ShopifySubscriptionsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
|
|
344
|
+
export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BfSizeChartSizeGuideConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, BoostAISearchDiscoveryConfig, EasyBundleBuilderSkailamaConfig, EcoboostifyShoppableReelUgcConfig, EssentialAnnouncementBarConfig, EssentialCountdownTimerBarConfig, EstimatedDeliveryDatePlusConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloColorSwatchvariantImageConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HextomCountdownTimerBarConfig, HextomFreeShippingBarConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, OkendoReviewsLoyaltyConfig, PowerfulContactFormBuilderConfig, PowrContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, QikifyUpsellConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, ShopifySubscriptionsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
|
|
@@ -269,6 +269,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
269
269
|
product: appSetting?.['productHandle'] || '{{ product }}'
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
+
case 'EcoboostifyShoppableReelUgc':
|
|
273
|
+
{
|
|
274
|
+
return {
|
|
275
|
+
...currentSetting,
|
|
276
|
+
playlist_id: appSetting?.['playlistId']
|
|
277
|
+
};
|
|
278
|
+
}
|
|
272
279
|
default:
|
|
273
280
|
return currentSetting;
|
|
274
281
|
}
|
|
@@ -1205,6 +1212,13 @@ const QikifyUpsell = {
|
|
|
1205
1212
|
}
|
|
1206
1213
|
}
|
|
1207
1214
|
};
|
|
1215
|
+
const EcoboostifyShoppableReelUgc = {
|
|
1216
|
+
EcoboostifyShoppableReelUgc: {
|
|
1217
|
+
'reel-playlist': {
|
|
1218
|
+
playlist_id: ''
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
};
|
|
1208
1222
|
const composeSettingsByWidgetType = {
|
|
1209
1223
|
...HextomCountdownTimerBar,
|
|
1210
1224
|
...EstimatedDeliveryDatePlus,
|
|
@@ -1261,7 +1275,8 @@ const composeSettingsByWidgetType = {
|
|
|
1261
1275
|
...BfSizeChartSizeGuide,
|
|
1262
1276
|
...HextomFreeShippingBar,
|
|
1263
1277
|
...ShopifySubscriptions,
|
|
1264
|
-
...QikifyUpsell
|
|
1278
|
+
...QikifyUpsell,
|
|
1279
|
+
...EcoboostifyShoppableReelUgc
|
|
1265
1280
|
};
|
|
1266
1281
|
|
|
1267
1282
|
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, KachingBundlesConfig, TrustooConfig, LooxReviewsConfig, PowrContactFormBuilderConfig, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, SeoantTrustBadgesIconConfig, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig, BoostAISearchDiscoveryConfig, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig, OkendoReviewsLoyaltyConfig, EstimatedDeliveryDatePlusConfig, HextomCountdownTimerBarConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, GloColorSwatchvariantImageConfig, BfSizeChartSizeGuideConfig, HextomFreeShippingBarConfig, ShopifySubscriptionsConfig, QikifyUpsellConfig } 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, TrustooConfig, LooxReviewsConfig, PowrContactFormBuilderConfig, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, SeoantTrustBadgesIconConfig, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig, BoostAISearchDiscoveryConfig, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig, OkendoReviewsLoyaltyConfig, EstimatedDeliveryDatePlusConfig, HextomCountdownTimerBarConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, GloColorSwatchvariantImageConfig, BfSizeChartSizeGuideConfig, HextomFreeShippingBarConfig, ShopifySubscriptionsConfig, QikifyUpsellConfig, EcoboostifyShoppableReelUgcConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -56,7 +56,8 @@ const mapShopifyAppMeta = {
|
|
|
56
56
|
...BfSizeChartSizeGuideConfig,
|
|
57
57
|
...HextomFreeShippingBarConfig,
|
|
58
58
|
...ShopifySubscriptionsConfig,
|
|
59
|
-
...QikifyUpsellConfig
|
|
59
|
+
...QikifyUpsellConfig,
|
|
60
|
+
...EcoboostifyShoppableReelUgcConfig
|
|
60
61
|
};
|
|
61
62
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
62
63
|
|