@uva-glass/component-library 3.26.0 → 3.26.2
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-DOV_uwol.js → Lexical.prod-m3GJsAAT.js} +4 -4
- package/dist/Lexical.prod-m3GJsAAT.js.map +1 -0
- package/dist/{LexicalClipboard.prod-DZgXdt_H.js → LexicalClipboard.prod-HyvHKdDm.js} +4 -4
- package/dist/{LexicalClipboard.prod-DZgXdt_H.js.map → LexicalClipboard.prod-HyvHKdDm.js.map} +1 -1
- package/dist/LexicalLink.prod-D0qasaVP.js +285 -0
- package/dist/LexicalLink.prod-D0qasaVP.js.map +1 -0
- package/dist/{LexicalList.prod-Dv48Tn54.js → LexicalList.prod-CQz14k_F.js} +193 -194
- package/dist/LexicalList.prod-CQz14k_F.js.map +1 -0
- package/dist/LexicalSelection.prod-Bh25dAig.js +101 -0
- package/dist/LexicalSelection.prod-Bh25dAig.js.map +1 -0
- package/dist/{LexicalTable.prod-M0HiIwBZ.js → LexicalTable.prod-BHKhA4PF.js} +5 -5
- package/dist/LexicalTable.prod-BHKhA4PF.js.map +1 -0
- package/dist/{LexicalUtils.prod-FOA8v2nU.js → LexicalUtils.prod-Vqqof-U-.js} +2 -2
- package/dist/{LexicalUtils.prod-FOA8v2nU.js.map → LexicalUtils.prod-Vqqof-U-.js.map} +1 -1
- package/dist/{TablePlugin-Bj5FObQ_.js → TablePlugin-CykqKW6X.js} +4 -4
- package/dist/{TablePlugin-Bj5FObQ_.js.map → TablePlugin-CykqKW6X.js.map} +1 -1
- package/dist/assets/CheckboxButtonBar.css +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.d.ts +3 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +38 -35
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +5 -4
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.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 +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +18 -18
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +10 -10
- 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/RteEditor.js +73 -73
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/{helpers-DxxBlpKs.js → helpers-5AryUrYu.js} +4 -4
- package/dist/{helpers-DxxBlpKs.js.map → helpers-5AryUrYu.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +10 -10
- package/dist/Lexical.prod-DOV_uwol.js.map +0 -1
- package/dist/LexicalLink.prod-XYC56-_H.js +0 -275
- package/dist/LexicalLink.prod-XYC56-_H.js.map +0 -1
- package/dist/LexicalList.prod-Dv48Tn54.js.map +0 -1
- package/dist/LexicalSelection.prod-DaoDqTxU.js +0 -97
- package/dist/LexicalSelection.prod-DaoDqTxU.js.map +0 -1
- package/dist/LexicalTable.prod-M0HiIwBZ.js.map +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { i as X, r as Z, j as re, w as ne, v as se } from "./LexicalUtils.prod-
|
|
2
|
-
import { f as q, u as
|
|
3
|
-
import { B } from "./LexicalSelection.prod-
|
|
4
|
-
function
|
|
1
|
+
import { i as X, r as Z, j as re, w as ne, v as se } from "./LexicalUtils.prod-Vqqof-U-.js";
|
|
2
|
+
import { f as q, u as G, X as ie, d as b, P as L, F as oe, c as N, e as H, o as D, J as le, Q as ce, N as I, a as ae, I as P, Z as O, r as Y, l as B, _ as R, j as W } from "./Lexical.prod-m3GJsAAT.js";
|
|
3
|
+
import { B as $ } from "./LexicalSelection.prod-Bh25dAig.js";
|
|
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 w(n) {
|
|
11
11
|
let e = 1, t = n.getParent();
|
|
12
12
|
for (; t != null; ) {
|
|
13
13
|
if (g(t)) {
|
|
14
14
|
const r = t.getParent();
|
|
15
|
-
if (
|
|
15
|
+
if (a(r)) {
|
|
16
16
|
e++, t = r.getParent();
|
|
17
17
|
continue;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
y(40);
|
|
20
20
|
}
|
|
21
21
|
return e;
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function E(n) {
|
|
26
26
|
let e = n.getParent();
|
|
27
|
-
|
|
27
|
+
a(e) || y(40);
|
|
28
28
|
let t = e;
|
|
29
|
-
for (; t !== null; ) t = t.getParent(),
|
|
29
|
+
for (; t !== null; ) t = t.getParent(), a(t) && (e = t);
|
|
30
30
|
return e;
|
|
31
31
|
}
|
|
32
32
|
function ee(n) {
|
|
@@ -34,43 +34,43 @@ function ee(n) {
|
|
|
34
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
|
-
|
|
37
|
+
a(i) ? e = e.concat(ee(i)) : e.push(s);
|
|
38
38
|
}
|
|
39
39
|
return e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return g(n) &&
|
|
41
|
+
function T(n) {
|
|
42
|
+
return g(n) && a(n.getFirstChild());
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
44
|
+
function K(n) {
|
|
45
|
+
return m().append(n);
|
|
46
46
|
}
|
|
47
47
|
function te(n, e) {
|
|
48
48
|
return g(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 = I();
|
|
52
52
|
if (e !== null) {
|
|
53
53
|
let t = e.getNodes();
|
|
54
|
-
if (
|
|
54
|
+
if (N(e)) {
|
|
55
55
|
const s = e.getStartEndPoints();
|
|
56
|
-
s === null &&
|
|
57
|
-
const [i] = s, o = i.getNode(),
|
|
58
|
-
if (
|
|
56
|
+
s === null && y(143);
|
|
57
|
+
const [i] = s, o = i.getNode(), c = o.getParent();
|
|
58
|
+
if (O(o)) {
|
|
59
59
|
const l = o.getFirstChild();
|
|
60
60
|
if (l) t = l.selectStart().getNodes();
|
|
61
61
|
else {
|
|
62
|
-
const u =
|
|
62
|
+
const u = L();
|
|
63
63
|
o.append(u), t = u.select().getNodes();
|
|
64
64
|
}
|
|
65
65
|
} else if (te(o, t)) {
|
|
66
|
-
const l =
|
|
67
|
-
if (
|
|
66
|
+
const l = p(n);
|
|
67
|
+
if (O(c)) {
|
|
68
68
|
o.replace(l);
|
|
69
|
-
const u =
|
|
70
|
-
|
|
69
|
+
const u = m();
|
|
70
|
+
b(o) && (u.setFormat(o.getFormatType()), u.setIndent(o.getIndent())), l.append(u);
|
|
71
71
|
} else if (g(o)) {
|
|
72
72
|
const u = o.getParentOrThrow();
|
|
73
|
-
|
|
73
|
+
C(l, u.getChildren()), u.replace(l);
|
|
74
74
|
}
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
@@ -78,24 +78,24 @@ function W(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
|
+
U(i, n);
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
|
-
let o =
|
|
85
|
+
let o = Y(i) ? i.getParent() : g(i) && i.isEmpty() ? i : null;
|
|
86
86
|
for (; o != null; ) {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
if (!r.has(
|
|
90
|
-
const l =
|
|
91
|
-
|
|
87
|
+
const c = o.getKey();
|
|
88
|
+
if (a(o)) {
|
|
89
|
+
if (!r.has(c)) {
|
|
90
|
+
const l = p(n);
|
|
91
|
+
C(l, o.getChildren()), o.replace(l), r.add(c);
|
|
92
92
|
}
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
{
|
|
96
96
|
const l = o.getParent();
|
|
97
|
-
if (
|
|
98
|
-
r.add(
|
|
97
|
+
if (O(l) && !r.has(c)) {
|
|
98
|
+
r.add(c), U(o, n);
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
o = l;
|
|
@@ -104,45 +104,45 @@ function W(n) {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function C(n, e) {
|
|
108
108
|
n.splice(n.getChildrenSize(), 0, e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
const t = n.getPreviousSibling(), r = n.getNextSibling(), s =
|
|
110
|
+
function U(n, e) {
|
|
111
|
+
if (a(n)) return n;
|
|
112
|
+
const t = n.getPreviousSibling(), r = n.getNextSibling(), s = m();
|
|
113
113
|
let i;
|
|
114
|
-
if (
|
|
115
|
-
else if (
|
|
114
|
+
if (C(s, n.getChildren()), a(t) && e === t.getListType()) t.append(s), a(r) && e === r.getListType() && (C(t, r.getChildren()), r.remove()), i = t;
|
|
115
|
+
else if (a(r) && e === r.getListType()) r.getFirstChildOrThrow().insertBefore(s), i = r;
|
|
116
116
|
else {
|
|
117
|
-
const o =
|
|
117
|
+
const o = p(e);
|
|
118
118
|
o.append(s), n.replace(o), i = o;
|
|
119
119
|
}
|
|
120
120
|
return s.setFormat(n.getFormatType()), s.setIndent(n.getIndent()), n.remove(), i;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function J(n, e) {
|
|
123
123
|
const t = n.getLastChild(), r = e.getFirstChild();
|
|
124
|
-
t && r &&
|
|
124
|
+
t && r && T(t) && T(r) && (J(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 = I();
|
|
130
|
+
if (N(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(E(r));
|
|
133
133
|
else for (let s = 0; s < t.length; s++) {
|
|
134
134
|
const i = t[s];
|
|
135
|
-
if (
|
|
136
|
-
const o = se(i,
|
|
137
|
-
o != null && e.add(
|
|
135
|
+
if (Y(i)) {
|
|
136
|
+
const o = se(i, S);
|
|
137
|
+
o != null && e.add(E(o));
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
for (const s of e) {
|
|
141
141
|
let i = s;
|
|
142
142
|
const o = ee(s);
|
|
143
|
-
for (const
|
|
144
|
-
const l =
|
|
145
|
-
|
|
143
|
+
for (const c of o) {
|
|
144
|
+
const l = L().setTextStyle(n.style).setTextFormat(n.format);
|
|
145
|
+
C(l, c.getChildren()), i.insertAfter(l), i = l, c.__key === n.anchor.key && B(n.anchor, R(W(l, "next"))), c.__key === n.focus.key && B(n.focus, R(W(l, "next"))), c.remove();
|
|
146
146
|
}
|
|
147
147
|
s.remove();
|
|
148
148
|
}
|
|
@@ -150,122 +150,137 @@ function ue() {
|
|
|
150
150
|
}
|
|
151
151
|
function ge(n) {
|
|
152
152
|
const e = /* @__PURE__ */ new Set();
|
|
153
|
-
if (
|
|
153
|
+
if (T(n) || e.has(n.getKey())) return;
|
|
154
154
|
const t = n.getParent(), r = n.getNextSibling(), s = n.getPreviousSibling();
|
|
155
|
-
if (
|
|
155
|
+
if (T(r) && T(s)) {
|
|
156
156
|
const i = s.getFirstChild();
|
|
157
|
-
if (
|
|
157
|
+
if (a(i)) {
|
|
158
158
|
i.append(n);
|
|
159
159
|
const o = r.getFirstChild();
|
|
160
|
-
|
|
160
|
+
a(o) && (C(i, o.getChildren()), r.remove(), e.add(r.getKey()));
|
|
161
161
|
}
|
|
162
|
-
} else if (
|
|
162
|
+
} else if (T(r)) {
|
|
163
163
|
const i = r.getFirstChild();
|
|
164
|
-
if (
|
|
164
|
+
if (a(i)) {
|
|
165
165
|
const o = i.getFirstChild();
|
|
166
166
|
o !== null && o.insertBefore(n);
|
|
167
167
|
}
|
|
168
|
-
} else if (
|
|
168
|
+
} else if (T(s)) {
|
|
169
169
|
const i = s.getFirstChild();
|
|
170
|
-
|
|
171
|
-
} else if (
|
|
172
|
-
const i =
|
|
170
|
+
a(i) && i.append(n);
|
|
171
|
+
} else if (a(t)) {
|
|
172
|
+
const i = m().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()), o = p(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());
|
|
173
173
|
i.append(o), o.append(n), s ? s.insertAfter(i) : r ? r.insertBefore(i) : t.append(i);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
function he(n) {
|
|
177
|
-
if (
|
|
177
|
+
if (T(n)) return;
|
|
178
178
|
const e = n.getParent(), t = e ? e.getParent() : void 0;
|
|
179
|
-
if (
|
|
179
|
+
if (a(t ? t.getParent() : void 0) && g(t) && a(e)) {
|
|
180
180
|
const r = e ? e.getFirstChild() : void 0, s = e ? e.getLastChild() : void 0;
|
|
181
181
|
if (n.is(r)) t.insertBefore(n), e.isEmpty() && t.remove();
|
|
182
182
|
else if (n.is(s)) t.insertAfter(n), e.isEmpty() && t.remove();
|
|
183
183
|
else {
|
|
184
|
-
const i = e.getListType(), o =
|
|
185
|
-
o.append(
|
|
186
|
-
const l =
|
|
187
|
-
l.append(u),
|
|
184
|
+
const i = e.getListType(), o = m(), c = p(i);
|
|
185
|
+
o.append(c), n.getPreviousSiblings().forEach((h) => c.append(h));
|
|
186
|
+
const l = m(), u = p(i);
|
|
187
|
+
l.append(u), C(u, n.getNextSiblings()), t.insertBefore(o), t.insertAfter(l), t.replace(n);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
function fe() {
|
|
192
|
-
const n =
|
|
193
|
-
if (!
|
|
192
|
+
const n = I();
|
|
193
|
+
if (!N(n) || !n.isCollapsed()) return !1;
|
|
194
194
|
const e = n.anchor.getNode();
|
|
195
195
|
if (!g(e) || e.getChildrenSize() !== 0) return !1;
|
|
196
|
-
const t =
|
|
197
|
-
|
|
196
|
+
const t = E(e), r = e.getParent();
|
|
197
|
+
a(r) || y(40);
|
|
198
198
|
const s = r.getParent();
|
|
199
199
|
let i;
|
|
200
|
-
if (
|
|
200
|
+
if (O(s)) i = L(), t.insertAfter(i);
|
|
201
201
|
else {
|
|
202
202
|
if (!g(s)) return !1;
|
|
203
|
-
i =
|
|
203
|
+
i = m(), s.insertAfter(i);
|
|
204
204
|
}
|
|
205
205
|
i.setTextStyle(n.style).setTextFormat(n.format).select();
|
|
206
206
|
const o = e.getNextSiblings();
|
|
207
207
|
if (o.length > 0) {
|
|
208
|
-
const
|
|
208
|
+
const c = p(r.getListType());
|
|
209
209
|
if (g(i)) {
|
|
210
|
-
const l =
|
|
211
|
-
l.append(
|
|
212
|
-
} else i.insertAfter(
|
|
213
|
-
|
|
210
|
+
const l = m();
|
|
211
|
+
l.append(c), i.insertAfter(l);
|
|
212
|
+
} else i.insertAfter(c);
|
|
213
|
+
c.append(...o);
|
|
214
214
|
}
|
|
215
|
-
return function(
|
|
216
|
-
let l =
|
|
215
|
+
return function(c) {
|
|
216
|
+
let l = c;
|
|
217
217
|
for (; l.getNextSibling() == null && l.getPreviousSibling() == null; ) {
|
|
218
218
|
const u = l.getParent();
|
|
219
|
-
if (u == null || !g(u) && !
|
|
219
|
+
if (u == null || !g(u) && !a(u)) break;
|
|
220
220
|
l = u;
|
|
221
221
|
}
|
|
222
222
|
l.remove();
|
|
223
223
|
}(e), !0;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function A(...n) {
|
|
226
226
|
const e = [];
|
|
227
227
|
for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
|
|
228
228
|
return e;
|
|
229
229
|
}
|
|
230
|
-
|
|
231
|
-
const r = B(e.__textStyle);
|
|
232
|
-
for (const s in r) n.style.setProperty(`--listitem-marker-${s}`, r[s]);
|
|
233
|
-
if (t) for (const s in B(t.__textStyle)) s in r || n.style.removeProperty(`--listitem-marker-${s}`);
|
|
234
|
-
}
|
|
235
|
-
class C extends q {
|
|
230
|
+
class S extends q {
|
|
236
231
|
static getType() {
|
|
237
232
|
return "listitem";
|
|
238
233
|
}
|
|
239
234
|
static clone(e) {
|
|
240
|
-
return new
|
|
235
|
+
return new S(e.__value, e.__checked, e.__key);
|
|
241
236
|
}
|
|
242
237
|
constructor(e, t, r) {
|
|
243
238
|
super(r), this.__value = e === void 0 ? 1 : e, this.__checked = t;
|
|
244
239
|
}
|
|
245
240
|
createDOM(e) {
|
|
246
|
-
const t = document.createElement("li")
|
|
247
|
-
|
|
248
|
-
const s = this.__style;
|
|
249
|
-
return s && (t.style.cssText = s), K(t, this, null), t;
|
|
241
|
+
const t = document.createElement("li");
|
|
242
|
+
return this.updateListItemDOM(null, t, e), t;
|
|
250
243
|
}
|
|
251
|
-
|
|
244
|
+
updateListItemDOM(e, t, r) {
|
|
252
245
|
const s = this.getParent();
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
246
|
+
a(s) && s.getListType() === "check" && function(c, l, u, h) {
|
|
247
|
+
a(l.getFirstChild()) ? (c.removeAttribute("role"), c.removeAttribute("tabIndex"), c.removeAttribute("aria-checked")) : (c.setAttribute("role", "checkbox"), c.setAttribute("tabIndex", "-1"), u && l.__checked === u.__checked || c.setAttribute("aria-checked", l.getChecked() ? "true" : "false"));
|
|
248
|
+
}(t, this, e), t.value = this.__value, function(c, l, u) {
|
|
249
|
+
const h = [], f = [], d = l.list, v = d ? d.listitem : void 0;
|
|
250
|
+
let _;
|
|
251
|
+
if (d && d.nested && (_ = d.nested.listitem), v !== void 0 && h.push(...A(v)), d) {
|
|
252
|
+
const x = u.getParent(), k = a(x) && x.getListType() === "check", M = u.getChecked();
|
|
253
|
+
k && !M || f.push(d.listitemUnchecked), k && M || f.push(d.listitemChecked), k && h.push(M ? d.listitemChecked : d.listitemUnchecked);
|
|
254
|
+
}
|
|
255
|
+
if (_ !== void 0) {
|
|
256
|
+
const x = A(_);
|
|
257
|
+
u.getChildren().some((k) => a(k)) ? h.push(...x) : f.push(...x);
|
|
258
|
+
}
|
|
259
|
+
f.length > 0 && X(c, ...f), h.length > 0 && Z(c, ...h);
|
|
260
|
+
}(t, r.theme, this);
|
|
261
|
+
const i = e ? e.__style : "", o = this.__style;
|
|
262
|
+
i !== o && (o === "" ? t.removeAttribute("style") : t.style.cssText = o), function(c, l, u) {
|
|
263
|
+
const h = $(l.__textStyle);
|
|
264
|
+
for (const f in h) c.style.setProperty(`--listitem-marker-${f}`, h[f]);
|
|
265
|
+
if (u) for (const f in $(u.__textStyle)) f in h || c.style.removeProperty(`--listitem-marker-${f}`);
|
|
266
|
+
}(t, this, e);
|
|
267
|
+
}
|
|
268
|
+
updateDOM(e, t, r) {
|
|
269
|
+
const s = t;
|
|
270
|
+
return this.updateListItemDOM(e, s, r), !1;
|
|
256
271
|
}
|
|
257
272
|
static transform() {
|
|
258
273
|
return (e) => {
|
|
259
|
-
if (g(e) ||
|
|
274
|
+
if (g(e) || y(144), e.__checked == null) return;
|
|
260
275
|
const t = e.getParent();
|
|
261
|
-
|
|
276
|
+
a(t) && t.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0);
|
|
262
277
|
};
|
|
263
278
|
}
|
|
264
279
|
static importDOM() {
|
|
265
280
|
return { li: () => ({ conversion: de, priority: 0 }) };
|
|
266
281
|
}
|
|
267
282
|
static importJSON(e) {
|
|
268
|
-
return
|
|
283
|
+
return m().updateFromJSON(e);
|
|
269
284
|
}
|
|
270
285
|
updateFromJSON(e) {
|
|
271
286
|
return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked);
|
|
@@ -282,7 +297,7 @@ class C extends q {
|
|
|
282
297
|
append(...e) {
|
|
283
298
|
for (let t = 0; t < e.length; t++) {
|
|
284
299
|
const r = e[t];
|
|
285
|
-
if (
|
|
300
|
+
if (b(r) && this.canMergeWith(r)) {
|
|
286
301
|
const s = r.getChildren();
|
|
287
302
|
this.append(...s), r.remove();
|
|
288
303
|
} else super.append(r);
|
|
@@ -293,11 +308,11 @@ class C extends q {
|
|
|
293
308
|
if (g(e)) return super.replace(e);
|
|
294
309
|
this.setIndent(0);
|
|
295
310
|
const r = this.getParentOrThrow();
|
|
296
|
-
if (!
|
|
311
|
+
if (!a(r)) return e;
|
|
297
312
|
if (r.__first === this.getKey()) r.insertBefore(e);
|
|
298
313
|
else if (r.__last === this.getKey()) r.insertAfter(e);
|
|
299
314
|
else {
|
|
300
|
-
const s =
|
|
315
|
+
const s = p(r.getListType());
|
|
301
316
|
let i = this.getNextSibling();
|
|
302
317
|
for (; i; ) {
|
|
303
318
|
const o = i;
|
|
@@ -305,37 +320,37 @@ class C extends q {
|
|
|
305
320
|
}
|
|
306
321
|
r.insertAfter(e), e.insertAfter(s);
|
|
307
322
|
}
|
|
308
|
-
return t && (
|
|
323
|
+
return t && (b(e) || y(139), this.getChildren().forEach((s) => {
|
|
309
324
|
e.append(s);
|
|
310
325
|
})), this.remove(), r.getChildrenSize() === 0 && r.remove(), e;
|
|
311
326
|
}
|
|
312
327
|
insertAfter(e, t = !0) {
|
|
313
328
|
const r = this.getParentOrThrow();
|
|
314
|
-
if (
|
|
329
|
+
if (a(r) || y(39), g(e)) return super.insertAfter(e, t);
|
|
315
330
|
const s = this.getNextSiblings();
|
|
316
331
|
if (r.insertAfter(e, t), s.length !== 0) {
|
|
317
|
-
const i =
|
|
332
|
+
const i = p(r.getListType());
|
|
318
333
|
s.forEach((o) => i.append(o)), e.insertAfter(i, t);
|
|
319
334
|
}
|
|
320
335
|
return e;
|
|
321
336
|
}
|
|
322
337
|
remove(e) {
|
|
323
338
|
const t = this.getPreviousSibling(), r = this.getNextSibling();
|
|
324
|
-
super.remove(e), t && r &&
|
|
339
|
+
super.remove(e), t && r && T(t) && T(r) && (J(t.getFirstChild(), r.getFirstChild()), r.remove());
|
|
325
340
|
}
|
|
326
341
|
insertNewAfter(e, t = !0) {
|
|
327
|
-
const r =
|
|
342
|
+
const r = m().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked() && void 0);
|
|
328
343
|
return this.insertAfter(r, t), r;
|
|
329
344
|
}
|
|
330
345
|
collapseAtStart(e) {
|
|
331
|
-
const t =
|
|
346
|
+
const t = L();
|
|
332
347
|
this.getChildren().forEach((o) => t.append(o));
|
|
333
348
|
const r = this.getParentOrThrow(), s = r.getParentOrThrow(), i = g(s);
|
|
334
349
|
if (r.getChildrenSize() === 1) if (i) r.remove(), s.select();
|
|
335
350
|
else {
|
|
336
351
|
r.insertBefore(t), r.remove();
|
|
337
|
-
const o = e.anchor,
|
|
338
|
-
o.type === "element" && o.getNode().is(this) && o.set(l, o.offset, "element"),
|
|
352
|
+
const o = e.anchor, c = e.focus, l = t.getKey();
|
|
353
|
+
o.type === "element" && o.getNode().is(this) && o.set(l, o.offset, "element"), c.type === "element" && c.getNode().is(this) && c.set(l, c.offset, "element");
|
|
339
354
|
}
|
|
340
355
|
else r.insertBefore(t), this.remove();
|
|
341
356
|
return !0;
|
|
@@ -351,7 +366,7 @@ class C extends q {
|
|
|
351
366
|
const e = this.getLatest();
|
|
352
367
|
let t;
|
|
353
368
|
const r = this.getParent();
|
|
354
|
-
return
|
|
369
|
+
return a(r) && (t = r.getListType()), t === "check" ? !!e.__checked : void 0;
|
|
355
370
|
}
|
|
356
371
|
setChecked(e) {
|
|
357
372
|
const t = this.getWritable();
|
|
@@ -369,7 +384,7 @@ class C extends q {
|
|
|
369
384
|
return r;
|
|
370
385
|
}
|
|
371
386
|
setIndent(e) {
|
|
372
|
-
typeof e != "number" &&
|
|
387
|
+
typeof e != "number" && y(117), (e = Math.floor(e)) >= 0 || y(199);
|
|
373
388
|
let t = this.getIndent();
|
|
374
389
|
for (; t !== e; ) t < e ? (ge(this), t++) : (he(this), t--);
|
|
375
390
|
return this;
|
|
@@ -384,7 +399,7 @@ class C extends q {
|
|
|
384
399
|
return g(e) || oe(e);
|
|
385
400
|
}
|
|
386
401
|
extractWithChild(e, t) {
|
|
387
|
-
if (!
|
|
402
|
+
if (!N(t)) return !1;
|
|
388
403
|
const r = t.anchor.getNode(), s = t.focus.getNode();
|
|
389
404
|
return this.isParentOf(r) && this.isParentOf(s) && this.getTextContent().length === t.getTextContent().length;
|
|
390
405
|
}
|
|
@@ -392,51 +407,35 @@ class C extends q {
|
|
|
392
407
|
return !0;
|
|
393
408
|
}
|
|
394
409
|
createParentElementNode() {
|
|
395
|
-
return
|
|
410
|
+
return p("bullet");
|
|
396
411
|
}
|
|
397
412
|
canMergeWhenEmpty() {
|
|
398
413
|
return !0;
|
|
399
414
|
}
|
|
400
415
|
}
|
|
401
|
-
function V(n, e, t) {
|
|
402
|
-
const r = [], s = [], i = e.list, o = i ? i.listitem : void 0;
|
|
403
|
-
let a;
|
|
404
|
-
if (i && i.nested && (a = i.nested.listitem), o !== void 0 && r.push(...N(o)), i) {
|
|
405
|
-
const l = t.getParent(), u = c(l) && l.getListType() === "check", d = t.getChecked();
|
|
406
|
-
u && !d || s.push(i.listitemUnchecked), u && d || s.push(i.listitemChecked), u && r.push(d ? i.listitemChecked : i.listitemUnchecked);
|
|
407
|
-
}
|
|
408
|
-
if (a !== void 0) {
|
|
409
|
-
const l = N(a);
|
|
410
|
-
t.getChildren().some((u) => c(u)) ? r.push(...l) : s.push(...l);
|
|
411
|
-
}
|
|
412
|
-
s.length > 0 && X(n, ...s), r.length > 0 && Z(n, ...r);
|
|
413
|
-
}
|
|
414
|
-
function U(n, e, t, r) {
|
|
415
|
-
c(e.getFirstChild()) ? (n.removeAttribute("role"), n.removeAttribute("tabIndex"), n.removeAttribute("aria-checked")) : (n.setAttribute("role", "checkbox"), n.setAttribute("tabIndex", "-1"), t && e.__checked === t.__checked || n.setAttribute("aria-checked", e.getChecked() ? "true" : "false"));
|
|
416
|
-
}
|
|
417
416
|
function de(n) {
|
|
418
417
|
if (n.classList.contains("task-list-item")) {
|
|
419
418
|
for (const t of n.children) if (t.tagName === "INPUT") return pe(t);
|
|
420
419
|
}
|
|
421
420
|
const e = n.getAttribute("aria-checked");
|
|
422
|
-
return { node:
|
|
421
|
+
return { node: m(e === "true" || e !== "false" && void 0) };
|
|
423
422
|
}
|
|
424
423
|
function pe(n) {
|
|
425
|
-
return n.getAttribute("type") !== "checkbox" ? { node: null } : { node:
|
|
424
|
+
return n.getAttribute("type") !== "checkbox" ? { node: null } : { node: m(n.hasAttribute("checked")) };
|
|
426
425
|
}
|
|
427
|
-
function
|
|
428
|
-
return
|
|
426
|
+
function m(n) {
|
|
427
|
+
return H(new S(void 0, n));
|
|
429
428
|
}
|
|
430
429
|
function g(n) {
|
|
431
|
-
return n instanceof
|
|
430
|
+
return n instanceof S;
|
|
432
431
|
}
|
|
433
|
-
class
|
|
432
|
+
class F extends q {
|
|
434
433
|
static getType() {
|
|
435
434
|
return "list";
|
|
436
435
|
}
|
|
437
436
|
static clone(e) {
|
|
438
437
|
const t = e.__listType || Q[e.__tag];
|
|
439
|
-
return new
|
|
438
|
+
return new F(t, e.__start, e.__key);
|
|
440
439
|
}
|
|
441
440
|
constructor(e = "number", t = 1, r) {
|
|
442
441
|
super(r);
|
|
@@ -469,13 +468,13 @@ class x extends q {
|
|
|
469
468
|
}
|
|
470
469
|
static transform() {
|
|
471
470
|
return (e) => {
|
|
472
|
-
|
|
471
|
+
a(e) || y(163), function(t) {
|
|
473
472
|
const r = t.getNextSibling();
|
|
474
|
-
|
|
473
|
+
a(r) && t.getListType() === r.getListType() && J(t, r);
|
|
475
474
|
}(e), function(t) {
|
|
476
475
|
const r = t.getListType() !== "check";
|
|
477
476
|
let s = t.getStart();
|
|
478
|
-
for (const i of t.getChildren()) g(i) && (i.getValue() !== s && i.setValue(s), r && i.getLatest().__checked != null && i.setChecked(void 0),
|
|
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++);
|
|
479
478
|
}(e);
|
|
480
479
|
};
|
|
481
480
|
}
|
|
@@ -483,14 +482,14 @@ class x extends q {
|
|
|
483
482
|
return { ol: () => ({ conversion: j, priority: 0 }), ul: () => ({ conversion: j, priority: 0 }) };
|
|
484
483
|
}
|
|
485
484
|
static importJSON(e) {
|
|
486
|
-
return
|
|
485
|
+
return p().updateFromJSON(e);
|
|
487
486
|
}
|
|
488
487
|
updateFromJSON(e) {
|
|
489
488
|
return super.updateFromJSON(e).setListType(e.listType).setStart(e.start);
|
|
490
489
|
}
|
|
491
490
|
exportDOM(e) {
|
|
492
491
|
const t = this.createDOM(e._config, e);
|
|
493
|
-
return
|
|
492
|
+
return G(t) && (this.__start !== 1 && t.setAttribute("start", String(this.__start)), this.__listType === "check" && t.setAttribute("__lexicalListType", "check")), { element: t };
|
|
494
493
|
}
|
|
495
494
|
exportJSON() {
|
|
496
495
|
return { ...super.exportJSON(), listType: this.getListType(), start: this.getStart(), tag: this.getTag() };
|
|
@@ -505,7 +504,7 @@ class x extends q {
|
|
|
505
504
|
let s = r;
|
|
506
505
|
for (let i = 0; i < r.length; i++) {
|
|
507
506
|
const o = r[i];
|
|
508
|
-
g(o) || (s === r && (s = [...r]), s[i] =
|
|
507
|
+
g(o) || (s === r && (s = [...r]), s[i] = m().append(!b(o) || a(o) || o.isInline() ? o : ie(o.getTextContent())));
|
|
509
508
|
}
|
|
510
509
|
return super.splice(e, t, s);
|
|
511
510
|
}
|
|
@@ -516,16 +515,16 @@ class x extends q {
|
|
|
516
515
|
function z(n, e, t) {
|
|
517
516
|
const r = [], s = [], i = e.list;
|
|
518
517
|
if (i !== void 0) {
|
|
519
|
-
const o = i[`${t.__tag}Depth`] || [],
|
|
520
|
-
let
|
|
521
|
-
const
|
|
522
|
-
if (
|
|
523
|
-
r.push(...
|
|
518
|
+
const o = i[`${t.__tag}Depth`] || [], c = w(t) - 1, l = c % o.length, u = o[l], h = i[t.__tag];
|
|
519
|
+
let f;
|
|
520
|
+
const d = i.nested, v = i.checklist;
|
|
521
|
+
if (d !== void 0 && d.list && (f = d.list), h !== void 0 && r.push(h), v !== void 0 && t.__listType === "check" && r.push(v), u !== void 0) {
|
|
522
|
+
r.push(...A(u));
|
|
524
523
|
for (let _ = 0; _ < o.length; _++) _ !== l && s.push(t.__tag + _);
|
|
525
524
|
}
|
|
526
|
-
if (
|
|
527
|
-
const _ =
|
|
528
|
-
|
|
525
|
+
if (f !== void 0) {
|
|
526
|
+
const _ = A(f);
|
|
527
|
+
c > 1 ? r.push(..._) : s.push(..._);
|
|
529
528
|
}
|
|
530
529
|
}
|
|
531
530
|
s.length > 0 && X(n, ...s), r.length > 0 && Z(n, ...r);
|
|
@@ -538,31 +537,31 @@ function me(n) {
|
|
|
538
537
|
e.push(r);
|
|
539
538
|
const s = r.getChildren();
|
|
540
539
|
s.length > 1 && s.forEach((i) => {
|
|
541
|
-
|
|
540
|
+
a(i) && e.push(K(i));
|
|
542
541
|
});
|
|
543
|
-
} else e.push(
|
|
542
|
+
} else e.push(K(r));
|
|
544
543
|
}
|
|
545
544
|
return e;
|
|
546
545
|
}
|
|
547
546
|
function j(n) {
|
|
548
547
|
const e = n.nodeName.toLowerCase();
|
|
549
548
|
let t = null;
|
|
550
|
-
return e === "ol" ? t =
|
|
549
|
+
return e === "ol" ? t = p("number", n.start) : e === "ul" && (t = function(r) {
|
|
551
550
|
if (r.getAttribute("__lexicallisttype") === "check" || r.classList.contains("contains-task-list")) return !0;
|
|
552
|
-
for (const s of r.childNodes) if (
|
|
551
|
+
for (const s of r.childNodes) if (G(s) && s.hasAttribute("aria-checked")) return !0;
|
|
553
552
|
return !1;
|
|
554
|
-
}(n) ?
|
|
553
|
+
}(n) ? p("check") : p("bullet")), { after: me, node: t };
|
|
555
554
|
}
|
|
556
555
|
const Q = { ol: "number", ul: "bullet" };
|
|
557
|
-
function
|
|
558
|
-
return
|
|
556
|
+
function p(n = "number", e = 1) {
|
|
557
|
+
return H(new F(n, e));
|
|
559
558
|
}
|
|
560
|
-
function
|
|
561
|
-
return n instanceof
|
|
559
|
+
function a(n) {
|
|
560
|
+
return n instanceof F;
|
|
562
561
|
}
|
|
563
|
-
const _e =
|
|
562
|
+
const _e = D("INSERT_UNORDERED_LIST_COMMAND"), ye = D("INSERT_ORDERED_LIST_COMMAND"), Te = D("REMOVE_LIST_COMMAND");
|
|
564
563
|
function xe(n) {
|
|
565
|
-
return re(n.registerCommand(ye, () => (
|
|
564
|
+
return re(n.registerCommand(ye, () => (V("number"), !0), P), n.registerCommand(_e, () => (V("bullet"), !0), P), n.registerCommand(Te, () => (ue(), !0), P), n.registerCommand(ae, () => fe(), P), n.registerNodeTransform(S, (e) => {
|
|
566
565
|
const t = e.getFirstChild();
|
|
567
566
|
if (t) {
|
|
568
567
|
if (ce(t)) {
|
|
@@ -570,8 +569,8 @@ function xe(n) {
|
|
|
570
569
|
e.getTextStyle() !== r && e.setTextStyle(r), e.getTextFormat() !== s && e.setTextFormat(s);
|
|
571
570
|
}
|
|
572
571
|
} else {
|
|
573
|
-
const r =
|
|
574
|
-
|
|
572
|
+
const r = I();
|
|
573
|
+
N(r) && (r.style !== e.getTextStyle() || r.format !== e.getTextFormat()) && r.isCollapsed() && e.is(r.anchor.getNode()) && e.setTextStyle(r.style).setTextFormat(r.format);
|
|
575
574
|
}
|
|
576
575
|
}), n.registerNodeTransform(le, (e) => {
|
|
577
576
|
const t = e.getParent();
|
|
@@ -584,52 +583,52 @@ function xe(n) {
|
|
|
584
583
|
function ke(n) {
|
|
585
584
|
const e = (t) => {
|
|
586
585
|
const r = t.getParent();
|
|
587
|
-
if (
|
|
588
|
-
const s = ne(t, (i) => g(i) &&
|
|
586
|
+
if (a(t.getFirstChild()) || !a(r)) return;
|
|
587
|
+
const s = ne(t, (i) => g(i) && a(i.getParent()) && g(i.getPreviousSibling()));
|
|
589
588
|
if (s === null && t.getIndent() > 0) t.setIndent(0);
|
|
590
589
|
else if (g(s)) {
|
|
591
590
|
const i = s.getPreviousSibling();
|
|
592
591
|
if (g(i)) {
|
|
593
592
|
const o = function(l) {
|
|
594
|
-
let u = l,
|
|
595
|
-
for (;
|
|
596
|
-
const
|
|
597
|
-
if (!g(
|
|
598
|
-
u =
|
|
593
|
+
let u = l, h = u.getFirstChild();
|
|
594
|
+
for (; a(h); ) {
|
|
595
|
+
const f = h.getLastChild();
|
|
596
|
+
if (!g(f)) break;
|
|
597
|
+
u = f, h = u.getFirstChild();
|
|
599
598
|
}
|
|
600
599
|
return u;
|
|
601
|
-
}(i),
|
|
602
|
-
if (c
|
|
603
|
-
const l =
|
|
604
|
-
l + 1 <
|
|
600
|
+
}(i), c = o.getParent();
|
|
601
|
+
if (a(c)) {
|
|
602
|
+
const l = w(c);
|
|
603
|
+
l + 1 < w(r) && t.setIndent(l);
|
|
605
604
|
}
|
|
606
605
|
}
|
|
607
606
|
}
|
|
608
607
|
};
|
|
609
|
-
return n.registerNodeTransform(
|
|
608
|
+
return n.registerNodeTransform(F, (t) => {
|
|
610
609
|
const r = [t];
|
|
611
610
|
for (; r.length > 0; ) {
|
|
612
611
|
const s = r.shift();
|
|
613
|
-
if (
|
|
612
|
+
if (a(s)) {
|
|
614
613
|
for (const i of s.getChildren()) if (g(i)) {
|
|
615
614
|
e(i);
|
|
616
615
|
const o = i.getFirstChild();
|
|
617
|
-
|
|
616
|
+
a(o) && r.push(o);
|
|
618
617
|
}
|
|
619
618
|
}
|
|
620
619
|
}
|
|
621
620
|
});
|
|
622
621
|
}
|
|
623
622
|
export {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
623
|
+
g as Z,
|
|
624
|
+
xe as _,
|
|
625
|
+
_e as f,
|
|
626
|
+
S as j,
|
|
627
|
+
Te as m,
|
|
628
|
+
a as o,
|
|
629
|
+
ye as p,
|
|
630
|
+
p as s,
|
|
631
|
+
F as t,
|
|
632
|
+
ke as y
|
|
634
633
|
};
|
|
635
|
-
//# sourceMappingURL=LexicalList.prod-
|
|
634
|
+
//# sourceMappingURL=LexicalList.prod-CQz14k_F.js.map
|