@uva-glass/component-library 1.62.12 → 1.63.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/dist/LexicalClipboard.prod-C6LsK5E6.js +311 -0
- package/dist/LexicalClipboard.prod-C6LsK5E6.js.map +1 -0
- package/dist/LexicalTable.prod-DqzrJuYr.js +1221 -0
- package/dist/LexicalTable.prod-DqzrJuYr.js.map +1 -0
- package/dist/{LexicalUtils.prod-DlLRWqta.js → LexicalUtils.prod-BTFNWAMw.js} +33 -42
- package/dist/{LexicalUtils.prod-DlLRWqta.js.map → LexicalUtils.prod-BTFNWAMw.js.map} +1 -1
- package/dist/{TablePlugin-B3ZkyOU_.js → TablePlugin-BLzR0g93.js} +58 -55
- package/dist/{TablePlugin-B3ZkyOU_.js.map → TablePlugin-BLzR0g93.js.map} +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +24 -20
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/FormInput/FormInput.js +15 -11
- package/dist/components/FormInput/FormInput.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +16 -12
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +6 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +22 -18
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +20 -16
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +7 -3
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +16 -16
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +19 -16
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +7 -3
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +100 -98
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +36 -36
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +31 -0
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -0
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +5 -0
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js.map +1 -0
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +6 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +7 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +12 -12
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +36 -36
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +361 -358
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +27 -27
- package/dist/components/index.js +1 -1
- package/dist/helpers-B-pdj8pq.js +168 -0
- package/dist/{helpers-CC9_diXm.js.map → helpers-B-pdj8pq.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +13 -16
- package/dist/Lexical.prod-DOTdxgeo.js +0 -4072
- package/dist/Lexical.prod-DOTdxgeo.js.map +0 -1
- package/dist/LexicalLink.prod-Cqa5Im8X.js +0 -208
- package/dist/LexicalLink.prod-Cqa5Im8X.js.map +0 -1
- package/dist/LexicalList.prod-DlqzsJTH.js +0 -564
- package/dist/LexicalList.prod-DlqzsJTH.js.map +0 -1
- package/dist/LexicalTable.prod-BKz2StgB.js +0 -1525
- package/dist/LexicalTable.prod-BKz2StgB.js.map +0 -1
- package/dist/helpers-CC9_diXm.js +0 -168
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { l as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as _, jsxs as K, Fragment as Pe } from "react/jsx-runtime";
|
|
2
|
+
import { l as qe, o as Je, u as R } from "../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
+
import { createEditor as Ie, $getRoot as U, $createParagraphNode as me, $getSelection as C, $isDecoratorNode as W, $isElementNode as j, $isParagraphNode as Qe, $isTextNode as L, $isRangeSelection as E, createCommand as Ze, PASTE_COMMAND as Ke, isSelectionCapturedInDecoratorInput as et, COMMAND_PRIORITY_EDITOR as p, CUT_COMMAND as tt, $isNodeSelection as I, COPY_COMMAND as nt, SELECT_ALL_COMMAND as rt, $selectAll as ot, DRAGOVER_COMMAND as it, $getNearestNodeFromDOMNode as ie, DRAGSTART_COMMAND as st, DROP_COMMAND as at, $createRangeSelection as lt, $normalizeSelection__EXPERIMENTAL as ct, $setSelection as dt, KEY_ESCAPE_COMMAND as ut, KEY_ENTER_COMMAND as ft, INSERT_LINE_BREAK_COMMAND as ge, INSERT_PARAGRAPH_COMMAND as he, KEY_DELETE_COMMAND as mt, DELETE_CHARACTER_COMMAND as se, KEY_BACKSPACE_COMMAND as pt, $isRootNode as Fe, OUTDENT_CONTENT_COMMAND as Ce, KEY_ARROW_RIGHT_COMMAND as gt, KEY_ARROW_LEFT_COMMAND as ht, KEY_ARROW_DOWN_COMMAND as Ct, $getAdjacentNode as Ee, KEY_ARROW_UP_COMMAND as Et, INDENT_CONTENT_COMMAND as _t, INSERT_TAB_COMMAND as Nt, $insertNodes as vt, $createTabNode as yt, FORMAT_ELEMENT_COMMAND as Mt, FORMAT_TEXT_COMMAND as Dt, REMOVE_TEXT_COMMAND as wt, CONTROLLED_TEXT_INSERTION_COMMAND as Ot, DELETE_LINE_COMMAND as At, DELETE_WORD_COMMAND as bt, CLICK_COMMAND as St, COMMAND_PRIORITY_LOW as _e, getNearestEditorFromDOMNode as Tt, isHTMLAnchorElement as Lt, CAN_REDO_COMMAND as q, CAN_UNDO_COMMAND as J, CLEAR_HISTORY_COMMAND as Rt, CLEAR_EDITOR_COMMAND as $t, REDO_COMMAND as kt, UNDO_COMMAND as xt, $getNodeByKey as Pt } from "lexical";
|
|
4
4
|
import * as ae from "react";
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { L as B, i as
|
|
7
|
-
import { r as
|
|
8
|
-
import { _ as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { useMemo as G, useLayoutEffect as Y, useEffect as O, useRef as Ue, useState as x, Suspense as It, forwardRef as Be, useCallback as Kt } from "react";
|
|
6
|
+
import { L as B, i as F, e as Ft, t as pe, r as Ut, u as Bt } from "../../LexicalUtils.prod-BTFNWAMw.js";
|
|
7
|
+
import { r as Ne } from "../../index-DsprzSCj.js";
|
|
8
|
+
import { _ as ve, O as ye, L as Me, $ as De, h as zt, m as Yt } from "../../LexicalClipboard.prod-C6LsK5E6.js";
|
|
9
|
+
import { ListNode as ze, ListItemNode as Ye, registerList as Ht } from "@lexical/list";
|
|
10
|
+
import { LinkNode as He, TOGGLE_LINK_COMMAND as we, $toggleLink as le, $isLinkNode as Wt, AutoLinkNode as jt } from "@lexical/link";
|
|
11
|
+
import { u as re, e as oe, c as We, K as Gt, n as Oe, r as Xt, d as Vt, b as qt, k as Jt, F as Qt, h as Ae, o as Zt, U as en } from "../../LexicalTable.prod-DqzrJuYr.js";
|
|
12
|
+
import { a as tn, F as nn, M as rn } from "../../helpers-B-pdj8pq.js";
|
|
12
13
|
import { c as on } from "../../clsx-OuTLNxxd.js";
|
|
13
14
|
import { exportMap as sn, isStartingWithHtmlTag as an, mergeBoldStrongTags as ln } from "./helpers.js";
|
|
14
|
-
import { s as
|
|
15
|
+
import { s as k } from "../../RteEditor.module-DcvGRx3a.js";
|
|
15
16
|
import { ToolBarPlugin as cn } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
|
|
16
17
|
import { useTranslation as dn } from "./hooks/useTranslation.js";
|
|
17
|
-
import "../../TablePlugin-
|
|
18
|
+
import "../../TablePlugin-BLzR0g93.js";
|
|
18
19
|
import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
19
20
|
import "./hooks/components/Flyout.js";
|
|
20
21
|
import "../Buttons/Button.js";
|
|
@@ -37,97 +38,98 @@ import "../../SortableProvider-BUsvniX7.js";
|
|
|
37
38
|
import { UvaTheme as fn } from "./UvaTheme/UvaTheme.js";
|
|
38
39
|
import { EditorHeader as mn } from "./EditorHeader/EditorHeader.js";
|
|
39
40
|
import { useLanguage as pn, LanguageProvider as gn } from "./Providers/LanguageProvider.js";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
import { PasteHandlerPlugin as hn } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
|
|
42
|
+
const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Cn = je ? Y : O, Q = { tag: "history-merge" };
|
|
43
|
+
function En({ initialConfig: t, children: e }) {
|
|
44
|
+
const n = G(() => {
|
|
45
|
+
const { theme: r, namespace: i, nodes: o, onError: s, editorState: a, html: l } = t, c = Je(null, r), d = Ie({ editable: t.editable, html: l, namespace: i, nodes: o, onError: (u) => s(u, d), theme: r });
|
|
44
46
|
return function(u, f) {
|
|
45
47
|
if (f !== null) {
|
|
46
48
|
if (f === void 0) u.update(() => {
|
|
47
|
-
const m =
|
|
49
|
+
const m = U();
|
|
48
50
|
if (m.isEmpty()) {
|
|
49
51
|
const g = me();
|
|
50
52
|
m.append(g);
|
|
51
|
-
const h =
|
|
52
|
-
(
|
|
53
|
+
const h = je ? document.activeElement : null;
|
|
54
|
+
(C() !== null || h !== null && h === u.getRootElement()) && g.select();
|
|
53
55
|
}
|
|
54
|
-
},
|
|
56
|
+
}, Q);
|
|
55
57
|
else if (f !== null) switch (typeof f) {
|
|
56
58
|
case "string": {
|
|
57
59
|
const m = u.parseEditorState(f);
|
|
58
|
-
u.setEditorState(m,
|
|
60
|
+
u.setEditorState(m, Q);
|
|
59
61
|
break;
|
|
60
62
|
}
|
|
61
63
|
case "object":
|
|
62
|
-
u.setEditorState(f,
|
|
64
|
+
u.setEditorState(f, Q);
|
|
63
65
|
break;
|
|
64
66
|
case "function":
|
|
65
67
|
u.update(() => {
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
+
U().isEmpty() && f(u);
|
|
69
|
+
}, Q);
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
}(d, a), [d, c];
|
|
71
73
|
}, []);
|
|
72
|
-
return
|
|
74
|
+
return Cn(() => {
|
|
73
75
|
const r = t.editable, [i] = n;
|
|
74
76
|
i.setEditable(r === void 0 || r);
|
|
75
|
-
}, []),
|
|
77
|
+
}, []), _(qe.Provider, { value: n, children: e });
|
|
76
78
|
}
|
|
77
|
-
const
|
|
78
|
-
function
|
|
79
|
+
const _n = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? Y : O;
|
|
80
|
+
function Nn(t) {
|
|
79
81
|
return { initialValueFn: () => t.isEditable(), subscribe: (e) => t.registerEditableListener(e) };
|
|
80
82
|
}
|
|
81
|
-
function
|
|
83
|
+
function vn() {
|
|
82
84
|
return function(t) {
|
|
83
|
-
const [e] =
|
|
84
|
-
return
|
|
85
|
+
const [e] = R(), n = G(() => t(e), [e, t]), r = Ue(n.initialValueFn()), [i, o] = x(r.current);
|
|
86
|
+
return _n(() => {
|
|
85
87
|
const { initialValueFn: s, subscribe: a } = n, l = s();
|
|
86
88
|
return r.current !== l && (r.current = l, o(l)), a((c) => {
|
|
87
89
|
r.current = c, o(c);
|
|
88
90
|
});
|
|
89
91
|
}, [n, t]), i;
|
|
90
|
-
}(
|
|
92
|
+
}(Nn);
|
|
91
93
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
94
|
+
function yn() {
|
|
95
|
+
return U().getTextContent();
|
|
94
96
|
}
|
|
95
|
-
function
|
|
97
|
+
function Mn(t, e = !0) {
|
|
96
98
|
if (t) return !1;
|
|
97
|
-
let n =
|
|
99
|
+
let n = yn();
|
|
98
100
|
return e && (n = n.trim()), n === "";
|
|
99
101
|
}
|
|
100
|
-
function
|
|
101
|
-
if (!
|
|
102
|
-
const e =
|
|
102
|
+
function Dn(t) {
|
|
103
|
+
if (!Mn(t, !1)) return !1;
|
|
104
|
+
const e = U().getChildren(), n = e.length;
|
|
103
105
|
if (n > 1) return !1;
|
|
104
106
|
for (let r = 0; r < n; r++) {
|
|
105
107
|
const i = e[r];
|
|
106
108
|
if (W(i)) return !1;
|
|
107
|
-
if (
|
|
108
|
-
if (!
|
|
109
|
+
if (j(i)) {
|
|
110
|
+
if (!Qe(i) || i.__indent !== 0) return !1;
|
|
109
111
|
const o = i.getChildren(), s = o.length;
|
|
110
112
|
for (let a = 0; a < s; a++) {
|
|
111
113
|
const l = o[r];
|
|
112
|
-
if (!
|
|
114
|
+
if (!L(l)) return !1;
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
return !0;
|
|
117
119
|
}
|
|
118
|
-
function
|
|
119
|
-
return () =>
|
|
120
|
+
function Ge(t) {
|
|
121
|
+
return () => Dn(t);
|
|
120
122
|
}
|
|
121
|
-
function
|
|
123
|
+
function wn(t) {
|
|
122
124
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
123
125
|
}
|
|
124
|
-
|
|
126
|
+
wn(function(t) {
|
|
125
127
|
const e = new URLSearchParams();
|
|
126
128
|
e.append("code", t);
|
|
127
129
|
for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
|
|
128
130
|
throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
129
131
|
});
|
|
130
|
-
function
|
|
132
|
+
function On(t) {
|
|
131
133
|
const e = window.location.origin, n = (r) => {
|
|
132
134
|
if (r.origin !== e) return;
|
|
133
135
|
const i = t.getRootElement();
|
|
@@ -147,14 +149,14 @@ function _n(t) {
|
|
|
147
149
|
if (l) {
|
|
148
150
|
const [c, d, u, f, m, g] = l;
|
|
149
151
|
t.update(() => {
|
|
150
|
-
const h =
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
let
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
152
|
+
const h = C();
|
|
153
|
+
if (E(h)) {
|
|
154
|
+
const D = h.anchor;
|
|
155
|
+
let N = D.getNode(), v = 0, M = 0;
|
|
156
|
+
if (L(N) && c >= 0 && d >= 0 && (v = c, M = c + d, h.setTextNodeRange(N, v, N, M)), v === M && u === "" || (h.insertRawText(u), N = D.getNode()), L(N)) {
|
|
157
|
+
v = f, M = f + m;
|
|
158
|
+
const A = N.getTextContentSize();
|
|
159
|
+
v = v > A ? A : v, M = M > A ? A : M, h.setTextNodeRange(N, v, N, M);
|
|
158
160
|
}
|
|
159
161
|
r.stopImmediatePropagation();
|
|
160
162
|
}
|
|
@@ -168,7 +170,7 @@ function _n(t) {
|
|
|
168
170
|
window.removeEventListener("message", n, !0);
|
|
169
171
|
};
|
|
170
172
|
}
|
|
171
|
-
function
|
|
173
|
+
function be(t, e) {
|
|
172
174
|
if (document.caretRangeFromPoint !== void 0) {
|
|
173
175
|
const n = document.caretRangeFromPoint(t, e);
|
|
174
176
|
return n === null ? null : { node: n.startContainer, offset: n.startOffset };
|
|
@@ -179,21 +181,21 @@ function Le(t, e) {
|
|
|
179
181
|
}
|
|
180
182
|
return null;
|
|
181
183
|
}
|
|
182
|
-
const
|
|
183
|
-
function
|
|
184
|
+
const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, An = H && "documentMode" in document ? document.documentMode : null, bn = !(!H || !("InputEvent" in window) || An) && "getTargetRanges" in new window.InputEvent("input"), Sn = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Tn = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ln = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), Rn = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Ln, Se = Ze("DRAG_DROP_PASTE_FILE");
|
|
185
|
+
function Z(t) {
|
|
184
186
|
let e = null;
|
|
185
|
-
if (
|
|
187
|
+
if (F(t, DragEvent) ? e = t.dataTransfer : F(t, ClipboardEvent) && (e = t.clipboardData), e === null) return [!1, [], !1];
|
|
186
188
|
const n = e.types, r = n.includes("Files"), i = n.includes("text/html") || n.includes("text/plain");
|
|
187
189
|
return [r, Array.from(e.files), i];
|
|
188
190
|
}
|
|
189
|
-
function
|
|
190
|
-
const e =
|
|
191
|
-
if (!
|
|
191
|
+
function Te(t) {
|
|
192
|
+
const e = C();
|
|
193
|
+
if (!E(e)) return !1;
|
|
192
194
|
const n = /* @__PURE__ */ new Set(), r = e.getNodes();
|
|
193
195
|
for (let i = 0; i < r.length; i++) {
|
|
194
196
|
const o = r[i], s = o.getKey();
|
|
195
197
|
if (n.has(s)) continue;
|
|
196
|
-
const a = pe(o, (c) =>
|
|
198
|
+
const a = pe(o, (c) => j(c) && !c.isInline());
|
|
197
199
|
if (a === null) continue;
|
|
198
200
|
const l = a.getKey();
|
|
199
201
|
a.canIndent() && !n.has(l) && (n.add(l), t(a));
|
|
@@ -204,207 +206,207 @@ function ee(t) {
|
|
|
204
206
|
const e = ie(t);
|
|
205
207
|
return W(e);
|
|
206
208
|
}
|
|
207
|
-
function
|
|
208
|
-
return B(t.registerCommand(
|
|
209
|
-
const n =
|
|
210
|
-
return !!
|
|
209
|
+
function $n(t) {
|
|
210
|
+
return B(t.registerCommand(St, (e) => {
|
|
211
|
+
const n = C();
|
|
212
|
+
return !!I(n) && (n.clear(), !0);
|
|
211
213
|
}, 0), t.registerCommand(se, (e) => {
|
|
212
|
-
const n =
|
|
213
|
-
return !!
|
|
214
|
-
}, p), t.registerCommand(
|
|
215
|
-
const n =
|
|
216
|
-
return !!
|
|
217
|
-
}, p), t.registerCommand(
|
|
218
|
-
const n =
|
|
219
|
-
return !!
|
|
220
|
-
}, p), t.registerCommand(
|
|
221
|
-
const n =
|
|
214
|
+
const n = C();
|
|
215
|
+
return !!E(n) && (n.deleteCharacter(e), !0);
|
|
216
|
+
}, p), t.registerCommand(bt, (e) => {
|
|
217
|
+
const n = C();
|
|
218
|
+
return !!E(n) && (n.deleteWord(e), !0);
|
|
219
|
+
}, p), t.registerCommand(At, (e) => {
|
|
220
|
+
const n = C();
|
|
221
|
+
return !!E(n) && (n.deleteLine(e), !0);
|
|
222
|
+
}, p), t.registerCommand(Ot, (e) => {
|
|
223
|
+
const n = C();
|
|
222
224
|
if (typeof e == "string") n !== null && n.insertText(e);
|
|
223
225
|
else {
|
|
224
226
|
if (n === null) return !1;
|
|
225
227
|
const r = e.dataTransfer;
|
|
226
|
-
if (r != null)
|
|
227
|
-
else if (
|
|
228
|
+
if (r != null) ve(r, n, t);
|
|
229
|
+
else if (E(n)) {
|
|
228
230
|
const i = e.data;
|
|
229
231
|
return i && n.insertText(i), !0;
|
|
230
232
|
}
|
|
231
233
|
}
|
|
232
234
|
return !0;
|
|
233
|
-
}, p), t.registerCommand(
|
|
234
|
-
const e =
|
|
235
|
-
return !!
|
|
236
|
-
}, p), t.registerCommand(
|
|
237
|
-
const n =
|
|
238
|
-
return !!
|
|
239
|
-
}, p), t.registerCommand(
|
|
240
|
-
const n =
|
|
241
|
-
if (!
|
|
235
|
+
}, p), t.registerCommand(wt, () => {
|
|
236
|
+
const e = C();
|
|
237
|
+
return !!E(e) && (e.removeText(), !0);
|
|
238
|
+
}, p), t.registerCommand(Dt, (e) => {
|
|
239
|
+
const n = C();
|
|
240
|
+
return !!E(n) && (n.formatText(e), !0);
|
|
241
|
+
}, p), t.registerCommand(Mt, (e) => {
|
|
242
|
+
const n = C();
|
|
243
|
+
if (!E(n) && !I(n)) return !1;
|
|
242
244
|
const r = n.getNodes();
|
|
243
245
|
for (const i of r) {
|
|
244
|
-
const o = pe(i, (s) =>
|
|
246
|
+
const o = pe(i, (s) => j(s) && !s.isInline());
|
|
245
247
|
o !== null && o.setFormat(e);
|
|
246
248
|
}
|
|
247
249
|
return !0;
|
|
248
250
|
}, p), t.registerCommand(ge, (e) => {
|
|
249
|
-
const n =
|
|
250
|
-
return !!
|
|
251
|
+
const n = C();
|
|
252
|
+
return !!E(n) && (n.insertLineBreak(e), !0);
|
|
251
253
|
}, p), t.registerCommand(he, () => {
|
|
252
|
-
const e =
|
|
253
|
-
return !!
|
|
254
|
-
}, p), t.registerCommand(
|
|
254
|
+
const e = C();
|
|
255
|
+
return !!E(e) && (e.insertParagraph(), !0);
|
|
256
|
+
}, p), t.registerCommand(Nt, () => (vt([yt()]), !0), p), t.registerCommand(_t, () => Te((e) => {
|
|
255
257
|
const n = e.getIndent();
|
|
256
258
|
e.setIndent(n + 1);
|
|
257
|
-
}), p), t.registerCommand(
|
|
259
|
+
}), p), t.registerCommand(Ce, () => Te((e) => {
|
|
258
260
|
const n = e.getIndent();
|
|
259
261
|
n > 0 && e.setIndent(n - 1);
|
|
260
|
-
}), p), t.registerCommand(
|
|
261
|
-
const n =
|
|
262
|
-
if (
|
|
262
|
+
}), p), t.registerCommand(Et, (e) => {
|
|
263
|
+
const n = C();
|
|
264
|
+
if (I(n) && !ee(e.target)) {
|
|
263
265
|
const r = n.getNodes();
|
|
264
266
|
if (r.length > 0) return r[0].selectPrevious(), !0;
|
|
265
|
-
} else if (
|
|
266
|
-
const r =
|
|
267
|
+
} else if (E(n)) {
|
|
268
|
+
const r = Ee(n.focus, !0);
|
|
267
269
|
if (!e.shiftKey && W(r) && !r.isIsolated() && !r.isInline()) return r.selectPrevious(), e.preventDefault(), !0;
|
|
268
270
|
}
|
|
269
271
|
return !1;
|
|
270
|
-
}, p), t.registerCommand(
|
|
271
|
-
const n =
|
|
272
|
-
if (
|
|
272
|
+
}, p), t.registerCommand(Ct, (e) => {
|
|
273
|
+
const n = C();
|
|
274
|
+
if (I(n)) {
|
|
273
275
|
const r = n.getNodes();
|
|
274
276
|
if (r.length > 0) return r[0].selectNext(0, 0), !0;
|
|
275
|
-
} else if (
|
|
277
|
+
} else if (E(n)) {
|
|
276
278
|
if (function(i) {
|
|
277
279
|
const o = i.focus;
|
|
278
|
-
return o.key === "root" && o.offset ===
|
|
280
|
+
return o.key === "root" && o.offset === U().getChildrenSize();
|
|
279
281
|
}(n)) return e.preventDefault(), !0;
|
|
280
|
-
const r =
|
|
282
|
+
const r = Ee(n.focus, !1);
|
|
281
283
|
if (!e.shiftKey && W(r) && !r.isIsolated() && !r.isInline()) return r.selectNext(), e.preventDefault(), !0;
|
|
282
284
|
}
|
|
283
285
|
return !1;
|
|
284
|
-
}, p), t.registerCommand(
|
|
285
|
-
const n =
|
|
286
|
-
if (
|
|
286
|
+
}, p), t.registerCommand(ht, (e) => {
|
|
287
|
+
const n = C();
|
|
288
|
+
if (I(n)) {
|
|
287
289
|
const r = n.getNodes();
|
|
288
290
|
if (r.length > 0) return e.preventDefault(), r[0].selectPrevious(), !0;
|
|
289
291
|
}
|
|
290
|
-
if (!
|
|
291
|
-
if (
|
|
292
|
+
if (!E(n)) return !1;
|
|
293
|
+
if (Me(n, !0)) {
|
|
292
294
|
const r = e.shiftKey;
|
|
293
|
-
return e.preventDefault(),
|
|
295
|
+
return e.preventDefault(), De(n, r, !0), !0;
|
|
294
296
|
}
|
|
295
297
|
return !1;
|
|
296
|
-
}, p), t.registerCommand(
|
|
297
|
-
const n =
|
|
298
|
-
if (
|
|
298
|
+
}, p), t.registerCommand(gt, (e) => {
|
|
299
|
+
const n = C();
|
|
300
|
+
if (I(n) && !ee(e.target)) {
|
|
299
301
|
const i = n.getNodes();
|
|
300
302
|
if (i.length > 0) return e.preventDefault(), i[0].selectNext(0, 0), !0;
|
|
301
303
|
}
|
|
302
|
-
if (!
|
|
304
|
+
if (!E(n)) return !1;
|
|
303
305
|
const r = e.shiftKey;
|
|
304
|
-
return
|
|
305
|
-
}, p), t.registerCommand(
|
|
306
|
+
return !!Me(n, !1) && (e.preventDefault(), De(n, r, !1), !0);
|
|
307
|
+
}, p), t.registerCommand(pt, (e) => {
|
|
306
308
|
if (ee(e.target)) return !1;
|
|
307
|
-
const n =
|
|
308
|
-
if (!
|
|
309
|
+
const n = C();
|
|
310
|
+
if (!E(n)) return !1;
|
|
309
311
|
e.preventDefault();
|
|
310
312
|
const { anchor: r } = n, i = r.getNode();
|
|
311
|
-
return n.isCollapsed() && r.offset === 0 && !
|
|
312
|
-
}, p), t.registerCommand(
|
|
313
|
+
return n.isCollapsed() && r.offset === 0 && !Fe(i) && Ft(i).getIndent() > 0 ? t.dispatchCommand(Ce, void 0) : t.dispatchCommand(se, !0);
|
|
314
|
+
}, p), t.registerCommand(mt, (e) => {
|
|
313
315
|
if (ee(e.target)) return !1;
|
|
314
|
-
const n =
|
|
315
|
-
return !!
|
|
316
|
-
}, p), t.registerCommand(
|
|
317
|
-
const n =
|
|
318
|
-
if (!
|
|
316
|
+
const n = C();
|
|
317
|
+
return !!E(n) && (e.preventDefault(), t.dispatchCommand(se, !1));
|
|
318
|
+
}, p), t.registerCommand(ft, (e) => {
|
|
319
|
+
const n = C();
|
|
320
|
+
if (!E(n)) return !1;
|
|
319
321
|
if (e !== null) {
|
|
320
|
-
if ((
|
|
322
|
+
if ((Tn || Sn || Rn) && bn) return !1;
|
|
321
323
|
if (e.preventDefault(), e.shiftKey) return t.dispatchCommand(ge, !1);
|
|
322
324
|
}
|
|
323
325
|
return t.dispatchCommand(he, void 0);
|
|
324
|
-
}, p), t.registerCommand(
|
|
325
|
-
const e =
|
|
326
|
-
return !!
|
|
327
|
-
}, p), t.registerCommand(
|
|
328
|
-
const [, n] =
|
|
326
|
+
}, p), t.registerCommand(ut, () => {
|
|
327
|
+
const e = C();
|
|
328
|
+
return !!E(e) && (t.blur(), !0);
|
|
329
|
+
}, p), t.registerCommand(at, (e) => {
|
|
330
|
+
const [, n] = Z(e);
|
|
329
331
|
if (n.length > 0) {
|
|
330
|
-
const i =
|
|
332
|
+
const i = be(e.clientX, e.clientY);
|
|
331
333
|
if (i !== null) {
|
|
332
334
|
const { offset: o, node: s } = i, a = ie(s);
|
|
333
335
|
if (a !== null) {
|
|
334
|
-
const l =
|
|
335
|
-
if (
|
|
336
|
+
const l = lt();
|
|
337
|
+
if (L(a)) l.anchor.set(a.getKey(), o, "text"), l.focus.set(a.getKey(), o, "text");
|
|
336
338
|
else {
|
|
337
339
|
const d = a.getParentOrThrow().getKey(), u = a.getIndexWithinParent() + 1;
|
|
338
340
|
l.anchor.set(d, u, "element"), l.focus.set(d, u, "element");
|
|
339
341
|
}
|
|
340
|
-
const c =
|
|
341
|
-
|
|
342
|
+
const c = ct(l);
|
|
343
|
+
dt(c);
|
|
342
344
|
}
|
|
343
|
-
t.dispatchCommand(
|
|
345
|
+
t.dispatchCommand(Se, n);
|
|
344
346
|
}
|
|
345
347
|
return e.preventDefault(), !0;
|
|
346
348
|
}
|
|
347
|
-
const r =
|
|
348
|
-
return !!
|
|
349
|
+
const r = C();
|
|
350
|
+
return !!E(r);
|
|
351
|
+
}, p), t.registerCommand(st, (e) => {
|
|
352
|
+
const [n] = Z(e), r = C();
|
|
353
|
+
return !(n && !E(r));
|
|
349
354
|
}, p), t.registerCommand(it, (e) => {
|
|
350
|
-
const [n] =
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
const [n] = Q(e), r = v();
|
|
354
|
-
if (n && !C(r)) return !1;
|
|
355
|
-
const i = Le(e.clientX, e.clientY);
|
|
355
|
+
const [n] = Z(e), r = C();
|
|
356
|
+
if (n && !E(r)) return !1;
|
|
357
|
+
const i = be(e.clientX, e.clientY);
|
|
356
358
|
if (i !== null) {
|
|
357
359
|
const o = ie(i.node);
|
|
358
360
|
W(o) && e.preventDefault();
|
|
359
361
|
}
|
|
360
362
|
return !0;
|
|
361
|
-
}, p), t.registerCommand(
|
|
362
|
-
await
|
|
363
|
-
const i =
|
|
364
|
-
|
|
363
|
+
}, p), t.registerCommand(rt, () => (ot(), !0), p), t.registerCommand(nt, (e) => (ye(t, F(e, ClipboardEvent) ? e : null), !0), p), t.registerCommand(tt, (e) => (async function(n, r) {
|
|
364
|
+
await ye(r, F(n, ClipboardEvent) ? n : null), r.update(() => {
|
|
365
|
+
const i = C();
|
|
366
|
+
E(i) ? i.removeText() : I(i) && i.getNodes().forEach((o) => o.remove());
|
|
365
367
|
});
|
|
366
368
|
}(e, t), !0), p), t.registerCommand(Ke, (e) => {
|
|
367
|
-
const [, n, r] =
|
|
368
|
-
return n.length > 0 && !r ? (t.dispatchCommand(
|
|
369
|
+
const [, n, r] = Z(e);
|
|
370
|
+
return n.length > 0 && !r ? (t.dispatchCommand(Se, n), !0) : et(e.target) ? !1 : C() !== null && (function(i, o) {
|
|
369
371
|
i.preventDefault(), o.update(() => {
|
|
370
|
-
const s =
|
|
371
|
-
a != null && s !== null &&
|
|
372
|
+
const s = C(), a = F(i, InputEvent) || F(i, KeyboardEvent) ? null : i.clipboardData;
|
|
373
|
+
a != null && s !== null && ve(a, s, o);
|
|
372
374
|
}, { tag: "paste" });
|
|
373
375
|
}(e, t), !0);
|
|
374
376
|
}, p));
|
|
375
377
|
}
|
|
376
|
-
const ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ?
|
|
377
|
-
function
|
|
378
|
-
return t.getEditorState().read(
|
|
378
|
+
const ce = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? Y : O;
|
|
379
|
+
function Le(t) {
|
|
380
|
+
return t.getEditorState().read(Ge(t.isComposing()));
|
|
379
381
|
}
|
|
380
|
-
function
|
|
381
|
-
const [r] =
|
|
382
|
-
const [a, l] =
|
|
382
|
+
function kn({ contentEditable: t, placeholder: e = null, ErrorBoundary: n }) {
|
|
383
|
+
const [r] = R(), i = function(o, s) {
|
|
384
|
+
const [a, l] = x(() => o.getDecorators());
|
|
383
385
|
return ce(() => o.registerDecoratorListener((c) => {
|
|
384
|
-
|
|
386
|
+
Ne.flushSync(() => {
|
|
385
387
|
l(c);
|
|
386
388
|
});
|
|
387
|
-
}), [o]),
|
|
389
|
+
}), [o]), O(() => {
|
|
388
390
|
l(o.getDecorators());
|
|
389
|
-
}, [o]),
|
|
391
|
+
}, [o]), G(() => {
|
|
390
392
|
const c = [], d = Object.keys(a);
|
|
391
393
|
for (let u = 0; u < d.length; u++) {
|
|
392
|
-
const f = d[u], m =
|
|
393
|
-
g !== null && c.push(
|
|
394
|
+
const f = d[u], m = _(s, { onError: (h) => o._onError(h), children: _(It, { fallback: null, children: a[f] }) }), g = o.getElementByKey(f);
|
|
395
|
+
g !== null && c.push(Ne.createPortal(m, g, f));
|
|
394
396
|
}
|
|
395
397
|
return c;
|
|
396
398
|
}, [s, a, o]);
|
|
397
399
|
}(r, n);
|
|
398
400
|
return function(o) {
|
|
399
|
-
ce(() => B(
|
|
400
|
-
}(r), K(
|
|
401
|
+
ce(() => B($n(o), On(o)), [o]);
|
|
402
|
+
}(r), K(Pe, { children: [t, _(xn, { content: e }), i] });
|
|
401
403
|
}
|
|
402
|
-
function
|
|
403
|
-
const [e] =
|
|
404
|
-
const [o, s] =
|
|
404
|
+
function xn({ content: t }) {
|
|
405
|
+
const [e] = R(), n = function(i) {
|
|
406
|
+
const [o, s] = x(() => Le(i));
|
|
405
407
|
return ce(() => {
|
|
406
408
|
function a() {
|
|
407
|
-
const l =
|
|
409
|
+
const l = Le(i);
|
|
408
410
|
s(l);
|
|
409
411
|
}
|
|
410
412
|
return a(), B(i.registerUpdateListener(() => {
|
|
@@ -413,39 +415,39 @@ function Mn({ content: t }) {
|
|
|
413
415
|
a();
|
|
414
416
|
}));
|
|
415
417
|
}, [i]), o;
|
|
416
|
-
}(e), r =
|
|
418
|
+
}(e), r = vn();
|
|
417
419
|
return n ? typeof t == "function" ? t(r) : t : null;
|
|
418
420
|
}
|
|
419
|
-
const
|
|
420
|
-
function
|
|
421
|
-
const [
|
|
422
|
-
|
|
423
|
-
}, [t]),
|
|
424
|
-
return (
|
|
425
|
-
|
|
426
|
-
typeof
|
|
421
|
+
const Xe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? Y : O;
|
|
422
|
+
function Pn({ editor: t, ariaActiveDescendant: e, ariaAutoComplete: n, ariaControls: r, ariaDescribedBy: i, ariaErrorMessage: o, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: d, ariaOwns: u, ariaRequired: f, autoCapitalize: m, className: g, id: h, role: D = "textbox", spellCheck: N = !0, style: v, tabIndex: M, "data-testid": A, ...y }, b) {
|
|
423
|
+
const [w, $] = x(t.isEditable()), P = Kt((S) => {
|
|
424
|
+
S && S.ownerDocument && S.ownerDocument.defaultView ? t.setRootElement(S) : t.setRootElement(null);
|
|
425
|
+
}, [t]), z = G(() => /* @__PURE__ */ function(...S) {
|
|
426
|
+
return (X) => {
|
|
427
|
+
S.forEach((V) => {
|
|
428
|
+
typeof V == "function" ? V(X) : V != null && (V.current = X);
|
|
427
429
|
});
|
|
428
430
|
};
|
|
429
|
-
}(
|
|
430
|
-
return
|
|
431
|
-
|
|
432
|
-
})), [t]),
|
|
431
|
+
}(b, P), [P, b]);
|
|
432
|
+
return Xe(() => ($(t.isEditable()), t.registerEditableListener((S) => {
|
|
433
|
+
$(S);
|
|
434
|
+
})), [t]), _("div", { ...y, "aria-activedescendant": w ? e : void 0, "aria-autocomplete": w ? n : "none", "aria-controls": w ? r : void 0, "aria-describedby": i, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": w && D === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": d, "aria-owns": w ? u : void 0, "aria-readonly": !w || void 0, "aria-required": f, autoCapitalize: m, className: g, contentEditable: w, "data-testid": A, id: h, ref: z, role: w ? D : void 0, spellCheck: N, style: v, tabIndex: M });
|
|
433
435
|
}
|
|
434
|
-
const
|
|
435
|
-
function
|
|
436
|
-
return t.getEditorState().read(
|
|
436
|
+
const In = Be(Pn);
|
|
437
|
+
function Re(t) {
|
|
438
|
+
return t.getEditorState().read(Ge(t.isComposing()));
|
|
437
439
|
}
|
|
438
|
-
const
|
|
439
|
-
function
|
|
440
|
-
const { placeholder: n, ...r } = t, [i] =
|
|
441
|
-
return K(
|
|
440
|
+
const Kn = Be(Fn);
|
|
441
|
+
function Fn(t, e) {
|
|
442
|
+
const { placeholder: n, ...r } = t, [i] = R();
|
|
443
|
+
return K(Pe, { children: [_(In, { editor: i, ...r, ref: e }), n != null && _(Un, { editor: i, content: n })] });
|
|
442
444
|
}
|
|
443
|
-
function
|
|
445
|
+
function Un({ content: t, editor: e }) {
|
|
444
446
|
const n = function(s) {
|
|
445
|
-
const [a, l] =
|
|
446
|
-
return
|
|
447
|
+
const [a, l] = x(() => Re(s));
|
|
448
|
+
return Xe(() => {
|
|
447
449
|
function c() {
|
|
448
|
-
const d =
|
|
450
|
+
const d = Re(s);
|
|
449
451
|
l(d);
|
|
450
452
|
}
|
|
451
453
|
return c(), B(s.registerUpdateListener(() => {
|
|
@@ -454,23 +456,23 @@ function An({ content: t, editor: e }) {
|
|
|
454
456
|
c();
|
|
455
457
|
}));
|
|
456
458
|
}, [s]), a;
|
|
457
|
-
}(e), [r, i] =
|
|
458
|
-
if (
|
|
459
|
+
}(e), [r, i] = x(e.isEditable());
|
|
460
|
+
if (Y(() => (i(e.isEditable()), e.registerEditableListener((s) => {
|
|
459
461
|
i(s);
|
|
460
462
|
})), [e]), !n) return null;
|
|
461
463
|
let o = null;
|
|
462
|
-
return typeof t == "function" ? o = t(r) : t !== null && (o = t), o === null ? null :
|
|
464
|
+
return typeof t == "function" ? o = t(r) : t !== null && (o = t), o === null ? null : _("div", { "aria-hidden": !0, children: o });
|
|
463
465
|
}
|
|
464
466
|
function de(t, e) {
|
|
465
467
|
return de = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
466
468
|
return n.__proto__ = r, n;
|
|
467
469
|
}, de(t, e);
|
|
468
470
|
}
|
|
469
|
-
var
|
|
471
|
+
var $e = { error: null }, Bn = function(t) {
|
|
470
472
|
var e, n;
|
|
471
473
|
function r() {
|
|
472
474
|
for (var o, s = arguments.length, a = new Array(s), l = 0; l < s; l++) a[l] = arguments[l];
|
|
473
|
-
return (o = t.call.apply(t, [this].concat(a)) || this).state =
|
|
475
|
+
return (o = t.call.apply(t, [this].concat(a)) || this).state = $e, o.resetErrorBoundary = function() {
|
|
474
476
|
for (var c, d = arguments.length, u = new Array(d), f = 0; f < d; f++) u[f] = arguments[f];
|
|
475
477
|
o.props.onReset == null || (c = o.props).onReset.apply(c, u), o.reset();
|
|
476
478
|
}, o;
|
|
@@ -480,7 +482,7 @@ var Re = { error: null }, zn = function(t) {
|
|
|
480
482
|
};
|
|
481
483
|
var i = r.prototype;
|
|
482
484
|
return i.reset = function() {
|
|
483
|
-
this.setState(
|
|
485
|
+
this.setState($e);
|
|
484
486
|
}, i.componentDidCatch = function(o, s) {
|
|
485
487
|
var a, l;
|
|
486
488
|
(a = (l = this.props).onError) == null || a.call(l, o, s);
|
|
@@ -501,77 +503,77 @@ var Re = { error: null }, zn = function(t) {
|
|
|
501
503
|
return this.props.children;
|
|
502
504
|
}, r;
|
|
503
505
|
}(ae.Component);
|
|
504
|
-
function
|
|
505
|
-
return
|
|
506
|
+
function zn({ children: t, onError: e }) {
|
|
507
|
+
return _(Bn, { fallback: _("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: t });
|
|
506
508
|
}
|
|
507
|
-
const
|
|
508
|
-
function
|
|
509
|
-
const [r] =
|
|
510
|
-
return
|
|
509
|
+
const Yn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? Y : O;
|
|
510
|
+
function Hn({ ignoreHistoryMergeTagChange: t = !0, ignoreSelectionChange: e = !1, onChange: n }) {
|
|
511
|
+
const [r] = R();
|
|
512
|
+
return Yn(() => {
|
|
511
513
|
if (n) return r.registerUpdateListener(({ editorState: i, dirtyElements: o, dirtyLeaves: s, prevEditorState: a, tags: l }) => {
|
|
512
514
|
e && o.size === 0 && s.size === 0 || t && l.has("history-merge") || a.isEmpty() || n(i, r, l);
|
|
513
515
|
});
|
|
514
516
|
}, [r, t, e, n]), null;
|
|
515
517
|
}
|
|
516
|
-
function
|
|
517
|
-
const [t] =
|
|
518
|
-
return
|
|
519
|
-
if (!t.hasNodes([
|
|
518
|
+
function Wn() {
|
|
519
|
+
const [t] = R();
|
|
520
|
+
return O(() => {
|
|
521
|
+
if (!t.hasNodes([ze, Ye])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
|
|
520
522
|
}, [t]), function(e) {
|
|
521
|
-
|
|
523
|
+
O(() => Ht(e), [e]);
|
|
522
524
|
}(t), null;
|
|
523
525
|
}
|
|
524
|
-
function
|
|
525
|
-
const [n] =
|
|
526
|
-
return
|
|
527
|
-
if (!n.hasNodes([
|
|
528
|
-
return B(n.registerCommand(
|
|
526
|
+
function jn({ validateUrl: t, attributes: e }) {
|
|
527
|
+
const [n] = R();
|
|
528
|
+
return O(() => {
|
|
529
|
+
if (!n.hasNodes([He])) throw new Error("LinkPlugin: LinkNode not registered on editor");
|
|
530
|
+
return B(n.registerCommand(we, (r) => {
|
|
529
531
|
if (r === null) return le(r), !0;
|
|
530
532
|
if (typeof r == "string") return !(t !== void 0 && !t(r)) && (le(r, e), !0);
|
|
531
533
|
{
|
|
532
534
|
const { url: i, target: o, rel: s, title: a } = r;
|
|
533
535
|
return le(i, { ...e, rel: s, target: o, title: a }), !0;
|
|
534
536
|
}
|
|
535
|
-
},
|
|
536
|
-
const i =
|
|
537
|
-
if (!
|
|
537
|
+
}, _e), t !== void 0 ? n.registerCommand(Ke, (r) => {
|
|
538
|
+
const i = C();
|
|
539
|
+
if (!E(i) || i.isCollapsed() || !F(r, ClipboardEvent)) return !1;
|
|
538
540
|
const o = r;
|
|
539
541
|
if (o.clipboardData === null) return !1;
|
|
540
542
|
const s = o.clipboardData.getData("text");
|
|
541
|
-
return !!t(s) && !i.getNodes().some((a) =>
|
|
542
|
-
},
|
|
543
|
+
return !!t(s) && !i.getNodes().some((a) => j(a)) && (n.dispatchCommand(we, { ...e, url: s }), r.preventDefault(), !0);
|
|
544
|
+
}, _e) : () => {
|
|
543
545
|
});
|
|
544
546
|
}, [n, t, e]), null;
|
|
545
547
|
}
|
|
546
|
-
function
|
|
547
|
-
const [n] =
|
|
548
|
-
return
|
|
548
|
+
function Gn({ newTab: t = !0, disabled: e = !1 }) {
|
|
549
|
+
const [n] = R();
|
|
550
|
+
return O(() => {
|
|
549
551
|
const r = (o) => {
|
|
550
552
|
const s = o.target;
|
|
551
553
|
if (!(s instanceof Node)) return;
|
|
552
|
-
const a =
|
|
554
|
+
const a = Tt(s);
|
|
553
555
|
if (a === null) return;
|
|
554
556
|
let l = null, c = null;
|
|
555
557
|
if (a.update(() => {
|
|
556
558
|
const f = ie(s);
|
|
557
559
|
if (f !== null) {
|
|
558
|
-
const m = pe(f,
|
|
559
|
-
if (!e) if (
|
|
560
|
+
const m = pe(f, j);
|
|
561
|
+
if (!e) if (Wt(m)) l = m.sanitizeUrl(m.getURL()), c = m.getTarget();
|
|
560
562
|
else {
|
|
561
|
-
const g = function(h,
|
|
562
|
-
let
|
|
563
|
-
for (;
|
|
564
|
-
if (
|
|
565
|
-
|
|
563
|
+
const g = function(h, D) {
|
|
564
|
+
let N = h;
|
|
565
|
+
for (; N != null; ) {
|
|
566
|
+
if (D(N)) return N;
|
|
567
|
+
N = N.parentNode;
|
|
566
568
|
}
|
|
567
569
|
return null;
|
|
568
|
-
}(s,
|
|
570
|
+
}(s, Lt);
|
|
569
571
|
g !== null && (l = g.href, c = g.target);
|
|
570
572
|
}
|
|
571
573
|
}
|
|
572
574
|
}), l === null || l === "") return;
|
|
573
|
-
const d = n.getEditorState().read(
|
|
574
|
-
if (
|
|
575
|
+
const d = n.getEditorState().read(C);
|
|
576
|
+
if (E(d) && !d.isCollapsed()) return void o.preventDefault();
|
|
575
577
|
const u = o.type === "auxclick" && o.button === 1;
|
|
576
578
|
window.open(l, t || u || o.metaKey || o.ctrlKey || c === "_blank" ? "_blank" : "_self"), o.preventDefault();
|
|
577
579
|
}, i = (o) => {
|
|
@@ -582,132 +584,132 @@ function Hn({ newTab: t = !0, disabled: e = !1 }) {
|
|
|
582
584
|
});
|
|
583
585
|
}, [n, t, e]), null;
|
|
584
586
|
}
|
|
585
|
-
const te = 0, ue = 1, fe = 2,
|
|
586
|
-
function
|
|
587
|
-
if (t === null || n.size === 0 && r.size === 0 && !i) return
|
|
587
|
+
const te = 0, ue = 1, fe = 2, T = 0, Xn = 1, ke = 2, Vn = 3, qn = 4;
|
|
588
|
+
function Jn(t, e, n, r, i) {
|
|
589
|
+
if (t === null || n.size === 0 && r.size === 0 && !i) return T;
|
|
588
590
|
const o = e._selection, s = t._selection;
|
|
589
|
-
if (i) return
|
|
590
|
-
if (!(
|
|
591
|
-
const a = function(
|
|
592
|
-
const
|
|
593
|
-
for (const
|
|
594
|
-
const
|
|
595
|
-
|
|
591
|
+
if (i) return Xn;
|
|
592
|
+
if (!(E(o) && E(s) && s.isCollapsed() && o.isCollapsed())) return T;
|
|
593
|
+
const a = function(N, v, M) {
|
|
594
|
+
const A = N._nodeMap, y = [];
|
|
595
|
+
for (const b of v) {
|
|
596
|
+
const w = A.get(b);
|
|
597
|
+
w !== void 0 && y.push(w);
|
|
596
598
|
}
|
|
597
|
-
for (const [
|
|
598
|
-
if (!
|
|
599
|
-
const
|
|
600
|
-
|
|
599
|
+
for (const [b, w] of M) {
|
|
600
|
+
if (!w) continue;
|
|
601
|
+
const $ = A.get(b);
|
|
602
|
+
$ === void 0 || Fe($) || y.push($);
|
|
601
603
|
}
|
|
602
|
-
return
|
|
604
|
+
return y;
|
|
603
605
|
}(e, n, r);
|
|
604
|
-
if (a.length === 0) return
|
|
606
|
+
if (a.length === 0) return T;
|
|
605
607
|
if (a.length > 1) {
|
|
606
|
-
const
|
|
607
|
-
return
|
|
608
|
+
const N = e._nodeMap, v = N.get(o.anchor.key), M = N.get(s.anchor.key);
|
|
609
|
+
return v && M && !t._nodeMap.has(v.__key) && L(v) && v.__text.length === 1 && o.anchor.offset === 1 ? ke : T;
|
|
608
610
|
}
|
|
609
611
|
const l = a[0], c = t._nodeMap.get(l.__key);
|
|
610
|
-
if (!
|
|
612
|
+
if (!L(c) || !L(l) || c.__mode !== l.__mode) return T;
|
|
611
613
|
const d = c.__text, u = l.__text;
|
|
612
|
-
if (d === u) return
|
|
614
|
+
if (d === u) return T;
|
|
613
615
|
const f = o.anchor, m = s.anchor;
|
|
614
|
-
if (f.key !== m.key || f.type !== "text") return
|
|
615
|
-
const g = f.offset, h = m.offset,
|
|
616
|
-
return
|
|
616
|
+
if (f.key !== m.key || f.type !== "text") return T;
|
|
617
|
+
const g = f.offset, h = m.offset, D = u.length - d.length;
|
|
618
|
+
return D === 1 && h === g - 1 ? ke : D === -1 && h === g + 1 ? Vn : D === -1 && h === g ? qn : T;
|
|
617
619
|
}
|
|
618
|
-
function
|
|
619
|
-
let n = Date.now(), r =
|
|
620
|
+
function Qn(t, e) {
|
|
621
|
+
let n = Date.now(), r = T;
|
|
620
622
|
return (i, o, s, a, l, c) => {
|
|
621
623
|
const d = Date.now();
|
|
622
|
-
if (c.has("historic")) return r =
|
|
623
|
-
const u =
|
|
624
|
+
if (c.has("historic")) return r = T, n = d, fe;
|
|
625
|
+
const u = Jn(i, o, a, l, t.isComposing()), f = (() => {
|
|
624
626
|
const m = s === null || s.editor === t, g = c.has("history-push");
|
|
625
627
|
if (!g && m && c.has("history-merge")) return te;
|
|
626
628
|
if (i === null) return ue;
|
|
627
629
|
const h = o._selection;
|
|
628
|
-
return a.size > 0 || l.size > 0 ? g === !1 && u !==
|
|
629
|
-
const
|
|
630
|
-
return !(
|
|
630
|
+
return a.size > 0 || l.size > 0 ? g === !1 && u !== T && u === r && d < n + e && m || a.size === 1 && function(D, N, v) {
|
|
631
|
+
const M = N._nodeMap.get(D), A = v._nodeMap.get(D), y = N._selection, b = v._selection;
|
|
632
|
+
return !(E(y) && E(b) && y.anchor.type === "element" && y.focus.type === "element" && b.anchor.type === "text" && b.focus.type === "text" || !L(M) || !L(A) || M.__parent !== A.__parent) && JSON.stringify(N.read(() => M.exportJSON())) === JSON.stringify(v.read(() => A.exportJSON()));
|
|
631
633
|
}(Array.from(a)[0], i, o) ? te : ue : h !== null ? te : fe;
|
|
632
634
|
})();
|
|
633
635
|
return n = d, r = u, f;
|
|
634
636
|
};
|
|
635
637
|
}
|
|
636
|
-
function
|
|
638
|
+
function xe(t) {
|
|
637
639
|
t.undoStack = [], t.redoStack = [], t.current = null;
|
|
638
640
|
}
|
|
639
|
-
function
|
|
640
|
-
const r =
|
|
641
|
-
return B(t.registerCommand(
|
|
641
|
+
function Zn(t, e, n) {
|
|
642
|
+
const r = Qn(t, n);
|
|
643
|
+
return B(t.registerCommand(xt, () => (function(o, s) {
|
|
642
644
|
const a = s.redoStack, l = s.undoStack;
|
|
643
645
|
if (l.length !== 0) {
|
|
644
646
|
const c = s.current, d = l.pop();
|
|
645
|
-
c !== null && (a.push(c), o.dispatchCommand(
|
|
647
|
+
c !== null && (a.push(c), o.dispatchCommand(q, !0)), l.length === 0 && o.dispatchCommand(J, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: "historic" });
|
|
646
648
|
}
|
|
647
|
-
}(t, e), !0), p), t.registerCommand(
|
|
649
|
+
}(t, e), !0), p), t.registerCommand(kt, () => (function(o, s) {
|
|
648
650
|
const a = s.redoStack, l = s.undoStack;
|
|
649
651
|
if (a.length !== 0) {
|
|
650
652
|
const c = s.current;
|
|
651
|
-
c !== null && (l.push(c), o.dispatchCommand(
|
|
653
|
+
c !== null && (l.push(c), o.dispatchCommand(J, !0));
|
|
652
654
|
const d = a.pop();
|
|
653
|
-
a.length === 0 && o.dispatchCommand(
|
|
655
|
+
a.length === 0 && o.dispatchCommand(q, !1), s.current = d || null, d && d.editor.setEditorState(d.editorState, { tag: "historic" });
|
|
654
656
|
}
|
|
655
|
-
}(t, e), !0), p), t.registerCommand(
|
|
657
|
+
}(t, e), !0), p), t.registerCommand($t, () => (xe(e), !1), p), t.registerCommand(Rt, () => (xe(e), t.dispatchCommand(q, !1), t.dispatchCommand(J, !1), !0), p), t.registerUpdateListener(({ editorState: o, prevEditorState: s, dirtyLeaves: a, dirtyElements: l, tags: c }) => {
|
|
656
658
|
const d = e.current, u = e.redoStack, f = e.undoStack, m = d === null ? null : d.editorState;
|
|
657
659
|
if (d !== null && o === m) return;
|
|
658
660
|
const g = r(s, o, d, a, l, c);
|
|
659
|
-
if (g === ue) u.length !== 0 && (e.redoStack = [], t.dispatchCommand(
|
|
661
|
+
if (g === ue) u.length !== 0 && (e.redoStack = [], t.dispatchCommand(q, !1)), d !== null && (f.push({ ...d }), t.dispatchCommand(J, !0));
|
|
660
662
|
else if (g === fe) return;
|
|
661
663
|
e.current = { editor: t, editorState: o };
|
|
662
664
|
}));
|
|
663
665
|
}
|
|
664
|
-
function
|
|
666
|
+
function er() {
|
|
665
667
|
return { current: null, redoStack: [], undoStack: [] };
|
|
666
668
|
}
|
|
667
|
-
function
|
|
668
|
-
const [n] =
|
|
669
|
+
function tr({ delay: t, externalHistoryState: e }) {
|
|
670
|
+
const [n] = R();
|
|
669
671
|
return function(r, i, o = 1e3) {
|
|
670
|
-
const s =
|
|
671
|
-
|
|
672
|
+
const s = G(() => i || er(), [i]);
|
|
673
|
+
O(() => Zn(r, s, o), [o, r, s]);
|
|
672
674
|
}(n, e, t), null;
|
|
673
675
|
}
|
|
674
|
-
function
|
|
676
|
+
function nr(t) {
|
|
675
677
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
676
678
|
}
|
|
677
|
-
var ne =
|
|
679
|
+
var ne = nr(function(t) {
|
|
678
680
|
const e = new URLSearchParams();
|
|
679
681
|
e.append("code", t);
|
|
680
682
|
for (let n = 1; n < arguments.length; n++) e.append("v", arguments[n]);
|
|
681
683
|
throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
682
684
|
});
|
|
683
|
-
function
|
|
684
|
-
const [r] =
|
|
685
|
-
return
|
|
686
|
-
const a =
|
|
687
|
-
|
|
685
|
+
function rr({ hasCellMerge: t = !0, hasCellBackgroundColor: e = !0, hasTabHandler: n = !0 }) {
|
|
686
|
+
const [r] = R();
|
|
687
|
+
return O(() => (r.hasNodes([re, oe, We]) || ne(10), B(r.registerCommand(Xt, ({ columns: i, rows: o, includeHeaders: s }) => {
|
|
688
|
+
const a = Vt(Number(o), Number(i), s);
|
|
689
|
+
Ut(a);
|
|
688
690
|
const l = a.getFirstDescendant();
|
|
689
|
-
return
|
|
691
|
+
return L(l) && l.select(), !0;
|
|
690
692
|
}, p), r.registerNodeTransform(re, (i) => {
|
|
691
|
-
const [o] =
|
|
693
|
+
const [o] = Gt(i, null, null), s = o.reduce((l, c) => Math.max(l, c.length), 0), a = i.getChildren();
|
|
692
694
|
for (let l = 0; l < o.length; ++l) {
|
|
693
695
|
const c = a[l];
|
|
694
696
|
if (!c) continue;
|
|
695
697
|
const d = o[l].reduce((u, f) => f ? 1 + u : u, 0);
|
|
696
698
|
if (d !== s) for (let u = d; u < s; ++u) {
|
|
697
|
-
const f =
|
|
699
|
+
const f = Oe(0);
|
|
698
700
|
f.append(me()), c.append(f);
|
|
699
701
|
}
|
|
700
702
|
}
|
|
701
|
-
}))), [r]),
|
|
703
|
+
}))), [r]), O(() => {
|
|
702
704
|
const i = /* @__PURE__ */ new Map(), o = (a, l, c) => {
|
|
703
|
-
const d = c, u =
|
|
705
|
+
const d = c, u = en(a, d, r, n);
|
|
704
706
|
i.set(l, [u, d]);
|
|
705
707
|
}, s = r.registerMutationListener(re, (a) => {
|
|
706
708
|
for (const [l, c] of a) if (c === "created" || c === "updated") {
|
|
707
709
|
const d = i.get(l), u = r.getElementByKey(l);
|
|
708
710
|
d && u === d[1] || (d && (d[0].removeListeners(), i.delete(l)), u !== null && r.getEditorState().read(() => {
|
|
709
|
-
const f =
|
|
710
|
-
|
|
711
|
+
const f = Pt(l);
|
|
712
|
+
qt(f) && o(f, l, u);
|
|
711
713
|
}));
|
|
712
714
|
} else if (c === "destroyed") {
|
|
713
715
|
const d = i.get(l);
|
|
@@ -718,36 +720,36 @@ function nr({ hasCellMerge: t = !0, hasCellBackgroundColor: e = !0, hasTabHandle
|
|
|
718
720
|
s();
|
|
719
721
|
for (const [, [a]] of i) a.removeListeners();
|
|
720
722
|
};
|
|
721
|
-
}, [r, n]),
|
|
723
|
+
}, [r, n]), O(() => {
|
|
722
724
|
if (!t) return r.registerNodeTransform(oe, (i) => {
|
|
723
725
|
if (i.getColSpan() > 1 || i.getRowSpan() > 1) {
|
|
724
|
-
const [, , o] =
|
|
726
|
+
const [, , o] = Jt(i), [s] = Qt(o, i, i), a = s.length, l = s[0].length;
|
|
725
727
|
let c = o.getFirstChild();
|
|
726
|
-
|
|
728
|
+
Ae(c) || ne(175);
|
|
727
729
|
const d = [];
|
|
728
730
|
for (let u = 0; u < a; u++) {
|
|
729
|
-
u !== 0 && (c = c.getNextSibling(),
|
|
731
|
+
u !== 0 && (c = c.getNextSibling(), Ae(c) || ne(175));
|
|
730
732
|
let f = null;
|
|
731
733
|
for (let m = 0; m < l; m++) {
|
|
732
734
|
const g = s[u][m], h = g.cell;
|
|
733
735
|
if (g.startRow === u && g.startColumn === m) f = h, d.push(h);
|
|
734
736
|
else if (h.getColSpan() > 1 || h.getRowSpan() > 1) {
|
|
735
|
-
|
|
736
|
-
const
|
|
737
|
-
f !== null ? f.insertAfter(
|
|
737
|
+
Zt(h) || ne(176);
|
|
738
|
+
const D = Oe(h.__headerState);
|
|
739
|
+
f !== null ? f.insertAfter(D) : Bt(c, D);
|
|
738
740
|
}
|
|
739
741
|
}
|
|
740
742
|
}
|
|
741
743
|
for (const u of d) u.setColSpan(1), u.setRowSpan(1);
|
|
742
744
|
}
|
|
743
745
|
});
|
|
744
|
-
}, [r, t]),
|
|
746
|
+
}, [r, t]), O(() => {
|
|
745
747
|
if (!e) return r.registerNodeTransform(oe, (i) => {
|
|
746
748
|
i.getBackgroundColor() !== null && i.setBackgroundColor(null);
|
|
747
749
|
});
|
|
748
750
|
}, [r, e, t]), null;
|
|
749
751
|
}
|
|
750
|
-
const
|
|
752
|
+
const Ve = 200, or = ({
|
|
751
753
|
currentLanguage: t = "NL",
|
|
752
754
|
initialValue: e = "",
|
|
753
755
|
placeholder: n = "",
|
|
@@ -756,90 +758,91 @@ const Xe = 200, rr = ({
|
|
|
756
758
|
required: o = !1,
|
|
757
759
|
notValidatedText: s = "",
|
|
758
760
|
maxHeightInRem: a = "20rem",
|
|
759
|
-
maxWords: l =
|
|
761
|
+
maxWords: l = Ve,
|
|
760
762
|
onChange: c
|
|
761
763
|
}) => {
|
|
762
|
-
const { switchLanguage: d } = pn(), u = dn(), [f] =
|
|
764
|
+
const { switchLanguage: d } = pn(), u = dn(), [f] = x(() => Ie()), [m, g] = x(0), [h, D] = x(0), N = Ue(null), v = {
|
|
763
765
|
html: {
|
|
764
766
|
export: sn
|
|
765
767
|
},
|
|
766
768
|
namespace: "UvaRte",
|
|
767
769
|
editor: f,
|
|
768
770
|
theme: fn,
|
|
769
|
-
onError(
|
|
770
|
-
throw
|
|
771
|
+
onError(y) {
|
|
772
|
+
throw y;
|
|
771
773
|
},
|
|
772
|
-
nodes: [
|
|
773
|
-
editorState: (
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
776
|
-
|
|
777
|
-
|
|
774
|
+
nodes: [ze, Ye, He, jt, oe, We, re],
|
|
775
|
+
editorState: (y) => {
|
|
776
|
+
const w = new DOMParser().parseFromString(e, "text/html"), $ = zt(y, w), P = U();
|
|
777
|
+
if (P.clear(), an(e))
|
|
778
|
+
$.forEach((z) => {
|
|
779
|
+
P.append(z);
|
|
778
780
|
});
|
|
779
781
|
else {
|
|
780
|
-
const
|
|
781
|
-
|
|
782
|
-
|
|
782
|
+
const z = me();
|
|
783
|
+
$.forEach((S, X) => {
|
|
784
|
+
X === 0 ? (z.append(S), P.append(z)) : P.append(S);
|
|
783
785
|
});
|
|
784
786
|
}
|
|
785
787
|
}
|
|
786
|
-
},
|
|
787
|
-
|
|
788
|
-
let
|
|
789
|
-
g(
|
|
788
|
+
}, M = (y) => y.trim().length === 0 ? 0 : y.split(" ").length, A = (y, b) => {
|
|
789
|
+
y.read(() => {
|
|
790
|
+
let w = "";
|
|
791
|
+
g(M(U().getTextContent().replace(/\s+/g, " ").trim())), w = ln(Yt(b)), c(w);
|
|
790
792
|
});
|
|
791
793
|
};
|
|
792
|
-
return
|
|
794
|
+
return O(() => {
|
|
793
795
|
d(t.toLocaleLowerCase());
|
|
794
|
-
}, [t, d]),
|
|
795
|
-
const
|
|
796
|
-
g(
|
|
797
|
-
}, []), /* @__PURE__ */ K("div", { className:
|
|
798
|
-
/* @__PURE__ */ K("div", { className:
|
|
799
|
-
/* @__PURE__ */
|
|
800
|
-
/* @__PURE__ */ K("div", { className:
|
|
801
|
-
/* @__PURE__ */
|
|
796
|
+
}, [t, d]), O(() => {
|
|
797
|
+
const y = e.replace(/<br\s*\/?>| /gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
|
|
798
|
+
g(M(y));
|
|
799
|
+
}, []), /* @__PURE__ */ K("div", { className: k.editor__container, children: [
|
|
800
|
+
/* @__PURE__ */ K("div", { className: k.editor__header, children: [
|
|
801
|
+
/* @__PURE__ */ _(mn, { label: r, info: i, required: o }),
|
|
802
|
+
/* @__PURE__ */ K("div", { className: k["editor__header-word-count"], children: [
|
|
803
|
+
/* @__PURE__ */ _("span", { className: on({ [k["editor__header-word-count--alert"]]: m > l }), children: m }),
|
|
802
804
|
" / ",
|
|
803
805
|
l
|
|
804
806
|
] })
|
|
805
807
|
] }),
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */ K("div", { className:
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
|
|
808
|
+
/* @__PURE__ */ _("div", { className: k.editor, children: /* @__PURE__ */ K(En, { initialConfig: v, children: [
|
|
809
|
+
/* @__PURE__ */ _(cn, { editorScrollPosition: h }),
|
|
810
|
+
/* @__PURE__ */ K("div", { className: k["editor__field-wrapper"], children: [
|
|
811
|
+
/* @__PURE__ */ _(
|
|
812
|
+
kn,
|
|
811
813
|
{
|
|
812
|
-
contentEditable: /* @__PURE__ */
|
|
813
|
-
|
|
814
|
+
contentEditable: /* @__PURE__ */ _(
|
|
815
|
+
Kn,
|
|
814
816
|
{
|
|
815
|
-
className:
|
|
817
|
+
className: k.editor__field,
|
|
816
818
|
"aria-label": u.common.rteAriaLabel,
|
|
817
819
|
"aria-placeholder": n,
|
|
818
820
|
title: u.common.rteTitle,
|
|
819
|
-
placeholder: /* @__PURE__ */
|
|
821
|
+
placeholder: /* @__PURE__ */ _("div", { className: k.editor__placeholder, children: n }),
|
|
820
822
|
spellCheck: !1,
|
|
821
823
|
id: "rteEditor",
|
|
822
824
|
style: { height: `${a}`, maxHeight: `${a}` },
|
|
823
|
-
onScroll: (
|
|
824
|
-
ref:
|
|
825
|
+
onScroll: (y) => D(y.currentTarget.scrollTop),
|
|
826
|
+
ref: N
|
|
825
827
|
}
|
|
826
828
|
),
|
|
827
|
-
placeholder: /* @__PURE__ */
|
|
828
|
-
ErrorBoundary:
|
|
829
|
+
placeholder: /* @__PURE__ */ _("div", { className: k.editor__placeholder, children: n }),
|
|
830
|
+
ErrorBoundary: zn
|
|
829
831
|
}
|
|
830
832
|
),
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ _(rr, {}),
|
|
834
|
+
/* @__PURE__ */ _(tr, {}),
|
|
835
|
+
/* @__PURE__ */ _(Wn, {}),
|
|
836
|
+
/* @__PURE__ */ _(jn, { validateUrl: tn }),
|
|
837
|
+
/* @__PURE__ */ _(nn, { matchers: rn }),
|
|
838
|
+
/* @__PURE__ */ _(Gn, {}),
|
|
839
|
+
/* @__PURE__ */ _(Hn, { onChange: A }),
|
|
840
|
+
/* @__PURE__ */ _(hn, {})
|
|
838
841
|
] })
|
|
839
842
|
] }) }),
|
|
840
|
-
s !== "" && /* @__PURE__ */
|
|
843
|
+
s !== "" && /* @__PURE__ */ _(un, { level: "error", feedback: s })
|
|
841
844
|
] });
|
|
842
|
-
},
|
|
845
|
+
}, Wr = ({
|
|
843
846
|
currentLanguage: t = "NL",
|
|
844
847
|
initialValue: e = "",
|
|
845
848
|
placeholder: n = "",
|
|
@@ -847,10 +850,10 @@ const Xe = 200, rr = ({
|
|
|
847
850
|
info: i = "",
|
|
848
851
|
required: o = !1,
|
|
849
852
|
notValidatedText: s = "",
|
|
850
|
-
maxWords: a =
|
|
853
|
+
maxWords: a = Ve,
|
|
851
854
|
onChange: l
|
|
852
|
-
}) => /* @__PURE__ */
|
|
853
|
-
|
|
855
|
+
}) => /* @__PURE__ */ _(gn, { children: /* @__PURE__ */ _(
|
|
856
|
+
or,
|
|
854
857
|
{
|
|
855
858
|
currentLanguage: t,
|
|
856
859
|
initialValue: e,
|
|
@@ -864,7 +867,7 @@ const Xe = 200, rr = ({
|
|
|
864
867
|
}
|
|
865
868
|
) });
|
|
866
869
|
export {
|
|
867
|
-
|
|
868
|
-
|
|
870
|
+
or as Rte,
|
|
871
|
+
Wr as RteEditor
|
|
869
872
|
};
|
|
870
873
|
//# sourceMappingURL=RteEditor.js.map
|