@gem-sdk/core 1.48.0-dev.5 → 1.48.0-dev.54

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.
@@ -46,7 +46,7 @@ const InteractionSuffix = ({ tag, uid })=>{
46
46
  isCurrentInteractionTarget
47
47
  ]);
48
48
  if (!isDisplay) {
49
- return undefined;
49
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {});
50
50
  }
51
51
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
52
52
  children: [
@@ -234,6 +234,7 @@ const appendAnimation = (props, liquid)=>{
234
234
  const appearTablet = getAnimationType(getSettingsByDevice('tablet'), 'appear');
235
235
  const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
236
236
  const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
237
+ if (!enableAnimation) return liquid;
237
238
  const getInitVisibility = (device)=>getSettingsByDevice(device)?.enabled && ![
238
239
  'shake',
239
240
  'none'
@@ -248,8 +249,7 @@ const appendAnimation = (props, liquid)=>{
248
249
  gp-data='${JSON.stringify({
249
250
  config: animation,
250
251
  tag,
251
- opacity,
252
- isEnableInit: enableAnimation
252
+ opacity
253
253
  })}'
254
254
  style="${{
255
255
  display: 'contents'
@@ -6,6 +6,7 @@
6
6
  title
7
7
  description
8
8
  descriptionHtml
9
+ createdAt
9
10
  handle
10
11
  averageRating
11
12
  isStorefront
@@ -28,6 +28,10 @@
28
28
  themePageCustomFonts {
29
29
  ...CustomFontSelect
30
30
  }
31
+ interaction {
32
+ id
33
+ value
34
+ }
31
35
  }
32
36
  `;
33
37
  const PreviewThemePageSelect = `
@@ -55,6 +59,10 @@ const PreviewThemePageSelect = `
55
59
  themePageCustomCode {
56
60
  ...CustomCodeSelect
57
61
  }
62
+ interaction {
63
+ id
64
+ value
65
+ }
58
66
  }
59
67
  `;
60
68
 
@@ -121,7 +121,7 @@ const getBgAttachmentByDevice = (background, device)=>{
121
121
  return background?.[device]?.attachment;
122
122
  };
123
123
  const composeBackgroundCss = (backgroundColor)=>{
124
- return `${backgroundColor ? `background-color: ${colors.getSingleColorVariable(backgroundColor)} !important;` : undefined}`;
124
+ return `${backgroundColor ? `background-color: ${colors.getSingleColorVariable(backgroundColor)};` : undefined}`;
125
125
  };
126
126
  const makeFixedBgAttachment = (background)=>{
127
127
  if (!background) return;
@@ -101,6 +101,9 @@ function composeAdvanceStyle(data, tag, pageType) {
101
101
  if (attr === 'rounded') {
102
102
  Object.assign(styles, radius.composeRadius(value));
103
103
  }
104
+ if (attr === 'boxShadow') {
105
+ Object.assign(styles, shadow.getResonsiveStyleShadow(value, 'box-shadow', hasBoxShadow));
106
+ }
104
107
  if (composeAttr === 'desktop') {
105
108
  switch(attr){
106
109
  case 'padding':
@@ -215,20 +218,20 @@ function composeAdvanceStyle(data, tag, pageType) {
215
218
  }));
216
219
  }
217
220
  }
218
- if (attr === 'blockPadding' && pageType === "POST_PURCHASE") {
221
+ if (attr === 'blockPadding' && pageType === 'POST_PURCHASE') {
219
222
  const valueMapped = postPurchasePaddingMapping[value];
220
223
  styles[`--pb`] = getAttrValue(attr, valueMapped, tag);
221
224
  styles[`--pt`] = getAttrValue(attr, valueMapped, tag);
222
225
  styles[`--mb`] = '0px';
223
226
  styles[`--mt`] = '0px';
224
227
  }
225
- if (attr === 'inlinePadding' && pageType === "POST_PURCHASE") {
228
+ if (attr === 'inlinePadding' && pageType === 'POST_PURCHASE') {
226
229
  const valueMapped = postPurchasePaddingMapping[value];
227
230
  styles[`--pl`] = getAttrValue(attr, valueMapped, tag);
228
231
  styles[`--pr`] = getAttrValue(attr, valueMapped, tag);
229
232
  }
230
233
  });
231
- const advancedPostPurchaseStyles = pageType === "POST_PURCHASE" ? composeAdvanceStyleForPostPurchase(data, tag) : {};
234
+ const advancedPostPurchaseStyles = pageType === 'POST_PURCHASE' ? composeAdvanceStyleForPostPurchase(data, tag) : {};
232
235
  return {
233
236
  ...styles,
234
237
  ...advancedPostPurchaseStyles
@@ -36,7 +36,7 @@ const getProduct = async (fetcher, { id, isSample, isStorefront })=>{
36
36
  };
37
37
  };
38
38
  const orderBy = {
39
- field: 'CREATED_AT',
39
+ field: 'PLATFORM_CREATED_AT',
40
40
  direction: 'DESC'
41
41
  };
42
42
  const fetchProduct = async (fetcher, { id, isSample, isStorefront })=>{
@@ -27,10 +27,10 @@ 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)}${shadowStyle.screen ? `-${shadowStyle.screen}` : ''}`]: 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
- const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
33
+ const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow, screen)=>{
34
34
  if (!shadow || !styleAppliedFor) return {};
35
35
  const style = {};
36
36
  for (const [key, value] of Object.entries(shadow)){
@@ -38,11 +38,22 @@ const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
38
38
  value: value,
39
39
  state: key,
40
40
  styleAppliedFor,
41
- isEnableShadow: isEnableShadow?.[key]
41
+ isEnableShadow: isEnableShadow?.[key],
42
+ screen: screen ?? ''
42
43
  }));
43
44
  }
44
45
  return style;
45
46
  };
47
+ const getResonsiveStyleShadow = (value, styleAppliedFor, isEnableShadow)=>{
48
+ if (!value) return undefined;
49
+ if ('desktop' in value || 'tablet' in value || 'mobile' in value) {
50
+ return {
51
+ ...getStyleShadowState(value.desktop, styleAppliedFor, isEnableShadow.desktop),
52
+ ...value.tablet && (isEnableShadow.tablet ?? isEnableShadow.desktop) ? getStyleShadowState(value.tablet, styleAppliedFor, isEnableShadow.tablet ?? isEnableShadow.desktop, 'tablet') : undefined,
53
+ ...value.mobile && (isEnableShadow.mobile ?? isEnableShadow.tablet ?? isEnableShadow.desktop) ? getStyleShadowState(value.mobile, styleAppliedFor, isEnableShadow.mobile ?? isEnableShadow.tablet ?? isEnableShadow.desktop, 'mobile') : undefined
54
+ };
55
+ }
56
+ };
46
57
  const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
47
58
  if (!hasBoxShadow) return undefined;
48
59
  if (!boxShadowValue) return undefined;
@@ -52,6 +63,7 @@ const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
52
63
  };
53
64
 
54
65
  exports.composeShadowCss = composeShadowCss;
66
+ exports.getResonsiveStyleShadow = getResonsiveStyleShadow;
55
67
  exports.getStyleShadow = getStyleShadow;
56
68
  exports.getStyleShadowState = getStyleShadowState;
57
69
  exports.parseValueWithUnit = parseValueWithUnit;
@@ -66,15 +66,57 @@ const KiteFreeGiftDiscountConfig = {
66
66
  appId: '2c7302c4-455d-4078-a829-48563ba26089'
67
67
  }
68
68
  };
69
+ const FastBundleBundlesDiscountsConfig = {
70
+ FastBundleBundlesDiscounts: {
71
+ appName: 'fast-bundle',
72
+ appId: '9e87fbe2-9041-4c23-acf5-322413994cef'
73
+ }
74
+ };
75
+ const SimpleBundlesKitsConfig = {
76
+ SimpleBundlesKits: {
77
+ appName: 'simple-bundles-kits',
78
+ appId: 'e553276b-36b2-446d-b80a-aa47fe5f96ac'
79
+ }
80
+ };
81
+ const EasyBundleBuilderSkailamaConfig = {
82
+ EasyBundleBuilderSkailama: {
83
+ appName: 'easy-bundles',
84
+ appId: '05b1325c-6303-4da5-8e2f-b13ab2a50e1a'
85
+ }
86
+ };
87
+ const AssortionUpsellBundlesConfig = {
88
+ AssortionUpsellBundles: {
89
+ appName: 'assortion',
90
+ appId: '5588d7f9-a5bc-4f4a-9c54-39b7e081dd23'
91
+ }
92
+ };
93
+ const PreorderNowPreOrderPqConfig = {
94
+ PreorderNowPreOrderPq: {
95
+ appName: 'preorder-now-pre-order-pq',
96
+ appId: '551fab2c-3af6-4a8f-ba21-736a71cb4540'
97
+ }
98
+ };
99
+ const KPreorderNowPartialPaymentConfig = {
100
+ KPreorderNowPartialPayment: {
101
+ appName: 'k-preorder-now-partial-payment',
102
+ appId: '65705a60-a3b0-43ae-9dc8-15db78d76b3b'
103
+ }
104
+ };
69
105
 
106
+ exports.AssortionUpsellBundlesConfig = AssortionUpsellBundlesConfig;
70
107
  exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
108
+ exports.EasyBundleBuilderSkailamaConfig = EasyBundleBuilderSkailamaConfig;
109
+ exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
110
+ exports.KPreorderNowPartialPaymentConfig = KPreorderNowPartialPaymentConfig;
71
111
  exports.KiteFreeGiftDiscountConfig = KiteFreeGiftDiscountConfig;
72
112
  exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
113
+ exports.PreorderNowPreOrderPqConfig = PreorderNowPreOrderPqConfig;
73
114
  exports.PumperBundlesVolumeDiscountConfig = PumperBundlesVolumeDiscountConfig;
74
115
  exports.RechargeSubscriptionsConfig = RechargeSubscriptionsConfig;
75
116
  exports.ReviewxpoProductReviewsAppConfig = ReviewxpoProductReviewsAppConfig;
76
117
  exports.SelleasyConfig = SelleasyConfig;
77
118
  exports.ShopifyFormsConfig = ShopifyFormsConfig;
119
+ exports.SimpleBundlesKitsConfig = SimpleBundlesKitsConfig;
78
120
  exports.SkioSubscriptionsYcS20Config = SkioSubscriptionsYcS20Config;
79
121
  exports.SubifySubscriptionsConfig = SubifySubscriptionsConfig;
80
122
  exports.UnlimitedBundlesDiscountsConfig = UnlimitedBundlesDiscountsConfig;
@@ -115,9 +115,54 @@ const KiteFreeGiftDiscount = {
115
115
  'app-block': null
116
116
  }
117
117
  };
118
+ const FastBundleBundlesDiscounts = {
119
+ FastBundleBundlesDiscounts: {
120
+ all_bundles: null,
121
+ fbt_position: null,
122
+ product_bundles: null,
123
+ product_bundle_with_ids: null,
124
+ volume_position: null
125
+ }
126
+ };
127
+ const SimpleBundlesKits = {
128
+ SimpleBundlesKits: {
129
+ 'infinite-options-selector': null
130
+ }
131
+ };
132
+ const EasyBundleBuilderSkailama = {
133
+ EasyBundleBuilderSkailama: {
134
+ 'app-block-bundlePage': null
135
+ }
136
+ };
137
+ const AssortionUpsellBundles = {
138
+ AssortionUpsellBundles: {
139
+ volume: null,
140
+ bundle: null,
141
+ addon: null
142
+ }
143
+ };
144
+ const PreorderNowPreOrderPq = {
145
+ PreorderNowPreOrderPq: {
146
+ 'app-block-notifyapp-block-notify': null,
147
+ 'app-block-partial': null,
148
+ 'app-block-timer': null,
149
+ 'app-block': null
150
+ }
151
+ };
152
+ const KPreorderNowPartialPayment = {
153
+ KPreorderNowPartialPayment: {
154
+ 'kaktus-bundle': null
155
+ }
156
+ };
118
157
  const composeSettingsByWidgetType = {
158
+ ...KPreorderNowPartialPayment,
159
+ ...PreorderNowPreOrderPq,
160
+ ...AssortionUpsellBundles,
161
+ ...EasyBundleBuilderSkailama,
162
+ ...FastBundleBundlesDiscounts,
119
163
  ...KiteFreeGiftDiscount,
120
164
  ...UnlimitedBundlesDiscounts,
165
+ ...SimpleBundlesKits,
121
166
  ...PumperBundlesVolumeDiscount,
122
167
  ...ReviewxpoProductReviewsApp,
123
168
  ...ShopifyForms,
@@ -13,7 +13,13 @@ const mapShopifyAppMeta = {
13
13
  ...appConfig.ReviewxpoProductReviewsAppConfig,
14
14
  ...appConfig.PumperBundlesVolumeDiscountConfig,
15
15
  ...appConfig.UnlimitedBundlesDiscountsConfig,
16
- ...appConfig.KiteFreeGiftDiscountConfig
16
+ ...appConfig.KiteFreeGiftDiscountConfig,
17
+ ...appConfig.FastBundleBundlesDiscountsConfig,
18
+ ...appConfig.SimpleBundlesKitsConfig,
19
+ ...appConfig.EasyBundleBuilderSkailamaConfig,
20
+ ...appConfig.AssortionUpsellBundlesConfig,
21
+ ...appConfig.PreorderNowPreOrderPqConfig,
22
+ ...appConfig.KPreorderNowPartialPaymentConfig
17
23
  };
18
24
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
19
25
 
@@ -76,8 +76,10 @@ const composeTypographyV2 = (value, attrs)=>{
76
76
  });
77
77
  };
78
78
  const composeFontFamilyTypographyV2 = (value)=>{
79
- const fontFamily = value?.fontFamily;
80
- if (!fontFamily) return;
79
+ const { fontFamily, isCustom, fallbackFontFamily } = value || {};
80
+ if (!fontFamily) {
81
+ return isCustom ? fallbackFontFamily : undefined;
82
+ }
81
83
  if (typeof fontFamily === 'string') {
82
84
  return getFontUsedByTypographyV2({
83
85
  fontFamily,
@@ -116,18 +118,10 @@ const composeTypographyAttr = (attrs)=>{
116
118
  });
117
119
  };
118
120
  const composeTypographyClassName = (typo, typography)=>{
119
- return typo ? typo?.type && !typo.custom ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
121
+ return typo ? typo?.type && !isCustomTypo(typo.custom) ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
120
122
  };
121
123
  const composeFallbackTypographyStyle = (tag)=>{
122
- if ([
123
- 'heading',
124
- 'heading-1',
125
- 'heading-2',
126
- 'heading-3',
127
- 'heading-4',
128
- 'heading-5',
129
- 'heading-6'
130
- ].includes(tag)) {
124
+ if (tag.toLocaleLowerCase().includes('heading')) {
131
125
  return 'var(--g-font-heading, heading)';
132
126
  }
133
127
  return 'var(--g-font-body, body)';
@@ -137,7 +131,8 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
137
131
  const fallbackFontFamily = composeFallbackTypographyStyle(typo.type ?? 'heading');
138
132
  const customTypo = {
139
133
  ...typo.custom,
140
- fallbackFontFamily: fallbackFontFamily
134
+ fallbackFontFamily: fallbackFontFamily,
135
+ isCustom: isCustomTypo(typo.custom)
141
136
  };
142
137
  return {
143
138
  ...composeTypographyV2(customTypo, typo.attrs),
@@ -148,6 +143,9 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
148
143
  ...!typography?.type ? composeTypography(typography?.custom) : {}
149
144
  };
150
145
  };
146
+ const isCustomTypo = (customTypo)=>{
147
+ return customTypo && Object.keys(customTypo).length > 1 || customTypo && Object.keys(customTypo).length === 1 && !customTypo.fontSize;
148
+ };
151
149
 
152
150
  exports.composeFallbackTypographyStyle = composeFallbackTypographyStyle;
153
151
  exports.composeFontFamilyTypographyV2 = composeFontFamilyTypographyV2;
package/dist/cjs/index.js CHANGED
@@ -267,6 +267,7 @@ exports.removeUndefinedValuesFromObject = render.removeUndefinedValuesFromObject
267
267
  exports.styles = render.styles;
268
268
  exports.template = render.template;
269
269
  exports.composeShadowCss = shadow.composeShadowCss;
270
+ exports.getResonsiveStyleShadow = shadow.getResonsiveStyleShadow;
270
271
  exports.getStyleShadow = shadow.getStyleShadow;
271
272
  exports.getStyleShadowState = shadow.getStyleShadowState;
272
273
  exports.parseValueWithUnit = shadow.parseValueWithUnit;
@@ -1,4 +1,4 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { useMemo } from 'react';
3
3
  import 'zustand';
4
4
  import 'swr';
@@ -44,7 +44,7 @@ const InteractionSuffix = ({ tag, uid })=>{
44
44
  isCurrentInteractionTarget
45
45
  ]);
46
46
  if (!isDisplay) {
47
- return undefined;
47
+ return /*#__PURE__*/ jsx(Fragment, {});
48
48
  }
49
49
  return /*#__PURE__*/ jsxs(Fragment, {
50
50
  children: [
@@ -230,6 +230,7 @@ const appendAnimation = (props, liquid)=>{
230
230
  const appearTablet = getAnimationType(getSettingsByDevice('tablet'), 'appear');
231
231
  const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
232
232
  const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
233
+ if (!enableAnimation) return liquid;
233
234
  const getInitVisibility = (device)=>getSettingsByDevice(device)?.enabled && ![
234
235
  'shake',
235
236
  'none'
@@ -244,8 +245,7 @@ const appendAnimation = (props, liquid)=>{
244
245
  gp-data='${JSON.stringify({
245
246
  config: animation,
246
247
  tag,
247
- opacity,
248
- isEnableInit: enableAnimation
248
+ opacity
249
249
  })}'
250
250
  style="${{
251
251
  display: 'contents'
@@ -4,6 +4,7 @@
4
4
  title
5
5
  description
6
6
  descriptionHtml
7
+ createdAt
7
8
  handle
8
9
  averageRating
9
10
  isStorefront
@@ -26,6 +26,10 @@
26
26
  themePageCustomFonts {
27
27
  ...CustomFontSelect
28
28
  }
29
+ interaction {
30
+ id
31
+ value
32
+ }
29
33
  }
30
34
  `;
31
35
  const PreviewThemePageSelect = `
@@ -53,6 +57,10 @@ const PreviewThemePageSelect = `
53
57
  themePageCustomCode {
54
58
  ...CustomCodeSelect
55
59
  }
60
+ interaction {
61
+ id
62
+ value
63
+ }
56
64
  }
57
65
  `;
58
66
 
@@ -119,7 +119,7 @@ const getBgAttachmentByDevice = (background, device)=>{
119
119
  return background?.[device]?.attachment;
120
120
  };
121
121
  const composeBackgroundCss = (backgroundColor)=>{
122
- return `${backgroundColor ? `background-color: ${getSingleColorVariable(backgroundColor)} !important;` : undefined}`;
122
+ return `${backgroundColor ? `background-color: ${getSingleColorVariable(backgroundColor)};` : undefined}`;
123
123
  };
124
124
  const makeFixedBgAttachment = (background)=>{
125
125
  if (!background) return;
@@ -3,7 +3,7 @@ import { isColor } from './colors.js';
3
3
  import { layoutComponent } from './constant.js';
4
4
  import { makeStyleKey } from './make-style.js';
5
5
  import { composeRadius, getCornerCSSFromGlobal } from './radius.js';
6
- import { getStyleShadowState, getStyleShadow } from './shadow.js';
6
+ import { getResonsiveStyleShadow, getStyleShadowState, getStyleShadow } from './shadow.js';
7
7
 
8
8
  const composeSpacing = ({ source, spacing, type, suffix = '' })=>{
9
9
  const { top, left, bottom, right } = spacing;
@@ -99,6 +99,9 @@ function composeAdvanceStyle(data, tag, pageType) {
99
99
  if (attr === 'rounded') {
100
100
  Object.assign(styles, composeRadius(value));
101
101
  }
102
+ if (attr === 'boxShadow') {
103
+ Object.assign(styles, getResonsiveStyleShadow(value, 'box-shadow', hasBoxShadow));
104
+ }
102
105
  if (composeAttr === 'desktop') {
103
106
  switch(attr){
104
107
  case 'padding':
@@ -213,20 +216,20 @@ function composeAdvanceStyle(data, tag, pageType) {
213
216
  }));
214
217
  }
215
218
  }
216
- if (attr === 'blockPadding' && pageType === "POST_PURCHASE") {
219
+ if (attr === 'blockPadding' && pageType === 'POST_PURCHASE') {
217
220
  const valueMapped = postPurchasePaddingMapping[value];
218
221
  styles[`--pb`] = getAttrValue(attr, valueMapped, tag);
219
222
  styles[`--pt`] = getAttrValue(attr, valueMapped, tag);
220
223
  styles[`--mb`] = '0px';
221
224
  styles[`--mt`] = '0px';
222
225
  }
223
- if (attr === 'inlinePadding' && pageType === "POST_PURCHASE") {
226
+ if (attr === 'inlinePadding' && pageType === 'POST_PURCHASE') {
224
227
  const valueMapped = postPurchasePaddingMapping[value];
225
228
  styles[`--pl`] = getAttrValue(attr, valueMapped, tag);
226
229
  styles[`--pr`] = getAttrValue(attr, valueMapped, tag);
227
230
  }
228
231
  });
229
- const advancedPostPurchaseStyles = pageType === "POST_PURCHASE" ? composeAdvanceStyleForPostPurchase(data, tag) : {};
232
+ const advancedPostPurchaseStyles = pageType === 'POST_PURCHASE' ? composeAdvanceStyleForPostPurchase(data, tag) : {};
230
233
  return {
231
234
  ...styles,
232
235
  ...advancedPostPurchaseStyles
@@ -34,7 +34,7 @@ const getProduct = async (fetcher, { id, isSample, isStorefront })=>{
34
34
  };
35
35
  };
36
36
  const orderBy = {
37
- field: 'CREATED_AT',
37
+ field: 'PLATFORM_CREATED_AT',
38
38
  direction: 'DESC'
39
39
  };
40
40
  const fetchProduct = async (fetcher, { id, isSample, isStorefront })=>{
@@ -25,10 +25,10 @@ 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)}${shadowStyle.screen ? `-${shadowStyle.screen}` : ''}`]: 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
- const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
31
+ const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow, screen)=>{
32
32
  if (!shadow || !styleAppliedFor) return {};
33
33
  const style = {};
34
34
  for (const [key, value] of Object.entries(shadow)){
@@ -36,11 +36,22 @@ const getStyleShadowState = (shadow, styleAppliedFor, isEnableShadow)=>{
36
36
  value: value,
37
37
  state: key,
38
38
  styleAppliedFor,
39
- isEnableShadow: isEnableShadow?.[key]
39
+ isEnableShadow: isEnableShadow?.[key],
40
+ screen: screen ?? ''
40
41
  }));
41
42
  }
42
43
  return style;
43
44
  };
45
+ const getResonsiveStyleShadow = (value, styleAppliedFor, isEnableShadow)=>{
46
+ if (!value) return undefined;
47
+ if ('desktop' in value || 'tablet' in value || 'mobile' in value) {
48
+ return {
49
+ ...getStyleShadowState(value.desktop, styleAppliedFor, isEnableShadow.desktop),
50
+ ...value.tablet && (isEnableShadow.tablet ?? isEnableShadow.desktop) ? getStyleShadowState(value.tablet, styleAppliedFor, isEnableShadow.tablet ?? isEnableShadow.desktop, 'tablet') : undefined,
51
+ ...value.mobile && (isEnableShadow.mobile ?? isEnableShadow.tablet ?? isEnableShadow.desktop) ? getStyleShadowState(value.mobile, styleAppliedFor, isEnableShadow.mobile ?? isEnableShadow.tablet ?? isEnableShadow.desktop, 'mobile') : undefined
52
+ };
53
+ }
54
+ };
44
55
  const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
45
56
  if (!hasBoxShadow) return undefined;
46
57
  if (!boxShadowValue) return undefined;
@@ -49,4 +60,4 @@ const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
49
60
  return `box-shadow: ${Math.cos(parseFloat(`${boxShadowValue?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${boxShadowValue?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${boxShadowValue?.blur} ${boxShadowValue?.spread + ' '}${getSingleColorVariable(boxShadowValue?.color)}${sub};`;
50
61
  };
51
62
 
52
- export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit };
63
+ export { composeShadowCss, getResonsiveStyleShadow, getStyleShadow, getStyleShadowState, parseValueWithUnit };
@@ -64,5 +64,41 @@ const KiteFreeGiftDiscountConfig = {
64
64
  appId: '2c7302c4-455d-4078-a829-48563ba26089'
65
65
  }
66
66
  };
67
+ const FastBundleBundlesDiscountsConfig = {
68
+ FastBundleBundlesDiscounts: {
69
+ appName: 'fast-bundle',
70
+ appId: '9e87fbe2-9041-4c23-acf5-322413994cef'
71
+ }
72
+ };
73
+ const SimpleBundlesKitsConfig = {
74
+ SimpleBundlesKits: {
75
+ appName: 'simple-bundles-kits',
76
+ appId: 'e553276b-36b2-446d-b80a-aa47fe5f96ac'
77
+ }
78
+ };
79
+ const EasyBundleBuilderSkailamaConfig = {
80
+ EasyBundleBuilderSkailama: {
81
+ appName: 'easy-bundles',
82
+ appId: '05b1325c-6303-4da5-8e2f-b13ab2a50e1a'
83
+ }
84
+ };
85
+ const AssortionUpsellBundlesConfig = {
86
+ AssortionUpsellBundles: {
87
+ appName: 'assortion',
88
+ appId: '5588d7f9-a5bc-4f4a-9c54-39b7e081dd23'
89
+ }
90
+ };
91
+ const PreorderNowPreOrderPqConfig = {
92
+ PreorderNowPreOrderPq: {
93
+ appName: 'preorder-now-pre-order-pq',
94
+ appId: '551fab2c-3af6-4a8f-ba21-736a71cb4540'
95
+ }
96
+ };
97
+ const KPreorderNowPartialPaymentConfig = {
98
+ KPreorderNowPartialPayment: {
99
+ appName: 'k-preorder-now-partial-payment',
100
+ appId: '65705a60-a3b0-43ae-9dc8-15db78d76b3b'
101
+ }
102
+ };
67
103
 
68
- export { BonLoyaltyRewardsReferralsConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
104
+ export { AssortionUpsellBundlesConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, KPreorderNowPartialPaymentConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PreorderNowPreOrderPqConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
@@ -113,9 +113,54 @@ const KiteFreeGiftDiscount = {
113
113
  'app-block': null
114
114
  }
115
115
  };
116
+ const FastBundleBundlesDiscounts = {
117
+ FastBundleBundlesDiscounts: {
118
+ all_bundles: null,
119
+ fbt_position: null,
120
+ product_bundles: null,
121
+ product_bundle_with_ids: null,
122
+ volume_position: null
123
+ }
124
+ };
125
+ const SimpleBundlesKits = {
126
+ SimpleBundlesKits: {
127
+ 'infinite-options-selector': null
128
+ }
129
+ };
130
+ const EasyBundleBuilderSkailama = {
131
+ EasyBundleBuilderSkailama: {
132
+ 'app-block-bundlePage': null
133
+ }
134
+ };
135
+ const AssortionUpsellBundles = {
136
+ AssortionUpsellBundles: {
137
+ volume: null,
138
+ bundle: null,
139
+ addon: null
140
+ }
141
+ };
142
+ const PreorderNowPreOrderPq = {
143
+ PreorderNowPreOrderPq: {
144
+ 'app-block-notifyapp-block-notify': null,
145
+ 'app-block-partial': null,
146
+ 'app-block-timer': null,
147
+ 'app-block': null
148
+ }
149
+ };
150
+ const KPreorderNowPartialPayment = {
151
+ KPreorderNowPartialPayment: {
152
+ 'kaktus-bundle': null
153
+ }
154
+ };
116
155
  const composeSettingsByWidgetType = {
156
+ ...KPreorderNowPartialPayment,
157
+ ...PreorderNowPreOrderPq,
158
+ ...AssortionUpsellBundles,
159
+ ...EasyBundleBuilderSkailama,
160
+ ...FastBundleBundlesDiscounts,
117
161
  ...KiteFreeGiftDiscount,
118
162
  ...UnlimitedBundlesDiscounts,
163
+ ...SimpleBundlesKits,
119
164
  ...PumperBundlesVolumeDiscount,
120
165
  ...ReviewxpoProductReviewsApp,
121
166
  ...ShopifyForms,
@@ -1,4 +1,4 @@
1
- import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig } from './appConfig.js';
1
+ import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, AssortionUpsellBundlesConfig, PreorderNowPreOrderPqConfig, KPreorderNowPartialPaymentConfig } from './appConfig.js';
2
2
 
3
3
  const mapShopifyAppMeta = {
4
4
  ...RechargeSubscriptionsConfig,
@@ -11,7 +11,13 @@ const mapShopifyAppMeta = {
11
11
  ...ReviewxpoProductReviewsAppConfig,
12
12
  ...PumperBundlesVolumeDiscountConfig,
13
13
  ...UnlimitedBundlesDiscountsConfig,
14
- ...KiteFreeGiftDiscountConfig
14
+ ...KiteFreeGiftDiscountConfig,
15
+ ...FastBundleBundlesDiscountsConfig,
16
+ ...SimpleBundlesKitsConfig,
17
+ ...EasyBundleBuilderSkailamaConfig,
18
+ ...AssortionUpsellBundlesConfig,
19
+ ...PreorderNowPreOrderPqConfig,
20
+ ...KPreorderNowPartialPaymentConfig
15
21
  };
16
22
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
17
23