@flozy/editor 10.3.8 → 10.4.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.
- package/dist/Editor/ChatEditor.js +16 -17
- package/dist/Editor/CommonEditor.js +18 -134
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +8 -46
- package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
- package/dist/Editor/Elements/Accordion/Accordion.js +9 -46
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +23 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +5 -10
- package/dist/Editor/Elements/Button/EditorButton.js +9 -27
- package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
- package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +8 -23
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
- package/dist/Editor/Elements/Embed/Image.js +2 -3
- package/dist/Editor/Elements/Embed/Video.js +1 -1
- package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
- package/dist/Editor/Elements/Form/Form.js +171 -184
- package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -2
- package/dist/Editor/Elements/Form/FormField.js +6 -13
- package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +32 -40
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -1
- package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
- package/dist/Editor/Elements/FreeGrid/styles.js +7 -75
- package/dist/Editor/Elements/Grid/Grid.js +2 -14
- package/dist/Editor/Elements/Grid/GridItem.js +1 -1
- package/dist/Editor/Elements/List/CheckList.js +2 -3
- package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
- package/dist/Editor/Elements/Search/SearchButton.js +8 -9
- package/dist/Editor/Elements/Search/SearchList.js +7 -9
- package/dist/Editor/Elements/Signature/Signature.css +1 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +5 -18
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +3 -16
- package/dist/Editor/Elements/SimpleText/index.js +1 -6
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +1 -0
- package/dist/Editor/Elements/Table/Draggable.js +2 -6
- package/dist/Editor/Elements/Table/Styles.js +0 -7
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Table/TableCell.js +8 -31
- package/dist/Editor/Elements/Title/title.js +6 -6
- package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
- package/dist/Editor/MiniEditor.js +1 -2
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
- package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
- package/dist/Editor/common/ColorPickerButton.js +16 -41
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
- package/dist/Editor/common/Icon.js +1 -31
- package/dist/Editor/common/ImageSelector/ImageSelector.js +2 -2
- package/dist/Editor/common/ImageSelector/Styles.js +9 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +56 -61
- package/dist/Editor/common/LinkSettings/index.js +81 -82
- package/dist/Editor/common/LinkSettings/navOptions.js +2 -2
- package/dist/Editor/common/LinkSettings/style.js +74 -209
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +15 -13
- package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
- package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
- package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +3 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -146
- package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
- package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -120
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +19 -28
- package/dist/Editor/common/RnD/Utils/index.js +1 -3
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +58 -42
- package/dist/Editor/common/RnD/VirtualElement/helper.js +132 -323
- package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -16
- package/dist/Editor/common/RnD/index.js +39 -68
- package/dist/Editor/common/Select/index.js +5 -44
- package/dist/Editor/common/Select/styles.js +2 -30
- package/dist/Editor/common/Shorthands/elements.js +11 -65
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +9 -12
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
- package/dist/Editor/common/SwipeableDrawer/style.js +12 -14
- package/dist/Editor/common/Uploader.js +0 -16
- package/dist/Editor/common/iconListV2.js +6 -177
- package/dist/Editor/common/iconslist.js +0 -24
- package/dist/Editor/commonStyle.js +62 -186
- package/dist/Editor/helper/index.js +1 -5
- package/dist/Editor/helper/theme.js +2 -203
- package/dist/Editor/hooks/useMouseMove.js +5 -8
- package/dist/Editor/hooks/useTable.js +4 -5
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +1 -3
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +46 -172
- package/dist/Editor/utils/accordion.js +4 -14
- package/dist/Editor/utils/button.js +17 -1
- package/dist/Editor/utils/customHooks/useTableResize.js +9 -49
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/events.js +6 -50
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/form.js +4 -4
- package/dist/Editor/utils/formfield.js +2 -9
- package/dist/Editor/utils/helper.js +26 -188
- package/dist/Editor/utils/insertAppHeader.js +1 -1
- package/dist/Editor/utils/signature.js +9 -2
- package/package.json +4 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
- package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
- package/dist/Editor/Elements/FreeGrid/helper.js +0 -115
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
- package/dist/Editor/assets/svg/BackIcon.js +0 -18
- package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
- package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
- package/dist/Editor/common/Checkbox/index.js +0 -46
- package/dist/Editor/common/Checkbox/styles.js +0 -45
- package/dist/Editor/common/CustomColorPicker/index.js +0 -130
- package/dist/Editor/common/CustomColorPicker/style.js +0 -53
- package/dist/Editor/common/CustomDialog2/index.js +0 -94
- package/dist/Editor/common/CustomDialog2/style.js +0 -67
- package/dist/Editor/common/CustomSelect.js +0 -43
- package/dist/Editor/common/RadioGroup/index.js +0 -48
- package/dist/Editor/common/RadioGroup/styles.js +0 -29
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
- package/dist/Editor/common/SnackBar/index.js +0 -43
- package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +0 -115
- package/dist/Editor/helper/textIndeces.js +0 -58
- package/dist/Editor/hooks/useEditorTheme.js +0 -153
- package/dist/Editor/hooks/useThemeValues.js +0 -63
- package/dist/Editor/theme/index.js +0 -149
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
- package/dist/Editor/themeSettings/buttons/index.js +0 -300
- package/dist/Editor/themeSettings/buttons/style.js +0 -23
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
- package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
- package/dist/Editor/themeSettings/fonts/index.js +0 -240
- package/dist/Editor/themeSettings/fonts/style.js +0 -62
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -380
- package/dist/Editor/themeSettings/style.js +0 -299
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -355
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
- package/dist/Editor/themeSettingsAI/style.js +0 -332
- package/dist/Editor/utils/updateFormName.js +0 -22
@@ -22,8 +22,6 @@ import { DEFAULT_TABLE_NODE } from "../../utils/table";
|
|
22
22
|
import itemOptions from "./Options/sectionItemOptions";
|
23
23
|
import { getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
|
24
24
|
import { useDebouncedCallback } from "use-debounce";
|
25
|
-
import { getNewElementXsValues } from "./helper";
|
26
|
-
import updateFormName from "../../utils/updateFormName";
|
27
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
28
26
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
29
27
|
const MAX_DEVICE_WIDTH = {
|
@@ -37,15 +35,11 @@ export const useFreeGrid = () => {
|
|
37
35
|
return useContext(FreeGridContext);
|
38
36
|
};
|
39
37
|
const FreeGrid = props => {
|
40
|
-
const {
|
41
|
-
theme: appTheme
|
42
|
-
} = useEditorContext();
|
43
38
|
const theme = useTheme();
|
44
39
|
const breakpoint = useBreakpoints(theme);
|
45
40
|
const classes = useFreeGridStyles({
|
46
41
|
theme,
|
47
|
-
MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint]
|
48
|
-
appTheme
|
42
|
+
MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint]
|
49
43
|
});
|
50
44
|
const editor = useSlateStatic();
|
51
45
|
const {
|
@@ -142,10 +136,8 @@ const FreeGrid = props => {
|
|
142
136
|
});
|
143
137
|
break;
|
144
138
|
case "duplicateSection":
|
145
|
-
const currentNode = Node.get(editor, cur_root_path);
|
146
|
-
const updatedFormNameNode = updateFormName(currentNode);
|
147
139
|
Transforms.insertNodes(editor, [{
|
148
|
-
...JSON.parse(JSON.stringify(
|
140
|
+
...JSON.parse(JSON.stringify(Node.get(editor, cur_root_path)))
|
149
141
|
}], {
|
150
142
|
at: next_path
|
151
143
|
});
|
@@ -184,10 +176,6 @@ const FreeGrid = props => {
|
|
184
176
|
const handleAddElementClick = type => () => {
|
185
177
|
const isEmpty = isEmptySection();
|
186
178
|
const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
|
187
|
-
const {
|
188
|
-
xsVal,
|
189
|
-
sectionHeightXs
|
190
|
-
} = getNewElementXsValues(type, element?.children);
|
191
179
|
switch (type) {
|
192
180
|
case "addText":
|
193
181
|
Transforms.insertNodes(editor, [{
|
@@ -204,8 +192,7 @@ const FreeGrid = props => {
|
|
204
192
|
marginTop: 0,
|
205
193
|
top: 0,
|
206
194
|
width: 170,
|
207
|
-
height: 30
|
208
|
-
...(xsVal || {})
|
195
|
+
height: 30
|
209
196
|
}], {
|
210
197
|
at: [...insertAt]
|
211
198
|
});
|
@@ -223,6 +210,20 @@ const FreeGrid = props => {
|
|
223
210
|
linkType: "webAddress"
|
224
211
|
},
|
225
212
|
iconPosition: "start",
|
213
|
+
bgColor: "#2563EB",
|
214
|
+
textColor: "#FFF",
|
215
|
+
borderRadius: {
|
216
|
+
topLeft: 30,
|
217
|
+
topRight: 30,
|
218
|
+
bottomLeft: 30,
|
219
|
+
bottomRight: 30
|
220
|
+
},
|
221
|
+
bannerSpacing: {
|
222
|
+
left: 12,
|
223
|
+
top: 12,
|
224
|
+
right: 12,
|
225
|
+
bottom: 12
|
226
|
+
},
|
226
227
|
textAlign: "center",
|
227
228
|
label: "Get Started"
|
228
229
|
}],
|
@@ -231,8 +232,7 @@ const FreeGrid = props => {
|
|
231
232
|
marginTop: 0,
|
232
233
|
top: 0,
|
233
234
|
width: 143,
|
234
|
-
height: 50
|
235
|
-
...(xsVal || {})
|
235
|
+
height: 50
|
236
236
|
}], {
|
237
237
|
at: [...insertAt]
|
238
238
|
});
|
@@ -258,9 +258,8 @@ const FreeGrid = props => {
|
|
258
258
|
top: 0,
|
259
259
|
width: 217,
|
260
260
|
height: 173,
|
261
|
-
|
262
|
-
|
263
|
-
...(xsVal || {})
|
261
|
+
width_xs: 217,
|
262
|
+
height_xs: 173
|
264
263
|
}], {
|
265
264
|
at: [...insertAt]
|
266
265
|
});
|
@@ -283,8 +282,7 @@ const FreeGrid = props => {
|
|
283
282
|
marginTop: 0,
|
284
283
|
top: 0,
|
285
284
|
width: 170,
|
286
|
-
height: 80
|
287
|
-
...(xsVal || {})
|
285
|
+
height: 80
|
288
286
|
}], {
|
289
287
|
at: [...insertAt]
|
290
288
|
});
|
@@ -297,8 +295,7 @@ const FreeGrid = props => {
|
|
297
295
|
images: []
|
298
296
|
}), {
|
299
297
|
height: 370,
|
300
|
-
width: 650
|
301
|
-
...(xsVal || {})
|
298
|
+
width: 650
|
302
299
|
})
|
303
300
|
}], {
|
304
301
|
at: [...insertAt]
|
@@ -310,8 +307,7 @@ const FreeGrid = props => {
|
|
310
307
|
...DEFAULT_TABLE_NODE()
|
311
308
|
}, {
|
312
309
|
height: 150,
|
313
|
-
width: 400
|
314
|
-
...(xsVal || {})
|
310
|
+
width: 400
|
315
311
|
})
|
316
312
|
}], {
|
317
313
|
at: [...insertAt]
|
@@ -335,8 +331,7 @@ const FreeGrid = props => {
|
|
335
331
|
marginTop: 0,
|
336
332
|
top: 0,
|
337
333
|
width: 400,
|
338
|
-
height: 300
|
339
|
-
...(xsVal || {})
|
334
|
+
height: 300
|
340
335
|
}], {
|
341
336
|
at: [...insertAt]
|
342
337
|
});
|
@@ -348,9 +343,7 @@ const FreeGrid = props => {
|
|
348
343
|
children: [{
|
349
344
|
text: ""
|
350
345
|
}]
|
351
|
-
}, {
|
352
|
-
...(xsVal || {})
|
353
|
-
}, "freegridBox")
|
346
|
+
}, {}, "freegridBox")
|
354
347
|
}], {
|
355
348
|
at: [...insertAt]
|
356
349
|
});
|
@@ -361,8 +354,7 @@ const FreeGrid = props => {
|
|
361
354
|
...FORM_NODE()
|
362
355
|
}, {
|
363
356
|
height: 92,
|
364
|
-
width: 400
|
365
|
-
...(xsVal || {})
|
357
|
+
width: 400
|
366
358
|
})
|
367
359
|
}], {
|
368
360
|
at: [...insertAt]
|
@@ -376,8 +368,7 @@ const FreeGrid = props => {
|
|
376
368
|
})
|
377
369
|
}, {
|
378
370
|
height: 60,
|
379
|
-
width: 400
|
380
|
-
...(xsVal || {})
|
371
|
+
width: 400
|
381
372
|
})
|
382
373
|
}], {
|
383
374
|
at: [...insertAt]
|
@@ -398,18 +389,19 @@ const FreeGrid = props => {
|
|
398
389
|
marginTop: 0,
|
399
390
|
top: 0,
|
400
391
|
width: 170,
|
401
|
-
height: 30
|
402
|
-
...(xsVal || {})
|
392
|
+
height: 30
|
403
393
|
}], {
|
404
394
|
at: [...insertAt]
|
405
395
|
});
|
406
396
|
break;
|
407
397
|
default:
|
408
398
|
}
|
409
|
-
if (
|
399
|
+
if (breakpoint === "lg") {
|
410
400
|
setSelectedElement({});
|
401
|
+
|
402
|
+
// auto align in mobile
|
411
403
|
Transforms.setNodes(editor, {
|
412
|
-
|
404
|
+
xs_updatedOn: null,
|
413
405
|
updated_at: new Date().getTime()
|
414
406
|
}, {
|
415
407
|
at: path
|
@@ -8,7 +8,7 @@ import { onDropItem, ROW_HEIGHT } from "../../common/RnD/Utils/gridDropItem";
|
|
8
8
|
import useBreakpoints from "../../hooks/useBreakpoints";
|
9
9
|
import { breakpointValues, formatBreakpointValues } from "./breakpointConstants";
|
10
10
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
11
|
-
import { getBreakPointsValue
|
11
|
+
import { getBreakPointsValue } from "../../helper/theme";
|
12
12
|
import focusOnNewItem from "../../helper/RnD/focusOnNewItem";
|
13
13
|
import { bringItemToFB } from "../../helper";
|
14
14
|
import itemOptions from "./Options/sectionItemOptions";
|
@@ -160,11 +160,6 @@ const FreeGridBox = props => {
|
|
160
160
|
const isBoxHeader = useMemo(() => {
|
161
161
|
return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
|
162
162
|
}, [element]);
|
163
|
-
const boxSp = groupByBreakpoint({
|
164
|
-
borderRadius: {
|
165
|
-
...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
|
166
|
-
}
|
167
|
-
}, theme);
|
168
163
|
return /*#__PURE__*/_jsx(RnD, {
|
169
164
|
id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
|
170
165
|
className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
|
@@ -231,7 +226,9 @@ const FreeGridBox = props => {
|
|
231
226
|
"--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
|
232
227
|
},
|
233
228
|
sx: {
|
234
|
-
|
229
|
+
borderRadius: {
|
230
|
+
...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
|
231
|
+
},
|
235
232
|
background: sectionBgColor,
|
236
233
|
backgroundImage: sectionBackgroundImage ? `url('${sectionBackgroundImage}')` : "",
|
237
234
|
borderColor: borderColor || "transparent",
|
@@ -5,12 +5,12 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const More = props => {
|
6
6
|
const {
|
7
7
|
handleClick,
|
8
|
-
|
9
|
-
|
8
|
+
breakpoint,
|
9
|
+
translation
|
10
10
|
} = props;
|
11
11
|
return /*#__PURE__*/_jsx(Box, {
|
12
12
|
children: /*#__PURE__*/_jsxs(List, {
|
13
|
-
className: "item-list-wrpr
|
13
|
+
className: "item-list-wrpr",
|
14
14
|
children: [/*#__PURE__*/_jsx(ListItemButton, {
|
15
15
|
className: "item-wrapper",
|
16
16
|
onClick: handleClick("addSection"),
|
@@ -19,15 +19,15 @@ const More = props => {
|
|
19
19
|
className: "item-wrapper",
|
20
20
|
onClick: handleClick("duplicateSection"),
|
21
21
|
children: translation?.translation("Duplicate Section")
|
22
|
+
}), /*#__PURE__*/_jsx(ListItemButton, {
|
23
|
+
className: "item-wrapper",
|
24
|
+
onClick: handleClick("deleteSection"),
|
25
|
+
children: "Delete Section"
|
22
26
|
}), breakpoint === "xs" ? /*#__PURE__*/_jsx(ListItemButton, {
|
23
27
|
className: "item-wrapper",
|
24
28
|
onClick: handleClick("forceAutoAlignment"),
|
25
29
|
children: "Force Auto Alignment"
|
26
|
-
}) : null
|
27
|
-
className: "item-wrapper",
|
28
|
-
onClick: handleClick("deleteSection"),
|
29
|
-
children: "Delete Section"
|
30
|
-
})]
|
30
|
+
}) : null]
|
31
31
|
})
|
32
32
|
});
|
33
33
|
};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
const useFreeGridStyles = ({
|
2
2
|
theme,
|
3
|
-
MAX_DEVICE_WIDTH
|
4
|
-
appTheme
|
3
|
+
MAX_DEVICE_WIDTH
|
5
4
|
}) => ({
|
6
5
|
root: {
|
7
6
|
"&.freegrid-container": {
|
@@ -48,9 +47,6 @@ const useFreeGridStyles = ({
|
|
48
47
|
"&.type_text": {
|
49
48
|
// minHeight: "fit-content !important",
|
50
49
|
// wordBreak: "break-all",
|
51
|
-
"& .placeholder-simple-text": {
|
52
|
-
display: "none"
|
53
|
-
}
|
54
50
|
},
|
55
51
|
"&.enable-1, &.enable-2": {
|
56
52
|
"&.type_text": {
|
@@ -247,9 +243,6 @@ const useFreeGridStyles = ({
|
|
247
243
|
},
|
248
244
|
"& > .simple-text": {
|
249
245
|
display: "none"
|
250
|
-
},
|
251
|
-
"& > .edt-paragraphs": {
|
252
|
-
display: "none"
|
253
246
|
}
|
254
247
|
},
|
255
248
|
"& .fgi_type_form": {
|
@@ -320,50 +313,9 @@ const useFreeGridStyles = ({
|
|
320
313
|
backgroundColor: "#FFF",
|
321
314
|
overflow: "hidden"
|
322
315
|
},
|
323
|
-
"& .fgi_type_embedScript:not(:has(.has-code))": {
|
324
|
-
background: appTheme?.palette?.editor?.sectionSettingIconHover,
|
325
|
-
color: appTheme?.palette?.editor?.textColor,
|
326
|
-
fontSize: "14px",
|
327
|
-
borderRadius: "12px",
|
328
|
-
display: "flex",
|
329
|
-
flexDirection: "column",
|
330
|
-
justifyContent: "center",
|
331
|
-
alignItems: "center",
|
332
|
-
height: "100%",
|
333
|
-
textAlign: "center",
|
334
|
-
"& svg": {
|
335
|
-
width: "20px",
|
336
|
-
height: "20px",
|
337
|
-
"& path": {
|
338
|
-
stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
|
339
|
-
}
|
340
|
-
},
|
341
|
-
"& .code-icon": {
|
342
|
-
display: "flex",
|
343
|
-
marginRight: "5px"
|
344
|
-
},
|
345
|
-
"& .empty-code": {
|
346
|
-
display: "flex"
|
347
|
-
},
|
348
|
-
"& .code-name": {
|
349
|
-
display: "flex",
|
350
|
-
alignItems: "anchor-center"
|
351
|
-
}
|
352
|
-
},
|
353
316
|
"& .fgi_type_text": {
|
354
317
|
"& .edt-headings": {
|
355
318
|
margin: "0px"
|
356
|
-
},
|
357
|
-
"& .edt-paragraphs": {
|
358
|
-
margin: "0px"
|
359
|
-
}
|
360
|
-
},
|
361
|
-
"& .fgi_type_table": {
|
362
|
-
"& .edt-headings": {
|
363
|
-
margin: "0px"
|
364
|
-
},
|
365
|
-
"& .edt-paragraphs": {
|
366
|
-
margin: "0px"
|
367
319
|
}
|
368
320
|
},
|
369
321
|
/** element toolbar hide */
|
@@ -404,41 +356,21 @@ const useFreeGridStyles = ({
|
|
404
356
|
sectionPopper: {
|
405
357
|
zIndex: 1200,
|
406
358
|
width: "40px",
|
407
|
-
left: "-
|
359
|
+
left: "-58px !important",
|
408
360
|
borderRadius: "8px",
|
409
|
-
marginRight: "5px !important",
|
410
361
|
"& .papper-root": {
|
411
362
|
fontFamily: "sans-serif",
|
412
363
|
boxShadow: "-4px -3px 12px 4px rgba(0, 0, 0, 0.12)",
|
413
|
-
background:
|
414
|
-
border: `1px solid ${appTheme?.palette?.editor?.miniToolBarBorder}`,
|
415
|
-
borderRadius: "10px",
|
364
|
+
background: "#FFF",
|
416
365
|
"& .MuiIconButton-root": {
|
417
|
-
padding: "
|
366
|
+
padding: "10px",
|
418
367
|
color: "#000",
|
419
|
-
background:
|
368
|
+
background: "#FFF",
|
420
369
|
"& svg": {
|
421
370
|
width: "20px",
|
422
|
-
height: "20px"
|
423
|
-
color: appTheme?.palette?.editor?.closeButtonSvgStroke
|
424
|
-
},
|
425
|
-
"& .settingsIcon": {
|
426
|
-
"& path": {
|
427
|
-
stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
|
428
|
-
}
|
371
|
+
height: "20px"
|
429
372
|
},
|
430
|
-
"&.active": {
|
431
|
-
"& svg": {
|
432
|
-
width: "20px",
|
433
|
-
height: "20px",
|
434
|
-
color: "#2563EB"
|
435
|
-
},
|
436
|
-
"& .settingsIcon": {
|
437
|
-
"& path": {
|
438
|
-
stroke: "#2563EB"
|
439
|
-
}
|
440
|
-
}
|
441
|
-
}
|
373
|
+
"&.active,&:hover ": {}
|
442
374
|
}
|
443
375
|
}
|
444
376
|
},
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
2
2
|
import React, { useState } from "react";
|
3
|
-
import { Transforms, Path, Node
|
3
|
+
import { Transforms, Path, Node } from "slate";
|
4
4
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
5
5
|
import { IconButton, Tooltip, Grid as GridContainer, useTheme } from "@mui/material";
|
6
6
|
import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
|
@@ -206,19 +206,7 @@ const Grid = props => {
|
|
206
206
|
};
|
207
207
|
const onAddSection = () => () => {
|
208
208
|
try {
|
209
|
-
|
210
|
-
const carousel = Editor.above(editor, {
|
211
|
-
at: path,
|
212
|
-
match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "carousel-item"
|
213
|
-
});
|
214
|
-
if (carousel) {
|
215
|
-
const [carouselNode, carouselItemPath] = carousel || [];
|
216
|
-
const duplicatecCarousel = JSON.parse(JSON.stringify(carouselNode));
|
217
|
-
Transforms.insertNodes(editor, duplicatecCarousel, {
|
218
|
-
at: Path.next(carouselItemPath)
|
219
|
-
});
|
220
|
-
return;
|
221
|
-
}
|
209
|
+
const duplicateGrid = JSON.parse(JSON.stringify(element));
|
222
210
|
insertGrid(editor, duplicateGrid, [path[0] + 1, 0]);
|
223
211
|
} catch (err) {
|
224
212
|
console.log(err);
|
@@ -292,7 +292,7 @@ const GridItem = props => {
|
|
292
292
|
...getBRProps,
|
293
293
|
display: "flex",
|
294
294
|
flexDirection: flexDirection || "column",
|
295
|
-
background: bgColor,
|
295
|
+
background: bgColor || "transparent",
|
296
296
|
borderColor: getBorderColor(),
|
297
297
|
borderWidth: borderWidth || "1px",
|
298
298
|
borderStyle: borderStyle || "solid",
|
@@ -15,8 +15,7 @@ const CheckList = props => {
|
|
15
15
|
isEmpty,
|
16
16
|
className,
|
17
17
|
style,
|
18
|
-
customProps
|
19
|
-
selectedLineHeight
|
18
|
+
customProps
|
20
19
|
} = props;
|
21
20
|
const {
|
22
21
|
translation
|
@@ -46,7 +45,7 @@ const CheckList = props => {
|
|
46
45
|
justifyContent: "center",
|
47
46
|
alignItems: "center",
|
48
47
|
...(style || {}),
|
49
|
-
lineHeight:
|
48
|
+
lineHeight: 1.43
|
50
49
|
},
|
51
50
|
children: [/*#__PURE__*/_jsxs("div", {
|
52
51
|
contentEditable: false,
|
@@ -1,10 +1,5 @@
|
|
1
|
-
import React
|
2
|
-
import Box from "@mui/material
|
3
|
-
import Card from "@mui/material/Card";
|
4
|
-
import CardMedia from "@mui/material/CardMedia";
|
5
|
-
import CardContent from "@mui/material/CardContent";
|
6
|
-
import Typography from "@mui/material/Typography";
|
7
|
-
import Skeleton from "@mui/material/Skeleton";
|
1
|
+
import React from "react";
|
2
|
+
import { Box, Card, CardMedia, CardContent, Typography } from "@mui/material";
|
8
3
|
import Icon from "../../common/Icon";
|
9
4
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
10
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -20,26 +15,13 @@ const SearchAttachment = props => {
|
|
20
15
|
metadata
|
21
16
|
} = customProps;
|
22
17
|
const {
|
23
|
-
|
24
|
-
|
18
|
+
title,
|
19
|
+
type
|
25
20
|
} = element;
|
26
21
|
const {
|
27
22
|
theme
|
28
23
|
} = useEditorContext();
|
29
|
-
const [title, setTitle] = useState("");
|
30
|
-
const [showSkeleton, setShowSkeleton] = useState(false);
|
31
24
|
const label = Boolean(title?.trim()) ? title : 'Untitled';
|
32
|
-
useEffect(() => {
|
33
|
-
const fetchTitle = async id => {
|
34
|
-
setShowSkeleton(true);
|
35
|
-
const title = await customProps?.services('getDocTitle', id);
|
36
|
-
setTitle(title?.data);
|
37
|
-
setShowSkeleton(false);
|
38
|
-
};
|
39
|
-
if (id) {
|
40
|
-
fetchTitle(id);
|
41
|
-
}
|
42
|
-
}, []);
|
43
25
|
const handleClick = () => {
|
44
26
|
if (metadata && metadata?.actionHandler) {
|
45
27
|
metadata?.actionHandler(type, element);
|
@@ -56,15 +38,15 @@ const SearchAttachment = props => {
|
|
56
38
|
children: /*#__PURE__*/_jsxs(Card, {
|
57
39
|
sx: {
|
58
40
|
display: "flex",
|
59
|
-
justifyContent:
|
60
|
-
alignItems:
|
41
|
+
justifyContent: "flex-start",
|
42
|
+
alignItems: "flex-end",
|
61
43
|
width: "fit-content",
|
62
44
|
maxWidth: '250px',
|
63
45
|
padding: "0px 10px",
|
64
46
|
boxShadow: "none",
|
65
47
|
border: `1px solid ${theme?.palette?.primary?.slashBrainBorder} !important`,
|
66
48
|
borderRadius: "7px !important",
|
67
|
-
background:
|
49
|
+
background: `${theme?.palette?.containers?.slashBrainCardBg} !important`,
|
68
50
|
cursor: 'pointer',
|
69
51
|
margin: '4px 0px',
|
70
52
|
lineHeight: 1.43,
|
@@ -94,12 +76,7 @@ const SearchAttachment = props => {
|
|
94
76
|
width: "unset !important"
|
95
77
|
}
|
96
78
|
},
|
97
|
-
children:
|
98
|
-
variant: "circular",
|
99
|
-
width: 14,
|
100
|
-
height: 14,
|
101
|
-
animation: "wave"
|
102
|
-
}) : /*#__PURE__*/_jsx(Icon, {
|
79
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
103
80
|
icon: "docsIcon"
|
104
81
|
})
|
105
82
|
}), /*#__PURE__*/_jsx(CardContent, {
|
@@ -117,15 +94,7 @@ const SearchAttachment = props => {
|
|
117
94
|
width: "unset !important"
|
118
95
|
}
|
119
96
|
},
|
120
|
-
children:
|
121
|
-
variant: "text",
|
122
|
-
width: 140,
|
123
|
-
height: 20,
|
124
|
-
animation: "wave",
|
125
|
-
sx: {
|
126
|
-
borderRadius: "4px"
|
127
|
-
}
|
128
|
-
}) : /*#__PURE__*/_jsxs(Typography, {
|
97
|
+
children: /*#__PURE__*/_jsxs(Typography, {
|
129
98
|
sx: {
|
130
99
|
fontWeight: "500",
|
131
100
|
background: theme?.palette?.text?.slashBrainText,
|
@@ -30,7 +30,6 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
30
30
|
const [skip, setSkip] = useState(0);
|
31
31
|
const [search, setSearch] = useState("");
|
32
32
|
const [isLoading, setIsLoading] = useState(false);
|
33
|
-
const [total, setTotal] = useState(0);
|
34
33
|
const [debouncedSearch] = useDebounce(search, 300);
|
35
34
|
const limit = 20;
|
36
35
|
const observer = useRef();
|
@@ -64,24 +63,24 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
64
63
|
}
|
65
64
|
};
|
66
65
|
useEffect(() => {
|
67
|
-
getDocs(
|
66
|
+
getDocs({
|
67
|
+
debouncedSearch,
|
68
|
+
skip,
|
69
|
+
limit,
|
70
|
+
current_doc_id: currentId
|
71
|
+
});
|
68
72
|
}, [skip, debouncedSearch]);
|
69
73
|
const getDocs = async () => {
|
70
|
-
if (isLoading) return;
|
71
|
-
if (total > 0 && mapData?.length >= total) return;
|
72
74
|
setIsLoading(true);
|
73
75
|
try {
|
74
76
|
if (otherProps?.services) {
|
75
77
|
const result = await otherProps?.services("getDocs", {
|
76
78
|
skip,
|
77
79
|
limit,
|
78
|
-
search
|
80
|
+
search,
|
79
81
|
current_doc_id: currentId
|
80
82
|
});
|
81
|
-
|
82
|
-
const totalCount = result?.data?.total || 0;
|
83
|
-
setMapData(prev => skip === 0 ? docs : [...prev, ...docs]);
|
84
|
-
setTotal(totalCount);
|
83
|
+
setMapData(prev => skip === 0 ? result.data : [...prev, ...result.data]);
|
85
84
|
}
|
86
85
|
} catch (error) {
|
87
86
|
console.error("Error fetching documents:", error);
|
@@ -259,7 +259,7 @@ const SearchAndDocList = ({
|
|
259
259
|
xs: 12,
|
260
260
|
children: /*#__PURE__*/_jsx(Typography, {
|
261
261
|
sx: {
|
262
|
-
display: mapData?.length === 0
|
262
|
+
display: mapData?.length === 0 ? 'flex' : 'none',
|
263
263
|
alignItems: "center",
|
264
264
|
justifyContent: "center",
|
265
265
|
color: theme?.palette?.text?.secondary,
|
@@ -269,17 +269,15 @@ const SearchAndDocList = ({
|
|
269
269
|
},
|
270
270
|
children: "No docs"
|
271
271
|
})
|
272
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
272
|
+
}), isLoading && /*#__PURE__*/_jsx(Grid, {
|
273
273
|
item: true,
|
274
|
-
xs: 12,
|
275
274
|
sx: {
|
276
|
-
display:
|
277
|
-
alignItems: "center",
|
275
|
+
display: "flex",
|
278
276
|
justifyContent: "center",
|
279
|
-
|
280
|
-
|
281
|
-
padding: '
|
282
|
-
|
277
|
+
alignItems: 'center',
|
278
|
+
minHeight: '400px',
|
279
|
+
padding: '0px 16px 8px',
|
280
|
+
position: 'absolute'
|
283
281
|
},
|
284
282
|
children: /*#__PURE__*/_jsx(CircularProgress, {})
|
285
283
|
})]
|