@flozy/editor 10.4.9 → 10.5.1
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 +18 -134
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +8 -46
- package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
- package/dist/Editor/Elements/Accordion/Accordion.js +9 -46
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +23 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +5 -10
- package/dist/Editor/Elements/Button/EditorButton.js +10 -26
- package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -2
- 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/ColumnView.js +2 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +11 -26
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +9 -28
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +6 -17
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +16 -43
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
- package/dist/Editor/Elements/Embed/Image.js +2 -3
- package/dist/Editor/Elements/Embed/Video.js +1 -1
- package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
- package/dist/Editor/Elements/Form/Form.js +171 -184
- package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -2
- package/dist/Editor/Elements/Form/FormField.js +6 -13
- package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +35 -41
- 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 +8 -8
- package/dist/Editor/Elements/FreeGrid/styles.js +7 -75
- package/dist/Editor/Elements/Grid/Grid.js +2 -14
- package/dist/Editor/Elements/Grid/GridItem.js +1 -1
- package/dist/Editor/Elements/List/CheckList.js +2 -3
- package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
- package/dist/Editor/Elements/Search/SearchButton.js +8 -9
- package/dist/Editor/Elements/Search/SearchList.js +7 -9
- package/dist/Editor/Elements/Signature/Signature.css +1 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +5 -18
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +3 -16
- package/dist/Editor/Elements/SimpleText/index.js +1 -6
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/AddRowCol.js +2 -8
- package/dist/Editor/Elements/Table/DragButton.js +1 -0
- package/dist/Editor/Elements/Table/Draggable.js +2 -6
- package/dist/Editor/Elements/Table/Styles.js +0 -7
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Table/TableCell.js +8 -31
- 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 +5 -5
- 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 +13 -10
- 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 +13 -6
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
- package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
- package/dist/Editor/common/ColorPickerButton.js +16 -41
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
- package/dist/Editor/common/Icon.js +1 -31
- package/dist/Editor/common/ImageSelector/ImageSelector.js +2 -2
- package/dist/Editor/common/ImageSelector/Styles.js +9 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +55 -61
- package/dist/Editor/common/LinkSettings/index.js +80 -82
- package/dist/Editor/common/LinkSettings/navOptions.js +2 -2
- package/dist/Editor/common/LinkSettings/style.js +74 -209
- package/dist/Editor/common/MentionsPopup/index.js +1 -4
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +15 -13
- package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
- package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
- package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +3 -4
- 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 +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -146
- package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
- package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -120
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +19 -28
- package/dist/Editor/common/RnD/Utils/index.js +1 -3
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +58 -42
- package/dist/Editor/common/RnD/VirtualElement/helper.js +132 -323
- package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -16
- package/dist/Editor/common/RnD/index.js +38 -67
- package/dist/Editor/common/Select/index.js +5 -44
- package/dist/Editor/common/Select/styles.js +2 -30
- package/dist/Editor/common/Shorthands/elements.js +11 -65
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +9 -12
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
- 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/lineSpacing.js +6 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
- package/dist/Editor/common/SwipeableDrawer/style.js +12 -14
- package/dist/Editor/common/Uploader.js +0 -16
- package/dist/Editor/common/iconListV2.js +6 -177
- package/dist/Editor/common/iconslist.js +0 -24
- package/dist/Editor/commonStyle.js +62 -186
- package/dist/Editor/helper/index.js +1 -5
- package/dist/Editor/helper/theme.js +2 -203
- package/dist/Editor/hooks/useMouseMove.js +5 -8
- package/dist/Editor/hooks/useTable.js +4 -5
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +1 -3
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +46 -172
- package/dist/Editor/utils/accordion.js +4 -14
- package/dist/Editor/utils/button.js +17 -1
- package/dist/Editor/utils/customHooks/useTableResize.js +9 -49
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/events.js +6 -50
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/form.js +4 -4
- package/dist/Editor/utils/formfield.js +2 -9
- package/dist/Editor/utils/helper.js +26 -215
- package/dist/Editor/utils/insertAppHeader.js +1 -1
- package/dist/Editor/utils/signature.js +9 -2
- package/package.json +4 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +0 -510
- package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
- 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/ClearAllRounded.js +0 -31
- package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
- package/dist/Editor/common/Checkbox/index.js +0 -46
- package/dist/Editor/common/Checkbox/styles.js +0 -45
- 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/RadioGroup/index.js +0 -48
- package/dist/Editor/common/RadioGroup/styles.js +0 -29
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
- package/dist/Editor/common/SnackBar/index.js +0 -43
- package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +0 -115
- 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
- package/dist/Editor/utils/updateFormName.js +0 -22
@@ -10,15 +10,12 @@ 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";
|
18
16
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
19
|
-
import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
|
20
|
-
import { getPageSettings } from "../../utils/pageSettings";
|
21
|
-
import { getDevice } from "../../helper/theme";
|
17
|
+
// import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
|
18
|
+
// import { getPageSettings } from "../../utils/pageSettings";
|
22
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
23
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
24
21
|
const allTools = toolbarGroups.flat();
|
@@ -39,15 +36,15 @@ const TextFormat = props => {
|
|
39
36
|
const {
|
40
37
|
translation
|
41
38
|
} = customProps;
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
39
|
+
|
40
|
+
// const { element: pageSt } = getPageSettings(editor) || {};
|
41
|
+
// const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
46
42
|
const {
|
47
43
|
fontFamilies,
|
48
|
-
theme
|
44
|
+
theme
|
49
45
|
} = useEditorContext();
|
50
|
-
const
|
46
|
+
// const { activeBreakPoint } = useEditorContext();
|
47
|
+
// const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
|
51
48
|
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
52
49
|
const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
|
53
50
|
const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
|
@@ -64,13 +61,12 @@ const TextFormat = props => {
|
|
64
61
|
color: "",
|
65
62
|
bgColor: ""
|
66
63
|
};
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
lineSpacingValue = lineSpacingValue?.[breakpoint] !== undefined ? lineSpacingValue : pageSettingLine;
|
64
|
+
|
65
|
+
// let lineSpacingValue = activeMark(editor, "lineHeight");
|
66
|
+
// lineSpacingValue =
|
67
|
+
// lineSpacingValue?.[breakpoint] !== undefined
|
68
|
+
// ? lineSpacingValue
|
69
|
+
// : pageSettingLine;
|
74
70
|
const handleColorPicker = type => e => {
|
75
71
|
setType(type);
|
76
72
|
setAnchorEl(e.currentTarget);
|
@@ -111,63 +107,16 @@ const TextFormat = props => {
|
|
111
107
|
value
|
112
108
|
});
|
113
109
|
};
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
});
|
120
|
-
};
|
110
|
+
|
111
|
+
// const handleLineSpacing = (data) => {
|
112
|
+
// const [[format, value]] = Object.entries(data);
|
113
|
+
// addMarkData(editor, { format, value });
|
114
|
+
// };
|
121
115
|
return /*#__PURE__*/_jsxs(Grid, {
|
122
116
|
container: true,
|
123
117
|
sx: classes.textFormatWrapper,
|
124
118
|
className: "text-formatter-popup",
|
125
119
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
126
|
-
item: true,
|
127
|
-
xs: 12,
|
128
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
129
|
-
container: true,
|
130
|
-
justifyContent: "space-between",
|
131
|
-
alignItems: "center",
|
132
|
-
children: [/*#__PURE__*/_jsx(Grid, {
|
133
|
-
item: true,
|
134
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
135
|
-
variant: "body1",
|
136
|
-
color: "primary",
|
137
|
-
sx: classes.typoLabel,
|
138
|
-
children: "Style"
|
139
|
-
})
|
140
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
141
|
-
item: true,
|
142
|
-
children: theme?.id ? /*#__PURE__*/_jsx(Button, {
|
143
|
-
sx: classes.defaultBtn,
|
144
|
-
onClick: () => {
|
145
|
-
const {
|
146
|
-
field,
|
147
|
-
theme
|
148
|
-
} = saveToTheme(editor) || {};
|
149
|
-
updateTheme(theme, {
|
150
|
-
action: "ELEMENT_PROPS_CHANGE",
|
151
|
-
fieldName: field
|
152
|
-
});
|
153
|
-
},
|
154
|
-
disabled: !customized,
|
155
|
-
children: "Save to theme"
|
156
|
-
}) : null
|
157
|
-
})]
|
158
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
159
|
-
item: true,
|
160
|
-
xs: 12,
|
161
|
-
sx: classes.textFormatField,
|
162
|
-
children: /*#__PURE__*/_jsx(SelectTypography, {
|
163
|
-
editor: editor,
|
164
|
-
classes: classes,
|
165
|
-
closeMainPopup: closeMainPopup,
|
166
|
-
type: "fullWidth",
|
167
|
-
customProps: customProps
|
168
|
-
})
|
169
|
-
})]
|
170
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
171
120
|
item: true,
|
172
121
|
xs: 12,
|
173
122
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
@@ -294,8 +243,7 @@ const TextFormat = props => {
|
|
294
243
|
rounded: true,
|
295
244
|
title: translation("textColor"),
|
296
245
|
id: "11_cc",
|
297
|
-
classes: classes
|
298
|
-
type: "textColor"
|
246
|
+
classes: classes
|
299
247
|
}, "11_cc")
|
300
248
|
})]
|
301
249
|
}), /*#__PURE__*/_jsxs(Grid, {
|
@@ -321,7 +269,7 @@ const TextFormat = props => {
|
|
321
269
|
children: /*#__PURE__*/_jsx(Button, {
|
322
270
|
sx: classes.defaultBtn2,
|
323
271
|
startIcon: /*#__PURE__*/_jsx(ColorResetIcon, {
|
324
|
-
stroke:
|
272
|
+
stroke: theme?.palette?.type === "dark" ? "#505359" : "#A2B0B9"
|
325
273
|
}),
|
326
274
|
onClick: handleDefault({
|
327
275
|
format: "bgColor"
|
@@ -411,7 +359,12 @@ const TextFormat = props => {
|
|
411
359
|
xs: 12,
|
412
360
|
className: "typo-icons",
|
413
361
|
sx: classes.evenSpace,
|
414
|
-
children: [
|
362
|
+
children: [/*#__PURE__*/_jsx(SelectTypography, {
|
363
|
+
classes: classes,
|
364
|
+
editor: editor,
|
365
|
+
closeMainPopup: closeMainPopup || onClose,
|
366
|
+
customProps: customProps
|
367
|
+
}), fontStyle?.map((m, i) => {
|
415
368
|
return /*#__PURE__*/_jsx(MarkButton, {
|
416
369
|
editor: editor,
|
417
370
|
...m,
|
@@ -433,32 +386,6 @@ const TextFormat = props => {
|
|
433
386
|
xs: 12,
|
434
387
|
sx: classes.dividerGrid,
|
435
388
|
children: /*#__PURE__*/_jsx(Divider, {})
|
436
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
437
|
-
item: true,
|
438
|
-
xs: 12,
|
439
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
440
|
-
variant: "body1",
|
441
|
-
color: "primary",
|
442
|
-
sx: classes.typoLabel,
|
443
|
-
children: "Line Spacing"
|
444
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
445
|
-
item: true,
|
446
|
-
xs: 12,
|
447
|
-
className: "typo-icons",
|
448
|
-
sx: classes.evenSpace,
|
449
|
-
children: /*#__PURE__*/_jsx(LineSpacing, {
|
450
|
-
value: lineSpacingValue,
|
451
|
-
onChange: handleLineSpacing,
|
452
|
-
data: {
|
453
|
-
key: "lineHeight"
|
454
|
-
}
|
455
|
-
})
|
456
|
-
})]
|
457
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
458
|
-
item: true,
|
459
|
-
xs: 12,
|
460
|
-
sx: classes.dividerGrid,
|
461
|
-
children: /*#__PURE__*/_jsx(Divider, {})
|
462
389
|
}), /*#__PURE__*/_jsx(Grid, {
|
463
390
|
item: true,
|
464
391
|
xs: 12,
|
@@ -95,9 +95,9 @@ 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();
|
100
|
+
hideSlateSelection(); // removes slate selection background, when there is no selection
|
101
101
|
}
|
102
102
|
}, [selection, event, selectedElement?.enable]);
|
103
103
|
const handleClose = () => {
|
@@ -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",
|
@@ -7,7 +7,6 @@ const SettingsIcon = props => {
|
|
7
7
|
viewBox: "0 0 18 18",
|
8
8
|
fill: "none",
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
10
|
-
className: "settingsIcon",
|
11
10
|
...props,
|
12
11
|
children: [/*#__PURE__*/_jsx("path", {
|
13
12
|
d: "M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",
|
@@ -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,26 @@ 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
|
-
|
43
|
-
minHeight: "460px"
|
44
|
-
},
|
45
|
-
children: /*#__PURE__*/_jsx(CustomColorPicker, {
|
36
|
+
children: /*#__PURE__*/_jsx(ColorPickerTool, {
|
46
37
|
gradient: hideGradient ? false : true,
|
47
|
-
|
38
|
+
value: color,
|
48
39
|
onChange: handleColorChange,
|
49
|
-
|
50
|
-
defaultColors: initialColors,
|
51
|
-
closeDrawer: closeDrawer,
|
52
|
-
hideThemeColors: hideThemeColors,
|
53
|
-
disableEditTheme: disableEditTheme
|
40
|
+
defaultColors: initialColors
|
54
41
|
})
|
55
42
|
}), /*#__PURE__*/_jsxs("div", {
|
56
|
-
|
43
|
+
style: {
|
44
|
+
display: "flex",
|
45
|
+
justifyContent: "end",
|
46
|
+
margin: "8px"
|
47
|
+
},
|
57
48
|
children: [/*#__PURE__*/_jsx(Button, {
|
58
49
|
onClick: handleClose,
|
59
|
-
className: "
|
50
|
+
className: "secondaryBtn",
|
60
51
|
children: "Cancel"
|
61
52
|
}), /*#__PURE__*/_jsx(Button, {
|
62
53
|
onClick: handleSave,
|
63
|
-
className: "
|
54
|
+
className: "primaryBtn",
|
64
55
|
children: "Save"
|
65
56
|
})]
|
66
57
|
})]
|
@@ -73,11 +64,7 @@ const ColorPickerButton = props => {
|
|
73
64
|
defaultColors = [],
|
74
65
|
classes = {},
|
75
66
|
recentColors = [],
|
76
|
-
hideGradient
|
77
|
-
children,
|
78
|
-
handleClose: closeDrawer,
|
79
|
-
hideThemeColors,
|
80
|
-
disableEditTheme
|
67
|
+
hideGradient
|
81
68
|
} = props;
|
82
69
|
const [anchorEl, setAnchorEl] = useState(null);
|
83
70
|
const open = Boolean(anchorEl);
|
@@ -89,13 +76,7 @@ const ColorPickerButton = props => {
|
|
89
76
|
setAnchorEl(null);
|
90
77
|
};
|
91
78
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
92
|
-
children: [
|
93
|
-
onClick: handleColorPicker,
|
94
|
-
style: {
|
95
|
-
cursor: "pointer"
|
96
|
-
},
|
97
|
-
children: children
|
98
|
-
}) : /*#__PURE__*/_jsx(Button, {
|
79
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
99
80
|
style: {
|
100
81
|
background: value,
|
101
82
|
height: "22px",
|
@@ -122,10 +103,7 @@ const ColorPickerButton = props => {
|
|
122
103
|
onSave: onSave,
|
123
104
|
recentColors: recentColors,
|
124
105
|
hideGradient: hideGradient,
|
125
|
-
handleClose: handleClose
|
126
|
-
closeDrawer: closeDrawer,
|
127
|
-
hideThemeColors: hideThemeColors,
|
128
|
-
disableEditTheme: disableEditTheme
|
106
|
+
handleClose: handleClose
|
129
107
|
})
|
130
108
|
})
|
131
109
|
}) : /*#__PURE__*/_jsx(Popover, {
|
@@ -151,10 +129,7 @@ const ColorPickerButton = props => {
|
|
151
129
|
onSave: onSave,
|
152
130
|
recentColors: recentColors,
|
153
131
|
hideGradient: hideGradient,
|
154
|
-
handleClose: handleClose
|
155
|
-
closeDrawer: closeDrawer,
|
156
|
-
hideThemeColors: hideThemeColors,
|
157
|
-
disableEditTheme: disableEditTheme
|
132
|
+
handleClose: handleClose
|
158
133
|
})
|
159
134
|
})
|
160
135
|
})]
|
@@ -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(",");
|
@@ -45,19 +45,8 @@ import TrashIcon from "../assets/svg/TrashCanIcon";
|
|
45
45
|
import DataTableIcon from "../assets/svg/DataTableIcon";
|
46
46
|
import ChervDown from "../assets/svg/ChervDown";
|
47
47
|
import ChervUp from "../assets/svg/ChervUp";
|
48
|
-
import ResetIconNew from "../assets/svg/ResetIconNew";
|
49
48
|
import { jsx as _jsx } from "react/jsx-runtime";
|
50
49
|
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
50
|
const iconList = {
|
62
51
|
fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
|
63
52
|
size: 20
|
@@ -90,24 +79,6 @@ const iconList = {
|
|
90
79
|
size: 18,
|
91
80
|
fill: "#64748B"
|
92
81
|
}),
|
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
82
|
blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
|
112
83
|
size: 20,
|
113
84
|
fill: "#64748B",
|
@@ -358,8 +329,7 @@ const iconList = {
|
|
358
329
|
stroke: "#64748B",
|
359
330
|
color: "#64748B"
|
360
331
|
}
|
361
|
-
})
|
362
|
-
resetIconNew: /*#__PURE__*/_jsx(ResetIconNew, {})
|
332
|
+
})
|
363
333
|
};
|
364
334
|
export const icons = {
|
365
335
|
...iconList
|
@@ -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
|
};
|
@@ -35,7 +35,7 @@ const ImageSelector = props => {
|
|
35
35
|
customProps
|
36
36
|
} = props;
|
37
37
|
const translation = customProps?.translation;
|
38
|
-
const [tabValue, setTabValue] = useState(title === "Image" ? "choose" : "
|
38
|
+
const [tabValue, setTabValue] = useState(title === "Image" ? "choose" : "addLink");
|
39
39
|
const [image, setImage] = useState(value || "");
|
40
40
|
const handleTabChange = (e, newValue) => {
|
41
41
|
setImage("");
|
@@ -76,7 +76,7 @@ const ImageSelectorStyles = theme => ({
|
|
76
76
|
background: theme?.palette?.editor?.deviderBgColor,
|
77
77
|
"@media only screen and (min-width: 899px)": {
|
78
78
|
margin: "0px 24px",
|
79
|
-
width:
|
79
|
+
width: 'calc(100% - 48px)'
|
80
80
|
}
|
81
81
|
},
|
82
82
|
"& .primaryBtn": {
|
@@ -104,6 +104,12 @@ const ImageSelectorStyles = theme => ({
|
|
104
104
|
marginRight: "8px !important"
|
105
105
|
},
|
106
106
|
"& .MuiGrid-root": {
|
107
|
+
"&::-webkit-scrollbar-thumb": {
|
108
|
+
background: `none !important`
|
109
|
+
},
|
110
|
+
"&::-webkit-scrollbar-track": {
|
111
|
+
visibility: "hidden"
|
112
|
+
},
|
107
113
|
"&::-webkit-scrollbar-thumb": {
|
108
114
|
background: `${theme?.palette?.editor?.brainPopupScroll} !important`
|
109
115
|
},
|
@@ -112,10 +118,10 @@ const ImageSelectorStyles = theme => ({
|
|
112
118
|
}
|
113
119
|
},
|
114
120
|
"& .MuiImageList-root": {
|
115
|
-
margin:
|
121
|
+
margin: '0px'
|
116
122
|
},
|
117
123
|
"& .MuiDialogContent-root": {
|
118
|
-
padding:
|
124
|
+
padding: '20px 24px 5px 24px'
|
119
125
|
}
|
120
126
|
},
|
121
127
|
titleTypo: {
|