@flozy/editor 3.8.9 → 3.9.0

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.
Files changed (111) hide show
  1. package/dist/Editor/ChatEditor.js +55 -45
  2. package/dist/Editor/CommonEditor.js +8 -69
  3. package/dist/Editor/DialogWrapper.js +3 -4
  4. package/dist/Editor/Editor.css +12 -5
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +36 -47
  6. package/dist/Editor/Elements/Accordion/AccordionSummary.js +15 -4
  7. package/dist/Editor/Elements/AppHeader/AppHeader.js +23 -36
  8. package/dist/Editor/Elements/Button/EditorButton.js +16 -23
  9. package/dist/Editor/Elements/Embed/Image.js +14 -15
  10. package/dist/Editor/Elements/Embed/Video.js +8 -12
  11. package/dist/Editor/Elements/Emoji/EmojiButton.js +7 -11
  12. package/dist/Editor/Elements/Emoji/EmojiPicker.js +4 -2
  13. package/dist/Editor/Elements/Form/Form.js +1 -1
  14. package/dist/Editor/Elements/Grid/Grid.js +8 -12
  15. package/dist/Editor/Elements/Grid/GridItem.js +21 -31
  16. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +5 -1
  17. package/dist/Editor/Elements/SimpleText/index.js +8 -9
  18. package/dist/Editor/Elements/SimpleText/style.js +0 -37
  19. package/dist/Editor/Styles/EditorStyles.js +0 -23
  20. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +25 -1
  21. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +0 -1
  22. package/dist/Editor/Toolbar/PopupTool/index.js +0 -8
  23. package/dist/Editor/Toolbar/Toolbar.js +0 -7
  24. package/dist/Editor/Toolbar/toolbarGroups.js +0 -5
  25. package/dist/Editor/common/Icon.js +2 -9
  26. package/dist/Editor/common/MentionsPopup/MentionsListCard.js +6 -1
  27. package/dist/Editor/common/MentionsPopup/index.js +8 -12
  28. package/dist/Editor/common/Section/index.js +12 -21
  29. package/dist/Editor/common/Section/styles.js +1 -6
  30. package/dist/Editor/common/Shorthands/elements.js +0 -12
  31. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +31 -32
  32. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +18 -16
  33. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +14 -3
  34. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +2 -4
  35. package/dist/Editor/common/StyleBuilder/index.js +2 -2
  36. package/dist/Editor/common/StyleBuilder/sectionStyle.js +2 -13
  37. package/dist/Editor/helper/index.js +0 -139
  38. package/dist/Editor/helper/theme.js +2 -50
  39. package/dist/Editor/hooks/useMouseMove.js +8 -36
  40. package/dist/Editor/hooks/withCommon.js +1 -2
  41. package/dist/Editor/utils/SlateUtilityFunctions.js +3 -23
  42. package/dist/Editor/utils/draftToSlate.js +1 -1
  43. package/dist/Editor/utils/events.js +0 -5
  44. package/dist/Editor/utils/helper.js +0 -29
  45. package/package.json +2 -5
  46. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +0 -391
  47. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +0 -193
  48. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +0 -23
  49. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -184
  50. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +0 -36
  51. package/dist/Editor/Elements/FreeGrid/Options/More.js +0 -24
  52. package/dist/Editor/Elements/FreeGrid/Options/SectionSettings.js +0 -47
  53. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +0 -11
  54. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +0 -75
  55. package/dist/Editor/Elements/FreeGrid/styles.js +0 -159
  56. package/dist/Editor/ErrorBoundary.js +0 -30
  57. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +0 -105
  58. package/dist/Editor/common/RnD/ContextMenu/index.js +0 -38
  59. package/dist/Editor/common/RnD/ContextMenu/styles.js +0 -21
  60. package/dist/Editor/common/RnD/DragInfo/index.js +0 -31
  61. package/dist/Editor/common/RnD/DragInfo/styles.js +0 -15
  62. package/dist/Editor/common/RnD/DragOver/index.js +0 -46
  63. package/dist/Editor/common/RnD/DragOver/styles.js +0 -23
  64. package/dist/Editor/common/RnD/ElementOptions/Actions.js +0 -82
  65. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -26
  66. package/dist/Editor/common/RnD/ElementOptions/index.js +0 -93
  67. package/dist/Editor/common/RnD/ElementOptions/styles.js +0 -41
  68. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Link.js +0 -153
  69. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +0 -58
  70. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +0 -7
  71. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +0 -46
  72. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +0 -46
  73. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +0 -46
  74. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +0 -30
  75. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +0 -46
  76. package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +0 -13
  77. package/dist/Editor/common/RnD/ElementSettings/index.js +0 -17
  78. package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +0 -14
  79. package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -76
  80. package/dist/Editor/common/RnD/GuideLines/BoundaryLine.js +0 -52
  81. package/dist/Editor/common/RnD/GuideLines/index.js +0 -33
  82. package/dist/Editor/common/RnD/GuideLines/styles.js +0 -60
  83. package/dist/Editor/common/RnD/OptionsPopup/index.js +0 -50
  84. package/dist/Editor/common/RnD/OptionsPopup/style.js +0 -36
  85. package/dist/Editor/common/RnD/RnDCopy.js +0 -23
  86. package/dist/Editor/common/RnD/ShadowElement.js +0 -34
  87. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +0 -40
  88. package/dist/Editor/common/RnD/SwitchViewport/styles.js +0 -24
  89. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +0 -63
  90. package/dist/Editor/common/RnD/TransformHandles/CornerHandle.js +0 -19
  91. package/dist/Editor/common/RnD/TransformHandles/Icons/BottomRightIcon.js +0 -13
  92. package/dist/Editor/common/RnD/TransformHandles/SizeHandle.js +0 -18
  93. package/dist/Editor/common/RnD/TransformHandles/index.js +0 -62
  94. package/dist/Editor/common/RnD/Utils/alignmentDetection.js +0 -26
  95. package/dist/Editor/common/RnD/Utils/calculateDropItem.js +0 -98
  96. package/dist/Editor/common/RnD/Utils/collisionDetection.js +0 -52
  97. package/dist/Editor/common/RnD/Utils/gridDropItem.js +0 -148
  98. package/dist/Editor/common/RnD/Utils/index.js +0 -251
  99. package/dist/Editor/common/RnD/VirtualElement/index.js +0 -76
  100. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -27
  101. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +0 -28
  102. package/dist/Editor/common/RnD/index.js +0 -503
  103. package/dist/Editor/common/RnD/styles.js +0 -4
  104. package/dist/Editor/common/StyleBuilder/boxStyle.js +0 -30
  105. package/dist/Editor/helper/RnD/focusOnNewItem.js +0 -39
  106. package/dist/Editor/helper/RnD/scrollToNewSection.js +0 -24
  107. package/dist/Editor/helper/breakpoint.js +0 -5
  108. package/dist/Editor/hooks/useBreakpoints.js +0 -34
  109. package/dist/Editor/hooks/withErrorHandling.js +0 -14
  110. package/dist/Editor/utils/RnD/RnDCtrlCmds.js +0 -168
  111. package/dist/Editor/utils/freegrid.js +0 -49
@@ -31,7 +31,6 @@ import AttachmentsButton from "../Elements/Attachments/AttachmentsButton";
31
31
  import ColorboxButton from "../Elements/Colorbox/ColorboxButton.js";
32
32
  import DividerButton from "../Elements/Divider/DividerButton.js";
33
33
  import EmbedScript from "../Elements/EmbedScript/EmbedScript.js";
34
- import FreeGridButton from "../Elements/FreeGrid/FreeGridButton.js";
35
34
  import { jsx as _jsx } from "react/jsx-runtime";
36
35
  import { jsxs as _jsxs } from "react/jsx-runtime";
37
36
  export const RenderToolbarIcon = props => {
@@ -134,12 +133,6 @@ export const RenderToolbarIcon = props => {
134
133
  customProps: customProps,
135
134
  icoBtnType: icoBtnType
136
135
  }, element.id);
137
- case "freegrid":
138
- return /*#__PURE__*/_jsx(FreeGridButton, {
139
- editor: editor,
140
- customProps: customProps,
141
- icoBtnType: icoBtnType
142
- }, element.id);
143
136
  case "newLine":
144
137
  return /*#__PURE__*/_jsx(NewLineButton, {
145
138
  editor: editor,
@@ -196,11 +196,6 @@ export const toolbarGroups = [[{
196
196
  format: "grid",
197
197
  type: "grid",
198
198
  group: "elements"
199
- }, {
200
- id: 50,
201
- format: "freegrid",
202
- type: "freegrid",
203
- group: "elements"
204
199
  }, {
205
200
  id: 41,
206
201
  format: "emoji",
@@ -7,12 +7,11 @@ import { AiFillEdit, AiOutlineInsertRowBelow, AiOutlineInsertRowRight, AiOutline
7
7
  import { SiLatex } from "react-icons/si";
8
8
  import { RiDeleteColumn, RiDeleteRow } from "react-icons/ri";
9
9
  import { IoIosImage } from "react-icons/io";
10
- import { CiGrid32 } from "react-icons/ci";
11
10
  import { GridIcon, AccordionIcon, SignatureIcon, ButtonIcon, Carousal, FormIcon, BoldIcon, FontFamilyIcon, FontSizeIcon, ImageIcon, ItalicIcon, LinkIcon, StrikethroughIcon, TableIcon, UnderLineIcon, VideoIcon, CheckboxIcon, AppHeader, MoreHorizontal, UploadImage, DocsUpload, LeftArrow, RightArrow, CheckListButton, CheckListButtonActive, ExcelIcon, CsvIcon, DividerIcon, CloseIcon, SearchIcon, ExpandIcon, CalendarIconNew, Text, TextAreaIcon, Phone, BriefCase, Bank, CalendarTick, DollarSquare, Checkbox, Description, RadioButtonIcon, CheckedIcon, UncheckedIcon, InfinityIcon, ResetIcon } from "./iconslist";
12
11
  import ArrowRightIcon from "@mui/icons-material/ArrowRight";
13
12
  import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
14
- import EmailRoundedIcon from "@mui/icons-material/EmailRounded";
15
- import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
13
+ import EmailRoundedIcon from '@mui/icons-material/EmailRounded';
14
+ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
16
15
  import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
17
  const iconList = {
@@ -216,12 +215,6 @@ const iconList = {
216
215
  }
217
216
  }),
218
217
  calenderNewIcon: /*#__PURE__*/_jsx(CalendarIconNew, {}),
219
- freegrid: /*#__PURE__*/_jsx(CiGrid32, {
220
- size: 20,
221
- style: {
222
- fill: "#64748B"
223
- }
224
- }),
225
218
  text: /*#__PURE__*/_jsx(Text, {}),
226
219
  textArea: /*#__PURE__*/_jsx(TextAreaIcon, {}),
227
220
  phone: /*#__PURE__*/_jsx(Phone, {}),
@@ -39,7 +39,12 @@ const MentionsListCard = props => {
39
39
  },
40
40
  alt: name,
41
41
  children: /*#__PURE__*/_jsx(Avatar, {
42
- src: avatar_filename
42
+ sx: {
43
+ background: 'linear-gradient(90deg, #5351FC 0%, #19A9FC 100%)'
44
+ },
45
+ alt: name,
46
+ src: avatar_filename,
47
+ children: !avatar_filename && name && name.charAt(0).toUpperCase()
43
48
  })
44
49
  }), /*#__PURE__*/_jsx(Box, {
45
50
  sx: {
@@ -35,18 +35,14 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
35
35
  setOpenAI
36
36
  } = useEditorContext();
37
37
  useEffect(() => {
38
- try {
39
- if (target && chars.length > 0) {
40
- const domRange = ReactEditor.toDOMRange(editor, target);
41
- const rect = domRange?.getBoundingClientRect();
42
- setAnchorEl({
43
- clientWidth: rect.width,
44
- clientHeight: rect.height,
45
- getBoundingClientRect: () => rect
46
- });
47
- }
48
- } catch (err) {
49
- console.log(err);
38
+ if (target && chars.length > 0) {
39
+ const domRange = ReactEditor.toDOMRange(editor, target);
40
+ const rect = domRange.getBoundingClientRect();
41
+ setAnchorEl({
42
+ clientWidth: rect.width,
43
+ clientHeight: rect.height,
44
+ getBoundingClientRect: () => rect
45
+ });
50
46
  }
51
47
  }, [chars.length, editor, index, target]);
52
48
  useEffect(() => {
@@ -1,11 +1,10 @@
1
1
  import React, { useState } from "react";
2
- import { useTheme } from "@mui/material";
3
2
  import { Transforms } from "slate";
4
3
  import { ReactEditor, useSlateStatic } from "slate-react";
5
4
  import { Box, IconButton, Tooltip } from "@mui/material";
6
5
  import TuneIcon from "@mui/icons-material/Tune";
7
6
  import SectionPopup from "../../Elements/Grid/SectionPopup";
8
- import { getBreakPointsValue, getTRBLBreakPoints, groupByBreakpoint } from "../../helper/theme";
7
+ import { getBreakPointsValue, getTRBLBreakPoints } from "../../helper/theme";
9
8
  import DragHandle from "../DnD/DragHandleButton";
10
9
  import { useEditorSelection } from "../../hooks/useMouseMove";
11
10
  import SectionStyle from "./styles";
@@ -13,8 +12,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
13
  const list_types = ["orderedList", "unorderedList"];
15
14
  const Section = props => {
16
- const theme = useTheme();
17
- const classes = SectionStyle(theme);
15
+ const classes = SectionStyle();
18
16
  const {
19
17
  children,
20
18
  element,
@@ -80,32 +78,23 @@ const Section = props => {
80
78
  at: path
81
79
  });
82
80
  };
83
- const isFreeGrid = element?.children?.find(f => f.type === "freegrid");
84
81
  const needHover = element?.children?.find(f => f.type === "grid" && !list_types.includes(element.type)) ? "needHover" : "";
85
82
  const sectionBgImage = sectionBackgroundImage && sectionBackgroundImage !== "none" ? {
86
83
  backgroundImage: `url(${sectionBackgroundImage})`
87
84
  } : {};
88
- const edSectionSp = groupByBreakpoint({
89
- padding: {
90
- ...getTRBLBreakPoints(sectionBannerSpacing)
91
- },
92
- borderRadius: {
93
- ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
94
- }
95
- }, theme);
96
- const edInnerSp = groupByBreakpoint({
97
- width: {
98
- ...getBreakPointsValue(sectionGridSize || 8, null, "overrideGridSize", true)
99
- }
100
- }, theme);
101
- return path.length === 1 && !isFreeGrid ? /*#__PURE__*/_jsxs(Box, {
85
+ return path.length === 1 ? /*#__PURE__*/_jsxs(Box, {
102
86
  component: "div",
103
87
  className: `ed-section-wrapper ${readOnly ? "" : "hselect"} ${needHover}`,
104
88
  sx: {
105
89
  ...classes.root,
106
90
  background: sectionBgColor,
107
91
  ...sectionBgImage,
108
- ...edSectionSp,
92
+ padding: {
93
+ ...getTRBLBreakPoints(sectionBannerSpacing)
94
+ },
95
+ borderRadius: {
96
+ ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
97
+ },
109
98
  flexDirection: flexDirection || "column",
110
99
  alignItems: horizantal,
111
100
  justifyContent: vertical
@@ -114,7 +103,9 @@ const Section = props => {
114
103
  className: "ed-section-inner",
115
104
  sx: {
116
105
  position: "relative",
117
- ...edInnerSp
106
+ width: {
107
+ ...getBreakPointsValue(sectionGridSize || 8, null, "overrideGridSize", true)
108
+ }
118
109
  },
119
110
  children: [!readOnly && !showTool ? /*#__PURE__*/_jsx(DragHandle, {
120
111
  ...props
@@ -1,4 +1,4 @@
1
- const SectionStyle = theme => ({
1
+ const SectionStyle = () => ({
2
2
  root: {
3
3
  "&:hover": {
4
4
  "& .dh-para": {
@@ -38,11 +38,6 @@ const SectionStyle = theme => ({
38
38
  "&.active": {
39
39
  opacity: 1
40
40
  }
41
- },
42
- "& .ed-section-inner": {
43
- [theme.breakpoints.between("xs", "md")]: {
44
- maxWidth: `320px !important`
45
- }
46
41
  }
47
42
  }
48
43
  });
@@ -10,7 +10,6 @@ import { TableUtil } from "../../utils/table";
10
10
  import Icon from "../Icon";
11
11
  import EmojiButton from "../../Elements/Emoji/EmojiButton";
12
12
  import { insertDivider } from "../../utils/divider";
13
- import { insertFreeGrid } from "../../utils/freegrid";
14
13
  import { Transforms } from "slate";
15
14
  import { insertInfinityAI } from "../../utils/infinityAI";
16
15
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -169,17 +168,6 @@ const ELEMENTS_LIST = [{
169
168
  onInsert: editor => {
170
169
  insertGrid(editor);
171
170
  }
172
- }, {
173
- name: "Free Grid",
174
- group: "Elements",
175
- desc: "",
176
- type: "freegrid",
177
- icon: /*#__PURE__*/_jsx(Icon, {
178
- icon: "freegrid"
179
- }),
180
- onInsert: editor => {
181
- insertFreeGrid(editor);
182
- }
183
171
  }, {
184
172
  name: "Accordion",
185
173
  group: "Elements",
@@ -1,7 +1,7 @@
1
- import React, { useState } from "react";
1
+ import React from "react";
2
2
  import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box } from "@mui/material";
3
3
  import { squreStyle } from "./radiusStyle";
4
- import { getBreakPointsValue } from "../../../helper/theme";
4
+ import { getBreakPointsValue, getCustomizationValue } from "../../../helper/theme";
5
5
  import useWindowResize from "../../../hooks/useWindowResize";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -23,11 +23,7 @@ const BannerSpacing = props => {
23
23
  lockSpacing = true;
24
24
  }
25
25
  const [size] = useWindowResize();
26
- const pro_value = getBreakPointsValue(val, size?.device);
27
- const [value, setValue] = useState(pro_value);
28
- useState(() => {
29
- setValue(pro_value);
30
- }, [pro_value]);
26
+ const value = getBreakPointsValue(val, size?.device);
31
27
  const handleChange = e => {
32
28
  let changeAll = {};
33
29
  if (lockSpacing) {
@@ -35,16 +31,13 @@ const BannerSpacing = props => {
35
31
  changeAll[m] = e.target.value;
36
32
  });
37
33
  }
38
- const up_value = {
39
- ...value,
40
- ...changeAll,
41
- [e.target.name]: e.target.value
42
- };
43
34
  onChange({
44
35
  [key]: {
45
36
  ...getBreakPointsValue(val, null),
46
37
  [size?.device]: {
47
- ...up_value
38
+ ...value,
39
+ ...changeAll,
40
+ [e.target.name]: e.target.value
48
41
  }
49
42
  }
50
43
  });
@@ -85,10 +78,12 @@ const BannerSpacing = props => {
85
78
  component: "input",
86
79
  sx: classes.sapcingInput,
87
80
  name: "top",
88
- value: !lockSpacing ? "" : pro_value?.top,
89
- className: "sliderInput",
81
+ value: !lockSpacing ? "" : getCustomizationValue(value?.top),
82
+ className: "sliderInput removeScroll",
90
83
  disabled: !lockSpacing,
91
- onChange: handleChange
84
+ onChange: handleChange,
85
+ type: "number",
86
+ placeholder: "0"
92
87
  })]
93
88
  }), /*#__PURE__*/_jsx(FormControlLabel, {
94
89
  className: "ccheckbox-primary",
@@ -130,50 +125,54 @@ const BannerSpacing = props => {
130
125
  children: [/*#__PURE__*/_jsx("div", {
131
126
  className: "bannerSpaceBoxTop",
132
127
  children: /*#__PURE__*/_jsx("input", {
133
- type: "text",
128
+ type: "number",
134
129
  name: "top",
135
- value: value?.top,
136
- className: "borderInput",
130
+ value: getCustomizationValue(value?.top),
131
+ className: "borderInput removeScroll",
137
132
  style: {
138
133
  ...squreStyle.topRight
139
134
  },
140
- onChange: handleChange
135
+ onChange: handleChange,
136
+ placeholder: "0"
141
137
  })
142
138
  }), /*#__PURE__*/_jsx("div", {
143
139
  className: "bannerSpaceBoxRight",
144
140
  children: /*#__PURE__*/_jsx("input", {
145
- type: "text",
141
+ type: "number",
146
142
  name: "right",
147
- value: value?.right,
148
- className: "borderInput",
143
+ value: getCustomizationValue(value?.right),
144
+ className: "borderInput removeScroll",
149
145
  style: {
150
146
  ...squreStyle.bottomLeft
151
147
  },
152
- onChange: handleChange
148
+ onChange: handleChange,
149
+ placeholder: "0"
153
150
  })
154
151
  }), /*#__PURE__*/_jsx("div", {
155
152
  className: "bannerSpaceBoxBottom",
156
153
  children: /*#__PURE__*/_jsx("input", {
157
- type: "text",
154
+ type: "number",
158
155
  name: "bottom",
159
- value: value?.bottom,
160
- className: "borderInput",
156
+ value: getCustomizationValue(value?.bottom),
157
+ className: "borderInput removeScroll",
161
158
  style: {
162
159
  ...squreStyle.bottomRight
163
160
  },
164
- onChange: handleChange
161
+ onChange: handleChange,
162
+ placeholder: "0"
165
163
  })
166
164
  }), /*#__PURE__*/_jsx("div", {
167
165
  className: "bannerSpaceBoxLeft",
168
166
  children: /*#__PURE__*/_jsx("input", {
169
- type: "text",
167
+ type: "number",
170
168
  name: "left",
171
- className: "borderInput",
172
- value: value?.left,
169
+ className: "borderInput removeScroll",
170
+ value: getCustomizationValue(value?.left),
173
171
  style: {
174
172
  ...squreStyle.topLeft
175
173
  },
176
- onChange: handleChange
174
+ onChange: handleChange,
175
+ placeholder: "0"
177
176
  })
178
177
  })]
179
178
  })
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box } from "@mui/material";
3
3
  import { radiusStyle } from "./radiusStyle";
4
4
  import useWindowResize from "../../../hooks/useWindowResize";
5
- import { getBreakPointsValue } from "../../../helper/theme";
5
+ import { getBreakPointsValue, getCustomizationValue } from "../../../helper/theme";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
8
  const BORDER_RADIUS_KEYS = ["topLeft", "topRight", "bottomLeft", "bottomRight"];
@@ -80,11 +80,13 @@ const BorderRadius = props => {
80
80
  }), /*#__PURE__*/_jsx(Box, {
81
81
  sx: classes.sapcingInput,
82
82
  component: "input",
83
- value: !lockRadius ? "" : value?.topLeft || 0,
84
- className: "sliderInput",
83
+ value: !lockRadius ? "" : getCustomizationValue(value?.topLeft),
84
+ className: "sliderInput removeScroll",
85
85
  name: "topLeft",
86
86
  disabled: !lockRadius,
87
- onChange: handleChange
87
+ onChange: handleChange,
88
+ type: "number",
89
+ placeholder: "0"
88
90
  })]
89
91
  }), /*#__PURE__*/_jsx(FormControlLabel, {
90
92
  className: "ccheckbox-primary",
@@ -125,10 +127,10 @@ const BorderRadius = props => {
125
127
  borderRadius: `${value?.topLeft}px ${value?.topRight}px ${value?.bottomLeft}px ${value?.bottomRight}px`
126
128
  },
127
129
  children: [/*#__PURE__*/_jsx("input", {
128
- type: "text",
130
+ type: "number",
129
131
  name: "topLeft",
130
- value: value?.topLeft,
131
- className: "borderInput",
132
+ value: getCustomizationValue(value?.topLeft),
133
+ className: "borderInput removeScroll",
132
134
  placeholder: "0",
133
135
  style: {
134
136
  ...radiusStyle.topLeft,
@@ -136,10 +138,10 @@ const BorderRadius = props => {
136
138
  },
137
139
  onChange: handleChange
138
140
  }), /*#__PURE__*/_jsx("input", {
139
- type: "text",
141
+ type: "number",
140
142
  name: "topRight",
141
- value: value?.topRight,
142
- className: "borderInput",
143
+ value: getCustomizationValue(value?.topRight),
144
+ className: "borderInput removeScroll",
143
145
  placeholder: "0",
144
146
  style: {
145
147
  ...radiusStyle.topRight,
@@ -148,10 +150,10 @@ const BorderRadius = props => {
148
150
  },
149
151
  onChange: handleChange
150
152
  }), /*#__PURE__*/_jsx("input", {
151
- type: "text",
153
+ type: "number",
152
154
  name: "bottomLeft",
153
- value: value?.bottomLeft,
154
- className: "borderInput",
155
+ value: getCustomizationValue(value?.bottomLeft),
156
+ className: "borderInput removeScroll",
155
157
  placeholder: "0",
156
158
  style: {
157
159
  ...radiusStyle.bottomLeft,
@@ -160,10 +162,10 @@ const BorderRadius = props => {
160
162
  },
161
163
  onChange: handleChange
162
164
  }), /*#__PURE__*/_jsx("input", {
163
- type: "text",
165
+ type: "number",
164
166
  name: "bottomRight",
165
- value: value?.bottomRight,
166
- className: "borderInput",
167
+ value: getCustomizationValue(value?.bottomRight),
168
+ className: "borderInput removeScroll",
167
169
  placeholder: "0",
168
170
  style: {
169
171
  ...radiusStyle.bottomRight,
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useEffect, useState, useRef } from "react";
2
2
  import { Grid, Checkbox, FormControlLabel, FormHelperText } from "@mui/material";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -6,12 +6,23 @@ const SelectBox = props => {
6
6
  const {
7
7
  value,
8
8
  data,
9
- onChange
9
+ onChange,
10
+ elementProps
10
11
  } = props;
11
12
  const {
12
13
  key,
13
14
  placeholder
14
15
  } = data;
16
+ const [checkedValue, setCheckedValue] = useState(false);
17
+ const isFirstRender = useRef(true);
18
+ useEffect(() => {
19
+ if (isFirstRender.current && elementProps.element === "email" && value === undefined) {
20
+ setCheckedValue(true);
21
+ isFirstRender.current = false;
22
+ } else {
23
+ setCheckedValue(value);
24
+ }
25
+ }, [elementProps.element, value]);
15
26
  const handleChange = e => {
16
27
  onChange({
17
28
  [key]: e.target.checked
@@ -26,7 +37,7 @@ const SelectBox = props => {
26
37
  children: [/*#__PURE__*/_jsx(FormControlLabel, {
27
38
  control: /*#__PURE__*/_jsx(Checkbox, {
28
39
  value: value,
29
- checked: value,
40
+ checked: checkedValue,
30
41
  onChange: handleChange
31
42
  }),
32
43
  label: placeholder
@@ -1,10 +1,10 @@
1
- import React, { useState } from "react";
1
+ import React from "react";
2
2
  import { Grid, TextField, Typography } from "@mui/material";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  const Text = props => {
6
6
  const {
7
- value: pro_value,
7
+ value,
8
8
  data,
9
9
  onChange
10
10
  } = props;
@@ -13,9 +13,7 @@ const Text = props => {
13
13
  placeholder,
14
14
  width
15
15
  } = data;
16
- const [value, setValue] = useState(pro_value);
17
16
  const handleChange = e => {
18
- setValue(e.target.value);
19
17
  onChange({
20
18
  [key]: e.target.value
21
19
  });
@@ -7,7 +7,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
10
- export const StyleContent = props => {
10
+ const StyleContent = props => {
11
11
  const {
12
12
  value,
13
13
  renderTabs,
@@ -87,7 +87,7 @@ const StyleBuilder = props => {
87
87
  ...data,
88
88
  field_type: data?.element
89
89
  });
90
- if (data?.hasOwnProperty("name")) {
90
+ if (data?.hasOwnProperty('name')) {
91
91
  setElementProps({
92
92
  ...elementProps,
93
93
  ...data,
@@ -1,12 +1,4 @@
1
- const sectionStyle = [{
2
- tab: "General",
3
- value: "sectionName",
4
- fields: [{
5
- label: "Section Name",
6
- key: "sectionName",
7
- type: "text"
8
- }]
9
- }, {
1
+ const gridStyle = [{
10
2
  tab: "Colors",
11
3
  value: "sectionColors",
12
4
  fields: [{
@@ -29,7 +21,6 @@ const sectionStyle = [{
29
21
  }, {
30
22
  tab: "Padding",
31
23
  value: "sectionBannerSpacing",
32
- hideOnFGS: true,
33
24
  fields: [{
34
25
  label: "Padding",
35
26
  key: "sectionBannerSpacing",
@@ -46,7 +37,6 @@ const sectionStyle = [{
46
37
  }, {
47
38
  tab: "Position",
48
39
  value: "position",
49
- hideOnFGS: true,
50
40
  fields: [{
51
41
  label: "Set Postion (Vertical & Horizantal)",
52
42
  key: "sectionAlignment",
@@ -55,11 +45,10 @@ const sectionStyle = [{
55
45
  }, {
56
46
  tab: "Size",
57
47
  value: "gridSize",
58
- hideOnFGS: true,
59
48
  fields: [{
60
49
  label: "Width Size",
61
50
  key: "sectionGridSize",
62
51
  type: "gridSize"
63
52
  }]
64
53
  }];
65
- export default sectionStyle;
54
+ export default gridStyle;