@uva-glass/component-library 3.33.1 → 3.33.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-B84LhBo3.js → Lexical.prod-BjpEXQJZ.js} +1440 -1365
- package/dist/Lexical.prod-BjpEXQJZ.js.map +1 -0
- package/dist/LexicalClipboard.prod-B4j0EyWx.js +276 -0
- package/dist/LexicalClipboard.prod-B4j0EyWx.js.map +1 -0
- package/dist/{LexicalLink.prod-DoU9RL94.js → LexicalLink.prod-CYNCWmMx.js} +38 -38
- package/dist/{LexicalLink.prod-DoU9RL94.js.map → LexicalLink.prod-CYNCWmMx.js.map} +1 -1
- package/dist/{LexicalList.prod-Cw2TK1jY.js → LexicalList.prod-BRwEushm.js} +189 -204
- package/dist/LexicalList.prod-BRwEushm.js.map +1 -0
- package/dist/{LexicalSelection.prod-TB5pn9xc.js → LexicalSelection.prod-DYo5_Y2k.js} +25 -25
- package/dist/{LexicalSelection.prod-TB5pn9xc.js.map → LexicalSelection.prod-DYo5_Y2k.js.map} +1 -1
- package/dist/{LexicalTable.prod-9xjyWB0C.js → LexicalTable.prod-BArw8Dt5.js} +458 -457
- package/dist/LexicalTable.prod-BArw8Dt5.js.map +1 -0
- package/dist/{LexicalUtils.prod-CD3xGFhm.js → LexicalUtils.prod-DJRX2pwP.js} +48 -48
- package/dist/{LexicalUtils.prod-CD3xGFhm.js.map → LexicalUtils.prod-DJRX2pwP.js.map} +1 -1
- package/dist/Sortable.module-B6I6E9un.js +26 -0
- package/dist/Sortable.module-B6I6E9un.js.map +1 -0
- package/dist/{SortableProvider-DisCfTTN.js → SortableProvider-l8-7ClBJ.js} +2 -2
- package/dist/{SortableProvider-DisCfTTN.js.map → SortableProvider-l8-7ClBJ.js.map} +1 -1
- package/dist/{TablePlugin-oF-gInNx.js → TablePlugin-BagQHe1w.js} +64 -64
- package/dist/{TablePlugin-oF-gInNx.js.map → TablePlugin-BagQHe1w.js.map} +1 -1
- package/dist/assets/Sortable.css +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/FormInput/FormInput.js +2 -2
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.js +2 -2
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +9 -9
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +9 -9
- 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/LinkPlugin.js +41 -41
- 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 +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +8 -8
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +14 -14
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +172 -172
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +6 -6
- package/dist/components/Sortable/Sortable.js +1 -1
- package/dist/components/Sortable/SortableProvider.js +1 -1
- package/dist/components/Sortable/components/SortableContainer.js +2 -2
- package/dist/components/Sortable/components/SortableHandle.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/{helpers-CMG0anwr.js → helpers-DM8qHaKY.js} +54 -54
- package/dist/helpers-DM8qHaKY.js.map +1 -0
- package/dist/{index-KJPw-7za.js → index-Ccsg2cb2.js} +285 -284
- package/dist/index-Ccsg2cb2.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/storybook__react.d.js +1 -1
- package/package.json +14 -14
- package/dist/Lexical.prod-B84LhBo3.js.map +0 -1
- package/dist/LexicalClipboard.prod-DLgWWXys.js +0 -255
- package/dist/LexicalClipboard.prod-DLgWWXys.js.map +0 -1
- package/dist/LexicalList.prod-Cw2TK1jY.js.map +0 -1
- package/dist/LexicalTable.prod-9xjyWB0C.js.map +0 -1
- package/dist/Sortable.module--kgnzOjW.js +0 -26
- package/dist/Sortable.module--kgnzOjW.js.map +0 -1
- package/dist/helpers-CMG0anwr.js.map +0 -1
- package/dist/index-KJPw-7za.js.map +0 -1
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import {
|
|
3
|
-
import { B as
|
|
4
|
-
function
|
|
1
|
+
import { i as q, r as G, j as ne, w as se, v as ie } from "./LexicalUtils.prod-DJRX2pwP.js";
|
|
2
|
+
import { y as P, L as Q, v as X, r as oe, m as k, R as A, B as le, g as F, h as Y, f as O, H as ce, i as ae, D as M, a as ge, J as b, C as he, u as N, b as Z, S as $, M as J, s as W } from "./Lexical.prod-BjpEXQJZ.js";
|
|
3
|
+
import { B as K } from "./LexicalSelection.prod-DYo5_Y2k.js";
|
|
4
|
+
function T(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 E(n) {
|
|
11
11
|
let e = 1, t = n.getParent();
|
|
12
12
|
for (; t != null; ) {
|
|
13
|
-
if (
|
|
13
|
+
if (h(t)) {
|
|
14
14
|
const r = t.getParent();
|
|
15
15
|
if (a(r)) {
|
|
16
16
|
e++, t = r.getParent();
|
|
17
17
|
continue;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
T(40);
|
|
20
20
|
}
|
|
21
21
|
return e;
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function w(n) {
|
|
26
26
|
let e = n.getParent();
|
|
27
|
-
a(e) ||
|
|
27
|
+
a(e) || T(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
32
|
function ee(n) {
|
|
33
33
|
let e = [];
|
|
34
|
-
const t = n.getChildren().filter(
|
|
34
|
+
const t = n.getChildren().filter(h);
|
|
35
35
|
for (let r = 0; r < t.length; r++) {
|
|
36
36
|
const s = t[r], i = s.getFirstChild();
|
|
37
37
|
a(i) ? e = e.concat(ee(i)) : e.push(s);
|
|
38
38
|
}
|
|
39
39
|
return e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function y(n) {
|
|
42
|
+
return h(n) && a(n.getFirstChild());
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function U(n) {
|
|
45
45
|
return m().append(n);
|
|
46
46
|
}
|
|
47
47
|
function te(n, e) {
|
|
48
|
-
return
|
|
48
|
+
return h(n) && (e.length === 0 || e.length === 1 && n.is(e[0]) && n.getChildrenSize() === 0);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
const e =
|
|
50
|
+
function V(n) {
|
|
51
|
+
const e = M();
|
|
52
52
|
if (e !== null) {
|
|
53
53
|
let t = e.getNodes();
|
|
54
|
-
if (
|
|
54
|
+
if (F(e)) {
|
|
55
55
|
const s = e.getStartEndPoints();
|
|
56
|
-
s === null &&
|
|
56
|
+
s === null && T(143);
|
|
57
57
|
const [i] = s, o = i.getNode(), c = o.getParent();
|
|
58
|
-
if (
|
|
58
|
+
if (N(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 g = A();
|
|
63
|
+
o.append(g), t = g.select().getNodes();
|
|
64
64
|
}
|
|
65
65
|
} else if (te(o, t)) {
|
|
66
66
|
const l = p(n);
|
|
67
|
-
if (
|
|
67
|
+
if (N(c)) {
|
|
68
68
|
o.replace(l);
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
} else if (
|
|
72
|
-
const
|
|
73
|
-
C(l,
|
|
69
|
+
const g = m();
|
|
70
|
+
k(o) && (g.setFormat(o.getFormatType()), g.setIndent(o.getIndent())), l.append(g);
|
|
71
|
+
} else if (h(o)) {
|
|
72
|
+
const g = o.getParentOrThrow();
|
|
73
|
+
C(l, g.getChildren()), g.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 (k(i) && i.isEmpty() && !h(i) && !r.has(i.getKey())) {
|
|
82
|
+
z(i, n);
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
|
-
let o = Z(i) ? i.getParent() :
|
|
85
|
+
let o = Z(i) ? i.getParent() : h(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 (N(l) && !r.has(c)) {
|
|
98
|
+
r.add(c), z(o, n);
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
o = l;
|
|
@@ -107,7 +107,7 @@ function K(n) {
|
|
|
107
107
|
function C(n, e) {
|
|
108
108
|
n.splice(n.getChildrenSize(), 0, e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function z(n, e) {
|
|
111
111
|
if (a(n)) return n;
|
|
112
112
|
const t = n.getPreviousSibling(), r = n.getNextSibling(), s = m();
|
|
113
113
|
let i;
|
|
@@ -119,53 +119,58 @@ function U(n, e) {
|
|
|
119
119
|
}
|
|
120
120
|
return s.setFormat(n.getFormatType()), s.setIndent(n.getIndent()), n.remove(), i;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function B(n, e) {
|
|
123
123
|
const t = n.getLastChild(), r = e.getFirstChild();
|
|
124
|
-
t && r &&
|
|
124
|
+
t && r && y(t) && y(r) && (B(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
128
|
function ue() {
|
|
129
|
-
const n =
|
|
130
|
-
if (
|
|
129
|
+
const n = M();
|
|
130
|
+
if (F(n)) {
|
|
131
131
|
const e = /* @__PURE__ */ new Set(), t = n.getNodes(), r = n.anchor.getNode();
|
|
132
|
-
if (te(r, t)) e.add(
|
|
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
135
|
if (Z(i)) {
|
|
136
|
-
const o =
|
|
137
|
-
o != null && e.add(
|
|
136
|
+
const o = ie(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
142
|
const o = ee(s);
|
|
143
143
|
for (const c of o) {
|
|
144
|
-
const l =
|
|
145
|
-
C(l, c.getChildren()), i.insertAfter(l), i = l, c.__key === n.anchor.key &&
|
|
144
|
+
const l = A().setTextStyle(n.style).setTextFormat(n.format);
|
|
145
|
+
C(l, c.getChildren()), i.insertAfter(l), i = l, c.__key === n.anchor.key && $(n.anchor, J(W(l, "next"))), c.__key === n.focus.key && $(n.focus, J(W(l, "next"))), c.remove();
|
|
146
146
|
}
|
|
147
147
|
s.remove();
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function re(n) {
|
|
152
|
+
const e = n.getListType() !== "check";
|
|
153
|
+
let t = n.getStart();
|
|
154
|
+
for (const r of n.getChildren()) h(r) && (r.getValue() !== t && r.setValue(t), e && r.getLatest().__checked != null && r.setChecked(void 0), a(r.getFirstChild()) || t++);
|
|
155
|
+
}
|
|
156
|
+
function fe(n) {
|
|
152
157
|
const e = /* @__PURE__ */ new Set();
|
|
153
|
-
if (
|
|
158
|
+
if (y(n) || e.has(n.getKey())) return;
|
|
154
159
|
const t = n.getParent(), r = n.getNextSibling(), s = n.getPreviousSibling();
|
|
155
|
-
if (
|
|
160
|
+
if (y(r) && y(s)) {
|
|
156
161
|
const i = s.getFirstChild();
|
|
157
162
|
if (a(i)) {
|
|
158
163
|
i.append(n);
|
|
159
164
|
const o = r.getFirstChild();
|
|
160
165
|
a(o) && (C(i, o.getChildren()), r.remove(), e.add(r.getKey()));
|
|
161
166
|
}
|
|
162
|
-
} else if (
|
|
167
|
+
} else if (y(r)) {
|
|
163
168
|
const i = r.getFirstChild();
|
|
164
169
|
if (a(i)) {
|
|
165
170
|
const o = i.getFirstChild();
|
|
166
171
|
o !== null && o.insertBefore(n);
|
|
167
172
|
}
|
|
168
|
-
} else if (
|
|
173
|
+
} else if (y(s)) {
|
|
169
174
|
const i = s.getFirstChild();
|
|
170
175
|
a(i) && i.append(n);
|
|
171
176
|
} else if (a(t)) {
|
|
@@ -173,40 +178,40 @@ function ge(n) {
|
|
|
173
178
|
i.append(o), o.append(n), s ? s.insertAfter(i) : r ? r.insertBefore(i) : t.append(i);
|
|
174
179
|
}
|
|
175
180
|
}
|
|
176
|
-
function
|
|
177
|
-
if (
|
|
181
|
+
function de(n) {
|
|
182
|
+
if (y(n)) return;
|
|
178
183
|
const e = n.getParent(), t = e ? e.getParent() : void 0;
|
|
179
|
-
if (a(t ? t.getParent() : void 0) &&
|
|
184
|
+
if (a(t ? t.getParent() : void 0) && h(t) && a(e)) {
|
|
180
185
|
const r = e ? e.getFirstChild() : void 0, s = e ? e.getLastChild() : void 0;
|
|
181
186
|
if (n.is(r)) t.insertBefore(n), e.isEmpty() && t.remove();
|
|
182
187
|
else if (n.is(s)) t.insertAfter(n), e.isEmpty() && t.remove();
|
|
183
188
|
else {
|
|
184
189
|
const i = e.getListType(), o = m(), c = p(i);
|
|
185
|
-
o.append(c), n.getPreviousSiblings().forEach((
|
|
186
|
-
const l = m(),
|
|
187
|
-
l.append(
|
|
190
|
+
o.append(c), n.getPreviousSiblings().forEach((u) => c.append(u));
|
|
191
|
+
const l = m(), g = p(i);
|
|
192
|
+
l.append(g), C(g, n.getNextSiblings()), t.insertBefore(o), t.insertAfter(l), t.replace(n);
|
|
188
193
|
}
|
|
189
194
|
}
|
|
190
195
|
}
|
|
191
|
-
function
|
|
192
|
-
const n =
|
|
193
|
-
if (!
|
|
196
|
+
function pe() {
|
|
197
|
+
const n = M();
|
|
198
|
+
if (!F(n) || !n.isCollapsed()) return !1;
|
|
194
199
|
const e = n.anchor.getNode();
|
|
195
|
-
if (!
|
|
196
|
-
const t =
|
|
197
|
-
a(r) ||
|
|
200
|
+
if (!h(e) || e.getChildrenSize() !== 0) return !1;
|
|
201
|
+
const t = w(e), r = e.getParent();
|
|
202
|
+
a(r) || T(40);
|
|
198
203
|
const s = r.getParent();
|
|
199
204
|
let i;
|
|
200
|
-
if (
|
|
205
|
+
if (N(s)) i = A(), t.insertAfter(i);
|
|
201
206
|
else {
|
|
202
|
-
if (!
|
|
207
|
+
if (!h(s)) return !1;
|
|
203
208
|
i = m(), s.insertAfter(i);
|
|
204
209
|
}
|
|
205
210
|
i.setTextStyle(n.style).setTextFormat(n.format).select();
|
|
206
211
|
const o = e.getNextSiblings();
|
|
207
212
|
if (o.length > 0) {
|
|
208
213
|
const c = p(r.getListType());
|
|
209
|
-
if (
|
|
214
|
+
if (h(i)) {
|
|
210
215
|
const l = m();
|
|
211
216
|
l.append(c), i.insertAfter(l);
|
|
212
217
|
} else i.insertAfter(c);
|
|
@@ -215,73 +220,64 @@ function fe() {
|
|
|
215
220
|
return function(c) {
|
|
216
221
|
let l = c;
|
|
217
222
|
for (; l.getNextSibling() == null && l.getPreviousSibling() == null; ) {
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
l =
|
|
223
|
+
const g = l.getParent();
|
|
224
|
+
if (g == null || !h(g) && !a(g)) break;
|
|
225
|
+
l = g;
|
|
221
226
|
}
|
|
222
227
|
l.remove();
|
|
223
228
|
}(e), !0;
|
|
224
229
|
}
|
|
225
|
-
function
|
|
230
|
+
function L(...n) {
|
|
226
231
|
const e = [];
|
|
227
232
|
for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
|
|
228
233
|
return e;
|
|
229
234
|
}
|
|
230
|
-
class
|
|
231
|
-
|
|
232
|
-
return "listitem"
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
class I extends P {
|
|
236
|
+
$config() {
|
|
237
|
+
return this.config("listitem", { $transform: (e) => {
|
|
238
|
+
if (e.__checked == null) return;
|
|
239
|
+
const t = e.getParent();
|
|
240
|
+
a(t) && t.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0);
|
|
241
|
+
}, extends: P, importDOM: Q({ li: () => ({ conversion: me, priority: 0 }) }) });
|
|
236
242
|
}
|
|
237
|
-
constructor(e, t, r) {
|
|
243
|
+
constructor(e = 1, t = void 0, r) {
|
|
238
244
|
super(r), this.__value = e === void 0 ? 1 : e, this.__checked = t;
|
|
239
245
|
}
|
|
246
|
+
afterCloneFrom(e) {
|
|
247
|
+
super.afterCloneFrom(e), this.__value = e.__value, this.__checked = e.__checked;
|
|
248
|
+
}
|
|
240
249
|
createDOM(e) {
|
|
241
250
|
const t = document.createElement("li");
|
|
242
251
|
return this.updateListItemDOM(null, t, e), t;
|
|
243
252
|
}
|
|
244
253
|
updateListItemDOM(e, t, r) {
|
|
245
254
|
const s = this.getParent();
|
|
246
|
-
a(s) && s.getListType() === "check" && function(c, l,
|
|
247
|
-
a(l.getFirstChild()) ? (c.removeAttribute("role"), c.removeAttribute("tabIndex"), c.removeAttribute("aria-checked")) : (c.setAttribute("role", "checkbox"), c.setAttribute("tabIndex", "-1"),
|
|
248
|
-
}(t, this, e), t.value = this.__value, function(c, l,
|
|
249
|
-
const
|
|
255
|
+
a(s) && s.getListType() === "check" && function(c, l, g, u) {
|
|
256
|
+
a(l.getFirstChild()) ? (c.removeAttribute("role"), c.removeAttribute("tabIndex"), c.removeAttribute("aria-checked")) : (c.setAttribute("role", "checkbox"), c.setAttribute("tabIndex", "-1"), g && l.__checked === g.__checked || c.setAttribute("aria-checked", l.getChecked() ? "true" : "false"));
|
|
257
|
+
}(t, this, e), t.value = this.__value, function(c, l, g) {
|
|
258
|
+
const u = [], f = [], d = l.list, S = d ? d.listitem : void 0;
|
|
250
259
|
let _;
|
|
251
|
-
if (d && d.nested && (_ = d.nested.listitem),
|
|
252
|
-
const
|
|
253
|
-
|
|
260
|
+
if (d && d.nested && (_ = d.nested.listitem), S !== void 0 && u.push(...L(S)), d) {
|
|
261
|
+
const v = g.getParent(), x = a(v) && v.getListType() === "check", D = g.getChecked();
|
|
262
|
+
x && !D || f.push(d.listitemUnchecked), x && D || f.push(d.listitemChecked), x && u.push(D ? d.listitemChecked : d.listitemUnchecked);
|
|
254
263
|
}
|
|
255
264
|
if (_ !== void 0) {
|
|
256
|
-
const
|
|
257
|
-
|
|
265
|
+
const v = L(_);
|
|
266
|
+
g.getChildren().some((x) => a(x)) ? u.push(...v) : f.push(...v);
|
|
258
267
|
}
|
|
259
|
-
f.length > 0 &&
|
|
268
|
+
f.length > 0 && q(c, ...f), u.length > 0 && G(c, ...u);
|
|
260
269
|
}(t, r.theme, this);
|
|
261
270
|
const i = e ? e.__style : "", o = this.__style;
|
|
262
|
-
i !== o && (o === "" ? t.removeAttribute("style") : t.style.cssText = o), function(c, l,
|
|
263
|
-
const
|
|
264
|
-
for (const f in
|
|
265
|
-
if (
|
|
271
|
+
i !== o && (o === "" ? t.removeAttribute("style") : t.style.cssText = o), function(c, l, g) {
|
|
272
|
+
const u = K(l.__textStyle);
|
|
273
|
+
for (const f in u) c.style.setProperty(`--listitem-marker-${f}`, u[f]);
|
|
274
|
+
if (g) for (const f in K(g.__textStyle)) f in u || c.style.removeProperty(`--listitem-marker-${f}`);
|
|
266
275
|
}(t, this, e);
|
|
267
276
|
}
|
|
268
277
|
updateDOM(e, t, r) {
|
|
269
278
|
const s = t;
|
|
270
279
|
return this.updateListItemDOM(e, s, r), !1;
|
|
271
280
|
}
|
|
272
|
-
static transform() {
|
|
273
|
-
return (e) => {
|
|
274
|
-
if (g(e) || y(144), e.__checked == null) return;
|
|
275
|
-
const t = e.getParent();
|
|
276
|
-
a(t) && t.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0);
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
static importDOM() {
|
|
280
|
-
return { li: () => ({ conversion: de, priority: 0 }) };
|
|
281
|
-
}
|
|
282
|
-
static importJSON(e) {
|
|
283
|
-
return m().updateFromJSON(e);
|
|
284
|
-
}
|
|
285
281
|
updateFromJSON(e) {
|
|
286
282
|
return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked);
|
|
287
283
|
}
|
|
@@ -297,7 +293,7 @@ class S extends G {
|
|
|
297
293
|
append(...e) {
|
|
298
294
|
for (let t = 0; t < e.length; t++) {
|
|
299
295
|
const r = e[t];
|
|
300
|
-
if (
|
|
296
|
+
if (k(r) && this.canMergeWith(r)) {
|
|
301
297
|
const s = r.getChildren();
|
|
302
298
|
this.append(...s), r.remove();
|
|
303
299
|
} else super.append(r);
|
|
@@ -305,7 +301,7 @@ class S extends G {
|
|
|
305
301
|
return this;
|
|
306
302
|
}
|
|
307
303
|
replace(e, t) {
|
|
308
|
-
if (
|
|
304
|
+
if (h(e)) return super.replace(e);
|
|
309
305
|
this.setIndent(0);
|
|
310
306
|
const r = this.getParentOrThrow();
|
|
311
307
|
if (!a(r)) return e;
|
|
@@ -320,13 +316,13 @@ class S extends G {
|
|
|
320
316
|
}
|
|
321
317
|
r.insertAfter(e), e.insertAfter(s);
|
|
322
318
|
}
|
|
323
|
-
return t && (
|
|
319
|
+
return t && (k(e) || T(139), this.getChildren().forEach((s) => {
|
|
324
320
|
e.append(s);
|
|
325
321
|
})), this.remove(), r.getChildrenSize() === 0 && r.remove(), e;
|
|
326
322
|
}
|
|
327
323
|
insertAfter(e, t = !0) {
|
|
328
324
|
const r = this.getParentOrThrow();
|
|
329
|
-
if (a(r) ||
|
|
325
|
+
if (a(r) || T(39), h(e)) return super.insertAfter(e, t);
|
|
330
326
|
const s = this.getNextSiblings();
|
|
331
327
|
if (r.insertAfter(e, t), s.length !== 0) {
|
|
332
328
|
const i = p(r.getListType());
|
|
@@ -336,16 +332,16 @@ class S extends G {
|
|
|
336
332
|
}
|
|
337
333
|
remove(e) {
|
|
338
334
|
const t = this.getPreviousSibling(), r = this.getNextSibling();
|
|
339
|
-
super.remove(e), t && r &&
|
|
335
|
+
super.remove(e), t && r && y(t) && y(r) && (B(t.getFirstChild(), r.getFirstChild()), r.remove());
|
|
340
336
|
}
|
|
341
337
|
insertNewAfter(e, t = !0) {
|
|
342
338
|
const r = m().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked() && void 0);
|
|
343
339
|
return this.insertAfter(r, t), r;
|
|
344
340
|
}
|
|
345
341
|
collapseAtStart(e) {
|
|
346
|
-
const t =
|
|
342
|
+
const t = A();
|
|
347
343
|
this.getChildren().forEach((o) => t.append(o));
|
|
348
|
-
const r = this.getParentOrThrow(), s = r.getParentOrThrow(), i =
|
|
344
|
+
const r = this.getParentOrThrow(), s = r.getParentOrThrow(), i = h(s);
|
|
349
345
|
if (r.getChildrenSize() === 1) if (i) r.remove(), s.select();
|
|
350
346
|
else {
|
|
351
347
|
r.insertBefore(t), r.remove();
|
|
@@ -380,26 +376,26 @@ class S extends G {
|
|
|
380
376
|
const e = this.getParent();
|
|
381
377
|
if (e === null || !this.isAttached()) return this.getLatest().__indent;
|
|
382
378
|
let t = e.getParentOrThrow(), r = 0;
|
|
383
|
-
for (;
|
|
379
|
+
for (; h(t); ) t = t.getParentOrThrow().getParentOrThrow(), r++;
|
|
384
380
|
return r;
|
|
385
381
|
}
|
|
386
382
|
setIndent(e) {
|
|
387
|
-
typeof e != "number" &&
|
|
383
|
+
typeof e != "number" && T(117), (e = Math.floor(e)) >= 0 || T(199);
|
|
388
384
|
let t = this.getIndent();
|
|
389
|
-
for (; t !== e; ) t < e ? (
|
|
385
|
+
for (; t !== e; ) t < e ? (fe(this), t++) : (de(this), t--);
|
|
390
386
|
return this;
|
|
391
387
|
}
|
|
392
388
|
canInsertAfter(e) {
|
|
393
|
-
return
|
|
389
|
+
return h(e);
|
|
394
390
|
}
|
|
395
391
|
canReplaceWith(e) {
|
|
396
|
-
return
|
|
392
|
+
return h(e);
|
|
397
393
|
}
|
|
398
394
|
canMergeWith(e) {
|
|
399
|
-
return
|
|
395
|
+
return h(e) || le(e);
|
|
400
396
|
}
|
|
401
397
|
extractWithChild(e, t) {
|
|
402
|
-
if (!
|
|
398
|
+
if (!F(t)) return !1;
|
|
403
399
|
const r = t.anchor.getNode(), s = t.focus.getNode();
|
|
404
400
|
return this.isParentOf(r) && this.isParentOf(s) && this.getTextContent().length === t.getTextContent().length;
|
|
405
401
|
}
|
|
@@ -413,47 +409,51 @@ class S extends G {
|
|
|
413
409
|
return !0;
|
|
414
410
|
}
|
|
415
411
|
}
|
|
416
|
-
function
|
|
412
|
+
function me(n) {
|
|
417
413
|
if (n.classList.contains("task-list-item")) {
|
|
418
|
-
for (const t of n.children) if (t.tagName === "INPUT") return
|
|
414
|
+
for (const t of n.children) if (t.tagName === "INPUT") return _e(t);
|
|
419
415
|
}
|
|
420
416
|
const e = n.getAttribute("aria-checked");
|
|
421
417
|
return { node: m(e === "true" || e !== "false" && void 0) };
|
|
422
418
|
}
|
|
423
|
-
function
|
|
419
|
+
function _e(n) {
|
|
424
420
|
return n.getAttribute("type") !== "checkbox" ? { node: null } : { node: m(n.hasAttribute("checked")) };
|
|
425
421
|
}
|
|
426
422
|
function m(n) {
|
|
427
|
-
return Y(new
|
|
423
|
+
return Y(new I(void 0, n));
|
|
428
424
|
}
|
|
429
|
-
function
|
|
430
|
-
return n instanceof
|
|
425
|
+
function h(n) {
|
|
426
|
+
return n instanceof I;
|
|
431
427
|
}
|
|
432
|
-
class
|
|
433
|
-
|
|
434
|
-
return "list"
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
428
|
+
class R extends P {
|
|
429
|
+
$config() {
|
|
430
|
+
return this.config("list", { $transform: (e) => {
|
|
431
|
+
(function(t) {
|
|
432
|
+
const r = t.getNextSibling();
|
|
433
|
+
a(r) && t.getListType() === r.getListType() && B(t, r);
|
|
434
|
+
})(e), re(e);
|
|
435
|
+
}, extends: P, importDOM: Q({ ol: () => ({ conversion: H, priority: 0 }), ul: () => ({ conversion: H, priority: 0 }) }) });
|
|
439
436
|
}
|
|
440
437
|
constructor(e = "number", t = 1, r) {
|
|
441
438
|
super(r);
|
|
442
|
-
const s =
|
|
439
|
+
const s = Te[e] || e;
|
|
443
440
|
this.__listType = s, this.__tag = s === "number" ? "ol" : "ul", this.__start = t;
|
|
444
441
|
}
|
|
442
|
+
afterCloneFrom(e) {
|
|
443
|
+
super.afterCloneFrom(e), this.__listType = e.__listType, this.__tag = e.__tag, this.__start = e.__start;
|
|
444
|
+
}
|
|
445
445
|
getTag() {
|
|
446
|
-
return this.__tag;
|
|
446
|
+
return this.getLatest().__tag;
|
|
447
447
|
}
|
|
448
448
|
setListType(e) {
|
|
449
449
|
const t = this.getWritable();
|
|
450
450
|
return t.__listType = e, t.__tag = e === "number" ? "ol" : "ul", t;
|
|
451
451
|
}
|
|
452
452
|
getListType() {
|
|
453
|
-
return this.__listType;
|
|
453
|
+
return this.getLatest().__listType;
|
|
454
454
|
}
|
|
455
455
|
getStart() {
|
|
456
|
-
return this.__start;
|
|
456
|
+
return this.getLatest().__start;
|
|
457
457
|
}
|
|
458
458
|
setStart(e) {
|
|
459
459
|
const t = this.getWritable();
|
|
@@ -461,35 +461,17 @@ class F extends G {
|
|
|
461
461
|
}
|
|
462
462
|
createDOM(e, t) {
|
|
463
463
|
const r = this.__tag, s = document.createElement(r);
|
|
464
|
-
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType,
|
|
464
|
+
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType, j(s, e.theme, this), s;
|
|
465
465
|
}
|
|
466
466
|
updateDOM(e, t, r) {
|
|
467
|
-
return e.__tag !== this.__tag || (
|
|
468
|
-
}
|
|
469
|
-
static transform() {
|
|
470
|
-
return (e) => {
|
|
471
|
-
a(e) || y(163), function(t) {
|
|
472
|
-
const r = t.getNextSibling();
|
|
473
|
-
a(r) && t.getListType() === r.getListType() && J(t, r);
|
|
474
|
-
}(e), function(t) {
|
|
475
|
-
const r = t.getListType() !== "check";
|
|
476
|
-
let s = t.getStart();
|
|
477
|
-
for (const i of t.getChildren()) g(i) && (i.getValue() !== s && i.setValue(s), r && i.getLatest().__checked != null && i.setChecked(void 0), a(i.getFirstChild()) || s++);
|
|
478
|
-
}(e);
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
static importDOM() {
|
|
482
|
-
return { ol: () => ({ conversion: Q, priority: 0 }), ul: () => ({ conversion: Q, priority: 0 }) };
|
|
483
|
-
}
|
|
484
|
-
static importJSON(e) {
|
|
485
|
-
return p().updateFromJSON(e);
|
|
467
|
+
return e.__tag !== this.__tag || (j(t, r.theme, this), !1);
|
|
486
468
|
}
|
|
487
469
|
updateFromJSON(e) {
|
|
488
470
|
return super.updateFromJSON(e).setListType(e.listType).setStart(e.start);
|
|
489
471
|
}
|
|
490
472
|
exportDOM(e) {
|
|
491
473
|
const t = this.createDOM(e._config, e);
|
|
492
|
-
return
|
|
474
|
+
return X(t) && (this.__start !== 1 && t.setAttribute("start", String(this.__start)), this.__listType === "check" && t.setAttribute("__lexicalListType", "check")), { element: t };
|
|
493
475
|
}
|
|
494
476
|
exportJSON() {
|
|
495
477
|
return { ...super.exportJSON(), listType: this.getListType(), start: this.getStart(), tag: this.getTag() };
|
|
@@ -504,113 +486,116 @@ class F extends G {
|
|
|
504
486
|
let s = r;
|
|
505
487
|
for (let i = 0; i < r.length; i++) {
|
|
506
488
|
const o = r[i];
|
|
507
|
-
|
|
489
|
+
h(o) || (s === r && (s = [...r]), s[i] = m().append(!k(o) || a(o) || o.isInline() ? o : oe(o.getTextContent())));
|
|
508
490
|
}
|
|
509
491
|
return super.splice(e, t, s);
|
|
510
492
|
}
|
|
511
493
|
extractWithChild(e) {
|
|
512
|
-
return
|
|
494
|
+
return h(e);
|
|
513
495
|
}
|
|
514
496
|
}
|
|
515
|
-
function
|
|
497
|
+
function j(n, e, t) {
|
|
516
498
|
const r = [], s = [], i = e.list;
|
|
517
499
|
if (i !== void 0) {
|
|
518
|
-
const o = i[`${t.__tag}Depth`] || [], c =
|
|
500
|
+
const o = i[`${t.__tag}Depth`] || [], c = E(t) - 1, l = c % o.length, g = o[l], u = i[t.__tag];
|
|
519
501
|
let f;
|
|
520
|
-
const d = i.nested,
|
|
521
|
-
if (d !== void 0 && d.list && (f = d.list),
|
|
522
|
-
r.push(...
|
|
502
|
+
const d = i.nested, S = i.checklist;
|
|
503
|
+
if (d !== void 0 && d.list && (f = d.list), u !== void 0 && r.push(u), S !== void 0 && t.__listType === "check" && r.push(S), g !== void 0) {
|
|
504
|
+
r.push(...L(g));
|
|
523
505
|
for (let _ = 0; _ < o.length; _++) _ !== l && s.push(t.__tag + _);
|
|
524
506
|
}
|
|
525
507
|
if (f !== void 0) {
|
|
526
|
-
const _ =
|
|
508
|
+
const _ = L(f);
|
|
527
509
|
c > 1 ? r.push(..._) : s.push(..._);
|
|
528
510
|
}
|
|
529
511
|
}
|
|
530
|
-
s.length > 0 &&
|
|
512
|
+
s.length > 0 && q(n, ...s), r.length > 0 && G(n, ...r);
|
|
531
513
|
}
|
|
532
|
-
function
|
|
514
|
+
function ye(n) {
|
|
533
515
|
const e = [];
|
|
534
516
|
for (let t = 0; t < n.length; t++) {
|
|
535
517
|
const r = n[t];
|
|
536
|
-
if (
|
|
518
|
+
if (h(r)) {
|
|
537
519
|
e.push(r);
|
|
538
520
|
const s = r.getChildren();
|
|
539
521
|
s.length > 1 && s.forEach((i) => {
|
|
540
|
-
a(i) && e.push(
|
|
522
|
+
a(i) && e.push(U(i));
|
|
541
523
|
});
|
|
542
|
-
} else e.push(
|
|
524
|
+
} else e.push(U(r));
|
|
543
525
|
}
|
|
544
526
|
return e;
|
|
545
527
|
}
|
|
546
|
-
function
|
|
528
|
+
function H(n) {
|
|
547
529
|
const e = n.nodeName.toLowerCase();
|
|
548
530
|
let t = null;
|
|
549
531
|
return e === "ol" ? t = p("number", n.start) : e === "ul" && (t = function(r) {
|
|
550
532
|
if (r.getAttribute("__lexicallisttype") === "check" || r.classList.contains("contains-task-list")) return !0;
|
|
551
|
-
for (const s of r.childNodes) if (
|
|
533
|
+
for (const s of r.childNodes) if (X(s) && s.hasAttribute("aria-checked")) return !0;
|
|
552
534
|
return !1;
|
|
553
|
-
}(n) ? p("check") : p("bullet")), { after:
|
|
535
|
+
}(n) ? p("check") : p("bullet")), { after: ye, node: t };
|
|
554
536
|
}
|
|
555
|
-
const
|
|
537
|
+
const Te = { ol: "number", ul: "bullet" };
|
|
556
538
|
function p(n = "number", e = 1) {
|
|
557
|
-
return Y(new
|
|
539
|
+
return Y(new R(n, e));
|
|
558
540
|
}
|
|
559
541
|
function a(n) {
|
|
560
|
-
return n instanceof
|
|
542
|
+
return n instanceof R;
|
|
561
543
|
}
|
|
562
|
-
const
|
|
563
|
-
function
|
|
564
|
-
return
|
|
544
|
+
const Ce = O("UPDATE_LIST_START_COMMAND"), Se = O("INSERT_UNORDERED_LIST_COMMAND"), ve = O("INSERT_ORDERED_LIST_COMMAND"), xe = O("REMOVE_LIST_COMMAND");
|
|
545
|
+
function Ne(n) {
|
|
546
|
+
return ne(n.registerCommand(ve, () => (V("number"), !0), b), n.registerCommand(Ce, (e) => {
|
|
547
|
+
const { listNodeKey: t, newStart: r } = e, s = he(t);
|
|
548
|
+
return !!a(s) && (s.getListType() === "number" && (s.setStart(r), re(s)), !0);
|
|
549
|
+
}, b), n.registerCommand(Se, () => (V("bullet"), !0), b), n.registerCommand(xe, () => (ue(), !0), b), n.registerCommand(ge, () => pe(), b), n.registerNodeTransform(I, (e) => {
|
|
565
550
|
const t = e.getFirstChild();
|
|
566
551
|
if (t) {
|
|
567
|
-
if (
|
|
552
|
+
if (ae(t)) {
|
|
568
553
|
const r = t.getStyle(), s = t.getFormat();
|
|
569
554
|
e.getTextStyle() !== r && e.setTextStyle(r), e.getTextFormat() !== s && e.setTextFormat(s);
|
|
570
555
|
}
|
|
571
556
|
} else {
|
|
572
|
-
const r =
|
|
573
|
-
|
|
557
|
+
const r = M();
|
|
558
|
+
F(r) && (r.style !== e.getTextStyle() || r.format !== e.getTextFormat()) && r.isCollapsed() && e.is(r.anchor.getNode()) && e.setTextStyle(r.style).setTextFormat(r.format);
|
|
574
559
|
}
|
|
575
|
-
}), n.registerNodeTransform(
|
|
560
|
+
}), n.registerNodeTransform(ce, (e) => {
|
|
576
561
|
const t = e.getParent();
|
|
577
|
-
if (
|
|
562
|
+
if (h(t) && e.is(t.getFirstChild())) {
|
|
578
563
|
const r = e.getStyle(), s = e.getFormat();
|
|
579
564
|
r === t.getTextStyle() && s === t.getTextFormat() || t.setTextStyle(r).setTextFormat(s);
|
|
580
565
|
}
|
|
581
566
|
}));
|
|
582
567
|
}
|
|
583
|
-
function
|
|
568
|
+
function Pe(n) {
|
|
584
569
|
const e = (t) => {
|
|
585
570
|
const r = t.getParent();
|
|
586
571
|
if (a(t.getFirstChild()) || !a(r)) return;
|
|
587
|
-
const s =
|
|
572
|
+
const s = se(t, (i) => h(i) && a(i.getParent()) && h(i.getPreviousSibling()));
|
|
588
573
|
if (s === null && t.getIndent() > 0) t.setIndent(0);
|
|
589
|
-
else if (
|
|
574
|
+
else if (h(s)) {
|
|
590
575
|
const i = s.getPreviousSibling();
|
|
591
|
-
if (
|
|
576
|
+
if (h(i)) {
|
|
592
577
|
const o = function(l) {
|
|
593
|
-
let
|
|
594
|
-
for (; a(
|
|
595
|
-
const f =
|
|
596
|
-
if (!
|
|
597
|
-
|
|
578
|
+
let g = l, u = g.getFirstChild();
|
|
579
|
+
for (; a(u); ) {
|
|
580
|
+
const f = u.getLastChild();
|
|
581
|
+
if (!h(f)) break;
|
|
582
|
+
g = f, u = g.getFirstChild();
|
|
598
583
|
}
|
|
599
|
-
return
|
|
584
|
+
return g;
|
|
600
585
|
}(i), c = o.getParent();
|
|
601
586
|
if (a(c)) {
|
|
602
|
-
const l =
|
|
603
|
-
l + 1 <
|
|
587
|
+
const l = E(c);
|
|
588
|
+
l + 1 < E(r) && t.setIndent(l);
|
|
604
589
|
}
|
|
605
590
|
}
|
|
606
591
|
}
|
|
607
592
|
};
|
|
608
|
-
return n.registerNodeTransform(
|
|
593
|
+
return n.registerNodeTransform(R, (t) => {
|
|
609
594
|
const r = [t];
|
|
610
595
|
for (; r.length > 0; ) {
|
|
611
596
|
const s = r.shift();
|
|
612
597
|
if (a(s)) {
|
|
613
|
-
for (const i of s.getChildren()) if (
|
|
598
|
+
for (const i of s.getChildren()) if (h(i)) {
|
|
614
599
|
e(i);
|
|
615
600
|
const o = i.getFirstChild();
|
|
616
601
|
a(o) && r.push(o);
|
|
@@ -620,15 +605,15 @@ function ke(n) {
|
|
|
620
605
|
});
|
|
621
606
|
}
|
|
622
607
|
export {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
608
|
+
ve as C,
|
|
609
|
+
Ne as S,
|
|
610
|
+
xe as T,
|
|
611
|
+
I as Y,
|
|
612
|
+
a,
|
|
613
|
+
p as c,
|
|
614
|
+
h as n,
|
|
615
|
+
R as r,
|
|
616
|
+
Pe as v,
|
|
617
|
+
Se as y
|
|
633
618
|
};
|
|
634
|
-
//# sourceMappingURL=LexicalList.prod-
|
|
619
|
+
//# sourceMappingURL=LexicalList.prod-BRwEushm.js.map
|