@uva-glass/component-library 3.52.4 → 3.52.6
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-BAE-wnll.js → Lexical.prod-sd_e2sqT.js} +648 -627
- package/dist/Lexical.prod-sd_e2sqT.js.map +1 -0
- package/dist/{LexicalClipboard.prod-BS4qAkmJ.js → LexicalClipboard.prod-Co2PF1UJ.js} +44 -42
- package/dist/LexicalClipboard.prod-Co2PF1UJ.js.map +1 -0
- package/dist/{LexicalLink.prod-C6Or2Yo6.js → LexicalLink.prod-BCE6Bg2N.js} +354 -334
- package/dist/LexicalLink.prod-BCE6Bg2N.js.map +1 -0
- package/dist/{LexicalList.prod-rTq41CO0.js → LexicalList.prod-CIB0K0ja.js} +141 -138
- package/dist/LexicalList.prod-CIB0K0ja.js.map +1 -0
- package/dist/{LexicalSelection.prod-fLzEGOT_.js → LexicalSelection.prod-CCmcTP6S.js} +41 -41
- package/dist/{LexicalSelection.prod-fLzEGOT_.js.map → LexicalSelection.prod-CCmcTP6S.js.map} +1 -1
- package/dist/{LexicalTable.prod-BBI7yaOy.js → LexicalTable.prod-Oa2YPHLl.js} +359 -359
- package/dist/LexicalTable.prod-Oa2YPHLl.js.map +1 -0
- package/dist/{LexicalUtils.prod-D8DAKg7O.js → LexicalUtils.prod-CjKjgnmx.js} +43 -43
- package/dist/{LexicalUtils.prod-D8DAKg7O.js.map → LexicalUtils.prod-CjKjgnmx.js.map} +1 -1
- package/dist/{TableCellResizerPlugin-HPo4ZkHo.js → TableCellResizerPlugin-DATbSzfg.js} +51 -51
- package/dist/{TableCellResizerPlugin-HPo4ZkHo.js.map → TableCellResizerPlugin-DATbSzfg.js.map} +1 -1
- package/dist/{TablePlugin-BLbsvcuu.js → TablePlugin-CqCjNBW_.js} +83 -83
- package/dist/{TablePlugin-BLbsvcuu.js.map → TablePlugin-CqCjNBW_.js.map} +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +52 -52
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +27 -27
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +16 -16
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +185 -185
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +8 -8
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +11 -11
- package/dist/components/SelectListbox/components/SelectButton.js +17 -17
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/dist/Lexical.prod-BAE-wnll.js.map +0 -1
- package/dist/LexicalClipboard.prod-BS4qAkmJ.js.map +0 -1
- package/dist/LexicalLink.prod-C6Or2Yo6.js.map +0 -1
- package/dist/LexicalList.prod-rTq41CO0.js.map +0 -1
- package/dist/LexicalTable.prod-BBI7yaOy.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import {
|
|
3
|
-
import { b as
|
|
1
|
+
import { u as q, l as G, U as ne, w as se } from "./LexicalUtils.prod-CjKjgnmx.js";
|
|
2
|
+
import { C as F, w as H, a as Q, s as ie, S as b, L as P, I as oe, y as k, f as Y, r as A, X as le, l as ce, b as O, c as ae, z as v, x as he, d as ge, e as L, h as Z, g as R, E as W, i as J } from "./Lexical.prod-sd_e2sqT.js";
|
|
3
|
+
import { b as U } from "./LexicalSelection.prod-CCmcTP6S.js";
|
|
4
4
|
function y(n, ...e) {
|
|
5
5
|
const t = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
6
6
|
r.append("code", n);
|
|
7
7
|
for (const s of e) r.append("v", s);
|
|
8
8
|
throw t.search = r.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.`);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function M(n) {
|
|
11
11
|
let e = 1, t = n.getParent();
|
|
12
12
|
for (; t != null; ) {
|
|
13
|
-
if (
|
|
13
|
+
if (g(t)) {
|
|
14
14
|
const r = t.getParent();
|
|
15
15
|
if (a(r)) {
|
|
16
16
|
e++, t = r.getParent();
|
|
@@ -22,55 +22,55 @@ function E(n) {
|
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function w(n) {
|
|
26
26
|
let e = n.getParent();
|
|
27
27
|
a(e) || y(40);
|
|
28
28
|
let t = e;
|
|
29
29
|
for (; t !== null; ) t = t.getParent(), a(t) && (e = t);
|
|
30
30
|
return e;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function ee(n) {
|
|
33
33
|
let e = [];
|
|
34
|
-
const t = n.getChildren().filter(
|
|
34
|
+
const t = n.getChildren().filter(g);
|
|
35
35
|
for (let r = 0; r < t.length; r++) {
|
|
36
36
|
const s = t[r], i = s.getFirstChild();
|
|
37
|
-
a(i) ? e = e.concat(
|
|
37
|
+
a(i) ? e = e.concat(ee(i)) : e.push(s);
|
|
38
38
|
}
|
|
39
39
|
return e;
|
|
40
40
|
}
|
|
41
41
|
function m(n) {
|
|
42
|
-
return
|
|
42
|
+
return g(n) && a(n.getFirstChild());
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function B(n) {
|
|
45
45
|
return _().append(n);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
47
|
+
function te(n, e) {
|
|
48
|
+
return g(n) && (e.length === 0 || e.length === 1 && n.is(e[0]) && n.getChildrenSize() === 0);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function z(n) {
|
|
51
51
|
const e = O();
|
|
52
52
|
if (e !== null) {
|
|
53
53
|
let t = e.getNodes();
|
|
54
|
-
if (
|
|
54
|
+
if (k(e)) {
|
|
55
55
|
const s = e.getStartEndPoints();
|
|
56
56
|
s === null && y(143);
|
|
57
57
|
const [i] = s, o = i.getNode(), c = o.getParent();
|
|
58
|
-
if (
|
|
58
|
+
if (L(o)) {
|
|
59
59
|
const l = o.getFirstChild();
|
|
60
60
|
if (l) t = l.selectStart().getNodes();
|
|
61
61
|
else {
|
|
62
|
-
const
|
|
63
|
-
o.append(
|
|
62
|
+
const h = P();
|
|
63
|
+
o.append(h), t = h.select().getNodes();
|
|
64
64
|
}
|
|
65
|
-
} else if (
|
|
65
|
+
} else if (te(o, t)) {
|
|
66
66
|
const l = p(n);
|
|
67
|
-
if (
|
|
67
|
+
if (L(c)) {
|
|
68
68
|
o.replace(l);
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
} else if (
|
|
72
|
-
const
|
|
73
|
-
T(l,
|
|
69
|
+
const h = _();
|
|
70
|
+
b(o) && (h.setFormat(o.getFormatType()), h.setIndent(o.getIndent())), l.append(h);
|
|
71
|
+
} else if (g(o)) {
|
|
72
|
+
const h = o.getParentOrThrow();
|
|
73
|
+
T(l, h.getChildren()), h.replace(l);
|
|
74
74
|
}
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
@@ -78,11 +78,11 @@ function K(n) {
|
|
|
78
78
|
const r = /* @__PURE__ */ new Set();
|
|
79
79
|
for (let s = 0; s < t.length; s++) {
|
|
80
80
|
const i = t[s];
|
|
81
|
-
if (
|
|
82
|
-
|
|
81
|
+
if (b(i) && i.isEmpty() && !g(i) && !r.has(i.getKey())) {
|
|
82
|
+
K(i, n);
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
|
-
let o =
|
|
85
|
+
let o = Z(i) ? i.getParent() : g(i) && i.isEmpty() ? i : null;
|
|
86
86
|
for (; o != null; ) {
|
|
87
87
|
const c = o.getKey();
|
|
88
88
|
if (a(o)) {
|
|
@@ -94,8 +94,8 @@ function K(n) {
|
|
|
94
94
|
}
|
|
95
95
|
{
|
|
96
96
|
const l = o.getParent();
|
|
97
|
-
if (
|
|
98
|
-
r.add(c),
|
|
97
|
+
if (L(l) && !r.has(c)) {
|
|
98
|
+
r.add(c), K(o, n);
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
o = l;
|
|
@@ -107,7 +107,7 @@ function K(n) {
|
|
|
107
107
|
function T(n, e) {
|
|
108
108
|
n.splice(n.getChildrenSize(), 0, e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function K(n, e) {
|
|
111
111
|
if (a(n)) return n;
|
|
112
112
|
const t = n.getPreviousSibling(), r = n.getNextSibling(), s = _();
|
|
113
113
|
let i;
|
|
@@ -119,41 +119,41 @@ function V(n, e) {
|
|
|
119
119
|
}
|
|
120
120
|
return s.setFormat(n.getFormatType()), s.setIndent(n.getIndent()), n.remove(), i;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function D(n, e) {
|
|
123
123
|
const t = n.getLastChild(), r = e.getFirstChild();
|
|
124
|
-
t && r && m(t) && m(r) && (
|
|
124
|
+
t && r && m(t) && m(r) && (D(t.getFirstChild(), r.getFirstChild()), r.remove());
|
|
125
125
|
const s = e.getChildren();
|
|
126
126
|
s.length > 0 && n.append(...s), e.remove();
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function ue() {
|
|
129
129
|
const n = O();
|
|
130
|
-
if (
|
|
130
|
+
if (k(n)) {
|
|
131
131
|
const e = /* @__PURE__ */ new Set(), t = n.getNodes(), r = n.anchor.getNode();
|
|
132
|
-
if (
|
|
132
|
+
if (te(r, t)) e.add(w(r));
|
|
133
133
|
else for (let s = 0; s < t.length; s++) {
|
|
134
134
|
const i = t[s];
|
|
135
|
-
if (
|
|
136
|
-
const o =
|
|
137
|
-
o != null && e.add(
|
|
135
|
+
if (Z(i)) {
|
|
136
|
+
const o = se(i, I);
|
|
137
|
+
o != null && e.add(w(o));
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
for (const s of e) {
|
|
141
141
|
let i = s;
|
|
142
|
-
const o =
|
|
142
|
+
const o = ee(s);
|
|
143
143
|
for (const c of o) {
|
|
144
|
-
const l =
|
|
144
|
+
const l = P().setTextStyle(n.style).setTextFormat(n.format);
|
|
145
145
|
T(l, c.getChildren()), i.insertAfter(l), i = l, c.__key === n.anchor.key && R(n.anchor, W(J(l, "next"))), c.__key === n.focus.key && R(n.focus, W(J(l, "next"))), c.remove();
|
|
146
146
|
}
|
|
147
147
|
s.remove();
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function re(n) {
|
|
152
152
|
const e = n.getListType() !== "check";
|
|
153
153
|
let t = n.getStart();
|
|
154
|
-
for (const r of n.getChildren())
|
|
154
|
+
for (const r of n.getChildren()) g(r) && (r.getValue() !== t && r.setValue(t), e && r.getLatest().__checked != null && r.setChecked(void 0), a(r.getFirstChild()) || t++);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function fe(n) {
|
|
157
157
|
const e = /* @__PURE__ */ new Set();
|
|
158
158
|
if (m(n) || e.has(n.getKey())) return;
|
|
159
159
|
const t = n.getParent(), r = n.getNextSibling(), s = n.getPreviousSibling();
|
|
@@ -178,40 +178,40 @@ function ue(n) {
|
|
|
178
178
|
i.append(o), o.append(n), s ? s.insertAfter(i) : r ? r.insertBefore(i) : t.append(i);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function de(n) {
|
|
182
182
|
if (m(n)) return;
|
|
183
183
|
const e = n.getParent(), t = e ? e.getParent() : void 0;
|
|
184
|
-
if (a(t ? t.getParent() : void 0) &&
|
|
184
|
+
if (a(t ? t.getParent() : void 0) && g(t) && a(e)) {
|
|
185
185
|
const r = e ? e.getFirstChild() : void 0, s = e ? e.getLastChild() : void 0;
|
|
186
186
|
if (n.is(r)) t.insertBefore(n), e.isEmpty() && t.remove();
|
|
187
187
|
else if (n.is(s)) t.insertAfter(n), e.isEmpty() && t.remove();
|
|
188
188
|
else {
|
|
189
189
|
const i = e.getListType(), o = _(), c = p(i);
|
|
190
190
|
o.append(c), n.getPreviousSiblings().forEach((u) => c.append(u));
|
|
191
|
-
const l = _(),
|
|
192
|
-
l.append(
|
|
191
|
+
const l = _(), h = p(i);
|
|
192
|
+
l.append(h), T(h, n.getNextSiblings()), t.insertBefore(o), t.insertAfter(l), t.replace(n);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function pe() {
|
|
197
197
|
const n = O();
|
|
198
|
-
if (!
|
|
198
|
+
if (!k(n) || !n.isCollapsed()) return !1;
|
|
199
199
|
const e = n.anchor.getNode();
|
|
200
|
-
if (!
|
|
201
|
-
const t =
|
|
200
|
+
if (!g(e) || e.getChildrenSize() !== 0) return !1;
|
|
201
|
+
const t = w(e), r = e.getParent();
|
|
202
202
|
a(r) || y(40);
|
|
203
203
|
const s = r.getParent();
|
|
204
204
|
let i;
|
|
205
|
-
if (
|
|
205
|
+
if (L(s)) i = P(), t.insertAfter(i);
|
|
206
206
|
else {
|
|
207
|
-
if (!
|
|
207
|
+
if (!g(s)) return !1;
|
|
208
208
|
i = _(), s.insertAfter(i);
|
|
209
209
|
}
|
|
210
210
|
i.setTextStyle(n.style).setTextFormat(n.format).select();
|
|
211
211
|
const o = e.getNextSiblings();
|
|
212
212
|
if (o.length > 0) {
|
|
213
213
|
const c = p(r.getListType());
|
|
214
|
-
if (
|
|
214
|
+
if (g(i)) {
|
|
215
215
|
const l = _();
|
|
216
216
|
l.append(c), i.insertAfter(l);
|
|
217
217
|
} else i.insertAfter(c);
|
|
@@ -220,9 +220,9 @@ function de() {
|
|
|
220
220
|
return (function(c) {
|
|
221
221
|
let l = c;
|
|
222
222
|
for (; l.getNextSibling() == null && l.getPreviousSibling() == null; ) {
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
l =
|
|
223
|
+
const h = l.getParent();
|
|
224
|
+
if (h == null || !g(h) && !a(h)) break;
|
|
225
|
+
l = h;
|
|
226
226
|
}
|
|
227
227
|
l.remove();
|
|
228
228
|
})(e), !0;
|
|
@@ -232,7 +232,7 @@ function N(...n) {
|
|
|
232
232
|
for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
|
|
233
233
|
return e;
|
|
234
234
|
}
|
|
235
|
-
class
|
|
235
|
+
class I extends F {
|
|
236
236
|
__value;
|
|
237
237
|
__checked;
|
|
238
238
|
$config() {
|
|
@@ -240,7 +240,7 @@ class M extends P {
|
|
|
240
240
|
if (e.__checked == null) return;
|
|
241
241
|
const t = e.getParent();
|
|
242
242
|
a(t) && t.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0);
|
|
243
|
-
}, extends:
|
|
243
|
+
}, extends: F, importDOM: H({ li: () => ({ conversion: _e, priority: 0 }) }) });
|
|
244
244
|
}
|
|
245
245
|
constructor(e = 1, t = void 0, r) {
|
|
246
246
|
super(r), this.__value = e === void 0 ? 1 : e, this.__checked = t;
|
|
@@ -254,26 +254,26 @@ class M extends P {
|
|
|
254
254
|
}
|
|
255
255
|
updateListItemDOM(e, t, r) {
|
|
256
256
|
(function(o, c, l) {
|
|
257
|
-
const
|
|
258
|
-
!a(
|
|
257
|
+
const h = c.getParent();
|
|
258
|
+
!a(h) || h.getListType() !== "check" || a(c.getFirstChild()) ? (o.removeAttribute("role"), o.removeAttribute("tabIndex"), o.removeAttribute("aria-checked")) : (o.setAttribute("role", "checkbox"), o.setAttribute("tabIndex", "-1"), l && c.__checked === l.__checked || o.setAttribute("aria-checked", c.getChecked() ? "true" : "false"));
|
|
259
259
|
})(t, this, e), t.value = this.__value, (function(o, c, l) {
|
|
260
|
-
const
|
|
260
|
+
const h = [], u = [], f = c.list, C = f ? f.listitem : void 0;
|
|
261
261
|
let S;
|
|
262
|
-
if (f && f.nested && (S = f.nested.listitem), C !== void 0 &&
|
|
263
|
-
const d = l.getParent(),
|
|
264
|
-
|
|
262
|
+
if (f && f.nested && (S = f.nested.listitem), C !== void 0 && h.push(...N(C)), f) {
|
|
263
|
+
const d = l.getParent(), x = a(d) && d.getListType() === "check", E = l.getChecked();
|
|
264
|
+
x && !E || u.push(f.listitemUnchecked), x && E || u.push(f.listitemChecked), x && h.push(E ? f.listitemChecked : f.listitemUnchecked);
|
|
265
265
|
}
|
|
266
266
|
if (S !== void 0) {
|
|
267
267
|
const d = N(S);
|
|
268
|
-
l.getChildren().some((
|
|
268
|
+
l.getChildren().some((x) => a(x)) ? h.push(...d) : u.push(...d);
|
|
269
269
|
}
|
|
270
|
-
u.length > 0 &&
|
|
270
|
+
u.length > 0 && q(o, ...u), h.length > 0 && G(o, ...h);
|
|
271
271
|
})(t, r.theme, this);
|
|
272
272
|
const s = e ? e.__style : "", i = this.__style;
|
|
273
273
|
s !== i && (i === "" ? t.removeAttribute("style") : t.style.cssText = i), (function(o, c, l) {
|
|
274
|
-
const
|
|
275
|
-
for (const u in
|
|
276
|
-
if (l) for (const u in
|
|
274
|
+
const h = U(c.__textStyle);
|
|
275
|
+
for (const u in h) o.style.setProperty(`--listitem-marker-${u}`, h[u]);
|
|
276
|
+
if (l) for (const u in U(l.__textStyle)) u in h || o.style.removeProperty(`--listitem-marker-${u}`);
|
|
277
277
|
})(t, this, e);
|
|
278
278
|
}
|
|
279
279
|
updateDOM(e, t, r) {
|
|
@@ -295,7 +295,7 @@ class M extends P {
|
|
|
295
295
|
append(...e) {
|
|
296
296
|
for (let t = 0; t < e.length; t++) {
|
|
297
297
|
const r = e[t];
|
|
298
|
-
if (
|
|
298
|
+
if (b(r) && this.canMergeWith(r)) {
|
|
299
299
|
const s = r.getChildren();
|
|
300
300
|
this.append(...s), r.remove();
|
|
301
301
|
} else super.append(r);
|
|
@@ -303,7 +303,7 @@ class M extends P {
|
|
|
303
303
|
return this;
|
|
304
304
|
}
|
|
305
305
|
replace(e, t) {
|
|
306
|
-
if (
|
|
306
|
+
if (g(e)) return super.replace(e);
|
|
307
307
|
this.setIndent(0);
|
|
308
308
|
const r = this.getParentOrThrow();
|
|
309
309
|
if (!a(r)) return e;
|
|
@@ -318,13 +318,13 @@ class M extends P {
|
|
|
318
318
|
}
|
|
319
319
|
r.insertAfter(e), e.insertAfter(s);
|
|
320
320
|
}
|
|
321
|
-
return t && (
|
|
321
|
+
return t && (b(e) || y(139), this.getChildren().forEach((s) => {
|
|
322
322
|
e.append(s);
|
|
323
323
|
})), this.remove(), r.getChildrenSize() === 0 && r.remove(), e;
|
|
324
324
|
}
|
|
325
325
|
insertAfter(e, t = !0) {
|
|
326
326
|
const r = this.getParentOrThrow();
|
|
327
|
-
if (a(r) || y(39),
|
|
327
|
+
if (a(r) || y(39), g(e)) return super.insertAfter(e, t);
|
|
328
328
|
const s = this.getNextSiblings();
|
|
329
329
|
if (r.insertAfter(e, t), s.length !== 0) {
|
|
330
330
|
const i = p(r.getListType());
|
|
@@ -334,16 +334,16 @@ class M extends P {
|
|
|
334
334
|
}
|
|
335
335
|
remove(e) {
|
|
336
336
|
const t = this.getPreviousSibling(), r = this.getNextSibling();
|
|
337
|
-
super.remove(e), t && r && m(t) && m(r) && (
|
|
337
|
+
super.remove(e), t && r && m(t) && m(r) && (D(t.getFirstChild(), r.getFirstChild()), r.remove());
|
|
338
338
|
}
|
|
339
339
|
insertNewAfter(e, t = !0) {
|
|
340
340
|
const r = _().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked() && void 0);
|
|
341
341
|
return this.insertAfter(r, t), r;
|
|
342
342
|
}
|
|
343
343
|
collapseAtStart(e) {
|
|
344
|
-
const t =
|
|
344
|
+
const t = P();
|
|
345
345
|
this.getChildren().forEach((o) => t.append(o));
|
|
346
|
-
const r = this.getParentOrThrow(), s = r.getParentOrThrow(), i =
|
|
346
|
+
const r = this.getParentOrThrow(), s = r.getParentOrThrow(), i = g(s);
|
|
347
347
|
if (r.getChildrenSize() === 1) if (i) r.remove(), s.select();
|
|
348
348
|
else {
|
|
349
349
|
r.insertBefore(t), r.remove();
|
|
@@ -378,26 +378,26 @@ class M extends P {
|
|
|
378
378
|
const e = this.getParent();
|
|
379
379
|
if (e === null || !this.isAttached()) return this.getLatest().__indent;
|
|
380
380
|
let t = e.getParentOrThrow(), r = 0;
|
|
381
|
-
for (;
|
|
381
|
+
for (; g(t); ) t = t.getParentOrThrow().getParentOrThrow(), r++;
|
|
382
382
|
return r;
|
|
383
383
|
}
|
|
384
384
|
setIndent(e) {
|
|
385
385
|
typeof e != "number" && y(117), (e = Math.floor(e)) >= 0 || y(199);
|
|
386
386
|
let t = this.getIndent();
|
|
387
|
-
for (; t !== e; ) t < e ? (
|
|
387
|
+
for (; t !== e; ) t < e ? (fe(this), t++) : (de(this), t--);
|
|
388
388
|
return this;
|
|
389
389
|
}
|
|
390
390
|
canInsertAfter(e) {
|
|
391
|
-
return
|
|
391
|
+
return g(e);
|
|
392
392
|
}
|
|
393
393
|
canReplaceWith(e) {
|
|
394
|
-
return
|
|
394
|
+
return g(e);
|
|
395
395
|
}
|
|
396
396
|
canMergeWith(e) {
|
|
397
|
-
return
|
|
397
|
+
return g(e) || oe(e);
|
|
398
398
|
}
|
|
399
399
|
extractWithChild(e, t) {
|
|
400
|
-
if (!
|
|
400
|
+
if (!k(t)) return !1;
|
|
401
401
|
const r = t.anchor.getNode(), s = t.focus.getNode();
|
|
402
402
|
return this.isParentOf(r) && this.isParentOf(s) && this.getTextContent().length === t.getTextContent().length;
|
|
403
403
|
}
|
|
@@ -411,23 +411,26 @@ class M extends P {
|
|
|
411
411
|
return !0;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function _e(n) {
|
|
415
415
|
if (n.classList.contains("task-list-item")) {
|
|
416
|
-
for (const t of n.children) if (t.tagName === "INPUT") return
|
|
416
|
+
for (const t of n.children) if (t.tagName === "INPUT") return V(t);
|
|
417
|
+
}
|
|
418
|
+
if (n.classList.contains("joplin-checkbox")) {
|
|
419
|
+
for (const t of n.children) if (t.classList.contains("checkbox-wrapper") && t.children.length > 0 && t.children[0].tagName === "INPUT") return V(t.children[0]);
|
|
417
420
|
}
|
|
418
421
|
const e = n.getAttribute("aria-checked");
|
|
419
422
|
return { node: _(e === "true" || e !== "false" && void 0) };
|
|
420
423
|
}
|
|
421
|
-
function
|
|
424
|
+
function V(n) {
|
|
422
425
|
return n.getAttribute("type") !== "checkbox" ? { node: null } : { node: _(n.hasAttribute("checked")) };
|
|
423
426
|
}
|
|
424
427
|
function _(n) {
|
|
425
|
-
return
|
|
428
|
+
return Y(new I(void 0, n));
|
|
426
429
|
}
|
|
427
|
-
function
|
|
428
|
-
return n instanceof
|
|
430
|
+
function g(n) {
|
|
431
|
+
return n instanceof I;
|
|
429
432
|
}
|
|
430
|
-
class $ extends
|
|
433
|
+
class $ extends F {
|
|
431
434
|
__tag;
|
|
432
435
|
__start;
|
|
433
436
|
__listType;
|
|
@@ -435,9 +438,9 @@ class $ extends P {
|
|
|
435
438
|
return this.config("list", { $transform: (e) => {
|
|
436
439
|
(function(t) {
|
|
437
440
|
const r = t.getNextSibling();
|
|
438
|
-
a(r) && t.getListType() === r.getListType() &&
|
|
439
|
-
})(e),
|
|
440
|
-
}, extends:
|
|
441
|
+
a(r) && t.getListType() === r.getListType() && D(t, r);
|
|
442
|
+
})(e), re(e);
|
|
443
|
+
}, extends: F, importDOM: H({ ol: () => ({ conversion: j, priority: 0 }), ul: () => ({ conversion: j, priority: 0 }) }) });
|
|
441
444
|
}
|
|
442
445
|
constructor(e = "number", t = 1, r) {
|
|
443
446
|
super(r);
|
|
@@ -466,17 +469,17 @@ class $ extends P {
|
|
|
466
469
|
}
|
|
467
470
|
createDOM(e, t) {
|
|
468
471
|
const r = this.__tag, s = document.createElement(r);
|
|
469
|
-
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType,
|
|
472
|
+
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType, X(s, e.theme, this), s;
|
|
470
473
|
}
|
|
471
474
|
updateDOM(e, t, r) {
|
|
472
|
-
return e.__tag !== this.__tag || e.__listType !== this.__listType || (
|
|
475
|
+
return e.__tag !== this.__tag || e.__listType !== this.__listType || (X(t, r.theme, this), !1);
|
|
473
476
|
}
|
|
474
477
|
updateFromJSON(e) {
|
|
475
478
|
return super.updateFromJSON(e).setListType(e.listType).setStart(e.start);
|
|
476
479
|
}
|
|
477
480
|
exportDOM(e) {
|
|
478
481
|
const t = this.createDOM(e._config, e);
|
|
479
|
-
return
|
|
482
|
+
return Q(t) && (this.__start !== 1 && t.setAttribute("start", String(this.__start)), this.__listType === "check" && t.setAttribute("__lexicalListType", "check")), { element: t };
|
|
480
483
|
}
|
|
481
484
|
exportJSON() {
|
|
482
485
|
return { ...super.exportJSON(), listType: this.getListType(), start: this.getStart(), tag: this.getTag() };
|
|
@@ -491,22 +494,22 @@ class $ extends P {
|
|
|
491
494
|
let s = r;
|
|
492
495
|
for (let i = 0; i < r.length; i++) {
|
|
493
496
|
const o = r[i];
|
|
494
|
-
|
|
497
|
+
g(o) || (s === r && (s = [...r]), s[i] = _().append(!b(o) || a(o) || o.isInline() ? o : ie(o.getTextContent())));
|
|
495
498
|
}
|
|
496
499
|
return super.splice(e, t, s);
|
|
497
500
|
}
|
|
498
501
|
extractWithChild(e) {
|
|
499
|
-
return
|
|
502
|
+
return g(e);
|
|
500
503
|
}
|
|
501
504
|
}
|
|
502
|
-
function
|
|
505
|
+
function X(n, e, t) {
|
|
503
506
|
const r = [], s = [], i = e.list;
|
|
504
507
|
if (i !== void 0) {
|
|
505
|
-
const o = i[`${t.__tag}Depth`] || [], c =
|
|
508
|
+
const o = i[`${t.__tag}Depth`] || [], c = M(t) - 1, l = c % o.length, h = o[l], u = i[t.__tag];
|
|
506
509
|
let f;
|
|
507
510
|
const C = i.nested, S = i.checklist;
|
|
508
|
-
if (C !== void 0 && C.list && (f = C.list), u !== void 0 && r.push(u), S !== void 0 && t.__listType === "check" && r.push(S),
|
|
509
|
-
r.push(...N(
|
|
511
|
+
if (C !== void 0 && C.list && (f = C.list), u !== void 0 && r.push(u), S !== void 0 && t.__listType === "check" && r.push(S), h !== void 0) {
|
|
512
|
+
r.push(...N(h));
|
|
510
513
|
for (let d = 0; d < o.length; d++) d !== l && s.push(t.__tag + d);
|
|
511
514
|
}
|
|
512
515
|
if (f !== void 0) {
|
|
@@ -514,83 +517,83 @@ function z(n, e, t) {
|
|
|
514
517
|
c > 1 ? r.push(...d) : s.push(...d);
|
|
515
518
|
}
|
|
516
519
|
}
|
|
517
|
-
s.length > 0 &&
|
|
520
|
+
s.length > 0 && q(n, ...s), r.length > 0 && G(n, ...r);
|
|
518
521
|
}
|
|
519
522
|
function me(n) {
|
|
520
523
|
const e = [];
|
|
521
524
|
for (let t = 0; t < n.length; t++) {
|
|
522
525
|
const r = n[t];
|
|
523
|
-
if (
|
|
526
|
+
if (g(r)) {
|
|
524
527
|
e.push(r);
|
|
525
528
|
const s = r.getChildren();
|
|
526
529
|
s.length > 1 && s.forEach((i) => {
|
|
527
|
-
a(i) && e.push(
|
|
530
|
+
a(i) && e.push(B(i));
|
|
528
531
|
});
|
|
529
|
-
} else e.push(
|
|
532
|
+
} else e.push(B(r));
|
|
530
533
|
}
|
|
531
534
|
return e;
|
|
532
535
|
}
|
|
533
|
-
function
|
|
536
|
+
function j(n) {
|
|
534
537
|
const e = n.nodeName.toLowerCase();
|
|
535
538
|
let t = null;
|
|
536
539
|
return e === "ol" ? t = p("number", n.start) : e === "ul" && (t = (function(r) {
|
|
537
|
-
if (r.getAttribute("__lexicallisttype") === "check" || r.classList.contains("contains-task-list")) return !0;
|
|
538
|
-
for (const s of r.childNodes) if (
|
|
540
|
+
if (r.getAttribute("__lexicallisttype") === "check" || r.classList.contains("contains-task-list") || r.getAttribute("data-is-checklist") === "1") return !0;
|
|
541
|
+
for (const s of r.childNodes) if (Q(s) && s.hasAttribute("aria-checked")) return !0;
|
|
539
542
|
return !1;
|
|
540
543
|
})(n) ? p("check") : p("bullet")), { after: me, node: t };
|
|
541
544
|
}
|
|
542
545
|
const ye = { ol: "number", ul: "bullet" };
|
|
543
546
|
function p(n = "number", e = 1) {
|
|
544
|
-
return
|
|
547
|
+
return Y(new $(n, e));
|
|
545
548
|
}
|
|
546
549
|
function a(n) {
|
|
547
550
|
return n instanceof $;
|
|
548
551
|
}
|
|
549
|
-
const Te = A("UPDATE_LIST_START_COMMAND"), Ce = A("INSERT_UNORDERED_LIST_COMMAND"), Se = A("INSERT_ORDERED_LIST_COMMAND"),
|
|
550
|
-
function
|
|
551
|
-
return
|
|
552
|
-
const { listNodeKey: t, newStart: r } = e, s =
|
|
553
|
-
return !!a(s) && (s.getListType() === "number" && (s.setStart(r),
|
|
554
|
-
},
|
|
552
|
+
const Te = A("UPDATE_LIST_START_COMMAND"), Ce = A("INSERT_UNORDERED_LIST_COMMAND"), Se = A("INSERT_ORDERED_LIST_COMMAND"), xe = A("REMOVE_LIST_COMMAND");
|
|
553
|
+
function Le(n) {
|
|
554
|
+
return ne(n.registerCommand(Se, () => (z("number"), !0), v), n.registerCommand(Te, (e) => {
|
|
555
|
+
const { listNodeKey: t, newStart: r } = e, s = he(t);
|
|
556
|
+
return !!a(s) && (s.getListType() === "number" && (s.setStart(r), re(s)), !0);
|
|
557
|
+
}, v), n.registerCommand(Ce, () => (z("bullet"), !0), v), n.registerCommand(xe, () => (ue(), !0), v), n.registerCommand(ae, () => pe(), v), n.registerNodeTransform(I, (e) => {
|
|
555
558
|
const t = e.getFirstChild();
|
|
556
559
|
if (t) {
|
|
557
|
-
if (
|
|
560
|
+
if (ce(t)) {
|
|
558
561
|
const r = t.getStyle(), s = t.getFormat();
|
|
559
562
|
e.getTextStyle() !== r && e.setTextStyle(r), e.getTextFormat() !== s && e.setTextFormat(s);
|
|
560
563
|
}
|
|
561
564
|
} else {
|
|
562
565
|
const r = O();
|
|
563
|
-
|
|
566
|
+
k(r) && (r.style !== e.getTextStyle() || r.format !== e.getTextFormat()) && r.isCollapsed() && e.is(r.anchor.getNode()) && e.setTextStyle(r.style).setTextFormat(r.format);
|
|
564
567
|
}
|
|
565
|
-
}), n.registerNodeTransform(
|
|
568
|
+
}), n.registerNodeTransform(le, (e) => {
|
|
566
569
|
const t = e.getParent();
|
|
567
|
-
if (
|
|
570
|
+
if (g(t) && e.is(t.getFirstChild())) {
|
|
568
571
|
const r = e.getStyle(), s = e.getFormat();
|
|
569
572
|
r === t.getTextStyle() && s === t.getTextFormat() || t.setTextStyle(r).setTextFormat(s);
|
|
570
573
|
}
|
|
571
574
|
}));
|
|
572
575
|
}
|
|
573
|
-
function
|
|
576
|
+
function Fe(n) {
|
|
574
577
|
const e = (t) => {
|
|
575
578
|
const r = t.getParent();
|
|
576
579
|
if (a(t.getFirstChild()) || !a(r)) return;
|
|
577
|
-
const s = ge(t, (i) =>
|
|
580
|
+
const s = ge(t, (i) => g(i) && a(i.getParent()) && g(i.getPreviousSibling()));
|
|
578
581
|
if (s === null && t.getIndent() > 0) t.setIndent(0);
|
|
579
|
-
else if (
|
|
582
|
+
else if (g(s)) {
|
|
580
583
|
const i = s.getPreviousSibling();
|
|
581
|
-
if (
|
|
584
|
+
if (g(i)) {
|
|
582
585
|
const o = (function(l) {
|
|
583
|
-
let
|
|
586
|
+
let h = l, u = h.getFirstChild();
|
|
584
587
|
for (; a(u); ) {
|
|
585
588
|
const f = u.getLastChild();
|
|
586
|
-
if (!
|
|
587
|
-
|
|
589
|
+
if (!g(f)) break;
|
|
590
|
+
h = f, u = h.getFirstChild();
|
|
588
591
|
}
|
|
589
|
-
return
|
|
592
|
+
return h;
|
|
590
593
|
})(i), c = o.getParent();
|
|
591
594
|
if (a(c)) {
|
|
592
|
-
const l =
|
|
593
|
-
l + 1 <
|
|
595
|
+
const l = M(c);
|
|
596
|
+
l + 1 < M(r) && t.setIndent(l);
|
|
594
597
|
}
|
|
595
598
|
}
|
|
596
599
|
}
|
|
@@ -600,7 +603,7 @@ function Pe(n) {
|
|
|
600
603
|
for (; r.length > 0; ) {
|
|
601
604
|
const s = r.shift();
|
|
602
605
|
if (a(s)) {
|
|
603
|
-
for (const i of s.getChildren()) if (
|
|
606
|
+
for (const i of s.getChildren()) if (g(i)) {
|
|
604
607
|
e(i);
|
|
605
608
|
const o = i.getFirstChild();
|
|
606
609
|
a(o) && r.push(o);
|
|
@@ -610,15 +613,15 @@ function Pe(n) {
|
|
|
610
613
|
});
|
|
611
614
|
}
|
|
612
615
|
export {
|
|
613
|
-
|
|
616
|
+
Fe as L,
|
|
614
617
|
Ce as S,
|
|
615
|
-
|
|
618
|
+
Le as b,
|
|
616
619
|
a as d,
|
|
617
620
|
p as h,
|
|
618
|
-
|
|
621
|
+
xe as k,
|
|
619
622
|
$ as l,
|
|
620
|
-
|
|
621
|
-
|
|
623
|
+
I as n,
|
|
624
|
+
g as o,
|
|
622
625
|
Se as x
|
|
623
626
|
};
|
|
624
|
-
//# sourceMappingURL=LexicalList.prod-
|
|
627
|
+
//# sourceMappingURL=LexicalList.prod-CIB0K0ja.js.map
|