@flozy/editor 9.5.4 → 9.5.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 +29 -20
- package/dist/Editor/CommonEditor.js +19 -130
- 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 +2 -4
- 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 +14 -31
- 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 +3 -3
- 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 -7
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +5 -25
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +2 -7
- 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 +38 -64
- 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/TableStyles.js +1 -4
- 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/DataView/styles.js +0 -13
- 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/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 +3 -21
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +2 -6
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +4 -34
- 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 +3 -6
- package/dist/Editor/Elements/Search/SearchList.js +3 -7
- package/dist/Editor/Elements/Signature/SignatureButton.js +2 -6
- 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 +11 -23
- package/dist/Editor/Elements/Table/TableCell.js +2 -6
- 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 +0 -10
- 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 +3 -5
- 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 +4 -8
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +9 -16
- 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 +1 -17
- 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 -46
- 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/MentionsPopup/index.js +2 -6
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
- 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/SwitchViewport/SwitchViewport.js +4 -11
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +7 -56
- 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 -123
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +3 -5
- package/dist/Editor/common/RnD/index.js +7 -59
- 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/Uploader.js +5 -16
- package/dist/Editor/commonStyle.js +57 -68
- package/dist/Editor/helper/index.js +2 -2
- 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 +7 -10
- package/dist/Editor/plugins/withLayout.js +2 -3
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +47 -164
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/embed.js +6 -8
- 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/dist/Editor/utils/table.js +6 -9
- package/package.json +2 -2
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -425
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -441
- package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
- 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 -33
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
- package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +0 -117
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +0 -134
- package/dist/Editor/common/RnD/VirtualElement/helper.js +0 -281
- 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 -147
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
- package/dist/Editor/themeSettings/buttons/index.js +0 -285
- package/dist/Editor/themeSettings/buttons/style.js +0 -23
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -305
- 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 -222
- package/dist/Editor/themeSettings/fonts/style.js +0 -60
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -331
- package/dist/Editor/themeSettings/style.js +0 -211
- 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
@@ -2,222 +2,108 @@ import { useMemo } from "react";
|
|
2
2
|
import { activeMark, addMarkData, isBlockActive, toggleBlock } from "../../../utils/SlateUtilityFunctions";
|
3
3
|
import CustomSelectTool from "./CustomSelectTool";
|
4
4
|
import useWindowResize from "../../../hooks/useWindowResize";
|
5
|
-
import { BREAKPOINTS_DEVICES, getBreakPointsValue
|
5
|
+
import { BREAKPOINTS_DEVICES, getBreakPointsValue } from "../../../helper/theme";
|
6
6
|
import { sizeMap } from "../../../utils/font";
|
7
|
-
import { Editor } from "slate";
|
8
|
-
import { useEditorTheme } from "../../../hooks/useEditorTheme";
|
9
|
-
import { MenuItem, Select } from "@mui/material";
|
10
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
9
|
function Label({
|
13
10
|
label,
|
14
|
-
type
|
15
|
-
translation
|
11
|
+
type
|
16
12
|
}) {
|
17
13
|
return /*#__PURE__*/_jsxs("span", {
|
18
14
|
children: [/*#__PURE__*/_jsx("strong", {
|
19
15
|
children: label
|
20
|
-
}), " ",
|
16
|
+
}), " ", type]
|
21
17
|
});
|
22
18
|
}
|
23
19
|
function DisplayHeaderLabel({
|
24
|
-
type
|
25
|
-
isCustomized,
|
26
|
-
isPara = false
|
20
|
+
type
|
27
21
|
}) {
|
28
22
|
return /*#__PURE__*/_jsxs("div", {
|
29
|
-
children: [
|
23
|
+
children: ["H", /*#__PURE__*/_jsx("sub", {
|
30
24
|
children: type
|
31
25
|
})]
|
32
26
|
});
|
33
27
|
}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
type: "
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
},
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
label:
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
}),
|
108
|
-
group: "typography",
|
109
|
-
value: "headingFive"
|
110
|
-
}, {
|
111
|
-
id: 19,
|
112
|
-
format: "headingSix",
|
113
|
-
type: "block",
|
114
|
-
title: /*#__PURE__*/_jsx(Label, {
|
115
|
-
label: "H6",
|
116
|
-
type: "Heading",
|
117
|
-
translation: translation
|
118
|
-
}),
|
119
|
-
label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
|
120
|
-
type: 6,
|
121
|
-
isCustomized: isCustomized
|
122
|
-
}),
|
123
|
-
group: "typography",
|
124
|
-
value: "headingSix"
|
125
|
-
}, {
|
126
|
-
id: 20,
|
127
|
-
format: "paragraphOne",
|
128
|
-
type: "block",
|
129
|
-
title: /*#__PURE__*/_jsx(Label, {
|
130
|
-
label: "P1",
|
131
|
-
type: "Paragraph",
|
132
|
-
translation: translation
|
133
|
-
}),
|
134
|
-
label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
|
135
|
-
type: 1,
|
136
|
-
isCustomized: isCustomized,
|
137
|
-
isPara: true
|
138
|
-
}),
|
139
|
-
group: "typography",
|
140
|
-
value: "paragraphOne"
|
141
|
-
}, {
|
142
|
-
id: 21,
|
143
|
-
format: "paragraphTwo",
|
144
|
-
type: "block",
|
145
|
-
title: /*#__PURE__*/_jsx(Label, {
|
146
|
-
label: "P2",
|
147
|
-
type: "Paragraph",
|
148
|
-
translation: translation
|
149
|
-
}),
|
150
|
-
label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
|
151
|
-
type: 2,
|
152
|
-
isCustomized: isCustomized,
|
153
|
-
isPara: true
|
154
|
-
}),
|
155
|
-
group: "typography",
|
156
|
-
value: "paragraphTwo"
|
157
|
-
}, {
|
158
|
-
id: 22,
|
159
|
-
format: "paragraphThree",
|
160
|
-
type: "block",
|
161
|
-
title: /*#__PURE__*/_jsx(Label, {
|
162
|
-
label: "P3",
|
163
|
-
type: "Paragraph",
|
164
|
-
translation: translation
|
165
|
-
}),
|
166
|
-
label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
|
167
|
-
type: 3,
|
168
|
-
isCustomized: isCustomized,
|
169
|
-
isPara: true
|
170
|
-
}),
|
171
|
-
group: "typography",
|
172
|
-
value: "paragraphThree"
|
173
|
-
}
|
174
|
-
// {
|
175
|
-
// id: 14,
|
176
|
-
// format: "fontSize",
|
177
|
-
// type: "mark",
|
178
|
-
// title: <Label label="L" type="Large" />,
|
179
|
-
// label: "L",
|
180
|
-
// group: "typography",
|
181
|
-
// value: "huge",
|
182
|
-
// },
|
183
|
-
// {
|
184
|
-
// id: 15,
|
185
|
-
// format: "fontSize",
|
186
|
-
// type: "mark",
|
187
|
-
// title: <Label label="M" type="Medium" />,
|
188
|
-
// label: "M",
|
189
|
-
// group: "typography",
|
190
|
-
// value: "medium",
|
191
|
-
// },
|
192
|
-
// {
|
193
|
-
// id: 16,
|
194
|
-
// format: "fontSize",
|
195
|
-
// type: "mark",
|
196
|
-
// title: <Label label="S" type="Small" />,
|
197
|
-
// label: "S",
|
198
|
-
// group: "typography",
|
199
|
-
// value: "small",
|
200
|
-
// },
|
201
|
-
];
|
202
|
-
|
203
|
-
return typographyOptions;
|
204
|
-
}
|
28
|
+
const typographyOptions = [{
|
29
|
+
id: 11,
|
30
|
+
format: "headingOne",
|
31
|
+
type: "block",
|
32
|
+
title: /*#__PURE__*/_jsx(Label, {
|
33
|
+
label: "H1",
|
34
|
+
type: "Header"
|
35
|
+
}),
|
36
|
+
label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
|
37
|
+
type: 1
|
38
|
+
}),
|
39
|
+
group: "typography",
|
40
|
+
value: "headingOne"
|
41
|
+
}, {
|
42
|
+
id: 12,
|
43
|
+
format: "headingTwo",
|
44
|
+
type: "block",
|
45
|
+
title: /*#__PURE__*/_jsx(Label, {
|
46
|
+
label: "H2",
|
47
|
+
type: "Header"
|
48
|
+
}),
|
49
|
+
label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
|
50
|
+
type: 2
|
51
|
+
}),
|
52
|
+
group: "typography",
|
53
|
+
value: "headingTwo"
|
54
|
+
}, {
|
55
|
+
id: 13,
|
56
|
+
format: "headingThree",
|
57
|
+
type: "block",
|
58
|
+
title: /*#__PURE__*/_jsx(Label, {
|
59
|
+
label: "H3",
|
60
|
+
type: "Header"
|
61
|
+
}),
|
62
|
+
label: /*#__PURE__*/_jsx(DisplayHeaderLabel, {
|
63
|
+
type: 3
|
64
|
+
}),
|
65
|
+
group: "typography",
|
66
|
+
value: "headingThree"
|
67
|
+
}, {
|
68
|
+
id: 14,
|
69
|
+
format: "fontSize",
|
70
|
+
type: "mark",
|
71
|
+
title: /*#__PURE__*/_jsx(Label, {
|
72
|
+
label: "L",
|
73
|
+
type: "Large"
|
74
|
+
}),
|
75
|
+
label: "L",
|
76
|
+
group: "typography",
|
77
|
+
value: "huge"
|
78
|
+
}, {
|
79
|
+
id: 15,
|
80
|
+
format: "fontSize",
|
81
|
+
type: "mark",
|
82
|
+
title: /*#__PURE__*/_jsx(Label, {
|
83
|
+
label: "M",
|
84
|
+
type: "Medium"
|
85
|
+
}),
|
86
|
+
label: "M",
|
87
|
+
group: "typography",
|
88
|
+
value: "medium"
|
89
|
+
}, {
|
90
|
+
id: 16,
|
91
|
+
format: "fontSize",
|
92
|
+
type: "mark",
|
93
|
+
title: /*#__PURE__*/_jsx(Label, {
|
94
|
+
label: "S",
|
95
|
+
type: "Small"
|
96
|
+
}),
|
97
|
+
label: "S",
|
98
|
+
group: "typography",
|
99
|
+
value: "small"
|
100
|
+
}];
|
205
101
|
function SelectTypography({
|
206
102
|
editor,
|
207
103
|
classes,
|
208
|
-
closeMainPopup
|
209
|
-
type,
|
210
|
-
customProps
|
104
|
+
closeMainPopup
|
211
105
|
}) {
|
212
106
|
const [size] = useWindowResize();
|
213
|
-
const {
|
214
|
-
theme
|
215
|
-
} = useEditorTheme();
|
216
|
-
const {
|
217
|
-
translation
|
218
|
-
} = customProps;
|
219
|
-
const isTextCustomized = theme?.id ? isCustomized(editor) : false;
|
220
|
-
const typographyOptions = getTypographyOptions(isTextCustomized, translation);
|
221
107
|
const updateMarkData = newVal => {
|
222
108
|
const val = activeMark(editor, "fontSize");
|
223
109
|
let upData = {
|
@@ -239,10 +125,7 @@ function SelectTypography({
|
|
239
125
|
...upData
|
240
126
|
}
|
241
127
|
});
|
242
|
-
|
243
|
-
// closeMainPopup();
|
244
128
|
};
|
245
|
-
|
246
129
|
const selectedBlock = useMemo(() => {
|
247
130
|
return typographyOptions.find(t => {
|
248
131
|
if (t.type === "block") {
|
@@ -264,13 +147,15 @@ function SelectTypography({
|
|
264
147
|
});
|
265
148
|
}, [typographyOptions, activeMark, isBlockActive, editor]);
|
266
149
|
const onChange = (format, option) => {
|
150
|
+
// add/reset block elements
|
151
|
+
toggleBlock(editor, format);
|
267
152
|
if (option.type === "block") {
|
268
|
-
|
269
|
-
|
153
|
+
// reset old font size
|
154
|
+
// let updatedValue = !selectedBlock ? {} : { xs: "16px", sm: "16px", md: "16px", lg: "16px" }
|
155
|
+
addMarkData(editor, {
|
156
|
+
format: "fontSize",
|
157
|
+
value: {}
|
270
158
|
});
|
271
|
-
|
272
|
-
// add/reset block elements
|
273
|
-
toggleBlock(editor, format);
|
274
159
|
} else if (option.type === "mark") {
|
275
160
|
const size = sizeMap[option.value] || "";
|
276
161
|
const [sizeInNumber] = size.split("px");
|
@@ -278,35 +163,11 @@ function SelectTypography({
|
|
278
163
|
}
|
279
164
|
closeMainPopup();
|
280
165
|
};
|
281
|
-
const typographyValue = selectedBlock?.value || "headingOne";
|
282
|
-
if (type === "fullWidth") {
|
283
|
-
return /*#__PURE__*/_jsx(Select, {
|
284
|
-
value: typographyValue,
|
285
|
-
className: "editor-dd",
|
286
|
-
onChange: e => {
|
287
|
-
const {
|
288
|
-
value
|
289
|
-
} = e.target;
|
290
|
-
const option = typographyOptions?.find(o => o.value === value);
|
291
|
-
onChange(value, option);
|
292
|
-
},
|
293
|
-
style: {
|
294
|
-
width: "100%",
|
295
|
-
height: "36px",
|
296
|
-
borderRadius: "10px",
|
297
|
-
fontSize: "14px"
|
298
|
-
},
|
299
|
-
children: typographyOptions.map((item, index) => /*#__PURE__*/_jsxs(MenuItem, {
|
300
|
-
value: item.value,
|
301
|
-
children: [item.title, " ", isTextCustomized && item.value === typographyValue ? " *" : ""]
|
302
|
-
}, index))
|
303
|
-
});
|
304
|
-
}
|
305
166
|
return /*#__PURE__*/_jsx(CustomSelectTool, {
|
306
167
|
options: typographyOptions,
|
307
168
|
editor: editor,
|
308
169
|
onChange: onChange,
|
309
|
-
value:
|
170
|
+
value: selectedBlock?.value || "headingOne",
|
310
171
|
classes: classes
|
311
172
|
});
|
312
173
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Fade, Grid, IconButton, Paper, Popper
|
1
|
+
import { Fade, Grid, IconButton, Paper, Popper } from "@mui/material";
|
2
2
|
import SelectTypography from "./SelectTypography";
|
3
3
|
import SelectList from "./SelectList";
|
4
4
|
import { toolbarGroups } from "../../toolbarGroups";
|
@@ -14,7 +14,7 @@ import MiniColorPicker from "./MiniColorPicker";
|
|
14
14
|
import SelectAlignment from "./SelectAlignment";
|
15
15
|
import SelectFontSize from "./SelectFontSize";
|
16
16
|
import InfinityAITool from "./InfinityAITool";
|
17
|
-
import {
|
17
|
+
import { viewSlateSelection } from "../../../utils/helper";
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
19
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
20
20
|
const DEFAULT_COLOR = {
|
@@ -35,12 +35,11 @@ const MiniTextFormat = props => {
|
|
35
35
|
const open = Boolean(anchorEl);
|
36
36
|
const id = open ? "popup-edit-tool" : "";
|
37
37
|
const [size] = useWindowResize();
|
38
|
-
const theme = useTheme();
|
39
38
|
const removeFontStyles = ["superscript", "subscript"];
|
40
39
|
const fontStyle = allTools.filter(f => f.type === "mark" && !removeFontStyles.includes(f.format));
|
41
40
|
const link = allTools.find(f => f.format?.indexOf("link") >= 0);
|
42
41
|
const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
|
43
|
-
const activeColor =
|
42
|
+
const activeColor = activeMark(editor, textColorFormat) || DEFAULT_COLOR[textColorFormat];
|
44
43
|
const activeBg = activeMark(editor, textBgFormat) || DEFAULT_COLOR[textBgFormat];
|
45
44
|
return /*#__PURE__*/_jsx(Grid, {
|
46
45
|
container: true,
|
@@ -57,24 +56,20 @@ const MiniTextFormat = props => {
|
|
57
56
|
}), /*#__PURE__*/_jsx(SelectTypography, {
|
58
57
|
classes: classes,
|
59
58
|
editor: editor,
|
60
|
-
closeMainPopup: closeMainPopup
|
61
|
-
type: "miniToolBar",
|
62
|
-
customProps: customProps
|
59
|
+
closeMainPopup: closeMainPopup
|
63
60
|
}), /*#__PURE__*/_jsx("div", {
|
64
61
|
className: "verticalLine"
|
65
62
|
}), /*#__PURE__*/_jsx(SelectList, {
|
66
63
|
classes: classes,
|
67
64
|
editor: editor,
|
68
|
-
closeMainPopup: closeMainPopup
|
69
|
-
customProps: customProps
|
65
|
+
closeMainPopup: closeMainPopup
|
70
66
|
}), /*#__PURE__*/_jsx("div", {
|
71
67
|
className: "verticalLine mr-1"
|
72
68
|
}), /*#__PURE__*/_jsx(SelectAlignment, {
|
73
69
|
fontAlign: fontAlign,
|
74
70
|
classes: classes,
|
75
71
|
editor: editor,
|
76
|
-
closeMainPopup: closeMainPopup
|
77
|
-
customProps: customProps
|
72
|
+
closeMainPopup: closeMainPopup
|
78
73
|
}), /*#__PURE__*/_jsx("div", {
|
79
74
|
className: "verticalLine mr-1"
|
80
75
|
}), /*#__PURE__*/_jsx(SelectFontSize, {
|
@@ -85,24 +80,20 @@ const MiniTextFormat = props => {
|
|
85
80
|
}), fontStyle?.map((m, i) => {
|
86
81
|
return /*#__PURE__*/_jsx(MarkButton, {
|
87
82
|
editor: editor,
|
88
|
-
...m
|
89
|
-
customProps: customProps
|
83
|
+
...m
|
90
84
|
}, `pptool_mark_${i}_${m.id}`);
|
91
85
|
}), /*#__PURE__*/_jsx(MiniColorPicker, {
|
92
86
|
format: textColorFormat,
|
93
87
|
classes: classes,
|
94
88
|
activeColor: activeColor,
|
95
89
|
id: "11_cc",
|
96
|
-
editor: editor
|
97
|
-
customProps: customProps,
|
98
|
-
type: "textColor"
|
90
|
+
editor: editor
|
99
91
|
}), /*#__PURE__*/_jsx(MiniColorPicker, {
|
100
92
|
format: textBgFormat,
|
101
93
|
classes: classes,
|
102
94
|
activeColor: activeBg,
|
103
95
|
id: "12_cc",
|
104
|
-
editor: editor
|
105
|
-
customProps: customProps
|
96
|
+
editor: editor
|
106
97
|
}), /*#__PURE__*/_jsx("div", {
|
107
98
|
className: "verticalLine ml-1 mr-1"
|
108
99
|
}), /*#__PURE__*/_jsx(LinkButton, {
|
@@ -135,8 +126,7 @@ const MiniTextFormat = props => {
|
|
135
126
|
children: [/*#__PURE__*/_jsx(PopperHeader, {
|
136
127
|
title: "Text Settings",
|
137
128
|
classes: classes,
|
138
|
-
onClose: () => setAnchorEl(null)
|
139
|
-
customProps: customProps
|
129
|
+
onClose: () => setAnchorEl(null)
|
140
130
|
}), /*#__PURE__*/_jsx(TextFormat, {
|
141
131
|
editor: editor,
|
142
132
|
classes: classes,
|
@@ -35,13 +35,9 @@ const PopperHeader = props => {
|
|
35
35
|
fullScreen,
|
36
36
|
toggleFullscreen,
|
37
37
|
search,
|
38
|
-
onSearch
|
39
|
-
customProps
|
38
|
+
onSearch
|
40
39
|
} = props;
|
41
40
|
const [openSearch, setOpenSearch] = useState(false);
|
42
|
-
const {
|
43
|
-
translation
|
44
|
-
} = customProps;
|
45
41
|
const handleSearchButton = () => {
|
46
42
|
setOpenSearch(!openSearch);
|
47
43
|
};
|
@@ -65,7 +61,7 @@ const PopperHeader = props => {
|
|
65
61
|
fontWeight: "700",
|
66
62
|
color: "#000"
|
67
63
|
},
|
68
|
-
children:
|
64
|
+
children: title
|
69
65
|
}), /*#__PURE__*/_jsxs(Grid, {
|
70
66
|
sx: classes.textFormatLabel,
|
71
67
|
justifyContent: "end",
|
@@ -86,7 +82,7 @@ const PopperHeader = props => {
|
|
86
82
|
handleChange: onSearch
|
87
83
|
})]
|
88
84
|
}) : null, needFullscreen ? /*#__PURE__*/_jsx(Tooltip, {
|
89
|
-
title:
|
85
|
+
title: "Toggle Fullscreen",
|
90
86
|
arrow: true,
|
91
87
|
children: /*#__PURE__*/_jsx(IconButton, {
|
92
88
|
style: {
|
@@ -98,7 +94,7 @@ const PopperHeader = props => {
|
|
98
94
|
children: fullScreen ? /*#__PURE__*/_jsx(CloseFullscreenIcon, {}) : /*#__PURE__*/_jsx(ToggleFullScreenIcon, {})
|
99
95
|
})
|
100
96
|
}) : null, /*#__PURE__*/_jsx(Tooltip, {
|
101
|
-
title:
|
97
|
+
title: "Close",
|
102
98
|
arrow: true,
|
103
99
|
children: /*#__PURE__*/_jsx(IconButton, {
|
104
100
|
sx: classes.closeBtn,
|
@@ -130,7 +130,7 @@ const usePopupStyle = theme => ({
|
|
130
130
|
},
|
131
131
|
"& .accordionIcon": {
|
132
132
|
"& p": {
|
133
|
-
textAlign:
|
133
|
+
textAlign: 'left'
|
134
134
|
}
|
135
135
|
}
|
136
136
|
},
|
@@ -416,11 +416,6 @@ const usePopupStyle = theme => ({
|
|
416
416
|
"& .MuiOutlinedInput-notchedOutline": {
|
417
417
|
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important`
|
418
418
|
},
|
419
|
-
"& .MuiInputBase-root": {
|
420
|
-
"& input": {
|
421
|
-
border: "none !important"
|
422
|
-
}
|
423
|
-
},
|
424
419
|
"& svg": {
|
425
420
|
width: "20px",
|
426
421
|
height: "24px"
|
@@ -429,6 +424,9 @@ const usePopupStyle = theme => ({
|
|
429
424
|
fontFamilyListOptions: {
|
430
425
|
"& .MuiAutocomplete-listbox": {
|
431
426
|
padding: "0px",
|
427
|
+
// "&::-webkit-scrollbar-thumb": {
|
428
|
+
// background: `none !important`,
|
429
|
+
// },
|
432
430
|
"&::-webkit-scrollbar-thumb": {
|
433
431
|
background: `${theme?.palette?.editor?.brainPopupScroll} !important`
|
434
432
|
},
|
@@ -439,8 +437,8 @@ const usePopupStyle = theme => ({
|
|
439
437
|
margin: "5px",
|
440
438
|
borderRadius: "8px",
|
441
439
|
color: theme?.palette?.editor?.menuOptionTextColor,
|
442
|
-
fontSize:
|
443
|
-
padding:
|
440
|
+
fontSize: '14px',
|
441
|
+
padding: '8px 12px',
|
444
442
|
'&[aria-selected="true"]': {
|
445
443
|
backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
|
446
444
|
}
|
@@ -539,7 +537,7 @@ const usePopupStyle = theme => ({
|
|
539
537
|
}
|
540
538
|
},
|
541
539
|
alignItems: "flexStart",
|
542
|
-
|
540
|
+
justifyContent: "center",
|
543
541
|
flexDirection: "row",
|
544
542
|
"&:hover": {
|
545
543
|
background: "unset"
|
@@ -788,13 +786,8 @@ const usePopupStyle = theme => ({
|
|
788
786
|
padding: "0px"
|
789
787
|
},
|
790
788
|
defaultBtn: {
|
791
|
-
color: "#
|
792
|
-
textTransform: "none"
|
793
|
-
textDecoration: "underline",
|
794
|
-
"&.Mui-disabled": {
|
795
|
-
color: "#A0AEC0 !important",
|
796
|
-
textDecoration: "none"
|
797
|
-
}
|
789
|
+
color: "#0F172A",
|
790
|
+
textTransform: "none"
|
798
791
|
},
|
799
792
|
templateCardBtnGrp: {
|
800
793
|
display: "none",
|
@@ -6,8 +6,7 @@ const PreviewAndSelect = props => {
|
|
6
6
|
const {
|
7
7
|
classes,
|
8
8
|
data,
|
9
|
-
onSelectTemplate
|
10
|
-
translation
|
9
|
+
onSelectTemplate
|
11
10
|
} = props;
|
12
11
|
return /*#__PURE__*/_jsxs(Box, {
|
13
12
|
className: "template-card-action",
|
@@ -16,12 +15,12 @@ const PreviewAndSelect = props => {
|
|
16
15
|
children: [/*#__PURE__*/_jsx(Button, {
|
17
16
|
className: "blueBtn",
|
18
17
|
onClick: onSelectTemplate(data),
|
19
|
-
children:
|
18
|
+
children: "Select"
|
20
19
|
}), /*#__PURE__*/_jsx(Button, {
|
21
20
|
href: data?.previewLink,
|
22
21
|
target: "_blank",
|
23
22
|
className: "outlineBtn",
|
24
|
-
children:
|
23
|
+
children: "Preview"
|
25
24
|
})]
|
26
25
|
});
|
27
26
|
};
|
@@ -30,12 +29,8 @@ const TemplateCard = props => {
|
|
30
29
|
classes,
|
31
30
|
m,
|
32
31
|
onSelectTemplate,
|
33
|
-
fullScreen
|
34
|
-
customProps
|
32
|
+
fullScreen
|
35
33
|
} = props;
|
36
|
-
const {
|
37
|
-
translation
|
38
|
-
} = customProps;
|
39
34
|
return /*#__PURE__*/_jsx(Grid, {
|
40
35
|
item: true,
|
41
36
|
xs: 4,
|
@@ -58,8 +53,7 @@ const TemplateCard = props => {
|
|
58
53
|
}), /*#__PURE__*/_jsx(PreviewAndSelect, {
|
59
54
|
classes: classes,
|
60
55
|
onSelectTemplate: onSelectTemplate,
|
61
|
-
data: m
|
62
|
-
translation: translation
|
56
|
+
data: m
|
63
57
|
})]
|
64
58
|
}), /*#__PURE__*/_jsx(CardContent, {
|
65
59
|
sx: classes.templateCardTitle,
|