@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.
Files changed (110) hide show
  1. package/dist/Editor/CommonEditor.js +131 -104
  2. package/dist/Editor/DialogWrapper.js +3 -0
  3. package/dist/Editor/Editor.css +27 -36
  4. package/dist/Editor/Elements/Accordion/AccordionButton.js +13 -12
  5. package/dist/Editor/Elements/AppHeader/AppHeader.js +2 -2
  6. package/dist/Editor/Elements/Button/ButtonToolIcon.js +10 -9
  7. package/dist/Editor/Elements/Button/EditorButton.js +4 -20
  8. package/dist/Editor/Elements/Carousel/Carousel.js +47 -28
  9. package/dist/Editor/Elements/Carousel/CarouselButton.js +7 -8
  10. package/dist/Editor/Elements/Color Picker/ColorButtons.js +133 -0
  11. package/dist/Editor/Elements/Color Picker/ColorPicker.js +39 -19
  12. package/dist/Editor/Elements/Color Picker/Styles.js +51 -0
  13. package/dist/Editor/Elements/Color Picker/defaultColors.js +1 -1
  14. package/dist/Editor/Elements/Embed/Embed.js +33 -126
  15. package/dist/Editor/Elements/Embed/Image.js +15 -7
  16. package/dist/Editor/Elements/Embed/Video.js +12 -5
  17. package/dist/Editor/Elements/Emoji/EmojiButton.js +73 -0
  18. package/dist/Editor/Elements/Emoji/EmojiPicker.js +0 -0
  19. package/dist/Editor/Elements/Form/Form.js +24 -12
  20. package/dist/Editor/Elements/Form/FormButton.js +11 -9
  21. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -0
  22. package/dist/Editor/Elements/Form/FormField.js +7 -1
  23. package/dist/Editor/Elements/Grid/Grid.js +15 -4
  24. package/dist/Editor/Elements/Grid/GridButton.js +52 -29
  25. package/dist/Editor/Elements/Grid/GridItem.js +30 -19
  26. package/dist/Editor/Elements/Grid/Styles.js +11 -0
  27. package/dist/Editor/Elements/List/CheckList.js +57 -0
  28. package/dist/Editor/Elements/List/CheckListButton.js +24 -0
  29. package/dist/Editor/Elements/NewLine/NewLineButton.js +14 -14
  30. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +17 -60
  31. package/dist/Editor/Elements/Signature/Signature.js +9 -3
  32. package/dist/Editor/Elements/Signature/SignatureButton.js +10 -9
  33. package/dist/Editor/Elements/Signature/SignaturePopup.js +42 -6
  34. package/dist/Editor/Elements/SimpleText.js +62 -0
  35. package/dist/Editor/Elements/Table/Styles.js +66 -0
  36. package/dist/Editor/Elements/Table/Table.js +33 -16
  37. package/dist/Editor/Elements/Table/TableCell.js +54 -24
  38. package/dist/Editor/Elements/Table/TableSelector.js +13 -15
  39. package/dist/Editor/Elements/Table/table.css +0 -10
  40. package/dist/Editor/Elements/TopBanner/Styles.js +33 -0
  41. package/dist/Editor/Elements/TopBanner/TopBanner.js +106 -0
  42. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +47 -0
  43. package/dist/Editor/Styles/EditorStyles.js +50 -0
  44. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +8 -3
  45. package/dist/Editor/Toolbar/FormatTools/FontFamilyDropdown.js +16 -16
  46. package/dist/Editor/Toolbar/FormatTools/FontSize.js +17 -17
  47. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -3
  48. package/dist/Editor/Toolbar/FormatTools/index.js +3 -2
  49. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +101 -0
  50. package/dist/Editor/Toolbar/Mini/Options/Options.js +17 -0
  51. package/dist/Editor/Toolbar/Mini/Styles.js +30 -0
  52. package/dist/Editor/Toolbar/PopupTool/AddElements.js +32 -0
  53. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +115 -0
  54. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +65 -0
  55. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +160 -6
  56. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +263 -80
  57. package/dist/Editor/Toolbar/PopupTool/index.js +33 -44
  58. package/dist/Editor/Toolbar/Toolbar.js +178 -134
  59. package/dist/Editor/Toolbar/styles.css +1 -1
  60. package/dist/Editor/Toolbar/toolbarGroups.js +83 -34
  61. package/dist/Editor/assets/svg/AddElementIcon.js +29 -0
  62. package/dist/Editor/assets/svg/AddTemplateIcon.js +29 -0
  63. package/dist/Editor/assets/svg/TextIcon.js +29 -0
  64. package/dist/Editor/common/Icon.js +48 -5
  65. package/dist/Editor/common/ImageList.js +10 -4
  66. package/dist/Editor/common/ImageSelector/ImageSelector.js +117 -0
  67. package/dist/Editor/common/ImageSelector/Options/AddLink.js +44 -0
  68. package/dist/Editor/common/ImageSelector/Options/ChooseAssets.js +39 -0
  69. package/dist/Editor/common/ImageSelector/Options/Upload.js +30 -0
  70. package/dist/Editor/common/ImageSelector/Styles.js +41 -0
  71. package/dist/Editor/common/ImageUploader.js +19 -8
  72. package/dist/Editor/common/MentionsPopup/ElementsListCard.js +66 -0
  73. package/dist/Editor/common/MentionsPopup/MentionsListCard.js +70 -0
  74. package/dist/Editor/common/MentionsPopup/Styles.js +68 -0
  75. package/dist/Editor/common/MentionsPopup/index.js +129 -0
  76. package/dist/Editor/common/Shorthands/elements.js +191 -0
  77. package/dist/Editor/common/Shorthands/index.js +7 -0
  78. package/dist/Editor/common/Shorthands/mentions.js +8 -0
  79. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +21 -73
  80. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +3 -20
  81. package/dist/Editor/common/StyleBuilder/index.js +0 -1
  82. package/dist/Editor/common/StyleBuilder/tableStyle.js +9 -5
  83. package/dist/Editor/common/ToolbarIcon.js +43 -0
  84. package/dist/Editor/common/Uploader.js +10 -7
  85. package/dist/Editor/common/iconslist.js +46 -1
  86. package/dist/Editor/hooks/useMentions.js +104 -17
  87. package/dist/Editor/hooks/useMouseMove.js +53 -0
  88. package/dist/Editor/hooks/useScroll.js +26 -0
  89. package/dist/Editor/plugins/withEmbeds.js +12 -0
  90. package/dist/Editor/service/fileupload.js +2 -2
  91. package/dist/Editor/utils/SlateUtilityFunctions.js +61 -10
  92. package/dist/Editor/utils/carousel.js +5 -2
  93. package/dist/Editor/utils/carouselItem.js +2 -2
  94. package/dist/Editor/utils/customHooks/useResize.js +2 -3
  95. package/dist/Editor/utils/customHooks/useTableResize.js +2 -1
  96. package/dist/Editor/utils/embed.js +19 -5
  97. package/dist/Editor/utils/emoji.js +8 -0
  98. package/dist/Editor/utils/events.js +49 -12
  99. package/dist/Editor/utils/form.js +3 -9
  100. package/dist/Editor/utils/formfield.js +2 -1
  101. package/dist/Editor/utils/grid.js +44 -8
  102. package/dist/Editor/utils/gridItem.js +4 -3
  103. package/dist/Editor/utils/insertNewLine.js +12 -0
  104. package/dist/Editor/utils/mentions.js +14 -10
  105. package/dist/Editor/utils/pageSettings.js +67 -0
  106. package/dist/Editor/utils/signature.js +6 -8
  107. package/dist/Editor/utils/table.js +79 -18
  108. package/dist/Editor/utils/topBanner.js +58 -0
  109. package/package.json +4 -1
  110. 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 { onKeyDown as linkifyOnKeyDown } from '@mercuriya/slate-linkify';
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 { Checkbox } from "@mui/material";
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
- pageProps
100
- } = pageSettings || {};
106
+ element: pageSt
107
+ } = getPageSettings(editor) || {};
101
108
  const {
102
- bannerSpacing
103
- } = pageProps || {
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: pageProps?.pageBgImage && pageProps?.pageBgImage !== "none" ? `url(${pageProps?.pageBgImage})` : pageProps?.pageColor || "unset"
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 = CHARACTERS.filter(c => c.name.toLowerCase().startsWith(search?.toLowerCase())).slice(0, 10);
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
- // linkifyOnKeyDown(event, editor);
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
- return /*#__PURE__*/_jsx(DialogWrapper, {
395
- ...props,
396
- fullScreen: fullScreen,
397
- footer: footer || "",
398
- children: /*#__PURE__*/_jsx("div", {
399
- className: `editor-t-wrapper ${editorClass || ""} ${!toolbarShow ? "editor-wrapper-toolbar-closed" : ""}`,
400
- style: {
401
- display: "flex",
402
- flexDirection: "column",
403
- padding: "0 8px",
404
- ...dotBg
405
- },
406
- children: /*#__PURE__*/_jsxs(Slate, {
407
- editor: editor,
408
- initialValue: value,
409
- onChange: handleEditorChange,
410
- children: [/*#__PURE__*/_jsxs(DndContext, {
411
- collisionDetection: customCollisionDetectionAlgorithm,
412
- onDragStart: handleDragStart,
413
- onDragEnd: handleDragEnd,
414
- children: [/*#__PURE__*/_jsxs(Overlay, {
415
- children: [/*#__PURE__*/_jsxs("div", {
416
- className: `toolbar-wrapper ${toolbarOptions?.toolbarPosition} ${toolbarOptions?.toolbarPosition}-toolbar-wrapper`,
417
- children: [toolbarOptions?.needToolbarToggle && /*#__PURE__*/_jsx("div", {
418
- className: `toolbar-toggle ${toolbarOptions?.toolbarPosition}`,
419
- children: /*#__PURE__*/_jsx(Checkbox, {
420
- onChange: handleToolbarSwitch,
421
- checked: toolbarShow,
422
- icon: getToolbarShowOpenIcon("open"),
423
- checkedIcon: getToolbarShowOpenIcon("close"),
424
- name: "checkedI"
425
- })
426
- }), !isReadOnly && toolbarShow ? /*#__PURE__*/_jsx(Toolbar, {
427
- handleCodeToText: handleCodeToText,
428
- customProps: customProps,
429
- toolbarOptions: toolbarOptions
430
- }) : null]
431
- }), /*#__PURE__*/_jsxs("div", {
432
- ref: editorWrapper,
433
- className: `editor-wrapper ${toolbarOptions?.toolbarPosition}-editor-wrapper ${!toolbarShow ? `${toolbarOptions?.toolbarPosition}-editor-wrapper-toolbar-closed` : ""} `,
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
- border: "1px solid #f3f3f3",
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: [/*#__PURE__*/_jsx(PopupTool, {
450
- onDrawerOpen: onDrawerOpen
451
- }), /*#__PURE__*/_jsx(Editable, {
452
- className: "innert-editor-textbox",
453
- readOnly: isReadOnly,
454
- placeholder: "Write something",
455
- renderElement: renderElement,
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(DragOverlay, {
468
- className: "drag-overlay",
469
- style: {
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
- }), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
481
- ...htmlAction,
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, {
@@ -21,12 +21,12 @@
21
21
  }
22
22
 
23
23
  blockquote {
24
- border-left: 2px solid #ddd;
24
+ border-left: 3px solid transparent;
25
25
  margin-left: 0;
26
26
  margin-right: 0;
27
27
  padding-left: 10px;
28
- color: #aaa;
29
- font-style: italic;
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: -40px;
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: -20px;
281
- top: -20px;
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 > div {
396
+ .empty-carousel-wrapper .carousel-item {
397
397
  display: flex;
398
398
  flex-direction: column;
399
399
  flex-shrink: 0;
400
- border: 1px solid #000;
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: 0px;
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 { AccordionIcon } from "../../common/iconslist";
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(Tooltip, {
14
+ return /*#__PURE__*/_jsx(ToolbarIcon, {
15
+ icon: /*#__PURE__*/_jsx(Icon, {
16
+ icon: "accordion"
17
+ }),
14
18
  title: "Accordion",
15
- arrow: true,
16
- children: /*#__PURE__*/_jsx(IconButton, {
17
- onClick: handleInsertAccordion,
18
- style: {
19
- marginLeft: "0px"
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;
@@ -73,8 +73,8 @@ function AppHeader(props) {
73
73
  className: "element-toolbar",
74
74
  contentEditable: false,
75
75
  style: {
76
- top: "-40px",
77
- right: "50px"
76
+ top: "0px",
77
+ right: "0px"
78
78
  },
79
79
  children: [/*#__PURE__*/_jsx(Tooltip, {
80
80
  title: "App Header Settings",
@@ -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 { ButtonIcon } from "../../common/iconslist";
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(Tooltip, {
14
+ return /*#__PURE__*/_jsx(ToolbarIcon, {
14
15
  title: "Button",
15
- arrow: true,
16
- children: /*#__PURE__*/_jsx(IconButton, {
17
- onClick: handleInsertButton,
18
- children: /*#__PURE__*/_jsx(ButtonIcon, {})
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 (metadata?.buttonLink?.handler) {
67
- metadata.buttonLink.handler("click");
68
- } else if (linkType === "actionTrigger") {
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", {