@flozy/editor 10.9.3 → 10.9.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.
- package/dist/Editor/ChatEditor.js +16 -17
- package/dist/Editor/CommonEditor.js +27 -138
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +11 -39
- 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/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Attachments/Attachments.js +11 -153
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +3 -8
- package/dist/Editor/Elements/Button/EditorButton.js +7 -23
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
- package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +454 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +55 -134
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +8 -7
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +3 -8
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
- package/dist/Editor/Elements/Embed/Embed.js +43 -36
- package/dist/Editor/Elements/Embed/Image.js +23 -236
- package/dist/Editor/Elements/Embed/Video.js +15 -246
- package/dist/Editor/Elements/Form/FormField.js +1 -1
- package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
- package/dist/Editor/Elements/Form/Workflow/constant.js +1 -25
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +33 -39
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -1
- package/dist/Editor/Elements/FreeGrid/Options/More.js +7 -7
- package/dist/Editor/Elements/FreeGrid/styles.js +0 -15
- package/dist/Editor/Elements/Grid/GridItem.js +1 -1
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -2
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Table/TableCell.js +3 -10
- package/dist/Editor/Elements/Title/title.js +11 -10
- package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -4
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +3 -5
- package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
- package/dist/Editor/MiniEditor.js +1 -2
- package/dist/Editor/Styles/EditorStyles.js +8 -20
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +29 -33
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +23 -25
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +7 -25
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +8 -24
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +10 -70
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +14 -73
- package/dist/Editor/Toolbar/PopupTool/index.js +4 -7
- package/dist/Editor/Toolbar/toolbarGroups.js +10 -56
- package/dist/Editor/common/ColorPickerButton.js +16 -38
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +0 -4
- package/dist/Editor/common/Icon.js +0 -28
- package/dist/Editor/common/ImageSelector/ImageSelector.js +7 -45
- package/dist/Editor/common/ImageSelector/Options/Upload.js +11 -26
- package/dist/Editor/common/ImageSelector/Styles.js +9 -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/OtherSettings/Settings.js +1 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +7 -20
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -9
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +7 -20
- package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -11
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +18 -28
- package/dist/Editor/common/RnD/Utils/index.js +1 -3
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +58 -45
- package/dist/Editor/common/RnD/VirtualElement/helper.js +130 -320
- package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -22
- package/dist/Editor/common/RnD/index.js +13 -48
- package/dist/Editor/common/Shorthands/elements.js +4 -62
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +0 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +2 -15
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +0 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +1 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
- package/dist/Editor/common/StyleBuilder/formStyle.js +13 -19
- package/dist/Editor/common/StyleBuilder/index.js +4 -8
- package/dist/Editor/common/Uploader.js +17 -125
- package/dist/Editor/common/iconslist.js +0 -21
- package/dist/Editor/commonStyle.js +45 -64
- package/dist/Editor/helper/index.js +2 -10
- package/dist/Editor/helper/theme.js +2 -203
- package/dist/Editor/hooks/useMouseMove.js +3 -9
- package/dist/Editor/plugins/withEmbeds.js +1 -12
- package/dist/Editor/plugins/withHTML.js +3 -58
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/service/fileupload.js +0 -70
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +40 -189
- package/dist/Editor/utils/accordion.js +40 -68
- package/dist/Editor/utils/button.js +17 -1
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/events.js +89 -94
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/formfield.js +2 -2
- package/dist/Editor/utils/helper.js +22 -98
- package/dist/Editor/utils/insertAppHeader.js +4 -8
- package/package.json +4 -4
- package/dist/Editor/Elements/Attachments/AttachmentStyles.js +0 -16
- package/dist/Editor/Elements/FreeGrid/helper.js +0 -115
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
- package/dist/Editor/assets/svg/BackIcon.js +0 -18
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
- package/dist/Editor/common/CustomColorPicker/index.js +0 -130
- package/dist/Editor/common/CustomColorPicker/style.js +0 -53
- package/dist/Editor/common/CustomDialog2/index.js +0 -94
- package/dist/Editor/common/CustomDialog2/style.js +0 -67
- package/dist/Editor/common/CustomSelect.js +0 -43
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
- package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +0 -115
- package/dist/Editor/common/UploaderWithProgress.js +0 -183
- package/dist/Editor/helper/textIndeces.js +0 -58
- package/dist/Editor/hooks/useEditorTheme.js +0 -153
- package/dist/Editor/hooks/useThemeValues.js +0 -63
- package/dist/Editor/theme/index.js +0 -149
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
- package/dist/Editor/themeSettings/buttons/index.js +0 -300
- package/dist/Editor/themeSettings/buttons/style.js +0 -23
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
- package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
- package/dist/Editor/themeSettings/fonts/index.js +0 -240
- package/dist/Editor/themeSettings/fonts/style.js +0 -62
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -380
- package/dist/Editor/themeSettings/style.js +0 -299
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -355
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
- package/dist/Editor/themeSettingsAI/style.js +0 -332
@@ -10,8 +10,6 @@ import { AllColors } from "../../Elements/Color Picker/ColorButtons";
|
|
10
10
|
import { fontFamilyMap } from "../../utils/font";
|
11
11
|
import { getBorderColor } from "../../utils/helper";
|
12
12
|
import SelectTypography from "./MiniTextFormat/SelectTypography";
|
13
|
-
import { isTextCustomized, saveToTheme } from "../../helper/theme";
|
14
|
-
import { useEditorTheme } from "../../hooks/useEditorTheme";
|
15
13
|
import SelectSuperSubscript from "./MiniTextFormat/SelectSuperSubscript";
|
16
14
|
import { ColorResetIcon, TextDefaultStyleIcon } from "../../common/iconListV2";
|
17
15
|
import FontFamilyAutocomplete from "../FormatTools/FontFamilyAutocomplete";
|
@@ -31,11 +29,7 @@ const TextFormat = props => {
|
|
31
29
|
editor,
|
32
30
|
onClose,
|
33
31
|
closeMainPopup,
|
34
|
-
customProps
|
35
|
-
commonProps,
|
36
|
-
setResizedSize,
|
37
|
-
resizedSize,
|
38
|
-
fromMiniTextFormat
|
32
|
+
customProps
|
39
33
|
} = props;
|
40
34
|
const [anchorEl, setAnchorEl] = useState(null);
|
41
35
|
const [type, setType] = useState(null);
|
@@ -43,23 +37,20 @@ const TextFormat = props => {
|
|
43
37
|
const {
|
44
38
|
translation
|
45
39
|
} = customProps;
|
46
|
-
const {
|
47
|
-
listType
|
48
|
-
} = commonProps || {};
|
49
40
|
const {
|
50
41
|
element: pageSt
|
51
42
|
} = getPageSettings(editor) || {};
|
52
43
|
const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
53
44
|
const {
|
54
45
|
fontFamilies,
|
55
|
-
theme
|
46
|
+
theme
|
56
47
|
} = useEditorContext();
|
57
48
|
const breakpoint = getDevice(window.innerWidth);
|
58
49
|
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
59
50
|
const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
|
60
51
|
const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
|
61
52
|
const link = allTools.find(f => f.format?.indexOf("link") >= 0);
|
62
|
-
const lists = allTools.filter(f => f.group?.
|
53
|
+
const lists = allTools.filter(f => f.group?.indexOf("list") >= 0);
|
63
54
|
const {
|
64
55
|
isActive: isBlockQuoteActive,
|
65
56
|
props: bqProps
|
@@ -71,11 +62,6 @@ const TextFormat = props => {
|
|
71
62
|
color: "",
|
72
63
|
bgColor: ""
|
73
64
|
};
|
74
|
-
const {
|
75
|
-
theme,
|
76
|
-
updateTheme
|
77
|
-
} = useEditorTheme();
|
78
|
-
const customized = isTextCustomized(editor);
|
79
65
|
let lineSpacingValue = activeMark(editor, "lineHeight");
|
80
66
|
lineSpacingValue = lineSpacingValue?.[breakpoint] !== undefined ? lineSpacingValue : pageSettingLine;
|
81
67
|
const handleColorPicker = type => e => {
|
@@ -130,51 +116,6 @@ const TextFormat = props => {
|
|
130
116
|
sx: classes.textFormatWrapper,
|
131
117
|
className: "text-formatter-popup",
|
132
118
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
133
|
-
item: true,
|
134
|
-
xs: 12,
|
135
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
136
|
-
container: true,
|
137
|
-
justifyContent: "space-between",
|
138
|
-
alignItems: "center",
|
139
|
-
children: [/*#__PURE__*/_jsx(Grid, {
|
140
|
-
item: true,
|
141
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
142
|
-
variant: "body1",
|
143
|
-
color: "primary",
|
144
|
-
sx: classes.typoLabel,
|
145
|
-
children: "Style"
|
146
|
-
})
|
147
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
148
|
-
item: true,
|
149
|
-
children: theme?.id ? /*#__PURE__*/_jsx(Button, {
|
150
|
-
sx: classes.defaultBtn,
|
151
|
-
onClick: () => {
|
152
|
-
const {
|
153
|
-
field,
|
154
|
-
theme
|
155
|
-
} = saveToTheme(editor) || {};
|
156
|
-
updateTheme(theme, {
|
157
|
-
action: "ELEMENT_PROPS_CHANGE",
|
158
|
-
fieldName: field
|
159
|
-
});
|
160
|
-
},
|
161
|
-
disabled: !customized,
|
162
|
-
children: "Save to theme"
|
163
|
-
}) : null
|
164
|
-
})]
|
165
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
166
|
-
item: true,
|
167
|
-
xs: 12,
|
168
|
-
sx: classes.textFormatField,
|
169
|
-
children: /*#__PURE__*/_jsx(SelectTypography, {
|
170
|
-
editor: editor,
|
171
|
-
classes: classes,
|
172
|
-
closeMainPopup: closeMainPopup,
|
173
|
-
type: "fullWidth",
|
174
|
-
customProps: customProps
|
175
|
-
})
|
176
|
-
})]
|
177
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
178
119
|
item: true,
|
179
120
|
xs: 12,
|
180
121
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
@@ -255,10 +196,7 @@ const TextFormat = props => {
|
|
255
196
|
format: "fontSize",
|
256
197
|
activeMark: activeMark,
|
257
198
|
editor: editor,
|
258
|
-
fullWidth: true
|
259
|
-
fromMiniTextFormat: fromMiniTextFormat,
|
260
|
-
setResizedSize: setResizedSize,
|
261
|
-
resizedSize: resizedSize
|
199
|
+
fullWidth: true
|
262
200
|
})
|
263
201
|
})]
|
264
202
|
})]
|
@@ -304,8 +242,7 @@ const TextFormat = props => {
|
|
304
242
|
rounded: true,
|
305
243
|
title: translation("textColor"),
|
306
244
|
id: "11_cc",
|
307
|
-
classes: classes
|
308
|
-
type: "textColor"
|
245
|
+
classes: classes
|
309
246
|
}, "11_cc")
|
310
247
|
})]
|
311
248
|
}), /*#__PURE__*/_jsxs(Grid, {
|
@@ -331,7 +268,7 @@ const TextFormat = props => {
|
|
331
268
|
children: /*#__PURE__*/_jsx(Button, {
|
332
269
|
sx: classes.defaultBtn2,
|
333
270
|
startIcon: /*#__PURE__*/_jsx(ColorResetIcon, {
|
334
|
-
stroke:
|
271
|
+
stroke: theme?.palette?.type === "dark" ? "#505359" : "#A2B0B9"
|
335
272
|
}),
|
336
273
|
onClick: handleDefault({
|
337
274
|
format: "bgColor"
|
@@ -399,8 +336,7 @@ const TextFormat = props => {
|
|
399
336
|
return /*#__PURE__*/_jsx(Comp, {
|
400
337
|
editor: editor,
|
401
338
|
...m,
|
402
|
-
customProps: customProps
|
403
|
-
commonProps: commonProps
|
339
|
+
customProps: customProps
|
404
340
|
}, `pptool_block_${i}_${m.id}`);
|
405
341
|
})
|
406
342
|
})]
|
@@ -422,7 +358,12 @@ const TextFormat = props => {
|
|
422
358
|
xs: 12,
|
423
359
|
className: "typo-icons",
|
424
360
|
sx: classes.evenSpace,
|
425
|
-
children: [
|
361
|
+
children: [/*#__PURE__*/_jsx(SelectTypography, {
|
362
|
+
classes: classes,
|
363
|
+
editor: editor,
|
364
|
+
closeMainPopup: closeMainPopup || onClose,
|
365
|
+
customProps: customProps
|
366
|
+
}), fontStyle?.map((m, i) => {
|
426
367
|
return /*#__PURE__*/_jsx(MarkButton, {
|
427
368
|
editor: editor,
|
428
369
|
...m,
|
@@ -461,7 +402,7 @@ const TextFormat = props => {
|
|
461
402
|
value: lineSpacingValue,
|
462
403
|
onChange: handleLineSpacing,
|
463
404
|
data: {
|
464
|
-
key:
|
405
|
+
key: 'lineHeight'
|
465
406
|
}
|
466
407
|
})
|
467
408
|
})]
|
@@ -9,7 +9,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
|
|
9
9
|
import usePopupStyles from "../PopupTool/PopupToolStyle";
|
10
10
|
import useEditorScroll from "../../hooks/useEditorScroll";
|
11
11
|
import { isCarouselSelected } from "../../helper";
|
12
|
-
import { hideSlateSelection
|
12
|
+
import { hideSlateSelection } from "../../utils/helper";
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
14
14
|
const isSlateDOM = event => {
|
15
15
|
return event.target.getAttribute("data-slate-string") === "true";
|
@@ -95,18 +95,15 @@ 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
|
-
|
102
|
-
// hideSlateSelection(); // removes slate selection background, when there is no selection
|
100
|
+
hideSlateSelection(); // removes slate selection background, when there is no selection
|
103
101
|
}
|
104
102
|
}, [selection, event, selectedElement?.enable]);
|
105
103
|
const handleClose = () => {
|
106
104
|
// setAnchorEl(null);
|
107
105
|
setOpen(false);
|
108
106
|
setPopupType("");
|
109
|
-
Transforms.deselect(editor);
|
110
107
|
};
|
111
108
|
return open && !openAI ? /*#__PURE__*/_jsx(ClickAwayListener, {
|
112
109
|
onClickAway: e => {
|
@@ -143,13 +140,13 @@ const PopupTool = props => {
|
|
143
140
|
sx: classes.popupWrapper,
|
144
141
|
placement: "top-start",
|
145
142
|
style: {
|
146
|
-
boxShadow:
|
143
|
+
boxShadow: 'unset'
|
147
144
|
} //this is for overriding global shadow from popupwrapper used in other places
|
148
145
|
,
|
149
146
|
children: /*#__PURE__*/_jsx(Paper, {
|
150
147
|
sx: {
|
151
148
|
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
|
152
|
-
boxShadow:
|
149
|
+
boxShadow: '1px 2px 12px 0px #0000001F'
|
153
150
|
},
|
154
151
|
children: /*#__PURE__*/_jsx(MiniTextFormat, {
|
155
152
|
editor: editor,
|
@@ -28,20 +28,16 @@ export const toolbarGroups = [[{
|
|
28
28
|
type: "dropdown",
|
29
29
|
options: [{
|
30
30
|
text: "Normal",
|
31
|
-
value: "normal"
|
32
|
-
numVal: "400"
|
31
|
+
value: "normal"
|
33
32
|
}, {
|
34
33
|
text: "Bold",
|
35
|
-
value: "bold"
|
36
|
-
numVal: "700"
|
34
|
+
value: "bold"
|
37
35
|
}, {
|
38
36
|
text: "Bolder",
|
39
|
-
value: "bolder"
|
40
|
-
numVal: "700"
|
37
|
+
value: "bolder"
|
41
38
|
}, {
|
42
39
|
text: "Lighter",
|
43
|
-
value: "lighter"
|
44
|
-
numVal: "100"
|
40
|
+
value: "lighter"
|
45
41
|
}],
|
46
42
|
icon: FormatBoldIcon,
|
47
43
|
width: "100px"
|
@@ -50,8 +46,7 @@ export const toolbarGroups = [[{
|
|
50
46
|
format: "bold",
|
51
47
|
type: "mark",
|
52
48
|
title: "Bold",
|
53
|
-
basic: true
|
54
|
-
themeEnabled: true
|
49
|
+
basic: true
|
55
50
|
}, {
|
56
51
|
id: 5,
|
57
52
|
format: "underline",
|
@@ -62,8 +57,7 @@ export const toolbarGroups = [[{
|
|
62
57
|
format: "italic",
|
63
58
|
type: "mark",
|
64
59
|
title: "Italic",
|
65
|
-
basic: true
|
66
|
-
themeEnabled: true
|
60
|
+
basic: true
|
67
61
|
}, {
|
68
62
|
id: 6,
|
69
63
|
format: "strikethrough",
|
@@ -107,42 +101,6 @@ export const toolbarGroups = [[{
|
|
107
101
|
type: "block",
|
108
102
|
title: "H3",
|
109
103
|
group: "typography"
|
110
|
-
}, {
|
111
|
-
id: 39,
|
112
|
-
format: "headingFour",
|
113
|
-
type: "block",
|
114
|
-
title: "H4",
|
115
|
-
group: "typography"
|
116
|
-
}, {
|
117
|
-
id: 40,
|
118
|
-
format: "headingFive",
|
119
|
-
type: "block",
|
120
|
-
title: "H5",
|
121
|
-
group: "typography"
|
122
|
-
}, {
|
123
|
-
id: 41,
|
124
|
-
format: "headingSix",
|
125
|
-
type: "block",
|
126
|
-
title: "H6",
|
127
|
-
group: "typography"
|
128
|
-
}, {
|
129
|
-
id: 42,
|
130
|
-
format: "paragraphOne",
|
131
|
-
type: "block",
|
132
|
-
title: "Paragraph 1",
|
133
|
-
group: "typography"
|
134
|
-
}, {
|
135
|
-
id: 43,
|
136
|
-
format: "paragraphTwo",
|
137
|
-
type: "block",
|
138
|
-
title: "Paragraph 2",
|
139
|
-
group: "typography"
|
140
|
-
}, {
|
141
|
-
id: 44,
|
142
|
-
format: "paragraphThree",
|
143
|
-
type: "block",
|
144
|
-
title: "Paragraph 3",
|
145
|
-
group: "typography"
|
146
104
|
}, {
|
147
105
|
id: 14,
|
148
106
|
format: "doublequote",
|
@@ -154,22 +112,19 @@ export const toolbarGroups = [[{
|
|
154
112
|
format: "orderedList",
|
155
113
|
type: "block",
|
156
114
|
title: "Ordered List",
|
157
|
-
group: "list"
|
158
|
-
hideFor: ["accordion-summary"]
|
115
|
+
group: "list"
|
159
116
|
}, {
|
160
117
|
id: 16,
|
161
118
|
format: "unorderedList",
|
162
119
|
type: "block",
|
163
120
|
title: "Bulleted List",
|
164
|
-
group: "list"
|
165
|
-
hideFor: ["accordion-summary"]
|
121
|
+
group: "list"
|
166
122
|
}, {
|
167
123
|
id: 43,
|
168
124
|
format: "check-list-item",
|
169
125
|
type: "block",
|
170
126
|
title: "Check List",
|
171
|
-
group: "list"
|
172
|
-
hideFor: ["accordion-summary"]
|
127
|
+
group: "list"
|
173
128
|
}], [{
|
174
129
|
id: 17,
|
175
130
|
format: "alignLeft",
|
@@ -272,8 +227,7 @@ export const toolbarGroups = [[{
|
|
272
227
|
format: "accordion",
|
273
228
|
type: "accordion",
|
274
229
|
group: "list",
|
275
|
-
component: "AccordionButton"
|
276
|
-
hideFor: ["list-item"]
|
230
|
+
component: "AccordionButton"
|
277
231
|
}, {
|
278
232
|
id: 31,
|
279
233
|
format: "signature",
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React, { useMemo, useState } from "react";
|
2
2
|
import { Grid, Button, Popover } from "@mui/material";
|
3
|
+
import ColorPickerTool from "react-gcolor-picker";
|
3
4
|
import { colors } from "../Elements/Color Picker/defaultColors";
|
4
5
|
import SwipeableDrawerComponent from "./SwipeableDrawer";
|
5
|
-
import CustomColorPicker from "./CustomColorPicker";
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
8
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -12,10 +12,7 @@ const ColorPickerToolComponent = ({
|
|
12
12
|
onSave = () => {},
|
13
13
|
recentColors = [],
|
14
14
|
hideGradient,
|
15
|
-
handleClose
|
16
|
-
closeDrawer,
|
17
|
-
hideThemeColors,
|
18
|
-
disableEditTheme
|
15
|
+
handleClose
|
19
16
|
}) => {
|
20
17
|
const [color, setColor] = useState(value);
|
21
18
|
const handleSave = () => {
|
@@ -35,32 +32,29 @@ const ColorPickerToolComponent = ({
|
|
35
32
|
return /*#__PURE__*/_jsxs(Grid, {
|
36
33
|
item: true,
|
37
34
|
xs: 12,
|
38
|
-
style: {
|
39
|
-
position: "relative"
|
40
|
-
},
|
41
35
|
children: [/*#__PURE__*/_jsx("div", {
|
42
36
|
style: {
|
43
37
|
minHeight: "460px"
|
44
38
|
},
|
45
|
-
children: /*#__PURE__*/_jsx(
|
39
|
+
children: /*#__PURE__*/_jsx(ColorPickerTool, {
|
46
40
|
gradient: hideGradient ? false : true,
|
47
|
-
|
41
|
+
value: color,
|
48
42
|
onChange: handleColorChange,
|
49
|
-
|
50
|
-
defaultColors: initialColors,
|
51
|
-
closeDrawer: closeDrawer,
|
52
|
-
hideThemeColors: hideThemeColors,
|
53
|
-
disableEditTheme: disableEditTheme
|
43
|
+
defaultColors: initialColors
|
54
44
|
})
|
55
45
|
}), /*#__PURE__*/_jsxs("div", {
|
56
|
-
|
46
|
+
style: {
|
47
|
+
display: "flex",
|
48
|
+
justifyContent: "end",
|
49
|
+
margin: "8px"
|
50
|
+
},
|
57
51
|
children: [/*#__PURE__*/_jsx(Button, {
|
58
52
|
onClick: handleClose,
|
59
|
-
className: "
|
53
|
+
className: "secondaryBtn",
|
60
54
|
children: "Cancel"
|
61
55
|
}), /*#__PURE__*/_jsx(Button, {
|
62
56
|
onClick: handleSave,
|
63
|
-
className: "
|
57
|
+
className: "primaryBtn",
|
64
58
|
children: "Save"
|
65
59
|
})]
|
66
60
|
})]
|
@@ -73,11 +67,7 @@ const ColorPickerButton = props => {
|
|
73
67
|
defaultColors = [],
|
74
68
|
classes = {},
|
75
69
|
recentColors = [],
|
76
|
-
hideGradient
|
77
|
-
children,
|
78
|
-
handleClose: closeDrawer,
|
79
|
-
hideThemeColors,
|
80
|
-
disableEditTheme
|
70
|
+
hideGradient
|
81
71
|
} = props;
|
82
72
|
const [anchorEl, setAnchorEl] = useState(null);
|
83
73
|
const open = Boolean(anchorEl);
|
@@ -89,13 +79,7 @@ const ColorPickerButton = props => {
|
|
89
79
|
setAnchorEl(null);
|
90
80
|
};
|
91
81
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
92
|
-
children: [
|
93
|
-
onClick: handleColorPicker,
|
94
|
-
style: {
|
95
|
-
cursor: "pointer"
|
96
|
-
},
|
97
|
-
children: children
|
98
|
-
}) : /*#__PURE__*/_jsx(Button, {
|
82
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
99
83
|
style: {
|
100
84
|
background: value,
|
101
85
|
height: "22px",
|
@@ -122,10 +106,7 @@ const ColorPickerButton = props => {
|
|
122
106
|
onSave: onSave,
|
123
107
|
recentColors: recentColors,
|
124
108
|
hideGradient: hideGradient,
|
125
|
-
handleClose: handleClose
|
126
|
-
closeDrawer: closeDrawer,
|
127
|
-
hideThemeColors: hideThemeColors,
|
128
|
-
disableEditTheme: disableEditTheme
|
109
|
+
handleClose: handleClose
|
129
110
|
})
|
130
111
|
})
|
131
112
|
}) : /*#__PURE__*/_jsx(Popover, {
|
@@ -151,10 +132,7 @@ const ColorPickerButton = props => {
|
|
151
132
|
onSave: onSave,
|
152
133
|
recentColors: recentColors,
|
153
134
|
hideGradient: hideGradient,
|
154
|
-
handleClose: handleClose
|
155
|
-
closeDrawer: closeDrawer,
|
156
|
-
hideThemeColors: hideThemeColors,
|
157
|
-
disableEditTheme: disableEditTheme
|
135
|
+
handleClose: handleClose
|
158
136
|
})
|
159
137
|
})
|
160
138
|
})]
|
@@ -7,7 +7,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
|
|
7
7
|
import { Transforms } from "slate";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
-
const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "
|
10
|
+
const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "grid"];
|
11
11
|
const DragHandleStyle = fromPopper => {
|
12
12
|
const handleDragStyle = fromPopper ? {
|
13
13
|
position: "absolute",
|
@@ -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(",");
|
@@ -100,7 +97,6 @@ const FontLoader = props => {
|
|
100
97
|
});
|
101
98
|
let families = Array.from(fontSet);
|
102
99
|
families = correctFontArray(families.join(", "));
|
103
|
-
// eslint-disable-next-line no-useless-escape
|
104
100
|
families = families?.map(font => font?.replace(/\"/g, ""));
|
105
101
|
families = families?.map(font => font?.replace(", sans-serif", ""));
|
106
102
|
families = families?.filter(font => googleFontList?.includes(font));
|
@@ -48,16 +48,6 @@ import ChervUp from "../assets/svg/ChervUp";
|
|
48
48
|
import ResetIconNew from "../assets/svg/ResetIconNew";
|
49
49
|
import { jsx as _jsx } from "react/jsx-runtime";
|
50
50
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
51
|
-
const HeadingIcon = ({
|
52
|
-
variant
|
53
|
-
}) => {
|
54
|
-
return /*#__PURE__*/_jsx("div", {
|
55
|
-
style: {
|
56
|
-
color: "#64748B"
|
57
|
-
},
|
58
|
-
children: variant
|
59
|
-
});
|
60
|
-
};
|
61
51
|
const iconList = {
|
62
52
|
fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
|
63
53
|
size: 20
|
@@ -90,24 +80,6 @@ const iconList = {
|
|
90
80
|
size: 18,
|
91
81
|
fill: "#64748B"
|
92
82
|
}),
|
93
|
-
headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
|
94
|
-
variant: "H4"
|
95
|
-
}),
|
96
|
-
headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
|
97
|
-
variant: "H5"
|
98
|
-
}),
|
99
|
-
headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
|
100
|
-
variant: "H6"
|
101
|
-
}),
|
102
|
-
paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
|
103
|
-
variant: "P1"
|
104
|
-
}),
|
105
|
-
paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
|
106
|
-
variant: "P2"
|
107
|
-
}),
|
108
|
-
paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
|
109
|
-
variant: "P3"
|
110
|
-
}),
|
111
83
|
blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
|
112
84
|
size: 20,
|
113
85
|
fill: "#64748B",
|
@@ -17,7 +17,7 @@ const IMAGE_SLECTOR_OPTIONS = {
|
|
17
17
|
};
|
18
18
|
const TAB_SHOW = {
|
19
19
|
Image: ["upload", "choose", "addLink"],
|
20
|
-
Video: ["
|
20
|
+
Video: ["addLink"],
|
21
21
|
Embed: ["addLink"],
|
22
22
|
Document: ["addLink", "upload"]
|
23
23
|
};
|
@@ -31,54 +31,21 @@ const ImageSelector = props => {
|
|
31
31
|
onClose,
|
32
32
|
open,
|
33
33
|
onSelectImage,
|
34
|
-
|
35
|
-
|
36
|
-
disableProgress
|
34
|
+
title,
|
35
|
+
customProps
|
37
36
|
} = props;
|
38
|
-
const {
|
39
|
-
uploadTerminator
|
40
|
-
} = customProps;
|
41
|
-
const [uniqueId, setUniqueId] = useState(null);
|
42
|
-
const title = props.title || "Image";
|
43
37
|
const translation = customProps?.translation;
|
44
38
|
const [tabValue, setTabValue] = useState(title === "Image" ? "choose" : "addLink");
|
45
39
|
const [image, setImage] = useState(value || "");
|
46
|
-
const [s3UploadProp, setS3UploadProp] = useState({
|
47
|
-
file: null,
|
48
|
-
pageId: null,
|
49
|
-
services: customProps?.services,
|
50
|
-
setUploadStatus: setUploadStatus
|
51
|
-
});
|
52
40
|
const handleTabChange = (e, newValue) => {
|
53
41
|
setImage("");
|
54
42
|
setTabValue(newValue);
|
55
|
-
setS3UploadProp({
|
56
|
-
file: null,
|
57
|
-
pageId: null,
|
58
|
-
services: customProps?.services,
|
59
|
-
setUploadStatus: setUploadStatus
|
60
|
-
});
|
61
43
|
};
|
62
44
|
const onUploaded = url => {
|
63
45
|
setImage(url);
|
64
46
|
};
|
65
47
|
const onSave = () => {
|
66
|
-
|
67
|
-
if (disableProgress) {
|
68
|
-
onSelectImage(image);
|
69
|
-
} else {
|
70
|
-
onSelectImage(s3UploadProp);
|
71
|
-
}
|
72
|
-
} else {
|
73
|
-
onSelectImage({
|
74
|
-
embedURL: image,
|
75
|
-
isUpload: false
|
76
|
-
});
|
77
|
-
}
|
78
|
-
};
|
79
|
-
const onCloseUpload = () => {
|
80
|
-
uploadTerminator(uniqueId, setUploadStatus);
|
81
|
-
onClose();
|
48
|
+
onSelectImage(image);
|
82
49
|
};
|
83
50
|
const isActive = val => tabValue === val ? "active" : "";
|
84
51
|
const Comp = IMAGE_SLECTOR_OPTIONS[tabValue] || /*#__PURE__*/_jsx(_Fragment, {});
|
@@ -162,12 +129,7 @@ const ImageSelector = props => {
|
|
162
129
|
children: /*#__PURE__*/_jsx(Comp, {
|
163
130
|
...props,
|
164
131
|
classes: classes,
|
165
|
-
onUploaded: onUploaded
|
166
|
-
setS3UploadProp: setS3UploadProp,
|
167
|
-
s3UploadProp: s3UploadProp,
|
168
|
-
disableProgress: disableProgress,
|
169
|
-
setUniqueId: setUniqueId,
|
170
|
-
uniqueId: uniqueId
|
132
|
+
onUploaded: onUploaded
|
171
133
|
})
|
172
134
|
})]
|
173
135
|
})
|
@@ -181,12 +143,12 @@ const ImageSelector = props => {
|
|
181
143
|
p: 2
|
182
144
|
},
|
183
145
|
children: [/*#__PURE__*/_jsx(Button, {
|
184
|
-
onClick:
|
146
|
+
onClick: onClose,
|
185
147
|
className: "secondaryBtn",
|
186
148
|
sx: classes.closeBtn,
|
187
149
|
children: translation("Cancel")
|
188
150
|
}), /*#__PURE__*/_jsx(Button, {
|
189
|
-
disabled:
|
151
|
+
disabled: !image,
|
190
152
|
onClick: onSave,
|
191
153
|
className: `primaryBtn ${!image ? "disabled" : ""}`,
|
192
154
|
sx: classes.saveBtn,
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Grid } from "@mui/material";
|
3
|
-
import UploaderWithProgress from "../../UploaderWithProgress";
|
4
3
|
import Uploader from "../../Uploader";
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
const Upload = props => {
|
@@ -10,31 +9,11 @@ const Upload = props => {
|
|
10
9
|
onUploaded,
|
11
10
|
customProps,
|
12
11
|
disableUpload = false,
|
13
|
-
title
|
14
|
-
setS3UploadProp,
|
15
|
-
s3UploadProp,
|
16
|
-
disableProgress,
|
17
|
-
setUniqueId,
|
18
|
-
uniqueId
|
12
|
+
title
|
19
13
|
} = props;
|
20
14
|
const onDone = img => {
|
21
15
|
onUploaded(img);
|
22
16
|
};
|
23
|
-
const commonProps = {
|
24
|
-
classes,
|
25
|
-
value,
|
26
|
-
data: {
|
27
|
-
key: "url"
|
28
|
-
},
|
29
|
-
customProps,
|
30
|
-
onUploaded: onDone,
|
31
|
-
disableUpload,
|
32
|
-
title,
|
33
|
-
setS3UploadProp,
|
34
|
-
s3UploadProp,
|
35
|
-
setUniqueId,
|
36
|
-
uniqueId
|
37
|
-
};
|
38
17
|
return /*#__PURE__*/_jsx(Grid, {
|
39
18
|
item: true,
|
40
19
|
xs: 12,
|
@@ -43,10 +22,16 @@ const Upload = props => {
|
|
43
22
|
height: '100%'
|
44
23
|
},
|
45
24
|
className: "ims-right",
|
46
|
-
children:
|
47
|
-
|
48
|
-
|
49
|
-
|
25
|
+
children: /*#__PURE__*/_jsx(Uploader, {
|
26
|
+
classes: classes,
|
27
|
+
value: value,
|
28
|
+
data: {
|
29
|
+
key: "url"
|
30
|
+
},
|
31
|
+
customProps: customProps,
|
32
|
+
onUploaded: onDone,
|
33
|
+
disableUpload: disableUpload,
|
34
|
+
title: title
|
50
35
|
})
|
51
36
|
});
|
52
37
|
};
|