@gem-sdk/core 1.23.0-staging.55 → 1.23.0-staging.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.
- package/dist/cjs/components/ComponentToolbarPreview.js +1 -8
- package/dist/cjs/components/ComponentWrapperPreview.js +2 -7
- package/dist/cjs/components/Render.liquid.js +1 -5
- package/dist/esm/components/ComponentToolbarPreview.js +1 -8
- package/dist/esm/components/ComponentWrapperPreview.js +2 -7
- package/dist/esm/components/Render.liquid.js +1 -5
- package/dist/types/index.d.ts +5 -9
- package/package.json +1 -1
|
@@ -160,13 +160,6 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
160
160
|
window.dispatchEvent(event);
|
|
161
161
|
return false;
|
|
162
162
|
};
|
|
163
|
-
const toolbarName = ()=>{
|
|
164
|
-
const name = props.customLabel || props.label;
|
|
165
|
-
if (name?.toLowerCase() === 'item list' || name?.toLowerCase() === 'icon list') {
|
|
166
|
-
return 'Advanced list';
|
|
167
|
-
}
|
|
168
|
-
return name;
|
|
169
|
-
};
|
|
170
163
|
const onZoomOut = (e)=>{
|
|
171
164
|
e.preventDefault();
|
|
172
165
|
e.stopPropagation();
|
|
@@ -259,7 +252,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
259
252
|
children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
|
|
260
253
|
}) : /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
261
254
|
"data-toolbar-name": true,
|
|
262
|
-
children:
|
|
255
|
+
children: props.customLabel || props.label
|
|
263
256
|
}),
|
|
264
257
|
props.tag !== 'Section' && parents.length > 0 && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
265
258
|
"data-toolbar-icon-parent": true,
|
|
@@ -106,16 +106,11 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
106
106
|
advanced: advanced
|
|
107
107
|
}),
|
|
108
108
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
109
|
-
style:
|
|
109
|
+
style: style,
|
|
110
110
|
className: `${props.uid} ${props.advanced?.cssClass ? props.advanced?.cssClass : ''}`,
|
|
111
111
|
...builderAttrs,
|
|
112
112
|
children: [
|
|
113
|
-
|
|
114
|
-
/*#__PURE__*/ react.isValidElement(children) && props.editorConfigs?.component?.validate && /*#__PURE__*/ jsxRuntime.jsx(children.type, {
|
|
115
|
-
...children.props,
|
|
116
|
-
style,
|
|
117
|
-
advanced
|
|
118
|
-
}),
|
|
113
|
+
children,
|
|
119
114
|
/*#__PURE__*/ jsxRuntime.jsx(ComponentToolbarPreview.ComponentToolbarPreview, {
|
|
120
115
|
...props
|
|
121
116
|
})
|
|
@@ -24,9 +24,6 @@ const componentTexts = [
|
|
|
24
24
|
'Text',
|
|
25
25
|
'Heading'
|
|
26
26
|
];
|
|
27
|
-
const componentIconList = [
|
|
28
|
-
'IconListV2'
|
|
29
|
-
];
|
|
30
27
|
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
|
|
31
28
|
const item = builder[uid];
|
|
32
29
|
const Component = components[item?.tag];
|
|
@@ -107,7 +104,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
107
104
|
});
|
|
108
105
|
});
|
|
109
106
|
} else {
|
|
110
|
-
liquid = render.template`<div style="${
|
|
107
|
+
liquid = render.template`<div style="${style}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
111
108
|
${render.RenderIf(item?.childrens?.length, ()=>{
|
|
112
109
|
return Component({
|
|
113
110
|
builderProps: {
|
|
@@ -156,7 +153,6 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
156
153
|
},
|
|
157
154
|
pageContext,
|
|
158
155
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
159
|
-
style: componentIconList.includes(item.tag) ? style : null,
|
|
160
156
|
...passProps
|
|
161
157
|
});
|
|
162
158
|
})}
|
|
@@ -158,13 +158,6 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
158
158
|
window.dispatchEvent(event);
|
|
159
159
|
return false;
|
|
160
160
|
};
|
|
161
|
-
const toolbarName = ()=>{
|
|
162
|
-
const name = props.customLabel || props.label;
|
|
163
|
-
if (name?.toLowerCase() === 'item list' || name?.toLowerCase() === 'icon list') {
|
|
164
|
-
return 'Advanced list';
|
|
165
|
-
}
|
|
166
|
-
return name;
|
|
167
|
-
};
|
|
168
161
|
const onZoomOut = (e)=>{
|
|
169
162
|
e.preventDefault();
|
|
170
163
|
e.stopPropagation();
|
|
@@ -257,7 +250,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
257
250
|
children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
|
|
258
251
|
}) : /*#__PURE__*/ jsx("div", {
|
|
259
252
|
"data-toolbar-name": true,
|
|
260
|
-
children:
|
|
253
|
+
children: props.customLabel || props.label
|
|
261
254
|
}),
|
|
262
255
|
props.tag !== 'Section' && parents.length > 0 && /*#__PURE__*/ jsx("div", {
|
|
263
256
|
"data-toolbar-icon-parent": true,
|
|
@@ -102,16 +102,11 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
102
102
|
advanced: advanced
|
|
103
103
|
}),
|
|
104
104
|
/*#__PURE__*/ jsxs("div", {
|
|
105
|
-
style:
|
|
105
|
+
style: style,
|
|
106
106
|
className: `${props.uid} ${props.advanced?.cssClass ? props.advanced?.cssClass : ''}`,
|
|
107
107
|
...builderAttrs,
|
|
108
108
|
children: [
|
|
109
|
-
|
|
110
|
-
/*#__PURE__*/ isValidElement(children) && props.editorConfigs?.component?.validate && /*#__PURE__*/ jsx(children.type, {
|
|
111
|
-
...children.props,
|
|
112
|
-
style,
|
|
113
|
-
advanced
|
|
114
|
-
}),
|
|
109
|
+
children,
|
|
115
110
|
/*#__PURE__*/ jsx(ComponentToolbarPreview, {
|
|
116
111
|
...props
|
|
117
112
|
})
|
|
@@ -20,9 +20,6 @@ const componentTexts = [
|
|
|
20
20
|
'Text',
|
|
21
21
|
'Heading'
|
|
22
22
|
];
|
|
23
|
-
const componentIconList = [
|
|
24
|
-
'IconListV2'
|
|
25
|
-
];
|
|
26
23
|
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
|
|
27
24
|
const item = builder[uid];
|
|
28
25
|
const Component = components[item?.tag];
|
|
@@ -103,7 +100,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
103
100
|
});
|
|
104
101
|
});
|
|
105
102
|
} else {
|
|
106
|
-
liquid = template`<div style="${
|
|
103
|
+
liquid = template`<div style="${style}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
107
104
|
${RenderIf(item?.childrens?.length, ()=>{
|
|
108
105
|
return Component({
|
|
109
106
|
builderProps: {
|
|
@@ -152,7 +149,6 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
152
149
|
},
|
|
153
150
|
pageContext,
|
|
154
151
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
155
|
-
style: componentIconList.includes(item.tag) ? style : null,
|
|
156
152
|
...passProps
|
|
157
153
|
});
|
|
158
154
|
})}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -931,15 +931,9 @@ type SizeSetting$1<T> = SharedControlType<T> & {
|
|
|
931
931
|
readonly?: boolean;
|
|
932
932
|
hiddenSettings?: SettingID[];
|
|
933
933
|
settingConfig?: Partial<Record<SettingID, SettingConfig>>;
|
|
934
|
-
hiddenShowMore?: boolean;
|
|
935
934
|
};
|
|
936
935
|
|
|
937
|
-
type
|
|
938
|
-
type: 'child-icon';
|
|
939
|
-
[key: string]: any;
|
|
940
|
-
};
|
|
941
|
-
|
|
942
|
-
type ControlProp<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> | 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> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T>;
|
|
936
|
+
type ControlProp<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> | 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> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T>;
|
|
943
937
|
type Setting<P extends BaseProps> = {
|
|
944
938
|
id: 'setting';
|
|
945
939
|
note?: string;
|
|
@@ -967,8 +961,6 @@ type ComponentSetting<P extends BaseProps> = {
|
|
|
967
961
|
noWrap?: boolean;
|
|
968
962
|
editorConfigs?: {
|
|
969
963
|
component?: {
|
|
970
|
-
validate?: boolean;
|
|
971
|
-
excludeApplyStyle?: boolean;
|
|
972
964
|
noDelete?: boolean;
|
|
973
965
|
noDuplicate?: boolean;
|
|
974
966
|
noDragDrop?: boolean;
|
|
@@ -1024,6 +1016,10 @@ type ControlUI = {
|
|
|
1024
1016
|
info?: 'near' | 'far';
|
|
1025
1017
|
labelSpacing?: 'small' | 'medium' | 'large';
|
|
1026
1018
|
removeSpacing?: boolean;
|
|
1019
|
+
tooltip?: {
|
|
1020
|
+
icon?: string;
|
|
1021
|
+
content?: string;
|
|
1022
|
+
};
|
|
1027
1023
|
hideOnDevices?: {
|
|
1028
1024
|
desktop?: boolean;
|
|
1029
1025
|
tablet?: boolean;
|