@gem-sdk/core 1.48.0-dev.1 → 1.48.0-dev.102
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 +1 -0
- package/dist/cjs/components/InteractionSuffix.js +9 -1
- package/dist/cjs/components/Render.liquid.js +10 -11
- package/dist/cjs/graphql/fragments/product-little.generated.js +1 -0
- package/dist/cjs/graphql/fragments/published-theme-page.generated.js +8 -0
- package/dist/cjs/graphql-app-api/queries/ShopLibraryPage.generated.js +17 -0
- package/dist/cjs/helpers/animations.js +6 -6
- package/dist/cjs/helpers/background.js +1 -1
- package/dist/cjs/helpers/colors.js +2 -2
- package/dist/cjs/helpers/compose-advance-style.js +6 -3
- package/dist/cjs/helpers/interaction/index.js +66 -0
- package/dist/cjs/helpers/queries/get-product.js +1 -1
- package/dist/cjs/helpers/render.js +2 -0
- package/dist/cjs/helpers/shadow.js +15 -3
- package/dist/cjs/helpers/third-party/appConfig.js +77 -0
- package/dist/cjs/helpers/third-party/appSetting.js +115 -0
- package/dist/cjs/helpers/third-party/constant.js +12 -1
- package/dist/cjs/helpers/typography.js +19 -15
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/types/animations.js +2 -0
- package/dist/cjs/types/custom.js +1 -0
- package/dist/esm/components/ComponentToolbarPreview.js +1 -0
- package/dist/esm/components/InteractionSuffix.js +10 -2
- package/dist/esm/components/Render.liquid.js +10 -11
- package/dist/esm/graphql/fragments/product-little.generated.js +1 -0
- package/dist/esm/graphql/fragments/published-theme-page.generated.js +8 -0
- package/dist/esm/graphql-app-api/queries/ShopLibraryPage.generated.js +15 -0
- package/dist/esm/helpers/animations.js +6 -6
- package/dist/esm/helpers/background.js +1 -1
- package/dist/esm/helpers/colors.js +2 -2
- package/dist/esm/helpers/compose-advance-style.js +7 -4
- package/dist/esm/helpers/interaction/index.js +64 -0
- package/dist/esm/helpers/queries/get-product.js +1 -1
- package/dist/esm/helpers/render.js +2 -0
- package/dist/esm/helpers/shadow.js +15 -4
- package/dist/esm/helpers/third-party/appConfig.js +67 -1
- package/dist/esm/helpers/third-party/appSetting.js +115 -0
- package/dist/esm/helpers/third-party/constant.js +13 -2
- package/dist/esm/helpers/typography.js +19 -16
- package/dist/esm/index.js +4 -2
- package/dist/esm/types/animations.js +2 -0
- package/dist/esm/types/custom.js +1 -0
- package/dist/types/index.d.ts +4922 -893
- package/package.json +3 -3
|
@@ -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
|
}
|
|
@@ -103,7 +110,115 @@ const PumperBundlesVolumeDiscount = {
|
|
|
103
110
|
}
|
|
104
111
|
}
|
|
105
112
|
};
|
|
113
|
+
const UnlimitedBundlesDiscounts = {
|
|
114
|
+
UnlimitedBundlesDiscounts: {
|
|
115
|
+
'product-page-placeholder': null
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const KiteFreeGiftDiscount = {
|
|
119
|
+
KiteFreeGiftDiscount: {
|
|
120
|
+
'app-block': null
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const FastBundleBundlesDiscounts = {
|
|
124
|
+
FastBundleBundlesDiscounts: {
|
|
125
|
+
all_bundles: null,
|
|
126
|
+
fbt_position: null,
|
|
127
|
+
product_bundles: null,
|
|
128
|
+
product_bundle_with_ids: null,
|
|
129
|
+
volume_position: null
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const SimpleBundlesKits = {
|
|
133
|
+
SimpleBundlesKits: {
|
|
134
|
+
'infinite-options-selector': null
|
|
135
|
+
}
|
|
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
|
+
};
|
|
172
|
+
const PreorderNowWodPresale = {
|
|
173
|
+
PreorderNowWodPresale: {
|
|
174
|
+
'app-block': null,
|
|
175
|
+
'popups-block': null
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const JunipProductReviewsUgc = {
|
|
179
|
+
JunipProductReviewsUgc: {
|
|
180
|
+
'junip-review-carousel': {
|
|
181
|
+
reviewsType: 'product_reviews',
|
|
182
|
+
showSummary: true,
|
|
183
|
+
title: 'Reviews',
|
|
184
|
+
paddingTop: 48,
|
|
185
|
+
paddingBottom: 48,
|
|
186
|
+
containerClass: ''
|
|
187
|
+
},
|
|
188
|
+
'junip-ugc-gallery': {
|
|
189
|
+
layout: 'scroll',
|
|
190
|
+
title: '',
|
|
191
|
+
paddingTop: 48,
|
|
192
|
+
paddingBottom: 48,
|
|
193
|
+
containerClass: ''
|
|
194
|
+
},
|
|
195
|
+
'junip-product-review': {
|
|
196
|
+
product: '{{product}}'
|
|
197
|
+
},
|
|
198
|
+
'junip-product-summary': {
|
|
199
|
+
product: '{{product}}'
|
|
200
|
+
},
|
|
201
|
+
'junip-reviews': {
|
|
202
|
+
layout: 'list',
|
|
203
|
+
reviewsType: 'all',
|
|
204
|
+
showSummary: true,
|
|
205
|
+
reviewsCount: 10,
|
|
206
|
+
containerClass: ''
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
106
210
|
const composeSettingsByWidgetType = {
|
|
211
|
+
...JunipProductReviewsUgc,
|
|
212
|
+
...FlyBundlesUpsellsFbt,
|
|
213
|
+
...PreorderNowWodPresale,
|
|
214
|
+
...KPreorderNowPartialPayment,
|
|
215
|
+
...PreorderNowPreOrderPq,
|
|
216
|
+
...AssortionUpsellBundles,
|
|
217
|
+
...EasyBundleBuilderSkailama,
|
|
218
|
+
...FastBundleBundlesDiscounts,
|
|
219
|
+
...KiteFreeGiftDiscount,
|
|
220
|
+
...UnlimitedBundlesDiscounts,
|
|
221
|
+
...SimpleBundlesKits,
|
|
107
222
|
...PumperBundlesVolumeDiscount,
|
|
108
223
|
...ReviewxpoProductReviewsApp,
|
|
109
224
|
...ShopifyForms,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig } from './appConfig.js';
|
|
1
|
+
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, AssortionUpsellBundlesConfig, PreorderNowPreOrderPqConfig, KPreorderNowPartialPaymentConfig, FlyBundlesUpsellsFbtConfig, PreorderNowWodPresaleConfig, JunipProductReviewsUgcConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -9,7 +9,18 @@ const mapShopifyAppMeta = {
|
|
|
9
9
|
...SkioSubscriptionsYcS20Config,
|
|
10
10
|
...ShopifyFormsConfig,
|
|
11
11
|
...ReviewxpoProductReviewsAppConfig,
|
|
12
|
-
...PumperBundlesVolumeDiscountConfig
|
|
12
|
+
...PumperBundlesVolumeDiscountConfig,
|
|
13
|
+
...UnlimitedBundlesDiscountsConfig,
|
|
14
|
+
...KiteFreeGiftDiscountConfig,
|
|
15
|
+
...FastBundleBundlesDiscountsConfig,
|
|
16
|
+
...SimpleBundlesKitsConfig,
|
|
17
|
+
...EasyBundleBuilderSkailamaConfig,
|
|
18
|
+
...AssortionUpsellBundlesConfig,
|
|
19
|
+
...PreorderNowPreOrderPqConfig,
|
|
20
|
+
...KPreorderNowPartialPaymentConfig,
|
|
21
|
+
...FlyBundlesUpsellsFbtConfig,
|
|
22
|
+
...PreorderNowWodPresaleConfig,
|
|
23
|
+
...JunipProductReviewsUgcConfig
|
|
13
24
|
};
|
|
14
25
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
15
26
|
|
|
@@ -26,7 +26,8 @@ const composeTypographyV2Css = (typography, isImportant)=>{
|
|
|
26
26
|
const composeImportant = isImportant ? '!important' : '';
|
|
27
27
|
return `
|
|
28
28
|
${fontFamily ? `font-family: ${composeFontFamilyTypographyV2({
|
|
29
|
-
fontFamily
|
|
29
|
+
fontFamily,
|
|
30
|
+
type: typography?.type
|
|
30
31
|
})} ${composeImportant}` : ''};
|
|
31
32
|
${fontSize?.desktop ? `font-size: ${fontSize?.desktop} ${composeImportant}` : ''};
|
|
32
33
|
${bold ? `font-weight: bold ${composeImportant}` : fontWeight ? `font-weight: ${fontWeight} ${composeImportant}` : ''};
|
|
@@ -74,8 +75,10 @@ const composeTypographyV2 = (value, attrs)=>{
|
|
|
74
75
|
});
|
|
75
76
|
};
|
|
76
77
|
const composeFontFamilyTypographyV2 = (value)=>{
|
|
77
|
-
const fontFamily = value
|
|
78
|
-
if (!fontFamily)
|
|
78
|
+
const { fontFamily, isCustom, fallbackFontFamily, type } = value || {};
|
|
79
|
+
if (!fontFamily) {
|
|
80
|
+
return isCustom ? fallbackFontFamily : undefined;
|
|
81
|
+
}
|
|
79
82
|
if (typeof fontFamily === 'string') {
|
|
80
83
|
return getFontUsedByTypographyV2({
|
|
81
84
|
fontFamily,
|
|
@@ -89,7 +92,7 @@ const composeFontFamilyTypographyV2 = (value)=>{
|
|
|
89
92
|
default:
|
|
90
93
|
return getFontUsedByTypographyV2({
|
|
91
94
|
fontFamily: fontFamily.value,
|
|
92
|
-
fallbackFontFamily:
|
|
95
|
+
fallbackFontFamily: composeFallbackTypographyStyle(type ?? 'heading')
|
|
93
96
|
});
|
|
94
97
|
}
|
|
95
98
|
}
|
|
@@ -114,18 +117,10 @@ const composeTypographyAttr = (attrs)=>{
|
|
|
114
117
|
});
|
|
115
118
|
};
|
|
116
119
|
const composeTypographyClassName = (typo, typography)=>{
|
|
117
|
-
return typo ? typo?.type && !typo.custom ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
|
|
120
|
+
return typo ? typo?.type && !isCustomTypo(typo.custom) ? genTypoClass(typo.type) : '' : typography?.type && genTypoClass(typography?.type);
|
|
118
121
|
};
|
|
119
122
|
const composeFallbackTypographyStyle = (tag)=>{
|
|
120
|
-
if (
|
|
121
|
-
'heading',
|
|
122
|
-
'heading-1',
|
|
123
|
-
'heading-2',
|
|
124
|
-
'heading-3',
|
|
125
|
-
'heading-4',
|
|
126
|
-
'heading-5',
|
|
127
|
-
'heading-6'
|
|
128
|
-
].includes(tag)) {
|
|
123
|
+
if (tag.toLocaleLowerCase().includes('heading')) {
|
|
129
124
|
return 'var(--g-font-heading, heading)';
|
|
130
125
|
}
|
|
131
126
|
return 'var(--g-font-body, body)';
|
|
@@ -135,7 +130,8 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
|
|
|
135
130
|
const fallbackFontFamily = composeFallbackTypographyStyle(typo.type ?? 'heading');
|
|
136
131
|
const customTypo = {
|
|
137
132
|
...typo.custom,
|
|
138
|
-
fallbackFontFamily: fallbackFontFamily
|
|
133
|
+
fallbackFontFamily: fallbackFontFamily,
|
|
134
|
+
isCustom: isCustomTypo(typo.custom)
|
|
139
135
|
};
|
|
140
136
|
return {
|
|
141
137
|
...composeTypographyV2(customTypo, typo.attrs),
|
|
@@ -146,5 +142,12 @@ const composeTypographyStyle = (typo, typography, disableAttr)=>{
|
|
|
146
142
|
...!typography?.type ? composeTypography(typography?.custom) : {}
|
|
147
143
|
};
|
|
148
144
|
};
|
|
145
|
+
const isCustomTypo = (customTypo)=>{
|
|
146
|
+
return customTypo && Object.keys(customTypo).length > 1 || customTypo && Object.keys(customTypo).length === 1 && !customTypo.fontSize;
|
|
147
|
+
};
|
|
148
|
+
const getSeoTagFromTypo = (typo)=>{
|
|
149
|
+
if (!typo?.attrs?.seoTagValue) return 'div';
|
|
150
|
+
return typo?.attrs?.seoTagValue;
|
|
151
|
+
};
|
|
149
152
|
|
|
150
|
-
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass };
|
|
153
|
+
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass, getSeoTagFromTypo };
|
package/dist/esm/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export { LibraryTemplateDocument } from './graphql-app-api/queries/LibraryTempla
|
|
|
28
28
|
export { ThemePageDocument } from './graphql-app-api/queries/ThemePage.generated.js';
|
|
29
29
|
export { SaleFunnelDiscountsDocument } from './graphql-app-api/queries/SaleFunnelDiscounts.generated.js';
|
|
30
30
|
export { LibrarySaleFunnelDocument } from './graphql-app-api/queries/LibrarySaleFunnelDiscount.generated.js';
|
|
31
|
+
export { ShopLibraryPageDocument } from './graphql-app-api/queries/ShopLibraryPage.generated.js';
|
|
31
32
|
export { composeBorderCss, getBorderRadiusStyle, getBorderStyle, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn } from './helpers/borders.js';
|
|
32
33
|
export { getCarouselContainerHeight, makeContainerWidthOrHeight, makeDotGapToCarouselStyle } from './helpers/carousel.js';
|
|
33
34
|
export { cls } from './helpers/cls.js';
|
|
@@ -66,9 +67,9 @@ export { checkAvailableVariantInStock, getSelectedVariant, parseSelectedOption }
|
|
|
66
67
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
67
68
|
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
|
|
68
69
|
export { RenderIf, composeMemo, dataStringify, props, removeUndefinedValuesFromObject, styles, template } from './helpers/render.js';
|
|
69
|
-
export { composeShadowCss, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
70
|
+
export { composeShadowCss, getResonsiveStyleShadow, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
70
71
|
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault } from './helpers/size.js';
|
|
71
|
-
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
|
|
72
|
+
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass, getSeoTagFromTypo } from './helpers/typography.js';
|
|
72
73
|
export { useAddToCart } from './hooks/cart/use-add-to-cart.js';
|
|
73
74
|
export { useCartData } from './hooks/cart/use-cart-data.js';
|
|
74
75
|
export { useCartDiscountCodesUpdate } from './hooks/cart/use-cart-discount-codes-update.js';
|
|
@@ -111,3 +112,4 @@ export { fetchMedias, fetchVariants, getProduct } from './helpers/queries/get-pr
|
|
|
111
112
|
export { getProductBySlug } from './helpers/queries/get-product-by-slug.js';
|
|
112
113
|
export { getAppBlocks } from './helpers/third-party/getAppBlocks.js';
|
|
113
114
|
export { addAppBlockId } from './helpers/third-party/addAppBlockId.js';
|
|
115
|
+
export { useInteraction } from './helpers/interaction/index.js';
|
|
@@ -30,6 +30,8 @@ var AnimationTriggerType;
|
|
|
30
30
|
(function(AnimationTriggerType) {
|
|
31
31
|
AnimationTriggerType["Appear"] = 'appear';
|
|
32
32
|
AnimationTriggerType["Hover"] = 'hover';
|
|
33
|
+
AnimationTriggerType["Hidden"] = 'hidden';
|
|
34
|
+
AnimationTriggerType["AppearByTrigger"] = 'appearByTrigger';
|
|
33
35
|
})(AnimationTriggerType || (AnimationTriggerType = {}));
|
|
34
36
|
var AnimationZoomDirectionType;
|
|
35
37
|
(function(AnimationZoomDirectionType) {
|
package/dist/esm/types/custom.js
CHANGED
|
@@ -20,6 +20,7 @@ var InteractionTargetEvent;
|
|
|
20
20
|
InteractionTargetEvent[InteractionTargetEvent['gp:change-text-value'] = 17] = 'gp:change-text-value';
|
|
21
21
|
InteractionTargetEvent[InteractionTargetEvent['gp:toggle-popup-open'] = 18] = 'gp:toggle-popup-open';
|
|
22
22
|
InteractionTargetEvent[InteractionTargetEvent['gp:show-or-hide'] = 19] = 'gp:show-or-hide';
|
|
23
|
+
InteractionTargetEvent[InteractionTargetEvent['gp:change-banner'] = 20] = 'gp:change-banner';
|
|
23
24
|
})(InteractionTargetEvent || (InteractionTargetEvent = {}));
|
|
24
25
|
var InteractionTriggerEvent;
|
|
25
26
|
(function(InteractionTriggerEvent) {
|