@flozy/editor 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +131 -104
- package/dist/Editor/DialogWrapper.js +3 -0
- package/dist/Editor/Editor.css +27 -36
- package/dist/Editor/Elements/Accordion/AccordionButton.js +13 -12
- package/dist/Editor/Elements/AppHeader/AppHeader.js +2 -2
- package/dist/Editor/Elements/Button/ButtonToolIcon.js +10 -9
- package/dist/Editor/Elements/Button/EditorButton.js +4 -20
- package/dist/Editor/Elements/Carousel/Carousel.js +47 -28
- package/dist/Editor/Elements/Carousel/CarouselButton.js +7 -8
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +133 -0
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +39 -19
- package/dist/Editor/Elements/Color Picker/Styles.js +51 -0
- package/dist/Editor/Elements/Color Picker/defaultColors.js +1 -1
- package/dist/Editor/Elements/Embed/Embed.js +33 -126
- package/dist/Editor/Elements/Embed/Image.js +15 -7
- package/dist/Editor/Elements/Embed/Video.js +12 -5
- package/dist/Editor/Elements/Emoji/EmojiButton.js +73 -0
- package/dist/Editor/Elements/Emoji/EmojiPicker.js +0 -0
- package/dist/Editor/Elements/Form/Form.js +24 -12
- package/dist/Editor/Elements/Form/FormButton.js +11 -9
- package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -0
- package/dist/Editor/Elements/Form/FormField.js +7 -1
- package/dist/Editor/Elements/Grid/Grid.js +15 -4
- package/dist/Editor/Elements/Grid/GridButton.js +52 -29
- package/dist/Editor/Elements/Grid/GridItem.js +30 -19
- package/dist/Editor/Elements/Grid/Styles.js +11 -0
- package/dist/Editor/Elements/List/CheckList.js +57 -0
- package/dist/Editor/Elements/List/CheckListButton.js +24 -0
- package/dist/Editor/Elements/NewLine/NewLineButton.js +14 -14
- package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +17 -60
- package/dist/Editor/Elements/Signature/Signature.js +9 -3
- package/dist/Editor/Elements/Signature/SignatureButton.js +10 -9
- package/dist/Editor/Elements/Signature/SignaturePopup.js +42 -6
- package/dist/Editor/Elements/SimpleText.js +62 -0
- package/dist/Editor/Elements/Table/Styles.js +66 -0
- package/dist/Editor/Elements/Table/Table.js +33 -16
- package/dist/Editor/Elements/Table/TableCell.js +54 -24
- package/dist/Editor/Elements/Table/TableSelector.js +13 -15
- package/dist/Editor/Elements/Table/table.css +0 -10
- package/dist/Editor/Elements/TopBanner/Styles.js +33 -0
- package/dist/Editor/Elements/TopBanner/TopBanner.js +106 -0
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +47 -0
- package/dist/Editor/Styles/EditorStyles.js +50 -0
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +8 -3
- package/dist/Editor/Toolbar/FormatTools/FontFamilyDropdown.js +16 -16
- package/dist/Editor/Toolbar/FormatTools/FontSize.js +17 -17
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -3
- package/dist/Editor/Toolbar/FormatTools/index.js +3 -2
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +101 -0
- package/dist/Editor/Toolbar/Mini/Options/Options.js +17 -0
- package/dist/Editor/Toolbar/Mini/Styles.js +30 -0
- package/dist/Editor/Toolbar/PopupTool/AddElements.js +32 -0
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +115 -0
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +65 -0
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +160 -6
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +263 -80
- package/dist/Editor/Toolbar/PopupTool/index.js +33 -44
- package/dist/Editor/Toolbar/Toolbar.js +178 -134
- package/dist/Editor/Toolbar/styles.css +1 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +83 -34
- package/dist/Editor/assets/svg/AddElementIcon.js +29 -0
- package/dist/Editor/assets/svg/AddTemplateIcon.js +29 -0
- package/dist/Editor/assets/svg/TextIcon.js +29 -0
- package/dist/Editor/common/Icon.js +48 -5
- package/dist/Editor/common/ImageList.js +10 -4
- package/dist/Editor/common/ImageSelector/ImageSelector.js +117 -0
- package/dist/Editor/common/ImageSelector/Options/AddLink.js +44 -0
- package/dist/Editor/common/ImageSelector/Options/ChooseAssets.js +39 -0
- package/dist/Editor/common/ImageSelector/Options/Upload.js +30 -0
- package/dist/Editor/common/ImageSelector/Styles.js +41 -0
- package/dist/Editor/common/ImageUploader.js +19 -8
- package/dist/Editor/common/MentionsPopup/ElementsListCard.js +66 -0
- package/dist/Editor/common/MentionsPopup/MentionsListCard.js +70 -0
- package/dist/Editor/common/MentionsPopup/Styles.js +68 -0
- package/dist/Editor/common/MentionsPopup/index.js +129 -0
- package/dist/Editor/common/Shorthands/elements.js +191 -0
- package/dist/Editor/common/Shorthands/index.js +7 -0
- package/dist/Editor/common/Shorthands/mentions.js +8 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +21 -73
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -20
- package/dist/Editor/common/StyleBuilder/index.js +0 -1
- package/dist/Editor/common/StyleBuilder/tableStyle.js +9 -5
- package/dist/Editor/common/ToolbarIcon.js +43 -0
- package/dist/Editor/common/Uploader.js +10 -7
- package/dist/Editor/common/iconslist.js +46 -1
- package/dist/Editor/hooks/useMentions.js +104 -17
- package/dist/Editor/hooks/useMouseMove.js +53 -0
- package/dist/Editor/hooks/useScroll.js +26 -0
- package/dist/Editor/plugins/withEmbeds.js +12 -0
- package/dist/Editor/service/fileupload.js +2 -2
- package/dist/Editor/utils/SlateUtilityFunctions.js +61 -10
- package/dist/Editor/utils/carousel.js +5 -2
- package/dist/Editor/utils/carouselItem.js +2 -2
- package/dist/Editor/utils/customHooks/useResize.js +2 -3
- package/dist/Editor/utils/customHooks/useTableResize.js +2 -1
- package/dist/Editor/utils/embed.js +19 -5
- package/dist/Editor/utils/emoji.js +8 -0
- package/dist/Editor/utils/events.js +49 -12
- package/dist/Editor/utils/form.js +3 -9
- package/dist/Editor/utils/formfield.js +2 -1
- package/dist/Editor/utils/grid.js +44 -8
- package/dist/Editor/utils/gridItem.js +4 -3
- package/dist/Editor/utils/insertNewLine.js +12 -0
- package/dist/Editor/utils/mentions.js +14 -10
- package/dist/Editor/utils/pageSettings.js +67 -0
- package/dist/Editor/utils/signature.js +6 -8
- package/dist/Editor/utils/table.js +79 -18
- package/dist/Editor/utils/topBanner.js +58 -0
- package/package.json +4 -1
- package/dist/Editor/common/MentionsPopup.js +0 -56
@@ -4,25 +4,29 @@ import { createEditor, Transforms } from "slate";
|
|
4
4
|
import { Slate, Editable, ReactEditor } from "slate-react";
|
5
5
|
import { DndContext, DragOverlay } from "@dnd-kit/core";
|
6
6
|
import { useDebounce } from "use-debounce";
|
7
|
-
// import
|
8
|
-
|
9
|
-
import Toolbar from "./Toolbar/Toolbar";
|
7
|
+
// import Toolbar from "./Toolbar/Toolbar";
|
10
8
|
import { getMarked, getBlock } from "./utils/SlateUtilityFunctions";
|
11
9
|
import CodeToText from "./Elements/CodeToText/CodeToText";
|
12
10
|
import { draftToSlate } from "./utils/draftToSlate";
|
13
11
|
import useMentions from "./hooks/useMentions";
|
14
12
|
import MentionsPopup from "./common/MentionsPopup";
|
15
13
|
import { RemoteCursorOverlay } from "./RemoteCursorOverlay/Overlay";
|
16
|
-
import { mentionsEvent, commands } from "./utils/events";
|
14
|
+
import { mentionsEvent, commands, indentation, escapeEvent } from "./utils/events";
|
17
15
|
import withCommon from "./hooks/withCommon";
|
18
16
|
import DialogWrapper from "./DialogWrapper";
|
19
17
|
import { serialize } from "./utils/serializer";
|
18
|
+
import { getPageSettings } from "./utils/pageSettings";
|
20
19
|
import { customCollisionDetectionAlgorithm, getThumbnailImage } from "./helper";
|
21
20
|
import PopupTool from "./Toolbar/PopupTool";
|
22
21
|
import "./font.css";
|
23
22
|
import "./Editor.css";
|
24
|
-
import {
|
23
|
+
import { Box } from "@mui/material";
|
25
24
|
import { KeyboardDoubleArrowDown, KeyboardDoubleArrowLeft, KeyboardDoubleArrowRight, KeyboardDoubleArrowUp } from "@mui/icons-material";
|
25
|
+
import Shorthands from "./common/Shorthands";
|
26
|
+
import MiniToolbar from "./Toolbar/Mini/MiniToolbar";
|
27
|
+
import { EditorProvider } from "./hooks/useMouseMove";
|
28
|
+
import TopBanner from "./Elements/TopBanner/TopBanner";
|
29
|
+
import editorStyles from "./Styles/EditorStyles";
|
26
30
|
import { jsx as _jsx } from "react/jsx-runtime";
|
27
31
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
28
32
|
const PREVIEW_IMAGE_HIDE_CLASS = ["grid-container-toolbar", "grid-item-toolbar", "element-toolbar"];
|
@@ -66,6 +70,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
66
70
|
otherProps
|
67
71
|
} = props;
|
68
72
|
const editorWrapper = useRef();
|
73
|
+
const mentionsRef = useRef();
|
69
74
|
const convertedContent = draftToSlate({
|
70
75
|
data: content
|
71
76
|
});
|
@@ -88,19 +93,24 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
88
93
|
editorClass
|
89
94
|
} = otherProps || {};
|
90
95
|
const [drag, setDrag] = useState(null);
|
96
|
+
const classes = editorStyles({
|
97
|
+
padHeight: !fullScreen ? otherProps?.padHeight : 120
|
98
|
+
});
|
91
99
|
const editor = useMemo(() => {
|
92
100
|
if (collaborativeEditor) return collaborativeEditor;
|
93
101
|
return withCommon(createEditor(), {
|
94
102
|
needLayout
|
95
103
|
});
|
96
104
|
}, [collaborativeEditor]);
|
97
|
-
const pageSettings = editor?.children?.find(f => f.type === "page-settings");
|
98
105
|
const {
|
99
|
-
|
100
|
-
} =
|
106
|
+
element: pageSt
|
107
|
+
} = getPageSettings(editor) || {};
|
101
108
|
const {
|
102
|
-
bannerSpacing
|
103
|
-
|
109
|
+
bannerSpacing,
|
110
|
+
pageBgImage,
|
111
|
+
pageColor,
|
112
|
+
pageWidth
|
113
|
+
} = pageSt?.pageProps || {
|
104
114
|
bannerSpacing: {
|
105
115
|
left: 0,
|
106
116
|
right: 0,
|
@@ -199,7 +209,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
199
209
|
});
|
200
210
|
},
|
201
211
|
getPageSettings: {
|
202
|
-
background:
|
212
|
+
background: pageBgImage && pageBgImage !== "none" ? `url(${pageBgImage})` : pageColor || "#fff"
|
203
213
|
}
|
204
214
|
}));
|
205
215
|
const [htmlAction, setHtmlAction] = useState({
|
@@ -215,9 +225,13 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
215
225
|
const {
|
216
226
|
search,
|
217
227
|
target,
|
218
|
-
index
|
228
|
+
index,
|
229
|
+
type
|
219
230
|
} = mentions;
|
220
|
-
const chars =
|
231
|
+
const chars = type ? Shorthands[type]({
|
232
|
+
...mentions,
|
233
|
+
CHARACTERS
|
234
|
+
}) : [];
|
221
235
|
const handleEditorChange = newValue => {
|
222
236
|
setValue(newValue);
|
223
237
|
if (!isInteracted) {
|
@@ -262,17 +276,27 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
262
276
|
setMentions,
|
263
277
|
chars,
|
264
278
|
target,
|
265
|
-
editor
|
279
|
+
editor,
|
280
|
+
type,
|
281
|
+
mentionsRef
|
266
282
|
});
|
267
283
|
} else if (isCtrlKey) {
|
268
284
|
commands({
|
269
285
|
event,
|
270
286
|
editor
|
271
287
|
});
|
272
|
-
} else {
|
273
|
-
|
288
|
+
} else if (event.key === "Tab") {
|
289
|
+
event.preventDefault();
|
290
|
+
indentation({
|
291
|
+
editor
|
292
|
+
});
|
293
|
+
} else if (event.key === "Escape") {
|
294
|
+
event.preventDefault();
|
295
|
+
escapeEvent({
|
296
|
+
editor
|
297
|
+
});
|
274
298
|
}
|
275
|
-
}, [chars, editor, target, mentions, setMentions]);
|
299
|
+
}, [chars, editor, target, mentions, setMentions, search, type, mentionsRef]);
|
276
300
|
const handleDragStart = e => {
|
277
301
|
try {
|
278
302
|
const {
|
@@ -391,97 +415,100 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
391
415
|
return /*#__PURE__*/_jsx(KeyboardDoubleArrowLeft, {});
|
392
416
|
}
|
393
417
|
};
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
418
|
+
const renderTopBanner = () => {
|
419
|
+
const tb = editor.children[0];
|
420
|
+
return tb?.type === "topbanner" ? /*#__PURE__*/_jsx(TopBanner, {
|
421
|
+
element: tb,
|
422
|
+
editor: editor,
|
423
|
+
customProps: customProps
|
424
|
+
}) : null;
|
425
|
+
};
|
426
|
+
return /*#__PURE__*/_jsx(EditorProvider, {
|
427
|
+
children: /*#__PURE__*/_jsx(DialogWrapper, {
|
428
|
+
...props,
|
429
|
+
fullScreen: fullScreen,
|
430
|
+
footer: footer || "",
|
431
|
+
children: /*#__PURE__*/_jsx(Box, {
|
432
|
+
component: "div",
|
433
|
+
className: `${editorClass || ""}`,
|
434
|
+
sx: classes.root,
|
435
|
+
style: {
|
436
|
+
...dotBg
|
437
|
+
},
|
438
|
+
children: /*#__PURE__*/_jsxs(Slate, {
|
439
|
+
editor: editor,
|
440
|
+
initialValue: value,
|
441
|
+
onChange: handleEditorChange,
|
442
|
+
children: [/*#__PURE__*/_jsxs(DndContext, {
|
443
|
+
collisionDetection: customCollisionDetectionAlgorithm,
|
444
|
+
onDragStart: handleDragStart,
|
445
|
+
onDragEnd: handleDragEnd,
|
446
|
+
children: [/*#__PURE__*/_jsx(Overlay, {
|
447
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
448
|
+
sx: classes.slateWrapper,
|
449
|
+
id: "slate-wrapper-scroll-container",
|
450
|
+
children: [renderTopBanner(), /*#__PURE__*/_jsx("div", {
|
451
|
+
className: "scroll-area",
|
452
|
+
children: /*#__PURE__*/_jsxs("div", {
|
453
|
+
ref: editorWrapper,
|
454
|
+
className: `editor-wrapper`,
|
455
|
+
style: {
|
456
|
+
backgroundColor: pageColor || "#FFF",
|
457
|
+
paddingLeft: `${bannerSpacing?.left || 12}px`,
|
458
|
+
paddingRight: `${bannerSpacing?.right || 12}px`,
|
459
|
+
paddingTop: `${bannerSpacing?.top}px`,
|
460
|
+
paddingBottom: `${bannerSpacing?.bottom}px`,
|
461
|
+
width: !pageWidth || pageWidth === "fixed" ? "60%" : "80%",
|
462
|
+
// width: viewport.w ? `${viewport.w}px` : "100%",
|
463
|
+
height: viewport.h ? `${viewport.h}px` : `100%`,
|
464
|
+
alignSelf: "center",
|
465
|
+
transformOrigin: "left top",
|
466
|
+
transition: "all 0.3s",
|
467
|
+
minHeight: "87%"
|
468
|
+
},
|
469
|
+
children: [/*#__PURE__*/_jsx(PopupTool, {
|
470
|
+
onDrawerOpen: onDrawerOpen
|
471
|
+
}), /*#__PURE__*/_jsx(Editable, {
|
472
|
+
className: "innert-editor-textbox",
|
473
|
+
readOnly: isReadOnly,
|
474
|
+
renderElement: renderElement,
|
475
|
+
renderLeaf: renderLeaf,
|
476
|
+
onKeyDown: onKeyDown
|
477
|
+
}), /*#__PURE__*/_jsx(MentionsPopup, {
|
478
|
+
ref: mentionsRef,
|
479
|
+
mentions: mentions,
|
480
|
+
setMentions: setMentions,
|
481
|
+
editor: editor,
|
482
|
+
target: target,
|
483
|
+
index: index,
|
484
|
+
chars: chars,
|
485
|
+
type: type
|
486
|
+
})]
|
487
|
+
})
|
488
|
+
}), /*#__PURE__*/_jsx(MiniToolbar, {
|
489
|
+
customProps: customProps,
|
490
|
+
toolbarOptions: toolbarOptions
|
491
|
+
})]
|
492
|
+
})
|
493
|
+
}), /*#__PURE__*/_jsx(DragOverlay, {
|
494
|
+
className: "drag-overlay",
|
434
495
|
style: {
|
435
|
-
|
436
|
-
backgroundColor: "unset",
|
437
|
-
color: pageProps?.color || "#000",
|
438
|
-
paddingLeft: `${bannerSpacing?.left}px`,
|
439
|
-
paddingRight: `${bannerSpacing?.right}px`,
|
440
|
-
paddingTop: `${bannerSpacing?.top}px`,
|
441
|
-
paddingBottom: `${bannerSpacing?.bottom}px`,
|
442
|
-
width: viewport.w ? `${viewport.w}px` : "100%",
|
443
|
-
height: viewport.h ? `${viewport.h}px` : "auto",
|
444
|
-
alignSelf: "center",
|
445
|
-
// scale: isDrawerOpen ? "0.75" : "1",
|
446
|
-
transformOrigin: "left top",
|
447
|
-
transition: "all 0.3s"
|
496
|
+
...(drag?.style || {})
|
448
497
|
},
|
449
|
-
children:
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
renderLeaf: renderLeaf,
|
457
|
-
onKeyDown: onKeyDown
|
458
|
-
}), /*#__PURE__*/_jsx(MentionsPopup, {
|
459
|
-
mentions: mentions,
|
460
|
-
setMentions: setMentions,
|
461
|
-
editor: editor,
|
462
|
-
target: target,
|
463
|
-
index: index,
|
464
|
-
chars: chars
|
465
|
-
})]
|
498
|
+
children: drag ? /*#__PURE__*/_jsx(Item, {
|
499
|
+
children: /*#__PURE__*/_jsx("div", {
|
500
|
+
dangerouslySetInnerHTML: {
|
501
|
+
__html: drag?.dom
|
502
|
+
}
|
503
|
+
})
|
504
|
+
}) : null
|
466
505
|
})]
|
467
|
-
}), /*#__PURE__*/_jsx(
|
468
|
-
|
469
|
-
|
470
|
-
...(drag?.style || {})
|
471
|
-
},
|
472
|
-
children: drag ? /*#__PURE__*/_jsx(Item, {
|
473
|
-
children: /*#__PURE__*/_jsx("div", {
|
474
|
-
dangerouslySetInnerHTML: {
|
475
|
-
__html: drag?.dom
|
476
|
-
}
|
477
|
-
})
|
478
|
-
}) : null
|
506
|
+
}), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
|
507
|
+
...htmlAction,
|
508
|
+
handleCodeToText: handleCodeToText
|
479
509
|
})]
|
480
|
-
}
|
481
|
-
|
482
|
-
handleCodeToText: handleCodeToText
|
483
|
-
})]
|
484
|
-
}, id)
|
510
|
+
}, id)
|
511
|
+
})
|
485
512
|
})
|
486
513
|
});
|
487
514
|
});
|
@@ -17,6 +17,9 @@ const DialogWrapper = props => {
|
|
17
17
|
open: fullScreen,
|
18
18
|
fullScreen: fullScreen,
|
19
19
|
onClose: onClose,
|
20
|
+
style: {
|
21
|
+
zIndex: 1000
|
22
|
+
},
|
20
23
|
children: [/*#__PURE__*/_jsx(DialogTitle, {
|
21
24
|
children: /*#__PURE__*/_jsx(Grid, {
|
22
25
|
children: /*#__PURE__*/_jsx(Grid, {
|
package/dist/Editor/Editor.css
CHANGED
@@ -21,12 +21,12 @@
|
|
21
21
|
}
|
22
22
|
|
23
23
|
blockquote {
|
24
|
-
border-left:
|
24
|
+
border-left: 3px solid transparent;
|
25
25
|
margin-left: 0;
|
26
26
|
margin-right: 0;
|
27
27
|
padding-left: 10px;
|
28
|
-
color: #
|
29
|
-
|
28
|
+
color: #000;
|
29
|
+
margin: 0px;
|
30
30
|
}
|
31
31
|
|
32
32
|
.editor-wrapper table,
|
@@ -61,11 +61,6 @@ blockquote {
|
|
61
61
|
/* width:100%; */
|
62
62
|
}
|
63
63
|
|
64
|
-
.editor-wrapper td {
|
65
|
-
height: 50px;
|
66
|
-
padding: 0 5px;
|
67
|
-
}
|
68
|
-
|
69
64
|
.popup-wrapper1 {
|
70
65
|
display: inline;
|
71
66
|
position: relative;
|
@@ -125,7 +120,7 @@ blockquote {
|
|
125
120
|
}
|
126
121
|
|
127
122
|
.grid-container-toolbar {
|
128
|
-
right: -
|
123
|
+
right: -32px;
|
129
124
|
top: 0;
|
130
125
|
bottom: 0;
|
131
126
|
margin: auto;
|
@@ -143,10 +138,6 @@ blockquote {
|
|
143
138
|
z-index: 1000;
|
144
139
|
}
|
145
140
|
|
146
|
-
.element-toolbar button:first-child {
|
147
|
-
margin-right: 2px;
|
148
|
-
}
|
149
|
-
|
150
141
|
.grid-container-toolbar button,
|
151
142
|
.grid-item-toolbar button,
|
152
143
|
.element-toolbar button {
|
@@ -154,15 +145,16 @@ blockquote {
|
|
154
145
|
border: 1px solid rgba(37, 99, 235, 0.32);
|
155
146
|
background: #fff;
|
156
147
|
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.16);
|
157
|
-
|
158
|
-
/* background-color: #2684ff; */
|
159
|
-
/* color: #FFFFFF; */
|
160
148
|
font-size: 12px;
|
161
149
|
margin-bottom: 2px;
|
162
|
-
width: 36px;
|
163
|
-
height: 36px;
|
164
150
|
padding: 6px;
|
165
151
|
}
|
152
|
+
.element-toolbar button svg,
|
153
|
+
.grid-container-toolbar button svg,
|
154
|
+
.grid-item-toolbar button svg {
|
155
|
+
width: 16px;
|
156
|
+
height: 16px;
|
157
|
+
}
|
166
158
|
|
167
159
|
.grid-container-toolbar button:hover,
|
168
160
|
.grid-item-toolbar button:hover,
|
@@ -225,10 +217,13 @@ blockquote {
|
|
225
217
|
padding: 8px 12px;
|
226
218
|
color: #ffffff;
|
227
219
|
font-weight: bold;
|
228
|
-
border-radius: 12px;
|
229
220
|
opacity: 1;
|
230
221
|
}
|
231
222
|
|
223
|
+
.signature-btn-container button:hover {
|
224
|
+
background-color: #0052cc;
|
225
|
+
}
|
226
|
+
|
232
227
|
.signature-btn-grps {
|
233
228
|
display: flex;
|
234
229
|
justify-content: space-around;
|
@@ -277,10 +272,14 @@ blockquote {
|
|
277
272
|
|
278
273
|
.signature-signed-wrapper .signed-btn-del {
|
279
274
|
position: absolute;
|
280
|
-
right:
|
281
|
-
top:
|
275
|
+
right: 0px;
|
276
|
+
top: 0px;
|
282
277
|
opacity: 1;
|
283
278
|
z-index: 1;
|
279
|
+
display: none;
|
280
|
+
}
|
281
|
+
.signature-signed-wrapper:hover .signed-btn-del {
|
282
|
+
display: block;
|
284
283
|
}
|
285
284
|
|
286
285
|
.signed-btn {
|
@@ -391,13 +390,16 @@ blockquote {
|
|
391
390
|
display: flex;
|
392
391
|
flex-direction: column;
|
393
392
|
overflow-x: auto;
|
393
|
+
border: 1px solid rgba(37, 99, 235, 0.32);
|
394
394
|
}
|
395
395
|
|
396
|
-
.empty-carousel-wrapper
|
396
|
+
.empty-carousel-wrapper .carousel-item {
|
397
397
|
display: flex;
|
398
398
|
flex-direction: column;
|
399
399
|
flex-shrink: 0;
|
400
|
-
border: 1px solid
|
400
|
+
border-bottom: 1px solid rgba(37, 99, 235, 0.32);
|
401
|
+
margin: 12px;
|
402
|
+
padding-bottom: 24px;
|
401
403
|
}
|
402
404
|
|
403
405
|
.empty-carousel-wrapper .carousel-item-inner {
|
@@ -570,16 +572,6 @@ blockquote {
|
|
570
572
|
display: flex !important;
|
571
573
|
}
|
572
574
|
|
573
|
-
.page-builder .editor-wrapper {
|
574
|
-
max-width: 80%;
|
575
|
-
margin-top: 100px;
|
576
|
-
}
|
577
|
-
|
578
|
-
.top-left-editor-wrapper,
|
579
|
-
.top-right-editor-wrapper {
|
580
|
-
margin-top: 100px;
|
581
|
-
}
|
582
|
-
|
583
575
|
.left-top-editor-wrapper,
|
584
576
|
.left-bottom-editor-wrapper {
|
585
577
|
margin-top: 1%;
|
@@ -716,7 +708,7 @@ blockquote {
|
|
716
708
|
}
|
717
709
|
|
718
710
|
.element-toolbar button {
|
719
|
-
margin-right:
|
711
|
+
margin-right: 4px;
|
720
712
|
}
|
721
713
|
|
722
714
|
.empty-carousel-wrapper .element-selector {
|
@@ -866,7 +858,6 @@ blockquote {
|
|
866
858
|
|
867
859
|
.tools-drawer .MuiTypography-root {
|
868
860
|
color: #000000;
|
869
|
-
font-weight: bold !important;
|
870
861
|
}
|
871
862
|
|
872
863
|
.img_upload_btn_list .btn--wrpr {
|
@@ -876,4 +867,4 @@ blockquote {
|
|
876
867
|
/** to avoid line space **/
|
877
868
|
.page-settings {
|
878
869
|
height: 0px;
|
879
|
-
}
|
870
|
+
}
|
@@ -1,25 +1,26 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { IconButton, Tooltip } from "@mui/material";
|
3
2
|
import { insertAccordion } from "../../utils/accordion";
|
4
|
-
import
|
3
|
+
import ToolbarIcon from "../../common/ToolbarIcon";
|
4
|
+
import Icon from "../../common/Icon";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
const AccordionButton = props => {
|
7
7
|
const {
|
8
|
-
editor
|
8
|
+
editor,
|
9
|
+
icoBtnType
|
9
10
|
} = props;
|
10
11
|
const handleInsertAccordion = () => {
|
11
12
|
insertAccordion(editor);
|
12
13
|
};
|
13
|
-
return /*#__PURE__*/_jsx(
|
14
|
+
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
15
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
16
|
+
icon: "accordion"
|
17
|
+
}),
|
14
18
|
title: "Accordion",
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
},
|
21
|
-
children: /*#__PURE__*/_jsx(AccordionIcon, {})
|
22
|
-
})
|
19
|
+
onClick: handleInsertAccordion,
|
20
|
+
style: {
|
21
|
+
marginLeft: "0px"
|
22
|
+
},
|
23
|
+
icoBtnType: icoBtnType
|
23
24
|
});
|
24
25
|
};
|
25
26
|
export default AccordionButton;
|
@@ -1,22 +1,23 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { IconButton, Tooltip } from "@mui/material";
|
3
2
|
import { insertButton } from "../../utils/button";
|
4
|
-
import
|
3
|
+
import ToolbarIcon from "../../common/ToolbarIcon";
|
4
|
+
import Icon from "../../common/Icon";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
const ButtonToolIcon = props => {
|
7
7
|
const {
|
8
|
-
editor
|
8
|
+
editor,
|
9
|
+
icoBtnType
|
9
10
|
} = props;
|
10
11
|
const handleInsertButton = () => {
|
11
12
|
insertButton(editor);
|
12
13
|
};
|
13
|
-
return /*#__PURE__*/_jsx(
|
14
|
+
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
14
15
|
title: "Button",
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
onClick: handleInsertButton,
|
17
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
18
|
+
icon: "button"
|
19
|
+
}),
|
20
|
+
icoBtnType: icoBtnType
|
20
21
|
});
|
21
22
|
};
|
22
23
|
export default ButtonToolIcon;
|
@@ -63,10 +63,10 @@ const EditorButton = props => {
|
|
63
63
|
const BtnIcon = buttonIcon ? fIcons[buttonIcon] : null;
|
64
64
|
const onClick = async e => {
|
65
65
|
if (readOnly) {
|
66
|
-
if (
|
67
|
-
metadata
|
68
|
-
|
69
|
-
if (redirectOnURLResult) {
|
66
|
+
if (linkType === "actionTrigger") {
|
67
|
+
if (metadata?.buttonLink?.handler) {
|
68
|
+
metadata.buttonLink.handler("click");
|
69
|
+
} else if (redirectOnURLResult) {
|
70
70
|
// call api and redirect based on api result
|
71
71
|
const apiResult = await actionButtonRedirect({}, {
|
72
72
|
url: buttonLink?.url
|
@@ -168,22 +168,6 @@ const EditorButton = props => {
|
|
168
168
|
paddingLeft: "4px",
|
169
169
|
paddingRight: "4px"
|
170
170
|
}
|
171
|
-
}), !readOnly && /*#__PURE__*/_jsxs("div", {
|
172
|
-
className: `element-selector ${anchorEl ? "selected" : ""}`,
|
173
|
-
contentEditable: false,
|
174
|
-
children: [/*#__PURE__*/_jsx("div", {
|
175
|
-
className: "element-selector-dots tl",
|
176
|
-
children: " "
|
177
|
-
}), /*#__PURE__*/_jsx("div", {
|
178
|
-
className: "element-selector-dots tr",
|
179
|
-
children: " "
|
180
|
-
}), /*#__PURE__*/_jsx("div", {
|
181
|
-
className: "element-selector-dots bl",
|
182
|
-
children: " "
|
183
|
-
}), /*#__PURE__*/_jsx("div", {
|
184
|
-
className: "element-selector-dots br",
|
185
|
-
children: " "
|
186
|
-
})]
|
187
171
|
})]
|
188
172
|
})
|
189
173
|
}), /*#__PURE__*/_jsx("div", {
|