@flozy/editor 4.0.2 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/ChatEditor.js +14 -9
- package/dist/Editor/CommonEditor.js +110 -167
- package/dist/Editor/Editor.css +3 -43
- package/dist/Editor/Elements/AI/AIInput.js +33 -31
- package/dist/Editor/Elements/AI/CustomSelect.js +12 -19
- package/dist/Editor/Elements/AI/PopoverAIInput.js +97 -73
- package/dist/Editor/Elements/AI/Styles.js +2 -2
- package/dist/Editor/Elements/AI/helper.js +3 -5
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +4 -15
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Button/EditorButton.js +16 -28
- package/dist/Editor/Elements/Carousel/CarouselButton.js +1 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +15 -60
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
- package/dist/Editor/Elements/Color Picker/Styles.js +1 -3
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +1 -2
- package/dist/Editor/Elements/Grid/Grid.js +0 -2
- package/dist/Editor/Elements/Grid/GridItem.js +1 -3
- package/dist/Editor/Elements/Link/Link.js +1 -6
- package/dist/Editor/Elements/Link/LinkButton.js +2 -4
- package/dist/Editor/Elements/Link/LinkPopup.js +14 -73
- package/dist/Editor/Elements/NewLine/NewLineButton.js +1 -2
- package/dist/Editor/Elements/Signature/Signature.css +6 -13
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +1 -2
- package/dist/Editor/Elements/Signature/SignaturePopup.js +30 -185
- package/dist/Editor/Elements/SimpleText/index.js +1 -11
- package/dist/Editor/Elements/SimpleText/style.js +1 -1
- package/dist/Editor/MiniEditor.js +1 -3
- package/dist/Editor/Toolbar/Basic/index.js +2 -4
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -7
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +5 -34
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +13 -12
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +13 -12
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/CustomSelectTool.js +0 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +11 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +86 -213
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +2 -4
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +44 -123
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +44 -106
- package/dist/Editor/Toolbar/PopupTool/index.js +3 -5
- package/dist/Editor/Toolbar/toolbarGroups.js +11 -53
- package/dist/Editor/assets/svg/AIIcons.js +1 -153
- package/dist/Editor/common/ColorPickerButton.js +9 -25
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/EditorIcons.js +7 -7
- package/dist/Editor/common/Icon.js +24 -51
- package/dist/Editor/common/ImageList.js +3 -16
- package/dist/Editor/common/ImageSelector/ImageSelector.js +9 -30
- package/dist/Editor/common/ImageSelector/Styles.js +1 -2
- package/dist/Editor/common/LinkSettings/NavComponents.js +2 -5
- package/dist/Editor/common/LinkSettings/index.js +2 -4
- package/dist/Editor/common/LinkSettings/navOptions.js +2 -7
- package/dist/Editor/common/LinkSettings/style.js +8 -11
- package/dist/Editor/common/MentionsPopup/Styles.js +1 -1
- package/dist/Editor/common/Shorthands/elements.js +9 -63
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +23 -39
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +23 -33
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +1 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -31
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +4 -14
- package/dist/Editor/common/StyleBuilder/index.js +1 -1
- package/dist/Editor/commonStyle.js +0 -6
- package/dist/Editor/helper/theme.js +4 -191
- package/dist/Editor/hooks/useMouseMove.js +1 -4
- package/dist/Editor/hooks/useWindowMessage.js +7 -10
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +1 -1
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +25 -161
- package/dist/Editor/utils/button.js +17 -1
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/helper.js +1 -30
- package/package.json +1 -2
- package/dist/Editor/Elements/AI/VoiceToText/AudioWave.js +0 -73
- package/dist/Editor/Elements/AI/VoiceToText/index.js +0 -184
- package/dist/Editor/Elements/AI/VoiceToText/style.js +0 -40
- package/dist/Editor/Elements/Link/LinkPopupStyles.js +0 -28
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +0 -59
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
- package/dist/Editor/common/CustomColorPicker/index.js +0 -106
- package/dist/Editor/common/CustomColorPicker/style.js +0 -53
- package/dist/Editor/common/CustomDialog/index.js +0 -94
- package/dist/Editor/common/CustomDialog/style.js +0 -67
- package/dist/Editor/common/CustomSelect.js +0 -33
- package/dist/Editor/common/iconListV2.js +0 -843
- package/dist/Editor/hooks/useEditorTheme.js +0 -139
- package/dist/Editor/theme/index.js +0 -144
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
- package/dist/Editor/themeSettings/buttons/index.js +0 -290
- package/dist/Editor/themeSettings/buttons/style.js +0 -21
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -290
- package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -123
- package/dist/Editor/themeSettings/fonts/index.js +0 -213
- package/dist/Editor/themeSettings/fonts/style.js +0 -44
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -320
- package/dist/Editor/themeSettings/style.js +0 -152
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -356
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -190
- package/dist/Editor/themeSettingsAI/style.js +0 -247
@@ -28,20 +28,16 @@ export const toolbarGroups = [[{
|
|
28
28
|
type: "dropdown",
|
29
29
|
options: [{
|
30
30
|
text: "Normal",
|
31
|
-
value: "normal"
|
32
|
-
numVal: "400"
|
31
|
+
value: "normal"
|
33
32
|
}, {
|
34
33
|
text: "Bold",
|
35
|
-
value: "bold"
|
36
|
-
numVal: "700"
|
34
|
+
value: "bold"
|
37
35
|
}, {
|
38
36
|
text: "Bolder",
|
39
|
-
value: "bolder"
|
40
|
-
numVal: "700"
|
37
|
+
value: "bolder"
|
41
38
|
}, {
|
42
39
|
text: "Lighter",
|
43
|
-
value: "lighter"
|
44
|
-
numVal: "100"
|
40
|
+
value: "lighter"
|
45
41
|
}],
|
46
42
|
icon: FormatBoldIcon,
|
47
43
|
width: "100px"
|
@@ -50,20 +46,18 @@ export const toolbarGroups = [[{
|
|
50
46
|
format: "bold",
|
51
47
|
type: "mark",
|
52
48
|
title: "Bold",
|
53
|
-
basic: true
|
54
|
-
themeEnabled: true
|
55
|
-
}, {
|
56
|
-
id: 5,
|
57
|
-
format: "underline",
|
58
|
-
type: "mark",
|
59
|
-
title: "Underline"
|
49
|
+
basic: true
|
60
50
|
}, {
|
61
51
|
id: 4,
|
62
52
|
format: "italic",
|
63
53
|
type: "mark",
|
64
54
|
title: "Italic",
|
65
|
-
basic: true
|
66
|
-
|
55
|
+
basic: true
|
56
|
+
}, {
|
57
|
+
id: 5,
|
58
|
+
format: "underline",
|
59
|
+
type: "mark",
|
60
|
+
title: "Underline"
|
67
61
|
}, {
|
68
62
|
id: 6,
|
69
63
|
format: "strikethrough",
|
@@ -107,42 +101,6 @@ export const toolbarGroups = [[{
|
|
107
101
|
type: "block",
|
108
102
|
title: "H3",
|
109
103
|
group: "typography"
|
110
|
-
}, {
|
111
|
-
id: 39,
|
112
|
-
format: "headingFour",
|
113
|
-
type: "block",
|
114
|
-
title: "H4",
|
115
|
-
group: "typography"
|
116
|
-
}, {
|
117
|
-
id: 40,
|
118
|
-
format: "headingFive",
|
119
|
-
type: "block",
|
120
|
-
title: "H5",
|
121
|
-
group: "typography"
|
122
|
-
}, {
|
123
|
-
id: 41,
|
124
|
-
format: "headingSix",
|
125
|
-
type: "block",
|
126
|
-
title: "H6",
|
127
|
-
group: "typography"
|
128
|
-
}, {
|
129
|
-
id: 42,
|
130
|
-
format: "paragraphOne",
|
131
|
-
type: "block",
|
132
|
-
title: "Paragraph 1",
|
133
|
-
group: "typography"
|
134
|
-
}, {
|
135
|
-
id: 43,
|
136
|
-
format: "paragraphTwo",
|
137
|
-
type: "block",
|
138
|
-
title: "Paragraph 2",
|
139
|
-
group: "typography"
|
140
|
-
}, {
|
141
|
-
id: 44,
|
142
|
-
format: "paragraphThree",
|
143
|
-
type: "block",
|
144
|
-
title: "Paragraph 3",
|
145
|
-
group: "typography"
|
146
104
|
}, {
|
147
105
|
id: 14,
|
148
106
|
format: "doublequote",
|
@@ -435,156 +435,4 @@ export function DeleteIcon(props) {
|
|
435
435
|
strokeLinejoin: "round"
|
436
436
|
})]
|
437
437
|
});
|
438
|
-
}
|
439
|
-
export const PauseRecordingIcon = () => /*#__PURE__*/_jsxs("svg", {
|
440
|
-
width: "30",
|
441
|
-
height: "30",
|
442
|
-
viewBox: "0 0 30 30",
|
443
|
-
fill: "none",
|
444
|
-
xmlns: "http://www.w3.org/2000/svg",
|
445
|
-
children: [/*#__PURE__*/_jsx("circle", {
|
446
|
-
cx: "15",
|
447
|
-
cy: "15",
|
448
|
-
r: "14.5",
|
449
|
-
fill: "white",
|
450
|
-
stroke: "url(#paint0_linear_29403_449555)"
|
451
|
-
}), /*#__PURE__*/_jsx("path", {
|
452
|
-
d: "M13.6916 21.125H10.8817C10.5953 21.125 10.3447 20.8744 10.3447 20.5881V9.84943C10.3447 9.54517 10.5953 9.3125 10.8817 9.3125H13.6916C13.932 9.3125 14.2285 9.54517 14.2285 9.84943V20.5881C14.2285 20.8744 13.932 21.125 13.6916 21.125Z",
|
453
|
-
fill: "url(#paint1_linear_29403_449555)"
|
454
|
-
}), /*#__PURE__*/_jsx("path", {
|
455
|
-
d: "M20.1346 21.125H17.3426C17.0383 21.125 16.8057 20.8744 16.8057 20.5881V9.84943C16.8057 9.54517 17.0383 9.3125 17.3426 9.3125H20.1525C20.4568 9.3125 20.6895 9.54517 20.6895 9.84943V20.5881C20.6716 20.8744 20.4389 21.125 20.1346 21.125Z",
|
456
|
-
fill: "url(#paint2_linear_29403_449555)"
|
457
|
-
}), /*#__PURE__*/_jsxs("defs", {
|
458
|
-
children: [/*#__PURE__*/_jsxs("linearGradient", {
|
459
|
-
id: "paint0_linear_29403_449555",
|
460
|
-
x1: "15",
|
461
|
-
y1: "0",
|
462
|
-
x2: "15",
|
463
|
-
y2: "30",
|
464
|
-
gradientUnits: "userSpaceOnUse",
|
465
|
-
children: [/*#__PURE__*/_jsx("stop", {
|
466
|
-
stopColor: "#8061FD"
|
467
|
-
}), /*#__PURE__*/_jsx("stop", {
|
468
|
-
offset: "1",
|
469
|
-
stopColor: "#2C64ED"
|
470
|
-
})]
|
471
|
-
}), /*#__PURE__*/_jsxs("linearGradient", {
|
472
|
-
id: "paint1_linear_29403_449555",
|
473
|
-
x1: "12.2866",
|
474
|
-
y1: "9.3125",
|
475
|
-
x2: "12.2866",
|
476
|
-
y2: "21.125",
|
477
|
-
gradientUnits: "userSpaceOnUse",
|
478
|
-
children: [/*#__PURE__*/_jsx("stop", {
|
479
|
-
stopColor: "#8161FD"
|
480
|
-
}), /*#__PURE__*/_jsx("stop", {
|
481
|
-
offset: "1",
|
482
|
-
stopColor: "#2A64EC"
|
483
|
-
})]
|
484
|
-
}), /*#__PURE__*/_jsxs("linearGradient", {
|
485
|
-
id: "paint2_linear_29403_449555",
|
486
|
-
x1: "18.7476",
|
487
|
-
y1: "9.3125",
|
488
|
-
x2: "18.7476",
|
489
|
-
y2: "21.125",
|
490
|
-
gradientUnits: "userSpaceOnUse",
|
491
|
-
children: [/*#__PURE__*/_jsx("stop", {
|
492
|
-
stopColor: "#8161FD"
|
493
|
-
}), /*#__PURE__*/_jsx("stop", {
|
494
|
-
offset: "1",
|
495
|
-
stopColor: "#2A64EC"
|
496
|
-
})]
|
497
|
-
})]
|
498
|
-
})]
|
499
|
-
});
|
500
|
-
export const CloseGreyCircle = () => /*#__PURE__*/_jsxs("svg", {
|
501
|
-
width: "30",
|
502
|
-
height: "30",
|
503
|
-
viewBox: "0 0 30 30",
|
504
|
-
fill: "none",
|
505
|
-
xmlns: "http://www.w3.org/2000/svg",
|
506
|
-
children: [/*#__PURE__*/_jsx("rect", {
|
507
|
-
width: "30",
|
508
|
-
height: "30",
|
509
|
-
rx: "15",
|
510
|
-
fill: "#DAE4ED"
|
511
|
-
}), /*#__PURE__*/_jsx("path", {
|
512
|
-
d: "M19.1245 10.875L10.8749 19.1246",
|
513
|
-
stroke: "#2563EB",
|
514
|
-
strokeWidth: "1.5",
|
515
|
-
strokeLinecap: "round",
|
516
|
-
strokeLinejoin: "round"
|
517
|
-
}), /*#__PURE__*/_jsx("path", {
|
518
|
-
d: "M10.875 10.875L19.1246 19.1246",
|
519
|
-
stroke: "#2563EB",
|
520
|
-
strokeWidth: "1.5",
|
521
|
-
strokeLinecap: "round",
|
522
|
-
strokeLinejoin: "round"
|
523
|
-
})]
|
524
|
-
});
|
525
|
-
export const TickBlueCircle = () => /*#__PURE__*/_jsxs("svg", {
|
526
|
-
width: "30",
|
527
|
-
height: "30",
|
528
|
-
viewBox: "0 0 30 30",
|
529
|
-
fill: "none",
|
530
|
-
xmlns: "http://www.w3.org/2000/svg",
|
531
|
-
children: [/*#__PURE__*/_jsx("rect", {
|
532
|
-
width: "30",
|
533
|
-
height: "30",
|
534
|
-
rx: "15",
|
535
|
-
fill: "url(#paint0_linear_30220_64249)"
|
536
|
-
}), /*#__PURE__*/_jsx("path", {
|
537
|
-
d: "M9 15L13.0011 19L21 11",
|
538
|
-
stroke: "white",
|
539
|
-
strokeWidth: "1.5",
|
540
|
-
strokeLinecap: "round",
|
541
|
-
strokeLinejoin: "round"
|
542
|
-
}), /*#__PURE__*/_jsx("defs", {
|
543
|
-
children: /*#__PURE__*/_jsxs("linearGradient", {
|
544
|
-
id: "paint0_linear_30220_64249",
|
545
|
-
x1: "15",
|
546
|
-
y1: "0",
|
547
|
-
x2: "15",
|
548
|
-
y2: "30",
|
549
|
-
gradientUnits: "userSpaceOnUse",
|
550
|
-
children: [/*#__PURE__*/_jsx("stop", {
|
551
|
-
stopColor: "#8360FD"
|
552
|
-
}), /*#__PURE__*/_jsx("stop", {
|
553
|
-
offset: "1",
|
554
|
-
stopColor: "#2563EB"
|
555
|
-
})]
|
556
|
-
})
|
557
|
-
})]
|
558
|
-
});
|
559
|
-
export const ChatMicIcon = props => /*#__PURE__*/_jsxs("svg", {
|
560
|
-
width: "26",
|
561
|
-
height: "26",
|
562
|
-
viewBox: "0 0 26 26",
|
563
|
-
fill: "none",
|
564
|
-
xmlns: "http://www.w3.org/2000/svg",
|
565
|
-
children: [/*#__PURE__*/_jsx("path", {
|
566
|
-
d: "M13 19.3194C15.9882 19.3194 18.4166 16.8909 18.4166 13.9028V9.38887C18.4166 6.40067 15.9882 3.9722 13 3.9722C10.0118 3.9722 7.58331 6.40067 7.58331 9.38887V13.9028C7.58331 16.8909 10.0118 19.3194 13 19.3194Z",
|
567
|
-
stroke: "#94A3B8",
|
568
|
-
strokeWidth: "1.4",
|
569
|
-
strokeLinecap: "round",
|
570
|
-
strokeLinejoin: "round"
|
571
|
-
}), /*#__PURE__*/_jsx("path", {
|
572
|
-
d: "M4.875 12.0972V13.9028C4.875 18.3896 8.51319 22.0278 13 22.0278C17.4868 22.0278 21.125 18.3896 21.125 13.9028V12.0972",
|
573
|
-
stroke: "#94A3B8",
|
574
|
-
strokeWidth: "1.4",
|
575
|
-
strokeLinecap: "round",
|
576
|
-
strokeLinejoin: "round"
|
577
|
-
}), /*#__PURE__*/_jsx("path", {
|
578
|
-
d: "M10.3913 8.91914C11.9982 8.33233 13.7496 8.33233 15.3565 8.91914",
|
579
|
-
stroke: "#94A3B8",
|
580
|
-
strokeWidth: "1.4",
|
581
|
-
strokeLinecap: "round",
|
582
|
-
strokeLinejoin: "round"
|
583
|
-
}), /*#__PURE__*/_jsx("path", {
|
584
|
-
d: "M11.2218 11.6295C12.3051 11.3316 13.4516 11.3316 14.535 11.6295",
|
585
|
-
stroke: "#94A3B8",
|
586
|
-
strokeWidth: "1.4",
|
587
|
-
strokeLinecap: "round",
|
588
|
-
strokeLinejoin: "round"
|
589
|
-
})]
|
590
|
-
});
|
438
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { Grid, Button, Popover } from "@mui/material";
|
3
|
+
import ColorPickerTool from "react-gcolor-picker";
|
3
4
|
import { colors } from "../Elements/Color Picker/defaultColors";
|
4
|
-
import CustomColorPicker from "./CustomColorPicker";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -9,12 +9,9 @@ const ColorPickerButton = props => {
|
|
9
9
|
const {
|
10
10
|
value,
|
11
11
|
onSave,
|
12
|
+
defaultColors = [],
|
12
13
|
classes = {},
|
13
|
-
recentColors = []
|
14
|
-
children,
|
15
|
-
handleClose: closeDrawer,
|
16
|
-
hideThemeColors,
|
17
|
-
disableEditTheme
|
14
|
+
recentColors = []
|
18
15
|
} = props;
|
19
16
|
const [anchorEl, setAnchorEl] = useState(null);
|
20
17
|
const [color, setColor] = useState(value);
|
@@ -33,13 +30,7 @@ const ColorPickerButton = props => {
|
|
33
30
|
setColor(color);
|
34
31
|
};
|
35
32
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
36
|
-
children: [
|
37
|
-
onClick: handleColorPicker,
|
38
|
-
style: {
|
39
|
-
cursor: "pointer"
|
40
|
-
},
|
41
|
-
children: children
|
42
|
-
}) : /*#__PURE__*/_jsx(Button, {
|
33
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
43
34
|
style: {
|
44
35
|
background: value,
|
45
36
|
height: "22px",
|
@@ -69,24 +60,17 @@ const ColorPickerButton = props => {
|
|
69
60
|
item: true,
|
70
61
|
xs: 12,
|
71
62
|
children: [/*#__PURE__*/_jsx("div", {
|
72
|
-
children: /*#__PURE__*/_jsx(
|
63
|
+
children: /*#__PURE__*/_jsx(ColorPickerTool, {
|
73
64
|
gradient: true,
|
74
|
-
|
65
|
+
value: color,
|
75
66
|
onChange: handleColorChange,
|
76
|
-
|
77
|
-
closeDrawer: closeDrawer,
|
78
|
-
hideThemeColors: hideThemeColors,
|
79
|
-
disableEditTheme: disableEditTheme
|
67
|
+
defaultColors: [...recentColors, ...defaultColors] || []
|
80
68
|
})
|
81
69
|
}), /*#__PURE__*/_jsxs("div", {
|
82
70
|
style: {
|
83
71
|
display: "flex",
|
84
|
-
justifyContent: "
|
85
|
-
|
86
|
-
background: "white",
|
87
|
-
position: "sticky",
|
88
|
-
bottom: 0,
|
89
|
-
boxShadow: "0 -1px 5px rgba(0,0,0,0.1)"
|
72
|
+
justifyContent: "end",
|
73
|
+
margin: "8px"
|
90
74
|
},
|
91
75
|
children: [/*#__PURE__*/_jsx(Button, {
|
92
76
|
onClick: handleClose,
|
@@ -7,7 +7,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
|
|
7
7
|
import { Transforms } from "slate";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
-
const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "
|
10
|
+
const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "grid"];
|
11
11
|
const DragHandleStyle = fromPopper => {
|
12
12
|
const handleDragStyle = fromPopper ? {
|
13
13
|
position: "absolute",
|
@@ -9,23 +9,23 @@ export const DrawSignature = props => /*#__PURE__*/_jsxs("svg", {
|
|
9
9
|
children: [/*#__PURE__*/_jsx("path", {
|
10
10
|
className: "fillPath",
|
11
11
|
d: "M21.3748 1.49609L12.1426 10.7274C11.6087 11.2606 11.6087 12.126 12.1426 12.6598L12.6527 13.17C13.1859 13.7031 14.052 13.7031 14.5851 13.17L23.8183 3.93768L21.3748 1.49609Z",
|
12
|
-
fill:
|
12
|
+
fill: "#A2B0B9"
|
13
13
|
}), /*#__PURE__*/_jsx("path", {
|
14
14
|
className: "fillPath",
|
15
15
|
d: "M11.7399 13.0617C11.4885 12.8102 11.3279 12.5025 11.2544 12.1797L11.2125 12.2944C11.1271 12.5293 10.9854 12.9153 10.8993 13.1501L10.3267 14.7154C10.3236 14.7233 10.3227 14.7313 10.3203 14.7367L11.0133 14.0446C11.0837 13.9751 11.1975 13.9751 11.268 14.0446C11.3385 14.1158 11.3385 14.2298 11.268 14.2994L10.5759 14.9931C10.5837 14.99 10.5901 14.9883 10.5981 14.9852L12.1634 14.4133C12.3983 14.327 12.7836 14.1863 13.0192 14.1002L13.1339 14.0583C12.8103 13.984 12.5026 13.8234 12.2511 13.5734L11.7399 13.0617Z",
|
16
|
-
fill:
|
16
|
+
fill: "#A2B0B9"
|
17
17
|
}), /*#__PURE__*/_jsx("path", {
|
18
18
|
className: "fillPath",
|
19
19
|
d: "M24.9119 0.911237L24.4018 0.401078C23.8679 -0.133693 23.0025 -0.133693 22.4694 0.401078L21.7852 1.08533L24.2277 3.52785L24.9119 2.8436C25.4451 2.30976 25.4451 1.44433 24.9119 0.911237Z",
|
20
|
-
fill:
|
20
|
+
fill: "#A2B0B9"
|
21
21
|
}), /*#__PURE__*/_jsx("path", {
|
22
22
|
className: "fillPath",
|
23
23
|
d: "M23.8386 4.55868L19.678 8.71929C19.511 8.88625 19.511 9.15663 19.678 9.3236C19.8449 9.49056 20.1153 9.49056 20.2823 9.3236L24.4419 5.16299C24.6089 4.99603 24.6089 4.72565 24.4419 4.55868C24.2752 4.3919 24.0046 4.3919 23.8386 4.55868Z",
|
24
|
-
fill:
|
24
|
+
fill: "#A2B0B9"
|
25
25
|
}), /*#__PURE__*/_jsx("path", {
|
26
26
|
className: "fillPath",
|
27
27
|
d: "M12.3531 15.8358H9.24616C8.12385 15.8358 7.46165 16.0692 7.02266 16.2235C6.5125 16.4046 6.4706 16.4181 5.99284 15.9839C5.84645 15.8493 5.7088 15.669 5.56332 15.4768C5.20573 15.007 4.75821 14.4169 3.98619 14.4635C2.88281 14.5253 2.78539 15.6729 2.72768 16.3587C2.71822 16.4742 2.70711 16.6031 2.69218 16.7296C2.61698 16.4948 2.54433 16.2384 2.48898 16.0423C2.39886 15.7211 2.30545 15.3905 2.20494 15.1121C1.9961 14.5371 1.63139 14.4588 1.41311 14.4635C1.19717 14.4683 0.622914 14.4801 0.0266173 16.3713C-0.0682457 16.671 0.0985384 16.9907 0.398416 17.0863C0.699748 17.1805 1.01928 17.0135 1.11432 16.7138C1.17604 16.5177 1.25196 16.3136 1.32862 16.1301C1.3492 16.2029 1.3705 16.2772 1.39107 16.3508C1.68458 17.3933 1.91638 18.215 2.54596 18.3655C2.59421 18.3766 2.65429 18.3853 2.72384 18.3853C2.9041 18.3853 3.14462 18.3219 3.37803 18.0658C3.7633 17.6443 3.81701 17.0121 3.86363 16.456C3.88584 16.1902 3.92772 15.6942 4.0488 15.6018C4.21339 15.5954 4.39128 15.8193 4.65549 16.1673C4.81772 16.3809 5.00198 16.6228 5.22503 16.8253C6.14103 17.6597 6.65833 17.5609 7.40173 17.2983C7.80994 17.1543 8.31848 16.9757 9.24543 16.9757H12.3523C12.6672 16.9757 12.9226 16.7193 12.9226 16.4054C12.9233 16.0914 12.6688 15.8359 12.353 15.8359L12.3531 15.8358Z",
|
28
|
-
fill:
|
28
|
+
fill: "#A2B0B9"
|
29
29
|
})]
|
30
30
|
});
|
31
31
|
export const TypeSignature = props => /*#__PURE__*/_jsx("svg", {
|
@@ -37,7 +37,7 @@ export const TypeSignature = props => /*#__PURE__*/_jsx("svg", {
|
|
37
37
|
children: /*#__PURE__*/_jsx("path", {
|
38
38
|
className: "fillPath",
|
39
39
|
d: "M20.6332 10.8976H13.0855V10.1307C13.0855 10.0886 13.0811 10.0476 13.0728 10.008H13.0736C13.0726 10.0021 13.0687 9.99736 13.0674 9.99145C13.0567 9.9473 13.0404 9.9056 13.0203 9.86571C12.9221 9.65741 12.7112 9.51065 12.4594 9.51065H11.3456V9.48406C11.3456 9.04891 11.7123 8.69365 12.1615 8.69365H16.9192C17.7488 8.69365 18.4225 8.03654 18.4225 7.23285C18.4225 6.42917 17.7488 5.77205 16.9192 5.77205H4.06291C3.39377 5.77205 2.84834 5.24366 2.84834 4.59541C2.84834 3.94276 3.39377 3.41436 4.06291 3.41436H17.5286C18.5781 3.41436 19.4306 2.58853 19.4306 1.57174V0H18.7432V1.57174C18.7432 2.21999 18.1978 2.74838 17.5286 2.74838H4.06291C3.01339 2.74838 2.16089 3.57867 2.16089 4.59541C2.16089 5.61216 3.01334 6.43803 4.06291 6.43803H16.9192C17.3683 6.43803 17.7351 6.79326 17.7351 7.23285C17.7351 7.668 17.3684 8.02767 16.9192 8.02767H12.1615C11.3319 8.02767 10.6582 8.68033 10.6582 9.48402V9.51061H9.86996C9.62477 9.51061 9.41974 9.64932 9.31945 9.84877C9.27336 9.9333 9.24473 10.0282 9.24473 10.1304V10.8974L1.36692 10.8975C0.612058 10.8975 0 11.4904 0 12.2218V19.6758C0 20.4071 0.612015 21 1.36692 21L20.6331 20.9998C21.3879 20.9998 22 20.4069 22 19.6756V12.2216C22 11.4905 21.388 10.8975 20.6331 10.8975L20.6332 10.8976ZM15.62 12.4314C15.62 12.2068 15.808 12.0248 16.0398 12.0248H17.2884C17.5202 12.0248 17.7081 12.2068 17.7081 12.4314V13.641C17.7081 13.8656 17.5202 14.0476 17.2884 14.0476H16.0398C15.808 14.0476 15.62 13.8656 15.62 13.641V12.4314ZM11.6247 14.0477H10.3761C10.1443 14.0477 9.95641 13.8656 9.95641 13.641V12.4314C9.95641 12.2069 10.1443 12.0248 10.3761 12.0248H11.6247C11.8566 12.0248 12.0445 12.2069 12.0445 12.4314V13.641C12.0445 13.8656 11.8566 14.0477 11.6247 14.0477ZM12.0445 15.2478V16.4574C12.0445 16.682 11.8566 16.864 11.6247 16.864H10.3761C10.1443 16.864 9.95641 16.682 9.95641 16.4574V15.2478C9.95641 15.0232 10.1443 14.8412 10.3761 14.8412H11.6247C11.8566 14.841 12.0445 15.0232 12.0445 15.2478ZM7.12457 12.4314C7.12457 12.2068 7.31249 12.0248 7.54429 12.0248H8.79291C9.02471 12.0248 9.21263 12.2068 9.21263 12.4314V13.641C9.21263 13.8656 9.02471 14.0476 8.79291 14.0476H7.54429C7.31249 14.0476 7.12457 13.8656 7.12457 13.641V12.4314ZM7.12457 15.2478C7.12457 15.0232 7.31249 14.8412 7.54429 14.8412H8.79291C9.02471 14.8412 9.21263 15.0232 9.21263 15.2478V16.4574C9.21263 16.682 9.02471 16.864 8.79291 16.864H7.54429C7.31249 16.864 7.12457 16.682 7.12457 16.4574V15.2478ZM3.54896 19.2736C3.54896 19.4982 3.36104 19.6802 3.12924 19.6802H1.88062C1.64882 19.6802 1.4609 19.4982 1.4609 19.2736V18.064C1.4609 17.8394 1.64882 17.6574 1.88062 17.6574H3.12924C3.36104 17.6574 3.54896 17.8394 3.54896 18.064V19.2736ZM3.54896 16.4574C3.54896 16.682 3.36104 16.864 3.12924 16.864H1.88062C1.64882 16.864 1.4609 16.682 1.4609 16.4574V15.2478C1.4609 15.0232 1.64882 14.8412 1.88062 14.8412H3.12924C3.36104 14.8412 3.54896 15.0232 3.54896 15.2478V16.4574ZM3.54896 13.641C3.54896 13.8656 3.36104 14.0476 3.12924 14.0476H1.88062C1.64882 14.0476 1.4609 13.8656 1.4609 13.641V12.4314C1.4609 12.2068 1.64882 12.0248 1.88062 12.0248H3.12924C3.36104 12.0248 3.54896 12.2068 3.54896 12.4314V13.641ZM6.38069 19.2738C6.38069 19.4983 6.19278 19.6804 5.96098 19.6804H4.71235C4.48055 19.6804 4.29264 19.4983 4.29264 19.2738V18.0642C4.29264 17.8396 4.48055 17.6576 4.71235 17.6576H5.96098C6.19278 17.6576 6.38069 17.8396 6.38069 18.0642V19.2738ZM6.38069 16.4576C6.38069 16.6821 6.19278 16.8642 5.96098 16.8642H4.71235C4.48055 16.8642 4.29264 16.6821 4.29264 16.4576V15.248C4.29264 15.0234 4.48055 14.8413 4.71235 14.8413H5.96098C6.19278 14.8413 6.38069 15.0234 6.38069 15.248V16.4576ZM6.38069 13.6412C6.38069 13.8658 6.19278 14.0478 5.96098 14.0478H4.71235C4.48055 14.0478 4.29264 13.8658 4.29264 13.6412V12.4316C4.29264 12.207 4.48055 12.025 4.71235 12.025H5.96098C6.19278 12.025 6.38069 12.207 6.38069 12.4316V13.6412ZM14.8762 19.274C14.8762 19.4985 14.6883 19.6806 14.4565 19.6806H7.54426C7.31246 19.6806 7.12455 19.4985 7.12455 19.274V18.0643C7.12455 17.8398 7.31246 17.6577 7.54426 17.6577H14.4565C14.6883 17.6577 14.8762 17.8398 14.8762 18.0643V19.274ZM14.8762 16.4577C14.8762 16.6823 14.6883 16.8644 14.4565 16.8644H13.2079C12.9761 16.8644 12.7881 16.6823 12.7881 16.4577V15.2481C12.7881 15.0236 12.9761 14.8415 13.2079 14.8415H14.4565C14.6883 14.8415 14.8762 15.0236 14.8762 15.2481V16.4577ZM14.8762 13.6414C14.8762 13.8659 14.6883 14.048 14.4565 14.048H13.2079C12.9761 14.048 12.7881 13.8659 12.7881 13.6414V12.4317C12.7881 12.2072 12.9761 12.0251 13.2079 12.0251H14.4565C14.6883 12.0251 14.8762 12.2072 14.8762 12.4317V13.6414ZM17.7081 19.2741C17.7081 19.4987 17.5202 19.6807 17.2884 19.6807H16.0398C15.808 19.6807 15.6201 19.4987 15.6201 19.2741V18.0645C15.6201 17.8399 15.808 17.6579 16.0398 17.6579H17.2884C17.5202 17.6579 17.7081 17.8399 17.7081 18.0645V19.2741ZM20.5398 19.2741C20.5398 19.4987 20.3519 19.6807 20.1201 19.6807H18.8715C18.6397 19.6807 18.4518 19.4987 18.4518 19.2741V18.0645C18.4518 17.8399 18.6397 17.6579 18.8715 17.6579H20.1201C20.3519 17.6579 20.5398 17.8399 20.5398 18.0645V19.2741ZM20.5398 16.4579C20.5398 16.6825 20.3519 16.8645 20.1201 16.8645H16.0398C15.808 16.8645 15.6201 16.6825 15.6201 16.4579V15.2483C15.6201 15.0237 15.808 14.8417 16.0398 14.8417H20.1201C20.3519 14.8417 20.5398 15.0237 20.5398 15.2483V16.4579ZM20.5398 13.6415C20.5398 13.8661 20.3519 14.0481 20.1201 14.0481H18.8715C18.6397 14.0481 18.4518 13.8661 18.4518 13.6415V12.4319C18.4518 12.2074 18.6397 12.0253 18.8715 12.0253H20.1201C20.3519 12.0253 20.5398 12.2074 20.5398 12.4319V13.6415Z",
|
40
|
-
fill:
|
40
|
+
fill: "#A2B0B9"
|
41
41
|
})
|
42
42
|
});
|
43
43
|
export const UploadSignature = props => /*#__PURE__*/_jsx("svg", {
|
@@ -51,7 +51,7 @@ export const UploadSignature = props => /*#__PURE__*/_jsx("svg", {
|
|
51
51
|
fillRule: "evenodd",
|
52
52
|
clipRule: "evenodd",
|
53
53
|
d: "M9.11105 6.94403V12H3.90249C1.74708 12 0 10.3115 0 8.22877C0 6.2095 1.64226 4.56091 3.70654 4.46225C3.89348 1.96767 6.04701 0 8.67605 0C10.7426 0 12.5153 1.21592 13.2701 2.94791C13.5384 2.87841 13.8204 2.84119 14.1116 2.84119C15.9012 2.84119 17.3519 4.24319 17.3519 5.97277C17.3519 6.01559 17.351 6.05819 17.3494 6.10079C18.8463 6.29676 20 7.53667 20 9.03682C20 10.6734 18.6273 12 16.9338 12H10.8892V6.94403L12.4098 8.24737C12.7768 8.56172 13.3385 8.52988 13.6647 8.17607C13.9907 7.82226 13.9577 7.28055 13.5908 6.966L10.5909 4.39451L10.0003 3.88847L9.40974 4.39451L6.40986 6.966C6.04295 7.28057 6.00994 7.82227 6.33592 8.17607C6.66214 8.52988 7.2239 8.56172 7.5908 8.24737L9.11105 6.94403Z",
|
54
|
-
fill:
|
54
|
+
fill: "#A2B0B9"
|
55
55
|
})
|
56
56
|
});
|
57
57
|
export const PencilIcon = props => /*#__PURE__*/_jsx("svg", {
|
@@ -12,7 +12,6 @@ import ArrowRightIcon from "@mui/icons-material/ArrowRight";
|
|
12
12
|
import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
|
13
13
|
import EmailRoundedIcon from '@mui/icons-material/EmailRounded';
|
14
14
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
15
|
-
import { AccordionTextFormatIcon, BoldTextFormatIcon, BulletedListTextFormatIcon, ButtonElementIcon, CarouselElementIcon, CheckListTextFormatIcon, ColorBoxElementIcon, DividerElementIcon, DocUploadElementIcon, EmbedElementIcon, EmojiElementIcon, FormElementIcon, GridElementIcon, ImageElementIcon, ItalicTextFormatIcon, LinkIconV2, OrderedListTextFormatIcon, SignatureElementIcon, TableElementIcon, TopBannerElementIcon, UnderlineTextFormatIcon, VideoElementIcon } from "./iconListV2";
|
16
15
|
import SettingsIcon from "../assets/svg/SettingsIcon";
|
17
16
|
import UndoIcon from "../assets/svg/UndoIcon";
|
18
17
|
import RedoIcon from "../assets/svg/RedoIcon";
|
@@ -21,16 +20,6 @@ import AddElementIcon from "../assets/svg/AddElementIcon";
|
|
21
20
|
import AddTemplateIcon from "../assets/svg/AddTemplateIcon";
|
22
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
23
22
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
-
const HeadingIcon = ({
|
25
|
-
variant
|
26
|
-
}) => {
|
27
|
-
return /*#__PURE__*/_jsx("div", {
|
28
|
-
style: {
|
29
|
-
color: "#64748B"
|
30
|
-
},
|
31
|
-
children: variant
|
32
|
-
});
|
33
|
-
};
|
34
23
|
const iconList = {
|
35
24
|
fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
|
36
25
|
size: 20
|
@@ -39,11 +28,11 @@ const iconList = {
|
|
39
28
|
size: 20
|
40
29
|
}),
|
41
30
|
// bold: <MdFormatBold size={20} />,
|
42
|
-
bold: /*#__PURE__*/_jsx(
|
31
|
+
bold: /*#__PURE__*/_jsx(BoldIcon, {
|
43
32
|
size: 20
|
44
33
|
}),
|
45
34
|
// italic: <MdFormatItalic size={20} />,
|
46
|
-
italic: /*#__PURE__*/_jsx(
|
35
|
+
italic: /*#__PURE__*/_jsx(ItalicIcon, {
|
47
36
|
size: 20
|
48
37
|
}),
|
49
38
|
// strikethrough: <MdStrikethroughS size={20} />,
|
@@ -51,7 +40,7 @@ const iconList = {
|
|
51
40
|
size: 20
|
52
41
|
}),
|
53
42
|
// underline: <MdFormatUnderlined size={20} />,
|
54
|
-
underline: /*#__PURE__*/_jsx(
|
43
|
+
underline: /*#__PURE__*/_jsx(UnderLineIcon, {
|
55
44
|
size: 20
|
56
45
|
}),
|
57
46
|
headingOne: /*#__PURE__*/_jsx(BsTypeH1, {
|
@@ -66,24 +55,6 @@ const iconList = {
|
|
66
55
|
size: 18,
|
67
56
|
fill: "#64748B"
|
68
57
|
}),
|
69
|
-
headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
|
70
|
-
variant: "H4"
|
71
|
-
}),
|
72
|
-
headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
|
73
|
-
variant: "H5"
|
74
|
-
}),
|
75
|
-
headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
|
76
|
-
variant: "H6"
|
77
|
-
}),
|
78
|
-
paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
|
79
|
-
variant: "P1"
|
80
|
-
}),
|
81
|
-
paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
|
82
|
-
variant: "P2"
|
83
|
-
}),
|
84
|
-
paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
|
85
|
-
variant: "P3"
|
86
|
-
}),
|
87
58
|
blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
|
88
59
|
size: 20,
|
89
60
|
fill: "#64748B"
|
@@ -112,29 +83,31 @@ const iconList = {
|
|
112
83
|
size: 18,
|
113
84
|
fill: "#64748B"
|
114
85
|
}),
|
115
|
-
orderedList: /*#__PURE__*/_jsx(
|
86
|
+
orderedList: /*#__PURE__*/_jsx(MdFormatListNumbered, {
|
116
87
|
size: 18,
|
117
88
|
fill: "#64748B"
|
118
89
|
}),
|
119
|
-
unorderedList: /*#__PURE__*/_jsx(
|
90
|
+
unorderedList: /*#__PURE__*/_jsx(MdFormatListBulleted, {
|
120
91
|
size: 18,
|
121
92
|
fill: "#64748B"
|
122
93
|
}),
|
123
94
|
// link: <MdInsertLink size={20} />,
|
124
|
-
link: /*#__PURE__*/_jsx(
|
95
|
+
link: /*#__PURE__*/_jsx(LinkIcon, {
|
125
96
|
size: 20
|
126
97
|
}),
|
127
98
|
// image: <MdImage size={20} />,
|
128
|
-
image: /*#__PURE__*/_jsx(
|
99
|
+
image: /*#__PURE__*/_jsx(ImageIcon, {
|
129
100
|
size: 20
|
130
101
|
}),
|
131
102
|
// video: <MdVideoLibrary size={20} />,
|
132
|
-
video: /*#__PURE__*/_jsx(
|
103
|
+
video: /*#__PURE__*/_jsx(VideoIcon, {
|
104
|
+
size: 20
|
105
|
+
}),
|
133
106
|
add: /*#__PURE__*/_jsx(MdAdd, {
|
134
107
|
size: 20
|
135
108
|
}),
|
136
109
|
// table: <AiOutlineTable size={20} />,
|
137
|
-
table: /*#__PURE__*/_jsx(
|
110
|
+
table: /*#__PURE__*/_jsx(TableIcon, {
|
138
111
|
size: 20
|
139
112
|
}),
|
140
113
|
insertRowBelow: /*#__PURE__*/_jsx(AiOutlineInsertRowBelow, {
|
@@ -176,16 +149,16 @@ const iconList = {
|
|
176
149
|
pen: /*#__PURE__*/_jsx(AiFillEdit, {
|
177
150
|
size: 20
|
178
151
|
}),
|
179
|
-
emoji: /*#__PURE__*/_jsx(
|
152
|
+
emoji: /*#__PURE__*/_jsx(MdEmojiEmotions, {
|
180
153
|
size: 20,
|
181
154
|
fill: "#64748B"
|
182
155
|
}),
|
183
|
-
grid: /*#__PURE__*/_jsx(
|
184
|
-
accordion: /*#__PURE__*/_jsx(
|
185
|
-
signature: /*#__PURE__*/_jsx(
|
186
|
-
button: /*#__PURE__*/_jsx(
|
187
|
-
carousel: /*#__PURE__*/_jsx(
|
188
|
-
form: /*#__PURE__*/_jsx(
|
156
|
+
grid: /*#__PURE__*/_jsx(GridIcon, {}),
|
157
|
+
accordion: /*#__PURE__*/_jsx(AccordionIcon, {}),
|
158
|
+
signature: /*#__PURE__*/_jsx(SignatureIcon, {}),
|
159
|
+
button: /*#__PURE__*/_jsx(ButtonIcon, {}),
|
160
|
+
carousel: /*#__PURE__*/_jsx(Carousal, {}),
|
161
|
+
form: /*#__PURE__*/_jsx(FormIcon, {}),
|
189
162
|
tableCellResizeLeft: /*#__PURE__*/_jsx(BsArrowBarRight, {
|
190
163
|
size: 20
|
191
164
|
}),
|
@@ -204,11 +177,11 @@ const iconList = {
|
|
204
177
|
addRow: /*#__PURE__*/_jsx(FcAddRow, {
|
205
178
|
size: 20
|
206
179
|
}),
|
207
|
-
"check-list-item": /*#__PURE__*/_jsx(
|
180
|
+
"check-list-item": /*#__PURE__*/_jsx(CheckboxIcon, {
|
208
181
|
size: 20
|
209
182
|
}),
|
210
|
-
embed: /*#__PURE__*/_jsx(
|
211
|
-
topbanner: /*#__PURE__*/_jsx(
|
183
|
+
embed: /*#__PURE__*/_jsx(LinkIcon, {}),
|
184
|
+
topbanner: /*#__PURE__*/_jsx(IoIosImage, {
|
212
185
|
size: 20,
|
213
186
|
fill: "#64748B"
|
214
187
|
}),
|
@@ -224,8 +197,8 @@ const iconList = {
|
|
224
197
|
}),
|
225
198
|
appHeader: /*#__PURE__*/_jsx(AppHeader, {}),
|
226
199
|
moreHorizantal: /*#__PURE__*/_jsx(MoreHorizontal, {}),
|
227
|
-
docsUpload: /*#__PURE__*/_jsx(
|
228
|
-
colorbox: /*#__PURE__*/_jsx(
|
200
|
+
docsUpload: /*#__PURE__*/_jsx(DocsUpload, {}),
|
201
|
+
colorbox: /*#__PURE__*/_jsx(BsFillMenuButtonWideFill, {
|
229
202
|
style: {
|
230
203
|
fill: "#64748B"
|
231
204
|
},
|
@@ -237,7 +210,7 @@ const iconList = {
|
|
237
210
|
checkListButtonActive: /*#__PURE__*/_jsx(CheckListButtonActive, {}),
|
238
211
|
excelIcon: /*#__PURE__*/_jsx(ExcelIcon, {}),
|
239
212
|
csvIcon: /*#__PURE__*/_jsx(CsvIcon, {}),
|
240
|
-
divider: /*#__PURE__*/_jsx(
|
213
|
+
divider: /*#__PURE__*/_jsx(DividerIcon, {}),
|
241
214
|
SearchIcon: /*#__PURE__*/_jsx(SearchIcon, {}),
|
242
215
|
expandIcon: /*#__PURE__*/_jsx(ExpandIcon, {}),
|
243
216
|
closeIcon: /*#__PURE__*/_jsx(CloseIcon, {}),
|
@@ -45,29 +45,16 @@ const QuiltedImageList = props => {
|
|
45
45
|
}, `img_upload_btn`) : null, (itemData || []).map(item => {
|
46
46
|
const isSelected = (selected || []).find(f => f.img === item.img);
|
47
47
|
return /*#__PURE__*/_jsxs(ImageListItem, {
|
48
|
-
// cols={item.cols || 1}
|
49
|
-
// rows={item.rows || 1}
|
50
|
-
sx: {
|
51
|
-
padding: "2px",
|
52
|
-
overflow: "hidden"
|
53
|
-
// position: "relative",
|
54
|
-
},
|
55
48
|
children: [/*#__PURE__*/_jsx("img", {
|
56
49
|
...srcset(item.img, rowHeight || 121, item.rows, item.cols),
|
57
50
|
alt: item.title,
|
58
|
-
loading: "lazy"
|
59
|
-
style: {
|
60
|
-
width: "100%",
|
61
|
-
height: "145px",
|
62
|
-
borderRadius: "12px"
|
63
|
-
// display: "block",
|
64
|
-
}
|
51
|
+
loading: "lazy"
|
65
52
|
}), !readOnly ? /*#__PURE__*/_jsx(ImageListItemBar, {
|
66
53
|
sx: {
|
67
54
|
background: "none"
|
68
55
|
},
|
69
|
-
position: "
|
70
|
-
actionPosition: "
|
56
|
+
position: "bottom",
|
57
|
+
actionPosition: "left",
|
71
58
|
actionIcon: /*#__PURE__*/_jsx(IconButton, {
|
72
59
|
onClick: onImageSelect(item, !isSelected),
|
73
60
|
children: /*#__PURE__*/_jsx(CheckCircleIcon, {
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Button, Grid, Tab, Tabs, Dialog, DialogContent, DialogActions, DialogTitle, Typography, Divider
|
2
|
+
import { Button, Grid, Tab, Tabs, Dialog, DialogContent, DialogActions, DialogTitle, Typography, Divider } from "@mui/material";
|
3
3
|
import Upload from "./Options/Upload";
|
4
4
|
import ChooseAssets from "./Options/ChooseAssets";
|
5
5
|
import AddLink from "./Options/AddLink";
|
6
6
|
import Icon from "../Icon";
|
7
7
|
import ImageSelectorStyles from "./Styles";
|
8
8
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
9
|
-
import { CloseIconImageUpload, ImageElementIcon } from "../iconListV2";
|
10
9
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -53,28 +52,11 @@ const ImageSelector = props => {
|
|
53
52
|
fullWidth: true,
|
54
53
|
sx: classes.dialogWrapper,
|
55
54
|
children: [/*#__PURE__*/_jsx(DialogTitle, {
|
56
|
-
children: /*#__PURE__*/_jsxs(
|
57
|
-
sx:
|
58
|
-
|
59
|
-
justifyContent: "space-between",
|
60
|
-
alignItems: "center"
|
61
|
-
},
|
62
|
-
children: [/*#__PURE__*/_jsxs(Typography, {
|
63
|
-
sx: classes.titleTypo,
|
64
|
-
children: ["Add ", title]
|
65
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
66
|
-
sx: {
|
67
|
-
padding: "0px"
|
68
|
-
},
|
69
|
-
onClick: onClose,
|
70
|
-
children: /*#__PURE__*/_jsx(CloseIconImageUpload, {})
|
71
|
-
})]
|
55
|
+
children: /*#__PURE__*/_jsxs(Typography, {
|
56
|
+
sx: classes.titleTypo,
|
57
|
+
children: ["Add ", title]
|
72
58
|
})
|
73
|
-
}), /*#__PURE__*/_jsx(Divider, {
|
74
|
-
sx: {
|
75
|
-
boxShadow: "0px 4px 8px 0px #0000000A"
|
76
|
-
}
|
77
|
-
}), /*#__PURE__*/_jsx(DialogContent, {
|
59
|
+
}), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(DialogContent, {
|
78
60
|
children: /*#__PURE__*/_jsxs(Grid, {
|
79
61
|
container: true,
|
80
62
|
children: [TAB_SHOW[title].length > 1 && /*#__PURE__*/_jsx(Grid, {
|
@@ -102,7 +84,9 @@ const ImageSelector = props => {
|
|
102
84
|
}), /*#__PURE__*/_jsx(Tab, {
|
103
85
|
className: `${isActive("choose")} ${TAB_SHOW[title].indexOf("choose") === -1 ? "hidden" : ""}`,
|
104
86
|
sx: classes.tab,
|
105
|
-
icon: /*#__PURE__*/_jsx(
|
87
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
88
|
+
icon: "media"
|
89
|
+
}),
|
106
90
|
iconPosition: "start",
|
107
91
|
value: "choose",
|
108
92
|
label: `Choose ${title}`
|
@@ -131,12 +115,7 @@ const ImageSelector = props => {
|
|
131
115
|
})
|
132
116
|
})]
|
133
117
|
})
|
134
|
-
}), /*#__PURE__*/_jsx(Divider, {
|
135
|
-
sx: {
|
136
|
-
boxShadow: "0px -4px 8px 0px #0000000A",
|
137
|
-
borderBottomWidth: "0px"
|
138
|
-
}
|
139
|
-
}), /*#__PURE__*/_jsxs(DialogActions, {
|
118
|
+
}), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsxs(DialogActions, {
|
140
119
|
sx: {
|
141
120
|
p: 2
|
142
121
|
},
|
@@ -86,8 +86,7 @@ const ImageSelectorStyles = theme => ({
|
|
86
86
|
titleTypo: {
|
87
87
|
fontSize: "16px",
|
88
88
|
fontWeight: 500,
|
89
|
-
color: theme?.palette?.editor?.textColor
|
90
|
-
fontFamily: 'Inter, sans-serif'
|
89
|
+
color: theme?.palette?.editor?.textColor
|
91
90
|
},
|
92
91
|
addLinkField: {
|
93
92
|
"& .MuiOutlinedInput-input": {
|