@uva-glass/component-library 3.42.1 → 3.42.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.prod-C1B_JvcI.js → Lexical.prod-qYl_ifJ6.js} +221 -221
- package/dist/Lexical.prod-qYl_ifJ6.js.map +1 -0
- package/dist/{LexicalClipboard.prod-Dd64YQH0.js → LexicalClipboard.prod-DIGbXq4v.js} +25 -25
- package/dist/{LexicalClipboard.prod-Dd64YQH0.js.map → LexicalClipboard.prod-DIGbXq4v.js.map} +1 -1
- package/dist/{LexicalComposerContext.prod-DLlRM5wP.js → LexicalComposerContext.prod-DOyoZx0P.js} +3 -3
- package/dist/{LexicalComposerContext.prod-DLlRM5wP.js.map → LexicalComposerContext.prod-DOyoZx0P.js.map} +1 -1
- package/dist/{LexicalLink.prod-ldhpNY9X.js → LexicalLink.prod-ZZwC5ABn.js} +14 -14
- package/dist/{LexicalLink.prod-ldhpNY9X.js.map → LexicalLink.prod-ZZwC5ABn.js.map} +1 -1
- package/dist/{LexicalList.prod-7DmvPZ_J.js → LexicalList.prod-UurCu6DK.js} +30 -30
- package/dist/{LexicalList.prod-7DmvPZ_J.js.map → LexicalList.prod-UurCu6DK.js.map} +1 -1
- package/dist/{LexicalSelection.prod-Dmiwka3x.js → LexicalSelection.prod-DXruZeFN.js} +2 -2
- package/dist/{LexicalSelection.prod-Dmiwka3x.js.map → LexicalSelection.prod-DXruZeFN.js.map} +1 -1
- package/dist/{LexicalTable.prod-iqHmKv_G.js → LexicalTable.prod-COFf1Spn.js} +115 -115
- package/dist/{LexicalTable.prod-iqHmKv_G.js.map → LexicalTable.prod-COFf1Spn.js.map} +1 -1
- package/dist/{LexicalUtils.prod-w0fZ_Z8S.js → LexicalUtils.prod-C3To3vrm.js} +5 -5
- package/dist/{LexicalUtils.prod-w0fZ_Z8S.js.map → LexicalUtils.prod-C3To3vrm.js.map} +1 -1
- package/dist/SortableProvider-l8-7ClBJ.js.map +1 -1
- package/dist/TableCellResizerPlugin-B9MT1fxA.js +248 -0
- package/dist/TableCellResizerPlugin-B9MT1fxA.js.map +1 -0
- package/dist/{TablePlugin-cMMBdz-x.js → TablePlugin-FQQwnq2m.js} +7 -7
- package/dist/{TablePlugin-cMMBdz-x.js.map → TablePlugin-FQQwnq2m.js.map} +1 -1
- package/dist/{client-BIzWgcD3.js → client-BK9NlSVR.js} +13 -13
- package/dist/{client-BIzWgcD3.js.map → client-BK9NlSVR.js.map} +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Card/Card.test.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +3 -3
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
- package/dist/components/FormInput/FormInput.js +2 -2
- package/dist/components/FormInput/FormInput.js.map +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +3 -3
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/Notification/Notification.js.map +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/Periods/Periods.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +7 -6
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.d.ts +2 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +39 -29
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.js +149 -149
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +13 -14
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +4 -4
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/Sortable/sortableReducer.js.map +1 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/hooks/useDebounce.js +2 -2
- package/dist/components/hooks/useDebounce.js.map +1 -1
- package/dist/components/hooks/useOnClickOutside.js.map +1 -1
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-BO6Gg9y6.js → helpers-D3SODeVc.js} +19 -19
- package/dist/{helpers-BO6Gg9y6.js.map → helpers-D3SODeVc.js.map} +1 -1
- package/dist/{index-BwBhYsdx.js → index-B32mP_-H.js} +2219 -2342
- package/dist/index-B32mP_-H.js.map +1 -0
- package/dist/{index-B7xrLR5N.js → index-BVrrnUn0.js} +16 -16
- package/dist/{index-B7xrLR5N.js.map → index-BVrrnUn0.js.map} +1 -1
- package/dist/{index-BYGu3RV5.js → index-BamlKH-k.js} +43 -43
- package/dist/{index-BYGu3RV5.js.map → index-BamlKH-k.js.map} +1 -1
- package/dist/{index-BeAF9HWV.js → index-iImjiPdB.js} +16 -16
- package/dist/{index-BeAF9HWV.js.map → index-iImjiPdB.js.map} +1 -1
- package/dist/{index-nrPtQ1dv.js → index-yEhaxKq-.js} +3 -3
- package/dist/{index-nrPtQ1dv.js.map → index-yEhaxKq-.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-CbXtwYTX.js → react-18-DXfB7ZX7.js} +2 -2
- package/dist/{react-18-CbXtwYTX.js.map → react-18-DXfB7ZX7.js.map} +1 -1
- package/dist/{react.esm-CJKnSGEF.js → react.esm-WLX_DeH0.js} +19 -19
- package/dist/react.esm-WLX_DeH0.js.map +1 -0
- package/dist/setupTests.js +1 -1
- package/dist/setupTests.js.map +1 -1
- package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +1 -1
- package/dist/storybook__react.d.js +13 -13
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-utils-ea_YDVtd.js → test-utils-BP59mSnn.js} +3 -3
- package/dist/{test-utils-ea_YDVtd.js.map → test-utils-BP59mSnn.js.map} +1 -1
- package/package.json +1 -1
- package/dist/Lexical.prod-C1B_JvcI.js.map +0 -1
- package/dist/TableCellResizerPlugin-D6jjhYoD.js +0 -239
- package/dist/TableCellResizerPlugin-D6jjhYoD.js.map +0 -1
- package/dist/index-BwBhYsdx.js.map +0 -1
- package/dist/react.esm-CJKnSGEF.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { w as T, r as G, i as ge, _ as Rt, j as Vt, b as jt, T as Ft, S as Qt, L as Gt } from "./LexicalUtils.prod-
|
|
2
|
-
import { m as tt, k as Ne, P as L, _ as M, g as nt, e as Zt, s as _e, h as dt, B as U, i as ot, j as en, l as Ot, T as re, n as Ee, W as rt, x as D, E as tn, Q as nn, U as on, p as rn, J as De, r as Kt, d as ln, t as ye, F as Ue, S as Ae, u as sn, D as an, w as cn, z as un, A as Ie, K as hn, C as dn, G as At, H as fn, V as j, L as gn, N as mn, R as pn, X as _n, Y as Cn, Z as Sn, a0 as wn, a1 as bn, a2 as fe, M as ne, a3 as Me, a4 as yn, a as Et, a5 as Nn, a6 as vn, f as xn, a7 as Tn, a8 as Rn, a9 as ft, aa as Fn, ab as gt, o as On, ac as mt, O as pt, v as Re, ad as Kn } from "./Lexical.prod-
|
|
3
|
-
import { F as An, J as En } from "./LexicalClipboard.prod-
|
|
1
|
+
import { w as T, r as G, i as ge, _ as Rt, j as Vt, b as jt, T as Ft, S as Qt, L as Gt } from "./LexicalUtils.prod-C3To3vrm.js";
|
|
2
|
+
import { m as tt, k as Ne, P as L, _ as M, g as nt, e as Zt, s as _e, h as dt, B as U, i as ot, j as en, l as Ot, T as re, n as Ee, W as rt, x as D, E as tn, Q as nn, U as on, p as rn, J as De, r as Kt, d as ln, t as ye, F as Ue, S as Ae, u as sn, D as an, w as cn, z as un, A as Ie, K as hn, C as dn, G as At, H as fn, V as j, L as gn, N as mn, R as pn, X as _n, Y as Cn, Z as Sn, a0 as wn, a1 as bn, a2 as fe, M as ne, a3 as Me, a4 as yn, a as Et, a5 as Nn, a6 as vn, f as xn, a7 as Tn, a8 as Rn, a9 as ft, aa as Fn, ab as gt, o as On, ac as mt, O as pt, v as Re, ad as Kn } from "./Lexical.prod-qYl_ifJ6.js";
|
|
3
|
+
import { F as An, J as En } from "./LexicalClipboard.prod-DIGbXq4v.js";
|
|
4
4
|
const lt = /^(\d+(?:\.\d+)?)px$/, W = { BOTH: 3, COLUMN: 2, NO_STATUS: 0, ROW: 1 };
|
|
5
5
|
class ce extends tt {
|
|
6
6
|
static getType() {
|
|
@@ -227,25 +227,25 @@ function zn(n, e, t = !0) {
|
|
|
227
227
|
return o;
|
|
228
228
|
}
|
|
229
229
|
function io(n) {
|
|
230
|
-
const e = T(n, (t) => b(t));
|
|
230
|
+
const e = T(n, ((t) => b(t)));
|
|
231
231
|
return b(e) ? e : null;
|
|
232
232
|
}
|
|
233
233
|
function kt(n) {
|
|
234
|
-
const e = T(n, (t) => k(t));
|
|
234
|
+
const e = T(n, ((t) => k(t)));
|
|
235
235
|
if (k(e)) return e;
|
|
236
236
|
throw new Error("Expected table cell to be inside of table row.");
|
|
237
237
|
}
|
|
238
238
|
function $t(n) {
|
|
239
|
-
const e = T(n, (t) => $(t));
|
|
239
|
+
const e = T(n, ((t) => $(t)));
|
|
240
240
|
if ($(e)) return e;
|
|
241
241
|
throw new Error("Expected table cell to be inside of table.");
|
|
242
242
|
}
|
|
243
243
|
function ao(n) {
|
|
244
244
|
const e = kt(n);
|
|
245
|
-
return $t(e).getChildren().findIndex((t) => t.is(e));
|
|
245
|
+
return $t(e).getChildren().findIndex(((t) => t.is(e)));
|
|
246
246
|
}
|
|
247
247
|
function co(n) {
|
|
248
|
-
return kt(n).getChildren().findIndex((e) => e.is(n));
|
|
248
|
+
return kt(n).getChildren().findIndex(((e) => e.is(n)));
|
|
249
249
|
}
|
|
250
250
|
st && "InputEvent" in window && !Mn && new window.InputEvent("input");
|
|
251
251
|
const Xe = (n, e) => n === W.BOTH || n === e ? e : W.NO_STATUS;
|
|
@@ -382,7 +382,7 @@ function Ln(n) {
|
|
|
382
382
|
for (const a of t) for (const c of a) {
|
|
383
383
|
if (!c || !c.cell) continue;
|
|
384
384
|
const g = c.cell.getKey();
|
|
385
|
-
if (!i.has(g) && n.some((d) => d.is(c.cell))) {
|
|
385
|
+
if (!i.has(g) && n.some(((d) => d.is(c.cell)))) {
|
|
386
386
|
i.add(g);
|
|
387
387
|
const d = c.startRow, m = c.startColumn, C = c.cell.__rowSpan || 1, S = c.cell.__colSpan || 1;
|
|
388
388
|
o = Math.min(o, d), r = Math.max(r, d + C - 1), s = Math.min(s, m), l = Math.max(l, m + S - 1);
|
|
@@ -410,15 +410,15 @@ function Wn(n) {
|
|
|
410
410
|
function Pn(n) {
|
|
411
411
|
const [e, t, o] = I(n), r = e.__colSpan, s = e.__rowSpan;
|
|
412
412
|
if (r === 1 && s === 1) return;
|
|
413
|
-
const [l, i] = J(o, e, e), { startColumn: u, startRow: f } = i, h = e.__headerState & W.COLUMN, p = Array.from({ length: r }, (c, g) => {
|
|
413
|
+
const [l, i] = J(o, e, e), { startColumn: u, startRow: f } = i, h = e.__headerState & W.COLUMN, p = Array.from({ length: r }, ((c, g) => {
|
|
414
414
|
let d = h;
|
|
415
415
|
for (let m = 0; d !== 0 && m < l.length; m++) d &= l[m][g + u].cell.__headerState;
|
|
416
416
|
return d;
|
|
417
|
-
}), _ = e.__headerState & W.ROW, a = Array.from({ length: s }, (c, g) => {
|
|
417
|
+
})), _ = e.__headerState & W.ROW, a = Array.from({ length: s }, ((c, g) => {
|
|
418
418
|
let d = _;
|
|
419
419
|
for (let m = 0; d !== 0 && m < l[0].length; m++) d &= l[g + f][m].cell.__headerState;
|
|
420
420
|
return d;
|
|
421
|
-
});
|
|
421
|
+
}));
|
|
422
422
|
if (r > 1) {
|
|
423
423
|
for (let c = 1; c < r; c++) e.insertAfter(X(p[c] | a[0]).append(U()));
|
|
424
424
|
e.setColSpan(1);
|
|
@@ -515,14 +515,14 @@ function St(n) {
|
|
|
515
515
|
return null;
|
|
516
516
|
}
|
|
517
517
|
function wt(n) {
|
|
518
|
-
const [[e, t, o, r], [s, l, i, u]] = ["anchor", "focus"].map((f) => {
|
|
518
|
+
const [[e, t, o, r], [s, l, i, u]] = ["anchor", "focus"].map(((f) => {
|
|
519
519
|
const h = n[f].getNode(), p = T(h, b);
|
|
520
520
|
b(p) || w(238, f, h.getKey(), h.getType());
|
|
521
521
|
const _ = p.getParent();
|
|
522
522
|
k(_) || w(239, f);
|
|
523
523
|
const a = _.getParent();
|
|
524
524
|
return $(a) || w(240, f), [h, p, _, a];
|
|
525
|
-
});
|
|
525
|
+
}));
|
|
526
526
|
return r.is(u) || w(241), { anchorCell: t, anchorNode: e, anchorRow: o, anchorTable: r, focusCell: l, focusNode: s, focusRow: i, focusTable: u };
|
|
527
527
|
}
|
|
528
528
|
class ze {
|
|
@@ -565,10 +565,10 @@ class ze {
|
|
|
565
565
|
}
|
|
566
566
|
hasFormat(e) {
|
|
567
567
|
let t = 0;
|
|
568
|
-
this.getNodes().filter(b).forEach((r) => {
|
|
568
|
+
this.getNodes().filter(b).forEach(((r) => {
|
|
569
569
|
const s = r.getFirstChild();
|
|
570
570
|
rt(s) && (t |= s.getTextFormat());
|
|
571
|
-
});
|
|
571
|
+
}));
|
|
572
572
|
const o = on[e];
|
|
573
573
|
return !!(t & o);
|
|
574
574
|
}
|
|
@@ -603,15 +603,15 @@ class ze {
|
|
|
603
603
|
let c = null;
|
|
604
604
|
for (let d = p; d <= _; d++) for (let m = f; m <= h; m++) {
|
|
605
605
|
const { cell: C } = l[d][m], S = C.getParent();
|
|
606
|
-
k(S) || w(160), S !== c && (a.set(S.getKey(), S), c = S), a.has(C.getKey()) || Bn(C, (N) => {
|
|
606
|
+
k(S) || w(160), S !== c && (a.set(S.getKey(), S), c = S), a.has(C.getKey()) || Bn(C, ((N) => {
|
|
607
607
|
a.set(N.getKey(), N);
|
|
608
|
-
});
|
|
608
|
+
}));
|
|
609
609
|
}
|
|
610
610
|
const g = Array.from(a.values());
|
|
611
611
|
return nn() || (this._cachedNodes = g), g;
|
|
612
612
|
}
|
|
613
613
|
getTextContent() {
|
|
614
|
-
const e = this.getNodes().filter((o) => b(o));
|
|
614
|
+
const e = this.getNodes().filter(((o) => b(o)));
|
|
615
615
|
let t = "";
|
|
616
616
|
for (let o = 0; o < e.length; o++) {
|
|
617
617
|
const r = e[o], s = r.__parent, l = (e[o + 1] || {}).__parent;
|
|
@@ -654,14 +654,14 @@ class Dn {
|
|
|
654
654
|
return this.table;
|
|
655
655
|
}
|
|
656
656
|
removeListeners() {
|
|
657
|
-
this.abortController.abort("removeListeners"), Array.from(this.listenersToRemove).forEach((e) => e()), this.listenersToRemove.clear();
|
|
657
|
+
this.abortController.abort("removeListeners"), Array.from(this.listenersToRemove).forEach(((e) => e())), this.listenersToRemove.clear();
|
|
658
658
|
}
|
|
659
659
|
$lookup() {
|
|
660
660
|
return Lt(this.tableNodeKey, this.editor);
|
|
661
661
|
}
|
|
662
662
|
trackTable() {
|
|
663
|
-
const e = new MutationObserver((t) => {
|
|
664
|
-
this.editor.getEditorState().read(() => {
|
|
663
|
+
const e = new MutationObserver(((t) => {
|
|
664
|
+
this.editor.getEditorState().read((() => {
|
|
665
665
|
let o = !1;
|
|
666
666
|
for (let l = 0; l < t.length; l++) {
|
|
667
667
|
const i = t[l].target.nodeName;
|
|
@@ -673,12 +673,12 @@ class Dn {
|
|
|
673
673
|
if (!o) return;
|
|
674
674
|
const { tableNode: r, tableElement: s } = this.$lookup();
|
|
675
675
|
this.table = me(r, s);
|
|
676
|
-
}, { editor: this.editor });
|
|
677
|
-
});
|
|
678
|
-
this.editor.getEditorState().read(() => {
|
|
676
|
+
}), { editor: this.editor });
|
|
677
|
+
}));
|
|
678
|
+
this.editor.getEditorState().read((() => {
|
|
679
679
|
const { tableNode: t, tableElement: o } = this.$lookup();
|
|
680
680
|
this.table = me(t, o), e.observe(o, { attributes: !0, childList: !0, subtree: !0 });
|
|
681
|
-
}, { editor: this.editor });
|
|
681
|
+
}), { editor: this.editor });
|
|
682
682
|
}
|
|
683
683
|
$clearHighlight() {
|
|
684
684
|
const e = this.editor;
|
|
@@ -759,9 +759,9 @@ class Dn {
|
|
|
759
759
|
const o = Nn(), r = o.anchor, s = o.focus, l = t.getNodes().filter(b);
|
|
760
760
|
l.length > 0 || w(237);
|
|
761
761
|
const i = l[0].getFirstChild(), u = rt(i) ? i.getFormatFlags(e, null) : null;
|
|
762
|
-
l.forEach((f) => {
|
|
762
|
+
l.forEach(((f) => {
|
|
763
763
|
r.set(f.getKey(), 0, "element"), s.set(f.getKey(), f.getChildrenSize(), "element"), o.formatText(e, u);
|
|
764
|
-
}), ne(t), this.editor.dispatchCommand(fe, void 0);
|
|
764
|
+
})), ne(t), this.editor.dispatchCommand(fe, void 0);
|
|
765
765
|
}
|
|
766
766
|
$clearText() {
|
|
767
767
|
const { editor: e } = this, t = Ae(this.tableNodeKey);
|
|
@@ -774,14 +774,14 @@ class Dn {
|
|
|
774
774
|
const i = t.getParent();
|
|
775
775
|
return t.remove(), void (vn(i) && i.isEmpty() && e.dispatchCommand(Et, void 0));
|
|
776
776
|
}
|
|
777
|
-
r.forEach((i) => {
|
|
777
|
+
r.forEach(((i) => {
|
|
778
778
|
if (D(i)) {
|
|
779
779
|
const u = U(), f = ot();
|
|
780
|
-
u.append(f), i.append(u), i.getChildren().forEach((h) => {
|
|
780
|
+
u.append(f), i.append(u), i.getChildren().forEach(((h) => {
|
|
781
781
|
h !== u && h.remove();
|
|
782
|
-
});
|
|
782
|
+
}));
|
|
783
783
|
}
|
|
784
|
-
}), Fe(e, this.table, null), ne(null), e.dispatchCommand(fe, void 0);
|
|
784
|
+
})), Fe(e, this.table, null), ne(null), e.dispatchCommand(fe, void 0);
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
const Qe = "__lexicalTableSelection", In = (n) => !(1 & ~n.buttons);
|
|
@@ -810,19 +810,19 @@ function Xn(n, e, t, o) {
|
|
|
810
810
|
const l = new Dn(t, n.getKey()), i = ie(n, e);
|
|
811
811
|
(function(a, c) {
|
|
812
812
|
bt(a) !== null && w(205), a[Qe] = c;
|
|
813
|
-
})(i, l), l.listenersToRemove.add(() => function(a, c) {
|
|
813
|
+
})(i, l), l.listenersToRemove.add((() => (function(a, c) {
|
|
814
814
|
bt(a) === c && delete a[Qe];
|
|
815
|
-
}(i, l));
|
|
815
|
+
})(i, l)));
|
|
816
816
|
const u = (a) => {
|
|
817
817
|
if (l.pointerType = a.pointerType, a.button !== 0 || !ye(a.target) || !s) return;
|
|
818
818
|
const c = $e(a.target);
|
|
819
|
-
c !== null && t.update(() => {
|
|
819
|
+
c !== null && t.update((() => {
|
|
820
820
|
const g = Ue();
|
|
821
821
|
if (Ct && a.shiftKey && Q(g, n) && (M(g) || O(g))) {
|
|
822
822
|
const d = g.anchor.getNode(), m = ve(n, g.anchor.getNode());
|
|
823
823
|
m ? (l.$setAnchorCellForSelection(se(l, m)), l.$setFocusCellForSelection(c), ee(a)) : (n.isBefore(d) ? n.selectStart() : n.selectEnd()).anchor.set(g.anchor.key, g.anchor.offset, g.anchor.type);
|
|
824
824
|
} else a.pointerType !== "touch" && l.$setAnchorCellForSelection(c);
|
|
825
|
-
}), (() => {
|
|
825
|
+
})), (() => {
|
|
826
826
|
if (l.isSelecting) return;
|
|
827
827
|
const g = () => {
|
|
828
828
|
l.isSelecting = !1, s.removeEventListener("pointerup", g), s.removeEventListener("pointermove", d);
|
|
@@ -838,34 +838,34 @@ function Xn(n, e, t, o) {
|
|
|
838
838
|
l.isSelecting = !0, s.addEventListener("pointerup", g, l.listenerOptions), s.addEventListener("pointermove", d, l.listenerOptions);
|
|
839
839
|
})();
|
|
840
840
|
};
|
|
841
|
-
i.addEventListener("pointerdown", u, l.listenerOptions), l.listenersToRemove.add(() => {
|
|
841
|
+
i.addEventListener("pointerdown", u, l.listenerOptions), l.listenersToRemove.add((() => {
|
|
842
842
|
i.removeEventListener("pointerdown", u);
|
|
843
|
-
});
|
|
843
|
+
}));
|
|
844
844
|
const f = (a) => {
|
|
845
845
|
a.detail >= 3 && ye(a.target) && $e(a.target) !== null && a.preventDefault();
|
|
846
846
|
};
|
|
847
|
-
i.addEventListener("mousedown", f, l.listenerOptions), l.listenersToRemove.add(() => {
|
|
847
|
+
i.addEventListener("mousedown", f, l.listenerOptions), l.listenersToRemove.add((() => {
|
|
848
848
|
i.removeEventListener("mousedown", f);
|
|
849
|
-
});
|
|
849
|
+
}));
|
|
850
850
|
const h = (a) => {
|
|
851
851
|
const c = a.target;
|
|
852
|
-
a.button === 0 && ye(c) && t.update(() => {
|
|
852
|
+
a.button === 0 && ye(c) && t.update((() => {
|
|
853
853
|
const g = L();
|
|
854
854
|
O(g) && g.tableKey === l.tableNodeKey && r.contains(c) && l.$clearHighlight();
|
|
855
|
-
});
|
|
855
|
+
}));
|
|
856
856
|
};
|
|
857
|
-
s.addEventListener("pointerdown", h, l.listenerOptions), l.listenersToRemove.add(() => {
|
|
857
|
+
s.addEventListener("pointerdown", h, l.listenerOptions), l.listenersToRemove.add((() => {
|
|
858
858
|
s.removeEventListener("pointerdown", h);
|
|
859
|
-
});
|
|
860
|
-
for (const [a, c] of Jn) l.listenersToRemove.add(t.registerCommand(a, (g) => Ht(t, g, c, n, l), Ie));
|
|
861
|
-
l.listenersToRemove.add(t.registerCommand(hn, (a) => {
|
|
859
|
+
}));
|
|
860
|
+
for (const [a, c] of Jn) l.listenersToRemove.add(t.registerCommand(a, ((g) => Ht(t, g, c, n, l)), Ie));
|
|
861
|
+
l.listenersToRemove.add(t.registerCommand(hn, ((a) => {
|
|
862
862
|
const c = L();
|
|
863
863
|
if (O(c)) {
|
|
864
864
|
const g = ve(n, c.focus.getNode());
|
|
865
865
|
if (g !== null) return ee(a), g.selectEnd(), !0;
|
|
866
866
|
}
|
|
867
867
|
return !1;
|
|
868
|
-
}, Ie));
|
|
868
|
+
}), Ie));
|
|
869
869
|
const p = (a) => () => {
|
|
870
870
|
const c = L();
|
|
871
871
|
if (!Q(c, n)) return !1;
|
|
@@ -874,7 +874,7 @@ function Xn(n, e, t, o) {
|
|
|
874
874
|
if (!b(ve(n, c.anchor.getNode()))) return !1;
|
|
875
875
|
const g = c.anchor.getNode(), d = c.focus.getNode(), m = n.isParentOf(g), C = n.isParentOf(d);
|
|
876
876
|
if (m && !C || C && !m) return l.$clearText(), !0;
|
|
877
|
-
const S = T(c.anchor.getNode(), (y) => D(y)), N = S && T(S, (y) => D(y) && b(y.getParent()));
|
|
877
|
+
const S = T(c.anchor.getNode(), ((y) => D(y))), N = S && T(S, ((y) => D(y) && b(y.getParent())));
|
|
878
878
|
if (!D(N) || !D(S)) return !1;
|
|
879
879
|
if (a === At && N.getPreviousSibling() === null) return !0;
|
|
880
880
|
}
|
|
@@ -892,7 +892,7 @@ function Xn(n, e, t, o) {
|
|
|
892
892
|
return !!Q(c, n) && !!O(c) && (a && (a.preventDefault(), a.stopPropagation()), l.$clearText(), !0);
|
|
893
893
|
};
|
|
894
894
|
for (const a of Yn) l.listenersToRemove.add(t.registerCommand(a, _, j));
|
|
895
|
-
return l.listenersToRemove.add(t.registerCommand(pn, (a) => {
|
|
895
|
+
return l.listenersToRemove.add(t.registerCommand(pn, ((a) => {
|
|
896
896
|
const c = L();
|
|
897
897
|
if (c) {
|
|
898
898
|
if (!O(c) && !M(c)) return !1;
|
|
@@ -901,21 +901,21 @@ function Xn(n, e, t, o) {
|
|
|
901
901
|
return M(c) ? (c.removeText(), !0) : g;
|
|
902
902
|
}
|
|
903
903
|
return !1;
|
|
904
|
-
}, j)), l.listenersToRemove.add(t.registerCommand(_n, (a) => {
|
|
904
|
+
}), j)), l.listenersToRemove.add(t.registerCommand(_n, ((a) => {
|
|
905
905
|
const c = L();
|
|
906
906
|
if (!Q(c, n)) return !1;
|
|
907
907
|
if (O(c)) return l.$formatCells(a), !0;
|
|
908
908
|
if (M(c)) {
|
|
909
|
-
const g = T(c.anchor.getNode(), (d) => b(d));
|
|
909
|
+
const g = T(c.anchor.getNode(), ((d) => b(d)));
|
|
910
910
|
if (!b(g)) return !1;
|
|
911
911
|
}
|
|
912
912
|
return !1;
|
|
913
|
-
}, j)), l.listenersToRemove.add(t.registerCommand(Cn, (a) => {
|
|
913
|
+
}), j)), l.listenersToRemove.add(t.registerCommand(Cn, ((a) => {
|
|
914
914
|
const c = L();
|
|
915
915
|
if (!O(c) || !Q(c, n)) return !1;
|
|
916
916
|
const g = c.anchor.getNode(), d = c.focus.getNode();
|
|
917
917
|
if (!b(g) || !b(d)) return !1;
|
|
918
|
-
if (function(A, z) {
|
|
918
|
+
if ((function(A, z) {
|
|
919
919
|
if (O(A)) {
|
|
920
920
|
const F = A.anchor.getNode(), K = A.focus.getNode();
|
|
921
921
|
if (z && F && K) {
|
|
@@ -924,7 +924,7 @@ function Xn(n, e, t, o) {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
return !1;
|
|
927
|
-
}(c, n)) return n.setFormat(a), !0;
|
|
927
|
+
})(c, n)) return n.setFormat(a), !0;
|
|
928
928
|
const [m, C, S] = J(n, g, d), N = Math.max(C.startRow + C.cell.__rowSpan - 1, S.startRow + S.cell.__rowSpan - 1), y = Math.max(C.startColumn + C.cell.__colSpan - 1, S.startColumn + S.cell.__colSpan - 1), v = Math.min(C.startRow, S.startRow), R = Math.min(C.startColumn, S.startColumn), E = /* @__PURE__ */ new Set();
|
|
929
929
|
for (let A = v; A <= N; A++) for (let z = R; z <= y; z++) {
|
|
930
930
|
const F = m[A][z].cell;
|
|
@@ -937,12 +937,12 @@ function Xn(n, e, t, o) {
|
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
return !0;
|
|
940
|
-
}, j)), l.listenersToRemove.add(t.registerCommand(Sn, (a) => {
|
|
940
|
+
}), j)), l.listenersToRemove.add(t.registerCommand(Sn, ((a) => {
|
|
941
941
|
const c = L();
|
|
942
942
|
if (!Q(c, n)) return !1;
|
|
943
943
|
if (O(c)) return l.$clearHighlight(), !1;
|
|
944
944
|
if (M(c)) {
|
|
945
|
-
const g = T(c.anchor.getNode(), (d) => b(d));
|
|
945
|
+
const g = T(c.anchor.getNode(), ((d) => b(d)));
|
|
946
946
|
if (!b(g)) return !1;
|
|
947
947
|
if (typeof a == "string") {
|
|
948
948
|
const d = xt(t, c, n);
|
|
@@ -950,11 +950,11 @@ function Xn(n, e, t, o) {
|
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
return !1;
|
|
953
|
-
}, j)), o && l.listenersToRemove.add(t.registerCommand(wn, (a) => {
|
|
953
|
+
}), j)), o && l.listenersToRemove.add(t.registerCommand(wn, ((a) => {
|
|
954
954
|
const c = L();
|
|
955
955
|
if (!M(c) || !c.isCollapsed() || !Q(c, n)) return !1;
|
|
956
956
|
const g = be(c.anchor.getNode());
|
|
957
|
-
return !(g === null || !n.is(pe(g))) && (ee(a), function(d, m) {
|
|
957
|
+
return !(g === null || !n.is(pe(g))) && (ee(a), (function(d, m) {
|
|
958
958
|
const C = m === "next" ? "getNextSibling" : "getPreviousSibling", S = m === "next" ? "getFirstChild" : "getLastChild", N = d[C]();
|
|
959
959
|
if (D(N)) return N.selectEnd();
|
|
960
960
|
const y = T(d, k);
|
|
@@ -965,12 +965,12 @@ function Xn(n, e, t, o) {
|
|
|
965
965
|
}
|
|
966
966
|
const v = T(y, $);
|
|
967
967
|
v === null && w(248), m === "next" ? v.selectNext() : v.selectPrevious();
|
|
968
|
-
}(g, a.shiftKey ? "previous" : "next"), !0);
|
|
969
|
-
}, j)), l.listenersToRemove.add(t.registerCommand(bn, (a) => n.isSelected(), Ie)), l.listenersToRemove.add(t.registerCommand(Kt, (a, c) => {
|
|
968
|
+
})(g, a.shiftKey ? "previous" : "next"), !0);
|
|
969
|
+
}), j)), l.listenersToRemove.add(t.registerCommand(bn, ((a) => n.isSelected()), Ie)), l.listenersToRemove.add(t.registerCommand(Kt, ((a, c) => {
|
|
970
970
|
if (t !== c) return !1;
|
|
971
|
-
const { nodes: g, selection: d } = a, m = d.getStartEndPoints(), C = O(d), S = M(d) && T(d.anchor.getNode(), (x) => b(x)) !== null && T(d.focus.getNode(), (x) => b(x)) !== null || C;
|
|
971
|
+
const { nodes: g, selection: d } = a, m = d.getStartEndPoints(), C = O(d), S = M(d) && T(d.anchor.getNode(), ((x) => b(x))) !== null && T(d.focus.getNode(), ((x) => b(x))) !== null || C;
|
|
972
972
|
if (g.length !== 1 || !$(g[0]) || !S || m === null) return !1;
|
|
973
|
-
const [N, y] = m, [v, R, E] = I(N), A = T(y.getNode(), (x) => b(x));
|
|
973
|
+
const [N, y] = m, [v, R, E] = I(N), A = T(y.getNode(), ((x) => b(x)));
|
|
974
974
|
if (!(b(v) && b(A) && k(R) && $(E))) return !1;
|
|
975
975
|
const z = g[0], [F, K, P] = J(E, v, A), [B] = oe(z, null, null), te = F.length, Ce = te > 0 ? F[0].length : 0;
|
|
976
976
|
let q = K.startRow, H = K.startColumn, le = B.length, ue = le > 0 ? B[0].length : 0;
|
|
@@ -1005,16 +1005,16 @@ function Xn(n, e, t, o) {
|
|
|
1005
1005
|
Ln(Z), Le = !0;
|
|
1006
1006
|
}
|
|
1007
1007
|
const { cell: Pe } = Se[x][Y], Ut = Pe.getChildren();
|
|
1008
|
-
we.getChildren().forEach((Z) => {
|
|
1008
|
+
we.getChildren().forEach(((Z) => {
|
|
1009
1009
|
_e(Z) && U().append(Z), Pe.append(Z);
|
|
1010
|
-
}), Ut.forEach((Z) => Z.remove());
|
|
1010
|
+
})), Ut.forEach(((Z) => Z.remove()));
|
|
1011
1011
|
}
|
|
1012
1012
|
if (C && Le) {
|
|
1013
1013
|
const [x] = oe(E.getWritable(), null, null);
|
|
1014
1014
|
x[K.startRow][K.startColumn].cell.selectEnd();
|
|
1015
1015
|
}
|
|
1016
1016
|
return !0;
|
|
1017
|
-
}, j)), l.listenersToRemove.add(t.registerCommand(fe, () => {
|
|
1017
|
+
}), j)), l.listenersToRemove.add(t.registerCommand(fe, (() => {
|
|
1018
1018
|
const a = L(), c = Ue(), g = l.getAndClearNextFocus();
|
|
1019
1019
|
if (g !== null) {
|
|
1020
1020
|
const { focusCell: d } = g;
|
|
@@ -1025,7 +1025,7 @@ function Xn(n, e, t, o) {
|
|
|
1025
1025
|
const d = a.anchor.getNode(), m = n.getFirstChild(), C = be(d);
|
|
1026
1026
|
if (C !== null && k(m)) {
|
|
1027
1027
|
const S = m.getFirstChild();
|
|
1028
|
-
if (b(S) && n.is(T(C, (N) => N.is(n) || N.is(S)))) return S.selectStart(), !0;
|
|
1028
|
+
if (b(S) && n.is(T(C, ((N) => N.is(n) || N.is(S))))) return S.selectStart(), !0;
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
if (M(a)) {
|
|
@@ -1054,18 +1054,18 @@ function Xn(n, e, t, o) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
return a && !a.is(c) && (O(a) || O(c)) && l.tableSelection && !l.tableSelection.is(c) ? (O(a) && a.tableKey === l.tableNodeKey ? l.$updateTableTableSelection(a) : !O(a) && O(c) && c.tableKey === l.tableNodeKey && l.$updateTableTableSelection(null), !1) : (l.hasHijackedSelectionStyles && !n.isSelected() ? function(d, m) {
|
|
1058
|
-
m.$enableHighlightStyle(), at(m.table, (C) => {
|
|
1057
|
+
return a && !a.is(c) && (O(a) || O(c)) && l.tableSelection && !l.tableSelection.is(c) ? (O(a) && a.tableKey === l.tableNodeKey ? l.$updateTableTableSelection(a) : !O(a) && O(c) && c.tableKey === l.tableNodeKey && l.$updateTableTableSelection(null), !1) : (l.hasHijackedSelectionStyles && !n.isSelected() ? (function(d, m) {
|
|
1058
|
+
m.$enableHighlightStyle(), at(m.table, ((C) => {
|
|
1059
1059
|
const S = C.elem;
|
|
1060
1060
|
C.highlighted = !1, Pt(d, C), S.getAttribute("style") || S.removeAttribute("style");
|
|
1061
|
-
});
|
|
1062
|
-
}(t, l) : !l.hasHijackedSelectionStyles && n.isSelected() && Nt(t, l), !1);
|
|
1063
|
-
}, j)), l.listenersToRemove.add(t.registerCommand(Et, () => {
|
|
1061
|
+
}));
|
|
1062
|
+
})(t, l) : !l.hasHijackedSelectionStyles && n.isSelected() && Nt(t, l), !1);
|
|
1063
|
+
}), j)), l.listenersToRemove.add(t.registerCommand(Et, (() => {
|
|
1064
1064
|
const a = L();
|
|
1065
1065
|
if (!M(a) || !a.isCollapsed() || !Q(a, n)) return !1;
|
|
1066
1066
|
const c = xt(t, a, n);
|
|
1067
1067
|
return !!c && (vt(c, n), !0);
|
|
1068
|
-
}, j)), l;
|
|
1068
|
+
}), j)), l;
|
|
1069
1069
|
}
|
|
1070
1070
|
function bt(n) {
|
|
1071
1071
|
return n[Qe] || null;
|
|
@@ -1125,10 +1125,10 @@ function me(n, e) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
function Fe(n, e, t) {
|
|
1127
1127
|
const o = new Set(t ? t.getNodes() : []);
|
|
1128
|
-
at(e, (r, s) => {
|
|
1128
|
+
at(e, ((r, s) => {
|
|
1129
1129
|
const l = r.elem;
|
|
1130
1130
|
o.has(s) ? (r.highlighted = !0, Wt(n, r)) : (r.highlighted = !1, Pt(n, r), l.getAttribute("style") || l.removeAttribute("style"));
|
|
1131
|
-
});
|
|
1131
|
+
}));
|
|
1132
1132
|
}
|
|
1133
1133
|
function at(n, e) {
|
|
1134
1134
|
const { domRows: t } = n;
|
|
@@ -1143,9 +1143,9 @@ function at(n, e) {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
function Nt(n, e) {
|
|
1146
|
-
e.$disableHighlightStyle(), at(e.table, (t) => {
|
|
1146
|
+
e.$disableHighlightStyle(), at(e.table, ((t) => {
|
|
1147
1147
|
t.highlighted = !0, Wt(n, t);
|
|
1148
|
-
});
|
|
1148
|
+
}));
|
|
1149
1149
|
}
|
|
1150
1150
|
const qn = (n, e, t, o, r) => {
|
|
1151
1151
|
const s = r === "forward";
|
|
@@ -1185,31 +1185,31 @@ function he(n, e, [t, o]) {
|
|
|
1185
1185
|
return i === void 0 && w(250, t, String(l)), i;
|
|
1186
1186
|
}
|
|
1187
1187
|
function Vn(n, e, t, o, r) {
|
|
1188
|
-
const s = ke(e, t, o), l = function(v, R) {
|
|
1188
|
+
const s = ke(e, t, o), l = (function(v, R) {
|
|
1189
1189
|
const { minColumn: E, maxColumn: A, minRow: z, maxRow: F } = R;
|
|
1190
1190
|
let K = 1, P = 1, B = 1, te = 1;
|
|
1191
1191
|
const Ce = v[z], q = v[F];
|
|
1192
1192
|
for (let H = E; H <= A; H++) K = Math.max(K, Ce[H].cell.__rowSpan), te = Math.max(te, q[H].cell.__rowSpan);
|
|
1193
1193
|
for (let H = z; H <= F; H++) P = Math.max(P, v[H][E].cell.__colSpan), B = Math.max(B, v[H][A].cell.__colSpan);
|
|
1194
1194
|
return { bottomSpan: te, leftSpan: P, rightSpan: B, topSpan: K };
|
|
1195
|
-
}(e, s), { topSpan: i, leftSpan: u, bottomSpan: f, rightSpan: h } = l, p = function(v, R) {
|
|
1195
|
+
})(e, s), { topSpan: i, leftSpan: u, bottomSpan: f, rightSpan: h } = l, p = (function(v, R) {
|
|
1196
1196
|
const E = Je(v, R);
|
|
1197
1197
|
return E === null && w(249, R.cell.getKey()), E;
|
|
1198
|
-
}(s, t), [_, a] = Oe(p);
|
|
1198
|
+
})(s, t), [_, a] = Oe(p);
|
|
1199
1199
|
let c = s[_], g = s[a];
|
|
1200
1200
|
r === "forward" ? c += _ === "maxColumn" ? 1 : u : r === "backward" ? c -= _ === "minColumn" ? 1 : h : r === "down" ? g += a === "maxRow" ? 1 : i : r === "up" && (g -= a === "minRow" ? 1 : f);
|
|
1201
1201
|
const d = e[g];
|
|
1202
1202
|
if (d === void 0) return !1;
|
|
1203
1203
|
const m = d[c];
|
|
1204
1204
|
if (m === void 0) return !1;
|
|
1205
|
-
const [C, S] = function(v, R, E) {
|
|
1205
|
+
const [C, S] = (function(v, R, E) {
|
|
1206
1206
|
const A = ke(v, R, E), z = Je(A, R);
|
|
1207
1207
|
if (z) return [he(v, A, z), he(v, A, Oe(z))];
|
|
1208
1208
|
const F = Je(A, E);
|
|
1209
1209
|
if (F) return [he(v, A, Oe(F)), he(v, A, F)];
|
|
1210
1210
|
const K = ["minColumn", "minRow"];
|
|
1211
1211
|
return [he(v, A, K), he(v, A, Oe(K))];
|
|
1212
|
-
}(e, t, m), N = se(n, C.cell), y = se(n, S.cell);
|
|
1212
|
+
})(e, t, m), N = se(n, C.cell), y = se(n, S.cell);
|
|
1213
1213
|
return n.$setAnchorCellForSelection(N), n.$setFocusCellForSelection(y, !0), !0;
|
|
1214
1214
|
}
|
|
1215
1215
|
function Q(n, e) {
|
|
@@ -1250,7 +1250,7 @@ function jn(n, e, t, o, r, s, l) {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
const f = u.getParentAtCaret();
|
|
1252
1252
|
if (!b(f)) return !1;
|
|
1253
|
-
const h = f, p = function(d) {
|
|
1253
|
+
const h = f, p = (function(d) {
|
|
1254
1254
|
for (const m of ft(d).iterNodeCarets("root")) {
|
|
1255
1255
|
const { origin: C } = m;
|
|
1256
1256
|
if (b(C)) {
|
|
@@ -1258,7 +1258,7 @@ function jn(n, e, t, o, r, s, l) {
|
|
|
1258
1258
|
} else if (!k(C)) break;
|
|
1259
1259
|
}
|
|
1260
1260
|
return null;
|
|
1261
|
-
}(mt(h, u.direction)), _ = T(h, $);
|
|
1261
|
+
})(mt(h, u.direction)), _ = T(h, $);
|
|
1262
1262
|
if (!_ || !_.is(s)) return !1;
|
|
1263
1263
|
const a = n.getElementByKey(h.getKey()), c = $e(a);
|
|
1264
1264
|
if (!a || !c) return !1;
|
|
@@ -1273,31 +1273,31 @@ function jn(n, e, t, o, r, s, l) {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
else if (o === "extend") l.$setAnchorCellForSelection(c), l.$setFocusCellForSelection(c, !0);
|
|
1275
1275
|
else {
|
|
1276
|
-
const d = function(m) {
|
|
1276
|
+
const d = (function(m) {
|
|
1277
1277
|
const C = Kn(m);
|
|
1278
1278
|
return gt(C) ? pt(C) : m;
|
|
1279
|
-
}(mt(_, i.direction));
|
|
1279
|
+
})(mt(_, i.direction));
|
|
1280
1280
|
Re(t.anchor, d), Re(t.focus, d);
|
|
1281
1281
|
}
|
|
1282
1282
|
return ee(e), !0;
|
|
1283
1283
|
}
|
|
1284
1284
|
function Ht(n, e, t, o, r) {
|
|
1285
|
-
if ((t === "up" || t === "down") && function(l) {
|
|
1285
|
+
if ((t === "up" || t === "down") && (function(l) {
|
|
1286
1286
|
const i = l.getRootElement();
|
|
1287
1287
|
return i ? i.hasAttribute("aria-controls") && i.getAttribute("aria-controls") === "typeahead-menu" : !1;
|
|
1288
|
-
}(n)) return !1;
|
|
1288
|
+
})(n)) return !1;
|
|
1289
1289
|
const s = L();
|
|
1290
1290
|
if (!Q(s, o)) {
|
|
1291
1291
|
if (M(s)) {
|
|
1292
1292
|
if (t === "backward") {
|
|
1293
1293
|
if (s.focus.offset > 0) return !1;
|
|
1294
|
-
const l = function(u) {
|
|
1294
|
+
const l = (function(u) {
|
|
1295
1295
|
for (let f = u, h = u; h !== null; f = h, h = h.getParent()) if (D(h)) {
|
|
1296
1296
|
if (h !== f && h.getFirstChild() !== f) return null;
|
|
1297
1297
|
if (!h.isInline()) return h;
|
|
1298
1298
|
}
|
|
1299
1299
|
return null;
|
|
1300
|
-
}(s.focus.getNode());
|
|
1300
|
+
})(s.focus.getNode());
|
|
1301
1301
|
if (!l) return !1;
|
|
1302
1302
|
const i = l.getPreviousSibling();
|
|
1303
1303
|
return !!$(i) && (ee(e), e.shiftKey ? s.focus.set(i.getParentOrThrow().getKey(), i.getIndexWithinParent(), "element") : i.selectEnd(), !0);
|
|
@@ -1305,7 +1305,7 @@ function Ht(n, e, t, o, r) {
|
|
|
1305
1305
|
if (e.shiftKey && (t === "up" || t === "down")) {
|
|
1306
1306
|
const l = s.focus.getNode();
|
|
1307
1307
|
if (!s.isCollapsed() && (t === "up" && !s.isBackward() || t === "down" && s.isBackward())) {
|
|
1308
|
-
let i = T(l, (_) => $(_));
|
|
1308
|
+
let i = T(l, ((_) => $(_)));
|
|
1309
1309
|
if (b(i) && (i = T(i, $)), i !== o || !i) return !1;
|
|
1310
1310
|
const u = t === "down" ? i.getNextSibling() : i.getPreviousSibling();
|
|
1311
1311
|
if (!u) return !1;
|
|
@@ -1327,7 +1327,7 @@ function Ht(n, e, t, o, r) {
|
|
|
1327
1327
|
return !1;
|
|
1328
1328
|
}
|
|
1329
1329
|
{
|
|
1330
|
-
let i = T(l, (f) => D(f) && !f.isInline());
|
|
1330
|
+
let i = T(l, ((f) => D(f) && !f.isInline()));
|
|
1331
1331
|
if (b(i) && (i = T(i, $)), !i) return !1;
|
|
1332
1332
|
const u = t === "down" ? i.getNextSibling() : i.getPreviousSibling();
|
|
1333
1333
|
if ($(u) && r.tableNodeKey === u.getKey()) {
|
|
@@ -1406,9 +1406,9 @@ function xt(n, e, t) {
|
|
|
1406
1406
|
if (!r) return;
|
|
1407
1407
|
const s = r.anchorNode, l = n.getElementByKey(o.getKey()), i = ie(t, n.getElementByKey(t.getKey()));
|
|
1408
1408
|
if (!s || !l || !i || !l.contains(s) || i.contains(s)) return;
|
|
1409
|
-
const u = T(e.anchor.getNode(), (C) => b(C));
|
|
1409
|
+
const u = T(e.anchor.getNode(), ((C) => b(C)));
|
|
1410
1410
|
if (!u) return;
|
|
1411
|
-
const f = T(u, (C) => $(C));
|
|
1411
|
+
const f = T(u, ((C) => $(C)));
|
|
1412
1412
|
if (!$(f) || !f.is(t)) return;
|
|
1413
1413
|
const [h, p] = J(t, u, u), _ = h[0][0], a = h[h.length - 1][h[0].length - 1], { startRow: c, startColumn: g } = p, d = c === _.startRow && g === _.startColumn, m = c === a.startRow && g === a.startColumn;
|
|
1414
1414
|
return d ? "first" : m ? "last" : void 0;
|
|
@@ -1486,16 +1486,16 @@ class ae extends tt {
|
|
|
1486
1486
|
return o;
|
|
1487
1487
|
}
|
|
1488
1488
|
updateTableWrapper(e, t, o, r) {
|
|
1489
|
-
this.__frozenColumnCount !== (e ? e.__frozenColumnCount : 0) && function(s, l, i, u) {
|
|
1489
|
+
this.__frozenColumnCount !== (e ? e.__frozenColumnCount : 0) && (function(s, l, i, u) {
|
|
1490
1490
|
u > 0 ? (G(s, i.theme.tableFrozenColumn), l.setAttribute("data-lexical-frozen-column", "true")) : (ge(s, i.theme.tableFrozenColumn), l.removeAttribute("data-lexical-frozen-column"));
|
|
1491
|
-
}(t, o, r, this.__frozenColumnCount), this.__frozenRowCount !== (e ? e.__frozenRowCount : 0) && function(s, l, i, u) {
|
|
1491
|
+
})(t, o, r, this.__frozenColumnCount), this.__frozenRowCount !== (e ? e.__frozenRowCount : 0) && (function(s, l, i, u) {
|
|
1492
1492
|
u > 0 ? (G(s, i.theme.tableFrozenRow), l.setAttribute("data-lexical-frozen-row", "true")) : (ge(s, i.theme.tableFrozenRow), l.removeAttribute("data-lexical-frozen-row"));
|
|
1493
|
-
}(t, o, r, this.__frozenRowCount);
|
|
1493
|
+
})(t, o, r, this.__frozenRowCount);
|
|
1494
1494
|
}
|
|
1495
1495
|
updateTableElement(e, t, o) {
|
|
1496
|
-
this.__style !== (e ? e.__style : "") && (t.style.cssText = this.__style), this.__rowStriping !== (!!e && e.__rowStriping) && function(r, s, l) {
|
|
1496
|
+
this.__style !== (e ? e.__style : "") && (t.style.cssText = this.__style), this.__rowStriping !== (!!e && e.__rowStriping) && (function(r, s, l) {
|
|
1497
1497
|
l ? (G(r, s.theme.tableRowStriping), r.setAttribute("data-lexical-row-striping", "true")) : (ge(r, s.theme.tableRowStriping), r.removeAttribute("data-lexical-row-striping"));
|
|
1498
|
-
}(t, o, this.__rowStriping), function(r, s, l, i) {
|
|
1498
|
+
})(t, o, this.__rowStriping), (function(r, s, l, i) {
|
|
1499
1499
|
const u = r.querySelector("colgroup");
|
|
1500
1500
|
if (!u) return;
|
|
1501
1501
|
const f = [];
|
|
@@ -1504,7 +1504,7 @@ class ae extends tt {
|
|
|
1504
1504
|
_ && (p.style.width = `${_}px`), f.push(p);
|
|
1505
1505
|
}
|
|
1506
1506
|
u.replaceChildren(...f);
|
|
1507
|
-
}(t, 0, this.getColumnCount(), this.getColWidths()), Tt(t, o, this.getFormatType());
|
|
1507
|
+
})(t, 0, this.getColumnCount(), this.getColWidths()), Tt(t, o, this.getFormatType());
|
|
1508
1508
|
}
|
|
1509
1509
|
updateDOM(e, t, o) {
|
|
1510
1510
|
const r = this.getDOMSlot(t).element;
|
|
@@ -1534,7 +1534,7 @@ class ae extends tt {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
const u = r.querySelector(":scope > colgroup");
|
|
1536
1536
|
if (u) {
|
|
1537
|
-
const h = Array.from(r.querySelectorAll(":scope > colgroup > col")).filter((p, _) => i.has(_));
|
|
1537
|
+
const h = Array.from(r.querySelectorAll(":scope > colgroup > col")).filter(((p, _) => i.has(_)));
|
|
1538
1538
|
u.replaceChildren(...h);
|
|
1539
1539
|
}
|
|
1540
1540
|
const f = r.querySelectorAll(":scope > tr");
|
|
@@ -1618,9 +1618,9 @@ class ae extends tt {
|
|
|
1618
1618
|
const e = this.getFirstChild();
|
|
1619
1619
|
if (!e) return 0;
|
|
1620
1620
|
let t = 0;
|
|
1621
|
-
return e.getChildren().forEach((o) => {
|
|
1621
|
+
return e.getChildren().forEach(((o) => {
|
|
1622
1622
|
b(o) && (t += o.getColSpan());
|
|
1623
|
-
}), t;
|
|
1623
|
+
})), t;
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
function Qn(n, e) {
|
|
@@ -1667,12 +1667,12 @@ function to(n) {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
function no(n) {
|
|
1669
1669
|
Ft(n, k);
|
|
1670
|
-
const [e] = oe(n, null, null), t = e.reduce((r, s) => Math.max(r, s.length), 0), o = n.getChildren();
|
|
1670
|
+
const [e] = oe(n, null, null), t = e.reduce(((r, s) => Math.max(r, s.length)), 0), o = n.getChildren();
|
|
1671
1671
|
for (let r = 0; r < e.length; ++r) {
|
|
1672
1672
|
const s = o[r];
|
|
1673
1673
|
if (!s) continue;
|
|
1674
1674
|
k(s) || w(254, s.constructor.name, s.getType());
|
|
1675
|
-
const l = e[r].reduce((i, u) => u ? 1 + i : i, 0);
|
|
1675
|
+
const l = e[r].reduce(((i, u) => u ? 1 + i : i), 0);
|
|
1676
1676
|
if (l !== t) for (let i = l; i < t; ++i) {
|
|
1677
1677
|
const u = X();
|
|
1678
1678
|
u.append(U()), s.append(u);
|
|
@@ -1683,11 +1683,11 @@ function oo(n) {
|
|
|
1683
1683
|
if (n.detail < 3 || !ye(n.target)) return !1;
|
|
1684
1684
|
const e = re(n.target);
|
|
1685
1685
|
if (e === null) return !1;
|
|
1686
|
-
const t = T(e, (o) => D(o) && !o.isInline());
|
|
1686
|
+
const t = T(e, ((o) => D(o) && !o.isInline()));
|
|
1687
1687
|
return t === null ? !1 : !!b(t.getParent()) && (t.select(0), !0);
|
|
1688
1688
|
}
|
|
1689
1689
|
function mo(n) {
|
|
1690
|
-
return n.registerNodeTransform(ce, (e) => {
|
|
1690
|
+
return n.registerNodeTransform(ce, ((e) => {
|
|
1691
1691
|
if (e.getColSpan() > 1 || e.getRowSpan() > 1) {
|
|
1692
1692
|
const [, , t] = I(e), [o] = J(t, e, e), r = o.length, s = o[0].length;
|
|
1693
1693
|
let l = t.getFirstChild();
|
|
@@ -1708,14 +1708,14 @@ function mo(n) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
for (const u of i) u.setColSpan(1), u.setRowSpan(1);
|
|
1710
1710
|
}
|
|
1711
|
-
});
|
|
1711
|
+
}));
|
|
1712
1712
|
}
|
|
1713
1713
|
function po(n, e = !0) {
|
|
1714
1714
|
const t = /* @__PURE__ */ new Map(), o = (s, l, i) => {
|
|
1715
1715
|
const u = ie(s, i), f = Xn(s, u, n, e);
|
|
1716
1716
|
t.set(l, [f, u]);
|
|
1717
|
-
}, r = n.registerMutationListener(ae, (s) => {
|
|
1718
|
-
n.getEditorState().read(() => {
|
|
1717
|
+
}, r = n.registerMutationListener(ae, ((s) => {
|
|
1718
|
+
n.getEditorState().read((() => {
|
|
1719
1719
|
for (const [l, i] of s) {
|
|
1720
1720
|
const u = t.get(l);
|
|
1721
1721
|
if (i === "created" || i === "updated") {
|
|
@@ -1723,15 +1723,15 @@ function po(n, e = !0) {
|
|
|
1723
1723
|
u === void 0 ? o(f, l, h) : h !== u[1] && (u[0].removeListeners(), t.delete(l), o(f, l, h));
|
|
1724
1724
|
} else i === "destroyed" && u !== void 0 && (u[0].removeListeners(), t.delete(l));
|
|
1725
1725
|
}
|
|
1726
|
-
}, { editor: n });
|
|
1727
|
-
}, { skipInitialization: !1 });
|
|
1726
|
+
}), { editor: n });
|
|
1727
|
+
}), { skipInitialization: !1 });
|
|
1728
1728
|
return () => {
|
|
1729
1729
|
r();
|
|
1730
1730
|
for (const [, [s]] of t) s.removeListeners();
|
|
1731
1731
|
};
|
|
1732
1732
|
}
|
|
1733
1733
|
function _o(n) {
|
|
1734
|
-
return n.hasNodes([ae]) || w(255), Vt(n.registerCommand(kn, Zn, De), n.registerCommand(Kt, ({ nodes: e, selection: t }, o) => n !== o || !M(t) ? !1 : pe(t.anchor.getNode()) !== null && e.some($), De), n.registerCommand(rn, oo, De), n.registerNodeTransform(ae, no), n.registerNodeTransform(Te, to), n.registerNodeTransform(ce, eo));
|
|
1734
|
+
return n.hasNodes([ae]) || w(255), Vt(n.registerCommand(kn, Zn, De), n.registerCommand(Kt, (({ nodes: e, selection: t }, o) => n !== o || !M(t) ? !1 : pe(t.anchor.getNode()) !== null && e.some($)), De), n.registerCommand(rn, oo, De), n.registerNodeTransform(ae, no), n.registerNodeTransform(Te, to), n.registerNodeTransform(ce, eo));
|
|
1735
1735
|
}
|
|
1736
1736
|
export {
|
|
1737
1737
|
co as B,
|
|
@@ -1747,8 +1747,8 @@ export {
|
|
|
1747
1747
|
pe as V,
|
|
1748
1748
|
io as W,
|
|
1749
1749
|
uo as Y,
|
|
1750
|
-
|
|
1751
|
-
|
|
1750
|
+
ho as a,
|
|
1751
|
+
ae as b,
|
|
1752
1752
|
ie as c,
|
|
1753
1753
|
go as d,
|
|
1754
1754
|
_o as e,
|
|
@@ -1760,4 +1760,4 @@ export {
|
|
|
1760
1760
|
ce as y,
|
|
1761
1761
|
kt as z
|
|
1762
1762
|
};
|
|
1763
|
-
//# sourceMappingURL=LexicalTable.prod-
|
|
1763
|
+
//# sourceMappingURL=LexicalTable.prod-COFf1Spn.js.map
|