@gem-sdk/core 2.1.13-staging.0 → 2.1.13-staging.15
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 +11 -10
- package/dist/cjs/contexts/PageContext.js +8 -1
- package/dist/cjs/graphql-app-api/queries/SaleFunnelOffer.generated.js +25 -0
- 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/cjs/index.js +2 -0
- package/dist/esm/components/Render.liquid.js +11 -10
- package/dist/esm/contexts/PageContext.js +8 -1
- package/dist/esm/graphql-app-api/queries/SaleFunnelOffer.generated.js +23 -0
- 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/esm/index.js +1 -0
- package/dist/types/index.d.ts +5210 -609
- 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,
|
|
@@ -301,7 +301,8 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
301
301
|
// Fix limit 256kb
|
|
302
302
|
const textEncoder = new TextEncoder();
|
|
303
303
|
const size = newLiquid ? textEncoder.encode(newLiquid).length : 0;
|
|
304
|
-
|
|
304
|
+
// Limit each child item of an element (e.g., marquee, ...) to 50KB to ensure the total element size does not exceed 256KB.
|
|
305
|
+
if (Math.ceil(size / 1024) >= 50) {
|
|
305
306
|
const fileName = `gp-section-snippet-${uid + i}`;
|
|
306
307
|
customProps.extraFiles[fileName] = code;
|
|
307
308
|
liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant, form: form %}`;
|
|
@@ -22,6 +22,11 @@ const createPageStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
|
22
22
|
productOffers: productOffers
|
|
23
23
|
});
|
|
24
24
|
},
|
|
25
|
+
setDynamicDiscountOffer: (dynamicDiscountOffer)=>{
|
|
26
|
+
set({
|
|
27
|
+
dynamicDiscountOffer: dynamicDiscountOffer
|
|
28
|
+
});
|
|
29
|
+
},
|
|
25
30
|
setSalePageProductId: (id)=>{
|
|
26
31
|
set({
|
|
27
32
|
salePageProductId: id
|
|
@@ -71,11 +76,12 @@ const createPageStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
|
71
76
|
}));
|
|
72
77
|
}
|
|
73
78
|
}));
|
|
74
|
-
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, publicStoreFrontData, ...passProps })=>{
|
|
79
|
+
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, dynamicDiscountOffer, publicStoreFrontData, ...passProps })=>{
|
|
75
80
|
const store = react.useMemo(()=>createPageStoreProvider({
|
|
76
81
|
dynamicProduct,
|
|
77
82
|
dynamicCollection,
|
|
78
83
|
productOffers,
|
|
84
|
+
dynamicDiscountOffer,
|
|
79
85
|
publicStoreFrontData,
|
|
80
86
|
interactionData: {
|
|
81
87
|
selectType: 'ELEMENT'
|
|
@@ -84,6 +90,7 @@ const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffe
|
|
|
84
90
|
dynamicProduct,
|
|
85
91
|
dynamicCollection,
|
|
86
92
|
productOffers,
|
|
93
|
+
dynamicDiscountOffer,
|
|
87
94
|
publicStoreFrontData
|
|
88
95
|
]);
|
|
89
96
|
return /*#__PURE__*/ jsxRuntime.jsx(PageContext.Provider, {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */ const SaleFunnelOfferDocument = `
|
|
4
|
+
query SaleFunnelOffer($saleFunnelOfferId: ID!) {
|
|
5
|
+
saleFunnelOffer(id: $saleFunnelOfferId) {
|
|
6
|
+
dynamicDiscounts {
|
|
7
|
+
id
|
|
8
|
+
createdAt
|
|
9
|
+
updatedAt
|
|
10
|
+
type
|
|
11
|
+
valueType
|
|
12
|
+
value
|
|
13
|
+
appliedProductCount
|
|
14
|
+
isEnabled
|
|
15
|
+
}
|
|
16
|
+
id
|
|
17
|
+
isEnabled
|
|
18
|
+
campaignID
|
|
19
|
+
createdAt
|
|
20
|
+
deletedAt
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
exports.SaleFunnelOfferDocument = SaleFunnelOfferDocument;
|
|
@@ -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
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,6 +33,7 @@ var ThemePage_generated = require('./graphql-app-api/queries/ThemePage.generated
|
|
|
33
33
|
var SaleFunnelDiscounts_generated = require('./graphql-app-api/queries/SaleFunnelDiscounts.generated.js');
|
|
34
34
|
var LibrarySaleFunnelDiscount_generated = require('./graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js');
|
|
35
35
|
var ShopLibraryPage_generated = require('./graphql-app-api/queries/ShopLibraryPage.generated.js');
|
|
36
|
+
var SaleFunnelOffer_generated = require('./graphql-app-api/queries/SaleFunnelOffer.generated.js');
|
|
36
37
|
var borders = require('./helpers/borders.js');
|
|
37
38
|
var carousel = require('./helpers/carousel.js');
|
|
38
39
|
var cls = require('./helpers/cls.js');
|
|
@@ -167,6 +168,7 @@ exports.ThemePageDocument = ThemePage_generated.ThemePageDocument;
|
|
|
167
168
|
exports.SaleFunnelDiscountsDocument = SaleFunnelDiscounts_generated.SaleFunnelDiscountsDocument;
|
|
168
169
|
exports.LibrarySaleFunnelDocument = LibrarySaleFunnelDiscount_generated.LibrarySaleFunnelDocument;
|
|
169
170
|
exports.ShopLibraryPageDocument = ShopLibraryPage_generated.ShopLibraryPageDocument;
|
|
171
|
+
exports.SaleFunnelOfferDocument = SaleFunnelOffer_generated.SaleFunnelOfferDocument;
|
|
170
172
|
exports.composeBorderCss = borders.composeBorderCss;
|
|
171
173
|
exports.getBorderRadiusStyle = borders.getBorderRadiusStyle;
|
|
172
174
|
exports.getBorderStyle = borders.getBorderStyle;
|
|
@@ -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,
|
|
@@ -297,7 +297,8 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
|
|
|
297
297
|
// Fix limit 256kb
|
|
298
298
|
const textEncoder = new TextEncoder();
|
|
299
299
|
const size = newLiquid ? textEncoder.encode(newLiquid).length : 0;
|
|
300
|
-
|
|
300
|
+
// Limit each child item of an element (e.g., marquee, ...) to 50KB to ensure the total element size does not exceed 256KB.
|
|
301
|
+
if (Math.ceil(size / 1024) >= 50) {
|
|
301
302
|
const fileName = `gp-section-snippet-${uid + i}`;
|
|
302
303
|
customProps.extraFiles[fileName] = code;
|
|
303
304
|
liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant, form: form %}`;
|
|
@@ -20,6 +20,11 @@ const createPageStoreProvider = (data)=>createStore((set)=>({
|
|
|
20
20
|
productOffers: productOffers
|
|
21
21
|
});
|
|
22
22
|
},
|
|
23
|
+
setDynamicDiscountOffer: (dynamicDiscountOffer)=>{
|
|
24
|
+
set({
|
|
25
|
+
dynamicDiscountOffer: dynamicDiscountOffer
|
|
26
|
+
});
|
|
27
|
+
},
|
|
23
28
|
setSalePageProductId: (id)=>{
|
|
24
29
|
set({
|
|
25
30
|
salePageProductId: id
|
|
@@ -69,11 +74,12 @@ const createPageStoreProvider = (data)=>createStore((set)=>({
|
|
|
69
74
|
}));
|
|
70
75
|
}
|
|
71
76
|
}));
|
|
72
|
-
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, publicStoreFrontData, ...passProps })=>{
|
|
77
|
+
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, dynamicDiscountOffer, publicStoreFrontData, ...passProps })=>{
|
|
73
78
|
const store = useMemo(()=>createPageStoreProvider({
|
|
74
79
|
dynamicProduct,
|
|
75
80
|
dynamicCollection,
|
|
76
81
|
productOffers,
|
|
82
|
+
dynamicDiscountOffer,
|
|
77
83
|
publicStoreFrontData,
|
|
78
84
|
interactionData: {
|
|
79
85
|
selectType: 'ELEMENT'
|
|
@@ -82,6 +88,7 @@ const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffe
|
|
|
82
88
|
dynamicProduct,
|
|
83
89
|
dynamicCollection,
|
|
84
90
|
productOffers,
|
|
91
|
+
dynamicDiscountOffer,
|
|
85
92
|
publicStoreFrontData
|
|
86
93
|
]);
|
|
87
94
|
return /*#__PURE__*/ jsx(PageContext.Provider, {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable */ const SaleFunnelOfferDocument = `
|
|
2
|
+
query SaleFunnelOffer($saleFunnelOfferId: ID!) {
|
|
3
|
+
saleFunnelOffer(id: $saleFunnelOfferId) {
|
|
4
|
+
dynamicDiscounts {
|
|
5
|
+
id
|
|
6
|
+
createdAt
|
|
7
|
+
updatedAt
|
|
8
|
+
type
|
|
9
|
+
valueType
|
|
10
|
+
value
|
|
11
|
+
appliedProductCount
|
|
12
|
+
isEnabled
|
|
13
|
+
}
|
|
14
|
+
id
|
|
15
|
+
isEnabled
|
|
16
|
+
campaignID
|
|
17
|
+
createdAt
|
|
18
|
+
deletedAt
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export { SaleFunnelOfferDocument };
|
|
@@ -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 };
|