@flozy/editor 5.3.6 → 5.3.8

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 (102) hide show
  1. package/dist/Editor/ChatEditor.js +34 -25
  2. package/dist/Editor/CommonEditor.js +8 -16
  3. package/dist/Editor/Editor.css +11 -57
  4. package/dist/Editor/Elements/AI/AIInput.js +1 -0
  5. package/dist/Editor/Elements/AI/CustomSelect.js +11 -19
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -9
  7. package/dist/Editor/Elements/AI/Styles.js +5 -17
  8. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
  9. package/dist/Editor/Elements/Color Picker/ColorButtons.js +3 -3
  10. package/dist/Editor/Elements/Color Picker/Styles.js +3 -7
  11. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  12. package/dist/Editor/Elements/Divider/Divider.js +15 -16
  13. package/dist/Editor/Elements/Embed/Image.js +7 -23
  14. package/dist/Editor/Elements/Embed/Video.js +1 -13
  15. package/dist/Editor/Elements/Form/Form.js +2 -38
  16. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
  17. package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
  18. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
  19. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
  20. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
  21. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
  22. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
  23. package/dist/Editor/Elements/Form/FormPopup.js +9 -12
  24. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  25. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
  26. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  27. package/dist/Editor/Elements/Grid/GridItem.js +36 -45
  28. package/dist/Editor/Elements/Grid/Styles.js +0 -6
  29. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  30. package/dist/Editor/Elements/Search/SearchButton.js +0 -1
  31. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  32. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  33. package/dist/Editor/Elements/Signature/SignaturePopup.js +48 -13
  34. package/dist/Editor/Elements/SimpleText/style.js +0 -10
  35. package/dist/Editor/Elements/Table/Styles.js +79 -82
  36. package/dist/Editor/Elements/Table/Table.js +140 -260
  37. package/dist/Editor/Elements/Table/TableCell.js +103 -362
  38. package/dist/Editor/Elements/Table/TablePopup.js +3 -9
  39. package/dist/Editor/Elements/Table/TableRow.js +2 -10
  40. package/dist/Editor/Styles/EditorStyles.js +1 -8
  41. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
  42. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +12 -7
  43. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -10
  44. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
  45. package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
  46. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +6 -3
  47. package/dist/Editor/Toolbar/Mini/Styles.js +1 -4
  48. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
  49. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
  50. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +49 -409
  51. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -17
  52. package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
  53. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  54. package/dist/Editor/common/ColorPickerButton.js +44 -82
  55. package/dist/Editor/common/Icon.js +20 -17
  56. package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
  57. package/dist/Editor/common/LinkSettings/index.js +1 -2
  58. package/dist/Editor/common/MentionsPopup/Styles.js +8 -156
  59. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  60. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -107
  61. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
  62. package/dist/Editor/common/RnD/index.js +1 -1
  63. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +4 -8
  64. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
  65. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -5
  66. package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
  67. package/dist/Editor/common/StyleBuilder/index.js +11 -84
  68. package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
  69. package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
  70. package/dist/Editor/common/iconListV2.js +40 -378
  71. package/dist/Editor/common/iconslist.js +14 -17
  72. package/dist/Editor/commonStyle.js +10 -130
  73. package/dist/Editor/helper/deserialize/index.js +20 -27
  74. package/dist/Editor/helper/index.js +1 -1
  75. package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -3
  76. package/dist/Editor/plugins/withHTML.js +10 -61
  77. package/dist/Editor/plugins/withLayout.js +0 -1
  78. package/dist/Editor/utils/SlateUtilityFunctions.js +0 -2
  79. package/dist/Editor/utils/brains.js +1 -1
  80. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +1 -26
  81. package/dist/Editor/utils/customHooks/useResize.js +4 -7
  82. package/dist/Editor/utils/customHooks/useTableResize.js +2 -6
  83. package/dist/Editor/utils/embed.js +1 -2
  84. package/dist/Editor/utils/events.js +1 -0
  85. package/dist/Editor/utils/font.js +4 -11
  86. package/dist/Editor/utils/formfield.js +4 -8
  87. package/dist/Editor/utils/helper.js +2 -55
  88. package/dist/Editor/utils/insertNewLine.js +1 -19
  89. package/dist/Editor/utils/serializeToText.js +0 -2
  90. package/dist/Editor/utils/table.js +24 -228
  91. package/package.json +1 -1
  92. package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
  93. package/dist/Editor/Elements/Table/DragButton.js +0 -142
  94. package/dist/Editor/Elements/Table/DragStyles.js +0 -70
  95. package/dist/Editor/Elements/Table/Draggable.js +0 -25
  96. package/dist/Editor/Elements/Table/Droppable.js +0 -53
  97. package/dist/Editor/Elements/Table/TableTool.js +0 -101
  98. package/dist/Editor/Elements/Table/tableHelper.js +0 -71
  99. package/dist/Editor/assets/svg/TableIcons.js +0 -220
  100. package/dist/Editor/common/Select/index.js +0 -20
  101. package/dist/Editor/common/Select/styles.js +0 -17
  102. package/dist/Editor/hooks/useTable.js +0 -207
@@ -1,167 +1,121 @@
1
- import React, { useEffect, useRef, useState } from "react";
2
- import { Editor, Transforms } from "slate";
3
- import { ReactEditor, useSelected, useSlateStatic } from "slate-react";
4
- import { Box, IconButton, Tooltip, Table as TableComp, TableBody, useTheme, Popper, ClickAwayListener } from "@mui/material";
1
+ import React, { useState } from "react";
2
+ import { Transforms } from "slate";
3
+ import { useSelected, useSlateStatic } from "slate-react";
4
+ import { Box, IconButton, Tooltip, Table as TableComp, TableBody, useTheme } from "@mui/material";
5
+ import AlignHorizontalLeftIcon from "@mui/icons-material/AlignHorizontalLeft";
6
+ import AlignHorizontalRightIcon from "@mui/icons-material/AlignHorizontalRight";
7
+ import AlignVerticalTopIcon from "@mui/icons-material/AlignVerticalTop";
8
+ import AlignVerticalBottomIcon from "@mui/icons-material/AlignVerticalBottom";
9
+ import DeleteForeverIcon from "@mui/icons-material/DeleteForever";
10
+ import MoreVertIcon from "@mui/icons-material/MoreVert";
11
+ import SettingsIcon from "@mui/icons-material/Settings";
12
+ import DeleteCellIcon from "./DeleteCellIcon";
13
+ import DeleteRowIcon from "./DeleteRowIcon";
5
14
  import { TableUtil } from "../../utils/table";
6
15
  import TablePopup from "./TablePopup";
7
- import { useEditorContext, useEditorSelection } from "../../hooks/useMouseMove";
16
+ import { useEditorSelection } from "../../hooks/useMouseMove";
8
17
  import TableStyles from "./Styles";
9
18
  import "./table.css";
10
19
  import { groupByBreakpoint } from "../../helper/theme";
11
- import useTable, { TableProvider, getDefaultTableSelection } from "../../hooks/useTable";
12
- import AddRowCol from "./AddRowCol";
13
- import TableTool from "./TableTool";
14
- import { MoreIcon, SettingsIcon } from "../../assets/svg/TableIcons";
15
- import { getSelectedCls } from "../../utils/helper";
16
- import SwipeableDrawerComponent from "../../common/SwipeableDrawer";
17
20
  import { jsx as _jsx } from "react/jsx-runtime";
18
21
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
- const hideRowDragBtns = (hide, dragRowBtnCls) => {
20
- const rowDragBtns = document.querySelectorAll(`.${dragRowBtnCls}`);
21
- if (rowDragBtns?.length) {
22
- rowDragBtns?.forEach(btn => btn.style.display = hide);
22
+ const TABLE_MENUS = [{
23
+ Icon: AlignHorizontalRightIcon,
24
+ text: "Insert Columns to the Right",
25
+ action: {
26
+ type: "insertColumn",
27
+ position: "after"
23
28
  }
24
- };
25
- const ToolTableComponent = props => {
26
- const {
27
- handleAction,
28
- editorTheme
29
- } = props;
30
- const {
31
- updateTableSelection
32
- } = useTable();
33
- return /*#__PURE__*/_jsx("div", {
34
- children: /*#__PURE__*/_jsx(TableTool, {
35
- theme: editorTheme,
36
- handleToolAction: (type, option) => {
37
- handleAction(type, option);
38
- if (type === "duplicate") {
39
- updateTableSelection(getDefaultTableSelection());
40
- }
41
- }
42
- })
43
- });
44
- };
45
- const MoreTableSettings = props => {
46
- const {
47
- exandTools,
48
- handleAction,
49
- editorTheme,
50
- setExpandTools
51
- } = props;
52
- const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
53
- return isMobile ? /*#__PURE__*/_jsx(SwipeableDrawerComponent, {
54
- open: Boolean(exandTools),
55
- onClose: () => {
56
- setExpandTools(false);
57
- },
58
- swipeableDrawer: false,
59
- children: /*#__PURE__*/_jsx(ToolTableComponent, {
60
- handleAction: handleAction,
61
- editorTheme: editorTheme
62
- })
63
- }) : /*#__PURE__*/_jsx(Popper, {
64
- open: Boolean(exandTools),
65
- anchorEl: exandTools,
66
- contentEditable: false,
67
- sx: {
68
- zIndex: 2000
69
- },
70
- placement: "bottom-start",
71
- children: /*#__PURE__*/_jsx(ClickAwayListener, {
72
- onClickAway: () => setExpandTools(false),
73
- children: /*#__PURE__*/_jsx(ToolTableComponent, {
74
- handleAction: handleAction,
75
- editorTheme: editorTheme
76
- })
77
- })
78
- });
79
- };
80
- const ToolBar = props => {
81
- const {
82
- selected,
83
- showTool,
84
- classes,
85
- handleExpand,
86
- handleAction,
87
- exandTools,
88
- openSetttings
89
- } = props;
90
- const {
91
- getSelectedCells
92
- } = useTable();
93
- const viewTool = selected && !showTool && getSelectedCells()?.length <= 1;
94
- return viewTool ? /*#__PURE__*/_jsxs(Box, {
95
- component: "div",
96
- contentEditable: false,
97
- className: `tableToolBar ${exandTools ? "active" : ""}`,
98
- sx: classes.tableToolBar,
99
- children: [/*#__PURE__*/_jsx(Tooltip, {
100
- title: "Settings",
101
- arrow: true,
102
- onClick: () => handleAction("settings"),
103
- children: /*#__PURE__*/_jsx(IconButton, {
104
- className: getSelectedCls("toolbtn toggle", openSetttings),
105
- children: /*#__PURE__*/_jsx(SettingsIcon, {})
106
- })
107
- }), /*#__PURE__*/_jsx(Tooltip, {
108
- title: "Show Tools",
109
- arrow: true,
110
- onClick: handleExpand,
111
- children: /*#__PURE__*/_jsx(IconButton, {
112
- className: getSelectedCls("toolbtn toggle", exandTools),
113
- children: /*#__PURE__*/_jsx(MoreIcon, {})
114
- })
115
- })]
116
- }) : null;
117
- };
29
+ }, {
30
+ Icon: AlignHorizontalLeftIcon,
31
+ text: "Insert Columns to the Left",
32
+ action: {
33
+ type: "insertColumn",
34
+ position: "at"
35
+ }
36
+ }, {
37
+ Icon: AlignVerticalTopIcon,
38
+ text: "Insert Row Above",
39
+ action: {
40
+ type: "insertRow",
41
+ positon: "at"
42
+ }
43
+ }, {
44
+ Icon: AlignVerticalBottomIcon,
45
+ text: "Insert Row Below",
46
+ action: {
47
+ type: "insertRow",
48
+ position: "after"
49
+ }
50
+ }, {
51
+ Icon: DeleteRowIcon,
52
+ text: "Delete Row",
53
+ action: {
54
+ type: "deleteRow"
55
+ }
56
+ }, {
57
+ Icon: DeleteCellIcon,
58
+ text: "Delete Column",
59
+ action: {
60
+ type: "deleteColumn"
61
+ }
62
+ }, {
63
+ Icon: SettingsIcon,
64
+ text: "Settings",
65
+ action: {
66
+ type: "settings"
67
+ }
68
+ }, {
69
+ Icon: DeleteForeverIcon,
70
+ text: "Remove Table",
71
+ action: {
72
+ type: "remove"
73
+ }
74
+ }];
118
75
  const Table = props => {
119
76
  const theme = useTheme();
120
- const {
121
- theme: editorTheme
122
- } = useEditorContext();
123
77
  const {
124
78
  element,
125
79
  attributes,
126
80
  children,
127
81
  customProps
128
82
  } = props;
129
- const classes = TableStyles(editorTheme);
83
+ const classes = TableStyles();
130
84
  const {
131
- readOnly,
132
- isMobile
85
+ readOnly
133
86
  } = customProps;
134
87
  const [openSetttings, setOpenSettings] = useState(false);
135
- const [exandTools, setExpandTools] = useState(null);
88
+ const [exandTools, setExpandTools] = useState(false);
136
89
  const {
137
90
  bgColor,
138
91
  borderColor,
139
- xsHidden,
140
- fontFamily,
141
- fontWeight,
142
- textSize,
143
- textColor
92
+ xsHidden
144
93
  } = element;
145
94
  const editor = useSlateStatic();
146
95
  const selected = useSelected();
147
96
  const table = new TableUtil(editor);
148
97
  const tableProps = table.getTableProps();
149
98
  const [showTool] = useEditorSelection(editor);
150
- const tableRef = useRef(null);
151
- const containerRef = useRef(null);
152
- const path = ReactEditor.findPath(editor, element);
153
- const isValidPath = path && Editor.hasPath(editor, path); // getting cannot find the descendant path error while deleting table from free grid on right click
154
-
155
- const dragRowBtnCls = `table-${path?.toString()?.replaceAll(",", "-")}-row-drag-btn`;
156
- const handleAction = type => {
99
+ const handleAction = ({
100
+ type,
101
+ position
102
+ }) => () => {
157
103
  Transforms.select(editor, editor.selection);
158
104
  switch (type) {
159
- case "delete":
160
- table.removeTable();
105
+ case "insertRow":
106
+ table.insertRow(position);
107
+ break;
108
+ case "insertColumn":
109
+ table.insertColumn(position);
110
+ break;
111
+ case "deleteRow":
112
+ table.deleteRow();
161
113
  break;
162
- case "duplicate":
163
- table.duplicateTable();
164
- setExpandTools(false);
114
+ case "deleteColumn":
115
+ table.deleteColumn();
116
+ break;
117
+ case "remove":
118
+ table.removeTable();
165
119
  break;
166
120
  case "settings":
167
121
  if (tableProps) {
@@ -172,16 +126,42 @@ const Table = props => {
172
126
  return;
173
127
  }
174
128
  };
175
- const handleExpand = e => {
176
- setExpandTools(prev => prev ? false : e.currentTarget);
129
+ const handleExpand = () => {
130
+ setExpandTools(!exandTools);
131
+ };
132
+ const ToolBar = () => {
133
+ return selected && !showTool ? /*#__PURE__*/_jsxs(Box, {
134
+ component: "div",
135
+ contentEditable: false,
136
+ className: `tableToolBar ${exandTools ? "active" : ""}`,
137
+ sx: classes.tableToolBar,
138
+ children: [/*#__PURE__*/_jsx(Tooltip, {
139
+ title: "Show Tools",
140
+ arrow: true,
141
+ onClick: handleExpand,
142
+ children: /*#__PURE__*/_jsx(IconButton, {
143
+ className: "toolbtn toggle",
144
+ children: /*#__PURE__*/_jsx(MoreVertIcon, {})
145
+ })
146
+ }), TABLE_MENUS.map(({
147
+ Icon,
148
+ text,
149
+ action
150
+ }) => {
151
+ return /*#__PURE__*/_jsx(Tooltip, {
152
+ title: text,
153
+ arrow: true,
154
+ children: /*#__PURE__*/_jsx(IconButton, {
155
+ className: `toolbtn ${action?.type}`,
156
+ onClick: handleAction(action),
157
+ children: /*#__PURE__*/_jsx(Icon, {})
158
+ })
159
+ }, text);
160
+ })]
161
+ }) : null;
177
162
  };
178
- useEffect(() => {
179
- if (!selected) {
180
- setExpandTools(false);
181
- }
182
- }, [selected]);
183
163
  const onSettings = () => {
184
- setOpenSettings(!openSetttings);
164
+ setOpenSettings(true);
185
165
  };
186
166
  const onSave = data => {
187
167
  const updateData = {
@@ -203,128 +183,28 @@ const Table = props => {
203
183
  lg: "inline-block"
204
184
  }
205
185
  }, theme);
206
- const addRow = () => {
207
- const lastRow = element?.rows - 1;
208
- const firstCol = 0;
209
- const lastRowPath = [...path, lastRow, firstCol];
210
- const position = Editor.start(editor, lastRowPath);
211
- const selection = {
212
- anchor: position,
213
- focus: position
214
- };
215
-
216
- // select the last row first col to insert row below
217
- Transforms.select(editor, selection);
218
- table.insertRow("after");
219
- Transforms.deselect(editor);
220
- };
221
- const addCol = () => {
222
- const lastCol = element?.columns - 1;
223
- const firstRow = 0;
224
- const lastColumnPath = [...path, firstRow, lastCol];
225
- const position = Editor.start(editor, lastColumnPath);
226
- const selection = {
227
- anchor: position,
228
- focus: position
229
- };
230
-
231
- // select the last row first col to insert row below
232
- Transforms.select(editor, selection);
233
- table.insertColumn("after");
234
- Transforms.deselect(editor);
235
- };
236
- const handleRowDragBtns = () => {
237
- if (containerRef?.current?.scrollLeft > 0) {
238
- hideRowDragBtns("none", dragRowBtnCls);
239
- } else {
240
- hideRowDragBtns("", dragRowBtnCls);
241
- }
242
- };
243
- const handleScroll = () => {
244
- handleRowDragBtns();
245
- };
246
- const onMouseOver = () => {
247
- if (!isMobile) {
248
- containerRef?.current?.classList.remove("hideScroll");
249
- }
250
- };
251
- const onMouseLeave = () => {
252
- if (!isMobile) {
253
- containerRef?.current?.classList.add("hideScroll");
254
- }
255
- };
256
- const commonAddBtnProps = {
257
- tableRef,
258
- containerRef,
259
- readOnly,
260
- tableNode: element
261
- };
262
- return /*#__PURE__*/_jsxs(TableProvider, {
263
- editor: editor,
264
- otherProps: {
265
- dragRowBtnCls,
266
- tablePath: path,
267
- openSetttings,
268
- exandTools
186
+ return /*#__PURE__*/_jsxs("div", {
187
+ style: {
188
+ minWidth: "100%",
189
+ maxWidth: "100%",
190
+ position: "relative"
269
191
  },
270
- children: [isValidPath ? /*#__PURE__*/_jsxs("div", {
192
+ children: [/*#__PURE__*/_jsx(TableComp, {
193
+ className: readOnly ? "readOnly" : "",
194
+ sx: {
195
+ ...classes.table,
196
+ ...tableSX
197
+ },
271
198
  style: {
272
- minWidth: "100%",
273
- maxWidth: "100%",
274
- position: "relative",
275
- overflowX: "auto",
276
- display: "flex",
277
- paddingTop: "10px",
278
- lineHeight: 1.43
199
+ background: bgColor,
200
+ border: borderColor ? `1px solid ${borderColor}` : "",
201
+ width: "auto"
279
202
  },
280
- ref: containerRef,
281
- onScroll: handleScroll,
282
- onMouseOver: onMouseOver,
283
- onMouseLeave: onMouseLeave,
284
- className: "custom-scroll",
285
- children: [/*#__PURE__*/_jsx(TableComp, {
286
- className: readOnly ? "readOnly" : "",
287
- sx: {
288
- ...classes.table,
289
- ...tableSX
290
- },
291
- style: {
292
- background: bgColor,
293
- border: borderColor ? `1px solid ${borderColor}` : "",
294
- width: "auto",
295
- fontFamily,
296
- fontWeight,
297
- fontSize: textSize,
298
- color: textColor
299
- },
300
- ref: tableRef,
301
- children: /*#__PURE__*/_jsx(TableBody, {
302
- ...attributes,
303
- children: children
304
- })
305
- }), /*#__PURE__*/_jsx(AddRowCol, {
306
- ...commonAddBtnProps,
307
- addType: "col",
308
- onAdd: addCol
309
- })]
310
- }) : null, /*#__PURE__*/_jsx(AddRowCol, {
311
- ...commonAddBtnProps,
312
- addType: "row",
313
- onAdd: addRow
314
- }), !readOnly && /*#__PURE__*/_jsx(ToolBar, {
315
- selected: selected,
316
- showTool: showTool,
317
- classes: classes,
318
- handleExpand: handleExpand,
319
- handleAction: handleAction,
320
- exandTools: exandTools,
321
- openSetttings: openSetttings
322
- }), /*#__PURE__*/_jsx(MoreTableSettings, {
323
- exandTools: exandTools,
324
- handleAction: handleAction,
325
- editorTheme: editorTheme,
326
- setExpandTools: setExpandTools
327
- }), openSetttings ? /*#__PURE__*/_jsx(TablePopup, {
203
+ children: /*#__PURE__*/_jsx(TableBody, {
204
+ ...attributes,
205
+ children: children
206
+ })
207
+ }), !readOnly && /*#__PURE__*/_jsx(ToolBar, {}), openSetttings ? /*#__PURE__*/_jsx(TablePopup, {
328
208
  element: tableProps?.styleProps || {},
329
209
  onSave: onSave,
330
210
  onClose: onClose,