@flozy/editor 9.8.4 → 9.8.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 +18 -18
- package/dist/Editor/CommonEditor.js +18 -118
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +7 -11
- package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Button/EditorButton.js +25 -37
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -60
- 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 +1 -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 -2
- package/dist/Editor/Elements/Embed/Video.js +1 -1
- package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +21 -48
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -25
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -46
- package/dist/Editor/Elements/FreeGrid/Options/More.js +2 -7
- package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
- package/dist/Editor/Elements/Grid/GridItem.js +1 -1
- package/dist/Editor/Elements/List/CheckList.js +1 -4
- package/dist/Editor/Elements/Search/SearchButton.js +1 -1
- package/dist/Editor/Elements/Search/SearchList.js +2 -3
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +8 -2
- package/dist/Editor/Elements/SimpleText/index.js +1 -9
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Title/title.js +8 -9
- 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/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 +11 -71
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +23 -95
- package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/common/ColorPickerButton.js +14 -39
- 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/MUIIcon/index.js +3 -0
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +0 -24
- 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 +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/ShadowElement.js +1 -2
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -8
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +9 -73
- package/dist/Editor/common/RnD/Utils/index.js +0 -3
- package/dist/Editor/common/RnD/VirtualElement/index.js +103 -187
- package/dist/Editor/common/RnD/VirtualElement/styles.js +7 -155
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
- package/dist/Editor/common/RnD/index.js +10 -59
- package/dist/Editor/common/Shorthands/elements.js +0 -54
- 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 -35
- 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/metaDataMapping.js +3 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
- package/dist/Editor/common/SwipeableDrawer/index.js +1 -1
- package/dist/Editor/common/Uploader.js +0 -8
- package/dist/Editor/commonStyle.js +57 -68
- package/dist/Editor/helper/theme.js +2 -202
- package/dist/Editor/hooks/useMouseMove.js +3 -9
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +9 -11
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +45 -171
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/freegrid.js +2 -2
- package/dist/Editor/utils/helper.js +19 -90
- package/package.json +4 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -448
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -436
- 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 -291
- package/dist/Editor/common/CustomColorPicker/index.js +0 -131
- 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/RnD/VirtualElement/BoxHeaderAutoAlignment.js +0 -43
- package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -44
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
- package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -382
- package/dist/Editor/common/SnackBar/index.js +0 -43
- package/dist/Editor/helper/textIndeces.js +0 -58
- package/dist/Editor/hooks/useAutoScroll.js +0 -38
- 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 -72
- package/dist/Editor/themeSettings/buttons/index.js +0 -290
- 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 -61
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -351
- package/dist/Editor/themeSettings/style.js +0 -220
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -355
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -205
- package/dist/Editor/themeSettingsAI/style.js +0 -259
@@ -111,7 +111,6 @@ const usePopupStyle = theme => ({
|
|
111
111
|
width: "323px",
|
112
112
|
maxWidth: "100%",
|
113
113
|
overflowX: "hidden !important",
|
114
|
-
marginTop: "6px",
|
115
114
|
// 30% of window height
|
116
115
|
maxHeight: `${window.innerHeight * 0.45}px`,
|
117
116
|
overflow: "auto",
|
@@ -131,7 +130,7 @@ const usePopupStyle = theme => ({
|
|
131
130
|
},
|
132
131
|
"& .accordionIcon": {
|
133
132
|
"& p": {
|
134
|
-
textAlign:
|
133
|
+
textAlign: 'left'
|
135
134
|
}
|
136
135
|
}
|
137
136
|
},
|
@@ -305,21 +304,6 @@ const usePopupStyle = theme => ({
|
|
305
304
|
paddingRight: "0px !important"
|
306
305
|
}
|
307
306
|
},
|
308
|
-
textFormatContainer: {
|
309
|
-
".saveThemeBtnsWrapper": {
|
310
|
-
position: "sticky",
|
311
|
-
bottom: "0px",
|
312
|
-
right: "0px",
|
313
|
-
boxShadow: "0px -3px 12px 0px #00000017",
|
314
|
-
padding: "10px",
|
315
|
-
borderRadius: "8px 8px 19px 19px",
|
316
|
-
display: "flex",
|
317
|
-
justifyContent: "end",
|
318
|
-
alignItems: "center",
|
319
|
-
gap: "8px",
|
320
|
-
background: theme?.palette?.editor?.background
|
321
|
-
}
|
322
|
-
},
|
323
307
|
textFormatLabel: {
|
324
308
|
display: "flex",
|
325
309
|
alignItems: "center",
|
@@ -351,10 +335,9 @@ const usePopupStyle = theme => ({
|
|
351
335
|
borderBottom: `1px solid ${theme?.palette?.editor?.deviderBgColor} !important`
|
352
336
|
},
|
353
337
|
textFormatField: {
|
354
|
-
marginBottom: "8px"
|
355
|
-
|
338
|
+
marginBottom: "8px",
|
339
|
+
marginTop: "8px"
|
356
340
|
},
|
357
|
-
|
358
341
|
textFormatField1: {
|
359
342
|
marginBottom: "16px",
|
360
343
|
marginTop: "10px"
|
@@ -433,11 +416,6 @@ const usePopupStyle = theme => ({
|
|
433
416
|
"& .MuiOutlinedInput-notchedOutline": {
|
434
417
|
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important`
|
435
418
|
},
|
436
|
-
"& .MuiInputBase-root": {
|
437
|
-
"& input": {
|
438
|
-
border: "none !important"
|
439
|
-
}
|
440
|
-
},
|
441
419
|
"& svg": {
|
442
420
|
width: "20px",
|
443
421
|
height: "24px"
|
@@ -446,6 +424,9 @@ const usePopupStyle = theme => ({
|
|
446
424
|
fontFamilyListOptions: {
|
447
425
|
"& .MuiAutocomplete-listbox": {
|
448
426
|
padding: "0px",
|
427
|
+
// "&::-webkit-scrollbar-thumb": {
|
428
|
+
// background: `none !important`,
|
429
|
+
// },
|
449
430
|
"&::-webkit-scrollbar-thumb": {
|
450
431
|
background: `${theme?.palette?.editor?.brainPopupScroll} !important`
|
451
432
|
},
|
@@ -456,8 +437,8 @@ const usePopupStyle = theme => ({
|
|
456
437
|
margin: "5px",
|
457
438
|
borderRadius: "8px",
|
458
439
|
color: theme?.palette?.editor?.menuOptionTextColor,
|
459
|
-
fontSize:
|
460
|
-
padding:
|
440
|
+
fontSize: '14px',
|
441
|
+
padding: '8px 12px',
|
461
442
|
'&[aria-selected="true"]': {
|
462
443
|
backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
|
463
444
|
}
|
@@ -556,7 +537,7 @@ const usePopupStyle = theme => ({
|
|
556
537
|
}
|
557
538
|
},
|
558
539
|
alignItems: "flexStart",
|
559
|
-
|
540
|
+
justifyContent: "center",
|
560
541
|
flexDirection: "row",
|
561
542
|
"&:hover": {
|
562
543
|
background: "unset"
|
@@ -805,13 +786,8 @@ const usePopupStyle = theme => ({
|
|
805
786
|
padding: "0px"
|
806
787
|
},
|
807
788
|
defaultBtn: {
|
808
|
-
color: "#
|
809
|
-
textTransform: "none"
|
810
|
-
textDecoration: "underline",
|
811
|
-
"&.Mui-disabled": {
|
812
|
-
color: "#A0AEC0 !important",
|
813
|
-
textDecoration: "none"
|
814
|
-
}
|
789
|
+
color: "#0F172A",
|
790
|
+
textTransform: "none"
|
815
791
|
},
|
816
792
|
templateCardBtnGrp: {
|
817
793
|
display: "none",
|
@@ -1162,42 +1138,6 @@ const usePopupStyle = theme => ({
|
|
1162
1138
|
"& fieldset": {
|
1163
1139
|
border: "none !important"
|
1164
1140
|
}
|
1165
|
-
},
|
1166
|
-
customCheckBox: {
|
1167
|
-
marginTop: "4px",
|
1168
|
-
padding: "0px",
|
1169
|
-
"& .MuiCheckbox-root": {
|
1170
|
-
padding: "8px 8px 8px 10px",
|
1171
|
-
"&:hover": {
|
1172
|
-
background: "unset !important"
|
1173
|
-
}
|
1174
|
-
},
|
1175
|
-
"& button": {
|
1176
|
-
width: "14px !important",
|
1177
|
-
height: "14px !important",
|
1178
|
-
borderRadius: "3px",
|
1179
|
-
border: `1px solid ${theme?.palette?.editor?.buttonBorder3}`,
|
1180
|
-
padding: "0px",
|
1181
|
-
"& svg": {
|
1182
|
-
width: "10px",
|
1183
|
-
height: "10px"
|
1184
|
-
}
|
1185
|
-
},
|
1186
|
-
"& .checkedIcon": {
|
1187
|
-
background: "#2563EB",
|
1188
|
-
borderColor: "#2563EB"
|
1189
|
-
},
|
1190
|
-
"& .unCheckedIcon": {
|
1191
|
-
background: theme?.palette?.editor?.checkedIconBg
|
1192
|
-
},
|
1193
|
-
"& p": {
|
1194
|
-
margin: "0px !important",
|
1195
|
-
color: theme?.palette?.editor?.tv_text,
|
1196
|
-
fontSize: "13px"
|
1197
|
-
}
|
1198
|
-
},
|
1199
|
-
dividerGrid: {
|
1200
|
-
margin: "5px 0px 10px 0px"
|
1201
1141
|
}
|
1202
1142
|
});
|
1203
1143
|
export default usePopupStyle;
|
@@ -10,13 +10,11 @@ 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";
|
17
|
+
// import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
|
20
18
|
import { getPageSettings } from "../../utils/pageSettings";
|
21
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
22
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -41,15 +39,15 @@ const TextFormat = props => {
|
|
41
39
|
const {
|
42
40
|
element: pageSt
|
43
41
|
} = getPageSettings(editor) || {};
|
44
|
-
const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
42
|
+
// const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
45
43
|
const {
|
46
44
|
fontFamilies,
|
47
|
-
theme
|
45
|
+
theme
|
48
46
|
} = useEditorContext();
|
49
47
|
const {
|
50
48
|
activeBreakPoint
|
51
49
|
} = useEditorContext();
|
52
|
-
const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
|
50
|
+
// const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
|
53
51
|
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
54
52
|
const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
|
55
53
|
const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
|
@@ -66,13 +64,12 @@ const TextFormat = props => {
|
|
66
64
|
color: "",
|
67
65
|
bgColor: ""
|
68
66
|
};
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
lineSpacingValue = lineSpacingValue?.[breakpoint] !== undefined ? lineSpacingValue : pageSettingLine;
|
67
|
+
|
68
|
+
// let lineSpacingValue = activeMark(editor, "lineHeight");
|
69
|
+
// lineSpacingValue =
|
70
|
+
// lineSpacingValue?.[breakpoint] !== undefined
|
71
|
+
// ? lineSpacingValue
|
72
|
+
// : pageSettingLine;
|
76
73
|
const handleColorPicker = type => e => {
|
77
74
|
setType(type);
|
78
75
|
setAnchorEl(e.currentTarget);
|
@@ -113,63 +110,16 @@ const TextFormat = props => {
|
|
113
110
|
value
|
114
111
|
});
|
115
112
|
};
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
});
|
122
|
-
};
|
113
|
+
|
114
|
+
// const handleLineSpacing = (data) => {
|
115
|
+
// const [[format, value]] = Object.entries(data);
|
116
|
+
// addMarkData(editor, { format, value });
|
117
|
+
// };
|
123
118
|
return /*#__PURE__*/_jsxs(Grid, {
|
124
119
|
container: true,
|
125
120
|
sx: classes.textFormatWrapper,
|
126
121
|
className: "text-formatter-popup",
|
127
122
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
128
|
-
item: true,
|
129
|
-
xs: 12,
|
130
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
131
|
-
container: true,
|
132
|
-
justifyContent: "space-between",
|
133
|
-
alignItems: "center",
|
134
|
-
children: [/*#__PURE__*/_jsx(Grid, {
|
135
|
-
item: true,
|
136
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
137
|
-
variant: "body1",
|
138
|
-
color: "primary",
|
139
|
-
sx: classes.typoLabel,
|
140
|
-
children: "Style"
|
141
|
-
})
|
142
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
143
|
-
item: true,
|
144
|
-
children: theme?.id ? /*#__PURE__*/_jsx(Button, {
|
145
|
-
sx: classes.defaultBtn,
|
146
|
-
onClick: () => {
|
147
|
-
const {
|
148
|
-
field,
|
149
|
-
theme
|
150
|
-
} = saveToTheme(editor) || {};
|
151
|
-
updateTheme(theme, {
|
152
|
-
action: "ELEMENT_PROPS_CHANGE",
|
153
|
-
fieldName: field
|
154
|
-
});
|
155
|
-
},
|
156
|
-
disabled: !customized,
|
157
|
-
children: "Save to theme"
|
158
|
-
}) : null
|
159
|
-
})]
|
160
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
161
|
-
item: true,
|
162
|
-
xs: 12,
|
163
|
-
sx: classes.textFormatField,
|
164
|
-
children: /*#__PURE__*/_jsx(SelectTypography, {
|
165
|
-
editor: editor,
|
166
|
-
classes: classes,
|
167
|
-
closeMainPopup: closeMainPopup,
|
168
|
-
type: "fullWidth",
|
169
|
-
customProps: customProps
|
170
|
-
})
|
171
|
-
})]
|
172
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
173
123
|
item: true,
|
174
124
|
xs: 12,
|
175
125
|
children: [/*#__PURE__*/_jsxs(Grid, {
|
@@ -296,8 +246,7 @@ const TextFormat = props => {
|
|
296
246
|
rounded: true,
|
297
247
|
title: translation("textColor"),
|
298
248
|
id: "11_cc",
|
299
|
-
classes: classes
|
300
|
-
type: "textColor"
|
249
|
+
classes: classes
|
301
250
|
}, "11_cc")
|
302
251
|
})]
|
303
252
|
}), /*#__PURE__*/_jsxs(Grid, {
|
@@ -323,7 +272,7 @@ const TextFormat = props => {
|
|
323
272
|
children: /*#__PURE__*/_jsx(Button, {
|
324
273
|
sx: classes.defaultBtn2,
|
325
274
|
startIcon: /*#__PURE__*/_jsx(ColorResetIcon, {
|
326
|
-
stroke:
|
275
|
+
stroke: theme?.palette?.type === "dark" ? "#505359" : "#A2B0B9"
|
327
276
|
}),
|
328
277
|
onClick: handleDefault({
|
329
278
|
format: "bgColor"
|
@@ -413,7 +362,12 @@ const TextFormat = props => {
|
|
413
362
|
xs: 12,
|
414
363
|
className: "typo-icons",
|
415
364
|
sx: classes.evenSpace,
|
416
|
-
children: [
|
365
|
+
children: [/*#__PURE__*/_jsx(SelectTypography, {
|
366
|
+
classes: classes,
|
367
|
+
editor: editor,
|
368
|
+
closeMainPopup: closeMainPopup || onClose,
|
369
|
+
customProps: customProps
|
370
|
+
}), fontStyle?.map((m, i) => {
|
417
371
|
return /*#__PURE__*/_jsx(MarkButton, {
|
418
372
|
editor: editor,
|
419
373
|
...m,
|
@@ -435,32 +389,6 @@ const TextFormat = props => {
|
|
435
389
|
xs: 12,
|
436
390
|
sx: classes.dividerGrid,
|
437
391
|
children: /*#__PURE__*/_jsx(Divider, {})
|
438
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
439
|
-
item: true,
|
440
|
-
xs: 12,
|
441
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
442
|
-
variant: "body1",
|
443
|
-
color: "primary",
|
444
|
-
sx: classes.typoLabel,
|
445
|
-
children: "Line Spacing"
|
446
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
447
|
-
item: true,
|
448
|
-
xs: 12,
|
449
|
-
className: "typo-icons",
|
450
|
-
sx: classes.evenSpace,
|
451
|
-
children: /*#__PURE__*/_jsx(LineSpacing, {
|
452
|
-
value: lineSpacingValue,
|
453
|
-
onChange: handleLineSpacing,
|
454
|
-
data: {
|
455
|
-
key: "lineHeight"
|
456
|
-
}
|
457
|
-
})
|
458
|
-
})]
|
459
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
460
|
-
item: true,
|
461
|
-
xs: 12,
|
462
|
-
sx: classes.dividerGrid,
|
463
|
-
children: /*#__PURE__*/_jsx(Divider, {})
|
464
392
|
}), /*#__PURE__*/_jsx(Grid, {
|
465
393
|
item: true,
|
466
394
|
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",
|
@@ -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,28 +32,22 @@ 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
50
|
className: "secondaryBtn",
|
57
|
-
style: {
|
58
|
-
background: "none"
|
59
|
-
},
|
60
51
|
children: "Cancel"
|
61
52
|
}), /*#__PURE__*/_jsx(Button, {
|
62
53
|
onClick: handleSave,
|
@@ -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",
|
@@ -18,8 +18,6 @@ const FontLoader = props => {
|
|
18
18
|
const loadFontsInBatches = (families, batchSize = 5, maxRetries = 3) => {
|
19
19
|
let currentIndex = 0;
|
20
20
|
let retryCount = 0;
|
21
|
-
// let hideLoaderOn = 30;
|
22
|
-
|
23
21
|
const loadNextBatch = () => {
|
24
22
|
try {
|
25
23
|
if (currentIndex >= families?.length) {
|
@@ -80,7 +78,6 @@ const FontLoader = props => {
|
|
80
78
|
// console.log(err);
|
81
79
|
setLoading(false);
|
82
80
|
});
|
83
|
-
// setLoading(true);
|
84
81
|
} else {
|
85
82
|
function correctFontArray(fontString) {
|
86
83
|
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: {
|