@gem-sdk/core 2.1.13-staging.1 → 2.1.13-staging.16
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 +12 -10
- package/dist/cjs/helpers/third-party/appConfig.js +56 -0
- package/dist/cjs/helpers/third-party/appSetting.js +111 -1
- package/dist/cjs/helpers/third-party/constant.js +9 -1
- package/dist/esm/components/Render.liquid.js +12 -10
- package/dist/esm/helpers/third-party/appConfig.js +49 -1
- package/dist/esm/helpers/third-party/appSetting.js +111 -1
- package/dist/esm/helpers/third-party/constant.js +10 -2
- package/dist/types/index.d.ts +3 -2
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ const componentUsingAdvanced = [
|
|
|
36
36
|
'IconList',
|
|
37
37
|
'ProductVariants'
|
|
38
38
|
];
|
|
39
|
-
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext,
|
|
39
|
+
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, enableLazyLoadImage, ...passProps })=>{
|
|
40
40
|
const item = builder[uid];
|
|
41
41
|
const Component = components[item?.tag];
|
|
42
42
|
if (!Component) {
|
|
@@ -75,7 +75,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
75
75
|
advanced: item.advanced,
|
|
76
76
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
77
77
|
pageContext,
|
|
78
|
-
|
|
78
|
+
enableLazyLoadImage,
|
|
79
79
|
...passProps,
|
|
80
80
|
builderAttrs: {
|
|
81
81
|
...passProps.builderAttrs
|
|
@@ -88,7 +88,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
88
88
|
components,
|
|
89
89
|
customProps,
|
|
90
90
|
pageContext,
|
|
91
|
-
|
|
91
|
+
enableLazyLoadImage
|
|
92
92
|
};
|
|
93
93
|
}),
|
|
94
94
|
children: !constant.customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -101,7 +101,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
101
101
|
customProps,
|
|
102
102
|
parentTag: item.tag,
|
|
103
103
|
pageContext,
|
|
104
|
-
|
|
104
|
+
enableLazyLoadImage
|
|
105
105
|
}))) : ''
|
|
106
106
|
});
|
|
107
107
|
}, ()=>{
|
|
@@ -117,7 +117,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
117
117
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
118
118
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
119
119
|
pageContext,
|
|
120
|
-
|
|
120
|
+
enableLazyLoadImage,
|
|
121
121
|
...passProps,
|
|
122
122
|
builderAttrs: {
|
|
123
123
|
...passProps.builderAttrs
|
|
@@ -139,7 +139,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
139
139
|
cssClass: item?.advanced?.cssClass
|
|
140
140
|
},
|
|
141
141
|
pageContext,
|
|
142
|
-
|
|
142
|
+
enableLazyLoadImage,
|
|
143
143
|
...passProps,
|
|
144
144
|
builderAttrs: {
|
|
145
145
|
...passProps.builderAttrs
|
|
@@ -152,7 +152,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
152
152
|
components,
|
|
153
153
|
customProps,
|
|
154
154
|
pageContext,
|
|
155
|
-
|
|
155
|
+
enableLazyLoadImage
|
|
156
156
|
};
|
|
157
157
|
}),
|
|
158
158
|
children: !constant.customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -165,7 +165,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
165
165
|
customProps,
|
|
166
166
|
parentTag: item.tag,
|
|
167
167
|
pageContext,
|
|
168
|
-
|
|
168
|
+
enableLazyLoadImage
|
|
169
169
|
}))) : ''
|
|
170
170
|
});
|
|
171
171
|
}, ()=>{
|
|
@@ -181,7 +181,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
181
181
|
cssClass: item?.advanced?.cssClass
|
|
182
182
|
},
|
|
183
183
|
pageContext,
|
|
184
|
-
|
|
184
|
+
enableLazyLoadImage,
|
|
185
185
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
186
186
|
style: componentIconList.includes(item.tag) ? style : null,
|
|
187
187
|
...passProps,
|
|
@@ -294,6 +294,8 @@ const RenderChildren = (props)=>{
|
|
|
294
294
|
const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
295
295
|
let liquid = '';
|
|
296
296
|
if (codes?.length) {
|
|
297
|
+
// Limit each child item of an element (e.g., marquee, ...) to ensure the total element size does not exceed 256KB.
|
|
298
|
+
const itemMaxSize = 200 / codes.length;
|
|
297
299
|
for(let i = 0; i < codes.length; i++){
|
|
298
300
|
const code = codes[i];
|
|
299
301
|
if (code) {
|
|
@@ -301,7 +303,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
301
303
|
// Fix limit 256kb
|
|
302
304
|
const textEncoder = new TextEncoder();
|
|
303
305
|
const size = newLiquid ? textEncoder.encode(newLiquid).length : 0;
|
|
304
|
-
if (Math.ceil(size / 1024) >=
|
|
306
|
+
if (Math.ceil(size / 1024) >= itemMaxSize) {
|
|
305
307
|
const fileName = `gp-section-snippet-${uid + i}`;
|
|
306
308
|
customProps.extraFiles[fileName] = code;
|
|
307
309
|
liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant, form: form %}`;
|
|
@@ -258,6 +258,30 @@ const StampedConfig = {
|
|
|
258
258
|
appId: 'a103faaf-2125-4b0e-89fa-de5149736723'
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
+
const EssentialCountdownTimerBarConfig = {
|
|
262
|
+
EssentialCountdownTimerBar: {
|
|
263
|
+
appName: 'essential-countdown',
|
|
264
|
+
appId: '722378e8-5a70-4eae-aa89-9e44e8e9f6de'
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const EssentialAnnouncementBarConfig = {
|
|
268
|
+
EssentialAnnouncementBar: {
|
|
269
|
+
appName: 'essential-announcement',
|
|
270
|
+
appId: '93b5429f-c8d6-4c33-ae14-250fd84f361b'
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const OkendoReviewsLoyaltyConfig = {
|
|
274
|
+
OkendoReviewsLoyalty: {
|
|
275
|
+
appName: 'okendo',
|
|
276
|
+
appId: 'bb689e69-ea70-4661-8fb7-ad24a2e23c29'
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
const EstimatedDeliveryDatePlusConfig = {
|
|
280
|
+
EstimatedDeliveryDatePlus: {
|
|
281
|
+
appName: 'estimated-delivery-date-plus',
|
|
282
|
+
appId: '4a0685bc-c234-45b2-8382-5ad6a8e3e3fd'
|
|
283
|
+
}
|
|
284
|
+
};
|
|
261
285
|
const HextomCountdownTimerBarConfig = {
|
|
262
286
|
HextomCountdownTimerBar: {
|
|
263
287
|
appName: 'hextom-shipping-bar',
|
|
@@ -270,18 +294,48 @@ const TrustBadgesBearConfig = {
|
|
|
270
294
|
appId: '163a9b59-0ec2-4cb7-bf5c-31408b4a9420'
|
|
271
295
|
}
|
|
272
296
|
};
|
|
297
|
+
const TrustedsiteTrustBadgesConfig = {
|
|
298
|
+
TrustedsiteTrustBadges: {
|
|
299
|
+
appName: 'trustedsite-trust-badges',
|
|
300
|
+
appId: '3b73cc66-a9ae-4fcb-8ffb-743993d42e56'
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
const GloColorSwatchvariantImageConfig = {
|
|
304
|
+
GloColorSwatchvariantImage: {
|
|
305
|
+
appName: 'glo-color-swatch',
|
|
306
|
+
appId: '4394f710-096c-4021-bbde-8ebb26057c11'
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
const BfSizeChartSizeGuideConfig = {
|
|
310
|
+
BfSizeChartSizeGuide: {
|
|
311
|
+
appName: 'bf-size-charts',
|
|
312
|
+
appId: '47ee4f2e-eb5e-41af-9beb-e2786646bf2a'
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
const HextomFreeShippingBarConfig = {
|
|
316
|
+
HextomFreeShippingBar: {
|
|
317
|
+
appName: 'hextom-shipping-bar',
|
|
318
|
+
appId: '7ef5d9af-75a2-45c7-9b1b-f9240ee488e9'
|
|
319
|
+
}
|
|
320
|
+
};
|
|
273
321
|
|
|
274
322
|
exports.AftershipEmailMarketingsmsConfig = AftershipEmailMarketingsmsConfig;
|
|
275
323
|
exports.AppointmentBookingCowlendarConfig = AppointmentBookingCowlendarConfig;
|
|
276
324
|
exports.BestBuyFulfillmentConfig = BestBuyFulfillmentConfig;
|
|
325
|
+
exports.BfSizeChartSizeGuideConfig = BfSizeChartSizeGuideConfig;
|
|
277
326
|
exports.BoldSubscriptionsConfig = BoldSubscriptionsConfig;
|
|
278
327
|
exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
279
328
|
exports.EasyBundleBuilderSkailamaConfig = EasyBundleBuilderSkailamaConfig;
|
|
329
|
+
exports.EssentialAnnouncementBarConfig = EssentialAnnouncementBarConfig;
|
|
330
|
+
exports.EssentialCountdownTimerBarConfig = EssentialCountdownTimerBarConfig;
|
|
331
|
+
exports.EstimatedDeliveryDatePlusConfig = EstimatedDeliveryDatePlusConfig;
|
|
280
332
|
exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
|
|
281
333
|
exports.FlyBundlesUpsellsFbtConfig = FlyBundlesUpsellsFbtConfig;
|
|
334
|
+
exports.GloColorSwatchvariantImageConfig = GloColorSwatchvariantImageConfig;
|
|
282
335
|
exports.GloboProductOptionsVariantConfig = GloboProductOptionsVariantConfig;
|
|
283
336
|
exports.GrowaveConfig = GrowaveConfig;
|
|
284
337
|
exports.HextomCountdownTimerBarConfig = HextomCountdownTimerBarConfig;
|
|
338
|
+
exports.HextomFreeShippingBarConfig = HextomFreeShippingBarConfig;
|
|
285
339
|
exports.HulkProductOptionsConfig = HulkProductOptionsConfig;
|
|
286
340
|
exports.InstasellShoppableInstagramConfig = InstasellShoppableInstagramConfig;
|
|
287
341
|
exports.JunipProductReviewsUgcConfig = JunipProductReviewsUgcConfig;
|
|
@@ -291,6 +345,7 @@ exports.LoloyalLoyaltyReferralsConfig = LoloyalLoyaltyReferralsConfig;
|
|
|
291
345
|
exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
|
|
292
346
|
exports.LooxReviewsConfig = LooxReviewsConfig;
|
|
293
347
|
exports.MyappgurusProductReviewsConfig = MyappgurusProductReviewsConfig;
|
|
348
|
+
exports.OkendoReviewsLoyaltyConfig = OkendoReviewsLoyaltyConfig;
|
|
294
349
|
exports.PowerfulContactFormBuilderConfig = PowerfulContactFormBuilderConfig;
|
|
295
350
|
exports.PowrContactFormBuilderConfig = PowrContactFormBuilderConfig;
|
|
296
351
|
exports.PreorderNowPreOrderPqConfig = PreorderNowPreOrderPqConfig;
|
|
@@ -309,6 +364,7 @@ exports.SproutPlantTreesGrowSalesConfig = SproutPlantTreesGrowSalesConfig;
|
|
|
309
364
|
exports.StampedConfig = StampedConfig;
|
|
310
365
|
exports.SubifySubscriptionsConfig = SubifySubscriptionsConfig;
|
|
311
366
|
exports.TrustBadgesBearConfig = TrustBadgesBearConfig;
|
|
367
|
+
exports.TrustedsiteTrustBadgesConfig = TrustedsiteTrustBadgesConfig;
|
|
312
368
|
exports.TrustooConfig = TrustooConfig;
|
|
313
369
|
exports.TrustreviewsProductReviewsConfig = TrustreviewsProductReviewsConfig;
|
|
314
370
|
exports.TrustshopProductReviewsConfig = TrustshopProductReviewsConfig;
|
|
@@ -197,6 +197,34 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
197
197
|
linkify: appSetting.linkify
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
+
case 'EssentialCountdownTimerBar':
|
|
201
|
+
{
|
|
202
|
+
return {
|
|
203
|
+
...currentSetting,
|
|
204
|
+
id: appSetting?.timerId
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
case 'EssentialAnnouncementBar':
|
|
208
|
+
{
|
|
209
|
+
return {
|
|
210
|
+
...currentSetting,
|
|
211
|
+
id: appSetting?.announcementId
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
case 'OkendoReviewsLoyalty':
|
|
215
|
+
{
|
|
216
|
+
return {
|
|
217
|
+
...currentSetting,
|
|
218
|
+
product: appSetting?.['productHandle'] || '{{ product }}'
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
case 'TrustedsiteTrustBadges':
|
|
222
|
+
{
|
|
223
|
+
return {
|
|
224
|
+
...currentSetting,
|
|
225
|
+
'tm-type': appSetting?.trustId
|
|
226
|
+
};
|
|
227
|
+
}
|
|
200
228
|
default:
|
|
201
229
|
return currentSetting;
|
|
202
230
|
}
|
|
@@ -1001,6 +1029,54 @@ const Stamped = {
|
|
|
1001
1029
|
}
|
|
1002
1030
|
}
|
|
1003
1031
|
};
|
|
1032
|
+
const EssentialCountdownTimerBar = {
|
|
1033
|
+
EssentialCountdownTimerBar: {
|
|
1034
|
+
'app-block': {
|
|
1035
|
+
id: ''
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
const EssentialAnnouncementBar = {
|
|
1040
|
+
EssentialAnnouncementBar: {
|
|
1041
|
+
'app-block': {
|
|
1042
|
+
id: ''
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
const OkendoReviewsLoyalty = {
|
|
1047
|
+
OkendoReviewsLoyalty: {
|
|
1048
|
+
'reviews-widget': {
|
|
1049
|
+
product: '{{product}}',
|
|
1050
|
+
widget_type: 'reviews_widget'
|
|
1051
|
+
},
|
|
1052
|
+
'reviews-badge': {
|
|
1053
|
+
horizontal_alignment: 'center'
|
|
1054
|
+
},
|
|
1055
|
+
'media-carousel': {
|
|
1056
|
+
product: '{{product}}'
|
|
1057
|
+
},
|
|
1058
|
+
'media-grid': {
|
|
1059
|
+
product: '{{product}}'
|
|
1060
|
+
},
|
|
1061
|
+
'reviews-carousel': {
|
|
1062
|
+
show_heading: false,
|
|
1063
|
+
heading: '',
|
|
1064
|
+
badge_link: '',
|
|
1065
|
+
product: '{{product}}'
|
|
1066
|
+
},
|
|
1067
|
+
'star-rating': {
|
|
1068
|
+
product: '{{product}}'
|
|
1069
|
+
},
|
|
1070
|
+
'questions-widget': {
|
|
1071
|
+
product: '{{product}}'
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
1075
|
+
const EstimatedDeliveryDatePlus = {
|
|
1076
|
+
EstimatedDeliveryDatePlus: {
|
|
1077
|
+
delivery_coder_theme: null
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1004
1080
|
const HextomCountdownTimerBar = {
|
|
1005
1081
|
HextomCountdownTimerBar: {
|
|
1006
1082
|
'fsb-custom-placement': null
|
|
@@ -1011,8 +1087,38 @@ const TrustBadgesBear = {
|
|
|
1011
1087
|
widget: null
|
|
1012
1088
|
}
|
|
1013
1089
|
};
|
|
1090
|
+
const TrustedsiteTrustBadges = {
|
|
1091
|
+
TrustedsiteTrustBadges: {
|
|
1092
|
+
engagement: {
|
|
1093
|
+
'tm-type': '202',
|
|
1094
|
+
'tm-size': '120'
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
};
|
|
1098
|
+
const GloColorSwatchvariantImage = {
|
|
1099
|
+
GloColorSwatchvariantImage: {
|
|
1100
|
+
'product-bundles-quantity-breaks': null,
|
|
1101
|
+
'product-swatches-detail': null,
|
|
1102
|
+
'product-bundles-combo': null,
|
|
1103
|
+
'product-groups-detail': null
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
const BfSizeChartSizeGuide = {
|
|
1107
|
+
BfSizeChartSizeGuide: {
|
|
1108
|
+
block: null
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1111
|
+
const HextomFreeShippingBar = {
|
|
1112
|
+
HextomFreeShippingBar: {
|
|
1113
|
+
'fsb-custom-placement': null
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1014
1116
|
const composeSettingsByWidgetType = {
|
|
1015
1117
|
...HextomCountdownTimerBar,
|
|
1118
|
+
...EstimatedDeliveryDatePlus,
|
|
1119
|
+
...OkendoReviewsLoyalty,
|
|
1120
|
+
...EssentialAnnouncementBar,
|
|
1121
|
+
...EssentialCountdownTimerBar,
|
|
1016
1122
|
...Stamped,
|
|
1017
1123
|
...TrustshopProductReviews,
|
|
1018
1124
|
...HulkProductOptions,
|
|
@@ -1056,7 +1162,11 @@ const composeSettingsByWidgetType = {
|
|
|
1056
1162
|
...KachingBundles,
|
|
1057
1163
|
...Trustoo,
|
|
1058
1164
|
...LooxReviews,
|
|
1059
|
-
...TrustBadgesBear
|
|
1165
|
+
...TrustBadgesBear,
|
|
1166
|
+
...TrustedsiteTrustBadges,
|
|
1167
|
+
...GloColorSwatchvariantImage,
|
|
1168
|
+
...BfSizeChartSizeGuide,
|
|
1169
|
+
...HextomFreeShippingBar
|
|
1060
1170
|
};
|
|
1061
1171
|
|
|
1062
1172
|
exports.composeSettingsByWidgetType = composeSettingsByWidgetType;
|
|
@@ -46,8 +46,16 @@ const mapShopifyAppMeta = {
|
|
|
46
46
|
...appConfig.HulkProductOptionsConfig,
|
|
47
47
|
...appConfig.TrustshopProductReviewsConfig,
|
|
48
48
|
...appConfig.StampedConfig,
|
|
49
|
+
...appConfig.EssentialCountdownTimerBarConfig,
|
|
50
|
+
...appConfig.EssentialAnnouncementBarConfig,
|
|
51
|
+
...appConfig.OkendoReviewsLoyaltyConfig,
|
|
52
|
+
...appConfig.EstimatedDeliveryDatePlusConfig,
|
|
49
53
|
...appConfig.HextomCountdownTimerBarConfig,
|
|
50
|
-
...appConfig.TrustBadgesBearConfig
|
|
54
|
+
...appConfig.TrustBadgesBearConfig,
|
|
55
|
+
...appConfig.TrustedsiteTrustBadgesConfig,
|
|
56
|
+
...appConfig.GloColorSwatchvariantImageConfig,
|
|
57
|
+
...appConfig.BfSizeChartSizeGuideConfig,
|
|
58
|
+
...appConfig.HextomFreeShippingBarConfig
|
|
51
59
|
};
|
|
52
60
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
53
61
|
|
|
@@ -32,7 +32,7 @@ const componentUsingAdvanced = [
|
|
|
32
32
|
'IconList',
|
|
33
33
|
'ProductVariants'
|
|
34
34
|
];
|
|
35
|
-
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext,
|
|
35
|
+
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, enableLazyLoadImage, ...passProps })=>{
|
|
36
36
|
const item = builder[uid];
|
|
37
37
|
const Component = components[item?.tag];
|
|
38
38
|
if (!Component) {
|
|
@@ -71,7 +71,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
71
71
|
advanced: item.advanced,
|
|
72
72
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
73
73
|
pageContext,
|
|
74
|
-
|
|
74
|
+
enableLazyLoadImage,
|
|
75
75
|
...passProps,
|
|
76
76
|
builderAttrs: {
|
|
77
77
|
...passProps.builderAttrs
|
|
@@ -84,7 +84,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
84
84
|
components,
|
|
85
85
|
customProps,
|
|
86
86
|
pageContext,
|
|
87
|
-
|
|
87
|
+
enableLazyLoadImage
|
|
88
88
|
};
|
|
89
89
|
}),
|
|
90
90
|
children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -97,7 +97,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
97
97
|
customProps,
|
|
98
98
|
parentTag: item.tag,
|
|
99
99
|
pageContext,
|
|
100
|
-
|
|
100
|
+
enableLazyLoadImage
|
|
101
101
|
}))) : ''
|
|
102
102
|
});
|
|
103
103
|
}, ()=>{
|
|
@@ -113,7 +113,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
113
113
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
114
114
|
parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
|
|
115
115
|
pageContext,
|
|
116
|
-
|
|
116
|
+
enableLazyLoadImage,
|
|
117
117
|
...passProps,
|
|
118
118
|
builderAttrs: {
|
|
119
119
|
...passProps.builderAttrs
|
|
@@ -135,7 +135,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
135
135
|
cssClass: item?.advanced?.cssClass
|
|
136
136
|
},
|
|
137
137
|
pageContext,
|
|
138
|
-
|
|
138
|
+
enableLazyLoadImage,
|
|
139
139
|
...passProps,
|
|
140
140
|
builderAttrs: {
|
|
141
141
|
...passProps.builderAttrs
|
|
@@ -148,7 +148,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
148
148
|
components,
|
|
149
149
|
customProps,
|
|
150
150
|
pageContext,
|
|
151
|
-
|
|
151
|
+
enableLazyLoadImage
|
|
152
152
|
};
|
|
153
153
|
}),
|
|
154
154
|
children: !customRenderChildren.includes(item.tag) ? WrapRenderChildren({
|
|
@@ -161,7 +161,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
161
161
|
customProps,
|
|
162
162
|
parentTag: item.tag,
|
|
163
163
|
pageContext,
|
|
164
|
-
|
|
164
|
+
enableLazyLoadImage
|
|
165
165
|
}))) : ''
|
|
166
166
|
});
|
|
167
167
|
}, ()=>{
|
|
@@ -177,7 +177,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
177
177
|
cssClass: item?.advanced?.cssClass
|
|
178
178
|
},
|
|
179
179
|
pageContext,
|
|
180
|
-
|
|
180
|
+
enableLazyLoadImage,
|
|
181
181
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
182
182
|
style: componentIconList.includes(item.tag) ? style : null,
|
|
183
183
|
...passProps,
|
|
@@ -290,6 +290,8 @@ const RenderChildren = (props)=>{
|
|
|
290
290
|
const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
291
291
|
let liquid = '';
|
|
292
292
|
if (codes?.length) {
|
|
293
|
+
// Limit each child item of an element (e.g., marquee, ...) to ensure the total element size does not exceed 256KB.
|
|
294
|
+
const itemMaxSize = 200 / codes.length;
|
|
293
295
|
for(let i = 0; i < codes.length; i++){
|
|
294
296
|
const code = codes[i];
|
|
295
297
|
if (code) {
|
|
@@ -297,7 +299,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
297
299
|
// Fix limit 256kb
|
|
298
300
|
const textEncoder = new TextEncoder();
|
|
299
301
|
const size = newLiquid ? textEncoder.encode(newLiquid).length : 0;
|
|
300
|
-
if (Math.ceil(size / 1024) >=
|
|
302
|
+
if (Math.ceil(size / 1024) >= itemMaxSize) {
|
|
301
303
|
const fileName = `gp-section-snippet-${uid + i}`;
|
|
302
304
|
customProps.extraFiles[fileName] = code;
|
|
303
305
|
liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant, form: form %}`;
|
|
@@ -256,6 +256,30 @@ const StampedConfig = {
|
|
|
256
256
|
appId: 'a103faaf-2125-4b0e-89fa-de5149736723'
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
+
const EssentialCountdownTimerBarConfig = {
|
|
260
|
+
EssentialCountdownTimerBar: {
|
|
261
|
+
appName: 'essential-countdown',
|
|
262
|
+
appId: '722378e8-5a70-4eae-aa89-9e44e8e9f6de'
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
const EssentialAnnouncementBarConfig = {
|
|
266
|
+
EssentialAnnouncementBar: {
|
|
267
|
+
appName: 'essential-announcement',
|
|
268
|
+
appId: '93b5429f-c8d6-4c33-ae14-250fd84f361b'
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
const OkendoReviewsLoyaltyConfig = {
|
|
272
|
+
OkendoReviewsLoyalty: {
|
|
273
|
+
appName: 'okendo',
|
|
274
|
+
appId: 'bb689e69-ea70-4661-8fb7-ad24a2e23c29'
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
const EstimatedDeliveryDatePlusConfig = {
|
|
278
|
+
EstimatedDeliveryDatePlus: {
|
|
279
|
+
appName: 'estimated-delivery-date-plus',
|
|
280
|
+
appId: '4a0685bc-c234-45b2-8382-5ad6a8e3e3fd'
|
|
281
|
+
}
|
|
282
|
+
};
|
|
259
283
|
const HextomCountdownTimerBarConfig = {
|
|
260
284
|
HextomCountdownTimerBar: {
|
|
261
285
|
appName: 'hextom-shipping-bar',
|
|
@@ -268,5 +292,29 @@ const TrustBadgesBearConfig = {
|
|
|
268
292
|
appId: '163a9b59-0ec2-4cb7-bf5c-31408b4a9420'
|
|
269
293
|
}
|
|
270
294
|
};
|
|
295
|
+
const TrustedsiteTrustBadgesConfig = {
|
|
296
|
+
TrustedsiteTrustBadges: {
|
|
297
|
+
appName: 'trustedsite-trust-badges',
|
|
298
|
+
appId: '3b73cc66-a9ae-4fcb-8ffb-743993d42e56'
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
const GloColorSwatchvariantImageConfig = {
|
|
302
|
+
GloColorSwatchvariantImage: {
|
|
303
|
+
appName: 'glo-color-swatch',
|
|
304
|
+
appId: '4394f710-096c-4021-bbde-8ebb26057c11'
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
const BfSizeChartSizeGuideConfig = {
|
|
308
|
+
BfSizeChartSizeGuide: {
|
|
309
|
+
appName: 'bf-size-charts',
|
|
310
|
+
appId: '47ee4f2e-eb5e-41af-9beb-e2786646bf2a'
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const HextomFreeShippingBarConfig = {
|
|
314
|
+
HextomFreeShippingBar: {
|
|
315
|
+
appName: 'hextom-shipping-bar',
|
|
316
|
+
appId: '7ef5d9af-75a2-45c7-9b1b-f9240ee488e9'
|
|
317
|
+
}
|
|
318
|
+
};
|
|
271
319
|
|
|
272
|
-
export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HextomCountdownTimerBarConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, PowerfulContactFormBuilderConfig, PowrContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustBadgesBearConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
|
|
320
|
+
export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BfSizeChartSizeGuideConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, 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, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
|
|
@@ -195,6 +195,34 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
195
195
|
linkify: appSetting.linkify
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
+
case 'EssentialCountdownTimerBar':
|
|
199
|
+
{
|
|
200
|
+
return {
|
|
201
|
+
...currentSetting,
|
|
202
|
+
id: appSetting?.timerId
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
case 'EssentialAnnouncementBar':
|
|
206
|
+
{
|
|
207
|
+
return {
|
|
208
|
+
...currentSetting,
|
|
209
|
+
id: appSetting?.announcementId
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
case 'OkendoReviewsLoyalty':
|
|
213
|
+
{
|
|
214
|
+
return {
|
|
215
|
+
...currentSetting,
|
|
216
|
+
product: appSetting?.['productHandle'] || '{{ product }}'
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
case 'TrustedsiteTrustBadges':
|
|
220
|
+
{
|
|
221
|
+
return {
|
|
222
|
+
...currentSetting,
|
|
223
|
+
'tm-type': appSetting?.trustId
|
|
224
|
+
};
|
|
225
|
+
}
|
|
198
226
|
default:
|
|
199
227
|
return currentSetting;
|
|
200
228
|
}
|
|
@@ -999,6 +1027,54 @@ const Stamped = {
|
|
|
999
1027
|
}
|
|
1000
1028
|
}
|
|
1001
1029
|
};
|
|
1030
|
+
const EssentialCountdownTimerBar = {
|
|
1031
|
+
EssentialCountdownTimerBar: {
|
|
1032
|
+
'app-block': {
|
|
1033
|
+
id: ''
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
const EssentialAnnouncementBar = {
|
|
1038
|
+
EssentialAnnouncementBar: {
|
|
1039
|
+
'app-block': {
|
|
1040
|
+
id: ''
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
const OkendoReviewsLoyalty = {
|
|
1045
|
+
OkendoReviewsLoyalty: {
|
|
1046
|
+
'reviews-widget': {
|
|
1047
|
+
product: '{{product}}',
|
|
1048
|
+
widget_type: 'reviews_widget'
|
|
1049
|
+
},
|
|
1050
|
+
'reviews-badge': {
|
|
1051
|
+
horizontal_alignment: 'center'
|
|
1052
|
+
},
|
|
1053
|
+
'media-carousel': {
|
|
1054
|
+
product: '{{product}}'
|
|
1055
|
+
},
|
|
1056
|
+
'media-grid': {
|
|
1057
|
+
product: '{{product}}'
|
|
1058
|
+
},
|
|
1059
|
+
'reviews-carousel': {
|
|
1060
|
+
show_heading: false,
|
|
1061
|
+
heading: '',
|
|
1062
|
+
badge_link: '',
|
|
1063
|
+
product: '{{product}}'
|
|
1064
|
+
},
|
|
1065
|
+
'star-rating': {
|
|
1066
|
+
product: '{{product}}'
|
|
1067
|
+
},
|
|
1068
|
+
'questions-widget': {
|
|
1069
|
+
product: '{{product}}'
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
const EstimatedDeliveryDatePlus = {
|
|
1074
|
+
EstimatedDeliveryDatePlus: {
|
|
1075
|
+
delivery_coder_theme: null
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1002
1078
|
const HextomCountdownTimerBar = {
|
|
1003
1079
|
HextomCountdownTimerBar: {
|
|
1004
1080
|
'fsb-custom-placement': null
|
|
@@ -1009,8 +1085,38 @@ const TrustBadgesBear = {
|
|
|
1009
1085
|
widget: null
|
|
1010
1086
|
}
|
|
1011
1087
|
};
|
|
1088
|
+
const TrustedsiteTrustBadges = {
|
|
1089
|
+
TrustedsiteTrustBadges: {
|
|
1090
|
+
engagement: {
|
|
1091
|
+
'tm-type': '202',
|
|
1092
|
+
'tm-size': '120'
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
};
|
|
1096
|
+
const GloColorSwatchvariantImage = {
|
|
1097
|
+
GloColorSwatchvariantImage: {
|
|
1098
|
+
'product-bundles-quantity-breaks': null,
|
|
1099
|
+
'product-swatches-detail': null,
|
|
1100
|
+
'product-bundles-combo': null,
|
|
1101
|
+
'product-groups-detail': null
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
const BfSizeChartSizeGuide = {
|
|
1105
|
+
BfSizeChartSizeGuide: {
|
|
1106
|
+
block: null
|
|
1107
|
+
}
|
|
1108
|
+
};
|
|
1109
|
+
const HextomFreeShippingBar = {
|
|
1110
|
+
HextomFreeShippingBar: {
|
|
1111
|
+
'fsb-custom-placement': null
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1012
1114
|
const composeSettingsByWidgetType = {
|
|
1013
1115
|
...HextomCountdownTimerBar,
|
|
1116
|
+
...EstimatedDeliveryDatePlus,
|
|
1117
|
+
...OkendoReviewsLoyalty,
|
|
1118
|
+
...EssentialAnnouncementBar,
|
|
1119
|
+
...EssentialCountdownTimerBar,
|
|
1014
1120
|
...Stamped,
|
|
1015
1121
|
...TrustshopProductReviews,
|
|
1016
1122
|
...HulkProductOptions,
|
|
@@ -1054,7 +1160,11 @@ const composeSettingsByWidgetType = {
|
|
|
1054
1160
|
...KachingBundles,
|
|
1055
1161
|
...Trustoo,
|
|
1056
1162
|
...LooxReviews,
|
|
1057
|
-
...TrustBadgesBear
|
|
1163
|
+
...TrustBadgesBear,
|
|
1164
|
+
...TrustedsiteTrustBadges,
|
|
1165
|
+
...GloColorSwatchvariantImage,
|
|
1166
|
+
...BfSizeChartSizeGuide,
|
|
1167
|
+
...HextomFreeShippingBar
|
|
1058
1168
|
};
|
|
1059
1169
|
|
|
1060
1170
|
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, HextomCountdownTimerBarConfig, TrustBadgesBearConfig } 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, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig, OkendoReviewsLoyaltyConfig, EstimatedDeliveryDatePlusConfig, HextomCountdownTimerBarConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, GloColorSwatchvariantImageConfig, BfSizeChartSizeGuideConfig, HextomFreeShippingBarConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -44,8 +44,16 @@ const mapShopifyAppMeta = {
|
|
|
44
44
|
...HulkProductOptionsConfig,
|
|
45
45
|
...TrustshopProductReviewsConfig,
|
|
46
46
|
...StampedConfig,
|
|
47
|
+
...EssentialCountdownTimerBarConfig,
|
|
48
|
+
...EssentialAnnouncementBarConfig,
|
|
49
|
+
...OkendoReviewsLoyaltyConfig,
|
|
50
|
+
...EstimatedDeliveryDatePlusConfig,
|
|
47
51
|
...HextomCountdownTimerBarConfig,
|
|
48
|
-
...TrustBadgesBearConfig
|
|
52
|
+
...TrustBadgesBearConfig,
|
|
53
|
+
...TrustedsiteTrustBadgesConfig,
|
|
54
|
+
...GloColorSwatchvariantImageConfig,
|
|
55
|
+
...BfSizeChartSizeGuideConfig,
|
|
56
|
+
...HextomFreeShippingBarConfig
|
|
49
57
|
};
|
|
50
58
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
51
59
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8883,6 +8883,7 @@ type PageContext = {
|
|
|
8883
8883
|
pageType?: string;
|
|
8884
8884
|
isTranslateWithLocale?: boolean;
|
|
8885
8885
|
sectionName?: string;
|
|
8886
|
+
isOptimizePlan?: boolean;
|
|
8886
8887
|
};
|
|
8887
8888
|
type OnlyOne<T, U> = (T & {
|
|
8888
8889
|
[K in keyof U]?: never;
|
|
@@ -35914,10 +35915,10 @@ type Props = {
|
|
|
35914
35915
|
components: Record<string, any>;
|
|
35915
35916
|
extraFiles?: ExtraFiles;
|
|
35916
35917
|
pageContext?: PageContext;
|
|
35917
|
-
|
|
35918
|
+
enableLazyLoadImage?: boolean;
|
|
35918
35919
|
[key: string]: any;
|
|
35919
35920
|
};
|
|
35920
|
-
declare const Render: ({ uid, builder, components, parentId, extraFiles, pageContext,
|
|
35921
|
+
declare const Render: ({ uid, builder, components, parentId, extraFiles, pageContext, enableLazyLoadImage, ...passProps }: Props) => {
|
|
35921
35922
|
liquid: string;
|
|
35922
35923
|
extraFiles: ExtraFiles;
|
|
35923
35924
|
};
|