@gem-sdk/core 2.0.0-staging.153 → 2.0.0-staging.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ComponentToolbarPreview.js +4 -2
- package/dist/cjs/contexts/PageContext.js +8 -1
- package/dist/cjs/graphql/fragments/custom-font.generated.js +5 -1
- package/dist/cjs/graphql/queries/{published-shop-metas.js → published-shop-metas.generated.js} +1 -1
- package/dist/cjs/graphql-app-api/queries/SaleFunnelOffer.generated.js +25 -0
- package/dist/cjs/helpers/interaction/index.js +1 -0
- package/dist/cjs/helpers/third-party/appConfig.js +28 -0
- package/dist/cjs/helpers/third-party/appSetting.js +73 -0
- package/dist/cjs/helpers/third-party/constant.js +5 -1
- package/dist/cjs/hooks/useFormatMoney.js +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/esm/components/ComponentToolbarPreview.js +4 -2
- package/dist/esm/contexts/PageContext.js +8 -1
- package/dist/esm/graphql/fragments/custom-font.generated.js +5 -1
- package/dist/esm/graphql/queries/{published-shop-metas.js → published-shop-metas.generated.js} +1 -1
- package/dist/esm/graphql-app-api/queries/SaleFunnelOffer.generated.js +23 -0
- package/dist/esm/helpers/interaction/index.js +1 -0
- package/dist/esm/helpers/third-party/appConfig.js +25 -1
- package/dist/esm/helpers/third-party/appSetting.js +73 -0
- package/dist/esm/helpers/third-party/constant.js +6 -2
- package/dist/esm/hooks/useFormatMoney.js +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/types/index.d.ts +5121 -517
- package/package.json +1 -1
|
@@ -100,9 +100,11 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
const getSectionNumber = ()=>{
|
|
103
|
+
const getSectionNumber = react.useCallback(()=>{
|
|
104
104
|
return root?.childrens?.length || 0;
|
|
105
|
-
}
|
|
105
|
+
}, [
|
|
106
|
+
root?.childrens?.length
|
|
107
|
+
]);
|
|
106
108
|
const getDeleteTooltipPosition = react.useCallback(()=>{
|
|
107
109
|
if (props.tag == 'Section') return 'bottom';
|
|
108
110
|
const $toolbar = document.body.querySelector('#storefront')?.querySelector('[data-toolbar-active="true"]');
|
|
@@ -23,6 +23,11 @@ const createPageStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
|
23
23
|
productOffers: productOffers
|
|
24
24
|
});
|
|
25
25
|
},
|
|
26
|
+
setDynamicDiscountOffer: (dynamicDiscountOffer)=>{
|
|
27
|
+
set({
|
|
28
|
+
dynamicDiscountOffer: dynamicDiscountOffer
|
|
29
|
+
});
|
|
30
|
+
},
|
|
26
31
|
setSalePageProductId: (id)=>{
|
|
27
32
|
set({
|
|
28
33
|
salePageProductId: id
|
|
@@ -72,11 +77,12 @@ const createPageStoreProvider = (data)=>zustand.createStore((set)=>({
|
|
|
72
77
|
}));
|
|
73
78
|
}
|
|
74
79
|
}));
|
|
75
|
-
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, publicStoreFrontData, ...passProps })=>{
|
|
80
|
+
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, dynamicDiscountOffer, publicStoreFrontData, ...passProps })=>{
|
|
76
81
|
const store = react.useMemo(()=>createPageStoreProvider({
|
|
77
82
|
dynamicProduct,
|
|
78
83
|
dynamicCollection,
|
|
79
84
|
productOffers,
|
|
85
|
+
dynamicDiscountOffer,
|
|
80
86
|
publicStoreFrontData,
|
|
81
87
|
interactionData: {
|
|
82
88
|
selectType: 'ELEMENT'
|
|
@@ -85,6 +91,7 @@ const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffe
|
|
|
85
91
|
dynamicProduct,
|
|
86
92
|
dynamicCollection,
|
|
87
93
|
productOffers,
|
|
94
|
+
dynamicDiscountOffer,
|
|
88
95
|
publicStoreFrontData
|
|
89
96
|
]);
|
|
90
97
|
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;
|
|
@@ -57,6 +57,7 @@ const useInteraction = ()=>{
|
|
|
57
57
|
element.dispatchEvent(eventDispatch);
|
|
58
58
|
};
|
|
59
59
|
const saveToElementInteractionData = (element, key, value)=>{
|
|
60
|
+
if (!element) return;
|
|
60
61
|
const interactionData = element.getAttribute('gp-data-interaction');
|
|
61
62
|
const interactionDataJson = JSON.parse(interactionData || '{}');
|
|
62
63
|
element.setAttribute('gp-data-interaction', JSON.stringify({
|
|
@@ -252,6 +252,30 @@ const StampedConfig = {
|
|
|
252
252
|
appId: 'a103faaf-2125-4b0e-89fa-de5149736723'
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
+
const EssentialCountdownTimerBarConfig = {
|
|
256
|
+
EssentialCountdownTimerBar: {
|
|
257
|
+
appName: 'essential-countdown',
|
|
258
|
+
appId: '722378e8-5a70-4eae-aa89-9e44e8e9f6de'
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
const EssentialAnnouncementBarConfig = {
|
|
262
|
+
EssentialAnnouncementBar: {
|
|
263
|
+
appName: 'essential-announcement',
|
|
264
|
+
appId: '93b5429f-c8d6-4c33-ae14-250fd84f361b'
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const OkendoReviewsLoyaltyConfig = {
|
|
268
|
+
OkendoReviewsLoyalty: {
|
|
269
|
+
appName: 'okendo',
|
|
270
|
+
appId: 'bb689e69-ea70-4661-8fb7-ad24a2e23c29'
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
const EstimatedDeliveryDatePlusConfig = {
|
|
274
|
+
EstimatedDeliveryDatePlus: {
|
|
275
|
+
appName: 'estimated-delivery-date-plus',
|
|
276
|
+
appId: '4a0685bc-c234-45b2-8382-5ad6a8e3e3fd'
|
|
277
|
+
}
|
|
278
|
+
};
|
|
255
279
|
|
|
256
280
|
exports.AftershipEmailMarketingsmsConfig = AftershipEmailMarketingsmsConfig;
|
|
257
281
|
exports.AppointmentBookingCowlendarConfig = AppointmentBookingCowlendarConfig;
|
|
@@ -259,6 +283,9 @@ exports.BestBuyFulfillmentConfig = BestBuyFulfillmentConfig;
|
|
|
259
283
|
exports.BoldSubscriptionsConfig = BoldSubscriptionsConfig;
|
|
260
284
|
exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
261
285
|
exports.EasyBundleBuilderSkailamaConfig = EasyBundleBuilderSkailamaConfig;
|
|
286
|
+
exports.EssentialAnnouncementBarConfig = EssentialAnnouncementBarConfig;
|
|
287
|
+
exports.EssentialCountdownTimerBarConfig = EssentialCountdownTimerBarConfig;
|
|
288
|
+
exports.EstimatedDeliveryDatePlusConfig = EstimatedDeliveryDatePlusConfig;
|
|
262
289
|
exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
|
|
263
290
|
exports.FlyBundlesUpsellsFbtConfig = FlyBundlesUpsellsFbtConfig;
|
|
264
291
|
exports.GloboProductOptionsVariantConfig = GloboProductOptionsVariantConfig;
|
|
@@ -272,6 +299,7 @@ exports.LoloyalLoyaltyReferralsConfig = LoloyalLoyaltyReferralsConfig;
|
|
|
272
299
|
exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
|
|
273
300
|
exports.LooxReviewsConfig = LooxReviewsConfig;
|
|
274
301
|
exports.MyappgurusProductReviewsConfig = MyappgurusProductReviewsConfig;
|
|
302
|
+
exports.OkendoReviewsLoyaltyConfig = OkendoReviewsLoyaltyConfig;
|
|
275
303
|
exports.PowerfulContactFormBuilderConfig = PowerfulContactFormBuilderConfig;
|
|
276
304
|
exports.PreorderNowPreOrderPqConfig = PreorderNowPreOrderPqConfig;
|
|
277
305
|
exports.PreorderNowWodPresaleConfig = PreorderNowWodPresaleConfig;
|
|
@@ -190,6 +190,27 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
190
190
|
linkify: appSetting.linkify
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
+
case 'EssentialCountdownTimerBar':
|
|
194
|
+
{
|
|
195
|
+
return {
|
|
196
|
+
...currentSetting,
|
|
197
|
+
id: appSetting?.timerId
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
case 'EssentialAnnouncementBar':
|
|
201
|
+
{
|
|
202
|
+
return {
|
|
203
|
+
...currentSetting,
|
|
204
|
+
id: appSetting?.announcementId
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
case 'OkendoReviewsLoyalty':
|
|
208
|
+
{
|
|
209
|
+
return {
|
|
210
|
+
...currentSetting,
|
|
211
|
+
product: appSetting?.['productHandle'] || '{{ product }}'
|
|
212
|
+
};
|
|
213
|
+
}
|
|
193
214
|
default:
|
|
194
215
|
return currentSetting;
|
|
195
216
|
}
|
|
@@ -987,7 +1008,59 @@ const Stamped = {
|
|
|
987
1008
|
}
|
|
988
1009
|
}
|
|
989
1010
|
};
|
|
1011
|
+
const EssentialCountdownTimerBar = {
|
|
1012
|
+
EssentialCountdownTimerBar: {
|
|
1013
|
+
'app-block': {
|
|
1014
|
+
id: ''
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
const EssentialAnnouncementBar = {
|
|
1019
|
+
EssentialAnnouncementBar: {
|
|
1020
|
+
'app-block': {
|
|
1021
|
+
id: ''
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
const OkendoReviewsLoyalty = {
|
|
1026
|
+
OkendoReviewsLoyalty: {
|
|
1027
|
+
'reviews-widget': {
|
|
1028
|
+
product: '{{product}}',
|
|
1029
|
+
widget_type: 'reviews_widget'
|
|
1030
|
+
},
|
|
1031
|
+
'reviews-badge': {
|
|
1032
|
+
horizontal_alignment: 'center'
|
|
1033
|
+
},
|
|
1034
|
+
'media-carousel': {
|
|
1035
|
+
product: '{{product}}'
|
|
1036
|
+
},
|
|
1037
|
+
'media-grid': {
|
|
1038
|
+
product: '{{product}}'
|
|
1039
|
+
},
|
|
1040
|
+
'reviews-carousel': {
|
|
1041
|
+
show_heading: false,
|
|
1042
|
+
heading: '',
|
|
1043
|
+
badge_link: '',
|
|
1044
|
+
product: '{{product}}'
|
|
1045
|
+
},
|
|
1046
|
+
'star-rating': {
|
|
1047
|
+
product: '{{product}}'
|
|
1048
|
+
},
|
|
1049
|
+
'questions-widget': {
|
|
1050
|
+
product: '{{product}}'
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
};
|
|
1054
|
+
const EstimatedDeliveryDatePlus = {
|
|
1055
|
+
EstimatedDeliveryDatePlus: {
|
|
1056
|
+
delivery_coder_theme: null
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
990
1059
|
const composeSettingsByWidgetType = {
|
|
1060
|
+
...EstimatedDeliveryDatePlus,
|
|
1061
|
+
...OkendoReviewsLoyalty,
|
|
1062
|
+
...EssentialAnnouncementBar,
|
|
1063
|
+
...EssentialCountdownTimerBar,
|
|
991
1064
|
...Stamped,
|
|
992
1065
|
...TrustshopProductReviews,
|
|
993
1066
|
...HulkProductOptions,
|
|
@@ -44,7 +44,11 @@ const mapShopifyAppMeta = {
|
|
|
44
44
|
...appConfig.MyappgurusProductReviewsConfig,
|
|
45
45
|
...appConfig.HulkProductOptionsConfig,
|
|
46
46
|
...appConfig.TrustshopProductReviewsConfig,
|
|
47
|
-
...appConfig.StampedConfig
|
|
47
|
+
...appConfig.StampedConfig,
|
|
48
|
+
...appConfig.EssentialCountdownTimerBarConfig,
|
|
49
|
+
...appConfig.EssentialAnnouncementBarConfig,
|
|
50
|
+
...appConfig.OkendoReviewsLoyaltyConfig,
|
|
51
|
+
...appConfig.EstimatedDeliveryDatePlusConfig
|
|
48
52
|
};
|
|
49
53
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
50
54
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var shop = require('./shop.js');
|
|
5
5
|
|
|
6
6
|
const shopifyPriceRounding = (amount, precision)=>{
|
|
7
|
-
return parseFloat(`${amount}`).toFixed(Number(precision)
|
|
7
|
+
return parseFloat(`${amount}`).toFixed(Number(precision));
|
|
8
8
|
};
|
|
9
9
|
const formatMoney = function(cents, format) {
|
|
10
10
|
let value = '';
|
package/dist/cjs/index.js
CHANGED
|
@@ -19,7 +19,6 @@ var ModalContext = require('./contexts/ModalContext.js');
|
|
|
19
19
|
var ArticleListContext = require('./contexts/ArticleListContext.js');
|
|
20
20
|
var ArticleContext = require('./contexts/ArticleContext.js');
|
|
21
21
|
var pageViewUp_generated = require('./graphql/mutations/page-view-up.generated.js');
|
|
22
|
-
var publishedShopMetas = require('./graphql/queries/published-shop-metas.js');
|
|
23
22
|
var collectionDetailFilter_generated = require('./graphql/queries/collection-detail-filter.generated.js');
|
|
24
23
|
var collection_generated = require('./graphql/queries/collection.generated.js');
|
|
25
24
|
var collections_generated = require('./graphql/queries/collections.generated.js');
|
|
@@ -27,12 +26,14 @@ var publishedThemePages_generated = require('./graphql/queries/published-theme-p
|
|
|
27
26
|
var products_generated = require('./graphql/queries/products.generated.js');
|
|
28
27
|
var storeProperty_generated = require('./graphql/queries/store-property.generated.js');
|
|
29
28
|
var previewPage_generated = require('./graphql/queries/preview-page.generated.js');
|
|
29
|
+
var publishedShopMetas_generated = require('./graphql/queries/published-shop-metas.generated.js');
|
|
30
30
|
var shopShopify_generated = require('./graphql/queries/shop-shopify.generated.js');
|
|
31
31
|
var LibraryTemplate_generated = require('./graphql-app-api/queries/LibraryTemplate.generated.js');
|
|
32
32
|
var ThemePage_generated = require('./graphql-app-api/queries/ThemePage.generated.js');
|
|
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');
|
|
@@ -154,7 +155,6 @@ exports.useArticleListStore = ArticleListContext.useArticleListStore;
|
|
|
154
155
|
exports.ArticleProvider = ArticleContext.ArticleProvider;
|
|
155
156
|
exports.useArticleStore = ArticleContext.useArticleStore;
|
|
156
157
|
exports.PageViewUpDocument = pageViewUp_generated.PageViewUpDocument;
|
|
157
|
-
exports.PublishedShopMetasDocument = publishedShopMetas.PublishedShopMetasDocument;
|
|
158
158
|
exports.CollectionDetailFilterDocument = collectionDetailFilter_generated.CollectionDetailFilterDocument;
|
|
159
159
|
exports.CollectionDocument = collection_generated.CollectionDocument;
|
|
160
160
|
exports.CollectionsDocument = collections_generated.CollectionsDocument;
|
|
@@ -162,12 +162,14 @@ exports.PublishedThemePagesDocument = publishedThemePages_generated.PublishedThe
|
|
|
162
162
|
exports.ProductsDocument = products_generated.ProductsDocument;
|
|
163
163
|
exports.StorePropertyDocument = storeProperty_generated.StorePropertyDocument;
|
|
164
164
|
exports.PreviewThemePageDocument = previewPage_generated.PreviewThemePageDocument;
|
|
165
|
+
exports.PublishedShopMetasDocument = publishedShopMetas_generated.PublishedShopMetasDocument;
|
|
165
166
|
exports.ShopShopifyDocument = shopShopify_generated.ShopShopifyDocument;
|
|
166
167
|
exports.LibraryTemplateDocument = LibraryTemplate_generated.LibraryTemplateDocument;
|
|
167
168
|
exports.ThemePageDocument = ThemePage_generated.ThemePageDocument;
|
|
168
169
|
exports.SaleFunnelDiscountsDocument = SaleFunnelDiscounts_generated.SaleFunnelDiscountsDocument;
|
|
169
170
|
exports.LibrarySaleFunnelDocument = LibrarySaleFunnelDiscount_generated.LibrarySaleFunnelDocument;
|
|
170
171
|
exports.ShopLibraryPageDocument = ShopLibraryPage_generated.ShopLibraryPageDocument;
|
|
172
|
+
exports.SaleFunnelOfferDocument = SaleFunnelOffer_generated.SaleFunnelOfferDocument;
|
|
171
173
|
exports.composeBorderCss = borders.composeBorderCss;
|
|
172
174
|
exports.getBorderRadiusStyle = borders.getBorderRadiusStyle;
|
|
173
175
|
exports.getBorderStyle = borders.getBorderStyle;
|
|
@@ -96,9 +96,11 @@ const ComponentToolbarPreview = (props)=>{
|
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
const getSectionNumber = ()=>{
|
|
99
|
+
const getSectionNumber = useCallback(()=>{
|
|
100
100
|
return root?.childrens?.length || 0;
|
|
101
|
-
}
|
|
101
|
+
}, [
|
|
102
|
+
root?.childrens?.length
|
|
103
|
+
]);
|
|
102
104
|
const getDeleteTooltipPosition = useCallback(()=>{
|
|
103
105
|
if (props.tag == 'Section') return 'bottom';
|
|
104
106
|
const $toolbar = document.body.querySelector('#storefront')?.querySelector('[data-toolbar-active="true"]');
|
|
@@ -21,6 +21,11 @@ const createPageStoreProvider = (data)=>createStore((set)=>({
|
|
|
21
21
|
productOffers: productOffers
|
|
22
22
|
});
|
|
23
23
|
},
|
|
24
|
+
setDynamicDiscountOffer: (dynamicDiscountOffer)=>{
|
|
25
|
+
set({
|
|
26
|
+
dynamicDiscountOffer: dynamicDiscountOffer
|
|
27
|
+
});
|
|
28
|
+
},
|
|
24
29
|
setSalePageProductId: (id)=>{
|
|
25
30
|
set({
|
|
26
31
|
salePageProductId: id
|
|
@@ -70,11 +75,12 @@ const createPageStoreProvider = (data)=>createStore((set)=>({
|
|
|
70
75
|
}));
|
|
71
76
|
}
|
|
72
77
|
}));
|
|
73
|
-
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, publicStoreFrontData, ...passProps })=>{
|
|
78
|
+
const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, dynamicDiscountOffer, publicStoreFrontData, ...passProps })=>{
|
|
74
79
|
const store = useMemo(()=>createPageStoreProvider({
|
|
75
80
|
dynamicProduct,
|
|
76
81
|
dynamicCollection,
|
|
77
82
|
productOffers,
|
|
83
|
+
dynamicDiscountOffer,
|
|
78
84
|
publicStoreFrontData,
|
|
79
85
|
interactionData: {
|
|
80
86
|
selectType: 'ELEMENT'
|
|
@@ -83,6 +89,7 @@ const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffe
|
|
|
83
89
|
dynamicProduct,
|
|
84
90
|
dynamicCollection,
|
|
85
91
|
productOffers,
|
|
92
|
+
dynamicDiscountOffer,
|
|
86
93
|
publicStoreFrontData
|
|
87
94
|
]);
|
|
88
95
|
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 };
|
|
@@ -55,6 +55,7 @@ const useInteraction = ()=>{
|
|
|
55
55
|
element.dispatchEvent(eventDispatch);
|
|
56
56
|
};
|
|
57
57
|
const saveToElementInteractionData = (element, key, value)=>{
|
|
58
|
+
if (!element) return;
|
|
58
59
|
const interactionData = element.getAttribute('gp-data-interaction');
|
|
59
60
|
const interactionDataJson = JSON.parse(interactionData || '{}');
|
|
60
61
|
element.setAttribute('gp-data-interaction', JSON.stringify({
|
|
@@ -250,5 +250,29 @@ const StampedConfig = {
|
|
|
250
250
|
appId: 'a103faaf-2125-4b0e-89fa-de5149736723'
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
+
const EssentialCountdownTimerBarConfig = {
|
|
254
|
+
EssentialCountdownTimerBar: {
|
|
255
|
+
appName: 'essential-countdown',
|
|
256
|
+
appId: '722378e8-5a70-4eae-aa89-9e44e8e9f6de'
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
const EssentialAnnouncementBarConfig = {
|
|
260
|
+
EssentialAnnouncementBar: {
|
|
261
|
+
appName: 'essential-announcement',
|
|
262
|
+
appId: '93b5429f-c8d6-4c33-ae14-250fd84f361b'
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
const OkendoReviewsLoyaltyConfig = {
|
|
266
|
+
OkendoReviewsLoyalty: {
|
|
267
|
+
appName: 'okendo',
|
|
268
|
+
appId: 'bb689e69-ea70-4661-8fb7-ad24a2e23c29'
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
const EstimatedDeliveryDatePlusConfig = {
|
|
272
|
+
EstimatedDeliveryDatePlus: {
|
|
273
|
+
appName: 'estimated-delivery-date-plus',
|
|
274
|
+
appId: '4a0685bc-c234-45b2-8382-5ad6a8e3e3fd'
|
|
275
|
+
}
|
|
276
|
+
};
|
|
253
277
|
|
|
254
|
-
export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, PowerfulContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
|
|
278
|
+
export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, EssentialAnnouncementBarConfig, EssentialCountdownTimerBarConfig, EstimatedDeliveryDatePlusConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, OkendoReviewsLoyaltyConfig, PowerfulContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
|
|
@@ -188,6 +188,27 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
188
188
|
linkify: appSetting.linkify
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
+
case 'EssentialCountdownTimerBar':
|
|
192
|
+
{
|
|
193
|
+
return {
|
|
194
|
+
...currentSetting,
|
|
195
|
+
id: appSetting?.timerId
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
case 'EssentialAnnouncementBar':
|
|
199
|
+
{
|
|
200
|
+
return {
|
|
201
|
+
...currentSetting,
|
|
202
|
+
id: appSetting?.announcementId
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
case 'OkendoReviewsLoyalty':
|
|
206
|
+
{
|
|
207
|
+
return {
|
|
208
|
+
...currentSetting,
|
|
209
|
+
product: appSetting?.['productHandle'] || '{{ product }}'
|
|
210
|
+
};
|
|
211
|
+
}
|
|
191
212
|
default:
|
|
192
213
|
return currentSetting;
|
|
193
214
|
}
|
|
@@ -985,7 +1006,59 @@ const Stamped = {
|
|
|
985
1006
|
}
|
|
986
1007
|
}
|
|
987
1008
|
};
|
|
1009
|
+
const EssentialCountdownTimerBar = {
|
|
1010
|
+
EssentialCountdownTimerBar: {
|
|
1011
|
+
'app-block': {
|
|
1012
|
+
id: ''
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
const EssentialAnnouncementBar = {
|
|
1017
|
+
EssentialAnnouncementBar: {
|
|
1018
|
+
'app-block': {
|
|
1019
|
+
id: ''
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
};
|
|
1023
|
+
const OkendoReviewsLoyalty = {
|
|
1024
|
+
OkendoReviewsLoyalty: {
|
|
1025
|
+
'reviews-widget': {
|
|
1026
|
+
product: '{{product}}',
|
|
1027
|
+
widget_type: 'reviews_widget'
|
|
1028
|
+
},
|
|
1029
|
+
'reviews-badge': {
|
|
1030
|
+
horizontal_alignment: 'center'
|
|
1031
|
+
},
|
|
1032
|
+
'media-carousel': {
|
|
1033
|
+
product: '{{product}}'
|
|
1034
|
+
},
|
|
1035
|
+
'media-grid': {
|
|
1036
|
+
product: '{{product}}'
|
|
1037
|
+
},
|
|
1038
|
+
'reviews-carousel': {
|
|
1039
|
+
show_heading: false,
|
|
1040
|
+
heading: '',
|
|
1041
|
+
badge_link: '',
|
|
1042
|
+
product: '{{product}}'
|
|
1043
|
+
},
|
|
1044
|
+
'star-rating': {
|
|
1045
|
+
product: '{{product}}'
|
|
1046
|
+
},
|
|
1047
|
+
'questions-widget': {
|
|
1048
|
+
product: '{{product}}'
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
const EstimatedDeliveryDatePlus = {
|
|
1053
|
+
EstimatedDeliveryDatePlus: {
|
|
1054
|
+
delivery_coder_theme: null
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
988
1057
|
const composeSettingsByWidgetType = {
|
|
1058
|
+
...EstimatedDeliveryDatePlus,
|
|
1059
|
+
...OkendoReviewsLoyalty,
|
|
1060
|
+
...EssentialAnnouncementBar,
|
|
1061
|
+
...EssentialCountdownTimerBar,
|
|
989
1062
|
...Stamped,
|
|
990
1063
|
...TrustshopProductReviews,
|
|
991
1064
|
...HulkProductOptions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, GrowaveConfig, LoloyalLoyaltyReferralsConfig, PowerfulContactFormBuilderConfig, WishlistKingConfig, GloboProductOptionsVariantConfig, KachingBundlesConfig, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, TrustooConfig, LooxReviewsConfig, SeoantTrustBadgesIconConfig, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig } from './appConfig.js';
|
|
1
|
+
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, GrowaveConfig, LoloyalLoyaltyReferralsConfig, PowerfulContactFormBuilderConfig, WishlistKingConfig, GloboProductOptionsVariantConfig, KachingBundlesConfig, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, TrustooConfig, LooxReviewsConfig, SeoantTrustBadgesIconConfig, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig, OkendoReviewsLoyaltyConfig, EstimatedDeliveryDatePlusConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -42,7 +42,11 @@ const mapShopifyAppMeta = {
|
|
|
42
42
|
...MyappgurusProductReviewsConfig,
|
|
43
43
|
...HulkProductOptionsConfig,
|
|
44
44
|
...TrustshopProductReviewsConfig,
|
|
45
|
-
...StampedConfig
|
|
45
|
+
...StampedConfig,
|
|
46
|
+
...EssentialCountdownTimerBarConfig,
|
|
47
|
+
...EssentialAnnouncementBarConfig,
|
|
48
|
+
...OkendoReviewsLoyaltyConfig,
|
|
49
|
+
...EstimatedDeliveryDatePlusConfig
|
|
46
50
|
};
|
|
47
51
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
48
52
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMoneyFormat } from './shop.js';
|
|
3
3
|
|
|
4
4
|
const shopifyPriceRounding = (amount, precision)=>{
|
|
5
|
-
return parseFloat(`${amount}`).toFixed(Number(precision)
|
|
5
|
+
return parseFloat(`${amount}`).toFixed(Number(precision));
|
|
6
6
|
};
|
|
7
7
|
const formatMoney = function(cents, format) {
|
|
8
8
|
let value = '';
|
package/dist/esm/index.js
CHANGED
|
@@ -17,7 +17,6 @@ export { ModalProvider, useModalStore } from './contexts/ModalContext.js';
|
|
|
17
17
|
export { ArticleListProvider, useArticleListStore } from './contexts/ArticleListContext.js';
|
|
18
18
|
export { ArticleProvider, useArticleStore } from './contexts/ArticleContext.js';
|
|
19
19
|
export { PageViewUpDocument } from './graphql/mutations/page-view-up.generated.js';
|
|
20
|
-
export { PublishedShopMetasDocument } from './graphql/queries/published-shop-metas.js';
|
|
21
20
|
export { CollectionDetailFilterDocument } from './graphql/queries/collection-detail-filter.generated.js';
|
|
22
21
|
export { CollectionDocument } from './graphql/queries/collection.generated.js';
|
|
23
22
|
export { CollectionsDocument } from './graphql/queries/collections.generated.js';
|
|
@@ -25,12 +24,14 @@ export { PublishedThemePagesDocument } from './graphql/queries/published-theme-p
|
|
|
25
24
|
export { ProductsDocument } from './graphql/queries/products.generated.js';
|
|
26
25
|
export { StorePropertyDocument } from './graphql/queries/store-property.generated.js';
|
|
27
26
|
export { PreviewThemePageDocument } from './graphql/queries/preview-page.generated.js';
|
|
27
|
+
export { PublishedShopMetasDocument } from './graphql/queries/published-shop-metas.generated.js';
|
|
28
28
|
export { ShopShopifyDocument } from './graphql/queries/shop-shopify.generated.js';
|
|
29
29
|
export { LibraryTemplateDocument } from './graphql-app-api/queries/LibraryTemplate.generated.js';
|
|
30
30
|
export { ThemePageDocument } from './graphql-app-api/queries/ThemePage.generated.js';
|
|
31
31
|
export { SaleFunnelDiscountsDocument } from './graphql-app-api/queries/SaleFunnelDiscounts.generated.js';
|
|
32
32
|
export { LibrarySaleFunnelDocument } from './graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js';
|
|
33
33
|
export { ShopLibraryPageDocument } from './graphql-app-api/queries/ShopLibraryPage.generated.js';
|
|
34
|
+
export { SaleFunnelOfferDocument } from './graphql-app-api/queries/SaleFunnelOffer.generated.js';
|
|
34
35
|
export { composeBorderCss, getBorderRadiusStyle, getBorderStyle, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn } from './helpers/borders.js';
|
|
35
36
|
export { getCarouselContainerHeight, makeContainerWidthOrHeight, makeDotGapToCarouselStyle } from './helpers/carousel.js';
|
|
36
37
|
export { cls } from './helpers/cls.js';
|