@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
@@ -1,5 +1,10 @@
1
- import React from "react";
2
- import { Box, Card, CardMedia, CardContent, Typography } from "@mui/material";
1
+ import React, { useEffect, useState } from "react";
2
+ import Box from "@mui/material/Box";
3
+ import Card from "@mui/material/Card";
4
+ import CardMedia from "@mui/material/CardMedia";
5
+ import CardContent from "@mui/material/CardContent";
6
+ import Typography from "@mui/material/Typography";
7
+ import Skeleton from "@mui/material/Skeleton";
3
8
  import Icon from "../../common/Icon";
4
9
  import { useEditorContext } from "../../hooks/useMouseMove";
5
10
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -15,13 +20,26 @@ const SearchAttachment = props => {
15
20
  metadata
16
21
  } = customProps;
17
22
  const {
18
- title,
19
- type
23
+ type,
24
+ id
20
25
  } = element;
21
26
  const {
22
27
  theme
23
28
  } = useEditorContext();
29
+ const [title, setTitle] = useState("");
30
+ const [showSkeleton, setShowSkeleton] = useState(false);
24
31
  const label = Boolean(title?.trim()) ? title : 'Untitled';
32
+ useEffect(() => {
33
+ const fetchTitle = async id => {
34
+ setShowSkeleton(true);
35
+ const title = await customProps?.services('getDocTitle', id);
36
+ setTitle(title?.data);
37
+ setShowSkeleton(false);
38
+ };
39
+ if (id) {
40
+ fetchTitle(id);
41
+ }
42
+ }, []);
25
43
  const handleClick = () => {
26
44
  if (metadata && metadata?.actionHandler) {
27
45
  metadata?.actionHandler(type, element);
@@ -38,15 +56,15 @@ const SearchAttachment = props => {
38
56
  children: /*#__PURE__*/_jsxs(Card, {
39
57
  sx: {
40
58
  display: "flex",
41
- justifyContent: "flex-start",
42
- alignItems: "flex-end",
59
+ justifyContent: showSkeleton ? "center" : "flex-start",
60
+ alignItems: showSkeleton ? "center" : "flex-end",
43
61
  width: "fit-content",
44
62
  maxWidth: '250px',
45
63
  padding: "0px 10px",
46
64
  boxShadow: "none",
47
65
  border: `1px solid ${theme?.palette?.primary?.slashBrainBorder} !important`,
48
66
  borderRadius: "7px !important",
49
- background: `${theme?.palette?.containers?.slashBrainCardBg} !important`,
67
+ background: showSkeleton ? `${theme?.palette?.editor?.menuOptionHoverBackground} !important` : `${theme?.palette?.containers?.slashBrainCardBg} !important`,
50
68
  cursor: 'pointer',
51
69
  margin: '4px 0px',
52
70
  lineHeight: 1.43,
@@ -76,7 +94,12 @@ const SearchAttachment = props => {
76
94
  width: "unset !important"
77
95
  }
78
96
  },
79
- children: /*#__PURE__*/_jsx(Icon, {
97
+ children: showSkeleton ? /*#__PURE__*/_jsx(Skeleton, {
98
+ variant: "circular",
99
+ width: 14,
100
+ height: 14,
101
+ animation: "wave"
102
+ }) : /*#__PURE__*/_jsx(Icon, {
80
103
  icon: "docsIcon"
81
104
  })
82
105
  }), /*#__PURE__*/_jsx(CardContent, {
@@ -94,7 +117,15 @@ const SearchAttachment = props => {
94
117
  width: "unset !important"
95
118
  }
96
119
  },
97
- children: /*#__PURE__*/_jsxs(Typography, {
120
+ children: showSkeleton ? /*#__PURE__*/_jsx(Skeleton, {
121
+ variant: "text",
122
+ width: 140,
123
+ height: 20,
124
+ animation: "wave",
125
+ sx: {
126
+ borderRadius: "4px"
127
+ }
128
+ }) : /*#__PURE__*/_jsxs(Typography, {
98
129
  sx: {
99
130
  fontWeight: "500",
100
131
  background: theme?.palette?.text?.slashBrainText,
@@ -30,6 +30,7 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
30
30
  const [skip, setSkip] = useState(0);
31
31
  const [search, setSearch] = useState("");
32
32
  const [isLoading, setIsLoading] = useState(false);
33
+ const [total, setTotal] = useState(0);
33
34
  const [debouncedSearch] = useDebounce(search, 300);
34
35
  const limit = 20;
35
36
  const observer = useRef();
@@ -63,24 +64,24 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
63
64
  }
64
65
  };
65
66
  useEffect(() => {
66
- getDocs({
67
- debouncedSearch,
68
- skip,
69
- limit,
70
- current_doc_id: currentId
71
- });
67
+ getDocs();
72
68
  }, [skip, debouncedSearch]);
73
69
  const getDocs = async () => {
70
+ if (isLoading) return;
71
+ if (total > 0 && mapData?.length >= total) return;
74
72
  setIsLoading(true);
75
73
  try {
76
74
  if (otherProps?.services) {
77
75
  const result = await otherProps?.services("getDocs", {
78
76
  skip,
79
77
  limit,
80
- search,
78
+ search: debouncedSearch,
81
79
  current_doc_id: currentId
82
80
  });
83
- setMapData(prev => skip === 0 ? result.data : [...prev, ...result.data]);
81
+ const docs = result?.data?.docs || [];
82
+ const totalCount = result?.data?.total || 0;
83
+ setMapData(prev => skip === 0 ? docs : [...prev, ...docs]);
84
+ setTotal(totalCount);
84
85
  }
85
86
  } catch (error) {
86
87
  console.error("Error fetching documents:", error);
@@ -259,7 +259,7 @@ const SearchAndDocList = ({
259
259
  xs: 12,
260
260
  children: /*#__PURE__*/_jsx(Typography, {
261
261
  sx: {
262
- display: mapData?.length === 0 ? 'flex' : 'none',
262
+ display: mapData?.length === 0 && !isLoading ? 'flex' : 'none',
263
263
  alignItems: "center",
264
264
  justifyContent: "center",
265
265
  color: theme?.palette?.text?.secondary,
@@ -269,15 +269,17 @@ const SearchAndDocList = ({
269
269
  },
270
270
  children: "No docs"
271
271
  })
272
- }), isLoading && /*#__PURE__*/_jsx(Grid, {
272
+ }), /*#__PURE__*/_jsx(Grid, {
273
273
  item: true,
274
+ xs: 12,
274
275
  sx: {
275
- display: "flex",
276
+ display: isLoading ? 'flex' : 'none',
277
+ alignItems: "center",
276
278
  justifyContent: "center",
277
- alignItems: 'center',
278
- minHeight: '400px',
279
- padding: '0px 16px 8px',
280
- position: 'absolute'
279
+ color: theme?.palette?.text?.secondary,
280
+ fontSize: '12px',
281
+ padding: '20px',
282
+ fontWeight: 700
281
283
  },
282
284
  children: /*#__PURE__*/_jsx(CircularProgress, {})
283
285
  })]
@@ -5,6 +5,7 @@ import { Box } from "@mui/material";
5
5
  import { isTextSelected } from "../../utils/helper";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import SimpleTextStyle from "./style";
8
+ import { getBreakpointLineSpacing, getDevice } from "../../helper/theme";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { Fragment as _Fragment } from "react/jsx-runtime";
10
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -29,8 +30,12 @@ const SimpleText = props => {
29
30
  } = customProps;
30
31
  // const { element: pageSt } = getPageSettings(editor) || {};
31
32
  // const { pageColor } = pageSt?.pageProps || {};
33
+ const breakpoint = getDevice(window.innerWidth);
34
+ const lineH = element?.children[0]?.lineHeight;
35
+ const lineHeight = getBreakpointLineSpacing(lineH, breakpoint);
32
36
  const classes = SimpleTextStyle({
33
- pageColor: "#FFFFFF"
37
+ pageColor: "#FFFFFF",
38
+ lineHeight
34
39
  });
35
40
  const selected = useSelected();
36
41
  const path = ReactEditor.findPath(editor, element);
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useMemo } from "react";
2
- import { Editor, Path, Transforms } from "slate";
2
+ import { Editor, Path, Range, Transforms } from "slate";
3
3
  import { Box } from "@mui/material";
4
4
  import { useSlateStatic, ReactEditor } from "slate-react";
5
5
  import useTableResize from "../../utils/customHooks/useTableResize";
@@ -132,8 +132,12 @@ const TableCell = props => {
132
132
  const isFirstRow = row === 0;
133
133
  const isFirstColumn = column === 0;
134
134
  const [hoverRow, hoverCol] = hoverPath ? hoverPath.slice(-2) : [];
135
- const showColDrag = isFirstRow && hoverCol === column && !resizing && !readOnly && !hideTools.includes("drag");
136
- const showRowDrag = isFirstColumn && hoverRow === row && !resizing && !readOnly && !hideTools.includes("drag");
135
+ const {
136
+ selection
137
+ } = editor;
138
+ const isHavingSelection = selection && !Range.isCollapsed(selection);
139
+ const showColDrag = isFirstRow && hoverCol === column && !resizing && !readOnly && !hideTools.includes("drag") && !isHavingSelection;
140
+ const showRowDrag = isFirstColumn && hoverRow === row && !resizing && !readOnly && !hideTools.includes("drag") && !isHavingSelection;
137
141
  const [parentProps] = tableNode || [{}];
138
142
  const [rowProps] = rowNode || [{}];
139
143
  const tableDOM = table.getDOMNode(path, true);
@@ -14,8 +14,9 @@ import SelectSuperSubscript from "./MiniTextFormat/SelectSuperSubscript";
14
14
  import { ColorResetIcon, TextDefaultStyleIcon } from "../../common/iconListV2";
15
15
  import FontFamilyAutocomplete from "../FormatTools/FontFamilyAutocomplete";
16
16
  import { useEditorContext } from "../../hooks/useMouseMove";
17
- // import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
18
- // import { getPageSettings } from "../../utils/pageSettings";
17
+ import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
18
+ import { getPageSettings } from "../../utils/pageSettings";
19
+ import { getDevice } from "../../helper/theme";
19
20
  import { jsx as _jsx } from "react/jsx-runtime";
20
21
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
22
  const allTools = toolbarGroups.flat();
@@ -36,15 +37,15 @@ const TextFormat = props => {
36
37
  const {
37
38
  translation
38
39
  } = customProps;
39
-
40
- // const { element: pageSt } = getPageSettings(editor) || {};
41
- // const pageSettingLine = pageSt?.pageProps?.lineHeight;
40
+ const {
41
+ element: pageSt
42
+ } = getPageSettings(editor) || {};
43
+ const pageSettingLine = pageSt?.pageProps?.lineHeight;
42
44
  const {
43
45
  fontFamilies,
44
46
  theme
45
47
  } = useEditorContext();
46
- // const { activeBreakPoint } = useEditorContext();
47
- // const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
48
+ const breakpoint = getDevice(window.innerWidth);
48
49
  const fontWeight = allTools.find(f => f.format === "fontWeight");
49
50
  const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
50
51
  const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
@@ -61,12 +62,8 @@ const TextFormat = props => {
61
62
  color: "",
62
63
  bgColor: ""
63
64
  };
64
-
65
- // let lineSpacingValue = activeMark(editor, "lineHeight");
66
- // lineSpacingValue =
67
- // lineSpacingValue?.[breakpoint] !== undefined
68
- // ? lineSpacingValue
69
- // : pageSettingLine;
65
+ let lineSpacingValue = activeMark(editor, "lineHeight");
66
+ lineSpacingValue = lineSpacingValue?.[breakpoint] !== undefined ? lineSpacingValue : pageSettingLine;
70
67
  const handleColorPicker = type => e => {
71
68
  setType(type);
72
69
  setAnchorEl(e.currentTarget);
@@ -107,11 +104,13 @@ const TextFormat = props => {
107
104
  value
108
105
  });
109
106
  };
110
-
111
- // const handleLineSpacing = (data) => {
112
- // const [[format, value]] = Object.entries(data);
113
- // addMarkData(editor, { format, value });
114
- // };
107
+ const handleLineSpacing = data => {
108
+ const [[format, value]] = Object.entries(data);
109
+ addMarkData(editor, {
110
+ format,
111
+ value
112
+ });
113
+ };
115
114
  return /*#__PURE__*/_jsxs(Grid, {
116
115
  container: true,
117
116
  sx: classes.textFormatWrapper,
@@ -386,6 +385,32 @@ const TextFormat = props => {
386
385
  xs: 12,
387
386
  sx: classes.dividerGrid,
388
387
  children: /*#__PURE__*/_jsx(Divider, {})
388
+ }), /*#__PURE__*/_jsxs(Grid, {
389
+ item: true,
390
+ xs: 12,
391
+ children: [/*#__PURE__*/_jsx(Typography, {
392
+ variant: "body1",
393
+ color: "primary",
394
+ sx: classes.typoLabel,
395
+ children: "Line Spacing"
396
+ }), /*#__PURE__*/_jsx(Grid, {
397
+ item: true,
398
+ xs: 12,
399
+ className: "typo-icons",
400
+ sx: classes.evenSpace,
401
+ children: /*#__PURE__*/_jsx(LineSpacing, {
402
+ value: lineSpacingValue,
403
+ onChange: handleLineSpacing,
404
+ data: {
405
+ key: 'lineHeight'
406
+ }
407
+ })
408
+ })]
409
+ }), /*#__PURE__*/_jsx(Grid, {
410
+ item: true,
411
+ xs: 12,
412
+ sx: classes.dividerGrid,
413
+ children: /*#__PURE__*/_jsx(Divider, {})
389
414
  }), /*#__PURE__*/_jsx(Grid, {
390
415
  item: true,
391
416
  xs: 12,
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
+ const ClearAllIcon = () => /*#__PURE__*/_jsxs("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: "20",
6
+ height: "20",
7
+ viewBox: "0 0 20 20",
8
+ children: [/*#__PURE__*/_jsx("rect", {
9
+ x: "4",
10
+ y: "5",
11
+ width: "12",
12
+ height: "2",
13
+ rx: "1",
14
+ fill: "currentColor"
15
+ }), /*#__PURE__*/_jsx("rect", {
16
+ x: "4",
17
+ y: "9",
18
+ width: "10",
19
+ height: "2",
20
+ rx: "1",
21
+ fill: "currentColor"
22
+ }), /*#__PURE__*/_jsx("rect", {
23
+ x: "4",
24
+ y: "13",
25
+ width: "12",
26
+ height: "2",
27
+ rx: "1",
28
+ fill: "currentColor"
29
+ })]
30
+ });
31
+ export default ClearAllIcon;
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
+ const ResetIconNew = () => {
4
+ return /*#__PURE__*/_jsxs("svg", {
5
+ width: "17",
6
+ height: "17",
7
+ viewBox: "0 0 17 17",
8
+ fill: "none",
9
+ xmlns: "http://www.w3.org/2000/svg",
10
+ children: [/*#__PURE__*/_jsx("circle", {
11
+ cx: "8.10105",
12
+ cy: "8.10234",
13
+ r: "8",
14
+ transform: "rotate(-89.2717 8.10105 8.10234)",
15
+ fill: "#2563EB",
16
+ fillOpacity: "0.16"
17
+ }), /*#__PURE__*/_jsx("path", {
18
+ d: "M12.7169 8.22222V8.22222C12.7168 8.2323 12.7289 8.23752 12.7361 8.2305L13.3823 7.6035C13.6597 7.33434 14.0843 7.33974 14.3547 7.61586C14.6252 7.89199 14.6198 8.31458 14.3424 8.58375L12.6992 10.1595C12.3035 10.5389 11.6762 10.5291 11.2926 10.1375L9.71318 8.5249C9.57796 8.38683 9.51173 8.20874 9.51381 8.04516C9.51606 7.86794 9.58679 7.69159 9.72531 7.57064C10.0027 7.30148 10.4273 7.30688 10.6977 7.583L11.3182 8.21649C11.3288 8.22729 11.3471 8.21993 11.3473 8.20481V8.20481C11.374 6.10545 9.67017 4.36586 7.56099 4.33905C5.45182 4.31224 3.70429 6.00795 3.6776 8.10731C3.65091 10.2067 5.35477 11.9463 7.46394 11.9731C7.84743 11.9779 8.14493 12.2817 8.14007 12.6634C8.13522 13.0451 7.8301 13.3412 7.44661 13.3363C4.57046 13.2997 2.27161 10.9527 2.30801 8.0899C2.3444 5.22714 4.70217 2.93927 7.57832 2.97583C10.4408 3.01222 12.7533 5.35946 12.7169 8.22222Z",
19
+ fill: "#2563EB"
20
+ })]
21
+ });
22
+ };
23
+ export default ResetIconNew;
@@ -7,6 +7,7 @@ const SettingsIcon = props => {
7
7
  viewBox: "0 0 18 18",
8
8
  fill: "none",
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
+ className: "settingsIcon",
10
11
  ...props,
11
12
  children: [/*#__PURE__*/_jsx("path", {
12
13
  d: "M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",
@@ -45,6 +45,7 @@ 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";
50
51
  const iconList = {
@@ -329,7 +330,8 @@ const iconList = {
329
330
  stroke: "#64748B",
330
331
  color: "#64748B"
331
332
  }
332
- })
333
+ }),
334
+ resetIconNew: /*#__PURE__*/_jsx(ResetIconNew, {})
333
335
  };
334
336
  export const icons = {
335
337
  ...iconList
@@ -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
  }