@flozy/editor 5.1.4 → 5.1.6

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 (151) hide show
  1. package/dist/Editor/ChatEditor.js +25 -34
  2. package/dist/Editor/CommonEditor.js +15 -9
  3. package/dist/Editor/Editor.css +56 -12
  4. package/dist/Editor/Elements/AI/AIInput.js +0 -1
  5. package/dist/Editor/Elements/AI/CustomSelect.js +17 -10
  6. package/dist/Editor/Elements/AI/Styles.js +7 -1
  7. package/dist/Editor/Elements/Button/EditorButton.js +1 -1
  8. package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -1
  9. package/dist/Editor/Elements/Color Picker/ColorButtons.js +7 -5
  10. package/dist/Editor/Elements/Color Picker/Styles.js +7 -3
  11. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  12. package/dist/Editor/Elements/DataView/DataView.js +101 -0
  13. package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
  14. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +59 -0
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +30 -0
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +140 -0
  17. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +59 -0
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +26 -0
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +38 -0
  21. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
  22. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
  23. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
  24. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
  25. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
  26. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
  27. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
  28. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
  29. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
  30. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
  31. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
  32. package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
  33. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
  34. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
  35. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
  36. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +62 -0
  37. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
  38. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
  39. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
  40. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
  41. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
  42. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
  43. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
  44. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
  45. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +100 -0
  46. package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
  47. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +70 -0
  48. package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
  49. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +288 -0
  50. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
  51. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +72 -0
  52. package/dist/Editor/Elements/DataView/styles.js +143 -0
  53. package/dist/Editor/Elements/Divider/Divider.js +15 -14
  54. package/dist/Editor/Elements/Form/Form.js +38 -2
  55. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
  56. package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
  57. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
  58. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
  59. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
  60. package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
  61. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
  62. package/dist/Editor/Elements/Form/FormPopup.js +12 -9
  63. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  64. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
  65. package/dist/Editor/Elements/Grid/GridButton.js +2 -1
  66. package/dist/Editor/Elements/Grid/GridItem.js +12 -0
  67. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  68. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  69. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  70. package/dist/Editor/Elements/Signature/SignaturePopup.js +13 -48
  71. package/dist/Editor/Elements/SimpleText/index.js +8 -1
  72. package/dist/Editor/Elements/SimpleText/style.js +8 -1
  73. package/dist/Editor/Elements/Table/AddRowCol.js +77 -0
  74. package/dist/Editor/Elements/Table/DragButton.js +141 -0
  75. package/dist/Editor/Elements/Table/DragStyles.js +70 -0
  76. package/dist/Editor/Elements/Table/Draggable.js +25 -0
  77. package/dist/Editor/Elements/Table/Droppable.js +53 -0
  78. package/dist/Editor/Elements/Table/Styles.js +25 -43
  79. package/dist/Editor/Elements/Table/Table.js +205 -138
  80. package/dist/Editor/Elements/Table/TableCell.js +355 -102
  81. package/dist/Editor/Elements/Table/TablePopup.js +9 -3
  82. package/dist/Editor/Elements/Table/TableRow.js +10 -2
  83. package/dist/Editor/Elements/Table/TableTool.js +101 -0
  84. package/dist/Editor/Elements/Table/tableHelper.js +71 -0
  85. package/dist/Editor/Styles/EditorStyles.js +3 -1
  86. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +10 -0
  87. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +7 -11
  88. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +10 -4
  89. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +3 -0
  90. package/dist/Editor/Toolbar/FormatTools/TextSize.js +0 -2
  91. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
  92. package/dist/Editor/Toolbar/Mini/Styles.js +4 -1
  93. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
  94. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +16 -11
  95. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +416 -49
  96. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +62 -8
  97. package/dist/Editor/Toolbar/PopupTool/index.js +5 -6
  98. package/dist/Editor/Toolbar/Toolbar.js +6 -0
  99. package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
  100. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  101. package/dist/Editor/assets/svg/TableIcons.js +220 -0
  102. package/dist/Editor/common/ColorPickerButton.js +3 -2
  103. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  104. package/dist/Editor/common/Icon.js +24 -23
  105. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -1
  106. package/dist/Editor/common/LinkSettings/index.js +2 -1
  107. package/dist/Editor/common/MentionsPopup/Styles.js +151 -3
  108. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  109. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +108 -12
  110. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
  111. package/dist/Editor/common/Select/index.js +20 -0
  112. package/dist/Editor/common/Select/styles.js +17 -0
  113. package/dist/Editor/common/Shorthands/elements.js +13 -1
  114. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -0
  115. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +8 -4
  116. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
  117. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  118. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
  119. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
  120. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +5 -2
  121. package/dist/Editor/common/StyleBuilder/formStyle.js +268 -149
  122. package/dist/Editor/common/StyleBuilder/index.js +84 -11
  123. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
  124. package/dist/Editor/common/StyleBuilder/tableStyle.js +69 -25
  125. package/dist/Editor/common/SwipeableDrawer/style.js +15 -4
  126. package/dist/Editor/common/Uploader.js +8 -0
  127. package/dist/Editor/common/iconListV2.js +378 -40
  128. package/dist/Editor/common/iconslist.js +23 -17
  129. package/dist/Editor/commonStyle.js +126 -9
  130. package/dist/Editor/helper/deserialize/index.js +4 -1
  131. package/dist/Editor/helper/index.js +2 -2
  132. package/dist/Editor/helper/theme.js +24 -1
  133. package/dist/Editor/hooks/useMouseMove.js +5 -2
  134. package/dist/Editor/hooks/useTable.js +195 -0
  135. package/dist/Editor/plugins/withCustomDeleteBackward.js +3 -2
  136. package/dist/Editor/plugins/withHTML.js +17 -1
  137. package/dist/Editor/plugins/withLayout.js +48 -1
  138. package/dist/Editor/utils/SlateUtilityFunctions.js +18 -0
  139. package/dist/Editor/utils/button.js +4 -4
  140. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +21 -0
  141. package/dist/Editor/utils/dataView.js +43 -0
  142. package/dist/Editor/utils/embed.js +2 -1
  143. package/dist/Editor/utils/events.js +0 -1
  144. package/dist/Editor/utils/font.js +11 -4
  145. package/dist/Editor/utils/formfield.js +8 -4
  146. package/dist/Editor/utils/helper.js +67 -2
  147. package/dist/Editor/utils/insertNewLine.js +19 -1
  148. package/dist/Editor/utils/pageSettings.js +14 -2
  149. package/dist/Editor/utils/serializeToText.js +2 -0
  150. package/dist/Editor/utils/table.js +228 -24
  151. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
- import { Autocomplete, Checkbox, FormControlLabel, MenuItem, Select, TextField, Typography, createFilterOptions } from "@mui/material";
1
+ import { Autocomplete, Checkbox, FormControlLabel, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  import { useSlate } from "slate-react";
4
+ import Select from "../Select";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  import { Fragment as _Fragment } from "react/jsx-runtime";
6
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -5,13 +5,14 @@ import DialogContent from "@mui/material/DialogContent";
5
5
  import DialogActions from "@mui/material/DialogActions";
6
6
  import IconButton from "@mui/material/IconButton";
7
7
  import CloseIcon from "@mui/icons-material/Close";
8
- import { Box, FormControl, FormControlLabel, Grid, MenuItem, Radio, RadioGroup, Select, Typography } from "@mui/material";
8
+ import { Box, FormControl, FormControlLabel, Grid, MenuItem, Radio, RadioGroup, Typography } from "@mui/material";
9
9
  import { useState } from "react";
10
10
  import LinkSettingsStyles from "./style";
11
11
  import { getNavOptions } from "./navOptions";
12
12
  import { ScrollTopBottom, SelectPage, TextInput, Trigger } from "./NavComponents";
13
13
  import SwipeableDrawer from "../SwipeableDrawer";
14
14
  import { useEditorContext } from "../../hooks/useMouseMove";
15
+ import Select from "../Select";
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
18
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -5,7 +5,154 @@ const usePopupStyles = theme => ({
5
5
  borderRadius: "10px",
6
6
  padding: "0px",
7
7
  boxShadow: "0px 4px 10px 0px #00000029",
8
- overflow: "hidden"
8
+ overflow: "hidden",
9
+ padding: "8px 0px !important",
10
+ background: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
11
+ "& .MuiPaper-root": {
12
+ background: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
13
+ "& .MuiBox-root": {
14
+ "& .renderComp": {
15
+ padding: "2px 0px 2px 1px",
16
+ background: "transparent !important",
17
+ "&:hover": {
18
+ borderRadius: "10px",
19
+ background: `${theme?.palette?.editor?.menuOptionHoverBackground} !important`
20
+ }
21
+ },
22
+ "& button": {
23
+ padding: "0px 0px 0px 4px !important",
24
+ "& svg": {
25
+ width: "18px !important",
26
+ margin: "5px 12px 6px 6px !important"
27
+ },
28
+ "&:hover": {
29
+ borderRadius: "10px",
30
+ background: `${theme?.palette?.editor?.menuOptionHoverBackground} !important`
31
+ }
32
+ },
33
+ "& .active": {
34
+ border: "unset !important",
35
+ "& .MuiPaper-root": {
36
+ background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`,
37
+ borderRadius: "7px",
38
+ "& .MuiBox-root": {
39
+ "& .MuiCardContent-root": {
40
+ "& .MuiTypography-root": {
41
+ color: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "& button": {
47
+ background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`,
48
+ borderRadius: "7px",
49
+ "& svg": {
50
+ "& path": {
51
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor}`
52
+ }
53
+ },
54
+ "& span": {
55
+ "& .MuiTypography-root": {
56
+ color: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
57
+ }
58
+ },
59
+ "& .BrainIcon": {
60
+ "& .bainIconPathStroke": {
61
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
62
+ stroke: "unset !important"
63
+ },
64
+ "& .bainIconPathStroke2": {
65
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
66
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
67
+ }
68
+ }
69
+ },
70
+ "& .MuiCardMedia-root": {
71
+ "& .signatureElementIcon": {
72
+ "& path": {
73
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
74
+ }
75
+ },
76
+ "& .commonSvgStyle": {
77
+ "& path": {
78
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
79
+ }
80
+ },
81
+ "& .calederIconSvg": {
82
+ "& path": {
83
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
84
+ },
85
+ "& rect": {
86
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
87
+ }
88
+ },
89
+ "& .colorBoxElementIcon": {
90
+ "& path": {
91
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
92
+ fill: "none"
93
+ }
94
+ },
95
+ "& .gridElementIcon": {
96
+ "& path": {
97
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
98
+ }
99
+ },
100
+ "& .newLineElementIcon": {
101
+ "& path": {
102
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
103
+ }
104
+ },
105
+ "& .blockQuoteSvg": {
106
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
107
+ },
108
+ "& .orderedListIcon": {
109
+ "& path": {
110
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
111
+ },
112
+ "& text": {
113
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
114
+ }
115
+ },
116
+ "& .bulletedListTextIcon": {
117
+ "& path": {
118
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
119
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
120
+ },
121
+ "& circle": {
122
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
123
+ }
124
+ },
125
+ "& .checkedListTextIcon": {
126
+ "& path": {
127
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
128
+ }
129
+ },
130
+ "& .accordianListTextIcon": {
131
+ // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
132
+ "& svg": {
133
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
134
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
135
+ },
136
+ "& path": {
137
+ fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
138
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
139
+ }
140
+ },
141
+ "& .accordianIconSvgTextFormat": {
142
+ "& path": {
143
+ stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
144
+ }
145
+ }
146
+ }
147
+ },
148
+ "&:hover": {
149
+ "& .MuiPaper-root": {
150
+ background: `${theme?.palette?.editor?.menuOptionHoverBackground} !important`,
151
+ borderRadius: "7px"
152
+ }
153
+ }
154
+ }
155
+ }
9
156
  },
10
157
  papper: {
11
158
  boxShadow: "none",
@@ -28,7 +175,7 @@ const usePopupStyles = theme => ({
28
175
  marginBottom: "10px",
29
176
  fontSize: "14px",
30
177
  fontWeight: "bold",
31
- borderBottom: "1px solid #DCE4EC"
178
+ borderBottom: `1px solid ${theme?.palette?.editor?.deviderBgColor}`
32
179
  },
33
180
  listItem: {
34
181
  cursor: "pointer",
@@ -76,7 +223,8 @@ const usePopupStyles = theme => ({
76
223
  margin: "8px",
77
224
  display: "flex",
78
225
  justifyContent: "center",
79
- alignItems: "center"
226
+ alignItems: "center",
227
+ color: "#64748B"
80
228
  }
81
229
  });
82
230
  export default usePopupStyles;
@@ -97,7 +97,7 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
97
97
  id: `cmd-li-ind-${index}}`,
98
98
  component: "div",
99
99
  onClick: handleClick(char, i),
100
- className: `${i === index ? "active" : " "} ${char.renderComponent ? "renderComp" : ""}`,
100
+ className: `${type !== 'elements' && i === index ? "active" : " "} ${char.renderComponent ? "renderComp" : ""}`,
101
101
  sx: classes.listItem,
102
102
  ref: i === index ? papperRef : null,
103
103
  children: char.renderComponent ? char.renderComponent({
@@ -1,10 +1,13 @@
1
1
  import React from "react";
2
2
  import { Transforms, Node } from "slate";
3
- import { Box } from "@mui/material";
3
+ import { Accordion, AccordionDetails, AccordionSummary, Box, createTheme, ThemeProvider, Typography } from "@mui/material";
4
4
  import { StyleContent } from "../../../StyleBuilder";
5
- import formStyle from "../../../StyleBuilder/formStyle";
5
+ import { formStyle } from "../../../StyleBuilder/formStyle";
6
6
  import { ReactEditor } from "slate-react";
7
+ import { ExpandMoreOutlined } from "@mui/icons-material";
8
+ import { useEditorContext } from "../../../../hooks/useMouseMove";
7
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
11
  const FormSettings = props => {
9
12
  const {
10
13
  editor,
@@ -14,7 +17,13 @@ const FormSettings = props => {
14
17
  const item_path = path?.split("|").map(m => parseInt(m));
15
18
  const element_path = [...item_path];
16
19
  const element = Node.get(editor, element_path);
17
- const styleMaps = formStyle?.filter(f => !f?.hideOnFGS);
20
+ const styleMaps = formStyle;
21
+ const {
22
+ hideTools
23
+ } = customProps || {};
24
+ const {
25
+ theme
26
+ } = useEditorContext();
18
27
  const onChange = data => {
19
28
  const currentPath = ReactEditor.findPath(editor, element);
20
29
  const updateData = {
@@ -26,23 +35,110 @@ const FormSettings = props => {
26
35
  }, {
27
36
  at: [...currentPath, 0]
28
37
  });
38
+ // adding form field style to the current form node
39
+ const currentNode = Node.get(editor, element_path);
40
+ if (currentNode) {
41
+ currentNode?.children[0]?.children?.forEach((item, index) => {
42
+ Transforms.setNodes(editor, {
43
+ bgColor: data?.fieldBgColor ? data?.fieldBgColor : item?.bgColor,
44
+ borderColor: data?.fieldBorderColor ? data?.fieldBorderColor : item?.borderColor,
45
+ borderStyle: data?.fieldBorderStyle ? data?.fieldBorderStyle : item?.borderStyle,
46
+ borderWidth: data?.fieldBorderWidth ? data?.fieldBorderWidth : item?.borderWidth,
47
+ textColor: data?.fieldTextColor ? data?.fieldTextColor : item?.textColor,
48
+ fontFamily: data?.fieldFontFamily ? data?.fieldFontFamily : item?.fontFamily,
49
+ textSize: data?.fieldTextSize ? data?.fieldTextSize : item?.textSize,
50
+ fontWeight: data?.fieldFontWeight ? data?.fieldFontWeight : item?.fontWeight
51
+ }, {
52
+ at: [...currentPath, 0, index]
53
+ });
54
+ });
55
+ }
29
56
  };
30
57
  const handleClose = () => {
31
58
  console.log("close");
32
59
  };
60
+ const muiTheme = createTheme({
61
+ components: {
62
+ MuiAccordion: {
63
+ styleOverrides: {
64
+ root: {
65
+ background: theme?.palette?.editor?.miniToolBarBackground,
66
+ "& .MuiAccordionSummary-root": {
67
+ flexDirection: "row-reverse",
68
+ "& .MuiSvgIcon-root": {
69
+ color: theme?.palette?.primary?.main
70
+ },
71
+ "& .Mui-expanded": {
72
+ "& .MuiSvgIcon-root": {
73
+ color: theme?.palette?.text?.blueText
74
+ }
75
+ }
76
+ },
77
+ padding: "0px",
78
+ "&.Mui-expanded": {
79
+ margin: "0"
80
+ }
81
+ }
82
+ },
83
+ defaultProps: {
84
+ elevation: 0
85
+ }
86
+ }
87
+ }
88
+ });
33
89
  return /*#__PURE__*/_jsx(Box, {
34
90
  component: "div",
35
91
  className: "item-w",
36
92
  children: styleMaps?.map((m, i) => {
37
- return /*#__PURE__*/_jsx(StyleContent, {
38
- renderTabs: styleMaps,
39
- value: m.value,
40
- element: element,
41
- customElement: element?.children?.[0] || null,
42
- onChange: onChange,
43
- customProps: customProps,
44
- handleClose: handleClose
45
- }, `tab_${m.value}_$${i}`);
93
+ if (m?.hasChildrenTabs) {
94
+ return /*#__PURE__*/_jsx(ThemeProvider, {
95
+ theme: muiTheme,
96
+ children: /*#__PURE__*/_jsxs(Accordion, {
97
+ defaultExpanded: true,
98
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
99
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
100
+ sx: {
101
+ padding: "0px"
102
+ },
103
+ children: /*#__PURE__*/_jsx(Typography, {
104
+ variant: "body1",
105
+ className: "settingsHeader",
106
+ color: "primary",
107
+ style: {
108
+ fontSize: "14px !important",
109
+ fontWeight: "400"
110
+ },
111
+ children: m?.tab
112
+ })
113
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
114
+ sx: {
115
+ padding: "5px"
116
+ },
117
+ children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
118
+ return /*#__PURE__*/_jsx(StyleContent, {
119
+ renderTabs: [field],
120
+ value: field.value,
121
+ element: element,
122
+ onChange: onChange,
123
+ customElement: element?.children?.[0] || null,
124
+ customProps: customProps,
125
+ handleClose: handleClose
126
+ }, `tab_${field.value}_${index}`);
127
+ })
128
+ })]
129
+ }, `accordion_${i}`)
130
+ }, i);
131
+ } else {
132
+ return /*#__PURE__*/_jsx(StyleContent, {
133
+ renderTabs: styleMaps,
134
+ value: m.value,
135
+ element: element,
136
+ customElement: element?.children?.[0] || null,
137
+ onChange: onChange,
138
+ customProps: customProps,
139
+ handleClose: handleClose
140
+ }, `tab_${m.value}_$${i}`);
141
+ }
46
142
  })
47
143
  });
48
144
  };
@@ -3,24 +3,35 @@ import PersonalVideoIcon from "@mui/icons-material/PersonalVideo";
3
3
  import PhoneIphoneIcon from "@mui/icons-material/PhoneIphone";
4
4
  import useSwitchViewport from "./styles";
5
5
  import { useEffect } from "react";
6
+ import { useEditorContext } from "../../../hooks/useMouseMove";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const SwitchViewport = props => {
9
10
  const {
10
11
  breakpoint,
11
- onChange
12
+ onChange,
13
+ show
12
14
  } = props;
13
15
  const classes = useSwitchViewport();
16
+ const {
17
+ setSelectedElement,
18
+ setActiveBreakPoint
19
+ } = useEditorContext();
14
20
  useEffect(() => {
15
- console.log(breakpoint);
21
+ // to reset selection on viewport changes - FS-6589
22
+ setSelectedElement({});
16
23
  }, [breakpoint]);
17
24
  return /*#__PURE__*/_jsxs(Box, {
18
25
  sx: classes.root,
26
+ style: {
27
+ display: show ? "block" : "none"
28
+ },
19
29
  children: [/*#__PURE__*/_jsx(Tooltip, {
20
30
  title: "Desktop View",
21
31
  children: /*#__PURE__*/_jsx(IconButton, {
22
32
  className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
23
33
  onClick: () => {
34
+ setActiveBreakPoint("");
24
35
  onChange("");
25
36
  },
26
37
  children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
@@ -30,6 +41,7 @@ const SwitchViewport = props => {
30
41
  children: /*#__PURE__*/_jsx(IconButton, {
31
42
  className: `${breakpoint === "xs" ? "active" : ""}`,
32
43
  onClick: () => {
44
+ setActiveBreakPoint("xs");
33
45
  onChange("xs");
34
46
  },
35
47
  children: /*#__PURE__*/_jsx(PhoneIphoneIcon, {})
@@ -0,0 +1,20 @@
1
+ import { Select as Core } from "@mui/material";
2
+ import SelectStyles from "./styles";
3
+ import { useEditorContext } from "../../hooks/useMouseMove";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ function Select(props) {
6
+ const {
7
+ children,
8
+ ...rest
9
+ } = props;
10
+ const {
11
+ theme
12
+ } = useEditorContext();
13
+ const classes = SelectStyles(theme);
14
+ return /*#__PURE__*/_jsx(Core, {
15
+ MenuProps: classes.MenuProps,
16
+ ...rest,
17
+ children: children
18
+ });
19
+ }
20
+ export default Select;
@@ -0,0 +1,17 @@
1
+ const SelectStyles = (theme = {}) => {
2
+ const {
3
+ textColor,
4
+ background
5
+ } = theme?.palette?.editor || {};
6
+ return {
7
+ MenuProps: {
8
+ PaperProps: {
9
+ sx: {
10
+ color: textColor,
11
+ background
12
+ }
13
+ }
14
+ }
15
+ };
16
+ };
17
+ export default SelectStyles;
@@ -13,6 +13,7 @@ import { insertDivider } from "../../utils/divider";
13
13
  import { insertFreeGrid } from "../../utils/freegrid";
14
14
  import { Transforms } from "slate";
15
15
  import { insertInfinityAI } from "../../utils/infinityAI";
16
+ import { insertDataView } from "../../utils/dataView";
16
17
  import SearchButton from "../../Elements/Search/SearchButton";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  const ELEMENTS_LIST = [{
@@ -158,7 +159,7 @@ const ELEMENTS_LIST = [{
158
159
  renderComponent: rest => /*#__PURE__*/_jsx(SearchButton, {
159
160
  ...rest,
160
161
  element: {
161
- name: 'Brain'
162
+ name: "Brain"
162
163
  },
163
164
  icoBtnType: "cmd"
164
165
  })
@@ -262,6 +263,17 @@ const ELEMENTS_LIST = [{
262
263
  onInsert: editor => {
263
264
  insertInfinityAI(editor);
264
265
  }
266
+ }, {
267
+ name: "Dynamic Table",
268
+ group: "Dynamic Table",
269
+ desc: "",
270
+ type: "dataView",
271
+ icon: /*#__PURE__*/_jsx(Icon, {
272
+ icon: "dataView"
273
+ }),
274
+ onInsert: editor => {
275
+ insertDataView(editor);
276
+ }
265
277
  }];
266
278
  const elements = props => {
267
279
  const {
@@ -72,6 +72,11 @@ const BackgroundImage = props => {
72
72
  children: "REMOVE"
73
73
  }) : /*#__PURE__*/_jsx(Grid, {
74
74
  className: "uploadImageText",
75
+ sx: {
76
+ padding: 0,
77
+ background: `${theme?.palette?.editor?.inputFieldBgColor}`,
78
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
79
+ },
75
80
  children: /*#__PURE__*/_jsxs(Button, {
76
81
  component: "label",
77
82
  variant: "text",
@@ -135,7 +135,8 @@ const BannerSpacing = props => {
135
135
  value: pro_value?.top,
136
136
  className: "borderInput removeScroll",
137
137
  style: {
138
- ...squreStyle.topRight
138
+ ...squreStyle.topRight,
139
+ ...classes.customPaddingInput
139
140
  },
140
141
  onChange: handleChange,
141
142
  placeholder: "0"
@@ -148,7 +149,8 @@ const BannerSpacing = props => {
148
149
  value: pro_value?.right,
149
150
  className: "borderInput removeScroll",
150
151
  style: {
151
- ...squreStyle.bottomLeft
152
+ ...squreStyle.bottomLeft,
153
+ ...classes.customPaddingInput
152
154
  },
153
155
  onChange: handleChange,
154
156
  placeholder: "0"
@@ -161,7 +163,8 @@ const BannerSpacing = props => {
161
163
  value: pro_value?.bottom,
162
164
  className: "borderInput removeScroll",
163
165
  style: {
164
- ...squreStyle.bottomRight
166
+ ...squreStyle.bottomRight,
167
+ ...classes.customPaddingInput
165
168
  },
166
169
  onChange: handleChange,
167
170
  placeholder: "0"
@@ -174,7 +177,8 @@ const BannerSpacing = props => {
174
177
  value: pro_value?.left,
175
178
  className: "borderInput removeScroll",
176
179
  style: {
177
- ...squreStyle.topLeft
180
+ ...squreStyle.topLeft,
181
+ ...classes.customPaddingInput
178
182
  },
179
183
  onChange: handleChange,
180
184
  placeholder: "0"
@@ -1,6 +1,7 @@
1
1
  import { Box, Card, Checkbox, FormControlLabel, Grid, Tooltip, Typography } from "@mui/material";
2
2
  import React from "react";
3
3
  import Icon from "../../Icon";
4
+ import { useEditorContext } from "../../../hooks/useMouseMove";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  import { Fragment as _Fragment } from "react/jsx-runtime";
6
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -15,7 +16,10 @@ const RenderCard = ({
15
16
  return /*#__PURE__*/_jsx(Card, {
16
17
  sx: {
17
18
  position: 'relative',
18
- padding: "10px"
19
+ padding: "10px",
20
+ '& .MuiCheckbox-root svg': {
21
+ fill: 'unset !important'
22
+ }
19
23
  },
20
24
  children: /*#__PURE__*/_jsx(FormControlLabel, {
21
25
  control: /*#__PURE__*/_jsx(Checkbox, {
@@ -81,6 +85,9 @@ const CardsMapping = props => {
81
85
  selectedCard,
82
86
  infoIcon
83
87
  } = data;
88
+ const {
89
+ theme
90
+ } = useEditorContext();
84
91
  const activeCard = value === selectedCard;
85
92
  const handleChange = e => {
86
93
  if (selectedCard === data?.value) {
@@ -99,7 +106,8 @@ const CardsMapping = props => {
99
106
  sx: {
100
107
  marginBottom: "12px",
101
108
  "& .MuiPaper-root": {
102
- border: activeCard ? "1px solid #2563EB" : "1px solid #C8D8FA",
109
+ background: theme?.palette?.editor?.miniToolBarBackground,
110
+ border: activeCard ? "1px solid #2563EB" : `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
103
111
  borderRadius: "8px",
104
112
  boxShadow: activeCard ? "0px 4px 16px 0px #2563EB40" : "unset"
105
113
  }
@@ -18,6 +18,7 @@ import FontSize from "./fontSize";
18
18
  import SelectSwitch from "./selectSwitch";
19
19
  import CardsMapping from "./card";
20
20
  import MetaDataMapping from "./metaDataMapping";
21
+ import LineSpacing from "./lineSpacing";
21
22
  const FieldMap = {
22
23
  text: Text,
23
24
  bannerSpacing: BannerSpacing,
@@ -38,6 +39,7 @@ const FieldMap = {
38
39
  fontSize: FontSize,
39
40
  selectSwitch: SelectSwitch,
40
41
  card: CardsMapping,
41
- metadatamapping: MetaDataMapping
42
+ metadatamapping: MetaDataMapping,
43
+ lineSpacing: LineSpacing
42
44
  };
43
45
  export default FieldMap;
@@ -0,0 +1,79 @@
1
+ import React, { useState } from "react";
2
+ import { Grid, Slider, Typography, Box } from "@mui/material";
3
+ import { getBreakPointsValue } from "../../../helper/theme";
4
+ import useWindowResize from "../../../hooks/useWindowResize";
5
+ import { useEditorContext } from "../../../hooks/useMouseMove";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ const LineSpacing = props => {
9
+ const {
10
+ value: val,
11
+ data,
12
+ onChange
13
+ } = props;
14
+ const {
15
+ theme
16
+ } = useEditorContext();
17
+ const {
18
+ key
19
+ } = data;
20
+ const [size] = useWindowResize();
21
+ const pro_value = getBreakPointsValue(val, size?.device);
22
+ const [value, setValue] = useState(pro_value);
23
+ let breakpointValue = getBreakPointsValue(val, null);
24
+ breakpointValue = typeof breakpointValue['lg'] === 'object' ? breakpointValue['lg'] : breakpointValue;
25
+ useState(() => {
26
+ setValue(pro_value);
27
+ }, [pro_value]);
28
+ const handleChange = e => {
29
+ onChange({
30
+ [key]: {
31
+ ...breakpointValue,
32
+ [size?.device]: e.target.value
33
+ }
34
+ });
35
+ };
36
+ return /*#__PURE__*/_jsxs(Grid, {
37
+ item: true,
38
+ xs: 12,
39
+ children: [/*#__PURE__*/_jsx(Typography, {
40
+ variant: "body1",
41
+ color: "primary",
42
+ style: {
43
+ fontSize: "14px",
44
+ fontWeight: 500
45
+ },
46
+ children: data?.label
47
+ }), /*#__PURE__*/_jsxs(Grid, {
48
+ container: true,
49
+ wrap: "nowrap",
50
+ className: "sld-wrpr",
51
+ children: [/*#__PURE__*/_jsx(Slider, {
52
+ className: "spacingSlider",
53
+ defaultValue: value || 1.43,
54
+ "aria-label": "Default",
55
+ valueLabelDisplay: "auto",
56
+ min: 0.5,
57
+ max: 3.0,
58
+ step: 0.1,
59
+ name: "lineHeight",
60
+ onChange: handleChange
61
+ }), /*#__PURE__*/_jsx(Box, {
62
+ component: "input",
63
+ sx: {
64
+ background: theme?.palette?.editor?.background,
65
+ color: theme?.palette?.editor?.textColor
66
+ },
67
+ name: "lineHeight",
68
+ value: pro_value,
69
+ className: "sliderInput",
70
+ onChange: handleChange,
71
+ type: "number",
72
+ placeholder: "0",
73
+ disabled: true,
74
+ defaultValue: pro_value || 1.43
75
+ })]
76
+ })]
77
+ });
78
+ };
79
+ export default LineSpacing;