@uva-glass/component-library 3.42.2 → 3.42.3
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-C1B_JvcI.js → Lexical.prod-qYl_ifJ6.js} +221 -221
- package/dist/Lexical.prod-qYl_ifJ6.js.map +1 -0
- package/dist/{LexicalClipboard.prod-Dd64YQH0.js → LexicalClipboard.prod-DIGbXq4v.js} +25 -25
- package/dist/{LexicalClipboard.prod-Dd64YQH0.js.map → LexicalClipboard.prod-DIGbXq4v.js.map} +1 -1
- package/dist/{LexicalComposerContext.prod-DLlRM5wP.js → LexicalComposerContext.prod-DOyoZx0P.js} +3 -3
- package/dist/{LexicalComposerContext.prod-DLlRM5wP.js.map → LexicalComposerContext.prod-DOyoZx0P.js.map} +1 -1
- package/dist/{LexicalLink.prod-ldhpNY9X.js → LexicalLink.prod-ZZwC5ABn.js} +14 -14
- package/dist/{LexicalLink.prod-ldhpNY9X.js.map → LexicalLink.prod-ZZwC5ABn.js.map} +1 -1
- package/dist/{LexicalList.prod-7DmvPZ_J.js → LexicalList.prod-UurCu6DK.js} +30 -30
- package/dist/{LexicalList.prod-7DmvPZ_J.js.map → LexicalList.prod-UurCu6DK.js.map} +1 -1
- package/dist/{LexicalSelection.prod-Dmiwka3x.js → LexicalSelection.prod-DXruZeFN.js} +2 -2
- package/dist/{LexicalSelection.prod-Dmiwka3x.js.map → LexicalSelection.prod-DXruZeFN.js.map} +1 -1
- package/dist/{LexicalTable.prod-iqHmKv_G.js → LexicalTable.prod-COFf1Spn.js} +115 -115
- package/dist/{LexicalTable.prod-iqHmKv_G.js.map → LexicalTable.prod-COFf1Spn.js.map} +1 -1
- package/dist/{LexicalUtils.prod-w0fZ_Z8S.js → LexicalUtils.prod-C3To3vrm.js} +5 -5
- package/dist/{LexicalUtils.prod-w0fZ_Z8S.js.map → LexicalUtils.prod-C3To3vrm.js.map} +1 -1
- package/dist/SortableProvider-l8-7ClBJ.js.map +1 -1
- package/dist/TableCellResizerPlugin-B9MT1fxA.js +248 -0
- package/dist/TableCellResizerPlugin-B9MT1fxA.js.map +1 -0
- package/dist/{TablePlugin-cMMBdz-x.js → TablePlugin-FQQwnq2m.js} +7 -7
- package/dist/{TablePlugin-cMMBdz-x.js.map → TablePlugin-FQQwnq2m.js.map} +1 -1
- package/dist/{client-BIzWgcD3.js → client-BK9NlSVR.js} +13 -13
- package/dist/{client-BIzWgcD3.js.map → client-BK9NlSVR.js.map} +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Card/Card.test.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +3 -3
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
- package/dist/components/FormInput/FormInput.js +2 -2
- package/dist/components/FormInput/FormInput.js.map +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +3 -3
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
- 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/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/Notification/Notification.js.map +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/Periods/Periods.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +7 -6
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.d.ts +2 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +39 -29
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.js +149 -149
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +13 -14
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +4 -4
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/Sortable/sortableReducer.js.map +1 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/hooks/useDebounce.js +2 -2
- package/dist/components/hooks/useDebounce.js.map +1 -1
- package/dist/components/hooks/useOnClickOutside.js.map +1 -1
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-BO6Gg9y6.js → helpers-D3SODeVc.js} +19 -19
- package/dist/{helpers-BO6Gg9y6.js.map → helpers-D3SODeVc.js.map} +1 -1
- package/dist/{index-BwBhYsdx.js → index-B32mP_-H.js} +2219 -2342
- package/dist/index-B32mP_-H.js.map +1 -0
- package/dist/{index-B7xrLR5N.js → index-BVrrnUn0.js} +16 -16
- package/dist/{index-B7xrLR5N.js.map → index-BVrrnUn0.js.map} +1 -1
- package/dist/{index-BYGu3RV5.js → index-BamlKH-k.js} +43 -43
- package/dist/{index-BYGu3RV5.js.map → index-BamlKH-k.js.map} +1 -1
- package/dist/{index-BeAF9HWV.js → index-iImjiPdB.js} +16 -16
- package/dist/{index-BeAF9HWV.js.map → index-iImjiPdB.js.map} +1 -1
- package/dist/{index-nrPtQ1dv.js → index-yEhaxKq-.js} +3 -3
- package/dist/{index-nrPtQ1dv.js.map → index-yEhaxKq-.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-CbXtwYTX.js → react-18-DXfB7ZX7.js} +2 -2
- package/dist/{react-18-CbXtwYTX.js.map → react-18-DXfB7ZX7.js.map} +1 -1
- package/dist/{react.esm-CJKnSGEF.js → react.esm-WLX_DeH0.js} +19 -19
- package/dist/react.esm-WLX_DeH0.js.map +1 -0
- package/dist/setupTests.js +1 -1
- package/dist/setupTests.js.map +1 -1
- package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +1 -1
- package/dist/storybook__react.d.js +13 -13
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-utils-ea_YDVtd.js → test-utils-BP59mSnn.js} +3 -3
- package/dist/{test-utils-ea_YDVtd.js.map → test-utils-BP59mSnn.js.map} +1 -1
- package/package.json +1 -1
- package/dist/Lexical.prod-C1B_JvcI.js.map +0 -1
- package/dist/TableCellResizerPlugin-Bao8R6Lv.js +0 -241
- package/dist/TableCellResizerPlugin-Bao8R6Lv.js.map +0 -1
- package/dist/index-BwBhYsdx.js.map +0 -1
- package/dist/react.esm-CJKnSGEF.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as h, jsxs as z, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
-
import { t as Ge, r as Ye, o as I } from "../../LexicalComposerContext.prod-
|
|
3
|
-
import { aK as Me, ah as F, B as Ie, P as p, aL as de, ao as H, x as j, W as Ve, s as M, _ as g, a0 as Ze, J as m, aM as Qe, af as Oe, d as et, t as Ke, aN as tt, aO as rt, R as nt, y as T, aG as ot, aP as at, aQ as st, aR as it, T as ee, aS as lt, aT as ut, a5 as ct, E as dt, M as ft, K as mt, aU as pt, aV as me, a as pe, N as gt, H as re, L as ht, a6 as ze, aW as ge, z as vt, w as Ct, u as yt, aX as he, D as Et, aY as wt, aZ as bt, a_ as _t, aF as St, Y as kt, X as xt, a$ as Nt, Z as Dt, G as Lt, C as $t, p as Tt, $ as ve, b0 as Pt, c as Rt, au as G, at as Y, b1 as Mt, b2 as It, aw as Ot, b3 as se, av as Kt, b4 as zt } from "../../Lexical.prod-
|
|
2
|
+
import { t as Ge, r as Ye, o as I } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
3
|
+
import { aK as Me, ah as F, B as Ie, P as p, aL as de, ao as H, x as j, W as Ve, s as M, _ as g, a0 as Ze, J as m, aM as Qe, af as Oe, d as et, t as Ke, aN as tt, aO as rt, R as nt, y as T, aG as ot, aP as at, aQ as st, aR as it, T as ee, aS as lt, aT as ut, a5 as ct, E as dt, M as ft, K as mt, aU as pt, aV as me, a as pe, N as gt, H as re, L as ht, a6 as ze, aW as ge, z as vt, w as Ct, u as yt, aX as he, D as Et, aY as wt, aZ as bt, a_ as _t, aF as St, Y as kt, X as xt, a$ as Nt, Z as Dt, G as Lt, C as $t, p as Tt, $ as ve, b0 as Pt, c as Rt, au as G, at as Y, b1 as Mt, b2 as It, aw as Ot, b3 as se, av as Kt, b4 as zt } from "../../Lexical.prod-qYl_ifJ6.js";
|
|
4
4
|
import * as ne from "react";
|
|
5
5
|
import { useMemo as te, useLayoutEffect as J, useEffect as k, useState as O, Suspense as At, forwardRef as Ae, useCallback as Ft, useRef as Bt } from "react";
|
|
6
|
-
import { a as Ut, T as Wt } from "../../TableCellResizerPlugin-
|
|
7
|
-
import { j as U, L as A, y as Ht, w as fe } from "../../LexicalUtils.prod-
|
|
6
|
+
import { a as Ut, T as Wt } from "../../TableCellResizerPlugin-B9MT1fxA.js";
|
|
7
|
+
import { j as U, L as A, y as Ht, w as fe } from "../../LexicalUtils.prod-C3To3vrm.js";
|
|
8
8
|
import { flushSync as jt, createPortal as Jt } from "react-dom";
|
|
9
|
-
import { A as Ce, F as ye, m as Xt, g as qt } from "../../LexicalClipboard.prod-
|
|
10
|
-
import { X as Ee, J as we } from "../../LexicalSelection.prod-
|
|
11
|
-
import { r as Fe, Y as Be, v as Gt, S as Yt } from "../../LexicalList.prod-
|
|
12
|
-
import { g as Ue, k as be, v as oe, p as Vt, m as Zt } from "../../LexicalLink.prod-
|
|
13
|
-
import { s as Qt, d as er,
|
|
14
|
-
import { a as ar, w as sr, M as ir } from "../../helpers-
|
|
9
|
+
import { A as Ce, F as ye, m as Xt, g as qt } from "../../LexicalClipboard.prod-DIGbXq4v.js";
|
|
10
|
+
import { X as Ee, J as we } from "../../LexicalSelection.prod-DXruZeFN.js";
|
|
11
|
+
import { r as Fe, Y as Be, v as Gt, S as Yt } from "../../LexicalList.prod-UurCu6DK.js";
|
|
12
|
+
import { g as Ue, k as be, v as oe, p as Vt, m as Zt } from "../../LexicalLink.prod-ZZwC5ABn.js";
|
|
13
|
+
import { s as Qt, d as er, b as We, e as tr, w as rr, S as nr, y as He, O as or } from "../../LexicalTable.prod-COFf1Spn.js";
|
|
14
|
+
import { a as ar, w as sr, M as ir } from "../../helpers-D3SODeVc.js";
|
|
15
15
|
import { c as lr } from "../../clsx-OuTLNxxd.js";
|
|
16
16
|
import { exportMap as ur, isStartingWithHtmlTag as cr, mergeBoldStrongTags as dr, cleanUpTable as fr } from "./helpers.js";
|
|
17
17
|
import { s as R } from "../../RteEditor.module-dE9wQTC9.js";
|
|
18
18
|
import { ToolBarPlugin as mr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
|
|
19
19
|
import { useTranslation as pr } from "./hooks/useTranslation.js";
|
|
20
|
-
import "../../TablePlugin-
|
|
20
|
+
import "../../TablePlugin-FQQwnq2m.js";
|
|
21
21
|
import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
22
|
import "./hooks/components/Flyout.js";
|
|
23
23
|
import "../Accordion/Accordion.js";
|
|
@@ -46,11 +46,11 @@ import { LanguageProvider as yr, useLanguage as Er } from "./Providers/LanguageP
|
|
|
46
46
|
import { TableWrapperNode as wr } from "./nodes/TableWrapperNode/TableWrapperNode.js";
|
|
47
47
|
const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, br = je ? J : k, V = { tag: de };
|
|
48
48
|
function _r({ initialConfig: r, children: e }) {
|
|
49
|
-
const t = te(() => {
|
|
49
|
+
const t = te((() => {
|
|
50
50
|
const { theme: o, namespace: a, nodes: n, onError: s, editorState: i, html: l } = r, c = Ge(null, o), u = Me({ editable: r.editable, html: l, namespace: a, nodes: n, onError: (d) => s(d, u), theme: o });
|
|
51
|
-
return function(d, f) {
|
|
51
|
+
return (function(d, f) {
|
|
52
52
|
if (f !== null) {
|
|
53
|
-
if (f === void 0) d.update(() => {
|
|
53
|
+
if (f === void 0) d.update((() => {
|
|
54
54
|
const v = F();
|
|
55
55
|
if (v.isEmpty()) {
|
|
56
56
|
const C = Ie();
|
|
@@ -58,7 +58,7 @@ function _r({ initialConfig: r, children: e }) {
|
|
|
58
58
|
const w = je ? document.activeElement : null;
|
|
59
59
|
(p() !== null || w !== null && w === d.getRootElement()) && C.select();
|
|
60
60
|
}
|
|
61
|
-
}, V);
|
|
61
|
+
}), V);
|
|
62
62
|
else if (f !== null) switch (typeof f) {
|
|
63
63
|
case "string": {
|
|
64
64
|
const v = d.parseEditorState(f);
|
|
@@ -69,17 +69,17 @@ function _r({ initialConfig: r, children: e }) {
|
|
|
69
69
|
d.setEditorState(f, V);
|
|
70
70
|
break;
|
|
71
71
|
case "function":
|
|
72
|
-
d.update(() => {
|
|
72
|
+
d.update((() => {
|
|
73
73
|
F().isEmpty() && f(d);
|
|
74
|
-
}, V);
|
|
74
|
+
}), V);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
}(u, i), [u, c];
|
|
78
|
-
}, []);
|
|
79
|
-
return br(() => {
|
|
77
|
+
})(u, i), [u, c];
|
|
78
|
+
}), []);
|
|
79
|
+
return br((() => {
|
|
80
80
|
const o = r.editable, [a] = t;
|
|
81
81
|
a.setEditable(o === void 0 || o);
|
|
82
|
-
}, []), h(Ye.Provider, { value: t, children: e });
|
|
82
|
+
}), []), h(Ye.Provider, { value: t, children: e });
|
|
83
83
|
}
|
|
84
84
|
function Sr() {
|
|
85
85
|
return F().getTextContent();
|
|
@@ -129,7 +129,7 @@ function Nr(r) {
|
|
|
129
129
|
const l = i.args;
|
|
130
130
|
if (l) {
|
|
131
131
|
const [c, u, d, f, v, C] = l;
|
|
132
|
-
r.update(() => {
|
|
132
|
+
r.update((() => {
|
|
133
133
|
const w = p();
|
|
134
134
|
if (g(w)) {
|
|
135
135
|
const x = w.anchor;
|
|
@@ -141,7 +141,7 @@ function Nr(r) {
|
|
|
141
141
|
}
|
|
142
142
|
o.stopImmediatePropagation();
|
|
143
143
|
}
|
|
144
|
-
});
|
|
144
|
+
}));
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -176,7 +176,7 @@ function xe(r) {
|
|
|
176
176
|
for (let a = 0; a < o.length; a++) {
|
|
177
177
|
const n = o[a], s = n.getKey();
|
|
178
178
|
if (t.has(s)) continue;
|
|
179
|
-
const i = fe(n, (c) => j(c) && !c.isInline());
|
|
179
|
+
const i = fe(n, ((c) => j(c) && !c.isInline()));
|
|
180
180
|
if (i === null) continue;
|
|
181
181
|
const l = i.getKey();
|
|
182
182
|
i.canIndent() && !t.has(l) && (t.add(l), r(i));
|
|
@@ -191,19 +191,19 @@ function ae(r) {
|
|
|
191
191
|
for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
|
|
192
192
|
}
|
|
193
193
|
function Rr(r) {
|
|
194
|
-
return U(r.registerCommand(Tt, (e) => {
|
|
194
|
+
return U(r.registerCommand(Tt, ((e) => {
|
|
195
195
|
const t = p();
|
|
196
196
|
return !!T(t) && (t.clear(), !0);
|
|
197
|
-
}, m), r.registerCommand(re, (e) => {
|
|
197
|
+
}), m), r.registerCommand(re, ((e) => {
|
|
198
198
|
const t = p();
|
|
199
199
|
return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
|
|
200
|
-
}, m), r.registerCommand($t, (e) => {
|
|
200
|
+
}), m), r.registerCommand($t, ((e) => {
|
|
201
201
|
const t = p();
|
|
202
202
|
return !!g(t) && (t.deleteWord(e), !0);
|
|
203
|
-
}, m), r.registerCommand(Lt, (e) => {
|
|
203
|
+
}), m), r.registerCommand(Lt, ((e) => {
|
|
204
204
|
const t = p();
|
|
205
205
|
return !!g(t) && (t.deleteLine(e), !0);
|
|
206
|
-
}, m), r.registerCommand(Dt, (e) => {
|
|
206
|
+
}), m), r.registerCommand(Dt, ((e) => {
|
|
207
207
|
const t = p();
|
|
208
208
|
if (typeof e == "string") t !== null && t.insertText(e);
|
|
209
209
|
else {
|
|
@@ -216,34 +216,34 @@ function Rr(r) {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
return !0;
|
|
219
|
-
}, m), r.registerCommand(Nt, () => {
|
|
219
|
+
}), m), r.registerCommand(Nt, (() => {
|
|
220
220
|
const e = p();
|
|
221
221
|
return !!g(e) && (e.removeText(), !0);
|
|
222
|
-
}, m), r.registerCommand(xt, (e) => {
|
|
222
|
+
}), m), r.registerCommand(xt, ((e) => {
|
|
223
223
|
const t = p();
|
|
224
224
|
return !!g(t) && (t.formatText(e), !0);
|
|
225
|
-
}, m), r.registerCommand(kt, (e) => {
|
|
225
|
+
}), m), r.registerCommand(kt, ((e) => {
|
|
226
226
|
const t = p();
|
|
227
227
|
if (!g(t) && !T(t)) return !1;
|
|
228
228
|
const o = t.getNodes();
|
|
229
229
|
for (const a of o) {
|
|
230
|
-
const n = fe(a, (s) => j(s) && !s.isInline());
|
|
230
|
+
const n = fe(a, ((s) => j(s) && !s.isInline()));
|
|
231
231
|
n !== null && n.setFormat(e);
|
|
232
232
|
}
|
|
233
233
|
return !0;
|
|
234
|
-
}, m), r.registerCommand(me, (e) => {
|
|
234
|
+
}), m), r.registerCommand(me, ((e) => {
|
|
235
235
|
const t = p();
|
|
236
236
|
return !!g(t) && (t.insertLineBreak(e), !0);
|
|
237
|
-
}, m), r.registerCommand(pe, () => {
|
|
237
|
+
}), m), r.registerCommand(pe, (() => {
|
|
238
238
|
const e = p();
|
|
239
239
|
return !!g(e) && (e.insertParagraph(), !0);
|
|
240
|
-
}, m), r.registerCommand(bt, () => (_t([St()]), !0), m), r.registerCommand(wt, () => xe((e) => {
|
|
240
|
+
}), m), r.registerCommand(bt, (() => (_t([St()]), !0)), m), r.registerCommand(wt, (() => xe(((e) => {
|
|
241
241
|
const t = e.getIndent();
|
|
242
242
|
e.setIndent(t + 1);
|
|
243
|
-
}), m), r.registerCommand(ge, () => xe((e) => {
|
|
243
|
+
}))), m), r.registerCommand(ge, (() => xe(((e) => {
|
|
244
244
|
const t = e.getIndent();
|
|
245
245
|
t > 0 && e.setIndent(Math.max(0, t - 1));
|
|
246
|
-
}), m), r.registerCommand(Et, (e) => {
|
|
246
|
+
}))), m), r.registerCommand(Et, ((e) => {
|
|
247
247
|
const t = p();
|
|
248
248
|
if (T(t)) {
|
|
249
249
|
const o = t.getNodes();
|
|
@@ -253,21 +253,21 @@ function Rr(r) {
|
|
|
253
253
|
if (!e.shiftKey && H(o) && !o.isIsolated() && !o.isInline()) return o.selectPrevious(), e.preventDefault(), !0;
|
|
254
254
|
}
|
|
255
255
|
return !1;
|
|
256
|
-
}, m), r.registerCommand(yt, (e) => {
|
|
256
|
+
}), m), r.registerCommand(yt, ((e) => {
|
|
257
257
|
const t = p();
|
|
258
258
|
if (T(t)) {
|
|
259
259
|
const o = t.getNodes();
|
|
260
260
|
if (o.length > 0) return o[0].selectNext(0, 0), !0;
|
|
261
261
|
} else if (g(t)) {
|
|
262
|
-
if (function(a) {
|
|
262
|
+
if ((function(a) {
|
|
263
263
|
const n = a.focus;
|
|
264
264
|
return n.key === "root" && n.offset === F().getChildrenSize();
|
|
265
|
-
}(t)) return e.preventDefault(), !0;
|
|
265
|
+
})(t)) return e.preventDefault(), !0;
|
|
266
266
|
const o = he(t.focus, !1);
|
|
267
267
|
if (!e.shiftKey && H(o) && !o.isIsolated() && !o.isInline()) return o.selectNext(), e.preventDefault(), !0;
|
|
268
268
|
}
|
|
269
269
|
return !1;
|
|
270
|
-
}, m), r.registerCommand(Ct, (e) => {
|
|
270
|
+
}), m), r.registerCommand(Ct, ((e) => {
|
|
271
271
|
const t = p();
|
|
272
272
|
if (T(t)) {
|
|
273
273
|
const o = t.getNodes();
|
|
@@ -279,7 +279,7 @@ function Rr(r) {
|
|
|
279
279
|
return e.preventDefault(), we(t, o, !0), !0;
|
|
280
280
|
}
|
|
281
281
|
return !1;
|
|
282
|
-
}, m), r.registerCommand(vt, (e) => {
|
|
282
|
+
}), m), r.registerCommand(vt, ((e) => {
|
|
283
283
|
const t = p();
|
|
284
284
|
if (T(t)) {
|
|
285
285
|
const a = t.getNodes();
|
|
@@ -288,11 +288,11 @@ function Rr(r) {
|
|
|
288
288
|
if (!g(t)) return !1;
|
|
289
289
|
const o = e.shiftKey;
|
|
290
290
|
return !!Ee(t, !1) && (e.preventDefault(), we(t, o, !1), !0);
|
|
291
|
-
}, m), r.registerCommand(ht, (e) => {
|
|
291
|
+
}), m), r.registerCommand(ht, ((e) => {
|
|
292
292
|
if (Ne(e.target)) return !1;
|
|
293
293
|
const t = p();
|
|
294
294
|
if (g(t)) {
|
|
295
|
-
if (function(o) {
|
|
295
|
+
if ((function(o) {
|
|
296
296
|
if (!o.isCollapsed()) return !1;
|
|
297
297
|
const { anchor: a } = o;
|
|
298
298
|
if (a.offset !== 0) return !1;
|
|
@@ -300,15 +300,15 @@ function Rr(r) {
|
|
|
300
300
|
if (ze(n)) return !1;
|
|
301
301
|
const s = Ht(n);
|
|
302
302
|
return s.getIndent() > 0 && (s.is(n) || n.is(s.getFirstDescendant()));
|
|
303
|
-
}(t)) return e.preventDefault(), r.dispatchCommand(ge, void 0);
|
|
303
|
+
})(t)) return e.preventDefault(), r.dispatchCommand(ge, void 0);
|
|
304
304
|
if (Se && navigator.language === "ko-KR") return !1;
|
|
305
305
|
} else if (!T(t)) return !1;
|
|
306
306
|
return e.preventDefault(), r.dispatchCommand(re, !0);
|
|
307
|
-
}, m), r.registerCommand(gt, (e) => {
|
|
307
|
+
}), m), r.registerCommand(gt, ((e) => {
|
|
308
308
|
if (Ne(e.target)) return !1;
|
|
309
309
|
const t = p();
|
|
310
310
|
return !(!g(t) && !T(t)) && (e.preventDefault(), r.dispatchCommand(re, !1));
|
|
311
|
-
}, m), r.registerCommand(pt, (e) => {
|
|
311
|
+
}), m), r.registerCommand(pt, ((e) => {
|
|
312
312
|
const t = p();
|
|
313
313
|
if (!g(t)) return !1;
|
|
314
314
|
if (ae(t), e !== null) {
|
|
@@ -316,10 +316,10 @@ function Rr(r) {
|
|
|
316
316
|
if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(me, !1);
|
|
317
317
|
}
|
|
318
318
|
return r.dispatchCommand(pe, void 0);
|
|
319
|
-
}, m), r.registerCommand(mt, () => {
|
|
319
|
+
}), m), r.registerCommand(mt, (() => {
|
|
320
320
|
const e = p();
|
|
321
321
|
return !!g(e) && (r.blur(), !0);
|
|
322
|
-
}, m), r.registerCommand(ut, (e) => {
|
|
322
|
+
}), m), r.registerCommand(ut, ((e) => {
|
|
323
323
|
const [, t] = Z(e);
|
|
324
324
|
if (t.length > 0) {
|
|
325
325
|
const a = _e(e.clientX, e.clientY);
|
|
@@ -341,10 +341,10 @@ function Rr(r) {
|
|
|
341
341
|
}
|
|
342
342
|
const o = p();
|
|
343
343
|
return !!g(o);
|
|
344
|
-
}, m), r.registerCommand(lt, (e) => {
|
|
344
|
+
}), m), r.registerCommand(lt, ((e) => {
|
|
345
345
|
const [t] = Z(e), o = p();
|
|
346
346
|
return !(t && !g(o));
|
|
347
|
-
}, m), r.registerCommand(it, (e) => {
|
|
347
|
+
}), m), r.registerCommand(it, ((e) => {
|
|
348
348
|
const [t] = Z(e), o = p();
|
|
349
349
|
if (t && !g(o)) return !1;
|
|
350
350
|
const a = _e(e.clientX, e.clientY);
|
|
@@ -353,84 +353,84 @@ function Rr(r) {
|
|
|
353
353
|
H(n) && e.preventDefault();
|
|
354
354
|
}
|
|
355
355
|
return !0;
|
|
356
|
-
}, m), r.registerCommand(at, () => (st(), !0), m), r.registerCommand(ot, (e) => (ye(r, A(e, ClipboardEvent) ? e : null), !0), m), r.registerCommand(nt, (e) => (async function(t, o) {
|
|
357
|
-
await ye(o, A(t, ClipboardEvent) ? t : null), o.update(() => {
|
|
356
|
+
}), m), r.registerCommand(at, (() => (st(), !0)), m), r.registerCommand(ot, ((e) => (ye(r, A(e, ClipboardEvent) ? e : null), !0)), m), r.registerCommand(nt, ((e) => ((async function(t, o) {
|
|
357
|
+
await ye(o, A(t, ClipboardEvent) ? t : null), o.update((() => {
|
|
358
358
|
const a = p();
|
|
359
|
-
g(a) ? a.removeText() : T(a) && a.getNodes().forEach((n) => n.remove());
|
|
360
|
-
});
|
|
361
|
-
}(e, r), !0), m), r.registerCommand(Oe, (e) => {
|
|
359
|
+
g(a) ? a.removeText() : T(a) && a.getNodes().forEach(((n) => n.remove()));
|
|
360
|
+
}));
|
|
361
|
+
})(e, r), !0)), m), r.registerCommand(Oe, ((e) => {
|
|
362
362
|
const [, t, o] = Z(e);
|
|
363
|
-
return t.length > 0 && !o ? (r.dispatchCommand(ke, t), !0) : Ke(e.target) && tt(e.target) ? !1 : p() !== null && (function(a, n) {
|
|
364
|
-
a.preventDefault(), n.update(() => {
|
|
363
|
+
return t.length > 0 && !o ? (r.dispatchCommand(ke, t), !0) : Ke(e.target) && tt(e.target) ? !1 : p() !== null && ((function(a, n) {
|
|
364
|
+
a.preventDefault(), n.update((() => {
|
|
365
365
|
const s = p(), i = A(a, InputEvent) || A(a, KeyboardEvent) ? null : a.clipboardData;
|
|
366
366
|
i != null && s !== null && Ce(i, s, n);
|
|
367
|
-
}, { tag: rt });
|
|
368
|
-
}(e, r), !0);
|
|
369
|
-
}, m), r.registerCommand(Qe, (e) => {
|
|
367
|
+
}), { tag: rt });
|
|
368
|
+
})(e, r), !0);
|
|
369
|
+
}), m), r.registerCommand(Qe, ((e) => {
|
|
370
370
|
const t = p();
|
|
371
371
|
return g(t) && ae(t), !1;
|
|
372
|
-
}, m), r.registerCommand(Ze, (e) => {
|
|
372
|
+
}), m), r.registerCommand(Ze, ((e) => {
|
|
373
373
|
const t = p();
|
|
374
374
|
return g(t) && ae(t), !1;
|
|
375
|
-
}, m));
|
|
375
|
+
}), m));
|
|
376
376
|
}
|
|
377
377
|
const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : k;
|
|
378
378
|
function De(r) {
|
|
379
379
|
return r.getEditorState().read(Je(r.isComposing()));
|
|
380
380
|
}
|
|
381
381
|
function Mr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
|
|
382
|
-
const [o] = I(), a = function(n, s) {
|
|
383
|
-
const [i, l] = O(() => n.getDecorators());
|
|
384
|
-
return ie(() => n.registerDecoratorListener((c) => {
|
|
385
|
-
jt(() => {
|
|
382
|
+
const [o] = I(), a = (function(n, s) {
|
|
383
|
+
const [i, l] = O((() => n.getDecorators()));
|
|
384
|
+
return ie((() => n.registerDecoratorListener(((c) => {
|
|
385
|
+
jt((() => {
|
|
386
386
|
l(c);
|
|
387
|
-
});
|
|
388
|
-
}), [n]), k(() => {
|
|
387
|
+
}));
|
|
388
|
+
}))), [n]), k((() => {
|
|
389
389
|
l(n.getDecorators());
|
|
390
|
-
}, [n]), te(() => {
|
|
390
|
+
}), [n]), te((() => {
|
|
391
391
|
const c = [], u = Object.keys(i);
|
|
392
392
|
for (let d = 0; d < u.length; d++) {
|
|
393
393
|
const f = u[d], v = h(s, { onError: (w) => n._onError(w), children: h(At, { fallback: null, children: i[f] }) }), C = n.getElementByKey(f);
|
|
394
394
|
C !== null && c.push(Jt(v, C, f));
|
|
395
395
|
}
|
|
396
396
|
return c;
|
|
397
|
-
}, [s, i, n]);
|
|
398
|
-
}(o, t);
|
|
399
|
-
return function(n) {
|
|
400
|
-
ie(() => U(Rr(n), Nr(n)), [n]);
|
|
401
|
-
}(o), z(Re, { children: [r, h(Ir, { content: e }), a] });
|
|
397
|
+
}), [s, i, n]);
|
|
398
|
+
})(o, t);
|
|
399
|
+
return (function(n) {
|
|
400
|
+
ie((() => U(Rr(n), Nr(n))), [n]);
|
|
401
|
+
})(o), z(Re, { children: [r, h(Ir, { content: e }), a] });
|
|
402
402
|
}
|
|
403
403
|
function Ir({ content: r }) {
|
|
404
|
-
const [e] = I(), t = function(a) {
|
|
405
|
-
const [n, s] = O(() => De(a));
|
|
406
|
-
return ie(() => {
|
|
404
|
+
const [e] = I(), t = (function(a) {
|
|
405
|
+
const [n, s] = O((() => De(a)));
|
|
406
|
+
return ie((() => {
|
|
407
407
|
function i() {
|
|
408
408
|
const l = De(a);
|
|
409
409
|
s(l);
|
|
410
410
|
}
|
|
411
|
-
return i(), U(a.registerUpdateListener(() => {
|
|
411
|
+
return i(), U(a.registerUpdateListener((() => {
|
|
412
412
|
i();
|
|
413
|
-
}), a.registerEditableListener(() => {
|
|
413
|
+
})), a.registerEditableListener((() => {
|
|
414
414
|
i();
|
|
415
|
-
}));
|
|
416
|
-
}, [a]), n;
|
|
417
|
-
}(e), o = Ut();
|
|
415
|
+
})));
|
|
416
|
+
}), [a]), n;
|
|
417
|
+
})(e), o = Ut();
|
|
418
418
|
return t ? typeof r == "function" ? r(o) : r : null;
|
|
419
419
|
}
|
|
420
420
|
const Xe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : k;
|
|
421
421
|
function Or({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: a, ariaErrorMessage: n, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: u, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: _, "data-testid": N, ...b }, D) {
|
|
422
|
-
const [S, P] = O(r.isEditable()), K = Ft((L) => {
|
|
422
|
+
const [S, P] = O(r.isEditable()), K = Ft(((L) => {
|
|
423
423
|
L && L.ownerDocument && L.ownerDocument.defaultView ? r.setRootElement(L) : r.setRootElement(null);
|
|
424
|
-
}, [r]), B = te(() => /* @__PURE__ */ function(...L) {
|
|
424
|
+
}), [r]), B = te((() => /* @__PURE__ */ (function(...L) {
|
|
425
425
|
return (X) => {
|
|
426
|
-
L.forEach((q) => {
|
|
426
|
+
L.forEach(((q) => {
|
|
427
427
|
typeof q == "function" ? q(X) : q != null && (q.current = X);
|
|
428
|
-
});
|
|
428
|
+
}));
|
|
429
429
|
};
|
|
430
|
-
}(D, K), [K, D]);
|
|
431
|
-
return Xe(() => (P(r.isEditable()), r.registerEditableListener((L) => {
|
|
430
|
+
})(D, K)), [K, D]);
|
|
431
|
+
return Xe((() => (P(r.isEditable()), r.registerEditableListener(((L) => {
|
|
432
432
|
P(L);
|
|
433
|
-
})), [r]), h("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? o : void 0, "aria-describedby": a, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": S && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": u, "aria-owns": S ? d : void 0, "aria-readonly": !S || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: S, "data-testid": N, id: w, ref: B, role: x, spellCheck: y, style: E, tabIndex: _, ...b });
|
|
433
|
+
})))), [r]), h("div", { "aria-activedescendant": S ? e : void 0, "aria-autocomplete": S ? t : "none", "aria-controls": S ? o : void 0, "aria-describedby": a, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": S && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": u, "aria-owns": S ? d : void 0, "aria-readonly": !S || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: S, "data-testid": N, id: w, ref: B, role: x, spellCheck: y, style: E, tabIndex: _, ...b });
|
|
434
434
|
}
|
|
435
435
|
const Kr = Ae(Or);
|
|
436
436
|
function Le(r) {
|
|
@@ -442,23 +442,23 @@ function Ar(r, e) {
|
|
|
442
442
|
return z(Re, { children: [h(Kr, { editor: a, ...o, ref: e }), t != null && h(Fr, { editor: a, content: t })] });
|
|
443
443
|
}
|
|
444
444
|
function Fr({ content: r, editor: e }) {
|
|
445
|
-
const t = function(s) {
|
|
446
|
-
const [i, l] = O(() => Le(s));
|
|
447
|
-
return Xe(() => {
|
|
445
|
+
const t = (function(s) {
|
|
446
|
+
const [i, l] = O((() => Le(s)));
|
|
447
|
+
return Xe((() => {
|
|
448
448
|
function c() {
|
|
449
449
|
const u = Le(s);
|
|
450
450
|
l(u);
|
|
451
451
|
}
|
|
452
|
-
return c(), U(s.registerUpdateListener(() => {
|
|
452
|
+
return c(), U(s.registerUpdateListener((() => {
|
|
453
453
|
c();
|
|
454
|
-
}), s.registerEditableListener(() => {
|
|
454
|
+
})), s.registerEditableListener((() => {
|
|
455
455
|
c();
|
|
456
|
-
}));
|
|
457
|
-
}, [s]), i;
|
|
458
|
-
}(e), [o, a] = O(e.isEditable());
|
|
459
|
-
if (J(() => (a(e.isEditable()), e.registerEditableListener((s) => {
|
|
456
|
+
})));
|
|
457
|
+
}), [s]), i;
|
|
458
|
+
})(e), [o, a] = O(e.isEditable());
|
|
459
|
+
if (J((() => (a(e.isEditable()), e.registerEditableListener(((s) => {
|
|
460
460
|
a(s);
|
|
461
|
-
})), [e]), !t) return null;
|
|
461
|
+
})))), [e]), !t) return null;
|
|
462
462
|
let n = null;
|
|
463
463
|
return typeof r == "function" ? n = r(o) : r !== null && (n = r), n === null ? null : h("div", { "aria-hidden": !0, children: n });
|
|
464
464
|
}
|
|
@@ -467,7 +467,7 @@ function le(r, e) {
|
|
|
467
467
|
return t.__proto__ = o, t;
|
|
468
468
|
}, le(r, e);
|
|
469
469
|
}
|
|
470
|
-
var $e = { error: null }, Br = function(r) {
|
|
470
|
+
var $e = { error: null }, Br = (function(r) {
|
|
471
471
|
var e, t;
|
|
472
472
|
function o() {
|
|
473
473
|
for (var n, s = arguments.length, i = new Array(s), l = 0; l < s; l++) i[l] = arguments[l];
|
|
@@ -487,9 +487,9 @@ var $e = { error: null }, Br = function(r) {
|
|
|
487
487
|
(i = (l = this.props).onError) == null || i.call(l, n, s);
|
|
488
488
|
}, a.componentDidUpdate = function(n, s) {
|
|
489
489
|
var i, l, c, u, d = this.state.error, f = this.props.resetKeys;
|
|
490
|
-
d !== null && s.error !== null && ((c = n.resetKeys) === void 0 && (c = []), (u = f) === void 0 && (u = []), c.length !== u.length || c.some(function(v, C) {
|
|
490
|
+
d !== null && s.error !== null && ((c = n.resetKeys) === void 0 && (c = []), (u = f) === void 0 && (u = []), c.length !== u.length || c.some((function(v, C) {
|
|
491
491
|
return !Object.is(v, u[C]);
|
|
492
|
-
})) && ((i = (l = this.props).onResetKeysChange) == null || i.call(l, n.resetKeys, f), this.reset());
|
|
492
|
+
}))) && ((i = (l = this.props).onResetKeysChange) == null || i.call(l, n.resetKeys, f), this.reset());
|
|
493
493
|
}, a.render = function() {
|
|
494
494
|
var n = this.state.error, s = this.props, i = s.fallbackRender, l = s.FallbackComponent, c = s.fallback;
|
|
495
495
|
if (n !== null) {
|
|
@@ -501,76 +501,76 @@ var $e = { error: null }, Br = function(r) {
|
|
|
501
501
|
}
|
|
502
502
|
return this.props.children;
|
|
503
503
|
}, o;
|
|
504
|
-
}(ne.Component);
|
|
504
|
+
})(ne.Component);
|
|
505
505
|
function Ur({ children: r, onError: e }) {
|
|
506
506
|
return h(Br, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
|
|
507
507
|
}
|
|
508
508
|
const Wr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : k;
|
|
509
509
|
function Hr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
|
|
510
510
|
const [o] = I();
|
|
511
|
-
return Wr(() => {
|
|
512
|
-
if (t) return o.registerUpdateListener(({ editorState: a, dirtyElements: n, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
|
|
511
|
+
return Wr((() => {
|
|
512
|
+
if (t) return o.registerUpdateListener((({ editorState: a, dirtyElements: n, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
|
|
513
513
|
e && n.size === 0 && s.size === 0 || r && l.has(de) || i.isEmpty() || t(a, o, l);
|
|
514
|
-
});
|
|
515
|
-
}, [o, r, e, t]), null;
|
|
514
|
+
}));
|
|
515
|
+
}), [o, r, e, t]), null;
|
|
516
516
|
}
|
|
517
517
|
function jr({ hasStrictIndent: r = !1 }) {
|
|
518
518
|
const [e] = I();
|
|
519
|
-
return k(() => {
|
|
519
|
+
return k((() => {
|
|
520
520
|
if (!e.hasNodes([Fe, Be])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
|
|
521
|
-
}, [e]), k(() => {
|
|
521
|
+
}), [e]), k((() => {
|
|
522
522
|
if (r) return Gt(e);
|
|
523
|
-
}, [e, r]), function(t) {
|
|
524
|
-
k(() => Yt(t), [t]);
|
|
525
|
-
}(e), null;
|
|
523
|
+
}), [e, r]), (function(t) {
|
|
524
|
+
k((() => Yt(t)), [t]);
|
|
525
|
+
})(e), null;
|
|
526
526
|
}
|
|
527
527
|
function Jr({ validateUrl: r, attributes: e }) {
|
|
528
528
|
const [t] = I();
|
|
529
|
-
return k(() => {
|
|
529
|
+
return k((() => {
|
|
530
530
|
if (!t.hasNodes([Ue])) throw new Error("LinkPlugin: LinkNode not registered on editor");
|
|
531
|
-
return U(t.registerCommand(be, (o) => {
|
|
531
|
+
return U(t.registerCommand(be, ((o) => {
|
|
532
532
|
if (o === null) return oe(o), !0;
|
|
533
533
|
if (typeof o == "string") return !(r !== void 0 && !r(o)) && (oe(o, e), !0);
|
|
534
534
|
{
|
|
535
535
|
const { url: a, target: n, rel: s, title: i } = o;
|
|
536
536
|
return oe(a, { ...e, rel: s, target: n, title: i }), !0;
|
|
537
537
|
}
|
|
538
|
-
}, ve), r !== void 0 ? t.registerCommand(Oe, (o) => {
|
|
538
|
+
}), ve), r !== void 0 ? t.registerCommand(Oe, ((o) => {
|
|
539
539
|
const a = p();
|
|
540
540
|
if (!g(a) || a.isCollapsed() || !A(o, ClipboardEvent) || o.clipboardData === null) return !1;
|
|
541
541
|
const n = o.clipboardData.getData("text");
|
|
542
|
-
return !!r(n) && !a.getNodes().some((s) => j(s)) && (t.dispatchCommand(be, { ...e, url: n }), o.preventDefault(), !0);
|
|
543
|
-
}, ve) : () => {
|
|
542
|
+
return !!r(n) && !a.getNodes().some(((s) => j(s))) && (t.dispatchCommand(be, { ...e, url: n }), o.preventDefault(), !0);
|
|
543
|
+
}), ve) : () => {
|
|
544
544
|
});
|
|
545
|
-
}, [t, r, e]), null;
|
|
545
|
+
}), [t, r, e]), null;
|
|
546
546
|
}
|
|
547
547
|
function Xr({ newTab: r = !0, disabled: e = !1 }) {
|
|
548
548
|
const [t] = I();
|
|
549
|
-
return k(() => {
|
|
549
|
+
return k((() => {
|
|
550
550
|
const o = (n) => {
|
|
551
551
|
const s = n.target;
|
|
552
552
|
if (!Ke(s)) return;
|
|
553
553
|
const i = Pt(s);
|
|
554
554
|
if (i === null) return;
|
|
555
555
|
let l = null, c = null;
|
|
556
|
-
if (i.update(() => {
|
|
556
|
+
if (i.update((() => {
|
|
557
557
|
const f = ee(s);
|
|
558
558
|
if (f !== null) {
|
|
559
559
|
const v = fe(f, j);
|
|
560
560
|
if (!e) if (Vt(v)) l = v.sanitizeUrl(v.getURL()), c = v.getTarget();
|
|
561
561
|
else {
|
|
562
|
-
const C = function(w, x) {
|
|
562
|
+
const C = (function(w, x) {
|
|
563
563
|
let y = w;
|
|
564
564
|
for (; y != null; ) {
|
|
565
565
|
if (x(y)) return y;
|
|
566
566
|
y = y.parentNode;
|
|
567
567
|
}
|
|
568
568
|
return null;
|
|
569
|
-
}(s, Rt);
|
|
569
|
+
})(s, Rt);
|
|
570
570
|
C !== null && (l = C.href, c = C.target);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
}), l === null || l === "") return;
|
|
573
|
+
})), l === null || l === "") return;
|
|
574
574
|
const u = t.getEditorState().read(p);
|
|
575
575
|
if (g(u) && !u.isCollapsed()) return void n.preventDefault();
|
|
576
576
|
const d = n.type === "auxclick" && n.button === 1;
|
|
@@ -578,10 +578,10 @@ function Xr({ newTab: r = !0, disabled: e = !1 }) {
|
|
|
578
578
|
}, a = (n) => {
|
|
579
579
|
n.button === 1 && o(n);
|
|
580
580
|
};
|
|
581
|
-
return t.registerRootListener((n, s) => {
|
|
581
|
+
return t.registerRootListener(((n, s) => {
|
|
582
582
|
s !== null && (s.removeEventListener("click", o), s.removeEventListener("mouseup", a)), n !== null && (n.addEventListener("click", o), n.addEventListener("mouseup", a));
|
|
583
|
-
});
|
|
584
|
-
}, [t, r, e]), null;
|
|
583
|
+
}));
|
|
584
|
+
}), [t, r, e]), null;
|
|
585
585
|
}
|
|
586
586
|
const Q = 0, ue = 1, ce = 2, $ = 0, qr = 1, Te = 2, Gr = 3, Yr = 4;
|
|
587
587
|
function Vr(r, e, t, o, a) {
|
|
@@ -589,7 +589,7 @@ function Vr(r, e, t, o, a) {
|
|
|
589
589
|
const n = e._selection, s = r._selection;
|
|
590
590
|
if (a) return qr;
|
|
591
591
|
if (!(g(n) && g(s) && s.isCollapsed() && n.isCollapsed())) return $;
|
|
592
|
-
const i = function(y, E, _) {
|
|
592
|
+
const i = (function(y, E, _) {
|
|
593
593
|
const N = y._nodeMap, b = [];
|
|
594
594
|
for (const D of E) {
|
|
595
595
|
const S = N.get(D);
|
|
@@ -601,7 +601,7 @@ function Vr(r, e, t, o, a) {
|
|
|
601
601
|
P === void 0 || ze(P) || b.push(P);
|
|
602
602
|
}
|
|
603
603
|
return b;
|
|
604
|
-
}(e, t, o);
|
|
604
|
+
})(e, t, o);
|
|
605
605
|
if (i.length === 0) return $;
|
|
606
606
|
if (i.length > 1) {
|
|
607
607
|
const y = e._nodeMap, E = y.get(n.anchor.key), _ = y.get(s.anchor.key);
|
|
@@ -626,10 +626,10 @@ function Zr(r, e) {
|
|
|
626
626
|
if (!C && v && c.has(de)) return Q;
|
|
627
627
|
if (a === null) return ue;
|
|
628
628
|
const w = n._selection;
|
|
629
|
-
return i.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === o && u < t + e && v || i.size === 1 && function(x, y, E) {
|
|
629
|
+
return i.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === o && u < t + e && v || i.size === 1 && (function(x, y, E) {
|
|
630
630
|
const _ = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, D = E._selection;
|
|
631
|
-
return !(g(b) && g(D) && b.anchor.type === "element" && b.focus.type === "element" && D.anchor.type === "text" && D.focus.type === "text" || !M(_) || !M(N) || _.__parent !== N.__parent) && JSON.stringify(y.read(() => _.exportJSON())) === JSON.stringify(E.read(() => N.exportJSON()));
|
|
632
|
-
}(Array.from(i)[0], a, n) ? Q : ue : w !== null ? Q : ce;
|
|
631
|
+
return !(g(b) && g(D) && b.anchor.type === "element" && b.focus.type === "element" && D.anchor.type === "text" && D.focus.type === "text" || !M(_) || !M(N) || _.__parent !== N.__parent) && JSON.stringify(y.read((() => _.exportJSON()))) === JSON.stringify(E.read((() => N.exportJSON())));
|
|
632
|
+
})(Array.from(i)[0], a, n) ? Q : ue : w !== null ? Q : ce;
|
|
633
633
|
})();
|
|
634
634
|
return t = u, o = d, f;
|
|
635
635
|
};
|
|
@@ -639,13 +639,13 @@ function Pe(r) {
|
|
|
639
639
|
}
|
|
640
640
|
function Qr(r, e, t) {
|
|
641
641
|
const o = Zr(r, t);
|
|
642
|
-
return U(r.registerCommand(Kt, () => (function(n, s) {
|
|
642
|
+
return U(r.registerCommand(Kt, (() => ((function(n, s) {
|
|
643
643
|
const i = s.redoStack, l = s.undoStack;
|
|
644
644
|
if (l.length !== 0) {
|
|
645
645
|
const c = s.current, u = l.pop();
|
|
646
646
|
c !== null && (i.push(c), n.dispatchCommand(G, !0)), l.length === 0 && n.dispatchCommand(Y, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: se });
|
|
647
647
|
}
|
|
648
|
-
}(r, e), !0), m), r.registerCommand(Ot, () => (function(n, s) {
|
|
648
|
+
})(r, e), !0)), m), r.registerCommand(Ot, (() => ((function(n, s) {
|
|
649
649
|
const i = s.redoStack, l = s.undoStack;
|
|
650
650
|
if (i.length !== 0) {
|
|
651
651
|
const c = s.current;
|
|
@@ -653,37 +653,37 @@ function Qr(r, e, t) {
|
|
|
653
653
|
const u = i.pop();
|
|
654
654
|
i.length === 0 && n.dispatchCommand(G, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: se });
|
|
655
655
|
}
|
|
656
|
-
}(r, e), !0), m), r.registerCommand(It, () => (Pe(e), !1), m), r.registerCommand(Mt, () => (Pe(e), r.dispatchCommand(G, !1), r.dispatchCommand(Y, !1), !0), m), r.registerUpdateListener(({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: c }) => {
|
|
656
|
+
})(r, e), !0)), m), r.registerCommand(It, (() => (Pe(e), !1)), m), r.registerCommand(Mt, (() => (Pe(e), r.dispatchCommand(G, !1), r.dispatchCommand(Y, !1), !0)), m), r.registerUpdateListener((({ editorState: n, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: c }) => {
|
|
657
657
|
const u = e.current, d = e.redoStack, f = e.undoStack, v = u === null ? null : u.editorState;
|
|
658
658
|
if (u !== null && n === v) return;
|
|
659
659
|
const C = o(s, n, u, i, l, c);
|
|
660
660
|
if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(G, !1)), u !== null && (f.push({ ...u }), r.dispatchCommand(Y, !0));
|
|
661
661
|
else if (C === ce) return;
|
|
662
662
|
e.current = { editor: r, editorState: n };
|
|
663
|
-
}));
|
|
663
|
+
})));
|
|
664
664
|
}
|
|
665
665
|
function en() {
|
|
666
666
|
return { current: null, redoStack: [], undoStack: [] };
|
|
667
667
|
}
|
|
668
668
|
function tn({ delay: r, externalHistoryState: e }) {
|
|
669
669
|
const [t] = I();
|
|
670
|
-
return function(o, a, n = 1e3) {
|
|
671
|
-
const s = te(() => a || en(), [a]);
|
|
672
|
-
k(() => Qr(o, s, n), [n, o, s]);
|
|
673
|
-
}(t, e, r), null;
|
|
670
|
+
return (function(o, a, n = 1e3) {
|
|
671
|
+
const s = te((() => a || en()), [a]);
|
|
672
|
+
k((() => Qr(o, s, n)), [n, o, s]);
|
|
673
|
+
})(t, e, r), null;
|
|
674
674
|
}
|
|
675
675
|
function rn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
|
|
676
676
|
const [a] = I();
|
|
677
|
-
return k(() => {
|
|
678
|
-
Qt(a) !== o && (er(a, o), a.registerNodeTransform(We, () => {
|
|
679
|
-
})());
|
|
680
|
-
}, [a, o]), k(() => tr(a), [a]), k(() => rr(a, t), [a, t]), k(() => {
|
|
677
|
+
return k((() => {
|
|
678
|
+
Qt(a) !== o && (er(a, o), a.registerNodeTransform(We, (() => {
|
|
679
|
+
}))());
|
|
680
|
+
}), [a, o]), k((() => tr(a)), [a]), k((() => rr(a, t)), [a, t]), k((() => {
|
|
681
681
|
if (!r) return nr(a);
|
|
682
|
-
}, [a, r]), k(() => {
|
|
683
|
-
if (!e) return a.registerNodeTransform(He, (n) => {
|
|
682
|
+
}), [a, r]), k((() => {
|
|
683
|
+
if (!e) return a.registerNodeTransform(He, ((n) => {
|
|
684
684
|
n.getBackgroundColor() !== null && n.setBackgroundColor(null);
|
|
685
|
-
});
|
|
686
|
-
}, [a, e, r]), null;
|
|
685
|
+
}));
|
|
686
|
+
}), [a, e, r]), null;
|
|
687
687
|
}
|
|
688
688
|
const qe = 200, nn = ({
|
|
689
689
|
currentLanguage: r = "NL",
|