@flozy/editor 5.5.7 → 5.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/Editor/ChatEditor.js +34 -25
  2. package/dist/Editor/CommonEditor.js +13 -26
  3. package/dist/Editor/Editor.css +19 -102
  4. package/dist/Editor/Elements/AI/AIInput.js +1 -0
  5. package/dist/Editor/Elements/AI/CustomSelect.js +10 -17
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +53 -59
  7. package/dist/Editor/Elements/AI/Styles.js +6 -24
  8. package/dist/Editor/Elements/Accordion/Accordion.js +1 -8
  9. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  10. package/dist/Editor/Elements/Button/EditorButton.js +1 -6
  11. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
  12. package/dist/Editor/Elements/Color Picker/ColorButtons.js +5 -7
  13. package/dist/Editor/Elements/Color Picker/Styles.js +3 -8
  14. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  15. package/dist/Editor/Elements/Divider/Divider.js +20 -36
  16. package/dist/Editor/Elements/Embed/Image.js +16 -51
  17. package/dist/Editor/Elements/Embed/Video.js +3 -26
  18. package/dist/Editor/Elements/Form/Form.js +2 -38
  19. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
  20. package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
  21. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
  22. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
  23. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
  24. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
  25. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
  26. package/dist/Editor/Elements/Form/FormPopup.js +9 -12
  27. package/dist/Editor/Elements/Form/Workflow/Styles.js +0 -2
  28. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  29. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -4
  30. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
  31. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  32. package/dist/Editor/Elements/FreeGrid/styles.js +1 -1
  33. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  34. package/dist/Editor/Elements/Grid/GridItem.js +36 -47
  35. package/dist/Editor/Elements/Grid/Styles.js +0 -50
  36. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  37. package/dist/Editor/Elements/Search/SearchButton.js +0 -1
  38. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  39. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  40. package/dist/Editor/Elements/Signature/SignaturePopup.js +52 -17
  41. package/dist/Editor/Elements/SimpleText/style.js +0 -15
  42. package/dist/Editor/Elements/Table/Styles.js +78 -88
  43. package/dist/Editor/Elements/Table/Table.js +140 -263
  44. package/dist/Editor/Elements/Table/TableCell.js +111 -365
  45. package/dist/Editor/Elements/Table/TablePopup.js +3 -9
  46. package/dist/Editor/Elements/Table/TableRow.js +2 -10
  47. package/dist/Editor/Elements/TopBanner/TopBanner.js +1 -2
  48. package/dist/Editor/MiniEditor.js +2 -21
  49. package/dist/Editor/Styles/EditorStyles.js +4 -13
  50. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
  51. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +12 -7
  52. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -26
  53. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
  54. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -5
  55. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +8 -8
  56. package/dist/Editor/Toolbar/Mini/Styles.js +1 -9
  57. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/InfinityAITool.js +3 -7
  58. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -6
  59. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
  60. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +58 -547
  61. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +16 -28
  62. package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
  63. package/dist/Editor/Toolbar/Toolbar.js +0 -6
  64. package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
  65. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  66. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  67. package/dist/Editor/common/ColorPickerButton.js +45 -85
  68. package/dist/Editor/common/DnD/Draggable.js +1 -2
  69. package/dist/Editor/common/FontLoader/FontLoader.js +2 -2
  70. package/dist/Editor/common/Icon.js +21 -54
  71. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -2
  72. package/dist/Editor/common/ImageSelector/Styles.js +6 -47
  73. package/dist/Editor/common/ImageSelector/UploadStyles.js +6 -18
  74. package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
  75. package/dist/Editor/common/LinkSettings/index.js +1 -2
  76. package/dist/Editor/common/MentionsPopup/Styles.js +8 -142
  77. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  78. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -107
  79. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  80. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  81. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
  82. package/dist/Editor/common/RnD/index.js +3 -4
  83. package/dist/Editor/common/Section/index.js +3 -3
  84. package/dist/Editor/common/Section/styles.js +1 -5
  85. package/dist/Editor/common/Shorthands/elements.js +1 -13
  86. package/dist/Editor/common/StyleBuilder/fieldStyle.js +1 -2
  87. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -4
  88. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -35
  89. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +2 -15
  90. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +1 -2
  91. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +0 -2
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +11 -11
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +6 -22
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -21
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -20
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -12
  98. package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
  99. package/dist/Editor/common/StyleBuilder/index.js +20 -101
  100. package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
  101. package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
  102. package/dist/Editor/common/ToolbarIcon.js +1 -1
  103. package/dist/Editor/common/Uploader.js +37 -39
  104. package/dist/Editor/common/iconListV2.js +74 -598
  105. package/dist/Editor/common/iconslist.js +19 -25
  106. package/dist/Editor/commonStyle.js +15 -421
  107. package/dist/Editor/helper/deserialize/index.js +2 -31
  108. package/dist/Editor/helper/index.js +2 -15
  109. package/dist/Editor/helper/theme.js +1 -15
  110. package/dist/Editor/hooks/useBreakpoints.js +1 -1
  111. package/dist/Editor/plugins/withCustomDeleteBackward.js +3 -34
  112. package/dist/Editor/plugins/withEmbeds.js +26 -30
  113. package/dist/Editor/plugins/withHTML.js +12 -100
  114. package/dist/Editor/plugins/withLayout.js +0 -1
  115. package/dist/Editor/utils/SlateUtilityFunctions.js +11 -31
  116. package/dist/Editor/utils/brains.js +1 -1
  117. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +1 -26
  118. package/dist/Editor/utils/customHooks/useResize.js +4 -7
  119. package/dist/Editor/utils/customHooks/useTableResize.js +2 -6
  120. package/dist/Editor/utils/embed.js +1 -2
  121. package/dist/Editor/utils/events.js +1 -0
  122. package/dist/Editor/utils/font.js +4 -11
  123. package/dist/Editor/utils/formfield.js +4 -8
  124. package/dist/Editor/utils/helper.js +2 -100
  125. package/dist/Editor/utils/insertNewLine.js +1 -19
  126. package/dist/Editor/utils/serializeToText.js +0 -2
  127. package/dist/Editor/utils/table.js +24 -228
  128. package/package.json +2 -2
  129. package/dist/Editor/Elements/DataView/DataView.js +0 -124
  130. package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
  131. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -83
  132. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -33
  133. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -180
  134. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -62
  135. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -68
  136. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -35
  137. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -39
  138. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
  139. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
  140. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
  141. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
  142. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
  143. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
  144. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
  145. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -86
  146. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -71
  147. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -138
  148. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -213
  149. package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
  150. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
  151. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -44
  152. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -146
  153. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -79
  154. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -57
  155. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
  156. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -174
  157. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -241
  158. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -45
  159. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -32
  160. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
  161. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -217
  162. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -131
  163. package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -253
  164. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -85
  165. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +0 -10
  166. package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
  167. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -277
  168. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
  169. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -88
  170. package/dist/Editor/Elements/DataView/styles.js +0 -169
  171. package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
  172. package/dist/Editor/Elements/Table/DragButton.js +0 -142
  173. package/dist/Editor/Elements/Table/DragStyles.js +0 -70
  174. package/dist/Editor/Elements/Table/Draggable.js +0 -25
  175. package/dist/Editor/Elements/Table/Droppable.js +0 -53
  176. package/dist/Editor/Elements/Table/TableTool.js +0 -101
  177. package/dist/Editor/Elements/Table/tableHelper.js +0 -71
  178. package/dist/Editor/assets/svg/ArrowDownIcon.js +0 -25
  179. package/dist/Editor/assets/svg/ArrowUpIcon.js +0 -25
  180. package/dist/Editor/assets/svg/CalenderIconTick.js +0 -64
  181. package/dist/Editor/assets/svg/ChervDown.js +0 -18
  182. package/dist/Editor/assets/svg/ChervUp.js +0 -18
  183. package/dist/Editor/assets/svg/DataTableIcon.js +0 -50
  184. package/dist/Editor/assets/svg/DuplicateIcon.js +0 -23
  185. package/dist/Editor/assets/svg/EyeIcon.js +0 -23
  186. package/dist/Editor/assets/svg/EyeSlash.js +0 -43
  187. package/dist/Editor/assets/svg/HashtagIcon.js +0 -33
  188. package/dist/Editor/assets/svg/PlusIcon.js +0 -23
  189. package/dist/Editor/assets/svg/SelectRoundedIcon.js +0 -24
  190. package/dist/Editor/assets/svg/SortByIcon.js +0 -33
  191. package/dist/Editor/assets/svg/TableIcons.js +0 -220
  192. package/dist/Editor/assets/svg/TickOutlined.js +0 -23
  193. package/dist/Editor/assets/svg/TrashCanIcon.js +0 -38
  194. package/dist/Editor/common/Select/index.js +0 -20
  195. package/dist/Editor/common/Select/styles.js +0 -17
  196. package/dist/Editor/helper/enforceDateFormat.js +0 -41
  197. package/dist/Editor/hooks/useTable.js +0 -210
  198. package/dist/Editor/utils/dataView.js +0 -43
@@ -1,29 +0,0 @@
1
- import React from "react";
2
- import { jsxs as _jsxs } from "react/jsx-runtime";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- const RenderFormulaCell = props => {
5
- const {
6
- property
7
- } = props;
8
- return /*#__PURE__*/_jsxs("td", {
9
- style: {
10
- minWidth: "200px",
11
- textAlign: "center",
12
- color: "#CCC"
13
- },
14
- children: ["Calculate ", property?.key]
15
- });
16
- };
17
- const Formula = props => {
18
- const {
19
- properties
20
- } = props;
21
- return /*#__PURE__*/_jsx("tr", {
22
- children: properties?.map((m, i) => {
23
- return /*#__PURE__*/_jsx(RenderFormulaCell, {
24
- property: m
25
- }, i);
26
- })
27
- });
28
- };
29
- export default Formula;
@@ -1,113 +0,0 @@
1
- import React, { useState } from "react";
2
- import { Box, List, ListItemButton, ListItemText, ListItemIcon, TextField, Chip } from "@mui/material";
3
- import { colors } from "../../../Color Picker/defaultColors";
4
- import Icon from "../../../../common/Icon";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- import { jsxs as _jsxs } from "react/jsx-runtime";
7
- const DEFAULT_COLORS = colors?.filter(f => !(f.includes("linear") || f === "#000000"));
8
- const AddOptions = props => {
9
- const {
10
- edit,
11
- onUpdate,
12
- onEvent
13
- } = props;
14
- const [addBox, setAddBox] = useState(false);
15
- const [value, setValue] = useState("");
16
- const [error, setError] = useState("");
17
- const {
18
- options
19
- } = edit;
20
- const onAddBox = () => {
21
- setAddBox(!addBox);
22
- };
23
- const getRandomColor = () => {
24
- const randomIndex = Math.floor(Math.random() * DEFAULT_COLORS.length);
25
- return DEFAULT_COLORS[randomIndex];
26
- };
27
- const handleEnter = e => {
28
- const isExists = options?.find(f => f.value.toLowerCase() === value.toLowerCase());
29
- if (e.keyCode === 13 && value?.trim()) {
30
- if (isExists) {
31
- setError("Option Already Exists!");
32
- return;
33
- }
34
- onUpdate({
35
- ...edit,
36
- options: [{
37
- value: value,
38
- color: getRandomColor()
39
- }, ...(options || [])]
40
- });
41
- setValue("");
42
- }
43
- };
44
- const handleChange = e => {
45
- setValue(e?.target?.value);
46
- setError("");
47
- };
48
- const handleChangeOption = optIndex => () => {
49
- onEvent("editOption", {
50
- edit: {
51
- ...edit,
52
- optionIndex: optIndex
53
- }
54
- });
55
- };
56
- const onBlur = () => {
57
- setValue("");
58
- setAddBox(false);
59
- setError("");
60
- };
61
- return edit?.type === "select" || edit?.type === "multi-select" ? /*#__PURE__*/_jsxs(Box, {
62
- className: "fe-tv-addopt sb mb-0",
63
- children: [/*#__PURE__*/_jsx(List, {
64
- className: "fe-dv-opt-list pl-0",
65
- children: /*#__PURE__*/_jsxs(ListItemButton, {
66
- onClick: onAddBox,
67
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
68
- children: /*#__PURE__*/_jsx(Icon, {
69
- icon: 'plusIcon'
70
- })
71
- }), /*#__PURE__*/_jsx(ListItemText, {
72
- primary: "Add Options"
73
- })]
74
- })
75
- }), addBox ? /*#__PURE__*/_jsx(Box, {
76
- children: /*#__PURE__*/_jsx(TextField, {
77
- className: "mt",
78
- size: "small",
79
- fullWidth: true,
80
- value: value,
81
- onKeyUp: handleEnter,
82
- onChange: handleChange,
83
- onBlur: onBlur,
84
- helperText: error
85
- })
86
- }) : null, /*#__PURE__*/_jsx(List, {
87
- children: options?.map((m, i) => {
88
- return /*#__PURE__*/_jsxs(ListItemButton, {
89
- onClick: handleChangeOption(i),
90
- children: [/*#__PURE__*/_jsx(ListItemText, {
91
- primary: /*#__PURE__*/_jsx(Chip, {
92
- label: m.value,
93
- sx: {
94
- background: m.color
95
- }
96
- })
97
- }), /*#__PURE__*/_jsx(ListItemIcon, {
98
- sx: {
99
- justifyContent: "flex-end"
100
- },
101
- children: /*#__PURE__*/_jsx(Icon, {
102
- icon: 'rightArrow'
103
- })
104
- })]
105
- }, i);
106
- })
107
- })]
108
- }) : null;
109
- };
110
- AddOptions.defaultProps = {
111
- onEvent: () => {}
112
- };
113
- export default AddOptions;
@@ -1,44 +0,0 @@
1
- import React from "react";
2
- import { Box, IconButton } from "@mui/material";
3
- import CloseIcon from "@mui/icons-material/Close";
4
- import PropertyList from "./PropertyList";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- import { jsxs as _jsxs } from "react/jsx-runtime";
7
- const AddProperty = props => {
8
- const {
9
- classes,
10
- onClose,
11
- onEvent
12
- } = props;
13
- const onSelect = type => () => {
14
- onEvent("addProperty", type);
15
- };
16
- return /*#__PURE__*/_jsxs(Box, {
17
- sx: classes.addProperty,
18
- children: [/*#__PURE__*/_jsxs(Box, {
19
- className: "fe-dv-ap-title",
20
- children: ["Add Property", /*#__PURE__*/_jsx(IconButton, {
21
- className: "tv-act-ico bg br1",
22
- size: "small",
23
- onClick: onClose,
24
- sx: {
25
- '& svg': {
26
- '& path': {
27
- strokeWidth: 0
28
- }
29
- }
30
- },
31
- children: /*#__PURE__*/_jsx(CloseIcon, {})
32
- })]
33
- }), /*#__PURE__*/_jsx(Box, {
34
- className: "fe-dv-ap-opt-content mt",
35
- children: /*#__PURE__*/_jsx(PropertyList, {
36
- onSelect: onSelect
37
- })
38
- })]
39
- });
40
- };
41
- AddProperty.defaultProps = {
42
- onEvent: () => {}
43
- };
44
- export default AddProperty;
@@ -1,146 +0,0 @@
1
- import React from "react";
2
- import { Box, IconButton, List, ListItemButton, ListItemText, ListItemIcon, Divider } from "@mui/material";
3
- import CloseIcon from "@mui/icons-material/Close";
4
- import { PROPERTY_TYPES, TYPE_ICONS } from "./Constants";
5
- import { useDataView } from "../../Providers/DataViewProvider";
6
- import Icon from "../../../../common/Icon";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- import { jsxs as _jsxs } from "react/jsx-runtime";
9
- import { Fragment as _Fragment } from "react/jsx-runtime";
10
- const AllProperties = props => {
11
- const {
12
- classes,
13
- onClose,
14
- onEvent
15
- } = props;
16
- const {
17
- properties,
18
- onAddProperty
19
- } = useDataView();
20
- const shownProperties = properties?.filter(f => f.visible === true);
21
- const hiddenProperties = properties?.filter(f => f.visible === false);
22
- const onEditProperty = data => () => {
23
- onEvent("editProperty", {
24
- edit: {
25
- ...data
26
- }
27
- });
28
- };
29
- const onAdd = () => {
30
- const np = onAddProperty({
31
- type: "text"
32
- });
33
- onEvent("editProperty", {
34
- edit: {
35
- ...np
36
- }
37
- });
38
- };
39
- return /*#__PURE__*/_jsxs(Box, {
40
- sx: classes.addProperty,
41
- children: [/*#__PURE__*/_jsxs(Box, {
42
- className: "fe-dv-ap-title",
43
- children: ["Properties", /*#__PURE__*/_jsx(IconButton, {
44
- className: "tv-act-ico bg br1",
45
- size: "small",
46
- onClick: onClose,
47
- sx: {
48
- '& svg': {
49
- '& path': {
50
- strokeWidth: 0
51
- }
52
- }
53
- },
54
- children: /*#__PURE__*/_jsx(CloseIcon, {})
55
- })]
56
- }), /*#__PURE__*/_jsx(Box, {
57
- className: "fe-dv-ap-desc",
58
- children: "Displayed Properties"
59
- }), /*#__PURE__*/_jsxs(Box, {
60
- className: "fe-dv-ap-opt-content",
61
- children: [/*#__PURE__*/_jsx(List, {
62
- className: "fe-dv-opt-list",
63
- children: shownProperties?.map((m, i) => {
64
- const {
65
- Icon: iconType
66
- } = PROPERTY_TYPES?.find(f => f.type === m.type) || {};
67
- return /*#__PURE__*/_jsxs(ListItemButton, {
68
- onClick: onEditProperty(m),
69
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
70
- className: "needBg",
71
- sx: {
72
- '& svg': {
73
- width: '14px !important',
74
- height: '14px !important'
75
- }
76
- },
77
- children: /*#__PURE__*/_jsx(Icon, {
78
- icon: iconType
79
- })
80
- }), /*#__PURE__*/_jsx(ListItemText, {
81
- children: m?.label
82
- }), /*#__PURE__*/_jsx(ListItemIcon, {
83
- sx: {
84
- justifyContent: "end"
85
- },
86
- children: /*#__PURE__*/_jsx(Icon, {
87
- icon: 'rightArrow'
88
- })
89
- })]
90
- }, i);
91
- })
92
- }), hiddenProperties?.length > 0 ? /*#__PURE__*/_jsxs(_Fragment, {
93
- children: [/*#__PURE__*/_jsx(Box, {
94
- className: "fe-dv-ap-desc",
95
- children: "Hidden Properties"
96
- }), /*#__PURE__*/_jsx(List, {
97
- className: "fe-dv-opt-list",
98
- children: hiddenProperties?.map((m, i) => {
99
- return /*#__PURE__*/_jsxs(ListItemButton, {
100
- onClick: onEditProperty(m),
101
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
102
- className: "needBg",
103
- sx: {
104
- alignItems: "center",
105
- '& svg': {
106
- width: '14px !important',
107
- height: '14px !important'
108
- }
109
- },
110
- children: /*#__PURE__*/_jsx(Icon, {
111
- icon: TYPE_ICONS[m?.type]
112
- })
113
- }), /*#__PURE__*/_jsx(ListItemText, {
114
- children: m?.label
115
- }), /*#__PURE__*/_jsx(ListItemIcon, {
116
- sx: {
117
- alignItems: "center",
118
- justifyContent: 'flex-end'
119
- },
120
- children: /*#__PURE__*/_jsx(Icon, {
121
- icon: 'rightArrow'
122
- })
123
- })]
124
- }, i);
125
- })
126
- })]
127
- }) : null, /*#__PURE__*/_jsx(Divider, {
128
- className: "divider_sty"
129
- }), /*#__PURE__*/_jsx(List, {
130
- className: "fe-dv-opt-list",
131
- children: /*#__PURE__*/_jsxs(ListItemButton, {
132
- onClick: onAdd,
133
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
134
- children: /*#__PURE__*/_jsx(Icon, {
135
- icon: 'plusIcon'
136
- })
137
- }), /*#__PURE__*/_jsx(ListItemText, {
138
- children: "Add New Property"
139
- })]
140
- })
141
- })]
142
- })]
143
- });
144
- };
145
- AllProperties.defaultProps = {};
146
- export default AllProperties;
@@ -1,79 +0,0 @@
1
- import React from "react";
2
- import { Box, IconButton } from "@mui/material";
3
- import CloseIcon from "@mui/icons-material/Close";
4
- import PropertyList from "./PropertyList";
5
- import Icon from "../../../../common/Icon";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
- const ChangeProperty = props => {
9
- const {
10
- classes,
11
- onClose,
12
- onEvent,
13
- mode
14
- } = props;
15
- const onSelect = property => () => {
16
- onEvent("updateProperty", {
17
- ...(mode?.edit || {}),
18
- type: property?.type
19
- });
20
- };
21
- const onBack = () => {
22
- onEvent("editProperty", {
23
- edit: {
24
- ...(mode?.edit || {})
25
- }
26
- });
27
- };
28
- return /*#__PURE__*/_jsxs(Box, {
29
- sx: classes.addProperty,
30
- children: [/*#__PURE__*/_jsxs(Box, {
31
- className: "fe-dv-ap-title",
32
- children: [/*#__PURE__*/_jsxs("span", {
33
- children: [/*#__PURE__*/_jsx(IconButton, {
34
- className: "tv-act-ico",
35
- size: "small",
36
- onClick: onBack,
37
- sx: {
38
- paddingLeft: '0px',
39
- '&:hover': {
40
- background: 'transparent !important'
41
- },
42
- '& svg': {
43
- width: '14px !important',
44
- height: '14px !important'
45
- }
46
- },
47
- children: /*#__PURE__*/_jsx(Icon, {
48
- icon: 'leftArrow'
49
- })
50
- }), "Change Property"]
51
- }), /*#__PURE__*/_jsx(IconButton, {
52
- className: "tv-act-ico bg br1",
53
- size: "small",
54
- onClick: onClose,
55
- sx: {
56
- '& svg': {
57
- '& path': {
58
- strokeWidth: 0
59
- }
60
- }
61
- },
62
- children: /*#__PURE__*/_jsx(CloseIcon, {})
63
- })]
64
- }), /*#__PURE__*/_jsx(Box, {
65
- className: "fe-dv-ap-desc",
66
- children: "Select Property Type"
67
- }), /*#__PURE__*/_jsx(Box, {
68
- className: "fe-dv-ap-opt-content mt",
69
- children: /*#__PURE__*/_jsx(PropertyList, {
70
- onSelect: onSelect,
71
- selected: mode?.edit
72
- })
73
- })]
74
- });
75
- };
76
- ChangeProperty.defaultProps = {
77
- onEvent: () => {}
78
- };
79
- export default ChangeProperty;
@@ -1,57 +0,0 @@
1
- import React from "react";
2
- import { List, ListItemButton, ListItemIcon, ListItemText, Box } from "@mui/material";
3
- import { PROPERTY_TYPES } from "./Constants";
4
- import Icon from "../../../../common/Icon";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- import { jsxs as _jsxs } from "react/jsx-runtime";
7
- const ColumnsList = props => {
8
- const {
9
- properties
10
- } = props;
11
- const {
12
- onSelect,
13
- selected
14
- } = props;
15
- return /*#__PURE__*/_jsx(Box, {
16
- className: "opt-wrpr",
17
- children: /*#__PURE__*/_jsx(List, {
18
- className: "tv-opt-list",
19
- children: properties?.map((m, i) => {
20
- const {
21
- Icon: iconType
22
- } = PROPERTY_TYPES?.find(f => f.type === m.type) || {};
23
- return /*#__PURE__*/_jsxs(ListItemButton, {
24
- className: selected?.type === m?.type ? "active" : "",
25
- onClick: onSelect(m),
26
- children: [/*#__PURE__*/_jsx(ListItemIcon, {
27
- sx: {
28
- background: 'none'
29
- },
30
- children: /*#__PURE__*/_jsx(Box, {
31
- className: "bgic",
32
- sx: {
33
- marginRight: '5px',
34
- borderRadius: '4px',
35
- display: 'flex',
36
- alignItems: 'center',
37
- padding: '2px',
38
- '& svg': {
39
- width: '16px',
40
- height: '16px',
41
- padding: '0px !important'
42
- }
43
- },
44
- children: /*#__PURE__*/_jsx(Icon, {
45
- icon: iconType
46
- })
47
- })
48
- }), /*#__PURE__*/_jsx(ListItemText, {
49
- primary: m?.label
50
- })]
51
- }, i);
52
- })
53
- })
54
- });
55
- };
56
- ColumnsList.defaultProps = {};
57
- export default ColumnsList;
@@ -1,101 +0,0 @@
1
- // import FilterListIcon from "@mui/icons-material/FilterList";
2
-
3
- export const TYPE_LABELS = {
4
- text: "Text",
5
- number: "Number",
6
- select: "Select",
7
- "multi-select": "Multi Select",
8
- date: "Date",
9
- person: "Person",
10
- check: "Checkbox"
11
- };
12
- export const TYPE_ICONS = {
13
- text: 'text',
14
- number: 'hashtagIcon',
15
- select: 'selectRounded',
16
- "multi-select": 'check-list-item',
17
- date: 'calenderNewIcon',
18
- person: 'userIcon',
19
- check: 'tickOutline'
20
- };
21
- export const PROPERTY_DEFAULTS = {
22
- text: {
23
- label: TYPE_LABELS?.text,
24
- visible: true
25
- },
26
- number: {
27
- label: TYPE_LABELS.number,
28
- visible: true
29
- },
30
- select: {
31
- label: TYPE_LABELS.select,
32
- visible: true
33
- },
34
- "multi-select": {
35
- label: TYPE_LABELS["multi-select"],
36
- visible: true
37
- },
38
- date: {
39
- label: TYPE_LABELS.date,
40
- visible: true
41
- },
42
- check: {
43
- label: TYPE_LABELS.check,
44
- visible: true
45
- },
46
- person: {
47
- label: TYPE_LABELS.person,
48
- visible: true
49
- }
50
- };
51
- export const PROPERTY_TYPES = [{
52
- type: "text",
53
- label: TYPE_LABELS.text,
54
- Icon: 'text'
55
- }, {
56
- type: "number",
57
- label: TYPE_LABELS.number,
58
- Icon: 'hashtagIcon'
59
- }, {
60
- type: "select",
61
- label: TYPE_LABELS.select,
62
- Icon: 'selectRounded'
63
- }, {
64
- type: "multi-select",
65
- label: TYPE_LABELS["multi-select"],
66
- Icon: 'check-list-item'
67
- }, {
68
- type: "date",
69
- label: TYPE_LABELS.date,
70
- Icon: 'calenderNewIcon'
71
- }, {
72
- type: "person",
73
- label: TYPE_LABELS.person,
74
- Icon: 'userIcon'
75
- }, {
76
- type: "check",
77
- label: TYPE_LABELS.check,
78
- Icon: 'tickOutline'
79
- }];
80
- export const FILTER_TYPES = [{
81
- type: "sort",
82
- operator: "asc",
83
- label: "Sort Ascending",
84
- value: "",
85
- Icon: 'arrowUp'
86
- }, {
87
- type: "sort",
88
- operator: "desc",
89
- label: "Sort Descending",
90
- Icon: 'arrowDown'
91
- }
92
- // {
93
- // type: "filter",
94
- // operator: "contains",
95
- // label: "Filter",
96
- // value: "",
97
- // Icon: FilterListIcon,
98
- // },
99
- ];
100
-
101
- export const DEFAULT_OPTION_COLORS = ["rgba(131, 96, 253, 0.5)", "rgba(180, 180, 180, 1)", "rgba(72, 159, 248, 0.5)", "rgba(254, 122, 0, 0.5)", "rgba(214, 105, 190, 0.5)", "rgba(255, 229, 0, 0.5)"];