@flozy/editor 3.8.9 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. package/dist/Editor/ChatEditor.js +55 -45
  2. package/dist/Editor/CommonEditor.js +8 -69
  3. package/dist/Editor/DialogWrapper.js +3 -4
  4. package/dist/Editor/Editor.css +12 -5
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +36 -47
  6. package/dist/Editor/Elements/Accordion/AccordionSummary.js +15 -4
  7. package/dist/Editor/Elements/AppHeader/AppHeader.js +23 -36
  8. package/dist/Editor/Elements/Button/EditorButton.js +16 -23
  9. package/dist/Editor/Elements/Embed/Image.js +14 -15
  10. package/dist/Editor/Elements/Embed/Video.js +8 -12
  11. package/dist/Editor/Elements/Emoji/EmojiButton.js +7 -11
  12. package/dist/Editor/Elements/Emoji/EmojiPicker.js +4 -2
  13. package/dist/Editor/Elements/Form/Form.js +1 -1
  14. package/dist/Editor/Elements/Grid/Grid.js +8 -12
  15. package/dist/Editor/Elements/Grid/GridItem.js +21 -31
  16. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +5 -1
  17. package/dist/Editor/Elements/SimpleText/index.js +8 -9
  18. package/dist/Editor/Elements/SimpleText/style.js +0 -37
  19. package/dist/Editor/Styles/EditorStyles.js +0 -23
  20. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +25 -1
  21. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +0 -1
  22. package/dist/Editor/Toolbar/PopupTool/index.js +0 -8
  23. package/dist/Editor/Toolbar/Toolbar.js +0 -7
  24. package/dist/Editor/Toolbar/toolbarGroups.js +0 -5
  25. package/dist/Editor/common/Icon.js +2 -9
  26. package/dist/Editor/common/MentionsPopup/MentionsListCard.js +6 -1
  27. package/dist/Editor/common/MentionsPopup/index.js +8 -12
  28. package/dist/Editor/common/Section/index.js +12 -21
  29. package/dist/Editor/common/Section/styles.js +1 -6
  30. package/dist/Editor/common/Shorthands/elements.js +0 -12
  31. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +31 -32
  32. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +18 -16
  33. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +14 -3
  34. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +2 -4
  35. package/dist/Editor/common/StyleBuilder/index.js +2 -2
  36. package/dist/Editor/common/StyleBuilder/sectionStyle.js +2 -13
  37. package/dist/Editor/helper/index.js +0 -139
  38. package/dist/Editor/helper/theme.js +2 -50
  39. package/dist/Editor/hooks/useMouseMove.js +8 -36
  40. package/dist/Editor/hooks/withCommon.js +1 -2
  41. package/dist/Editor/utils/SlateUtilityFunctions.js +3 -23
  42. package/dist/Editor/utils/draftToSlate.js +1 -1
  43. package/dist/Editor/utils/events.js +0 -5
  44. package/dist/Editor/utils/helper.js +0 -29
  45. package/package.json +2 -5
  46. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +0 -391
  47. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +0 -193
  48. package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +0 -23
  49. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -184
  50. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +0 -36
  51. package/dist/Editor/Elements/FreeGrid/Options/More.js +0 -24
  52. package/dist/Editor/Elements/FreeGrid/Options/SectionSettings.js +0 -47
  53. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +0 -11
  54. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +0 -75
  55. package/dist/Editor/Elements/FreeGrid/styles.js +0 -159
  56. package/dist/Editor/ErrorBoundary.js +0 -30
  57. package/dist/Editor/common/RnD/ContextMenu/CMenus.js +0 -105
  58. package/dist/Editor/common/RnD/ContextMenu/index.js +0 -38
  59. package/dist/Editor/common/RnD/ContextMenu/styles.js +0 -21
  60. package/dist/Editor/common/RnD/DragInfo/index.js +0 -31
  61. package/dist/Editor/common/RnD/DragInfo/styles.js +0 -15
  62. package/dist/Editor/common/RnD/DragOver/index.js +0 -46
  63. package/dist/Editor/common/RnD/DragOver/styles.js +0 -23
  64. package/dist/Editor/common/RnD/ElementOptions/Actions.js +0 -82
  65. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -26
  66. package/dist/Editor/common/RnD/ElementOptions/index.js +0 -93
  67. package/dist/Editor/common/RnD/ElementOptions/styles.js +0 -41
  68. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Link.js +0 -153
  69. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +0 -58
  70. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +0 -7
  71. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +0 -46
  72. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +0 -46
  73. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +0 -46
  74. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +0 -30
  75. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +0 -46
  76. package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +0 -13
  77. package/dist/Editor/common/RnD/ElementSettings/index.js +0 -17
  78. package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +0 -14
  79. package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -76
  80. package/dist/Editor/common/RnD/GuideLines/BoundaryLine.js +0 -52
  81. package/dist/Editor/common/RnD/GuideLines/index.js +0 -33
  82. package/dist/Editor/common/RnD/GuideLines/styles.js +0 -60
  83. package/dist/Editor/common/RnD/OptionsPopup/index.js +0 -50
  84. package/dist/Editor/common/RnD/OptionsPopup/style.js +0 -36
  85. package/dist/Editor/common/RnD/RnDCopy.js +0 -23
  86. package/dist/Editor/common/RnD/ShadowElement.js +0 -34
  87. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +0 -40
  88. package/dist/Editor/common/RnD/SwitchViewport/styles.js +0 -24
  89. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +0 -63
  90. package/dist/Editor/common/RnD/TransformHandles/CornerHandle.js +0 -19
  91. package/dist/Editor/common/RnD/TransformHandles/Icons/BottomRightIcon.js +0 -13
  92. package/dist/Editor/common/RnD/TransformHandles/SizeHandle.js +0 -18
  93. package/dist/Editor/common/RnD/TransformHandles/index.js +0 -62
  94. package/dist/Editor/common/RnD/Utils/alignmentDetection.js +0 -26
  95. package/dist/Editor/common/RnD/Utils/calculateDropItem.js +0 -98
  96. package/dist/Editor/common/RnD/Utils/collisionDetection.js +0 -52
  97. package/dist/Editor/common/RnD/Utils/gridDropItem.js +0 -148
  98. package/dist/Editor/common/RnD/Utils/index.js +0 -251
  99. package/dist/Editor/common/RnD/VirtualElement/index.js +0 -76
  100. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -27
  101. package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +0 -28
  102. package/dist/Editor/common/RnD/index.js +0 -503
  103. package/dist/Editor/common/RnD/styles.js +0 -4
  104. package/dist/Editor/common/StyleBuilder/boxStyle.js +0 -30
  105. package/dist/Editor/helper/RnD/focusOnNewItem.js +0 -39
  106. package/dist/Editor/helper/RnD/scrollToNewSection.js +0 -24
  107. package/dist/Editor/helper/breakpoint.js +0 -5
  108. package/dist/Editor/hooks/useBreakpoints.js +0 -34
  109. package/dist/Editor/hooks/withErrorHandling.js +0 -14
  110. package/dist/Editor/utils/RnD/RnDCtrlCmds.js +0 -168
  111. package/dist/Editor/utils/freegrid.js +0 -49
@@ -1,184 +0,0 @@
1
- import React from "react";
2
- import { Transforms, Node, Path } from "slate";
3
- import { useSlateStatic } from "slate-react";
4
- import { ReactEditor } from "slate-react";
5
- import { Box, useTheme } from "@mui/material";
6
- import RnD from "../../common/RnD";
7
- import { onDropItem } from "../../common/RnD/Utils/gridDropItem";
8
- import useBreakpoints from "../../hooks/useBreakpoints";
9
- import { breakpointValues, formatBreakpointValues } from "./breakpointConstants";
10
- import { useEditorContext } from "../../hooks/useMouseMove";
11
- import focusOnNewItem from "../../helper/RnD/focusOnNewItem";
12
- import { bringItemToFB } from "../../helper";
13
- import itemOptions from "./Options/sectionItemOptions";
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- const FreeGridItem = props => {
16
- const theme = useTheme();
17
- const breakpoint = useBreakpoints(theme);
18
- const {
19
- element,
20
- attributes,
21
- children,
22
- customProps
23
- } = props;
24
- const editor = useSlateStatic();
25
- const path = ReactEditor.findPath(editor, element);
26
- const {
27
- readOnly
28
- } = customProps;
29
- const {
30
- updated_at,
31
- childType,
32
- zIndex
33
- } = element;
34
- // get values based on breakpoint size
35
- const {
36
- gridArea,
37
- width,
38
- height,
39
- left,
40
- top,
41
- marginTop
42
- } = breakpointValues(element.type, breakpoint, element);
43
- const {
44
- setSelectedElement
45
- } = useEditorContext();
46
- const arrangeIndex = zIndex === undefined ? path[path.length - 1] : zIndex;
47
- const onChangeSettings = () => {};
48
- const onChange = data => {
49
- let updateData = {
50
- ...data
51
- };
52
- delete updateData.children;
53
- updateData = formatBreakpointValues(element.type, breakpoint, updateData);
54
- Transforms.setNodes(editor, {
55
- ...updateData
56
- }, {
57
- at: path
58
- });
59
- };
60
- const handleDragEvent = (type, data, cb) => {
61
- const toPosition = {
62
- left: left + data.lastX,
63
- top: top + data.lastY
64
- };
65
- const {
66
- node,
67
- ...rest
68
- } = data;
69
- switch (type) {
70
- case "stop":
71
- const updated_data = onDropItem({
72
- editor,
73
- fromPosition: {
74
- left,
75
- top
76
- },
77
- toPosition,
78
- path,
79
- ref: node,
80
- breakpoint,
81
- ...rest
82
- }, ".freegrid-container");
83
- if (cb) {
84
- cb(updated_data);
85
- }
86
- break;
87
- default:
88
- }
89
- };
90
- const handleResizeEvent = (type, data, cb) => {
91
- switch (type) {
92
- case "stop":
93
- return;
94
- default:
95
- }
96
- };
97
- const onDelete = () => {
98
- try {
99
- Transforms.removeNodes(editor, {
100
- at: path
101
- });
102
- } catch (err) {
103
- console.log(err);
104
- }
105
- };
106
- const handleContextMenuClick = d => {
107
- switch (d?.name) {
108
- case "bringForward":
109
- bringItemToFB(editor, {
110
- path,
111
- moveFront: true
112
- });
113
- break;
114
- case "bringBackward":
115
- bringItemToFB(editor, {
116
- path,
117
- moveFront: false
118
- });
119
- break;
120
- case "cut":
121
- window.copiedNode = JSON.stringify(Node.get(editor, path));
122
- onDelete();
123
- focusOnNewItem(editor, Path.parent(path), {
124
- setSelectedElement
125
- });
126
- break;
127
- case "copy":
128
- window.copiedNode = JSON.stringify(Node.get(editor, path));
129
- break;
130
- case "delete":
131
- onDelete();
132
- setSelectedElement({});
133
- break;
134
- default:
135
- return;
136
- }
137
- };
138
- const handleActionClick = type => {
139
- console.log(type);
140
- };
141
- return /*#__PURE__*/_jsx(RnD, {
142
- id: `freegrid_item_${path.join("|")}_${updated_at}_${breakpoint}`,
143
- className: `freegrid-item breakpoint-${breakpoint}`,
144
- editor: editor,
145
- path: path,
146
- actions: itemOptions[childType] || itemOptions?.default,
147
- settingsProps: {
148
- settings: "freegridItem",
149
- onChange: onChangeSettings,
150
- customProps
151
- },
152
- style: {
153
- "--left": `${left || 0}px`,
154
- "--marginTop": `${marginTop || 0}px`,
155
- "--gridArea": `${gridArea}`,
156
- "--width": `${width}px`,
157
- "--height": `${height}px`,
158
- "--zIndex": 100 + arrangeIndex
159
- },
160
- defaultStyle: {
161
- height: `${height}px`,
162
- width: `${width}px`
163
- },
164
- gridArea: gridArea,
165
- onChange: onChange,
166
- delta: {
167
- width,
168
- height
169
- },
170
- handleDragEvent: handleDragEvent,
171
- handleResizeEvent: handleResizeEvent,
172
- readOnly: readOnly,
173
- childType: childType || "",
174
- handleContextMenuClick: handleContextMenuClick,
175
- handleActionClick: handleActionClick,
176
- children: /*#__PURE__*/_jsx(Box, {
177
- component: "div",
178
- ...attributes,
179
- className: `fgi_type_${childType}`,
180
- children: children
181
- })
182
- });
183
- };
184
- export default FreeGridItem;
@@ -1,36 +0,0 @@
1
- import React from "react";
2
- import { Box, List, ListItemButton } from "@mui/material";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- const AddElement = props => {
6
- const {
7
- handleClick
8
- } = props;
9
- return /*#__PURE__*/_jsx(Box, {
10
- children: /*#__PURE__*/_jsxs(List, {
11
- className: "item-list-wrpr",
12
- children: [/*#__PURE__*/_jsx(ListItemButton, {
13
- className: "item-wrapper",
14
- onClick: handleClick("addText"),
15
- children: "Text"
16
- }), /*#__PURE__*/_jsx(ListItemButton, {
17
- className: "item-wrapper",
18
- onClick: handleClick("addButton"),
19
- children: "Button"
20
- }), /*#__PURE__*/_jsx(ListItemButton, {
21
- className: "item-wrapper",
22
- onClick: handleClick("addImage"),
23
- children: "Image"
24
- }), /*#__PURE__*/_jsx(ListItemButton, {
25
- className: "item-wrapper",
26
- onClick: handleClick("addVideo"),
27
- children: "Video"
28
- }), /*#__PURE__*/_jsx(ListItemButton, {
29
- className: "item-wrapper",
30
- onClick: handleClick("addBox"),
31
- children: "Box"
32
- })]
33
- })
34
- });
35
- };
36
- export default AddElement;
@@ -1,24 +0,0 @@
1
- import React from "react";
2
- import { Box, List, ListItemButton } from "@mui/material";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- const More = props => {
6
- const {
7
- handleClick
8
- } = props;
9
- return /*#__PURE__*/_jsx(Box, {
10
- children: /*#__PURE__*/_jsxs(List, {
11
- className: "item-list-wrpr",
12
- children: [/*#__PURE__*/_jsx(ListItemButton, {
13
- className: "item-wrapper",
14
- onClick: handleClick("addSection"),
15
- children: "Add Section"
16
- }), /*#__PURE__*/_jsx(ListItemButton, {
17
- className: "item-wrapper",
18
- onClick: handleClick("duplicateSection"),
19
- children: "Duplicate Section"
20
- })]
21
- })
22
- });
23
- };
24
- export default More;
@@ -1,47 +0,0 @@
1
- import React from "react";
2
- import { Transforms, Node } from "slate";
3
- import { Box } from "@mui/material";
4
- import { StyleContent } from "../../../common/StyleBuilder";
5
- import sectionStyle from "../../../common/StyleBuilder/sectionStyle";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- const SectionSettings = props => {
8
- const {
9
- editor,
10
- path,
11
- classes
12
- } = props;
13
- const element = Node.get(editor, path);
14
- const styleMaps = sectionStyle?.filter(f => !f?.hideOnFGS);
15
- const onChange = data => {
16
- const updated_props = {
17
- ...element,
18
- ...data,
19
- field_type: data?.element
20
- };
21
- delete updated_props.children;
22
- Transforms.setNodes(editor, {
23
- ...updated_props
24
- }, {
25
- at: path
26
- });
27
- };
28
- const handleClose = () => {
29
- console.log("close");
30
- };
31
- return /*#__PURE__*/_jsx(Box, {
32
- component: "div",
33
- className: "style-settings-wrpr",
34
- sx: classes.sectionSettingsPopper,
35
- children: styleMaps?.map((m, i) => {
36
- return /*#__PURE__*/_jsx(StyleContent, {
37
- renderTabs: sectionStyle,
38
- value: m.value,
39
- element: element,
40
- onChange: onChange,
41
- customProps: {},
42
- handleClose: handleClose
43
- }, `tab_${m.value}_$${i}`);
44
- })
45
- });
46
- };
47
- export default SectionSettings;
@@ -1,11 +0,0 @@
1
- const commonOptions = ["drag", "edit", "settings", "close"];
2
- const textOptions = ["drag", "edit", "settings", "link", "close"];
3
- const buttonOptions = ["drag", "edit", "settings", "link", "close"];
4
- const imageOptions = ["drag", "edit", "settings", "link", "close"];
5
- const itemOptions = {
6
- default: commonOptions,
7
- text: textOptions,
8
- button: buttonOptions,
9
- image: imageOptions
10
- };
11
- export default itemOptions;
@@ -1,75 +0,0 @@
1
- const breakpointConstants = {
2
- freegrid: ["height"],
3
- freegridItem: ["left", "top", "marginTop", "width", "height", "gridArea"],
4
- freegridBox: ["left", "top", "marginTop", "width", "height", "gridArea"]
5
- };
6
- export function CssVar(device = "lg", key, props) {
7
- const keyTo = `${key}_${device}`;
8
- const value = props[keyTo] === undefined ? props[key] : props[keyTo];
9
- return value;
10
- }
11
- export function breakpointValues(type, breakpoint = "lg", props) {
12
- try {
13
- const breakpointDatas = breakpointConstants[type]?.reduce((a, b) => {
14
- const bpKey = `${b}_${breakpoint}`;
15
- a[b] = props[bpKey] === undefined ? props[b] : props[bpKey];
16
- return a;
17
- }, {});
18
- return breakpointDatas;
19
- } catch (err) {
20
- console.log(err);
21
- return {};
22
- }
23
- }
24
- export function formatBreakpointValues(type, breakpoint = "lg", data) {
25
- try {
26
- const bpValues = breakpointConstants[type];
27
- if (breakpoint === "lg") {
28
- return data;
29
- } else {
30
- let rtData = {};
31
- Object.keys(data).forEach(key => {
32
- if (bpValues.indexOf(key) > -1) {
33
- rtData[`${key}_${breakpoint}`] = data[key];
34
- } else {
35
- rtData[key] = data[key];
36
- }
37
- });
38
- return rtData;
39
- }
40
- } catch (err) {
41
- console.log(err);
42
- return {};
43
- }
44
- }
45
- export function wrapThemeBreakpoints(sxProp, prop, theme) {
46
- try {
47
- const formatedSxProp = Object.keys(sxProp).reduce((a, b) => {
48
- switch (b) {
49
- case "md":
50
- a[theme.breakpoints.up("lg")] = {
51
- [prop]: sxProp["md"] || sxProp["lg"]
52
- };
53
- break;
54
- case "sm":
55
- a[theme.breakpoints.up("lg")] = {
56
- [prop]: sxProp["sm"] || sxProp["lg"]
57
- };
58
- break;
59
- case "xs":
60
- a[theme.breakpoints.between("xs", "md")] = {
61
- [prop]: sxProp["xs"] || sxProp["lg"]
62
- };
63
- break;
64
- default:
65
- a[theme.breakpoints.up("lg")] = {
66
- [prop]: sxProp["lg"]
67
- };
68
- }
69
- return a;
70
- }, {});
71
- return formatedSxProp;
72
- } catch (err) {
73
- console.log(err);
74
- }
75
- }
@@ -1,159 +0,0 @@
1
- const useFreeGridStyles = ({
2
- theme,
3
- MAX_DEVICE_WIDTH
4
- }) => ({
5
- root: {
6
- "&.freegrid-container": {
7
- display: "grid",
8
- gridTemplateColumns: "var(--cols)",
9
- gridTemplateRows: "var(--rows)",
10
- gridGap: "0px",
11
- backgroundColor: "#FFF",
12
- padding: "0px",
13
- height: "100%",
14
- position: "static",
15
- overflow: "hidden",
16
- "& .freegrid-item, & .freegrid-box-item": {
17
- gridArea: "var(--gridArea)",
18
- left: "var(--left)",
19
- marginTop: "var(--marginTop)",
20
- marginLeft: `calc((100% - ${MAX_DEVICE_WIDTH}px) * 0.5)`,
21
- zIndex: "var(--zIndex) !important",
22
- "&.active-drag": {},
23
- "&.inactive-drag": {},
24
- "& .editor-blocker": {
25
- position: "absolute",
26
- left: 0,
27
- top: 0,
28
- width: "100%",
29
- height: "100%",
30
- background: "rgba(0,0,0,0)",
31
- border: 0,
32
- outline: 0
33
- },
34
- "&.enable-1, &.enable-2": {
35
- "&.type_text": {
36
- // height: "fit-content !important",
37
- }
38
- },
39
- "&.enable-1:before, &.enable-2:before": {
40
- position: "absolute",
41
- content: "attr(placeholder)",
42
- top: "-22px",
43
- left: "-2px",
44
- padding: "2px 4px",
45
- backgroundColor: "#2563EB",
46
- color: "#FFF",
47
- fontSize: "12px",
48
- borderTopLeftRadius: "2px",
49
- borderTopRightRadius: "2px",
50
- width: "auto",
51
- height: "16px"
52
- },
53
- "&:hover": {
54
- "& .debug-info": {
55
- opacity: 1
56
- }
57
- },
58
- "& .debug-info": {
59
- position: "absolute",
60
- top: "calc(100% + 8px)",
61
- pointerEvents: "none",
62
- left: 0,
63
- background: "rgba(0,0,0,0.2)",
64
- color: "red",
65
- width: "100%",
66
- padding: "6px",
67
- opacity: 0
68
- },
69
- "&.enable-1": {
70
- "&.type_text": {
71
- "*": {
72
- "::selection": {
73
- backgroundColor: "transparent !important",
74
- color: "inherit !important"
75
- }
76
- }
77
- }
78
- },
79
- /** for element items */
80
- "& .fgi_type_image, & .fgi_type_video": {
81
- height: "100%",
82
- "& .embed": {
83
- height: "100%",
84
- "& .embed-image-wrpr, & .embed-video-wrpr-in, & .element-empty-btn": {
85
- height: "100%"
86
- }
87
- }
88
- },
89
- "& .fgi_type_button": {
90
- height: "100%",
91
- "& .editor-btn-wrapper": {
92
- height: "100%",
93
- "& .editor-btn-wrapper-inner": {
94
- width: "100%",
95
- height: "100%",
96
- "& span": {
97
- width: "100%",
98
- height: "100%"
99
- },
100
- "& .btn": {
101
- width: "100%",
102
- height: "100%",
103
- "&.textAlign-left": {
104
- justifyContent: "start"
105
- },
106
- "&.textAlign-right": {
107
- justifyContent: "end"
108
- },
109
- "&.textAlign-center": {
110
- justifyContent: "center"
111
- }
112
- }
113
- }
114
- }
115
- },
116
- "& .fgi_type_box": {
117
- width: "100%",
118
- height: "100%"
119
- },
120
- /** element toolbar hide */
121
- "& .element-toolbar": {
122
- display: "none"
123
- },
124
- [theme.breakpoints.between("xs", "md")]: {
125
- marginLeft: `calc((100% - 320px) * 0.5)`
126
- }
127
- }
128
- }
129
- },
130
- sectionPopper: {
131
- zIndex: 1200,
132
- width: "40px",
133
- left: "-40px !important",
134
- "& .papper-root": {
135
- fontFamily: "sans-serif",
136
- background: "#FFF",
137
- "& .MuiIconButton-root": {
138
- padding: "10px",
139
- color: "#000",
140
- background: "#FFF",
141
- "& svg": {
142
- width: "20px",
143
- height: "20px"
144
- },
145
- "&.active,&:hover ": {}
146
- }
147
- }
148
- },
149
- sectionSettingsPopper: {
150
- "&.style-settings-wrpr": {
151
- height: "300px",
152
- overflowY: "auto",
153
- overflowX: "hidden",
154
- padding: "8px 8px 12px 12px",
155
- marginBotton: "12px"
156
- }
157
- }
158
- });
159
- export default useFreeGridStyles;
@@ -1,30 +0,0 @@
1
- import React, { Component } from "react";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- class ErrorBoundary extends Component {
4
- constructor(props) {
5
- super(props);
6
- this.state = {
7
- hasError: false
8
- };
9
- }
10
- static getDerivedStateFromError(error) {
11
- // Update state so the next render will show the fallback UI.
12
- return {
13
- hasError: true
14
- };
15
- }
16
- componentDidCatch(error, errorInfo) {
17
- // You can also log the error to an error reporting service
18
- console.error("Error caught in Error Boundary: ", error, errorInfo);
19
- }
20
- render() {
21
- if (this.state.hasError) {
22
- // You can render any custom fallback UI
23
- return /*#__PURE__*/_jsx("h1", {
24
- children: "Something went wrong."
25
- });
26
- }
27
- return this.props.children;
28
- }
29
- }
30
- export default ErrorBoundary;
@@ -1,105 +0,0 @@
1
- import CMDIcon from "@mui/icons-material/KeyboardCommandKey";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { jsxs as _jsxs } from "react/jsx-runtime";
4
- import { Fragment as _Fragment } from "react/jsx-runtime";
5
- const CMenus = {
6
- child: [{
7
- name: "bringForward",
8
- label: "Move to Front",
9
- autoClose: false,
10
- render: () => {
11
- return /*#__PURE__*/_jsxs(_Fragment, {
12
- children: ["Move to Front", " ", /*#__PURE__*/_jsxs("span", {
13
- className: "shortcut-help-info",
14
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " \u2191"]
15
- })]
16
- });
17
- }
18
- }, {
19
- name: "bringBackward",
20
- label: "Move to Back",
21
- autoClose: false,
22
- render: () => {
23
- return /*#__PURE__*/_jsxs(_Fragment, {
24
- children: ["Move to Back", " ", /*#__PURE__*/_jsxs("span", {
25
- className: "shortcut-help-info",
26
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " \u2193"]
27
- })]
28
- });
29
- }
30
- }, {
31
- name: "cut",
32
- label: "Cut",
33
- render: () => {
34
- return /*#__PURE__*/_jsxs(_Fragment, {
35
- children: ["Cut", " ", /*#__PURE__*/_jsxs("span", {
36
- className: "shortcut-help-info",
37
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " X"]
38
- })]
39
- });
40
- }
41
- }, {
42
- name: "copy",
43
- label: "Copy",
44
- render: () => {
45
- return /*#__PURE__*/_jsxs(_Fragment, {
46
- children: ["Copy", " ", /*#__PURE__*/_jsxs("span", {
47
- className: "shortcut-help-info",
48
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " C"]
49
- })]
50
- });
51
- }
52
- }, {
53
- name: "paste",
54
- label: "Paste",
55
- render: () => {
56
- return /*#__PURE__*/_jsxs(_Fragment, {
57
- children: ["Paste", " ", /*#__PURE__*/_jsxs("span", {
58
- className: "shortcut-help-info",
59
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " V"]
60
- })]
61
- });
62
- }
63
- }, {
64
- name: "delete",
65
- label: "Delete"
66
- }],
67
- parent: [{
68
- name: "cut",
69
- label: "Cut",
70
- render: () => {
71
- return /*#__PURE__*/_jsxs(_Fragment, {
72
- children: ["Cut", " ", /*#__PURE__*/_jsxs("span", {
73
- className: "shortcut-help-info",
74
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " X"]
75
- })]
76
- });
77
- }
78
- }, {
79
- name: "copy",
80
- label: "Copy",
81
- render: () => {
82
- return /*#__PURE__*/_jsxs(_Fragment, {
83
- children: ["Copy", " ", /*#__PURE__*/_jsxs("span", {
84
- className: "shortcut-help-info",
85
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " C"]
86
- })]
87
- });
88
- }
89
- }, {
90
- name: "paste",
91
- label: "Paste",
92
- render: () => {
93
- return /*#__PURE__*/_jsxs(_Fragment, {
94
- children: ["Paste", " ", /*#__PURE__*/_jsxs("span", {
95
- className: "shortcut-help-info",
96
- children: [/*#__PURE__*/_jsx(CMDIcon, {}), " V"]
97
- })]
98
- });
99
- }
100
- }, {
101
- name: "delete",
102
- label: "Delete"
103
- }]
104
- };
105
- export default CMenus;