@gem-sdk/core 1.47.0-staging.3 → 1.47.0-staging.7
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 +0 -1
- package/dist/cjs/helpers/third-party/appConfig.js +7 -0
- package/dist/cjs/helpers/third-party/appSetting.js +13 -0
- package/dist/cjs/helpers/third-party/constant.js +2 -1
- package/dist/cjs/hooks/useProduct.js +1 -2
- package/dist/esm/components/Render.liquid.js +0 -1
- package/dist/esm/helpers/third-party/appConfig.js +7 -1
- package/dist/esm/helpers/third-party/appSetting.js +13 -0
- package/dist/esm/helpers/third-party/constant.js +3 -2
- package/dist/esm/hooks/useProduct.js +1 -2
- package/package.json +1 -1
|
@@ -20,7 +20,6 @@ require('dayjs');
|
|
|
20
20
|
var composeAdvanceStyle = require('../helpers/compose-advance-style.js');
|
|
21
21
|
var convert = require('../helpers/convert.js');
|
|
22
22
|
var render = require('../helpers/render.js');
|
|
23
|
-
require('cssjson');
|
|
24
23
|
|
|
25
24
|
const componentsRenderWithParentId = [
|
|
26
25
|
'CarouselItem'
|
|
@@ -42,10 +42,17 @@ const ShopifyFormsConfig = {
|
|
|
42
42
|
appId: '8744a304-fcb1-4347-b211-bb6b4759a76a'
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
+
const ReviewxpoProductReviewsAppConfig = {
|
|
46
|
+
ReviewxpoProductReviewsApp: {
|
|
47
|
+
appName: 'reviewxpo-product-reviews-app',
|
|
48
|
+
appId: '3e3d94fa-8b53-4134-942c-f7662dc9282f'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
45
51
|
|
|
46
52
|
exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
47
53
|
exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
|
|
48
54
|
exports.RechargeSubscriptionsConfig = RechargeSubscriptionsConfig;
|
|
55
|
+
exports.ReviewxpoProductReviewsAppConfig = ReviewxpoProductReviewsAppConfig;
|
|
49
56
|
exports.SelleasyConfig = SelleasyConfig;
|
|
50
57
|
exports.ShopifyFormsConfig = ShopifyFormsConfig;
|
|
51
58
|
exports.SkioSubscriptionsYcS20Config = SkioSubscriptionsYcS20Config;
|
|
@@ -85,7 +85,20 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
85
85
|
return currentSetting;
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
+
const ReviewxpoProductReviewsApp = {
|
|
89
|
+
ReviewxpoProductReviewsApp: {
|
|
90
|
+
'five-star-badge-widget': null,
|
|
91
|
+
'allreviews-widget': null,
|
|
92
|
+
'carousel-widget': null,
|
|
93
|
+
'gallery-widget': null,
|
|
94
|
+
'badge-widget': null,
|
|
95
|
+
'testimonial-widget': null,
|
|
96
|
+
'star-widget': null,
|
|
97
|
+
'revews-widget': null
|
|
98
|
+
}
|
|
99
|
+
};
|
|
88
100
|
const composeSettingsByWidgetType = {
|
|
101
|
+
...ReviewxpoProductReviewsApp,
|
|
89
102
|
...ShopifyForms,
|
|
90
103
|
...SkioSubscriptionsYcS20,
|
|
91
104
|
...LoopSubscriptions,
|
|
@@ -9,7 +9,8 @@ const mapShopifyAppMeta = {
|
|
|
9
9
|
...appConfig.SelleasyConfig,
|
|
10
10
|
...appConfig.LoopSubscriptionsConfig,
|
|
11
11
|
...appConfig.SkioSubscriptionsYcS20Config,
|
|
12
|
-
...appConfig.ShopifyFormsConfig
|
|
12
|
+
...appConfig.ShopifyFormsConfig,
|
|
13
|
+
...appConfig.ReviewxpoProductReviewsAppConfig
|
|
13
14
|
};
|
|
14
15
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
15
16
|
|
|
@@ -9,7 +9,6 @@ var PageContext = require('../contexts/PageContext.js');
|
|
|
9
9
|
require('@gem-sdk/adapter-shopify');
|
|
10
10
|
require('swr/mutation');
|
|
11
11
|
require('swr/infinite');
|
|
12
|
-
var useFormatMoney = require('./useFormatMoney.js');
|
|
13
12
|
require('vanilla-lazyload');
|
|
14
13
|
require('./useCartUI.js');
|
|
15
14
|
var variant = require('../helpers/variant.js');
|
|
@@ -206,7 +205,7 @@ const useProductOfferDiscount = ()=>{
|
|
|
206
205
|
const price = currentVariant?.price || 0;
|
|
207
206
|
currentDiscount = currentDiscount * price / 100;
|
|
208
207
|
}
|
|
209
|
-
return currentDiscount
|
|
208
|
+
return currentDiscount || 0;
|
|
210
209
|
};
|
|
211
210
|
|
|
212
211
|
exports.useCheckAvailableVariantInStock = useCheckAvailableVariantInStock;
|
|
@@ -16,7 +16,6 @@ import 'dayjs';
|
|
|
16
16
|
import { composeAdvanceStyle } from '../helpers/compose-advance-style.js';
|
|
17
17
|
import { baseAssetURL, isLocalEnv } from '../helpers/convert.js';
|
|
18
18
|
import { RenderIf, template } from '../helpers/render.js';
|
|
19
|
-
import 'cssjson';
|
|
20
19
|
|
|
21
20
|
const componentsRenderWithParentId = [
|
|
22
21
|
'CarouselItem'
|
|
@@ -40,5 +40,11 @@ const ShopifyFormsConfig = {
|
|
|
40
40
|
appId: '8744a304-fcb1-4347-b211-bb6b4759a76a'
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
+
const ReviewxpoProductReviewsAppConfig = {
|
|
44
|
+
ReviewxpoProductReviewsApp: {
|
|
45
|
+
appName: 'reviewxpo-product-reviews-app',
|
|
46
|
+
appId: '3e3d94fa-8b53-4134-942c-f7662dc9282f'
|
|
47
|
+
}
|
|
48
|
+
};
|
|
43
49
|
|
|
44
|
-
export { BonLoyaltyRewardsReferralsConfig, LoopSubscriptionsConfig, RechargeSubscriptionsConfig, SelleasyConfig, ShopifyFormsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig };
|
|
50
|
+
export { BonLoyaltyRewardsReferralsConfig, LoopSubscriptionsConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig };
|
|
@@ -83,7 +83,20 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
83
83
|
return currentSetting;
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
+
const ReviewxpoProductReviewsApp = {
|
|
87
|
+
ReviewxpoProductReviewsApp: {
|
|
88
|
+
'five-star-badge-widget': null,
|
|
89
|
+
'allreviews-widget': null,
|
|
90
|
+
'carousel-widget': null,
|
|
91
|
+
'gallery-widget': null,
|
|
92
|
+
'badge-widget': null,
|
|
93
|
+
'testimonial-widget': null,
|
|
94
|
+
'star-widget': null,
|
|
95
|
+
'revews-widget': null
|
|
96
|
+
}
|
|
97
|
+
};
|
|
86
98
|
const composeSettingsByWidgetType = {
|
|
99
|
+
...ReviewxpoProductReviewsApp,
|
|
87
100
|
...ShopifyForms,
|
|
88
101
|
...SkioSubscriptionsYcS20,
|
|
89
102
|
...LoopSubscriptions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig } from './appConfig.js';
|
|
1
|
+
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -7,7 +7,8 @@ const mapShopifyAppMeta = {
|
|
|
7
7
|
...SelleasyConfig,
|
|
8
8
|
...LoopSubscriptionsConfig,
|
|
9
9
|
...SkioSubscriptionsYcS20Config,
|
|
10
|
-
...ShopifyFormsConfig
|
|
10
|
+
...ShopifyFormsConfig,
|
|
11
|
+
...ReviewxpoProductReviewsAppConfig
|
|
11
12
|
};
|
|
12
13
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
13
14
|
|
|
@@ -7,7 +7,6 @@ import { usePageStore } from '../contexts/PageContext.js';
|
|
|
7
7
|
import '@gem-sdk/adapter-shopify';
|
|
8
8
|
import 'swr/mutation';
|
|
9
9
|
import 'swr/infinite';
|
|
10
|
-
import { shopifyPriceRounding } from './useFormatMoney.js';
|
|
11
10
|
import 'vanilla-lazyload';
|
|
12
11
|
import './useCartUI.js';
|
|
13
12
|
import { checkInStock } from '../helpers/variant.js';
|
|
@@ -204,7 +203,7 @@ const useProductOfferDiscount = ()=>{
|
|
|
204
203
|
const price = currentVariant?.price || 0;
|
|
205
204
|
currentDiscount = currentDiscount * price / 100;
|
|
206
205
|
}
|
|
207
|
-
return currentDiscount
|
|
206
|
+
return currentDiscount || 0;
|
|
208
207
|
};
|
|
209
208
|
|
|
210
209
|
export { useCheckAvailableVariantInStock, useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useIsSyncProduct, useProduct, useProductOfferDiscount, useProductProperties, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants };
|