@flozy/editor 4.0.5 → 4.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -7
- package/dist/Editor/Elements/Button/EditorButton.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -3
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +20 -5
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +5 -1
- package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +4 -2
- package/dist/Editor/Elements/FreeGrid/styles.js +18 -0
- package/dist/Editor/Elements/Table/Table.js +2 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +5 -2
- package/dist/Editor/common/LinkSettings/index.js +2 -1
- package/dist/Editor/common/LinkSettings/navOptions.js +7 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +77 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +3 -1
- package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +6 -4
- package/dist/Editor/common/RnD/index.js +0 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +1 -1
- package/dist/Editor/common/StyleBuilder/sectionStyle.js +2 -1
- package/dist/Editor/helper/index.js +2 -1
- package/dist/Editor/utils/freegrid.js +130 -17
- package/dist/Editor/utils/helper.js +2 -1
- package/dist/Editor/utils/table.js +105 -0
- package/package.json +1 -1
@@ -21,15 +21,12 @@ const scrollToAIInput = editor => {
|
|
21
21
|
} else {
|
22
22
|
selectionRect = ReactEditor.toDOMRange(editor, getNextLine(editor).at).getBoundingClientRect();
|
23
23
|
}
|
24
|
-
const
|
24
|
+
const wrapperTop = slateWrapper.getBoundingClientRect().top;
|
25
|
+
const cursorViewPortPosition = selectionRect.bottom - wrapperTop; // here the slatewrapper is the viewport, not the whole screen. We are finding the position of the cursor/selection relative to the slate wrapper, that why we are subracting the slate wrapper top with selection bottom
|
25
26
|
|
26
|
-
|
27
|
-
if (selectionScrollBottom > 80) {
|
27
|
+
if (cursorViewPortPosition > 80) {
|
28
28
|
// scroll to top of the slateWrapper
|
29
|
-
slateWrapper.
|
30
|
-
top: slateWrapper.scrollTop + selectionScrollBottom - 80,
|
31
|
-
behavior: "smooth"
|
32
|
-
});
|
29
|
+
slateWrapper.scrollBy(0, cursorViewPortPosition - 80);
|
33
30
|
}
|
34
31
|
}, 200);
|
35
32
|
} catch (err) {
|
@@ -62,13 +62,14 @@ const EditorButton = props => {
|
|
62
62
|
} = actionTrigger || {
|
63
63
|
options: []
|
64
64
|
};
|
65
|
-
const isTrigger = linkType === "
|
65
|
+
const isTrigger = linkType === "nextTrigger" || linkType === "prevTrigger";
|
66
66
|
const refURl = isTrigger ? buttonLink?.url : url;
|
67
67
|
const BtnIcon = buttonIcon ? buttonIcon : null;
|
68
68
|
windowVar.lastButtonProps = element;
|
69
69
|
const handleTrigger = async () => {
|
70
70
|
if (metadata?.buttonLink?.handler) {
|
71
|
-
|
71
|
+
const response = isTrigger ? linkType : "click";
|
72
|
+
metadata.buttonLink.handler(response);
|
72
73
|
} else if (redirectOnURLResult) {
|
73
74
|
// call api and redirect based on api result
|
74
75
|
const apiResult = await actionButtonRedirect({}, {
|
@@ -71,11 +71,11 @@ const FormWorkflow = props => {
|
|
71
71
|
children: [/*#__PURE__*/_jsx(Grid, {
|
72
72
|
item: true,
|
73
73
|
sx: classes.radioBtn,
|
74
|
-
children: /*#__PURE__*/
|
74
|
+
children: /*#__PURE__*/_jsxs(RadioGroup, {
|
75
75
|
name: "set timing",
|
76
76
|
value: schedule,
|
77
77
|
defaultValue: 1,
|
78
|
-
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
78
|
+
children: [/*#__PURE__*/_jsx(FormControlLabel, {
|
79
79
|
value: "immediately",
|
80
80
|
label: "Immediately",
|
81
81
|
onChange: () => {
|
@@ -84,7 +84,16 @@ const FormWorkflow = props => {
|
|
84
84
|
control: /*#__PURE__*/_jsx(Radio, {
|
85
85
|
size: "small"
|
86
86
|
})
|
87
|
-
})
|
87
|
+
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
88
|
+
value: "after",
|
89
|
+
label: "After",
|
90
|
+
onChange: () => {
|
91
|
+
setSchedule("after");
|
92
|
+
},
|
93
|
+
control: /*#__PURE__*/_jsx(Radio, {
|
94
|
+
size: "small"
|
95
|
+
})
|
96
|
+
})]
|
88
97
|
})
|
89
98
|
}), schedule === "after" && /*#__PURE__*/_jsx(Grid, {
|
90
99
|
item: true,
|
@@ -18,6 +18,7 @@ import { onPasteRnDNode } from "../../helper";
|
|
18
18
|
import focusOnNewItem from "../../helper/RnD/focusOnNewItem";
|
19
19
|
import { appHeaderNode } from "../../utils/insertAppHeader";
|
20
20
|
import { FORM_NODE } from "../../utils/form";
|
21
|
+
import { DEFAULT_TABLE_NODE } from "../../utils/table";
|
21
22
|
import itemOptions from "./Options/sectionItemOptions";
|
22
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
23
24
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -158,7 +159,7 @@ const FreeGrid = props => {
|
|
158
159
|
marginTop: 0,
|
159
160
|
top: 0,
|
160
161
|
width: 170,
|
161
|
-
height:
|
162
|
+
height: 30
|
162
163
|
}], {
|
163
164
|
at: [...insertAt]
|
164
165
|
});
|
@@ -189,14 +190,16 @@ const FreeGrid = props => {
|
|
189
190
|
top: 12,
|
190
191
|
right: 12,
|
191
192
|
bottom: 12
|
192
|
-
}
|
193
|
+
},
|
194
|
+
textAlign: "center",
|
195
|
+
label: "Get Started"
|
193
196
|
}],
|
194
197
|
gridArea: "3 / 1 / 4 / 2",
|
195
198
|
left: 50,
|
196
199
|
marginTop: 0,
|
197
200
|
top: 0,
|
198
|
-
width:
|
199
|
-
height:
|
201
|
+
width: 143,
|
202
|
+
height: 50
|
200
203
|
}], {
|
201
204
|
at: [...insertAt]
|
202
205
|
});
|
@@ -237,6 +240,18 @@ const FreeGrid = props => {
|
|
237
240
|
at: [...insertAt]
|
238
241
|
});
|
239
242
|
break;
|
243
|
+
case "addTable":
|
244
|
+
Transforms.insertNodes(editor, [{
|
245
|
+
...insertFreeGridItem("table", {
|
246
|
+
...DEFAULT_TABLE_NODE()
|
247
|
+
}, {
|
248
|
+
height: 130,
|
249
|
+
width: 400
|
250
|
+
})
|
251
|
+
}], {
|
252
|
+
at: [...insertAt]
|
253
|
+
});
|
254
|
+
break;
|
240
255
|
case "addBox":
|
241
256
|
Transforms.insertNodes(editor, [{
|
242
257
|
...insertFreeGridItem("box", {
|
@@ -254,7 +269,7 @@ const FreeGrid = props => {
|
|
254
269
|
...insertFreeGridItem("form", {
|
255
270
|
...FORM_NODE()
|
256
271
|
}, {
|
257
|
-
height:
|
272
|
+
height: 92,
|
258
273
|
width: 400
|
259
274
|
})
|
260
275
|
}], {
|
@@ -24,7 +24,11 @@ const AddElement = props => {
|
|
24
24
|
}), /*#__PURE__*/_jsx(ListItemButton, {
|
25
25
|
className: "item-wrapper",
|
26
26
|
onClick: handleClick("addVideo"),
|
27
|
-
children: "Video"
|
27
|
+
children: "Embed or Video"
|
28
|
+
}), /*#__PURE__*/_jsx(ListItemButton, {
|
29
|
+
className: "item-wrapper",
|
30
|
+
onClick: handleClick("addTable"),
|
31
|
+
children: "Table"
|
28
32
|
}), /*#__PURE__*/_jsx(ListItemButton, {
|
29
33
|
className: "item-wrapper",
|
30
34
|
onClick: handleClick("addBox"),
|
@@ -4,8 +4,9 @@ const buttonOptions = ["settings", "link", "saveAsTemplate", "close"];
|
|
4
4
|
const imageOptions = ["settings", "link", "saveAsTemplate", "close"];
|
5
5
|
const boxOptions = ["settings", "link", "saveAsTemplate", "close"];
|
6
6
|
const appHeaderOptions = ["settings", "saveAsTemplate", "close"];
|
7
|
+
const tableOptions = ["drag", "edit", "settings", "saveAsTemplate", "close"];
|
7
8
|
const sectionOptions = ["addElement", "settings", "moveUp", "moveDown", "saveAsTemplate", "more"];
|
8
|
-
const formOptions = ["drag", "edit", "settings", "addFormField", "workFlow", "close"];
|
9
|
+
const formOptions = ["drag", "edit", "settings", "addFormField", "workFlow", "saveAsTemplate", "close"];
|
9
10
|
const itemOptions = {
|
10
11
|
default: commonOptions,
|
11
12
|
text: textOptions,
|
@@ -14,6 +15,7 @@ const itemOptions = {
|
|
14
15
|
box: boxOptions,
|
15
16
|
appHeader: appHeaderOptions,
|
16
17
|
form: formOptions,
|
17
|
-
section: sectionOptions
|
18
|
+
section: sectionOptions,
|
19
|
+
table: tableOptions
|
18
20
|
};
|
19
21
|
export default itemOptions;
|
@@ -150,6 +150,9 @@ const useFreeGridStyles = ({
|
|
150
150
|
},
|
151
151
|
|
152
152
|
"& .fgi_type_form": {
|
153
|
+
"& .form-wrapper": {
|
154
|
+
padding: "0px !important"
|
155
|
+
},
|
153
156
|
"& legend": {
|
154
157
|
paddingLeft: "16px",
|
155
158
|
paddingTop: "16px",
|
@@ -170,6 +173,21 @@ const useFreeGridStyles = ({
|
|
170
173
|
}
|
171
174
|
}
|
172
175
|
},
|
176
|
+
"& .fgi_type_table": {
|
177
|
+
"& .tableToolBar": {
|
178
|
+
right: "0px",
|
179
|
+
left: "auto",
|
180
|
+
top: "-34px",
|
181
|
+
display: "flex",
|
182
|
+
flexDirection: "row-reverse",
|
183
|
+
"& .toolbtn.settings": {
|
184
|
+
display: "none"
|
185
|
+
},
|
186
|
+
"& .toolbtn.remove": {
|
187
|
+
display: "none"
|
188
|
+
}
|
189
|
+
}
|
190
|
+
},
|
173
191
|
/** element toolbar hide */
|
174
192
|
"& .element-toolbar": {
|
175
193
|
display: "none"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { Transforms } from "slate";
|
3
3
|
import { useSelected, useSlateStatic } from "slate-react";
|
4
|
-
import { Box, IconButton, Tooltip, Table as TableComp, TableBody
|
4
|
+
import { Box, IconButton, Tooltip, Table as TableComp, TableBody } from "@mui/material";
|
5
5
|
import AlignHorizontalLeftIcon from "@mui/icons-material/AlignHorizontalLeft";
|
6
6
|
import AlignHorizontalRightIcon from "@mui/icons-material/AlignHorizontalRight";
|
7
7
|
import AlignVerticalTopIcon from "@mui/icons-material/AlignVerticalTop";
|
@@ -15,7 +15,6 @@ import { TableUtil } from "../../utils/table";
|
|
15
15
|
import TablePopup from "./TablePopup";
|
16
16
|
import { useEditorSelection } from "../../hooks/useMouseMove";
|
17
17
|
import TableStyles from "./Styles";
|
18
|
-
import useClickOutside from "../../hooks/useClickOutside";
|
19
18
|
import "./table.css";
|
20
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
21
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -150,7 +149,7 @@ const Table = props => {
|
|
150
149
|
title: text,
|
151
150
|
arrow: true,
|
152
151
|
children: /*#__PURE__*/_jsx(IconButton, {
|
153
|
-
className:
|
152
|
+
className: `toolbtn ${action?.type}`,
|
154
153
|
onClick: handleAction(action),
|
155
154
|
children: /*#__PURE__*/_jsx(Icon, {})
|
156
155
|
})
|
@@ -134,10 +134,13 @@ export const SelectPage = props => {
|
|
134
134
|
});
|
135
135
|
};
|
136
136
|
export const Trigger = props => {
|
137
|
-
|
137
|
+
const {
|
138
|
+
nav
|
139
|
+
} = props;
|
140
|
+
return /*#__PURE__*/_jsxs(Typography, {
|
138
141
|
variant: "subtitle1",
|
139
142
|
gutterBottom: true,
|
140
|
-
children: "Choosing this will trigger the
|
143
|
+
children: ["Choosing this will trigger the ", nav.type, " step"]
|
141
144
|
});
|
142
145
|
};
|
143
146
|
const scrollToOptions = [{
|
@@ -3,8 +3,13 @@ export const getNavOptions = (hideTools = []) => {
|
|
3
3
|
label: "None",
|
4
4
|
value: ""
|
5
5
|
}, {
|
6
|
-
label: "Trigger",
|
7
|
-
value: "
|
6
|
+
label: "Next Trigger",
|
7
|
+
value: "nextTrigger",
|
8
|
+
type: "next"
|
9
|
+
}, {
|
10
|
+
label: "Previous Trigger",
|
11
|
+
value: "prevTrigger",
|
12
|
+
type: "previous"
|
8
13
|
}, {
|
9
14
|
label: "Web Address",
|
10
15
|
value: "webAddress",
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Node, Transforms } from "slate";
|
3
|
+
import { Box } from "@mui/material";
|
4
|
+
import { StyleContent } from "../../../StyleBuilder";
|
5
|
+
import tableStyle from "../../../StyleBuilder/tableStyle";
|
6
|
+
import { TableUtil } from "../../../../utils/table";
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
const TableSettings = props => {
|
9
|
+
const {
|
10
|
+
editor,
|
11
|
+
path,
|
12
|
+
customProps
|
13
|
+
} = props;
|
14
|
+
const item_path = path?.split("|").map(m => parseInt(m));
|
15
|
+
const element_path = [...item_path, 0];
|
16
|
+
const element = Node.get(editor, element_path);
|
17
|
+
const getTableProps = () => {
|
18
|
+
try {
|
19
|
+
const firstTCell = [...element_path, 0, 0, 0, 0];
|
20
|
+
const firstTCellTarget = {
|
21
|
+
anchor: {
|
22
|
+
path: [...firstTCell],
|
23
|
+
offset: 0
|
24
|
+
},
|
25
|
+
focus: {
|
26
|
+
path: [...firstTCell],
|
27
|
+
offset: 0
|
28
|
+
}
|
29
|
+
};
|
30
|
+
Transforms.select(editor, firstTCellTarget);
|
31
|
+
const table = new TableUtil(editor);
|
32
|
+
const tableProps = table.getTableProps();
|
33
|
+
return {
|
34
|
+
table,
|
35
|
+
tableProps
|
36
|
+
};
|
37
|
+
} catch (err) {
|
38
|
+
return element;
|
39
|
+
}
|
40
|
+
};
|
41
|
+
const onChange = data => {
|
42
|
+
try {
|
43
|
+
const {
|
44
|
+
table,
|
45
|
+
tableProps
|
46
|
+
} = getTableProps();
|
47
|
+
const updateData = {
|
48
|
+
...data
|
49
|
+
};
|
50
|
+
delete updateData.children;
|
51
|
+
delete updateData.type;
|
52
|
+
table.updateTableStyle(updateData, {
|
53
|
+
...tableProps
|
54
|
+
});
|
55
|
+
} catch (err) {
|
56
|
+
console.log(err);
|
57
|
+
}
|
58
|
+
};
|
59
|
+
const handleClose = () => {
|
60
|
+
console.log("close");
|
61
|
+
};
|
62
|
+
return /*#__PURE__*/_jsx(Box, {
|
63
|
+
component: "div",
|
64
|
+
className: "item-w",
|
65
|
+
children: tableStyle?.map((m, i) => {
|
66
|
+
return /*#__PURE__*/_jsx(StyleContent, {
|
67
|
+
renderTabs: tableStyle,
|
68
|
+
value: m.value,
|
69
|
+
element: getTableProps()?.tableProps?.styleProps || {},
|
70
|
+
onChange: onChange,
|
71
|
+
customProps: customProps,
|
72
|
+
handleClose: handleClose
|
73
|
+
}, `tab_${m.value}_$${i}`);
|
74
|
+
})
|
75
|
+
});
|
76
|
+
};
|
77
|
+
export default TableSettings;
|
@@ -5,6 +5,7 @@ import VideoSettings from "./VideoSettings";
|
|
5
5
|
import BoxSettings from "./BoxSettings";
|
6
6
|
import AppHeaderSettings from "./AppHeaderSettings";
|
7
7
|
import FormSettings from "./FormSettings";
|
8
|
+
import TableSettings from "./TableSettings";
|
8
9
|
const SettingsComponents = {
|
9
10
|
text: TextSettings,
|
10
11
|
button: ButtonSettings,
|
@@ -12,6 +13,7 @@ const SettingsComponents = {
|
|
12
13
|
video: VideoSettings,
|
13
14
|
box: BoxSettings,
|
14
15
|
appHeader: AppHeaderSettings,
|
15
|
-
form: FormSettings
|
16
|
+
form: FormSettings,
|
17
|
+
table: TableSettings
|
16
18
|
};
|
17
19
|
export default SettingsComponents;
|
@@ -2,17 +2,19 @@ export const settingsLabel = {
|
|
2
2
|
text: "Text Settings",
|
3
3
|
button: "Button Settings",
|
4
4
|
image: "Image Settings",
|
5
|
-
video: "Video Settings",
|
5
|
+
video: "Embed or Video Settings",
|
6
6
|
box: "Box Settings",
|
7
7
|
appHeader: "App Header Settings",
|
8
|
-
form: "Form Settings"
|
8
|
+
form: "Form Settings",
|
9
|
+
table: "Table Settings"
|
9
10
|
};
|
10
11
|
export const ItemTypes = {
|
11
12
|
text: "Text",
|
12
13
|
button: "Button",
|
13
14
|
image: "Image",
|
14
|
-
video: "Video",
|
15
|
+
video: "Embed or Video",
|
15
16
|
box: "Box",
|
16
17
|
appHeader: "App Header",
|
17
|
-
form: "Form"
|
18
|
+
form: "Form",
|
19
|
+
table: "Table"
|
18
20
|
};
|
@@ -208,7 +208,8 @@ export const onPasteRnDNode = (editor, {
|
|
208
208
|
left: parsed_node?.left + 20,
|
209
209
|
marginTop: parsed_node?.marginTop + 20,
|
210
210
|
// to maintain unique drop location in different section also
|
211
|
-
gridArea: "1 / 1 / 2 / 2"
|
211
|
+
gridArea: "1 / 1 / 2 / 2",
|
212
|
+
xs_updatedOn: null
|
212
213
|
}], {
|
213
214
|
at: new_path
|
214
215
|
});
|
@@ -42,37 +42,150 @@ export const insertFreeGrid = (editor, path, extProps) => {
|
|
42
42
|
children: [{
|
43
43
|
type: "paragraph",
|
44
44
|
children: [{
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
type: "grid",
|
46
|
+
grid: "container",
|
47
|
+
children: [{
|
48
|
+
type: "grid-item",
|
49
|
+
grid: 12,
|
50
|
+
children: [{
|
51
|
+
type: "alignCenter",
|
52
|
+
children: [{
|
53
|
+
type: "paragraph",
|
54
|
+
children: [{
|
55
|
+
text: "Lorem ipsum sit ",
|
56
|
+
fontSize: {
|
57
|
+
xs: "80px",
|
58
|
+
sm: "80px",
|
59
|
+
md: "80px",
|
60
|
+
lg: "80px"
|
61
|
+
},
|
62
|
+
fontFamily: "PoppinsBold",
|
63
|
+
color: "rgb(132, 141, 151)"
|
64
|
+
}]
|
65
|
+
}]
|
66
|
+
}, {
|
67
|
+
type: "alignCenter",
|
68
|
+
children: [{
|
69
|
+
type: "paragraph",
|
70
|
+
children: [{
|
71
|
+
fontSize: {
|
72
|
+
xs: "80px",
|
73
|
+
sm: "80px",
|
74
|
+
md: "80px",
|
75
|
+
lg: "80px"
|
76
|
+
},
|
77
|
+
fontFamily: "PoppinsBold",
|
78
|
+
text: "amet.",
|
79
|
+
color: "rgb(132, 141, 151)"
|
80
|
+
}, {
|
81
|
+
fontSize: {
|
82
|
+
xs: "80px",
|
83
|
+
sm: "80px",
|
84
|
+
md: "80px",
|
85
|
+
lg: "80px"
|
86
|
+
},
|
87
|
+
fontFamily: "PoppinsBold",
|
88
|
+
text: " "
|
89
|
+
}, {
|
90
|
+
fontSize: {
|
91
|
+
xs: "80px",
|
92
|
+
sm: "80px",
|
93
|
+
md: "80px",
|
94
|
+
lg: "80px"
|
95
|
+
},
|
96
|
+
fontFamily: "PoppinsBold",
|
97
|
+
text: "Lorem",
|
98
|
+
color: "rgb(131, 96, 253)"
|
99
|
+
}]
|
100
|
+
}]
|
101
|
+
}],
|
102
|
+
bgColor: "rgba(255, 255, 255, 0)",
|
103
|
+
borderColor: "rgba(204, 204, 204, 0)",
|
104
|
+
lockSpacing: true,
|
105
|
+
bannerSpacing: {
|
106
|
+
top: "16",
|
107
|
+
left: "16",
|
108
|
+
right: "16",
|
109
|
+
bottom: "16"
|
110
|
+
}
|
111
|
+
}],
|
112
|
+
alignment: {
|
113
|
+
flexDirection: "column"
|
51
114
|
},
|
52
|
-
|
115
|
+
lockSpacing: false,
|
116
|
+
bannerSpacing: {
|
117
|
+
top: "32",
|
118
|
+
left: "16",
|
119
|
+
right: "16",
|
120
|
+
bottom: "16"
|
121
|
+
},
|
122
|
+
gridSize: 8
|
53
123
|
}]
|
54
124
|
}]
|
55
125
|
}],
|
56
|
-
gridArea: "
|
57
|
-
height:
|
126
|
+
gridArea: "1 / 1 / 2 / 2",
|
127
|
+
height: 323,
|
58
128
|
width: 746,
|
59
|
-
left:
|
60
|
-
marginTop:
|
129
|
+
left: 127,
|
130
|
+
marginTop: 25,
|
61
131
|
top_xs: 105.1875,
|
62
132
|
left_xs: 22,
|
63
133
|
marginTop_xs: 38,
|
64
134
|
width_xs: 272,
|
65
135
|
height_xs: 163.0078125,
|
66
136
|
gridArea_xs: "2 / 1 / 3 / 2",
|
67
|
-
updated_at:
|
68
|
-
lg_updatedOn:
|
69
|
-
xs_updatedOn:
|
137
|
+
updated_at: 1729055084817,
|
138
|
+
lg_updatedOn: 1729055010519,
|
139
|
+
xs_updatedOn: null
|
140
|
+
}, {
|
141
|
+
type: "freegridItem",
|
142
|
+
childType: "button",
|
143
|
+
children: [{
|
144
|
+
type: "button",
|
145
|
+
children: [{
|
146
|
+
text: ""
|
147
|
+
}],
|
148
|
+
buttonLink: {
|
149
|
+
linkType: "webAddress"
|
150
|
+
},
|
151
|
+
iconPosition: "start",
|
152
|
+
bgColor: "#2563EB",
|
153
|
+
textColor: "#FFF",
|
154
|
+
borderRadius: {
|
155
|
+
topLeft: 30,
|
156
|
+
topRight: 30,
|
157
|
+
bottomLeft: 30,
|
158
|
+
bottomRight: 30
|
159
|
+
},
|
160
|
+
bannerSpacing: {
|
161
|
+
left: 12,
|
162
|
+
top: 12,
|
163
|
+
right: 12,
|
164
|
+
bottom: 12
|
165
|
+
},
|
166
|
+
textAlign: "center",
|
167
|
+
label: "Get Started"
|
168
|
+
}],
|
169
|
+
gridArea: "7 / 1 / 8 / 2",
|
170
|
+
left: 428,
|
171
|
+
marginTop: 42,
|
172
|
+
top: 0,
|
173
|
+
width: 143,
|
174
|
+
height: 50,
|
175
|
+
lg_updatedOn: 1729055084816,
|
176
|
+
updated_at: 1729055084817,
|
177
|
+
top_xs: 366,
|
178
|
+
left_xs: 24,
|
179
|
+
marginTop_xs: 12,
|
180
|
+
width_xs: 272,
|
181
|
+
height_xs: 48,
|
182
|
+
gridArea_xs: "8 / 1 / 9 / 2"
|
70
183
|
}],
|
71
184
|
height_xs: 593.0625,
|
72
|
-
updated_at:
|
185
|
+
updated_at: 1729055084816,
|
73
186
|
width: 0,
|
74
|
-
sectionBgColor: "rgb(
|
75
|
-
xs_updatedOn:
|
187
|
+
sectionBgColor: "rgb(255, 255, 255)",
|
188
|
+
xs_updatedOn: null,
|
76
189
|
sectionName: "Home"
|
77
190
|
}];
|
78
191
|
const newPath = path ? path : editor?.selection?.anchor?.path;
|
@@ -247,7 +247,8 @@ export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick =
|
|
247
247
|
props.target = "_blank";
|
248
248
|
}
|
249
249
|
break;
|
250
|
-
case "
|
250
|
+
case "nextTrigger":
|
251
|
+
case "prevTrigger":
|
251
252
|
if (!readOnly) {
|
252
253
|
props.component = "button";
|
253
254
|
props.onClick = () => {};
|
@@ -1,6 +1,111 @@
|
|
1
1
|
import { Transforms, Editor, Range, Element, Path, Node } from "slate";
|
2
2
|
import { ReactEditor } from "slate-react";
|
3
3
|
import { customInsertNode } from "./helper";
|
4
|
+
export const DEFAULT_TABLE_NODE = () => ({
|
5
|
+
type: "table",
|
6
|
+
children: [{
|
7
|
+
type: "table-row",
|
8
|
+
children: [{
|
9
|
+
type: "table-cell",
|
10
|
+
children: [{
|
11
|
+
type: "paragraph",
|
12
|
+
children: [{
|
13
|
+
text: ""
|
14
|
+
}],
|
15
|
+
cellBgColor: "#FFFFFF"
|
16
|
+
}]
|
17
|
+
}, {
|
18
|
+
type: "table-cell",
|
19
|
+
children: [{
|
20
|
+
type: "paragraph",
|
21
|
+
children: [{
|
22
|
+
text: ""
|
23
|
+
}],
|
24
|
+
cellBgColor: "#FFFFFF"
|
25
|
+
}]
|
26
|
+
}, {
|
27
|
+
type: "table-cell",
|
28
|
+
children: [{
|
29
|
+
type: "paragraph",
|
30
|
+
children: [{
|
31
|
+
text: ""
|
32
|
+
}],
|
33
|
+
cellBgColor: "#FFFFFF"
|
34
|
+
}]
|
35
|
+
}]
|
36
|
+
}, {
|
37
|
+
type: "table-row",
|
38
|
+
children: [{
|
39
|
+
type: "table-cell",
|
40
|
+
children: [{
|
41
|
+
type: "paragraph",
|
42
|
+
children: [{
|
43
|
+
text: ""
|
44
|
+
}],
|
45
|
+
cellBgColor: "#FFFFFF"
|
46
|
+
}]
|
47
|
+
}, {
|
48
|
+
type: "table-cell",
|
49
|
+
children: [{
|
50
|
+
type: "paragraph",
|
51
|
+
children: [{
|
52
|
+
text: ""
|
53
|
+
}],
|
54
|
+
cellBgColor: "#FFFFFF"
|
55
|
+
}]
|
56
|
+
}, {
|
57
|
+
type: "table-cell",
|
58
|
+
children: [{
|
59
|
+
type: "paragraph",
|
60
|
+
children: [{
|
61
|
+
text: ""
|
62
|
+
}],
|
63
|
+
cellBgColor: "#FFFFFF"
|
64
|
+
}],
|
65
|
+
size: {
|
66
|
+
widthInPercent: 100,
|
67
|
+
height: 100,
|
68
|
+
width: 365.3307291666667
|
69
|
+
}
|
70
|
+
}]
|
71
|
+
}, {
|
72
|
+
type: "table-row",
|
73
|
+
children: [{
|
74
|
+
type: "table-cell",
|
75
|
+
children: [{
|
76
|
+
type: "paragraph",
|
77
|
+
children: [{
|
78
|
+
text: ""
|
79
|
+
}],
|
80
|
+
cellBgColor: "#FFFFFF"
|
81
|
+
}]
|
82
|
+
}, {
|
83
|
+
type: "table-cell",
|
84
|
+
children: [{
|
85
|
+
type: "paragraph",
|
86
|
+
children: [{
|
87
|
+
text: ""
|
88
|
+
}],
|
89
|
+
cellBgColor: "#FFFFFF"
|
90
|
+
}]
|
91
|
+
}, {
|
92
|
+
type: "table-cell",
|
93
|
+
children: [{
|
94
|
+
type: "paragraph",
|
95
|
+
children: [{
|
96
|
+
text: ""
|
97
|
+
}],
|
98
|
+
cellBgColor: "#FFFFFF"
|
99
|
+
}],
|
100
|
+
size: {
|
101
|
+
height: 300,
|
102
|
+
widthInPercent: 100
|
103
|
+
}
|
104
|
+
}]
|
105
|
+
}],
|
106
|
+
rows: 3,
|
107
|
+
columns: 3
|
108
|
+
});
|
4
109
|
const prefixKey = (obj, pk = "") => {
|
5
110
|
return Object.keys(obj).reduce((a, b) => {
|
6
111
|
a[`${pk}${b}`] = obj[b];
|