@gem-sdk/core 1.46.1 → 1.47.0-dev.4
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 +156 -106
- package/dist/cjs/components/ComponentWrapperPreview.js +16 -2
- package/dist/cjs/components/InteractionSuffix.js +107 -0
- package/dist/cjs/components/Render.liquid.js +21 -6
- package/dist/cjs/components/RenderPreview.js +1 -0
- package/dist/cjs/components/constant.js +2 -1
- package/dist/cjs/contexts/PageContext.js +29 -1
- package/dist/cjs/contexts/SectionContext.js +0 -1
- package/dist/cjs/helpers/align.js +19 -0
- package/dist/cjs/helpers/colors.js +1 -1
- package/dist/cjs/helpers/shadow.js +1 -1
- package/dist/cjs/helpers/third-party/appConfig.js +14 -0
- package/dist/cjs/helpers/third-party/appSetting.js +22 -0
- package/dist/cjs/helpers/third-party/constant.js +3 -1
- package/dist/cjs/hooks/animation/useApplyAnimation.js +1 -0
- package/dist/cjs/hooks/useFormatMoney.js +61 -60
- package/dist/cjs/hooks/useInteraction.js +19 -0
- package/dist/cjs/hooks/useProduct.js +2 -1
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/types/custom.js +44 -0
- package/dist/esm/components/ComponentToolbarPreview.js +156 -106
- package/dist/esm/components/ComponentWrapperPreview.js +16 -2
- package/dist/esm/components/InteractionSuffix.js +105 -0
- package/dist/esm/components/Render.liquid.js +21 -6
- package/dist/esm/components/RenderPreview.js +1 -0
- package/dist/esm/components/constant.js +2 -1
- package/dist/esm/contexts/PageContext.js +29 -1
- package/dist/esm/contexts/SectionContext.js +0 -1
- package/dist/esm/helpers/align.js +17 -0
- package/dist/esm/helpers/colors.js +1 -1
- package/dist/esm/helpers/shadow.js +1 -1
- package/dist/esm/helpers/third-party/appConfig.js +13 -1
- package/dist/esm/helpers/third-party/appSetting.js +22 -0
- package/dist/esm/helpers/third-party/constant.js +4 -2
- package/dist/esm/hooks/animation/useApplyAnimation.js +1 -0
- package/dist/esm/hooks/useFormatMoney.js +61 -61
- package/dist/esm/hooks/useInteraction.js +17 -0
- package/dist/esm/hooks/useProduct.js +2 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/types/custom.js +44 -0
- package/dist/types/index.d.ts +169 -6
- package/package.json +3 -3
|
@@ -10,7 +10,6 @@ const SectionContext = /*#__PURE__*/ react.createContext(null);
|
|
|
10
10
|
const createSectionProvider = (data)=>zustand.createStore((set, get)=>({
|
|
11
11
|
data: data ?? {},
|
|
12
12
|
getSection: (id)=>{
|
|
13
|
-
console.log('get().data', get().data);
|
|
14
13
|
const section = get().data[id];
|
|
15
14
|
return section ?? undefined;
|
|
16
15
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const convertTextAlignToJustify = (align)=>{
|
|
4
|
+
const devices = [
|
|
5
|
+
'desktop',
|
|
6
|
+
'tablet',
|
|
7
|
+
'mobile'
|
|
8
|
+
];
|
|
9
|
+
const result = {};
|
|
10
|
+
devices.forEach((device)=>{
|
|
11
|
+
const deviceType = device === 'desktop' ? '' : `${device}:`;
|
|
12
|
+
result[`${deviceType}gp-justify-start`] = align?.[device] === 'left';
|
|
13
|
+
result[`${deviceType}gp-justify-center`] = align?.[device] === 'center';
|
|
14
|
+
result[`${deviceType}gp-justify-end`] = align?.[device] === 'right';
|
|
15
|
+
});
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.convertTextAlignToJustify = convertTextAlignToJustify;
|
|
@@ -119,7 +119,7 @@ const getGlobalColorStateStyle = (type, data)=>{
|
|
|
119
119
|
return Object.fromEntries(Object.entries(data).map(([state, value])=>{
|
|
120
120
|
if (state === 'active') return [];
|
|
121
121
|
return [
|
|
122
|
-
`-${constant.stateMapping?.[state]}-${type}`,
|
|
122
|
+
`-${constant.stateMapping?.[state] || ''}-${type}`,
|
|
123
123
|
getSingleColorVariable(value)
|
|
124
124
|
];
|
|
125
125
|
}).filter(isDefined.isDefined));
|
|
@@ -27,7 +27,7 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
|
|
|
27
27
|
if (typeof value.distance == 'undefined') return {};
|
|
28
28
|
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
29
29
|
return {
|
|
30
|
-
[`-${!isActiveState ? constant.stateMapping?.[state] : ''}-${getShortname.getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${colors.getSingleColorVariable(value?.color)}` : 'none'
|
|
30
|
+
[`-${!isActiveState ? constant.stateMapping?.[state] || '' : ''}-${getShortname.getShortName(styleAppliedFor)}`]: isEnableShadow ? `${Math.cos(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${value?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${value?.blur} ${styleAppliedFor === 'box-shadow' ? value?.spread + ' ' : ''}${colors.getSingleColorVariable(value?.color)}` : 'none'
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
|
|
@@ -42,10 +42,24 @@ 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
|
+
};
|
|
51
|
+
const PumperBundlesVolumeDiscountConfig = {
|
|
52
|
+
PumperBundlesVolumeDiscount: {
|
|
53
|
+
appName: 'Pumper Bundles Volume Discount',
|
|
54
|
+
appId: '0856870d-2aca-4b1e-a662-cf1797f61270'
|
|
55
|
+
}
|
|
56
|
+
};
|
|
45
57
|
|
|
46
58
|
exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
47
59
|
exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
|
|
60
|
+
exports.PumperBundlesVolumeDiscountConfig = PumperBundlesVolumeDiscountConfig;
|
|
48
61
|
exports.RechargeSubscriptionsConfig = RechargeSubscriptionsConfig;
|
|
62
|
+
exports.ReviewxpoProductReviewsAppConfig = ReviewxpoProductReviewsAppConfig;
|
|
49
63
|
exports.SelleasyConfig = SelleasyConfig;
|
|
50
64
|
exports.ShopifyFormsConfig = ShopifyFormsConfig;
|
|
51
65
|
exports.SkioSubscriptionsYcS20Config = SkioSubscriptionsYcS20Config;
|
|
@@ -85,7 +85,29 @@ 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
|
+
};
|
|
100
|
+
const PumperBundlesVolumeDiscount = {
|
|
101
|
+
PumperBundlesVolumeDiscount: {
|
|
102
|
+
'app-block': {
|
|
103
|
+
selected_product: '{{product}}',
|
|
104
|
+
using_page_builder: false
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
88
108
|
const composeSettingsByWidgetType = {
|
|
109
|
+
...PumperBundlesVolumeDiscount,
|
|
110
|
+
...ReviewxpoProductReviewsApp,
|
|
89
111
|
...ShopifyForms,
|
|
90
112
|
...SkioSubscriptionsYcS20,
|
|
91
113
|
...LoopSubscriptions,
|
|
@@ -9,7 +9,9 @@ const mapShopifyAppMeta = {
|
|
|
9
9
|
...appConfig.SelleasyConfig,
|
|
10
10
|
...appConfig.LoopSubscriptionsConfig,
|
|
11
11
|
...appConfig.SkioSubscriptionsYcS20Config,
|
|
12
|
-
...appConfig.ShopifyFormsConfig
|
|
12
|
+
...appConfig.ShopifyFormsConfig,
|
|
13
|
+
...appConfig.ReviewxpoProductReviewsAppConfig,
|
|
14
|
+
...appConfig.PumperBundlesVolumeDiscountConfig
|
|
13
15
|
};
|
|
14
16
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
15
17
|
|
|
@@ -8,6 +8,7 @@ var useAnimationTarget = require('./useAnimationTarget.js');
|
|
|
8
8
|
var useAnimationConfig = require('./useAnimationConfig.js');
|
|
9
9
|
var useAnimationActions = require('./useAnimationActions.js');
|
|
10
10
|
var useAnimationPreview = require('./useAnimationPreview.js');
|
|
11
|
+
require('../../types/custom.js');
|
|
11
12
|
var animations = require('../../types/animations.js');
|
|
12
13
|
|
|
13
14
|
const useApplyAnimation = ({ props })=>{
|
|
@@ -5,70 +5,71 @@ var shop = require('./shop.js');
|
|
|
5
5
|
const shopifyPriceRounding = (amount, precision)=>{
|
|
6
6
|
return parseFloat(`${amount}`).toFixed(Number(precision) + 1).slice(0, -1);
|
|
7
7
|
};
|
|
8
|
+
const formatMoney = function(cents, format) {
|
|
9
|
+
let value = '';
|
|
10
|
+
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
11
|
+
const formatString = format || '${{amount}}';
|
|
12
|
+
/**
|
|
13
|
+
* check default
|
|
14
|
+
* @param opt opt
|
|
15
|
+
* @param def def
|
|
16
|
+
* @returns any
|
|
17
|
+
*/ function defaultOption(opt, def) {
|
|
18
|
+
return typeof opt == 'undefined' ? def : opt;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* formatWithDelimiters
|
|
22
|
+
* @param number number
|
|
23
|
+
* @param precision precision
|
|
24
|
+
* @param thousands thousands
|
|
25
|
+
* @param decimal decimal
|
|
26
|
+
* @returns any
|
|
27
|
+
*/ // eslint-disable-next-line max-params
|
|
28
|
+
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
29
|
+
precision = defaultOption(precision, 2);
|
|
30
|
+
thousands = defaultOption(thousands, ',');
|
|
31
|
+
decimal = defaultOption(decimal, '.');
|
|
32
|
+
if (isNaN(number) || number == null) {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
36
|
+
number = shopifyPriceRounding(number, Number(precision));
|
|
37
|
+
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
38
|
+
return dollars + cents;
|
|
39
|
+
}
|
|
40
|
+
switch(formatString.match(placeholderRegex)[1]){
|
|
41
|
+
case 'amount':
|
|
42
|
+
value = formatWithDelimiters(cents, 2);
|
|
43
|
+
break;
|
|
44
|
+
case 'amount_no_decimals':
|
|
45
|
+
value = formatWithDelimiters(cents, 0);
|
|
46
|
+
break;
|
|
47
|
+
case 'amount_with_comma_separator':
|
|
48
|
+
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
49
|
+
break;
|
|
50
|
+
case 'amount_no_decimals_with_comma_separator':
|
|
51
|
+
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
52
|
+
break;
|
|
53
|
+
case 'amount_with_apostrophe_separator':
|
|
54
|
+
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
55
|
+
break;
|
|
56
|
+
case 'amount_no_decimals_with_space_separator':
|
|
57
|
+
value = formatWithDelimiters(cents, 0, ' ');
|
|
58
|
+
break;
|
|
59
|
+
case 'amount_with_space_separator':
|
|
60
|
+
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
61
|
+
break;
|
|
62
|
+
case 'amount_with_period_and_space_separator':
|
|
63
|
+
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return formatString.replace(placeholderRegex, value);
|
|
67
|
+
};
|
|
8
68
|
const useFormatMoney = (amount, withCurrency)=>{
|
|
9
69
|
const { moneyFormat, moneyWithCurrencyFormat } = shop.useMoneyFormat();
|
|
10
|
-
const formatMoney = function(cents, format) {
|
|
11
|
-
let value = '';
|
|
12
|
-
const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
|
|
13
|
-
const formatString = format || '${{amount}}';
|
|
14
|
-
/**
|
|
15
|
-
* check default
|
|
16
|
-
* @param opt opt
|
|
17
|
-
* @param def def
|
|
18
|
-
* @returns any
|
|
19
|
-
*/ function defaultOption(opt, def) {
|
|
20
|
-
return typeof opt == 'undefined' ? def : opt;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* formatWithDelimiters
|
|
24
|
-
* @param number number
|
|
25
|
-
* @param precision precision
|
|
26
|
-
* @param thousands thousands
|
|
27
|
-
* @param decimal decimal
|
|
28
|
-
* @returns any
|
|
29
|
-
*/ // eslint-disable-next-line max-params
|
|
30
|
-
function formatWithDelimiters(number, precision, thousands, decimal) {
|
|
31
|
-
precision = defaultOption(precision, 2);
|
|
32
|
-
thousands = defaultOption(thousands, ',');
|
|
33
|
-
decimal = defaultOption(decimal, '.');
|
|
34
|
-
if (isNaN(number) || number == null) {
|
|
35
|
-
return 0;
|
|
36
|
-
}
|
|
37
|
-
// shopify làm tròn bằng cách cắt đi các số ở đằng sau chứ không sử dụng toFixed để làm tròn như toán học
|
|
38
|
-
number = shopifyPriceRounding(number, Number(precision));
|
|
39
|
-
const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
|
|
40
|
-
return dollars + cents;
|
|
41
|
-
}
|
|
42
|
-
switch(formatString.match(placeholderRegex)[1]){
|
|
43
|
-
case 'amount':
|
|
44
|
-
value = formatWithDelimiters(cents, 2);
|
|
45
|
-
break;
|
|
46
|
-
case 'amount_no_decimals':
|
|
47
|
-
value = formatWithDelimiters(cents, 0);
|
|
48
|
-
break;
|
|
49
|
-
case 'amount_with_comma_separator':
|
|
50
|
-
value = formatWithDelimiters(cents, 2, '.', ',');
|
|
51
|
-
break;
|
|
52
|
-
case 'amount_no_decimals_with_comma_separator':
|
|
53
|
-
value = formatWithDelimiters(cents, 0, '.', ',');
|
|
54
|
-
break;
|
|
55
|
-
case 'amount_with_apostrophe_separator':
|
|
56
|
-
value = formatWithDelimiters(cents, 2, "'", '.');
|
|
57
|
-
break;
|
|
58
|
-
case 'amount_no_decimals_with_space_separator':
|
|
59
|
-
value = formatWithDelimiters(cents, 0, ' ');
|
|
60
|
-
break;
|
|
61
|
-
case 'amount_with_space_separator':
|
|
62
|
-
value = formatWithDelimiters(cents, 2, ' ', ',');
|
|
63
|
-
break;
|
|
64
|
-
case 'amount_with_period_and_space_separator':
|
|
65
|
-
value = formatWithDelimiters(cents, 2, ' ', '.');
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
return formatString.replace(placeholderRegex, value);
|
|
69
|
-
};
|
|
70
70
|
return withCurrency ? formatMoney(`${amount}`, moneyWithCurrencyFormat || moneyFormat) : formatMoney(`${amount}`, moneyFormat);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
exports.formatMoney = formatMoney;
|
|
73
74
|
exports.shopifyPriceRounding = shopifyPriceRounding;
|
|
74
75
|
exports.useFormatMoney = useFormatMoney;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var PageContext = require('../contexts/PageContext.js');
|
|
4
|
+
|
|
5
|
+
const useInteraction = ()=>{
|
|
6
|
+
const interactionData = PageContext.usePageStore((state)=>state.interactionData);
|
|
7
|
+
const { item } = interactionData || {};
|
|
8
|
+
const getAnimationByUid = (uid)=>{
|
|
9
|
+
const targets = item?.targets;
|
|
10
|
+
const targetByUid = targets?.find((target)=>target.uid === uid);
|
|
11
|
+
const metaDataContainsAnimation = targetByUid?.events?.find((it)=>it.condition?.metaData?.animation);
|
|
12
|
+
return metaDataContainsAnimation?.condition?.metaData?.animation;
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
getAnimationByUid
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.useInteraction = useInteraction;
|
|
@@ -9,6 +9,7 @@ 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');
|
|
12
13
|
require('vanilla-lazyload');
|
|
13
14
|
require('./useCartUI.js');
|
|
14
15
|
var variant = require('../helpers/variant.js');
|
|
@@ -205,7 +206,7 @@ const useProductOfferDiscount = ()=>{
|
|
|
205
206
|
const price = currentVariant?.price || 0;
|
|
206
207
|
currentDiscount = currentDiscount * price / 100;
|
|
207
208
|
}
|
|
208
|
-
return currentDiscount
|
|
209
|
+
return currentDiscount ? parseFloat(useFormatMoney.shopifyPriceRounding(currentDiscount, 2)) : 0;
|
|
209
210
|
};
|
|
210
211
|
|
|
211
212
|
exports.useCheckAvailableVariantInStock = useCheckAvailableVariantInStock;
|
package/dist/cjs/index.js
CHANGED
|
@@ -60,6 +60,7 @@ var iconList = require('./helpers/icon-list.js');
|
|
|
60
60
|
var isDefined = require('./helpers/is-defined.js');
|
|
61
61
|
var layout = require('./helpers/layout.js');
|
|
62
62
|
var makeStyle = require('./helpers/make-style.js');
|
|
63
|
+
var align = require('./helpers/align.js');
|
|
63
64
|
var product = require('./helpers/product.js');
|
|
64
65
|
var query = require('./helpers/query.js');
|
|
65
66
|
var radius = require('./helpers/radius.js');
|
|
@@ -97,6 +98,7 @@ var useProductList = require('./hooks/useProductList.js');
|
|
|
97
98
|
var useSuspenseFetch = require('./hooks/useSuspenseFetch.js');
|
|
98
99
|
var useSwatchesOptions = require('./hooks/useSwatchesOptions.js');
|
|
99
100
|
var useInitialSwatchesOptions = require('./hooks/useInitialSwatchesOptions.js');
|
|
101
|
+
var custom = require('./types/custom.js');
|
|
100
102
|
var shop$1 = require('./types/shop.js');
|
|
101
103
|
var appAPI = require('./types/appAPI.js');
|
|
102
104
|
var globalStyle = require('./types/global-style.js');
|
|
@@ -243,6 +245,7 @@ exports.makeStyleResponsiveState = makeStyle.makeStyleResponsiveState;
|
|
|
243
245
|
exports.makeStyleState = makeStyle.makeStyleState;
|
|
244
246
|
exports.makeWidth = makeStyle.makeWidth;
|
|
245
247
|
exports.removeNullUndefined = makeStyle.removeNullUndefined;
|
|
248
|
+
exports.convertTextAlignToJustify = align.convertTextAlignToJustify;
|
|
246
249
|
exports.checkAvailableVariantInStock = product.checkAvailableVariantInStock;
|
|
247
250
|
exports.getSelectedVariant = product.getSelectedVariant;
|
|
248
251
|
exports.parseSelectedOption = product.parseSelectedOption;
|
|
@@ -317,6 +320,7 @@ exports.useProductQuery = useProductQuery.useProductQuery;
|
|
|
317
320
|
exports.useProductsQuery = useProductsQuery.useProductsQuery;
|
|
318
321
|
exports.useProductsQueryAll = useProductsQuery.useProductsQueryAll;
|
|
319
322
|
exports.useCurrentDevice = useCurrentDevice.useCurrentDevice;
|
|
323
|
+
exports.formatMoney = useFormatMoney.formatMoney;
|
|
320
324
|
exports.shopifyPriceRounding = useFormatMoney.shopifyPriceRounding;
|
|
321
325
|
exports.useFormatMoney = useFormatMoney.useFormatMoney;
|
|
322
326
|
exports.useLazyVideo = useLazyVideo.useLazyVideo;
|
|
@@ -355,6 +359,14 @@ exports.useProductListStyles = useProductList.useProductListStyles;
|
|
|
355
359
|
exports.useSuspenseFetch = useSuspenseFetch.default;
|
|
356
360
|
exports.useSwatchesOptions = useSwatchesOptions.default;
|
|
357
361
|
exports.useInitialSwatchesOptions = useInitialSwatchesOptions.default;
|
|
362
|
+
Object.defineProperty(exports, 'InteractionTargetEvent', {
|
|
363
|
+
enumerable: true,
|
|
364
|
+
get: function () { return custom.InteractionTargetEvent; }
|
|
365
|
+
});
|
|
366
|
+
Object.defineProperty(exports, 'InteractionTriggerEvent', {
|
|
367
|
+
enumerable: true,
|
|
368
|
+
get: function () { return custom.InteractionTriggerEvent; }
|
|
369
|
+
});
|
|
358
370
|
exports.ShopType = shop$1;
|
|
359
371
|
exports.AppAPIType = appAPI;
|
|
360
372
|
exports.OptionNormalStyle = globalStyle.OptionNormalStyle;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.InteractionTargetEvent = void 0;
|
|
4
|
+
(function(InteractionTargetEvent) {
|
|
5
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-background-color'] = 0] = 'gp:change-background-color';
|
|
6
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:run-animation'] = 1] = 'gp:run-animation';
|
|
7
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:toggle-element-visibility'] = 2] = 'gp:toggle-element-visibility';
|
|
8
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-text'] = 3] = 'gp:change-text';
|
|
9
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:scroll-to'] = 4] = 'gp:scroll-to';
|
|
10
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-text-style'] = 5] = 'gp:change-text-style';
|
|
11
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-content'] = 6] = 'gp:change-content';
|
|
12
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-button-style'] = 7] = 'gp:change-button-style';
|
|
13
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:copy-text'] = 8] = 'gp:copy-text';
|
|
14
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-image'] = 9] = 'gp:change-image';
|
|
15
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:toggle-video-play'] = 10] = 'gp:toggle-video-play';
|
|
16
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-slider-ratio'] = 11] = 'gp:change-slider-ratio';
|
|
17
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-icon-style'] = 12] = 'gp:change-icon-style';
|
|
18
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-expanded-item'] = 13] = 'gp:change-expanded-item';
|
|
19
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-active-item'] = 14] = 'gp:change-active-item';
|
|
20
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-slide'] = 15] = 'gp:change-slide';
|
|
21
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-image-step'] = 16] = 'gp:change-image-step';
|
|
22
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-text-value'] = 17] = 'gp:change-text-value';
|
|
23
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:toggle-popup-open'] = 18] = 'gp:toggle-popup-open';
|
|
24
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:show-or-hide'] = 19] = 'gp:show-or-hide';
|
|
25
|
+
})(exports.InteractionTargetEvent || (exports.InteractionTargetEvent = {}));
|
|
26
|
+
exports.InteractionTriggerEvent = void 0;
|
|
27
|
+
(function(InteractionTriggerEvent) {
|
|
28
|
+
InteractionTriggerEvent[InteractionTriggerEvent['click'] = 0] = 'click';
|
|
29
|
+
InteractionTriggerEvent[InteractionTriggerEvent["active"] = 1] = "active";
|
|
30
|
+
InteractionTriggerEvent[InteractionTriggerEvent['mouseover'] = 2] = 'mouseover';
|
|
31
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:appear'] = 3] = 'gp:appear';
|
|
32
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:item-selected'] = 4] = 'gp:item-selected';
|
|
33
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:item-unselected'] = 5] = 'gp:item-unselected';
|
|
34
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:item-hovered'] = 6] = 'gp:item-hovered';
|
|
35
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:item-click'] = 7] = 'gp:item-click';
|
|
36
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:after-submit'] = 8] = 'gp:after-submit';
|
|
37
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:quantity-change'] = 9] = 'gp:quantity-change';
|
|
38
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:after-checked-value'] = 10] = 'gp:after-checked-value';
|
|
39
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:after-add-to-cart'] = 11] = 'gp:after-add-to-cart';
|
|
40
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:popup-open'] = 12] = 'gp:popup-open';
|
|
41
|
+
InteractionTriggerEvent[InteractionTriggerEvent['gp:popup-close'] = 13] = 'gp:popup-close';
|
|
42
|
+
InteractionTriggerEvent[InteractionTriggerEvent['scroll-up'] = 14] = 'scroll-up';
|
|
43
|
+
InteractionTriggerEvent[InteractionTriggerEvent['scroll-down'] = 15] = 'scroll-down';
|
|
44
|
+
})(exports.InteractionTriggerEvent || (exports.InteractionTriggerEvent = {}));
|