@gem-sdk/core 1.53.0-dev.10 → 1.53.0-dev.14
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/ComponentWrapper.js +16 -1
- package/dist/cjs/components/Render.liquid.js +3 -2
- package/dist/cjs/helpers/convert.js +1 -1
- package/dist/cjs/helpers/third-party/appSetting.js +8 -1
- package/dist/esm/components/ComponentWrapper.js +16 -1
- package/dist/esm/components/Render.liquid.js +3 -2
- package/dist/esm/helpers/convert.js +1 -1
- package/dist/esm/helpers/third-party/appSetting.js +8 -1
- package/dist/types/index.d.ts +6 -2
- package/package.json +2 -2
|
@@ -12,6 +12,16 @@ const ComponentWrapper = ({ children, pageType, ...props })=>{
|
|
|
12
12
|
if (props.type === 'section') return null;
|
|
13
13
|
const style = composeAdvanceStyle.composeAdvanceStyle(props.advanced, props.tag, pageType);
|
|
14
14
|
const advanced = props.advanced;
|
|
15
|
+
const interactionAttributes = ()=>{
|
|
16
|
+
let result = {};
|
|
17
|
+
if (props.advanced?.displayInitInteraction === false) {
|
|
18
|
+
result = {
|
|
19
|
+
'display-init': props.advanced?.displayInitInteraction === false ? 'hide' : 'show',
|
|
20
|
+
'gp-interaction-wrapper': ''
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
15
25
|
if (constant.disableWrap.includes(props.tag) && /*#__PURE__*/ react.isValidElement(children)) {
|
|
16
26
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
17
27
|
children: [
|
|
@@ -23,7 +33,11 @@ const ComponentWrapper = ({ children, pageType, ...props })=>{
|
|
|
23
33
|
className: advanced?.cssClass,
|
|
24
34
|
...children.props,
|
|
25
35
|
style,
|
|
26
|
-
advanced
|
|
36
|
+
advanced,
|
|
37
|
+
builderAttrs: {
|
|
38
|
+
...children.props.builderAttrs,
|
|
39
|
+
...interactionAttributes()
|
|
40
|
+
}
|
|
27
41
|
})
|
|
28
42
|
]
|
|
29
43
|
});
|
|
@@ -36,6 +50,7 @@ const ComponentWrapper = ({ children, pageType, ...props })=>{
|
|
|
36
50
|
}),
|
|
37
51
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
38
52
|
style: style,
|
|
53
|
+
...interactionAttributes(),
|
|
39
54
|
className: `${props.uid} ${advanced?.cssClass}`,
|
|
40
55
|
children: children
|
|
41
56
|
})
|
|
@@ -215,7 +215,7 @@ const RenderCustomCode = (item)=>{
|
|
|
215
215
|
};
|
|
216
216
|
const appendAnimation = (props, liquid)=>{
|
|
217
217
|
const { advanced, tag } = props;
|
|
218
|
-
const { animation, op: opacity, hasAnimationInteraction, displayInitInteraction
|
|
218
|
+
const { animation, op: opacity, hasAnimationInteraction, displayInitInteraction } = advanced ?? {};
|
|
219
219
|
const getAnimationType = (settings, type)=>{
|
|
220
220
|
return settings?.triggerConfig?.[type]?.animation ?? 'none';
|
|
221
221
|
};
|
|
@@ -243,7 +243,8 @@ const appendAnimation = (props, liquid)=>{
|
|
|
243
243
|
};
|
|
244
244
|
return render.template`
|
|
245
245
|
<gp-animation
|
|
246
|
-
|
|
246
|
+
gp-interaction-wrapper
|
|
247
|
+
display-init="${displayInitInteraction === false ? 'hide' : 'show'}"
|
|
247
248
|
gp-data='${JSON.stringify({
|
|
248
249
|
config: animation,
|
|
249
250
|
tag,
|
|
@@ -88,6 +88,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
88
88
|
bundle_id: appSetting?.['customBundleId']
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
+
case 'PumperBundlesVolumeDiscount':
|
|
92
|
+
{
|
|
93
|
+
return {
|
|
94
|
+
...currentSetting,
|
|
95
|
+
selected_product: appSetting?.['productHandle'] || '{{ product }}'
|
|
96
|
+
};
|
|
97
|
+
}
|
|
91
98
|
default:
|
|
92
99
|
return currentSetting;
|
|
93
100
|
}
|
|
@@ -107,7 +114,7 @@ const ReviewxpoProductReviewsApp = {
|
|
|
107
114
|
const PumperBundlesVolumeDiscount = {
|
|
108
115
|
PumperBundlesVolumeDiscount: {
|
|
109
116
|
'app-block': {
|
|
110
|
-
selected_product: '{{product}}',
|
|
117
|
+
selected_product: '{{ product }}',
|
|
111
118
|
using_page_builder: false
|
|
112
119
|
}
|
|
113
120
|
}
|
|
@@ -8,6 +8,16 @@ const ComponentWrapper = ({ children, pageType, ...props })=>{
|
|
|
8
8
|
if (props.type === 'section') return null;
|
|
9
9
|
const style = composeAdvanceStyle(props.advanced, props.tag, pageType);
|
|
10
10
|
const advanced = props.advanced;
|
|
11
|
+
const interactionAttributes = ()=>{
|
|
12
|
+
let result = {};
|
|
13
|
+
if (props.advanced?.displayInitInteraction === false) {
|
|
14
|
+
result = {
|
|
15
|
+
'display-init': props.advanced?.displayInitInteraction === false ? 'hide' : 'show',
|
|
16
|
+
'gp-interaction-wrapper': ''
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
11
21
|
if (disableWrap.includes(props.tag) && /*#__PURE__*/ isValidElement(children)) {
|
|
12
22
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
13
23
|
children: [
|
|
@@ -19,7 +29,11 @@ const ComponentWrapper = ({ children, pageType, ...props })=>{
|
|
|
19
29
|
className: advanced?.cssClass,
|
|
20
30
|
...children.props,
|
|
21
31
|
style,
|
|
22
|
-
advanced
|
|
32
|
+
advanced,
|
|
33
|
+
builderAttrs: {
|
|
34
|
+
...children.props.builderAttrs,
|
|
35
|
+
...interactionAttributes()
|
|
36
|
+
}
|
|
23
37
|
})
|
|
24
38
|
]
|
|
25
39
|
});
|
|
@@ -32,6 +46,7 @@ const ComponentWrapper = ({ children, pageType, ...props })=>{
|
|
|
32
46
|
}),
|
|
33
47
|
/*#__PURE__*/ jsx("div", {
|
|
34
48
|
style: style,
|
|
49
|
+
...interactionAttributes(),
|
|
35
50
|
className: `${props.uid} ${advanced?.cssClass}`,
|
|
36
51
|
children: children
|
|
37
52
|
})
|
|
@@ -211,7 +211,7 @@ const RenderCustomCode = (item)=>{
|
|
|
211
211
|
};
|
|
212
212
|
const appendAnimation = (props, liquid)=>{
|
|
213
213
|
const { advanced, tag } = props;
|
|
214
|
-
const { animation, op: opacity, hasAnimationInteraction, displayInitInteraction
|
|
214
|
+
const { animation, op: opacity, hasAnimationInteraction, displayInitInteraction } = advanced ?? {};
|
|
215
215
|
const getAnimationType = (settings, type)=>{
|
|
216
216
|
return settings?.triggerConfig?.[type]?.animation ?? 'none';
|
|
217
217
|
};
|
|
@@ -239,7 +239,8 @@ const appendAnimation = (props, liquid)=>{
|
|
|
239
239
|
};
|
|
240
240
|
return template`
|
|
241
241
|
<gp-animation
|
|
242
|
-
|
|
242
|
+
gp-interaction-wrapper
|
|
243
|
+
display-init="${displayInitInteraction === false ? 'hide' : 'show'}"
|
|
243
244
|
gp-data='${JSON.stringify({
|
|
244
245
|
config: animation,
|
|
245
246
|
tag,
|
|
@@ -86,6 +86,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
|
|
|
86
86
|
bundle_id: appSetting?.['customBundleId']
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
+
case 'PumperBundlesVolumeDiscount':
|
|
90
|
+
{
|
|
91
|
+
return {
|
|
92
|
+
...currentSetting,
|
|
93
|
+
selected_product: appSetting?.['productHandle'] || '{{ product }}'
|
|
94
|
+
};
|
|
95
|
+
}
|
|
89
96
|
default:
|
|
90
97
|
return currentSetting;
|
|
91
98
|
}
|
|
@@ -105,7 +112,7 @@ const ReviewxpoProductReviewsApp = {
|
|
|
105
112
|
const PumperBundlesVolumeDiscount = {
|
|
106
113
|
PumperBundlesVolumeDiscount: {
|
|
107
114
|
'app-block': {
|
|
108
|
-
selected_product: '{{product}}',
|
|
115
|
+
selected_product: '{{ product }}',
|
|
109
116
|
using_page_builder: false
|
|
110
117
|
}
|
|
111
118
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8239,7 +8239,11 @@ type SettingUIGroup = {
|
|
|
8239
8239
|
};
|
|
8240
8240
|
};
|
|
8241
8241
|
|
|
8242
|
-
type
|
|
8242
|
+
type ProductHandleType<T> = SharedControlType<T> & {
|
|
8243
|
+
type: 'product-handle';
|
|
8244
|
+
};
|
|
8245
|
+
|
|
8246
|
+
type ControlProp<T> = ProductBundleChildControlType<T> | SelectProductBundleControlType<T> | AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | OpenLinkControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | VariantSwatchesOnlyDefaultVariantControlType<T> | ProductListControlType<T> | ArticleListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | BackgroundColorPickerType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | SneakPeakControlType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | PostPurchaseTextareaControlType<T> | NotesControlType<T> | ButtonLayoutType<T> | ShapeSelectorControlType<T> | DisplayTriggerControlType<T> | CustomPositionControlType<T> | DealControlType<T> | ProductHandleType<T>;
|
|
8243
8247
|
type ControlTriggerAction = {
|
|
8244
8248
|
controlId: string;
|
|
8245
8249
|
newValue?: any;
|
|
@@ -38092,7 +38096,7 @@ declare const removePaddingYInStyle: (style?: React.CSSProperties) => {
|
|
|
38092
38096
|
vectorEffect?: csstype.Property.VectorEffect | undefined;
|
|
38093
38097
|
};
|
|
38094
38098
|
|
|
38095
|
-
declare const isLocalEnv
|
|
38099
|
+
declare const isLocalEnv = true;
|
|
38096
38100
|
declare const baseAssetURL: string;
|
|
38097
38101
|
|
|
38098
38102
|
declare const convertHTML: (str: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.53.0-dev.
|
|
3
|
+
"version": "1.53.0-dev.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@gem-sdk/adapter-shopify": "1.53.0-dev.4",
|
|
31
|
-
"@gem-sdk/styles": "1.53.0-dev.
|
|
31
|
+
"@gem-sdk/styles": "1.53.0-dev.14",
|
|
32
32
|
"@types/classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|