@flozy/editor 10.5.1 → 10.5.3

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 (60) hide show
  1. package/dist/Editor/CommonEditor.js +6 -4
  2. package/dist/Editor/Elements/Button/EditorButton.js +0 -2
  3. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -2
  4. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +454 -0
  5. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +23 -8
  6. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +5 -1
  7. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +3 -2
  8. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +11 -0
  9. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
  10. package/dist/Editor/Elements/Embed/Image.js +3 -2
  11. package/dist/Editor/Elements/EmbedScript/Code.js +14 -2
  12. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +57 -28
  13. package/dist/Editor/Elements/EmbedScript/styles.js +89 -0
  14. package/dist/Editor/Elements/Form/Form.js +181 -168
  15. package/dist/Editor/Elements/Form/FormElements/FormText.js +23 -6
  16. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +3 -2
  17. package/dist/Editor/Elements/Form/FormField.js +10 -4
  18. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +6 -4
  19. package/dist/Editor/Elements/FreeGrid/Options/More.js +1 -1
  20. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +1 -1
  21. package/dist/Editor/Elements/FreeGrid/styles.js +61 -7
  22. package/dist/Editor/Elements/List/CheckList.js +3 -2
  23. package/dist/Editor/Elements/Search/SearchAttachment.js +40 -9
  24. package/dist/Editor/Elements/Search/SearchButton.js +9 -8
  25. package/dist/Editor/Elements/Search/SearchList.js +9 -7
  26. package/dist/Editor/Elements/SimpleText/index.js +6 -1
  27. package/dist/Editor/Elements/Table/TableCell.js +7 -3
  28. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +43 -18
  29. package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
  30. package/dist/Editor/assets/svg/ResetIconNew.js +23 -0
  31. package/dist/Editor/assets/svg/SettingsIcon.js +1 -0
  32. package/dist/Editor/common/Icon.js +3 -1
  33. package/dist/Editor/common/LinkSettings/NavComponents.js +34 -8
  34. package/dist/Editor/common/LinkSettings/index.js +85 -69
  35. package/dist/Editor/common/LinkSettings/style.js +245 -30
  36. package/dist/Editor/common/MentionsPopup/index.js +4 -1
  37. package/dist/Editor/common/RnD/ElementOptions/Actions.js +13 -14
  38. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +1 -0
  39. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  40. package/dist/Editor/common/RnD/ElementOptions/styles.js +28 -1
  41. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +4 -4
  42. package/dist/Editor/common/RnD/ElementSettings/styles.js +147 -12
  43. package/dist/Editor/common/RnD/OptionsPopup/index.js +8 -5
  44. package/dist/Editor/common/RnD/OptionsPopup/style.js +121 -19
  45. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +0 -6
  46. package/dist/Editor/common/Select/index.js +2 -0
  47. package/dist/Editor/common/Shorthands/elements.js +11 -11
  48. package/dist/Editor/common/SnackBar/index.js +43 -0
  49. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +7 -6
  50. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +13 -6
  51. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
  52. package/dist/Editor/common/iconListV2.js +101 -6
  53. package/dist/Editor/common/iconslist.js +3 -0
  54. package/dist/Editor/commonStyle.js +70 -1
  55. package/dist/Editor/hooks/useMouseMove.js +2 -5
  56. package/dist/Editor/utils/SlateUtilityFunctions.js +12 -10
  57. package/dist/Editor/utils/form.js +4 -4
  58. package/dist/Editor/utils/formfield.js +8 -2
  59. package/dist/Editor/utils/helper.js +76 -0
  60. package/package.json +1 -1
@@ -15,6 +15,9 @@ import Workflow from "./Workflow";
15
15
  import { getTRBLBreakPoints, getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
16
16
  import { validation } from "./FormElements/validations";
17
17
  import Icon from "../../common/Icon";
18
+ import useCommonStyle from "../../commonStyle";
19
+ import { useEditorContext } from "../../hooks/useMouseMove";
20
+ import { UploadIconCloud } from "../../common/iconListV2";
18
21
  import { jsx as _jsx } from "react/jsx-runtime";
19
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
23
  const Form = props => {
@@ -76,6 +79,10 @@ const Form = props => {
76
79
  const [formHeight, setFormHeight] = useState();
77
80
  const [formWidth, setFormWidth] = useState();
78
81
  const path = ReactEditor.findPath(editor, element);
82
+ const {
83
+ theme: appTheme
84
+ } = useEditorContext();
85
+ const classes = useCommonStyle(appTheme);
79
86
  useEffect(() => {
80
87
  setFormHeight(formEle?.current?.clientHeight);
81
88
  setFormWidth(formEle?.current?.clientWidth);
@@ -381,188 +388,194 @@ const Form = props => {
381
388
  }
382
389
  }, theme)
383
390
  };
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
391
+ return /*#__PURE__*/_jsx(Grid, {
392
+ sx: classes?.formStyles,
393
+ children: /*#__PURE__*/_jsxs("div", {
394
+ ...attributes,
395
+ className: "form-wrapper element-root",
396
+ style: {
397
+ border: !readOnly ? "none" : "none",
398
+ padding: "10px",
399
+ width: "100%"
408
400
  },
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%"
426
- },
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"
453
- },
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)"
401
+ onMouseOver: onMouseOver,
402
+ onMouseLeave: onMouseLeave,
403
+ children: [/*#__PURE__*/_jsxs(Box, {
404
+ component: "form",
405
+ id: `${formName}`,
406
+ onSubmit: handleSubmit,
407
+ sx: {
408
+ color: textColor || "#FFF",
409
+ borderColor: borderColor || "transparent",
410
+ borderWidth: borderWidth || "1px",
411
+ display: submittedSuccessfully ? "none" : "block",
412
+ borderStyle: borderStyle || "solid",
413
+ background: bgColor || "transparent",
414
+ position: "relative",
415
+ lineHeight: 1.43,
416
+ ...formSX
466
417
  },
467
- children: /*#__PURE__*/_jsx(CircularProgress, {
468
- style: {
469
- position: "absolute",
470
- left: 0,
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,
489
- children: /*#__PURE__*/_jsx(Grid, {
418
+ ref: formEle,
419
+ children: [/*#__PURE__*/_jsx(Grid, {
420
+ className: "form-grid",
490
421
  item: true,
491
- children: /*#__PURE__*/_jsxs(Typography, {
422
+ xs: 12,
423
+ children: /*#__PURE__*/_jsxs(Grid, {
424
+ container: true,
425
+ spacing: 2,
492
426
  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
427
+ justifyContent: alignment?.horizantal || "start"
506
428
  },
507
- children: ["Form Submitted Successfully...!", /*#__PURE__*/_jsx("span", {
429
+ children: [/*#__PURE__*/_jsx("legend", {
508
430
  style: {
509
- paddingLeft: "10px"
431
+ fontSize: `${textSize}px` || "inherit",
432
+ fontFamily: fontFamily || "PoppinsRegular",
433
+ textAlign: textAlign || "left",
434
+ width: "100%"
510
435
  },
511
- children: /*#__PURE__*/_jsx(IconButton, {
512
- onClick: handleCloseMessage,
513
- children: /*#__PURE__*/_jsx(Icon, {
514
- icon: "closeIcon"
515
- })
436
+ children: formTitle
437
+ }), children, /*#__PURE__*/_jsx(Grid, {
438
+ item: true,
439
+ ...buttonProps?.grid,
440
+ className: "form-btn-wrpr",
441
+ contentEditable: false,
442
+ style: {
443
+ display: "flex",
444
+ justifyContent: btnAlign?.horizantal || "start",
445
+ alignItems: btnAlign?.vertical || "start"
446
+ },
447
+ children: /*#__PURE__*/_jsx(Box, {
448
+ component: "button",
449
+ onClick: onSubmitClick,
450
+ disabled: loading,
451
+ sx: {
452
+ background: buttonProps?.bgColor || "#2563EB",
453
+ borderWidth: "1px",
454
+ borderBlockStyle: "solid",
455
+ borderRadius: `${buttonProps?.borderRadius || "8px"}`,
456
+ ...btnBorderStyle,
457
+ ...buttonSX,
458
+ color: `${buttonProps?.textColor || "#FFFFFF"}`,
459
+ fontSize: buttonProps?.textSize || "inherit",
460
+ height: "fit-content",
461
+ fontFamily: buttonProps?.fontFamily || "Inter, sans-serif",
462
+ width: buttonProps?.fullWidth ? "100%" : "auto",
463
+ borderColor: `${buttonProps?.borderColor || "transparent"}`
464
+ },
465
+ children: buttonProps?.label || "Submit"
516
466
  })
517
467
  })]
518
468
  })
519
- })
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, {})
469
+ }), !readOnly && showOptions && /*#__PURE__*/_jsx(FormToolbar, {}), loading && /*#__PURE__*/_jsx("div", {
470
+ style: {
471
+ position: "absolute",
472
+ top: 0,
473
+ left: 0,
474
+ width: "100%",
475
+ height: "100%",
476
+ background: "rgba(255,255,255,0.5)"
477
+ },
478
+ children: /*#__PURE__*/_jsx(CircularProgress, {
479
+ style: {
480
+ position: "absolute",
481
+ left: 0,
482
+ right: 0,
483
+ top: 0,
484
+ bottom: 0,
485
+ margin: "auto"
486
+ }
546
487
  })
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, {})
488
+ })]
489
+ }), /*#__PURE__*/_jsx(Grid, {
490
+ item: true,
491
+ sx: {
492
+ display: submittedSuccessfully ? "flex" : "none"
493
+ },
494
+ contentEditable: false,
495
+ children: /*#__PURE__*/_jsx(Grid, {
496
+ container: true,
497
+ alignItems: "center",
498
+ justifyContent: "center",
499
+ spacing: 2,
500
+ children: /*#__PURE__*/_jsx(Grid, {
501
+ item: true,
502
+ children: /*#__PURE__*/_jsxs(Typography, {
503
+ sx: {
504
+ color: textColor || "#A2A9B4",
505
+ borderColor: borderColor || "transparent",
506
+ borderWidth: borderWidth || "1px",
507
+ borderStyle: borderStyle || "solid",
508
+ background: bgColor || "transparent",
509
+ minHeight: `${formHeight}px`,
510
+ minWidth: `${formWidth}px`,
511
+ display: "flex",
512
+ alignItems: "center",
513
+ justifyContent: "center",
514
+ textAlign: "center",
515
+ position: "relative",
516
+ ...formTypoSX
517
+ },
518
+ children: ["Form Submitted Successfully...!", /*#__PURE__*/_jsx("span", {
519
+ style: {
520
+ paddingLeft: "10px"
521
+ },
522
+ children: /*#__PURE__*/_jsx(IconButton, {
523
+ onClick: handleCloseMessage,
524
+ children: /*#__PURE__*/_jsx(Icon, {
525
+ icon: "closeIcon"
526
+ })
527
+ })
528
+ })]
529
+ })
555
530
  })
556
531
  })
532
+ }), openSetttings ? /*#__PURE__*/_jsx(FormPopup, {
533
+ element: element,
534
+ onSave: onSave,
535
+ onClose: onClose,
536
+ customProps: customProps,
537
+ translation: translation
538
+ }) : null, /*#__PURE__*/_jsx(Workflow, {
539
+ openWorkflow: openWorkflow,
540
+ element: element,
541
+ closeWorkflow: closeWorkflow,
542
+ onSave: onSave,
543
+ customProps: customProps
544
+ }), !readOnly && !isIframe ? /*#__PURE__*/_jsxs(Menu, {
545
+ className: "editor-btn-options",
546
+ open: anchorEl !== null,
547
+ anchorEl: anchorEl,
548
+ onClose: handleClose,
549
+ contentEditable: false,
550
+ sx: classes?.formMenuStyle,
551
+ children: [/*#__PURE__*/_jsx(MenuItem, {
552
+ onClick: onMenuClick("edit"),
553
+ children: /*#__PURE__*/_jsx(Tooltip, {
554
+ title: translation("Button Settings"),
555
+ arrow: true,
556
+ children: /*#__PURE__*/_jsx(IconButton, {
557
+ children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
558
+ })
559
+ })
560
+ }), /*#__PURE__*/_jsx(MenuItem, {
561
+ onClick: onMenuClick("test"),
562
+ children: /*#__PURE__*/_jsx(Tooltip, {
563
+ title: translation("Test Submit"),
564
+ arrow: true,
565
+ children: /*#__PURE__*/_jsx(IconButton, {
566
+ children: /*#__PURE__*/_jsx(UploadIconCloud, {})
567
+ })
568
+ })
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"
557
577
  })]
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
- })]
578
+ })
566
579
  });
567
580
  };
568
581
  export default Form;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { Box } from "@mui/material";
3
- import { getTRBLBreakPoints, getBreakPointsValue } from "../../../helper/theme";
3
+ import { getTRBLBreakPoints, getBreakPointsValue, groupByBreakpoint } from "../../../helper/theme";
4
+ import { useTheme } from "@emotion/react";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  const FormText = props => {
6
7
  const {
@@ -19,11 +20,26 @@ const FormText = props => {
19
20
  textSize,
20
21
  fontFamily,
21
22
  fontWeight,
23
+ marginSpacing,
22
24
  ...rest
23
25
  } = fieldProps;
24
26
  const onChange = e => {
25
27
  e.preventDefault();
26
28
  };
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
+ };
27
43
  return /*#__PURE__*/_jsx("div", {
28
44
  style: {
29
45
  width: "100%",
@@ -40,16 +56,17 @@ const FormText = props => {
40
56
  padding: {
41
57
  ...getTRBLBreakPoints(bannerSpacing)
42
58
  },
43
- height: height || "auto",
44
- borderColor: borderColor || "transparent",
59
+ height: height && `${height} !important`,
60
+ borderColor: borderColor && `${borderColor} !important`,
45
61
  borderWidth: borderWidth || "1px",
46
62
  borderRadius: {
47
63
  ...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
48
64
  },
65
+ ...buttonSX,
49
66
  borderStyle: borderStyle || "solid",
50
- color: textColor || "#000",
51
- background: bgColor || "transparent",
52
- fontSize: textSize || "inherit",
67
+ color: textColor && `${textColor} !important`,
68
+ background: bgColor && `${bgColor} !important`,
69
+ fontSize: textSize && `${textSize} !important`,
53
70
  fontFamily: fontFamily || "PoppinsRegular",
54
71
  fontWeight: `${fontWeight} !important` || "400 !important"
55
72
  }
@@ -35,12 +35,13 @@ const FormTextArea = props => {
35
35
  onChange: onChange,
36
36
  sx: {
37
37
  width: "100%",
38
- border: `1px solid ${borderColor || "#FFF"}`,
38
+ borderWidth: "1px",
39
+ borderBlockStyle: "solid",
39
40
  padding: {
40
41
  ...getTRBLBreakPoints(bannerSpacing)
41
42
  },
42
43
  height: height || "150px",
43
- borderColor: `${borderColor || "transparent"} !important`,
44
+ borderColor: borderColor && `${borderColor} !important`,
44
45
  borderWidth: borderWidth || "1px",
45
46
  borderRadius: {
46
47
  ...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
@@ -2,11 +2,13 @@ import React, { useState } from "react";
2
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";
7
5
  import FormElements from "./FormElements";
8
6
  import FieldPopup from "./FieldPopup";
9
7
  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";
10
12
  import { jsx as _jsx } from "react/jsx-runtime";
11
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
14
  const FormField = props => {
@@ -38,6 +40,10 @@ const FormField = props => {
38
40
  ...element,
39
41
  metadatamapping
40
42
  };
43
+ const {
44
+ theme: appTheme
45
+ } = useEditorContext();
46
+ const classes = useCommonStyle(appTheme);
41
47
  const [openSetttings, setOpenSettings] = useState(false);
42
48
  const onSettings = () => {
43
49
  setOpenSettings(true);
@@ -77,7 +83,6 @@ const FormField = props => {
77
83
  top: "24px",
78
84
  bottom: 0,
79
85
  margin: "auto",
80
- height: "42px",
81
86
  zIndex: 101
82
87
  },
83
88
  children: [/*#__PURE__*/_jsx(Tooltip, {
@@ -110,7 +115,8 @@ const FormField = props => {
110
115
  className: "form-field",
111
116
  sx: {
112
117
  position: "relative",
113
- ...fieldSX
118
+ ...fieldSX,
119
+ ...classes?.fieldBtnSettings
114
120
  },
115
121
  children: [!readOnly && /*#__PURE__*/_jsx(FieldToolbar, {}), /*#__PURE__*/_jsx(FormElement, {
116
122
  fieldProps: elementProps
@@ -35,11 +35,15 @@ export const useFreeGrid = () => {
35
35
  return useContext(FreeGridContext);
36
36
  };
37
37
  const FreeGrid = props => {
38
+ const {
39
+ theme: appTheme
40
+ } = useEditorContext();
38
41
  const theme = useTheme();
39
42
  const breakpoint = useBreakpoints(theme);
40
43
  const classes = useFreeGridStyles({
41
44
  theme,
42
- MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint]
45
+ MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint],
46
+ appTheme
43
47
  });
44
48
  const editor = useSlateStatic();
45
49
  const {
@@ -511,10 +515,8 @@ const FreeGrid = props => {
511
515
  disableDragging: true,
512
516
  style: {
513
517
  position: "relative",
514
- "--height": `${height}px`,
515
- display: 'block' //for test purpose
518
+ "--height": `${height}px`
516
519
  },
517
-
518
520
  dataSets: {
519
521
  "data-height-xs": height_xs
520
522
  },
@@ -10,7 +10,7 @@ const More = props => {
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 sectionMoreOption",
14
14
  children: [/*#__PURE__*/_jsx(ListItemButton, {
15
15
  className: "item-wrapper",
16
16
  onClick: handleClick("addSection"),
@@ -3,7 +3,7 @@ const textOptions = ["edit", "settings", "link", "saveAsTemplate", "close"];
3
3
  const buttonOptions = ["settings", "link", "saveAsTemplate", "close"];
4
4
  const imageOptions = ["settings", "link", "imageFrame", "saveAsTemplate", "close"];
5
5
  const videoOptions = ["settings", "saveAsTemplate", "close"];
6
- const boxOptions = ["settings", "link", "saveAsTemplate", "close"];
6
+ const boxOptions = ["settings", "saveAsTemplate", "close"];
7
7
  const appHeaderOptions = ["settings", "saveAsTemplate", "close"];
8
8
  const tableOptions = ["drag", "edit", "settings", "saveAsTemplate", "close"];
9
9
  const embedScriptOptions = ["embedScript", "saveAsTemplate", "close"];
@@ -1,6 +1,7 @@
1
1
  const useFreeGridStyles = ({
2
2
  theme,
3
- MAX_DEVICE_WIDTH
3
+ MAX_DEVICE_WIDTH,
4
+ appTheme
4
5
  }) => ({
5
6
  root: {
6
7
  "&.freegrid-container": {
@@ -47,6 +48,9 @@ const useFreeGridStyles = ({
47
48
  "&.type_text": {
48
49
  // minHeight: "fit-content !important",
49
50
  // wordBreak: "break-all",
51
+ "& .placeholder-simple-text": {
52
+ display: "none"
53
+ }
50
54
  },
51
55
  "&.enable-1, &.enable-2": {
52
56
  "&.type_text": {
@@ -313,6 +317,36 @@ const useFreeGridStyles = ({
313
317
  backgroundColor: "#FFF",
314
318
  overflow: "hidden"
315
319
  },
320
+ "& .fgi_type_embedScript:not(:has(.has-code))": {
321
+ background: appTheme?.palette?.editor?.sectionSettingIconHover,
322
+ color: appTheme?.palette?.editor?.textColor,
323
+ fontSize: "14px",
324
+ borderRadius: "12px",
325
+ display: "flex",
326
+ flexDirection: "column",
327
+ justifyContent: "center",
328
+ alignItems: "center",
329
+ height: "100%",
330
+ textAlign: "center",
331
+ "& svg": {
332
+ width: "20px",
333
+ height: "20px",
334
+ "& path": {
335
+ stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
336
+ }
337
+ },
338
+ "& .code-icon": {
339
+ display: "flex",
340
+ marginRight: "5px"
341
+ },
342
+ "& .empty-code": {
343
+ display: "flex"
344
+ },
345
+ "& .code-name": {
346
+ display: "flex",
347
+ alignItems: "anchor-center"
348
+ }
349
+ },
316
350
  "& .fgi_type_text": {
317
351
  "& .edt-headings": {
318
352
  margin: "0px"
@@ -356,21 +390,41 @@ const useFreeGridStyles = ({
356
390
  sectionPopper: {
357
391
  zIndex: 1200,
358
392
  width: "40px",
359
- left: "-58px !important",
393
+ left: "-63px !important",
360
394
  borderRadius: "8px",
395
+ marginRight: "5px !important",
361
396
  "& .papper-root": {
362
397
  fontFamily: "sans-serif",
363
398
  boxShadow: "-4px -3px 12px 4px rgba(0, 0, 0, 0.12)",
364
- background: "#FFF",
399
+ background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
400
+ border: `1px solid ${appTheme?.palette?.editor?.miniToolBarBorder}`,
401
+ borderRadius: "10px",
365
402
  "& .MuiIconButton-root": {
366
- padding: "10px",
403
+ padding: "9px",
367
404
  color: "#000",
368
- background: "#FFF",
405
+ background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
369
406
  "& svg": {
370
407
  width: "20px",
371
- height: "20px"
408
+ height: "20px",
409
+ color: appTheme?.palette?.editor?.closeButtonSvgStroke
410
+ },
411
+ "& .settingsIcon": {
412
+ "& path": {
413
+ stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
414
+ }
372
415
  },
373
- "&.active,&:hover ": {}
416
+ "&.active": {
417
+ "& svg": {
418
+ width: "20px",
419
+ height: "20px",
420
+ color: "#2563EB"
421
+ },
422
+ "& .settingsIcon": {
423
+ "& path": {
424
+ stroke: "#2563EB"
425
+ }
426
+ }
427
+ }
374
428
  }
375
429
  }
376
430
  },
@@ -15,7 +15,8 @@ const CheckList = props => {
15
15
  isEmpty,
16
16
  className,
17
17
  style,
18
- customProps
18
+ customProps,
19
+ selectedLineHeight
19
20
  } = props;
20
21
  const {
21
22
  translation
@@ -45,7 +46,7 @@ const CheckList = props => {
45
46
  justifyContent: "center",
46
47
  alignItems: "center",
47
48
  ...(style || {}),
48
- lineHeight: 1.43
49
+ lineHeight: `${selectedLineHeight}`
49
50
  },
50
51
  children: [/*#__PURE__*/_jsxs("div", {
51
52
  contentEditable: false,