@flozy/editor 3.7.8 → 3.7.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/dist/Editor/ChatEditor.js +2 -2
  2. package/dist/Editor/CommonEditor.js +169 -111
  3. package/dist/Editor/Elements/AI/AIInput.js +16 -5
  4. package/dist/Editor/Elements/AI/PopoverAIInput.js +31 -17
  5. package/dist/Editor/Elements/AI/Styles.js +2 -1
  6. package/dist/Editor/Elements/AI/VoiceToText/AudioWave.js +73 -0
  7. package/dist/Editor/Elements/AI/VoiceToText/index.js +167 -0
  8. package/dist/Editor/Elements/AI/VoiceToText/style.js +40 -0
  9. package/dist/Editor/Elements/Accordion/Accordion.js +74 -7
  10. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +3 -2
  11. package/dist/Editor/Elements/Accordion/AccordionSummary.js +4 -60
  12. package/dist/Editor/Elements/AppHeader/AppHeader.js +26 -4
  13. package/dist/Editor/Elements/Button/EditorButton.js +28 -16
  14. package/dist/Editor/Elements/Color Picker/ColorButtons.js +60 -17
  15. package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
  16. package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
  17. package/dist/Editor/Elements/Color Picker/Styles.js +2 -1
  18. package/dist/Editor/Elements/Embed/Image.js +28 -20
  19. package/dist/Editor/Elements/Embed/Video.js +15 -11
  20. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -1
  21. package/dist/Editor/Elements/Grid/Grid.js +2 -0
  22. package/dist/Editor/Elements/Grid/GridItem.js +3 -1
  23. package/dist/Editor/Elements/Link/Link.js +6 -1
  24. package/dist/Editor/Elements/Link/LinkButton.js +4 -2
  25. package/dist/Editor/Elements/Link/LinkPopup.js +11 -3
  26. package/dist/Editor/Elements/Link/LinkPopupStyles.js +28 -0
  27. package/dist/Editor/Elements/Table/Table.js +1 -1
  28. package/dist/Editor/Elements/Table/TableCell.js +1 -1
  29. package/dist/Editor/MiniEditor.js +3 -1
  30. package/dist/Editor/Toolbar/Basic/index.js +4 -2
  31. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +26 -2
  32. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  33. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -11
  34. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +4 -11
  35. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +213 -86
  36. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +2 -1
  37. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +20 -13
  38. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +52 -7
  39. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +438 -0
  40. package/dist/Editor/Toolbar/PopupTool/index.js +6 -5
  41. package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
  42. package/dist/Editor/assets/svg/AIIcons.js +153 -1
  43. package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
  44. package/dist/Editor/common/ColorPickerButton.js +25 -9
  45. package/dist/Editor/common/CustomColorPicker/index.js +106 -0
  46. package/dist/Editor/common/CustomColorPicker/style.js +53 -0
  47. package/dist/Editor/common/CustomDialog/index.js +94 -0
  48. package/dist/Editor/common/CustomDialog/style.js +67 -0
  49. package/dist/Editor/common/CustomSelect.js +33 -0
  50. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  51. package/dist/Editor/common/EditorCmds.js +35 -0
  52. package/dist/Editor/common/Icon.js +30 -2
  53. package/dist/Editor/common/LinkSettings/NavComponents.js +5 -2
  54. package/dist/Editor/common/LinkSettings/index.js +2 -1
  55. package/dist/Editor/common/LinkSettings/navOptions.js +7 -2
  56. package/dist/Editor/common/MentionsPopup/Styles.js +5 -2
  57. package/dist/Editor/common/Shorthands/elements.js +54 -0
  58. package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +7 -7
  59. package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +16 -16
  60. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -2
  61. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +13 -3
  62. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -7
  63. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +1 -1
  64. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +31 -7
  65. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +13 -4
  66. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +14 -4
  67. package/dist/Editor/common/StyleBuilder/index.js +1 -1
  68. package/dist/Editor/helper/theme.js +190 -4
  69. package/dist/Editor/hooks/useEditorTheme.js +139 -0
  70. package/dist/Editor/hooks/useMouseMove.js +4 -2
  71. package/dist/Editor/plugins/withEmbeds.js +1 -1
  72. package/dist/Editor/plugins/withHTML.js +47 -5
  73. package/dist/Editor/plugins/withLayout.js +15 -10
  74. package/dist/Editor/plugins/withTable.js +2 -2
  75. package/dist/Editor/theme/ThemeList.js +50 -173
  76. package/dist/Editor/theme/index.js +144 -0
  77. package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
  78. package/dist/Editor/themeSettings/buttons/index.js +290 -0
  79. package/dist/Editor/themeSettings/buttons/style.js +21 -0
  80. package/dist/Editor/themeSettings/colorTheme/index.js +290 -0
  81. package/dist/Editor/themeSettings/colorTheme/style.js +77 -0
  82. package/dist/Editor/themeSettings/fonts/PreviewElement.js +123 -0
  83. package/dist/Editor/themeSettings/fonts/index.js +213 -0
  84. package/dist/Editor/themeSettings/fonts/style.js +44 -0
  85. package/dist/Editor/themeSettings/icons.js +60 -0
  86. package/dist/Editor/themeSettings/index.js +320 -0
  87. package/dist/Editor/themeSettings/style.js +152 -0
  88. package/dist/Editor/themeSettingsAI/icons.js +96 -0
  89. package/dist/Editor/themeSettingsAI/index.js +356 -0
  90. package/dist/Editor/themeSettingsAI/saveTheme.js +190 -0
  91. package/dist/Editor/themeSettingsAI/style.js +247 -0
  92. package/dist/Editor/utils/SlateUtilityFunctions.js +157 -25
  93. package/dist/Editor/utils/button.js +1 -17
  94. package/dist/Editor/utils/events.js +11 -4
  95. package/dist/Editor/utils/font.js +40 -37
  96. package/dist/Editor/utils/helper.js +73 -13
  97. package/package.json +2 -1
@@ -0,0 +1,53 @@
1
+ const styles = () => ({
2
+ customColorPickerContainer: {
3
+ background: "white",
4
+ width: "300px",
5
+ "& .popup_tabs": {
6
+ boxShadow: "none"
7
+ },
8
+ ".customColorPickerWrapper": {
9
+ padding: "10px 0px",
10
+ margin: "0px 16px",
11
+ borderTop: "1px solid #DCE4EC"
12
+ },
13
+ ".colorTitleWrapper": {
14
+ display: "flex",
15
+ justifyContent: "space-between",
16
+ alignItems: "center",
17
+ paddingBottom: "10px",
18
+ ".MuiTypography-root": {
19
+ fontWeight: "600"
20
+ },
21
+ ".editBtn": {
22
+ textTransform: "none",
23
+ color: "#2563EB",
24
+ textDecoration: "underline",
25
+ padding: "0px",
26
+ minWidth: "unset"
27
+ }
28
+ },
29
+ ".colorPickerBtnContainer": {
30
+ display: "flex",
31
+ flexWrap: "wrap",
32
+ gap: "10px"
33
+ },
34
+ ".colorPicketBtn": {
35
+ width: "26px",
36
+ height: "26px",
37
+ outline: "none",
38
+ borderRadius: "50%",
39
+ cursor: "pointer",
40
+ border: "1.5px solid #DCE4EC"
41
+ },
42
+ ".colorPicketBtnActive": {
43
+ borderRadius: "50%",
44
+ padding: "1px",
45
+ border: "1.5px solid rgb(83, 83, 249)",
46
+ width: "fit-content",
47
+ height: "fit-content",
48
+ display: "flex",
49
+ justifyContent: "center"
50
+ }
51
+ }
52
+ });
53
+ export default styles;
@@ -0,0 +1,94 @@
1
+ import Dialog from "@mui/material/Dialog";
2
+ import DialogTitle from "@mui/material/DialogTitle";
3
+ import DialogContent from "@mui/material/DialogContent";
4
+ import DialogActions from "@mui/material/DialogActions";
5
+ import IconButton from "@mui/material/IconButton";
6
+ import CloseIcon from "@mui/icons-material/Close";
7
+ import { Box, Typography, Button } from "@mui/material";
8
+ import SwipeableDrawer from "../SwipeableDrawer";
9
+ import customDialogStyles from "./style";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ import { Fragment as _Fragment } from "react/jsx-runtime";
13
+ function CustomDialog(props) {
14
+ const {
15
+ handleClose,
16
+ customProps,
17
+ children,
18
+ onSubmit
19
+ } = props;
20
+ const {
21
+ isMobile
22
+ } = customProps;
23
+ const classes = customDialogStyles();
24
+ if (isMobile) {
25
+ return /*#__PURE__*/_jsx(Box, {
26
+ sx: classes.dialogContainer,
27
+ children: /*#__PURE__*/_jsxs(SwipeableDrawer, {
28
+ onClose: handleClose,
29
+ children: [/*#__PURE__*/_jsx(Typography, {
30
+ variant: "subtitle1",
31
+ gutterBottom: true,
32
+ sx: {
33
+ fontWeight: 600
34
+ },
35
+ children: "What do you want to link to?"
36
+ }), /*#__PURE__*/_jsx(Box, {
37
+ sx: classes.mobileDialogContent,
38
+ children: children
39
+ }), /*#__PURE__*/_jsx(Box, {
40
+ component: "div",
41
+ sx: classes.mobileActionBtns,
42
+ children: /*#__PURE__*/_jsx(ActionsButtons, {
43
+ classes: classes,
44
+ onCancel: handleClose,
45
+ onSave: onSubmit
46
+ })
47
+ })]
48
+ })
49
+ });
50
+ } else {
51
+ return /*#__PURE__*/_jsxs(Dialog, {
52
+ onClose: handleClose,
53
+ open: true,
54
+ sx: classes.dialogContainer,
55
+ fullWidth: true,
56
+ maxWidth: "sm",
57
+ children: [/*#__PURE__*/_jsx(DialogTitle, {
58
+ children: "What do you want to link to?"
59
+ }), /*#__PURE__*/_jsx(IconButton, {
60
+ "aria-label": "close",
61
+ onClick: handleClose,
62
+ sx: classes.closeIcon,
63
+ children: /*#__PURE__*/_jsx(CloseIcon, {})
64
+ }), /*#__PURE__*/_jsx(DialogContent, {
65
+ dividers: true,
66
+ children: children
67
+ }), /*#__PURE__*/_jsx(DialogActions, {
68
+ children: /*#__PURE__*/_jsx(ActionsButtons, {
69
+ classes: classes,
70
+ onCancel: handleClose,
71
+ onSave: onSubmit
72
+ })
73
+ })]
74
+ });
75
+ }
76
+ }
77
+ export default CustomDialog;
78
+ function ActionsButtons({
79
+ classes,
80
+ onCancel,
81
+ onSave
82
+ }) {
83
+ return /*#__PURE__*/_jsxs(_Fragment, {
84
+ children: [/*#__PURE__*/_jsx(Button, {
85
+ onClick: onCancel,
86
+ sx: classes.closeBtn,
87
+ children: "Cancel"
88
+ }), /*#__PURE__*/_jsx(Button, {
89
+ onClick: onSave,
90
+ sx: classes.saveBtn,
91
+ children: "Save"
92
+ })]
93
+ });
94
+ }
@@ -0,0 +1,67 @@
1
+ const styles = () => ({
2
+ dialogContainer: {
3
+ "& .MuiDialogContent-root": {
4
+ padding: "0px 20px"
5
+ },
6
+ "& .MuiDialogActions-root": {
7
+ padding: "10px"
8
+ },
9
+ "& .MuiTypography-h6": {
10
+ fontWeight: 600,
11
+ fontSize: "16px",
12
+ paddingRight: "20px"
13
+ },
14
+ "& .MuiGrid-container": {
15
+ marginTop: "0px"
16
+ },
17
+ "& .MuiGrid-item": {
18
+ padding: "14px"
19
+ }
20
+ },
21
+ saveBtn: {
22
+ color: "#fff",
23
+ background: "#2563EB",
24
+ fontSize: "14px",
25
+ fontWeight: 500,
26
+ padding: "4px 24px",
27
+ textTransform: "none",
28
+ "&:hover": {
29
+ color: "#fff",
30
+ background: "#2563EB"
31
+ }
32
+ },
33
+ closeBtn: {
34
+ backgroundColor: "#F4F6F9",
35
+ color: "#64748B",
36
+ fontSize: "14px",
37
+ fontWeight: 500,
38
+ padding: "4px 22px",
39
+ textTransform: "none",
40
+ border: "1px solid #D8DDE1",
41
+ "&:hover": {
42
+ border: "1px solid #64748B"
43
+ }
44
+ },
45
+ closeIcon: {
46
+ position: "absolute",
47
+ right: 8,
48
+ top: 8,
49
+ color: theme => theme.palette.grey[500]
50
+ },
51
+ gridDivider: {
52
+ borderRight: "1px solid rgba(0, 0, 0, 0.12)"
53
+ },
54
+ mobileActionBtns: {
55
+ display: "flex",
56
+ justifyContent: "flex-end",
57
+ gap: "8px",
58
+ paddingTop: "14px",
59
+ marginTop: "14px",
60
+ borderTop: theme => `1px solid ${theme.palette.grey[300]}`
61
+ },
62
+ mobileDialogContent: {
63
+ borderTop: theme => `1px solid ${theme.palette.grey[300]}`,
64
+ paddingTop: "14px"
65
+ }
66
+ });
67
+ export default styles;
@@ -0,0 +1,33 @@
1
+ import { MenuItem, Select } from "@mui/material";
2
+ import { fontFamilyMap } from "../utils/font";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ function CustomSelect(props) {
5
+ const {
6
+ onChange,
7
+ options = [],
8
+ value
9
+ } = props;
10
+ return /*#__PURE__*/_jsx(Select, {
11
+ fullWidth: true,
12
+ value: value,
13
+ onChange: onChange,
14
+ className: "editor-dd",
15
+ style: {
16
+ fontFamily: fontFamilyMap[value],
17
+ width: "100%",
18
+ height: "36px",
19
+ borderRadius: "10px",
20
+ fontSize: "14px"
21
+ },
22
+ children: options.map((option, i) => {
23
+ return /*#__PURE__*/_jsx(MenuItem, {
24
+ value: option.value,
25
+ style: {
26
+ fontFamily: option.text
27
+ },
28
+ children: option?.label || option?.text
29
+ }, i);
30
+ })
31
+ });
32
+ }
33
+ export default CustomSelect;
@@ -7,7 +7,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import { Transforms } from "slate";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "grid"];
10
+ const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "headingFour", "headingFive", "headingSix", "paragraphOne", "paragraphTwo", "paragraphThree", "grid"];
11
11
  const DragHandleStyle = () => ({
12
12
  dragHandle: {
13
13
  opacity: 0,
@@ -0,0 +1,35 @@
1
+ import { Editor, Transforms } from "slate";
2
+ const selectAll = (event, {
3
+ editor,
4
+ needLayout
5
+ }) => {
6
+ try {
7
+ if (needLayout) {
8
+ event.preventDefault();
9
+ // Select the entire document
10
+ const {
11
+ selection
12
+ } = editor;
13
+ const [firstNode] = Editor.nodes(editor, {
14
+ at: [0]
15
+ }); // First node
16
+ const [lastNode] = Editor.nodes(editor, {
17
+ at: [editor.children.length - 1]
18
+ }); // Last node
19
+
20
+ if (firstNode && lastNode) {
21
+ Transforms.select(editor, {
22
+ anchor: Editor.start(editor, [0]),
23
+ // Start at the first node
24
+ focus: Editor.end(editor, [editor.children.length - 1]) // End at the last node
25
+ });
26
+ }
27
+ }
28
+ } catch (err) {
29
+ console.log(err);
30
+ }
31
+ };
32
+ const EDITORCMDS = {
33
+ a: selectAll
34
+ };
35
+ export default EDITORCMDS;
@@ -10,10 +10,20 @@ import { IoIosImage } from "react-icons/io";
10
10
  import { GridIcon, AccordionIcon, SignatureIcon, ButtonIcon, Carousal, FormIcon, BoldIcon, FontFamilyIcon, FontSizeIcon, ImageIcon, ItalicIcon, LinkIcon, StrikethroughIcon, TableIcon, UnderLineIcon, VideoIcon, CheckboxIcon, AppHeader, MoreHorizontal, UploadImage, DocsUpload, LeftArrow, RightArrow, CheckListButton, CheckListButtonActive, ExcelIcon, CsvIcon, DividerIcon, CloseIcon, SearchIcon, ExpandIcon, CalendarIconNew, Text, TextAreaIcon, Phone, BriefCase, Bank, CalendarTick, DollarSquare, Checkbox, Description, RadioButtonIcon, CheckedIcon, UncheckedIcon, InfinityIcon, ResetIcon } from "./iconslist";
11
11
  import ArrowRightIcon from "@mui/icons-material/ArrowRight";
12
12
  import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
13
- import EmailRoundedIcon from '@mui/icons-material/EmailRounded';
14
- import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
13
+ import EmailRoundedIcon from "@mui/icons-material/EmailRounded";
14
+ import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ const HeadingIcon = ({
18
+ variant
19
+ }) => {
20
+ return /*#__PURE__*/_jsx("div", {
21
+ style: {
22
+ color: "#64748B"
23
+ },
24
+ children: variant
25
+ });
26
+ };
17
27
  const iconList = {
18
28
  fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
19
29
  size: 20
@@ -49,6 +59,24 @@ const iconList = {
49
59
  size: 18,
50
60
  fill: "#64748B"
51
61
  }),
62
+ headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
63
+ variant: "H4"
64
+ }),
65
+ headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
66
+ variant: "H5"
67
+ }),
68
+ headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
69
+ variant: "H6"
70
+ }),
71
+ paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
72
+ variant: "P1"
73
+ }),
74
+ paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
75
+ variant: "P2"
76
+ }),
77
+ paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
78
+ variant: "P3"
79
+ }),
52
80
  blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
53
81
  size: 20,
54
82
  fill: "#64748B"
@@ -134,10 +134,13 @@ export const SelectPage = props => {
134
134
  });
135
135
  };
136
136
  export const Trigger = props => {
137
- return /*#__PURE__*/_jsx(Typography, {
137
+ const {
138
+ nav
139
+ } = props;
140
+ return /*#__PURE__*/_jsxs(Typography, {
138
141
  variant: "subtitle1",
139
142
  gutterBottom: true,
140
- children: "Choosing this will trigger the next step"
143
+ children: ["Choosing this will trigger the ", nav.type, " step"]
141
144
  });
142
145
  };
143
146
  const scrollToOptions = [{
@@ -18,7 +18,8 @@ const MAP_COMPONENT = {
18
18
  webAddress: TextInput,
19
19
  email: TextInput,
20
20
  phone: TextInput,
21
- actionTrigger: Trigger,
21
+ nextTrigger: Trigger,
22
+ prevTrigger: Trigger,
22
23
  scrollTopOrBottom: ScrollTopBottom,
23
24
  page: SelectPage
24
25
  };
@@ -3,8 +3,13 @@ export const getNavOptions = (hideTools = []) => {
3
3
  label: "None",
4
4
  value: ""
5
5
  }, {
6
- label: "Trigger",
7
- value: "actionTrigger"
6
+ label: "Next Trigger",
7
+ value: "nextTrigger",
8
+ type: "next"
9
+ }, {
10
+ label: "Previous Trigger",
11
+ value: "prevTrigger",
12
+ type: "previous"
8
13
  }, {
9
14
  label: "Web Address",
10
15
  value: "webAddress",
@@ -39,10 +39,13 @@ const usePopupStyles = theme => ({
39
39
  color: theme?.palette?.editor?.textColor
40
40
  },
41
41
  "&.active": {
42
- background: `${theme?.palette?.containers?.bg3 || "#E9F3FE"}`
42
+ background: `#2563EB2B`,
43
+ "& .MuiTypography-root": {
44
+ color: `${theme?.palette?.editor?.activeColor} !important`
45
+ }
43
46
  },
44
47
  "&:hover": {
45
- background: `${theme?.palette?.containers?.bg3 || "#E9F3FE"}`
48
+ background: theme?.palette?.action?.hover || `#F4F4F4`
46
49
  },
47
50
  "&.renderComp": {
48
51
  padding: "0px",
@@ -40,6 +40,60 @@ const ELEMENTS_LIST = [{
40
40
  icon: "headingThree"
41
41
  }),
42
42
  onInsert: editor => toggleBlock(editor, "headingThree", false)
43
+ }, {
44
+ name: "Heading 4",
45
+ desc: "",
46
+ group: "Text",
47
+ type: "headingFour",
48
+ icon: /*#__PURE__*/_jsx(Icon, {
49
+ icon: "headingFour"
50
+ }),
51
+ onInsert: editor => toggleBlock(editor, "headingFour", false)
52
+ }, {
53
+ name: "Heading 5",
54
+ desc: "",
55
+ group: "Text",
56
+ type: "headingFive",
57
+ icon: /*#__PURE__*/_jsx(Icon, {
58
+ icon: "headingFive"
59
+ }),
60
+ onInsert: editor => toggleBlock(editor, "headingFive", false)
61
+ }, {
62
+ name: "Heading 6",
63
+ desc: "",
64
+ group: "Text",
65
+ type: "headingSix",
66
+ icon: /*#__PURE__*/_jsx(Icon, {
67
+ icon: "headingSix"
68
+ }),
69
+ onInsert: editor => toggleBlock(editor, "headingSix", false)
70
+ }, {
71
+ name: "Paragraph 1",
72
+ desc: "",
73
+ group: "Text",
74
+ type: "paragraphOne",
75
+ icon: /*#__PURE__*/_jsx(Icon, {
76
+ icon: "paragraphOne"
77
+ }),
78
+ onInsert: editor => toggleBlock(editor, "paragraphOne", false)
79
+ }, {
80
+ name: "Paragraph 2",
81
+ desc: "",
82
+ group: "Text",
83
+ type: "paragraphTwo",
84
+ icon: /*#__PURE__*/_jsx(Icon, {
85
+ icon: "paragraphTwo"
86
+ }),
87
+ onInsert: editor => toggleBlock(editor, "paragraphTwo", false)
88
+ }, {
89
+ name: "Paragraph 3",
90
+ desc: "",
91
+ group: "Text",
92
+ type: "paragraphThree",
93
+ icon: /*#__PURE__*/_jsx(Icon, {
94
+ icon: "paragraphThree"
95
+ }),
96
+ onInsert: editor => toggleBlock(editor, "paragraphThree", false)
43
97
  }, {
44
98
  name: "Quote",
45
99
  desc: "",
@@ -1,18 +1,18 @@
1
1
  const accordionTitleBtnStyle = [{
2
2
  tab: "Colors",
3
- value: "colors",
3
+ value: "accordionColor",
4
4
  fields: [{
5
- label: "Text Color",
6
- key: "textColor",
5
+ label: "Accordion Color",
6
+ key: "accordionTextColor",
7
7
  type: "color",
8
8
  needPreview: true
9
9
  }, {
10
- label: "Background Color",
11
- key: "bgColor",
10
+ label: "Accordion Background Color",
11
+ key: "accordionBgColor",
12
12
  type: "color"
13
13
  }, {
14
- label: "Border Color",
15
- key: "borderColor",
14
+ label: "Accordion Border Color",
15
+ key: "accordionBorderColor",
16
16
  type: "color"
17
17
  }]
18
18
  }];
@@ -1,20 +1,4 @@
1
1
  const accordionTitleStyle = [{
2
- tab: "Banner Spacing",
3
- value: "bannerSpacing",
4
- fields: [{
5
- label: "Banner Spacing",
6
- key: "bannerSpacing",
7
- type: "bannerSpacing"
8
- }]
9
- }, {
10
- tab: "Border Radius",
11
- value: "borderRadius",
12
- fields: [{
13
- label: "Border Radius",
14
- key: "borderRadius",
15
- type: "borderRadius"
16
- }]
17
- }, {
18
2
  tab: "Colors",
19
3
  value: "colors",
20
4
  fields: [{
@@ -31,5 +15,21 @@ const accordionTitleStyle = [{
31
15
  key: "borderColor",
32
16
  type: "color"
33
17
  }]
18
+ }, {
19
+ tab: "Banner Spacing",
20
+ value: "bannerSpacing",
21
+ fields: [{
22
+ label: "Banner Spacing",
23
+ key: "bannerSpacing",
24
+ type: "bannerSpacing"
25
+ }]
26
+ }, {
27
+ tab: "Border Radius",
28
+ value: "borderRadius",
29
+ fields: [{
30
+ label: "Border Radius",
31
+ key: "borderRadius",
32
+ type: "borderRadius"
33
+ }]
34
34
  }];
35
35
  export default accordionTitleStyle;
@@ -20,7 +20,8 @@ const buttonStyle = [{
20
20
  },
21
21
  children: option.text
22
22
  });
23
- }
23
+ },
24
+ themeEnabled: true
24
25
  }, {
25
26
  label: "Font Size",
26
27
  key: "textSize",
@@ -44,7 +45,8 @@ const buttonStyle = [{
44
45
  }, {
45
46
  label: "Button Color",
46
47
  key: "bgColor",
47
- type: "color"
48
+ type: "color",
49
+ themeEnabled: true
48
50
  }, {
49
51
  label: "Border Color",
50
52
  key: "borderColor",
@@ -3,12 +3,12 @@ import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box } from "@mui/
3
3
  import { squreStyle } from "./radiusStyle";
4
4
  import { getBreakPointsValue } from "../../../helper/theme";
5
5
  import useWindowResize from "../../../hooks/useWindowResize";
6
+ import { useEditorTheme } from "../../../hooks/useEditorTheme";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const BANNER_SPACING_KEYS = ["top", "left", "right", "bottom"];
9
10
  const BannerSpacing = props => {
10
11
  const {
11
- value: val,
12
12
  data,
13
13
  onChange,
14
14
  elementProps,
@@ -18,11 +18,21 @@ const BannerSpacing = props => {
18
18
  key
19
19
  } = data;
20
20
  const lockKeyVal = `lock${key}`;
21
- let lockSpacing = elementProps[lockKeyVal];
21
+ const [size] = useWindowResize();
22
+ const {
23
+ selectedTheme
24
+ } = useEditorTheme();
25
+ const {
26
+ bannerSpacing,
27
+ lockbannerSpacing
28
+ } = selectedTheme?.elementProps?.button || {};
29
+ const isUserValue = Object.keys(props?.value || {})?.length;
30
+ const isUserLockedSpacing = typeof elementProps[lockKeyVal] === "boolean";
31
+ const val = isUserValue ? props?.value : bannerSpacing;
32
+ let lockSpacing = isUserLockedSpacing ? elementProps[lockKeyVal] : lockbannerSpacing;
22
33
  if (lockSpacing === undefined) {
23
34
  lockSpacing = true;
24
35
  }
25
- const [size] = useWindowResize();
26
36
  const value = getBreakPointsValue(val, size?.device);
27
37
  const handleChange = e => {
28
38
  let changeAll = {};
@@ -3,27 +3,35 @@ import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box } from "@mui/
3
3
  import { radiusStyle } from "./radiusStyle";
4
4
  import useWindowResize from "../../../hooks/useWindowResize";
5
5
  import { getBreakPointsValue } from "../../../helper/theme";
6
+ import { useEditorTheme } from "../../../hooks/useEditorTheme";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const BORDER_RADIUS_KEYS = ["topLeft", "topRight", "bottomLeft", "bottomRight"];
9
10
  const BorderRadius = props => {
10
11
  const {
11
- value: val,
12
12
  data,
13
13
  onChange,
14
14
  elementProps,
15
15
  classes
16
16
  } = props;
17
- let {
18
- lockRadius
19
- } = elementProps;
20
- if (lockRadius === undefined) {
21
- lockRadius = true;
22
- }
23
17
  const {
24
18
  key
25
19
  } = data;
26
20
  const [size] = useWindowResize();
21
+ const {
22
+ selectedTheme
23
+ } = useEditorTheme();
24
+ const {
25
+ borderRadius,
26
+ lockRadius: themeLockRadius
27
+ } = selectedTheme?.elementProps?.button || {};
28
+ const isUserValue = Object.keys(props?.value || {})?.length;
29
+ const isUserLockedRadius = typeof elementProps?.lockRadius === "boolean";
30
+ const val = isUserValue ? props?.value : borderRadius;
31
+ let lockRadius = isUserLockedRadius ? elementProps?.lockRadius : themeLockRadius;
32
+ if (lockRadius === undefined) {
33
+ lockRadius = true;
34
+ }
27
35
  const value = getBreakPointsValue(val, size?.device);
28
36
  const handleChange = e => {
29
37
  let changeAll = {};
@@ -59,7 +59,7 @@ const ButtonLink = props => {
59
59
  value: elementProps?.url
60
60
  })
61
61
  });
62
- } else if (value?.linkType === "actionTrigger") {
62
+ } else if (value?.linkType === "prevTrigger" || value?.linkType === "nextTrigger") {
63
63
  return null;
64
64
  }
65
65
  };