@gem-sdk/core 1.48.0-dev.6 → 1.48.0-dev.61

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
@@ -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;
@@ -78,11 +78,46 @@ const SimpleBundlesKitsConfig = {
78
78
  appId: 'e553276b-36b2-446d-b80a-aa47fe5f96ac'
79
79
  }
80
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
+ };
105
+ const FlyBundlesUpsellsFbtConfig = {
106
+ FlyBundlesUpsellsFbt: {
107
+ appName: 'fly-bundles-upsell',
108
+ appId: '26807bdc-c2ed-4a25-afb2-06e6b1ebf843'
109
+ }
110
+ };
81
111
 
112
+ exports.AssortionUpsellBundlesConfig = AssortionUpsellBundlesConfig;
82
113
  exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
114
+ exports.EasyBundleBuilderSkailamaConfig = EasyBundleBuilderSkailamaConfig;
83
115
  exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
116
+ exports.FlyBundlesUpsellsFbtConfig = FlyBundlesUpsellsFbtConfig;
117
+ exports.KPreorderNowPartialPaymentConfig = KPreorderNowPartialPaymentConfig;
84
118
  exports.KiteFreeGiftDiscountConfig = KiteFreeGiftDiscountConfig;
85
119
  exports.LoopSubscriptionsConfig = LoopSubscriptionsConfig;
120
+ exports.PreorderNowPreOrderPqConfig = PreorderNowPreOrderPqConfig;
86
121
  exports.PumperBundlesVolumeDiscountConfig = PumperBundlesVolumeDiscountConfig;
87
122
  exports.RechargeSubscriptionsConfig = RechargeSubscriptionsConfig;
88
123
  exports.ReviewxpoProductReviewsAppConfig = ReviewxpoProductReviewsAppConfig;
@@ -81,6 +81,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
81
81
  ...currentSetting,
82
82
  form_id: appSetting['formId']
83
83
  };
84
+ case 'FlyBundlesUpsellsFbt':
85
+ {
86
+ return {
87
+ ...currentSetting,
88
+ bundle_id: appSetting?.['customBundleId']
89
+ };
90
+ }
84
91
  default:
85
92
  return currentSetting;
86
93
  }
@@ -129,7 +136,47 @@ const SimpleBundlesKits = {
129
136
  'infinite-options-selector': null
130
137
  }
131
138
  };
139
+ const EasyBundleBuilderSkailama = {
140
+ EasyBundleBuilderSkailama: {
141
+ 'app-block-bundlePage': null
142
+ }
143
+ };
144
+ const AssortionUpsellBundles = {
145
+ AssortionUpsellBundles: {
146
+ volume: null,
147
+ bundle: null,
148
+ addon: null
149
+ }
150
+ };
151
+ const PreorderNowPreOrderPq = {
152
+ PreorderNowPreOrderPq: {
153
+ 'app-block-notifyapp-block-notify': null,
154
+ 'app-block-partial': null,
155
+ 'app-block-timer': null,
156
+ 'app-block': null
157
+ }
158
+ };
159
+ const KPreorderNowPartialPayment = {
160
+ KPreorderNowPartialPayment: {
161
+ 'kaktus-bundle': null
162
+ }
163
+ };
164
+ const FlyBundlesUpsellsFbt = {
165
+ FlyBundlesUpsellsFbt: {
166
+ 'app-block-volume': null,
167
+ 'app-block-upsell-block': null,
168
+ 'app-block-fbt': null,
169
+ 'app-block-custom': {
170
+ bundle_id: ''
171
+ }
172
+ }
173
+ };
132
174
  const composeSettingsByWidgetType = {
175
+ ...FlyBundlesUpsellsFbt,
176
+ ...KPreorderNowPartialPayment,
177
+ ...PreorderNowPreOrderPq,
178
+ ...AssortionUpsellBundles,
179
+ ...EasyBundleBuilderSkailama,
133
180
  ...FastBundleBundlesDiscounts,
134
181
  ...KiteFreeGiftDiscount,
135
182
  ...UnlimitedBundlesDiscounts,
@@ -15,7 +15,12 @@ const mapShopifyAppMeta = {
15
15
  ...appConfig.UnlimitedBundlesDiscountsConfig,
16
16
  ...appConfig.KiteFreeGiftDiscountConfig,
17
17
  ...appConfig.FastBundleBundlesDiscountsConfig,
18
- ...appConfig.SimpleBundlesKitsConfig
18
+ ...appConfig.SimpleBundlesKitsConfig,
19
+ ...appConfig.EasyBundleBuilderSkailamaConfig,
20
+ ...appConfig.AssortionUpsellBundlesConfig,
21
+ ...appConfig.PreorderNowPreOrderPqConfig,
22
+ ...appConfig.KPreorderNowPartialPaymentConfig,
23
+ ...appConfig.FlyBundlesUpsellsFbtConfig
19
24
  };
20
25
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
21
26
 
@@ -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,
@@ -119,15 +121,7 @@ const composeTypographyClassName = (typo, typography)=>{
119
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,8 +143,8 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
148
143
  ...!typography?.type ? composeTypography(typography?.custom) : {}
149
144
  };
150
145
  };
151
- const isCustomTypo = (typoProps)=>{
152
- return typoProps && Object.keys(typoProps).length > 1 || typoProps && Object.keys(typoProps).length === 1 && !typoProps.fontSize;
146
+ const isCustomTypo = (customTypo)=>{
147
+ return customTypo && Object.keys(customTypo).length > 1 || customTypo && Object.keys(customTypo).length === 1 && !customTypo.fontSize;
153
148
  };
154
149
 
155
150
  exports.composeFallbackTypographyStyle = composeFallbackTypographyStyle;
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
@@ -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 };
@@ -76,5 +76,35 @@ const SimpleBundlesKitsConfig = {
76
76
  appId: 'e553276b-36b2-446d-b80a-aa47fe5f96ac'
77
77
  }
78
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
+ };
103
+ const FlyBundlesUpsellsFbtConfig = {
104
+ FlyBundlesUpsellsFbt: {
105
+ appName: 'fly-bundles-upsell',
106
+ appId: '26807bdc-c2ed-4a25-afb2-06e6b1ebf843'
107
+ }
108
+ };
79
109
 
80
- export { BonLoyaltyRewardsReferralsConfig, FastBundleBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
110
+ export { AssortionUpsellBundlesConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, KPreorderNowPartialPaymentConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PreorderNowPreOrderPqConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig };
@@ -79,6 +79,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
79
79
  ...currentSetting,
80
80
  form_id: appSetting['formId']
81
81
  };
82
+ case 'FlyBundlesUpsellsFbt':
83
+ {
84
+ return {
85
+ ...currentSetting,
86
+ bundle_id: appSetting?.['customBundleId']
87
+ };
88
+ }
82
89
  default:
83
90
  return currentSetting;
84
91
  }
@@ -127,7 +134,47 @@ const SimpleBundlesKits = {
127
134
  'infinite-options-selector': null
128
135
  }
129
136
  };
137
+ const EasyBundleBuilderSkailama = {
138
+ EasyBundleBuilderSkailama: {
139
+ 'app-block-bundlePage': null
140
+ }
141
+ };
142
+ const AssortionUpsellBundles = {
143
+ AssortionUpsellBundles: {
144
+ volume: null,
145
+ bundle: null,
146
+ addon: null
147
+ }
148
+ };
149
+ const PreorderNowPreOrderPq = {
150
+ PreorderNowPreOrderPq: {
151
+ 'app-block-notifyapp-block-notify': null,
152
+ 'app-block-partial': null,
153
+ 'app-block-timer': null,
154
+ 'app-block': null
155
+ }
156
+ };
157
+ const KPreorderNowPartialPayment = {
158
+ KPreorderNowPartialPayment: {
159
+ 'kaktus-bundle': null
160
+ }
161
+ };
162
+ const FlyBundlesUpsellsFbt = {
163
+ FlyBundlesUpsellsFbt: {
164
+ 'app-block-volume': null,
165
+ 'app-block-upsell-block': null,
166
+ 'app-block-fbt': null,
167
+ 'app-block-custom': {
168
+ bundle_id: ''
169
+ }
170
+ }
171
+ };
130
172
  const composeSettingsByWidgetType = {
173
+ ...FlyBundlesUpsellsFbt,
174
+ ...KPreorderNowPartialPayment,
175
+ ...PreorderNowPreOrderPq,
176
+ ...AssortionUpsellBundles,
177
+ ...EasyBundleBuilderSkailama,
131
178
  ...FastBundleBundlesDiscounts,
132
179
  ...KiteFreeGiftDiscount,
133
180
  ...UnlimitedBundlesDiscounts,
@@ -1,4 +1,4 @@
1
- import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig } from './appConfig.js';
1
+ import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, AssortionUpsellBundlesConfig, PreorderNowPreOrderPqConfig, KPreorderNowPartialPaymentConfig, FlyBundlesUpsellsFbtConfig } from './appConfig.js';
2
2
 
3
3
  const mapShopifyAppMeta = {
4
4
  ...RechargeSubscriptionsConfig,
@@ -13,7 +13,12 @@ const mapShopifyAppMeta = {
13
13
  ...UnlimitedBundlesDiscountsConfig,
14
14
  ...KiteFreeGiftDiscountConfig,
15
15
  ...FastBundleBundlesDiscountsConfig,
16
- ...SimpleBundlesKitsConfig
16
+ ...SimpleBundlesKitsConfig,
17
+ ...EasyBundleBuilderSkailamaConfig,
18
+ ...AssortionUpsellBundlesConfig,
19
+ ...PreorderNowPreOrderPqConfig,
20
+ ...KPreorderNowPartialPaymentConfig,
21
+ ...FlyBundlesUpsellsFbtConfig
17
22
  };
18
23
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
19
24