@flozy/editor 5.3.5 → 5.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/dist/Editor/CommonEditor.js +8 -14
  2. package/dist/Editor/Editor.css +22 -58
  3. package/dist/Editor/Elements/Accordion/Accordion.js +1 -8
  4. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  5. package/dist/Editor/Elements/Button/EditorButton.js +2 -9
  6. package/dist/Editor/Elements/Color Picker/ColorButtons.js +2 -4
  7. package/dist/Editor/Elements/Divider/Divider.js +9 -24
  8. package/dist/Editor/Elements/Embed/Image.js +12 -31
  9. package/dist/Editor/Elements/Embed/Video.js +2 -13
  10. package/dist/Editor/Elements/Form/Form.js +0 -1
  11. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  12. package/dist/Editor/Elements/FreeGrid/styles.js +1 -2
  13. package/dist/Editor/Elements/Grid/GridItem.js +0 -2
  14. package/dist/Editor/Elements/Grid/Styles.js +0 -44
  15. package/dist/Editor/Elements/List/CheckList.js +1 -2
  16. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +0 -1
  17. package/dist/Editor/Elements/Search/SearchAttachment.js +0 -1
  18. package/dist/Editor/Elements/Signature/SignaturePopup.js +4 -4
  19. package/dist/Editor/Elements/SimpleText/index.js +1 -8
  20. package/dist/Editor/Elements/SimpleText/style.js +1 -10
  21. package/dist/Editor/Elements/TopBanner/TopBanner.js +1 -2
  22. package/dist/Editor/MiniEditor.js +1 -15
  23. package/dist/Editor/Styles/EditorStyles.js +3 -5
  24. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +1 -17
  25. package/dist/Editor/Toolbar/FormatTools/TextSize.js +3 -5
  26. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +72 -210
  27. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -55
  28. package/dist/Editor/Toolbar/Toolbar.js +0 -6
  29. package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
  30. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  31. package/dist/Editor/common/ColorPickerButton.js +3 -5
  32. package/dist/Editor/common/DnD/Draggable.js +1 -2
  33. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  34. package/dist/Editor/common/Icon.js +0 -6
  35. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -2
  36. package/dist/Editor/common/ImageSelector/Styles.js +6 -47
  37. package/dist/Editor/common/ImageSelector/UploadStyles.js +6 -18
  38. package/dist/Editor/common/MentionsPopup/Styles.js +122 -109
  39. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +0 -1
  40. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  41. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  42. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
  43. package/dist/Editor/common/RnD/Utils/gridDropItem.js +6 -9
  44. package/dist/Editor/common/RnD/index.js +1 -2
  45. package/dist/Editor/common/Section/index.js +3 -3
  46. package/dist/Editor/common/Section/styles.js +1 -5
  47. package/dist/Editor/common/Shorthands/elements.js +1 -13
  48. package/dist/Editor/common/StyleBuilder/fieldStyle.js +1 -2
  49. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -9
  50. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +3 -27
  51. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +2 -15
  52. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
  53. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +1 -2
  54. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  55. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +0 -2
  56. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
  57. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +4 -4
  58. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +6 -22
  59. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -21
  60. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -15
  61. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +0 -7
  62. package/dist/Editor/common/StyleBuilder/index.js +9 -17
  63. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
  64. package/dist/Editor/common/ToolbarIcon.js +1 -2
  65. package/dist/Editor/common/Uploader.js +36 -46
  66. package/dist/Editor/common/iconListV2.js +130 -348
  67. package/dist/Editor/common/iconslist.js +3 -6
  68. package/dist/Editor/commonStyle.js +4 -290
  69. package/dist/Editor/helper/index.js +3 -16
  70. package/dist/Editor/helper/theme.js +1 -24
  71. package/dist/Editor/hooks/useMouseMove.js +2 -5
  72. package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -33
  73. package/dist/Editor/plugins/withEmbeds.js +26 -30
  74. package/dist/Editor/utils/SlateUtilityFunctions.js +4 -27
  75. package/dist/Editor/utils/button.js +4 -4
  76. package/dist/Editor/utils/helper.js +13 -40
  77. package/dist/Editor/utils/pageSettings.js +2 -14
  78. package/package.json +2 -2
  79. package/dist/Editor/Elements/DataView/DataView.js +0 -124
  80. package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
  81. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -67
  82. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -33
  83. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -162
  84. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -40
  85. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -67
  86. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -35
  87. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -39
  88. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
  89. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
  90. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
  91. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
  92. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
  93. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
  94. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
  95. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -74
  96. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -64
  97. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -106
  98. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -174
  99. package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
  100. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
  101. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -37
  102. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -111
  103. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -60
  104. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -36
  105. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
  106. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -160
  107. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -190
  108. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -42
  109. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -30
  110. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
  111. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -179
  112. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -112
  113. package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -227
  114. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -80
  115. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +0 -10
  116. package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
  117. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -281
  118. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
  119. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -74
  120. package/dist/Editor/Elements/DataView/styles.js +0 -154
  121. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
  122. package/dist/Editor/helper/enforceDateFormat.js +0 -41
  123. package/dist/Editor/utils/dataView.js +0 -43
@@ -1,154 +0,0 @@
1
- const useDataViewStyles = (theme, appTheme) => ({
2
- root: {
3
- width: "100%",
4
- overflowX: "auto",
5
- marginTop: "8px",
6
- "& table": {
7
- width: "100%",
8
- "& th.fe-tv-ap-ico": {
9
- width: "50px"
10
- }
11
- },
12
- "& table th": {
13
- cursor: "pointer",
14
- width: "200px"
15
- },
16
- "& table, th, td": {
17
- border: "1px solid black",
18
- borderCollapse: "collapse"
19
- },
20
- "& .react-datepicker-wrapper": {
21
- width: "100%",
22
- "& input": {
23
- padding: "6px 12px"
24
- }
25
- },
26
- "& .MuiInputBase-root": {
27
- "& fieldset": {
28
- border: "none"
29
- }
30
- },
31
- // filter view
32
- "& .fe-tv-fv": {
33
- marginBottom: "8px",
34
- "& .mr": {
35
- marginRight: "4px"
36
- },
37
- [theme?.breakpoints?.between("xs", "md")]: {
38
- display: "flex",
39
- flexDirection: "column"
40
- }
41
- },
42
- "& .tv-act-row": {
43
- "& .tv-tr-pop": {
44
- opacity: 0,
45
- "&.active": {
46
- opacity: 1
47
- },
48
- "& .tv-ck-box": {
49
- "& svg": {
50
- color: appTheme?.palette?.editor?.tv_border
51
- },
52
- "&.Mui-checked": {
53
- "& svg": {
54
- color: "rgba(37, 99, 235, 1)"
55
- }
56
- }
57
- }
58
- },
59
- "&:hover": {
60
- "& .tv-tr-pop": {
61
- opacity: 1
62
- }
63
- }
64
- }
65
- },
66
- filterView: {
67
- display: "flex",
68
- justifyContent: "space-between",
69
- alignItems: "center",
70
- "& .MuiButtonBase-root": {
71
- padding: "6px",
72
- marginLeft: "4px",
73
- width: "29px",
74
- height: "29px",
75
- "&.active": {
76
- color: "rgba(37, 99, 235, 1)"
77
- }
78
- },
79
- "& .tv-sb": {
80
- display: "flex",
81
- border: "1px solid transparent",
82
- width: "24px",
83
- transition: "width 1s",
84
- "&.open": {
85
- width: "fit-content",
86
- border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
87
- boxShadow: "0px 4px 18px 0px #0000000D",
88
- borderRadius: "8px"
89
- },
90
- "& input": {
91
- paddingBottom: "0px",
92
- fontSize: "14px"
93
- }
94
- },
95
- "& .tv-title-wrpr, .tv-fi-wrpr": {
96
- display: "flex",
97
- "& button": {
98
- color: appTheme?.palette?.editor?.tv_text
99
- },
100
- "& input": {
101
- color: appTheme?.palette?.editor?.tv_text
102
- }
103
- },
104
- "& .tv-title-wrpr": {
105
- width: "80%",
106
- marginRight: "8px",
107
- "& .MuiInputBase-root": {
108
- width: "100%"
109
- },
110
- "& .MuiInputBase-input": {
111
- paddingBottom: "0px",
112
- fontWeight: "bold",
113
- fontSize: "16px"
114
- },
115
- [theme?.breakpoints?.between("xs", "md")]: {
116
- width: "100%",
117
- marginRight: "0px"
118
- }
119
- },
120
- "& .tv-fi-wrpr": {
121
- [theme?.breakpoints?.between("xs", "md")]: {
122
- width: "100%",
123
- justifyContent: "end"
124
- }
125
- }
126
- },
127
- basicMenu: {
128
- "& .MuiPaper-root": {
129
- padding: "0px 6px",
130
- width: "150px",
131
- border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
132
- borderRadius: "8px",
133
- background: appTheme?.palette?.editor?.tv_pop_bg,
134
- color: appTheme?.palette?.editor?.tv_text_primary,
135
- "& .MuiButtonBase-root": {
136
- fontSize: "14px",
137
- "& svg": {
138
- width: "16px",
139
- height: "16px",
140
- color: `${appTheme?.palette?.editor?.tv_text}`
141
- },
142
- "&:hover": {
143
- background: appTheme?.palette?.editor?.tv_hover_bg,
144
- borderRadius: "8px",
145
- color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
146
- "& svg": {
147
- color: `${appTheme?.palette?.editor?.tv_hover_text} !important`
148
- }
149
- }
150
- }
151
- }
152
- }
153
- });
154
- export default useDataViewStyles;
@@ -1,79 +0,0 @@
1
- import React, { useState } from "react";
2
- import { Grid, Slider, Typography, Box } from "@mui/material";
3
- import { getBreakPointsValue } from "../../../helper/theme";
4
- import useWindowResize from "../../../hooks/useWindowResize";
5
- import { useEditorContext } from "../../../hooks/useMouseMove";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
- const LineSpacing = props => {
9
- const {
10
- value: val,
11
- data,
12
- onChange
13
- } = props;
14
- const {
15
- theme
16
- } = useEditorContext();
17
- const {
18
- key
19
- } = data;
20
- const [size] = useWindowResize();
21
- const pro_value = getBreakPointsValue(val, size?.device);
22
- const [value, setValue] = useState(pro_value);
23
- let breakpointValue = getBreakPointsValue(val, null);
24
- breakpointValue = typeof breakpointValue['lg'] === 'object' ? breakpointValue['lg'] : breakpointValue;
25
- useState(() => {
26
- setValue(pro_value);
27
- }, [pro_value]);
28
- const handleChange = e => {
29
- onChange({
30
- [key]: {
31
- ...breakpointValue,
32
- [size?.device]: e.target.value
33
- }
34
- });
35
- };
36
- return /*#__PURE__*/_jsxs(Grid, {
37
- item: true,
38
- xs: 12,
39
- children: [/*#__PURE__*/_jsx(Typography, {
40
- variant: "body1",
41
- color: "primary",
42
- style: {
43
- fontSize: "14px",
44
- fontWeight: 500
45
- },
46
- children: data?.label
47
- }), /*#__PURE__*/_jsxs(Grid, {
48
- container: true,
49
- wrap: "nowrap",
50
- className: "sld-wrpr",
51
- children: [/*#__PURE__*/_jsx(Slider, {
52
- className: "spacingSlider",
53
- defaultValue: value || 1.43,
54
- "aria-label": "Default",
55
- valueLabelDisplay: "auto",
56
- min: 0.5,
57
- max: 3.0,
58
- step: 0.1,
59
- name: "lineHeight",
60
- onChange: handleChange
61
- }), /*#__PURE__*/_jsx(Box, {
62
- component: "input",
63
- sx: {
64
- background: theme?.palette?.editor?.background,
65
- color: theme?.palette?.editor?.textColor
66
- },
67
- name: "lineHeight",
68
- value: pro_value,
69
- className: "sliderInput",
70
- onChange: handleChange,
71
- type: "number",
72
- placeholder: "0",
73
- disabled: true,
74
- defaultValue: pro_value || 1.43
75
- })]
76
- })]
77
- });
78
- };
79
- export default LineSpacing;
@@ -1,41 +0,0 @@
1
- function enforceDateFormat(inputElement) {
2
- inputElement.addEventListener("input", event => {
3
- const input = event.target;
4
- let value = input.value;
5
-
6
- // Allow only numbers and forward slashes
7
- value = value.replace(/[^\d/]/g, "");
8
-
9
- // Enforce MM/DD/YYYY structure
10
- if (value.length > 10) {
11
- value = value.slice(0, 10);
12
- }
13
- const parts = value.split("/");
14
- if (parts.length > 1) {
15
- parts[0] = parts[0].slice(0, 2); // Limit MM to 2 digits
16
- if (parts[0] > 12) parts[0] = "12"; // Max month value
17
- }
18
-
19
- if (parts.length > 2) {
20
- parts[1] = parts[1].slice(0, 2); // Limit DD to 2 digits
21
- if (parts[1] > 31) parts[1] = "31"; // Max day value
22
- }
23
-
24
- if (parts.length > 3) {
25
- parts[2] = parts[2].slice(0, 4); // Limit YYYY to 4 digits
26
- }
27
-
28
- input.value = parts.join("/");
29
-
30
- // Optionally, validate the full date
31
- if (input.value.length === 10) {
32
- const [month, day, year] = input.value.split("/").map(Number);
33
- const isValidDate = !isNaN(Date.parse(`${year}-${month}-${day}`));
34
- if (!isValidDate) {
35
- input.value = ""; // Clear input if invalid
36
- alert("Invalid date format. Please enter a valid MM/DD/YYYY date.");
37
- }
38
- }
39
- });
40
- }
41
- export default enforceDateFormat;
@@ -1,43 +0,0 @@
1
- import { Transforms } from "slate";
2
- import insertNewLine from "./insertNewLine";
3
- const getDefaultDatView = () => ({
4
- type: "dataView",
5
- title: "",
6
- layouts: [{
7
- key: "view1",
8
- type: "table",
9
- label: "Table 1 View",
10
- value: "table1",
11
- filter: [],
12
- sort: []
13
- }],
14
- properties: [{
15
- key: "column1",
16
- label: "Task",
17
- type: "text",
18
- visible: true,
19
- default: true
20
- }],
21
- rows: [{
22
- id: new Date().getTime(),
23
- column1: ""
24
- }],
25
- children: [{
26
- type: "viewData",
27
- children: [{
28
- text: ""
29
- }]
30
- }]
31
- });
32
- export const insertDataView = editor => {
33
- try {
34
- Transforms.insertNodes(editor, {
35
- ...getDefaultDatView()
36
- }, {
37
- at: editor?.selection.focus.path
38
- });
39
- insertNewLine(editor);
40
- } catch (err) {
41
- console.log(err);
42
- }
43
- };