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