@flozy/editor 9.5.9 → 9.6.0

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 (259) hide show
  1. package/dist/Editor/ChatEditor.js +19 -26
  2. package/dist/Editor/CommonEditor.js +23 -139
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +9 -13
  5. package/dist/Editor/Elements/AI/AIInput.js +3 -5
  6. package/dist/Editor/Elements/AI/CustomSelect.js +5 -9
  7. package/dist/Editor/Elements/AI/PopoverAIInput.js +2 -4
  8. package/dist/Editor/Elements/Accordion/Accordion.js +3 -4
  9. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +1 -4
  10. package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -6
  11. package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +1 -4
  12. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  13. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -6
  14. package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +1 -4
  15. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +1 -4
  16. package/dist/Editor/Elements/Button/ButtonPopup.js +1 -4
  17. package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -6
  18. package/dist/Editor/Elements/Button/EditorButton.js +14 -31
  19. package/dist/Editor/Elements/Carousel/Carousel.js +4 -5
  20. package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -6
  21. package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -3
  22. package/dist/Editor/Elements/ChipText/ChipTextPopup.js +1 -4
  23. package/dist/Editor/Elements/CodeToText/CodeToText.js +4 -5
  24. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +2 -6
  25. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -60
  26. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  27. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  28. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  29. package/dist/Editor/Elements/Colorbox/ColorboxButton.js +2 -6
  30. package/dist/Editor/Elements/DataView/DataView.js +2 -5
  31. package/dist/Editor/Elements/DataView/DataViewButton.js +2 -6
  32. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -7
  33. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
  34. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +5 -25
  35. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +2 -7
  36. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +12 -13
  37. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +4 -7
  38. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +5 -7
  39. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +7 -9
  40. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -8
  41. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +3 -5
  42. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -6
  43. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +3 -5
  44. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -9
  45. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +38 -64
  46. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +2 -3
  47. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +2 -3
  48. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +6 -23
  49. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -4
  50. package/dist/Editor/Elements/DataView/Layouts/TableView.js +4 -6
  51. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  52. package/dist/Editor/Elements/DataView/Layouts/index.js +1 -3
  53. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +2 -5
  54. package/dist/Editor/Elements/DataView/styles.js +0 -13
  55. package/dist/Editor/Elements/Divider/Divider.js +3 -5
  56. package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
  57. package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
  58. package/dist/Editor/Elements/Embed/Embed.js +1 -4
  59. package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
  60. package/dist/Editor/Elements/Embed/Image.js +9 -14
  61. package/dist/Editor/Elements/Embed/Video.js +6 -9
  62. package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
  63. package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
  64. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
  65. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
  66. package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
  67. package/dist/Editor/Elements/Form/Form.js +9 -12
  68. package/dist/Editor/Elements/Form/FormButton.js +2 -6
  69. package/dist/Editor/Elements/Form/FormPopup.js +2 -3
  70. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
  71. package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
  72. package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
  73. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  74. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
  75. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  76. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +23 -67
  77. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -23
  78. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  79. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +5 -36
  80. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  81. package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -10
  82. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  83. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  84. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  85. package/dist/Editor/Elements/Grid/GridItem.js +8 -14
  86. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  87. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  88. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  89. package/dist/Editor/Elements/Link/Link.js +5 -8
  90. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  91. package/dist/Editor/Elements/List/CheckList.js +9 -14
  92. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  93. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
  94. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  95. package/dist/Editor/Elements/Search/SearchButton.js +3 -6
  96. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  97. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  98. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  99. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  100. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  101. package/dist/Editor/Elements/SimpleText/index.js +4 -5
  102. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  103. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  104. package/dist/Editor/Elements/Table/Table.js +11 -23
  105. package/dist/Editor/Elements/Table/TableCell.js +24 -2
  106. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  107. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  108. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  109. package/dist/Editor/Elements/Title/title.js +0 -10
  110. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  111. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  112. package/dist/Editor/MiniEditor.js +3 -10
  113. package/dist/Editor/Styles/EditorStyles.js +5 -5
  114. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  115. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  116. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  117. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  118. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  119. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  120. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -5
  121. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
  122. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  123. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -9
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  128. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  129. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  130. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +10 -20
  131. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +5 -10
  132. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +11 -71
  133. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  134. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +45 -128
  135. package/dist/Editor/Toolbar/PopupTool/index.js +17 -21
  136. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  137. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  138. package/dist/Editor/common/ColorPickerButton.js +14 -39
  139. package/dist/Editor/common/CustomDialog/index.js +10 -8
  140. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  141. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  142. package/dist/Editor/common/Icon.js +1 -46
  143. package/dist/Editor/common/ImageSelector/ImageSelector.js +8 -10
  144. package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
  145. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
  146. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  147. package/dist/Editor/common/ImageSelector/UploadStyles.js +9 -9
  148. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  149. package/dist/Editor/common/LinkSettings/index.js +14 -20
  150. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  151. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  152. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  153. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  154. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  155. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  156. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  163. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  164. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  165. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  166. package/dist/Editor/common/RnD/ElementSettings/styles.js +1 -0
  167. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  168. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  169. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +8 -20
  170. package/dist/Editor/common/RnD/Utils/gridDropItem.js +7 -56
  171. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  172. package/dist/Editor/common/RnD/VirtualElement/index.js +105 -188
  173. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -123
  174. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  175. package/dist/Editor/common/RnD/index.js +14 -59
  176. package/dist/Editor/common/Section/index.js +4 -7
  177. package/dist/Editor/common/Shorthands/elements.js +3 -74
  178. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  179. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  180. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  181. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  182. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  183. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  198. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  199. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  200. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  201. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  202. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  203. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  204. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  205. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  206. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  207. package/dist/Editor/common/Uploader.js +5 -16
  208. package/dist/Editor/commonStyle.js +12 -23
  209. package/dist/Editor/helper/index.js +15 -35
  210. package/dist/Editor/helper/theme.js +2 -202
  211. package/dist/Editor/hooks/useDrag.js +11 -17
  212. package/dist/Editor/hooks/useEditorScroll.js +6 -10
  213. package/dist/Editor/hooks/useMouseMove.js +13 -25
  214. package/dist/Editor/hooks/useTable.js +1 -1
  215. package/dist/Editor/plugins/withEmbeds.js +1 -1
  216. package/dist/Editor/plugins/withHTML.js +9 -11
  217. package/dist/Editor/plugins/withLayout.js +2 -3
  218. package/dist/Editor/plugins/withTable.js +1 -1
  219. package/dist/Editor/theme/ThemeList.js +173 -50
  220. package/dist/Editor/utils/SlateUtilityFunctions.js +49 -168
  221. package/dist/Editor/utils/draftToSlate.js +2 -3
  222. package/dist/Editor/utils/font.js +37 -40
  223. package/dist/Editor/utils/freegrid.js +2 -2
  224. package/dist/Editor/utils/helper.js +19 -90
  225. package/package.json +3 -3
  226. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -425
  227. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -436
  228. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  229. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  230. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  231. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  232. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  233. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  234. package/dist/Editor/common/CustomSelect.js +0 -43
  235. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  236. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -117
  237. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  238. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -281
  239. package/dist/Editor/common/SnackBar/index.js +0 -43
  240. package/dist/Editor/helper/textIndeces.js +0 -58
  241. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  242. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  243. package/dist/Editor/hooks/useThemeValues.js +0 -63
  244. package/dist/Editor/theme/index.js +0 -149
  245. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  246. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  247. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  248. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  249. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  250. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  251. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  252. package/dist/Editor/themeSettings/fonts/style.js +0 -61
  253. package/dist/Editor/themeSettings/icons.js +0 -60
  254. package/dist/Editor/themeSettings/index.js +0 -351
  255. package/dist/Editor/themeSettings/style.js +0 -220
  256. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  257. package/dist/Editor/themeSettingsAI/index.js +0 -355
  258. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  259. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -1,15 +1,11 @@
1
1
  import React, { useState } from "react";
2
- import { Box, IconButton, Popover, Typography, useTheme } from "@mui/material";
2
+ import { Box, IconButton, Popover } from "@mui/material";
3
3
  import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
4
4
  import Button from "../../common/Button";
5
5
  import { colors } from "./defaultColors";
6
6
  import ColorPicker from "./colorPicker.svg";
7
- import { useSlateStatic } from "slate-react";
8
- import { Transforms } from "slate";
9
- import { useEditorContext } from "../../hooks/useMouseMove";
10
7
  import { jsx as _jsx } from "react/jsx-runtime";
11
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
- import { Fragment as _Fragment } from "react/jsx-runtime";
13
9
  let c = [];
14
10
  const ColorChunks = (recentColors = []) => [...recentColors, ...colors].reduce((a, b, i) => {
15
11
  if (i % 7 === 0) {
@@ -36,8 +32,8 @@ const SingleColorButton = ({
36
32
  width: "100%",
37
33
  display: "flex",
38
34
  alignItems: "center",
39
- padding: padding || "8px 0px"
40
- // justifyContent: "center",
35
+ padding: padding || "8px 0px",
36
+ justifyContent: "center"
41
37
  },
42
38
  children: [crs.map(m => /*#__PURE__*/_jsx(Button, {
43
39
  onClick: handleSelect(m),
@@ -114,18 +110,12 @@ const ColorButtons = props => {
114
110
  openColorTool,
115
111
  onClose,
116
112
  onColorPickerClick,
117
- disableEditTheme,
118
113
  defaultColors = []
119
114
  } = props;
120
115
  const [row1, ...restRows] = ColorChunks([]);
121
116
  const [anchorEl, setAnchorEl] = useState(null);
122
117
  const open = Boolean(anchorEl);
123
118
  const firstRow = defaultColors?.length ? defaultColors : row1;
124
- const theme = useTheme();
125
- const editor = useSlateStatic();
126
- const {
127
- setOpenTheme
128
- } = useEditorContext();
129
119
  const handleMore = e => {
130
120
  setAnchorEl(e.currentTarget);
131
121
  };
@@ -138,7 +128,6 @@ const ColorButtons = props => {
138
128
  const handleSelect = color => () => {
139
129
  onSelect(color);
140
130
  };
141
- const colorVars = theme?.vars?.colors || {};
142
131
  return /*#__PURE__*/_jsxs(Box, {
143
132
  component: "span",
144
133
  sx: classes.colorButtons,
@@ -155,7 +144,7 @@ const ColorButtons = props => {
155
144
  activeColor: activeColor
156
145
  }, `si_btn_row1_${m}_${i}`);
157
146
  })
158
- }), /*#__PURE__*/_jsx(Popover, {
147
+ }), /*#__PURE__*/_jsxs(Popover, {
159
148
  open: open || openColorTool,
160
149
  anchorEl: anchorEl || openColorTool,
161
150
  onClose: handleClose,
@@ -169,40 +158,9 @@ const ColorButtons = props => {
169
158
  },
170
159
  sx: classes.colorPopper,
171
160
  className: "colorPopper",
172
- children: /*#__PURE__*/_jsxs(Box, {
161
+ children: [/*#__PURE__*/_jsx(Box, {
173
162
  sx: classes.colorButtonsInner,
174
- children: [Object.values(colorVars)?.length ? /*#__PURE__*/_jsxs(_Fragment, {
175
- children: [/*#__PURE__*/_jsxs(Box, {
176
- component: "div",
177
- className: "singleColorTitleWrapper",
178
- children: [/*#__PURE__*/_jsx(Typography, {
179
- variant: "subtitle2",
180
- children: "Theme colours"
181
- }), disableEditTheme ? null : /*#__PURE__*/_jsx("div", {
182
- className: "editBtn",
183
- onClick: () => {
184
- Transforms.deselect(editor, {
185
- at: editor.selection
186
- });
187
- handleClose();
188
- setOpenTheme("editThemeColor");
189
- },
190
- children: "Edit"
191
- })]
192
- }), /*#__PURE__*/_jsx(SingleColorButton, {
193
- crs: Object.values(colorVars),
194
- handleSelect: handleSelect,
195
- classes: classes,
196
- activeColor: activeColor
197
- })]
198
- }) : null, /*#__PURE__*/_jsx(Box, {
199
- component: "div",
200
- className: "singleColorTitleWrapper",
201
- children: /*#__PURE__*/_jsx(Typography, {
202
- variant: "subtitle2",
203
- children: "Custom colour"
204
- })
205
- }), restRows.map((m, i) => {
163
+ children: restRows.map((m, i) => {
206
164
  return /*#__PURE__*/_jsx(SingleColorButton, {
207
165
  id: `p2_${id}`,
208
166
  crs: m,
@@ -211,18 +169,14 @@ const ColorButtons = props => {
211
169
  classes: classes,
212
170
  activeColor: activeColor
213
171
  }, `si_btn_${m}_${i}`);
214
- }), forMiniTool ? /*#__PURE__*/_jsx(IconButton, {
215
- onClick: onColorPickerClick,
216
- style: {
217
- alignSelf: "start",
218
- margin: "6px"
219
- },
220
- children: /*#__PURE__*/_jsx("img", {
221
- src: ColorPicker,
222
- alt: "color wheel"
223
- })
224
- }) : null]
225
- })
172
+ })
173
+ }), forMiniTool ? /*#__PURE__*/_jsx(IconButton, {
174
+ onClick: onColorPickerClick,
175
+ children: /*#__PURE__*/_jsx("img", {
176
+ src: ColorPicker,
177
+ alt: "color wheel"
178
+ })
179
+ }) : null]
226
180
  })]
227
181
  });
228
182
  };
@@ -60,28 +60,4 @@
60
60
  padding: 0 15px !important;
61
61
  width: 60px !important;
62
62
  flex-shrink: 0;
63
- }
64
-
65
-
66
- .singleColorTitleWrapper {
67
- display: flex;
68
- justify-content: space-between;
69
- align-items: center;
70
- padding: 10px;
71
- width: 100%;
72
- border-bottom: 1px solid #DCE4EC;
73
- }
74
-
75
- .singleColorTitleWrapper .MuiTypography-root {
76
- font-weight: 600;
77
- }
78
-
79
- .singleColorTitleWrapper .editBtn {
80
- text-transform: none;
81
- color: #2563EB;
82
- text-decoration: underline;
83
- padding: 0px;
84
- min-width: unset;
85
- cursor: pointer;
86
- font-size: 14px;
87
- }
63
+ }
@@ -1,14 +1,13 @@
1
1
  import React, { useState } from "react";
2
2
  import { ReactEditor } from "slate-react";
3
- import { IconButton, Tooltip, Box, Popover, useTheme } from "@mui/material";
3
+ import ColorPickerTool from "react-gcolor-picker";
4
+ import { IconButton, Tooltip, Box, Popover } from "@mui/material";
4
5
  import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions";
5
6
  import ColorButtons from "./ColorButtons";
6
7
  import ColorPickerStyles from "./Styles";
7
8
  import colorWheel from "./colorWheel.png";
8
9
  import "./ColorPicker.css";
9
10
  import { useEditorContext } from "../../hooks/useMouseMove";
10
- import CustomColorPicker from "../../common/CustomColorPicker";
11
- import { getSelectedElementColor } from "../../utils/helper";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
13
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
14
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -26,8 +25,7 @@ const ColorPicker = props => {
26
25
  classes,
27
26
  forMiniTool,
28
27
  openColorTool,
29
- closeColorTool,
30
- type
28
+ closeColorTool
31
29
  } = props;
32
30
  const {
33
31
  theme
@@ -36,7 +34,6 @@ const ColorPicker = props => {
36
34
  const [anchorEl, setAnchorEl] = useState(null);
37
35
  const open = Boolean(anchorEl);
38
36
  const pickerStyles = ColorPickerStyles(theme);
39
- const muiTheme = useTheme();
40
37
  const onOpen = e => {
41
38
  e.preventDefault();
42
39
  setAnchorEl(e.currentTarget);
@@ -61,7 +58,7 @@ const ColorPicker = props => {
61
58
  setAnchorEl(null);
62
59
  setSelection(null);
63
60
  };
64
- const activeColor = type === "textColor" ? getSelectedElementColor(editor, format, muiTheme) : activeMark(editor, format) || DEFAULT_COLOR[format];
61
+ const activeColor = activeMark(editor, format) || DEFAULT_COLOR[format];
65
62
  return /*#__PURE__*/_jsxs(_Fragment, {
66
63
  children: [forMiniTool ? null : /*#__PURE__*/_jsx(Tooltip, {
67
64
  title: title,
@@ -99,10 +96,10 @@ const ColorPicker = props => {
99
96
  horizontal: "top"
100
97
  },
101
98
  sx: classes.colorPickerPopup,
102
- children: /*#__PURE__*/_jsx(CustomColorPicker, {
99
+ children: /*#__PURE__*/_jsx(ColorPickerTool, {
103
100
  gradient: true,
104
- onChange: handleFormSubmit,
105
- color: activeColor
101
+ value: activeColor,
102
+ onChange: handleFormSubmit
106
103
  })
107
104
  })]
108
105
  });
@@ -20,26 +20,24 @@ const ColorPickerStyles = theme => ({
20
20
  background: `${theme?.palette?.editor?.miniToolBarBackground}`,
21
21
  border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder} !important`,
22
22
  borderRadius: "7px !important",
23
- padding: "0px 10px",
24
- "@media only screen and (max-width: 600px)": {
23
+ padding: "0px 5px",
24
+ '@media only screen and (max-width: 600px)': {
25
25
  marginTop: "-40px"
26
26
  }
27
27
  }
28
28
  },
29
29
  colorButtonSingle: {
30
- border: "1.5px solid #DCE4EC !important",
31
30
  "&.active": {
32
- // "&:before": {
33
- // content: '" "',
34
- // position: "absolute",
35
- // top: "-4px",
36
- // left: "-4px",
37
- // width: "calc(100% + 8px)",
38
- // height: "calc(100% + 8px)",
39
- // border: "2px solid #2563EB",
40
- // borderRadius: "50%",
41
- // },
42
- outline: "2px solid #2563EB"
31
+ "&:before": {
32
+ content: '" "',
33
+ position: "absolute",
34
+ top: "-4px",
35
+ left: "-4px",
36
+ width: "calc(100% + 8px)",
37
+ height: "calc(100% + 8px)",
38
+ border: "2px solid #2563EB",
39
+ borderRadius: "50%"
40
+ }
43
41
  }
44
42
  },
45
43
  colorButtonsInner: {
@@ -61,7 +59,7 @@ const ColorPickerStyles = theme => ({
61
59
  width: "24px",
62
60
  height: "24px",
63
61
  margin: "0px 4px",
64
- border: "1.5px solid #DCE4EC"
62
+ border: "unset"
65
63
  }
66
64
  },
67
65
  colorPickerIcon: {
@@ -9,12 +9,8 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
9
9
  const ColorboxButton = props => {
10
10
  const editor = useSlateStatic();
11
11
  const {
12
- icoBtnType,
13
- customProps
12
+ icoBtnType
14
13
  } = props;
15
- const {
16
- translation
17
- } = customProps;
18
14
  const onClick = () => {
19
15
  toggleBlock(editor, "blockquote", false, {
20
16
  bgColor: "rgb(227, 236, 255)"
@@ -23,7 +19,7 @@ const ColorboxButton = props => {
23
19
  };
24
20
  return /*#__PURE__*/_jsx(_Fragment, {
25
21
  children: /*#__PURE__*/_jsx(ToolbarIcon, {
26
- title: translation("Colorbox"),
22
+ title: "Colorbox",
27
23
  onClick: onClick,
28
24
  icon: /*#__PURE__*/_jsx(Icon, {
29
25
  icon: "colorbox"
@@ -24,8 +24,7 @@ const DataView = props => {
24
24
  } = props;
25
25
  const {
26
26
  CHARACTERS,
27
- readOnly,
28
- translation
27
+ readOnly
29
28
  } = customProps || {};
30
29
  const {
31
30
  properties,
@@ -122,11 +121,9 @@ const DataView = props => {
122
121
  readOnly: readOnly,
123
122
  title: title,
124
123
  onTitleChange: onTitleChange,
125
- path: path,
126
- translation: translation
124
+ path: path
127
125
  }), /*#__PURE__*/_jsx(LayoutView, {
128
126
  readOnly: readOnly,
129
- translation: translation,
130
127
  children: children
131
128
  })]
132
129
  })
@@ -6,17 +6,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const DataViewButton = props => {
7
7
  const {
8
8
  editor,
9
- icoBtnType,
10
- customProps
9
+ icoBtnType
11
10
  } = props;
12
- const {
13
- translation
14
- } = customProps;
15
11
  const onClick = () => {
16
12
  insertDataView(editor);
17
13
  };
18
14
  return /*#__PURE__*/_jsx(ToolbarIcon, {
19
- title: translation("Dynamic Table"),
15
+ title: "Dynamic Table",
20
16
  onClick: onClick,
21
17
  icon: /*#__PURE__*/_jsx(Icon, {
22
18
  icon: "dataTable"
@@ -14,8 +14,7 @@ const ColumnView = props => {
14
14
  property,
15
15
  onSelect,
16
16
  selected,
17
- readOnly,
18
- translation
17
+ readOnly
19
18
  } = props;
20
19
  const {
21
20
  type
@@ -58,11 +57,7 @@ const ColumnView = props => {
58
57
  value: row[property?.key] || "",
59
58
  rowIndex: rowIndex,
60
59
  label: property?.label,
61
- readOnly: readOnly,
62
- settings: {
63
- wrapColumn: property?.wrapColumn
64
- },
65
- translation: translation
60
+ readOnly: readOnly
66
61
  }), needAnchor && !readOnly ? /*#__PURE__*/_jsx(Popper, {
67
62
  sx: classes.root,
68
63
  open: open,
@@ -40,14 +40,13 @@ export default function Select(props) {
40
40
  limitTags = 2,
41
41
  placeholder = "",
42
42
  disabled = false,
43
- optionAvatar = false,
44
- className = ""
43
+ optionAvatar = false
45
44
  } = props;
46
45
  const value = Array.isArray(pValue) ? pValue : [];
47
46
  const options = selectOptions?.length ? selectOptions.filter(s => s.value) : [];
48
47
  return /*#__PURE__*/_jsx(Autocomplete, {
49
48
  disabled: disabled,
50
- className: `tv-ac-field ${className}`,
49
+ className: "tv-ac-field",
51
50
  multiple: true,
52
51
  limitTags: limitTags,
53
52
  placeholder: placeholder,
@@ -103,7 +102,7 @@ export default function Select(props) {
103
102
  },
104
103
  renderTags: (value, getTagProps) => {
105
104
  return /*#__PURE__*/_jsx(Box, {
106
- className: `tv-ms-tag-wrpr ${className}`,
105
+ className: "tv-ms-tag-wrpr",
107
106
  sx: {
108
107
  "& svg": {
109
108
  marginRight: "5px",
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { useDataView } from "../../Providers/DataViewProvider";
3
- import MultiSelectWithPopover from "./Components/MultiSelect";
3
+ import Select from "./Components/Select";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  const MultiSelectType = props => {
6
6
  const {
@@ -9,16 +9,10 @@ const MultiSelectType = props => {
9
9
  value: pValue,
10
10
  options,
11
11
  label = "",
12
- readOnly,
13
- settings,
14
- translation
12
+ readOnly
15
13
  } = props;
16
14
  const {
17
- wrapColumn
18
- } = settings;
19
- const {
20
- onChange,
21
- onUpdateProperty
15
+ onChange
22
16
  } = useDataView();
23
17
  const value = Array.isArray(pValue) ? pValue : [];
24
18
  const coloredValues = [...(value || [])]?.map(m => {
@@ -32,28 +26,14 @@ const MultiSelectType = props => {
32
26
  [property]: data?.filter(f => f?.value)
33
27
  });
34
28
  };
35
- const handleUpdate = data => {
36
- const updateData = {
37
- "label": "Multi Select",
38
- "visible": true,
39
- "key": property,
40
- "type": "multi-select",
41
- "options": data
42
- };
43
- onUpdateProperty(updateData);
44
- };
45
- return /*#__PURE__*/_jsx(MultiSelectWithPopover, {
29
+ return /*#__PURE__*/_jsx(Select, {
46
30
  value: coloredValues,
47
31
  onChange: handleChange,
48
- onUpdate: handleUpdate,
49
32
  options: options,
50
33
  multiple: true,
51
34
  limitTags: 2,
52
35
  placeholder: label,
53
- disabled: readOnly,
54
- property: property,
55
- wrapColumn: wrapColumn,
56
- translation: translation
36
+ disabled: readOnly
57
37
  });
58
38
  };
59
39
  export default MultiSelectType;
@@ -8,12 +8,8 @@ const TextType = props => {
8
8
  rowIndex,
9
9
  property,
10
10
  value,
11
- readOnly,
12
- settings
11
+ readOnly
13
12
  } = props;
14
- const {
15
- wrapColumn
16
- } = settings;
17
13
  const {
18
14
  onChange
19
15
  } = useDataView();
@@ -38,8 +34,7 @@ const TextType = props => {
38
34
  onChange: handleChange,
39
35
  disabled: readOnly,
40
36
  id: `tv-text-input-${rowIndex}-${property}` // * should be unique
41
- ,
42
- multiline: wrapColumn
43
37
  });
44
38
  };
39
+
45
40
  export default TextType;
@@ -2,23 +2,22 @@ import React from "react";
2
2
  import { Box } from "@mui/material";
3
3
  import SimpleSelect from "../../DataTypes/Components/SimpleSelect";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
+ const SORT_LABELS = {
6
+ asc: "Ascending",
7
+ desc: "Descending"
8
+ };
9
+ const SORT_OPTIONS = [{
10
+ key: "asc",
11
+ label: SORT_LABELS.asc
12
+ }, {
13
+ key: "desc",
14
+ label: SORT_LABELS.desc
15
+ }];
5
16
  const ChooseSort = props => {
6
17
  const {
7
18
  sort,
8
- onChange,
9
- translation
19
+ onChange
10
20
  } = props;
11
- const SORT_LABELS = {
12
- asc: translation("Ascending"),
13
- desc: translation("Descending")
14
- };
15
- const SORT_OPTIONS = [{
16
- key: "asc",
17
- label: SORT_LABELS.asc
18
- }, {
19
- key: "desc",
20
- label: SORT_LABELS.desc
21
- }];
22
21
  const handleChange = e => {
23
22
  onChange(sort, {
24
23
  operator: e?.target?.value
@@ -9,8 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
10
  const SortOptions = props => {
11
11
  const {
12
- onClose,
13
- translation
12
+ onClose
14
13
  } = props;
15
14
  const {
16
15
  properties,
@@ -55,12 +54,10 @@ const SortOptions = props => {
55
54
  children: [/*#__PURE__*/_jsx(ChooseField, {
56
55
  sort: m,
57
56
  properties: properties,
58
- onChange: handleSortChange,
59
- translation: translation
57
+ onChange: handleSortChange
60
58
  }), /*#__PURE__*/_jsx(ChooseSort, {
61
59
  sort: m,
62
- onChange: handleSortChange,
63
- translation: translation
60
+ onChange: handleSortChange
64
61
  })]
65
62
  })
66
63
  }, i);
@@ -78,7 +75,7 @@ const SortOptions = props => {
78
75
  icon: 'trashIcon'
79
76
  })
80
77
  }), /*#__PURE__*/_jsx(ListItemText, {
81
- children: translation("Delete Sort")
78
+ children: "Delete Sort"
82
79
  })]
83
80
  })]
84
81
  }) : /*#__PURE__*/_jsx(ColumnsList, {
@@ -15,22 +15,20 @@ const FilterSort = props => {
15
15
  open,
16
16
  mode,
17
17
  anchorEl,
18
- onClose,
19
- translation
18
+ onClose
20
19
  } = props;
21
20
  const classes = useFilterSortStyles(theme, appTheme);
22
21
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
23
22
  const PoperComponent = isMobile ? SwipeableDrawer : Popover;
24
23
  const renderMode = () => {
25
24
  if (mode?.type === "filter") {
26
- return translation("filterModeAvilableSoon");
25
+ return "Filter Mode will be availbele soon";
27
26
  } else if (mode?.type === "sort") {
28
27
  return /*#__PURE__*/_jsx(SortOptions, {
29
- onClose: onClose,
30
- translation: translation
28
+ onClose: onClose
31
29
  });
32
30
  } else {
33
- return translation("unKnownFilter");
31
+ return "Unknown Filter / Sort Mode";
34
32
  }
35
33
  };
36
34
  return /*#__PURE__*/_jsx(PoperComponent, {
@@ -52,7 +50,7 @@ const FilterSort = props => {
52
50
  children: [/*#__PURE__*/_jsxs(Box, {
53
51
  className: "fe-dv-ap-title",
54
52
  children: [/*#__PURE__*/_jsx("span", {
55
- children: translation("Sort By")
53
+ children: "Sort By"
56
54
  }), /*#__PURE__*/_jsx(IconButton, {
57
55
  className: "tv-act-ico bg br1",
58
56
  size: "small",
@@ -17,8 +17,7 @@ const FilterView = props => {
17
17
  readOnly,
18
18
  title,
19
19
  onTitleChange,
20
- path,
21
- translation
20
+ path
22
21
  } = props;
23
22
  const {
24
23
  sort,
@@ -93,7 +92,7 @@ const FilterView = props => {
93
92
  fontSize: "16px"
94
93
  },
95
94
  size: "small",
96
- placeholder: translation("Untitled"),
95
+ placeholder: "Untitled",
97
96
  inputProps: {
98
97
  "aria-label": "Table Name",
99
98
  maxLength: 100
@@ -102,7 +101,7 @@ const FilterView = props => {
102
101
  onChange: handleTitleChange,
103
102
  onKeyUp: handleEnter,
104
103
  id: `tv-title-input-${path.join("|")}`
105
- }) : title || translation("Untitled")
104
+ }) : title || "Untitled"
106
105
  }), /*#__PURE__*/_jsxs(Box, {
107
106
  className: "tv-fi-wrpr",
108
107
  sx: {
@@ -131,7 +130,7 @@ const FilterView = props => {
131
130
  paddingBottom: "0px"
132
131
  },
133
132
  size: "small",
134
- placeholder: translation("Search here"),
133
+ placeholder: "Search here",
135
134
  inputProps: {
136
135
  "aria-label": "search google maps"
137
136
  },
@@ -153,8 +152,7 @@ const FilterView = props => {
153
152
  open: open,
154
153
  anchorEl: anchorEl,
155
154
  mode: mode,
156
- onClose: onClose,
157
- translation: translation
155
+ onClose: onClose
158
156
  }), !readOnly ? /*#__PURE__*/_jsx(IconButton, {
159
157
  className: "mr",
160
158
  sx: {
@@ -198,7 +196,7 @@ const FilterView = props => {
198
196
  children: /*#__PURE__*/_jsx(Icon, {
199
197
  icon: "duplicateIcon"
200
198
  })
201
- }), translation("Duplicate")]
199
+ }), "Duplicate"]
202
200
  }), /*#__PURE__*/_jsxs(MenuItem, {
203
201
  onClick: onMenuClick("Delete"),
204
202
  children: [" ", /*#__PURE__*/_jsx(Box, {
@@ -210,7 +208,7 @@ const FilterView = props => {
210
208
  children: /*#__PURE__*/_jsx(Icon, {
211
209
  icon: "trashIcon"
212
210
  })
213
- }), translation("Delete")]
211
+ }), "Delete"]
214
212
  })]
215
213
  }) : null]
216
214
  })]
@@ -4,17 +4,12 @@ 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 EXCLUDED_COLORS = new Set(["#000000", "#0F172A", "#2563EB", "#FFFFFF", "#64748B"]);
8
- const DEFAULT_COLORS = colors?.filter(f => !f?.includes("linear") && !EXCLUDED_COLORS?.has(f));
9
-
10
- // const DEFAULT_COLORS = colors?.filter((f) => !(f.includes("linear") || f === "#000000"));
11
-
7
+ const DEFAULT_COLORS = colors?.filter(f => !(f.includes("linear") || f === "#000000"));
12
8
  const AddOptions = props => {
13
9
  const {
14
10
  edit,
15
11
  onUpdate,
16
- onEvent,
17
- translation
12
+ onEvent
18
13
  } = props;
19
14
  const [addBox, setAddBox] = useState(false);
20
15
  const [value, setValue] = useState("");
@@ -74,7 +69,7 @@ const AddOptions = props => {
74
69
  icon: 'plusIcon'
75
70
  })
76
71
  }), /*#__PURE__*/_jsx(ListItemText, {
77
- primary: translation("Add Options")
72
+ primary: "Add Options"
78
73
  })]
79
74
  })
80
75
  }), addBox ? /*#__PURE__*/_jsx(Box, {