@flozy/editor 9.8.1 → 9.8.3
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 +19 -26
- package/dist/Editor/CommonEditor.js +25 -139
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +7 -11
- package/dist/Editor/Elements/AI/AIInput.js +3 -5
- package/dist/Editor/Elements/AI/CustomSelect.js +5 -9
- package/dist/Editor/Elements/AI/PopoverAIInput.js +5 -15
- package/dist/Editor/Elements/Accordion/Accordion.js +3 -4
- package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +1 -4
- package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -6
- package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +1 -4
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -6
- package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +1 -4
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +1 -4
- package/dist/Editor/Elements/Button/ButtonPopup.js +1 -4
- package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -6
- package/dist/Editor/Elements/Button/EditorButton.js +30 -43
- package/dist/Editor/Elements/Carousel/Carousel.js +4 -5
- package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -6
- package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -3
- package/dist/Editor/Elements/ChipText/ChipTextPopup.js +1 -4
- package/dist/Editor/Elements/CodeToText/CodeToText.js +4 -5
- package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +2 -6
- 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/Colorbox/ColorboxButton.js +2 -6
- package/dist/Editor/Elements/DataView/DataView.js +2 -5
- package/dist/Editor/Elements/DataView/DataViewButton.js +2 -6
- 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/FilterSort/SortOptions/ChooseSort.js +12 -13
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +4 -7
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +5 -7
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +7 -9
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +3 -8
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +3 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -6
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +3 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -9
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +12 -15
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +2 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +2 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +6 -23
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +4 -6
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
- package/dist/Editor/Elements/DataView/Layouts/index.js +1 -3
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +2 -5
- package/dist/Editor/Elements/Divider/Divider.js +3 -5
- package/dist/Editor/Elements/Divider/DividerButton.js +2 -6
- package/dist/Editor/Elements/Divider/DividerPopup.js +2 -3
- package/dist/Editor/Elements/Embed/Embed.js +1 -4
- package/dist/Editor/Elements/Embed/EmbedPopup.js +1 -4
- package/dist/Editor/Elements/Embed/Image.js +11 -16
- package/dist/Editor/Elements/Embed/Video.js +6 -9
- package/dist/Editor/Elements/EmbedScript/Code.js +4 -7
- package/dist/Editor/Elements/EmbedScript/EmbedScript.js +2 -6
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +5 -8
- package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -6
- package/dist/Editor/Elements/Form/FieldPopup.js +1 -4
- package/dist/Editor/Elements/Form/Form.js +9 -12
- package/dist/Editor/Elements/Form/FormButton.js +2 -6
- package/dist/Editor/Elements/Form/FormPopup.js +2 -3
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -18
- package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +8 -13
- package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +2 -3
- package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +2 -4
- package/dist/Editor/Elements/Form/Workflow/index.js +9 -15
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +23 -67
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +6 -31
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +6 -54
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -3
- package/dist/Editor/Elements/FreeGrid/Options/More.js +4 -10
- package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
- package/dist/Editor/Elements/Grid/Grid.js +10 -13
- package/dist/Editor/Elements/Grid/GridButton.js +5 -9
- package/dist/Editor/Elements/Grid/GridItem.js +8 -14
- package/dist/Editor/Elements/Grid/GridItemPopup.js +1 -4
- package/dist/Editor/Elements/Grid/GridPopup.js +1 -4
- package/dist/Editor/Elements/Grid/SectionPopup.js +1 -4
- package/dist/Editor/Elements/Link/Link.js +5 -8
- package/dist/Editor/Elements/Link/LinkButton.js +1 -4
- package/dist/Editor/Elements/List/CheckList.js +9 -14
- package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -6
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -4
- package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +1 -4
- package/dist/Editor/Elements/Search/SearchButton.js +4 -7
- package/dist/Editor/Elements/Search/SearchList.js +5 -10
- package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +8 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -6
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -4
- package/dist/Editor/Elements/Signature/SignaturePopup.js +16 -17
- package/dist/Editor/Elements/SimpleText/index.js +4 -5
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +2 -4
- package/dist/Editor/Elements/Table/Table.js +12 -24
- package/dist/Editor/Elements/Table/TablePopup.js +1 -4
- package/dist/Editor/Elements/Table/TableSelector.js +6 -10
- package/dist/Editor/Elements/Table/TableTool.js +4 -8
- package/dist/Editor/Elements/Title/title.js +8 -9
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +1 -4
- package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
- package/dist/Editor/MiniEditor.js +3 -10
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/Basic/index.js +1 -2
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +2 -6
- 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 +4 -8
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +5 -17
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +5 -10
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +4 -10
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +4 -10
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +3 -9
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +35 -42
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +51 -58
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +22 -29
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +87 -226
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +10 -20
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +5 -10
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +11 -71
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +5 -11
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +42 -122
- package/dist/Editor/Toolbar/PopupTool/index.js +2 -18
- package/dist/Editor/Toolbar/Toolbar.js +10 -20
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/common/ColorPickerButton.js +14 -39
- package/dist/Editor/common/CustomDialog/index.js +10 -8
- 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 +8 -10
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +4 -6
- package/dist/Editor/common/ImageSelector/Styles.js +9 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +10 -14
- package/dist/Editor/common/LinkSettings/index.js +14 -20
- package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
- package/dist/Editor/common/MUIIcon/index.js +3 -0
- package/dist/Editor/common/MentionsPopup/index.js +2 -6
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -46
- package/dist/Editor/common/RnD/ContextMenu/index.js +2 -3
- package/dist/Editor/common/RnD/ElementOptions/index.js +2 -7
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +3 -8
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +3 -7
- 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 +4 -7
- 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 +2 -6
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
- package/dist/Editor/common/RnD/OptionsPopup/index.js +3 -4
- package/dist/Editor/common/RnD/ShadowElement.js +1 -2
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +4 -11
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +8 -55
- 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 +13 -69
- package/dist/Editor/common/Section/index.js +4 -7
- package/dist/Editor/common/Shorthands/elements.js +3 -74
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +4 -4
- package/dist/Editor/common/StyleBuilder/boxStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -6
- package/dist/Editor/common/StyleBuilder/dividerStyles.js +2 -2
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +9 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +5 -19
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +10 -22
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +13 -27
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +14 -43
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +6 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +6 -19
- package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +2 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -9
- package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +2 -8
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +11 -12
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -8
- package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +2 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -21
- package/dist/Editor/common/StyleBuilder/formStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/gridItemStyle.js +6 -6
- package/dist/Editor/common/StyleBuilder/gridStyle.js +5 -5
- package/dist/Editor/common/StyleBuilder/index.js +5 -8
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
- package/dist/Editor/common/SwipeableDrawer/index.js +1 -1
- package/dist/Editor/common/Uploader.js +5 -16
- package/dist/Editor/commonStyle.js +57 -68
- package/dist/Editor/helper/index.js +3 -27
- 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/withLayout.js +2 -3
- package/dist/Editor/plugins/withLinks.js +0 -10
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +50 -178
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/freegrid.js +3 -3
- package/dist/Editor/utils/helper.js +21 -92
- package/package.json +4 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -444
- 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 -381
- 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
@@ -1,436 +0,0 @@
|
|
1
|
-
import { Box, Button, Divider, Grid, IconButton, Popover, TextField, Tooltip, Typography } from "@mui/material";
|
2
|
-
import { useEditorContext } from "../../hooks/useMouseMove";
|
3
|
-
import FormatClearIcon from "@mui/icons-material/FormatClear";
|
4
|
-
import usePopupStyles from "../PopupTool/PopupToolStyle";
|
5
|
-
import { TextMinusIcon, TextPlusIcon } from "../../common/iconslist";
|
6
|
-
import { BREAKPOINTS_DEVICES, getBreakPointsValue, getVariableValue } from "../../helper/theme";
|
7
|
-
import useWindowResize from "../../hooks/useWindowResize";
|
8
|
-
import { toolbarGroups } from "../toolbarGroups";
|
9
|
-
import Icon from "../../common/Icon";
|
10
|
-
import { useMemo, useState } from "react";
|
11
|
-
import CommonButton from "../../common/Button";
|
12
|
-
import CustomSelect from "../../common/CustomSelect";
|
13
|
-
import ColorButtons from "../../Elements/Color Picker/ColorButtons";
|
14
|
-
import FormatColorResetIcon from "@mui/icons-material/FormatColorReset";
|
15
|
-
import ColorPickerStyles from "../../Elements/Color Picker/Styles";
|
16
|
-
import colorWheel from "../../Elements/Color Picker/colorWheel.png";
|
17
|
-
import CustomColorPicker from "../../common/CustomColorPicker";
|
18
|
-
import FontFamilyAutocomplete from "../FormatTools/FontFamilyAutocomplete";
|
19
|
-
import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList";
|
20
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
21
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
22
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
23
|
-
function getFontStyleProps(settings = {}, format) {
|
24
|
-
const {
|
25
|
-
fontWeight,
|
26
|
-
fontStyle
|
27
|
-
} = settings;
|
28
|
-
let isActive;
|
29
|
-
let onClick;
|
30
|
-
switch (format) {
|
31
|
-
case "bold":
|
32
|
-
isActive = fontWeight === "bold" || fontWeight === "700";
|
33
|
-
onClick = () => {
|
34
|
-
return {
|
35
|
-
fontWeight: isActive ? "normal" : "bold"
|
36
|
-
};
|
37
|
-
};
|
38
|
-
break;
|
39
|
-
case "italic":
|
40
|
-
isActive = fontStyle === "italic";
|
41
|
-
onClick = () => {
|
42
|
-
return {
|
43
|
-
fontStyle: isActive ? "unset" : "italic"
|
44
|
-
};
|
45
|
-
};
|
46
|
-
break;
|
47
|
-
|
48
|
-
// case "underline":
|
49
|
-
// isActive = textDecoration.includes("underline");
|
50
|
-
// onClick = () => {
|
51
|
-
// let otherTextDecoration = textDecoration?.includes("line-through")
|
52
|
-
// ? "line-through"
|
53
|
-
// : "";
|
54
|
-
|
55
|
-
// otherTextDecoration += isActive ? "" : " underline";
|
56
|
-
|
57
|
-
// return { textDecoration: otherTextDecoration };
|
58
|
-
// };
|
59
|
-
// break;
|
60
|
-
// case "strikethrough":
|
61
|
-
// isActive = textDecoration.includes("line-through");
|
62
|
-
// onClick = () => {
|
63
|
-
// let otherTextDecoration = textDecoration?.includes("underline")
|
64
|
-
// ? "underline"
|
65
|
-
// : "";
|
66
|
-
|
67
|
-
// otherTextDecoration += isActive ? "" : " line-through";
|
68
|
-
|
69
|
-
// return { textDecoration: otherTextDecoration };
|
70
|
-
// };
|
71
|
-
// break;
|
72
|
-
|
73
|
-
default:
|
74
|
-
isActive = false;
|
75
|
-
onClick = () => {};
|
76
|
-
break;
|
77
|
-
}
|
78
|
-
return {
|
79
|
-
isActive,
|
80
|
-
onClick
|
81
|
-
};
|
82
|
-
}
|
83
|
-
const allTools = toolbarGroups.flat();
|
84
|
-
function ThemeTextFormat(props) {
|
85
|
-
const {
|
86
|
-
settings,
|
87
|
-
updateSettings,
|
88
|
-
onSaveTextSettings,
|
89
|
-
onClose
|
90
|
-
} = props;
|
91
|
-
const {
|
92
|
-
theme,
|
93
|
-
fontFamilies
|
94
|
-
} = useEditorContext();
|
95
|
-
const classes = usePopupStyles(theme);
|
96
|
-
const pickerStyles = ColorPickerStyles(theme);
|
97
|
-
const fontStyle = allTools.filter(f => f.type === "mark" && f.themeEnabled);
|
98
|
-
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
99
|
-
const fontFamilyVal = useMemo(() => {
|
100
|
-
const {
|
101
|
-
fontFamily = ""
|
102
|
-
} = settings;
|
103
|
-
let font = fontFamily.startsWith("var") ? getVariableValue(fontFamily) : fontFamily;
|
104
|
-
return font;
|
105
|
-
}, [settings]);
|
106
|
-
const fontWeightVal = useMemo(() => {
|
107
|
-
const {
|
108
|
-
options
|
109
|
-
} = fontWeight || {};
|
110
|
-
const selected = options?.find(o => o.value === settings?.fontWeight || o.numVal === settings?.fontWeight);
|
111
|
-
return selected?.value;
|
112
|
-
}, [settings?.fontWeight]);
|
113
|
-
return /*#__PURE__*/_jsxs(Box, {
|
114
|
-
sx: classes.textFormatContainer,
|
115
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
116
|
-
container: true,
|
117
|
-
sx: classes.textFormatWrapper,
|
118
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
119
|
-
item: true,
|
120
|
-
xs: 12,
|
121
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
122
|
-
container: true,
|
123
|
-
justifyContent: "space-between",
|
124
|
-
alignItems: "center",
|
125
|
-
children: [/*#__PURE__*/_jsx(Grid, {
|
126
|
-
item: true,
|
127
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
128
|
-
variant: "body1",
|
129
|
-
color: "primary",
|
130
|
-
sx: classes.typoLabel,
|
131
|
-
children: "Font Family"
|
132
|
-
})
|
133
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
134
|
-
item: true,
|
135
|
-
children: /*#__PURE__*/_jsx(Button, {
|
136
|
-
sx: classes.defaultBtn,
|
137
|
-
startIcon: /*#__PURE__*/_jsx(FormatClearIcon, {}),
|
138
|
-
onClick: () => updateSettings({
|
139
|
-
fontFamily: defaultFonts[0]
|
140
|
-
}),
|
141
|
-
children: "Default"
|
142
|
-
})
|
143
|
-
})]
|
144
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
145
|
-
item: true,
|
146
|
-
xs: 12,
|
147
|
-
sx: classes.textFormatField,
|
148
|
-
children: /*#__PURE__*/_jsx(FontFamilyAutocomplete, {
|
149
|
-
editor: {},
|
150
|
-
format: "fontFamily",
|
151
|
-
options: fontFamilies?.options,
|
152
|
-
width: "100%",
|
153
|
-
onChange: updateSettings,
|
154
|
-
val: fontFamilyVal || defaultFonts[0],
|
155
|
-
webFont: true
|
156
|
-
})
|
157
|
-
})]
|
158
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
159
|
-
container: true,
|
160
|
-
spacing: 2,
|
161
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
162
|
-
item: true,
|
163
|
-
xs: 6,
|
164
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
165
|
-
variant: "body1",
|
166
|
-
color: "primary",
|
167
|
-
sx: classes.typoLabel,
|
168
|
-
children: "Font Weight"
|
169
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
170
|
-
item: true,
|
171
|
-
xs: 12,
|
172
|
-
sx: classes.textFormatField,
|
173
|
-
children: /*#__PURE__*/_jsx(CustomSelect, {
|
174
|
-
options: fontWeight?.options || [],
|
175
|
-
classes: classes,
|
176
|
-
onChange: e => {
|
177
|
-
updateSettings({
|
178
|
-
fontWeight: e.target.value
|
179
|
-
});
|
180
|
-
},
|
181
|
-
value: fontWeightVal
|
182
|
-
})
|
183
|
-
})]
|
184
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
185
|
-
item: true,
|
186
|
-
xs: 6,
|
187
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
188
|
-
variant: "body1",
|
189
|
-
color: "primary",
|
190
|
-
sx: classes.typoLabel,
|
191
|
-
children: "Font Size"
|
192
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
193
|
-
item: true,
|
194
|
-
xs: 12,
|
195
|
-
sx: classes.textFormatCG,
|
196
|
-
children: /*#__PURE__*/_jsx(TextSize, {
|
197
|
-
classes: classes,
|
198
|
-
value: settings?.fontSize || 16,
|
199
|
-
onChange: fontSize => updateSettings({
|
200
|
-
fontSize
|
201
|
-
}),
|
202
|
-
fullWidth: true
|
203
|
-
})
|
204
|
-
})]
|
205
|
-
})]
|
206
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
207
|
-
item: true,
|
208
|
-
xs: 12,
|
209
|
-
sx: classes.dividerGrid,
|
210
|
-
children: /*#__PURE__*/_jsx(Divider, {})
|
211
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
212
|
-
item: true,
|
213
|
-
xs: 12,
|
214
|
-
children: [/*#__PURE__*/_jsxs(Grid, {
|
215
|
-
container: true,
|
216
|
-
justifyContent: "space-between",
|
217
|
-
alignItems: "center",
|
218
|
-
children: [/*#__PURE__*/_jsx(Grid, {
|
219
|
-
item: true,
|
220
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
221
|
-
variant: "body1",
|
222
|
-
color: "primary",
|
223
|
-
sx: classes.typoLabel,
|
224
|
-
children: "Text Color"
|
225
|
-
})
|
226
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
227
|
-
item: true,
|
228
|
-
children: /*#__PURE__*/_jsx(Button, {
|
229
|
-
sx: classes.defaultBtn,
|
230
|
-
startIcon: /*#__PURE__*/_jsx(FormatColorResetIcon, {}),
|
231
|
-
onClick: () => updateSettings({
|
232
|
-
color: "#ddd"
|
233
|
-
}),
|
234
|
-
children: "Default"
|
235
|
-
})
|
236
|
-
})]
|
237
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
238
|
-
sx: classes.textFormatColorWrpr,
|
239
|
-
children: /*#__PURE__*/_jsx(ColorPicker, {
|
240
|
-
classes: classes,
|
241
|
-
pickerStyles: pickerStyles,
|
242
|
-
onChange: color => updateSettings({
|
243
|
-
color
|
244
|
-
}),
|
245
|
-
color: settings?.color,
|
246
|
-
disableEditTheme: true
|
247
|
-
})
|
248
|
-
})]
|
249
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
250
|
-
item: true,
|
251
|
-
xs: 12,
|
252
|
-
sx: classes.dividerGrid,
|
253
|
-
children: /*#__PURE__*/_jsx(Divider, {})
|
254
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
255
|
-
item: true,
|
256
|
-
xs: 12,
|
257
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
258
|
-
variant: "body1",
|
259
|
-
color: "primary",
|
260
|
-
sx: classes.typoLabel,
|
261
|
-
children: "Typography"
|
262
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
263
|
-
item: true,
|
264
|
-
xs: 12,
|
265
|
-
className: "typo-icons",
|
266
|
-
sx: classes.evenSpace,
|
267
|
-
children: fontStyle?.map((m, i) => {
|
268
|
-
const {
|
269
|
-
isActive,
|
270
|
-
onClick
|
271
|
-
} = getFontStyleProps(settings, m.format) || {};
|
272
|
-
return /*#__PURE__*/_jsx(CommonButton, {
|
273
|
-
active: isActive,
|
274
|
-
onClick: () => {
|
275
|
-
const style = onClick();
|
276
|
-
updateSettings(style);
|
277
|
-
},
|
278
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
279
|
-
icon: m.format
|
280
|
-
})
|
281
|
-
}, i);
|
282
|
-
})
|
283
|
-
})]
|
284
|
-
})]
|
285
|
-
}), /*#__PURE__*/_jsxs("div", {
|
286
|
-
className: "saveThemeBtnsWrapper",
|
287
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
288
|
-
onClick: onClose,
|
289
|
-
className: "secondaryBtn",
|
290
|
-
style: {
|
291
|
-
background: "none"
|
292
|
-
},
|
293
|
-
children: "Cancel"
|
294
|
-
}), /*#__PURE__*/_jsx(Button, {
|
295
|
-
onClick: onSaveTextSettings,
|
296
|
-
className: "primaryBtn",
|
297
|
-
children: "Save"
|
298
|
-
})]
|
299
|
-
})]
|
300
|
-
});
|
301
|
-
}
|
302
|
-
export default ThemeTextFormat;
|
303
|
-
function TextSize(props) {
|
304
|
-
const {
|
305
|
-
classes,
|
306
|
-
value: val,
|
307
|
-
onChange,
|
308
|
-
fullWidth
|
309
|
-
} = props;
|
310
|
-
const [size] = useWindowResize();
|
311
|
-
const value = getBreakPointsValue(val, size?.device);
|
312
|
-
const updateMarkData = newVal => {
|
313
|
-
let upData = {
|
314
|
-
...getBreakPointsValue(val),
|
315
|
-
[size?.device]: `${newVal}px`
|
316
|
-
};
|
317
|
-
|
318
|
-
// if desktop update to all other devices
|
319
|
-
// to avoid default normal size
|
320
|
-
if (size?.device === "lg") {
|
321
|
-
upData = BREAKPOINTS_DEVICES.reduce((a, b) => {
|
322
|
-
a[b] = `${newVal}px`;
|
323
|
-
return a;
|
324
|
-
}, {});
|
325
|
-
}
|
326
|
-
onChange(upData);
|
327
|
-
};
|
328
|
-
const onChangeSize = e => {
|
329
|
-
let inc = parseInt(e.target.value) || 8;
|
330
|
-
inc = inc > 200 ? 200 : inc;
|
331
|
-
updateMarkData(inc || 8);
|
332
|
-
};
|
333
|
-
const getSizeVal = () => {
|
334
|
-
try {
|
335
|
-
return parseInt(value);
|
336
|
-
} catch (err) {
|
337
|
-
return "";
|
338
|
-
}
|
339
|
-
};
|
340
|
-
const combinedOldVal = getSizeVal();
|
341
|
-
const onIncreaseSize = () => {
|
342
|
-
let inc = (combinedOldVal || 0) + 1;
|
343
|
-
inc = inc > 200 ? 200 : inc;
|
344
|
-
updateMarkData(inc);
|
345
|
-
};
|
346
|
-
const onDecreaseSize = () => {
|
347
|
-
const newVal = combinedOldVal - 1 < 0 ? 0 : combinedOldVal - 1;
|
348
|
-
updateMarkData(newVal);
|
349
|
-
};
|
350
|
-
return /*#__PURE__*/_jsx(TextField, {
|
351
|
-
sx: classes?.textSize,
|
352
|
-
value: combinedOldVal,
|
353
|
-
onChange: onChangeSize,
|
354
|
-
size: "small",
|
355
|
-
inputProps: {
|
356
|
-
style: {
|
357
|
-
width: fullWidth ? "100%" : "30px",
|
358
|
-
textAlign: "center",
|
359
|
-
height: "19px",
|
360
|
-
fontSize: "14px"
|
361
|
-
}
|
362
|
-
},
|
363
|
-
fullWidth: fullWidth,
|
364
|
-
InputProps: {
|
365
|
-
style: {
|
366
|
-
borderRadius: "8px"
|
367
|
-
},
|
368
|
-
endAdornment: /*#__PURE__*/_jsxs("div", {
|
369
|
-
className: "textFontArrows",
|
370
|
-
children: [/*#__PURE__*/_jsx(IconButton, {
|
371
|
-
onClick: onIncreaseSize,
|
372
|
-
size: "small",
|
373
|
-
children: /*#__PURE__*/_jsx(TextPlusIcon, {})
|
374
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
375
|
-
onClick: onDecreaseSize,
|
376
|
-
size: "small",
|
377
|
-
children: /*#__PURE__*/_jsx(TextMinusIcon, {})
|
378
|
-
})]
|
379
|
-
})
|
380
|
-
}
|
381
|
-
});
|
382
|
-
}
|
383
|
-
function ColorPicker(props) {
|
384
|
-
const {
|
385
|
-
classes,
|
386
|
-
pickerStyles,
|
387
|
-
onChange,
|
388
|
-
color,
|
389
|
-
disableEditTheme
|
390
|
-
} = props;
|
391
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
392
|
-
const open = Boolean(anchorEl);
|
393
|
-
const handleClose = () => {
|
394
|
-
setAnchorEl(null);
|
395
|
-
};
|
396
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
397
|
-
children: [/*#__PURE__*/_jsx(Tooltip, {
|
398
|
-
title: "",
|
399
|
-
arrow: true,
|
400
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
401
|
-
sx: pickerStyles.colorPickerIcon,
|
402
|
-
onClick: e => {
|
403
|
-
setAnchorEl(e.currentTarget);
|
404
|
-
},
|
405
|
-
children: /*#__PURE__*/_jsx("img", {
|
406
|
-
src: colorWheel,
|
407
|
-
alt: "color wheel"
|
408
|
-
})
|
409
|
-
})
|
410
|
-
}), /*#__PURE__*/_jsx(ColorButtons, {
|
411
|
-
classes: pickerStyles,
|
412
|
-
onSelect: onChange,
|
413
|
-
activeColor: color,
|
414
|
-
disableEditTheme: disableEditTheme
|
415
|
-
}), /*#__PURE__*/_jsx(Popover, {
|
416
|
-
open: open,
|
417
|
-
anchorEl: anchorEl,
|
418
|
-
onClose: handleClose,
|
419
|
-
anchorOrigin: {
|
420
|
-
vertical: "top",
|
421
|
-
horizontal: "center"
|
422
|
-
},
|
423
|
-
transformOrigin: {
|
424
|
-
vertical: "bottom",
|
425
|
-
horizontal: "top"
|
426
|
-
},
|
427
|
-
sx: classes.colorPickerPopup,
|
428
|
-
children: /*#__PURE__*/_jsx(CustomColorPicker, {
|
429
|
-
gradient: true,
|
430
|
-
onChange: onChange,
|
431
|
-
color: color,
|
432
|
-
disableEditTheme: disableEditTheme
|
433
|
-
})
|
434
|
-
})]
|
435
|
-
});
|
436
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
-
const ClearAllIcon = () => /*#__PURE__*/_jsxs("svg", {
|
4
|
-
xmlns: "http://www.w3.org/2000/svg",
|
5
|
-
width: "20",
|
6
|
-
height: "20",
|
7
|
-
viewBox: "0 0 20 20",
|
8
|
-
children: [/*#__PURE__*/_jsx("rect", {
|
9
|
-
x: "4",
|
10
|
-
y: "5",
|
11
|
-
width: "12",
|
12
|
-
height: "2",
|
13
|
-
rx: "1",
|
14
|
-
fill: "currentColor"
|
15
|
-
}), /*#__PURE__*/_jsx("rect", {
|
16
|
-
x: "4",
|
17
|
-
y: "9",
|
18
|
-
width: "10",
|
19
|
-
height: "2",
|
20
|
-
rx: "1",
|
21
|
-
fill: "currentColor"
|
22
|
-
}), /*#__PURE__*/_jsx("rect", {
|
23
|
-
x: "4",
|
24
|
-
y: "13",
|
25
|
-
width: "12",
|
26
|
-
height: "2",
|
27
|
-
rx: "1",
|
28
|
-
fill: "currentColor"
|
29
|
-
})]
|
30
|
-
});
|
31
|
-
export default ClearAllIcon;
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
-
const ResetIconNew = () => {
|
4
|
-
return /*#__PURE__*/_jsxs("svg", {
|
5
|
-
width: "17",
|
6
|
-
height: "17",
|
7
|
-
viewBox: "0 0 17 17",
|
8
|
-
fill: "none",
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
10
|
-
children: [/*#__PURE__*/_jsx("circle", {
|
11
|
-
cx: "8.10105",
|
12
|
-
cy: "8.10234",
|
13
|
-
r: "8",
|
14
|
-
transform: "rotate(-89.2717 8.10105 8.10234)",
|
15
|
-
fill: "#2563EB",
|
16
|
-
fillOpacity: "0.16"
|
17
|
-
}), /*#__PURE__*/_jsx("path", {
|
18
|
-
d: "M12.7169 8.22222V8.22222C12.7168 8.2323 12.7289 8.23752 12.7361 8.2305L13.3823 7.6035C13.6597 7.33434 14.0843 7.33974 14.3547 7.61586C14.6252 7.89199 14.6198 8.31458 14.3424 8.58375L12.6992 10.1595C12.3035 10.5389 11.6762 10.5291 11.2926 10.1375L9.71318 8.5249C9.57796 8.38683 9.51173 8.20874 9.51381 8.04516C9.51606 7.86794 9.58679 7.69159 9.72531 7.57064C10.0027 7.30148 10.4273 7.30688 10.6977 7.583L11.3182 8.21649C11.3288 8.22729 11.3471 8.21993 11.3473 8.20481V8.20481C11.374 6.10545 9.67017 4.36586 7.56099 4.33905C5.45182 4.31224 3.70429 6.00795 3.6776 8.10731C3.65091 10.2067 5.35477 11.9463 7.46394 11.9731C7.84743 11.9779 8.14493 12.2817 8.14007 12.6634C8.13522 13.0451 7.8301 13.3412 7.44661 13.3363C4.57046 13.2997 2.27161 10.9527 2.30801 8.0899C2.3444 5.22714 4.70217 2.93927 7.57832 2.97583C10.4408 3.01222 12.7533 5.35946 12.7169 8.22222Z",
|
19
|
-
fill: "#2563EB"
|
20
|
-
})]
|
21
|
-
});
|
22
|
-
};
|
23
|
-
export default ResetIconNew;
|