@gem-sdk/core 1.53.0-dev.160 → 1.53.0-dev.162
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 +0 -1
- package/dist/cjs/components/InteractionSuffix.js +12 -4
- package/dist/cjs/helpers/compose-advance-style.js +13 -6
- package/dist/cjs/helpers/interaction/index.js +21 -1
- package/dist/cjs/helpers/shadow.js +2 -2
- package/dist/cjs/helpers/third-party/appConfig.js +7 -0
- package/dist/cjs/helpers/third-party/appSetting.js +12 -1
- package/dist/cjs/helpers/third-party/constant.js +2 -1
- package/dist/cjs/helpers/third-party/getAppBlockConfig.js +8 -1
- package/dist/esm/components/ComponentToolbarPreview.js +0 -1
- package/dist/esm/components/InteractionSuffix.js +12 -4
- package/dist/esm/helpers/compose-advance-style.js +13 -6
- package/dist/esm/helpers/interaction/index.js +21 -1
- package/dist/esm/helpers/shadow.js +2 -2
- package/dist/esm/helpers/third-party/appConfig.js +7 -1
- package/dist/esm/helpers/third-party/appSetting.js +12 -1
- package/dist/esm/helpers/third-party/constant.js +3 -2
- package/dist/esm/helpers/third-party/getAppBlockConfig.js +8 -1
- package/dist/types/index.d.ts +9 -2
- package/package.json +1 -1
|
@@ -17,14 +17,22 @@ require('dayjs');
|
|
|
17
17
|
var index = require('../helpers/interaction/index.js');
|
|
18
18
|
require('../helpers/convert.js');
|
|
19
19
|
|
|
20
|
-
const InteractionSuffix = ()=>{
|
|
21
|
-
const { closeSelectOnPage } = index.useInteraction();
|
|
22
|
-
const settingType = PageContext.usePageStore((s)=>s.interactionData?.settingType);
|
|
20
|
+
const InteractionSuffix = ({ uid })=>{
|
|
21
|
+
const { closeSelectOnPage, selectInteractionElement } = index.useInteraction();
|
|
22
|
+
const settingType = PageContext.usePageStore((s)=>s.interactionData?.settingType || '');
|
|
23
23
|
const isSelectOnPage = PageContext.usePageStore((s)=>s.interactionData?.isSelectOnPage);
|
|
24
|
+
const onClick = (e)=>{
|
|
25
|
+
selectInteractionElement({
|
|
26
|
+
$target: e.target,
|
|
27
|
+
componentUid: uid,
|
|
28
|
+
settingType
|
|
29
|
+
});
|
|
30
|
+
closeSelectOnPage();
|
|
31
|
+
};
|
|
24
32
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
25
33
|
children: isSelectOnPage && /*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
26
34
|
className: "gp-bg-[#F4F4F4] gp-px-2 gp-h-[24px] gp-py-0.5 gp-rounded-lg gp-text-[#212121] gp-text-xs gp-font-medium gp-hidden interaction-use-custom-element ",
|
|
27
|
-
onClick:
|
|
35
|
+
onClick: onClick,
|
|
28
36
|
"data-setup-interaction": true,
|
|
29
37
|
children: settingType === 'TRIGGER' ? 'Set as trigger' : 'Set as target'
|
|
30
38
|
})
|
|
@@ -102,12 +102,19 @@ function composeAdvanceStyle(data, tag, pageType) {
|
|
|
102
102
|
Object.assign(styles, radius.composeRadius(value));
|
|
103
103
|
}
|
|
104
104
|
if (attr === 'boxShadow') {
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
const listElementShadowV2 = [
|
|
106
|
+
'Row',
|
|
107
|
+
'Section'
|
|
108
|
+
];
|
|
109
|
+
let hasBoxShadowV2 = hasBoxShadow;
|
|
110
|
+
if (listElementShadowV2.includes(tag || '')) {
|
|
111
|
+
hasBoxShadowV2 = {
|
|
112
|
+
desktop: value.desktop ?? {},
|
|
113
|
+
tablet: value.tablet ?? value.desktop ?? {},
|
|
114
|
+
mobile: value.mobile ?? value.tablet ?? value.desktop ?? {}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
Object.assign(styles, shadow.getResponsiveStyleShadow(value, 'box-shadow', hasBoxShadowV2 ?? hasBoxShadow));
|
|
111
118
|
}
|
|
112
119
|
if (composeAttr === 'desktop') {
|
|
113
120
|
switch(attr){
|
|
@@ -71,6 +71,24 @@ const useInteraction = ()=>{
|
|
|
71
71
|
});
|
|
72
72
|
window.dispatchEvent(event);
|
|
73
73
|
};
|
|
74
|
+
const changeSelectMode = (mode)=>{
|
|
75
|
+
const event = new CustomEvent('editor:interaction:change-select-mode', {
|
|
76
|
+
bubbles: true,
|
|
77
|
+
detail: mode
|
|
78
|
+
});
|
|
79
|
+
window.dispatchEvent(event);
|
|
80
|
+
};
|
|
81
|
+
const selectInteractionElement = ({ componentUid, settingType, $target })=>{
|
|
82
|
+
const event = new CustomEvent('editor:interaction:select-element', {
|
|
83
|
+
bubbles: true,
|
|
84
|
+
detail: {
|
|
85
|
+
componentUid,
|
|
86
|
+
settingType,
|
|
87
|
+
$target
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
window.dispatchEvent(event);
|
|
91
|
+
};
|
|
74
92
|
return {
|
|
75
93
|
onListener,
|
|
76
94
|
trigger,
|
|
@@ -78,7 +96,9 @@ const useInteraction = ()=>{
|
|
|
78
96
|
closeSelectOnPage,
|
|
79
97
|
ref,
|
|
80
98
|
findElementIncludingSelf,
|
|
81
|
-
getInteractionPreviousData
|
|
99
|
+
getInteractionPreviousData,
|
|
100
|
+
changeSelectMode,
|
|
101
|
+
selectInteractionElement
|
|
82
102
|
};
|
|
83
103
|
};
|
|
84
104
|
|
|
@@ -24,9 +24,9 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
|
|
|
24
24
|
let { state } = shadowStyle || {};
|
|
25
25
|
if (!state) state = 'normal';
|
|
26
26
|
if (!styleAppliedFor || !value) return {};
|
|
27
|
-
if (typeof value.distance == 'undefined') return {};
|
|
28
|
-
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
29
27
|
const isNoneValue = value.type === 'none';
|
|
28
|
+
if (typeof value.distance == 'undefined' && !isNoneValue) return {};
|
|
29
|
+
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
30
30
|
return {
|
|
31
31
|
[`-${!isActiveState ? constant.stateMapping?.[state] || '' : ''}-${getShortname.getShortName(styleAppliedFor)}${shadowStyle.screen ? `-${shadowStyle.screen}` : ''}`]: isEnableShadow && !isNoneValue ? `${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'
|
|
32
32
|
};
|
|
@@ -150,6 +150,12 @@ const BoldSubscriptionsConfig = {
|
|
|
150
150
|
appId: '9ceb49f0-5fe5-4b5e-943d-f8af8985167d'
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
|
+
const GrowaveConfig = {
|
|
154
|
+
Growave: {
|
|
155
|
+
appName: 'growave-loyalty-wishlist',
|
|
156
|
+
appId: 'b3d2efbe-110a-4e27-84a8-1f2ed63996a4'
|
|
157
|
+
}
|
|
158
|
+
};
|
|
153
159
|
|
|
154
160
|
exports.AppointmentBookingCowlendarConfig = AppointmentBookingCowlendarConfig;
|
|
155
161
|
exports.BoldSubscriptionsConfig = BoldSubscriptionsConfig;
|
|
@@ -157,6 +163,7 @@ exports.BonLoyaltyRewardsReferralsConfig = BonLoyaltyRewardsReferralsConfig;
|
|
|
157
163
|
exports.EasyBundleBuilderSkailamaConfig = EasyBundleBuilderSkailamaConfig;
|
|
158
164
|
exports.FastBundleBundlesDiscountsConfig = FastBundleBundlesDiscountsConfig;
|
|
159
165
|
exports.FlyBundlesUpsellsFbtConfig = FlyBundlesUpsellsFbtConfig;
|
|
166
|
+
exports.GrowaveConfig = GrowaveConfig;
|
|
160
167
|
exports.InstasellShoppableInstagramConfig = InstasellShoppableInstagramConfig;
|
|
161
168
|
exports.JunipProductReviewsUgcConfig = JunipProductReviewsUgcConfig;
|
|
162
169
|
exports.KiteFreeGiftDiscountConfig = KiteFreeGiftDiscountConfig;
|
|
@@ -351,6 +351,16 @@ const BoldSubscriptions = {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
+
const Growave = {
|
|
355
|
+
Growave: {
|
|
356
|
+
'block.product.faveButton': {
|
|
357
|
+
option_button_class: ''
|
|
358
|
+
},
|
|
359
|
+
'block.product.reviewWidget': null,
|
|
360
|
+
'block.product.reviewAvgProfile': null,
|
|
361
|
+
'v2.product.reviewsMiniSlider': null
|
|
362
|
+
}
|
|
363
|
+
};
|
|
354
364
|
const composeSettingsByWidgetType = {
|
|
355
365
|
...InstasellShoppableInstagram,
|
|
356
366
|
...SproutPlantTreesGrowSales,
|
|
@@ -376,7 +386,8 @@ const composeSettingsByWidgetType = {
|
|
|
376
386
|
...SubifySubscriptions,
|
|
377
387
|
...SelleasyWidget,
|
|
378
388
|
...YotpoReviews,
|
|
379
|
-
...BoldSubscriptions
|
|
389
|
+
...BoldSubscriptions,
|
|
390
|
+
...Growave
|
|
380
391
|
};
|
|
381
392
|
|
|
382
393
|
exports.composeSettingsByWidgetType = composeSettingsByWidgetType;
|
|
@@ -27,7 +27,8 @@ const mapShopifyAppMeta = {
|
|
|
27
27
|
...appConfig.AppointmentBookingCowlendarConfig,
|
|
28
28
|
...appConfig.SproutPlantTreesGrowSalesConfig,
|
|
29
29
|
...appConfig.InstasellShoppableInstagramConfig,
|
|
30
|
-
...appConfig.BoldSubscriptionsConfig
|
|
30
|
+
...appConfig.BoldSubscriptionsConfig,
|
|
31
|
+
...appConfig.GrowaveConfig
|
|
31
32
|
};
|
|
32
33
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
33
34
|
|
|
@@ -3,10 +3,17 @@
|
|
|
3
3
|
var appSetting = require('./appSetting.js');
|
|
4
4
|
var getAppBlockType = require('./getAppBlockType.js');
|
|
5
5
|
|
|
6
|
+
const listAppUpdateNewVersion = [
|
|
7
|
+
'Growave'
|
|
8
|
+
];
|
|
6
9
|
const getAppBlockConfig = (tag, appBlockId, settings)=>{
|
|
10
|
+
let widgetType = settings?.widgetType;
|
|
11
|
+
if (listAppUpdateNewVersion.includes(tag)) {
|
|
12
|
+
widgetType = settings?.widgetTypeV2;
|
|
13
|
+
}
|
|
7
14
|
const appBlockType = getAppBlockType.getAppBlockType({
|
|
8
15
|
tag,
|
|
9
|
-
widgetType
|
|
16
|
+
widgetType
|
|
10
17
|
});
|
|
11
18
|
const settingByWidget = appSetting.composeSettingsByWidgetType[tag][settings?.widgetType];
|
|
12
19
|
const appSettings = appSetting.overrideSettings(tag, settingByWidget, settings);
|
|
@@ -15,14 +15,22 @@ import 'dayjs';
|
|
|
15
15
|
import { useInteraction } from '../helpers/interaction/index.js';
|
|
16
16
|
import '../helpers/convert.js';
|
|
17
17
|
|
|
18
|
-
const InteractionSuffix = ()=>{
|
|
19
|
-
const { closeSelectOnPage } = useInteraction();
|
|
20
|
-
const settingType = usePageStore((s)=>s.interactionData?.settingType);
|
|
18
|
+
const InteractionSuffix = ({ uid })=>{
|
|
19
|
+
const { closeSelectOnPage, selectInteractionElement } = useInteraction();
|
|
20
|
+
const settingType = usePageStore((s)=>s.interactionData?.settingType || '');
|
|
21
21
|
const isSelectOnPage = usePageStore((s)=>s.interactionData?.isSelectOnPage);
|
|
22
|
+
const onClick = (e)=>{
|
|
23
|
+
selectInteractionElement({
|
|
24
|
+
$target: e.target,
|
|
25
|
+
componentUid: uid,
|
|
26
|
+
settingType
|
|
27
|
+
});
|
|
28
|
+
closeSelectOnPage();
|
|
29
|
+
};
|
|
22
30
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
23
31
|
children: isSelectOnPage && /*#__PURE__*/ jsx("button", {
|
|
24
32
|
className: "gp-bg-[#F4F4F4] gp-px-2 gp-h-[24px] gp-py-0.5 gp-rounded-lg gp-text-[#212121] gp-text-xs gp-font-medium gp-hidden interaction-use-custom-element ",
|
|
25
|
-
onClick:
|
|
33
|
+
onClick: onClick,
|
|
26
34
|
"data-setup-interaction": true,
|
|
27
35
|
children: settingType === 'TRIGGER' ? 'Set as trigger' : 'Set as target'
|
|
28
36
|
})
|
|
@@ -100,12 +100,19 @@ function composeAdvanceStyle(data, tag, pageType) {
|
|
|
100
100
|
Object.assign(styles, composeRadius(value));
|
|
101
101
|
}
|
|
102
102
|
if (attr === 'boxShadow') {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
const listElementShadowV2 = [
|
|
104
|
+
'Row',
|
|
105
|
+
'Section'
|
|
106
|
+
];
|
|
107
|
+
let hasBoxShadowV2 = hasBoxShadow;
|
|
108
|
+
if (listElementShadowV2.includes(tag || '')) {
|
|
109
|
+
hasBoxShadowV2 = {
|
|
110
|
+
desktop: value.desktop ?? {},
|
|
111
|
+
tablet: value.tablet ?? value.desktop ?? {},
|
|
112
|
+
mobile: value.mobile ?? value.tablet ?? value.desktop ?? {}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
Object.assign(styles, getResponsiveStyleShadow(value, 'box-shadow', hasBoxShadowV2 ?? hasBoxShadow));
|
|
109
116
|
}
|
|
110
117
|
if (composeAttr === 'desktop') {
|
|
111
118
|
switch(attr){
|
|
@@ -69,6 +69,24 @@ const useInteraction = ()=>{
|
|
|
69
69
|
});
|
|
70
70
|
window.dispatchEvent(event);
|
|
71
71
|
};
|
|
72
|
+
const changeSelectMode = (mode)=>{
|
|
73
|
+
const event = new CustomEvent('editor:interaction:change-select-mode', {
|
|
74
|
+
bubbles: true,
|
|
75
|
+
detail: mode
|
|
76
|
+
});
|
|
77
|
+
window.dispatchEvent(event);
|
|
78
|
+
};
|
|
79
|
+
const selectInteractionElement = ({ componentUid, settingType, $target })=>{
|
|
80
|
+
const event = new CustomEvent('editor:interaction:select-element', {
|
|
81
|
+
bubbles: true,
|
|
82
|
+
detail: {
|
|
83
|
+
componentUid,
|
|
84
|
+
settingType,
|
|
85
|
+
$target
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
window.dispatchEvent(event);
|
|
89
|
+
};
|
|
72
90
|
return {
|
|
73
91
|
onListener,
|
|
74
92
|
trigger,
|
|
@@ -76,7 +94,9 @@ const useInteraction = ()=>{
|
|
|
76
94
|
closeSelectOnPage,
|
|
77
95
|
ref,
|
|
78
96
|
findElementIncludingSelf,
|
|
79
|
-
getInteractionPreviousData
|
|
97
|
+
getInteractionPreviousData,
|
|
98
|
+
changeSelectMode,
|
|
99
|
+
selectInteractionElement
|
|
80
100
|
};
|
|
81
101
|
};
|
|
82
102
|
|
|
@@ -22,9 +22,9 @@ const getStyleShadow = (shadowStyle, isActiveState = false)=>{
|
|
|
22
22
|
let { state } = shadowStyle || {};
|
|
23
23
|
if (!state) state = 'normal';
|
|
24
24
|
if (!styleAppliedFor || !value) return {};
|
|
25
|
-
if (typeof value.distance == 'undefined') return {};
|
|
26
|
-
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
27
25
|
const isNoneValue = value.type === 'none';
|
|
26
|
+
if (typeof value.distance == 'undefined' && !isNoneValue) return {};
|
|
27
|
+
const { value: distance, unit: unitDistance } = parseValueWithUnit(`${value?.distance}`);
|
|
28
28
|
return {
|
|
29
29
|
[`-${!isActiveState ? stateMapping?.[state] || '' : ''}-${getShortName(styleAppliedFor)}${shadowStyle.screen ? `-${shadowStyle.screen}` : ''}`]: isEnableShadow && !isNoneValue ? `${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'
|
|
30
30
|
};
|
|
@@ -148,5 +148,11 @@ const BoldSubscriptionsConfig = {
|
|
|
148
148
|
appId: '9ceb49f0-5fe5-4b5e-943d-f8af8985167d'
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
+
const GrowaveConfig = {
|
|
152
|
+
Growave: {
|
|
153
|
+
appName: 'growave-loyalty-wishlist',
|
|
154
|
+
appId: 'b3d2efbe-110a-4e27-84a8-1f2ed63996a4'
|
|
155
|
+
}
|
|
156
|
+
};
|
|
151
157
|
|
|
152
|
-
export { AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, YotpoReviewsV3UgcConfig };
|
|
158
|
+
export { AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, EasyBundleBuilderSkailamaConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GrowaveConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KiteFreeGiftDiscountConfig, LoopSubscriptionsConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SelleasyConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, SubifySubscriptionsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, YotpoReviewsV3UgcConfig };
|
|
@@ -349,6 +349,16 @@ const BoldSubscriptions = {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
|
+
const Growave = {
|
|
353
|
+
Growave: {
|
|
354
|
+
'block.product.faveButton': {
|
|
355
|
+
option_button_class: ''
|
|
356
|
+
},
|
|
357
|
+
'block.product.reviewWidget': null,
|
|
358
|
+
'block.product.reviewAvgProfile': null,
|
|
359
|
+
'v2.product.reviewsMiniSlider': null
|
|
360
|
+
}
|
|
361
|
+
};
|
|
352
362
|
const composeSettingsByWidgetType = {
|
|
353
363
|
...InstasellShoppableInstagram,
|
|
354
364
|
...SproutPlantTreesGrowSales,
|
|
@@ -374,7 +384,8 @@ const composeSettingsByWidgetType = {
|
|
|
374
384
|
...SubifySubscriptions,
|
|
375
385
|
...SelleasyWidget,
|
|
376
386
|
...YotpoReviews,
|
|
377
|
-
...BoldSubscriptions
|
|
387
|
+
...BoldSubscriptions,
|
|
388
|
+
...Growave
|
|
378
389
|
};
|
|
379
390
|
|
|
380
391
|
export { composeSettingsByWidgetType, overrideSettings };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, BoldSubscriptionsConfig } from './appConfig.js';
|
|
1
|
+
import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, BoldSubscriptionsConfig, GrowaveConfig } from './appConfig.js';
|
|
2
2
|
|
|
3
3
|
const mapShopifyAppMeta = {
|
|
4
4
|
...RechargeSubscriptionsConfig,
|
|
@@ -25,7 +25,8 @@ const mapShopifyAppMeta = {
|
|
|
25
25
|
...AppointmentBookingCowlendarConfig,
|
|
26
26
|
...SproutPlantTreesGrowSalesConfig,
|
|
27
27
|
...InstasellShoppableInstagramConfig,
|
|
28
|
-
...BoldSubscriptionsConfig
|
|
28
|
+
...BoldSubscriptionsConfig,
|
|
29
|
+
...GrowaveConfig
|
|
29
30
|
};
|
|
30
31
|
const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
|
|
31
32
|
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { composeSettingsByWidgetType, overrideSettings } from './appSetting.js';
|
|
2
2
|
import { getAppBlockType } from './getAppBlockType.js';
|
|
3
3
|
|
|
4
|
+
const listAppUpdateNewVersion = [
|
|
5
|
+
'Growave'
|
|
6
|
+
];
|
|
4
7
|
const getAppBlockConfig = (tag, appBlockId, settings)=>{
|
|
8
|
+
let widgetType = settings?.widgetType;
|
|
9
|
+
if (listAppUpdateNewVersion.includes(tag)) {
|
|
10
|
+
widgetType = settings?.widgetTypeV2;
|
|
11
|
+
}
|
|
5
12
|
const appBlockType = getAppBlockType({
|
|
6
13
|
tag,
|
|
7
|
-
widgetType
|
|
14
|
+
widgetType
|
|
8
15
|
});
|
|
9
16
|
const settingByWidget = composeSettingsByWidgetType[tag][settings?.widgetType];
|
|
10
17
|
const appSettings = overrideSettings(tag, settingByWidget, settings);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6906,7 +6906,8 @@ type RivyoWidgetType = 'reviews' | 'badge' | 'testimonials' | 'allReviewsPage';
|
|
|
6906
6906
|
type VitalsWidgetType = 'addToWishlist' | 'goToWishlist' | 'paymentLogos' | 'recentlyViewed' | 'shoppableInstagramFeed' | 'trustSealsAndBadges' | 'productReviews' | 'productBundles' | 'volumeDiscounts' | 'stockScarcity' | 'sizeChart' | 'upsellBuilderBogo' | 'bundleCountdownBox' | 'reviewsUnderTitle' | 'productReviewsCarousel' | 'shippingBox' | 'currencyConverter' | 'relatedProducts' | 'backInStock';
|
|
6907
6907
|
type FeraReviewsWidgetType = 'productReviews' | 'testimonialCarousel' | 'allReviews' | 'averageStoreRatingBadge' | 'inStoreMedia' | 'averageRatingBadge' | 'productPageMedia';
|
|
6908
6908
|
type FeraReviewsV3WidgetType = 'allReviews' | 'testimonialCarousel' | 'mediaGallery' | 'productDetailRating' | 'productReviews' | 'productCollectionRating' | 'otherWidget';
|
|
6909
|
-
type
|
|
6909
|
+
type GrowaveWidgetTypeV2 = 'block.product.reviewWidget' | 'v2.product.reviewsMiniSlider' | 'block.product.reviewAvgProfile' | 'block.product.faveButton';
|
|
6910
|
+
type GrowaveWidgetTypeV1 = 'reviews' | 'badge' | 'productListBadge' | 'wishList' | 'socialShare' | 'favorite';
|
|
6910
6911
|
type AliReviewsWidgetType = 'starRating' | 'reviewBox';
|
|
6911
6912
|
type OpinewWidgetType = 'reviews' | 'badge' | 'badgeCollection' | 'carousel' | 'allReviews' | 'allReviewsBadge';
|
|
6912
6913
|
type OpinewDesignWidgetType = 'opinew_badge_wide_average' | 'opinew_badge_wide' | 'opinew_badge_small';
|
|
@@ -41787,6 +41788,12 @@ declare const useInteraction: () => {
|
|
|
41787
41788
|
previousData: any;
|
|
41788
41789
|
interactionDataJson: any;
|
|
41789
41790
|
};
|
|
41791
|
+
changeSelectMode: (mode: 'ELEMENT' | 'PAGE') => void;
|
|
41792
|
+
selectInteractionElement: ({ componentUid, settingType, $target, }: {
|
|
41793
|
+
componentUid: string;
|
|
41794
|
+
settingType: string;
|
|
41795
|
+
$target: HTMLElement;
|
|
41796
|
+
}) => void;
|
|
41790
41797
|
};
|
|
41791
41798
|
|
|
41792
|
-
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType,
|
|
41799
|
+
export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AirProductReview, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, ArticleListProvider, ArticleListProviderProps, ArticleProvider, ArticleProviderProps, Background, BackgroundImageValue, BackgroundMedia, BackgroundVideoValue, BaseProps, BasePropsWrap, BlockEntity, BogosWidgetType, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CSSStateKey, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FastBundleWidgetType, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetTypeV1, GrowaveWidgetTypeV2, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, Interaction, InteractionCondition, InteractionElement, InteractionTarget, InteractionTargetEvent, InteractionTargetEventObject, InteractionTriggerEvent, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibrarySaleFunnelDocument, LibrarySaleFunnelQueryResponse, LibrarySaleFunnelQueryVariables, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OnlyOne, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreOrderNowWodWidgetType, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublicStoreFrontData, PublishedShopMetasDocument, PublishedShopMetasQueryResponse, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, QueryPublishedShopMetasArgs, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RawChild, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, SettingUIGroup, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopLibraryPageDocument, ShopLibraryPageQueryResponse, ShopLibraryPageQueryVariables, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, TagShopWidgetType, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserV2WidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, addAppBlockId, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, checkInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, convertTextAlignToJustify, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, formatMoney, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAppBlocks, getAspectRatioGlobalSize, getBgImageByDevice, getBorderRadiusStyle, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveStyleShadow, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleBgColor, getStyleShadow, getStyleShadowState, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeIcon, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useArticleListStore, useArticleStore, useArticlesQuery, useBlogsQuery, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useHasPreSelected, useInitialSwatchesOptions, useInteraction, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
|