@uva-glass/component-library 3.10.0 → 3.11.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-CWyHQUEM.js → Lexical.prod-D8x7Ii0F.js} +469 -469
- package/dist/{Lexical.prod-CWyHQUEM.js.map → Lexical.prod-D8x7Ii0F.js.map} +1 -1
- package/dist/{LexicalClipboard.prod-DbqSWANZ.js → LexicalClipboard.prod-D5GjiArS.js} +16 -16
- package/dist/{LexicalClipboard.prod-DbqSWANZ.js.map → LexicalClipboard.prod-D5GjiArS.js.map} +1 -1
- package/dist/{LexicalLink.prod-DbxnRszt.js → LexicalLink.prod-CkldFE8u.js} +60 -60
- package/dist/{LexicalLink.prod-DbxnRszt.js.map → LexicalLink.prod-CkldFE8u.js.map} +1 -1
- package/dist/{LexicalList.prod-pZmYrwOC.js → LexicalList.prod-CsVDXdmw.js} +215 -215
- package/dist/LexicalList.prod-CsVDXdmw.js.map +1 -0
- package/dist/LexicalSelection.prod-JQDTaUpX.js +90 -0
- package/dist/{LexicalSelection.prod-DkvWlcln.js.map → LexicalSelection.prod-JQDTaUpX.js.map} +1 -1
- package/dist/{LexicalTable.prod-C6duSS2P.js → LexicalTable.prod-rZbTmo9K.js} +125 -125
- package/dist/{LexicalTable.prod-C6duSS2P.js.map → LexicalTable.prod-rZbTmo9K.js.map} +1 -1
- package/dist/{LexicalUtils.prod-Dny9Fu94.js → LexicalUtils.prod-CpMJ4I9h.js} +6 -6
- package/dist/{LexicalUtils.prod-Dny9Fu94.js.map → LexicalUtils.prod-CpMJ4I9h.js.map} +1 -1
- package/dist/{SelectListbox.module-BD2qbcmZ.js → SelectListbox.module-ignbxWNU.js} +21 -21
- package/dist/SelectListbox.module-ignbxWNU.js.map +1 -0
- package/dist/{SortableProvider-Ck_XnBVq.js → SortableProvider-DZggDO3M.js} +20 -20
- package/dist/{SortableProvider-Ck_XnBVq.js.map → SortableProvider-DZggDO3M.js.map} +1 -1
- package/dist/{TablePlugin-Ba6PaBhf.js → TablePlugin-WOgWan8s.js} +36 -36
- package/dist/{TablePlugin-Ba6PaBhf.js.map → TablePlugin-WOgWan8s.js.map} +1 -1
- package/dist/assets/MultiSelectBox.css +1 -0
- package/dist/assets/SelectListbox.css +1 -1
- package/dist/client-EQRlhXX7.js +25200 -0
- package/dist/client-EQRlhXX7.js.map +1 -0
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.d.ts +1 -3
- package/dist/components/Buttons/MenuButton.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/Card/Card.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +2 -2
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +3 -3
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FormInput/FormInput.js +3 -3
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.js +17 -17
- package/dist/components/InputField/InputField.stories.js +17 -17
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -3
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.d.ts +16 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.js +191 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.d.ts +5 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +31 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.d.ts +0 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +26 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -0
- package/dist/components/MultiSelectBox/index.d.ts +1 -0
- package/dist/components/MultiSelectBox/index.js +5 -0
- package/dist/components/MultiSelectBox/index.js.map +1 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js +3 -3
- package/dist/components/PageOverlay/PageOverlay.stories.js +35 -35
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +3 -3
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -3
- package/dist/components/RadioButton/RadioButton.js +3 -3
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -3
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +14 -14
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +23 -23
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +40 -40
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/Providers/LanguageProvider.js +7 -7
- package/dist/components/RteEditor/RteEditor.js +327 -327
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +10 -10
- package/dist/components/SelectListbox/components/SelectButton.js +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js +1 -1
- package/dist/components/SelectListbox/components/SelectOptionBox.js +1 -1
- package/dist/components/Sortable/Sortable.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/SortableProvider.js +1 -1
- package/dist/components/Sortable/components/SortableContainer.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js +15 -15
- package/dist/components/Sortable/sortableReducer.js +21 -21
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/TextArea/TextArea.js +2 -2
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/Timeline/Timeline.test.js +5 -5
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +22 -22
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/hooks/useDebounce.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +53 -51
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-BUwfVZhW.js → helpers-E_SsILnP.js} +10 -10
- package/dist/{helpers-BUwfVZhW.js.map → helpers-E_SsILnP.js.map} +1 -1
- package/dist/{index-DXR-TB1d.js → index-BCvy9BiK.js} +1886 -1886
- package/dist/{index-DXR-TB1d.js.map → index-BCvy9BiK.js.map} +1 -1
- package/dist/{index-dmBn99rF.js → index-BqLi4tOb.js} +908 -908
- package/dist/{index-dmBn99rF.js.map → index-BqLi4tOb.js.map} +1 -1
- package/dist/{index-Ck15_vKo.js → index-CUap8sKR.js} +481 -481
- package/dist/{index-Ck15_vKo.js.map → index-CUap8sKR.js.map} +1 -1
- package/dist/{index-B3c5pcHk.js → index-DllfJcv4.js} +32 -32
- package/dist/{index-B3c5pcHk.js.map → index-DllfJcv4.js.map} +1 -1
- package/dist/index.js +53 -51
- package/dist/index.js.map +1 -1
- package/dist/{react-18-CcyoHPTJ.js → react-18-dpbWrd2-.js} +2 -2
- package/dist/{react-18-CcyoHPTJ.js.map → react-18-dpbWrd2-.js.map} +1 -1
- package/dist/{react.esm-CMg7bmSn.js → react.esm-CsMDid07.js} +4 -4
- package/dist/{react.esm-CMg7bmSn.js.map → react.esm-CsMDid07.js.map} +1 -1
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +3 -3
- package/dist/test-utils-ea_YDVtd.js +74 -0
- package/dist/test-utils-ea_YDVtd.js.map +1 -0
- package/package.json +17 -17
- package/dist/LexicalList.prod-pZmYrwOC.js.map +0 -1
- package/dist/LexicalSelection.prod-DkvWlcln.js +0 -90
- package/dist/SelectListbox.module-BD2qbcmZ.js.map +0 -1
- package/dist/client-CTOhtEms.js +0 -33
- package/dist/client-CTOhtEms.js.map +0 -1
- package/dist/test-utils-B2AIdiiO.js +0 -1148
- package/dist/test-utils-B2AIdiiO.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { f as Ve, n as ye, q as Ze, $ as jt, Y as Ce, M as it, T as I, X as Qe, p as Vt, h as
|
|
3
|
-
import { _ as
|
|
1
|
+
import { w as x, r as Q, i as ge, _ as yt, j as Jt, N as Yt, T as Nt, S as Xt, L as qt } from "./LexicalUtils.prod-CpMJ4I9h.js";
|
|
2
|
+
import { f as Ve, n as ye, q as Ze, $ as jt, Y as Ce, M as it, T as I, X as Qe, p as Vt, h as vt, i as re, j as Zt, N as Be, k as xt, c as z, o as Qt, r as be, d as D, a as B, m as Ue, s as Ke, t as Gt, v as en, x as tn, y as nn, F as De, L as on, A as rn, B as Tt, D as ln, H as V, I as sn, K as an, O as cn, P as un, Q as hn, R as dn, S as fn, V as gn, W as fe, g as ne, _ as $e, a0 as mn, b as Rt, a1 as pn, w as Ge, a2 as Cn, U as _n, a3 as Ae, a4 as Sn, a5 as wn, a6 as at, a7 as bn, a8 as ct, z as yn, a9 as ut, l as ht, Z as Te, aa as Nn, C as vn, ab as xn, ac as Tn } from "./Lexical.prod-D8x7Ii0F.js";
|
|
3
|
+
import { _ as Rn, M as Fn } from "./LexicalClipboard.prod-D5GjiArS.js";
|
|
4
4
|
const et = /^(\d+(?:\.\d+)?)px$/, W = { BOTH: 3, COLUMN: 2, NO_STATUS: 0, ROW: 1 };
|
|
5
5
|
class ce extends Ve {
|
|
6
6
|
static getType() {
|
|
@@ -150,18 +150,18 @@ function b(n, ...e) {
|
|
|
150
150
|
for (const l of e) o.append("v", l);
|
|
151
151
|
throw t.search = o.toString(), Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
152
152
|
}
|
|
153
|
-
class
|
|
153
|
+
class xe extends Ve {
|
|
154
154
|
static getType() {
|
|
155
155
|
return "tablerow";
|
|
156
156
|
}
|
|
157
157
|
static clone(e) {
|
|
158
|
-
return new
|
|
158
|
+
return new xe(e.__height, e.__key);
|
|
159
159
|
}
|
|
160
160
|
static importDOM() {
|
|
161
161
|
return { tr: (e) => ({ conversion: Kn, priority: 0 }) };
|
|
162
162
|
}
|
|
163
163
|
static importJSON(e) {
|
|
164
|
-
return
|
|
164
|
+
return ve().updateFromJSON(e);
|
|
165
165
|
}
|
|
166
166
|
updateFromJSON(e) {
|
|
167
167
|
return super.updateFromJSON(e).setHeight(e.height);
|
|
@@ -203,19 +203,19 @@ class Te extends Ve {
|
|
|
203
203
|
function Kn(n) {
|
|
204
204
|
const e = n;
|
|
205
205
|
let t;
|
|
206
|
-
return et.test(e.style.height) && (t = parseFloat(e.style.height)), { after: (o) => yt(o, w), node:
|
|
206
|
+
return et.test(e.style.height) && (t = parseFloat(e.style.height)), { after: (o) => yt(o, w), node: ve(t) };
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
return Ze(new
|
|
208
|
+
function ve(n) {
|
|
209
|
+
return Ze(new xe(n));
|
|
210
210
|
}
|
|
211
211
|
function $(n) {
|
|
212
|
-
return n instanceof
|
|
212
|
+
return n instanceof xe;
|
|
213
213
|
}
|
|
214
214
|
const tt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, An = tt && "documentMode" in document ? document.documentMode : null, ft = tt && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
|
|
215
215
|
function En(n, e, t = !0) {
|
|
216
216
|
const o = rt();
|
|
217
217
|
for (let l = 0; l < n; l++) {
|
|
218
|
-
const s =
|
|
218
|
+
const s = ve();
|
|
219
219
|
for (let r = 0; r < e; r++) {
|
|
220
220
|
let i = W.NO_STATUS;
|
|
221
221
|
typeof t == "object" ? (l === 0 && t.rows && (i |= W.ROW), r === 0 && t.columns && (i |= W.COLUMN)) : t && (l === 0 && (i |= W.ROW), r === 0 && (i |= W.COLUMN));
|
|
@@ -227,25 +227,25 @@ function En(n, e, t = !0) {
|
|
|
227
227
|
return o;
|
|
228
228
|
}
|
|
229
229
|
function so(n) {
|
|
230
|
-
const e =
|
|
230
|
+
const e = x(n, (t) => w(t));
|
|
231
231
|
return w(e) ? e : null;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
const e =
|
|
233
|
+
function Ft(n) {
|
|
234
|
+
const e = x(n, (t) => $(t));
|
|
235
235
|
if ($(e)) return e;
|
|
236
236
|
throw new Error("Expected table cell to be inside of table row.");
|
|
237
237
|
}
|
|
238
238
|
function Ot(n) {
|
|
239
|
-
const e =
|
|
239
|
+
const e = x(n, (t) => k(t));
|
|
240
240
|
if (k(e)) return e;
|
|
241
241
|
throw new Error("Expected table cell to be inside of table.");
|
|
242
242
|
}
|
|
243
243
|
function io(n) {
|
|
244
|
-
const e =
|
|
244
|
+
const e = Ft(n);
|
|
245
245
|
return Ot(e).getChildren().findIndex((t) => t.is(e));
|
|
246
246
|
}
|
|
247
247
|
function ao(n) {
|
|
248
|
-
return
|
|
248
|
+
return Ft(n).getChildren().findIndex((e) => e.is(n));
|
|
249
249
|
}
|
|
250
250
|
tt && "InputEvent" in window && !An && new window.InputEvent("input");
|
|
251
251
|
const Ye = (n, e) => n === W.BOTH || n === e ? e : W.NO_STATUS;
|
|
@@ -253,7 +253,7 @@ function kn(n, e = !0) {
|
|
|
253
253
|
const [, , t] = G(n), [o, l] = J(t, n, n), s = o[0].length, { startRow: r } = l;
|
|
254
254
|
let i = null;
|
|
255
255
|
if (e) {
|
|
256
|
-
const u = r + n.__rowSpan - 1, m = o[u], h =
|
|
256
|
+
const u = r + n.__rowSpan - 1, m = o[u], h = ve();
|
|
257
257
|
for (let C = 0; C < s; C++) {
|
|
258
258
|
const { cell: a, startRow: c } = m[C];
|
|
259
259
|
if (c + a.__rowSpan - 1 <= u) {
|
|
@@ -264,7 +264,7 @@ function kn(n, e = !0) {
|
|
|
264
264
|
const p = t.getChildAtIndex(u);
|
|
265
265
|
$(p) || b(256), p.insertAfter(h), i = h;
|
|
266
266
|
} else {
|
|
267
|
-
const u = r, m = o[u], h =
|
|
267
|
+
const u = r, m = o[u], h = ve();
|
|
268
268
|
for (let C = 0; C < s; C++) {
|
|
269
269
|
const { cell: a, startRow: c } = m[C];
|
|
270
270
|
if (c === u) {
|
|
@@ -298,15 +298,15 @@ function $n(n, e = !0, t = !0) {
|
|
|
298
298
|
}
|
|
299
299
|
const { cell: _, startColumn: S, startRow: N } = f[u];
|
|
300
300
|
if (S + _.__colSpan - 1 <= u) {
|
|
301
|
-
let y = _,
|
|
302
|
-
for (;
|
|
303
|
-
if (
|
|
301
|
+
let y = _, T = N, F = u;
|
|
302
|
+
for (; T !== c && y.__rowSpan > 1; ) {
|
|
303
|
+
if (F -= _.__colSpan, !(F >= 0)) {
|
|
304
304
|
C.append(p(g));
|
|
305
305
|
continue e;
|
|
306
306
|
}
|
|
307
307
|
{
|
|
308
|
-
const { cell: M, startRow: O } = f[
|
|
309
|
-
y = M,
|
|
308
|
+
const { cell: M, startRow: O } = f[F];
|
|
309
|
+
y = M, T = O;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
y.insertAfter(p(g));
|
|
@@ -437,10 +437,10 @@ function G(n) {
|
|
|
437
437
|
let e;
|
|
438
438
|
if (n instanceof ce) e = n;
|
|
439
439
|
else if ("__type" in n) {
|
|
440
|
-
const l =
|
|
440
|
+
const l = x(n, w);
|
|
441
441
|
w(l) || b(148), e = l;
|
|
442
442
|
} else {
|
|
443
|
-
const l =
|
|
443
|
+
const l = x(n.getNode(), w);
|
|
444
444
|
w(l) || b(148), e = l;
|
|
445
445
|
}
|
|
446
446
|
const t = e.getParent();
|
|
@@ -482,7 +482,7 @@ function gt(n) {
|
|
|
482
482
|
}
|
|
483
483
|
function mt(n) {
|
|
484
484
|
const [[e, t, o, l], [s, r, i, u]] = ["anchor", "focus"].map((m) => {
|
|
485
|
-
const h = n[m].getNode(), p =
|
|
485
|
+
const h = n[m].getNode(), p = x(h, w);
|
|
486
486
|
w(p) || b(238, m, h.getKey(), h.getType());
|
|
487
487
|
const C = p.getParent();
|
|
488
488
|
$(C) || b(239, m);
|
|
@@ -535,12 +535,12 @@ class Me {
|
|
|
535
535
|
const s = l.getFirstChild();
|
|
536
536
|
Ge(s) && (t |= s.getTextFormat());
|
|
537
537
|
});
|
|
538
|
-
const o =
|
|
538
|
+
const o = Tn[e];
|
|
539
539
|
return !!(t & o);
|
|
540
540
|
}
|
|
541
541
|
insertNodes(e) {
|
|
542
542
|
const t = this.focus.getNode();
|
|
543
|
-
D(t) || b(151),
|
|
543
|
+
D(t) || b(151), vn(t.select(0, t.getChildrenSize())).insertNodes(e);
|
|
544
544
|
}
|
|
545
545
|
getShape() {
|
|
546
546
|
const { anchorCell: e, focusCell: t } = mt(this), o = gt(e);
|
|
@@ -574,7 +574,7 @@ class Me {
|
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
const f = Array.from(a.values());
|
|
577
|
-
return
|
|
577
|
+
return xn() || (this._cachedNodes = f), f;
|
|
578
578
|
}
|
|
579
579
|
getTextContent() {
|
|
580
580
|
const e = this.getNodes().filter((o) => w(o));
|
|
@@ -606,7 +606,7 @@ function Pn(n, e) {
|
|
|
606
606
|
l === void 0 ? t.pop() : e(l) !== !1 && D(l) && t.push(l.getChildren());
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function Et(n, e =
|
|
609
|
+
function Et(n, e = vt()) {
|
|
610
610
|
const t = Ke(n);
|
|
611
611
|
k(t) || b(231, n);
|
|
612
612
|
const o = ie(t, e.getElementByKey(n));
|
|
@@ -650,7 +650,7 @@ class Bn {
|
|
|
650
650
|
const e = this.editor;
|
|
651
651
|
this.isHighlightingCells = !1, this.anchorX = -1, this.anchorY = -1, this.focusX = -1, this.focusY = -1, this.tableSelection = null, this.anchorCellNodeKey = null, this.focusCellNodeKey = null, this.anchorCell = null, this.focusCell = null, this.hasHijackedSelectionStyles = !1, this.$enableHighlightStyle();
|
|
652
652
|
const { tableNode: t, tableElement: o } = this.$lookup();
|
|
653
|
-
|
|
653
|
+
Re(e, me(t, o), null), B() !== null && (ne(null), e.dispatchCommand(fe, void 0));
|
|
654
654
|
}
|
|
655
655
|
$enableHighlightStyle() {
|
|
656
656
|
const e = this.editor, { tableElement: t } = this.$lookup();
|
|
@@ -664,7 +664,7 @@ class Bn {
|
|
|
664
664
|
if (e !== null) {
|
|
665
665
|
e.tableKey !== this.tableNodeKey && b(233, e.tableKey, this.tableNodeKey);
|
|
666
666
|
const t = this.editor;
|
|
667
|
-
this.tableSelection = e, this.isHighlightingCells = !0, this.$disableHighlightStyle(), this.updateDOMSelection(),
|
|
667
|
+
this.tableSelection = e, this.isHighlightingCells = !0, this.$disableHighlightStyle(), this.updateDOMSelection(), Re(t, this.table, this.tableSelection);
|
|
668
668
|
} else this.$clearHighlight();
|
|
669
669
|
}
|
|
670
670
|
setShouldCheckSelection() {
|
|
@@ -693,7 +693,7 @@ class Bn {
|
|
|
693
693
|
} else this.isHighlightingCells = !0, this.$disableHighlightStyle();
|
|
694
694
|
if (this.focusX = s, this.focusY = r, this.isHighlightingCells) {
|
|
695
695
|
const i = qe(l, e.elem);
|
|
696
|
-
if (this.tableSelection != null && this.anchorCellNodeKey != null && i !== null) return this.focusCellNodeKey = i.getKey(), this.tableSelection = Hn(l, this.$getAnchorTableCellOrThrow(), i), ne(this.tableSelection), o.dispatchCommand(fe, void 0),
|
|
696
|
+
if (this.tableSelection != null && this.anchorCellNodeKey != null && i !== null) return this.focusCellNodeKey = i.getKey(), this.tableSelection = Hn(l, this.$getAnchorTableCellOrThrow(), i), ne(this.tableSelection), o.dispatchCommand(fe, void 0), Re(o, this.table, this.tableSelection), !0;
|
|
697
697
|
}
|
|
698
698
|
return !1;
|
|
699
699
|
}
|
|
@@ -738,7 +738,7 @@ class Bn {
|
|
|
738
738
|
if (l.length === this.table.columns * this.table.rows) {
|
|
739
739
|
t.selectPrevious();
|
|
740
740
|
const s = t.getParent();
|
|
741
|
-
return t.remove(), void (Cn(s) && s.isEmpty() && e.dispatchCommand(
|
|
741
|
+
return t.remove(), void (Cn(s) && s.isEmpty() && e.dispatchCommand(Rt, void 0));
|
|
742
742
|
}
|
|
743
743
|
l.forEach((s) => {
|
|
744
744
|
if (D(s)) {
|
|
@@ -747,7 +747,7 @@ class Bn {
|
|
|
747
747
|
u !== r && u.remove();
|
|
748
748
|
});
|
|
749
749
|
}
|
|
750
|
-
}),
|
|
750
|
+
}), Re(e, this.table, null), ne(null), e.dispatchCommand(fe, void 0);
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
753
|
const Xe = "__lexicalTableSelection", Dn = (n) => !(1 & ~n.buttons);
|
|
@@ -769,7 +769,7 @@ function Ne(n, e) {
|
|
|
769
769
|
}
|
|
770
770
|
return null;
|
|
771
771
|
}
|
|
772
|
-
const In = [[Gt, "down"], [en, "up"], [tn, "backward"], [nn, "forward"]], Un = [rn,
|
|
772
|
+
const In = [[Gt, "down"], [en, "up"], [tn, "backward"], [nn, "forward"]], Un = [rn, Tt, ln], Jn = [sn, an];
|
|
773
773
|
function Yn(n, e, t, o) {
|
|
774
774
|
const l = t.getRootElement(), s = nt(t);
|
|
775
775
|
l !== null && s !== null || b(246);
|
|
@@ -840,9 +840,9 @@ function Yn(n, e, t, o) {
|
|
|
840
840
|
if (!w(Ne(n, c.anchor.getNode()))) return !1;
|
|
841
841
|
const f = c.anchor.getNode(), d = c.focus.getNode(), g = n.isParentOf(f), _ = n.isParentOf(d);
|
|
842
842
|
if (g && !_ || _ && !g) return r.$clearText(), !0;
|
|
843
|
-
const S =
|
|
843
|
+
const S = x(c.anchor.getNode(), (y) => D(y)), N = S && x(S, (y) => D(y) && w(y.getParent()));
|
|
844
844
|
if (!D(N) || !D(S)) return !1;
|
|
845
|
-
if (a ===
|
|
845
|
+
if (a === Tt && N.getPreviousSibling() === null) return !0;
|
|
846
846
|
}
|
|
847
847
|
return !1;
|
|
848
848
|
};
|
|
@@ -862,7 +862,7 @@ function Yn(n, e, t, o) {
|
|
|
862
862
|
const c = B();
|
|
863
863
|
if (c) {
|
|
864
864
|
if (!K(c) && !z(c)) return !1;
|
|
865
|
-
|
|
865
|
+
Rn(t, qt(a, ClipboardEvent) ? a : null, Fn(c));
|
|
866
866
|
const f = C(a);
|
|
867
867
|
return z(c) ? (c.removeText(), !0) : f;
|
|
868
868
|
}
|
|
@@ -872,7 +872,7 @@ function Yn(n, e, t, o) {
|
|
|
872
872
|
if (!Z(c, n)) return !1;
|
|
873
873
|
if (K(c)) return r.$formatCells(a), !0;
|
|
874
874
|
if (z(c)) {
|
|
875
|
-
const f =
|
|
875
|
+
const f = x(c.anchor.getNode(), (d) => w(d));
|
|
876
876
|
if (!w(f)) return !1;
|
|
877
877
|
}
|
|
878
878
|
return !1;
|
|
@@ -883,20 +883,20 @@ function Yn(n, e, t, o) {
|
|
|
883
883
|
if (!w(f) || !w(d)) return !1;
|
|
884
884
|
if (function(O, A) {
|
|
885
885
|
if (K(O)) {
|
|
886
|
-
const
|
|
887
|
-
if (A &&
|
|
888
|
-
const [L] = J(A,
|
|
889
|
-
return
|
|
886
|
+
const R = O.anchor.getNode(), E = O.focus.getNode();
|
|
887
|
+
if (A && R && E) {
|
|
888
|
+
const [L] = J(A, R, E);
|
|
889
|
+
return R.getKey() === L[0][0].cell.getKey() && E.getKey() === L[L.length - 1].at(-1).cell.getKey();
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
892
|
return !1;
|
|
893
893
|
}(c, n)) return n.setFormat(a), !0;
|
|
894
|
-
const [g, _, S] = J(n, f, d), N = Math.max(_.startRow + _.cell.__rowSpan - 1, S.startRow + S.cell.__rowSpan - 1), y = Math.max(_.startColumn + _.cell.__colSpan - 1, S.startColumn + S.cell.__colSpan - 1),
|
|
895
|
-
for (let O =
|
|
896
|
-
const
|
|
897
|
-
if (M.has(
|
|
898
|
-
M.add(
|
|
899
|
-
const E =
|
|
894
|
+
const [g, _, S] = J(n, f, d), N = Math.max(_.startRow + _.cell.__rowSpan - 1, S.startRow + S.cell.__rowSpan - 1), y = Math.max(_.startColumn + _.cell.__colSpan - 1, S.startColumn + S.cell.__colSpan - 1), T = Math.min(_.startRow, S.startRow), F = Math.min(_.startColumn, S.startColumn), M = /* @__PURE__ */ new Set();
|
|
895
|
+
for (let O = T; O <= N; O++) for (let A = F; A <= y; A++) {
|
|
896
|
+
const R = g[O][A].cell;
|
|
897
|
+
if (M.has(R)) continue;
|
|
898
|
+
M.add(R), R.setFormat(a);
|
|
899
|
+
const E = R.getChildren();
|
|
900
900
|
for (let L = 0; L < E.length; L++) {
|
|
901
901
|
const H = E[L];
|
|
902
902
|
D(H) && !H.isInline() && H.setFormat(a);
|
|
@@ -908,7 +908,7 @@ function Yn(n, e, t, o) {
|
|
|
908
908
|
if (!Z(c, n)) return !1;
|
|
909
909
|
if (K(c)) return r.$clearHighlight(), !1;
|
|
910
910
|
if (z(c)) {
|
|
911
|
-
const f =
|
|
911
|
+
const f = x(c.anchor.getNode(), (d) => w(d));
|
|
912
912
|
if (!w(f)) return !1;
|
|
913
913
|
if (typeof a == "string") {
|
|
914
914
|
const d = wt(t, c, n);
|
|
@@ -923,60 +923,60 @@ function Yn(n, e, t, o) {
|
|
|
923
923
|
return !(f === null || !n.is(pe(f))) && (te(a), function(d, g) {
|
|
924
924
|
const _ = g === "next" ? "getNextSibling" : "getPreviousSibling", S = g === "next" ? "getFirstChild" : "getLastChild", N = d[_]();
|
|
925
925
|
if (D(N)) return N.selectEnd();
|
|
926
|
-
const y =
|
|
926
|
+
const y = x(d, $);
|
|
927
927
|
y === null && b(247);
|
|
928
|
-
for (let
|
|
929
|
-
const M =
|
|
928
|
+
for (let F = y[_](); $(F); F = F[_]()) {
|
|
929
|
+
const M = F[S]();
|
|
930
930
|
if (D(M)) return M.selectEnd();
|
|
931
931
|
}
|
|
932
|
-
const
|
|
933
|
-
|
|
932
|
+
const T = x(y, k);
|
|
933
|
+
T === null && b(248), g === "next" ? T.selectNext() : T.selectPrevious();
|
|
934
934
|
}(f, a.shiftKey ? "previous" : "next"), !0);
|
|
935
|
-
}, V)), r.listenersToRemove.add(t.registerCommand(gn, (a) => n.isSelected(), De)), r.listenersToRemove.add(t.registerCommand(
|
|
936
|
-
const { nodes: c, selection: f } = a, d = f.getStartEndPoints(), g = K(f), _ = z(f) &&
|
|
935
|
+
}, V)), r.listenersToRemove.add(t.registerCommand(gn, (a) => n.isSelected(), De)), r.listenersToRemove.add(t.registerCommand(xt, (a) => {
|
|
936
|
+
const { nodes: c, selection: f } = a, d = f.getStartEndPoints(), g = K(f), _ = z(f) && x(f.anchor.getNode(), (v) => w(v)) !== null && x(f.focus.getNode(), (v) => w(v)) !== null || g;
|
|
937
937
|
if (c.length !== 1 || !k(c[0]) || !_ || d === null) return !1;
|
|
938
|
-
const [S, N] = d, [y,
|
|
939
|
-
if (!(w(y) && w(M) && $(
|
|
940
|
-
const O = c[0], [A,
|
|
941
|
-
let X =
|
|
938
|
+
const [S, N] = d, [y, T, F] = G(S), M = x(N.getNode(), (v) => w(v));
|
|
939
|
+
if (!(w(y) && w(M) && $(T) && k(F))) return !1;
|
|
940
|
+
const O = c[0], [A, R, E] = J(F, y, M), [L] = oe(O, null, null), H = A.length, le = H > 0 ? A[0].length : 0;
|
|
941
|
+
let X = R.startRow, q = R.startColumn, P = L.length, ue = P > 0 ? L[0].length : 0;
|
|
942
942
|
if (g) {
|
|
943
|
-
const
|
|
944
|
-
X =
|
|
943
|
+
const v = Ee(A, R, E), U = v.maxRow - v.minRow + 1, j = v.maxColumn - v.minColumn + 1;
|
|
944
|
+
X = v.minRow, q = v.minColumn, P = Math.min(P, U), ue = Math.min(ue, j);
|
|
945
945
|
}
|
|
946
946
|
let Le = !1;
|
|
947
947
|
const zt = Math.min(H, X + P) - 1, Wt = Math.min(le, q + ue) - 1, lt = /* @__PURE__ */ new Set();
|
|
948
|
-
for (let
|
|
949
|
-
const j = A[
|
|
948
|
+
for (let v = X; v <= zt; v++) for (let U = q; U <= Wt; U++) {
|
|
949
|
+
const j = A[v][U];
|
|
950
950
|
lt.has(j.cell.getKey()) || j.cell.__rowSpan === 1 && j.cell.__colSpan === 1 || (Wn(j.cell), lt.add(j.cell.getKey()), Le = !0);
|
|
951
951
|
}
|
|
952
|
-
let [_e] = oe(
|
|
952
|
+
let [_e] = oe(F.getWritable(), null, null);
|
|
953
953
|
const Ht = P - H + X;
|
|
954
|
-
for (let
|
|
954
|
+
for (let v = 0; v < Ht; v++)
|
|
955
955
|
kn(_e[H - 1][0].cell);
|
|
956
956
|
const Pt = ue - le + q;
|
|
957
|
-
for (let
|
|
957
|
+
for (let v = 0; v < Pt; v++)
|
|
958
958
|
$n(_e[0][le - 1].cell, !0, !1);
|
|
959
|
-
[_e] = oe(
|
|
960
|
-
for (let
|
|
961
|
-
const j =
|
|
959
|
+
[_e] = oe(F.getWritable(), null, null);
|
|
960
|
+
for (let v = X; v < X + P; v++) for (let U = q; U < q + ue; U++) {
|
|
961
|
+
const j = v - X, st = U - q, ze = L[j][st];
|
|
962
962
|
if (ze.startRow !== j || ze.startColumn !== st) continue;
|
|
963
963
|
const Se = ze.cell;
|
|
964
964
|
if (Se.__rowSpan !== 1 || Se.__colSpan !== 1) {
|
|
965
|
-
const ee = [], Dt = Math.min(
|
|
966
|
-
for (let He =
|
|
965
|
+
const ee = [], Dt = Math.min(v + Se.__rowSpan, X + P) - 1, It = Math.min(U + Se.__colSpan, q + ue) - 1;
|
|
966
|
+
for (let He = v; He <= Dt; He++) for (let Pe = U; Pe <= It; Pe++) {
|
|
967
967
|
const Ut = _e[He][Pe];
|
|
968
968
|
ee.push(Ut.cell);
|
|
969
969
|
}
|
|
970
970
|
Ln(ee), Le = !0;
|
|
971
971
|
}
|
|
972
|
-
const { cell: We } = _e[
|
|
972
|
+
const { cell: We } = _e[v][U], Bt = We.getChildren();
|
|
973
973
|
Se.getChildren().forEach((ee) => {
|
|
974
974
|
Ce(ee) && I().append(ee), We.append(ee);
|
|
975
975
|
}), Bt.forEach((ee) => ee.remove());
|
|
976
976
|
}
|
|
977
977
|
if (g && Le) {
|
|
978
|
-
const [
|
|
979
|
-
|
|
978
|
+
const [v] = oe(F.getWritable(), null, null);
|
|
979
|
+
v[R.startRow][R.startColumn].cell.selectEnd();
|
|
980
980
|
}
|
|
981
981
|
return !0;
|
|
982
982
|
}, V)), r.listenersToRemove.add(t.registerCommand(fe, () => {
|
|
@@ -990,24 +990,24 @@ function Yn(n, e, t, o) {
|
|
|
990
990
|
const d = a.anchor.getNode(), g = n.getFirstChild(), _ = we(d);
|
|
991
991
|
if (_ !== null && $(g)) {
|
|
992
992
|
const S = g.getFirstChild();
|
|
993
|
-
if (w(S) && n.is(
|
|
993
|
+
if (w(S) && n.is(x(_, (N) => N.is(n) || N.is(S)))) return S.selectStart(), !0;
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
if (z(a)) {
|
|
997
|
-
const { anchor: d, focus: g } = a, _ = d.getNode(), S = g.getNode(), N = we(_), y = we(S),
|
|
997
|
+
const { anchor: d, focus: g } = a, _ = d.getNode(), S = g.getNode(), N = we(_), y = we(S), T = !(!N || !n.is(pe(N))), F = !(!y || !n.is(pe(y))), M = T !== F, O = T && F, A = a.isBackward();
|
|
998
998
|
if (M) {
|
|
999
|
-
const
|
|
1000
|
-
if (
|
|
999
|
+
const R = a.clone();
|
|
1000
|
+
if (F) {
|
|
1001
1001
|
const [E] = J(n, y, y), L = E[0][0].cell, H = E[E.length - 1].at(-1).cell;
|
|
1002
|
-
|
|
1003
|
-
} else if (
|
|
1002
|
+
R.focus.set(A ? L.getKey() : H.getKey(), A ? L.getChildrenSize() : H.getChildrenSize(), "element");
|
|
1003
|
+
} else if (T) {
|
|
1004
1004
|
const [E] = J(n, N, N), L = E[0][0].cell, H = E[E.length - 1].at(-1).cell;
|
|
1005
|
-
|
|
1005
|
+
R.anchor.set(A ? H.getKey() : L.getKey(), A ? H.getChildrenSize() : 0, "element");
|
|
1006
1006
|
}
|
|
1007
|
-
ne(
|
|
1007
|
+
ne(R), _t(t, r);
|
|
1008
1008
|
} else if (O && (N.is(y) || (r.$setAnchorCellForSelection(se(r, N)), r.$setFocusCellForSelection(se(r, y), !0)), r.pointerType === "touch" && a.isCollapsed() && z(c) && c.isCollapsed())) {
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1009
|
+
const R = we(c.anchor.getNode());
|
|
1010
|
+
R && !R.is(y) && (r.$setAnchorCellForSelection(se(r, R)), r.$setFocusCellForSelection(se(r, y), !0), r.pointerType = null);
|
|
1011
1011
|
}
|
|
1012
1012
|
} else if (a && K(a) && a.is(c) && a.tableKey === n.getKey()) {
|
|
1013
1013
|
const d = $e(s);
|
|
@@ -1025,7 +1025,7 @@ function Yn(n, e, t, o) {
|
|
|
1025
1025
|
_.highlighted = !1, $t(d, _), S.getAttribute("style") || S.removeAttribute("style");
|
|
1026
1026
|
});
|
|
1027
1027
|
}(t, r) : !r.hasHijackedSelectionStyles && n.isSelected() && _t(t, r), !1);
|
|
1028
|
-
}, V)), r.listenersToRemove.add(t.registerCommand(
|
|
1028
|
+
}, V)), r.listenersToRemove.add(t.registerCommand(Rt, () => {
|
|
1029
1029
|
const a = B();
|
|
1030
1030
|
if (!z(a) || !a.isCollapsed() || !Z(a, n)) return !1;
|
|
1031
1031
|
const c = wt(t, a, n);
|
|
@@ -1088,7 +1088,7 @@ function me(n, e) {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
return o.columns = s + 1, o.rows = r + 1, o;
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Re(n, e, t) {
|
|
1092
1092
|
const o = new Set(t ? t.getNodes() : []);
|
|
1093
1093
|
ot(e, (l, s) => {
|
|
1094
1094
|
const r = l.elem;
|
|
@@ -1140,7 +1140,7 @@ function Ie(n, e) {
|
|
|
1140
1140
|
}
|
|
1141
1141
|
return [t, o];
|
|
1142
1142
|
}
|
|
1143
|
-
function
|
|
1143
|
+
function Fe([n, e]) {
|
|
1144
1144
|
return [n === "minColumn" ? "maxColumn" : "minColumn", e === "minRow" ? "maxRow" : "minRow"];
|
|
1145
1145
|
}
|
|
1146
1146
|
function he(n, e, [t, o]) {
|
|
@@ -1150,30 +1150,30 @@ function he(n, e, [t, o]) {
|
|
|
1150
1150
|
return i === void 0 && b(250, t, String(r)), i;
|
|
1151
1151
|
}
|
|
1152
1152
|
function qn(n, e, t, o, l) {
|
|
1153
|
-
const s = Ee(e, t, o), r = function(
|
|
1154
|
-
const { minColumn: M, maxColumn: O, minRow: A, maxRow:
|
|
1153
|
+
const s = Ee(e, t, o), r = function(T, F) {
|
|
1154
|
+
const { minColumn: M, maxColumn: O, minRow: A, maxRow: R } = F;
|
|
1155
1155
|
let E = 1, L = 1, H = 1, le = 1;
|
|
1156
|
-
const X =
|
|
1156
|
+
const X = T[A], q = T[R];
|
|
1157
1157
|
for (let P = M; P <= O; P++) E = Math.max(E, X[P].cell.__rowSpan), le = Math.max(le, q[P].cell.__rowSpan);
|
|
1158
|
-
for (let P = A; P <=
|
|
1158
|
+
for (let P = A; P <= R; P++) L = Math.max(L, T[P][M].cell.__colSpan), H = Math.max(H, T[P][O].cell.__colSpan);
|
|
1159
1159
|
return { bottomSpan: le, leftSpan: L, rightSpan: H, topSpan: E };
|
|
1160
|
-
}(e, s), { topSpan: i, leftSpan: u, bottomSpan: m, rightSpan: h } = r, p = function(
|
|
1161
|
-
const M = Ie(
|
|
1162
|
-
return M === null && b(249,
|
|
1163
|
-
}(s, t), [C, a] =
|
|
1160
|
+
}(e, s), { topSpan: i, leftSpan: u, bottomSpan: m, rightSpan: h } = r, p = function(T, F) {
|
|
1161
|
+
const M = Ie(T, F);
|
|
1162
|
+
return M === null && b(249, F.cell.getKey()), M;
|
|
1163
|
+
}(s, t), [C, a] = Fe(p);
|
|
1164
1164
|
let c = s[C], f = s[a];
|
|
1165
1165
|
l === "forward" ? c += C === "maxColumn" ? 1 : u : l === "backward" ? c -= C === "minColumn" ? 1 : h : l === "down" ? f += a === "maxRow" ? 1 : i : l === "up" && (f -= a === "minRow" ? 1 : m);
|
|
1166
1166
|
const d = e[f];
|
|
1167
1167
|
if (d === void 0) return !1;
|
|
1168
1168
|
const g = d[c];
|
|
1169
1169
|
if (g === void 0) return !1;
|
|
1170
|
-
const [_, S] = function(
|
|
1171
|
-
const O = Ee(
|
|
1172
|
-
if (A) return [he(
|
|
1173
|
-
const
|
|
1174
|
-
if (
|
|
1170
|
+
const [_, S] = function(T, F, M) {
|
|
1171
|
+
const O = Ee(T, F, M), A = Ie(O, F);
|
|
1172
|
+
if (A) return [he(T, O, A), he(T, O, Fe(A))];
|
|
1173
|
+
const R = Ie(O, M);
|
|
1174
|
+
if (R) return [he(T, O, Fe(R)), he(T, O, R)];
|
|
1175
1175
|
const E = ["minColumn", "minRow"];
|
|
1176
|
-
return [he(
|
|
1176
|
+
return [he(T, O, E), he(T, O, Fe(E))];
|
|
1177
1177
|
}(e, t, g), N = se(n, _.cell), y = se(n, S.cell);
|
|
1178
1178
|
return n.$setAnchorCellForSelection(N), n.$setFocusCellForSelection(y, !0), !0;
|
|
1179
1179
|
}
|
|
@@ -1198,11 +1198,11 @@ function $t(n, e) {
|
|
|
1198
1198
|
ge(t, o.tableCellSelected);
|
|
1199
1199
|
}
|
|
1200
1200
|
function we(n) {
|
|
1201
|
-
const e =
|
|
1201
|
+
const e = x(n, w);
|
|
1202
1202
|
return w(e) ? e : null;
|
|
1203
1203
|
}
|
|
1204
1204
|
function pe(n) {
|
|
1205
|
-
const e =
|
|
1205
|
+
const e = x(n, k);
|
|
1206
1206
|
return k(e) ? e : null;
|
|
1207
1207
|
}
|
|
1208
1208
|
function jn(n, e, t, o, l, s, r) {
|
|
@@ -1223,7 +1223,7 @@ function jn(n, e, t, o, l, s, r) {
|
|
|
1223
1223
|
} else if (!$(_)) break;
|
|
1224
1224
|
}
|
|
1225
1225
|
return null;
|
|
1226
|
-
}(ut(h, u.direction)), C =
|
|
1226
|
+
}(ut(h, u.direction)), C = x(h, k);
|
|
1227
1227
|
if (!C || !C.is(s)) return !1;
|
|
1228
1228
|
const a = n.getElementByKey(h.getKey()), c = ke(a);
|
|
1229
1229
|
if (!a || !c) return !1;
|
|
@@ -1234,7 +1234,7 @@ function jn(n, e, t, o, l, s, r) {
|
|
|
1234
1234
|
r.$setAnchorCellForSelection(c), r.$setFocusCellForSelection(d, !0);
|
|
1235
1235
|
} else {
|
|
1236
1236
|
const d = ht(p);
|
|
1237
|
-
|
|
1237
|
+
Te(t.anchor, d), Te(t.focus, d);
|
|
1238
1238
|
}
|
|
1239
1239
|
else if (o === "extend") r.$setAnchorCellForSelection(c), r.$setFocusCellForSelection(c, !0);
|
|
1240
1240
|
else {
|
|
@@ -1242,7 +1242,7 @@ function jn(n, e, t, o, l, s, r) {
|
|
|
1242
1242
|
const _ = Nn(g);
|
|
1243
1243
|
return ct(_) ? ht(_) : g;
|
|
1244
1244
|
}(ut(C, i.direction));
|
|
1245
|
-
|
|
1245
|
+
Te(t.anchor, d), Te(t.focus, d);
|
|
1246
1246
|
}
|
|
1247
1247
|
return te(e), !0;
|
|
1248
1248
|
}
|
|
@@ -1270,8 +1270,8 @@ function Mt(n, e, t, o, l) {
|
|
|
1270
1270
|
if (e.shiftKey && (t === "up" || t === "down")) {
|
|
1271
1271
|
const r = s.focus.getNode();
|
|
1272
1272
|
if (!s.isCollapsed() && (t === "up" && !s.isBackward() || t === "down" && s.isBackward())) {
|
|
1273
|
-
let i =
|
|
1274
|
-
if (w(i) && (i =
|
|
1273
|
+
let i = x(r, (C) => k(C));
|
|
1274
|
+
if (w(i) && (i = x(i, k)), i !== o || !i) return !1;
|
|
1275
1275
|
const u = t === "down" ? i.getNextSibling() : i.getPreviousSibling();
|
|
1276
1276
|
if (!u) return !1;
|
|
1277
1277
|
let m = 0;
|
|
@@ -1292,8 +1292,8 @@ function Mt(n, e, t, o, l) {
|
|
|
1292
1292
|
return !1;
|
|
1293
1293
|
}
|
|
1294
1294
|
{
|
|
1295
|
-
let i =
|
|
1296
|
-
if (w(i) && (i =
|
|
1295
|
+
let i = x(r, (m) => D(m) && !m.isInline());
|
|
1296
|
+
if (w(i) && (i = x(i, k)), !i) return !1;
|
|
1297
1297
|
const u = t === "down" ? i.getNextSibling() : i.getPreviousSibling();
|
|
1298
1298
|
if (k(u) && l.tableNodeKey === u.getKey()) {
|
|
1299
1299
|
const m = u.getFirstDescendant(), h = u.getLastDescendant();
|
|
@@ -1310,7 +1310,7 @@ function Mt(n, e, t, o, l) {
|
|
|
1310
1310
|
if (t === "backward" || t === "forward")
|
|
1311
1311
|
return jn(n, e, s, e.shiftKey ? "extend" : "move", t === "backward", o, l);
|
|
1312
1312
|
if (s.isCollapsed()) {
|
|
1313
|
-
const { anchor: r, focus: i } = s, u =
|
|
1313
|
+
const { anchor: r, focus: i } = s, u = x(r.getNode(), w), m = x(i.getNode(), w);
|
|
1314
1314
|
if (!w(u) || !u.is(m)) return !1;
|
|
1315
1315
|
const h = pe(u);
|
|
1316
1316
|
if (h !== o && h != null) {
|
|
@@ -1343,7 +1343,7 @@ function Mt(n, e, t, o, l) {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
1345
|
} else if (K(s)) {
|
|
1346
|
-
const { anchor: r, focus: i } = s, u =
|
|
1346
|
+
const { anchor: r, focus: i } = s, u = x(r.getNode(), w), m = x(i.getNode(), w), [h] = s.getNodes();
|
|
1347
1347
|
k(h) || b(251);
|
|
1348
1348
|
const p = ie(h, n.getElementByKey(h.getKey()));
|
|
1349
1349
|
if (!w(u) || !w(m) || !k(h) || p == null) return !1;
|
|
@@ -1371,9 +1371,9 @@ function wt(n, e, t) {
|
|
|
1371
1371
|
if (!l) return;
|
|
1372
1372
|
const s = l.anchorNode, r = n.getElementByKey(o.getKey()), i = ie(t, n.getElementByKey(t.getKey()));
|
|
1373
1373
|
if (!s || !r || !i || !r.contains(s) || i.contains(s)) return;
|
|
1374
|
-
const u =
|
|
1374
|
+
const u = x(e.anchor.getNode(), (_) => w(_));
|
|
1375
1375
|
if (!u) return;
|
|
1376
|
-
const m =
|
|
1376
|
+
const m = x(u, (_) => k(_));
|
|
1377
1377
|
if (!k(m) || !m.is(t)) return;
|
|
1378
1378
|
const [h, p] = J(t, u, u), C = h[0][0], a = h[h.length - 1][h[0].length - 1], { startRow: c, startColumn: f } = p, d = c === C.startRow && f === C.startColumn, g = c === a.startRow && f === a.startColumn;
|
|
1379
1379
|
return d ? "first" : g ? "last" : void 0;
|
|
@@ -1395,7 +1395,7 @@ function bt(n, e, t) {
|
|
|
1395
1395
|
ge(n, ...o), Q(n, ...l);
|
|
1396
1396
|
}
|
|
1397
1397
|
const je = /* @__PURE__ */ new WeakSet();
|
|
1398
|
-
function Lt(n =
|
|
1398
|
+
function Lt(n = vt()) {
|
|
1399
1399
|
return je.has(n);
|
|
1400
1400
|
}
|
|
1401
1401
|
function uo(n, e) {
|
|
@@ -1648,7 +1648,7 @@ function no(n) {
|
|
|
1648
1648
|
if (n.detail < 3 || !be(n.target)) return !1;
|
|
1649
1649
|
const e = re(n.target);
|
|
1650
1650
|
if (e === null) return !1;
|
|
1651
|
-
const t =
|
|
1651
|
+
const t = x(e, (o) => D(o) && !o.isInline());
|
|
1652
1652
|
return t === null ? !1 : !!w(t.getParent()) && (t.select(0), !0);
|
|
1653
1653
|
}
|
|
1654
1654
|
function ho(n) {
|
|
@@ -1696,14 +1696,14 @@ function fo(n, e = !0) {
|
|
|
1696
1696
|
};
|
|
1697
1697
|
}
|
|
1698
1698
|
function go(n) {
|
|
1699
|
-
return n.hasNodes([ae]) || b(255), Jt(n.registerCommand(On, Qn, Be), n.registerCommand(
|
|
1699
|
+
return n.hasNodes([ae]) || b(255), Jt(n.registerCommand(On, Qn, Be), n.registerCommand(xt, ({ nodes: e, selection: t }) => z(t) ? pe(t.anchor.getNode()) !== null && e.some(k) : !1, Be), n.registerCommand(Zt, no, Be), n.registerNodeTransform(ae, to), n.registerNodeTransform(xe, eo), n.registerNodeTransform(ce, Gn));
|
|
1700
1700
|
}
|
|
1701
1701
|
export {
|
|
1702
1702
|
ao as B,
|
|
1703
|
-
|
|
1704
|
-
|
|
1703
|
+
Ft as H,
|
|
1704
|
+
ve as K,
|
|
1705
1705
|
so as L,
|
|
1706
|
-
|
|
1706
|
+
xe as O,
|
|
1707
1707
|
io as P,
|
|
1708
1708
|
w as R,
|
|
1709
1709
|
ho as S,
|
|
@@ -1717,4 +1717,4 @@ export {
|
|
|
1717
1717
|
ce as y,
|
|
1718
1718
|
Ot as z
|
|
1719
1719
|
};
|
|
1720
|
-
//# sourceMappingURL=LexicalTable.prod-
|
|
1720
|
+
//# sourceMappingURL=LexicalTable.prod-rZbTmo9K.js.map
|