@thebuoyant-tsdev/mui-ts-library 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +23 -0
- package/README.md +23 -0
- package/dist/components/chord-chart/ChordChart.js +284 -0
- package/dist/components/chord-chart/ChordChart.types.js +4 -0
- package/dist/components/circle-packing-chart/CirclePackingChart.js +382 -0
- package/dist/components/circle-packing-chart/CirclePackingChart.types.js +4 -0
- package/dist/components/gantt-chart/GanttBarRow.js +202 -0
- package/dist/components/gantt-chart/GanttChart.constants.js +14 -0
- package/dist/components/gantt-chart/GanttChart.js +258 -0
- package/dist/components/gantt-chart/GanttChart.store.js +119 -0
- package/dist/components/gantt-chart/GanttChart.types.js +47 -0
- package/dist/components/gantt-chart/GanttDeleteDialog.js +30 -0
- package/dist/components/gantt-chart/GanttDependencyArrows.js +54 -0
- package/dist/components/gantt-chart/GanttStatusContextMenu.js +36 -0
- package/dist/components/gantt-chart/GanttTaskDialog.js +324 -0
- package/dist/components/gantt-chart/GanttTaskPanel.js +415 -0
- package/dist/components/gantt-chart/GanttTimeline.js +223 -0
- package/dist/components/gantt-chart/GanttTimelineHeader.js +90 -0
- package/dist/components/gantt-chart/GanttToolbar.js +157 -0
- package/dist/components/gantt-chart/GanttWeekendStrips.js +29 -0
- package/dist/components/gantt-chart/hooks/useGanttDrag.js +104 -0
- package/dist/components/gantt-chart/util/gantt-chart.util.js +150 -0
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +488 -0
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.types.js +8 -0
- package/dist/components/json-editor/JsonEditor.js +102 -0
- package/dist/components/json-editor/JsonEditor.types.js +21 -0
- package/dist/components/json-editor/JsonEditorContent.js +185 -0
- package/dist/components/json-editor/JsonEditorFooter.js +55 -0
- package/dist/components/json-editor/JsonEditorToolbar.js +148 -0
- package/dist/components/password-strength-meter/PasswordStrengthBar.js +66 -0
- package/dist/components/password-strength-meter/PasswordStrengthMeter.js +272 -0
- package/dist/components/password-strength-meter/PasswordStrengthMeter.types.js +27 -0
- package/dist/components/password-strength-meter/util/password-strength.util.js +38 -0
- package/dist/components/radial-tree-chart/RadialTreeChart.js +447 -0
- package/dist/components/radial-tree-chart/RadialTreeChart.types.js +8 -0
- package/dist/components/rich-text-editor/RichTextEditor.js +135 -0
- package/dist/components/rich-text-editor/RichTextEditor.types.js +74 -0
- package/dist/components/rich-text-editor/RichTextEditorColorPicker.js +185 -0
- package/dist/components/rich-text-editor/RichTextEditorContent.js +129 -0
- package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.js +110 -0
- package/dist/components/rich-text-editor/RichTextEditorFooter.js +33 -0
- package/dist/components/rich-text-editor/RichTextEditorImageDialog.js +74 -0
- package/dist/components/rich-text-editor/RichTextEditorLinkDialog.js +70 -0
- package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +97 -0
- package/dist/components/rich-text-editor/RichTextEditorToolbar.js +362 -0
- package/dist/components/rich-text-editor/util/emojis.js +739 -0
- package/dist/components/shared/ToolbarButton.js +22 -0
- package/dist/components/shared/normalizeSize.js +6 -0
- package/dist/components/sql-editor/SqlEditor.js +100 -0
- package/dist/components/sql-editor/SqlEditor.types.js +20 -0
- package/dist/components/sql-editor/SqlEditorContent.js +248 -0
- package/dist/components/sql-editor/SqlEditorFooter.js +45 -0
- package/dist/components/sql-editor/SqlEditorToolbar.js +151 -0
- package/dist/components/sunburst-chart/SunburstChart.js +292 -0
- package/dist/components/sunburst-chart/SunburstChart.types.js +4 -0
- package/dist/components/tag-selection/TagSelection.js +102 -0
- package/dist/components/tag-selection/TagSelection.store.js +40 -0
- package/dist/components/tag-selection/TagSelection.types.d.ts +2 -0
- package/dist/components/tag-selection/TagSelection.types.js +18 -0
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +382 -0
- package/dist/components/tag-selection/TagSelectionChip.js +30 -0
- package/dist/components/tag-selection/TagSelectionSelectedTags.js +73 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +23 -8035
- package/package.json +1 -1
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { ToolbarButton as e } from "../shared/ToolbarButton.js";
|
|
2
|
+
import { RichTextEditorLinkDialog as t } from "./RichTextEditorLinkDialog.js";
|
|
3
|
+
import { RichTextEditorColorPicker as n } from "./RichTextEditorColorPicker.js";
|
|
4
|
+
import { RichTextEditorTableMenu as r } from "./RichTextEditorTableMenu.js";
|
|
5
|
+
import { RichTextEditorImageDialog as i } from "./RichTextEditorImageDialog.js";
|
|
6
|
+
import { RichTextEditorEmojiPicker as a } from "./RichTextEditorEmojiPicker.js";
|
|
7
|
+
import { useState as o } from "react";
|
|
8
|
+
import { Box as s, Divider as c, IconButton as l, Tooltip as u } from "@mui/material";
|
|
9
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
+
import m from "@mui/icons-material/Undo";
|
|
11
|
+
import h from "@mui/icons-material/Redo";
|
|
12
|
+
import ee from "@mui/icons-material/Fullscreen";
|
|
13
|
+
import g from "@mui/icons-material/FullscreenExit";
|
|
14
|
+
import te from "@mui/icons-material/Image";
|
|
15
|
+
import ne from "@mui/icons-material/EmojiEmotions";
|
|
16
|
+
import re from "@mui/icons-material/FormatBold";
|
|
17
|
+
import ie from "@mui/icons-material/FormatItalic";
|
|
18
|
+
import ae from "@mui/icons-material/FormatUnderlined";
|
|
19
|
+
import oe from "@mui/icons-material/StrikethroughS";
|
|
20
|
+
import _ from "@mui/icons-material/FormatListBulleted";
|
|
21
|
+
import v from "@mui/icons-material/FormatListNumbered";
|
|
22
|
+
import y from "@mui/icons-material/FormatQuote";
|
|
23
|
+
import se from "@mui/icons-material/Code";
|
|
24
|
+
import b from "@mui/icons-material/InsertLink";
|
|
25
|
+
import x from "@mui/icons-material/HorizontalRule";
|
|
26
|
+
import S from "@mui/icons-material/FormatColorText";
|
|
27
|
+
import C from "@mui/icons-material/BorderColor";
|
|
28
|
+
import w from "@mui/icons-material/FormatClear";
|
|
29
|
+
//#region src/components/rich-text-editor/RichTextEditorToolbar.tsx
|
|
30
|
+
function T({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
31
|
+
return /* @__PURE__ */ f(u, {
|
|
32
|
+
title: e,
|
|
33
|
+
arrow: !0,
|
|
34
|
+
children: /* @__PURE__ */ f("span", { children: /* @__PURE__ */ p(l, {
|
|
35
|
+
size: "small",
|
|
36
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
37
|
+
onClick: i,
|
|
38
|
+
disabled: r,
|
|
39
|
+
sx: {
|
|
40
|
+
borderRadius: 1,
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
gap: 0,
|
|
43
|
+
pb: .25
|
|
44
|
+
},
|
|
45
|
+
"aria-label": e,
|
|
46
|
+
children: [/* @__PURE__ */ f(s, {
|
|
47
|
+
sx: {
|
|
48
|
+
display: "flex",
|
|
49
|
+
alignItems: "center"
|
|
50
|
+
},
|
|
51
|
+
children: t
|
|
52
|
+
}), /* @__PURE__ */ f(s, { sx: {
|
|
53
|
+
width: "80%",
|
|
54
|
+
height: 3,
|
|
55
|
+
bgcolor: n ?? "text.primary",
|
|
56
|
+
borderRadius: .5,
|
|
57
|
+
mt: "1px"
|
|
58
|
+
} })]
|
|
59
|
+
}) })
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function E({ level: e }) {
|
|
63
|
+
return /* @__PURE__ */ p(s, {
|
|
64
|
+
component: "span",
|
|
65
|
+
sx: {
|
|
66
|
+
fontWeight: "bold",
|
|
67
|
+
fontSize: "0.875rem",
|
|
68
|
+
lineHeight: 1
|
|
69
|
+
},
|
|
70
|
+
children: ["H", e]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function D({ editor: D, toolbarConfig: O, translation: k, disabled: A, isFullscreen: j, onToggleFullscreen: ce }) {
|
|
74
|
+
let [M, N] = o(!1), [P, F] = o(!1), [I, L] = o(null), [R, z] = o(null), [B, V] = o(null), H = A || !D, U = D?.getAttributes("textStyle")?.color, W = D?.getAttributes("highlight")?.color, G = O.showBold || O.showItalic || O.showUnderline || O.showStrike, K = O.showHeading1 || O.showHeading2 || O.showHeading3, q = O.showBulletList || O.showOrderedList, J = O.showBlockquote || O.showCodeBlock || O.showLink || O.showHorizontalRule, Y = O.showTextColor || O.showHighlight, X = O.showUndoRedo || O.showClearFormat, Z = O.showTableButton || O.showImageButton || O.showEmojiButton, Q = [
|
|
75
|
+
G,
|
|
76
|
+
K,
|
|
77
|
+
q,
|
|
78
|
+
J,
|
|
79
|
+
Y,
|
|
80
|
+
X,
|
|
81
|
+
Z
|
|
82
|
+
], le = Q.filter(Boolean).length;
|
|
83
|
+
function $(e, t) {
|
|
84
|
+
return !e || Q.slice(t + 1).findIndex(Boolean) === -1 ? null : /* @__PURE__ */ f(c, {
|
|
85
|
+
orientation: "vertical",
|
|
86
|
+
flexItem: !0,
|
|
87
|
+
sx: { mx: .5 }
|
|
88
|
+
}, `div-${t}`);
|
|
89
|
+
}
|
|
90
|
+
return /* @__PURE__ */ p(d, { children: [
|
|
91
|
+
/* @__PURE__ */ p(s, {
|
|
92
|
+
sx: {
|
|
93
|
+
display: "flex",
|
|
94
|
+
flexWrap: "wrap",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
gap: .25,
|
|
97
|
+
px: 1,
|
|
98
|
+
py: .5
|
|
99
|
+
},
|
|
100
|
+
role: "toolbar",
|
|
101
|
+
"aria-label": "Text formatting",
|
|
102
|
+
children: [
|
|
103
|
+
G && /* @__PURE__ */ p(s, {
|
|
104
|
+
sx: {
|
|
105
|
+
display: "flex",
|
|
106
|
+
gap: .25
|
|
107
|
+
},
|
|
108
|
+
children: [
|
|
109
|
+
O.showBold && /* @__PURE__ */ f(e, {
|
|
110
|
+
label: k.bold,
|
|
111
|
+
icon: /* @__PURE__ */ f(re, { fontSize: "small" }),
|
|
112
|
+
onClick: () => D?.chain().focus().toggleBold().run(),
|
|
113
|
+
active: D?.isActive("bold"),
|
|
114
|
+
disabled: H
|
|
115
|
+
}),
|
|
116
|
+
O.showItalic && /* @__PURE__ */ f(e, {
|
|
117
|
+
label: k.italic,
|
|
118
|
+
icon: /* @__PURE__ */ f(ie, { fontSize: "small" }),
|
|
119
|
+
onClick: () => D?.chain().focus().toggleItalic().run(),
|
|
120
|
+
active: D?.isActive("italic"),
|
|
121
|
+
disabled: H
|
|
122
|
+
}),
|
|
123
|
+
O.showUnderline && /* @__PURE__ */ f(e, {
|
|
124
|
+
label: k.underline,
|
|
125
|
+
icon: /* @__PURE__ */ f(ae, { fontSize: "small" }),
|
|
126
|
+
onClick: () => D?.chain().focus().toggleUnderline().run(),
|
|
127
|
+
active: D?.isActive("underline"),
|
|
128
|
+
disabled: H
|
|
129
|
+
}),
|
|
130
|
+
O.showStrike && /* @__PURE__ */ f(e, {
|
|
131
|
+
label: k.strike,
|
|
132
|
+
icon: /* @__PURE__ */ f(oe, { fontSize: "small" }),
|
|
133
|
+
onClick: () => D?.chain().focus().toggleStrike().run(),
|
|
134
|
+
active: D?.isActive("strike"),
|
|
135
|
+
disabled: H
|
|
136
|
+
})
|
|
137
|
+
]
|
|
138
|
+
}),
|
|
139
|
+
$(G, 0),
|
|
140
|
+
K && /* @__PURE__ */ p(s, {
|
|
141
|
+
sx: {
|
|
142
|
+
display: "flex",
|
|
143
|
+
gap: .25
|
|
144
|
+
},
|
|
145
|
+
children: [
|
|
146
|
+
O.showHeading1 && /* @__PURE__ */ f(e, {
|
|
147
|
+
label: k.heading1,
|
|
148
|
+
icon: /* @__PURE__ */ f(E, { level: 1 }),
|
|
149
|
+
onClick: () => D?.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
150
|
+
active: D?.isActive("heading", { level: 1 }),
|
|
151
|
+
disabled: H
|
|
152
|
+
}),
|
|
153
|
+
O.showHeading2 && /* @__PURE__ */ f(e, {
|
|
154
|
+
label: k.heading2,
|
|
155
|
+
icon: /* @__PURE__ */ f(E, { level: 2 }),
|
|
156
|
+
onClick: () => D?.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
157
|
+
active: D?.isActive("heading", { level: 2 }),
|
|
158
|
+
disabled: H
|
|
159
|
+
}),
|
|
160
|
+
O.showHeading3 && /* @__PURE__ */ f(e, {
|
|
161
|
+
label: k.heading3,
|
|
162
|
+
icon: /* @__PURE__ */ f(E, { level: 3 }),
|
|
163
|
+
onClick: () => D?.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
164
|
+
active: D?.isActive("heading", { level: 3 }),
|
|
165
|
+
disabled: H
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
}),
|
|
169
|
+
$(K, 1),
|
|
170
|
+
q && /* @__PURE__ */ p(s, {
|
|
171
|
+
sx: {
|
|
172
|
+
display: "flex",
|
|
173
|
+
gap: .25
|
|
174
|
+
},
|
|
175
|
+
children: [O.showBulletList && /* @__PURE__ */ f(e, {
|
|
176
|
+
label: k.bulletList,
|
|
177
|
+
icon: /* @__PURE__ */ f(_, { fontSize: "small" }),
|
|
178
|
+
onClick: () => D?.chain().focus().toggleBulletList().run(),
|
|
179
|
+
active: D?.isActive("bulletList"),
|
|
180
|
+
disabled: H
|
|
181
|
+
}), O.showOrderedList && /* @__PURE__ */ f(e, {
|
|
182
|
+
label: k.orderedList,
|
|
183
|
+
icon: /* @__PURE__ */ f(v, { fontSize: "small" }),
|
|
184
|
+
onClick: () => D?.chain().focus().toggleOrderedList().run(),
|
|
185
|
+
active: D?.isActive("orderedList"),
|
|
186
|
+
disabled: H
|
|
187
|
+
})]
|
|
188
|
+
}),
|
|
189
|
+
$(q, 2),
|
|
190
|
+
J && /* @__PURE__ */ p(s, {
|
|
191
|
+
sx: {
|
|
192
|
+
display: "flex",
|
|
193
|
+
gap: .25
|
|
194
|
+
},
|
|
195
|
+
children: [
|
|
196
|
+
O.showBlockquote && /* @__PURE__ */ f(e, {
|
|
197
|
+
label: k.blockquote,
|
|
198
|
+
icon: /* @__PURE__ */ f(y, { fontSize: "small" }),
|
|
199
|
+
onClick: () => D?.chain().focus().toggleBlockquote().run(),
|
|
200
|
+
active: D?.isActive("blockquote"),
|
|
201
|
+
disabled: H
|
|
202
|
+
}),
|
|
203
|
+
O.showCodeBlock && /* @__PURE__ */ f(e, {
|
|
204
|
+
label: k.codeBlock,
|
|
205
|
+
icon: /* @__PURE__ */ f(se, { fontSize: "small" }),
|
|
206
|
+
onClick: () => D?.chain().focus().toggleCodeBlock().run(),
|
|
207
|
+
active: D?.isActive("codeBlock"),
|
|
208
|
+
disabled: H
|
|
209
|
+
}),
|
|
210
|
+
O.showLink && /* @__PURE__ */ f(e, {
|
|
211
|
+
label: k.link,
|
|
212
|
+
icon: /* @__PURE__ */ f(b, { fontSize: "small" }),
|
|
213
|
+
onClick: () => N(!0),
|
|
214
|
+
active: D?.isActive("link"),
|
|
215
|
+
disabled: H
|
|
216
|
+
}),
|
|
217
|
+
O.showHorizontalRule && /* @__PURE__ */ f(e, {
|
|
218
|
+
label: k.horizontalRule,
|
|
219
|
+
icon: /* @__PURE__ */ f(x, { fontSize: "small" }),
|
|
220
|
+
onClick: () => D?.chain().focus().setHorizontalRule().run(),
|
|
221
|
+
disabled: H
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
}),
|
|
225
|
+
$(J, 3),
|
|
226
|
+
Y && /* @__PURE__ */ p(s, {
|
|
227
|
+
sx: {
|
|
228
|
+
display: "flex",
|
|
229
|
+
gap: .25
|
|
230
|
+
},
|
|
231
|
+
children: [O.showTextColor && /* @__PURE__ */ f(T, {
|
|
232
|
+
label: k.textColor,
|
|
233
|
+
icon: /* @__PURE__ */ f(S, { fontSize: "small" }),
|
|
234
|
+
activeColor: U,
|
|
235
|
+
disabled: H,
|
|
236
|
+
onClick: (e) => z(e.currentTarget)
|
|
237
|
+
}), O.showHighlight && /* @__PURE__ */ f(T, {
|
|
238
|
+
label: k.highlight,
|
|
239
|
+
icon: /* @__PURE__ */ f(C, { fontSize: "small" }),
|
|
240
|
+
activeColor: W,
|
|
241
|
+
disabled: H,
|
|
242
|
+
onClick: (e) => V(e.currentTarget)
|
|
243
|
+
})]
|
|
244
|
+
}),
|
|
245
|
+
$(Y, 4),
|
|
246
|
+
X && /* @__PURE__ */ p(s, {
|
|
247
|
+
sx: {
|
|
248
|
+
display: "flex",
|
|
249
|
+
gap: .25
|
|
250
|
+
},
|
|
251
|
+
children: [O.showUndoRedo && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(e, {
|
|
252
|
+
label: k.undo,
|
|
253
|
+
icon: /* @__PURE__ */ f(m, { fontSize: "small" }),
|
|
254
|
+
onClick: () => D?.chain().focus().undo().run(),
|
|
255
|
+
disabled: H || !D?.can().undo()
|
|
256
|
+
}), /* @__PURE__ */ f(e, {
|
|
257
|
+
label: k.redo,
|
|
258
|
+
icon: /* @__PURE__ */ f(h, { fontSize: "small" }),
|
|
259
|
+
onClick: () => D?.chain().focus().redo().run(),
|
|
260
|
+
disabled: H || !D?.can().redo()
|
|
261
|
+
})] }), O.showClearFormat && /* @__PURE__ */ f(e, {
|
|
262
|
+
label: k.clearFormat,
|
|
263
|
+
icon: /* @__PURE__ */ f(w, { fontSize: "small" }),
|
|
264
|
+
onClick: () => D?.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
265
|
+
disabled: H
|
|
266
|
+
})]
|
|
267
|
+
}),
|
|
268
|
+
$(X, 5),
|
|
269
|
+
Z && /* @__PURE__ */ p(s, {
|
|
270
|
+
sx: {
|
|
271
|
+
display: "flex",
|
|
272
|
+
gap: .25
|
|
273
|
+
},
|
|
274
|
+
children: [
|
|
275
|
+
O.showTableButton && /* @__PURE__ */ f(r, {
|
|
276
|
+
editor: D,
|
|
277
|
+
translation: k,
|
|
278
|
+
disabled: H
|
|
279
|
+
}),
|
|
280
|
+
O.showImageButton && /* @__PURE__ */ f(e, {
|
|
281
|
+
label: k.image,
|
|
282
|
+
icon: /* @__PURE__ */ f(te, { fontSize: "small" }),
|
|
283
|
+
onClick: () => F(!0),
|
|
284
|
+
disabled: H
|
|
285
|
+
}),
|
|
286
|
+
O.showEmojiButton && /* @__PURE__ */ f(u, {
|
|
287
|
+
title: k.emoji,
|
|
288
|
+
arrow: !0,
|
|
289
|
+
children: /* @__PURE__ */ f("span", { children: /* @__PURE__ */ f(l, {
|
|
290
|
+
size: "small",
|
|
291
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
292
|
+
onClick: (e) => L(e.currentTarget),
|
|
293
|
+
disabled: H,
|
|
294
|
+
sx: { borderRadius: 1 },
|
|
295
|
+
"aria-label": k.emoji,
|
|
296
|
+
children: /* @__PURE__ */ f(ne, { fontSize: "small" })
|
|
297
|
+
}) })
|
|
298
|
+
})
|
|
299
|
+
]
|
|
300
|
+
}),
|
|
301
|
+
le === 0 && /* @__PURE__ */ f(s, { sx: { height: 32 } }),
|
|
302
|
+
O.showFullscreenButton && /* @__PURE__ */ f(s, {
|
|
303
|
+
sx: { ml: "auto" },
|
|
304
|
+
children: /* @__PURE__ */ f(u, {
|
|
305
|
+
title: j ? k.exitFullscreen : k.fullscreen,
|
|
306
|
+
arrow: !0,
|
|
307
|
+
children: /* @__PURE__ */ f("span", { children: /* @__PURE__ */ f(l, {
|
|
308
|
+
size: "small",
|
|
309
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
310
|
+
onClick: ce,
|
|
311
|
+
disabled: A || !D,
|
|
312
|
+
sx: { borderRadius: 1 },
|
|
313
|
+
"aria-label": j ? k.exitFullscreen : k.fullscreen,
|
|
314
|
+
children: f(j ? g : ee, { fontSize: "small" })
|
|
315
|
+
}) })
|
|
316
|
+
})
|
|
317
|
+
})
|
|
318
|
+
]
|
|
319
|
+
}),
|
|
320
|
+
O.showLink && D && /* @__PURE__ */ f(t, {
|
|
321
|
+
open: M,
|
|
322
|
+
onClose: () => N(!1),
|
|
323
|
+
editor: D,
|
|
324
|
+
translation: k
|
|
325
|
+
}),
|
|
326
|
+
O.showTextColor && /* @__PURE__ */ f(n, {
|
|
327
|
+
anchorEl: R,
|
|
328
|
+
open: !!R,
|
|
329
|
+
onClose: () => z(null),
|
|
330
|
+
mode: "textColor",
|
|
331
|
+
activeColor: U,
|
|
332
|
+
onSelectColor: (e) => D?.chain().focus().setColor(e).run(),
|
|
333
|
+
onRemoveColor: () => D?.chain().focus().unsetColor().run(),
|
|
334
|
+
removeLabel: k.removeTextColor
|
|
335
|
+
}),
|
|
336
|
+
O.showHighlight && /* @__PURE__ */ f(n, {
|
|
337
|
+
anchorEl: B,
|
|
338
|
+
open: !!B,
|
|
339
|
+
onClose: () => V(null),
|
|
340
|
+
mode: "highlight",
|
|
341
|
+
activeColor: W,
|
|
342
|
+
onSelectColor: (e) => D?.chain().focus().setHighlight({ color: e }).run(),
|
|
343
|
+
onRemoveColor: () => D?.chain().focus().unsetHighlight().run(),
|
|
344
|
+
removeLabel: k.removeHighlight
|
|
345
|
+
}),
|
|
346
|
+
O.showImageButton && D && /* @__PURE__ */ f(i, {
|
|
347
|
+
open: P,
|
|
348
|
+
onClose: () => F(!1),
|
|
349
|
+
editor: D,
|
|
350
|
+
translation: k
|
|
351
|
+
}),
|
|
352
|
+
O.showEmojiButton && /* @__PURE__ */ f(a, {
|
|
353
|
+
anchorEl: I,
|
|
354
|
+
open: !!I,
|
|
355
|
+
onClose: () => L(null),
|
|
356
|
+
onSelect: (e) => D?.chain().focus().insertContent(e).run(),
|
|
357
|
+
translation: k
|
|
358
|
+
})
|
|
359
|
+
] });
|
|
360
|
+
}
|
|
361
|
+
//#endregion
|
|
362
|
+
export { D as RichTextEditorToolbar };
|