@uva-glass/component-library 3.47.6 → 3.47.8
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-nXWuyOKD.js → Lexical.prod-DBU6xTBY.js} +1397 -1279
- package/dist/Lexical.prod-DBU6xTBY.js.map +1 -0
- package/dist/LexicalClipboard.prod-CzGBnMdD.js +272 -0
- package/dist/LexicalClipboard.prod-CzGBnMdD.js.map +1 -0
- package/dist/LexicalLink.prod-DV9kT537.js +1027 -0
- package/dist/LexicalLink.prod-DV9kT537.js.map +1 -0
- package/dist/{LexicalList.prod--mkvX0uW.js → LexicalList.prod-2UfLUgO1.js} +159 -154
- package/dist/LexicalList.prod-2UfLUgO1.js.map +1 -0
- package/dist/LexicalSelection.prod-C1JYA_go.js +114 -0
- package/dist/LexicalSelection.prod-C1JYA_go.js.map +1 -0
- package/dist/LexicalTable.prod-CZ1mYUR-.js +1802 -0
- package/dist/LexicalTable.prod-CZ1mYUR-.js.map +1 -0
- package/dist/LexicalUtils.prod-C3vvQk50.js +114 -0
- package/dist/LexicalUtils.prod-C3vvQk50.js.map +1 -0
- package/dist/{TableCellResizerPlugin-Cpbankb8.js → TableCellResizerPlugin-CxFy7dbe.js} +53 -53
- package/dist/TableCellResizerPlugin-CxFy7dbe.js.map +1 -0
- package/dist/{TablePlugin-CfXPNfT8.js → TablePlugin-CfTWvWk1.js} +59 -59
- package/dist/{TablePlugin-CfXPNfT8.js.map → TablePlugin-CfTWvWk1.js.map} +1 -1
- package/dist/{WeekSelector.module-CTDcqKel.js → WeekSelector.module-P6WOVdLX.js} +12 -12
- package/dist/WeekSelector.module-P6WOVdLX.js.map +1 -0
- package/dist/assets/WeekSelector.css +1 -1
- package/dist/client--GsCJ9Up.js +27328 -0
- package/dist/client--GsCJ9Up.js.map +1 -0
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.test.js +3 -3
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.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 +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- 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 +6 -6
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +9 -9
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +35 -35
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +9 -5
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +40 -40
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- 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 +25 -25
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +19 -19
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +671 -627
- 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 +19 -19
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/TextArea/TextArea.test.js +2 -2
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/WeekSelector/WeekSelector.js +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorButton.js +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOption.js +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOptionContainer.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{index-D5qpMB9d.js → index-Bf2LCbD1.js} +2 -2
- package/dist/{index-D5qpMB9d.js.map → index-Bf2LCbD1.js.map} +1 -1
- package/dist/{index-rQE9MV9y.js → index-JOHbZ4si.js} +523 -523
- package/dist/{index-rQE9MV9y.js.map → index-JOHbZ4si.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-DXfB7ZX7.js → react-18-BHQltW8V.js} +2 -2
- package/dist/{react-18-DXfB7ZX7.js.map → react-18-BHQltW8V.js.map} +1 -1
- package/dist/{react.esm-D2ppoNuM.js → react.esm-Bg7Fh9lz.js} +3 -3
- package/dist/{react.esm-D2ppoNuM.js.map → react.esm-Bg7Fh9lz.js.map} +1 -1
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +1 -1
- package/package.json +20 -20
- package/dist/Lexical.prod-nXWuyOKD.js.map +0 -1
- package/dist/LexicalClipboard.prod-pXq91TBU.js +0 -276
- package/dist/LexicalClipboard.prod-pXq91TBU.js.map +0 -1
- package/dist/LexicalLink.prod-Brzpgs_K.js +0 -285
- package/dist/LexicalLink.prod-Brzpgs_K.js.map +0 -1
- package/dist/LexicalList.prod--mkvX0uW.js.map +0 -1
- package/dist/LexicalSelection.prod-Ct4PZOht.js +0 -119
- package/dist/LexicalSelection.prod-Ct4PZOht.js.map +0 -1
- package/dist/LexicalTable.prod-Bexd4dGG.js +0 -1763
- package/dist/LexicalTable.prod-Bexd4dGG.js.map +0 -1
- package/dist/LexicalUtils.prod-Ckfw0Hjt.js +0 -123
- package/dist/LexicalUtils.prod-Ckfw0Hjt.js.map +0 -1
- package/dist/TableCellResizerPlugin-Cpbankb8.js.map +0 -1
- package/dist/WeekSelector.module-CTDcqKel.js.map +0 -1
- package/dist/client-BK9NlSVR.js +0 -25208
- package/dist/client-BK9NlSVR.js.map +0 -1
- package/dist/helpers-mE437H2Y.js +0 -164
- package/dist/helpers-mE437H2Y.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
1
|
+
import { u as Z, l as q, U as re, w as ne } from "./LexicalUtils.prod-C3vvQk50.js";
|
|
2
|
+
import { g as P, k as j, d as G, t as se, _ as k, M as L, O as ie, f as b, r as Q, Z as A, U as oe, e as le, a as O, o as ce, P as x, u as ae, b as ge, c as F, i as X, h as R, x as U, H as W } from "./Lexical.prod-DBU6xTBY.js";
|
|
3
|
+
import { F as J } from "./LexicalSelection.prod-C1JYA_go.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);
|
|
@@ -16,7 +16,7 @@ function E(n) {
|
|
|
16
16
|
e++, t = r.getParent();
|
|
17
17
|
continue;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
y(40);
|
|
20
20
|
}
|
|
21
21
|
return e;
|
|
22
22
|
}
|
|
@@ -24,53 +24,53 @@ function E(n) {
|
|
|
24
24
|
}
|
|
25
25
|
function D(n) {
|
|
26
26
|
let e = n.getParent();
|
|
27
|
-
a(e) ||
|
|
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 Y(n) {
|
|
33
33
|
let e = [];
|
|
34
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
|
-
a(i) ? e = e.concat(
|
|
37
|
+
a(i) ? e = e.concat(Y(i)) : e.push(s);
|
|
38
38
|
}
|
|
39
39
|
return e;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function m(n) {
|
|
42
42
|
return h(n) && a(n.getFirstChild());
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
44
|
+
function B(n) {
|
|
45
|
+
return _().append(n);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function ee(n, e) {
|
|
48
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 K(n) {
|
|
51
|
+
const e = O();
|
|
52
52
|
if (e !== null) {
|
|
53
53
|
let t = e.getNodes();
|
|
54
|
-
if (
|
|
54
|
+
if (b(e)) {
|
|
55
55
|
const s = e.getStartEndPoints();
|
|
56
|
-
s === null &&
|
|
56
|
+
s === null && y(143);
|
|
57
57
|
const [i] = s, o = i.getNode(), c = o.getParent();
|
|
58
|
-
if (
|
|
58
|
+
if (F(o)) {
|
|
59
59
|
const l = o.getFirstChild();
|
|
60
60
|
if (l) t = l.selectStart().getNodes();
|
|
61
61
|
else {
|
|
62
|
-
const g =
|
|
62
|
+
const g = L();
|
|
63
63
|
o.append(g), t = g.select().getNodes();
|
|
64
64
|
}
|
|
65
|
-
} else if (
|
|
65
|
+
} else if (ee(o, t)) {
|
|
66
66
|
const l = p(n);
|
|
67
|
-
if (
|
|
67
|
+
if (F(c)) {
|
|
68
68
|
o.replace(l);
|
|
69
|
-
const g =
|
|
69
|
+
const g = _();
|
|
70
70
|
k(o) && (g.setFormat(o.getFormatType()), g.setIndent(o.getIndent())), l.append(g);
|
|
71
71
|
} else if (h(o)) {
|
|
72
72
|
const g = o.getParentOrThrow();
|
|
73
|
-
|
|
73
|
+
T(l, g.getChildren()), g.replace(l);
|
|
74
74
|
}
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
@@ -79,23 +79,23 @@ function V(n) {
|
|
|
79
79
|
for (let s = 0; s < t.length; s++) {
|
|
80
80
|
const i = t[s];
|
|
81
81
|
if (k(i) && i.isEmpty() && !h(i) && !r.has(i.getKey())) {
|
|
82
|
-
|
|
82
|
+
V(i, n);
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
|
-
let o =
|
|
85
|
+
let o = X(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)) {
|
|
89
89
|
if (!r.has(c)) {
|
|
90
90
|
const l = p(n);
|
|
91
|
-
|
|
91
|
+
T(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(c),
|
|
97
|
+
if (F(l) && !r.has(c)) {
|
|
98
|
+
r.add(c), V(o, n);
|
|
99
99
|
break;
|
|
100
100
|
}
|
|
101
101
|
o = l;
|
|
@@ -104,14 +104,14 @@ function V(n) {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function T(n, e) {
|
|
108
108
|
n.splice(n.getChildrenSize(), 0, e);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function V(n, e) {
|
|
111
111
|
if (a(n)) return n;
|
|
112
|
-
const t = n.getPreviousSibling(), r = n.getNextSibling(), s =
|
|
112
|
+
const t = n.getPreviousSibling(), r = n.getNextSibling(), s = _();
|
|
113
113
|
let i;
|
|
114
|
-
if (
|
|
114
|
+
if (T(s, n.getChildren()), a(t) && e === t.getListType()) t.append(s), a(r) && e === r.getListType() && (T(t, r.getChildren()), r.remove()), i = t;
|
|
115
115
|
else if (a(r) && e === r.getListType()) r.getFirstChildOrThrow().insertBefore(s), i = r;
|
|
116
116
|
else {
|
|
117
117
|
const o = p(e);
|
|
@@ -119,100 +119,100 @@ function z(n, e) {
|
|
|
119
119
|
}
|
|
120
120
|
return s.setFormat(n.getFormatType()), s.setIndent(n.getIndent()), n.remove(), i;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function w(n, e) {
|
|
123
123
|
const t = n.getLastChild(), r = e.getFirstChild();
|
|
124
|
-
t && r &&
|
|
124
|
+
t && r && m(t) && m(r) && (w(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
|
|
129
|
-
const n =
|
|
130
|
-
if (
|
|
128
|
+
function he() {
|
|
129
|
+
const n = O();
|
|
130
|
+
if (b(n)) {
|
|
131
131
|
const e = /* @__PURE__ */ new Set(), t = n.getNodes(), r = n.anchor.getNode();
|
|
132
|
-
if (
|
|
132
|
+
if (ee(r, t)) e.add(D(r));
|
|
133
133
|
else for (let s = 0; s < t.length; s++) {
|
|
134
134
|
const i = t[s];
|
|
135
|
-
if (
|
|
136
|
-
const o =
|
|
135
|
+
if (X(i)) {
|
|
136
|
+
const o = ne(i, M);
|
|
137
137
|
o != null && e.add(D(o));
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
for (const s of e) {
|
|
141
141
|
let i = s;
|
|
142
|
-
const o =
|
|
142
|
+
const o = Y(s);
|
|
143
143
|
for (const c of o) {
|
|
144
|
-
const l =
|
|
145
|
-
|
|
144
|
+
const l = L().setTextStyle(n.style).setTextFormat(n.format);
|
|
145
|
+
T(l, c.getChildren()), i.insertAfter(l), i = l, c.__key === n.anchor.key && R(n.anchor, U(W(l, "next"))), c.__key === n.focus.key && R(n.focus, U(W(l, "next"))), c.remove();
|
|
146
146
|
}
|
|
147
147
|
s.remove();
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function te(n) {
|
|
152
152
|
const e = n.getListType() !== "check";
|
|
153
153
|
let t = n.getStart();
|
|
154
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
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function ue(n) {
|
|
157
157
|
const e = /* @__PURE__ */ new Set();
|
|
158
|
-
if (
|
|
158
|
+
if (m(n) || e.has(n.getKey())) return;
|
|
159
159
|
const t = n.getParent(), r = n.getNextSibling(), s = n.getPreviousSibling();
|
|
160
|
-
if (
|
|
160
|
+
if (m(r) && m(s)) {
|
|
161
161
|
const i = s.getFirstChild();
|
|
162
162
|
if (a(i)) {
|
|
163
163
|
i.append(n);
|
|
164
164
|
const o = r.getFirstChild();
|
|
165
|
-
a(o) && (
|
|
165
|
+
a(o) && (T(i, o.getChildren()), r.remove(), e.add(r.getKey()));
|
|
166
166
|
}
|
|
167
|
-
} else if (
|
|
167
|
+
} else if (m(r)) {
|
|
168
168
|
const i = r.getFirstChild();
|
|
169
169
|
if (a(i)) {
|
|
170
170
|
const o = i.getFirstChild();
|
|
171
171
|
o !== null && o.insertBefore(n);
|
|
172
172
|
}
|
|
173
|
-
} else if (
|
|
173
|
+
} else if (m(s)) {
|
|
174
174
|
const i = s.getFirstChild();
|
|
175
175
|
a(i) && i.append(n);
|
|
176
176
|
} else if (a(t)) {
|
|
177
|
-
const i =
|
|
177
|
+
const i = _().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()), o = p(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());
|
|
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
|
|
182
|
-
if (
|
|
181
|
+
function fe(n) {
|
|
182
|
+
if (m(n)) return;
|
|
183
183
|
const e = n.getParent(), t = e ? e.getParent() : void 0;
|
|
184
184
|
if (a(t ? t.getParent() : void 0) && h(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
|
-
const i = e.getListType(), o =
|
|
190
|
-
o.append(c), n.getPreviousSiblings().forEach((
|
|
191
|
-
const l =
|
|
192
|
-
l.append(g),
|
|
189
|
+
const i = e.getListType(), o = _(), c = p(i);
|
|
190
|
+
o.append(c), n.getPreviousSiblings().forEach((u) => c.append(u));
|
|
191
|
+
const l = _(), g = p(i);
|
|
192
|
+
l.append(g), T(g, n.getNextSiblings()), t.insertBefore(o), t.insertAfter(l), t.replace(n);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
function
|
|
197
|
-
const n =
|
|
198
|
-
if (!
|
|
196
|
+
function de() {
|
|
197
|
+
const n = O();
|
|
198
|
+
if (!b(n) || !n.isCollapsed()) return !1;
|
|
199
199
|
const e = n.anchor.getNode();
|
|
200
200
|
if (!h(e) || e.getChildrenSize() !== 0) return !1;
|
|
201
201
|
const t = D(e), r = e.getParent();
|
|
202
|
-
a(r) ||
|
|
202
|
+
a(r) || y(40);
|
|
203
203
|
const s = r.getParent();
|
|
204
204
|
let i;
|
|
205
|
-
if (
|
|
205
|
+
if (F(s)) i = L(), t.insertAfter(i);
|
|
206
206
|
else {
|
|
207
207
|
if (!h(s)) return !1;
|
|
208
|
-
i =
|
|
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
214
|
if (h(i)) {
|
|
215
|
-
const l =
|
|
215
|
+
const l = _();
|
|
216
216
|
l.append(c), i.insertAfter(l);
|
|
217
217
|
} else i.insertAfter(c);
|
|
218
218
|
c.append(...o);
|
|
@@ -227,18 +227,20 @@ function pe() {
|
|
|
227
227
|
l.remove();
|
|
228
228
|
})(e), !0;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function N(...n) {
|
|
231
231
|
const e = [];
|
|
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 M extends P {
|
|
236
|
+
__value;
|
|
237
|
+
__checked;
|
|
236
238
|
$config() {
|
|
237
239
|
return this.config("listitem", { $transform: (e) => {
|
|
238
240
|
if (e.__checked == null) return;
|
|
239
241
|
const t = e.getParent();
|
|
240
242
|
a(t) && t.getListType() !== "check" && e.getChecked() != null && e.setChecked(void 0);
|
|
241
|
-
}, extends: P, importDOM:
|
|
243
|
+
}, extends: P, importDOM: j({ li: () => ({ conversion: pe, priority: 0 }) }) });
|
|
242
244
|
}
|
|
243
245
|
constructor(e = 1, t = void 0, r) {
|
|
244
246
|
super(r), this.__value = e === void 0 ? 1 : e, this.__checked = t;
|
|
@@ -251,27 +253,27 @@ class I extends P {
|
|
|
251
253
|
return this.updateListItemDOM(null, t, e), t;
|
|
252
254
|
}
|
|
253
255
|
updateListItemDOM(e, t, r) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
a(
|
|
257
|
-
})(t, this, e), t.value = this.__value, (function(c, l
|
|
258
|
-
const
|
|
259
|
-
let
|
|
260
|
-
if (
|
|
261
|
-
const
|
|
262
|
-
|
|
256
|
+
(function(o, c, l) {
|
|
257
|
+
const g = c.getParent();
|
|
258
|
+
!a(g) || g.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
|
+
})(t, this, e), t.value = this.__value, (function(o, c, l) {
|
|
260
|
+
const g = [], u = [], f = c.list, C = f ? f.listitem : void 0;
|
|
261
|
+
let S;
|
|
262
|
+
if (f && f.nested && (S = f.nested.listitem), C !== void 0 && g.push(...N(C)), f) {
|
|
263
|
+
const d = l.getParent(), v = a(d) && d.getListType() === "check", I = l.getChecked();
|
|
264
|
+
v && !I || u.push(f.listitemUnchecked), v && I || u.push(f.listitemChecked), v && g.push(I ? f.listitemChecked : f.listitemUnchecked);
|
|
263
265
|
}
|
|
264
|
-
if (
|
|
265
|
-
const
|
|
266
|
-
|
|
266
|
+
if (S !== void 0) {
|
|
267
|
+
const d = N(S);
|
|
268
|
+
l.getChildren().some((v) => a(v)) ? g.push(...d) : u.push(...d);
|
|
267
269
|
}
|
|
268
|
-
|
|
270
|
+
u.length > 0 && Z(o, ...u), g.length > 0 && q(o, ...g);
|
|
269
271
|
})(t, r.theme, this);
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
for (const
|
|
274
|
-
if (
|
|
272
|
+
const s = e ? e.__style : "", i = this.__style;
|
|
273
|
+
s !== i && (i === "" ? t.removeAttribute("style") : t.style.cssText = i), (function(o, c, l) {
|
|
274
|
+
const g = J(c.__textStyle);
|
|
275
|
+
for (const u in g) o.style.setProperty(`--listitem-marker-${u}`, g[u]);
|
|
276
|
+
if (l) for (const u in J(l.__textStyle)) u in g || o.style.removeProperty(`--listitem-marker-${u}`);
|
|
275
277
|
})(t, this, e);
|
|
276
278
|
}
|
|
277
279
|
updateDOM(e, t, r) {
|
|
@@ -316,31 +318,31 @@ class I extends P {
|
|
|
316
318
|
}
|
|
317
319
|
r.insertAfter(e), e.insertAfter(s);
|
|
318
320
|
}
|
|
319
|
-
return t && (k(e) ||
|
|
321
|
+
return t && (k(e) || y(139), this.getChildren().forEach((s) => {
|
|
320
322
|
e.append(s);
|
|
321
|
-
}))
|
|
323
|
+
})), this.remove(), r.getChildrenSize() === 0 && r.remove(), e;
|
|
322
324
|
}
|
|
323
325
|
insertAfter(e, t = !0) {
|
|
324
326
|
const r = this.getParentOrThrow();
|
|
325
|
-
if (a(r) ||
|
|
327
|
+
if (a(r) || y(39), h(e)) return super.insertAfter(e, t);
|
|
326
328
|
const s = this.getNextSiblings();
|
|
327
329
|
if (r.insertAfter(e, t), s.length !== 0) {
|
|
328
330
|
const i = p(r.getListType());
|
|
329
|
-
s.forEach((
|
|
331
|
+
s.forEach((o) => i.append(o)), e.insertAfter(i, t);
|
|
330
332
|
}
|
|
331
333
|
return e;
|
|
332
334
|
}
|
|
333
335
|
remove(e) {
|
|
334
336
|
const t = this.getPreviousSibling(), r = this.getNextSibling();
|
|
335
|
-
super.remove(e), t && r &&
|
|
337
|
+
super.remove(e), t && r && m(t) && m(r) && (w(t.getFirstChild(), r.getFirstChild()), r.remove());
|
|
336
338
|
}
|
|
337
339
|
insertNewAfter(e, t = !0) {
|
|
338
|
-
const r =
|
|
340
|
+
const r = _().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked() && void 0);
|
|
339
341
|
return this.insertAfter(r, t), r;
|
|
340
342
|
}
|
|
341
343
|
collapseAtStart(e) {
|
|
342
|
-
const t =
|
|
343
|
-
this.getChildren().forEach((
|
|
344
|
+
const t = L();
|
|
345
|
+
this.getChildren().forEach((o) => t.append(o));
|
|
344
346
|
const r = this.getParentOrThrow(), s = r.getParentOrThrow(), i = h(s);
|
|
345
347
|
if (r.getChildrenSize() === 1) if (i) r.remove(), s.select();
|
|
346
348
|
else {
|
|
@@ -380,9 +382,9 @@ class I extends P {
|
|
|
380
382
|
return r;
|
|
381
383
|
}
|
|
382
384
|
setIndent(e) {
|
|
383
|
-
typeof e != "number" &&
|
|
385
|
+
typeof e != "number" && y(117), (e = Math.floor(e)) >= 0 || y(199);
|
|
384
386
|
let t = this.getIndent();
|
|
385
|
-
for (; t !== e; ) t < e ? (
|
|
387
|
+
for (; t !== e; ) t < e ? (ue(this), t++) : (fe(this), t--);
|
|
386
388
|
return this;
|
|
387
389
|
}
|
|
388
390
|
canInsertAfter(e) {
|
|
@@ -392,10 +394,10 @@ class I extends P {
|
|
|
392
394
|
return h(e);
|
|
393
395
|
}
|
|
394
396
|
canMergeWith(e) {
|
|
395
|
-
return h(e) ||
|
|
397
|
+
return h(e) || ie(e);
|
|
396
398
|
}
|
|
397
399
|
extractWithChild(e, t) {
|
|
398
|
-
if (!
|
|
400
|
+
if (!b(t)) return !1;
|
|
399
401
|
const r = t.anchor.getNode(), s = t.focus.getNode();
|
|
400
402
|
return this.isParentOf(r) && this.isParentOf(s) && this.getTextContent().length === t.getTextContent().length;
|
|
401
403
|
}
|
|
@@ -409,34 +411,37 @@ class I extends P {
|
|
|
409
411
|
return !0;
|
|
410
412
|
}
|
|
411
413
|
}
|
|
412
|
-
function
|
|
414
|
+
function pe(n) {
|
|
413
415
|
if (n.classList.contains("task-list-item")) {
|
|
414
416
|
for (const t of n.children) if (t.tagName === "INPUT") return _e(t);
|
|
415
417
|
}
|
|
416
418
|
const e = n.getAttribute("aria-checked");
|
|
417
|
-
return { node:
|
|
419
|
+
return { node: _(e === "true" || e !== "false" && void 0) };
|
|
418
420
|
}
|
|
419
421
|
function _e(n) {
|
|
420
|
-
return n.getAttribute("type") !== "checkbox" ? { node: null } : { node:
|
|
422
|
+
return n.getAttribute("type") !== "checkbox" ? { node: null } : { node: _(n.hasAttribute("checked")) };
|
|
421
423
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
424
|
+
function _(n) {
|
|
425
|
+
return Q(new M(void 0, n));
|
|
424
426
|
}
|
|
425
427
|
function h(n) {
|
|
426
|
-
return n instanceof
|
|
428
|
+
return n instanceof M;
|
|
427
429
|
}
|
|
428
|
-
class
|
|
430
|
+
class $ extends P {
|
|
431
|
+
__tag;
|
|
432
|
+
__start;
|
|
433
|
+
__listType;
|
|
429
434
|
$config() {
|
|
430
435
|
return this.config("list", { $transform: (e) => {
|
|
431
436
|
(function(t) {
|
|
432
437
|
const r = t.getNextSibling();
|
|
433
|
-
a(r) && t.getListType() === r.getListType() &&
|
|
434
|
-
})(e),
|
|
435
|
-
}, extends: P, importDOM:
|
|
438
|
+
a(r) && t.getListType() === r.getListType() && w(t, r);
|
|
439
|
+
})(e), te(e);
|
|
440
|
+
}, extends: P, importDOM: j({ ol: () => ({ conversion: H, priority: 0 }), ul: () => ({ conversion: H, priority: 0 }) }) });
|
|
436
441
|
}
|
|
437
442
|
constructor(e = "number", t = 1, r) {
|
|
438
443
|
super(r);
|
|
439
|
-
const s =
|
|
444
|
+
const s = ye[e] || e;
|
|
440
445
|
this.__listType = s, this.__tag = s === "number" ? "ol" : "ul", this.__start = t;
|
|
441
446
|
}
|
|
442
447
|
afterCloneFrom(e) {
|
|
@@ -461,17 +466,17 @@ class B extends P {
|
|
|
461
466
|
}
|
|
462
467
|
createDOM(e, t) {
|
|
463
468
|
const r = this.__tag, s = document.createElement(r);
|
|
464
|
-
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType,
|
|
469
|
+
return this.__start !== 1 && s.setAttribute("start", String(this.__start)), s.__lexicalListType = this.__listType, z(s, e.theme, this), s;
|
|
465
470
|
}
|
|
466
471
|
updateDOM(e, t, r) {
|
|
467
|
-
return e.__tag !== this.__tag || (
|
|
472
|
+
return e.__tag !== this.__tag || e.__listType !== this.__listType || (z(t, r.theme, this), !1);
|
|
468
473
|
}
|
|
469
474
|
updateFromJSON(e) {
|
|
470
475
|
return super.updateFromJSON(e).setListType(e.listType).setStart(e.start);
|
|
471
476
|
}
|
|
472
477
|
exportDOM(e) {
|
|
473
478
|
const t = this.createDOM(e._config, e);
|
|
474
|
-
return
|
|
479
|
+
return G(t) && (this.__start !== 1 && t.setAttribute("start", String(this.__start)), this.__listType === "check" && t.setAttribute("__lexicalListType", "check")), { element: t };
|
|
475
480
|
}
|
|
476
481
|
exportJSON() {
|
|
477
482
|
return { ...super.exportJSON(), listType: this.getListType(), start: this.getStart(), tag: this.getTag() };
|
|
@@ -486,7 +491,7 @@ class B extends P {
|
|
|
486
491
|
let s = r;
|
|
487
492
|
for (let i = 0; i < r.length; i++) {
|
|
488
493
|
const o = r[i];
|
|
489
|
-
h(o) || (s === r && (s = [...r]), s[i] =
|
|
494
|
+
h(o) || (s === r && (s = [...r]), s[i] = _().append(!k(o) || a(o) || o.isInline() ? o : se(o.getTextContent())));
|
|
490
495
|
}
|
|
491
496
|
return super.splice(e, t, s);
|
|
492
497
|
}
|
|
@@ -494,82 +499,82 @@ class B extends P {
|
|
|
494
499
|
return h(e);
|
|
495
500
|
}
|
|
496
501
|
}
|
|
497
|
-
function
|
|
502
|
+
function z(n, e, t) {
|
|
498
503
|
const r = [], s = [], i = e.list;
|
|
499
504
|
if (i !== void 0) {
|
|
500
505
|
const o = i[`${t.__tag}Depth`] || [], c = E(t) - 1, l = c % o.length, g = o[l], u = i[t.__tag];
|
|
501
506
|
let f;
|
|
502
|
-
const
|
|
503
|
-
if (
|
|
504
|
-
r.push(...
|
|
505
|
-
for (let
|
|
507
|
+
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), g !== void 0) {
|
|
509
|
+
r.push(...N(g));
|
|
510
|
+
for (let d = 0; d < o.length; d++) d !== l && s.push(t.__tag + d);
|
|
506
511
|
}
|
|
507
512
|
if (f !== void 0) {
|
|
508
|
-
const
|
|
509
|
-
c > 1 ? r.push(...
|
|
513
|
+
const d = N(f);
|
|
514
|
+
c > 1 ? r.push(...d) : s.push(...d);
|
|
510
515
|
}
|
|
511
516
|
}
|
|
512
517
|
s.length > 0 && Z(n, ...s), r.length > 0 && q(n, ...r);
|
|
513
518
|
}
|
|
514
|
-
function
|
|
519
|
+
function me(n) {
|
|
515
520
|
const e = [];
|
|
516
521
|
for (let t = 0; t < n.length; t++) {
|
|
517
522
|
const r = n[t];
|
|
518
523
|
if (h(r)) {
|
|
519
524
|
e.push(r);
|
|
520
525
|
const s = r.getChildren();
|
|
521
|
-
s.length > 1 && s.forEach((
|
|
522
|
-
a(i) && e.push(
|
|
523
|
-
})
|
|
524
|
-
} else e.push(
|
|
526
|
+
s.length > 1 && s.forEach((i) => {
|
|
527
|
+
a(i) && e.push(B(i));
|
|
528
|
+
});
|
|
529
|
+
} else e.push(B(r));
|
|
525
530
|
}
|
|
526
531
|
return e;
|
|
527
532
|
}
|
|
528
|
-
function
|
|
533
|
+
function H(n) {
|
|
529
534
|
const e = n.nodeName.toLowerCase();
|
|
530
535
|
let t = null;
|
|
531
536
|
return e === "ol" ? t = p("number", n.start) : e === "ul" && (t = (function(r) {
|
|
532
537
|
if (r.getAttribute("__lexicallisttype") === "check" || r.classList.contains("contains-task-list")) return !0;
|
|
533
|
-
for (const s of r.childNodes) if (
|
|
538
|
+
for (const s of r.childNodes) if (G(s) && s.hasAttribute("aria-checked")) return !0;
|
|
534
539
|
return !1;
|
|
535
|
-
})(n) ? p("check") : p("bullet")), { after:
|
|
540
|
+
})(n) ? p("check") : p("bullet")), { after: me, node: t };
|
|
536
541
|
}
|
|
537
|
-
const
|
|
542
|
+
const ye = { ol: "number", ul: "bullet" };
|
|
538
543
|
function p(n = "number", e = 1) {
|
|
539
|
-
return
|
|
544
|
+
return Q(new $(n, e));
|
|
540
545
|
}
|
|
541
546
|
function a(n) {
|
|
542
|
-
return n instanceof
|
|
547
|
+
return n instanceof $;
|
|
543
548
|
}
|
|
544
|
-
const
|
|
545
|
-
function
|
|
546
|
-
return
|
|
547
|
-
const { listNodeKey: t, newStart: r } = e, s =
|
|
548
|
-
return !!a(s) && (s.getListType() === "number" && (s.setStart(r),
|
|
549
|
-
}
|
|
549
|
+
const Te = A("UPDATE_LIST_START_COMMAND"), Ce = A("INSERT_UNORDERED_LIST_COMMAND"), Se = A("INSERT_ORDERED_LIST_COMMAND"), ve = A("REMOVE_LIST_COMMAND");
|
|
550
|
+
function Fe(n) {
|
|
551
|
+
return re(n.registerCommand(Se, () => (K("number"), !0), x), n.registerCommand(Te, (e) => {
|
|
552
|
+
const { listNodeKey: t, newStart: r } = e, s = ae(t);
|
|
553
|
+
return !!a(s) && (s.getListType() === "number" && (s.setStart(r), te(s)), !0);
|
|
554
|
+
}, x), n.registerCommand(Ce, () => (K("bullet"), !0), x), n.registerCommand(ve, () => (he(), !0), x), n.registerCommand(ce, () => de(), x), n.registerNodeTransform(M, (e) => {
|
|
550
555
|
const t = e.getFirstChild();
|
|
551
556
|
if (t) {
|
|
552
|
-
if (
|
|
557
|
+
if (le(t)) {
|
|
553
558
|
const r = t.getStyle(), s = t.getFormat();
|
|
554
559
|
e.getTextStyle() !== r && e.setTextStyle(r), e.getTextFormat() !== s && e.setTextFormat(s);
|
|
555
560
|
}
|
|
556
561
|
} else {
|
|
557
|
-
const r =
|
|
558
|
-
|
|
562
|
+
const r = O();
|
|
563
|
+
b(r) && (r.style !== e.getTextStyle() || r.format !== e.getTextFormat()) && r.isCollapsed() && e.is(r.anchor.getNode()) && e.setTextStyle(r.style).setTextFormat(r.format);
|
|
559
564
|
}
|
|
560
|
-
})
|
|
565
|
+
}), n.registerNodeTransform(oe, (e) => {
|
|
561
566
|
const t = e.getParent();
|
|
562
567
|
if (h(t) && e.is(t.getFirstChild())) {
|
|
563
568
|
const r = e.getStyle(), s = e.getFormat();
|
|
564
569
|
r === t.getTextStyle() && s === t.getTextFormat() || t.setTextStyle(r).setTextFormat(s);
|
|
565
570
|
}
|
|
566
|
-
}))
|
|
571
|
+
}));
|
|
567
572
|
}
|
|
568
573
|
function Pe(n) {
|
|
569
574
|
const e = (t) => {
|
|
570
575
|
const r = t.getParent();
|
|
571
576
|
if (a(t.getFirstChild()) || !a(r)) return;
|
|
572
|
-
const s =
|
|
577
|
+
const s = ge(t, (i) => h(i) && a(i.getParent()) && h(i.getPreviousSibling()));
|
|
573
578
|
if (s === null && t.getIndent() > 0) t.setIndent(0);
|
|
574
579
|
else if (h(s)) {
|
|
575
580
|
const i = s.getPreviousSibling();
|
|
@@ -590,7 +595,7 @@ function Pe(n) {
|
|
|
590
595
|
}
|
|
591
596
|
}
|
|
592
597
|
};
|
|
593
|
-
return n.registerNodeTransform(
|
|
598
|
+
return n.registerNodeTransform($, (t) => {
|
|
594
599
|
const r = [t];
|
|
595
600
|
for (; r.length > 0; ) {
|
|
596
601
|
const s = r.shift();
|
|
@@ -602,18 +607,18 @@ function Pe(n) {
|
|
|
602
607
|
}
|
|
603
608
|
}
|
|
604
609
|
}
|
|
605
|
-
})
|
|
610
|
+
});
|
|
606
611
|
}
|
|
607
612
|
export {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
Se as
|
|
613
|
+
Pe as L,
|
|
614
|
+
Ce as S,
|
|
615
|
+
Fe as b,
|
|
616
|
+
a as d,
|
|
617
|
+
p as h,
|
|
618
|
+
ve as k,
|
|
619
|
+
$ as l,
|
|
620
|
+
M as n,
|
|
621
|
+
h as o,
|
|
622
|
+
Se as x
|
|
618
623
|
};
|
|
619
|
-
//# sourceMappingURL=LexicalList.prod
|
|
624
|
+
//# sourceMappingURL=LexicalList.prod-2UfLUgO1.js.map
|