@flozy/editor 9.3.7 → 9.3.8
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 +52 -16
- package/dist/Editor/CommonEditor.js +133 -23
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +19 -9
- 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 -14
- 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 +4 -4
- package/dist/Editor/Elements/Color Picker/Styles.js +3 -3
- 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 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +422 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +4 -3
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +23 -5
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +7 -2
- 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 +64 -38
- 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/TableStyles.js +4 -1
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +6 -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/Frames/Slider.js +16 -14
- package/dist/Editor/Elements/Embed/Image.js +18 -12
- package/dist/Editor/Elements/Embed/Video.js +10 -7
- 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 +18 -12
- 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/UserInputs.js +4 -2
- package/dist/Editor/Elements/Form/Workflow/index.js +15 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +63 -25
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +22 -4
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +6 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +34 -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 +14 -7
- 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 +16 -5
- package/dist/Editor/Elements/PageSettings/PageSettingsPopup.js +4 -1
- package/dist/Editor/Elements/Search/SearchButton.js +6 -3
- 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 +48 -25
- package/dist/Editor/Elements/Table/TableCell.js +10 -27
- 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 +10 -0
- 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 +7 -13
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +20 -15
- 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 +6 -2
- 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 +15 -7
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +8 -4
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +16 -9
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +126 -44
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +441 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +15 -17
- package/dist/Editor/Toolbar/Toolbar.js +20 -10
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/CalenderIconTick.js +1 -0
- package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
- package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
- package/dist/Editor/common/ColorPickerButton.js +45 -10
- package/dist/Editor/common/CustomColorPicker/index.js +125 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog/index.js +8 -10
- package/dist/Editor/common/CustomDialog/styles.js +1 -1
- package/dist/Editor/common/CustomDialog2/index.js +94 -0
- package/dist/Editor/common/CustomDialog2/style.js +67 -0
- package/dist/Editor/common/CustomSelect.js +33 -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 +46 -1
- package/dist/Editor/common/ImageSelector/ImageSelector.js +10 -8
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +6 -4
- package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/ImageSelector/UploadStyles.js +9 -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/Styles.js +111 -73
- package/dist/Editor/common/MentionsPopup/index.js +8 -4
- 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/ElementSettings/styles.js +0 -1
- package/dist/Editor/common/RnD/OptionsPopup/index.js +4 -3
- 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 +20 -8
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +58 -7
- package/dist/Editor/common/RnD/Utils/index.js +48 -0
- package/dist/Editor/common/RnD/VirtualElement/ForceAutoAlignment.js +110 -0
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +112 -0
- package/dist/Editor/common/RnD/VirtualElement/helper.js +267 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +186 -104
- package/dist/Editor/common/RnD/VirtualElement/styles.js +95 -8
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +5 -3
- package/dist/Editor/common/RnD/index.js +82 -10
- package/dist/Editor/common/Section/index.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +98 -10
- 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 +41 -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 +13 -23
- package/dist/Editor/helper/index.js +8 -12
- package/dist/Editor/helper/textIndeces.js +58 -0
- package/dist/Editor/helper/theme.js +200 -2
- package/dist/Editor/hooks/useAutoScroll.js +38 -0
- package/dist/Editor/hooks/useDrag.js +17 -11
- package/dist/Editor/hooks/useEditorScroll.js +10 -6
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +28 -13
- package/dist/Editor/hooks/useTable.js +5 -2
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +19 -15
- 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 +144 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
- package/dist/Editor/themeSettings/buttons/index.js +285 -0
- package/dist/Editor/themeSettings/buttons/style.js +23 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +297 -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 +222 -0
- package/dist/Editor/themeSettings/fonts/style.js +59 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +328 -0
- package/dist/Editor/themeSettings/style.js +193 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +355 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +215 -0
- package/dist/Editor/themeSettingsAI/style.js +250 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +171 -47
- package/dist/Editor/utils/button.js +7 -2
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +23 -0
- package/dist/Editor/utils/dataView.js +5 -2
- package/dist/Editor/utils/divider.js +18 -2
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/embed.js +9 -4
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/freegrid.js +2 -2
- package/dist/Editor/utils/helper.js +136 -29
- package/dist/Editor/utils/signature.js +5 -2
- package/dist/Editor/utils/table.js +53 -37
- package/package.json +2 -2
@@ -8,7 +8,8 @@ const BoxSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
onClose
|
12
13
|
} = props;
|
13
14
|
const item_path = path?.split("|").map(m => parseInt(m));
|
14
15
|
const element_path = [...item_path];
|
@@ -27,7 +28,7 @@ const BoxSettings = props => {
|
|
27
28
|
});
|
28
29
|
};
|
29
30
|
const handleClose = () => {
|
30
|
-
|
31
|
+
onClose();
|
31
32
|
};
|
32
33
|
return /*#__PURE__*/_jsx(Box, {
|
33
34
|
component: "div",
|
@@ -8,7 +8,8 @@ const ButtonSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
onClose
|
12
13
|
} = props;
|
13
14
|
const item_path = path?.split("|").map(m => parseInt(m));
|
14
15
|
const element_path = [...item_path, 0];
|
@@ -28,7 +29,7 @@ const ButtonSettings = props => {
|
|
28
29
|
});
|
29
30
|
};
|
30
31
|
const handleClose = () => {
|
31
|
-
|
32
|
+
onClose();
|
32
33
|
};
|
33
34
|
return /*#__PURE__*/_jsx(Box, {
|
34
35
|
component: "div",
|
@@ -8,7 +8,8 @@ const CodeSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
onClose
|
12
13
|
} = props;
|
13
14
|
const item_path = path?.split("|").map(m => parseInt(m));
|
14
15
|
const element_path = [...item_path, 0];
|
@@ -27,7 +28,7 @@ const CodeSettings = props => {
|
|
27
28
|
});
|
28
29
|
};
|
29
30
|
const handleClose = () => {
|
30
|
-
|
31
|
+
onClose();
|
31
32
|
};
|
32
33
|
return /*#__PURE__*/_jsx(Box, {
|
33
34
|
component: "div",
|
@@ -12,14 +12,16 @@ const FormSettings = props => {
|
|
12
12
|
const {
|
13
13
|
editor,
|
14
14
|
path,
|
15
|
-
customProps
|
15
|
+
customProps,
|
16
|
+
onClose
|
16
17
|
} = props;
|
17
18
|
const item_path = path?.split("|").map(m => parseInt(m));
|
18
19
|
const element_path = [...item_path];
|
19
20
|
const element = Node.get(editor, element_path);
|
20
21
|
const styleMaps = formStyle;
|
21
22
|
const {
|
22
|
-
hideTools
|
23
|
+
hideTools,
|
24
|
+
translation
|
23
25
|
} = customProps || {};
|
24
26
|
const {
|
25
27
|
theme
|
@@ -55,13 +57,14 @@ const FormSettings = props => {
|
|
55
57
|
}
|
56
58
|
};
|
57
59
|
const handleClose = () => {
|
58
|
-
|
60
|
+
onClose();
|
59
61
|
};
|
60
62
|
const muiTheme = createTheme({
|
61
63
|
components: {
|
62
64
|
MuiAccordion: {
|
63
65
|
styleOverrides: {
|
64
66
|
root: {
|
67
|
+
background: theme?.palette?.editor?.miniToolBarBackground,
|
65
68
|
"& .MuiAccordionSummary-root": {
|
66
69
|
flexDirection: "row-reverse",
|
67
70
|
"& .MuiSvgIcon-root": {
|
@@ -107,7 +110,7 @@ const FormSettings = props => {
|
|
107
110
|
fontSize: "14px !important",
|
108
111
|
fontWeight: "400"
|
109
112
|
},
|
110
|
-
children: m?.tab
|
113
|
+
children: translation(m?.tab)
|
111
114
|
})
|
112
115
|
}), /*#__PURE__*/_jsx(AccordionDetails, {
|
113
116
|
sx: {
|
@@ -8,7 +8,8 @@ const ImageSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
onClose
|
12
13
|
} = props;
|
13
14
|
const item_path = path?.split("|").map(m => parseInt(m));
|
14
15
|
const element_path = [...item_path, 0];
|
@@ -27,7 +28,7 @@ const ImageSettings = props => {
|
|
27
28
|
});
|
28
29
|
};
|
29
30
|
const handleClose = () => {
|
30
|
-
|
31
|
+
onClose();
|
31
32
|
};
|
32
33
|
return /*#__PURE__*/_jsx(Box, {
|
33
34
|
component: "div",
|
@@ -9,7 +9,8 @@ const TableSettings = props => {
|
|
9
9
|
const {
|
10
10
|
editor,
|
11
11
|
path,
|
12
|
-
customProps
|
12
|
+
customProps,
|
13
|
+
onClose
|
13
14
|
} = props;
|
14
15
|
const item_path = path?.split("|").map(m => parseInt(m));
|
15
16
|
const element_path = [...item_path, 0];
|
@@ -57,7 +58,7 @@ const TableSettings = props => {
|
|
57
58
|
}
|
58
59
|
};
|
59
60
|
const handleClose = () => {
|
60
|
-
|
61
|
+
onClose();
|
61
62
|
};
|
62
63
|
return /*#__PURE__*/_jsx(Box, {
|
63
64
|
component: "div",
|
@@ -8,7 +8,9 @@ const TextSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
theme
|
11
|
+
theme,
|
12
|
+
onClose,
|
13
|
+
customProps
|
12
14
|
} = props;
|
13
15
|
const item_path = path.split("|").map(m => parseInt(m));
|
14
16
|
const element_path = [...item_path, 0];
|
@@ -25,7 +27,9 @@ const TextSettings = props => {
|
|
25
27
|
}, []);
|
26
28
|
return /*#__PURE__*/_jsx(TextFormat, {
|
27
29
|
classes: classes,
|
28
|
-
editor: editor
|
30
|
+
editor: editor,
|
31
|
+
customProps: customProps,
|
32
|
+
closeMainPopup: onClose
|
29
33
|
});
|
30
34
|
};
|
31
35
|
export default TextSettings;
|
@@ -8,7 +8,8 @@ const VideoSettings = props => {
|
|
8
8
|
const {
|
9
9
|
editor,
|
10
10
|
path,
|
11
|
-
customProps
|
11
|
+
customProps,
|
12
|
+
onClose
|
12
13
|
} = props;
|
13
14
|
const item_path = path?.split("|").map(m => parseInt(m));
|
14
15
|
const element_path = [...item_path, 0];
|
@@ -28,7 +29,7 @@ const VideoSettings = props => {
|
|
28
29
|
});
|
29
30
|
};
|
30
31
|
const handleClose = () => {
|
31
|
-
|
32
|
+
onClose();
|
32
33
|
};
|
33
34
|
return /*#__PURE__*/_jsx(Box, {
|
34
35
|
component: "div",
|
@@ -58,7 +58,6 @@ const useElementSettingsStyle = theme => ({
|
|
58
58
|
maxHeight: "500px",
|
59
59
|
overflowX: "hidden",
|
60
60
|
overflowY: "auto",
|
61
|
-
paddingLeft: "4px",
|
62
61
|
background: theme?.palette?.editor?.background,
|
63
62
|
paddingLeft: "4px",
|
64
63
|
"& .MuiTypography-root, .MuiInputBase-root, input": {
|
@@ -17,7 +17,8 @@ const OptionsPopup = props => {
|
|
17
17
|
open,
|
18
18
|
anchorEl,
|
19
19
|
placement,
|
20
|
-
handleClose
|
20
|
+
handleClose,
|
21
|
+
translation
|
21
22
|
} = props;
|
22
23
|
return anchorEl ? /*#__PURE__*/_jsx(Popper, {
|
23
24
|
sx: classes.root,
|
@@ -30,10 +31,10 @@ const OptionsPopup = props => {
|
|
30
31
|
children: [/*#__PURE__*/_jsxs(Typography, {
|
31
32
|
variant: "div",
|
32
33
|
className: "item-wrapper title",
|
33
|
-
children: [title, /*#__PURE__*/_jsx(Box, {
|
34
|
+
children: [translation(title), /*#__PURE__*/_jsx(Box, {
|
34
35
|
component: "div",
|
35
36
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
36
|
-
title: "Close",
|
37
|
+
title: translation("Close"),
|
37
38
|
arrow: true,
|
38
39
|
children: /*#__PURE__*/_jsx(IconButton, {
|
39
40
|
onClick: handleClose,
|
@@ -9,19 +9,26 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const SwitchViewport = props => {
|
10
10
|
const {
|
11
11
|
breakpoint,
|
12
|
-
onChange
|
12
|
+
onChange,
|
13
|
+
translation,
|
14
|
+
show
|
13
15
|
} = props;
|
14
16
|
const classes = useSwitchViewport();
|
15
17
|
const {
|
18
|
+
setSelectedElement,
|
16
19
|
setActiveBreakPoint
|
17
20
|
} = useEditorContext();
|
18
21
|
useEffect(() => {
|
19
|
-
|
22
|
+
// to reset selection on viewport changes - FS-6589
|
23
|
+
setSelectedElement({});
|
20
24
|
}, [breakpoint]);
|
21
25
|
return /*#__PURE__*/_jsxs(Box, {
|
22
26
|
sx: classes.root,
|
27
|
+
style: {
|
28
|
+
display: show ? "block" : "none"
|
29
|
+
},
|
23
30
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
24
|
-
title: "Desktop View",
|
31
|
+
title: translation("Desktop View"),
|
25
32
|
children: /*#__PURE__*/_jsx(IconButton, {
|
26
33
|
className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
|
27
34
|
onClick: () => {
|
@@ -31,7 +38,7 @@ const SwitchViewport = props => {
|
|
31
38
|
children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
|
32
39
|
})
|
33
40
|
}), /*#__PURE__*/_jsx(Tooltip, {
|
34
|
-
title: "Mobile View",
|
41
|
+
title: translation("Mobile View"),
|
35
42
|
children: /*#__PURE__*/_jsx(IconButton, {
|
36
43
|
className: `${breakpoint === "xs" ? "active" : ""}`,
|
37
44
|
onClick: () => {
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Experimental_CssVarsProvider as CssVarsProvider, experimental_extendTheme as extendTheme } from "@mui/material/styles";
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
function MainThemeProvider({
|
4
|
+
children,
|
5
|
+
userSelectedTheme,
|
6
|
+
theme = {}
|
7
|
+
}) {
|
8
|
+
const themeVars = extendTheme(userSelectedTheme?.theme?.cssVars || {});
|
9
|
+
return /*#__PURE__*/_jsx(CssVarsProvider, {
|
10
|
+
theme: {
|
11
|
+
...themeVars,
|
12
|
+
...theme
|
13
|
+
},
|
14
|
+
children: children
|
15
|
+
});
|
16
|
+
}
|
17
|
+
export default MainThemeProvider;
|
@@ -1,9 +1,20 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { useTheme,
|
2
|
+
import { useTheme, createTheme } from "@mui/material";
|
3
3
|
import { isStimulator, STIMULATOR_MOCK } from "../../../hooks/useBreakpoints";
|
4
|
+
import MainThemeProvider from "./MainThemeProvider";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
const isPdf = () => {
|
7
|
+
try {
|
8
|
+
const hash = window.location.hash;
|
9
|
+
const queryString = hash.split("?")[1]; // Get part after "?"
|
10
|
+
const params = new URLSearchParams(queryString);
|
11
|
+
return params.get("isPdf");
|
12
|
+
} catch (err) {
|
13
|
+
console.log(err);
|
14
|
+
}
|
15
|
+
};
|
4
16
|
|
5
17
|
// Custom breakpoints functions
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
7
18
|
const customUp = (key, breakpoints) => {
|
8
19
|
const MOCK_BREAKPOINT = isStimulator();
|
9
20
|
if (key === "xs") {
|
@@ -49,9 +60,9 @@ const getBreakPoints = prevTheme => {
|
|
49
60
|
};
|
50
61
|
|
51
62
|
// Extend the existing theme with custom breakpoint functions
|
52
|
-
const extendedTheme =
|
63
|
+
const extendedTheme = prevTheme => createTheme({
|
53
64
|
...prevTheme,
|
54
|
-
breakpoints:
|
65
|
+
breakpoints: isPdf() ? {
|
55
66
|
values: {
|
56
67
|
...prevTheme.breakpoints.values,
|
57
68
|
md: 400 // To resolve, while taking pdf on A4 size, it is getting mobile view because of breakpoint
|
@@ -59,13 +70,14 @@ const extendedTheme = (prevTheme, isPrintMode) => createTheme({
|
|
59
70
|
} : getBreakPoints(prevTheme)
|
60
71
|
});
|
61
72
|
const ViewportStimulator = ({
|
62
|
-
children
|
73
|
+
children,
|
74
|
+
selectedTheme
|
63
75
|
}) => {
|
64
76
|
const theme = useTheme();
|
65
|
-
const
|
66
|
-
|
67
|
-
return /*#__PURE__*/_jsx(ThemeProvider, {
|
77
|
+
const viewportTheme = extendedTheme(theme);
|
78
|
+
return /*#__PURE__*/_jsx(MainThemeProvider, {
|
68
79
|
theme: viewportTheme,
|
80
|
+
userSelectedTheme: selectedTheme,
|
69
81
|
children: children
|
70
82
|
});
|
71
83
|
};
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { Transforms, Node, Path } from "slate";
|
1
|
+
import { Transforms, Node, Path, Editor } from "slate";
|
2
2
|
import { ReactEditor } from "slate-react";
|
3
3
|
import { handleNegativeInteger } from "../../../utils/helper";
|
4
|
+
import { handleBoxAlignment } from "../VirtualElement/helper";
|
4
5
|
export const ROW_HEIGHT = 50;
|
5
6
|
|
6
7
|
// const MARGIN_OF = {
|
@@ -21,9 +22,18 @@ export function updateRows() {}
|
|
21
22
|
export function updateCols() {}
|
22
23
|
const handleMoveNode = (editor, path, newPath, {
|
23
24
|
isEmpty
|
24
|
-
}) => {
|
25
|
+
}, autoAlign) => {
|
25
26
|
try {
|
26
|
-
|
27
|
+
let replaceNode = Node.get(editor, path);
|
28
|
+
if (autoAlign) {
|
29
|
+
// reset node for auto alignment in mobile
|
30
|
+
replaceNode = {
|
31
|
+
...replaceNode,
|
32
|
+
gridArea_xs: null,
|
33
|
+
xs_updatedOn: null,
|
34
|
+
marginTop_xs: null
|
35
|
+
};
|
36
|
+
}
|
27
37
|
if (isEmpty) {
|
28
38
|
const toPath = [...newPath, 0];
|
29
39
|
Transforms.insertNodes(editor, [{
|
@@ -57,9 +67,10 @@ const handleMoveNode = (editor, path, newPath, {
|
|
57
67
|
* This method will update prop in child node so it will re-render and update the path
|
58
68
|
* @param {*} path - contains the parent section path
|
59
69
|
*/
|
60
|
-
const reRenderChildNodes = (editor, path) => {
|
70
|
+
export const reRenderChildNodes = (editor, path) => {
|
61
71
|
try {
|
62
72
|
const sectionNode = Node.get(editor, path);
|
73
|
+
console.log("sectionNode", sectionNode);
|
63
74
|
// parent node
|
64
75
|
Transforms.setNodes(editor, {
|
65
76
|
updated_at: new Date().getTime()
|
@@ -92,7 +103,9 @@ function isContainerElement(editor, moveTopath, props, appenBp) {
|
|
92
103
|
// get parent node
|
93
104
|
parentNode = Node.get(editor, Path.parent(dragItemPath));
|
94
105
|
}
|
106
|
+
console.log("moveTopath", moveTopath, path, parentPath, dragOver);
|
95
107
|
const moveToNode = Node.get(editor, moveTopath);
|
108
|
+
console.log("parentNode, moveToNode", parentNode, moveToNode);
|
96
109
|
const leftOfMoveToNode = moveToNode[`left${appenBp}`];
|
97
110
|
if (moveToNode.type === "freegridBox") {
|
98
111
|
if (parentNode.type === "freegridBox") {
|
@@ -127,6 +140,9 @@ function isContainerElement(editor, moveTopath, props, appenBp) {
|
|
127
140
|
console.log(err);
|
128
141
|
}
|
129
142
|
}
|
143
|
+
const isInsidePath = (from, moveTo) => {
|
144
|
+
return Path.isAncestor(from, moveTo);
|
145
|
+
};
|
130
146
|
export function onDropItem(props, parentClass) {
|
131
147
|
try {
|
132
148
|
const {
|
@@ -174,7 +190,17 @@ export function onDropItem(props, parentClass) {
|
|
174
190
|
}, {
|
175
191
|
at: path
|
176
192
|
});
|
177
|
-
|
193
|
+
let reRenderSectionPath;
|
194
|
+
const [sectionData] = Editor.nodes(editor, {
|
195
|
+
at: moveTo,
|
196
|
+
match: n => n.type === "freegrid"
|
197
|
+
});
|
198
|
+
const [sectionNode, sectionPath] = sectionData || [];
|
199
|
+
if (needMove && isInsidePath(from, moveTo)) {
|
200
|
+
reRenderSectionPath = sectionPath;
|
201
|
+
} else {
|
202
|
+
reRenderChildNodes(editor, from);
|
203
|
+
}
|
178
204
|
|
179
205
|
// move the node if section parent changed
|
180
206
|
if (needMove) {
|
@@ -183,10 +209,35 @@ export function onDropItem(props, parentClass) {
|
|
183
209
|
if (!isEmpty) {
|
184
210
|
newPath = [...newPath, toSectionNode?.children?.length];
|
185
211
|
}
|
212
|
+
const moveSectionToSection = from?.length === 2 && moveTo?.length === 2;
|
213
|
+
|
214
|
+
// const autoAlign = breakpoint === "lg" && moveSectionToSection;
|
215
|
+
const autoAlign = breakpoint === "lg";
|
216
|
+
|
217
|
+
// const boxNode = Node.get(editor, moveTo);
|
218
|
+
|
219
|
+
if (moveSectionToSection && autoAlign) {
|
220
|
+
// auto align in mobile
|
221
|
+
Transforms.setNodes(editor, {
|
222
|
+
xs_updatedOn: null
|
223
|
+
}, {
|
224
|
+
at: moveTo
|
225
|
+
});
|
226
|
+
} else if (autoAlign) {
|
227
|
+
Transforms.setNodes(editor, {
|
228
|
+
autoAlign: true,
|
229
|
+
xs_updatedOn: new Date().getTime()
|
230
|
+
}, {
|
231
|
+
at: moveTo
|
232
|
+
});
|
233
|
+
}
|
186
234
|
const rPath = handleMoveNode(editor, path, newPath, {
|
187
235
|
isEmpty
|
188
|
-
});
|
189
|
-
reRenderChildNodes(editor, moveTo);
|
236
|
+
}, autoAlign);
|
237
|
+
reRenderChildNodes(editor, reRenderSectionPath || moveTo);
|
238
|
+
if (autoAlign) {
|
239
|
+
handleBoxAlignment(editor, sectionNode, sectionPath);
|
240
|
+
}
|
190
241
|
return {
|
191
242
|
updated_at: rPath
|
192
243
|
};
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import { Transforms, Node } from "slate";
|
2
2
|
import { ReactEditor } from "slate-react";
|
3
3
|
import { getNearestItem } from "./calculateDropItem";
|
4
|
+
import { ROW_HEIGHT, getBorderWidth } from "./gridDropItem";
|
5
|
+
import { handleNegativeInteger } from "../../../utils/helper";
|
6
|
+
import { getDevice } from "../../../helper/theme";
|
4
7
|
const GUIDE_LINE_THRESHOLD = 5;
|
5
8
|
const GUIDE_LINE_OVERLAP_THRESHOLD = 5;
|
6
9
|
const handleMoveNode = (editor, path, newPath, {
|
@@ -248,4 +251,49 @@ export function getParentSectionPath(props, closestClass) {
|
|
248
251
|
} catch (err) {
|
249
252
|
console.log(err);
|
250
253
|
}
|
254
|
+
}
|
255
|
+
export function getAbsolutePositionX(currentEle) {
|
256
|
+
const isMobile = getDevice(window.innerWidth) === "xs";
|
257
|
+
const {
|
258
|
+
left: currElementLeft
|
259
|
+
} = currentEle?.getBoundingClientRect() || {};
|
260
|
+
let parentBoxDom = currentEle?.closest(".fgi_type_box");
|
261
|
+
if (isMobile && !parentBoxDom) {
|
262
|
+
parentBoxDom = currentEle?.closest(".freegrid-section");
|
263
|
+
}
|
264
|
+
const relativeElementX = parentBoxDom || document.querySelector(".rnd-guideline-lv");
|
265
|
+
const {
|
266
|
+
left
|
267
|
+
} = relativeElementX?.getBoundingClientRect() || {};
|
268
|
+
const borderLeftWidth = getBorderWidth(relativeElementX, "borderLeftWidth");
|
269
|
+
const absolutePositionX = parseInt(currElementLeft - left - borderLeftWidth);
|
270
|
+
return {
|
271
|
+
absolutePositionX
|
272
|
+
};
|
273
|
+
}
|
274
|
+
export function getAbsolutePositionY(currentEle) {
|
275
|
+
const {
|
276
|
+
top: currElementTop
|
277
|
+
} = currentEle?.getBoundingClientRect() || {};
|
278
|
+
const relativeElementY = currentEle?.closest(".freegrid-container-parent");
|
279
|
+
const borderTopWidth = getBorderWidth(relativeElementY, "borderTopWidth");
|
280
|
+
const rect = relativeElementY.getBoundingClientRect();
|
281
|
+
const absolutePositionY = handleNegativeInteger(currElementTop - rect.top - borderTopWidth);
|
282
|
+
|
283
|
+
// Calculate grid position
|
284
|
+
const row = Math.floor(absolutePositionY / ROW_HEIGHT) + 1;
|
285
|
+
|
286
|
+
// Update grid area
|
287
|
+
const gridArea = `${row} / 1 / ${row + 1} / 2`;
|
288
|
+
|
289
|
+
// to calculate difference inside the grid
|
290
|
+
const marginTop = Math.abs((row - 1) * ROW_HEIGHT - absolutePositionY);
|
291
|
+
return {
|
292
|
+
absolutePositionY,
|
293
|
+
gridArea,
|
294
|
+
marginTop
|
295
|
+
};
|
296
|
+
}
|
297
|
+
export function getPathFromElement(element) {
|
298
|
+
return element?.dataset.path?.split("|").map(m => parseInt(m));
|
251
299
|
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import { Box } from "@mui/material";
|
2
|
+
import { useAutoAlignStyles } from "./styles";
|
3
|
+
import { useEffect, useRef } from "react";
|
4
|
+
import { ROW_HEIGHT, calculateGridArea, reRenderChildNodes } from "../Utils/gridDropItem";
|
5
|
+
import updateAutoProps from "./updateAutoProps";
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
const ROOT_ITEM_CLASS = ".freegrid-item.path-3";
|
8
|
+
const getMarginTop = y => {
|
9
|
+
const calcMargin = y % ROW_HEIGHT;
|
10
|
+
return calcMargin <= 0 ? 0 : calcMargin;
|
11
|
+
};
|
12
|
+
function ForceAutoAlignment(props) {
|
13
|
+
const {
|
14
|
+
editor,
|
15
|
+
sectionCls,
|
16
|
+
path,
|
17
|
+
autoAlign,
|
18
|
+
setAutoAlign
|
19
|
+
} = props;
|
20
|
+
const classes = useAutoAlignStyles();
|
21
|
+
const virtualRef = useRef();
|
22
|
+
useEffect(() => {
|
23
|
+
let timeoutId;
|
24
|
+
if (virtualRef?.current && autoAlign) {
|
25
|
+
timeoutId = setTimeout(() => {
|
26
|
+
const allData = calculateProps(path, virtualRef?.current, ROOT_ITEM_CLASS, []);
|
27
|
+
updateAutoProps(editor, allData, "xs", true);
|
28
|
+
const currentSectionPath = path.split("|").map(m => parseInt(m));
|
29
|
+
reRenderChildNodes(editor, currentSectionPath);
|
30
|
+
setAutoAlign(false);
|
31
|
+
}, 100);
|
32
|
+
}
|
33
|
+
return () => {
|
34
|
+
if (timeoutId) {
|
35
|
+
clearTimeout(timeoutId);
|
36
|
+
}
|
37
|
+
};
|
38
|
+
}, [autoAlign, virtualRef?.current]);
|
39
|
+
const calculateProps = (curPath, dom, domClass, allData, parentDom) => {
|
40
|
+
const rect = dom?.getBoundingClientRect();
|
41
|
+
const bufferHeight = parentDom ? 0 : 12;
|
42
|
+
const sectionProps = {
|
43
|
+
path: curPath,
|
44
|
+
props: {
|
45
|
+
height: rect?.height + bufferHeight
|
46
|
+
}
|
47
|
+
};
|
48
|
+
const itemsData = [];
|
49
|
+
const items = dom.querySelectorAll(domClass);
|
50
|
+
const nextItemPathLength = curPath?.split("|").length + 2;
|
51
|
+
// let sectionHeight = 12;
|
52
|
+
for (let i = 0; i < items.length; i++) {
|
53
|
+
const itemRect = items[i]?.getBoundingClientRect();
|
54
|
+
if (items[i]?.classList.contains("type_box")) {
|
55
|
+
allData = calculateProps(items[i]?.dataset.path, items[i], `.freegrid-item.path-${nextItemPathLength}`, allData, dom);
|
56
|
+
} else {
|
57
|
+
const y = Math.abs(rect.top - itemRect?.top);
|
58
|
+
itemsData.push({
|
59
|
+
path: items[i]?.dataset.path,
|
60
|
+
props: {
|
61
|
+
top: y,
|
62
|
+
left: 24,
|
63
|
+
marginTop: getMarginTop(y),
|
64
|
+
width: itemRect?.width,
|
65
|
+
height: itemRect?.height,
|
66
|
+
gridArea: calculateGridArea(y)
|
67
|
+
}
|
68
|
+
});
|
69
|
+
// sectionHeight += itemRect?.height;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
if (dom?.classList.contains("type_box") && parentDom) {
|
74
|
+
const parentDomRect = parentDom?.getBoundingClientRect();
|
75
|
+
const y = Math.abs(parentDomRect.top - rect?.top);
|
76
|
+
sectionProps.props.gridArea = calculateGridArea(y);
|
77
|
+
sectionProps.props.left = 24;
|
78
|
+
sectionProps.props.marginTop = getMarginTop(y);
|
79
|
+
sectionProps.props.width = rect?.width;
|
80
|
+
}
|
81
|
+
allData = [sectionProps, [...allData, ...itemsData]]?.flat();
|
82
|
+
return allData;
|
83
|
+
};
|
84
|
+
const getItems = () => {
|
85
|
+
const cloneNode = document.querySelector(sectionCls)?.cloneNode(true);
|
86
|
+
const items = cloneNode?.querySelectorAll(ROOT_ITEM_CLASS) || [];
|
87
|
+
if (!cloneNode || !items?.length) {
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
let itemsHTML = "";
|
91
|
+
for (let i = 0; i < items?.length; i++) {
|
92
|
+
items[i].classList.add("exclude-virtual");
|
93
|
+
itemsHTML += items[i].outerHTML;
|
94
|
+
}
|
95
|
+
return itemsHTML;
|
96
|
+
};
|
97
|
+
return /*#__PURE__*/_jsx(Box, {
|
98
|
+
className: "force-mobile-virtual-mode",
|
99
|
+
ref: virtualRef,
|
100
|
+
sx: {
|
101
|
+
visibility: "hidden",
|
102
|
+
...classes.root
|
103
|
+
},
|
104
|
+
"aria-hidden": "true",
|
105
|
+
dangerouslySetInnerHTML: {
|
106
|
+
__html: getItems()
|
107
|
+
}
|
108
|
+
});
|
109
|
+
}
|
110
|
+
export default ForceAutoAlignment;
|