@flozy/editor 10.2.4 → 10.2.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 +16 -120
- 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 +2 -6
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Button/EditorButton.js +9 -25
- 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 +6 -21
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
- 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 +168 -181
- package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -3
- 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 +31 -36
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
- 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/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 +5 -24
- 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 -38
- 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/Styles.js +9 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +8 -34
- package/dist/Editor/common/LinkSettings/index.js +68 -84
- package/dist/Editor/common/LinkSettings/style.js +30 -245
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -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 -147
- package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
- package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -121
- 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 +54 -48
- package/dist/Editor/common/RnD/VirtualElement/helper.js +131 -143
- package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -16
- package/dist/Editor/common/RnD/index.js +11 -6
- package/dist/Editor/common/Select/index.js +0 -2
- package/dist/Editor/common/Shorthands/elements.js +11 -65
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -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/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/Uploader.js +0 -8
- package/dist/Editor/common/iconListV2.js +6 -156
- package/dist/Editor/common/iconslist.js +0 -24
- package/dist/Editor/commonStyle.js +62 -168
- package/dist/Editor/helper/index.js +0 -4
- 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 +45 -169
- 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 -8
- package/dist/Editor/utils/helper.js +19 -109
- package/dist/Editor/utils/signature.js +9 -2
- package/package.json +4 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
- package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
- package/dist/Editor/Elements/FreeGrid/helper.js +0 -113
- 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/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/SnackBar/index.js +0 -43
- 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 -369
- 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,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,29 +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
|
-
children: /*#__PURE__*/_jsx(
|
36
|
+
children: /*#__PURE__*/_jsx(ColorPickerTool, {
|
43
37
|
gradient: hideGradient ? false : true,
|
44
|
-
|
38
|
+
value: color,
|
45
39
|
onChange: handleColorChange,
|
46
|
-
|
47
|
-
defaultColors: initialColors,
|
48
|
-
closeDrawer: closeDrawer,
|
49
|
-
hideThemeColors: hideThemeColors,
|
50
|
-
disableEditTheme: disableEditTheme
|
40
|
+
defaultColors: initialColors
|
51
41
|
})
|
52
42
|
}), /*#__PURE__*/_jsxs("div", {
|
53
|
-
|
43
|
+
style: {
|
44
|
+
display: "flex",
|
45
|
+
justifyContent: "end",
|
46
|
+
margin: "8px"
|
47
|
+
},
|
54
48
|
children: [/*#__PURE__*/_jsx(Button, {
|
55
49
|
onClick: handleClose,
|
56
|
-
className: "
|
50
|
+
className: "secondaryBtn",
|
57
51
|
children: "Cancel"
|
58
52
|
}), /*#__PURE__*/_jsx(Button, {
|
59
53
|
onClick: handleSave,
|
60
|
-
className: "
|
54
|
+
className: "primaryBtn",
|
61
55
|
children: "Save"
|
62
56
|
})]
|
63
57
|
})]
|
@@ -70,11 +64,7 @@ const ColorPickerButton = props => {
|
|
70
64
|
defaultColors = [],
|
71
65
|
classes = {},
|
72
66
|
recentColors = [],
|
73
|
-
hideGradient
|
74
|
-
children,
|
75
|
-
handleClose: closeDrawer,
|
76
|
-
hideThemeColors,
|
77
|
-
disableEditTheme
|
67
|
+
hideGradient
|
78
68
|
} = props;
|
79
69
|
const [anchorEl, setAnchorEl] = useState(null);
|
80
70
|
const open = Boolean(anchorEl);
|
@@ -86,13 +76,7 @@ const ColorPickerButton = props => {
|
|
86
76
|
setAnchorEl(null);
|
87
77
|
};
|
88
78
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
89
|
-
children: [
|
90
|
-
onClick: handleColorPicker,
|
91
|
-
style: {
|
92
|
-
cursor: "pointer"
|
93
|
-
},
|
94
|
-
children: children
|
95
|
-
}) : /*#__PURE__*/_jsx(Button, {
|
79
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
96
80
|
style: {
|
97
81
|
background: value,
|
98
82
|
height: "22px",
|
@@ -119,10 +103,7 @@ const ColorPickerButton = props => {
|
|
119
103
|
onSave: onSave,
|
120
104
|
recentColors: recentColors,
|
121
105
|
hideGradient: hideGradient,
|
122
|
-
handleClose: handleClose
|
123
|
-
closeDrawer: closeDrawer,
|
124
|
-
hideThemeColors: hideThemeColors,
|
125
|
-
disableEditTheme: disableEditTheme
|
106
|
+
handleClose: handleClose
|
126
107
|
})
|
127
108
|
})
|
128
109
|
}) : /*#__PURE__*/_jsx(Popover, {
|
@@ -148,10 +129,7 @@ const ColorPickerButton = props => {
|
|
148
129
|
onSave: onSave,
|
149
130
|
recentColors: recentColors,
|
150
131
|
hideGradient: hideGradient,
|
151
|
-
handleClose: handleClose
|
152
|
-
closeDrawer: closeDrawer,
|
153
|
-
hideThemeColors: hideThemeColors,
|
154
|
-
disableEditTheme: disableEditTheme
|
132
|
+
handleClose: handleClose
|
155
133
|
})
|
156
134
|
})
|
157
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
|
@@ -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: {
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { Autocomplete, Checkbox, FormControlLabel,
|
1
|
+
import { Autocomplete, Checkbox, FormControlLabel, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
|
2
2
|
import { useEffect, useMemo, useState } from "react";
|
3
3
|
import { useSlate } from "slate-react";
|
4
4
|
import Select from "../Select";
|
5
|
-
import { CheckedBoxCheckIcon } from "../iconListV2";
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
6
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
8
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -32,19 +31,11 @@ const OpenInNewTab = props => {
|
|
32
31
|
className: "ccheckbox-primary",
|
33
32
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
34
33
|
checked: openInNewTab,
|
35
|
-
onChange: onNewTabChange
|
36
|
-
className: "checkBox",
|
37
|
-
checkedIcon: /*#__PURE__*/_jsx(IconButton, {
|
38
|
-
className: "checkedIcon",
|
39
|
-
children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
|
40
|
-
}),
|
41
|
-
icon: /*#__PURE__*/_jsx(IconButton, {
|
42
|
-
className: "unCheckedIcon"
|
43
|
-
})
|
34
|
+
onChange: onNewTabChange
|
44
35
|
}),
|
45
36
|
label: /*#__PURE__*/_jsx(Typography, {
|
46
37
|
variant: "body2",
|
47
|
-
children: "Open in new tab"
|
38
|
+
children: translation("Open in new tab")
|
48
39
|
})
|
49
40
|
}) : null;
|
50
41
|
};
|
@@ -56,11 +47,6 @@ export const TextInput = props => {
|
|
56
47
|
...props,
|
57
48
|
onChange: e => {
|
58
49
|
props.onChange(e.target.value);
|
59
|
-
},
|
60
|
-
sx: {
|
61
|
-
"&::placeholder": {
|
62
|
-
color: "gray"
|
63
|
-
}
|
64
50
|
}
|
65
51
|
}), /*#__PURE__*/_jsx(OpenInNewTab, {
|
66
52
|
...props
|
@@ -72,8 +58,7 @@ export const SelectPage = props => {
|
|
72
58
|
value,
|
73
59
|
onChange,
|
74
60
|
services,
|
75
|
-
translation
|
76
|
-
classes
|
61
|
+
translation
|
77
62
|
} = props;
|
78
63
|
const [pages, setPages] = useState([]);
|
79
64
|
const editor = useSlate();
|
@@ -131,8 +116,7 @@ export const SelectPage = props => {
|
|
131
116
|
setValue: val => onChange(val?.value || ""),
|
132
117
|
placeholder: translation("Select Page"),
|
133
118
|
options: pages,
|
134
|
-
disabled: isCurrentPage
|
135
|
-
classes: classes
|
119
|
+
disabled: isCurrentPage
|
136
120
|
}), /*#__PURE__*/_jsx(FreeSoloCreateOption, {
|
137
121
|
label: section?.label,
|
138
122
|
setValue: val => {
|
@@ -146,8 +130,7 @@ export const SelectPage = props => {
|
|
146
130
|
options: page?.sections?.map(p => ({
|
147
131
|
label: p,
|
148
132
|
value: p
|
149
|
-
}))
|
150
|
-
classes: classes
|
133
|
+
}))
|
151
134
|
}), isCurrentPage ? null : /*#__PURE__*/_jsx(OpenInNewTab, {
|
152
135
|
...props
|
153
136
|
})]
|
@@ -161,7 +144,6 @@ export const Trigger = props => {
|
|
161
144
|
return /*#__PURE__*/_jsx(Typography, {
|
162
145
|
variant: "subtitle1",
|
163
146
|
gutterBottom: true,
|
164
|
-
className: "trigger-text",
|
165
147
|
children: `${translation("Choosing this will trigger the")} ${translation(nav.type)} ${translation("step")}`
|
166
148
|
});
|
167
149
|
};
|
@@ -212,8 +194,7 @@ export function FreeSoloCreateOption({
|
|
212
194
|
setValue,
|
213
195
|
options = [],
|
214
196
|
placeholder = "",
|
215
|
-
disabled = false
|
216
|
-
classes
|
197
|
+
disabled = false
|
217
198
|
}) {
|
218
199
|
return /*#__PURE__*/_jsx(Autocomplete, {
|
219
200
|
freeSolo: true,
|
@@ -279,13 +260,6 @@ export function FreeSoloCreateOption({
|
|
279
260
|
sx: {
|
280
261
|
marginTop: "10px"
|
281
262
|
},
|
282
|
-
disabled: disabled
|
283
|
-
slotProps: {
|
284
|
-
popper: {
|
285
|
-
sx: {
|
286
|
-
...classes.customAutoComplete
|
287
|
-
}
|
288
|
-
}
|
289
|
-
}
|
263
|
+
disabled: disabled
|
290
264
|
});
|
291
265
|
}
|