@flozy/editor 9.6.7 → 9.6.9
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 +26 -19
- package/dist/Editor/CommonEditor.js +139 -25
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +11 -7
- package/dist/Editor/Elements/AI/AIInput.js +5 -3
- package/dist/Editor/Elements/AI/CustomSelect.js +9 -5
- package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -2
- package/dist/Editor/Elements/Accordion/Accordion.js +4 -3
- package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +4 -1
- package/dist/Editor/Elements/Accordion/AccordionButton.js +6 -2
- package/dist/Editor/Elements/Accordion/AccordionTitlePopup.js +4 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +6 -2
- package/dist/Editor/Elements/AppHeader/AppHeaderPopup.js +4 -1
- package/dist/Editor/Elements/Attachments/AttachmentsButton.js +4 -1
- package/dist/Editor/Elements/Button/ButtonPopup.js +4 -1
- package/dist/Editor/Elements/Button/ButtonToolIcon.js +6 -2
- package/dist/Editor/Elements/Button/EditorButton.js +31 -18
- package/dist/Editor/Elements/Carousel/Carousel.js +5 -4
- package/dist/Editor/Elements/Carousel/CarouselButton.js +6 -2
- package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -2
- package/dist/Editor/Elements/ChipText/ChipTextPopup.js +4 -1
- package/dist/Editor/Elements/CodeToText/CodeToText.js +5 -4
- package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +6 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +60 -14
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
- package/dist/Editor/Elements/Colorbox/ColorboxButton.js +6 -2
- package/dist/Editor/Elements/DataView/DataView.js +5 -2
- package/dist/Editor/Elements/DataView/DataViewButton.js +6 -2
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -2
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +425 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +21 -6
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +13 -12
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +7 -4
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -5
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +9 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +8 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +6 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +5 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +9 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +15 -12
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +23 -6
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -4
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
- package/dist/Editor/Elements/DataView/Layouts/index.js +3 -1
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +5 -2
- package/dist/Editor/Elements/Divider/Divider.js +5 -3
- package/dist/Editor/Elements/Divider/DividerButton.js +6 -2
- package/dist/Editor/Elements/Divider/DividerPopup.js +3 -2
- package/dist/Editor/Elements/Embed/Embed.js +4 -1
- package/dist/Editor/Elements/Embed/EmbedPopup.js +4 -1
- package/dist/Editor/Elements/Embed/Image.js +16 -11
- package/dist/Editor/Elements/Embed/Video.js +9 -6
- package/dist/Editor/Elements/EmbedScript/Code.js +7 -4
- package/dist/Editor/Elements/EmbedScript/EmbedScript.js +6 -2
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +8 -5
- package/dist/Editor/Elements/Emoji/EmojiButton.js +6 -2
- package/dist/Editor/Elements/Form/FieldPopup.js +4 -1
- package/dist/Editor/Elements/Form/Form.js +12 -9
- package/dist/Editor/Elements/Form/FormButton.js +6 -2
- package/dist/Editor/Elements/Form/FormPopup.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +24 -15
- package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +13 -8
- package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/Styles.js +24 -22
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +4 -2
- package/dist/Editor/Elements/Form/Workflow/index.js +22 -10
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +67 -23
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +31 -6
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +38 -5
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +3 -2
- package/dist/Editor/Elements/FreeGrid/Options/More.js +10 -4
- package/dist/Editor/Elements/FreeGrid/styles.js +3 -0
- package/dist/Editor/Elements/Grid/Grid.js +13 -10
- package/dist/Editor/Elements/Grid/GridButton.js +9 -5
- package/dist/Editor/Elements/Grid/GridItem.js +14 -8
- package/dist/Editor/Elements/Grid/GridItemPopup.js +4 -1
- package/dist/Editor/Elements/Grid/GridPopup.js +4 -1
- package/dist/Editor/Elements/Grid/SectionPopup.js +4 -1
- package/dist/Editor/Elements/Link/Link.js +8 -5
- package/dist/Editor/Elements/Link/LinkButton.js +4 -1
- package/dist/Editor/Elements/List/CheckList.js +14 -9
- package/dist/Editor/Elements/NewLine/NewLineButton.js +6 -2
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -1
- package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
- package/dist/Editor/Elements/Search/SearchButton.js +7 -4
- package/dist/Editor/Elements/Search/SearchList.js +7 -3
- package/dist/Editor/Elements/Signature/SignatureButton.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +6 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +4 -1
- package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -16
- package/dist/Editor/Elements/SimpleText/index.js +5 -4
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +4 -2
- package/dist/Editor/Elements/Table/Table.js +24 -12
- package/dist/Editor/Elements/Table/TablePopup.js +4 -1
- package/dist/Editor/Elements/Table/TableSelector.js +10 -6
- package/dist/Editor/Elements/Table/TableTool.js +8 -4
- package/dist/Editor/Elements/Title/title.js +15 -2
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +4 -1
- package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
- package/dist/Editor/MiniEditor.js +10 -3
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/Basic/index.js +2 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +6 -2
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +8 -4
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +17 -5
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +10 -5
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +10 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +9 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +42 -35
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +58 -51
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +29 -22
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +226 -87
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +20 -10
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +10 -5
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +71 -11
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +122 -42
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +436 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +17 -1
- package/dist/Editor/Toolbar/Toolbar.js +20 -10
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
- package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
- package/dist/Editor/common/ColorPickerButton.js +39 -14
- package/dist/Editor/common/CustomColorPicker/index.js +131 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog/index.js +8 -10
- package/dist/Editor/common/CustomDialog2/index.js +94 -0
- package/dist/Editor/common/CustomDialog2/style.js +67 -0
- package/dist/Editor/common/CustomSelect.js +43 -0
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
- package/dist/Editor/common/Icon.js +28 -0
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/LinkSettings/NavComponents.js +14 -10
- package/dist/Editor/common/LinkSettings/index.js +20 -14
- package/dist/Editor/common/LinkSettings/navOptions.js +1 -1
- package/dist/Editor/common/MentionsPopup/index.js +6 -2
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +22 -22
- package/dist/Editor/common/RnD/ContextMenu/index.js +3 -2
- package/dist/Editor/common/RnD/ElementOptions/index.js +7 -2
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +8 -3
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +7 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +7 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +6 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
- package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
- package/dist/Editor/common/RnD/ShadowElement.js +2 -1
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +11 -4
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +55 -8
- package/dist/Editor/common/RnD/Utils/index.js +3 -0
- package/dist/Editor/common/RnD/VirtualElement/BoxHeaderAutoAlignment.js +43 -0
- package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +44 -0
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +134 -0
- package/dist/Editor/common/RnD/VirtualElement/helper.js +375 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +187 -103
- package/dist/Editor/common/RnD/VirtualElement/styles.js +151 -7
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
- package/dist/Editor/common/RnD/index.js +64 -13
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +74 -3
- package/dist/Editor/common/SnackBar/index.js +43 -0
- 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 +6 -4
- 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 +13 -9
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +11 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +19 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +22 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +6 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +27 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +43 -14
- package/dist/Editor/common/StyleBuilder/fieldTypes/elementSize.js +10 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +19 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/gridSize.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +5 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +9 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/metaDataMapping.js +8 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +12 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textAlign.js +6 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +21 -12
- 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 +8 -5
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
- package/dist/Editor/common/Uploader.js +16 -5
- package/dist/Editor/commonStyle.js +68 -57
- package/dist/Editor/helper/index.js +27 -3
- package/dist/Editor/helper/textIndeces.js +58 -0
- package/dist/Editor/helper/theme.js +202 -2
- package/dist/Editor/hooks/useAutoScroll.js +38 -0
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +9 -3
- package/dist/Editor/hooks/useThemeValues.js +63 -0
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +10 -7
- package/dist/Editor/plugins/withLayout.js +3 -2
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +50 -173
- package/dist/Editor/theme/index.js +149 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
- package/dist/Editor/themeSettings/buttons/index.js +290 -0
- package/dist/Editor/themeSettings/buttons/style.js +23 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
- package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
- package/dist/Editor/themeSettings/fonts/index.js +240 -0
- package/dist/Editor/themeSettings/fonts/style.js +61 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +351 -0
- package/dist/Editor/themeSettings/style.js +220 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +355 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +205 -0
- package/dist/Editor/themeSettingsAI/style.js +259 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +202 -61
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/freegrid.js +3 -3
- package/dist/Editor/utils/helper.js +92 -21
- package/package.json +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from "react";
|
1
|
+
import React, { useMemo } from "react";
|
2
2
|
import { Transforms, Node, Path } from "slate";
|
3
3
|
import { useSlateStatic } from "slate-react";
|
4
4
|
import { ReactEditor } from "slate-react";
|
@@ -26,7 +26,8 @@ const FreeGridBox = props => {
|
|
26
26
|
const path = ReactEditor.findPath(editor, element);
|
27
27
|
const {
|
28
28
|
readOnly,
|
29
|
-
hideTools
|
29
|
+
hideTools,
|
30
|
+
translation
|
30
31
|
} = customProps;
|
31
32
|
const {
|
32
33
|
updated_at,
|
@@ -36,7 +37,12 @@ const FreeGridBox = props => {
|
|
36
37
|
sectionBorderRadius,
|
37
38
|
borderWidth,
|
38
39
|
borderColor,
|
39
|
-
borderStyle
|
40
|
+
borderStyle,
|
41
|
+
height_xs,
|
42
|
+
marginTop_xs,
|
43
|
+
gridArea_xs,
|
44
|
+
width_xs,
|
45
|
+
left_xs
|
40
46
|
} = element;
|
41
47
|
// get values based on breakpoint size
|
42
48
|
const {
|
@@ -50,7 +56,8 @@ const FreeGridBox = props => {
|
|
50
56
|
const {
|
51
57
|
setSelectedElement
|
52
58
|
} = useEditorContext();
|
53
|
-
|
59
|
+
let arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
|
60
|
+
arrangeIndex = Math.max(1, arrangeIndex);
|
54
61
|
const onChangeSettings = () => {};
|
55
62
|
const onChange = data => {
|
56
63
|
let updateData = {
|
@@ -150,9 +157,12 @@ const FreeGridBox = props => {
|
|
150
157
|
};
|
151
158
|
const repeatTimes = Math.floor(height / ROW_HEIGHT);
|
152
159
|
const sectionTypeOptions = (itemOptions?.box || []).filter(f => (hideTools || []).indexOf(f) === -1);
|
160
|
+
const isBoxHeader = useMemo(() => {
|
161
|
+
return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
|
162
|
+
}, [element]);
|
153
163
|
return /*#__PURE__*/_jsx(RnD, {
|
154
164
|
id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
|
155
|
-
className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
|
165
|
+
className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
|
156
166
|
editor: editor,
|
157
167
|
path: path,
|
158
168
|
actions: sectionTypeOptions,
|
@@ -167,12 +177,23 @@ const FreeGridBox = props => {
|
|
167
177
|
"--gridArea": `${gridArea}`,
|
168
178
|
"--width": `${width}px`,
|
169
179
|
"--height": `${height}px`,
|
170
|
-
"--zIndex": 100 + arrangeIndex
|
180
|
+
"--zIndex": 100 + arrangeIndex,
|
181
|
+
"--height_xs": height_xs ? `${height_xs}px` : "auto",
|
182
|
+
"--marginTop_xs": marginTop_xs ? `${marginTop_xs}px` : "24px"
|
183
|
+
// "--gridArea_xs": gridArea_xs ? gridArea_xs : "unset",
|
171
184
|
},
|
185
|
+
|
172
186
|
defaultStyle: {
|
173
187
|
height: `${height}px`,
|
174
188
|
width: `${width}px`
|
175
189
|
},
|
190
|
+
dataSets: {
|
191
|
+
"data-grid-area-xs": gridArea_xs,
|
192
|
+
"data-margin-top-xs": marginTop_xs,
|
193
|
+
"data-height-xs": height_xs,
|
194
|
+
"data-width-xs": width_xs,
|
195
|
+
"data-left-xs": left_xs
|
196
|
+
},
|
176
197
|
gridArea: gridArea,
|
177
198
|
onChange: onChange,
|
178
199
|
delta: {
|
@@ -188,6 +209,10 @@ const FreeGridBox = props => {
|
|
188
209
|
left: left || 0
|
189
210
|
},
|
190
211
|
type: "parent-container",
|
212
|
+
customProps: customProps,
|
213
|
+
translation: translation,
|
214
|
+
breakpoint: breakpoint,
|
215
|
+
isBoxHeader: isBoxHeader,
|
191
216
|
children: /*#__PURE__*/_jsx(Box, {
|
192
217
|
component: "div",
|
193
218
|
...attributes,
|
@@ -6,13 +6,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const FreeGridButton = props => {
|
7
7
|
const {
|
8
8
|
editor,
|
9
|
-
icoBtnType
|
9
|
+
icoBtnType,
|
10
|
+
customProps
|
10
11
|
} = props;
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
11
15
|
const onButtonClick = () => {
|
12
16
|
insertFreeGrid(editor);
|
13
17
|
};
|
14
18
|
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
15
|
-
title: "Free Grid",
|
19
|
+
title: translation("Free Grid"),
|
16
20
|
onClick: onButtonClick,
|
17
21
|
icon: /*#__PURE__*/_jsx(Icon, {
|
18
22
|
icon: "freegrid"
|
@@ -29,12 +29,18 @@ const FreeGridItem = props => {
|
|
29
29
|
const path = ReactEditor.findPath(editor, element);
|
30
30
|
const {
|
31
31
|
readOnly,
|
32
|
-
hideTools
|
32
|
+
hideTools,
|
33
|
+
translation
|
33
34
|
} = customProps;
|
34
35
|
const {
|
35
36
|
updated_at,
|
36
37
|
childType,
|
37
|
-
zIndex
|
38
|
+
zIndex,
|
39
|
+
height_xs,
|
40
|
+
width_xs,
|
41
|
+
marginTop_xs,
|
42
|
+
gridArea_xs,
|
43
|
+
left_xs
|
38
44
|
} = element;
|
39
45
|
// get values based on breakpoint size
|
40
46
|
const {
|
@@ -49,9 +55,13 @@ const FreeGridItem = props => {
|
|
49
55
|
setSelectedElement,
|
50
56
|
selectedElement
|
51
57
|
} = useEditorContext();
|
52
|
-
|
58
|
+
let arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
|
59
|
+
arrangeIndex = Math.max(1, arrangeIndex);
|
53
60
|
const [popup, setPopup] = useState(null);
|
54
61
|
const onChangeSettings = () => {};
|
62
|
+
// const refInput = useRef();
|
63
|
+
// const [virtualHeight, setVirtualHeight] = useState(height || 0);
|
64
|
+
|
55
65
|
const onChange = data => {
|
56
66
|
let updateData = {
|
57
67
|
...data
|
@@ -107,6 +117,13 @@ const FreeGridItem = props => {
|
|
107
117
|
Transforms.removeNodes(editor, {
|
108
118
|
at: path
|
109
119
|
});
|
120
|
+
const parentPath = Path.parent(path);
|
121
|
+
Transforms.setNodes(editor, {
|
122
|
+
xs_updatedOn: null,
|
123
|
+
updated_at: new Date().getTime()
|
124
|
+
}, {
|
125
|
+
at: parentPath
|
126
|
+
});
|
110
127
|
} catch (err) {
|
111
128
|
console.log(err);
|
112
129
|
}
|
@@ -252,7 +269,19 @@ const FreeGridItem = props => {
|
|
252
269
|
"--gridArea": `${gridArea}`,
|
253
270
|
"--width": `${width}px`,
|
254
271
|
"--height": `${height}px`,
|
255
|
-
"--zIndex": 100 + arrangeIndex
|
272
|
+
"--zIndex": 100 + arrangeIndex,
|
273
|
+
"--height_xs": height_xs ? `${height_xs}px` : "auto",
|
274
|
+
"--width_xs": width_xs ? `${width_xs}px` : "auto",
|
275
|
+
"--marginTop_xs": marginTop_xs ? `${marginTop_xs}px` : "0px"
|
276
|
+
// "--gridArea_xs": gridArea_xs ? gridArea_xs : "unset",
|
277
|
+
},
|
278
|
+
|
279
|
+
dataSets: {
|
280
|
+
"data-grid-area-xs": gridArea_xs,
|
281
|
+
"data-margin-top-xs": marginTop_xs,
|
282
|
+
"data-height-xs": height_xs,
|
283
|
+
"data-width-xs": width_xs,
|
284
|
+
"data-left-xs": left_xs
|
256
285
|
},
|
257
286
|
defaultStyle: {
|
258
287
|
height: `${height}px`,
|
@@ -273,6 +302,9 @@ const FreeGridItem = props => {
|
|
273
302
|
itemData: {
|
274
303
|
left: left || 0
|
275
304
|
},
|
305
|
+
customProps: customProps,
|
306
|
+
translation: translation,
|
307
|
+
breakpoint: breakpoint,
|
276
308
|
children: /*#__PURE__*/_jsxs(Box, {
|
277
309
|
component: "div",
|
278
310
|
...attributes,
|
@@ -282,7 +314,8 @@ const FreeGridItem = props => {
|
|
282
314
|
element: element,
|
283
315
|
customWorkflowElement: element?.children?.[0] || null,
|
284
316
|
closeWorkflow: onClose,
|
285
|
-
onSave: onWorkflowSave
|
317
|
+
onSave: onWorkflowSave,
|
318
|
+
customProps: customProps
|
286
319
|
}) : null, popup === "embedScript" ? /*#__PURE__*/_jsx(EmbedScriptPopup, {
|
287
320
|
open: popup === "embedScript",
|
288
321
|
customProps: customProps,
|
@@ -51,7 +51,8 @@ const FREE_GRID_ELEMENTS = [{
|
|
51
51
|
const AddElement = props => {
|
52
52
|
const {
|
53
53
|
handleClick,
|
54
|
-
hideTools
|
54
|
+
hideTools,
|
55
|
+
translation
|
55
56
|
} = props;
|
56
57
|
const ADD_ELEMENTS = FREE_GRID_ELEMENTS.filter(f => (hideTools || []).indexOf(f.actionType) === -1);
|
57
58
|
return /*#__PURE__*/_jsx(Box, {
|
@@ -70,7 +71,7 @@ const AddElement = props => {
|
|
70
71
|
icon: m.icon
|
71
72
|
})
|
72
73
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
73
|
-
children: m.label
|
74
|
+
children: translation?.translation(m.label)
|
74
75
|
})]
|
75
76
|
}, m.actionType);
|
76
77
|
})
|
@@ -4,7 +4,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
5
|
const More = props => {
|
6
6
|
const {
|
7
|
-
handleClick
|
7
|
+
handleClick,
|
8
|
+
translation,
|
9
|
+
breakpoint
|
8
10
|
} = props;
|
9
11
|
return /*#__PURE__*/_jsx(Box, {
|
10
12
|
children: /*#__PURE__*/_jsxs(List, {
|
@@ -12,12 +14,16 @@ const More = props => {
|
|
12
14
|
children: [/*#__PURE__*/_jsx(ListItemButton, {
|
13
15
|
className: "item-wrapper",
|
14
16
|
onClick: handleClick("addSection"),
|
15
|
-
children: "Add Section"
|
17
|
+
children: translation?.translation("Add Section")
|
16
18
|
}), /*#__PURE__*/_jsx(ListItemButton, {
|
17
19
|
className: "item-wrapper",
|
18
20
|
onClick: handleClick("duplicateSection"),
|
19
|
-
children: "Duplicate Section"
|
20
|
-
}), /*#__PURE__*/_jsx(ListItemButton, {
|
21
|
+
children: translation?.translation("Duplicate Section")
|
22
|
+
}), breakpoint === "xs" ? /*#__PURE__*/_jsx(ListItemButton, {
|
23
|
+
className: "item-wrapper",
|
24
|
+
onClick: handleClick("forceAutoAlignment"),
|
25
|
+
children: "Force Auto Alignment"
|
26
|
+
}) : null, /*#__PURE__*/_jsx(ListItemButton, {
|
21
27
|
className: "item-wrapper",
|
22
28
|
onClick: handleClick("deleteSection"),
|
23
29
|
children: "Delete Section"
|
@@ -32,7 +32,8 @@ const GridToolBar = ({
|
|
32
32
|
onAddSection,
|
33
33
|
onMoveSection,
|
34
34
|
path,
|
35
|
-
isSectionFullWidth
|
35
|
+
isSectionFullWidth,
|
36
|
+
translation
|
36
37
|
}) => {
|
37
38
|
return selected && !showTool ? /*#__PURE__*/_jsxs("div", {
|
38
39
|
className: "grid-container-toolbar",
|
@@ -42,21 +43,21 @@ const GridToolBar = ({
|
|
42
43
|
top: "4px"
|
43
44
|
} : {},
|
44
45
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
45
|
-
title: "Grid Settings",
|
46
|
+
title: translation("Grid Settings"),
|
46
47
|
arrow: true,
|
47
48
|
children: /*#__PURE__*/_jsx(IconButton, {
|
48
49
|
onClick: onSettings,
|
49
50
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
50
51
|
})
|
51
52
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
52
|
-
title: "Add Grid Item",
|
53
|
+
title: translation("Add Grid Item"),
|
53
54
|
arrow: true,
|
54
55
|
children: /*#__PURE__*/_jsx(IconButton, {
|
55
56
|
onClick: onAddGridItem,
|
56
57
|
children: /*#__PURE__*/_jsx(GridAddGridIcon, {})
|
57
58
|
})
|
58
59
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
59
|
-
title: "Duplicate",
|
60
|
+
title: translation("Duplicate"),
|
60
61
|
arrow: true,
|
61
62
|
children: /*#__PURE__*/_jsx(IconButton, {
|
62
63
|
onClick: onAddSection(),
|
@@ -64,14 +65,14 @@ const GridToolBar = ({
|
|
64
65
|
})
|
65
66
|
}), path.length === 2 ? /*#__PURE__*/_jsxs(_Fragment, {
|
66
67
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
67
|
-
title: "Move Up",
|
68
|
+
title: translation("Move Up"),
|
68
69
|
arrow: true,
|
69
70
|
children: /*#__PURE__*/_jsx(IconButton, {
|
70
71
|
onClick: onMoveSection("up"),
|
71
72
|
children: /*#__PURE__*/_jsx(ArrowUpwardIcon, {})
|
72
73
|
})
|
73
74
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
74
|
-
title: "Move Down",
|
75
|
+
title: translation("Move Down"),
|
75
76
|
arrow: true,
|
76
77
|
children: /*#__PURE__*/_jsx(IconButton, {
|
77
78
|
onClick: onMoveSection("down"),
|
@@ -102,7 +103,8 @@ const Grid = props => {
|
|
102
103
|
customProps
|
103
104
|
} = props;
|
104
105
|
const {
|
105
|
-
readOnly
|
106
|
+
readOnly,
|
107
|
+
translation
|
106
108
|
} = customProps;
|
107
109
|
const [openSetttings, setOpenSettings] = useState(false);
|
108
110
|
const {
|
@@ -268,7 +270,7 @@ const Grid = props => {
|
|
268
270
|
contentEditable: false,
|
269
271
|
className: "element-selector-ctrl tc",
|
270
272
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
271
|
-
title: "Add Space above",
|
273
|
+
title: translation("Add Space above"),
|
272
274
|
arrow: true,
|
273
275
|
children: /*#__PURE__*/_jsx(IconButton, {
|
274
276
|
onClick: onNewLine("up"),
|
@@ -279,7 +281,7 @@ const Grid = props => {
|
|
279
281
|
contentEditable: false,
|
280
282
|
className: "element-selector-ctrl bc",
|
281
283
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
282
|
-
title: "Add Space below",
|
284
|
+
title: translation("Add Space below"),
|
283
285
|
arrow: true,
|
284
286
|
children: /*#__PURE__*/_jsx(IconButton, {
|
285
287
|
onClick: onNewLine("down"),
|
@@ -364,7 +366,8 @@ const Grid = props => {
|
|
364
366
|
onAddSection: onAddSection,
|
365
367
|
onMoveSection: onMoveSection,
|
366
368
|
path: path,
|
367
|
-
isSectionFullWidth: isSectionFullWidth
|
369
|
+
isSectionFullWidth: isSectionFullWidth,
|
370
|
+
translation: translation
|
368
371
|
})]
|
369
372
|
}), openSetttings ? /*#__PURE__*/_jsx(PoupComp, {
|
370
373
|
element: element,
|
@@ -11,9 +11,13 @@ const GridButton = props => {
|
|
11
11
|
const classes = GridStyles();
|
12
12
|
const {
|
13
13
|
editor,
|
14
|
-
icoBtnType
|
14
|
+
icoBtnType,
|
15
|
+
customProps
|
15
16
|
} = props;
|
16
17
|
const [open, setOpen] = useState(false);
|
18
|
+
const {
|
19
|
+
translation
|
20
|
+
} = customProps;
|
17
21
|
const onButtonClick = async () => {
|
18
22
|
insertGrid(editor, insertPlainGrid(2));
|
19
23
|
handleClose();
|
@@ -44,7 +48,7 @@ const GridButton = props => {
|
|
44
48
|
|
45
49
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
46
50
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
47
|
-
title: "Column",
|
51
|
+
title: translation("Column"),
|
48
52
|
onClick: onButtonClick,
|
49
53
|
icon: /*#__PURE__*/_jsx(GridElement, {}),
|
50
54
|
icoBtnType: icoBtnType
|
@@ -58,14 +62,14 @@ const GridButton = props => {
|
|
58
62
|
children: [/*#__PURE__*/_jsx(Grid, {
|
59
63
|
item: true,
|
60
64
|
xs: 6,
|
61
|
-
children: "Grid"
|
65
|
+
children: translation("Grid")
|
62
66
|
}), /*#__PURE__*/_jsx(Grid, {
|
63
67
|
item: true,
|
64
68
|
xs: 6,
|
65
69
|
textAlign: "right",
|
66
70
|
children: /*#__PURE__*/_jsx(Button, {
|
67
71
|
onClick: handleInsertGrid(null),
|
68
|
-
children: "
|
72
|
+
children: translation("insertDefaultTemplate")
|
69
73
|
})
|
70
74
|
})]
|
71
75
|
})
|
@@ -90,7 +94,7 @@ const GridButton = props => {
|
|
90
94
|
display: "flex"
|
91
95
|
},
|
92
96
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
93
|
-
title:
|
97
|
+
title: `${translation("Insert")} ${m} ${translation("Column Grid")}`,
|
94
98
|
arrow: true,
|
95
99
|
children: /*#__PURE__*/_jsx(Button, {
|
96
100
|
sx: classes.gridButton,
|
@@ -43,8 +43,12 @@ const GridItemToolbar = props => {
|
|
43
43
|
showTool,
|
44
44
|
onSettings,
|
45
45
|
onAddColumn,
|
46
|
-
columnRef
|
46
|
+
columnRef,
|
47
|
+
customProps
|
47
48
|
} = props;
|
49
|
+
const {
|
50
|
+
translation
|
51
|
+
} = customProps;
|
48
52
|
return selected && !showTool ? /*#__PURE__*/_jsx(Popper, {
|
49
53
|
anchorEl: columnRef?.current,
|
50
54
|
open: true,
|
@@ -55,7 +59,7 @@ const GridItemToolbar = props => {
|
|
55
59
|
children: /*#__PURE__*/_jsxs(Box, {
|
56
60
|
className: "ico-grp-ss",
|
57
61
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
58
|
-
title: "Column Settings",
|
62
|
+
title: translation("Column Settings"),
|
59
63
|
arrow: true,
|
60
64
|
children: /*#__PURE__*/_jsx(IconButton, {
|
61
65
|
size: "small",
|
@@ -64,7 +68,7 @@ const GridItemToolbar = props => {
|
|
64
68
|
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
65
69
|
})
|
66
70
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
67
|
-
title: "Add Column",
|
71
|
+
title: translation("Add Column"),
|
68
72
|
arrow: true,
|
69
73
|
children: /*#__PURE__*/_jsx(IconButton, {
|
70
74
|
size: "small",
|
@@ -98,7 +102,8 @@ const GridItem = props => {
|
|
98
102
|
customProps
|
99
103
|
} = props;
|
100
104
|
const {
|
101
|
-
readOnly
|
105
|
+
readOnly,
|
106
|
+
translation
|
102
107
|
} = customProps;
|
103
108
|
const [openSetttings, setOpenSettings] = useState(false);
|
104
109
|
const {
|
@@ -287,7 +292,7 @@ const GridItem = props => {
|
|
287
292
|
...getBRProps,
|
288
293
|
display: "flex",
|
289
294
|
flexDirection: flexDirection || "column",
|
290
|
-
background: bgColor
|
295
|
+
background: bgColor,
|
291
296
|
borderColor: getBorderColor(),
|
292
297
|
borderWidth: borderWidth || "1px",
|
293
298
|
borderStyle: borderStyle || "solid",
|
@@ -325,7 +330,8 @@ const GridItem = props => {
|
|
325
330
|
showTool: showTool,
|
326
331
|
onSettings: onSettings,
|
327
332
|
onAddColumn: onAddColumn,
|
328
|
-
columnRef: columnRef
|
333
|
+
columnRef: columnRef,
|
334
|
+
customProps: customProps
|
329
335
|
})]
|
330
336
|
}), /*#__PURE__*/_jsx(Box, {
|
331
337
|
ref: columnRef,
|
@@ -344,7 +350,7 @@ const GridItem = props => {
|
|
344
350
|
borderColor: borderColorHover || borderColor || "transparent"
|
345
351
|
}
|
346
352
|
},
|
347
|
-
placeholder: "Column",
|
353
|
+
placeholder: translation("Column"),
|
348
354
|
"data-info": "handle-outside-editor-click",
|
349
355
|
children: children
|
350
356
|
}), openSetttings ? /*#__PURE__*/_jsx(GridItemPopup, {
|
@@ -368,7 +374,7 @@ const GridItem = props => {
|
|
368
374
|
children: /*#__PURE__*/_jsx(Button, {
|
369
375
|
variant: "contained",
|
370
376
|
onClick: handleClose,
|
371
|
-
children: "Close"
|
377
|
+
children: translation("Close")
|
372
378
|
})
|
373
379
|
})]
|
374
380
|
})]
|
@@ -10,8 +10,11 @@ const GridItemPopup = props => {
|
|
10
10
|
onDelete,
|
11
11
|
customProps
|
12
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
13
16
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
14
|
-
title: "Grid Item",
|
17
|
+
title: translation("Grid Item"),
|
15
18
|
type: "gridItemStyle",
|
16
19
|
element: element,
|
17
20
|
onSave: onSave,
|
@@ -10,8 +10,11 @@ const GridPopup = props => {
|
|
10
10
|
onDelete,
|
11
11
|
customProps
|
12
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
13
16
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
14
|
-
title: "Grid",
|
17
|
+
title: translation("Grid"),
|
15
18
|
type: "gridStyle",
|
16
19
|
element: element,
|
17
20
|
onSave: onSave,
|
@@ -10,8 +10,11 @@ const SectionPopup = props => {
|
|
10
10
|
onDelete,
|
11
11
|
customProps
|
12
12
|
} = props;
|
13
|
+
const {
|
14
|
+
translation
|
15
|
+
} = customProps;
|
13
16
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
14
|
-
title: "Section",
|
17
|
+
title: translation("Section"),
|
15
18
|
type: "sectionStyle",
|
16
19
|
element: element,
|
17
20
|
onSave: onSave,
|
@@ -19,7 +19,8 @@ const Toolbar = props => {
|
|
19
19
|
selected,
|
20
20
|
linkRef,
|
21
21
|
onEditLink,
|
22
|
-
editor
|
22
|
+
editor,
|
23
|
+
translation
|
23
24
|
} = props;
|
24
25
|
const btnProps = handleLinkType(urlPath, linkType, true, showInNewTab === "_blank");
|
25
26
|
const navType = getLinkType(linkType, urlPath);
|
@@ -56,13 +57,13 @@ const Toolbar = props => {
|
|
56
57
|
children: /*#__PURE__*/_jsx(OpenInNewIcon, {})
|
57
58
|
})
|
58
59
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
59
|
-
title: "Edit",
|
60
|
+
title: translation("Edit"),
|
60
61
|
children: /*#__PURE__*/_jsx(IconButton, {
|
61
62
|
onClick: onEditLink,
|
62
63
|
children: /*#__PURE__*/_jsx(EditIcon, {})
|
63
64
|
})
|
64
65
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
65
|
-
title: "Remove",
|
66
|
+
title: translation("Remove"),
|
66
67
|
children: /*#__PURE__*/_jsx(IconButton, {
|
67
68
|
onClick: () => removeLink(editor),
|
68
69
|
children: /*#__PURE__*/_jsx(LinkOffIcon, {})
|
@@ -96,7 +97,8 @@ const Link = props => {
|
|
96
97
|
customProps
|
97
98
|
} = props;
|
98
99
|
const {
|
99
|
-
readOnly
|
100
|
+
readOnly,
|
101
|
+
translation
|
100
102
|
} = customProps;
|
101
103
|
const editor = useSlateStatic();
|
102
104
|
const selected = useSelected();
|
@@ -154,7 +156,8 @@ const Link = props => {
|
|
154
156
|
selected: selected,
|
155
157
|
linkRef: linkRef,
|
156
158
|
onEditLink: onEditLink,
|
157
|
-
editor: editor
|
159
|
+
editor: editor,
|
160
|
+
translation: translation
|
158
161
|
}), showInput ? /*#__PURE__*/_jsx(LinkSettings, {
|
159
162
|
handleClose: handleClose,
|
160
163
|
onSave: ({
|
@@ -26,6 +26,9 @@ const LinkButton = props => {
|
|
26
26
|
isActive,
|
27
27
|
props: blockProps
|
28
28
|
} = getBlockActive(editor, "link");
|
29
|
+
const {
|
30
|
+
translation
|
31
|
+
} = customProps;
|
29
32
|
const urlPath = blockProps?.url || blockProps?.href;
|
30
33
|
const showInNewTab = blockProps?.showInNewTab || blockProps?.target;
|
31
34
|
const {
|
@@ -61,7 +64,7 @@ const LinkButton = props => {
|
|
61
64
|
ref: linkInputRef,
|
62
65
|
className: "popup-wrapper1",
|
63
66
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
64
|
-
title: "Link",
|
67
|
+
title: translation("Link"),
|
65
68
|
arrow: true,
|
66
69
|
children: /*#__PURE__*/_jsx(IconButton, {
|
67
70
|
className: `${showInput ? "clicked btnActive" : ""} ${isActive ? "btnActive" : ""}`,
|
@@ -7,14 +7,19 @@ import CheckListStyle from "./CheckListStyles";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
9
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
10
|
-
const CheckList =
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
const CheckList = props => {
|
11
|
+
const {
|
12
|
+
attributes,
|
13
|
+
children,
|
14
|
+
element,
|
15
|
+
isEmpty,
|
16
|
+
className,
|
17
|
+
style,
|
18
|
+
customProps
|
19
|
+
} = props;
|
20
|
+
const {
|
21
|
+
translation
|
22
|
+
} = customProps;
|
18
23
|
const editor = useSlateStatic();
|
19
24
|
const readOnly = useReadOnly();
|
20
25
|
const classes = CheckListStyle();
|
@@ -73,7 +78,7 @@ const CheckList = ({
|
|
73
78
|
width: '90%'
|
74
79
|
},
|
75
80
|
className: `checkbox-list content-editable ${isEmpty ? "empty" : ""}`,
|
76
|
-
placeholder: nestedCheckList ? "" : "Todo List",
|
81
|
+
placeholder: nestedCheckList ? "" : translation("Todo List"),
|
77
82
|
children: children
|
78
83
|
})]
|
79
84
|
})
|
@@ -5,9 +5,13 @@ import ToolbarIcon from "../../common/ToolbarIcon";
|
|
5
5
|
import { NewLineElementIcon } from "../../common/iconListV2";
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
7
|
const NewLineButton = ({
|
8
|
-
icoBtnType
|
8
|
+
icoBtnType,
|
9
|
+
customProps
|
9
10
|
}) => {
|
10
11
|
const editor = useSlateStatic();
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
11
15
|
const onAddNewLine = () => {
|
12
16
|
Transforms.insertNodes(editor, [{
|
13
17
|
type: "paragraph",
|
@@ -21,7 +25,7 @@ const NewLineButton = ({
|
|
21
25
|
ReactEditor.focus(editor);
|
22
26
|
};
|
23
27
|
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
24
|
-
title: "New Line",
|
28
|
+
title: translation("New Line"),
|
25
29
|
onClick: onAddNewLine,
|
26
30
|
icon: /*#__PURE__*/_jsx(NewLineElementIcon, {
|
27
31
|
sx: {
|
@@ -21,6 +21,9 @@ const PageSettingsButton = props => {
|
|
21
21
|
} = props;
|
22
22
|
const [openSetttings, setOpenSettings] = useState(false);
|
23
23
|
const editor = useSlateStatic();
|
24
|
+
const {
|
25
|
+
translation
|
26
|
+
} = customProps;
|
24
27
|
const {
|
25
28
|
theme
|
26
29
|
} = useEditorContext();
|
@@ -65,7 +68,7 @@ const PageSettingsButton = props => {
|
|
65
68
|
className: "removeDefaultSvgCls"
|
66
69
|
})
|
67
70
|
}) : /*#__PURE__*/_jsx(ToolbarIcon, {
|
68
|
-
title: "Page Settings",
|
71
|
+
title: translation("Page Settings"),
|
69
72
|
onClick: onSettings,
|
70
73
|
icon: /*#__PURE__*/_jsx(SettingsIcon, {}),
|
71
74
|
icoBtnType: icoBtnType
|
@@ -9,8 +9,11 @@ const PageSettingsPopup = props => {
|
|
9
9
|
onClose,
|
10
10
|
customProps
|
11
11
|
} = props;
|
12
|
+
const {
|
13
|
+
translation
|
14
|
+
} = customProps;
|
12
15
|
return /*#__PURE__*/_jsx(StyleBuilder, {
|
13
|
-
title: "Page Settings",
|
16
|
+
title: translation("Page Settings"),
|
14
17
|
type: "pageSettingsStyle",
|
15
18
|
element: element,
|
16
19
|
onSave: onSave,
|