@gem-sdk/core 1.46.0 → 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.
Files changed (42) hide show
  1. package/dist/cjs/components/ComponentToolbarPreview.js +156 -106
  2. package/dist/cjs/components/ComponentWrapperPreview.js +16 -2
  3. package/dist/cjs/components/InteractionSuffix.js +107 -0
  4. package/dist/cjs/components/Render.liquid.js +23 -19
  5. package/dist/cjs/components/RenderPreview.js +1 -0
  6. package/dist/cjs/components/constant.js +2 -1
  7. package/dist/cjs/contexts/PageContext.js +29 -1
  8. package/dist/cjs/contexts/SectionContext.js +0 -1
  9. package/dist/cjs/helpers/align.js +19 -0
  10. package/dist/cjs/helpers/colors.js +1 -1
  11. package/dist/cjs/helpers/shadow.js +1 -1
  12. package/dist/cjs/helpers/third-party/appConfig.js +14 -0
  13. package/dist/cjs/helpers/third-party/appSetting.js +22 -0
  14. package/dist/cjs/helpers/third-party/constant.js +3 -1
  15. package/dist/cjs/hooks/animation/useApplyAnimation.js +1 -0
  16. package/dist/cjs/hooks/useFormatMoney.js +61 -60
  17. package/dist/cjs/hooks/useInteraction.js +19 -0
  18. package/dist/cjs/hooks/useProduct.js +2 -1
  19. package/dist/cjs/index.js +12 -0
  20. package/dist/cjs/types/custom.js +44 -0
  21. package/dist/esm/components/ComponentToolbarPreview.js +156 -106
  22. package/dist/esm/components/ComponentWrapperPreview.js +16 -2
  23. package/dist/esm/components/InteractionSuffix.js +105 -0
  24. package/dist/esm/components/Render.liquid.js +23 -19
  25. package/dist/esm/components/RenderPreview.js +1 -0
  26. package/dist/esm/components/constant.js +2 -1
  27. package/dist/esm/contexts/PageContext.js +29 -1
  28. package/dist/esm/contexts/SectionContext.js +0 -1
  29. package/dist/esm/helpers/align.js +17 -0
  30. package/dist/esm/helpers/colors.js +1 -1
  31. package/dist/esm/helpers/shadow.js +1 -1
  32. package/dist/esm/helpers/third-party/appConfig.js +13 -1
  33. package/dist/esm/helpers/third-party/appSetting.js +22 -0
  34. package/dist/esm/helpers/third-party/constant.js +4 -2
  35. package/dist/esm/hooks/animation/useApplyAnimation.js +1 -0
  36. package/dist/esm/hooks/useFormatMoney.js +61 -61
  37. package/dist/esm/hooks/useInteraction.js +17 -0
  38. package/dist/esm/hooks/useProduct.js +2 -1
  39. package/dist/esm/index.js +3 -1
  40. package/dist/esm/types/custom.js +44 -0
  41. package/dist/types/index.d.ts +169 -6
  42. package/package.json +3 -3
@@ -29,6 +29,31 @@ const createPageStoreProvider = (data)=>createStore((set)=>({
29
29
  set({
30
30
  publicStoreFrontData: publicStoreFrontData
31
31
  });
32
+ },
33
+ setInteractionIsSelectOnPage: (value)=>{
34
+ set((state)=>({
35
+ interactionData: {
36
+ ...state.interactionData,
37
+ isSelectOnPage: value
38
+ }
39
+ }));
40
+ },
41
+ setInteractionItem: (item)=>{
42
+ set((state)=>({
43
+ interactionData: {
44
+ ...state.interactionData,
45
+ item,
46
+ isSelectOnPage: state.interactionData?.isSelectOnPage || false
47
+ }
48
+ }));
49
+ },
50
+ setInteractionSelectType: (selectType)=>{
51
+ set((state)=>({
52
+ interactionData: {
53
+ ...state.interactionData,
54
+ selectType
55
+ }
56
+ }));
32
57
  }
33
58
  }));
34
59
  const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffers, publicStoreFrontData, ...passProps })=>{
@@ -36,7 +61,10 @@ const PageProvider = ({ children, dynamicProduct, dynamicCollection, productOffe
36
61
  dynamicProduct,
37
62
  dynamicCollection,
38
63
  productOffers,
39
- publicStoreFrontData
64
+ publicStoreFrontData,
65
+ interactionData: {
66
+ selectType: 'element'
67
+ }
40
68
  }), [
41
69
  dynamicProduct,
42
70
  dynamicCollection,
@@ -8,7 +8,6 @@ const SectionContext = /*#__PURE__*/ createContext(null);
8
8
  const createSectionProvider = (data)=>createStore((set, get)=>({
9
9
  data: data ?? {},
10
10
  getSection: (id)=>{
11
- console.log('get().data', get().data);
12
11
  const section = get().data[id];
13
12
  return section ?? undefined;
14
13
  },
@@ -0,0 +1,17 @@
1
+ const convertTextAlignToJustify = (align)=>{
2
+ const devices = [
3
+ 'desktop',
4
+ 'tablet',
5
+ 'mobile'
6
+ ];
7
+ const result = {};
8
+ devices.forEach((device)=>{
9
+ const deviceType = device === 'desktop' ? '' : `${device}:`;
10
+ result[`${deviceType}gp-justify-start`] = align?.[device] === 'left';
11
+ result[`${deviceType}gp-justify-center`] = align?.[device] === 'center';
12
+ result[`${deviceType}gp-justify-end`] = align?.[device] === 'right';
13
+ });
14
+ return result;
15
+ };
16
+
17
+ export { convertTextAlignToJustify };
@@ -117,7 +117,7 @@ const getGlobalColorStateStyle = (type, data)=>{
117
117
  return Object.fromEntries(Object.entries(data).map(([state, value])=>{
118
118
  if (state === 'active') return [];
119
119
  return [
120
- `-${stateMapping?.[state]}-${type}`,
120
+ `-${stateMapping?.[state] || ''}-${type}`,
121
121
  getSingleColorVariable(value)
122
122
  ];
123
123
  }).filter(isDefined));
@@ -25,7 +25,7 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
25
25
  if (typeof value.distance == 'undefined') return {};
26
26
  const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
27
27
  return {
28
- [`-${!isActiveState ? stateMapping?.[state] : ''}-${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 + ' ' : ''}${getSingleColorVariable(value?.color)}` : 'none'
28
+ [`-${!isActiveState ? stateMapping?.[state] || '' : ''}-${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 + ' ' : ''}${getSingleColorVariable(value?.color)}` : 'none'
29
29
  };
30
30
  };
31
31
  const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
@@ -40,5 +40,17 @@ 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
+ };
49
+ const PumperBundlesVolumeDiscountConfig = {
50
+ PumperBundlesVolumeDiscount: {
51
+ appName: 'Pumper Bundles Volume Discount',
52
+ appId: '0856870d-2aca-4b1e-a662-cf1797f61270'
53
+ }
54
+ };
43
55
 
44
- export { BonLoyaltyRewardsReferralsConfig, LoopSubscriptionsConfig, RechargeSubscriptionsConfig, SelleasyConfig, ShopifyFormsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig };
56
+ export { BonLoyaltyRewardsReferralsConfig, LoopSubscriptionsConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig };
@@ -83,7 +83,29 @@ 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
+ };
98
+ const PumperBundlesVolumeDiscount = {
99
+ PumperBundlesVolumeDiscount: {
100
+ 'app-block': {
101
+ selected_product: '{{product}}',
102
+ using_page_builder: false
103
+ }
104
+ }
105
+ };
86
106
  const composeSettingsByWidgetType = {
107
+ ...PumperBundlesVolumeDiscount,
108
+ ...ReviewxpoProductReviewsApp,
87
109
  ...ShopifyForms,
88
110
  ...SkioSubscriptionsYcS20,
89
111
  ...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, PumperBundlesVolumeDiscountConfig } from './appConfig.js';
2
2
 
3
3
  const mapShopifyAppMeta = {
4
4
  ...RechargeSubscriptionsConfig,
@@ -7,7 +7,9 @@ const mapShopifyAppMeta = {
7
7
  ...SelleasyConfig,
8
8
  ...LoopSubscriptionsConfig,
9
9
  ...SkioSubscriptionsYcS20Config,
10
- ...ShopifyFormsConfig
10
+ ...ShopifyFormsConfig,
11
+ ...ReviewxpoProductReviewsAppConfig,
12
+ ...PumperBundlesVolumeDiscountConfig
11
13
  };
12
14
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
13
15
 
@@ -4,6 +4,7 @@ import { useAnimationTarget } from './useAnimationTarget.js';
4
4
  import { useAnimationConfig } from './useAnimationConfig.js';
5
5
  import { useAnimationActions } from './useAnimationActions.js';
6
6
  import { useAnimationPreview } from './useAnimationPreview.js';
7
+ import '../../types/custom.js';
7
8
  import { AnimationType } from '../../types/animations.js';
8
9
 
9
10
  const useApplyAnimation = ({ props })=>{
@@ -3,69 +3,69 @@ import { useMoneyFormat } from './shop.js';
3
3
  const shopifyPriceRounding = (amount, precision)=>{
4
4
  return parseFloat(`${amount}`).toFixed(Number(precision) + 1).slice(0, -1);
5
5
  };
6
+ const formatMoney = function(cents, format) {
7
+ let value = '';
8
+ const placeholderRegex = /\{\{\s*(\w+)\s*\}\}/;
9
+ const formatString = format || '${{amount}}';
10
+ /**
11
+ * check default
12
+ * @param opt opt
13
+ * @param def def
14
+ * @returns any
15
+ */ function defaultOption(opt, def) {
16
+ return typeof opt == 'undefined' ? def : opt;
17
+ }
18
+ /**
19
+ * formatWithDelimiters
20
+ * @param number number
21
+ * @param precision precision
22
+ * @param thousands thousands
23
+ * @param decimal decimal
24
+ * @returns any
25
+ */ // eslint-disable-next-line max-params
26
+ function formatWithDelimiters(number, precision, thousands, decimal) {
27
+ precision = defaultOption(precision, 2);
28
+ thousands = defaultOption(thousands, ',');
29
+ decimal = defaultOption(decimal, '.');
30
+ if (isNaN(number) || number == null) {
31
+ return 0;
32
+ }
33
+ // 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
34
+ number = shopifyPriceRounding(number, Number(precision));
35
+ const parts = number.split('.'), dollars = parts[0]?.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : '';
36
+ return dollars + cents;
37
+ }
38
+ switch(formatString.match(placeholderRegex)[1]){
39
+ case 'amount':
40
+ value = formatWithDelimiters(cents, 2);
41
+ break;
42
+ case 'amount_no_decimals':
43
+ value = formatWithDelimiters(cents, 0);
44
+ break;
45
+ case 'amount_with_comma_separator':
46
+ value = formatWithDelimiters(cents, 2, '.', ',');
47
+ break;
48
+ case 'amount_no_decimals_with_comma_separator':
49
+ value = formatWithDelimiters(cents, 0, '.', ',');
50
+ break;
51
+ case 'amount_with_apostrophe_separator':
52
+ value = formatWithDelimiters(cents, 2, "'", '.');
53
+ break;
54
+ case 'amount_no_decimals_with_space_separator':
55
+ value = formatWithDelimiters(cents, 0, ' ');
56
+ break;
57
+ case 'amount_with_space_separator':
58
+ value = formatWithDelimiters(cents, 2, ' ', ',');
59
+ break;
60
+ case 'amount_with_period_and_space_separator':
61
+ value = formatWithDelimiters(cents, 2, ' ', '.');
62
+ break;
63
+ }
64
+ return formatString.replace(placeholderRegex, value);
65
+ };
6
66
  const useFormatMoney = (amount, withCurrency)=>{
7
67
  const { moneyFormat, moneyWithCurrencyFormat } = useMoneyFormat();
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
- };
68
68
  return withCurrency ? formatMoney(`${amount}`, moneyWithCurrencyFormat || moneyFormat) : formatMoney(`${amount}`, moneyFormat);
69
69
  };
70
70
 
71
- export { shopifyPriceRounding, useFormatMoney };
71
+ export { formatMoney, shopifyPriceRounding, useFormatMoney };
@@ -0,0 +1,17 @@
1
+ import { usePageStore } from '../contexts/PageContext.js';
2
+
3
+ const useInteraction = ()=>{
4
+ const interactionData = usePageStore((state)=>state.interactionData);
5
+ const { item } = interactionData || {};
6
+ const getAnimationByUid = (uid)=>{
7
+ const targets = item?.targets;
8
+ const targetByUid = targets?.find((target)=>target.uid === uid);
9
+ const metaDataContainsAnimation = targetByUid?.events?.find((it)=>it.condition?.metaData?.animation);
10
+ return metaDataContainsAnimation?.condition?.metaData?.animation;
11
+ };
12
+ return {
13
+ getAnimationByUid
14
+ };
15
+ };
16
+
17
+ export { useInteraction };
@@ -7,6 +7,7 @@ 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';
10
11
  import 'vanilla-lazyload';
11
12
  import './useCartUI.js';
12
13
  import { checkInStock } from '../helpers/variant.js';
@@ -203,7 +204,7 @@ const useProductOfferDiscount = ()=>{
203
204
  const price = currentVariant?.price || 0;
204
205
  currentDiscount = currentDiscount * price / 100;
205
206
  }
206
- return currentDiscount || 0;
207
+ return currentDiscount ? parseFloat(shopifyPriceRounding(currentDiscount, 2)) : 0;
207
208
  };
208
209
 
209
210
  export { useCheckAvailableVariantInStock, useCurrentVariant, useCurrentVariantInStock, useFeaturedImageGlobal, useIsSyncProduct, useProduct, useProductOfferDiscount, useProductProperties, useQuantity, useSelectedOption, useUniqProductID, useVariant, useVariantOutStock, useVariants };
package/dist/esm/index.js CHANGED
@@ -61,6 +61,7 @@ export { composePositionLineHeight, composePostionIconList } from './helpers/ico
61
61
  export { isDefined } from './helpers/is-defined.js';
62
62
  export { composeGridLayout, convertOldLayout, gridToArrayRegex, optionLayoutStyle } from './helpers/layout.js';
63
63
  export { makeAspectRatio, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeWidth, removeNullUndefined } from './helpers/make-style.js';
64
+ export { convertTextAlignToJustify } from './helpers/align.js';
64
65
  export { checkAvailableVariantInStock, getSelectedVariant, parseSelectedOption } from './helpers/product.js';
65
66
  export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
66
67
  export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
@@ -81,7 +82,7 @@ export { useCollectionsQuery } from './hooks/shop/use-collections-query.js';
81
82
  export { useProductQuery } from './hooks/shop/use-product-query.js';
82
83
  export { useProductsQuery, useProductsQueryAll } from './hooks/shop/use-products-query.js';
83
84
  export { useCurrentDevice } from './hooks/use-current-device.js';
84
- export { shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
85
+ export { formatMoney, shopifyPriceRounding, useFormatMoney } from './hooks/useFormatMoney.js';
85
86
  export { useLazyVideo } from './hooks/use-lazy-video.js';
86
87
  export { default as useCartId } from './hooks/useCartId.js';
87
88
  export { default as useCartLine } from './hooks/useCartLine.js';
@@ -98,6 +99,7 @@ export { useProductList, useProductListProducts, useProductListSettings, useProd
98
99
  export { default as useSuspenseFetch } from './hooks/useSuspenseFetch.js';
99
100
  export { default as useSwatchesOptions } from './hooks/useSwatchesOptions.js';
100
101
  export { default as useInitialSwatchesOptions } from './hooks/useInitialSwatchesOptions.js';
102
+ export { InteractionTargetEvent, InteractionTriggerEvent } from './types/custom.js';
101
103
  import * as shop from './types/shop.js';
102
104
  export { shop as ShopType };
103
105
  import * as appAPI from './types/appAPI.js';
@@ -0,0 +1,44 @@
1
+ var InteractionTargetEvent;
2
+ (function(InteractionTargetEvent) {
3
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-background-color'] = 0] = 'gp:change-background-color';
4
+ InteractionTargetEvent[InteractionTargetEvent['gp:run-animation'] = 1] = 'gp:run-animation';
5
+ InteractionTargetEvent[InteractionTargetEvent['gp:toggle-element-visibility'] = 2] = 'gp:toggle-element-visibility';
6
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-text'] = 3] = 'gp:change-text';
7
+ InteractionTargetEvent[InteractionTargetEvent['gp:scroll-to'] = 4] = 'gp:scroll-to';
8
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-text-style'] = 5] = 'gp:change-text-style';
9
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-content'] = 6] = 'gp:change-content';
10
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-button-style'] = 7] = 'gp:change-button-style';
11
+ InteractionTargetEvent[InteractionTargetEvent['gp:copy-text'] = 8] = 'gp:copy-text';
12
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-image'] = 9] = 'gp:change-image';
13
+ InteractionTargetEvent[InteractionTargetEvent['gp:toggle-video-play'] = 10] = 'gp:toggle-video-play';
14
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-slider-ratio'] = 11] = 'gp:change-slider-ratio';
15
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-icon-style'] = 12] = 'gp:change-icon-style';
16
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-expanded-item'] = 13] = 'gp:change-expanded-item';
17
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-active-item'] = 14] = 'gp:change-active-item';
18
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-slide'] = 15] = 'gp:change-slide';
19
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-image-step'] = 16] = 'gp:change-image-step';
20
+ InteractionTargetEvent[InteractionTargetEvent['gp:change-text-value'] = 17] = 'gp:change-text-value';
21
+ InteractionTargetEvent[InteractionTargetEvent['gp:toggle-popup-open'] = 18] = 'gp:toggle-popup-open';
22
+ InteractionTargetEvent[InteractionTargetEvent['gp:show-or-hide'] = 19] = 'gp:show-or-hide';
23
+ })(InteractionTargetEvent || (InteractionTargetEvent = {}));
24
+ var InteractionTriggerEvent;
25
+ (function(InteractionTriggerEvent) {
26
+ InteractionTriggerEvent[InteractionTriggerEvent['click'] = 0] = 'click';
27
+ InteractionTriggerEvent[InteractionTriggerEvent["active"] = 1] = "active";
28
+ InteractionTriggerEvent[InteractionTriggerEvent['mouseover'] = 2] = 'mouseover';
29
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:appear'] = 3] = 'gp:appear';
30
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:item-selected'] = 4] = 'gp:item-selected';
31
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:item-unselected'] = 5] = 'gp:item-unselected';
32
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:item-hovered'] = 6] = 'gp:item-hovered';
33
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:item-click'] = 7] = 'gp:item-click';
34
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:after-submit'] = 8] = 'gp:after-submit';
35
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:quantity-change'] = 9] = 'gp:quantity-change';
36
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:after-checked-value'] = 10] = 'gp:after-checked-value';
37
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:after-add-to-cart'] = 11] = 'gp:after-add-to-cart';
38
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:popup-open'] = 12] = 'gp:popup-open';
39
+ InteractionTriggerEvent[InteractionTriggerEvent['gp:popup-close'] = 13] = 'gp:popup-close';
40
+ InteractionTriggerEvent[InteractionTriggerEvent['scroll-up'] = 14] = 'scroll-up';
41
+ InteractionTriggerEvent[InteractionTriggerEvent['scroll-down'] = 15] = 'scroll-down';
42
+ })(InteractionTriggerEvent || (InteractionTriggerEvent = {}));
43
+
44
+ export { InteractionTargetEvent, InteractionTriggerEvent };