@uva-glass/component-library 3.14.0 → 3.14.2
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/{Lexical.prod-D8x7Ii0F.js → Lexical.prod-qoFV025v.js} +1831 -1858
- package/dist/Lexical.prod-qoFV025v.js.map +1 -0
- package/dist/LexicalClipboard.prod-BFJoO5qv.js +255 -0
- package/dist/LexicalClipboard.prod-BFJoO5qv.js.map +1 -0
- package/dist/{LexicalLink.prod-CkldFE8u.js → LexicalLink.prod-BIN12UMz.js} +47 -47
- package/dist/{LexicalLink.prod-CkldFE8u.js.map → LexicalLink.prod-BIN12UMz.js.map} +1 -1
- package/dist/{LexicalList.prod-CsVDXdmw.js → LexicalList.prod-WlGaeo0L.js} +71 -71
- package/dist/LexicalList.prod-WlGaeo0L.js.map +1 -0
- package/dist/LexicalSelection.prod-B5grbYgk.js +97 -0
- package/dist/LexicalSelection.prod-B5grbYgk.js.map +1 -0
- package/dist/{LexicalTable.prod-rZbTmo9K.js → LexicalTable.prod-osQj1CQX.js} +551 -550
- package/dist/LexicalTable.prod-osQj1CQX.js.map +1 -0
- package/dist/{LexicalUtils.prod-CpMJ4I9h.js → LexicalUtils.prod-BpZsS7jD.js} +29 -29
- package/dist/{LexicalUtils.prod-CpMJ4I9h.js.map → LexicalUtils.prod-BpZsS7jD.js.map} +1 -1
- package/dist/{TablePlugin-WOgWan8s.js → TablePlugin-6tDdOCQy.js} +10 -10
- package/dist/{TablePlugin-WOgWan8s.js.map → TablePlugin-6tDdOCQy.js.map} +1 -1
- package/dist/assets/OverlayStepBar.css +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +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 +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.d.ts +5 -7
- package/dist/components/OverlayStepBar/OverlayStepBar.js +19 -57
- package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js +7 -12
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +33 -33
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +24 -24
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +14 -14
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +20 -20
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +451 -450
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/Timeline/Timeline.test.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-E_SsILnP.js → helpers-5RvdadYU.js} +25 -25
- package/dist/{helpers-E_SsILnP.js.map → helpers-5RvdadYU.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/dist/Lexical.prod-D8x7Ii0F.js.map +0 -1
- package/dist/LexicalClipboard.prod-D5GjiArS.js +0 -255
- package/dist/LexicalClipboard.prod-D5GjiArS.js.map +0 -1
- package/dist/LexicalList.prod-CsVDXdmw.js.map +0 -1
- package/dist/LexicalSelection.prod-JQDTaUpX.js +0 -90
- package/dist/LexicalSelection.prod-JQDTaUpX.js.map +0 -1
- package/dist/LexicalTable.prod-rZbTmo9K.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as h, jsxs as K, Fragment as
|
|
2
|
-
import { t as
|
|
3
|
-
import { aF as
|
|
1
|
+
import { jsx as h, jsxs as K, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
+
import { t as Xe, r as Ye, o as T } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { aF as Ie, af as A, P as Me, N as p, aG as de, am as J, d as W, F as Qe, Q as M, c as g, V as Ze, L as m, aH as et, ae as Fe, o as tt, q as Oe, aI as rt, aJ as nt, U as ot, g as P, aC as at, aK as st, aL as it, aM as lt, k as te, aN as ut, aO as ct, a1 as dt, v as ft, y as mt, O as pt, aP as gt, aQ as me, a as pe, H as ht, D as re, G as vt, a2 as Ke, aR as ge, A as Ct, z as yt, t as Et, aS as he, x as wt, aT as bt, aU as _t, aV as St, aB as kt, R as xt, M as Nt, aW as Lt, S as Dt, C as $t, B as Pt, n as Tt, I as ve, aX as Rt, b as It, ar as X, aq as Y, aY as Mt, aZ as Ft, at as Ot, a_ as se, as as Kt, a$ as zt } from "../../Lexical.prod-qoFV025v.js";
|
|
4
4
|
import * as ne from "react";
|
|
5
|
-
import { useMemo as q, useLayoutEffect as U, useEffect as
|
|
6
|
-
import { j, L as
|
|
7
|
-
import { flushSync as
|
|
8
|
-
import { D as
|
|
9
|
-
import {
|
|
10
|
-
import { r as
|
|
11
|
-
import { g as
|
|
12
|
-
import { c as
|
|
13
|
-
import { a as
|
|
14
|
-
import { c as
|
|
15
|
-
import { exportMap as
|
|
5
|
+
import { useMemo as q, useLayoutEffect as U, useEffect as S, useState as F, useRef as ze, Suspense as At, forwardRef as Ae, useCallback as Bt } from "react";
|
|
6
|
+
import { j as H, L as z, y as Ut, w as fe } from "../../LexicalUtils.prod-BpZsS7jD.js";
|
|
7
|
+
import { flushSync as Ht, createPortal as jt } from "react-dom";
|
|
8
|
+
import { D as Ce, _ as ye, h as Jt, m as Wt } from "../../LexicalClipboard.prod-BFJoO5qv.js";
|
|
9
|
+
import { X as Ee, J as we } from "../../LexicalSelection.prod-B5grbYgk.js";
|
|
10
|
+
import { r as Be, G as Ue, v as qt, T as Vt } from "../../LexicalList.prod-WlGaeo0L.js";
|
|
11
|
+
import { g as He, k as be, N as oe, p as Gt, m as Xt } from "../../LexicalLink.prod-BIN12UMz.js";
|
|
12
|
+
import { s as Yt, c as Qt, a as je, b as Zt, w as er, S as tr, y as Je, O as rr } from "../../LexicalTable.prod-osQj1CQX.js";
|
|
13
|
+
import { a as nr, w as or, M as ar } from "../../helpers-5RvdadYU.js";
|
|
14
|
+
import { c as sr } from "../../clsx-OuTLNxxd.js";
|
|
15
|
+
import { exportMap as ir, isStartingWithHtmlTag as lr, mergeBoldStrongTags as ur } from "./helpers.js";
|
|
16
16
|
import { s as I } from "../../RteEditor.module-oFMKEW6f.js";
|
|
17
|
-
import { ToolBarPlugin as
|
|
18
|
-
import { useTranslation as
|
|
19
|
-
import "../../TablePlugin-
|
|
17
|
+
import { ToolBarPlugin as cr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
|
|
18
|
+
import { useTranslation as dr } from "./hooks/useTranslation.js";
|
|
19
|
+
import "../../TablePlugin-6tDdOCQy.js";
|
|
20
20
|
import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "./hooks/components/Flyout.js";
|
|
22
22
|
import "../Buttons/Button.js";
|
|
@@ -27,7 +27,7 @@ import "@react-aria/dialog";
|
|
|
27
27
|
import "@react-aria/focus";
|
|
28
28
|
import "@react-aria/overlays";
|
|
29
29
|
import "../OverlayCloseButton/OverlayCloseButton.js";
|
|
30
|
-
import { FeedbackBox as
|
|
30
|
+
import { FeedbackBox as fr } from "../FeedbackBox/FeedbackBox.js";
|
|
31
31
|
import "../GridRow/GridRow.js";
|
|
32
32
|
import "../IconButton/IconButton.js";
|
|
33
33
|
import "../Input/Input.js";
|
|
@@ -37,22 +37,22 @@ import "../SelectListbox/SelectListbox.js";
|
|
|
37
37
|
import "../SelectListbox/SelectProvider.js";
|
|
38
38
|
import "../Sortable/components/SortableItem.js";
|
|
39
39
|
import "../../SortableProvider-DZggDO3M.js";
|
|
40
|
-
import { UvaTheme as
|
|
41
|
-
import { EditorHeader as
|
|
42
|
-
import { LanguageProvider as
|
|
43
|
-
import { PasteHandlerPlugin as
|
|
44
|
-
const
|
|
45
|
-
function
|
|
40
|
+
import { UvaTheme as mr } from "./UvaTheme/UvaTheme.js";
|
|
41
|
+
import { EditorHeader as pr } from "./EditorHeader/EditorHeader.js";
|
|
42
|
+
import { LanguageProvider as gr, useLanguage as hr } from "./Providers/LanguageProvider.js";
|
|
43
|
+
import { PasteHandlerPlugin as vr } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
|
|
44
|
+
const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Cr = We ? U : S, Q = { tag: de };
|
|
45
|
+
function yr({ initialConfig: r, children: e }) {
|
|
46
46
|
const t = q(() => {
|
|
47
|
-
const { theme:
|
|
47
|
+
const { theme: n, namespace: a, nodes: o, onError: s, editorState: i, html: l } = r, u = Xe(null, n), c = Ie({ editable: r.editable, html: l, namespace: a, nodes: o, onError: (d) => s(d, c), theme: n });
|
|
48
48
|
return function(d, f) {
|
|
49
49
|
if (f !== null) {
|
|
50
50
|
if (f === void 0) d.update(() => {
|
|
51
|
-
const v =
|
|
51
|
+
const v = A();
|
|
52
52
|
if (v.isEmpty()) {
|
|
53
|
-
const C =
|
|
53
|
+
const C = Me();
|
|
54
54
|
v.append(C);
|
|
55
|
-
const w =
|
|
55
|
+
const w = We ? document.activeElement : null;
|
|
56
56
|
(p() !== null || w !== null && w === d.getRootElement()) && C.select();
|
|
57
57
|
}
|
|
58
58
|
}, Q);
|
|
@@ -67,91 +67,91 @@ function pr({ initialConfig: r, children: e }) {
|
|
|
67
67
|
break;
|
|
68
68
|
case "function":
|
|
69
69
|
d.update(() => {
|
|
70
|
-
|
|
70
|
+
A().isEmpty() && f(d);
|
|
71
71
|
}, Q);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
}(c,
|
|
74
|
+
}(c, i), [c, u];
|
|
75
75
|
}, []);
|
|
76
|
-
return
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
}, []), h(
|
|
76
|
+
return Cr(() => {
|
|
77
|
+
const n = r.editable, [a] = t;
|
|
78
|
+
a.setEditable(n === void 0 || n);
|
|
79
|
+
}, []), h(Ye.Provider, { value: t, children: e });
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
function
|
|
81
|
+
const Er = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
|
|
82
|
+
function wr(r) {
|
|
83
83
|
return { initialValueFn: () => r.isEditable(), subscribe: (e) => r.registerEditableListener(e) };
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function br() {
|
|
86
86
|
return function(r) {
|
|
87
|
-
const [e] =
|
|
88
|
-
return
|
|
89
|
-
const { initialValueFn: s, subscribe:
|
|
90
|
-
return
|
|
91
|
-
|
|
87
|
+
const [e] = T(), t = q(() => r(e), [e, r]), [n, a] = F(() => t.initialValueFn()), o = ze(n);
|
|
88
|
+
return Er(() => {
|
|
89
|
+
const { initialValueFn: s, subscribe: i } = t, l = s();
|
|
90
|
+
return o.current !== l && (o.current = l, a(l)), i((u) => {
|
|
91
|
+
o.current = u, a(u);
|
|
92
92
|
});
|
|
93
|
-
}, [t, r]),
|
|
94
|
-
}(
|
|
93
|
+
}, [t, r]), n;
|
|
94
|
+
}(wr);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
96
|
+
function _r() {
|
|
97
|
+
return A().getTextContent();
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Sr(r, e = !0) {
|
|
100
100
|
if (r) return !1;
|
|
101
|
-
let t =
|
|
101
|
+
let t = _r();
|
|
102
102
|
return e && (t = t.trim()), t === "";
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
if (!
|
|
106
|
-
const e =
|
|
104
|
+
function kr(r) {
|
|
105
|
+
if (!Sr(r, !1)) return !1;
|
|
106
|
+
const e = A().getChildren(), t = e.length;
|
|
107
107
|
if (t > 1) return !1;
|
|
108
|
-
for (let
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
if (
|
|
112
|
-
if (!
|
|
113
|
-
const
|
|
114
|
-
for (let
|
|
115
|
-
const l = n
|
|
108
|
+
for (let n = 0; n < t; n++) {
|
|
109
|
+
const a = e[n];
|
|
110
|
+
if (J(a)) return !1;
|
|
111
|
+
if (W(a)) {
|
|
112
|
+
if (!Qe(a) || a.__indent !== 0) return !1;
|
|
113
|
+
const o = a.getChildren(), s = o.length;
|
|
114
|
+
for (let i = 0; i < s; i++) {
|
|
115
|
+
const l = o[n];
|
|
116
116
|
if (!M(l)) return !1;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
return !0;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
return () =>
|
|
122
|
+
function qe(r) {
|
|
123
|
+
return () => kr(r);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
const e = window.location.origin, t = (
|
|
127
|
-
if (
|
|
128
|
-
const
|
|
129
|
-
if (document.activeElement !==
|
|
130
|
-
const
|
|
131
|
-
if (typeof
|
|
125
|
+
function xr(r) {
|
|
126
|
+
const e = window.location.origin, t = (n) => {
|
|
127
|
+
if (n.origin !== e) return;
|
|
128
|
+
const a = r.getRootElement();
|
|
129
|
+
if (document.activeElement !== a) return;
|
|
130
|
+
const o = n.data;
|
|
131
|
+
if (typeof o == "string") {
|
|
132
132
|
let s;
|
|
133
133
|
try {
|
|
134
|
-
s = JSON.parse(
|
|
134
|
+
s = JSON.parse(o);
|
|
135
135
|
} catch {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
if (s && s.protocol === "nuanria_messaging" && s.type === "request") {
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
const l =
|
|
139
|
+
const i = s.payload;
|
|
140
|
+
if (i && i.functionId === "makeChanges") {
|
|
141
|
+
const l = i.args;
|
|
142
142
|
if (l) {
|
|
143
143
|
const [u, c, d, f, v, C] = l;
|
|
144
144
|
r.update(() => {
|
|
145
145
|
const w = p();
|
|
146
146
|
if (g(w)) {
|
|
147
147
|
const x = w.anchor;
|
|
148
|
-
let y = x.getNode(), E = 0,
|
|
149
|
-
if (M(y) && u >= 0 && c >= 0 && (E = u,
|
|
150
|
-
E = f,
|
|
148
|
+
let y = x.getNode(), E = 0, _ = 0;
|
|
149
|
+
if (M(y) && u >= 0 && c >= 0 && (E = u, _ = u + c, w.setTextNodeRange(y, E, y, _)), E === _ && d === "" || (w.insertRawText(d), y = x.getNode()), M(y)) {
|
|
150
|
+
E = f, _ = f + v;
|
|
151
151
|
const N = y.getTextContentSize();
|
|
152
|
-
E = E > N ? N : E,
|
|
152
|
+
E = E > N ? N : E, _ = _ > N ? N : _, w.setTextNodeRange(y, E, y, _);
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
n.stopImmediatePropagation();
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
}
|
|
@@ -163,7 +163,7 @@ function wr(r) {
|
|
|
163
163
|
window.removeEventListener("message", t, !0);
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function _e(r, e) {
|
|
167
167
|
if (document.caretRangeFromPoint !== void 0) {
|
|
168
168
|
const t = document.caretRangeFromPoint(r, e);
|
|
169
169
|
return t === null ? null : { node: t.startContainer, offset: t.startOffset };
|
|
@@ -174,258 +174,258 @@ function we(r, e) {
|
|
|
174
174
|
}
|
|
175
175
|
return null;
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const j = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = j && "documentMode" in document ? document.documentMode : null, Lr = !(!j || !("InputEvent" in window) || Nr) && "getTargetRanges" in new window.InputEvent("input"), Dr = j && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Se = j && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $r = j && /^(?=.*Chrome).*/i.test(navigator.userAgent), Pr = j && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, ke = tt("DRAG_DROP_PASTE_FILE");
|
|
178
178
|
function Z(r) {
|
|
179
179
|
let e = null;
|
|
180
|
-
if (
|
|
181
|
-
const t = e.types,
|
|
182
|
-
return [
|
|
180
|
+
if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
|
|
181
|
+
const t = e.types, n = t.includes("Files"), a = t.includes("text/html") || t.includes("text/plain");
|
|
182
|
+
return [n, Array.from(e.files), a];
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function xe(r) {
|
|
185
185
|
const e = p();
|
|
186
186
|
if (!g(e)) return !1;
|
|
187
|
-
const t = /* @__PURE__ */ new Set(),
|
|
188
|
-
for (let
|
|
189
|
-
const
|
|
187
|
+
const t = /* @__PURE__ */ new Set(), n = e.getNodes();
|
|
188
|
+
for (let a = 0; a < n.length; a++) {
|
|
189
|
+
const o = n[a], s = o.getKey();
|
|
190
190
|
if (t.has(s)) continue;
|
|
191
|
-
const
|
|
192
|
-
if (
|
|
193
|
-
const l =
|
|
194
|
-
|
|
191
|
+
const i = fe(o, (u) => W(u) && !u.isInline());
|
|
192
|
+
if (i === null) continue;
|
|
193
|
+
const l = i.getKey();
|
|
194
|
+
i.canIndent() && !t.has(l) && (t.add(l), r(i));
|
|
195
195
|
}
|
|
196
196
|
return t.size > 0;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Ne(r) {
|
|
199
199
|
const e = te(r);
|
|
200
|
-
return
|
|
200
|
+
return J(e);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ae(r) {
|
|
203
203
|
for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
return
|
|
205
|
+
function Tr(r) {
|
|
206
|
+
return H(r.registerCommand(Tt, (e) => {
|
|
207
207
|
const t = p();
|
|
208
|
-
return !!
|
|
208
|
+
return !!P(t) && (t.clear(), !0);
|
|
209
209
|
}, 0), r.registerCommand(re, (e) => {
|
|
210
210
|
const t = p();
|
|
211
|
-
return g(t) ? (t.deleteCharacter(e), !0) : !!
|
|
212
|
-
}, m), r.registerCommand(
|
|
211
|
+
return g(t) ? (t.deleteCharacter(e), !0) : !!P(t) && (t.deleteNodes(), !0);
|
|
212
|
+
}, m), r.registerCommand(Pt, (e) => {
|
|
213
213
|
const t = p();
|
|
214
214
|
return !!g(t) && (t.deleteWord(e), !0);
|
|
215
|
-
}, m), r.registerCommand(
|
|
215
|
+
}, m), r.registerCommand($t, (e) => {
|
|
216
216
|
const t = p();
|
|
217
217
|
return !!g(t) && (t.deleteLine(e), !0);
|
|
218
|
-
}, m), r.registerCommand(
|
|
218
|
+
}, m), r.registerCommand(Dt, (e) => {
|
|
219
219
|
const t = p();
|
|
220
220
|
if (typeof e == "string") t !== null && t.insertText(e);
|
|
221
221
|
else {
|
|
222
222
|
if (t === null) return !1;
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
223
|
+
const n = e.dataTransfer;
|
|
224
|
+
if (n != null) Ce(n, t, r);
|
|
225
225
|
else if (g(t)) {
|
|
226
|
-
const
|
|
227
|
-
return
|
|
226
|
+
const a = e.data;
|
|
227
|
+
return a && t.insertText(a), !0;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
return !0;
|
|
231
|
-
}, m), r.registerCommand(
|
|
231
|
+
}, m), r.registerCommand(Lt, () => {
|
|
232
232
|
const e = p();
|
|
233
233
|
return !!g(e) && (e.removeText(), !0);
|
|
234
|
-
}, m), r.registerCommand(
|
|
234
|
+
}, m), r.registerCommand(Nt, (e) => {
|
|
235
235
|
const t = p();
|
|
236
236
|
return !!g(t) && (t.formatText(e), !0);
|
|
237
|
-
}, m), r.registerCommand(
|
|
237
|
+
}, m), r.registerCommand(xt, (e) => {
|
|
238
238
|
const t = p();
|
|
239
|
-
if (!g(t) && !
|
|
240
|
-
const
|
|
241
|
-
for (const
|
|
242
|
-
const
|
|
243
|
-
|
|
239
|
+
if (!g(t) && !P(t)) return !1;
|
|
240
|
+
const n = t.getNodes();
|
|
241
|
+
for (const a of n) {
|
|
242
|
+
const o = fe(a, (s) => W(s) && !s.isInline());
|
|
243
|
+
o !== null && o.setFormat(e);
|
|
244
244
|
}
|
|
245
245
|
return !0;
|
|
246
|
-
}, m), r.registerCommand(
|
|
246
|
+
}, m), r.registerCommand(me, (e) => {
|
|
247
247
|
const t = p();
|
|
248
248
|
return !!g(t) && (t.insertLineBreak(e), !0);
|
|
249
|
-
}, m), r.registerCommand(
|
|
249
|
+
}, m), r.registerCommand(pe, () => {
|
|
250
250
|
const e = p();
|
|
251
251
|
return !!g(e) && (e.insertParagraph(), !0);
|
|
252
|
-
}, m), r.registerCommand(
|
|
252
|
+
}, m), r.registerCommand(_t, () => (St([kt()]), !0), m), r.registerCommand(bt, () => xe((e) => {
|
|
253
253
|
const t = e.getIndent();
|
|
254
254
|
e.setIndent(t + 1);
|
|
255
|
-
}), m), r.registerCommand(
|
|
255
|
+
}), m), r.registerCommand(ge, () => xe((e) => {
|
|
256
256
|
const t = e.getIndent();
|
|
257
257
|
t > 0 && e.setIndent(Math.max(0, t - 1));
|
|
258
|
-
}), m), r.registerCommand(
|
|
258
|
+
}), m), r.registerCommand(wt, (e) => {
|
|
259
259
|
const t = p();
|
|
260
|
-
if (
|
|
261
|
-
const
|
|
262
|
-
if (
|
|
260
|
+
if (P(t)) {
|
|
261
|
+
const n = t.getNodes();
|
|
262
|
+
if (n.length > 0) return n[0].selectPrevious(), !0;
|
|
263
263
|
} else if (g(t)) {
|
|
264
|
-
const
|
|
265
|
-
if (!e.shiftKey &&
|
|
264
|
+
const n = he(t.focus, !0);
|
|
265
|
+
if (!e.shiftKey && J(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
|
|
266
266
|
}
|
|
267
267
|
return !1;
|
|
268
|
-
}, m), r.registerCommand(
|
|
268
|
+
}, m), r.registerCommand(Et, (e) => {
|
|
269
269
|
const t = p();
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
270
|
+
if (P(t)) {
|
|
271
|
+
const n = t.getNodes();
|
|
272
|
+
if (n.length > 0) return n[0].selectNext(0, 0), !0;
|
|
273
273
|
} else if (g(t)) {
|
|
274
|
-
if (function(
|
|
275
|
-
const
|
|
276
|
-
return
|
|
274
|
+
if (function(a) {
|
|
275
|
+
const o = a.focus;
|
|
276
|
+
return o.key === "root" && o.offset === A().getChildrenSize();
|
|
277
277
|
}(t)) return e.preventDefault(), !0;
|
|
278
|
-
const
|
|
279
|
-
if (!e.shiftKey &&
|
|
278
|
+
const n = he(t.focus, !1);
|
|
279
|
+
if (!e.shiftKey && J(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
|
|
280
280
|
}
|
|
281
281
|
return !1;
|
|
282
|
-
}, m), r.registerCommand(
|
|
282
|
+
}, m), r.registerCommand(yt, (e) => {
|
|
283
283
|
const t = p();
|
|
284
|
-
if (
|
|
285
|
-
const
|
|
286
|
-
if (
|
|
284
|
+
if (P(t)) {
|
|
285
|
+
const n = t.getNodes();
|
|
286
|
+
if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
|
|
287
287
|
}
|
|
288
288
|
if (!g(t)) return !1;
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
291
|
-
return e.preventDefault(),
|
|
289
|
+
if (Ee(t, !0)) {
|
|
290
|
+
const n = e.shiftKey;
|
|
291
|
+
return e.preventDefault(), we(t, n, !0), !0;
|
|
292
292
|
}
|
|
293
293
|
return !1;
|
|
294
|
-
}, m), r.registerCommand(
|
|
294
|
+
}, m), r.registerCommand(Ct, (e) => {
|
|
295
295
|
const t = p();
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
298
|
-
if (
|
|
296
|
+
if (P(t)) {
|
|
297
|
+
const a = t.getNodes();
|
|
298
|
+
if (a.length > 0) return e.preventDefault(), a[0].selectNext(0, 0), !0;
|
|
299
299
|
}
|
|
300
300
|
if (!g(t)) return !1;
|
|
301
|
-
const
|
|
302
|
-
return !!
|
|
303
|
-
}, m), r.registerCommand(
|
|
304
|
-
if (
|
|
301
|
+
const n = e.shiftKey;
|
|
302
|
+
return !!Ee(t, !1) && (e.preventDefault(), we(t, n, !1), !0);
|
|
303
|
+
}, m), r.registerCommand(vt, (e) => {
|
|
304
|
+
if (Ne(e.target)) return !1;
|
|
305
305
|
const t = p();
|
|
306
306
|
if (g(t)) {
|
|
307
|
-
const { anchor:
|
|
308
|
-
if (t.isCollapsed() &&
|
|
309
|
-
return e.preventDefault(), r.dispatchCommand(
|
|
310
|
-
if (
|
|
311
|
-
} else if (!
|
|
307
|
+
const { anchor: n } = t, a = n.getNode();
|
|
308
|
+
if (t.isCollapsed() && n.offset === 0 && !Ke(a) && Ut(a).getIndent() > 0)
|
|
309
|
+
return e.preventDefault(), r.dispatchCommand(ge, void 0);
|
|
310
|
+
if (Se && navigator.language === "ko-KR") return !1;
|
|
311
|
+
} else if (!P(t)) return !1;
|
|
312
312
|
return e.preventDefault(), r.dispatchCommand(re, !0);
|
|
313
|
-
}, m), r.registerCommand(
|
|
314
|
-
if (
|
|
313
|
+
}, m), r.registerCommand(ht, (e) => {
|
|
314
|
+
if (Ne(e.target)) return !1;
|
|
315
315
|
const t = p();
|
|
316
|
-
return !(!g(t) && !
|
|
317
|
-
}, m), r.registerCommand(
|
|
316
|
+
return !(!g(t) && !P(t)) && (e.preventDefault(), r.dispatchCommand(re, !1));
|
|
317
|
+
}, m), r.registerCommand(gt, (e) => {
|
|
318
318
|
const t = p();
|
|
319
319
|
if (!g(t)) return !1;
|
|
320
|
-
if (
|
|
321
|
-
if ((
|
|
322
|
-
if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(
|
|
320
|
+
if (ae(t), e !== null) {
|
|
321
|
+
if ((Se || Dr || Pr) && Lr) return !1;
|
|
322
|
+
if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(me, !1);
|
|
323
323
|
}
|
|
324
|
-
return r.dispatchCommand(
|
|
325
|
-
}, m), r.registerCommand(
|
|
324
|
+
return r.dispatchCommand(pe, void 0);
|
|
325
|
+
}, m), r.registerCommand(pt, () => {
|
|
326
326
|
const e = p();
|
|
327
327
|
return !!g(e) && (r.blur(), !0);
|
|
328
|
-
}, m), r.registerCommand(
|
|
328
|
+
}, m), r.registerCommand(ct, (e) => {
|
|
329
329
|
const [, t] = Z(e);
|
|
330
330
|
if (t.length > 0) {
|
|
331
|
-
const
|
|
332
|
-
if (
|
|
333
|
-
const { offset:
|
|
334
|
-
if (
|
|
335
|
-
const l =
|
|
336
|
-
if (M(
|
|
331
|
+
const a = _e(e.clientX, e.clientY);
|
|
332
|
+
if (a !== null) {
|
|
333
|
+
const { offset: o, node: s } = a, i = te(s);
|
|
334
|
+
if (i !== null) {
|
|
335
|
+
const l = dt();
|
|
336
|
+
if (M(i)) l.anchor.set(i.getKey(), o, "text"), l.focus.set(i.getKey(), o, "text");
|
|
337
337
|
else {
|
|
338
|
-
const c =
|
|
338
|
+
const c = i.getParentOrThrow().getKey(), d = i.getIndexWithinParent() + 1;
|
|
339
339
|
l.anchor.set(c, d, "element"), l.focus.set(c, d, "element");
|
|
340
340
|
}
|
|
341
|
-
const u =
|
|
342
|
-
|
|
341
|
+
const u = ft(l);
|
|
342
|
+
mt(u);
|
|
343
343
|
}
|
|
344
|
-
r.dispatchCommand(
|
|
344
|
+
r.dispatchCommand(ke, t);
|
|
345
345
|
}
|
|
346
346
|
return e.preventDefault(), !0;
|
|
347
347
|
}
|
|
348
|
-
const
|
|
349
|
-
return !!g(
|
|
350
|
-
}, m), r.registerCommand(
|
|
351
|
-
const [t] = Z(e),
|
|
352
|
-
return !(t && !g(
|
|
353
|
-
}, m), r.registerCommand(
|
|
354
|
-
const [t] = Z(e),
|
|
355
|
-
if (t && !g(
|
|
356
|
-
const
|
|
357
|
-
if (
|
|
358
|
-
const
|
|
359
|
-
|
|
348
|
+
const n = p();
|
|
349
|
+
return !!g(n);
|
|
350
|
+
}, m), r.registerCommand(ut, (e) => {
|
|
351
|
+
const [t] = Z(e), n = p();
|
|
352
|
+
return !(t && !g(n));
|
|
353
|
+
}, m), r.registerCommand(lt, (e) => {
|
|
354
|
+
const [t] = Z(e), n = p();
|
|
355
|
+
if (t && !g(n)) return !1;
|
|
356
|
+
const a = _e(e.clientX, e.clientY);
|
|
357
|
+
if (a !== null) {
|
|
358
|
+
const o = te(a.node);
|
|
359
|
+
J(o) && e.preventDefault();
|
|
360
360
|
}
|
|
361
361
|
return !0;
|
|
362
|
-
}, m), r.registerCommand(
|
|
363
|
-
await
|
|
364
|
-
const
|
|
365
|
-
g(
|
|
362
|
+
}, m), r.registerCommand(st, () => (it(), !0), m), r.registerCommand(at, (e) => (ye(r, z(e, ClipboardEvent) ? e : null), !0), m), r.registerCommand(ot, (e) => (async function(t, n) {
|
|
363
|
+
await ye(n, z(t, ClipboardEvent) ? t : null), n.update(() => {
|
|
364
|
+
const a = p();
|
|
365
|
+
g(a) ? a.removeText() : P(a) && a.getNodes().forEach((o) => o.remove());
|
|
366
366
|
});
|
|
367
|
-
}(e, r), !0), m), r.registerCommand(
|
|
368
|
-
const [, t,
|
|
369
|
-
return t.length > 0 && !
|
|
370
|
-
|
|
371
|
-
const s = p(),
|
|
372
|
-
|
|
373
|
-
}, { tag:
|
|
367
|
+
}(e, r), !0), m), r.registerCommand(Fe, (e) => {
|
|
368
|
+
const [, t, n] = Z(e);
|
|
369
|
+
return t.length > 0 && !n ? (r.dispatchCommand(ke, t), !0) : Oe(e.target) && rt(e.target) ? !1 : p() !== null && (function(a, o) {
|
|
370
|
+
a.preventDefault(), o.update(() => {
|
|
371
|
+
const s = p(), i = z(a, InputEvent) || z(a, KeyboardEvent) ? null : a.clipboardData;
|
|
372
|
+
i != null && s !== null && Ce(i, s, o);
|
|
373
|
+
}, { tag: nt });
|
|
374
374
|
}(e, r), !0);
|
|
375
|
-
}, m), r.registerCommand(
|
|
375
|
+
}, m), r.registerCommand(et, (e) => {
|
|
376
376
|
const t = p();
|
|
377
|
-
return g(t) &&
|
|
378
|
-
}, m), r.registerCommand(
|
|
377
|
+
return g(t) && ae(t), !1;
|
|
378
|
+
}, m), r.registerCommand(Ze, (e) => {
|
|
379
379
|
const t = p();
|
|
380
|
-
return g(t) &&
|
|
380
|
+
return g(t) && ae(t), !1;
|
|
381
381
|
}, m));
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
function
|
|
385
|
-
return r.getEditorState().read(
|
|
383
|
+
const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
|
|
384
|
+
function Le(r) {
|
|
385
|
+
return r.getEditorState().read(qe(r.isComposing()));
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
const [
|
|
389
|
-
const [
|
|
390
|
-
return
|
|
391
|
-
|
|
387
|
+
function Rr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
|
|
388
|
+
const [n] = T(), a = function(o, s) {
|
|
389
|
+
const [i, l] = F(() => o.getDecorators());
|
|
390
|
+
return ie(() => o.registerDecoratorListener((u) => {
|
|
391
|
+
Ht(() => {
|
|
392
392
|
l(u);
|
|
393
393
|
});
|
|
394
|
-
}), [
|
|
395
|
-
l(
|
|
396
|
-
}, [
|
|
397
|
-
const u = [], c = Object.keys(
|
|
394
|
+
}), [o]), S(() => {
|
|
395
|
+
l(o.getDecorators());
|
|
396
|
+
}, [o]), q(() => {
|
|
397
|
+
const u = [], c = Object.keys(i);
|
|
398
398
|
for (let d = 0; d < c.length; d++) {
|
|
399
|
-
const f = c[d], v = h(s, { onError: (w) =>
|
|
400
|
-
C !== null && u.push(
|
|
399
|
+
const f = c[d], v = h(s, { onError: (w) => o._onError(w), children: h(At, { fallback: null, children: i[f] }) }), C = o.getElementByKey(f);
|
|
400
|
+
C !== null && u.push(jt(v, C, f));
|
|
401
401
|
}
|
|
402
402
|
return u;
|
|
403
|
-
}, [s,
|
|
404
|
-
}(
|
|
405
|
-
return function(
|
|
406
|
-
|
|
407
|
-
}(
|
|
408
|
-
}
|
|
409
|
-
function
|
|
410
|
-
const [e] =
|
|
411
|
-
const [
|
|
412
|
-
return
|
|
413
|
-
function
|
|
414
|
-
const l =
|
|
403
|
+
}, [s, i, o]);
|
|
404
|
+
}(n, t);
|
|
405
|
+
return function(o) {
|
|
406
|
+
ie(() => H(Tr(o), xr(o)), [o]);
|
|
407
|
+
}(n), K(Re, { children: [r, h(Ir, { content: e }), a] });
|
|
408
|
+
}
|
|
409
|
+
function Ir({ content: r }) {
|
|
410
|
+
const [e] = T(), t = function(a) {
|
|
411
|
+
const [o, s] = F(() => Le(a));
|
|
412
|
+
return ie(() => {
|
|
413
|
+
function i() {
|
|
414
|
+
const l = Le(a);
|
|
415
415
|
s(l);
|
|
416
416
|
}
|
|
417
|
-
return
|
|
418
|
-
|
|
419
|
-
}),
|
|
420
|
-
|
|
417
|
+
return i(), H(a.registerUpdateListener(() => {
|
|
418
|
+
i();
|
|
419
|
+
}), a.registerEditableListener(() => {
|
|
420
|
+
i();
|
|
421
421
|
}));
|
|
422
|
-
}, [
|
|
423
|
-
}(e),
|
|
424
|
-
return t ? typeof r == "function" ? r(
|
|
422
|
+
}, [a]), o;
|
|
423
|
+
}(e), n = br();
|
|
424
|
+
return t ? typeof r == "function" ? r(n) : r : null;
|
|
425
425
|
}
|
|
426
|
-
const
|
|
427
|
-
function
|
|
428
|
-
const [k, R] =
|
|
426
|
+
const Ve = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
|
|
427
|
+
function Mr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: a, ariaErrorMessage: o, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: _, "data-testid": N, ...b }, L) {
|
|
428
|
+
const [k, R] = F(r.isEditable()), O = Bt((D) => {
|
|
429
429
|
D && D.ownerDocument && D.ownerDocument.defaultView ? r.setRootElement(D) : r.setRootElement(null);
|
|
430
430
|
}, [r]), B = q(() => /* @__PURE__ */ function(...D) {
|
|
431
431
|
return (V) => {
|
|
@@ -433,137 +433,137 @@ function $r({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaContr
|
|
|
433
433
|
typeof G == "function" ? G(V) : G != null && (G.current = V);
|
|
434
434
|
});
|
|
435
435
|
};
|
|
436
|
-
}(L,
|
|
437
|
-
return
|
|
436
|
+
}(L, O), [O, L]);
|
|
437
|
+
return Ve(() => (R(r.isEditable()), r.registerEditableListener((D) => {
|
|
438
438
|
R(D);
|
|
439
|
-
})), [r]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ?
|
|
439
|
+
})), [r]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ? n : void 0, "aria-describedby": a, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": k && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": k ? d : void 0, "aria-readonly": !k || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: k, "data-testid": N, id: w, ref: B, role: k ? x : void 0, spellCheck: y, style: E, tabIndex: _, ...b });
|
|
440
440
|
}
|
|
441
|
-
const
|
|
442
|
-
function
|
|
443
|
-
return r.getEditorState().read(
|
|
441
|
+
const Fr = Ae(Mr);
|
|
442
|
+
function De(r) {
|
|
443
|
+
return r.getEditorState().read(qe(r.isComposing()));
|
|
444
444
|
}
|
|
445
|
-
const
|
|
446
|
-
function
|
|
447
|
-
const { placeholder: t, ...
|
|
448
|
-
return K(
|
|
445
|
+
const Or = Ae(Kr);
|
|
446
|
+
function Kr(r, e) {
|
|
447
|
+
const { placeholder: t, ...n } = r, [a] = T();
|
|
448
|
+
return K(Re, { children: [h(Fr, { editor: a, ...n, ref: e }), t != null && h(zr, { editor: a, content: t })] });
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function zr({ content: r, editor: e }) {
|
|
451
451
|
const t = function(s) {
|
|
452
|
-
const [
|
|
453
|
-
return
|
|
452
|
+
const [i, l] = F(() => De(s));
|
|
453
|
+
return Ve(() => {
|
|
454
454
|
function u() {
|
|
455
|
-
const c =
|
|
455
|
+
const c = De(s);
|
|
456
456
|
l(c);
|
|
457
457
|
}
|
|
458
|
-
return u(),
|
|
458
|
+
return u(), H(s.registerUpdateListener(() => {
|
|
459
459
|
u();
|
|
460
460
|
}), s.registerEditableListener(() => {
|
|
461
461
|
u();
|
|
462
462
|
}));
|
|
463
|
-
}, [s]),
|
|
464
|
-
}(e), [
|
|
465
|
-
if (U(() => (
|
|
466
|
-
|
|
463
|
+
}, [s]), i;
|
|
464
|
+
}(e), [n, a] = F(e.isEditable());
|
|
465
|
+
if (U(() => (a(e.isEditable()), e.registerEditableListener((s) => {
|
|
466
|
+
a(s);
|
|
467
467
|
})), [e]), !t) return null;
|
|
468
|
-
let
|
|
469
|
-
return typeof r == "function" ?
|
|
468
|
+
let o = null;
|
|
469
|
+
return typeof r == "function" ? o = r(n) : r !== null && (o = r), o === null ? null : h("div", { "aria-hidden": !0, children: o });
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
return
|
|
473
|
-
return t.__proto__ =
|
|
474
|
-
},
|
|
471
|
+
function le(r, e) {
|
|
472
|
+
return le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) {
|
|
473
|
+
return t.__proto__ = n, t;
|
|
474
|
+
}, le(r, e);
|
|
475
475
|
}
|
|
476
|
-
var
|
|
476
|
+
var $e = { error: null }, Ar = function(r) {
|
|
477
477
|
var e, t;
|
|
478
|
-
function
|
|
479
|
-
for (var
|
|
480
|
-
return (
|
|
478
|
+
function n() {
|
|
479
|
+
for (var o, s = arguments.length, i = new Array(s), l = 0; l < s; l++) i[l] = arguments[l];
|
|
480
|
+
return (o = r.call.apply(r, [this].concat(i)) || this).state = $e, o.resetErrorBoundary = function() {
|
|
481
481
|
for (var u, c = arguments.length, d = new Array(c), f = 0; f < c; f++) d[f] = arguments[f];
|
|
482
|
-
|
|
483
|
-
},
|
|
482
|
+
o.props.onReset == null || (u = o.props).onReset.apply(u, d), o.reset();
|
|
483
|
+
}, o;
|
|
484
484
|
}
|
|
485
|
-
t = r, (e =
|
|
486
|
-
return { error:
|
|
485
|
+
t = r, (e = n).prototype = Object.create(t.prototype), e.prototype.constructor = e, le(e, t), n.getDerivedStateFromError = function(o) {
|
|
486
|
+
return { error: o };
|
|
487
487
|
};
|
|
488
|
-
var
|
|
489
|
-
return
|
|
490
|
-
this.setState(
|
|
491
|
-
},
|
|
492
|
-
var
|
|
493
|
-
(
|
|
494
|
-
},
|
|
495
|
-
var
|
|
496
|
-
d !== null && s.error !== null && ((u =
|
|
488
|
+
var a = n.prototype;
|
|
489
|
+
return a.reset = function() {
|
|
490
|
+
this.setState($e);
|
|
491
|
+
}, a.componentDidCatch = function(o, s) {
|
|
492
|
+
var i, l;
|
|
493
|
+
(i = (l = this.props).onError) == null || i.call(l, o, s);
|
|
494
|
+
}, a.componentDidUpdate = function(o, s) {
|
|
495
|
+
var i, l, u, c, d = this.state.error, f = this.props.resetKeys;
|
|
496
|
+
d !== null && s.error !== null && ((u = o.resetKeys) === void 0 && (u = []), (c = f) === void 0 && (c = []), u.length !== c.length || u.some(function(v, C) {
|
|
497
497
|
return !Object.is(v, c[C]);
|
|
498
|
-
})) && ((
|
|
499
|
-
},
|
|
500
|
-
var
|
|
501
|
-
if (
|
|
502
|
-
var c = { error:
|
|
498
|
+
})) && ((i = (l = this.props).onResetKeysChange) == null || i.call(l, o.resetKeys, f), this.reset());
|
|
499
|
+
}, a.render = function() {
|
|
500
|
+
var o = this.state.error, s = this.props, i = s.fallbackRender, l = s.FallbackComponent, u = s.fallback;
|
|
501
|
+
if (o !== null) {
|
|
502
|
+
var c = { error: o, resetErrorBoundary: this.resetErrorBoundary };
|
|
503
503
|
if (ne.isValidElement(u)) return u;
|
|
504
|
-
if (typeof
|
|
504
|
+
if (typeof i == "function") return i(c);
|
|
505
505
|
if (l) return ne.createElement(l, c);
|
|
506
506
|
throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");
|
|
507
507
|
}
|
|
508
508
|
return this.props.children;
|
|
509
|
-
},
|
|
509
|
+
}, n;
|
|
510
510
|
}(ne.Component);
|
|
511
|
-
function
|
|
512
|
-
return h(
|
|
513
|
-
}
|
|
514
|
-
const
|
|
515
|
-
function
|
|
516
|
-
const [
|
|
517
|
-
return
|
|
518
|
-
if (t) return
|
|
519
|
-
e &&
|
|
511
|
+
function Br({ children: r, onError: e }) {
|
|
512
|
+
return h(Ar, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
|
|
513
|
+
}
|
|
514
|
+
const Ur = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
|
|
515
|
+
function Hr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
|
|
516
|
+
const [n] = T();
|
|
517
|
+
return Ur(() => {
|
|
518
|
+
if (t) return n.registerUpdateListener(({ editorState: a, dirtyElements: o, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
|
|
519
|
+
e && o.size === 0 && s.size === 0 || r && l.has(de) || i.isEmpty() || t(a, n, l);
|
|
520
520
|
});
|
|
521
|
-
}, [
|
|
522
|
-
}
|
|
523
|
-
function
|
|
524
|
-
const [e] =
|
|
525
|
-
return
|
|
526
|
-
if (!e.hasNodes([
|
|
527
|
-
}, [e]),
|
|
528
|
-
if (r) return
|
|
521
|
+
}, [n, r, e, t]), null;
|
|
522
|
+
}
|
|
523
|
+
function jr({ hasStrictIndent: r = !1 }) {
|
|
524
|
+
const [e] = T();
|
|
525
|
+
return S(() => {
|
|
526
|
+
if (!e.hasNodes([Be, Ue])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
|
|
527
|
+
}, [e]), S(() => {
|
|
528
|
+
if (r) return qt(e);
|
|
529
529
|
}, [e, r]), function(t) {
|
|
530
|
-
|
|
530
|
+
S(() => Vt(t), [t]);
|
|
531
531
|
}(e), null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
const [t] =
|
|
535
|
-
return
|
|
536
|
-
if (!t.hasNodes([
|
|
537
|
-
return
|
|
538
|
-
if (
|
|
539
|
-
if (typeof
|
|
533
|
+
function Jr({ validateUrl: r, attributes: e }) {
|
|
534
|
+
const [t] = T();
|
|
535
|
+
return S(() => {
|
|
536
|
+
if (!t.hasNodes([He])) throw new Error("LinkPlugin: LinkNode not registered on editor");
|
|
537
|
+
return H(t.registerCommand(be, (n) => {
|
|
538
|
+
if (n === null) return oe(n), !0;
|
|
539
|
+
if (typeof n == "string") return !(r !== void 0 && !r(n)) && (oe(n, e), !0);
|
|
540
540
|
{
|
|
541
|
-
const { url:
|
|
542
|
-
return oe(
|
|
541
|
+
const { url: a, target: o, rel: s, title: i } = n;
|
|
542
|
+
return oe(a, { ...e, rel: s, target: o, title: i }), !0;
|
|
543
543
|
}
|
|
544
|
-
},
|
|
545
|
-
const
|
|
546
|
-
if (!g(
|
|
547
|
-
const
|
|
548
|
-
return !!r(
|
|
549
|
-
},
|
|
544
|
+
}, ve), r !== void 0 ? t.registerCommand(Fe, (n) => {
|
|
545
|
+
const a = p();
|
|
546
|
+
if (!g(a) || a.isCollapsed() || !z(n, ClipboardEvent) || n.clipboardData === null) return !1;
|
|
547
|
+
const o = n.clipboardData.getData("text");
|
|
548
|
+
return !!r(o) && !a.getNodes().some((s) => W(s)) && (t.dispatchCommand(be, { ...e, url: o }), n.preventDefault(), !0);
|
|
549
|
+
}, ve) : () => {
|
|
550
550
|
});
|
|
551
551
|
}, [t, r, e]), null;
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
const [t] =
|
|
555
|
-
return
|
|
556
|
-
const
|
|
557
|
-
const s =
|
|
558
|
-
if (!
|
|
559
|
-
const
|
|
560
|
-
if (
|
|
553
|
+
function Wr({ newTab: r = !0, disabled: e = !1 }) {
|
|
554
|
+
const [t] = T();
|
|
555
|
+
return S(() => {
|
|
556
|
+
const n = (o) => {
|
|
557
|
+
const s = o.target;
|
|
558
|
+
if (!Oe(s)) return;
|
|
559
|
+
const i = Rt(s);
|
|
560
|
+
if (i === null) return;
|
|
561
561
|
let l = null, u = null;
|
|
562
|
-
if (
|
|
562
|
+
if (i.update(() => {
|
|
563
563
|
const f = te(s);
|
|
564
564
|
if (f !== null) {
|
|
565
|
-
const v =
|
|
566
|
-
if (!e) if (
|
|
565
|
+
const v = fe(f, W);
|
|
566
|
+
if (!e) if (Gt(v)) l = v.sanitizeUrl(v.getURL()), u = v.getTarget();
|
|
567
567
|
else {
|
|
568
568
|
const C = function(w, x) {
|
|
569
569
|
let y = w;
|
|
@@ -572,188 +572,189 @@ function Br({ newTab: r = !0, disabled: e = !1 }) {
|
|
|
572
572
|
y = y.parentNode;
|
|
573
573
|
}
|
|
574
574
|
return null;
|
|
575
|
-
}(s,
|
|
575
|
+
}(s, It);
|
|
576
576
|
C !== null && (l = C.href, u = C.target);
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
}), l === null || l === "") return;
|
|
580
580
|
const c = t.getEditorState().read(p);
|
|
581
|
-
if (g(c) && !c.isCollapsed()) return void
|
|
582
|
-
const d =
|
|
583
|
-
window.open(l, r || d ||
|
|
584
|
-
},
|
|
585
|
-
|
|
581
|
+
if (g(c) && !c.isCollapsed()) return void o.preventDefault();
|
|
582
|
+
const d = o.type === "auxclick" && o.button === 1;
|
|
583
|
+
window.open(l, r || d || o.metaKey || o.ctrlKey || u === "_blank" ? "_blank" : "_self"), o.preventDefault();
|
|
584
|
+
}, a = (o) => {
|
|
585
|
+
o.button === 1 && n(o);
|
|
586
586
|
};
|
|
587
|
-
return t.registerRootListener((
|
|
588
|
-
s !== null && (s.removeEventListener("click",
|
|
587
|
+
return t.registerRootListener((o, s) => {
|
|
588
|
+
s !== null && (s.removeEventListener("click", n), s.removeEventListener("mouseup", a)), o !== null && (o.addEventListener("click", n), o.addEventListener("mouseup", a));
|
|
589
589
|
});
|
|
590
590
|
}, [t, r, e]), null;
|
|
591
591
|
}
|
|
592
|
-
const ee = 0,
|
|
593
|
-
function
|
|
594
|
-
if (r === null || t.size === 0 &&
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
if (!(g(
|
|
598
|
-
const
|
|
592
|
+
const ee = 0, ue = 1, ce = 2, $ = 0, qr = 1, Pe = 2, Vr = 3, Gr = 4;
|
|
593
|
+
function Xr(r, e, t, n, a) {
|
|
594
|
+
if (r === null || t.size === 0 && n.size === 0 && !a) return $;
|
|
595
|
+
const o = e._selection, s = r._selection;
|
|
596
|
+
if (a) return qr;
|
|
597
|
+
if (!(g(o) && g(s) && s.isCollapsed() && o.isCollapsed())) return $;
|
|
598
|
+
const i = function(y, E, _) {
|
|
599
599
|
const N = y._nodeMap, b = [];
|
|
600
600
|
for (const L of E) {
|
|
601
601
|
const k = N.get(L);
|
|
602
602
|
k !== void 0 && b.push(k);
|
|
603
603
|
}
|
|
604
|
-
for (const [L, k] of
|
|
604
|
+
for (const [L, k] of _) {
|
|
605
605
|
if (!k) continue;
|
|
606
606
|
const R = N.get(L);
|
|
607
|
-
R === void 0 ||
|
|
607
|
+
R === void 0 || Ke(R) || b.push(R);
|
|
608
608
|
}
|
|
609
609
|
return b;
|
|
610
|
-
}(e, t,
|
|
611
|
-
if (
|
|
612
|
-
if (
|
|
613
|
-
const y = e._nodeMap, E = y.get(
|
|
614
|
-
return E &&
|
|
610
|
+
}(e, t, n);
|
|
611
|
+
if (i.length === 0) return $;
|
|
612
|
+
if (i.length > 1) {
|
|
613
|
+
const y = e._nodeMap, E = y.get(o.anchor.key), _ = y.get(s.anchor.key);
|
|
614
|
+
return E && _ && !r._nodeMap.has(E.__key) && M(E) && E.__text.length === 1 && o.anchor.offset === 1 ? Pe : $;
|
|
615
615
|
}
|
|
616
|
-
const l =
|
|
616
|
+
const l = i[0], u = r._nodeMap.get(l.__key);
|
|
617
617
|
if (!M(u) || !M(l) || u.__mode !== l.__mode) return $;
|
|
618
618
|
const c = u.__text, d = l.__text;
|
|
619
619
|
if (c === d) return $;
|
|
620
|
-
const f =
|
|
620
|
+
const f = o.anchor, v = s.anchor;
|
|
621
621
|
if (f.key !== v.key || f.type !== "text") return $;
|
|
622
622
|
const C = f.offset, w = v.offset, x = d.length - c.length;
|
|
623
|
-
return x === 1 && w === C - 1 ?
|
|
623
|
+
return x === 1 && w === C - 1 ? Pe : x === -1 && w === C + 1 ? Vr : x === -1 && w === C ? Gr : $;
|
|
624
624
|
}
|
|
625
|
-
function
|
|
626
|
-
let t = Date.now(),
|
|
627
|
-
return (
|
|
625
|
+
function Yr(r, e) {
|
|
626
|
+
let t = Date.now(), n = $;
|
|
627
|
+
return (a, o, s, i, l, u) => {
|
|
628
628
|
const c = Date.now();
|
|
629
|
-
if (u.has(
|
|
630
|
-
const d =
|
|
631
|
-
const v = s === null || s.editor === r, C = u.has(
|
|
632
|
-
if (!C && v && u.has(
|
|
633
|
-
if (
|
|
634
|
-
const w =
|
|
635
|
-
return
|
|
636
|
-
const
|
|
637
|
-
return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !M(
|
|
638
|
-
}(Array.from(
|
|
629
|
+
if (u.has(se)) return n = $, t = c, ce;
|
|
630
|
+
const d = Xr(a, o, i, l, r.isComposing()), f = (() => {
|
|
631
|
+
const v = s === null || s.editor === r, C = u.has(zt);
|
|
632
|
+
if (!C && v && u.has(de)) return ee;
|
|
633
|
+
if (a === null) return ue;
|
|
634
|
+
const w = o._selection;
|
|
635
|
+
return i.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === n && c < t + e && v || i.size === 1 && function(x, y, E) {
|
|
636
|
+
const _ = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, L = E._selection;
|
|
637
|
+
return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !M(_) || !M(N) || _.__parent !== N.__parent) && JSON.stringify(y.read(() => _.exportJSON())) === JSON.stringify(E.read(() => N.exportJSON()));
|
|
638
|
+
}(Array.from(i)[0], a, o) ? ee : ue : w !== null ? ee : ce;
|
|
639
639
|
})();
|
|
640
|
-
return t = c,
|
|
640
|
+
return t = c, n = d, f;
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Te(r) {
|
|
644
644
|
r.undoStack = [], r.redoStack = [], r.current = null;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
const
|
|
648
|
-
return
|
|
649
|
-
const
|
|
646
|
+
function Qr(r, e, t) {
|
|
647
|
+
const n = Yr(r, t);
|
|
648
|
+
return H(r.registerCommand(Kt, () => (function(o, s) {
|
|
649
|
+
const i = s.redoStack, l = s.undoStack;
|
|
650
650
|
if (l.length !== 0) {
|
|
651
651
|
const u = s.current, c = l.pop();
|
|
652
|
-
u !== null && (
|
|
652
|
+
u !== null && (i.push(u), o.dispatchCommand(X, !0)), l.length === 0 && o.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
|
|
653
653
|
}
|
|
654
|
-
}(r, e), !0), m), r.registerCommand(
|
|
655
|
-
const
|
|
656
|
-
if (
|
|
654
|
+
}(r, e), !0), m), r.registerCommand(Ot, () => (function(o, s) {
|
|
655
|
+
const i = s.redoStack, l = s.undoStack;
|
|
656
|
+
if (i.length !== 0) {
|
|
657
657
|
const u = s.current;
|
|
658
|
-
u !== null && (l.push(u),
|
|
659
|
-
const c =
|
|
660
|
-
|
|
658
|
+
u !== null && (l.push(u), o.dispatchCommand(Y, !0));
|
|
659
|
+
const c = i.pop();
|
|
660
|
+
i.length === 0 && o.dispatchCommand(X, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
|
|
661
661
|
}
|
|
662
|
-
}(r, e), !0), m), r.registerCommand(
|
|
662
|
+
}(r, e), !0), m), r.registerCommand(Ft, () => (Te(e), !1), m), r.registerCommand(Mt, () => (Te(e), r.dispatchCommand(X, !1), r.dispatchCommand(Y, !1), !0), m), r.registerUpdateListener(({ editorState: o, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
|
|
663
663
|
const c = e.current, d = e.redoStack, f = e.undoStack, v = c === null ? null : c.editorState;
|
|
664
|
-
if (c !== null &&
|
|
665
|
-
const C =
|
|
666
|
-
if (C ===
|
|
667
|
-
else if (C ===
|
|
668
|
-
e.current = { editor: r, editorState:
|
|
664
|
+
if (c !== null && o === v) return;
|
|
665
|
+
const C = n(s, o, c, i, l, u);
|
|
666
|
+
if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(X, !1)), c !== null && (f.push({ ...c }), r.dispatchCommand(Y, !0));
|
|
667
|
+
else if (C === ce) return;
|
|
668
|
+
e.current = { editor: r, editorState: o };
|
|
669
669
|
}));
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Zr() {
|
|
672
672
|
return { current: null, redoStack: [], undoStack: [] };
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
const [t] =
|
|
676
|
-
return function(
|
|
677
|
-
const s = q(() =>
|
|
678
|
-
|
|
674
|
+
function en({ delay: r, externalHistoryState: e }) {
|
|
675
|
+
const [t] = T();
|
|
676
|
+
return function(n, a, o = 1e3) {
|
|
677
|
+
const s = q(() => a || Zr(), [a]);
|
|
678
|
+
S(() => Qr(n, s, o), [o, n, s]);
|
|
679
679
|
}(t, e, r), null;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
const [
|
|
683
|
-
return
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
681
|
+
function tn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1 }) {
|
|
682
|
+
const [a] = T();
|
|
683
|
+
return S(() => {
|
|
684
|
+
Yt(a) !== n && (Qt(a, n), a.registerNodeTransform(je, () => {
|
|
685
|
+
})());
|
|
686
|
+
}, [a, n]), S(() => Zt(a), [a]), S(() => er(a, t), [a, t]), S(() => {
|
|
687
|
+
if (!r) return tr(a);
|
|
688
|
+
}, [a, r]), S(() => {
|
|
689
|
+
if (!e) return a.registerNodeTransform(Je, (o) => {
|
|
690
|
+
o.getBackgroundColor() !== null && o.setBackgroundColor(null);
|
|
690
691
|
});
|
|
691
|
-
}, [
|
|
692
|
+
}, [a, e, r]), null;
|
|
692
693
|
}
|
|
693
|
-
const
|
|
694
|
+
const Ge = 200, rn = ({
|
|
694
695
|
currentLanguage: r = "NL",
|
|
695
696
|
initialValue: e = "",
|
|
696
697
|
placeholder: t = "",
|
|
697
|
-
label:
|
|
698
|
-
info:
|
|
699
|
-
required:
|
|
698
|
+
label: n = "",
|
|
699
|
+
info: a = "",
|
|
700
|
+
required: o = !1,
|
|
700
701
|
notValidatedText: s = "",
|
|
701
|
-
maxHeightInRem:
|
|
702
|
-
maxWords: l =
|
|
702
|
+
maxHeightInRem: i = "20rem",
|
|
703
|
+
maxWords: l = Ge,
|
|
703
704
|
onChange: u
|
|
704
705
|
}) => {
|
|
705
|
-
const { switchLanguage: c } =
|
|
706
|
+
const { switchLanguage: c } = hr(), d = dr(), [f] = F(() => Ie()), [v, C] = F(0), [w, x] = F(0), y = ze(null), E = {
|
|
706
707
|
html: {
|
|
707
|
-
export:
|
|
708
|
+
export: ir
|
|
708
709
|
},
|
|
709
710
|
namespace: "UvaRte",
|
|
710
711
|
editor: f,
|
|
711
|
-
theme:
|
|
712
|
+
theme: mr,
|
|
712
713
|
onError(b) {
|
|
713
714
|
throw b;
|
|
714
715
|
},
|
|
715
|
-
nodes: [
|
|
716
|
+
nodes: [Be, Ue, He, Xt, Je, rr, je],
|
|
716
717
|
editorState: (b) => {
|
|
717
|
-
const k = new DOMParser().parseFromString(e, "text/html"), R =
|
|
718
|
-
if (
|
|
718
|
+
const k = new DOMParser().parseFromString(e, "text/html"), R = Jt(b, k), O = A();
|
|
719
|
+
if (O.clear(), lr(e))
|
|
719
720
|
R.forEach((B) => {
|
|
720
|
-
|
|
721
|
+
O.append(B);
|
|
721
722
|
});
|
|
722
723
|
else {
|
|
723
|
-
const B =
|
|
724
|
+
const B = Me();
|
|
724
725
|
R.forEach((D, V) => {
|
|
725
|
-
V === 0 ? (B.append(D),
|
|
726
|
+
V === 0 ? (B.append(D), O.append(B)) : O.append(D);
|
|
726
727
|
});
|
|
727
728
|
}
|
|
728
729
|
}
|
|
729
|
-
},
|
|
730
|
+
}, _ = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, L) => {
|
|
730
731
|
b.read(() => {
|
|
731
732
|
let k = "";
|
|
732
|
-
C(
|
|
733
|
+
C(_(A().getTextContent().replace(/\s+/g, " ").trim())), k = ur(Wt(L)), u(k);
|
|
733
734
|
});
|
|
734
735
|
};
|
|
735
|
-
return
|
|
736
|
+
return S(() => {
|
|
736
737
|
c(r.toLocaleLowerCase());
|
|
737
|
-
}, [r, c]),
|
|
738
|
+
}, [r, c]), S(() => {
|
|
738
739
|
const b = e.replace(/<br\s*\/?>| /gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
|
|
739
|
-
C(
|
|
740
|
+
C(_(b));
|
|
740
741
|
}, []), /* @__PURE__ */ K("div", { className: I.editor__container, children: [
|
|
741
742
|
/* @__PURE__ */ K("div", { className: I.editor__header, children: [
|
|
742
|
-
/* @__PURE__ */ h(
|
|
743
|
+
/* @__PURE__ */ h(pr, { label: n, info: a, required: o }),
|
|
743
744
|
/* @__PURE__ */ K("div", { className: I["editor__header-word-count"], children: [
|
|
744
|
-
/* @__PURE__ */ h("span", { className:
|
|
745
|
+
/* @__PURE__ */ h("span", { className: sr({ [I["editor__header-word-count--alert"]]: v > l }), children: v }),
|
|
745
746
|
" / ",
|
|
746
747
|
l
|
|
747
748
|
] })
|
|
748
749
|
] }),
|
|
749
|
-
/* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ K(
|
|
750
|
-
/* @__PURE__ */ h(
|
|
750
|
+
/* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ K(yr, { initialConfig: E, children: [
|
|
751
|
+
/* @__PURE__ */ h(cr, { editorScrollPosition: w }),
|
|
751
752
|
/* @__PURE__ */ K("div", { className: I["editor__field-wrapper"], children: [
|
|
752
753
|
/* @__PURE__ */ h(
|
|
753
|
-
|
|
754
|
+
Rr,
|
|
754
755
|
{
|
|
755
756
|
contentEditable: /* @__PURE__ */ h(
|
|
756
|
-
|
|
757
|
+
Or,
|
|
757
758
|
{
|
|
758
759
|
className: I.editor__field,
|
|
759
760
|
"aria-label": d.common.rteAriaLabel,
|
|
@@ -762,53 +763,53 @@ const Je = 200, Yr = ({
|
|
|
762
763
|
placeholder: /* @__PURE__ */ h("div", { className: I.editor__placeholder, children: t }),
|
|
763
764
|
spellCheck: !1,
|
|
764
765
|
id: "rteEditor",
|
|
765
|
-
style: { height: `${
|
|
766
|
+
style: { height: `${i}`, maxHeight: `${i}` },
|
|
766
767
|
onScroll: (b) => x(b.currentTarget.scrollTop),
|
|
767
768
|
ref: y
|
|
768
769
|
}
|
|
769
770
|
),
|
|
770
771
|
placeholder: /* @__PURE__ */ h("div", { className: I.editor__placeholder, children: t }),
|
|
771
|
-
ErrorBoundary:
|
|
772
|
+
ErrorBoundary: Br
|
|
772
773
|
}
|
|
773
774
|
),
|
|
774
|
-
/* @__PURE__ */ h(
|
|
775
|
-
/* @__PURE__ */ h(
|
|
776
|
-
/* @__PURE__ */ h(
|
|
777
|
-
/* @__PURE__ */ h(
|
|
778
|
-
/* @__PURE__ */ h(
|
|
779
|
-
/* @__PURE__ */ h(
|
|
780
|
-
/* @__PURE__ */ h(
|
|
781
|
-
/* @__PURE__ */ h(
|
|
775
|
+
/* @__PURE__ */ h(tn, {}),
|
|
776
|
+
/* @__PURE__ */ h(en, {}),
|
|
777
|
+
/* @__PURE__ */ h(jr, {}),
|
|
778
|
+
/* @__PURE__ */ h(Jr, { validateUrl: nr }),
|
|
779
|
+
/* @__PURE__ */ h(or, { matchers: ar }),
|
|
780
|
+
/* @__PURE__ */ h(Wr, {}),
|
|
781
|
+
/* @__PURE__ */ h(Hr, { onChange: N }),
|
|
782
|
+
/* @__PURE__ */ h(vr, {})
|
|
782
783
|
] })
|
|
783
784
|
] }) }),
|
|
784
|
-
s !== "" && /* @__PURE__ */ h(
|
|
785
|
+
s !== "" && /* @__PURE__ */ h(fr, { level: "error", feedback: s })
|
|
785
786
|
] });
|
|
786
|
-
},
|
|
787
|
+
}, Wn = ({
|
|
787
788
|
currentLanguage: r = "NL",
|
|
788
789
|
initialValue: e = "",
|
|
789
790
|
placeholder: t = "",
|
|
790
|
-
label:
|
|
791
|
-
info:
|
|
792
|
-
required:
|
|
791
|
+
label: n = "",
|
|
792
|
+
info: a = "",
|
|
793
|
+
required: o = !1,
|
|
793
794
|
notValidatedText: s = "",
|
|
794
|
-
maxWords:
|
|
795
|
+
maxWords: i = Ge,
|
|
795
796
|
onChange: l
|
|
796
|
-
}) => /* @__PURE__ */ h(
|
|
797
|
-
|
|
797
|
+
}) => /* @__PURE__ */ h(gr, { children: /* @__PURE__ */ h(
|
|
798
|
+
rn,
|
|
798
799
|
{
|
|
799
800
|
currentLanguage: r,
|
|
800
801
|
initialValue: e,
|
|
801
802
|
placeholder: t,
|
|
802
|
-
label:
|
|
803
|
-
info:
|
|
804
|
-
required:
|
|
803
|
+
label: n,
|
|
804
|
+
info: a,
|
|
805
|
+
required: o,
|
|
805
806
|
notValidatedText: s,
|
|
806
|
-
maxWords:
|
|
807
|
+
maxWords: i,
|
|
807
808
|
onChange: l
|
|
808
809
|
}
|
|
809
810
|
) });
|
|
810
811
|
export {
|
|
811
|
-
|
|
812
|
-
|
|
812
|
+
rn as Rte,
|
|
813
|
+
Wn as RteEditor
|
|
813
814
|
};
|
|
814
815
|
//# sourceMappingURL=RteEditor.js.map
|