@flozy/editor 11.0.8 → 11.1.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.
- package/dist/Editor/ChatEditor.js +10 -11
- package/dist/Editor/CommonEditor.js +14 -66
- package/dist/Editor/Editor.css +9 -4
- package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
- package/dist/Editor/Elements/AI/Styles.js +0 -1
- package/dist/Editor/Elements/Accordion/Accordion.js +22 -28
- package/dist/Editor/Elements/Accordion/AccordionButton.js +3 -12
- package/dist/Editor/Elements/Button/EditorButton.js +0 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +454 -0
- package/dist/Editor/Elements/Embed/Embed.js +2 -1
- package/dist/Editor/Elements/Embed/Image.js +14 -7
- package/dist/Editor/Elements/Embed/Video.js +40 -25
- package/dist/Editor/Elements/Form/Form.js +10 -35
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +4 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +3 -3
- package/dist/Editor/Elements/FreeGrid/Options/More.js +7 -7
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -3
- package/dist/Editor/Elements/Signature/SignaturePopup.js +6 -24
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Title/title.js +6 -6
- package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
- package/dist/Editor/MiniEditor.js +1 -2
- package/dist/Editor/Styles/EditorStyles.js +1 -5
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +7 -25
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -10
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +3 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +2 -7
- package/dist/Editor/Toolbar/PopupTool/index.js +0 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +4 -8
- package/dist/Editor/common/ColorPickerButton.js +0 -3
- package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +2 -6
- package/dist/Editor/common/MentionsPopup/index.js +1 -9
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +0 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -7
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -11
- package/dist/Editor/common/RnD/VirtualElement/helper.js +62 -72
- package/dist/Editor/common/Shorthands/elements.js +4 -8
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +3 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/Uploader.js +6 -13
- package/dist/Editor/commonStyle.js +15 -30
- package/dist/Editor/helper/index.js +1 -6
- package/dist/Editor/hooks/useMouseMove.js +4 -1
- package/dist/Editor/plugins/withEmbeds.js +0 -11
- package/dist/Editor/plugins/withHTML.js +0 -2
- package/dist/Editor/utils/SlateUtilityFunctions.js +3 -30
- package/dist/Editor/utils/accordion.js +39 -67
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/events.js +89 -94
- package/dist/Editor/utils/helper.js +20 -24
- package/package.json +4 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +0 -115
- package/dist/Editor/helper/textIndeces.js +0 -58
@@ -109,20 +109,7 @@ const Form = props => {
|
|
109
109
|
if ((readOnly || test) && formEle && formEle?.current) {
|
110
110
|
const formData = new FormData(formEle?.current);
|
111
111
|
setLoading(true);
|
112
|
-
|
113
|
-
const formDataEntries = [...formData.entries()];
|
114
|
-
const childFields = element?.children?.filter(el => el?.type === "form-field");
|
115
|
-
response = formDataEntries.map(([key, value], index) => {
|
116
|
-
const fieldData = childFields[index];
|
117
|
-
return {
|
118
|
-
fieldKey: key,
|
119
|
-
[key]: value,
|
120
|
-
placeholder: fieldData?.placeholder || "",
|
121
|
-
form_name: formName,
|
122
|
-
tagName: tagName,
|
123
|
-
uid: fieldData?.uid || formName
|
124
|
-
};
|
125
|
-
});
|
112
|
+
const response = [];
|
126
113
|
let user_email = "";
|
127
114
|
let meta_data = [];
|
128
115
|
const validations = [];
|
@@ -166,28 +153,16 @@ const Form = props => {
|
|
166
153
|
rules: rule?.length > 0 && rule
|
167
154
|
});
|
168
155
|
}
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
// const fieldData = childFields[i];
|
179
|
-
|
180
|
-
// response.push({
|
181
|
-
// fieldKey: key,
|
182
|
-
// [key]: value,
|
183
|
-
// placeholder: fieldData?.placeholder || "",
|
184
|
-
// form_name: formName,
|
185
|
-
// tagName: tagName,
|
186
|
-
// uid: fieldData?.uid || formName,
|
187
|
-
// });
|
188
|
-
// }
|
156
|
+
const placeholder = fieldData?.name === pair[0] ? fieldData?.placeholder : "";
|
157
|
+
response?.push({
|
158
|
+
fieldKey: pair[0],
|
159
|
+
[pair[0]]: pair[1],
|
160
|
+
placeholder: placeholder,
|
161
|
+
form_name: formName,
|
162
|
+
tagName: tagName,
|
163
|
+
uid: fieldData?.uid
|
164
|
+
});
|
189
165
|
}
|
190
|
-
|
191
166
|
let params = {
|
192
167
|
page_id: page_id,
|
193
168
|
agency_id: agency_id,
|
@@ -184,11 +184,11 @@ const FreeGrid = props => {
|
|
184
184
|
const handleAddElementClick = type => () => {
|
185
185
|
const isEmpty = isEmptySection();
|
186
186
|
const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
|
187
|
+
const id = crypto?.randomUUID();
|
187
188
|
const {
|
188
189
|
elValues,
|
189
190
|
sectionVal
|
190
191
|
} = getElementValues(type, element?.children, breakpoint);
|
191
|
-
const id = crypto?.randomUUID();
|
192
192
|
switch (type) {
|
193
193
|
case "addText":
|
194
194
|
Transforms.insertNodes(editor, [{
|
@@ -271,7 +271,9 @@ const FreeGrid = props => {
|
|
271
271
|
...insertFreeGridItem("video", createEmbedNode("video", {
|
272
272
|
url: "",
|
273
273
|
alt: "",
|
274
|
-
images: []
|
274
|
+
images: [],
|
275
|
+
fromFreeGrid: true,
|
276
|
+
uniqueId: id
|
275
277
|
}), {
|
276
278
|
...(elValues || {})
|
277
279
|
})
|
@@ -157,14 +157,14 @@ const FreeGridBox = props => {
|
|
157
157
|
};
|
158
158
|
const repeatTimes = Math.floor(height / ROW_HEIGHT);
|
159
159
|
const sectionTypeOptions = (itemOptions?.box || []).filter(f => (hideTools || []).indexOf(f) === -1);
|
160
|
-
const isBoxHeader = useMemo(() => {
|
161
|
-
return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
|
162
|
-
}, [element]);
|
163
160
|
const boxSp = groupByBreakpoint({
|
164
161
|
borderRadius: {
|
165
162
|
...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
|
166
163
|
}
|
167
164
|
}, theme);
|
165
|
+
const isBoxHeader = useMemo(() => {
|
166
|
+
return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
|
167
|
+
}, [element]);
|
168
168
|
return /*#__PURE__*/_jsx(RnD, {
|
169
169
|
id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
|
170
170
|
className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
|
@@ -5,8 +5,8 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const More = props => {
|
6
6
|
const {
|
7
7
|
handleClick,
|
8
|
-
|
9
|
-
|
8
|
+
breakpoint,
|
9
|
+
translation
|
10
10
|
} = props;
|
11
11
|
return /*#__PURE__*/_jsx(Box, {
|
12
12
|
children: /*#__PURE__*/_jsxs(List, {
|
@@ -19,15 +19,15 @@ const More = props => {
|
|
19
19
|
className: "item-wrapper",
|
20
20
|
onClick: handleClick("duplicateSection"),
|
21
21
|
children: translation?.translation("Duplicate Section")
|
22
|
+
}), /*#__PURE__*/_jsx(ListItemButton, {
|
23
|
+
className: "item-wrapper",
|
24
|
+
onClick: handleClick("deleteSection"),
|
25
|
+
children: "Delete Section"
|
22
26
|
}), breakpoint === "xs" ? /*#__PURE__*/_jsx(ListItemButton, {
|
23
27
|
className: "item-wrapper",
|
24
28
|
onClick: handleClick("forceAutoAlignment"),
|
25
29
|
children: "Force Auto Alignment"
|
26
|
-
}) : null
|
27
|
-
className: "item-wrapper",
|
28
|
-
onClick: handleClick("deleteSection"),
|
29
|
-
children: "Delete Section"
|
30
|
-
})]
|
30
|
+
}) : null]
|
31
31
|
})
|
32
32
|
});
|
33
33
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { signedTextFonts } from "../../../utils/font";
|
3
3
|
import { Grid, Button, TextField, InputAdornment, IconButton, Typography } from "@mui/material";
|
4
|
-
import ClearRoundedIcon from
|
4
|
+
import ClearRoundedIcon from '@mui/icons-material/ClearRounded';
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
const TypeSignature = props => {
|
@@ -80,8 +80,7 @@ const TypeSignature = props => {
|
|
80
80
|
children: /*#__PURE__*/_jsx(ClearRoundedIcon, {})
|
81
81
|
})
|
82
82
|
})
|
83
|
-
}
|
84
|
-
autoComplete: "typeName"
|
83
|
+
}
|
85
84
|
})
|
86
85
|
})
|
87
86
|
})
|
@@ -92,17 +92,9 @@ const SignaturePopup = props => {
|
|
92
92
|
};
|
93
93
|
const onChange = e => {
|
94
94
|
e?.stopPropagation();
|
95
|
-
const {
|
96
|
-
name,
|
97
|
-
value
|
98
|
-
} = e.target;
|
99
|
-
const fieldMap = {
|
100
|
-
name: "signedBy",
|
101
|
-
email: "signedByEmail"
|
102
|
-
};
|
103
95
|
setSignedData({
|
104
96
|
...signedData,
|
105
|
-
[
|
97
|
+
[e.target.name]: e.target.value
|
106
98
|
});
|
107
99
|
};
|
108
100
|
const onBrushSize = val => () => {
|
@@ -319,19 +311,15 @@ const SignaturePopup = props => {
|
|
319
311
|
xs: 12,
|
320
312
|
children: /*#__PURE__*/_jsx(TextField, {
|
321
313
|
fullWidth: true,
|
322
|
-
id: "
|
323
|
-
name: "
|
314
|
+
id: "signedBy",
|
315
|
+
name: "signedBy",
|
324
316
|
placeholder: translation("Enter Name"),
|
325
317
|
value: signedData.signedBy || ""
|
326
318
|
// defaultValue={defaultName || ""}
|
327
319
|
,
|
328
320
|
size: "small",
|
329
321
|
onChange: onChange,
|
330
|
-
sx: classes.signaturePopUpNameField
|
331
|
-
autoComplete: "name",
|
332
|
-
inputProps: {
|
333
|
-
autoComplete: "name"
|
334
|
-
}
|
322
|
+
sx: classes.signaturePopUpNameField
|
335
323
|
})
|
336
324
|
})]
|
337
325
|
}), /*#__PURE__*/_jsxs(Grid, {
|
@@ -451,20 +439,14 @@ const SignaturePopup = props => {
|
|
451
439
|
item: true,
|
452
440
|
children: /*#__PURE__*/_jsx(TextField, {
|
453
441
|
fullWidth: true,
|
454
|
-
id: "
|
455
|
-
name: "
|
456
|
-
type: "email",
|
442
|
+
id: "signedByEmail",
|
443
|
+
name: "signedByEmail",
|
457
444
|
placeholder: translation("Enter Email"),
|
458
445
|
size: "small",
|
459
446
|
onChange: onChange,
|
460
447
|
sx: classes.signaturePopUpNameField,
|
461
448
|
value: signedData.signedByEmail || ""
|
462
449
|
// defaultValue={defaultEmail || ""}
|
463
|
-
,
|
464
|
-
autoComplete: "email",
|
465
|
-
inputProps: {
|
466
|
-
autoComplete: "email"
|
467
|
-
}
|
468
450
|
})
|
469
451
|
})]
|
470
452
|
})]
|
@@ -35,8 +35,8 @@ const SimpleTextStyle = ({
|
|
35
35
|
height: "24px",
|
36
36
|
overflow: "hidden",
|
37
37
|
fontSize: "14px",
|
38
|
-
display:
|
39
|
-
alignItems:
|
38
|
+
display: 'inline-flex',
|
39
|
+
alignItems: 'center',
|
40
40
|
"& .bg-pad-sl": {
|
41
41
|
padding: "2px 4px 2px 4px",
|
42
42
|
background: "transparent",
|
@@ -308,7 +308,7 @@ const Table = props => {
|
|
308
308
|
onScroll: handleScroll,
|
309
309
|
onMouseOver: onMouseOver,
|
310
310
|
onMouseLeave: onMouseLeave,
|
311
|
-
className: "custom-scroll",
|
311
|
+
className: !hideTools.includes("add_column") ? "custom-scroll" : '',
|
312
312
|
children: [/*#__PURE__*/_jsx(TableComp, {
|
313
313
|
className: readOnly ? "readOnly" : "",
|
314
314
|
sx: {
|
@@ -346,8 +346,8 @@ const Table = props => {
|
|
346
346
|
handleAction: handleAction,
|
347
347
|
exandTools: exandTools,
|
348
348
|
openSetttings: openSetttings,
|
349
|
-
|
350
|
-
|
349
|
+
translation: translation,
|
350
|
+
hideTools: hideTools
|
351
351
|
}), /*#__PURE__*/_jsx(MoreTableSettings, {
|
352
352
|
exandTools: exandTools,
|
353
353
|
handleAction: handleAction,
|
@@ -3,12 +3,6 @@ import { Text } from "slate";
|
|
3
3
|
import { useSlate } from "slate-react";
|
4
4
|
import { getNodeText, getNodeWithType } from "../../utils/helper";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
-
const isEmptyTextNode = node => {
|
7
|
-
if (Text.isText(node)) {
|
8
|
-
return !node.text.trim();
|
9
|
-
}
|
10
|
-
return false;
|
11
|
-
};
|
12
6
|
const Title = props => {
|
13
7
|
const {
|
14
8
|
attributes,
|
@@ -52,4 +46,10 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
|
|
52
46
|
}
|
53
47
|
}, [editor.selection]);
|
54
48
|
return null;
|
49
|
+
};
|
50
|
+
const isEmptyTextNode = node => {
|
51
|
+
if (Text.isText(node)) {
|
52
|
+
return !node.text.trim();
|
53
|
+
}
|
54
|
+
return false;
|
55
55
|
};
|
@@ -34,8 +34,7 @@ const VariableButton = props => {
|
|
34
34
|
PaperProps: {
|
35
35
|
style: {
|
36
36
|
maxHeight: 300,
|
37
|
-
overflowY: "auto"
|
38
|
-
transformOrigin: 'top left'
|
37
|
+
overflowY: "auto"
|
39
38
|
},
|
40
39
|
sx: {
|
41
40
|
"&::-webkit-scrollbar-track": {
|
@@ -45,14 +44,6 @@ const VariableButton = props => {
|
|
45
44
|
borderRadius: "16px"
|
46
45
|
}
|
47
46
|
}
|
48
|
-
},
|
49
|
-
anchorOrigin: {
|
50
|
-
vertical: 'bottom',
|
51
|
-
horizontal: 'right'
|
52
|
-
},
|
53
|
-
transformOrigin: {
|
54
|
-
vertical: 'top',
|
55
|
-
horizontal: 'right'
|
56
47
|
}
|
57
48
|
},
|
58
49
|
children: [/*#__PURE__*/_jsx(MenuItem, {
|
@@ -45,13 +45,12 @@ const MiniEditor = props => {
|
|
45
45
|
const {
|
46
46
|
translationMock
|
47
47
|
} = otherProps;
|
48
|
-
const dummyTranslation = () => {};
|
49
48
|
const customProps = {
|
50
49
|
...(otherProps || {}),
|
51
50
|
readOnly: isReadOnly,
|
52
51
|
editorPlaceholder: miniEditorPlaceholder,
|
53
52
|
page_id: id,
|
54
|
-
translation: translation || translationMock
|
53
|
+
translation: translation || translationMock
|
55
54
|
};
|
56
55
|
const [mentions, setMentions] = useMentions({
|
57
56
|
editor,
|
@@ -136,11 +136,7 @@ const editorStyles = ({
|
|
136
136
|
},
|
137
137
|
"& .accordion-summary-collapse-btn": {
|
138
138
|
padding: "4px",
|
139
|
-
width: "5px"
|
140
|
-
"& svg:hover": {
|
141
|
-
background: theme?.palette?.editor?.tv_hover_bg,
|
142
|
-
borderRadius: "4px"
|
143
|
-
}
|
139
|
+
width: "5px"
|
144
140
|
},
|
145
141
|
"& .workflow-icon-btn": {
|
146
142
|
pointerEvents: "none",
|
@@ -2,7 +2,7 @@ import { useMemo } from "react";
|
|
2
2
|
import { isBlockActive, toggleBlock } from "../../../utils/SlateUtilityFunctions";
|
3
3
|
import CustomSelectTool from "./CustomSelectTool";
|
4
4
|
import Icon from "../../../common/Icon";
|
5
|
-
import { insertAccordion
|
5
|
+
import { insertAccordion } from "../../../utils/accordion";
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
8
|
function Label({
|
@@ -16,8 +16,8 @@ function Label({
|
|
16
16
|
}), " ", label]
|
17
17
|
});
|
18
18
|
}
|
19
|
-
function getListOptions(translation
|
20
|
-
|
19
|
+
function getListOptions(translation) {
|
20
|
+
return [{
|
21
21
|
id: 15,
|
22
22
|
value: "orderedList",
|
23
23
|
type: "block",
|
@@ -53,8 +53,7 @@ function getListOptions(translation, listType) {
|
|
53
53
|
icon: "check-list-item"
|
54
54
|
}),
|
55
55
|
group: "list"
|
56
|
-
}
|
57
|
-
const accordion = [{
|
56
|
+
}, {
|
58
57
|
id: 30,
|
59
58
|
value: "accordion",
|
60
59
|
type: "accordion",
|
@@ -68,30 +67,17 @@ function getListOptions(translation, listType) {
|
|
68
67
|
icon: "accordion"
|
69
68
|
})
|
70
69
|
}];
|
71
|
-
let options = [];
|
72
|
-
if (listType === "accordion-summary") {
|
73
|
-
options = [...accordion];
|
74
|
-
} else if (listType === "list-item") {
|
75
|
-
options = [...list];
|
76
|
-
} else {
|
77
|
-
options = [...list, ...accordion];
|
78
|
-
}
|
79
|
-
return options;
|
80
70
|
}
|
81
71
|
function SelectList({
|
82
72
|
editor,
|
83
73
|
classes,
|
84
74
|
closeMainPopup,
|
85
|
-
customProps
|
86
|
-
commonProps
|
75
|
+
customProps
|
87
76
|
}) {
|
88
77
|
const {
|
89
78
|
translation
|
90
79
|
} = customProps;
|
91
|
-
const
|
92
|
-
listType
|
93
|
-
} = commonProps || {};
|
94
|
-
const listOptions = getListOptions(translation, listType);
|
80
|
+
const listOptions = getListOptions(translation);
|
95
81
|
const selectedList = useMemo(() => {
|
96
82
|
return listOptions.find(t => isBlockActive(editor, t.value));
|
97
83
|
}, [listOptions, isBlockActive, editor]);
|
@@ -99,11 +85,7 @@ function SelectList({
|
|
99
85
|
if (option.type === "block") {
|
100
86
|
toggleBlock(editor, format);
|
101
87
|
} else if (option.type === "accordion") {
|
102
|
-
|
103
|
-
toggleAccordion(editor);
|
104
|
-
} else {
|
105
|
-
insertAccordion(editor);
|
106
|
-
}
|
88
|
+
insertAccordion(editor);
|
107
89
|
}
|
108
90
|
closeMainPopup();
|
109
91
|
};
|
@@ -3,7 +3,7 @@ import SelectTypography from "./SelectTypography";
|
|
3
3
|
import SelectList from "./SelectList";
|
4
4
|
import { toolbarGroups } from "../../toolbarGroups";
|
5
5
|
import { MarkButton } from "../../FormatTools";
|
6
|
-
import { activeMark,
|
6
|
+
import { activeMark, isBlockActive } from "../../../utils/SlateUtilityFunctions";
|
7
7
|
import LinkButton from "../../../Elements/Link/LinkButton";
|
8
8
|
import TextToolIcon from "../../../assets/svg/TextToolIcon";
|
9
9
|
import TextFormat from "../TextFormat";
|
@@ -37,10 +37,6 @@ const MiniTextFormat = props => {
|
|
37
37
|
const [resizedSize, setResizedSize] = useState();
|
38
38
|
const [size] = useWindowResize();
|
39
39
|
const theme = useTheme();
|
40
|
-
const listType = getListType(editor);
|
41
|
-
const commonProps = {
|
42
|
-
listType
|
43
|
-
};
|
44
40
|
const removeFontStyles = ["superscript", "subscript"];
|
45
41
|
const fontStyle = allTools.filter(f => f.type === "mark" && !removeFontStyles.includes(f.format));
|
46
42
|
const link = allTools.find(f => f.format?.indexOf("link") >= 0);
|
@@ -71,8 +67,7 @@ const MiniTextFormat = props => {
|
|
71
67
|
classes: classes,
|
72
68
|
editor: editor,
|
73
69
|
closeMainPopup: closeMainPopup,
|
74
|
-
customProps: customProps
|
75
|
-
commonProps: commonProps
|
70
|
+
customProps: customProps
|
76
71
|
}), /*#__PURE__*/_jsx("div", {
|
77
72
|
className: "verticalLine mr-1"
|
78
73
|
}), /*#__PURE__*/_jsx(SelectAlignment, {
|
@@ -103,8 +98,8 @@ const MiniTextFormat = props => {
|
|
103
98
|
activeColor: activeColor,
|
104
99
|
id: "11_cc",
|
105
100
|
editor: editor,
|
106
|
-
|
107
|
-
|
101
|
+
type: "textColor",
|
102
|
+
customProps: customProps
|
108
103
|
}), /*#__PURE__*/_jsx(MiniColorPicker, {
|
109
104
|
format: textBgFormat,
|
110
105
|
classes: classes,
|
@@ -151,7 +146,6 @@ const MiniTextFormat = props => {
|
|
151
146
|
classes: classes,
|
152
147
|
closeMainPopup: closeMainPopup,
|
153
148
|
customProps: customProps,
|
154
|
-
commonProps: commonProps,
|
155
149
|
fromMiniTextFormat: true,
|
156
150
|
setResizedSize: setResizedSize,
|
157
151
|
resizedSize: resizedSize
|
@@ -436,11 +436,6 @@ const usePopupStyle = theme => ({
|
|
436
436
|
"& .MuiOutlinedInput-notchedOutline": {
|
437
437
|
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important`
|
438
438
|
},
|
439
|
-
"& .MuiInputBase-root": {
|
440
|
-
"& input": {
|
441
|
-
border: "none !important"
|
442
|
-
}
|
443
|
-
},
|
444
439
|
"& svg": {
|
445
440
|
width: "20px",
|
446
441
|
height: "24px"
|
@@ -449,6 +444,9 @@ const usePopupStyle = theme => ({
|
|
449
444
|
fontFamilyListOptions: {
|
450
445
|
"& .MuiAutocomplete-listbox": {
|
451
446
|
padding: "0px",
|
447
|
+
// "&::-webkit-scrollbar-thumb": {
|
448
|
+
// background: `none !important`,
|
449
|
+
// },
|
452
450
|
"&::-webkit-scrollbar-thumb": {
|
453
451
|
background: `${theme?.palette?.editor?.brainPopupScroll} !important`
|
454
452
|
},
|
@@ -32,7 +32,6 @@ const TextFormat = props => {
|
|
32
32
|
onClose,
|
33
33
|
closeMainPopup,
|
34
34
|
customProps,
|
35
|
-
commonProps,
|
36
35
|
setResizedSize,
|
37
36
|
resizedSize,
|
38
37
|
fromMiniTextFormat
|
@@ -43,9 +42,6 @@ const TextFormat = props => {
|
|
43
42
|
const {
|
44
43
|
translation
|
45
44
|
} = customProps;
|
46
|
-
const {
|
47
|
-
listType
|
48
|
-
} = commonProps || {};
|
49
45
|
const {
|
50
46
|
element: pageSt
|
51
47
|
} = getPageSettings(editor) || {};
|
@@ -59,7 +55,7 @@ const TextFormat = props => {
|
|
59
55
|
const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
|
60
56
|
const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
|
61
57
|
const link = allTools.find(f => f.format?.indexOf("link") >= 0);
|
62
|
-
const lists = allTools.filter(f => f.group?.
|
58
|
+
const lists = allTools.filter(f => f.group?.indexOf("list") >= 0);
|
63
59
|
const {
|
64
60
|
isActive: isBlockQuoteActive,
|
65
61
|
props: bqProps
|
@@ -399,8 +395,7 @@ const TextFormat = props => {
|
|
399
395
|
return /*#__PURE__*/_jsx(Comp, {
|
400
396
|
editor: editor,
|
401
397
|
...m,
|
402
|
-
customProps: customProps
|
403
|
-
commonProps: commonProps
|
398
|
+
customProps: customProps
|
404
399
|
}, `pptool_block_${i}_${m.id}`);
|
405
400
|
})
|
406
401
|
})]
|
@@ -95,7 +95,6 @@ const PopupTool = props => {
|
|
95
95
|
const isFreeGridEnabled = enable === 1 && isFreeGridElement;
|
96
96
|
if (!selection || Range.isCollapsed(selection) || Editor.string(editor, selection) === "" || isFreeGridEnabled) {
|
97
97
|
setAnchorEl(null);
|
98
|
-
// hideSlateSelection(); // removes slate selection background, when there is no selection
|
99
98
|
} else {
|
100
99
|
updateAnchorEl();
|
101
100
|
viewSlateSelection();
|
@@ -154,22 +154,19 @@ export const toolbarGroups = [[{
|
|
154
154
|
format: "orderedList",
|
155
155
|
type: "block",
|
156
156
|
title: "Ordered List",
|
157
|
-
group: "list"
|
158
|
-
hideFor: ["accordion-summary"]
|
157
|
+
group: "list"
|
159
158
|
}, {
|
160
159
|
id: 16,
|
161
160
|
format: "unorderedList",
|
162
161
|
type: "block",
|
163
162
|
title: "Bulleted List",
|
164
|
-
group: "list"
|
165
|
-
hideFor: ["accordion-summary"]
|
163
|
+
group: "list"
|
166
164
|
}, {
|
167
165
|
id: 43,
|
168
166
|
format: "check-list-item",
|
169
167
|
type: "block",
|
170
168
|
title: "Check List",
|
171
|
-
group: "list"
|
172
|
-
hideFor: ["accordion-summary"]
|
169
|
+
group: "list"
|
173
170
|
}], [{
|
174
171
|
id: 17,
|
175
172
|
format: "alignLeft",
|
@@ -272,8 +269,7 @@ export const toolbarGroups = [[{
|
|
272
269
|
format: "accordion",
|
273
270
|
type: "accordion",
|
274
271
|
group: "list",
|
275
|
-
component: "AccordionButton"
|
276
|
-
hideFor: ["list-item"]
|
272
|
+
component: "AccordionButton"
|
277
273
|
}, {
|
278
274
|
id: 31,
|
279
275
|
format: "signature",
|
@@ -19,8 +19,6 @@ const FontLoader = props => {
|
|
19
19
|
const loadFontsInBatches = (families, batchSize = 5, maxRetries = 3) => {
|
20
20
|
let currentIndex = 0;
|
21
21
|
let retryCount = 0;
|
22
|
-
// let hideLoaderOn = 30;
|
23
|
-
|
24
22
|
const loadNextBatch = () => {
|
25
23
|
try {
|
26
24
|
if (currentIndex >= families?.length) {
|
@@ -81,7 +79,6 @@ const FontLoader = props => {
|
|
81
79
|
// console.log(err);
|
82
80
|
// setLoading(false);
|
83
81
|
});
|
84
|
-
// setLoading(true);
|
85
82
|
} else {
|
86
83
|
function correctFontArray(fontString) {
|
87
84
|
let fontsArray = fontString?.split(",");
|
@@ -175,8 +175,7 @@ export const ScrollTopBottom = props => {
|
|
175
175
|
const {
|
176
176
|
value,
|
177
177
|
onChange,
|
178
|
-
translation
|
179
|
-
classes
|
178
|
+
translation
|
180
179
|
} = props;
|
181
180
|
return /*#__PURE__*/_jsx(Select, {
|
182
181
|
options: scrollToOptions,
|
@@ -184,10 +183,7 @@ export const ScrollTopBottom = props => {
|
|
184
183
|
onChange: e => onChange(e.target.value),
|
185
184
|
label: translation("Choose Top/Bottom of page"),
|
186
185
|
showDefault: true,
|
187
|
-
translation: translation
|
188
|
-
MenuProps: {
|
189
|
-
sx: classes.customSelect
|
190
|
-
}
|
186
|
+
translation: translation
|
191
187
|
});
|
192
188
|
};
|
193
189
|
const filter = createFilterOptions();
|
@@ -9,7 +9,6 @@ import usePopupStyle from "./Styles";
|
|
9
9
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
10
10
|
import { checkTypings } from "../../hooks/useMentions";
|
11
11
|
import canOpen from "../../helper/canOpen";
|
12
|
-
import { getListType } from "../../utils/SlateUtilityFunctions";
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
14
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
14
|
const POPUP_LIST_TYPES = {
|
@@ -65,14 +64,7 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
65
64
|
}, [editor?.selection]);
|
66
65
|
useEffect(() => {
|
67
66
|
try {
|
68
|
-
|
69
|
-
if (onNodeType === "accordion") {
|
70
|
-
const isAccordion = getListType(editor) === "accordion-summary";
|
71
|
-
if (isAccordion) {
|
72
|
-
// if cursor at accordion-summary
|
73
|
-
onNodeType = "accordion-summary";
|
74
|
-
}
|
75
|
-
}
|
67
|
+
const onNodeType = canOpen(editor);
|
76
68
|
if (target && chars.length > 0 && onNodeType !== false) {
|
77
69
|
const domRange = ReactEditor.toDOMRange(editor, target);
|
78
70
|
const rect = domRange?.getBoundingClientRect();
|