@flozy/editor 9.5.4 → 9.5.5

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 (254) hide show
  1. package/dist/Editor/ChatEditor.js +29 -20
  2. package/dist/Editor/CommonEditor.js +19 -130
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +7 -11
  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 +3 -3
  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 +11 -16
  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/UserInputs.js +2 -4
  74. package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
  75. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +23 -67
  76. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +3 -21
  77. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
  78. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +4 -34
  79. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
  80. package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -10
  81. package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
  82. package/dist/Editor/Elements/Grid/Grid.js +10 -13
  83. package/dist/Editor/Elements/Grid/GridButton.js +5 -9
  84. package/dist/Editor/Elements/Grid/GridItem.js +8 -14
  85. package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
  86. package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
  87. package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
  88. package/dist/Editor/Elements/Link/Link.js +5 -8
  89. package/dist/Editor/Elements/Link/LinkButton.js +1 -4
  90. package/dist/Editor/Elements/List/CheckList.js +9 -14
  91. package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
  92. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
  93. package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
  94. package/dist/Editor/Elements/Search/SearchButton.js +3 -6
  95. package/dist/Editor/Elements/Search/SearchList.js +3 -7
  96. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
  97. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
  98. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
  99. package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
  100. package/dist/Editor/Elements/SimpleText/index.js +4 -5
  101. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  102. package/dist/Editor/Elements/Table/DragButton.js +2 -4
  103. package/dist/Editor/Elements/Table/Table.js +11 -23
  104. package/dist/Editor/Elements/Table/TableCell.js +2 -6
  105. package/dist/Editor/Elements/Table/TablePopup.js +1 -4
  106. package/dist/Editor/Elements/Table/TableSelector.js +6 -10
  107. package/dist/Editor/Elements/Table/TableTool.js +4 -8
  108. package/dist/Editor/Elements/Title/title.js +0 -10
  109. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
  110. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  111. package/dist/Editor/MiniEditor.js +3 -10
  112. package/dist/Editor/Styles/EditorStyles.js +5 -5
  113. package/dist/Editor/Toolbar/Basic/index.js +1 -2
  114. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
  115. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  116. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  117. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +4 -8
  118. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  119. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -5
  120. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
  121. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
  122. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
  123. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -9
  124. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
  125. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  126. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
  127. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
  128. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
  129. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +10 -20
  130. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -8
  131. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -16
  132. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
  133. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +42 -122
  134. package/dist/Editor/Toolbar/PopupTool/index.js +1 -17
  135. package/dist/Editor/Toolbar/Toolbar.js +10 -20
  136. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  137. package/dist/Editor/common/ColorPickerButton.js +14 -39
  138. package/dist/Editor/common/CustomDialog/index.js +10 -8
  139. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  140. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  141. package/dist/Editor/common/Icon.js +1 -46
  142. package/dist/Editor/common/ImageSelector/ImageSelector.js +8 -10
  143. package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
  144. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  145. package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
  146. package/dist/Editor/common/LinkSettings/index.js +14 -20
  147. package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
  148. package/dist/Editor/common/MentionsPopup/index.js +2 -6
  149. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
  150. package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
  151. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
  152. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
  153. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
  154. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  155. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  156. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  157. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  158. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -7
  159. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  160. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  161. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +2 -6
  162. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  163. package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
  164. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
  165. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  166. package/dist/Editor/common/RnD/Utils/gridDropItem.js +7 -56
  167. package/dist/Editor/common/RnD/Utils/index.js +0 -3
  168. package/dist/Editor/common/RnD/VirtualElement/index.js +103 -187
  169. package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -123
  170. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
  171. package/dist/Editor/common/RnD/index.js +7 -59
  172. package/dist/Editor/common/Section/index.js +4 -7
  173. package/dist/Editor/common/Shorthands/elements.js +3 -74
  174. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
  175. package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
  176. package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
  177. package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
  178. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
  179. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
  180. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
  181. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
  182. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
  183. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
  184. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
  185. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
  186. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
  187. package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
  188. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
  189. package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
  190. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
  191. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
  192. package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
  193. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
  194. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
  195. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
  196. package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
  197. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
  198. package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
  199. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
  200. package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
  201. package/dist/Editor/common/StyleBuilder/index.js +5 -8
  202. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  203. package/dist/Editor/common/Uploader.js +5 -16
  204. package/dist/Editor/commonStyle.js +57 -68
  205. package/dist/Editor/helper/index.js +2 -2
  206. package/dist/Editor/helper/theme.js +2 -202
  207. package/dist/Editor/hooks/useMouseMove.js +3 -9
  208. package/dist/Editor/plugins/withEmbeds.js +1 -1
  209. package/dist/Editor/plugins/withHTML.js +7 -10
  210. package/dist/Editor/plugins/withLayout.js +2 -3
  211. package/dist/Editor/plugins/withTable.js +1 -1
  212. package/dist/Editor/theme/ThemeList.js +173 -50
  213. package/dist/Editor/utils/SlateUtilityFunctions.js +47 -164
  214. package/dist/Editor/utils/draftToSlate.js +2 -3
  215. package/dist/Editor/utils/embed.js +6 -8
  216. package/dist/Editor/utils/font.js +37 -40
  217. package/dist/Editor/utils/freegrid.js +2 -2
  218. package/dist/Editor/utils/helper.js +19 -90
  219. package/dist/Editor/utils/table.js +6 -9
  220. package/package.json +2 -2
  221. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -425
  222. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -441
  223. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  224. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  225. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  226. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  227. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  228. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  229. package/dist/Editor/common/CustomSelect.js +0 -33
  230. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  231. package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -117
  232. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
  233. package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -281
  234. package/dist/Editor/common/SnackBar/index.js +0 -43
  235. package/dist/Editor/helper/textIndeces.js +0 -58
  236. package/dist/Editor/hooks/useAutoScroll.js +0 -38
  237. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  238. package/dist/Editor/hooks/useThemeValues.js +0 -63
  239. package/dist/Editor/theme/index.js +0 -147
  240. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  241. package/dist/Editor/themeSettings/buttons/index.js +0 -285
  242. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  243. package/dist/Editor/themeSettings/colorTheme/index.js +0 -305
  244. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  245. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  246. package/dist/Editor/themeSettings/fonts/index.js +0 -222
  247. package/dist/Editor/themeSettings/fonts/style.js +0 -60
  248. package/dist/Editor/themeSettings/icons.js +0 -60
  249. package/dist/Editor/themeSettings/index.js +0 -331
  250. package/dist/Editor/themeSettings/style.js +0 -211
  251. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  252. package/dist/Editor/themeSettingsAI/index.js +0 -355
  253. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
  254. package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -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,8 +20,8 @@ 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
  }
@@ -59,7 +59,7 @@ const ColorPickerStyles = theme => ({
59
59
  width: "24px",
60
60
  height: "24px",
61
61
  margin: "0px 4px",
62
- border: "1.5px solid #DCE4EC"
62
+ border: "unset"
63
63
  }
64
64
  },
65
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, {
@@ -8,8 +8,7 @@ const AddProperty = props => {
8
8
  const {
9
9
  classes,
10
10
  onClose,
11
- onEvent,
12
- translation
11
+ onEvent
13
12
  } = props;
14
13
  const onSelect = type => () => {
15
14
  onEvent("addProperty", type);
@@ -18,7 +17,7 @@ const AddProperty = props => {
18
17
  sx: classes.addProperty,
19
18
  children: [/*#__PURE__*/_jsxs(Box, {
20
19
  className: "fe-dv-ap-title",
21
- children: [translation("Add Property"), /*#__PURE__*/_jsx(IconButton, {
20
+ children: ["Add Property", /*#__PURE__*/_jsx(IconButton, {
22
21
  className: "tv-act-ico bg br1",
23
22
  size: "small",
24
23
  onClick: onClose,
@@ -34,8 +33,7 @@ const AddProperty = props => {
34
33
  }), /*#__PURE__*/_jsx(Box, {
35
34
  className: "fe-dv-ap-opt-content mt",
36
35
  children: /*#__PURE__*/_jsx(PropertyList, {
37
- onSelect: onSelect,
38
- translation: translation
36
+ onSelect: onSelect
39
37
  })
40
38
  })]
41
39
  });
@@ -11,8 +11,7 @@ const AllProperties = props => {
11
11
  const {
12
12
  classes,
13
13
  onClose,
14
- onEvent,
15
- translation
14
+ onEvent
16
15
  } = props;
17
16
  const {
18
17
  properties,
@@ -41,7 +40,7 @@ const AllProperties = props => {
41
40
  sx: classes.addProperty,
42
41
  children: [/*#__PURE__*/_jsxs(Box, {
43
42
  className: "fe-dv-ap-title",
44
- children: [translation("Properties"), /*#__PURE__*/_jsx(IconButton, {
43
+ children: ["Properties", /*#__PURE__*/_jsx(IconButton, {
45
44
  className: "tv-act-ico bg br1",
46
45
  size: "small",
47
46
  onClick: onClose,
@@ -56,7 +55,7 @@ const AllProperties = props => {
56
55
  })]
57
56
  }), /*#__PURE__*/_jsx(Box, {
58
57
  className: "fe-dv-ap-desc",
59
- children: translation("Displayed Properties")
58
+ children: "Displayed Properties"
60
59
  }), /*#__PURE__*/_jsxs(Box, {
61
60
  className: "fe-dv-ap-opt-content",
62
61
  children: [/*#__PURE__*/_jsx(List, {
@@ -93,7 +92,7 @@ const AllProperties = props => {
93
92
  }), hiddenProperties?.length > 0 ? /*#__PURE__*/_jsxs(_Fragment, {
94
93
  children: [/*#__PURE__*/_jsx(Box, {
95
94
  className: "fe-dv-ap-desc",
96
- children: translation("Hidden Properties")
95
+ children: "Hidden Properties"
97
96
  }), /*#__PURE__*/_jsx(List, {
98
97
  className: "fe-dv-opt-list",
99
98
  children: hiddenProperties?.map((m, i) => {
@@ -136,7 +135,7 @@ const AllProperties = props => {
136
135
  icon: 'plusIcon'
137
136
  })
138
137
  }), /*#__PURE__*/_jsx(ListItemText, {
139
- children: translation("Add New Property")
138
+ children: "Add New Property"
140
139
  })]
141
140
  })
142
141
  })]
@@ -10,8 +10,7 @@ const ChangeProperty = props => {
10
10
  classes,
11
11
  onClose,
12
12
  onEvent,
13
- mode,
14
- translation
13
+ mode
15
14
  } = props;
16
15
  const onSelect = property => () => {
17
16
  onEvent("updateProperty", {
@@ -48,7 +47,7 @@ const ChangeProperty = props => {
48
47
  children: /*#__PURE__*/_jsx(Icon, {
49
48
  icon: 'leftArrow'
50
49
  })
51
- }), translation("Change Property")]
50
+ }), "Change Property"]
52
51
  }), /*#__PURE__*/_jsx(IconButton, {
53
52
  className: "tv-act-ico bg br1",
54
53
  size: "small",
@@ -69,8 +68,7 @@ const ChangeProperty = props => {
69
68
  className: "fe-dv-ap-opt-content mt",
70
69
  children: /*#__PURE__*/_jsx(PropertyList, {
71
70
  onSelect: onSelect,
72
- selected: mode?.edit,
73
- translation: translation
71
+ selected: mode?.edit
74
72
  })
75
73
  })]
76
74
  });
@@ -13,8 +13,7 @@ const EditOption = props => {
13
13
  classes,
14
14
  onClose,
15
15
  mode,
16
- onEvent,
17
- translation
16
+ onEvent
18
17
  } = props;
19
18
  const [edit, setEdit] = useState({
20
19
  ...(mode?.edit || {})
@@ -30,7 +29,6 @@ const EditOption = props => {
30
29
  } = edit;
31
30
  const selectedOption = edit?.options[optionIndex] || {};
32
31
  const pickerStyles = ColorPickerStyles(theme);
33
- const hideBackButton = edit?.hideBackButton || false;
34
32
  useEffect(() => {
35
33
  return () => {
36
34
  // on un-mount update the option change
@@ -105,14 +103,14 @@ const EditOption = props => {
105
103
  children: [/*#__PURE__*/_jsxs(Box, {
106
104
  className: "fe-dv-ap-title",
107
105
  children: [/*#__PURE__*/_jsxs("span", {
108
- children: [!hideBackButton ? /*#__PURE__*/_jsx(IconButton, {
106
+ children: [/*#__PURE__*/_jsx(IconButton, {
109
107
  className: "tv-act-ico",
110
108
  size: "small",
111
109
  onClick: onBack,
112
110
  children: /*#__PURE__*/_jsx(Icon, {
113
111
  icon: 'leftArrow'
114
112
  })
115
- }) : null, translation("Edit Option")]
113
+ }), "Edit Option"]
116
114
  }), /*#__PURE__*/_jsx(IconButton, {
117
115
  className: "tv-act-ico bg br1",
118
116
  size: "small",
@@ -130,14 +128,14 @@ const EditOption = props => {
130
128
  className: "fe-dv-ap-opt-content mt-1 mb",
131
129
  children: /*#__PURE__*/_jsx(FormControlLabel, {
132
130
  className: "ml-0",
133
- label: translation("Option Name"),
131
+ label: "Option Name",
134
132
  control: /*#__PURE__*/_jsx(TextField, {
135
133
  size: "small",
136
134
  name: "value",
137
135
  value: selectedOption?.value,
138
136
  onChange: onChange,
139
137
  fullWidth: true,
140
- placeholder: translation("Option Name")
138
+ placeholder: "Option Name"
141
139
  }),
142
140
  labelPlacement: "top"
143
141
  })
@@ -145,7 +143,7 @@ const EditOption = props => {
145
143
  className: "label-desc mt-1",
146
144
  children: [/*#__PURE__*/_jsx(Box, {
147
145
  className: "label-tp mb",
148
- children: translation("Choose Color")
146
+ children: "Choose Color"
149
147
  }), /*#__PURE__*/_jsx(Box, {
150
148
  className: "ml",
151
149
  children: /*#__PURE__*/_jsx(ColorButtons, {
@@ -164,7 +162,7 @@ const EditOption = props => {
164
162
  icon: 'trashIcon'
165
163
  })
166
164
  }), /*#__PURE__*/_jsx(ListItemText, {
167
- children: translation("Delete Option")
165
+ children: "Delete Option"
168
166
  })]
169
167
  })
170
168
  })]