@flozy/editor 5.4.7 → 5.4.9

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 (56) hide show
  1. package/dist/Editor/CommonEditor.js +8 -14
  2. package/dist/Editor/Editor.css +16 -18
  3. package/dist/Editor/Elements/Button/EditorButton.js +1 -3
  4. package/dist/Editor/Elements/Color Picker/Styles.js +1 -0
  5. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +1 -1
  6. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +14 -7
  7. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -0
  8. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +8 -3
  9. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -1
  10. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -2
  11. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +7 -0
  12. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +37 -11
  13. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +17 -0
  14. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +20 -2
  15. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +13 -2
  16. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +27 -4
  17. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +1 -0
  18. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +1 -1
  19. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +4 -1
  20. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +6 -6
  21. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +19 -5
  22. package/dist/Editor/Elements/Form/Form.js +0 -1
  23. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -2
  24. package/dist/Editor/Elements/FreeGrid/styles.js +0 -1
  25. package/dist/Editor/Elements/List/CheckList.js +1 -2
  26. package/dist/Editor/Elements/Search/SearchAttachment.js +0 -1
  27. package/dist/Editor/Elements/SimpleText/index.js +3 -11
  28. package/dist/Editor/Elements/SimpleText/style.js +1 -5
  29. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -5
  30. package/dist/Editor/Toolbar/Mini/Styles.js +0 -5
  31. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +2 -11
  32. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +0 -45
  33. package/dist/Editor/assets/svg/PlusIcon.js +2 -2
  34. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  35. package/dist/Editor/common/MentionsPopup/Styles.js +0 -1
  36. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +0 -1
  37. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
  38. package/dist/Editor/common/RnD/Utils/gridDropItem.js +6 -9
  39. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  40. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
  41. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
  42. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
  43. package/dist/Editor/common/Uploader.js +0 -8
  44. package/dist/Editor/commonStyle.js +8 -8
  45. package/dist/Editor/helper/deserialize/index.js +24 -66
  46. package/dist/Editor/helper/index.js +2 -2
  47. package/dist/Editor/helper/theme.js +1 -24
  48. package/dist/Editor/hooks/useMouseMove.js +2 -5
  49. package/dist/Editor/plugins/withHTML.js +5 -42
  50. package/dist/Editor/utils/SlateUtilityFunctions.js +1 -8
  51. package/dist/Editor/utils/button.js +4 -4
  52. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +7 -51
  53. package/dist/Editor/utils/helper.js +16 -19
  54. package/dist/Editor/utils/pageSettings.js +2 -14
  55. package/package.json +1 -1
  56. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
@@ -26,7 +26,7 @@ import editorStyles from "./Styles/EditorStyles";
26
26
  import DragAndDrop from "./common/DnD";
27
27
  import Section from "./common/Section";
28
28
  import decorators from "./utils/Decorators";
29
- import { getBreakpointLineSpacing, getTRBLBreakPoints } from "./helper/theme";
29
+ import { getTRBLBreakPoints } from "./helper/theme";
30
30
  import { getInitialValue, handleInsertLastElement, isFreeGrid, isFreeGridFragment, isPageSettings, outsideEditorClickLabel } from "./utils/helper";
31
31
  import useWindowResize from "./hooks/useWindowResize";
32
32
  import PopoverAIInput from "./Elements/AI/PopoverAIInput";
@@ -139,8 +139,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
139
139
  pageColor,
140
140
  color: pageTextColor,
141
141
  pageWidth,
142
- maxWidth: pageMaxWidth,
143
- lineHeight
142
+ maxWidth: pageMaxWidth
144
143
  } = pageSt?.pageProps || {
145
144
  bannerSpacing: {
146
145
  left: 0,
@@ -308,13 +307,11 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
308
307
  hideTools: updatedHideTools || []
309
308
  }) : [];
310
309
  const handleEditorChange = newValue => {
311
- if (!readOnly) {
312
- if (JSON.stringify(newValue) !== JSON.stringify(debouncedValue?.current)) {
313
- updateTopBanner(newValue, setTopBanner);
314
- debounced(newValue);
315
- if (!isInteracted) {
316
- setIsInteracted(true);
317
- }
310
+ if (JSON.stringify(newValue) !== JSON.stringify(debouncedValue?.current)) {
311
+ updateTopBanner(newValue, setTopBanner);
312
+ debounced(newValue);
313
+ if (!isInteracted) {
314
+ setIsInteracted(true);
318
315
  }
319
316
  }
320
317
  };
@@ -333,7 +330,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
333
330
  onDrawerOpen: onDrawerOpen,
334
331
  ICON_API: "https://assets.agenciflow.com"
335
332
  };
336
- const lineH = getBreakpointLineSpacing(lineHeight, breakpoint);
337
333
  const renderElement = useCallback(props => {
338
334
  return /*#__PURE__*/_jsx(Element, {
339
335
  ...props,
@@ -536,7 +532,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
536
532
  padding: {
537
533
  ...getTRBLBreakPoints(bannerSpacing)
538
534
  },
539
- lineHeight: lineH,
540
535
  width: !pageWidth || pageWidth === "fixed" ? fixedWidth : fullWidth,
541
536
  height: viewport.h ? `${viewport.h}px` : `100%`,
542
537
  alignSelf: "center",
@@ -594,9 +589,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
594
589
  setIsTextSelected: setIsTextSelected,
595
590
  customProps: customProps,
596
591
  editorWrapper: editorWrapper
597
- }) : null, !readOnly ? /*#__PURE__*/_jsx(SwitchViewport, {
592
+ }) : null, !readOnly && showViewport ? /*#__PURE__*/_jsx(SwitchViewport, {
598
593
  breakpoint: breakpoint,
599
- show: showViewport,
600
594
  onChange: b => onSwitchBreakpoint(b)
601
595
  }) : null]
602
596
  })
@@ -18,10 +18,7 @@
18
18
  .ml-1 {
19
19
  margin-left: 10px;
20
20
  }
21
- .m-0
22
- {
23
- margin: 0px
24
- }
21
+
25
22
  .dflex {
26
23
  display: flex;
27
24
  }
@@ -880,7 +877,7 @@ blockquote {
880
877
  .dialogComp .MuiInputBase-input {
881
878
  border-radius: 8px;
882
879
  /* box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.05); */
883
- font-size: 12px;
880
+ font-size: 14px;
884
881
  font-weight: 500;
885
882
  }
886
883
 
@@ -1257,19 +1254,6 @@ blockquote {
1257
1254
  pointer-events: auto;
1258
1255
  }
1259
1256
 
1260
- @media (max-width: 899px) {
1261
- .MuiPopover-root {
1262
- z-index: 1302 !important;
1263
- }
1264
- canvas {
1265
- max-width: 100% !important;
1266
- }
1267
- }
1268
-
1269
- .settingsHeader {
1270
- font-size: 14px !important;
1271
- font-weight: 500 !important;
1272
- }
1273
1257
  .hideScroll {
1274
1258
  overflow-anchor: none;
1275
1259
  }
@@ -1285,6 +1269,20 @@ blockquote {
1285
1269
  .hideScroll::-webkit-scrollbar-thumb:hover {
1286
1270
  background: none !important;
1287
1271
  }
1272
+ @media (max-width: 899px) {
1273
+ .MuiPopover-root {
1274
+ z-index: 1302 !important;
1275
+ }
1276
+
1277
+ canvas {
1278
+ max-width: 100% !important;
1279
+ }
1280
+ }
1281
+
1282
+ .settingsHeader {
1283
+ font-size: 14px !important;
1284
+ font-weight: 500 !important;
1285
+ }
1288
1286
 
1289
1287
  .custom-scroll::-webkit-scrollbar {
1290
1288
  height: .6rem;
@@ -162,7 +162,6 @@ const EditorButton = props => {
162
162
  display: "inline-flex",
163
163
  color: "rgba(0, 0, 0, 0.54)",
164
164
  marginBottom: "0px !important",
165
- ...classes.buttonMoreOption,
166
165
  ...classes.buttonMoreOption3
167
166
  },
168
167
  ...btnProps,
@@ -265,12 +264,11 @@ const EditorButton = props => {
265
264
  ...btnSp,
266
265
  borderStyle: borderStyle || "solid",
267
266
  color: `${textColor || "#FFFFFF"}`,
268
- fontSize: textSize || "12px",
267
+ fontSize: textSize || "inherit",
269
268
  fontFamily: fontFamily || "PoppinsRegular",
270
269
  display: "inline-flex",
271
270
  alignItems: "center",
272
271
  position: "relative",
273
- lineHeight: 1.43,
274
272
  "& .element-toolbar": {
275
273
  display: "none"
276
274
  },
@@ -17,6 +17,7 @@ const ColorPickerStyles = theme => ({
17
17
  borderRadius: "7px !important",
18
18
  "& .MuiPaper-root": {
19
19
  backgroundColor: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
20
+ background: `${theme?.palette?.editor?.miniToolBarBackground}`,
20
21
  border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder} !important`,
21
22
  borderRadius: "7px !important",
22
23
  padding: "0px 5px",
@@ -123,7 +123,7 @@ export default function Select(props) {
123
123
  label: option?.label || option?.value,
124
124
  ...tagProps,
125
125
  sx: {
126
- background: option?.color || "#F6F6F6",
126
+ background: option?.color || appTheme?.palette?.editor?.tv_border1,
127
127
  border: "none",
128
128
  '& .MuiChip-label': {
129
129
  paddingLeft: '12px !important'
@@ -25,16 +25,23 @@ const SimpleSelect = props => {
25
25
  size: "small",
26
26
  sx: {
27
27
  color: appTheme?.palette?.editor?.tv_text,
28
- fontSize: '14px',
29
- marginTop: '4px',
30
- padding: '3px 0px',
28
+ fontSize: '14px !important',
29
+ marginTop: '4px !important',
30
+ padding: '3px 0px !important',
31
+ background: 'transparent !important',
32
+ '& .MuiOutlinedInput-root': {
33
+ height: '34px !important',
34
+ background: 'transparent !important'
35
+ },
31
36
  '& .MuiOutlinedInput-notchedOutline': {
32
- border: `1px solid ${appTheme?.palette?.editor?.inputFieldBorder}`,
33
- boxShadow: '0px 4px 18px 0px #0000000D'
37
+ border: `1px solid ${appTheme?.palette?.editor?.inputFieldBorder} !important`,
38
+ boxShadow: '0px 4px 18px 0px #0000000D !important',
39
+ background: 'transparent !important'
34
40
  },
35
41
  "&:hover .MuiOutlinedInput-notchedOutline": {
36
- border: `1px solid ${appTheme?.palette?.editor?.inputFieldBorder}`,
37
- boxShadow: '0px 4px 18px 0px #0000000D'
42
+ border: `1px solid ${appTheme?.palette?.editor?.inputFieldBorder} !important`,
43
+ boxShadow: '0px 4px 18px 0px #0000000D !important',
44
+ background: 'transparent !important'
38
45
  }
39
46
  },
40
47
  MenuProps: {
@@ -55,6 +55,13 @@ const FilterSort = props => {
55
55
  className: "tv-act-ico bg br1",
56
56
  size: "small",
57
57
  onClick: onClose,
58
+ sx: {
59
+ '& svg': {
60
+ '& path': {
61
+ strokeWidth: 0
62
+ }
63
+ }
64
+ },
58
65
  children: /*#__PURE__*/_jsx(CloseIcon, {})
59
66
  })]
60
67
  }), renderMode()]
@@ -87,6 +87,7 @@ const useFilterSortStyles = (theme, appTheme) => ({
87
87
  color: appTheme?.palette?.editor?.tv_text_primary,
88
88
  // background: appTheme?.palette?.editor?.tv_input_bg,
89
89
  borderRadius: "8px",
90
+ maxHeight: '34px !important',
90
91
  "& svg": {
91
92
  color: appTheme?.palette?.editor?.tv_text_primary
92
93
  }
@@ -98,11 +99,15 @@ const useFilterSortStyles = (theme, appTheme) => ({
98
99
  padding: '13px 16px 16px 20px',
99
100
  "& .tv-opt-list": {
100
101
  minWidth: "230px",
102
+ '& .bgic': {
103
+ background: appTheme?.palette?.editor?.tv_ico_bg,
104
+ padding: '6px',
105
+ borderRadius: '4px'
106
+ },
101
107
  '& .MuiListItemIcon-root': {
102
108
  '& svg': {
103
- background: appTheme?.palette?.editor?.tv_ico_bg,
104
- padding: '6px',
105
- borderRadius: '4px',
109
+ width: '14px',
110
+ height: '14px',
106
111
  '& path': {
107
112
  stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
108
113
  }
@@ -2,7 +2,6 @@ import React, { useState } from "react";
2
2
  import { Box, IconButton, InputBase, Menu, MenuItem } from "@mui/material";
3
3
  import { useDataView } from "../Providers/DataViewProvider";
4
4
  import FilterSort from "./FilterSort";
5
- import DeleteIcon from "@mui/icons-material/Delete";
6
5
  import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
7
6
  import Icon from "../../../common/Icon";
8
7
  import { useEditorContext } from "../../../hooks/useMouseMove";
@@ -4,7 +4,7 @@ import { colors } from "../../../Color Picker/defaultColors";
4
4
  import Icon from "../../../../common/Icon";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
- const DEFAULT_COLORS = colors?.filter(f => !f.includes("linear"));
7
+ const DEFAULT_COLORS = colors?.filter(f => !(f.includes("linear") || f === "#000000"));
8
8
  const AddOptions = props => {
9
9
  const {
10
10
  edit,
@@ -59,7 +59,7 @@ const AddOptions = props => {
59
59
  setError("");
60
60
  };
61
61
  return edit?.type === "select" || edit?.type === "multi-select" ? /*#__PURE__*/_jsxs(Box, {
62
- className: "fe-tv-addopt st sb mb-0",
62
+ className: "fe-tv-addopt sb mb-0",
63
63
  children: [/*#__PURE__*/_jsx(List, {
64
64
  className: "fe-dv-opt-list pl-0",
65
65
  children: /*#__PURE__*/_jsxs(ListItemButton, {
@@ -21,6 +21,13 @@ const AddProperty = props => {
21
21
  className: "tv-act-ico bg br1",
22
22
  size: "small",
23
23
  onClick: onClose,
24
+ sx: {
25
+ '& svg': {
26
+ '& path': {
27
+ strokeWidth: 0
28
+ }
29
+ }
30
+ },
24
31
  children: /*#__PURE__*/_jsx(CloseIcon, {})
25
32
  })]
26
33
  }), /*#__PURE__*/_jsx(Box, {
@@ -1,9 +1,7 @@
1
1
  import React from "react";
2
- import { Box, IconButton, List, ListItemButton, ListItemText, ListItemIcon } from "@mui/material";
2
+ import { Box, IconButton, List, ListItemButton, ListItemText, ListItemIcon, Divider } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
- import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";
5
- import AddIcon from "@mui/icons-material/Add";
6
- import { TYPE_LABELS, PROPERTY_TYPES } from "./Constants";
4
+ import { PROPERTY_TYPES, TYPE_ICONS } from "./Constants";
7
5
  import { useDataView } from "../../Providers/DataViewProvider";
8
6
  import Icon from "../../../../common/Icon";
9
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -46,6 +44,13 @@ const AllProperties = props => {
46
44
  className: "tv-act-ico bg br1",
47
45
  size: "small",
48
46
  onClick: onClose,
47
+ sx: {
48
+ '& svg': {
49
+ '& path': {
50
+ strokeWidth: 0
51
+ }
52
+ }
53
+ },
49
54
  children: /*#__PURE__*/_jsx(CloseIcon, {})
50
55
  })]
51
56
  }), /*#__PURE__*/_jsx(Box, {
@@ -78,7 +83,9 @@ const AllProperties = props => {
78
83
  sx: {
79
84
  justifyContent: "end"
80
85
  },
81
- children: /*#__PURE__*/_jsx(KeyboardArrowRightIcon, {})
86
+ children: /*#__PURE__*/_jsx(Icon, {
87
+ icon: 'rightArrow'
88
+ })
82
89
  })]
83
90
  }, i);
84
91
  })
@@ -91,23 +98,42 @@ const AllProperties = props => {
91
98
  children: hiddenProperties?.map((m, i) => {
92
99
  return /*#__PURE__*/_jsxs(ListItemButton, {
93
100
  onClick: onEditProperty(m),
94
- children: [/*#__PURE__*/_jsx(ListItemText, {
101
+ children: [/*#__PURE__*/_jsx(ListItemIcon, {
102
+ className: "needBg",
103
+ sx: {
104
+ alignItems: "center",
105
+ '& svg': {
106
+ width: '14px !important',
107
+ height: '14px !important'
108
+ }
109
+ },
110
+ children: /*#__PURE__*/_jsx(Icon, {
111
+ icon: TYPE_ICONS[m?.type]
112
+ })
113
+ }), /*#__PURE__*/_jsx(ListItemText, {
95
114
  children: m?.label
96
- }), /*#__PURE__*/_jsxs(ListItemIcon, {
115
+ }), /*#__PURE__*/_jsx(ListItemIcon, {
97
116
  sx: {
98
- alignItems: "center"
117
+ alignItems: "center",
118
+ justifyContent: 'flex-end'
99
119
  },
100
- children: [TYPE_LABELS[m?.type], /*#__PURE__*/_jsx(KeyboardArrowRightIcon, {})]
120
+ children: /*#__PURE__*/_jsx(Icon, {
121
+ icon: 'rightArrow'
122
+ })
101
123
  })]
102
124
  }, i);
103
125
  })
104
126
  })]
105
- }) : null, /*#__PURE__*/_jsx(List, {
127
+ }) : null, /*#__PURE__*/_jsx(Divider, {
128
+ className: "divider_sty"
129
+ }), /*#__PURE__*/_jsx(List, {
106
130
  className: "fe-dv-opt-list",
107
131
  children: /*#__PURE__*/_jsxs(ListItemButton, {
108
132
  onClick: onAdd,
109
133
  children: [/*#__PURE__*/_jsx(ListItemIcon, {
110
- children: /*#__PURE__*/_jsx(AddIcon, {})
134
+ children: /*#__PURE__*/_jsx(Icon, {
135
+ icon: 'plusIcon'
136
+ })
111
137
  }), /*#__PURE__*/_jsx(ListItemText, {
112
138
  children: "Add New Property"
113
139
  })]
@@ -34,6 +34,16 @@ const ChangeProperty = props => {
34
34
  className: "tv-act-ico",
35
35
  size: "small",
36
36
  onClick: onBack,
37
+ sx: {
38
+ paddingLeft: '0px',
39
+ '&:hover': {
40
+ background: 'transparent !important'
41
+ },
42
+ '& svg': {
43
+ width: '14px !important',
44
+ height: '14px !important'
45
+ }
46
+ },
37
47
  children: /*#__PURE__*/_jsx(Icon, {
38
48
  icon: 'leftArrow'
39
49
  })
@@ -42,6 +52,13 @@ const ChangeProperty = props => {
42
52
  className: "tv-act-ico bg br1",
43
53
  size: "small",
44
54
  onClick: onClose,
55
+ sx: {
56
+ '& svg': {
57
+ '& path': {
58
+ strokeWidth: 0
59
+ }
60
+ }
61
+ },
45
62
  children: /*#__PURE__*/_jsx(CloseIcon, {})
46
63
  })]
47
64
  }), /*#__PURE__*/_jsx(Box, {
@@ -24,8 +24,26 @@ const ColumnsList = props => {
24
24
  className: selected?.type === m?.type ? "active" : "",
25
25
  onClick: onSelect(m),
26
26
  children: [/*#__PURE__*/_jsx(ListItemIcon, {
27
- children: /*#__PURE__*/_jsx(Icon, {
28
- icon: iconType
27
+ sx: {
28
+ background: 'none'
29
+ },
30
+ children: /*#__PURE__*/_jsx(Box, {
31
+ className: "bgic",
32
+ sx: {
33
+ marginRight: '5px',
34
+ borderRadius: '4px',
35
+ display: 'flex',
36
+ alignItems: 'center',
37
+ padding: '2px',
38
+ '& svg': {
39
+ width: '16px',
40
+ height: '16px',
41
+ padding: '0px !important'
42
+ }
43
+ },
44
+ children: /*#__PURE__*/_jsx(Icon, {
45
+ icon: iconType
46
+ })
29
47
  })
30
48
  }), /*#__PURE__*/_jsx(ListItemText, {
31
49
  primary: m?.label
@@ -5,6 +5,7 @@ import ColorButtons from "../../../Color Picker/ColorButtons";
5
5
  import ColorPickerStyles from "../../../Color Picker/Styles";
6
6
  import { DEFAULT_OPTION_COLORS } from "./Constants";
7
7
  import Icon from "../../../../common/Icon";
8
+ import { useEditorContext } from "../../../../hooks/useMouseMove";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
11
  const EditOption = props => {
@@ -20,11 +21,14 @@ const EditOption = props => {
20
21
  const editData = useRef({
21
22
  ...edit
22
23
  });
24
+ const {
25
+ theme
26
+ } = useEditorContext();
23
27
  const {
24
28
  optionIndex
25
29
  } = edit;
26
30
  const selectedOption = edit?.options[optionIndex] || {};
27
- const pickerStyles = ColorPickerStyles();
31
+ const pickerStyles = ColorPickerStyles(theme);
28
32
  useEffect(() => {
29
33
  return () => {
30
34
  // on un-mount update the option change
@@ -108,8 +112,15 @@ const EditOption = props => {
108
112
  })
109
113
  }), "Edit Option"]
110
114
  }), /*#__PURE__*/_jsx(IconButton, {
111
- className: "tv-act-ico bg",
115
+ className: "tv-act-ico bg br1",
112
116
  size: "small",
117
+ sx: {
118
+ '& svg': {
119
+ '& path': {
120
+ strokeWidth: 0
121
+ }
122
+ }
123
+ },
113
124
  onClick: onClose,
114
125
  children: /*#__PURE__*/_jsx(CloseIcon, {})
115
126
  })]
@@ -1,11 +1,10 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
- import { Box, IconButton, TextField, List, ListItemButton, ListItemText, ListItemIcon, FormControlLabel } from "@mui/material";
3
- import CloseIcon from "@mui/icons-material/Close";
4
- import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
2
+ import { Box, IconButton, TextField, List, ListItemButton, ListItemText, ListItemIcon, FormControlLabel, Divider } from "@mui/material";
5
3
  import { TYPE_ICONS, TYPE_LABELS } from "./Constants";
6
4
  import AddOptions from "./AddOptions";
7
5
  import FilterProperty from "./FilterProperty";
8
6
  import Icon from "../../../../common/Icon";
7
+ import CloseIcon from "@mui/icons-material/Close";
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
10
  const EditProperty = props => {
@@ -108,12 +107,31 @@ const EditProperty = props => {
108
107
  className: "tv-act-ico",
109
108
  size: "small",
110
109
  onClick: onBack,
111
- children: /*#__PURE__*/_jsx(ArrowBackIosIcon, {})
110
+ sx: {
111
+ paddingLeft: '0px',
112
+ '&:hover': {
113
+ background: 'transparent !important'
114
+ },
115
+ '& svg': {
116
+ width: '14px !important',
117
+ height: '14px !important'
118
+ }
119
+ },
120
+ children: /*#__PURE__*/_jsx(Icon, {
121
+ icon: 'leftArrow'
122
+ })
112
123
  }), "Edit Property"]
113
124
  }), /*#__PURE__*/_jsx(IconButton, {
114
125
  className: "tv-act-ico bg br1",
115
126
  size: "small",
116
127
  onClick: onClose,
128
+ sx: {
129
+ '& svg': {
130
+ '& path': {
131
+ strokeWidth: 0
132
+ }
133
+ }
134
+ },
117
135
  children: /*#__PURE__*/_jsx(CloseIcon, {})
118
136
  })]
119
137
  }), /*#__PURE__*/_jsxs(Box, {
@@ -136,6 +154,9 @@ const EditProperty = props => {
136
154
  }), /*#__PURE__*/_jsx(List, {
137
155
  className: "fe-dv-opt-list st",
138
156
  children: /*#__PURE__*/_jsxs(ListItemButton, {
157
+ sx: {
158
+ paddingBottom: '12px'
159
+ },
139
160
  onClick: onChangeProperty,
140
161
  children: [/*#__PURE__*/_jsx(ListItemText, {
141
162
  children: "Type"
@@ -168,6 +189,8 @@ const EditProperty = props => {
168
189
  })]
169
190
  })]
170
191
  })
192
+ }), /*#__PURE__*/_jsx(Divider, {
193
+ className: "divider_sty"
171
194
  }), /*#__PURE__*/_jsx(AddOptions, {
172
195
  edit: edit,
173
196
  onUpdate: onUpdate,
@@ -15,6 +15,7 @@ const FilterProperty = props => {
15
15
  } = props;
16
16
  const handleChangeOption = m => () => {
17
17
  onEvent("addSort", {
18
+ key: edit?.key,
18
19
  ...(sort[0] || {}),
19
20
  newKey: edit?.key,
20
21
  operator: m?.operator
@@ -96,7 +96,7 @@ const PropertySettings = props => {
96
96
  },
97
97
  transformOrigin: {
98
98
  vertical: "top",
99
- horizontal: "left"
99
+ horizontal: "right"
100
100
  },
101
101
  onClose: onClose,
102
102
  anchor: "bottom",
@@ -68,7 +68,7 @@ const useOptionsStyles = (theme, appTheme) => ({
68
68
  },
69
69
  color: `${appTheme?.palette?.editor?.tv_text} !important`,
70
70
  "& svg": {
71
- width: "16px",
71
+ // width: "16px",
72
72
  '& path': {
73
73
  stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
74
74
  }
@@ -154,6 +154,9 @@ const useOptionsStyles = (theme, appTheme) => ({
154
154
  addProperty: {
155
155
  padding: "12px",
156
156
  width: "253px",
157
+ "& .divider_sty": {
158
+ borderBottom: `1px solid ${appTheme?.palette?.editor?.tv_border}`
159
+ },
157
160
  "& .fe-dv-ap-title": {
158
161
  display: "flex",
159
162
  fontWeight: "600",
@@ -42,10 +42,10 @@ const useTableStyles = (theme, appTheme) => ({
42
42
  '& .MuiButton-startIcon': {
43
43
  background: appTheme?.palette?.editor?.tv_ico_bg,
44
44
  borderRadius: '4px',
45
- padding: '2px',
45
+ padding: '4px',
46
46
  "& svg": {
47
- width: '16px',
48
- height: '16px'
47
+ width: '14px',
48
+ height: '14px'
49
49
  }
50
50
  },
51
51
  "&.ico": {
@@ -57,11 +57,11 @@ const useTableStyles = (theme, appTheme) => ({
57
57
  }
58
58
  },
59
59
  "&:hover": {
60
- color: "rgba(37, 99, 235, 1)",
60
+ color: appTheme?.palette?.editor?.tv_hover_text,
61
61
  "& svg": {
62
- color: "rgba(37, 99, 235, 1)",
62
+ color: appTheme?.palette?.editor?.tv_hover_text,
63
63
  '& path': {
64
- stroke: "rgba(37, 99, 235, 1)"
64
+ stroke: appTheme?.palette?.editor?.tv_hover_text
65
65
  }
66
66
  }
67
67
  }
@@ -32,7 +32,7 @@ const multiSortRows = (rows, criteria, columnConfig) => {
32
32
  key,
33
33
  operator
34
34
  } of criteria) {
35
- const column = columnConfig.find(col => col.key === key);
35
+ const column = columnConfig?.find(col => col.key === key);
36
36
  if (!column) continue;
37
37
  const dataType = column.type;
38
38
  const valueA = a[key];
@@ -40,7 +40,7 @@ const multiSortRows = (rows, criteria, columnConfig) => {
40
40
  let comparison = 0;
41
41
  switch (dataType) {
42
42
  case "text":
43
- comparison = valueA.localeCompare(valueB, undefined, {
43
+ comparison = valueA?.localeCompare(valueB, undefined, {
44
44
  sensitivity: "base"
45
45
  });
46
46
  break;
@@ -49,8 +49,9 @@ const multiSortRows = (rows, criteria, columnConfig) => {
49
49
  break;
50
50
  case "select":
51
51
  case "multi-select":
52
- if (Array.isArray(valueA) && Array.isArray(valueB)) {
53
- comparison = Array.isArray(valueA) ? valueA?.map(m => m?.value).join(", ").localeCompare(valueB?.map(m => m?.value).join(", "), undefined, {
52
+ case "person":
53
+ if (Array?.isArray(valueA) && Array?.isArray(valueB)) {
54
+ comparison = Array?.isArray(valueA) ? valueA?.map(m => m?.value)?.join(", ")?.localeCompare(valueB?.map(m => m?.value).join(", "), undefined, {
54
55
  sensitivity: "base"
55
56
  }) : 0;
56
57
  }
@@ -59,7 +60,20 @@ const multiSortRows = (rows, criteria, columnConfig) => {
59
60
  comparison = sortByDate(valueA, valueB);
60
61
  break;
61
62
  case "check":
62
- return valueA && operator === "desc" ? 1 : -1;
63
+ if (operator === "desc") {
64
+ if (valueA) {
65
+ return 1;
66
+ } else {
67
+ return -1;
68
+ }
69
+ } else {
70
+ if (valueA) {
71
+ return -1;
72
+ } else {
73
+ return 1;
74
+ }
75
+ }
76
+ // return valueA && operator === "desc" ? 1 : valueB && operator === "asc" ;
63
77
  default:
64
78
  break;
65
79
  }
@@ -402,7 +402,6 @@ const Form = props => {
402
402
  borderStyle: borderStyle || "solid",
403
403
  background: bgColor || "transparent",
404
404
  position: "relative",
405
- lineHeight: 1.43,
406
405
  ...formSX
407
406
  },
408
407
  ref: formEle,