@gem-sdk/core 1.23.0-staging.52 → 1.23.0-staging.58

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.
@@ -160,6 +160,17 @@ const ComponentToolbarPreview = ({ ...props })=>{
160
160
  window.dispatchEvent(event);
161
161
  return false;
162
162
  };
163
+ const toolbarName = ()=>{
164
+ const tag = props.tag;
165
+ if (tag === 'IconListV2') {
166
+ return 'Item list';
167
+ }
168
+ if (tag === 'IconList') {
169
+ return 'Advanced list';
170
+ }
171
+ const name = props.customLabel || props.label;
172
+ return name;
173
+ };
163
174
  const onZoomOut = (e)=>{
164
175
  e.preventDefault();
165
176
  e.stopPropagation();
@@ -252,7 +263,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
252
263
  children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
253
264
  }) : /*#__PURE__*/ jsxRuntime.jsx("div", {
254
265
  "data-toolbar-name": true,
255
- children: props.customLabel || props.label
266
+ children: toolbarName()
256
267
  }),
257
268
  props.tag !== 'Section' && parents.length > 0 && /*#__PURE__*/ jsxRuntime.jsx("div", {
258
269
  "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,17 @@ const ComponentToolbarPreview = ({ ...props })=>{
158
158
  window.dispatchEvent(event);
159
159
  return false;
160
160
  };
161
+ const toolbarName = ()=>{
162
+ const tag = props.tag;
163
+ if (tag === 'IconListV2') {
164
+ return 'Item list';
165
+ }
166
+ if (tag === 'IconList') {
167
+ return 'Advanced list';
168
+ }
169
+ const name = props.customLabel || props.label;
170
+ return name;
171
+ };
161
172
  const onZoomOut = (e)=>{
162
173
  e.preventDefault();
163
174
  e.stopPropagation();
@@ -250,7 +261,7 @@ const ComponentToolbarPreview = ({ ...props })=>{
250
261
  children: isThemeSection ? props.name : `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`
251
262
  }) : /*#__PURE__*/ jsx("div", {
252
263
  "data-toolbar-name": true,
253
- children: props.customLabel || props.label
264
+ children: toolbarName()
254
265
  }),
255
266
  props.tag !== 'Section' && parents.length > 0 && /*#__PURE__*/ jsx("div", {
256
267
  "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: [
@@ -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 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>;
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;
@@ -1016,6 +1024,10 @@ type ControlUI = {
1016
1024
  info?: 'near' | 'far';
1017
1025
  labelSpacing?: 'small' | 'medium' | 'large';
1018
1026
  removeSpacing?: boolean;
1027
+ tooltip?: {
1028
+ icon?: string;
1029
+ content?: string;
1030
+ };
1019
1031
  hideOnDevices?: {
1020
1032
  desktop?: boolean;
1021
1033
  tablet?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.23.0-staging.52",
3
+ "version": "1.23.0-staging.58",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",