@flozy/editor 4.0.3 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +85 -13
- package/dist/Editor/DialogWrapper.js +4 -3
- package/dist/Editor/Editor.css +28 -2
- package/dist/Editor/Elements/AI/AIInput.js +31 -33
- package/dist/Editor/Elements/AI/CustomSelect.js +19 -12
- package/dist/Editor/Elements/AI/PopoverAIInput.js +119 -132
- package/dist/Editor/Elements/AI/Styles.js +2 -2
- package/dist/Editor/Elements/AI/VoiceToText/AudioWave.js +73 -0
- package/dist/Editor/Elements/AI/VoiceToText/index.js +184 -0
- package/dist/Editor/Elements/AI/VoiceToText/style.js +40 -0
- package/dist/Editor/Elements/AI/helper.js +5 -3
- package/dist/Editor/Elements/AppHeader/AppHeader.js +36 -23
- package/dist/Editor/Elements/Button/EditorButton.js +23 -16
- package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +1 -1
- package/dist/Editor/Elements/Color Picker/Styles.js +1 -0
- package/dist/Editor/Elements/Embed/Image.js +15 -14
- package/dist/Editor/Elements/Embed/Video.js +12 -8
- package/dist/Editor/Elements/Emoji/EmojiButton.js +11 -7
- package/dist/Editor/Elements/Form/Form.js +43 -27
- package/dist/Editor/Elements/Form/FormField.js +21 -10
- package/dist/Editor/Elements/Form/Workflow/index.js +5 -2
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +437 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +206 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +23 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +236 -0
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +44 -0
- package/dist/Editor/Elements/FreeGrid/Options/More.js +24 -0
- package/dist/Editor/Elements/FreeGrid/Options/SectionSettings.js +47 -0
- package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +19 -0
- package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +75 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +214 -0
- package/dist/Editor/Elements/Grid/Grid.js +12 -8
- package/dist/Editor/Elements/Grid/GridItem.js +31 -21
- package/dist/Editor/Elements/Link/LinkPopup.js +69 -13
- package/dist/Editor/Elements/Link/LinkPopupStyles.js +28 -0
- package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -2
- package/dist/Editor/Elements/Signature/Signature.css +13 -6
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +2 -1
- package/dist/Editor/Elements/Signature/SignaturePopup.js +186 -31
- package/dist/Editor/Elements/SimpleText/index.js +19 -7
- package/dist/Editor/Elements/SimpleText/style.js +44 -1
- package/dist/Editor/ErrorBoundary.js +30 -0
- package/dist/Editor/Styles/EditorStyles.js +28 -0
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +1 -1
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -2
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +33 -5
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +12 -13
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +12 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/CustomSelectTool.js +3 -0
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +59 -0
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +107 -40
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +57 -61
- package/dist/Editor/Toolbar/PopupTool/index.js +13 -3
- package/dist/Editor/Toolbar/Toolbar.js +7 -0
- package/dist/Editor/Toolbar/toolbarGroups.js +15 -5
- package/dist/Editor/assets/svg/AIIcons.js +153 -1
- package/dist/Editor/common/EditorCmds.js +0 -3
- package/dist/Editor/common/EditorIcons.js +7 -7
- package/dist/Editor/common/Icon.js +39 -30
- package/dist/Editor/common/ImageList.js +16 -3
- package/dist/Editor/common/ImageSelector/ImageSelector.js +30 -9
- package/dist/Editor/common/ImageSelector/Styles.js +2 -1
- package/dist/Editor/common/LinkSettings/index.js +2 -1
- package/dist/Editor/common/LinkSettings/style.js +11 -8
- package/dist/Editor/common/MentionsPopup/Styles.js +1 -1
- package/dist/Editor/common/MentionsPopup/index.js +12 -8
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +142 -0
- package/dist/Editor/common/RnD/ContextMenu/index.js +38 -0
- package/dist/Editor/common/RnD/ContextMenu/styles.js +21 -0
- package/dist/Editor/common/RnD/DragInfo/index.js +31 -0
- package/dist/Editor/common/RnD/DragInfo/styles.js +15 -0
- package/dist/Editor/common/RnD/DragOver/index.js +55 -0
- package/dist/Editor/common/RnD/DragOver/styles.js +23 -0
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +102 -0
- package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +26 -0
- package/dist/Editor/common/RnD/ElementOptions/index.js +95 -0
- package/dist/Editor/common/RnD/ElementOptions/styles.js +41 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Link.js +153 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +36 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +60 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +9 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +48 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +30 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +17 -0
- package/dist/Editor/common/RnD/ElementSettings/index.js +17 -0
- package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +18 -0
- package/dist/Editor/common/RnD/ElementSettings/styles.js +94 -0
- package/dist/Editor/common/RnD/GuideLines/BoundaryLine.js +52 -0
- package/dist/Editor/common/RnD/GuideLines/index.js +33 -0
- package/dist/Editor/common/RnD/GuideLines/styles.js +62 -0
- package/dist/Editor/common/RnD/OptionsPopup/index.js +50 -0
- package/dist/Editor/common/RnD/OptionsPopup/style.js +36 -0
- package/dist/Editor/common/RnD/RnDCopy.js +23 -0
- package/dist/Editor/common/RnD/ShadowElement.js +34 -0
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +40 -0
- package/dist/Editor/common/RnD/SwitchViewport/styles.js +24 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +63 -0
- package/dist/Editor/common/RnD/TransformHandles/CornerHandle.js +19 -0
- package/dist/Editor/common/RnD/TransformHandles/Icons/BottomRightIcon.js +13 -0
- package/dist/Editor/common/RnD/TransformHandles/SizeHandle.js +20 -0
- package/dist/Editor/common/RnD/TransformHandles/index.js +67 -0
- package/dist/Editor/common/RnD/Utils/alignmentDetection.js +26 -0
- package/dist/Editor/common/RnD/Utils/calculateDropItem.js +98 -0
- package/dist/Editor/common/RnD/Utils/collisionDetection.js +52 -0
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +181 -0
- package/dist/Editor/common/RnD/Utils/index.js +251 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +77 -0
- package/dist/Editor/common/RnD/VirtualElement/styles.js +27 -0
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +28 -0
- package/dist/Editor/common/RnD/index.js +567 -0
- package/dist/Editor/common/RnD/styles.js +4 -0
- package/dist/Editor/common/Section/index.js +21 -12
- package/dist/Editor/common/Section/styles.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +21 -9
- package/dist/Editor/common/StyleBuilder/boxStyle.js +30 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +18 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +18 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -2
- package/dist/Editor/common/StyleBuilder/index.js +6 -4
- package/dist/Editor/common/StyleBuilder/sectionStyle.js +13 -2
- package/dist/Editor/common/iconListV2.js +843 -0
- package/dist/Editor/commonStyle.js +6 -0
- package/dist/Editor/helper/RnD/focusOnNewItem.js +39 -0
- package/dist/Editor/helper/RnD/scrollToNewSection.js +24 -0
- package/dist/Editor/helper/breakpoint.js +5 -0
- package/dist/Editor/helper/index.js +139 -0
- package/dist/Editor/helper/theme.js +50 -1
- package/dist/Editor/hooks/useBreakpoints.js +34 -0
- package/dist/Editor/hooks/useMouseMove.js +36 -8
- package/dist/Editor/hooks/useWindowMessage.js +10 -7
- package/dist/Editor/hooks/withCommon.js +2 -1
- package/dist/Editor/hooks/withErrorHandling.js +14 -0
- package/dist/Editor/utils/RnD/RnDCtrlCmds.js +197 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +36 -4
- package/dist/Editor/utils/events.js +5 -0
- package/dist/Editor/utils/form.js +7 -2
- package/dist/Editor/utils/formfield.js +1 -1
- package/dist/Editor/utils/freegrid.js +91 -0
- package/dist/Editor/utils/helper.js +43 -0
- package/dist/Editor/utils/insertAppHeader.js +47 -40
- package/package.json +6 -2
@@ -40,8 +40,12 @@ import insertNewLine from "./insertNewLine";
|
|
40
40
|
import Divider from "../Elements/Divider/Divider";
|
41
41
|
import { getBorderColor } from "./helper";
|
42
42
|
import Code from "../Elements/EmbedScript/Code";
|
43
|
+
import FreeGrid from "../Elements/FreeGrid/FreeGrid";
|
44
|
+
import FreeGridItem from "../Elements/FreeGrid/FreeGridItem";
|
45
|
+
import FreeGridBox from "../Elements/FreeGrid/FreeGridBox";
|
46
|
+
import { wrapThemeBreakpoints } from "../Elements/FreeGrid/breakpointConstants";
|
43
47
|
import { jsx as _jsx } from "react/jsx-runtime";
|
44
|
-
const alignment = ["alignLeft", "alignRight", "alignCenter"];
|
48
|
+
const alignment = ["alignLeft", "alignRight", "alignCenter", "alignJustify"];
|
45
49
|
const list_types = ["orderedList", "unorderedList"];
|
46
50
|
const LIST_FORMAT_TYPE = {
|
47
51
|
orderedList: "list-item",
|
@@ -160,7 +164,7 @@ export const activeMark = (editor, format) => {
|
|
160
164
|
return null;
|
161
165
|
}
|
162
166
|
};
|
163
|
-
export const getMarked = (leaf, children) => {
|
167
|
+
export const getMarked = (leaf, children, theme) => {
|
164
168
|
const className = leaf?.doublequote ? "doublequote" : "";
|
165
169
|
if (leaf.bold) {
|
166
170
|
children = /*#__PURE__*/_jsx("strong", {
|
@@ -218,10 +222,14 @@ export const getMarked = (leaf, children) => {
|
|
218
222
|
className: className,
|
219
223
|
component: "span",
|
220
224
|
sx: {
|
221
|
-
|
225
|
+
...wrapThemeBreakpoints({
|
222
226
|
lg: sizeMap[leaf.fontSize] || leaf.fontSize,
|
223
227
|
...getBreakPointsValue(leaf.fontSize, null, "overrideText")
|
224
|
-
},
|
228
|
+
}, "fontSize", theme),
|
229
|
+
// fontSize: {
|
230
|
+
// lg: sizeMap[leaf.fontSize] || leaf.fontSize,
|
231
|
+
// ...getBreakPointsValue(leaf.fontSize, null, "overrideText"),
|
232
|
+
// },
|
225
233
|
...textStyles,
|
226
234
|
fontFamily: family,
|
227
235
|
fontWeight: leaf.fontWeight
|
@@ -321,6 +329,18 @@ export const getBlock = props => {
|
|
321
329
|
...element.attr,
|
322
330
|
children: children
|
323
331
|
});
|
332
|
+
case "alignJustify":
|
333
|
+
return /*#__PURE__*/_jsx("div", {
|
334
|
+
style: {
|
335
|
+
display: "flex",
|
336
|
+
alignItems: "center",
|
337
|
+
flexDirection: "column",
|
338
|
+
textAlign: "justify"
|
339
|
+
},
|
340
|
+
...attributes,
|
341
|
+
...element.attr,
|
342
|
+
children: children
|
343
|
+
});
|
324
344
|
case "list-item":
|
325
345
|
const firstChildren = element.children[0] || {};
|
326
346
|
return /*#__PURE__*/_jsx("li", {
|
@@ -407,6 +427,18 @@ export const getBlock = props => {
|
|
407
427
|
return /*#__PURE__*/_jsx(Grid, {
|
408
428
|
...props
|
409
429
|
});
|
430
|
+
case "freegrid":
|
431
|
+
return /*#__PURE__*/_jsx(FreeGrid, {
|
432
|
+
...props
|
433
|
+
});
|
434
|
+
case "freegridItem":
|
435
|
+
return /*#__PURE__*/_jsx(FreeGridItem, {
|
436
|
+
...props
|
437
|
+
});
|
438
|
+
case "freegridBox":
|
439
|
+
return /*#__PURE__*/_jsx(FreeGridBox, {
|
440
|
+
...props
|
441
|
+
});
|
410
442
|
case "grid-item":
|
411
443
|
return /*#__PURE__*/_jsx(GridItem, {
|
412
444
|
...props,
|
@@ -3,6 +3,7 @@ import { toggleBlock } from "./SlateUtilityFunctions";
|
|
3
3
|
import insertNewLine from "./insertNewLine";
|
4
4
|
import { insertAccordion } from "./accordion";
|
5
5
|
import { isListItem } from "./helper";
|
6
|
+
import RnDCtrlCmds from "./RnD/RnDCtrlCmds";
|
6
7
|
import EDITORCMDS from "../common/EditorCmds";
|
7
8
|
const HOTKEYS = {
|
8
9
|
b: "bold",
|
@@ -75,6 +76,10 @@ export const commands = props => {
|
|
75
76
|
} else {
|
76
77
|
Editor.addMark(editor, HOTKEYS[event.key], true);
|
77
78
|
}
|
79
|
+
} else if (RnDCtrlCmds[event.key]) {
|
80
|
+
RnDCtrlCmds[event.key](event, {
|
81
|
+
editor
|
82
|
+
});
|
78
83
|
} else if (EDITORCMDS[event.key]) {
|
79
84
|
EDITORCMDS[event.key](event, {
|
80
85
|
editor,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Transforms } from "slate";
|
2
2
|
import { formField } from "./formfield";
|
3
3
|
import insertNewLine from "./insertNewLine";
|
4
|
-
export const
|
5
|
-
|
4
|
+
export const FORM_NODE = () => {
|
5
|
+
return {
|
6
6
|
type: "form",
|
7
7
|
grid: "container",
|
8
8
|
formName: `form_${new Date().getTime()}`,
|
@@ -23,6 +23,11 @@ export const insertForm = (editor, item) => {
|
|
23
23
|
...formField()
|
24
24
|
}],
|
25
25
|
metadatamapping: "mappingToContactBoard"
|
26
|
+
};
|
27
|
+
};
|
28
|
+
export const insertForm = (editor, item) => {
|
29
|
+
const grid = !item ? {
|
30
|
+
...FORM_NODE()
|
26
31
|
} : item;
|
27
32
|
Transforms.insertNodes(editor, grid);
|
28
33
|
insertNewLine(editor);
|
@@ -0,0 +1,91 @@
|
|
1
|
+
import { Transforms } from "slate";
|
2
|
+
import insertNewLine from "./insertNewLine";
|
3
|
+
import scrollToNewSection from "../helper/RnD/scrollToNewSection";
|
4
|
+
const Default_text_Node = {
|
5
|
+
type: "paragraph",
|
6
|
+
children: [{
|
7
|
+
text: "Effortless Business Growth"
|
8
|
+
}]
|
9
|
+
};
|
10
|
+
export const insertFreeGridItem = (childType, childTypeNode, extProps = {}, type = "freegridItem") => {
|
11
|
+
return {
|
12
|
+
type: type || "freegridItem",
|
13
|
+
childType: childType || "text",
|
14
|
+
children: [childTypeNode || Default_text_Node],
|
15
|
+
gridArea: "1 / 1 / 2 / 2",
|
16
|
+
height: 300,
|
17
|
+
width: 250,
|
18
|
+
left: 401,
|
19
|
+
top: 0,
|
20
|
+
marginTop: 47,
|
21
|
+
left_xs: 24,
|
22
|
+
top_xs: 24,
|
23
|
+
marginTop_xs: 12,
|
24
|
+
width_xs: 250,
|
25
|
+
height_xs: 300,
|
26
|
+
gridArea_xs: "1 / 1 / 2 / 2",
|
27
|
+
sectionBgColor: "rgb(240, 108, 131)",
|
28
|
+
...(extProps || {})
|
29
|
+
};
|
30
|
+
};
|
31
|
+
export const insertFreeGrid = (editor, path, extProps) => {
|
32
|
+
const freegridData = [{
|
33
|
+
type: "freegrid",
|
34
|
+
height: 508,
|
35
|
+
gridTemplateRows: "var(--rows)",
|
36
|
+
gridTemplateColumns: "var(--cols)",
|
37
|
+
children: [{
|
38
|
+
type: "freegridItem",
|
39
|
+
childType: "text",
|
40
|
+
children: [{
|
41
|
+
type: "alignCenter",
|
42
|
+
children: [{
|
43
|
+
type: "paragraph",
|
44
|
+
children: [{
|
45
|
+
text: "Heading One",
|
46
|
+
fontSize: {
|
47
|
+
xs: "38px",
|
48
|
+
sm: "54px",
|
49
|
+
md: "54px",
|
50
|
+
lg: "54px"
|
51
|
+
},
|
52
|
+
fontFamily: "PoppinsBold"
|
53
|
+
}]
|
54
|
+
}]
|
55
|
+
}],
|
56
|
+
gridArea: "2 / 1 / 3 / 2",
|
57
|
+
height: 88,
|
58
|
+
width: 746,
|
59
|
+
left: 129,
|
60
|
+
marginTop: 23,
|
61
|
+
top_xs: 105.1875,
|
62
|
+
left_xs: 22,
|
63
|
+
marginTop_xs: 38,
|
64
|
+
width_xs: 272,
|
65
|
+
height_xs: 163.0078125,
|
66
|
+
gridArea_xs: "2 / 1 / 3 / 2",
|
67
|
+
updated_at: 1728554109479,
|
68
|
+
lg_updatedOn: 1726290562773,
|
69
|
+
xs_updatedOn: 1728554109478
|
70
|
+
}],
|
71
|
+
height_xs: 593.0625,
|
72
|
+
updated_at: 1728554109479,
|
73
|
+
width: 0,
|
74
|
+
sectionBgColor: "rgb(222, 99, 138)",
|
75
|
+
xs_updatedOn: 1727921628092,
|
76
|
+
sectionName: "Home"
|
77
|
+
}];
|
78
|
+
const newPath = path ? path : editor?.selection?.anchor?.path;
|
79
|
+
let upNode = [...freegridData];
|
80
|
+
if (path) {
|
81
|
+
upNode = [{
|
82
|
+
type: "paragraph",
|
83
|
+
children: upNode
|
84
|
+
}];
|
85
|
+
}
|
86
|
+
Transforms.insertNodes(editor, upNode, {
|
87
|
+
at: newPath
|
88
|
+
});
|
89
|
+
scrollToNewSection(editor, newPath, extProps);
|
90
|
+
insertNewLine(editor);
|
91
|
+
};
|
@@ -3,6 +3,7 @@ import { ReactEditor } from "slate-react";
|
|
3
3
|
import insertNewLine from "./insertNewLine";
|
4
4
|
import { getDevice } from "../helper/theme";
|
5
5
|
export const windowVar = {};
|
6
|
+
let ST_TIMEOUT = null;
|
6
7
|
export const formatDate = (date, format = "MM/DD/YYYY") => {
|
7
8
|
if (!date) return "";
|
8
9
|
var d = new Date(date),
|
@@ -398,4 +399,46 @@ export const onDeleteKey = (event, {
|
|
398
399
|
} catch (err) {
|
399
400
|
console.log(err);
|
400
401
|
}
|
402
|
+
};
|
403
|
+
export const selectText = (editor, {
|
404
|
+
path,
|
405
|
+
cursorOnly
|
406
|
+
}, timeout = 10) => {
|
407
|
+
try {
|
408
|
+
clearTimeout(ST_TIMEOUT);
|
409
|
+
ST_TIMEOUT = setTimeout(() => {
|
410
|
+
ReactEditor.focus(editor);
|
411
|
+
const range = Editor.range(editor, path);
|
412
|
+
const textNode = Node.get(editor, path);
|
413
|
+
if (!cursorOnly) {
|
414
|
+
Transforms.select(editor, range);
|
415
|
+
}
|
416
|
+
if (cursorOnly && textNode) {
|
417
|
+
const textLength = Node.string(textNode).length;
|
418
|
+
editor.selection = {
|
419
|
+
anchor: {
|
420
|
+
path: path,
|
421
|
+
offset: textLength
|
422
|
+
},
|
423
|
+
focus: {
|
424
|
+
path: path,
|
425
|
+
offset: textLength
|
426
|
+
}
|
427
|
+
};
|
428
|
+
}
|
429
|
+
ReactEditor.focus(editor);
|
430
|
+
}, timeout);
|
431
|
+
} catch (err) {
|
432
|
+
console.log(err);
|
433
|
+
}
|
434
|
+
};
|
435
|
+
export const isFreeGridFragment = fragments => {
|
436
|
+
const types = ["freegrid", "freegridItem", "freegridBox"];
|
437
|
+
const node = fragments[0] || fragments;
|
438
|
+
const fType = types.includes(node.children[0]?.type) || types.includes(node.type);
|
439
|
+
if (fType) {
|
440
|
+
return true;
|
441
|
+
} else {
|
442
|
+
return false;
|
443
|
+
}
|
401
444
|
};
|
@@ -1,4 +1,48 @@
|
|
1
1
|
import { Editor, Transforms, Path, Range, Element } from "slate";
|
2
|
+
export const appHeaderNode = ({
|
3
|
+
menus
|
4
|
+
}) => {
|
5
|
+
return {
|
6
|
+
type: "app-header",
|
7
|
+
appTitle: "Logo",
|
8
|
+
appLogo: "none",
|
9
|
+
menus: menus || [{
|
10
|
+
type: "menu",
|
11
|
+
url: "home",
|
12
|
+
target: "",
|
13
|
+
text: "Home",
|
14
|
+
linkType: "page"
|
15
|
+
}, {
|
16
|
+
type: "menu",
|
17
|
+
url: "wireframe2",
|
18
|
+
target: "",
|
19
|
+
text: "Wireframe",
|
20
|
+
linkType: "page"
|
21
|
+
}, {
|
22
|
+
type: "menu",
|
23
|
+
url: "https://www.google.com",
|
24
|
+
target: "",
|
25
|
+
text: "Work",
|
26
|
+
linkType: "webAddress"
|
27
|
+
}, {
|
28
|
+
type: "menu",
|
29
|
+
url: "https://www.google.com",
|
30
|
+
target: "",
|
31
|
+
text: "Contact",
|
32
|
+
linkType: "webAddress"
|
33
|
+
}],
|
34
|
+
menuStyle: "stacked",
|
35
|
+
children: [{
|
36
|
+
text: " "
|
37
|
+
}],
|
38
|
+
logoFontSize: "32px",
|
39
|
+
titleFontFamily: "PoppinsBold",
|
40
|
+
bgColor: "rgb(255, 255, 255, 0)",
|
41
|
+
borderColor: "rgba(255, 255, 255, 0)",
|
42
|
+
textColor: "rgb(0, 0, 0)",
|
43
|
+
cellBgColor: "#FFFFFF"
|
44
|
+
};
|
45
|
+
};
|
2
46
|
export const createAppHeaderNode = ({
|
3
47
|
menus
|
4
48
|
}) => ({
|
@@ -7,46 +51,9 @@ export const createAppHeaderNode = ({
|
|
7
51
|
children: [{
|
8
52
|
type: "grid-item",
|
9
53
|
grid: 12,
|
10
|
-
children: [{
|
11
|
-
|
12
|
-
|
13
|
-
appLogo: "none",
|
14
|
-
menus: menus || [{
|
15
|
-
type: "menu",
|
16
|
-
url: "home",
|
17
|
-
target: "",
|
18
|
-
text: "Home",
|
19
|
-
linkType: "page"
|
20
|
-
}, {
|
21
|
-
type: "menu",
|
22
|
-
url: "wireframe2",
|
23
|
-
target: "",
|
24
|
-
text: "Wireframe",
|
25
|
-
linkType: "page"
|
26
|
-
}, {
|
27
|
-
type: "menu",
|
28
|
-
url: "https://www.google.com",
|
29
|
-
target: "",
|
30
|
-
text: "Work",
|
31
|
-
linkType: "webAddress"
|
32
|
-
}, {
|
33
|
-
type: "menu",
|
34
|
-
url: "https://www.google.com",
|
35
|
-
target: "",
|
36
|
-
text: "Contact",
|
37
|
-
linkType: "webAddress"
|
38
|
-
}],
|
39
|
-
menuStyle: "stacked",
|
40
|
-
children: [{
|
41
|
-
text: " "
|
42
|
-
}],
|
43
|
-
logoFontSize: "32px",
|
44
|
-
titleFontFamily: "PoppinsBold",
|
45
|
-
bgColor: "rgb(255, 255, 255, 0)",
|
46
|
-
borderColor: "rgba(255, 255, 255, 0)",
|
47
|
-
textColor: "rgb(0, 0, 0)",
|
48
|
-
cellBgColor: "#FFFFFF"
|
49
|
-
}],
|
54
|
+
children: [...appHeaderNode({
|
55
|
+
menus
|
56
|
+
})],
|
50
57
|
bgColor: "rgba(255, 255, 255, 0)",
|
51
58
|
lockSpacing: true,
|
52
59
|
bannerSpacing: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flozy/editor",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.4",
|
4
4
|
"description": "An Editor for flozy app brain",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -36,6 +36,7 @@
|
|
36
36
|
"react-gcolor-picker": "^1.3.1",
|
37
37
|
"react-icons": "^4.10.1",
|
38
38
|
"react-katex": "^3.0.1",
|
39
|
+
"react-rnd": "^10.4.11",
|
39
40
|
"react-scripts": "5.0.1",
|
40
41
|
"react-signature-canvas": "^1.0.6",
|
41
42
|
"react-slick": "^0.29.0",
|
@@ -46,6 +47,7 @@
|
|
46
47
|
"slate-react": "^0.98.3",
|
47
48
|
"styled-components": "^5.3.11",
|
48
49
|
"use-debounce": "^10.0.0",
|
50
|
+
"wavesurfer.js": "^7.8.6",
|
49
51
|
"web-vitals": "^2.1.4",
|
50
52
|
"y-websocket": "^1.5.0",
|
51
53
|
"yjs": "^13.6.8"
|
@@ -56,6 +58,7 @@
|
|
56
58
|
},
|
57
59
|
"scripts": {
|
58
60
|
"prepare": "husky install .husky",
|
61
|
+
"analyze": "source-map-explorer build/static/js/*.js",
|
59
62
|
"lint": "./node_modules/.bin/eslint --ignore-path .gitignore .",
|
60
63
|
"start": "craco start",
|
61
64
|
"build": "NODE_OPTIONS='--max_old_space_size=4096' craco build",
|
@@ -64,7 +67,7 @@
|
|
64
67
|
"storybook": "storybook dev -p 6006",
|
65
68
|
"build-storybook": "NODE_OPTIONS='--max_old_space_size=4096' storybook build",
|
66
69
|
"publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files",
|
67
|
-
"publish:local": "rm -rf /Users/
|
70
|
+
"publish:local": "rm -rf /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist --copy-files"
|
68
71
|
},
|
69
72
|
"eslintConfig": {
|
70
73
|
"extends": [
|
@@ -112,6 +115,7 @@
|
|
112
115
|
"babel-plugin-named-exports-order": "^0.0.2",
|
113
116
|
"eslint-plugin-storybook": "^0.6.13",
|
114
117
|
"prop-types": "^15.8.1",
|
118
|
+
"source-map-explorer": "^2.5.3",
|
115
119
|
"storybook": "^7.4.0",
|
116
120
|
"webpack": "^5.88.2"
|
117
121
|
},
|