@flozy/editor 9.9.9 → 10.0.2

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.
@@ -95,7 +95,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
95
95
  site_id,
96
96
  page_title,
97
97
  content,
98
- onSave,
98
+ onSave = () => {},
99
99
  editor: collaborativeEditor,
100
100
  readOnly,
101
101
  otherProps,
@@ -359,9 +359,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
359
359
  const handleEditorChange = newValue => {
360
360
  if (JSON.stringify(newValue) !== JSON.stringify(debouncedValue?.current)) {
361
361
  updateTopBanner(newValue, setTopBanner);
362
- if (onSave && !readOnly) {
363
- debounced(newValue);
364
- }
362
+ debounced(newValue);
365
363
  if (!isInteracted) {
366
364
  // setIsInteracted(true);
367
365
  }
@@ -61,7 +61,7 @@ const FreeGridItem = props => {
61
61
  const onChangeSettings = () => {};
62
62
  // const refInput = useRef();
63
63
  // const [virtualHeight, setVirtualHeight] = useState(height || 0);
64
-
64
+ const xsHidden = element?.children?.some(c => c.xsHidden);
65
65
  const onChange = data => {
66
66
  let updateData = {
67
67
  ...data
@@ -268,7 +268,7 @@ const FreeGridItem = props => {
268
268
  }, [element]);
269
269
  return /*#__PURE__*/_jsx(RnD, {
270
270
  id: `freegrid_item_${path.join("|")}_${updated_at}_${breakpoint}`,
271
- className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
271
+ className: `freegrid-item path-${path.length} breakpoint-${breakpoint} ${xsHidden ? "xs-hidden" : ""}`,
272
272
  editor: editor,
273
273
  path: path,
274
274
  actions: itemTypeOptions,
@@ -361,6 +361,12 @@ const useFreeGridStyles = ({
361
361
  },
362
362
  [theme?.breakpoints?.between("xs", "md")]: {
363
363
  marginLeft: `calc((100% - 320px) * 0.5)`
364
+ },
365
+ "&.xs-hidden": {
366
+ display: {
367
+ xs: "none !important",
368
+ lg: "inline-block !important"
369
+ }
364
370
  }
365
371
  },
366
372
  "&.rnd-dragOver": {
@@ -67,7 +67,6 @@ function CustomColorPicker(props) {
67
67
  tabs.push(otherColors);
68
68
  return tabs;
69
69
  }, [recentColors, defaultColors, onChange, colorVars]);
70
- const selectValue = getSelectedColor(color, theme, hideThemeColors);
71
70
  return /*#__PURE__*/_jsxs(Paper, {
72
71
  component: "div",
73
72
  sx: classes.customColorPickerContainer,
@@ -105,7 +104,7 @@ function CustomColorPicker(props) {
105
104
  component: "div",
106
105
  className: "colorPickerBtnContainer",
107
106
  children: getColors(colors, colorTab, key).map((colorVar, i) => {
108
- const isSelected = colorVar === selectValue;
107
+ const isSelected = colorVar === color;
109
108
  return /*#__PURE__*/_jsx(Box, {
110
109
  className: isSelected ? "colorPicketBtnActive" : "",
111
110
  component: "div",
@@ -45,6 +45,12 @@ const useVirtualElementStyles = () => ({
45
45
  },
46
46
  "& .embed": {
47
47
  minHeight: "300px"
48
+ },
49
+ "&.xs-hidden": {
50
+ display: {
51
+ xs: "none !important",
52
+ lg: "inline-block !important"
53
+ }
48
54
  }
49
55
  }
50
56
  }
@@ -144,6 +150,12 @@ export const useAutoAlignStyles = () => ({
144
150
  },
145
151
  "& .embed": {
146
152
  minHeight: "300px"
153
+ },
154
+ "&.xs-hidden": {
155
+ display: {
156
+ xs: "none !important",
157
+ lg: "inline-block !important"
158
+ }
147
159
  }
148
160
  },
149
161
  "& .appHeaderBox, &.header-box-mobile-virtual-mode": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "9.9.9",
3
+ "version": "10.0.2",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"