@gem-sdk/core 1.23.0-staging.52 → 1.23.0-staging.55
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 +8 -1
- package/dist/cjs/components/ComponentWrapperPreview.js +7 -2
- package/dist/cjs/components/Render.liquid.js +5 -1
- package/dist/cjs/components/resize/Spacing.js +1 -0
- package/dist/esm/components/ComponentToolbarPreview.js +8 -1
- package/dist/esm/components/ComponentWrapperPreview.js +7 -2
- package/dist/esm/components/Render.liquid.js +5 -1
- package/dist/esm/components/resize/Spacing.js +1 -0
- package/dist/types/index.d.ts +9 -1
- package/package.json +1 -1
|
@@ -160,6 +160,13 @@ 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
|
+
};
|
|
163
170
|
const onZoomOut = (e)=>{
|
|
164
171
|
e.preventDefault();
|
|
165
172
|
e.stopPropagation();
|
|
@@ -252,7 +259,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
252
259
|
children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
|
|
253
260
|
}) : /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
254
261
|
"data-toolbar-name": true,
|
|
255
|
-
children:
|
|
262
|
+
children: toolbarName()
|
|
256
263
|
}),
|
|
257
264
|
props.tag !== 'Section' && parents.length > 0 && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
258
265
|
"data-toolbar-icon-parent": true,
|
|
@@ -106,11 +106,16 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
106
106
|
advanced: advanced
|
|
107
107
|
}),
|
|
108
108
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
109
|
-
style: style,
|
|
109
|
+
style: !props.editorConfigs?.component?.excludeApplyStyle ? style : {},
|
|
110
110
|
className: `${props.uid} ${props.advanced?.cssClass ? props.advanced?.cssClass : ''}`,
|
|
111
111
|
...builderAttrs,
|
|
112
112
|
children: [
|
|
113
|
-
children,
|
|
113
|
+
!props.editorConfigs?.component?.validate && children,
|
|
114
|
+
/*#__PURE__*/ react.isValidElement(children) && props.editorConfigs?.component?.validate && /*#__PURE__*/ jsxRuntime.jsx(children.type, {
|
|
115
|
+
...children.props,
|
|
116
|
+
style,
|
|
117
|
+
advanced
|
|
118
|
+
}),
|
|
114
119
|
/*#__PURE__*/ jsxRuntime.jsx(ComponentToolbarPreview.ComponentToolbarPreview, {
|
|
115
120
|
...props
|
|
116
121
|
})
|
|
@@ -24,6 +24,9 @@ const componentTexts = [
|
|
|
24
24
|
'Text',
|
|
25
25
|
'Heading'
|
|
26
26
|
];
|
|
27
|
+
const componentIconList = [
|
|
28
|
+
'IconListV2'
|
|
29
|
+
];
|
|
27
30
|
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
|
|
28
31
|
const item = builder[uid];
|
|
29
32
|
const Component = components[item?.tag];
|
|
@@ -104,7 +107,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
104
107
|
});
|
|
105
108
|
});
|
|
106
109
|
} else {
|
|
107
|
-
liquid = render.template`<div style="${style}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
110
|
+
liquid = render.template`<div style="${!componentIconList.includes(item.tag) ? style : ''}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
108
111
|
${render.RenderIf(item?.childrens?.length, ()=>{
|
|
109
112
|
return Component({
|
|
110
113
|
builderProps: {
|
|
@@ -153,6 +156,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
153
156
|
},
|
|
154
157
|
pageContext,
|
|
155
158
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
159
|
+
style: componentIconList.includes(item.tag) ? style : null,
|
|
156
160
|
...passProps
|
|
157
161
|
});
|
|
158
162
|
})}
|
|
@@ -106,6 +106,7 @@ function Spacing(props) {
|
|
|
106
106
|
children: props.tag !== 'Section' && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
107
107
|
"data-spacing": true,
|
|
108
108
|
"data-spacing-theme-section": isThemeSectionEditor,
|
|
109
|
+
className: "absolute w-full bottom-0",
|
|
109
110
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
110
111
|
"data-spacing-margin-bottom": true,
|
|
111
112
|
children: [
|
|
@@ -158,6 +158,13 @@ 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
|
+
};
|
|
161
168
|
const onZoomOut = (e)=>{
|
|
162
169
|
e.preventDefault();
|
|
163
170
|
e.stopPropagation();
|
|
@@ -250,7 +257,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
|
|
|
250
257
|
children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
|
|
251
258
|
}) : /*#__PURE__*/ jsx("div", {
|
|
252
259
|
"data-toolbar-name": true,
|
|
253
|
-
children:
|
|
260
|
+
children: toolbarName()
|
|
254
261
|
}),
|
|
255
262
|
props.tag !== 'Section' && parents.length > 0 && /*#__PURE__*/ jsx("div", {
|
|
256
263
|
"data-toolbar-icon-parent": true,
|
|
@@ -102,11 +102,16 @@ const ComponentWrapperPreview = ({ children, ...props })=>{
|
|
|
102
102
|
advanced: advanced
|
|
103
103
|
}),
|
|
104
104
|
/*#__PURE__*/ jsxs("div", {
|
|
105
|
-
style: style,
|
|
105
|
+
style: !props.editorConfigs?.component?.excludeApplyStyle ? style : {},
|
|
106
106
|
className: `${props.uid} ${props.advanced?.cssClass ? props.advanced?.cssClass : ''}`,
|
|
107
107
|
...builderAttrs,
|
|
108
108
|
children: [
|
|
109
|
-
children,
|
|
109
|
+
!props.editorConfigs?.component?.validate && children,
|
|
110
|
+
/*#__PURE__*/ isValidElement(children) && props.editorConfigs?.component?.validate && /*#__PURE__*/ jsx(children.type, {
|
|
111
|
+
...children.props,
|
|
112
|
+
style,
|
|
113
|
+
advanced
|
|
114
|
+
}),
|
|
110
115
|
/*#__PURE__*/ jsx(ComponentToolbarPreview, {
|
|
111
116
|
...props
|
|
112
117
|
})
|
|
@@ -20,6 +20,9 @@ const componentTexts = [
|
|
|
20
20
|
'Text',
|
|
21
21
|
'Heading'
|
|
22
22
|
];
|
|
23
|
+
const componentIconList = [
|
|
24
|
+
'IconListV2'
|
|
25
|
+
];
|
|
23
26
|
const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageContext, ...passProps })=>{
|
|
24
27
|
const item = builder[uid];
|
|
25
28
|
const Component = components[item?.tag];
|
|
@@ -100,7 +103,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
100
103
|
});
|
|
101
104
|
});
|
|
102
105
|
} else {
|
|
103
|
-
liquid = template`<div style="${style}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
106
|
+
liquid = template`<div style="${!componentIconList.includes(item.tag) ? style : ''}" class="${item.uid} ${!item?.childrens?.length && item.tag === 'IconListItemHoz' ? 'hidden' : ''}">
|
|
104
107
|
${RenderIf(item?.childrens?.length, ()=>{
|
|
105
108
|
return Component({
|
|
106
109
|
builderProps: {
|
|
@@ -149,6 +152,7 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
|
|
|
149
152
|
},
|
|
150
153
|
pageContext,
|
|
151
154
|
isText: componentTexts.includes(item.tag) ? true : null,
|
|
155
|
+
style: componentIconList.includes(item.tag) ? style : null,
|
|
152
156
|
...passProps
|
|
153
157
|
});
|
|
154
158
|
})}
|
|
@@ -102,6 +102,7 @@ function Spacing(props) {
|
|
|
102
102
|
children: props.tag !== 'Section' && /*#__PURE__*/ jsx("div", {
|
|
103
103
|
"data-spacing": true,
|
|
104
104
|
"data-spacing-theme-section": isThemeSectionEditor,
|
|
105
|
+
className: "absolute w-full bottom-0",
|
|
105
106
|
children: /*#__PURE__*/ jsxs("div", {
|
|
106
107
|
"data-spacing-margin-bottom": true,
|
|
107
108
|
children: [
|
package/dist/types/index.d.ts
CHANGED
|
@@ -931,9 +931,15 @@ type SizeSetting$1<T> = SharedControlType<T> & {
|
|
|
931
931
|
readonly?: boolean;
|
|
932
932
|
hiddenSettings?: SettingID[];
|
|
933
933
|
settingConfig?: Partial<Record<SettingID, SettingConfig>>;
|
|
934
|
+
hiddenShowMore?: boolean;
|
|
934
935
|
};
|
|
935
936
|
|
|
936
|
-
type
|
|
937
|
+
type ChildIconType<T> = SharedControlType<T> & {
|
|
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>;
|
|
937
943
|
type Setting<P extends BaseProps> = {
|
|
938
944
|
id: 'setting';
|
|
939
945
|
note?: string;
|
|
@@ -961,6 +967,8 @@ type ComponentSetting<P extends BaseProps> = {
|
|
|
961
967
|
noWrap?: boolean;
|
|
962
968
|
editorConfigs?: {
|
|
963
969
|
component?: {
|
|
970
|
+
validate?: boolean;
|
|
971
|
+
excludeApplyStyle?: boolean;
|
|
964
972
|
noDelete?: boolean;
|
|
965
973
|
noDuplicate?: boolean;
|
|
966
974
|
noDragDrop?: boolean;
|