@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
@@ -135,16 +135,14 @@ const AddTemplates = props => {
|
|
135
135
|
classes: classes,
|
136
136
|
onSelectTemplate: onSelectTemplate,
|
137
137
|
m: mapData,
|
138
|
-
fullScreen: fullScreen
|
139
|
-
customProps: customProps
|
138
|
+
fullScreen: fullScreen
|
140
139
|
}, `template_Card_${mapData.id}_popup`);
|
141
140
|
case "Buttons":
|
142
141
|
return /*#__PURE__*/_jsx(ButtonTemplateCard, {
|
143
142
|
classes: classes,
|
144
143
|
onSelectTemplate: onSelectTemplate,
|
145
144
|
m: mapData,
|
146
|
-
fullScreen: fullScreen
|
147
|
-
customProps: customProps
|
145
|
+
fullScreen: fullScreen
|
148
146
|
}, `template_Card_${mapData.id}_popup`);
|
149
147
|
case "Banners":
|
150
148
|
case "Tables":
|
@@ -153,8 +151,7 @@ const AddTemplates = props => {
|
|
153
151
|
onSelectTemplate: onSelectTemplate,
|
154
152
|
m: mapData,
|
155
153
|
fullScreen: fullScreen,
|
156
|
-
height: "smallCard"
|
157
|
-
customProps: customProps
|
154
|
+
height: "smallCard"
|
158
155
|
}, `template_Card_${mapData.id}_popup`);
|
159
156
|
case "404 Page":
|
160
157
|
return /*#__PURE__*/_jsx(FullViewCard, {
|
@@ -162,16 +159,14 @@ const AddTemplates = props => {
|
|
162
159
|
onSelectTemplate: onSelectTemplate,
|
163
160
|
m: mapData,
|
164
161
|
fullScreen: fullScreen,
|
165
|
-
height: "mediumCard"
|
166
|
-
customProps: customProps
|
162
|
+
height: "mediumCard"
|
167
163
|
}, `template_Card_${mapData.id}_popup`);
|
168
164
|
default:
|
169
165
|
return /*#__PURE__*/_jsx(TemplateCard, {
|
170
166
|
classes: classes,
|
171
167
|
onSelectTemplate: onSelectTemplate,
|
172
168
|
m: mapData,
|
173
|
-
fullScreen: fullScreen
|
174
|
-
customProps: customProps
|
169
|
+
fullScreen: fullScreen
|
175
170
|
}, `template_Card_${mapData.id}_popup`);
|
176
171
|
}
|
177
172
|
};
|
@@ -6,8 +6,7 @@ const Select = props => {
|
|
6
6
|
const {
|
7
7
|
classes,
|
8
8
|
data,
|
9
|
-
onSelectTemplate
|
10
|
-
translation
|
9
|
+
onSelectTemplate
|
11
10
|
} = props;
|
12
11
|
return /*#__PURE__*/_jsx(Box, {
|
13
12
|
className: "template-card-action",
|
@@ -20,7 +19,7 @@ const Select = props => {
|
|
20
19
|
children: /*#__PURE__*/_jsx(Button, {
|
21
20
|
className: "blueBtn",
|
22
21
|
onClick: onSelectTemplate(data),
|
23
|
-
children:
|
22
|
+
children: "Select"
|
24
23
|
})
|
25
24
|
});
|
26
25
|
};
|
@@ -28,12 +27,8 @@ const ButtonTemplateCard = props => {
|
|
28
27
|
const {
|
29
28
|
classes,
|
30
29
|
m,
|
31
|
-
onSelectTemplate
|
32
|
-
customProps
|
30
|
+
onSelectTemplate
|
33
31
|
} = props;
|
34
|
-
const {
|
35
|
-
translation
|
36
|
-
} = customProps;
|
37
32
|
return /*#__PURE__*/_jsx(Grid, {
|
38
33
|
item: true,
|
39
34
|
xs: 3,
|
@@ -50,8 +45,7 @@ const ButtonTemplateCard = props => {
|
|
50
45
|
}), /*#__PURE__*/_jsx(Select, {
|
51
46
|
classes: classes,
|
52
47
|
onSelectTemplate: onSelectTemplate,
|
53
|
-
data: m
|
54
|
-
translation: translation
|
48
|
+
data: m
|
55
49
|
})]
|
56
50
|
})
|
57
51
|
})
|
@@ -6,8 +6,7 @@ const Select = props => {
|
|
6
6
|
const {
|
7
7
|
classes,
|
8
8
|
data,
|
9
|
-
onSelectTemplate
|
10
|
-
translation
|
9
|
+
onSelectTemplate
|
11
10
|
} = props;
|
12
11
|
return /*#__PURE__*/_jsx(Box, {
|
13
12
|
className: "template-card-action",
|
@@ -19,7 +18,7 @@ const Select = props => {
|
|
19
18
|
children: /*#__PURE__*/_jsx(Button, {
|
20
19
|
className: "blueBtn",
|
21
20
|
onClick: onSelectTemplate(data),
|
22
|
-
children:
|
21
|
+
children: "Select"
|
23
22
|
})
|
24
23
|
});
|
25
24
|
};
|
@@ -28,12 +27,8 @@ const FullViewCard = props => {
|
|
28
27
|
classes,
|
29
28
|
m,
|
30
29
|
onSelectTemplate,
|
31
|
-
height = 'smallCard'
|
32
|
-
customProps
|
30
|
+
height = 'smallCard'
|
33
31
|
} = props;
|
34
|
-
const {
|
35
|
-
translation
|
36
|
-
} = customProps;
|
37
32
|
return /*#__PURE__*/_jsx(Grid, {
|
38
33
|
item: true,
|
39
34
|
xs: 12,
|
@@ -51,8 +46,7 @@ const FullViewCard = props => {
|
|
51
46
|
}), /*#__PURE__*/_jsx(Select, {
|
52
47
|
classes: classes,
|
53
48
|
onSelectTemplate: onSelectTemplate,
|
54
|
-
data: m
|
55
|
-
translation: translation
|
49
|
+
data: m
|
56
50
|
})]
|
57
51
|
})
|
58
52
|
})
|
@@ -11,14 +11,9 @@ function MiniColorPicker(props) {
|
|
11
11
|
format,
|
12
12
|
classes,
|
13
13
|
id,
|
14
|
-
editor
|
15
|
-
customProps,
|
16
|
-
type
|
14
|
+
editor
|
17
15
|
} = props;
|
18
16
|
const [openColorTool, setOpenColorTool] = useState(null);
|
19
|
-
const {
|
20
|
-
translation
|
21
|
-
} = customProps;
|
22
17
|
return /*#__PURE__*/_jsxs("div", {
|
23
18
|
children: [/*#__PURE__*/_jsxs(Button, {
|
24
19
|
className: "fontColorBtn",
|
@@ -34,13 +29,12 @@ function MiniColorPicker(props) {
|
|
34
29
|
activeMark: activeMark,
|
35
30
|
editor: editor,
|
36
31
|
showHex: false,
|
37
|
-
title:
|
32
|
+
title: "Text Color",
|
38
33
|
id: id,
|
39
34
|
classes: classes,
|
40
35
|
forMiniTool: true,
|
41
36
|
openColorTool: openColorTool,
|
42
|
-
closeColorTool: () => setOpenColorTool(null)
|
43
|
-
type: type
|
37
|
+
closeColorTool: () => setOpenColorTool(null)
|
44
38
|
}, id)]
|
45
39
|
});
|
46
40
|
}
|
@@ -15,52 +15,45 @@ function Label({
|
|
15
15
|
}), " ", label]
|
16
16
|
});
|
17
17
|
}
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}];
|
53
|
-
}
|
18
|
+
const alignmentOptions = [{
|
19
|
+
id: 17,
|
20
|
+
value: "alignLeft",
|
21
|
+
type: "block",
|
22
|
+
title: /*#__PURE__*/_jsx(Label, {
|
23
|
+
icon: "alignLeft",
|
24
|
+
label: "Left Align"
|
25
|
+
}),
|
26
|
+
label: /*#__PURE__*/_jsx(Icon, {
|
27
|
+
icon: "alignLeft"
|
28
|
+
})
|
29
|
+
}, {
|
30
|
+
id: 18,
|
31
|
+
value: "alignCenter",
|
32
|
+
type: "block",
|
33
|
+
title: /*#__PURE__*/_jsx(Label, {
|
34
|
+
icon: "alignCenter",
|
35
|
+
label: "Center Align"
|
36
|
+
}),
|
37
|
+
label: /*#__PURE__*/_jsx(Icon, {
|
38
|
+
icon: "alignCenter"
|
39
|
+
})
|
40
|
+
}, {
|
41
|
+
id: 19,
|
42
|
+
value: "alignRight",
|
43
|
+
type: "block",
|
44
|
+
title: /*#__PURE__*/_jsx(Label, {
|
45
|
+
icon: "alignRight",
|
46
|
+
label: "Right Align"
|
47
|
+
}),
|
48
|
+
label: /*#__PURE__*/_jsx(Icon, {
|
49
|
+
icon: "alignRight"
|
50
|
+
})
|
51
|
+
}];
|
54
52
|
function SelectAlignment({
|
55
53
|
editor,
|
56
54
|
classes,
|
57
|
-
closeMainPopup
|
58
|
-
customProps
|
55
|
+
closeMainPopup
|
59
56
|
}) {
|
60
|
-
const {
|
61
|
-
translation
|
62
|
-
} = customProps;
|
63
|
-
const alignmentOptions = getAlignmentOptions(translation);
|
64
57
|
const selected = useMemo(() => {
|
65
58
|
return alignmentOptions.find(t => isBlockActive(editor, t.value));
|
66
59
|
}, [alignmentOptions, isBlockActive, editor]);
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
2
|
-
import { activeMark, addMarkData } from "../../../utils/SlateUtilityFunctions";
|
2
|
+
import { activeMark, addMarkData, isBlockActive } from "../../../utils/SlateUtilityFunctions";
|
3
3
|
import { Button, IconButton, Popover, TextField } from "@mui/material";
|
4
4
|
import DownArrowIcon from "../../../assets/svg/DownArrowIcon";
|
5
5
|
import useWindowResize from "../../../hooks/useWindowResize";
|
6
|
-
import { BREAKPOINTS_DEVICES, getBreakPointsValue
|
6
|
+
import { BREAKPOINTS_DEVICES, getBreakPointsValue } from "../../../helper/theme";
|
7
|
+
import { headingMap, sizeMap } from "../../../utils/font";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
const fontSizeOptions = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 26, 32, 36, 40, 48, 64, 96, 128];
|
@@ -18,7 +19,7 @@ function SelectFontSize({
|
|
18
19
|
const containerRef = useRef();
|
19
20
|
const [size] = useWindowResize();
|
20
21
|
const val = activeMark(editor, format);
|
21
|
-
const value =
|
22
|
+
const value = getBreakPointsValue(val, size?.device);
|
22
23
|
const timerRef = useRef();
|
23
24
|
const updateMarkData = newVal => {
|
24
25
|
let upData = {
|
@@ -52,7 +53,13 @@ function SelectFontSize({
|
|
52
53
|
};
|
53
54
|
const getSizeVal = () => {
|
54
55
|
try {
|
55
|
-
|
56
|
+
let size = `${value}`?.indexOf("px") >= 0 ? value : sizeMap[value] || value;
|
57
|
+
Object.entries(headingMap).forEach(([format, value]) => {
|
58
|
+
if (isBlockActive(editor, format) && isNaN(parseInt(size))) {
|
59
|
+
size = value;
|
60
|
+
}
|
61
|
+
});
|
62
|
+
return isNaN(parseInt(size)) ? 14 : parseInt(size);
|
56
63
|
} catch (err) {
|
57
64
|
return "";
|
58
65
|
}
|
@@ -90,8 +97,8 @@ function SelectFontSize({
|
|
90
97
|
anchorEl: anchorEl,
|
91
98
|
onClose: () => setAnchorEl(null),
|
92
99
|
anchorOrigin: {
|
93
|
-
vertical:
|
94
|
-
horizontal:
|
100
|
+
vertical: 'bottom',
|
101
|
+
horizontal: 'left'
|
95
102
|
},
|
96
103
|
sx: classes.customSelectPopoverWrapper,
|
97
104
|
children: fontSizeOptions.map((s, i) => {
|
@@ -16,68 +16,61 @@ function Label({
|
|
16
16
|
}), " ", label]
|
17
17
|
});
|
18
18
|
}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}];
|
70
|
-
}
|
19
|
+
const listOptions = [{
|
20
|
+
id: 15,
|
21
|
+
value: "orderedList",
|
22
|
+
type: "block",
|
23
|
+
title: /*#__PURE__*/_jsx(Label, {
|
24
|
+
icon: "orderedList",
|
25
|
+
label: "Ordered List"
|
26
|
+
}),
|
27
|
+
label: /*#__PURE__*/_jsx(Icon, {
|
28
|
+
icon: "orderedList"
|
29
|
+
}),
|
30
|
+
group: "list"
|
31
|
+
}, {
|
32
|
+
id: 16,
|
33
|
+
value: "unorderedList",
|
34
|
+
type: "block",
|
35
|
+
title: /*#__PURE__*/_jsx(Label, {
|
36
|
+
icon: "unorderedList",
|
37
|
+
label: "Bulleted List"
|
38
|
+
}),
|
39
|
+
label: /*#__PURE__*/_jsx(Icon, {
|
40
|
+
icon: "unorderedList"
|
41
|
+
}),
|
42
|
+
group: "list"
|
43
|
+
}, {
|
44
|
+
id: 43,
|
45
|
+
value: "check-list-item",
|
46
|
+
type: "block",
|
47
|
+
title: /*#__PURE__*/_jsx(Label, {
|
48
|
+
icon: "check-list-item",
|
49
|
+
label: "Check List"
|
50
|
+
}),
|
51
|
+
label: /*#__PURE__*/_jsx(Icon, {
|
52
|
+
icon: "check-list-item"
|
53
|
+
}),
|
54
|
+
group: "list"
|
55
|
+
}, {
|
56
|
+
id: 30,
|
57
|
+
value: "accordion",
|
58
|
+
type: "accordion",
|
59
|
+
group: "list",
|
60
|
+
component: "AccordionButton",
|
61
|
+
title: /*#__PURE__*/_jsx(Label, {
|
62
|
+
icon: "accordion",
|
63
|
+
label: "Accordion"
|
64
|
+
}),
|
65
|
+
label: /*#__PURE__*/_jsx(Icon, {
|
66
|
+
icon: "accordion"
|
67
|
+
})
|
68
|
+
}];
|
71
69
|
function SelectList({
|
72
70
|
editor,
|
73
71
|
classes,
|
74
|
-
closeMainPopup
|
75
|
-
customProps
|
72
|
+
closeMainPopup
|
76
73
|
}) {
|
77
|
-
const {
|
78
|
-
translation
|
79
|
-
} = customProps;
|
80
|
-
const listOptions = getListOptions(translation);
|
81
74
|
const selectedList = useMemo(() => {
|
82
75
|
return listOptions.find(t => isBlockActive(editor, t.value));
|
83
76
|
}, [listOptions, isBlockActive, editor]);
|
@@ -13,41 +13,34 @@ function Label({
|
|
13
13
|
}), " ", type]
|
14
14
|
});
|
15
15
|
}
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
title: /*#__PURE__*/_jsx(Label, {
|
22
|
-
label: "X²",
|
23
|
-
type: translation("Superscript")
|
24
|
-
}),
|
16
|
+
const superSubscriptOptions = [{
|
17
|
+
id: 9,
|
18
|
+
format: "superscript",
|
19
|
+
type: "mark",
|
20
|
+
title: /*#__PURE__*/_jsx(Label, {
|
25
21
|
label: "X²",
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
type: "Superscript"
|
23
|
+
}),
|
24
|
+
label: "X²",
|
25
|
+
group: "superSubscript",
|
26
|
+
value: "superscript"
|
27
|
+
}, {
|
28
|
+
id: 10,
|
29
|
+
format: "subscript",
|
30
|
+
type: "mark",
|
31
|
+
title: /*#__PURE__*/_jsx(Label, {
|
36
32
|
label: "X₂",
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
33
|
+
type: "Subscript"
|
34
|
+
}),
|
35
|
+
label: "X₂",
|
36
|
+
group: "superSubscript",
|
37
|
+
value: "subscript"
|
38
|
+
}];
|
41
39
|
function SelectSuperSubscript({
|
42
40
|
editor,
|
43
41
|
classes,
|
44
|
-
closeMainPopup
|
45
|
-
customProps
|
42
|
+
closeMainPopup
|
46
43
|
}) {
|
47
|
-
const {
|
48
|
-
translation
|
49
|
-
} = customProps;
|
50
|
-
const superSubscriptOptions = getSubcriptOptions(translation);
|
51
44
|
const selectedMark = useMemo(() => {
|
52
45
|
return superSubscriptOptions.find(option => activeMark(editor, option.format));
|
53
46
|
}, [editor]);
|