@flozy/editor 10.1.0 → 10.1.2

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 (146) hide show
  1. package/dist/Editor/ChatEditor.js +17 -16
  2. package/dist/Editor/CommonEditor.js +115 -15
  3. package/dist/Editor/DialogWrapper.js +31 -25
  4. package/dist/Editor/Editor.css +16 -8
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +11 -3
  6. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  7. package/dist/Editor/Elements/Button/EditorButton.js +25 -9
  8. package/dist/Editor/Elements/Color Picker/ColorButtons.js +61 -14
  9. package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
  10. package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
  11. package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
  12. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -2
  13. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +454 -0
  14. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +21 -6
  15. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +5 -1
  16. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +3 -2
  17. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +11 -0
  18. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
  19. package/dist/Editor/Elements/Embed/Image.js +3 -2
  20. package/dist/Editor/Elements/Embed/Video.js +1 -1
  21. package/dist/Editor/Elements/EmbedScript/Code.js +14 -2
  22. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +57 -28
  23. package/dist/Editor/Elements/EmbedScript/styles.js +89 -0
  24. package/dist/Editor/Elements/Form/Form.js +179 -168
  25. package/dist/Editor/Elements/Form/FormField.js +10 -4
  26. package/dist/Editor/Elements/Form/Workflow/Styles.js +24 -22
  27. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +6 -24
  28. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +7 -4
  29. package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
  30. package/dist/Editor/Elements/FreeGrid/styles.js +67 -7
  31. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  32. package/dist/Editor/Elements/List/CheckList.js +4 -1
  33. package/dist/Editor/Elements/Search/SearchAttachment.js +40 -9
  34. package/dist/Editor/Elements/Search/SearchButton.js +9 -8
  35. package/dist/Editor/Elements/Search/SearchList.js +9 -7
  36. package/dist/Editor/Elements/SimpleText/index.js +6 -1
  37. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  38. package/dist/Editor/Elements/Table/Table.js +3 -3
  39. package/dist/Editor/Elements/Title/title.js +6 -6
  40. package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
  41. package/dist/Editor/MiniEditor.js +2 -1
  42. package/dist/Editor/Styles/EditorStyles.js +5 -5
  43. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
  44. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
  45. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  46. package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
  47. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -1
  48. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +4 -2
  49. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
  50. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +167 -42
  51. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +7 -4
  52. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +2 -1
  53. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +72 -12
  54. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +100 -27
  55. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +439 -0
  56. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  57. package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
  58. package/dist/Editor/assets/svg/BackIcon.js +18 -0
  59. package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
  60. package/dist/Editor/assets/svg/ResetIconNew.js +23 -0
  61. package/dist/Editor/assets/svg/SettingsIcon.js +1 -0
  62. package/dist/Editor/assets/svg/ThemeIcons.js +293 -0
  63. package/dist/Editor/common/ColorPickerButton.js +38 -16
  64. package/dist/Editor/common/CustomColorPicker/index.js +130 -0
  65. package/dist/Editor/common/CustomColorPicker/style.js +53 -0
  66. package/dist/Editor/common/CustomDialog2/index.js +94 -0
  67. package/dist/Editor/common/CustomDialog2/style.js +67 -0
  68. package/dist/Editor/common/CustomSelect.js +43 -0
  69. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  70. package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
  71. package/dist/Editor/common/Icon.js +31 -1
  72. package/dist/Editor/common/ImageSelector/Styles.js +3 -9
  73. package/dist/Editor/common/LinkSettings/NavComponents.js +34 -8
  74. package/dist/Editor/common/LinkSettings/index.js +84 -68
  75. package/dist/Editor/common/LinkSettings/style.js +245 -30
  76. package/dist/Editor/common/RnD/ElementOptions/Actions.js +13 -14
  77. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +1 -0
  78. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  79. package/dist/Editor/common/RnD/ElementOptions/styles.js +28 -1
  80. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +6 -5
  81. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
  82. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
  83. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
  84. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
  85. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -2
  86. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
  87. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
  88. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +3 -1
  89. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
  90. package/dist/Editor/common/RnD/ElementSettings/styles.js +147 -12
  91. package/dist/Editor/common/RnD/OptionsPopup/index.js +8 -5
  92. package/dist/Editor/common/RnD/OptionsPopup/style.js +121 -19
  93. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +8 -5
  94. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
  95. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
  96. package/dist/Editor/common/RnD/Utils/gridDropItem.js +1 -2
  97. package/dist/Editor/common/RnD/index.js +5 -6
  98. package/dist/Editor/common/Select/index.js +2 -0
  99. package/dist/Editor/common/Shorthands/elements.js +54 -0
  100. package/dist/Editor/common/SnackBar/index.js +43 -0
  101. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -2
  102. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -0
  103. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +12 -2
  104. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -7
  105. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +16 -8
  106. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +36 -10
  107. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +16 -7
  108. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +7 -6
  109. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +13 -6
  110. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +15 -7
  111. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
  112. package/dist/Editor/common/Uploader.js +8 -0
  113. package/dist/Editor/common/iconListV2.js +101 -6
  114. package/dist/Editor/common/iconslist.js +24 -0
  115. package/dist/Editor/commonStyle.js +174 -61
  116. package/dist/Editor/helper/textIndeces.js +58 -0
  117. package/dist/Editor/helper/theme.js +203 -2
  118. package/dist/Editor/hooks/useEditorTheme.js +153 -0
  119. package/dist/Editor/hooks/useMouseMove.js +8 -5
  120. package/dist/Editor/hooks/useThemeValues.js +63 -0
  121. package/dist/Editor/plugins/withEmbeds.js +1 -1
  122. package/dist/Editor/plugins/withHTML.js +3 -1
  123. package/dist/Editor/plugins/withTable.js +1 -1
  124. package/dist/Editor/theme/ThemeList.js +50 -173
  125. package/dist/Editor/theme/index.js +149 -0
  126. package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
  127. package/dist/Editor/themeSettings/buttons/index.js +290 -0
  128. package/dist/Editor/themeSettings/buttons/style.js +23 -0
  129. package/dist/Editor/themeSettings/colorTheme/index.js +309 -0
  130. package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
  131. package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
  132. package/dist/Editor/themeSettings/fonts/index.js +240 -0
  133. package/dist/Editor/themeSettings/fonts/style.js +62 -0
  134. package/dist/Editor/themeSettings/icons.js +60 -0
  135. package/dist/Editor/themeSettings/index.js +361 -0
  136. package/dist/Editor/themeSettings/style.js +292 -0
  137. package/dist/Editor/themeSettingsAI/icons.js +96 -0
  138. package/dist/Editor/themeSettingsAI/index.js +355 -0
  139. package/dist/Editor/themeSettingsAI/saveTheme.js +202 -0
  140. package/dist/Editor/themeSettingsAI/style.js +324 -0
  141. package/dist/Editor/utils/SlateUtilityFunctions.js +166 -43
  142. package/dist/Editor/utils/button.js +1 -17
  143. package/dist/Editor/utils/draftToSlate.js +3 -2
  144. package/dist/Editor/utils/font.js +40 -37
  145. package/dist/Editor/utils/helper.js +90 -19
  146. package/package.json +4 -4
@@ -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,43 @@
1
+ import { MenuItem, Select } from "@mui/material";
2
+ import { fontFamilyMap } from "../utils/font";
3
+ import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ function CustomSelect(props) {
6
+ const {
7
+ classes,
8
+ onChange,
9
+ options = [],
10
+ value
11
+ } = props;
12
+ return /*#__PURE__*/_jsx(Select, {
13
+ fullWidth: true,
14
+ value: value,
15
+ onChange: onChange,
16
+ className: "editor-dd",
17
+ style: {
18
+ fontFamily: fontFamilyMap[value],
19
+ width: "100%",
20
+ height: "36px",
21
+ borderRadius: "10px",
22
+ fontSize: "14px"
23
+ },
24
+ MenuProps: {
25
+ PaperProps: {
26
+ sx: classes?.textOptions
27
+ }
28
+ },
29
+ sx: classes.textFormatSelect,
30
+ IconComponent: KeyboardArrowDownRoundedIcon,
31
+ children: options.map((option, i) => {
32
+ return /*#__PURE__*/_jsx(MenuItem, {
33
+ value: option.value,
34
+ style: {
35
+ fontFamily: option.text || "inherit"
36
+ },
37
+ sx: classes.textFormatSelectOptions,
38
+ children: option?.label || option?.text
39
+ }, i);
40
+ })
41
+ });
42
+ }
43
+ 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 = fromPopper => {
12
12
  const handleDragStyle = fromPopper ? {
13
13
  position: "absolute",
@@ -18,6 +18,8 @@ const FontLoader = props => {
18
18
  const loadFontsInBatches = (families, batchSize = 5, maxRetries = 3) => {
19
19
  let currentIndex = 0;
20
20
  let retryCount = 0;
21
+ // let hideLoaderOn = 30;
22
+
21
23
  const loadNextBatch = () => {
22
24
  try {
23
25
  if (currentIndex >= families?.length) {
@@ -78,6 +80,7 @@ const FontLoader = props => {
78
80
  // console.log(err);
79
81
  setLoading(false);
80
82
  });
83
+ // setLoading(true);
81
84
  } else {
82
85
  function correctFontArray(fontString) {
83
86
  let fontsArray = fontString?.split(",");
@@ -45,8 +45,19 @@ import TrashIcon from "../assets/svg/TrashCanIcon";
45
45
  import DataTableIcon from "../assets/svg/DataTableIcon";
46
46
  import ChervDown from "../assets/svg/ChervDown";
47
47
  import ChervUp from "../assets/svg/ChervUp";
48
+ import ResetIconNew from "../assets/svg/ResetIconNew";
48
49
  import { jsx as _jsx } from "react/jsx-runtime";
49
50
  import { jsxs as _jsxs } from "react/jsx-runtime";
51
+ const HeadingIcon = ({
52
+ variant
53
+ }) => {
54
+ return /*#__PURE__*/_jsx("div", {
55
+ style: {
56
+ color: "#64748B"
57
+ },
58
+ children: variant
59
+ });
60
+ };
50
61
  const iconList = {
51
62
  fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
52
63
  size: 20
@@ -79,6 +90,24 @@ const iconList = {
79
90
  size: 18,
80
91
  fill: "#64748B"
81
92
  }),
93
+ headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
94
+ variant: "H4"
95
+ }),
96
+ headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
97
+ variant: "H5"
98
+ }),
99
+ headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
100
+ variant: "H6"
101
+ }),
102
+ paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
103
+ variant: "P1"
104
+ }),
105
+ paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
106
+ variant: "P2"
107
+ }),
108
+ paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
109
+ variant: "P3"
110
+ }),
82
111
  blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
83
112
  size: 20,
84
113
  fill: "#64748B",
@@ -329,7 +358,8 @@ const iconList = {
329
358
  stroke: "#64748B",
330
359
  color: "#64748B"
331
360
  }
332
- })
361
+ }),
362
+ resetIconNew: /*#__PURE__*/_jsx(ResetIconNew, {})
333
363
  };
334
364
  export const icons = {
335
365
  ...iconList
@@ -76,7 +76,7 @@ const ImageSelectorStyles = theme => ({
76
76
  background: theme?.palette?.editor?.deviderBgColor,
77
77
  "@media only screen and (min-width: 899px)": {
78
78
  margin: "0px 24px",
79
- width: 'calc(100% - 48px)'
79
+ width: "calc(100% - 48px)"
80
80
  }
81
81
  },
82
82
  "& .primaryBtn": {
@@ -104,12 +104,6 @@ const ImageSelectorStyles = theme => ({
104
104
  marginRight: "8px !important"
105
105
  },
106
106
  "& .MuiGrid-root": {
107
- "&::-webkit-scrollbar-thumb": {
108
- background: `none !important`
109
- },
110
- "&::-webkit-scrollbar-track": {
111
- visibility: "hidden"
112
- },
113
107
  "&::-webkit-scrollbar-thumb": {
114
108
  background: `${theme?.palette?.editor?.brainPopupScroll} !important`
115
109
  },
@@ -118,10 +112,10 @@ const ImageSelectorStyles = theme => ({
118
112
  }
119
113
  },
120
114
  "& .MuiImageList-root": {
121
- margin: '0px'
115
+ margin: "0px"
122
116
  },
123
117
  "& .MuiDialogContent-root": {
124
- padding: '20px 24px 5px 24px'
118
+ padding: "20px 24px 5px 24px"
125
119
  }
126
120
  },
127
121
  titleTypo: {
@@ -1,7 +1,8 @@
1
- import { Autocomplete, Checkbox, FormControlLabel, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
1
+ import { Autocomplete, Checkbox, FormControlLabel, IconButton, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  import { useSlate } from "slate-react";
4
4
  import Select from "../Select";
5
+ import { CheckedBoxCheckIcon } from "../iconListV2";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  import { Fragment as _Fragment } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -31,11 +32,19 @@ const OpenInNewTab = props => {
31
32
  className: "ccheckbox-primary",
32
33
  control: /*#__PURE__*/_jsx(Checkbox, {
33
34
  checked: openInNewTab,
34
- onChange: onNewTabChange
35
+ onChange: onNewTabChange,
36
+ className: "checkBox",
37
+ checkedIcon: /*#__PURE__*/_jsx(IconButton, {
38
+ className: "checkedIcon",
39
+ children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
40
+ }),
41
+ icon: /*#__PURE__*/_jsx(IconButton, {
42
+ className: "unCheckedIcon"
43
+ })
35
44
  }),
36
45
  label: /*#__PURE__*/_jsx(Typography, {
37
46
  variant: "body2",
38
- children: translation("Open in new tab")
47
+ children: "Open in new tab"
39
48
  })
40
49
  }) : null;
41
50
  };
@@ -47,6 +56,11 @@ export const TextInput = props => {
47
56
  ...props,
48
57
  onChange: e => {
49
58
  props.onChange(e.target.value);
59
+ },
60
+ sx: {
61
+ "&::placeholder": {
62
+ color: "gray"
63
+ }
50
64
  }
51
65
  }), /*#__PURE__*/_jsx(OpenInNewTab, {
52
66
  ...props
@@ -58,7 +72,8 @@ export const SelectPage = props => {
58
72
  value,
59
73
  onChange,
60
74
  services,
61
- translation
75
+ translation,
76
+ classes
62
77
  } = props;
63
78
  const [pages, setPages] = useState([]);
64
79
  const editor = useSlate();
@@ -116,7 +131,8 @@ export const SelectPage = props => {
116
131
  setValue: val => onChange(val?.value || ""),
117
132
  placeholder: translation("Select Page"),
118
133
  options: pages,
119
- disabled: isCurrentPage
134
+ disabled: isCurrentPage,
135
+ classes: classes
120
136
  }), /*#__PURE__*/_jsx(FreeSoloCreateOption, {
121
137
  label: section?.label,
122
138
  setValue: val => {
@@ -130,7 +146,8 @@ export const SelectPage = props => {
130
146
  options: page?.sections?.map(p => ({
131
147
  label: p,
132
148
  value: p
133
- }))
149
+ })),
150
+ classes: classes
134
151
  }), isCurrentPage ? null : /*#__PURE__*/_jsx(OpenInNewTab, {
135
152
  ...props
136
153
  })]
@@ -144,6 +161,7 @@ export const Trigger = props => {
144
161
  return /*#__PURE__*/_jsx(Typography, {
145
162
  variant: "subtitle1",
146
163
  gutterBottom: true,
164
+ className: "trigger-text",
147
165
  children: `${translation("Choosing this will trigger the")} ${translation(nav.type)} ${translation("step")}`
148
166
  });
149
167
  };
@@ -194,7 +212,8 @@ export function FreeSoloCreateOption({
194
212
  setValue,
195
213
  options = [],
196
214
  placeholder = "",
197
- disabled = false
215
+ disabled = false,
216
+ classes
198
217
  }) {
199
218
  return /*#__PURE__*/_jsx(Autocomplete, {
200
219
  freeSolo: true,
@@ -260,6 +279,13 @@ export function FreeSoloCreateOption({
260
279
  sx: {
261
280
  marginTop: "10px"
262
281
  },
263
- disabled: disabled
282
+ disabled: disabled,
283
+ slotProps: {
284
+ popper: {
285
+ sx: {
286
+ ...classes.customAutoComplete
287
+ }
288
+ }
289
+ }
264
290
  });
265
291
  }
@@ -4,8 +4,8 @@ import DialogTitle from "@mui/material/DialogTitle";
4
4
  import DialogContent from "@mui/material/DialogContent";
5
5
  import DialogActions from "@mui/material/DialogActions";
6
6
  import IconButton from "@mui/material/IconButton";
7
- import CloseIcon from "@mui/icons-material/Close";
8
- import { Box, FormControl, FormControlLabel, Grid, MenuItem, Radio, RadioGroup, Typography } from "@mui/material";
7
+ import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
8
+ import { Box, FormControl, FormControlLabel, Grid, MenuItem, Radio, RadioGroup, Typography, useMediaQuery } from "@mui/material";
9
9
  import { useState } from "react";
10
10
  import LinkSettingsStyles from "./style";
11
11
  import { getNavOptions } from "./navOptions";
@@ -43,10 +43,10 @@ export default function LinkSettings(props) {
43
43
  allowTrigger
44
44
  } = props;
45
45
  const {
46
- isMobile,
47
46
  tagName,
48
47
  translation
49
48
  } = customProps;
49
+ const isMobile = useMediaQuery('(max-width: 899px)');
50
50
  const navOptions = getNavOptions(customProps.hideTools, tagName, allowTrigger);
51
51
  const classes = LinkSettingsStyles(theme);
52
52
  const [nav, setNav] = useState(getNav(navType, navOptions));
@@ -64,66 +64,70 @@ export default function LinkSettings(props) {
64
64
  });
65
65
  };
66
66
  if (isMobile) {
67
- return /*#__PURE__*/_jsxs(SwipeableDrawer, {
67
+ return /*#__PURE__*/_jsx(SwipeableDrawer, {
68
68
  open: true,
69
69
  onClose: handleClose,
70
- children: [/*#__PURE__*/_jsx(Typography, {
71
- variant: "subtitle1",
72
- gutterBottom: true,
73
- sx: {
74
- fontWeight: 600
75
- },
76
- children: translation("dialogueTitle")
77
- }), /*#__PURE__*/_jsx(Select, {
78
- size: "small",
79
- fullWidth: true,
80
- value: nav?.value,
81
- onChange: e => {
82
- const {
83
- value
84
- } = e.target;
85
- const selected = getNav(value, navOptions);
86
- setNav(selected);
87
- setNavValue("");
88
- },
89
- displayEmpty: true,
90
- MenuProps: {
91
- sx: classes.customSelect
92
- },
93
- children: navOptions.map((navOption, i) => {
94
- return /*#__PURE__*/_jsx(MenuItem, {
95
- value: navOption.value,
96
- children: /*#__PURE__*/_jsx(Typography, {
97
- variant: "body2",
98
- children: translation(navOption.label)
99
- })
100
- }, i);
101
- })
102
- }), /*#__PURE__*/_jsx(Box, {
103
- sx: {
104
- paddingTop: "14px"
105
- },
106
- children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
107
- placeholder: translation(nav?.placeholder),
108
- nav: nav,
109
- onChange: onChange,
110
- value: navValue,
111
- openInNewTab: openInNewTab,
112
- onNewTabChange: () => setOpenInNewTab(prev => !prev),
113
- services: customProps.services,
114
- classes: classes,
115
- translation: translation
116
- })
117
- }), /*#__PURE__*/_jsx(Box, {
118
- component: "div",
119
- sx: classes.mobileActionBtns,
120
- children: /*#__PURE__*/_jsx(ActionsButtons, {
121
- classes: classes,
122
- onCancel: handleClose,
123
- onSave: onSubmit,
124
- translation: translation
125
- })
126
- })]
70
+ children: /*#__PURE__*/_jsxs(Grid, {
71
+ sx: classes.drawerContainer,
72
+ children: [/*#__PURE__*/_jsx(Typography, {
73
+ variant: "subtitle1",
74
+ gutterBottom: true,
75
+ sx: {
76
+ fontWeight: 600
77
+ },
78
+ className: "link-settings-title",
79
+ children: translation("dialogueTitle")
80
+ }), /*#__PURE__*/_jsx(Select, {
81
+ size: "small",
82
+ fullWidth: true,
83
+ value: nav?.value,
84
+ onChange: e => {
85
+ const {
86
+ value
87
+ } = e.target;
88
+ const selected = getNav(value, navOptions);
89
+ setNav(selected);
90
+ setNavValue("");
91
+ },
92
+ displayEmpty: true,
93
+ MenuProps: {
94
+ sx: classes.customSelect
95
+ },
96
+ children: navOptions.map((navOption, i) => {
97
+ return /*#__PURE__*/_jsx(MenuItem, {
98
+ value: navOption.value,
99
+ children: /*#__PURE__*/_jsx(Typography, {
100
+ variant: "body2",
101
+ children: translation(navOption.label)
102
+ })
103
+ }, i);
104
+ })
105
+ }), /*#__PURE__*/_jsx(Box, {
106
+ sx: {
107
+ paddingTop: "14px"
108
+ },
109
+ children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
110
+ placeholder: translation(nav?.placeholder),
111
+ nav: nav,
112
+ onChange: onChange,
113
+ value: navValue,
114
+ openInNewTab: openInNewTab,
115
+ onNewTabChange: () => setOpenInNewTab(prev => !prev),
116
+ services: customProps.services,
117
+ classes: classes,
118
+ translation: translation
119
+ })
120
+ }), /*#__PURE__*/_jsx(Box, {
121
+ component: "div",
122
+ sx: classes.mobileActionBtns,
123
+ children: /*#__PURE__*/_jsx(ActionsButtons, {
124
+ classes: classes,
125
+ onCancel: handleClose,
126
+ onSave: onSubmit,
127
+ translation: translation
128
+ })
129
+ })]
130
+ })
127
131
  });
128
132
  } else {
129
133
  return /*#__PURE__*/_jsxs(Dialog, {
@@ -132,15 +136,25 @@ export default function LinkSettings(props) {
132
136
  sx: classes.dialogContainer,
133
137
  fullWidth: true,
134
138
  maxWidth: "sm",
135
- children: [/*#__PURE__*/_jsx(DialogTitle, {
136
- children: translation("dialogueTitle")
137
- }), /*#__PURE__*/_jsx(IconButton, {
138
- "aria-label": "close",
139
- onClick: handleClose,
140
- sx: classes.closeIcon,
141
- children: /*#__PURE__*/_jsx(CloseIcon, {})
139
+ children: [/*#__PURE__*/_jsxs(Grid, {
140
+ container: true,
141
+ direction: "row",
142
+ sx: {
143
+ justifyContent: "space-between",
144
+ alignItems: "center"
145
+ },
146
+ className: "dialog-title",
147
+ children: [/*#__PURE__*/_jsx(DialogTitle, {
148
+ children: translation("dialogueTitle")
149
+ }), /*#__PURE__*/_jsx(IconButton, {
150
+ "aria-label": "close",
151
+ onClick: handleClose,
152
+ sx: classes.closeIcon,
153
+ children: /*#__PURE__*/_jsx(CloseRoundedIcon, {})
154
+ })]
142
155
  }), /*#__PURE__*/_jsx(DialogContent, {
143
156
  dividers: true,
157
+ className: "link-settings-content",
144
158
  children: /*#__PURE__*/_jsxs(Grid, {
145
159
  container: true,
146
160
  spacing: 2,
@@ -148,7 +162,9 @@ export default function LinkSettings(props) {
148
162
  item: true,
149
163
  xs: 6,
150
164
  sx: classes.gridDivider,
165
+ className: "radioBtnGrp",
151
166
  children: /*#__PURE__*/_jsx(FormControl, {
167
+ sx: classes.customRadioBtn,
152
168
  children: /*#__PURE__*/_jsx(RadioGroup, {
153
169
  value: nav?.value,
154
170
  children: navOptions?.map((navOption, i) => {