@uva-glass/component-library 3.57.0 → 3.57.1
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-DApSVwEN.js → Lexical.prod-nAj5fF96.js} +2200 -1708
- package/dist/Lexical.prod-nAj5fF96.js.map +1 -0
- package/dist/LexicalClipboard.prod-B9sWgdS2.js +348 -0
- package/dist/LexicalClipboard.prod-B9sWgdS2.js.map +1 -0
- package/dist/{LexicalComposerContext.prod-o3ynMZsi.js → LexicalComposerContext.prod-DumMmRBt.js} +2 -2
- package/dist/LexicalComposerContext.prod-DumMmRBt.js.map +1 -0
- package/dist/LexicalHtml.prod-RCMsF0qt.js +2139 -0
- package/dist/LexicalHtml.prod-RCMsF0qt.js.map +1 -0
- package/dist/{LexicalLink.prod-DCBvBDd1.js → LexicalLink.prod-BcBNTFEb.js} +212 -195
- package/dist/LexicalLink.prod-BcBNTFEb.js.map +1 -0
- package/dist/LexicalList.prod-THQt9B32.js +890 -0
- package/dist/LexicalList.prod-THQt9B32.js.map +1 -0
- package/dist/{LexicalTable.prod-Dw8vTvL0.js → LexicalTable.prod-BpHQYpBM.js} +691 -608
- package/dist/LexicalTable.prod-BpHQYpBM.js.map +1 -0
- package/dist/LexicalUtils.prod-7S6iuu9A.js +347 -0
- package/dist/LexicalUtils.prod-7S6iuu9A.js.map +1 -0
- package/dist/{LinkContextMenu-Jna2w4Ob.js → LinkContextMenu-Byu3AEqp.js} +2 -2
- package/dist/{LinkContextMenu-Jna2w4Ob.js.map → LinkContextMenu-Byu3AEqp.js.map} +1 -1
- package/dist/{PasteHandlerPlugin-IsbHaMUu.js → PasteHandlerPlugin-DyTXcFsj.js} +5 -5
- package/dist/{PasteHandlerPlugin-IsbHaMUu.js.map → PasteHandlerPlugin-DyTXcFsj.js.map} +1 -1
- package/dist/{TableCellContextMenu-Dm-UNfH8.js → TableCellContextMenu--4IdoKAU.js} +2 -2
- package/dist/{TableCellContextMenu-Dm-UNfH8.js.map → TableCellContextMenu--4IdoKAU.js.map} +1 -1
- package/dist/TableCellResizerPlugin-Dn8Ks2Lm.js +208 -0
- package/dist/TableCellResizerPlugin-Dn8Ks2Lm.js.map +1 -0
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/CheckboxTree/index.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/FormInput/index.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/PeriodSelector/index.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/RadioTabSelector/index.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/EditorHeader/index.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +35 -35
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +14 -14
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +30 -30
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +2 -2
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/index.js +4 -4
- package/dist/components/RteEditor/RteEditor.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/RteEditor/index.js +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +18 -18
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +17 -17
- package/dist/components/index.js +1 -1
- package/dist/{components-DHB1OMJ8.js → components-KU0q76JR.js} +841 -686
- package/dist/components-KU0q76JR.js.map +1 -0
- package/dist/{helpers-C3IJbMVf.js → helpers-BzYayeT-.js} +9 -9
- package/dist/helpers-BzYayeT-.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +14 -14
- package/dist/Lexical.prod-DApSVwEN.js.map +0 -1
- package/dist/LexicalClipboard.prod--xxt8Vi4.js +0 -651
- package/dist/LexicalClipboard.prod--xxt8Vi4.js.map +0 -1
- package/dist/LexicalComposerContext.prod-o3ynMZsi.js.map +0 -1
- package/dist/LexicalExtension.prod-efmFsltb.js +0 -913
- package/dist/LexicalExtension.prod-efmFsltb.js.map +0 -1
- package/dist/LexicalLink.prod-DCBvBDd1.js.map +0 -1
- package/dist/LexicalList.prod-DA6gHLh6.js +0 -806
- package/dist/LexicalList.prod-DA6gHLh6.js.map +0 -1
- package/dist/LexicalTable.prod-Dw8vTvL0.js.map +0 -1
- package/dist/LexicalUtils.prod-DRNc5TMZ.js +0 -343
- package/dist/LexicalUtils.prod-DRNc5TMZ.js.map +0 -1
- package/dist/TableCellResizerPlugin-OgsG5jSq.js +0 -208
- package/dist/TableCellResizerPlugin-OgsG5jSq.js.map +0 -1
- package/dist/components-DHB1OMJ8.js.map +0 -1
- package/dist/helpers-C3IJbMVf.js.map +0 -1
|
@@ -10,37 +10,37 @@ import { useResponsive as c } from "./components/hooks/useResponsive.js";
|
|
|
10
10
|
import { t as l } from "./FormField-ByjTkKKq.js";
|
|
11
11
|
import { t as u } from "./InputField-asFsxHvx.js";
|
|
12
12
|
import { n as d, t as f } from "./MultiSelectItem-hx3Y4Lmk.js";
|
|
13
|
-
import { n as p, r as m, t as h } from "./LexicalComposerContext.prod-
|
|
14
|
-
import {
|
|
15
|
-
import { n as
|
|
16
|
-
import {
|
|
17
|
-
import { a as
|
|
18
|
-
import { a as
|
|
19
|
-
import { c as
|
|
20
|
-
import { a as
|
|
21
|
-
import {
|
|
22
|
-
import { a as
|
|
23
|
-
import { $createTableWrapperNode as
|
|
24
|
-
import { CourseCatalogueLinkPlugin as
|
|
25
|
-
import { cleanUpTable as
|
|
26
|
-
import { t as
|
|
27
|
-
import { LanguageProvider as
|
|
28
|
-
import { useTranslation as
|
|
29
|
-
import { CourseCataloguePlugin as
|
|
30
|
-
import { BlockFormatPlugin as
|
|
31
|
-
import { ListPlugin as
|
|
32
|
-
import { t as
|
|
33
|
-
import { useFlyout as
|
|
34
|
-
import { createTable as
|
|
35
|
-
import { t as
|
|
36
|
-
import { t as
|
|
37
|
-
import { UvaTheme as
|
|
38
|
-
import * as
|
|
39
|
-
import { Component as
|
|
40
|
-
import { Fragment as
|
|
41
|
-
import { createPortal as
|
|
13
|
+
import { n as p, r as m, t as h } from "./LexicalComposerContext.prod-DumMmRBt.js";
|
|
14
|
+
import { A as g, At as _, B as v, Bt as y, Cn as b, D as x, Dt as S, E as C, Et as w, F as T, Fn as E, Ft as ee, G as te, Gn as ne, H as re, Ht as ie, J as D, K as ae, L as oe, M as se, Mt as ce, Nn as le, Nt as ue, O, Ot as de, Pt as fe, Qn as k, Qt as pe, Rn as me, Rt as he, S as ge, Tn as _e, Tt as ve, Vn as A, Wn as ye, Xn as be, Yt as j, Z as M, Zt as xe, _ as Se, _n as Ce, a as we, an as Te, ar as Ee, bn as De, br as Oe, c as ke, ct as Ae, d as je, dn as Me, en as Ne, er as Pe, et as Fe, fn as Ie, ft as Le, gt as N, ht as Re, it as ze, j as Be, jn as Ve, jt as He, k as P, kn as F, kt as Ue, m as We, mn as Ge, n as Ke, nr as qe, or as Je, p as Ye, qn as Xe, rn as I, sn as Ze, st as Qe, tt as $e, u as et, un as tt, ur as nt, vn as rt, vt as it, w as at, wn as ot, xt as st, zt as ct } from "./Lexical.prod-nAj5fF96.js";
|
|
15
|
+
import { n as lt, t as ut } from "./TableCellResizerPlugin-Dn8Ks2Lm.js";
|
|
16
|
+
import { _ as dt, c as L, f as ft, g as pt, l as mt, p as ht, u as gt } from "./LexicalUtils.prod-7S6iuu9A.js";
|
|
17
|
+
import { C as _t, S as vt, _ as yt, a as bt, b as R, d as xt, h as St, m as Ct, n as wt, o as Tt, p as Et, v as Dt, x as Ot, y as kt } from "./LexicalHtml.prod-RCMsF0qt.js";
|
|
18
|
+
import { a as At, i as jt, n as Mt, o as Nt, r as Pt, s as Ft, t as It } from "./LexicalClipboard.prod-B9sWgdS2.js";
|
|
19
|
+
import { c as Lt, n as Rt, s as zt, u as Bt } from "./LexicalList.prod-THQt9B32.js";
|
|
20
|
+
import { a as Vt, c as z, i as Ht, n as Ut, o as Wt, s as Gt } from "./LexicalLink.prod-BcBNTFEb.js";
|
|
21
|
+
import { S as Kt, c as qt, h as Jt, l as Yt, n as Xt, r as Zt, s as Qt, t as $t, u as en, y as tn } from "./LexicalTable.prod-BpHQYpBM.js";
|
|
22
|
+
import { a as nn, i as rn, n as an, r as on, t as sn } from "./helpers-BzYayeT-.js";
|
|
23
|
+
import { $createTableWrapperNode as cn, TableWrapperNode as ln } from "./components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js";
|
|
24
|
+
import { CourseCatalogueLinkPlugin as un, CourseCatalogueNode as dn } from "./components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js";
|
|
25
|
+
import { cleanUpTable as fn, exportMap as pn, mergeBoldStrongTags as mn, removeScrollableContainers as hn, setScrollableContainers as gn } from "./components/RteEditor/helpers.js";
|
|
26
|
+
import { t as B } from "./RteEditor.module-pWBasED2.js";
|
|
27
|
+
import { LanguageProvider as _n, useLanguage as vn } from "./components/RteEditor/Providers/LanguageProvider.js";
|
|
28
|
+
import { useTranslation as V } from "./components/RteEditor/hooks/useTranslation.js";
|
|
29
|
+
import { CourseCataloguePlugin as yn } from "./components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js";
|
|
30
|
+
import { BlockFormatPlugin as bn } from "./components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js";
|
|
31
|
+
import { ListPlugin as xn } from "./components/RteEditor/Plugins/ListPlugin/ListPlugin.js";
|
|
32
|
+
import { t as Sn } from "./LinkContextMenu-Byu3AEqp.js";
|
|
33
|
+
import { useFlyout as Cn } from "./components/RteEditor/hooks/useFlyout.js";
|
|
34
|
+
import { createTable as wn, deleteColumn as Tn, deleteRow as En, deleteTable as Dn, getEditorContentWidth as On, getEditorParrentCellWidth as kn, insertColumn as An, insertRow as jn } from "./components/RteEditor/Plugins/TablePlugin/helpers.js";
|
|
35
|
+
import { t as Mn } from "./TableCellContextMenu--4IdoKAU.js";
|
|
36
|
+
import { t as Nn } from "./PasteHandlerPlugin-DyTXcFsj.js";
|
|
37
|
+
import { UvaTheme as Pn } from "./components/RteEditor/UvaTheme/UvaTheme.js";
|
|
38
|
+
import * as Fn from "react";
|
|
39
|
+
import { Component as In, Suspense as Ln, createContext as Rn, createElement as zn, createRef as Bn, forwardRef as Vn, useCallback as Hn, useEffect as H, useId as U, useImperativeHandle as Un, useLayoutEffect as Wn, useMemo as Gn, useRef as W, useState as G } from "react";
|
|
40
|
+
import { Fragment as Kn, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
41
|
+
import { createPortal as qn, flushSync as Jn } from "react-dom";
|
|
42
42
|
import './assets/components.css';//#region src/components/CheckboxTree/CheckboxTree.module.css
|
|
43
|
-
var
|
|
43
|
+
var J = {
|
|
44
44
|
"checkbox-tree__header": "_checkbox-tree__header_1kejb_1",
|
|
45
45
|
"checkbox-tree__branch": "_checkbox-tree__branch_1kejb_8",
|
|
46
46
|
"checkbox-tree__branch--icon": "_checkbox-tree__branch--icon_1kejb_21",
|
|
@@ -49,12 +49,12 @@ var Y = {
|
|
|
49
49
|
"checkbox-tree__leaves": "_checkbox-tree__leaves_1kejb_39",
|
|
50
50
|
"checkbox-tree__leaves--expanded": "_checkbox-tree__leaves--expanded_1kejb_48",
|
|
51
51
|
"checkbox-tree__leaf": "_checkbox-tree__leaf_1kejb_52"
|
|
52
|
-
},
|
|
53
|
-
let f =
|
|
52
|
+
}, Yn = ({ title: i, checkboxTree: o, selectedValues: s, noLabelFrontWeight: u = !1, onChange: d }) => {
|
|
53
|
+
let f = W({}), [p, m] = G([]), { lessThan: h } = c(), g = (e, t) => {
|
|
54
54
|
if (e.length !== t.length) return !1;
|
|
55
55
|
let n = (e) => e.reduce((e, t) => (e[t] = (e[t] || 0) + 1, e), {}), r = n(e), i = n(t);
|
|
56
56
|
return !Object.keys(r).some((e) => r[e] !== i[e]);
|
|
57
|
-
}, _ = (e) => (f.current[e] || (f.current[e] =
|
|
57
|
+
}, _ = (e) => (f.current[e] || (f.current[e] = Bn()), f.current[e]), v = () => {
|
|
58
58
|
let e = [];
|
|
59
59
|
Object.entries(f.current).forEach(([t]) => {
|
|
60
60
|
let n = f.current[t].current;
|
|
@@ -71,7 +71,7 @@ var Y = {
|
|
|
71
71
|
f.current[e].current && (f.current[e].current.checked = n, f.current[e].current.indeterminate = !n && n !== r, f.current[e].current.checked = n && n === r);
|
|
72
72
|
}, b = (e, t) => {
|
|
73
73
|
let n = t?.querySelector("[data-ul]");
|
|
74
|
-
e.childNodes[0].classList.toggle(
|
|
74
|
+
e.childNodes[0].classList.toggle(J["checkbox-tree__branch--icon--expanded"]), t?.closest("[data-li]")?.setAttribute("aria-expanded", t?.closest("[data-li]")?.getAttribute("aria-expanded") === "false" ? "true" : "false"), n && n.classList.toggle(J["checkbox-tree__leaves--expanded"]);
|
|
75
75
|
}, x = (e) => {
|
|
76
76
|
let t = e.target;
|
|
77
77
|
if (!(t.type !== "checkbox" && t.type !== "button")) {
|
|
@@ -106,60 +106,60 @@ var Y = {
|
|
|
106
106
|
let t = f.current[e].current;
|
|
107
107
|
t && t.name.indexOf("Group") !== -1 && y(t.name);
|
|
108
108
|
});
|
|
109
|
-
}, [p]), /* @__PURE__ */
|
|
110
|
-
className:
|
|
109
|
+
}, [p]), /* @__PURE__ */ q("div", { children: [i && /* @__PURE__ */ K("span", {
|
|
110
|
+
className: J["checkbox-tree__header"],
|
|
111
111
|
children: i
|
|
112
|
-
}), /* @__PURE__ */
|
|
112
|
+
}), /* @__PURE__ */ K("div", {
|
|
113
113
|
onClick: x,
|
|
114
114
|
"data-ul": !0,
|
|
115
115
|
role: "tree",
|
|
116
116
|
tabIndex: 0,
|
|
117
|
-
children: o.map(({ itemName: i, children: o }, s) => /* @__PURE__ */
|
|
118
|
-
className:
|
|
117
|
+
children: o.map(({ itemName: i, children: o }, s) => /* @__PURE__ */ q("div", {
|
|
118
|
+
className: J["checkbox-tree__branch"],
|
|
119
119
|
"data-li": !0,
|
|
120
120
|
"aria-expanded": h.md ? "false" : "true",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ q(l, {
|
|
122
122
|
inline: !0,
|
|
123
|
-
className:
|
|
123
|
+
className: J["checkbox-tree__branch--formfield"],
|
|
124
124
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ K(n, {
|
|
126
126
|
variant: "blank",
|
|
127
127
|
onClick: S,
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ K(t, {
|
|
129
129
|
name: "CheveronRight",
|
|
130
130
|
size: 16,
|
|
131
|
-
className: e(
|
|
131
|
+
className: e(J["checkbox-tree__branch--icon"], { [J["checkbox-tree__branch--icon--expanded"]]: !h.md })
|
|
132
132
|
})
|
|
133
133
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ K(r, {
|
|
135
135
|
id: i,
|
|
136
136
|
name: `Group${s}`,
|
|
137
137
|
disabled: o.every((e) => e.disabled),
|
|
138
138
|
ref: _(`Group${s}`)
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ K(a, {
|
|
141
141
|
htmlFor: i,
|
|
142
142
|
noFontWeight: u,
|
|
143
143
|
children: i
|
|
144
144
|
})
|
|
145
145
|
]
|
|
146
|
-
}), /* @__PURE__ */
|
|
147
|
-
className: e(
|
|
146
|
+
}), /* @__PURE__ */ K("div", {
|
|
147
|
+
className: e(J["checkbox-tree__leaves"], { [J["checkbox-tree__leaves--expanded"]]: !h.md }),
|
|
148
148
|
"data-ul": !0,
|
|
149
|
-
children: o.map(({ itemName: e, itemValue: t, disabled: n }) => /* @__PURE__ */
|
|
150
|
-
className:
|
|
149
|
+
children: o.map(({ itemName: e, itemValue: t, disabled: n }) => /* @__PURE__ */ K("div", {
|
|
150
|
+
className: J["checkbox-tree__leaf"],
|
|
151
151
|
"data-li": !0,
|
|
152
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ q(l, {
|
|
153
153
|
inline: !0,
|
|
154
|
-
className:
|
|
155
|
-
children: [/* @__PURE__ */
|
|
154
|
+
className: J["checkbox-tree__branch--formfield"],
|
|
155
|
+
children: [/* @__PURE__ */ K(r, {
|
|
156
156
|
id: e,
|
|
157
157
|
name: e,
|
|
158
158
|
value: t,
|
|
159
159
|
disabled: n,
|
|
160
160
|
"data-groupname": `Group${s}`,
|
|
161
161
|
ref: _(`Group${s}_${e}`)
|
|
162
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ K(a, {
|
|
163
163
|
htmlFor: e,
|
|
164
164
|
noFontWeight: u,
|
|
165
165
|
children: e
|
|
@@ -169,7 +169,7 @@ var Y = {
|
|
|
169
169
|
})]
|
|
170
170
|
}, i))
|
|
171
171
|
})] });
|
|
172
|
-
},
|
|
172
|
+
}, Y = {
|
|
173
173
|
"form-input__container": "_form-input__container_rt0pn_1",
|
|
174
174
|
"form-input__container--label-left": "_form-input__container--label-left_rt0pn_7",
|
|
175
175
|
"form-input__container--label-top": "_form-input__container--label-top_rt0pn_18",
|
|
@@ -177,7 +177,7 @@ var Y = {
|
|
|
177
177
|
"form-input__input-container": "_form-input__input-container_rt0pn_35",
|
|
178
178
|
"form-input__input": "_form-input__input_rt0pn_25",
|
|
179
179
|
"not-valid": "_not-valid_rt0pn_60"
|
|
180
|
-
},
|
|
180
|
+
}, Xn = ({ id: t, label: n, labelPosition: r = "top", type: i = "text", required: s = !1, notValid: c = !1, notValidatedText: l = "", onChange: u, maxLength: d, noContainer: f = !1, customInput: p }) => {
|
|
181
181
|
let m = (e) => [
|
|
182
182
|
"e",
|
|
183
183
|
"E",
|
|
@@ -185,42 +185,42 @@ var Y = {
|
|
|
185
185
|
"-"
|
|
186
186
|
].includes(e.key) && e.preventDefault(), h = (e) => {
|
|
187
187
|
typeof u == "function" && u(e.target.value);
|
|
188
|
-
}, g = /* @__PURE__ */
|
|
188
|
+
}, g = /* @__PURE__ */ q(Kn, { children: [n && /* @__PURE__ */ K(a, {
|
|
189
189
|
htmlFor: t,
|
|
190
190
|
required: s,
|
|
191
191
|
alignRight: !0,
|
|
192
192
|
children: n
|
|
193
|
-
}), /* @__PURE__ */
|
|
194
|
-
className:
|
|
195
|
-
children: [p || /* @__PURE__ */
|
|
196
|
-
className:
|
|
197
|
-
children: /* @__PURE__ */
|
|
193
|
+
}), /* @__PURE__ */ q("div", {
|
|
194
|
+
className: Y["form-input__input-feedback-container"],
|
|
195
|
+
children: [p || /* @__PURE__ */ K("div", {
|
|
196
|
+
className: Y["form-input__input-container"],
|
|
197
|
+
children: /* @__PURE__ */ K("input", {
|
|
198
198
|
id: t,
|
|
199
199
|
type: i,
|
|
200
200
|
...i === "number" && { onKeyDown: m },
|
|
201
201
|
onChange: h,
|
|
202
|
-
className: e(
|
|
202
|
+
className: e(Y["form-input__input"], { [Y["not-valid"]]: c }),
|
|
203
203
|
...d ? { maxLength: d } : {}
|
|
204
204
|
})
|
|
205
|
-
}), l !== "" && /* @__PURE__ */
|
|
205
|
+
}), l !== "" && /* @__PURE__ */ K(o, {
|
|
206
206
|
level: "error",
|
|
207
207
|
feedback: l
|
|
208
208
|
})]
|
|
209
209
|
})] });
|
|
210
|
-
return f ? g : /* @__PURE__ */
|
|
211
|
-
className: e(
|
|
210
|
+
return f ? g : /* @__PURE__ */ K("div", {
|
|
211
|
+
className: e(Y["form-input__container"], Y[`form-input__container--label-${r}`]),
|
|
212
212
|
children: g
|
|
213
213
|
});
|
|
214
214
|
};
|
|
215
215
|
//#endregion
|
|
216
216
|
//#region src/components/MultiSelect/components/MultiSelectHeader.tsx
|
|
217
|
-
function
|
|
218
|
-
return /* @__PURE__ */
|
|
217
|
+
function Zn({ label: e, clearTrigger: t, onClear: r }) {
|
|
218
|
+
return /* @__PURE__ */ q("header", {
|
|
219
219
|
className: d["multi-select__header"],
|
|
220
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ K(a, {
|
|
221
221
|
htmlFor: "multi-select-list",
|
|
222
222
|
children: e
|
|
223
|
-
}), t && /* @__PURE__ */
|
|
223
|
+
}), t && /* @__PURE__ */ K(n, {
|
|
224
224
|
variant: "blank",
|
|
225
225
|
onClick: r,
|
|
226
226
|
children: t
|
|
@@ -229,47 +229,47 @@ function Mn({ label: e, clearTrigger: t, onClear: r }) {
|
|
|
229
229
|
}
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region src/components/MultiSelect/MultiSelect.tsx
|
|
232
|
-
var
|
|
232
|
+
var Qn = ({ scrollable: t = !0, noBorder: n, header: r, children: i }) => /* @__PURE__ */ q(Kn, { children: [r, /* @__PURE__ */ K("div", {
|
|
233
233
|
className: e(d["multi-select"], { [d["multi-select--no-border"]]: n }),
|
|
234
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ K("ul", {
|
|
235
235
|
className: e(d["multi-select__list"], { [d["multi-select__list--scrollable"]]: t }),
|
|
236
236
|
id: "multi-select-list",
|
|
237
237
|
children: i
|
|
238
238
|
})
|
|
239
239
|
})] });
|
|
240
|
-
|
|
240
|
+
Qn.MultiSelectHeader = Zn, Qn.MultiSelectItem = f;
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region src/components/PeriodSelector/PeriodSelector.module.css
|
|
243
|
-
var
|
|
243
|
+
var $n = {
|
|
244
244
|
"period-selector__container": "_period-selector__container_1txwd_1",
|
|
245
245
|
"period-selector__container--label-left": "_period-selector__container--label-left_1txwd_6",
|
|
246
246
|
"period-selector__container--label-top": "_period-selector__container--label-top_1txwd_12",
|
|
247
247
|
"period-selector__selector-container": "_period-selector__selector-container_1txwd_18",
|
|
248
248
|
"period-selector__selector-row": "_period-selector__selector-row_1txwd_24"
|
|
249
|
-
},
|
|
249
|
+
}, er = 0, tr = 1, nr = 2, rr = 3, ir = 7, ar = (e) => {
|
|
250
250
|
let t = [];
|
|
251
|
-
for (let n = 0; n < e.length; n +=
|
|
251
|
+
for (let n = 0; n < e.length; n += rr) t.push(e.slice(n, n + rr));
|
|
252
252
|
return t;
|
|
253
|
-
},
|
|
254
|
-
let d =
|
|
253
|
+
}, or = ({ maxPeriods: t = ir, defaultValues: n, label: r, labelPosition: s = "top", required: c = !1, notValidatedText: l = "", onChange: u }) => {
|
|
254
|
+
let d = ar(Array.from({ length: t }, (e, t) => t + 1)), f = d.map((e, t) => e.map((e) => ({
|
|
255
255
|
label: e.toString(),
|
|
256
256
|
value: e.toString()
|
|
257
|
-
}))), p =
|
|
257
|
+
}))), p = W(d.map((e) => e.reduce((e, t) => (n?.includes(t) && e.push(t), e), []))), [m, h] = G([]), g = (e) => e[er].length !== 0 || e[tr].length !== 0 ? [nr] : e[nr].length === 0 ? [] : [er, tr], _ = (e, t) => {
|
|
258
258
|
p.current[t] = e.map((e) => Number(e)), h(g(p.current)), u([...p.current.flat()].sort());
|
|
259
259
|
};
|
|
260
260
|
return H(() => {
|
|
261
261
|
h(g(p.current));
|
|
262
|
-
}, []), /* @__PURE__ */
|
|
263
|
-
className: e(
|
|
264
|
-
children: [r && /* @__PURE__ */
|
|
262
|
+
}, []), /* @__PURE__ */ q("div", {
|
|
263
|
+
className: e($n["period-selector__container"], $n[`period-selector__container--label-${s}`]),
|
|
264
|
+
children: [r && /* @__PURE__ */ K(a, {
|
|
265
265
|
htmlFor: "",
|
|
266
266
|
required: c,
|
|
267
267
|
children: r
|
|
268
|
-
}), /* @__PURE__ */
|
|
269
|
-
className:
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
className:
|
|
272
|
-
children: f.map((e, t) => /* @__PURE__ */
|
|
268
|
+
}), /* @__PURE__ */ q("div", {
|
|
269
|
+
className: $n["period-selector__selector-container"],
|
|
270
|
+
children: [/* @__PURE__ */ K("div", {
|
|
271
|
+
className: $n["period-selector__selector-row"],
|
|
272
|
+
children: f.map((e, t) => /* @__PURE__ */ K(i, {
|
|
273
273
|
checkboxes: e,
|
|
274
274
|
defaultValues: p.current[t].map((e) => e.toString()),
|
|
275
275
|
disableGroup: m.includes(t),
|
|
@@ -277,34 +277,34 @@ var Pn = {
|
|
|
277
277
|
onSetValues: (e) => _(e, t),
|
|
278
278
|
notValid: l !== ""
|
|
279
279
|
}, `group_${t}`))
|
|
280
|
-
}), l !== "" && /* @__PURE__ */
|
|
280
|
+
}), l !== "" && /* @__PURE__ */ K(o, {
|
|
281
281
|
level: "error",
|
|
282
282
|
feedback: l
|
|
283
283
|
})]
|
|
284
284
|
})]
|
|
285
285
|
});
|
|
286
|
-
},
|
|
286
|
+
}, sr = {
|
|
287
287
|
"radio-tab-selector-button-bar__container": "_radio-tab-selector-button-bar__container_wuziy_1",
|
|
288
288
|
"radio-tab-selector-button-bar__container--label-left": "_radio-tab-selector-button-bar__container--label-left_wuziy_6",
|
|
289
289
|
"radio-tab-selector-button-bar__container--label-top": "_radio-tab-selector-button-bar__container--label-top_wuziy_12",
|
|
290
290
|
"radio-tab-selector-button-bar__row-container": "_radio-tab-selector-button-bar__row-container_wuziy_18",
|
|
291
291
|
"radio-tab-selector-button-bar__row": "_radio-tab-selector-button-bar__row_wuziy_18",
|
|
292
292
|
"radio-tab-selector-button-bar__row--not-validated": "_radio-tab-selector-button-bar__row--not-validated_wuziy_35"
|
|
293
|
-
},
|
|
294
|
-
let [f, p] =
|
|
293
|
+
}, cr = ({ buttons: t, radioGroupName: n, defaultValue: r, label: i, labelPosition: c = "top", required: l = !1, notValidatedText: u = "", onSetValue: d }) => {
|
|
294
|
+
let [f, p] = G(r || null), m = (e) => {
|
|
295
295
|
p(e.target.value), d(e.target.value);
|
|
296
296
|
};
|
|
297
|
-
return /* @__PURE__ */
|
|
298
|
-
className: e(
|
|
299
|
-
children: [i && /* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ q("div", {
|
|
298
|
+
className: e(sr["radio-tab-selector-button-bar__container"], sr[`radio-tab-selector-button-bar__container--label-${c}`]),
|
|
299
|
+
children: [i && /* @__PURE__ */ K(a, {
|
|
300
300
|
htmlFor: "",
|
|
301
301
|
required: l,
|
|
302
302
|
children: i
|
|
303
|
-
}), /* @__PURE__ */
|
|
304
|
-
className:
|
|
305
|
-
children: [/* @__PURE__ */
|
|
306
|
-
className: e(
|
|
307
|
-
children: t.map(({ label: e, value: t, iconName: r, disabled: i }) => /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ q("div", {
|
|
304
|
+
className: sr["radio-tab-selector-button-bar__row-container"],
|
|
305
|
+
children: [/* @__PURE__ */ K("div", {
|
|
306
|
+
className: e(sr["radio-tab-selector-button-bar__row"], { [sr["radio-tab-selector-button-bar__row--not-validated"]]: u }),
|
|
307
|
+
children: t.map(({ label: e, value: t, iconName: r, disabled: i }) => /* @__PURE__ */ K(s, {
|
|
308
308
|
type: "radio",
|
|
309
309
|
name: n,
|
|
310
310
|
label: e,
|
|
@@ -314,16 +314,16 @@ var Pn = {
|
|
|
314
314
|
disabled: i,
|
|
315
315
|
onSetValue: m
|
|
316
316
|
}, `${t}`))
|
|
317
|
-
}), u !== "" && /* @__PURE__ */
|
|
317
|
+
}), u !== "" && /* @__PURE__ */ K(o, {
|
|
318
318
|
level: "error",
|
|
319
319
|
feedback: u
|
|
320
320
|
})]
|
|
321
321
|
})]
|
|
322
322
|
});
|
|
323
|
-
},
|
|
324
|
-
function
|
|
325
|
-
let n =
|
|
326
|
-
let { theme: t, namespace: n, nodes: r, onError: i, editorState: a, html: o } = e, s = m(null, t), c =
|
|
323
|
+
}, lr = Ve ? Wn : H, ur = { tag: y };
|
|
324
|
+
function dr({ initialConfig: e, children: t }) {
|
|
325
|
+
let n = Gn(() => {
|
|
326
|
+
let { theme: t, namespace: n, nodes: r, onError: i, editorState: a, html: o } = e, s = m(null, t), c = rt({
|
|
327
327
|
editable: e.editable,
|
|
328
328
|
html: o,
|
|
329
329
|
namespace: n,
|
|
@@ -334,75 +334,75 @@ function qn({ initialConfig: e, children: t }) {
|
|
|
334
334
|
return function(e, t) {
|
|
335
335
|
if (t !== null) {
|
|
336
336
|
if (t === void 0) e.update(() => {
|
|
337
|
-
let t =
|
|
337
|
+
let t = D();
|
|
338
338
|
if (t.isEmpty()) {
|
|
339
|
-
let n =
|
|
339
|
+
let n = M();
|
|
340
340
|
t.append(n);
|
|
341
|
-
let r =
|
|
342
|
-
(
|
|
341
|
+
let r = Ve ? document.activeElement : null;
|
|
342
|
+
(N() !== null || r !== null && r === e.getRootElement()) && n.select();
|
|
343
343
|
}
|
|
344
|
-
},
|
|
344
|
+
}, ur);
|
|
345
345
|
else if (t !== null) switch (typeof t) {
|
|
346
346
|
case "string": {
|
|
347
347
|
let n = e.parseEditorState(t);
|
|
348
|
-
e.setEditorState(n,
|
|
348
|
+
e.setEditorState(n, ur);
|
|
349
349
|
break;
|
|
350
350
|
}
|
|
351
351
|
case "object":
|
|
352
|
-
e.setEditorState(t,
|
|
352
|
+
e.setEditorState(t, ur);
|
|
353
353
|
break;
|
|
354
354
|
case "function": e.update(() => {
|
|
355
|
-
|
|
356
|
-
},
|
|
355
|
+
D().isEmpty() && t(e);
|
|
356
|
+
}, ur);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
}(c, a), [c, s];
|
|
360
360
|
}, []);
|
|
361
|
-
return
|
|
361
|
+
return lr(() => {
|
|
362
362
|
let t = e.editable, [r] = n;
|
|
363
363
|
r.setEditable(t === void 0 || t);
|
|
364
|
-
}, []),
|
|
364
|
+
}, []), K(p.Provider, {
|
|
365
365
|
value: n,
|
|
366
366
|
children: t
|
|
367
367
|
});
|
|
368
368
|
}
|
|
369
369
|
//#endregion
|
|
370
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
371
|
-
var
|
|
370
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalReactProviderExtension.prod.mjs
|
|
371
|
+
var fr = P({ name: "@lexical/react/ReactProvider" });
|
|
372
372
|
//#endregion
|
|
373
|
-
//#region node_modules/.pnpm/@lexical+text@0.
|
|
374
|
-
function
|
|
375
|
-
return
|
|
373
|
+
//#region node_modules/.pnpm/@lexical+text@0.45.0/node_modules/@lexical/text/dist/LexicalText.prod.mjs
|
|
374
|
+
function pr() {
|
|
375
|
+
return D().getTextContent();
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function mr(e, t = !0) {
|
|
378
378
|
if (e) return !1;
|
|
379
|
-
let n =
|
|
379
|
+
let n = pr();
|
|
380
380
|
return t && (n = n.trim()), n === "";
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
if (!
|
|
384
|
-
let t =
|
|
382
|
+
function hr(e) {
|
|
383
|
+
if (!mr(e, !1)) return !1;
|
|
384
|
+
let t = D().getChildren(), n = t.length;
|
|
385
385
|
if (n > 1) return !1;
|
|
386
386
|
for (let e = 0; e < n; e++) {
|
|
387
387
|
let n = t[e];
|
|
388
|
-
if (
|
|
389
|
-
if (
|
|
390
|
-
if (!
|
|
388
|
+
if (F(n)) return !1;
|
|
389
|
+
if (ct(n)) {
|
|
390
|
+
if (!te(n) || n.__indent !== 0) return !1;
|
|
391
391
|
let t = n.getChildren(), r = t.length;
|
|
392
392
|
for (let n = 0; n < r; n++) {
|
|
393
393
|
let n = t[e];
|
|
394
|
-
if (!
|
|
394
|
+
if (!O(n)) return !1;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
return !0;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return () =>
|
|
400
|
+
function gr(e) {
|
|
401
|
+
return () => hr(e);
|
|
402
402
|
}
|
|
403
403
|
//#endregion
|
|
404
|
-
//#region node_modules/.pnpm/@lexical+dragon@0.
|
|
405
|
-
function
|
|
404
|
+
//#region node_modules/.pnpm/@lexical+dragon@0.45.0/node_modules/@lexical/dragon/dist/LexicalDragon.prod.mjs
|
|
405
|
+
function _r(e) {
|
|
406
406
|
let t = window.location.origin, n = (n) => {
|
|
407
407
|
if (n.origin !== t) return;
|
|
408
408
|
let r = e.getRootElement();
|
|
@@ -422,10 +422,10 @@ function $n(e) {
|
|
|
422
422
|
if (t) {
|
|
423
423
|
let [r, i, a, o, s] = t;
|
|
424
424
|
e.update(() => {
|
|
425
|
-
let e =
|
|
426
|
-
if (
|
|
425
|
+
let e = N();
|
|
426
|
+
if (k(e)) {
|
|
427
427
|
let t = e.anchor, c = t.getNode(), l = 0, u = 0;
|
|
428
|
-
if (
|
|
428
|
+
if (O(c) && r >= 0 && i >= 0 && (l = r, u = r + i, e.setTextNodeRange(c, l, c, u)), l === u && a === "" || (e.insertRawText(a), c = t.getNode()), O(c)) {
|
|
429
429
|
l = o, u = o + s;
|
|
430
430
|
let t = c.getTextContentSize();
|
|
431
431
|
l = l > t ? t : l, u = u > t ? t : u, e.setTextNodeRange(c, l, c, u);
|
|
@@ -442,32 +442,93 @@ function $n(e) {
|
|
|
442
442
|
window.removeEventListener("message", n, !0);
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
|
-
var
|
|
446
|
-
build: (e, t, n) =>
|
|
447
|
-
config:
|
|
445
|
+
var vr = P({
|
|
446
|
+
build: (e, t, n) => R(t),
|
|
447
|
+
config: C({ disabled: typeof window > "u" }),
|
|
448
448
|
name: "@lexical/dragon",
|
|
449
|
-
register: (e, t, n) =>
|
|
449
|
+
register: (e, t, n) => kt(() => n.getOutput().disabled.value ? void 0 : _r(e))
|
|
450
450
|
});
|
|
451
451
|
//#endregion
|
|
452
|
-
//#region node_modules/.pnpm/@lexical+rich-text@0.
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
let n = document.caretRangeFromPoint(e, t);
|
|
456
|
-
return n === null ? null : {
|
|
457
|
-
node: n.startContainer,
|
|
458
|
-
offset: n.startOffset
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
if (document.caretPositionFromPoint !== "undefined") {
|
|
462
|
-
let n = document.caretPositionFromPoint(e, t);
|
|
463
|
-
return n === null ? null : {
|
|
464
|
-
node: n.offsetNode,
|
|
465
|
-
offset: n.offset
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
return null;
|
|
452
|
+
//#region node_modules/.pnpm/@lexical+rich-text@0.45.0/node_modules/@lexical/rich-text/dist/LexicalRichText.prod.mjs
|
|
453
|
+
function yr(e, t) {
|
|
454
|
+
return e && t !== null ? S(e, t) : t;
|
|
469
455
|
}
|
|
470
|
-
|
|
456
|
+
P({
|
|
457
|
+
dependencies: [
|
|
458
|
+
xt,
|
|
459
|
+
P({
|
|
460
|
+
build: (e, t) => R(t),
|
|
461
|
+
config: C({ escapeFormatTriggers: {
|
|
462
|
+
capitalize: {
|
|
463
|
+
enter: !0,
|
|
464
|
+
space: !0,
|
|
465
|
+
tab: !0
|
|
466
|
+
},
|
|
467
|
+
lowercase: {
|
|
468
|
+
enter: !0,
|
|
469
|
+
space: !0,
|
|
470
|
+
tab: !0
|
|
471
|
+
},
|
|
472
|
+
uppercase: {
|
|
473
|
+
enter: !0,
|
|
474
|
+
space: !0,
|
|
475
|
+
tab: !0
|
|
476
|
+
}
|
|
477
|
+
} }),
|
|
478
|
+
conflictsWith: ["@lexical/plain-text"],
|
|
479
|
+
dependencies: [
|
|
480
|
+
vr,
|
|
481
|
+
_t,
|
|
482
|
+
vt
|
|
483
|
+
],
|
|
484
|
+
mergeConfig: function(e, t) {
|
|
485
|
+
let n = S(e, t);
|
|
486
|
+
return t.escapeFormatTriggers && (n.escapeFormatTriggers = function(e, t) {
|
|
487
|
+
let n = S(e, t);
|
|
488
|
+
for (let r of Object.keys(t)) n[r] = yr(e[r], t[r]);
|
|
489
|
+
return n;
|
|
490
|
+
}(e.escapeFormatTriggers, t.escapeFormatTriggers)), n;
|
|
491
|
+
},
|
|
492
|
+
name: "@lexical/rich-text",
|
|
493
|
+
nodes: () => [Cr, xr],
|
|
494
|
+
register: (e, t, n) => kt(() => kr(e, n.getOutput().escapeFormatTriggers))
|
|
495
|
+
}),
|
|
496
|
+
_(Tt, { rules: [
|
|
497
|
+
Et({
|
|
498
|
+
$import: (e, t) => {
|
|
499
|
+
let n = Z(t.nodeName.toLowerCase());
|
|
500
|
+
return je(t, n), w(n, t), Ae(n, t), [n.splice(0, 0, e.$importChildren(t))];
|
|
501
|
+
},
|
|
502
|
+
match: Ct.tag("h1", "h2", "h3", "h4", "h5", "h6"),
|
|
503
|
+
name: "@lexical/rich-text/heading"
|
|
504
|
+
}),
|
|
505
|
+
Et({
|
|
506
|
+
$import: (e, t) => {
|
|
507
|
+
let n = Sr();
|
|
508
|
+
return w(n, t), je(t, n), Ae(n, t), [n.splice(0, 0, e.$importChildren(t))];
|
|
509
|
+
},
|
|
510
|
+
match: Ct.tag("blockquote"),
|
|
511
|
+
name: "@lexical/rich-text/blockquote"
|
|
512
|
+
}),
|
|
513
|
+
Et({
|
|
514
|
+
$import: (e, t, n) => {
|
|
515
|
+
let r = t.firstChild;
|
|
516
|
+
return r && nt(i = r) && i.nodeName === "SPAN" && i.style.fontSize === "26pt" ? e.$importChildren(t) : n();
|
|
517
|
+
var i;
|
|
518
|
+
},
|
|
519
|
+
match: Ct.tag("p"),
|
|
520
|
+
name: "@lexical/rich-text/google-docs-title-p"
|
|
521
|
+
}),
|
|
522
|
+
Et({
|
|
523
|
+
$import: (e, t, n) => t.style.fontSize === "26pt" ? [Z("h1").splice(0, 0, e.$importChildren(t))] : n(),
|
|
524
|
+
match: Ct.tag("span"),
|
|
525
|
+
name: "@lexical/rich-text/google-docs-title-span"
|
|
526
|
+
})
|
|
527
|
+
] })
|
|
528
|
+
],
|
|
529
|
+
name: "@lexical/rich-text/Import"
|
|
530
|
+
});
|
|
531
|
+
var br = De("DRAG_DROP_PASTE_FILE"), xr = class e extends Me {
|
|
471
532
|
static getType() {
|
|
472
533
|
return "quote";
|
|
473
534
|
}
|
|
@@ -476,20 +537,20 @@ var Z = typeof window < "u" && window.document !== void 0 && window.document.cre
|
|
|
476
537
|
}
|
|
477
538
|
createDOM(e) {
|
|
478
539
|
let t = document.createElement("blockquote");
|
|
479
|
-
return
|
|
540
|
+
return ue(t, e.theme.quote), t;
|
|
480
541
|
}
|
|
481
542
|
updateDOM(e, t) {
|
|
482
543
|
return !1;
|
|
483
544
|
}
|
|
484
545
|
static importDOM() {
|
|
485
546
|
return { blockquote: (e) => ({
|
|
486
|
-
conversion:
|
|
547
|
+
conversion: Tr,
|
|
487
548
|
priority: 0
|
|
488
549
|
}) };
|
|
489
550
|
}
|
|
490
551
|
exportDOM(e) {
|
|
491
552
|
let { element: t } = super.exportDOM(e);
|
|
492
|
-
if (
|
|
553
|
+
if (nt(t)) {
|
|
493
554
|
this.isEmpty() && t.append(document.createElement("br"));
|
|
494
555
|
let e = this.getFormatType();
|
|
495
556
|
e && (t.style.textAlign = e);
|
|
@@ -499,24 +560,24 @@ var Z = typeof window < "u" && window.document !== void 0 && window.document.cre
|
|
|
499
560
|
return { element: t };
|
|
500
561
|
}
|
|
501
562
|
static importJSON(e) {
|
|
502
|
-
return
|
|
563
|
+
return Sr().updateFromJSON(e);
|
|
503
564
|
}
|
|
504
565
|
insertNewAfter(e, t) {
|
|
505
|
-
let n =
|
|
566
|
+
let n = M(), r = this.getDirection();
|
|
506
567
|
return n.setDirection(r), this.insertAfter(n, t), n;
|
|
507
568
|
}
|
|
508
569
|
collapseAtStart() {
|
|
509
|
-
let e =
|
|
570
|
+
let e = M();
|
|
510
571
|
return this.getChildren().forEach((t) => e.append(t)), this.replace(e), !0;
|
|
511
572
|
}
|
|
512
573
|
canMergeWhenEmpty() {
|
|
513
574
|
return !0;
|
|
514
575
|
}
|
|
515
576
|
};
|
|
516
|
-
function
|
|
517
|
-
return
|
|
577
|
+
function Sr() {
|
|
578
|
+
return Ee(new xr());
|
|
518
579
|
}
|
|
519
|
-
var
|
|
580
|
+
var Cr = class e extends Me {
|
|
520
581
|
__tag;
|
|
521
582
|
static getType() {
|
|
522
583
|
return "heading";
|
|
@@ -541,7 +602,7 @@ var pr = class e extends we {
|
|
|
541
602
|
let t = this.__tag, n = document.createElement(t), r = e.theme.heading;
|
|
542
603
|
if (r !== void 0) {
|
|
543
604
|
let e = r[t];
|
|
544
|
-
|
|
605
|
+
ue(n, e);
|
|
545
606
|
}
|
|
546
607
|
return n;
|
|
547
608
|
}
|
|
@@ -551,45 +612,45 @@ var pr = class e extends we {
|
|
|
551
612
|
static importDOM() {
|
|
552
613
|
return {
|
|
553
614
|
h1: (e) => ({
|
|
554
|
-
conversion:
|
|
615
|
+
conversion: X,
|
|
555
616
|
priority: 0
|
|
556
617
|
}),
|
|
557
618
|
h2: (e) => ({
|
|
558
|
-
conversion:
|
|
619
|
+
conversion: X,
|
|
559
620
|
priority: 0
|
|
560
621
|
}),
|
|
561
622
|
h3: (e) => ({
|
|
562
|
-
conversion:
|
|
623
|
+
conversion: X,
|
|
563
624
|
priority: 0
|
|
564
625
|
}),
|
|
565
626
|
h4: (e) => ({
|
|
566
|
-
conversion:
|
|
627
|
+
conversion: X,
|
|
567
628
|
priority: 0
|
|
568
629
|
}),
|
|
569
630
|
h5: (e) => ({
|
|
570
|
-
conversion:
|
|
631
|
+
conversion: X,
|
|
571
632
|
priority: 0
|
|
572
633
|
}),
|
|
573
634
|
h6: (e) => ({
|
|
574
|
-
conversion:
|
|
635
|
+
conversion: X,
|
|
575
636
|
priority: 0
|
|
576
637
|
}),
|
|
577
638
|
p: (e) => {
|
|
578
639
|
let t = e.firstChild;
|
|
579
|
-
return t !== null &&
|
|
640
|
+
return t !== null && wr(t) ? {
|
|
580
641
|
conversion: () => ({ node: null }),
|
|
581
642
|
priority: 3
|
|
582
643
|
} : null;
|
|
583
644
|
},
|
|
584
|
-
span: (e) =>
|
|
585
|
-
conversion: (e) => ({ node:
|
|
645
|
+
span: (e) => wr(e) ? {
|
|
646
|
+
conversion: (e) => ({ node: Z("h1") }),
|
|
586
647
|
priority: 3
|
|
587
648
|
} : null
|
|
588
649
|
};
|
|
589
650
|
}
|
|
590
651
|
exportDOM(e) {
|
|
591
652
|
let { element: t } = super.exportDOM(e);
|
|
592
|
-
if (
|
|
653
|
+
if (nt(t)) {
|
|
593
654
|
this.isEmpty() && t.append(document.createElement("br"));
|
|
594
655
|
let e = this.getFormatType();
|
|
595
656
|
e && (t.style.textAlign = e);
|
|
@@ -599,7 +660,7 @@ var pr = class e extends we {
|
|
|
599
660
|
return { element: t };
|
|
600
661
|
}
|
|
601
662
|
static importJSON(e) {
|
|
602
|
-
return
|
|
663
|
+
return Z(e.tag).updateFromJSON(e);
|
|
603
664
|
}
|
|
604
665
|
updateFromJSON(e) {
|
|
605
666
|
return super.updateFromJSON(e).setTag(e.tag);
|
|
@@ -611,38 +672,41 @@ var pr = class e extends we {
|
|
|
611
672
|
};
|
|
612
673
|
}
|
|
613
674
|
insertNewAfter(e, t = !0) {
|
|
614
|
-
let n = e ? e.anchor.offset : 0, r = this.getLastDescendant(), i = !r || e && e.anchor.key === r.getKey() && n === r.getTextContentSize() || !e ?
|
|
675
|
+
let n = e ? e.anchor.offset : 0, r = this.getLastDescendant(), i = !r || e && e.anchor.key === r.getKey() && n === r.getTextContentSize() || !e ? M() : Z(this.getTag()), a = this.getDirection();
|
|
615
676
|
if (i.setDirection(a), this.insertAfter(i, t), n === 0 && !this.isEmpty() && e) {
|
|
616
|
-
let e =
|
|
677
|
+
let e = M();
|
|
617
678
|
e.select(), this.replace(e, !0);
|
|
618
679
|
}
|
|
619
680
|
return i;
|
|
620
681
|
}
|
|
621
682
|
collapseAtStart() {
|
|
622
|
-
|
|
623
|
-
|
|
683
|
+
if (this.isEmpty()) {
|
|
684
|
+
let e = M();
|
|
685
|
+
this.getChildren().forEach((t) => e.append(t)), this.replace(e);
|
|
686
|
+
}
|
|
687
|
+
return !0;
|
|
624
688
|
}
|
|
625
689
|
extractWithChild() {
|
|
626
690
|
return !0;
|
|
627
691
|
}
|
|
628
692
|
};
|
|
629
|
-
function
|
|
693
|
+
function wr(e) {
|
|
630
694
|
return e.nodeName.toLowerCase() === "span" && e.style.fontSize === "26pt";
|
|
631
695
|
}
|
|
632
|
-
function
|
|
696
|
+
function X(e) {
|
|
633
697
|
let t = e.nodeName.toLowerCase(), n = null;
|
|
634
|
-
return t !== "h1" && t !== "h2" && t !== "h3" && t !== "h4" && t !== "h5" && t !== "h6" || (n =
|
|
698
|
+
return t !== "h1" && t !== "h2" && t !== "h3" && t !== "h4" && t !== "h5" && t !== "h6" || (n = Z(t), je(e, n), w(n, e), Ae(n, e)), { node: n };
|
|
635
699
|
}
|
|
636
|
-
function
|
|
637
|
-
let t =
|
|
638
|
-
return
|
|
700
|
+
function Tr(e) {
|
|
701
|
+
let t = Sr();
|
|
702
|
+
return w(t, e), je(e, t), Ae(t, e), { node: t };
|
|
639
703
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
704
|
+
function Z(e = "h1") {
|
|
705
|
+
return Ee(new Cr(e));
|
|
642
706
|
}
|
|
643
|
-
function
|
|
707
|
+
function Er(e) {
|
|
644
708
|
let t = null;
|
|
645
|
-
if (
|
|
709
|
+
if (L(e, DragEvent) ? t = e.dataTransfer : L(e, ClipboardEvent) && (t = e.clipboardData), t === null) return [
|
|
646
710
|
!1,
|
|
647
711
|
[],
|
|
648
712
|
!1
|
|
@@ -654,230 +718,286 @@ function _r(e) {
|
|
|
654
718
|
i
|
|
655
719
|
];
|
|
656
720
|
}
|
|
657
|
-
function
|
|
658
|
-
return
|
|
721
|
+
function Dr(e) {
|
|
722
|
+
return F(b(e));
|
|
659
723
|
}
|
|
660
|
-
function
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
724
|
+
function Q(e, t, n, r) {
|
|
725
|
+
let i = !1, a = null;
|
|
726
|
+
if (e.isCollapsed() && e.anchor.type === "text") {
|
|
727
|
+
let t = e.anchor.getNode();
|
|
728
|
+
if (O(t)) {
|
|
729
|
+
a = t;
|
|
730
|
+
let r = e.anchor.offset, o = r === t.getTextContentSize() && t.getNextSibling() === null, s = r === 0 && t.getPreviousSibling() === null;
|
|
731
|
+
i = n === "end" && o || n === "start" && s || n === "both" && (o || s);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
let o = !1;
|
|
735
|
+
for (let [n, s] of Object.entries(r)) {
|
|
736
|
+
if (s == null || !s[t]) continue;
|
|
737
|
+
let r = n;
|
|
738
|
+
if (s.onlyAtBoundary) {
|
|
739
|
+
if (!(i && a && O(a) && a.hasFormat(r))) continue;
|
|
740
|
+
o = !0;
|
|
741
|
+
}
|
|
742
|
+
e.hasFormat(r) && e.toggleFormat(r);
|
|
743
|
+
}
|
|
744
|
+
o && e.setStyle("");
|
|
666
745
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
},
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
746
|
+
var Or = {
|
|
747
|
+
capitalize: {
|
|
748
|
+
enter: !0,
|
|
749
|
+
space: !0,
|
|
750
|
+
tab: !0
|
|
751
|
+
},
|
|
752
|
+
lowercase: {
|
|
753
|
+
enter: !0,
|
|
754
|
+
space: !0,
|
|
755
|
+
tab: !0
|
|
756
|
+
},
|
|
757
|
+
uppercase: {
|
|
758
|
+
enter: !0,
|
|
759
|
+
space: !0,
|
|
760
|
+
tab: !0
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
function kr(e, t = St(Or)) {
|
|
764
|
+
return I(e.registerCommand(ae, () => {
|
|
765
|
+
let e = N();
|
|
766
|
+
return j(e) ? (e.clear(), !0) : (k(e) && Q(e, "click", "both", t.peek()), !1);
|
|
767
|
+
}, 0), e.registerCommand(we, (e) => {
|
|
768
|
+
let t = N();
|
|
769
|
+
return k(t) ? (t.deleteCharacter(e), !0) : !!j(t) && (t.deleteNodes(), !0);
|
|
770
|
+
}, 0), e.registerCommand(Oe, (e) => {
|
|
771
|
+
let t = N();
|
|
772
|
+
return !!k(t) && (t.deleteWord(e), !0);
|
|
773
|
+
}, 0), e.registerCommand(v, (e) => {
|
|
774
|
+
let t = N();
|
|
775
|
+
return !!k(t) && (t.deleteLine(e), !0);
|
|
776
|
+
}, 0), e.registerCommand(at, (t) => {
|
|
777
|
+
let n = N();
|
|
682
778
|
if (typeof t == "string") n !== null && n.insertText(t);
|
|
683
779
|
else {
|
|
684
780
|
if (n === null) return !1;
|
|
685
781
|
let r = t.dataTransfer;
|
|
686
|
-
if (r != null)
|
|
687
|
-
else if (
|
|
782
|
+
if (r != null) It(r, n, e);
|
|
783
|
+
else if (k(n)) {
|
|
688
784
|
let e = t.data;
|
|
689
785
|
return e && n.insertText(e), !0;
|
|
690
786
|
}
|
|
691
787
|
}
|
|
692
788
|
return !0;
|
|
693
|
-
}, 0), e.registerCommand(
|
|
694
|
-
let e =
|
|
695
|
-
return !!
|
|
696
|
-
}, 0), e.registerCommand(
|
|
697
|
-
let t =
|
|
698
|
-
return !!
|
|
699
|
-
}, 0), e.registerCommand(
|
|
700
|
-
let t =
|
|
701
|
-
if (!
|
|
789
|
+
}, 0), e.registerCommand(re, () => {
|
|
790
|
+
let e = N();
|
|
791
|
+
return !!k(e) && (e.removeText(), !0);
|
|
792
|
+
}, 0), e.registerCommand(et, (e) => {
|
|
793
|
+
let t = N();
|
|
794
|
+
return !!k(t) && (t.formatText(e), !0);
|
|
795
|
+
}, 0), e.registerCommand(Pe, (e) => {
|
|
796
|
+
let t = N();
|
|
797
|
+
if (!k(t) && !j(t)) return !1;
|
|
702
798
|
let n = t.getNodes();
|
|
703
799
|
for (let t of n) {
|
|
704
|
-
let n =
|
|
800
|
+
let n = Be(t, (e) => ct(e) && !e.isInline());
|
|
705
801
|
n !== null && n.setFormat(e);
|
|
706
802
|
}
|
|
707
803
|
return !0;
|
|
708
|
-
}, 0), e.registerCommand(
|
|
709
|
-
let t =
|
|
710
|
-
return !!
|
|
711
|
-
}, 0), e.registerCommand(
|
|
712
|
-
let e =
|
|
713
|
-
return !!
|
|
714
|
-
}, 0), e.registerCommand(
|
|
715
|
-
let e =
|
|
716
|
-
return
|
|
717
|
-
}, 0), e.registerCommand(
|
|
804
|
+
}, 0), e.registerCommand(Se, (e) => {
|
|
805
|
+
let t = N();
|
|
806
|
+
return !!k(t) && (t.insertLineBreak(e), !0);
|
|
807
|
+
}, 0), e.registerCommand(Fe, () => {
|
|
808
|
+
let e = N();
|
|
809
|
+
return !!k(e) && (e.insertParagraph(), !0);
|
|
810
|
+
}, 0), e.registerCommand(Te, () => {
|
|
811
|
+
let e = ee(), t = N();
|
|
812
|
+
return k(t) && (e.setFormat(t.format), e.setStyle(t.style)), $e([e]), !0;
|
|
813
|
+
}, 0), e.registerCommand(le, () => ft((e) => {
|
|
718
814
|
let t = e.getIndent();
|
|
719
815
|
e.setIndent(t + 1);
|
|
720
|
-
}), 0), e.registerCommand(
|
|
816
|
+
}), 0), e.registerCommand(Xe, () => ft((e) => {
|
|
721
817
|
let t = e.getIndent();
|
|
722
818
|
t > 0 && e.setIndent(Math.max(0, t - 1));
|
|
723
|
-
}), 0), e.registerCommand(
|
|
724
|
-
let t =
|
|
725
|
-
if (
|
|
819
|
+
}), 0), e.registerCommand(g, (e) => {
|
|
820
|
+
let t = N();
|
|
821
|
+
if (j(t)) {
|
|
726
822
|
let n = t.getNodes();
|
|
727
823
|
if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
|
|
728
|
-
} else if (
|
|
729
|
-
let n =
|
|
730
|
-
if (!e.shiftKey &&
|
|
824
|
+
} else if (k(t)) {
|
|
825
|
+
let n = ce(t.focus, !0);
|
|
826
|
+
if (!e.shiftKey && F(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
|
|
731
827
|
}
|
|
732
828
|
return !1;
|
|
733
|
-
}, 0), e.registerCommand(
|
|
734
|
-
let t =
|
|
735
|
-
if (
|
|
829
|
+
}, 0), e.registerCommand(He, (e) => {
|
|
830
|
+
let t = N();
|
|
831
|
+
if (j(t)) {
|
|
736
832
|
let n = t.getNodes();
|
|
737
833
|
if (n.length > 0) return e.preventDefault(), n[0].selectNext(0, 0), !0;
|
|
738
|
-
} else if (
|
|
834
|
+
} else if (k(t)) {
|
|
739
835
|
if (function(e) {
|
|
740
836
|
let t = e.focus;
|
|
741
|
-
return t.key === "root" && t.offset ===
|
|
837
|
+
return t.key === "root" && t.offset === D().getChildrenSize();
|
|
742
838
|
}(t)) return e.preventDefault(), !0;
|
|
743
|
-
let n =
|
|
744
|
-
if (!e.shiftKey &&
|
|
839
|
+
let n = ce(t.focus, !1);
|
|
840
|
+
if (!e.shiftKey && F(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
|
|
745
841
|
}
|
|
746
842
|
return !1;
|
|
747
|
-
}, 0), e.registerCommand(
|
|
748
|
-
let
|
|
749
|
-
if (
|
|
750
|
-
let
|
|
751
|
-
if (
|
|
843
|
+
}, 0), e.registerCommand(it, (e) => {
|
|
844
|
+
let n = N();
|
|
845
|
+
if (j(n)) {
|
|
846
|
+
let t = n.getNodes();
|
|
847
|
+
if (t.length > 0) return e.preventDefault(), dt(t[0]) ? t[0].selectNext(0, 0) : t[0].selectPrevious(), !0;
|
|
752
848
|
}
|
|
753
|
-
if (!
|
|
754
|
-
if (
|
|
755
|
-
let
|
|
756
|
-
return e.preventDefault(),
|
|
849
|
+
if (!k(n)) return !1;
|
|
850
|
+
if (e.shiftKey || Q(n, "arrow", "start", t.peek()), ht(n, !0)) {
|
|
851
|
+
let t = e.shiftKey;
|
|
852
|
+
return e.preventDefault(), pt(n, t, !0), !0;
|
|
757
853
|
}
|
|
758
854
|
return !1;
|
|
759
|
-
}, 0), e.registerCommand(
|
|
760
|
-
let
|
|
761
|
-
if (
|
|
762
|
-
let
|
|
763
|
-
if (
|
|
855
|
+
}, 0), e.registerCommand(T, (e) => {
|
|
856
|
+
let n = N();
|
|
857
|
+
if (j(n)) {
|
|
858
|
+
let t = n.getNodes();
|
|
859
|
+
if (t.length > 0) return e.preventDefault(), dt(t[0]) ? t[0].selectPrevious() : t[0].selectNext(0, 0), !0;
|
|
860
|
+
}
|
|
861
|
+
if (!k(n)) return !1;
|
|
862
|
+
if (e.shiftKey || Q(n, "arrow", "end", t.peek()), ht(n, !1)) {
|
|
863
|
+
let t = e.shiftKey;
|
|
864
|
+
return e.preventDefault(), pt(n, t, !1), !0;
|
|
764
865
|
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
if (
|
|
770
|
-
let n = M();
|
|
771
|
-
if (P(n)) {
|
|
866
|
+
return !1;
|
|
867
|
+
}, 0), e.registerCommand(de, (t) => {
|
|
868
|
+
if (Dr(t.target)) return !1;
|
|
869
|
+
let n = N();
|
|
870
|
+
if (k(n)) {
|
|
772
871
|
if (function(e) {
|
|
773
872
|
if (!e.isCollapsed()) return !1;
|
|
774
873
|
let { anchor: t } = e;
|
|
775
874
|
if (t.offset !== 0) return !1;
|
|
776
875
|
let n = t.getNode();
|
|
777
|
-
if (
|
|
778
|
-
let r =
|
|
876
|
+
if (We(n)) return !1;
|
|
877
|
+
let r = gt(n);
|
|
779
878
|
return r.getIndent() > 0 && (r.is(n) || n.is(r.getFirstDescendant()));
|
|
780
|
-
}(n)) return t.preventDefault(), e.dispatchCommand(
|
|
781
|
-
if (
|
|
782
|
-
} else if (!
|
|
783
|
-
return t.preventDefault(), e.dispatchCommand(
|
|
784
|
-
}, 0), e.registerCommand(
|
|
785
|
-
if (
|
|
786
|
-
let n =
|
|
787
|
-
return !(!
|
|
788
|
-
}, 0), e.registerCommand(
|
|
789
|
-
let
|
|
790
|
-
if (
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
879
|
+
}(n)) return t.preventDefault(), e.dispatchCommand(Xe, void 0);
|
|
880
|
+
if (ot && navigator.language === "ko-KR") return !1;
|
|
881
|
+
} else if (!j(n)) return !1;
|
|
882
|
+
return t.preventDefault(), e.dispatchCommand(we, !0);
|
|
883
|
+
}, 0), e.registerCommand(fe, (t) => {
|
|
884
|
+
if (Dr(t.target)) return !1;
|
|
885
|
+
let n = N();
|
|
886
|
+
return !(!k(n) && !j(n)) && (t.preventDefault(), e.dispatchCommand(we, !1));
|
|
887
|
+
}, 0), e.registerCommand(ye, (n) => {
|
|
888
|
+
let r = N();
|
|
889
|
+
if (j(r)) {
|
|
890
|
+
let e = r.getNodes();
|
|
891
|
+
e.length === 1 && F(e[0]) && !e[0].isInline() && (r = e[0].selectNext());
|
|
892
|
+
}
|
|
893
|
+
if (!k(r)) return !1;
|
|
894
|
+
if (Q(r, "enter", "both", t.peek()), n !== null) {
|
|
895
|
+
if ((ot || ie || pe) && be) return !1;
|
|
896
|
+
if (n.preventDefault(), n.shiftKey) return e.dispatchCommand(Se, !1);
|
|
794
897
|
}
|
|
795
|
-
return e.dispatchCommand(
|
|
796
|
-
}, 0), e.registerCommand(
|
|
797
|
-
let [, n] =
|
|
898
|
+
return e.dispatchCommand(Fe, void 0);
|
|
899
|
+
}, 0), e.registerCommand(ze, () => !!k(N()) && (e.blur(), !0), 0), e.registerCommand(me, (t) => {
|
|
900
|
+
let [, n] = Er(t);
|
|
798
901
|
if (n.length > 0) {
|
|
799
|
-
let r =
|
|
800
|
-
if (
|
|
801
|
-
let { offset: t, node:
|
|
802
|
-
if (
|
|
803
|
-
let e =
|
|
804
|
-
if (
|
|
902
|
+
let r = t.clientX, i = t.clientY, a = Pt(r, i);
|
|
903
|
+
if (a !== null) {
|
|
904
|
+
let { offset: t, node: r } = a, i = b(r);
|
|
905
|
+
if (i !== null) {
|
|
906
|
+
let e = Ye();
|
|
907
|
+
if (O(i)) e.anchor.set(i.getKey(), t, "text"), e.focus.set(i.getKey(), t, "text");
|
|
805
908
|
else {
|
|
806
|
-
let t =
|
|
909
|
+
let t = i.getParentOrThrow().getKey(), n = i.getIndexWithinParent() + 1;
|
|
807
910
|
e.anchor.set(t, n, "element"), e.focus.set(t, n, "element");
|
|
808
911
|
}
|
|
809
|
-
|
|
912
|
+
ge(ke(e));
|
|
810
913
|
}
|
|
811
|
-
e.dispatchCommand(
|
|
914
|
+
e.dispatchCommand(br, n);
|
|
812
915
|
}
|
|
813
916
|
return t.preventDefault(), !0;
|
|
814
917
|
}
|
|
815
|
-
return
|
|
816
|
-
}, 0), e.registerCommand(
|
|
817
|
-
let [n] =
|
|
818
|
-
return !(n && !
|
|
819
|
-
}, 0), e.registerCommand(
|
|
820
|
-
let [t] =
|
|
821
|
-
if (t && !
|
|
822
|
-
let r =
|
|
823
|
-
return
|
|
824
|
-
}, 0), e.registerCommand(
|
|
825
|
-
await
|
|
826
|
-
let e =
|
|
827
|
-
|
|
918
|
+
return Mt(t, e);
|
|
919
|
+
}, 0), e.registerCommand(_e, (t) => {
|
|
920
|
+
let [n] = Er(t), r = N();
|
|
921
|
+
return !(n && !k(r)) && (k(r) && !r.isCollapsed() && t.dataTransfer !== null && (Nt(t.dataTransfer, Ft(r)), At(t.dataTransfer, e)), !0);
|
|
922
|
+
}, 0), e.registerCommand(xe, (e) => {
|
|
923
|
+
let [t] = Er(e), n = N();
|
|
924
|
+
if (t && !k(n)) return !1;
|
|
925
|
+
let r = e.clientX, i = e.clientY, a = Pt(r, i);
|
|
926
|
+
return a !== null && F(b(a.node)) && e.preventDefault(), !0;
|
|
927
|
+
}, 0), e.registerCommand(Ne, () => (oe(), !0), 0), e.registerCommand(Je, (t) => (jt(e, L(t, ClipboardEvent) ? t : null), !0), 0), e.registerCommand(Ze, (t) => (async function(e, t) {
|
|
928
|
+
await jt(t, L(e, ClipboardEvent) ? e : null), t.update(() => {
|
|
929
|
+
let e = N();
|
|
930
|
+
k(e) ? e.removeText() : j(e) && e.getNodes().forEach((e) => e.remove());
|
|
828
931
|
});
|
|
829
|
-
}(t, e), !0), 0), e.registerCommand(
|
|
830
|
-
let [, n, r] =
|
|
831
|
-
return n.length > 0 && !r ? (e.dispatchCommand(
|
|
932
|
+
}(t, e), !0), 0), e.registerCommand(se, (t) => {
|
|
933
|
+
let [, n, r] = Er(t);
|
|
934
|
+
return n.length > 0 && !r ? (e.dispatchCommand(br, n), !0) : Le(t.target) && E(t.target) ? !1 : N() !== null && (function(e, t) {
|
|
832
935
|
e.preventDefault(), t.update(() => {
|
|
833
|
-
let n =
|
|
834
|
-
r != null && n !== null &&
|
|
936
|
+
let n = N(), r = L(e, InputEvent) || L(e, KeyboardEvent) ? null : e.clipboardData;
|
|
937
|
+
r != null && n !== null && It(r, n, t);
|
|
835
938
|
}, { tag: "paste" });
|
|
836
939
|
}(t, e), !0);
|
|
837
|
-
}, 0), e.registerCommand(
|
|
838
|
-
let
|
|
839
|
-
return
|
|
840
|
-
}, 0), e.registerCommand(
|
|
841
|
-
let
|
|
842
|
-
return
|
|
940
|
+
}, 0), e.registerCommand(x, () => {
|
|
941
|
+
let e = N();
|
|
942
|
+
return k(e) && Q(e, "space", "both", t.peek()), !1;
|
|
943
|
+
}, 0), e.registerCommand(qe, () => {
|
|
944
|
+
let e = N();
|
|
945
|
+
return k(e) && Q(e, "tab", "both", t.peek()), !1;
|
|
946
|
+
}, 0), e.registerCommand(Ce, (e) => {
|
|
947
|
+
let t = N();
|
|
948
|
+
if (!k(t)) return !1;
|
|
949
|
+
let { anchor: n } = t;
|
|
950
|
+
if (n.type !== "element" || n.offset !== 0) return !1;
|
|
951
|
+
let r = n.getNode();
|
|
952
|
+
if (!ct(r)) return !1;
|
|
953
|
+
let i = r.getFirstChild();
|
|
954
|
+
if (!F(i) || !i.isInline()) return !1;
|
|
955
|
+
let a = r.getLastDescendant();
|
|
956
|
+
if (a == null || F(a)) return !1;
|
|
957
|
+
let o = r.getKey(), s = r.selectEnd();
|
|
958
|
+
return e.shiftKey && s.anchor.set(o, 0, "element"), e.preventDefault(), e.stopPropagation(), !0;
|
|
959
|
+
}, 0), e.registerCommand(st, (e) => {
|
|
960
|
+
let t = N();
|
|
961
|
+
if (!k(t)) return !1;
|
|
962
|
+
let { anchor: n, focus: r } = t, i = Be(r.getNode(), (e) => ct(e) && !e.isInline());
|
|
963
|
+
if (i === null) return !1;
|
|
964
|
+
let a = i.getFirstChild();
|
|
965
|
+
if (!F(a) || !a.isInline()) return !1;
|
|
966
|
+
let o = i.getLastDescendant();
|
|
967
|
+
if (o == null || F(o) || Be(n.getNode(), (e) => ct(e) && !e.isInline()) !== i) return !1;
|
|
968
|
+
let s = i.getKey();
|
|
969
|
+
return (r.type !== "element" || r.key !== s || r.offset !== 0) && (t.focus.set(s, 0, "element"), e.shiftKey || t.anchor.set(s, 0, "element"), e.preventDefault(), e.stopPropagation(), !0);
|
|
843
970
|
}, 0));
|
|
844
971
|
}
|
|
845
|
-
D({
|
|
846
|
-
conflictsWith: ["@lexical/plain-text"],
|
|
847
|
-
dependencies: [er],
|
|
848
|
-
name: "@lexical/rich-text",
|
|
849
|
-
nodes: () => [pr, dr],
|
|
850
|
-
register: br
|
|
851
|
-
});
|
|
852
972
|
//#endregion
|
|
853
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
854
|
-
function
|
|
973
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalRichTextPlugin.prod.mjs
|
|
974
|
+
function Ar(e, ...t) {
|
|
855
975
|
let n = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
856
976
|
r.append("code", e);
|
|
857
977
|
for (let e of t) r.append("v", e);
|
|
858
978
|
throw n.search = r.toString(), Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
859
979
|
}
|
|
860
|
-
var
|
|
861
|
-
function
|
|
980
|
+
var jr = Ve ? Wn : H;
|
|
981
|
+
function Mr({ editor: e, ErrorBoundary: t }) {
|
|
862
982
|
return function(e, t) {
|
|
863
|
-
let [n, r] =
|
|
864
|
-
return
|
|
865
|
-
|
|
983
|
+
let [n, r] = G(() => e.getDecorators());
|
|
984
|
+
return jr(() => e.registerDecoratorListener((e) => {
|
|
985
|
+
Jn(() => {
|
|
866
986
|
r(e);
|
|
867
987
|
});
|
|
868
988
|
}), [e]), H(() => {
|
|
869
989
|
r(e.getDecorators());
|
|
870
|
-
}, [e]),
|
|
990
|
+
}, [e]), Gn(() => {
|
|
871
991
|
let r = [], i = Object.keys(n);
|
|
872
992
|
for (let a = 0; a < i.length; a++) {
|
|
873
|
-
let o = i[a], s =
|
|
993
|
+
let o = i[a], s = K(t, {
|
|
874
994
|
onError: (t) => e._onError(t),
|
|
875
|
-
children:
|
|
995
|
+
children: K(Ln, {
|
|
876
996
|
fallback: null,
|
|
877
997
|
children: n[o]
|
|
878
998
|
})
|
|
879
999
|
}), c = e.getElementByKey(o);
|
|
880
|
-
c !== null && r.push(
|
|
1000
|
+
c !== null && r.push(qn(s, c, o));
|
|
881
1001
|
}
|
|
882
1002
|
return r;
|
|
883
1003
|
}, [
|
|
@@ -887,65 +1007,65 @@ function Cr({ editor: e, ErrorBoundary: t }) {
|
|
|
887
1007
|
]);
|
|
888
1008
|
}(e, t);
|
|
889
1009
|
}
|
|
890
|
-
function
|
|
1010
|
+
function Nr({ editor: e, ErrorBoundary: t }) {
|
|
891
1011
|
return function(e) {
|
|
892
|
-
let t =
|
|
893
|
-
if (t && t.hasExtensionByName(
|
|
894
|
-
for (let e of ["@lexical/plain-text", "@lexical/rich-text"]) t.hasExtensionByName(e) &&
|
|
1012
|
+
let t = Dt.maybeFromEditor(e);
|
|
1013
|
+
if (t && t.hasExtensionByName(fr.name)) {
|
|
1014
|
+
for (let e of ["@lexical/plain-text", "@lexical/rich-text"]) t.hasExtensionByName(e) && Ar(320, e);
|
|
895
1015
|
return !0;
|
|
896
1016
|
}
|
|
897
1017
|
return !1;
|
|
898
|
-
}(e) ? null :
|
|
1018
|
+
}(e) ? null : K(Mr, {
|
|
899
1019
|
editor: e,
|
|
900
1020
|
ErrorBoundary: t
|
|
901
1021
|
});
|
|
902
1022
|
}
|
|
903
|
-
function
|
|
904
|
-
return e.getEditorState().read(
|
|
1023
|
+
function Pr(e) {
|
|
1024
|
+
return e.getEditorState().read(gr(e.isComposing()));
|
|
905
1025
|
}
|
|
906
|
-
function
|
|
1026
|
+
function Fr({ contentEditable: e, placeholder: t = null, ErrorBoundary: n }) {
|
|
907
1027
|
let [r] = h();
|
|
908
1028
|
return function(e) {
|
|
909
|
-
|
|
910
|
-
}(r),
|
|
1029
|
+
jr(() => I(kr(e), _r(e)), [e]);
|
|
1030
|
+
}(r), q(Kn, { children: [
|
|
911
1031
|
e,
|
|
912
|
-
|
|
913
|
-
|
|
1032
|
+
K(Ir, { content: t }),
|
|
1033
|
+
K(Nr, {
|
|
914
1034
|
editor: r,
|
|
915
1035
|
ErrorBoundary: n
|
|
916
1036
|
})
|
|
917
1037
|
] });
|
|
918
1038
|
}
|
|
919
|
-
function
|
|
1039
|
+
function Ir({ content: e }) {
|
|
920
1040
|
let [t] = h(), n = function(e) {
|
|
921
|
-
let [t, n] =
|
|
922
|
-
return
|
|
1041
|
+
let [t, n] = G(() => Pr(e));
|
|
1042
|
+
return jr(() => {
|
|
923
1043
|
function t() {
|
|
924
|
-
n(
|
|
1044
|
+
n(Pr(e));
|
|
925
1045
|
}
|
|
926
|
-
return t(),
|
|
1046
|
+
return t(), I(e.registerUpdateListener(() => {
|
|
927
1047
|
t();
|
|
928
1048
|
}), e.registerEditableListener(() => {
|
|
929
1049
|
t();
|
|
930
1050
|
}));
|
|
931
1051
|
}, [e]), t;
|
|
932
|
-
}(t), r =
|
|
1052
|
+
}(t), r = lt();
|
|
933
1053
|
return n ? typeof e == "function" ? e(r) : e : null;
|
|
934
1054
|
}
|
|
935
1055
|
//#endregion
|
|
936
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
937
|
-
var
|
|
938
|
-
function
|
|
939
|
-
let [C, w] =
|
|
1056
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalContentEditable.prod.mjs
|
|
1057
|
+
var Lr = Ve ? Wn : H;
|
|
1058
|
+
function Rr({ editor: e, ariaActiveDescendant: t, ariaAutoComplete: n, ariaControls: r, ariaDescribedBy: i, ariaErrorMessage: a, ariaExpanded: o, ariaInvalid: s, ariaLabel: c, ariaLabelledBy: l, ariaMultiline: u, ariaOwns: d, ariaRequired: f, autoCapitalize: p, className: m, id: h, role: g = "textbox", spellCheck: _ = !0, style: v, tabIndex: y, "data-testid": b, ...x }, S) {
|
|
1059
|
+
let [C, w] = G(e.isEditable()), T = Hn((t) => {
|
|
940
1060
|
t && t.ownerDocument && t.ownerDocument.defaultView ? e.setRootElement(t) : e.setRootElement(null);
|
|
941
|
-
}, [e]), E =
|
|
1061
|
+
}, [e]), E = Gn(() => function(...e) {
|
|
942
1062
|
return (t) => {
|
|
943
1063
|
for (let n of e) typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
944
1064
|
};
|
|
945
1065
|
}(S, T), [T, S]);
|
|
946
|
-
return
|
|
1066
|
+
return Lr(() => (w(e.isEditable()), e.registerEditableListener((e) => {
|
|
947
1067
|
w(e);
|
|
948
|
-
})), [e]),
|
|
1068
|
+
})), [e]), K("div", {
|
|
949
1069
|
"aria-activedescendant": C ? t : void 0,
|
|
950
1070
|
"aria-autocomplete": C ? n : "none",
|
|
951
1071
|
"aria-controls": C ? r : void 0,
|
|
@@ -972,53 +1092,53 @@ function kr({ editor: e, ariaActiveDescendant: t, ariaAutoComplete: n, ariaContr
|
|
|
972
1092
|
...x
|
|
973
1093
|
});
|
|
974
1094
|
}
|
|
975
|
-
var
|
|
976
|
-
function
|
|
977
|
-
return e.getEditorState().read(
|
|
1095
|
+
var zr = Vn(Rr);
|
|
1096
|
+
function Br(e) {
|
|
1097
|
+
return e.getEditorState().read(gr(e.isComposing()));
|
|
978
1098
|
}
|
|
979
|
-
var
|
|
980
|
-
function
|
|
1099
|
+
var Vr = Vn(Hr);
|
|
1100
|
+
function Hr(e, t) {
|
|
981
1101
|
let { placeholder: n, ...r } = e, [i] = h();
|
|
982
|
-
return
|
|
1102
|
+
return q(Kn, { children: [K(zr, {
|
|
983
1103
|
editor: i,
|
|
984
1104
|
...r,
|
|
985
1105
|
ref: t
|
|
986
|
-
}), n != null &&
|
|
1106
|
+
}), n != null && K(Ur, {
|
|
987
1107
|
editor: i,
|
|
988
1108
|
content: n
|
|
989
1109
|
})] });
|
|
990
1110
|
}
|
|
991
|
-
function
|
|
1111
|
+
function Ur({ content: e, editor: t }) {
|
|
992
1112
|
let n = function(e) {
|
|
993
|
-
let [t, n] =
|
|
994
|
-
return
|
|
1113
|
+
let [t, n] = G(() => Br(e));
|
|
1114
|
+
return Lr(() => {
|
|
995
1115
|
function t() {
|
|
996
|
-
n(
|
|
1116
|
+
n(Br(e));
|
|
997
1117
|
}
|
|
998
|
-
return t(),
|
|
1118
|
+
return t(), I(e.registerUpdateListener(() => {
|
|
999
1119
|
t();
|
|
1000
1120
|
}), e.registerEditableListener(() => {
|
|
1001
1121
|
t();
|
|
1002
1122
|
}));
|
|
1003
1123
|
}, [e]), t;
|
|
1004
|
-
}(t), [r, i] =
|
|
1005
|
-
if (
|
|
1124
|
+
}(t), [r, i] = G(t.isEditable());
|
|
1125
|
+
if (Wn(() => (i(t.isEditable()), t.registerEditableListener((e) => {
|
|
1006
1126
|
i(e);
|
|
1007
1127
|
})), [t]), !n) return null;
|
|
1008
1128
|
let a = null;
|
|
1009
|
-
return typeof e == "function" ? a = e(r) : e !== null && (a = e), a === null ? null :
|
|
1129
|
+
return typeof e == "function" ? a = e(r) : e !== null && (a = e), a === null ? null : K("div", {
|
|
1010
1130
|
"aria-hidden": !0,
|
|
1011
1131
|
children: a
|
|
1012
1132
|
});
|
|
1013
1133
|
}
|
|
1014
1134
|
//#endregion
|
|
1015
1135
|
//#region node_modules/.pnpm/react-error-boundary@6.1.2_react@19.2.7/node_modules/react-error-boundary/dist/react-error-boundary.js
|
|
1016
|
-
var
|
|
1136
|
+
var Wr = Rn(null), Gr = {
|
|
1017
1137
|
didCatch: !1,
|
|
1018
1138
|
error: null
|
|
1019
|
-
},
|
|
1139
|
+
}, Kr = class extends In {
|
|
1020
1140
|
constructor(e) {
|
|
1021
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
1141
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Gr;
|
|
1022
1142
|
}
|
|
1023
1143
|
static getDerivedStateFromError(e) {
|
|
1024
1144
|
return {
|
|
@@ -1031,18 +1151,18 @@ var Fr = xn(null), Ir = {
|
|
|
1031
1151
|
t !== null && (this.props.onReset?.({
|
|
1032
1152
|
args: e,
|
|
1033
1153
|
reason: "imperative-api"
|
|
1034
|
-
}), this.setState(
|
|
1154
|
+
}), this.setState(Gr));
|
|
1035
1155
|
}
|
|
1036
1156
|
componentDidCatch(e, t) {
|
|
1037
1157
|
this.props.onError?.(e, t);
|
|
1038
1158
|
}
|
|
1039
1159
|
componentDidUpdate(e, t) {
|
|
1040
1160
|
let { didCatch: n } = this.state, { resetKeys: r } = this.props;
|
|
1041
|
-
n && t.error !== null &&
|
|
1161
|
+
n && t.error !== null && qr(e.resetKeys, r) && (this.props.onReset?.({
|
|
1042
1162
|
next: r,
|
|
1043
1163
|
prev: e.resetKeys,
|
|
1044
1164
|
reason: "keys"
|
|
1045
|
-
}), this.setState(
|
|
1165
|
+
}), this.setState(Gr));
|
|
1046
1166
|
}
|
|
1047
1167
|
render() {
|
|
1048
1168
|
let { children: e, fallbackRender: t, FallbackComponent: n, fallback: r } = this.props, { didCatch: i, error: a } = this.state, o = e;
|
|
@@ -1052,25 +1172,28 @@ var Fr = xn(null), Ir = {
|
|
|
1052
1172
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1053
1173
|
};
|
|
1054
1174
|
if (typeof t == "function") o = t(e);
|
|
1055
|
-
else if (n) o =
|
|
1175
|
+
else if (n) o = zn(n, e);
|
|
1056
1176
|
else if (r !== void 0) o = r;
|
|
1057
1177
|
else throw a;
|
|
1058
1178
|
}
|
|
1059
|
-
return
|
|
1179
|
+
return zn(Wr.Provider, { value: {
|
|
1060
1180
|
didCatch: i,
|
|
1061
1181
|
error: a,
|
|
1062
1182
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1063
1183
|
} }, o);
|
|
1064
1184
|
}
|
|
1065
1185
|
};
|
|
1066
|
-
function
|
|
1186
|
+
function qr(e = [], t = []) {
|
|
1067
1187
|
return e.length !== t.length || e.some((e, n) => !Object.is(e, t[n]));
|
|
1068
1188
|
}
|
|
1069
1189
|
//#endregion
|
|
1070
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1071
|
-
function
|
|
1072
|
-
|
|
1073
|
-
|
|
1190
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalErrorBoundary.prod.mjs
|
|
1191
|
+
function Jr({ children: e, onError: t }) {
|
|
1192
|
+
let n = Hn((e, n) => {
|
|
1193
|
+
t(e instanceof Error ? e : Error(String(e), { cause: e }), n);
|
|
1194
|
+
}, [t]);
|
|
1195
|
+
return K(Kr, {
|
|
1196
|
+
fallback: K("div", {
|
|
1074
1197
|
style: {
|
|
1075
1198
|
border: "1px solid #f00",
|
|
1076
1199
|
color: "#f00",
|
|
@@ -1078,16 +1201,16 @@ function zr({ children: e, onError: t }) {
|
|
|
1078
1201
|
},
|
|
1079
1202
|
children: "An error was thrown."
|
|
1080
1203
|
}),
|
|
1081
|
-
onError:
|
|
1204
|
+
onError: n,
|
|
1082
1205
|
children: e
|
|
1083
1206
|
});
|
|
1084
1207
|
}
|
|
1085
1208
|
//#endregion
|
|
1086
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1087
|
-
var
|
|
1088
|
-
function
|
|
1209
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalOnChangePlugin.prod.mjs
|
|
1210
|
+
var Yr = Ve ? Wn : H;
|
|
1211
|
+
function Xr({ ignoreHistoryMergeTagChange: e = !0, ignoreSelectionChange: t = !1, onChange: n }) {
|
|
1089
1212
|
let [r] = h();
|
|
1090
|
-
return
|
|
1213
|
+
return Yr(() => {
|
|
1091
1214
|
if (n) return r.registerUpdateListener(({ editorState: i, dirtyElements: a, dirtyLeaves: o, prevEditorState: s, tags: c }) => {
|
|
1092
1215
|
t && a.size === 0 && o.size === 0 || e && c.has("history-merge") || s.isEmpty() || n(i, r, c);
|
|
1093
1216
|
});
|
|
@@ -1099,26 +1222,26 @@ function Vr({ ignoreHistoryMergeTagChange: e = !0, ignoreSelectionChange: t = !1
|
|
|
1099
1222
|
]), null;
|
|
1100
1223
|
}
|
|
1101
1224
|
//#endregion
|
|
1102
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1103
|
-
function
|
|
1225
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalListPlugin.prod.mjs
|
|
1226
|
+
function Zr({ hasStrictIndent: e = !1, shouldPreserveNumbering: t = !1 }) {
|
|
1104
1227
|
let [n] = h();
|
|
1105
1228
|
return H(() => {
|
|
1106
|
-
if (!n.hasNodes([
|
|
1107
|
-
}, [n]), H(() =>
|
|
1229
|
+
if (!n.hasNodes([zt, Bt])) throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
|
|
1230
|
+
}, [n]), H(() => I(Rt(n, { restoreNumbering: t }), e ? Lt(n) : () => {}), [
|
|
1108
1231
|
n,
|
|
1109
1232
|
e,
|
|
1110
1233
|
t
|
|
1111
1234
|
]), function(e) {
|
|
1112
|
-
H(() =>
|
|
1235
|
+
H(() => Rt(e), [e]);
|
|
1113
1236
|
}(n), null;
|
|
1114
1237
|
}
|
|
1115
1238
|
//#endregion
|
|
1116
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1117
|
-
function
|
|
1239
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalLinkPlugin.prod.mjs
|
|
1240
|
+
function Qr({ validateUrl: e, attributes: t }) {
|
|
1118
1241
|
let [n] = h();
|
|
1119
1242
|
return H(() => {
|
|
1120
|
-
if (!n.hasNodes([
|
|
1121
|
-
}), H(() =>
|
|
1243
|
+
if (!n.hasNodes([z])) throw Error("LinkPlugin: LinkNode not registered on editor");
|
|
1244
|
+
}), H(() => Ht(n, R({
|
|
1122
1245
|
attributes: t,
|
|
1123
1246
|
validateUrl: e
|
|
1124
1247
|
})), [
|
|
@@ -1128,10 +1251,10 @@ function Ur({ validateUrl: e, attributes: t }) {
|
|
|
1128
1251
|
]), null;
|
|
1129
1252
|
}
|
|
1130
1253
|
//#endregion
|
|
1131
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1132
|
-
function
|
|
1254
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalClickableLinkPlugin.prod.mjs
|
|
1255
|
+
function $r({ newTab: e = !0, disabled: t = !1 }) {
|
|
1133
1256
|
let [n] = h();
|
|
1134
|
-
return H(() =>
|
|
1257
|
+
return H(() => Wt(n, R({
|
|
1135
1258
|
disabled: t,
|
|
1136
1259
|
newTab: e
|
|
1137
1260
|
})), [
|
|
@@ -1141,12 +1264,12 @@ function Wr({ newTab: e = !0, disabled: t = !1 }) {
|
|
|
1141
1264
|
]), null;
|
|
1142
1265
|
}
|
|
1143
1266
|
//#endregion
|
|
1144
|
-
//#region node_modules/.pnpm/@lexical+history@0.
|
|
1145
|
-
function
|
|
1267
|
+
//#region node_modules/.pnpm/@lexical+history@0.45.0/node_modules/@lexical/history/dist/LexicalHistory.prod.mjs
|
|
1268
|
+
function ei(e, t, n, r, i) {
|
|
1146
1269
|
if (e === null || n.size === 0 && r.size === 0 && !i) return 0;
|
|
1147
1270
|
let a = t._selection, o = e._selection;
|
|
1148
1271
|
if (i) return 1;
|
|
1149
|
-
if (!(
|
|
1272
|
+
if (!(k(a) && k(o) && o.isCollapsed() && a.isCollapsed())) return 0;
|
|
1150
1273
|
let s = function(e, t, n) {
|
|
1151
1274
|
let r = e._nodeMap, i = [];
|
|
1152
1275
|
for (let e of t) {
|
|
@@ -1156,17 +1279,17 @@ function Gr(e, t, n, r, i) {
|
|
|
1156
1279
|
for (let [e, t] of n) {
|
|
1157
1280
|
if (!t) continue;
|
|
1158
1281
|
let n = r.get(e);
|
|
1159
|
-
n === void 0 ||
|
|
1282
|
+
n === void 0 || We(n) || i.push(n);
|
|
1160
1283
|
}
|
|
1161
1284
|
return i;
|
|
1162
1285
|
}(t, n, r);
|
|
1163
1286
|
if (s.length === 0) return 0;
|
|
1164
1287
|
if (s.length > 1) {
|
|
1165
1288
|
let n = t._nodeMap, r = n.get(a.anchor.key), i = n.get(o.anchor.key);
|
|
1166
|
-
return r && i && !e._nodeMap.has(r.__key) &&
|
|
1289
|
+
return r && i && !e._nodeMap.has(r.__key) && O(r) && r.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
|
|
1167
1290
|
}
|
|
1168
1291
|
let c = s[0], l = e._nodeMap.get(c.__key);
|
|
1169
|
-
if (!
|
|
1292
|
+
if (!O(l) || !O(c) || l.__mode !== c.__mode) return 0;
|
|
1170
1293
|
let u = l.__text, d = c.__text;
|
|
1171
1294
|
if (u === d) return 0;
|
|
1172
1295
|
let f = a.anchor, p = o.anchor;
|
|
@@ -1174,14 +1297,14 @@ function Gr(e, t, n, r, i) {
|
|
|
1174
1297
|
let m = f.offset, h = p.offset, g = d.length - u.length;
|
|
1175
1298
|
return g === 1 && h === m - 1 ? 2 : g === -1 && h === m + 1 ? 3 : g === -1 && h === m ? 4 : 0;
|
|
1176
1299
|
}
|
|
1177
|
-
function
|
|
1300
|
+
function ti(e, t, n) {
|
|
1178
1301
|
let r = n(), i = 0, a = r, o = 0, s = null;
|
|
1179
1302
|
return (c, l, u, d, f, p) => {
|
|
1180
1303
|
let m = n();
|
|
1181
1304
|
if (p.has("composition-start") && (a = r, o = i, s = c), p.has("historic")) return i = 0, r = m, 2;
|
|
1182
1305
|
p.has("composition-end") && s && (r = a, i = o, c = s);
|
|
1183
|
-
let h =
|
|
1184
|
-
let n = u === null || u.editor === e, a = p.has(
|
|
1306
|
+
let h = ei(c, l, d, f, e.isComposing()), g = (() => {
|
|
1307
|
+
let n = u === null || u.editor === e, a = p.has(Ie);
|
|
1185
1308
|
if (!a && n && p.has("history-merge")) return 0;
|
|
1186
1309
|
if (h === 1) return 2;
|
|
1187
1310
|
if (c === null) return 1;
|
|
@@ -1190,101 +1313,122 @@ function Kr(e, t, n) {
|
|
|
1190
1313
|
let s = typeof t == "number" ? t : t.peek();
|
|
1191
1314
|
return !1 === a && h !== 0 && h === i && m < r + s && n || d.size === 1 && function(e, t, n) {
|
|
1192
1315
|
let r = t._nodeMap.get(e), i = n._nodeMap.get(e), a = t._selection, o = n._selection;
|
|
1193
|
-
return !(
|
|
1316
|
+
return !(k(a) && k(o) && a.anchor.type === "element" && a.focus.type === "element" && o.anchor.type === "text" && o.focus.type === "text" || !O(r) || !O(i) || r.__parent !== i.__parent) && JSON.stringify(t.read(() => r.exportJSON())) === JSON.stringify(n.read(() => i.exportJSON()));
|
|
1194
1317
|
}(Array.from(d)[0], c, l) ? 0 : 1;
|
|
1195
1318
|
})();
|
|
1196
1319
|
return r = m, i = h, g;
|
|
1197
1320
|
};
|
|
1198
1321
|
}
|
|
1199
|
-
function
|
|
1200
|
-
e.undoStack = [], e.redoStack = [], e.current = null;
|
|
1322
|
+
function ni(e, t) {
|
|
1323
|
+
e.undoStack = [], e.redoStack = [], e.current = null, t && t(e);
|
|
1201
1324
|
}
|
|
1202
|
-
function
|
|
1203
|
-
let
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1325
|
+
function ri(e, t, n, r = Date.now, i, a = null) {
|
|
1326
|
+
let o = ti(e, n, r), s = () => {
|
|
1327
|
+
i && i(t);
|
|
1328
|
+
};
|
|
1329
|
+
return s(), I(e.registerCommand(Qe, () => (function(e, t, n) {
|
|
1330
|
+
let r = t.redoStack, i = t.undoStack;
|
|
1331
|
+
if (i.length !== 0) {
|
|
1332
|
+
let a = t.current, o = i.pop();
|
|
1333
|
+
a !== null && (r.push(a), e.dispatchCommand(he, !0)), i.length === 0 && e.dispatchCommand(A, !1), t.current = o || null, n && n(t), o && o.editor.setEditorState(o.editorState, { tag: "historic" });
|
|
1209
1334
|
}
|
|
1210
|
-
}(e, t), !0), 0), e.registerCommand(
|
|
1211
|
-
let
|
|
1212
|
-
if (
|
|
1213
|
-
let
|
|
1214
|
-
|
|
1215
|
-
let
|
|
1216
|
-
|
|
1335
|
+
}(e, t, i), !0), 0), e.registerCommand(ve, () => (function(e, t, n) {
|
|
1336
|
+
let r = t.redoStack, i = t.undoStack;
|
|
1337
|
+
if (r.length !== 0) {
|
|
1338
|
+
let a = t.current;
|
|
1339
|
+
a !== null && (i.push(a), e.dispatchCommand(A, !0));
|
|
1340
|
+
let o = r.pop();
|
|
1341
|
+
r.length === 0 && e.dispatchCommand(he, !1), t.current = o || null, n && n(t), o && o.editor.setEditorState(o.editorState, { tag: "historic" });
|
|
1217
1342
|
}
|
|
1218
|
-
}(e, t), !0), 0), e.registerCommand(
|
|
1219
|
-
let
|
|
1220
|
-
if (
|
|
1221
|
-
let
|
|
1222
|
-
if (
|
|
1223
|
-
|
|
1343
|
+
}(e, t, i), !0), 0), e.registerCommand(Ge, () => (ni(t, i), !1), 0), e.registerCommand(tt, () => (ni(t, i), e.dispatchCommand(he, !1), e.dispatchCommand(A, !1), !0), 0), e.registerUpdateListener(({ editorState: n, prevEditorState: r, dirtyLeaves: i, dirtyElements: c, tags: l }) => {
|
|
1344
|
+
let u = t.current, d = t.redoStack, f = t.undoStack, p = u === null ? null : u.editorState;
|
|
1345
|
+
if (u !== null && n === p) return;
|
|
1346
|
+
let m = o(r, n, u, i, c, l);
|
|
1347
|
+
if (m === 1) {
|
|
1348
|
+
if (d.length !== 0 && (t.redoStack = [], e.dispatchCommand(he, !1)), u !== null) {
|
|
1349
|
+
f.push({ ...u });
|
|
1350
|
+
let t = typeof a == "number" || a === null ? a : a.peek();
|
|
1351
|
+
t !== null && f.length > t && f.splice(0, f.length - t), e.dispatchCommand(A, !0);
|
|
1352
|
+
}
|
|
1353
|
+
} else if (m === 2) return;
|
|
1224
1354
|
t.current = {
|
|
1225
1355
|
editor: e,
|
|
1226
1356
|
editorState: n
|
|
1227
|
-
};
|
|
1357
|
+
}, s();
|
|
1228
1358
|
}));
|
|
1229
1359
|
}
|
|
1230
|
-
function
|
|
1360
|
+
function ii() {
|
|
1231
1361
|
return {
|
|
1232
1362
|
current: null,
|
|
1233
1363
|
redoStack: [],
|
|
1234
1364
|
undoStack: []
|
|
1235
1365
|
};
|
|
1236
1366
|
}
|
|
1237
|
-
var
|
|
1238
|
-
build: (e, { delay: t, createInitialHistoryState: n, disabled: r,
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1367
|
+
var ai = P({
|
|
1368
|
+
build: (e, { delay: t, createInitialHistoryState: n, disabled: r, maxDepth: i, now: a }, o) => ({
|
|
1369
|
+
...R({
|
|
1370
|
+
delay: t,
|
|
1371
|
+
disabled: r,
|
|
1372
|
+
historyState: n(e),
|
|
1373
|
+
maxDepth: i,
|
|
1374
|
+
now: a
|
|
1375
|
+
}),
|
|
1376
|
+
...o.getInitResult()
|
|
1243
1377
|
}),
|
|
1244
|
-
config:
|
|
1245
|
-
createInitialHistoryState:
|
|
1378
|
+
config: C({
|
|
1379
|
+
createInitialHistoryState: ii,
|
|
1246
1380
|
delay: 300,
|
|
1247
1381
|
disabled: typeof window > "u",
|
|
1382
|
+
maxDepth: null,
|
|
1248
1383
|
now: Date.now
|
|
1249
1384
|
}),
|
|
1385
|
+
init: () => ({
|
|
1386
|
+
canRedo: St(!1),
|
|
1387
|
+
canUndo: St(!1)
|
|
1388
|
+
}),
|
|
1250
1389
|
name: "@lexical/history/History",
|
|
1251
1390
|
register: (e, t, n) => {
|
|
1252
|
-
let r = n.getOutput()
|
|
1253
|
-
|
|
1391
|
+
let { canUndo: r, canRedo: i } = n.getInitResult(), a = n.getOutput(), o = (e) => Ot(() => {
|
|
1392
|
+
r.value = e != null && e.undoStack.length > 0, i.value = e != null && e.redoStack.length > 0;
|
|
1393
|
+
});
|
|
1394
|
+
return kt(() => {
|
|
1395
|
+
if (!a.disabled.value) return ri(e, a.historyState.value, a.delay, () => a.now.peek()(), o, a.maxDepth);
|
|
1396
|
+
o(null);
|
|
1397
|
+
});
|
|
1254
1398
|
}
|
|
1255
1399
|
});
|
|
1256
|
-
|
|
1257
|
-
build: (e, { disabled: t, parentEditor: n }) =>
|
|
1400
|
+
P({
|
|
1401
|
+
build: (e, { disabled: t, parentEditor: n }) => R({
|
|
1258
1402
|
disabled: t,
|
|
1259
1403
|
parentEditor: n || e._parentEditor
|
|
1260
1404
|
}),
|
|
1261
|
-
config:
|
|
1405
|
+
config: C({
|
|
1262
1406
|
disabled: !1,
|
|
1263
1407
|
parentEditor: null
|
|
1264
1408
|
}),
|
|
1265
|
-
dependencies: [
|
|
1409
|
+
dependencies: [_(ai, { disabled: !0 })],
|
|
1266
1410
|
name: "@lexical/history/SharedHistory",
|
|
1267
|
-
register: (e, t, n) =>
|
|
1411
|
+
register: (e, t, n) => kt(() => {
|
|
1268
1412
|
let { disabled: e, parentEditor: t } = n.getOutput();
|
|
1269
1413
|
if (!e.value) {
|
|
1270
|
-
let { output: e } = n.getDependency(
|
|
1271
|
-
return e ?
|
|
1414
|
+
let { output: e } = n.getDependency(ai), r = function(e) {
|
|
1415
|
+
return e ? yt(e, ai.name) : null;
|
|
1272
1416
|
}(t.value);
|
|
1273
1417
|
if (!r) return;
|
|
1274
1418
|
let i = r.output;
|
|
1275
|
-
|
|
1419
|
+
Ot(() => {
|
|
1276
1420
|
e.delay.value = i.delay.value, e.historyState.value = i.historyState.value, e.now.value = i.now.value, e.disabled.value = i.disabled.value;
|
|
1277
1421
|
});
|
|
1278
1422
|
}
|
|
1279
1423
|
})
|
|
1280
1424
|
});
|
|
1281
1425
|
//#endregion
|
|
1282
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1283
|
-
function
|
|
1426
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalHistoryPlugin.prod.mjs
|
|
1427
|
+
function oi({ delay: e, externalHistoryState: t }) {
|
|
1284
1428
|
let [n] = h();
|
|
1285
1429
|
return function(e, t, n = 1e3) {
|
|
1286
|
-
let r =
|
|
1287
|
-
H(() =>
|
|
1430
|
+
let r = Gn(() => t || ii(), [t]);
|
|
1431
|
+
H(() => ri(e, r, n), [
|
|
1288
1432
|
n,
|
|
1289
1433
|
e,
|
|
1290
1434
|
r
|
|
@@ -1292,20 +1436,20 @@ function Zr({ delay: e, externalHistoryState: t }) {
|
|
|
1292
1436
|
}(n, t, e), null;
|
|
1293
1437
|
}
|
|
1294
1438
|
//#endregion
|
|
1295
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1296
|
-
function
|
|
1439
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalTablePlugin.prod.mjs
|
|
1440
|
+
function si({ hasCellMerge: e = !0, hasCellBackgroundColor: t = !0, hasTabHandler: n = !0, hasHorizontalScroll: r = !1, hasNestedTables: i = !1 }) {
|
|
1297
1441
|
let [a] = h();
|
|
1298
1442
|
H(() => {
|
|
1299
|
-
|
|
1443
|
+
Zt(a) !== r && ($t(a, r), a.update(Ue));
|
|
1300
1444
|
}, [a, r]);
|
|
1301
1445
|
let o = function(e) {
|
|
1302
|
-
let [t] =
|
|
1446
|
+
let [t] = G(() => St(e));
|
|
1303
1447
|
return t.peek() !== e && (t.value = e), t;
|
|
1304
1448
|
}(i);
|
|
1305
|
-
return H(() =>
|
|
1306
|
-
if (!e) return
|
|
1449
|
+
return H(() => Kt(a, { hasNestedTables: o }), [a, o]), H(() => en(a, n), [a, n]), H(() => {
|
|
1450
|
+
if (!e) return qt(a);
|
|
1307
1451
|
}, [a, e]), H(() => {
|
|
1308
|
-
if (!t) return a.registerNodeTransform(
|
|
1452
|
+
if (!t) return a.registerNodeTransform(Yt, (e) => {
|
|
1309
1453
|
e.getBackgroundColor() !== null && e.setBackgroundColor(null);
|
|
1310
1454
|
});
|
|
1311
1455
|
}, [
|
|
@@ -1315,23 +1459,23 @@ function Qr({ hasCellMerge: e = !0, hasCellBackgroundColor: t = !0, hasTabHandle
|
|
|
1315
1459
|
]), null;
|
|
1316
1460
|
}
|
|
1317
1461
|
//#endregion
|
|
1318
|
-
//#region node_modules/.pnpm/@lexical+react@0.
|
|
1319
|
-
function
|
|
1462
|
+
//#region node_modules/.pnpm/@lexical+react@0.45.0_react-dom@19.2.7_react@19.2.7__react@19.2.7_yjs@13.6.31/node_modules/@lexical/react/dist/LexicalEditorRefPlugin.prod.mjs
|
|
1463
|
+
function ci({ editorRef: e }) {
|
|
1320
1464
|
let [t] = h();
|
|
1321
|
-
return
|
|
1465
|
+
return Fn.useEffect(() => {
|
|
1322
1466
|
typeof e == "function" ? e(t) : typeof e == "object" && e && (e.current = t);
|
|
1323
1467
|
}, [t]), null;
|
|
1324
1468
|
}
|
|
1325
1469
|
//#endregion
|
|
1326
1470
|
//#region src/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.tsx
|
|
1327
|
-
var
|
|
1328
|
-
let [r] = h(), [i, a] =
|
|
1329
|
-
let e =
|
|
1330
|
-
if (!
|
|
1471
|
+
var li = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchResponse: n }) => {
|
|
1472
|
+
let [r] = h(), [i, a] = G(null), o = W(null), s = Hn(() => {
|
|
1473
|
+
let e = N();
|
|
1474
|
+
if (!k(e)) {
|
|
1331
1475
|
a(null);
|
|
1332
1476
|
return;
|
|
1333
1477
|
}
|
|
1334
|
-
let t =
|
|
1478
|
+
let t = tn(e.anchor.getNode());
|
|
1335
1479
|
if (!t) {
|
|
1336
1480
|
a(null);
|
|
1337
1481
|
return;
|
|
@@ -1346,41 +1490,41 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1346
1490
|
});
|
|
1347
1491
|
}, [r]), c = (e) => {
|
|
1348
1492
|
o.current?.mutateTable(e);
|
|
1349
|
-
}, l =
|
|
1493
|
+
}, l = Hn(() => {
|
|
1350
1494
|
r.update(() => {
|
|
1351
|
-
let e =
|
|
1352
|
-
|
|
1495
|
+
let e = N();
|
|
1496
|
+
k(e) && tn(e.anchor.getNode()) && (ge(null), a(null));
|
|
1353
1497
|
});
|
|
1354
1498
|
}, [r]);
|
|
1355
|
-
return H(() =>
|
|
1499
|
+
return H(() => I(r.registerUpdateListener(({ editorState: e }) => {
|
|
1356
1500
|
e.read(s);
|
|
1357
|
-
}), r.registerCommand(
|
|
1358
|
-
t &&
|
|
1501
|
+
}), r.registerCommand(Ke, () => (gn(l), !1), 1), r.registerRootListener((e, t) => {
|
|
1502
|
+
t && hn(l), e && gn(l);
|
|
1359
1503
|
})), [
|
|
1360
1504
|
r,
|
|
1361
1505
|
s,
|
|
1362
1506
|
l
|
|
1363
|
-
]), /* @__PURE__ */
|
|
1364
|
-
className:
|
|
1507
|
+
]), /* @__PURE__ */ q("div", {
|
|
1508
|
+
className: B.editor__toolbar,
|
|
1365
1509
|
children: [
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
-
/* @__PURE__ */
|
|
1368
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ K(bn, {}),
|
|
1511
|
+
/* @__PURE__ */ K(xn, {}),
|
|
1512
|
+
/* @__PURE__ */ K(gi, {
|
|
1369
1513
|
isActive: !!i,
|
|
1370
1514
|
ref: o
|
|
1371
1515
|
}),
|
|
1372
|
-
i && /* @__PURE__ */
|
|
1516
|
+
i && /* @__PURE__ */ K(Mn, {
|
|
1373
1517
|
position: i,
|
|
1374
1518
|
parentScrollPosition: e,
|
|
1375
1519
|
onAction: c
|
|
1376
1520
|
}),
|
|
1377
|
-
/* @__PURE__ */
|
|
1378
|
-
t && n && /* @__PURE__ */
|
|
1521
|
+
/* @__PURE__ */ K(fi, { parentScrollPosition: e }),
|
|
1522
|
+
t && n && /* @__PURE__ */ K(yn, {
|
|
1379
1523
|
parentScrollPosition: e,
|
|
1380
1524
|
onSearch: t,
|
|
1381
1525
|
searchResponse: n
|
|
1382
1526
|
}),
|
|
1383
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ K(pi, {})
|
|
1384
1528
|
]
|
|
1385
1529
|
});
|
|
1386
1530
|
}, $ = {
|
|
@@ -1390,45 +1534,45 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1390
1534
|
"linkform__input-url-wrapper": "_linkform__input-url-wrapper_1anda_19",
|
|
1391
1535
|
"linkform__open-url-button": "_linkform__open-url-button_1anda_31",
|
|
1392
1536
|
"editor__toolbar-button": "_editor__toolbar-button_1anda_55"
|
|
1393
|
-
},
|
|
1537
|
+
}, ui = Vn(({ onCloseHandler: e, onSaveHandler: r, isLink: i = {
|
|
1394
1538
|
active: !1,
|
|
1395
1539
|
url: "",
|
|
1396
1540
|
linktext: ""
|
|
1397
1541
|
} }, s) => {
|
|
1398
|
-
let c =
|
|
1399
|
-
window.open(
|
|
1542
|
+
let c = V(), [d, f] = G(i.url || ""), [p, m] = G(i.linktext || ""), [h, g] = G(!1), [_, v] = G(null), [y, b] = G(null), x = W(null), S = `link_${U()}`, C = `text_${U()}`, w = () => {
|
|
1543
|
+
window.open(an(d), "_blank");
|
|
1400
1544
|
}, T = (e) => {
|
|
1401
1545
|
f(e.target.value);
|
|
1402
1546
|
}, E = (e) => {
|
|
1403
1547
|
m(e.target.value);
|
|
1404
|
-
}, ee = (e) =>
|
|
1405
|
-
!ee(d) || h && !
|
|
1406
|
-
},
|
|
1407
|
-
e(),
|
|
1408
|
-
},
|
|
1548
|
+
}, ee = (e) => rn(e) === !1 || e.trim() === "" ? (v(c.errortext.urlNotValid), !1) : (v(null), !0), te = (e) => e.trim() === "" ? (b(c.errortext.linkTextNotValid), !1) : (b(null), !0), ne = () => {
|
|
1549
|
+
!ee(d) || h && !te(p) || (r(d, p), ie());
|
|
1550
|
+
}, re = () => {
|
|
1551
|
+
e(), ie();
|
|
1552
|
+
}, ie = () => {
|
|
1409
1553
|
f(""), g(!1), v(null), b(null);
|
|
1410
|
-
},
|
|
1554
|
+
}, D = (e, t) => {
|
|
1411
1555
|
f(e), !t && !e && g(!0);
|
|
1412
|
-
},
|
|
1556
|
+
}, ae = () => {
|
|
1413
1557
|
x.current && x.current.focus();
|
|
1414
1558
|
};
|
|
1415
|
-
return
|
|
1416
|
-
clearForm:
|
|
1417
|
-
focusFirstField:
|
|
1418
|
-
setDefaults:
|
|
1419
|
-
})), /* @__PURE__ */
|
|
1559
|
+
return Un(s, () => ({
|
|
1560
|
+
clearForm: ie,
|
|
1561
|
+
focusFirstField: ae,
|
|
1562
|
+
setDefaults: D
|
|
1563
|
+
})), /* @__PURE__ */ q("div", {
|
|
1420
1564
|
className: $.linkform,
|
|
1421
1565
|
children: [
|
|
1422
|
-
/* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ q(l, {
|
|
1423
1567
|
className: $["linkform__input-field"],
|
|
1424
1568
|
children: [
|
|
1425
|
-
/* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ K(a, {
|
|
1426
1570
|
htmlFor: S,
|
|
1427
1571
|
children: c.links.linkLabel
|
|
1428
1572
|
}),
|
|
1429
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ q("div", {
|
|
1430
1574
|
className: $["linkform__input-url-wrapper"],
|
|
1431
|
-
children: [/* @__PURE__ */
|
|
1575
|
+
children: [/* @__PURE__ */ K(u, {
|
|
1432
1576
|
id: S,
|
|
1433
1577
|
placeholder: c.links.linkPlaceholder,
|
|
1434
1578
|
value: d,
|
|
@@ -1436,53 +1580,53 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1436
1580
|
onFocus: () => v(null),
|
|
1437
1581
|
ref: x,
|
|
1438
1582
|
"aria-label": c.aria.labels.linkField
|
|
1439
|
-
}), d && /* @__PURE__ */
|
|
1583
|
+
}), d && /* @__PURE__ */ K("button", {
|
|
1440
1584
|
type: "button",
|
|
1441
1585
|
onClick: w,
|
|
1442
1586
|
className: $["linkform__open-url-button"],
|
|
1443
|
-
children: /* @__PURE__ */
|
|
1587
|
+
children: /* @__PURE__ */ K(t, {
|
|
1444
1588
|
name: "ArrowTopRightOnSquare",
|
|
1445
1589
|
size: 20
|
|
1446
1590
|
})
|
|
1447
1591
|
})]
|
|
1448
1592
|
}),
|
|
1449
|
-
_ && /* @__PURE__ */
|
|
1593
|
+
_ && /* @__PURE__ */ K(o, {
|
|
1450
1594
|
level: "error",
|
|
1451
1595
|
feedback: _
|
|
1452
1596
|
})
|
|
1453
1597
|
]
|
|
1454
1598
|
}),
|
|
1455
|
-
h && /* @__PURE__ */
|
|
1599
|
+
h && /* @__PURE__ */ q(l, {
|
|
1456
1600
|
className: $["linkform__input-field"],
|
|
1457
1601
|
children: [
|
|
1458
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ K(a, {
|
|
1459
1603
|
htmlFor: C,
|
|
1460
1604
|
children: c.links.linkText
|
|
1461
1605
|
}),
|
|
1462
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ K(u, {
|
|
1463
1607
|
id: C,
|
|
1464
1608
|
value: p,
|
|
1465
1609
|
onChange: (e) => E(e),
|
|
1466
1610
|
onFocus: () => b(null),
|
|
1467
1611
|
"aria-label": c.aria.labels.linkTextfield
|
|
1468
1612
|
}),
|
|
1469
|
-
y && /* @__PURE__ */
|
|
1613
|
+
y && /* @__PURE__ */ K(o, {
|
|
1470
1614
|
level: "error",
|
|
1471
1615
|
feedback: y
|
|
1472
1616
|
})
|
|
1473
1617
|
]
|
|
1474
1618
|
}),
|
|
1475
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ q("div", {
|
|
1476
1620
|
className: $.linkform__footer,
|
|
1477
|
-
children: [/* @__PURE__ */
|
|
1621
|
+
children: [/* @__PURE__ */ K(n, {
|
|
1478
1622
|
variant: "secondary",
|
|
1479
|
-
onClick:
|
|
1623
|
+
onClick: re,
|
|
1480
1624
|
"aria-label": c.common.cancel,
|
|
1481
1625
|
type: "button",
|
|
1482
1626
|
children: c.common.cancel
|
|
1483
|
-
}), /* @__PURE__ */
|
|
1627
|
+
}), /* @__PURE__ */ K(n, {
|
|
1484
1628
|
variant: "primary",
|
|
1485
|
-
onClick:
|
|
1629
|
+
onClick: ne,
|
|
1486
1630
|
"aria-label": c.aria.labels.linkOkButton,
|
|
1487
1631
|
type: "button",
|
|
1488
1632
|
children: c.links.addLink
|
|
@@ -1490,23 +1634,34 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1490
1634
|
})
|
|
1491
1635
|
]
|
|
1492
1636
|
});
|
|
1493
|
-
}),
|
|
1494
|
-
let r =
|
|
1637
|
+
}), di = 200, fi = ({ parentScrollPosition: n }) => {
|
|
1638
|
+
let r = V(), [i] = h(), { flyout: a, showFlyout: o, hideFlyout: s, isVisible: c } = Cn(), l = W(void 0), u = W(!1), d = W(""), f = W(""), [p, m] = G({
|
|
1495
1639
|
active: !1,
|
|
1496
1640
|
url: "",
|
|
1497
1641
|
linktext: ""
|
|
1498
|
-
}), g =
|
|
1642
|
+
}), g = W(c), _ = W(null), v = W(null), y = W(void 0), b = () => {
|
|
1499
1643
|
i.update(() => {
|
|
1500
|
-
_.current =
|
|
1644
|
+
_.current = N();
|
|
1501
1645
|
});
|
|
1502
1646
|
}, x = () => {
|
|
1503
1647
|
i.update(() => {
|
|
1504
|
-
|
|
1648
|
+
let e = _.current;
|
|
1649
|
+
if (e && k(e)) {
|
|
1650
|
+
let t = e.anchor.getNode(), n = e.focus.getNode();
|
|
1651
|
+
if (t && n && t.isAttached() && n.isAttached()) {
|
|
1652
|
+
let r = t.getTextContentSize(), i = n.getTextContentSize();
|
|
1653
|
+
if (e.anchor.offset <= r && e.focus.offset <= i) {
|
|
1654
|
+
ge(e);
|
|
1655
|
+
return;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
i.getRootElement()?.focus();
|
|
1505
1660
|
});
|
|
1506
1661
|
}, S = (e, t) => {
|
|
1507
1662
|
o({
|
|
1508
1663
|
position: t,
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1664
|
+
children: /* @__PURE__ */ K(Sn, {
|
|
1510
1665
|
url: e,
|
|
1511
1666
|
onSave: (e) => E(e, ""),
|
|
1512
1667
|
onDelete: () => ee(),
|
|
@@ -1523,18 +1678,18 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1523
1678
|
top: e.bottom,
|
|
1524
1679
|
left: e.left
|
|
1525
1680
|
},
|
|
1526
|
-
...
|
|
1681
|
+
...te
|
|
1527
1682
|
}), setTimeout(() => l.current?.setDefaults("", f.current), 0));
|
|
1528
1683
|
}, T = () => {
|
|
1529
1684
|
s(), x();
|
|
1530
1685
|
}, E = (e, t) => {
|
|
1531
1686
|
i.update(() => {
|
|
1532
|
-
let n =
|
|
1533
|
-
if (
|
|
1534
|
-
let r =
|
|
1687
|
+
let n = N();
|
|
1688
|
+
if (k(n)) {
|
|
1689
|
+
let r = mt(n.anchor.getNode(), z);
|
|
1535
1690
|
if (t && t !== "") {
|
|
1536
1691
|
if (r) {
|
|
1537
|
-
let e =
|
|
1692
|
+
let e = ne(t);
|
|
1538
1693
|
r.replace(e), e.select();
|
|
1539
1694
|
}
|
|
1540
1695
|
if (t !== d.current && d.current === "") {
|
|
@@ -1542,24 +1697,24 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1542
1697
|
n.insertText(t), e.offset -= t.length, r.offset = e.offset + t.length;
|
|
1543
1698
|
}
|
|
1544
1699
|
}
|
|
1545
|
-
|
|
1700
|
+
Vt(an(e), { target: "_blank" });
|
|
1546
1701
|
}
|
|
1547
1702
|
T();
|
|
1548
1703
|
});
|
|
1549
1704
|
}, ee = () => {
|
|
1550
|
-
i.dispatchCommand(
|
|
1551
|
-
},
|
|
1705
|
+
i.dispatchCommand(Gt, null), C();
|
|
1706
|
+
}, te = { children: /* @__PURE__ */ K(ui, {
|
|
1552
1707
|
isLink: p,
|
|
1553
1708
|
onCloseHandler: T,
|
|
1554
1709
|
onSaveHandler: (e, t) => E(e, t),
|
|
1555
1710
|
ref: l
|
|
1556
1711
|
}) };
|
|
1557
1712
|
H(() => {
|
|
1558
|
-
c ? (u.current = !0, l.current?.focusFirstField()) : (l.current?.clearForm(), d.current = f.current = "", setTimeout(() => u.current = !1,
|
|
1713
|
+
c ? (u.current = !0, l.current?.focusFirstField()) : (l.current?.clearForm(), d.current = f.current = "", setTimeout(() => u.current = !1, di));
|
|
1559
1714
|
}, [l, c]), H(() => {
|
|
1560
1715
|
let e = (e) => {
|
|
1561
|
-
if (
|
|
1562
|
-
let t =
|
|
1716
|
+
if (k(e) && e.isCollapsed()) {
|
|
1717
|
+
let t = mt(e.anchor.getNode(), z);
|
|
1563
1718
|
if (t) {
|
|
1564
1719
|
let n = i.getElementByKey(e.anchor.getNode().getKey()), r = n ? {
|
|
1565
1720
|
top: n.getBoundingClientRect().bottom,
|
|
@@ -1572,22 +1727,22 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1572
1727
|
}
|
|
1573
1728
|
}
|
|
1574
1729
|
return !1;
|
|
1575
|
-
}, t = i.registerCommand(
|
|
1576
|
-
let t =
|
|
1730
|
+
}, t = i.registerCommand(Re, () => {
|
|
1731
|
+
let t = N();
|
|
1577
1732
|
return f.current = t?.getTextContent() ?? "", e(t), !1;
|
|
1578
|
-
}, 0), n = i.registerCommand(
|
|
1579
|
-
let n =
|
|
1733
|
+
}, 0), n = i.registerCommand(ae, (t) => {
|
|
1734
|
+
let n = N();
|
|
1580
1735
|
return b(), t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(), e(n), !1;
|
|
1581
1736
|
}, 0);
|
|
1582
1737
|
return () => {
|
|
1583
1738
|
n(), t();
|
|
1584
1739
|
};
|
|
1585
1740
|
}, [i]), H(() => {
|
|
1586
|
-
let e = i.registerCommand(
|
|
1741
|
+
let e = i.registerCommand(Ke, (e) => {
|
|
1587
1742
|
if (e.ctrlKey && e.shiftKey && e.key === "U") {
|
|
1588
|
-
let t =
|
|
1589
|
-
if (b(), !
|
|
1590
|
-
let n =
|
|
1743
|
+
let t = N();
|
|
1744
|
+
if (b(), !k(t)) return !1;
|
|
1745
|
+
let n = mt(t.anchor.getNode(), z), r = (e = "", t = "") => {
|
|
1591
1746
|
w(), setTimeout(() => l.current?.setDefaults(e, t), 0);
|
|
1592
1747
|
};
|
|
1593
1748
|
if (n) return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), d.current = n.getTextContent(), r(n.getURL(), n.getTextContent()), !0;
|
|
@@ -1597,9 +1752,9 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1597
1752
|
return !1;
|
|
1598
1753
|
}, 4), t = i.registerUpdateListener(({ editorState: e }) => {
|
|
1599
1754
|
m(e.read(() => {
|
|
1600
|
-
let e =
|
|
1601
|
-
if (b(),
|
|
1602
|
-
let t =
|
|
1755
|
+
let e = N();
|
|
1756
|
+
if (b(), k(e)) {
|
|
1757
|
+
let t = mt(e.anchor.getNode(), z);
|
|
1603
1758
|
if (t) return {
|
|
1604
1759
|
active: !0,
|
|
1605
1760
|
url: t.getURL(),
|
|
@@ -1623,70 +1778,70 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1623
1778
|
}, [n]), H(() => {
|
|
1624
1779
|
p.active || s();
|
|
1625
1780
|
}, [p]);
|
|
1626
|
-
let
|
|
1781
|
+
let re = () => {
|
|
1627
1782
|
s();
|
|
1628
1783
|
};
|
|
1629
|
-
return H(() =>
|
|
1630
|
-
t && t.removeEventListener("scroll",
|
|
1631
|
-
})), [i]), /* @__PURE__ */
|
|
1632
|
-
className:
|
|
1633
|
-
children: /* @__PURE__ */
|
|
1634
|
-
className:
|
|
1635
|
-
children: [/* @__PURE__ */
|
|
1784
|
+
return H(() => I(i.registerCommand(Ke, (e) => e.key === "Escape" && g.current ? (e.preventDefault(), T(), !0) : !1, 1), i.registerRootListener((e, t) => {
|
|
1785
|
+
t && t.removeEventListener("scroll", re), e && e.addEventListener("scroll", re);
|
|
1786
|
+
})), [i]), /* @__PURE__ */ K("div", {
|
|
1787
|
+
className: B["editor__toolbar-button-group"],
|
|
1788
|
+
children: /* @__PURE__ */ q("div", {
|
|
1789
|
+
className: B["editor__toolbar-button-flyoutwrapper"],
|
|
1790
|
+
children: [/* @__PURE__ */ K("button", {
|
|
1636
1791
|
onClick: w,
|
|
1637
1792
|
title: r.links.linkTooltip,
|
|
1638
|
-
className: e(
|
|
1793
|
+
className: e(B["editor__toolbar-button"], B["editor__toolbar-button--link"], p.active && B["editor__toolbar-button--active"]),
|
|
1639
1794
|
"aria-label": r.aria.labels.link,
|
|
1640
1795
|
"aria-keyshortcuts": r.aria.keyshortcuts.link,
|
|
1641
1796
|
type: "button",
|
|
1642
1797
|
ref: v,
|
|
1643
|
-
children: /* @__PURE__ */
|
|
1798
|
+
children: /* @__PURE__ */ K(t, {
|
|
1644
1799
|
name: "Link",
|
|
1645
1800
|
size: 20
|
|
1646
1801
|
})
|
|
1647
1802
|
}), a]
|
|
1648
1803
|
})
|
|
1649
1804
|
});
|
|
1650
|
-
},
|
|
1651
|
-
let n =
|
|
1652
|
-
return H(() => r.registerCommand(
|
|
1653
|
-
className:
|
|
1654
|
-
children: [/* @__PURE__ */
|
|
1805
|
+
}, pi = () => {
|
|
1806
|
+
let n = V(), [r] = h(), [i, a] = G(!1), [o, s] = G(!1);
|
|
1807
|
+
return H(() => r.registerCommand(A, (e) => (a(e), !1), 1), [r]), H(() => r.registerCommand(he, (e) => (s(e), !1), 1), [r]), /* @__PURE__ */ q("div", {
|
|
1808
|
+
className: B["editor__toolbar-button-group"],
|
|
1809
|
+
children: [/* @__PURE__ */ K("button", {
|
|
1655
1810
|
onClick: () => {
|
|
1656
|
-
r.dispatchCommand(
|
|
1811
|
+
r.dispatchCommand(Qe, void 0);
|
|
1657
1812
|
},
|
|
1658
|
-
className: e(
|
|
1813
|
+
className: e(B["editor__toolbar-button"], B["editor__toolbar-button--undo"]),
|
|
1659
1814
|
"aria-label": n.aria.labels.undo,
|
|
1660
1815
|
"aria-keyshortcuts": n.aria.keyshortcuts.undo,
|
|
1661
1816
|
disabled: !i,
|
|
1662
1817
|
title: n.format.undoTooltip,
|
|
1663
1818
|
type: "button",
|
|
1664
|
-
children: /* @__PURE__ */
|
|
1819
|
+
children: /* @__PURE__ */ K(t, {
|
|
1665
1820
|
name: "StepBack",
|
|
1666
1821
|
size: 24
|
|
1667
1822
|
})
|
|
1668
|
-
}), /* @__PURE__ */
|
|
1823
|
+
}), /* @__PURE__ */ K("button", {
|
|
1669
1824
|
onClick: () => {
|
|
1670
|
-
r.dispatchCommand(
|
|
1825
|
+
r.dispatchCommand(ve, void 0);
|
|
1671
1826
|
},
|
|
1672
|
-
className: e(
|
|
1827
|
+
className: e(B["editor__toolbar-button"], B["editor__toolbar-button--redo"]),
|
|
1673
1828
|
"aria-label": n.aria.labels.redo,
|
|
1674
1829
|
"aria-keyshortcuts": n.aria.keyshortcuts.redo,
|
|
1675
1830
|
disabled: !o,
|
|
1676
1831
|
title: n.format.redoTooltip,
|
|
1677
1832
|
type: "button",
|
|
1678
|
-
children: /* @__PURE__ */
|
|
1833
|
+
children: /* @__PURE__ */ K(t, {
|
|
1679
1834
|
name: "StepForwards",
|
|
1680
1835
|
size: 24
|
|
1681
1836
|
})
|
|
1682
1837
|
})]
|
|
1683
1838
|
});
|
|
1684
|
-
},
|
|
1839
|
+
}, mi = {
|
|
1685
1840
|
tableform: "_tableform_t5fpq_1",
|
|
1686
1841
|
"tableform__input-field": "_tableform__input-field_t5fpq_5",
|
|
1687
1842
|
tableform__footer: "_tableform__footer_t5fpq_12"
|
|
1688
|
-
},
|
|
1689
|
-
let i =
|
|
1843
|
+
}, hi = Vn(({ onCloseHandler: e, onSaveHandler: t }, r) => {
|
|
1844
|
+
let i = V(), [o, s] = G(), [c, d] = G(), f = W(null), p = `row_${U()}`, m = `column_${U()}`, h = (e, t) => {
|
|
1690
1845
|
let n = e.target.value;
|
|
1691
1846
|
t === "row" ? s(parseInt(n)) : d(parseInt(n));
|
|
1692
1847
|
}, g = () => {
|
|
@@ -1696,25 +1851,25 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1696
1851
|
}, v = () => {
|
|
1697
1852
|
s(void 0), d(void 0);
|
|
1698
1853
|
};
|
|
1699
|
-
return
|
|
1854
|
+
return Un(r, () => ({
|
|
1700
1855
|
clearForm: v,
|
|
1701
1856
|
focusFirstField: () => f.current?.focus()
|
|
1702
1857
|
})), H(() => {
|
|
1703
1858
|
let e = () => {
|
|
1704
1859
|
_();
|
|
1705
1860
|
};
|
|
1706
|
-
return
|
|
1707
|
-
window.removeEventListener("scroll", e), window.removeEventListener("resize", e),
|
|
1861
|
+
return gn(e), window.addEventListener("scroll", e), window.addEventListener("resize", e), () => {
|
|
1862
|
+
window.removeEventListener("scroll", e), window.removeEventListener("resize", e), hn(e);
|
|
1708
1863
|
};
|
|
1709
|
-
}, []), /* @__PURE__ */
|
|
1710
|
-
className:
|
|
1864
|
+
}, []), /* @__PURE__ */ q("div", {
|
|
1865
|
+
className: mi.tableform,
|
|
1711
1866
|
children: [
|
|
1712
|
-
/* @__PURE__ */
|
|
1713
|
-
className:
|
|
1714
|
-
children: [/* @__PURE__ */
|
|
1867
|
+
/* @__PURE__ */ q(l, {
|
|
1868
|
+
className: mi["tableform__input-field"],
|
|
1869
|
+
children: [/* @__PURE__ */ K(a, {
|
|
1715
1870
|
htmlFor: p,
|
|
1716
1871
|
children: i.table.nrofRows
|
|
1717
|
-
}), /* @__PURE__ */
|
|
1872
|
+
}), /* @__PURE__ */ K(u, {
|
|
1718
1873
|
id: p,
|
|
1719
1874
|
placeholder: i.table.nrofRowsPlaceholder,
|
|
1720
1875
|
value: o || "",
|
|
@@ -1723,12 +1878,12 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1723
1878
|
ref: f
|
|
1724
1879
|
})]
|
|
1725
1880
|
}),
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
className:
|
|
1728
|
-
children: [/* @__PURE__ */
|
|
1881
|
+
/* @__PURE__ */ q(l, {
|
|
1882
|
+
className: mi["tableform__input-field"],
|
|
1883
|
+
children: [/* @__PURE__ */ K(a, {
|
|
1729
1884
|
htmlFor: m,
|
|
1730
1885
|
children: i.table.nrofColumns
|
|
1731
|
-
}), /* @__PURE__ */
|
|
1886
|
+
}), /* @__PURE__ */ K(u, {
|
|
1732
1887
|
id: m,
|
|
1733
1888
|
placeholder: i.table.nrofColumnsPlaceholder,
|
|
1734
1889
|
value: c || "",
|
|
@@ -1736,14 +1891,14 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1736
1891
|
"aria-label": i.aria.labels.tableColumnfield
|
|
1737
1892
|
})]
|
|
1738
1893
|
}),
|
|
1739
|
-
/* @__PURE__ */
|
|
1740
|
-
className:
|
|
1741
|
-
children: [/* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ q("div", {
|
|
1895
|
+
className: mi.tableform__footer,
|
|
1896
|
+
children: [/* @__PURE__ */ K(n, {
|
|
1742
1897
|
variant: "secondary",
|
|
1743
1898
|
onClick: _,
|
|
1744
1899
|
"aria-label": i.common.cancel,
|
|
1745
1900
|
children: i.common.cancel
|
|
1746
|
-
}), /* @__PURE__ */
|
|
1901
|
+
}), /* @__PURE__ */ K(n, {
|
|
1747
1902
|
variant: "primary",
|
|
1748
1903
|
onClick: g,
|
|
1749
1904
|
disabled: !o || !c,
|
|
@@ -1753,8 +1908,8 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1753
1908
|
})
|
|
1754
1909
|
]
|
|
1755
1910
|
});
|
|
1756
|
-
}),
|
|
1757
|
-
let i =
|
|
1911
|
+
}), gi = Vn(({ isActive: n }, r) => {
|
|
1912
|
+
let i = V(), [a] = h(), { flyout: o, showFlyout: s, hideFlyout: c, isVisible: l } = Cn(), u = W(void 0), d = W(null), f = W(!1), p = W(l), m = () => {
|
|
1758
1913
|
let e = d.current?.getBoundingClientRect();
|
|
1759
1914
|
!f.current && e && s({
|
|
1760
1915
|
position: {
|
|
@@ -1767,40 +1922,40 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1767
1922
|
c();
|
|
1768
1923
|
}, _ = (e, t) => {
|
|
1769
1924
|
a.update(() => {
|
|
1770
|
-
let n =
|
|
1925
|
+
let n = N(), r = wn(e, t), i = k(n) && n.anchor.getNode() || j(n) && n.getNodes()[0] || null, o = i ? mt(i, Yt) : null, s = o ? kn(o, t, a) : On(a) || 320, c = Math.max(48, Math.floor(s / Math.max(1, t))), l = Array.from({ length: t }, () => c);
|
|
1771
1926
|
r.setColWidths(l);
|
|
1772
|
-
let u =
|
|
1773
|
-
u.append(r),
|
|
1927
|
+
let u = cn();
|
|
1928
|
+
u.append(r), k(n) ? n.insertNodes([u]) : D().append(u);
|
|
1774
1929
|
let d = u.getFirstDescendant();
|
|
1775
1930
|
d && d.select();
|
|
1776
1931
|
}), g();
|
|
1777
1932
|
}, v = (e) => {
|
|
1778
1933
|
a.update(() => {
|
|
1779
|
-
let t =
|
|
1780
|
-
if (
|
|
1781
|
-
let n =
|
|
1782
|
-
if (
|
|
1934
|
+
let t = N();
|
|
1935
|
+
if (k(t)) {
|
|
1936
|
+
let n = tn(t.anchor.getNode());
|
|
1937
|
+
if (Xt(n)) switch (e) {
|
|
1783
1938
|
case "insertRowAbove":
|
|
1784
1939
|
case "insertRowBelow":
|
|
1785
|
-
|
|
1940
|
+
jn(n, e);
|
|
1786
1941
|
break;
|
|
1787
1942
|
case "deleteRow":
|
|
1788
|
-
|
|
1943
|
+
En(n);
|
|
1789
1944
|
break;
|
|
1790
1945
|
case "insertColumnLeft":
|
|
1791
1946
|
case "insertColumnRight":
|
|
1792
|
-
|
|
1947
|
+
An(n, e);
|
|
1793
1948
|
break;
|
|
1794
1949
|
case "deleteColumn":
|
|
1795
|
-
|
|
1950
|
+
Tn(n);
|
|
1796
1951
|
break;
|
|
1797
1952
|
case "deleteTable":
|
|
1798
|
-
|
|
1953
|
+
Dn(n);
|
|
1799
1954
|
break;
|
|
1800
1955
|
}
|
|
1801
1956
|
}
|
|
1802
1957
|
});
|
|
1803
|
-
}, y = { children: /* @__PURE__ */
|
|
1958
|
+
}, y = { children: /* @__PURE__ */ K(hi, {
|
|
1804
1959
|
onCloseHandler: g,
|
|
1805
1960
|
onSaveHandler: (e, t) => _(e, t),
|
|
1806
1961
|
ref: u
|
|
@@ -1808,7 +1963,7 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1808
1963
|
return H(() => {
|
|
1809
1964
|
l ? (f.current = !0, u.current?.focusFirstField()) : (u.current?.clearForm(), setTimeout(() => f.current = !1, 200));
|
|
1810
1965
|
}, [u, l]), H(() => {
|
|
1811
|
-
let e = a.registerCommand(
|
|
1966
|
+
let e = a.registerCommand(Ke, (e) => e.ctrlKey && e.shiftKey && e.code === "Digit9" ? (e.preventDefault(), m(), !0) : !1, 4);
|
|
1812
1967
|
return () => {
|
|
1813
1968
|
e();
|
|
1814
1969
|
};
|
|
@@ -1821,92 +1976,92 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1821
1976
|
return document.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
1822
1977
|
document.removeEventListener("keydown", e);
|
|
1823
1978
|
};
|
|
1824
|
-
}, []),
|
|
1825
|
-
className:
|
|
1826
|
-
children: /* @__PURE__ */
|
|
1827
|
-
className:
|
|
1828
|
-
children: [/* @__PURE__ */
|
|
1979
|
+
}, []), Un(r, () => ({ mutateTable: v })), /* @__PURE__ */ K("div", {
|
|
1980
|
+
className: B["editor__toolbar-button-group"],
|
|
1981
|
+
children: /* @__PURE__ */ q("div", {
|
|
1982
|
+
className: B["editor__toolbar-button-flyoutwrapper"],
|
|
1983
|
+
children: [/* @__PURE__ */ K("button", {
|
|
1829
1984
|
onClick: m,
|
|
1830
1985
|
title: i.table.tableTooltip,
|
|
1831
|
-
className: e(
|
|
1986
|
+
className: e(B["editor__toolbar-button"], n && B["editor__toolbar-button--active"]),
|
|
1832
1987
|
"aria-label": i.aria.labels.table,
|
|
1833
1988
|
"aria-keyshortcuts": i.aria.keyshortcuts.table,
|
|
1834
1989
|
ref: d,
|
|
1835
1990
|
type: "button",
|
|
1836
|
-
children: /* @__PURE__ */
|
|
1991
|
+
children: /* @__PURE__ */ K(t, {
|
|
1837
1992
|
name: "Table",
|
|
1838
1993
|
size: 24
|
|
1839
1994
|
})
|
|
1840
1995
|
}), o]
|
|
1841
1996
|
})
|
|
1842
1997
|
});
|
|
1843
|
-
}),
|
|
1998
|
+
}), _i = {
|
|
1844
1999
|
"editor-header__container": "_editor-header__container_1y1mc_1",
|
|
1845
2000
|
"editor-header__info": "_editor-header__info_1y1mc_10"
|
|
1846
|
-
},
|
|
2001
|
+
}, vi = ({ label: e, info: t = "", required: n = !1 }) => {
|
|
1847
2002
|
let r = `info_${U()}`;
|
|
1848
|
-
return /* @__PURE__ */
|
|
1849
|
-
className:
|
|
1850
|
-
children: [e !== "" && /* @__PURE__ */
|
|
2003
|
+
return /* @__PURE__ */ q("div", {
|
|
2004
|
+
className: _i["editor-header__container"],
|
|
2005
|
+
children: [e !== "" && /* @__PURE__ */ K("div", { children: /* @__PURE__ */ K(a, {
|
|
1851
2006
|
htmlFor: r,
|
|
1852
2007
|
required: n,
|
|
1853
2008
|
children: e
|
|
1854
|
-
}) }), t !== "" && /* @__PURE__ */
|
|
1855
|
-
className:
|
|
2009
|
+
}) }), t !== "" && /* @__PURE__ */ K("div", {
|
|
2010
|
+
className: _i["editor-header__info"],
|
|
1856
2011
|
dangerouslySetInnerHTML: { __html: t }
|
|
1857
2012
|
})]
|
|
1858
2013
|
});
|
|
1859
|
-
},
|
|
2014
|
+
}, yi = ({ currentLanguage: t = "NL", editorId: n, initialValue: r = "", placeholder: i = "", label: a = "", info: s = "", required: c = !1, notValid: l = !1, notValidatedText: u = "", maxHeightInRem: d = "20rem", maxWords: f, rteRef: p = null, onChange: m, onCatalogueLinkSearch: h, catalogueSearchResponse: g = {
|
|
1860
2015
|
state: "idle",
|
|
1861
2016
|
results: []
|
|
1862
2017
|
} }) => {
|
|
1863
|
-
let { switchLanguage: _ } =
|
|
1864
|
-
html: { export:
|
|
2018
|
+
let { switchLanguage: _ } = vn(), v = V(), [y] = G(() => rt()), [b, x] = G(0), [S, C] = G(0), w = U(), T = {
|
|
2019
|
+
html: { export: pn },
|
|
1865
2020
|
namespace: `UvaRte-${n.replace(/\s+/g, "-").toLowerCase()}`,
|
|
1866
2021
|
editor: y,
|
|
1867
|
-
theme:
|
|
2022
|
+
theme: Pn,
|
|
1868
2023
|
onError(e) {
|
|
1869
2024
|
throw e;
|
|
1870
2025
|
},
|
|
1871
2026
|
nodes: [
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
2027
|
+
zt,
|
|
2028
|
+
Bt,
|
|
2029
|
+
z,
|
|
2030
|
+
Ut,
|
|
2031
|
+
Yt,
|
|
2032
|
+
Jt,
|
|
2033
|
+
Qt,
|
|
2034
|
+
ln,
|
|
2035
|
+
dn
|
|
1881
2036
|
],
|
|
1882
2037
|
editorState: (e) => {
|
|
1883
|
-
let t =
|
|
1884
|
-
|
|
2038
|
+
let t = wt(e, new DOMParser().parseFromString(r, "text/html"));
|
|
2039
|
+
D().clear(), $e(t), ge(null);
|
|
1885
2040
|
}
|
|
1886
2041
|
}, E = (e) => e.trim().length === 0 ? 0 : e.split(" ").length, ee = (e, t) => {
|
|
1887
|
-
|
|
2042
|
+
t.read(() => {
|
|
1888
2043
|
let e = "";
|
|
1889
|
-
x(E(
|
|
2044
|
+
x(E(D().getTextContent().replace(/\s+/g, " ").trim())), e = mn(bt(t)), e = fn(e), m(e);
|
|
1890
2045
|
});
|
|
1891
2046
|
};
|
|
1892
2047
|
return H(() => {
|
|
1893
2048
|
_(t.toUpperCase());
|
|
1894
2049
|
}, [t, _]), H(() => {
|
|
1895
2050
|
x(E(r.replace(/<br\s*\/?>| /gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim()));
|
|
1896
|
-
}, [r]), /* @__PURE__ */
|
|
1897
|
-
className:
|
|
2051
|
+
}, [r]), /* @__PURE__ */ q("div", {
|
|
2052
|
+
className: B.editor__container,
|
|
1898
2053
|
children: [
|
|
1899
|
-
(a || s || f) && /* @__PURE__ */
|
|
1900
|
-
className:
|
|
1901
|
-
children: [/* @__PURE__ */
|
|
2054
|
+
(a || s || f) && /* @__PURE__ */ q("div", {
|
|
2055
|
+
className: B.editor__header,
|
|
2056
|
+
children: [/* @__PURE__ */ K(vi, {
|
|
1902
2057
|
label: a,
|
|
1903
2058
|
info: s,
|
|
1904
2059
|
required: c
|
|
1905
|
-
}), f && f > 0 && /* @__PURE__ */
|
|
1906
|
-
className:
|
|
2060
|
+
}), f && f > 0 && /* @__PURE__ */ q("div", {
|
|
2061
|
+
className: B["editor__header-word-count"],
|
|
1907
2062
|
children: [
|
|
1908
|
-
/* @__PURE__ */
|
|
1909
|
-
className: e({ [
|
|
2063
|
+
/* @__PURE__ */ K("span", {
|
|
2064
|
+
className: e({ [B["editor__header-word-count--alert"]]: b > f }),
|
|
1910
2065
|
children: b
|
|
1911
2066
|
}),
|
|
1912
2067
|
"\xA0/\xA0",
|
|
@@ -1914,25 +2069,25 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1914
2069
|
]
|
|
1915
2070
|
})]
|
|
1916
2071
|
}),
|
|
1917
|
-
/* @__PURE__ */
|
|
1918
|
-
className: e(
|
|
1919
|
-
children: /* @__PURE__ */
|
|
2072
|
+
/* @__PURE__ */ K("div", {
|
|
2073
|
+
className: e(B.editor, { [B["not-valid"]]: l }),
|
|
2074
|
+
children: /* @__PURE__ */ q(dr, {
|
|
1920
2075
|
initialConfig: T,
|
|
1921
|
-
children: [/* @__PURE__ */
|
|
2076
|
+
children: [/* @__PURE__ */ K(li, {
|
|
1922
2077
|
editorScrollPosition: S,
|
|
1923
2078
|
onCatalogueLinkSearch: h,
|
|
1924
2079
|
catalogueSearchResponse: g
|
|
1925
|
-
}), /* @__PURE__ */
|
|
1926
|
-
className:
|
|
2080
|
+
}), /* @__PURE__ */ q("div", {
|
|
2081
|
+
className: B["editor__field-wrapper"],
|
|
1927
2082
|
children: [
|
|
1928
|
-
/* @__PURE__ */
|
|
1929
|
-
contentEditable: /* @__PURE__ */
|
|
1930
|
-
className:
|
|
2083
|
+
/* @__PURE__ */ K(Fr, {
|
|
2084
|
+
contentEditable: /* @__PURE__ */ K(Vr, {
|
|
2085
|
+
className: B.editor__field,
|
|
1931
2086
|
"aria-label": v.common.rteAriaLabel,
|
|
1932
2087
|
"aria-placeholder": i,
|
|
1933
2088
|
title: v.common.rteTitle,
|
|
1934
|
-
placeholder: /* @__PURE__ */
|
|
1935
|
-
className:
|
|
2089
|
+
placeholder: /* @__PURE__ */ K("div", {
|
|
2090
|
+
className: B.editor__placeholder,
|
|
1936
2091
|
children: i
|
|
1937
2092
|
}),
|
|
1938
2093
|
spellCheck: !1,
|
|
@@ -1943,37 +2098,37 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1943
2098
|
},
|
|
1944
2099
|
onScroll: (e) => C(e.currentTarget.scrollTop)
|
|
1945
2100
|
}),
|
|
1946
|
-
placeholder: /* @__PURE__ */
|
|
1947
|
-
className:
|
|
2101
|
+
placeholder: /* @__PURE__ */ K("div", {
|
|
2102
|
+
className: B.editor__placeholder,
|
|
1948
2103
|
children: i
|
|
1949
2104
|
}),
|
|
1950
|
-
ErrorBoundary:
|
|
2105
|
+
ErrorBoundary: Jr
|
|
1951
2106
|
}),
|
|
1952
|
-
/* @__PURE__ */
|
|
1953
|
-
/* @__PURE__ */
|
|
1954
|
-
/* @__PURE__ */
|
|
1955
|
-
/* @__PURE__ */
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
/* @__PURE__ */
|
|
1961
|
-
/* @__PURE__ */
|
|
1962
|
-
p && /* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ K(si, {}),
|
|
2108
|
+
/* @__PURE__ */ K(ut, {}),
|
|
2109
|
+
/* @__PURE__ */ K(oi, {}),
|
|
2110
|
+
/* @__PURE__ */ K(Zr, {}),
|
|
2111
|
+
/* @__PURE__ */ K(Qr, { validateUrl: on }),
|
|
2112
|
+
/* @__PURE__ */ K(nn, { matchers: sn }),
|
|
2113
|
+
/* @__PURE__ */ K($r, {}),
|
|
2114
|
+
/* @__PURE__ */ K(Xr, { onChange: ee }),
|
|
2115
|
+
/* @__PURE__ */ K(Nn, {}),
|
|
2116
|
+
/* @__PURE__ */ K(un, {}),
|
|
2117
|
+
p && /* @__PURE__ */ K(ci, { editorRef: p })
|
|
1963
2118
|
]
|
|
1964
2119
|
})]
|
|
1965
2120
|
})
|
|
1966
2121
|
}),
|
|
1967
|
-
u !== "" && /* @__PURE__ */
|
|
2122
|
+
u !== "" && /* @__PURE__ */ K(o, {
|
|
1968
2123
|
level: "error",
|
|
1969
2124
|
feedback: u
|
|
1970
2125
|
})
|
|
1971
2126
|
]
|
|
1972
2127
|
});
|
|
1973
|
-
},
|
|
2128
|
+
}, bi = ({ currentLanguage: e = "NL", editorId: t, initialValue: n = "", placeholder: r = "", label: i = "", info: a = "", required: o = !1, notValid: s = !1, notValidatedText: c = "", maxWords: l, rteRef: u, onChange: d, onCatalogueLinkSearch: f, catalogueSearchResponse: p = {
|
|
1974
2129
|
state: "idle",
|
|
1975
2130
|
results: []
|
|
1976
|
-
} }) => /* @__PURE__ */
|
|
2131
|
+
} }) => /* @__PURE__ */ K(_n, { children: /* @__PURE__ */ K(yi, {
|
|
1977
2132
|
currentLanguage: e.toUpperCase(),
|
|
1978
2133
|
editorId: t,
|
|
1979
2134
|
initialValue: n,
|
|
@@ -1990,6 +2145,6 @@ var ei = ({ editorScrollPosition: e, onCatalogueLinkSearch: t, catalogueSearchRe
|
|
|
1990
2145
|
catalogueSearchResponse: p
|
|
1991
2146
|
}) });
|
|
1992
2147
|
//#endregion
|
|
1993
|
-
export {
|
|
2148
|
+
export { hi as a, ui as c, or as d, Qn as f, Yn as h, gi as i, li as l, Xn as m, bi as n, pi as o, Zn as p, vi as r, fi as s, yi as t, cr as u };
|
|
1994
2149
|
|
|
1995
|
-
//# sourceMappingURL=components-
|
|
2150
|
+
//# sourceMappingURL=components-KU0q76JR.js.map
|