@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
@@ -4,6 +4,7 @@ import { Node } from "slate";
|
|
4
4
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
5
5
|
import { IconButton, Tooltip, Grid, Menu, MenuItem, CircularProgress, Box, Typography, useTheme } from "@mui/material";
|
6
6
|
import DeleteIcon from "@mui/icons-material/Delete";
|
7
|
+
import BackupIcon from "@mui/icons-material/Backup";
|
7
8
|
import { GridSettingsIcon, GridAddSectionIcon, WorkflowIcon } from "../../common/iconslist";
|
8
9
|
import FormPopup from "./FormPopup";
|
9
10
|
import ButtonPopup from "../Button/ButtonPopup";
|
@@ -14,9 +15,6 @@ import Workflow from "./Workflow";
|
|
14
15
|
import { getTRBLBreakPoints, getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
|
15
16
|
import { validation } from "./FormElements/validations";
|
16
17
|
import Icon from "../../common/Icon";
|
17
|
-
import useCommonStyle from "../../commonStyle";
|
18
|
-
import { useEditorContext } from "../../hooks/useMouseMove";
|
19
|
-
import { UploadIconCloud } from "../../common/iconListV2";
|
20
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
21
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
22
20
|
const Form = props => {
|
@@ -78,10 +76,6 @@ const Form = props => {
|
|
78
76
|
const [formHeight, setFormHeight] = useState();
|
79
77
|
const [formWidth, setFormWidth] = useState();
|
80
78
|
const path = ReactEditor.findPath(editor, element);
|
81
|
-
const {
|
82
|
-
theme: appTheme
|
83
|
-
} = useEditorContext();
|
84
|
-
const classes = useCommonStyle(appTheme);
|
85
79
|
useEffect(() => {
|
86
80
|
setFormHeight(formEle?.current?.clientHeight);
|
87
81
|
setFormWidth(formEle?.current?.clientWidth);
|
@@ -159,8 +153,7 @@ const Form = props => {
|
|
159
153
|
[pair[0]]: pair[1],
|
160
154
|
placeholder: placeholder,
|
161
155
|
form_name: formName,
|
162
|
-
tagName: tagName
|
163
|
-
uid: fieldData?.uid
|
156
|
+
tagName: tagName
|
164
157
|
});
|
165
158
|
}
|
166
159
|
let params = {
|
@@ -207,7 +200,7 @@ const Form = props => {
|
|
207
200
|
}, {
|
208
201
|
at: path
|
209
202
|
});
|
210
|
-
// adding form field style to the current form node
|
203
|
+
// adding form field style to the current form node
|
211
204
|
const currentNode = Node.get(editor, path);
|
212
205
|
if (currentNode) {
|
213
206
|
currentNode.children.forEach((item, index) => {
|
@@ -388,194 +381,188 @@ const Form = props => {
|
|
388
381
|
}
|
389
382
|
}, theme)
|
390
383
|
};
|
391
|
-
return /*#__PURE__*/
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
384
|
+
return /*#__PURE__*/_jsxs("div", {
|
385
|
+
...attributes,
|
386
|
+
className: "form-wrapper element-root",
|
387
|
+
style: {
|
388
|
+
border: !readOnly ? "none" : "none",
|
389
|
+
padding: "10px",
|
390
|
+
width: "100%"
|
391
|
+
},
|
392
|
+
onMouseOver: onMouseOver,
|
393
|
+
onMouseLeave: onMouseLeave,
|
394
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
395
|
+
component: "form",
|
396
|
+
id: `${formName}`,
|
397
|
+
onSubmit: handleSubmit,
|
398
|
+
sx: {
|
399
|
+
color: textColor || "#FFF",
|
400
|
+
borderColor: borderColor || "transparent",
|
401
|
+
borderWidth: borderWidth || "1px",
|
402
|
+
display: submittedSuccessfully ? "none" : "block",
|
403
|
+
borderStyle: borderStyle || "solid",
|
404
|
+
background: bgColor || "transparent",
|
405
|
+
position: "relative",
|
406
|
+
lineHeight: 1.43,
|
407
|
+
...formSX
|
400
408
|
},
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
ref: formEle,
|
419
|
-
children: [/*#__PURE__*/_jsx(Grid, {
|
420
|
-
className: "form-grid",
|
421
|
-
item: true,
|
422
|
-
xs: 12,
|
423
|
-
children: /*#__PURE__*/_jsxs(Grid, {
|
424
|
-
container: true,
|
425
|
-
spacing: 2,
|
426
|
-
sx: {
|
427
|
-
justifyContent: alignment?.horizantal || "start"
|
409
|
+
ref: formEle,
|
410
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
411
|
+
className: "form-grid",
|
412
|
+
item: true,
|
413
|
+
xs: 12,
|
414
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
415
|
+
container: true,
|
416
|
+
spacing: 2,
|
417
|
+
sx: {
|
418
|
+
justifyContent: alignment?.horizantal || "start"
|
419
|
+
},
|
420
|
+
children: [/*#__PURE__*/_jsx("legend", {
|
421
|
+
style: {
|
422
|
+
fontSize: `${textSize}px` || "inherit",
|
423
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
424
|
+
textAlign: textAlign || "left",
|
425
|
+
width: "100%"
|
428
426
|
},
|
429
|
-
children:
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
427
|
+
children: formTitle
|
428
|
+
}), children, /*#__PURE__*/_jsx(Grid, {
|
429
|
+
item: true,
|
430
|
+
...buttonProps?.grid,
|
431
|
+
className: "form-btn-wrpr",
|
432
|
+
contentEditable: false,
|
433
|
+
style: {
|
434
|
+
display: "flex",
|
435
|
+
justifyContent: btnAlign?.horizantal || "start",
|
436
|
+
alignItems: btnAlign?.vertical || "start"
|
437
|
+
},
|
438
|
+
children: /*#__PURE__*/_jsx(Box, {
|
439
|
+
component: "button",
|
440
|
+
onClick: onSubmitClick,
|
441
|
+
disabled: loading,
|
442
|
+
sx: {
|
443
|
+
background: buttonProps?.bgColor || "rgb(30, 75, 122)",
|
444
|
+
borderWidth: "1px",
|
445
|
+
borderBlockStyle: "solid",
|
446
|
+
...btnBorderStyle,
|
447
|
+
...buttonSX,
|
448
|
+
color: `${buttonProps?.textColor || "#FFFFFF"}`,
|
449
|
+
fontSize: buttonProps?.textSize || "inherit",
|
450
|
+
height: "fit-content",
|
451
|
+
fontFamily: buttonProps?.fontFamily || "PoppinsRegular",
|
452
|
+
width: buttonProps?.fullWidth ? "100%" : "auto"
|
446
453
|
},
|
447
|
-
children:
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
fontFamily: buttonProps?.fontFamily || "Inter, sans-serif",
|
462
|
-
width: buttonProps?.fullWidth ? "100%" : "auto",
|
463
|
-
borderColor: `${buttonProps?.borderColor || "transparent"}`
|
464
|
-
},
|
465
|
-
children: buttonProps?.label || "Submit"
|
466
|
-
})
|
467
|
-
})]
|
468
|
-
})
|
469
|
-
}), !readOnly && showOptions && /*#__PURE__*/_jsx(FormToolbar, {}), loading && /*#__PURE__*/_jsx("div", {
|
454
|
+
children: buttonProps?.label || "Submit"
|
455
|
+
})
|
456
|
+
})]
|
457
|
+
})
|
458
|
+
}), !readOnly && showOptions && /*#__PURE__*/_jsx(FormToolbar, {}), loading && /*#__PURE__*/_jsx("div", {
|
459
|
+
style: {
|
460
|
+
position: "absolute",
|
461
|
+
top: 0,
|
462
|
+
left: 0,
|
463
|
+
width: "100%",
|
464
|
+
height: "100%",
|
465
|
+
background: "rgba(255,255,255,0.5)"
|
466
|
+
},
|
467
|
+
children: /*#__PURE__*/_jsx(CircularProgress, {
|
470
468
|
style: {
|
471
469
|
position: "absolute",
|
472
|
-
top: 0,
|
473
470
|
left: 0,
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
display: submittedSuccessfully ? "flex" : "none"
|
493
|
-
},
|
494
|
-
contentEditable: false,
|
471
|
+
right: 0,
|
472
|
+
top: 0,
|
473
|
+
bottom: 0,
|
474
|
+
margin: "auto"
|
475
|
+
}
|
476
|
+
})
|
477
|
+
})]
|
478
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
479
|
+
item: true,
|
480
|
+
sx: {
|
481
|
+
display: submittedSuccessfully ? "flex" : "none"
|
482
|
+
},
|
483
|
+
contentEditable: false,
|
484
|
+
children: /*#__PURE__*/_jsx(Grid, {
|
485
|
+
container: true,
|
486
|
+
alignItems: "center",
|
487
|
+
justifyContent: "center",
|
488
|
+
spacing: 2,
|
495
489
|
children: /*#__PURE__*/_jsx(Grid, {
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
...formTypoSX
|
490
|
+
item: true,
|
491
|
+
children: /*#__PURE__*/_jsxs(Typography, {
|
492
|
+
sx: {
|
493
|
+
color: textColor || "#A2A9B4",
|
494
|
+
borderColor: borderColor || "transparent",
|
495
|
+
borderWidth: borderWidth || "1px",
|
496
|
+
borderStyle: borderStyle || "solid",
|
497
|
+
background: bgColor || "transparent",
|
498
|
+
minHeight: `${formHeight}px`,
|
499
|
+
minWidth: `${formWidth}px`,
|
500
|
+
display: "flex",
|
501
|
+
alignItems: "center",
|
502
|
+
justifyContent: "center",
|
503
|
+
textAlign: "center",
|
504
|
+
position: "relative",
|
505
|
+
...formTypoSX
|
506
|
+
},
|
507
|
+
children: ["Form Submitted Successfully...!", /*#__PURE__*/_jsx("span", {
|
508
|
+
style: {
|
509
|
+
paddingLeft: "10px"
|
517
510
|
},
|
518
|
-
children:
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
523
|
-
onClick: handleCloseMessage,
|
524
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
525
|
-
icon: "closeIcon"
|
526
|
-
})
|
511
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
512
|
+
onClick: handleCloseMessage,
|
513
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
514
|
+
icon: "closeIcon"
|
527
515
|
})
|
528
|
-
})
|
529
|
-
})
|
516
|
+
})
|
517
|
+
})]
|
530
518
|
})
|
531
519
|
})
|
532
|
-
})
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
})
|
520
|
+
})
|
521
|
+
}), openSetttings ? /*#__PURE__*/_jsx(FormPopup, {
|
522
|
+
element: element,
|
523
|
+
onSave: onSave,
|
524
|
+
onClose: onClose,
|
525
|
+
customProps: customProps,
|
526
|
+
translation: translation
|
527
|
+
}) : null, /*#__PURE__*/_jsx(Workflow, {
|
528
|
+
openWorkflow: openWorkflow,
|
529
|
+
element: element,
|
530
|
+
closeWorkflow: closeWorkflow,
|
531
|
+
onSave: onSave,
|
532
|
+
customProps: customProps
|
533
|
+
}), !readOnly && !isIframe ? /*#__PURE__*/_jsxs(Menu, {
|
534
|
+
className: "editor-btn-options",
|
535
|
+
open: anchorEl !== null,
|
536
|
+
anchorEl: anchorEl,
|
537
|
+
onClose: handleClose,
|
538
|
+
contentEditable: false,
|
539
|
+
children: [/*#__PURE__*/_jsx(MenuItem, {
|
540
|
+
onClick: onMenuClick("edit"),
|
541
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
542
|
+
title: translation("Button Settings"),
|
543
|
+
arrow: true,
|
544
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
545
|
+
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
559
546
|
})
|
560
|
-
})
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
})
|
547
|
+
})
|
548
|
+
}), /*#__PURE__*/_jsx(MenuItem, {
|
549
|
+
onClick: onMenuClick("test"),
|
550
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
551
|
+
title: translation("Test Submit"),
|
552
|
+
arrow: true,
|
553
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
554
|
+
children: /*#__PURE__*/_jsx(BackupIcon, {})
|
568
555
|
})
|
569
|
-
})
|
570
|
-
}) : null, editButton && /*#__PURE__*/_jsx(ButtonPopup, {
|
571
|
-
element: buttonProps || {},
|
572
|
-
onSave: onSaveButtonSettings,
|
573
|
-
onClose: onCloseButtonSettings,
|
574
|
-
customProps: customProps,
|
575
|
-
style: formButtonStyle,
|
576
|
-
styleName: "formButtonStyle"
|
556
|
+
})
|
577
557
|
})]
|
578
|
-
})
|
558
|
+
}) : null, editButton && /*#__PURE__*/_jsx(ButtonPopup, {
|
559
|
+
element: buttonProps || {},
|
560
|
+
onSave: onSaveButtonSettings,
|
561
|
+
onClose: onCloseButtonSettings,
|
562
|
+
customProps: customProps,
|
563
|
+
style: formButtonStyle,
|
564
|
+
styleName: "formButtonStyle"
|
565
|
+
})]
|
579
566
|
});
|
580
567
|
};
|
581
568
|
export default Form;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Box } from "@mui/material";
|
3
|
-
import { getTRBLBreakPoints, getBreakPointsValue
|
4
|
-
import { useTheme } from "@emotion/react";
|
3
|
+
import { getTRBLBreakPoints, getBreakPointsValue } from "../../../helper/theme";
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
const FormText = props => {
|
7
6
|
const {
|
@@ -20,26 +19,11 @@ const FormText = props => {
|
|
20
19
|
textSize,
|
21
20
|
fontFamily,
|
22
21
|
fontWeight,
|
23
|
-
marginSpacing,
|
24
22
|
...rest
|
25
23
|
} = fieldProps;
|
26
24
|
const onChange = e => {
|
27
25
|
e.preventDefault();
|
28
26
|
};
|
29
|
-
const theme = useTheme();
|
30
|
-
const buttonSX = {
|
31
|
-
...groupByBreakpoint({
|
32
|
-
borderRadius: {
|
33
|
-
...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
|
34
|
-
},
|
35
|
-
padding: {
|
36
|
-
...getTRBLBreakPoints(bannerSpacing)
|
37
|
-
},
|
38
|
-
margin: {
|
39
|
-
...getTRBLBreakPoints(marginSpacing)
|
40
|
-
}
|
41
|
-
}, theme)
|
42
|
-
};
|
43
27
|
return /*#__PURE__*/_jsx("div", {
|
44
28
|
style: {
|
45
29
|
width: "100%",
|
@@ -56,17 +40,16 @@ const FormText = props => {
|
|
56
40
|
padding: {
|
57
41
|
...getTRBLBreakPoints(bannerSpacing)
|
58
42
|
},
|
59
|
-
height: height
|
60
|
-
borderColor: borderColor
|
43
|
+
height: height || "auto",
|
44
|
+
borderColor: borderColor || "transparent",
|
61
45
|
borderWidth: borderWidth || "1px",
|
62
46
|
borderRadius: {
|
63
47
|
...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
|
64
48
|
},
|
65
|
-
...buttonSX,
|
66
49
|
borderStyle: borderStyle || "solid",
|
67
|
-
color: textColor
|
68
|
-
background: bgColor
|
69
|
-
fontSize: textSize
|
50
|
+
color: textColor || "#000",
|
51
|
+
background: bgColor || "transparent",
|
52
|
+
fontSize: textSize || "inherit",
|
70
53
|
fontFamily: fontFamily || "PoppinsRegular",
|
71
54
|
fontWeight: `${fontWeight} !important` || "400 !important"
|
72
55
|
}
|
@@ -35,12 +35,12 @@ const FormTextArea = props => {
|
|
35
35
|
onChange: onChange,
|
36
36
|
sx: {
|
37
37
|
width: "100%",
|
38
|
-
|
38
|
+
border: `1px solid ${borderColor || "#FFF"}`,
|
39
39
|
padding: {
|
40
40
|
...getTRBLBreakPoints(bannerSpacing)
|
41
41
|
},
|
42
42
|
height: height || "150px",
|
43
|
-
borderColor: borderColor
|
43
|
+
borderColor: `${borderColor || "transparent"} !important`,
|
44
44
|
borderWidth: borderWidth || "1px",
|
45
45
|
borderRadius: {
|
46
46
|
...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
|
@@ -1,15 +1,12 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Transforms } from "slate";
|
2
|
+
import { Transforms, Node } from "slate";
|
3
3
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
4
4
|
import { IconButton, Tooltip, Grid, useTheme } from "@mui/material";
|
5
|
+
import DeleteIcon from "@mui/icons-material/Delete";
|
6
|
+
import SettingsIcon from "@mui/icons-material/Settings";
|
5
7
|
import FormElements from "./FormElements";
|
6
8
|
import FieldPopup from "./FieldPopup";
|
7
9
|
import { getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
|
8
|
-
import { DeleteIcon } from "../../assets/svg/AIIcons";
|
9
|
-
import { SettingsIcon } from "../../assets/svg/TableIcons";
|
10
|
-
import { useEditorContext } from "../../hooks/useMouseMove";
|
11
|
-
import useCommonStyle from "../../commonStyle";
|
12
|
-
import { getNode } from "../../utils/helper";
|
13
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
14
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
12
|
const FormField = props => {
|
@@ -36,15 +33,11 @@ const FormField = props => {
|
|
36
33
|
const formPath = path.slice(0, path.length - 1);
|
37
34
|
const {
|
38
35
|
metadatamapping
|
39
|
-
} =
|
36
|
+
} = Node?.get(editor, formPath) || {};
|
40
37
|
const updatedElement = {
|
41
38
|
...element,
|
42
39
|
metadatamapping
|
43
40
|
};
|
44
|
-
const {
|
45
|
-
theme: appTheme
|
46
|
-
} = useEditorContext();
|
47
|
-
const classes = useCommonStyle(appTheme);
|
48
41
|
const [openSetttings, setOpenSettings] = useState(false);
|
49
42
|
const onSettings = () => {
|
50
43
|
setOpenSettings(true);
|
@@ -84,6 +77,7 @@ const FormField = props => {
|
|
84
77
|
top: "24px",
|
85
78
|
bottom: 0,
|
86
79
|
margin: "auto",
|
80
|
+
height: "42px",
|
87
81
|
zIndex: 101
|
88
82
|
},
|
89
83
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
@@ -116,8 +110,7 @@ const FormField = props => {
|
|
116
110
|
className: "form-field",
|
117
111
|
sx: {
|
118
112
|
position: "relative",
|
119
|
-
...fieldSX
|
120
|
-
...classes?.fieldBtnSettings
|
113
|
+
...fieldSX
|
121
114
|
},
|
122
115
|
children: [!readOnly && /*#__PURE__*/_jsx(FieldToolbar, {}), /*#__PURE__*/_jsx(FormElement, {
|
123
116
|
fieldProps: elementProps
|
@@ -9,20 +9,20 @@ const FormStyles = theme => ({
|
|
9
9
|
color: "#94A3B8"
|
10
10
|
},
|
11
11
|
bodyTextArea: {
|
12
|
-
|
13
|
-
padding:
|
14
|
-
|
15
|
-
outline:
|
16
|
-
border:
|
12
|
+
'& .mini-editor-cls': {
|
13
|
+
padding: '12px',
|
14
|
+
'&:focus-visible': {
|
15
|
+
outline: 'none',
|
16
|
+
border: 'none'
|
17
17
|
}
|
18
18
|
},
|
19
19
|
"& .editorWorkflow": {
|
20
|
-
minHeight:
|
21
|
-
padding:
|
20
|
+
minHeight: '130px',
|
21
|
+
padding: '12px',
|
22
22
|
paddingBottom: 0,
|
23
|
-
|
24
|
-
outline:
|
25
|
-
border:
|
23
|
+
'&:focus-visible': {
|
24
|
+
outline: 'none',
|
25
|
+
border: 'none'
|
26
26
|
}
|
27
27
|
}
|
28
28
|
},
|
@@ -105,7 +105,7 @@ const FormStyles = theme => ({
|
|
105
105
|
padding: "4px 22px",
|
106
106
|
textTransform: "none",
|
107
107
|
border: "1px solid #D8DDE1",
|
108
|
-
minWidth:
|
108
|
+
minWidth: '126px',
|
109
109
|
"& svg": {
|
110
110
|
"& path": {
|
111
111
|
stroke: "#64748B"
|
@@ -169,19 +169,17 @@ const FormStyles = theme => ({
|
|
169
169
|
}
|
170
170
|
},
|
171
171
|
colorButtonSingle: {
|
172
|
-
border: "1.5px solid #DCE4EC !important",
|
173
172
|
"&.active": {
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
outline: "2px solid #2563EB"
|
173
|
+
"&:before": {
|
174
|
+
content: '" "',
|
175
|
+
position: "absolute",
|
176
|
+
top: "-5px",
|
177
|
+
left: "-5px",
|
178
|
+
width: "calc(100% + 4px)",
|
179
|
+
height: "calc(100% + 4px)",
|
180
|
+
border: "3px solid blue",
|
181
|
+
borderRadius: "50%"
|
182
|
+
}
|
185
183
|
}
|
186
184
|
},
|
187
185
|
colorButtonsInner: {
|
@@ -251,7 +249,7 @@ const FormStyles = theme => ({
|
|
251
249
|
}
|
252
250
|
},
|
253
251
|
root: {
|
254
|
-
padding:
|
252
|
+
padding: '10px'
|
255
253
|
}
|
256
254
|
});
|
257
255
|
export default FormStyles;
|