@uva-glass/component-library 3.14.1 → 3.15.0
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-D8x7Ii0F.js → Lexical.prod-qoFV025v.js} +1831 -1858
- package/dist/Lexical.prod-qoFV025v.js.map +1 -0
- package/dist/LexicalClipboard.prod-BFJoO5qv.js +255 -0
- package/dist/LexicalClipboard.prod-BFJoO5qv.js.map +1 -0
- package/dist/{LexicalLink.prod-CkldFE8u.js → LexicalLink.prod-BIN12UMz.js} +47 -47
- package/dist/{LexicalLink.prod-CkldFE8u.js.map → LexicalLink.prod-BIN12UMz.js.map} +1 -1
- package/dist/{LexicalList.prod-CsVDXdmw.js → LexicalList.prod-WlGaeo0L.js} +71 -71
- package/dist/LexicalList.prod-WlGaeo0L.js.map +1 -0
- package/dist/LexicalSelection.prod-B5grbYgk.js +97 -0
- package/dist/LexicalSelection.prod-B5grbYgk.js.map +1 -0
- package/dist/{LexicalTable.prod-rZbTmo9K.js → LexicalTable.prod-osQj1CQX.js} +551 -550
- package/dist/LexicalTable.prod-osQj1CQX.js.map +1 -0
- package/dist/{LexicalUtils.prod-CpMJ4I9h.js → LexicalUtils.prod-BpZsS7jD.js} +29 -29
- package/dist/{LexicalUtils.prod-CpMJ4I9h.js.map → LexicalUtils.prod-BpZsS7jD.js.map} +1 -1
- package/dist/{TablePlugin-WOgWan8s.js → TablePlugin-6tDdOCQy.js} +10 -10
- package/dist/{TablePlugin-WOgWan8s.js.map → TablePlugin-6tDdOCQy.js.map} +1 -1
- package/dist/assets/PageOverlay.css +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/PageOverlay/PageOverlay.js +31 -31
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- 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 +33 -33
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +24 -24
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- 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 +14 -14
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +20 -20
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +451 -450
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/Timeline/Timeline.test.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-E_SsILnP.js → helpers-5RvdadYU.js} +25 -25
- package/dist/{helpers-E_SsILnP.js.map → helpers-5RvdadYU.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -7
- package/dist/Lexical.prod-D8x7Ii0F.js.map +0 -1
- package/dist/LexicalClipboard.prod-D5GjiArS.js +0 -255
- package/dist/LexicalClipboard.prod-D5GjiArS.js.map +0 -1
- package/dist/LexicalList.prod-CsVDXdmw.js.map +0 -1
- package/dist/LexicalSelection.prod-JQDTaUpX.js +0 -90
- package/dist/LexicalSelection.prod-JQDTaUpX.js.map +0 -1
- package/dist/LexicalTable.prod-rZbTmo9K.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as k, jsxs as
|
|
2
|
-
import { o as
|
|
1
|
+
import { jsx as k, jsxs as Y } from "react/jsx-runtime";
|
|
2
|
+
import { o as W } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
3
|
import { c as q } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { p as U, k as G, N as J } from "../../../../LexicalLink.prod-
|
|
4
|
+
import { p as U, k as G, N as J } from "../../../../LexicalLink.prod-BIN12UMz.js";
|
|
5
5
|
import { useRef as a, useState as Q, useEffect as m } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
6
|
+
import { Y as Z, N as f, n as $, ap as tt, c as N, L as et, y as ot, X as rt } from "../../../../Lexical.prod-qoFV025v.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-6tDdOCQy.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-5RvdadYU.js";
|
|
9
9
|
import { LinkContextMenu as st } from "./LinkContextMenu/LinkContextMenu.js";
|
|
10
10
|
import { useFlyout as ct } from "../../hooks/useFlyout.js";
|
|
11
11
|
import { Icon as lt } from "../../../Icon/Icon.js";
|
|
@@ -51,8 +51,8 @@ const mt = 200, I = (p) => {
|
|
|
51
51
|
n = n.getParent();
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
|
-
},
|
|
55
|
-
const n = ut(), [c] =
|
|
54
|
+
}, Xt = ({ parentScrollPosition: p }) => {
|
|
55
|
+
const n = ut(), [c] = W(), { flyout: A, showFlyout: _, hideFlyout: y, isVisible: u } = ct(), d = a(void 0), w = a(!1), C = a(""), g = a(""), [L, H] = Q({ active: !1, url: "", linktext: "" }), P = a(u), x = a(null), S = a(null), T = a(void 0), v = () => {
|
|
56
56
|
c.update(() => {
|
|
57
57
|
const e = f();
|
|
58
58
|
x.current = e;
|
|
@@ -61,7 +61,7 @@ const mt = 200, I = (p) => {
|
|
|
61
61
|
c.update(() => {
|
|
62
62
|
x.current && ot(x.current);
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, M = (e, t) => {
|
|
65
65
|
_({
|
|
66
66
|
position: t,
|
|
67
67
|
children: /* @__PURE__ */ k(
|
|
@@ -69,7 +69,7 @@ const mt = 200, I = (p) => {
|
|
|
69
69
|
{
|
|
70
70
|
url: e,
|
|
71
71
|
onSave: (o) => K(o, ""),
|
|
72
|
-
onDelete: () =>
|
|
72
|
+
onDelete: () => V(),
|
|
73
73
|
onClose: D,
|
|
74
74
|
ref: T
|
|
75
75
|
}
|
|
@@ -77,16 +77,16 @@ const mt = 200, I = (p) => {
|
|
|
77
77
|
});
|
|
78
78
|
}, D = () => {
|
|
79
79
|
var e;
|
|
80
|
-
(e = T.current) == null || e.clearForm(),
|
|
80
|
+
(e = T.current) == null || e.clearForm(), y(), R();
|
|
81
81
|
}, F = () => {
|
|
82
82
|
var t;
|
|
83
83
|
const e = (t = S.current) == null ? void 0 : t.getBoundingClientRect();
|
|
84
|
-
!w.current && e && (
|
|
84
|
+
!w.current && e && (v(), _({ position: { top: e.bottom, left: e.left }, ...j }), setTimeout(() => {
|
|
85
85
|
var o;
|
|
86
86
|
return (o = d.current) == null ? void 0 : o.setDefaults("", g.current);
|
|
87
87
|
}, 0));
|
|
88
88
|
}, b = () => {
|
|
89
|
-
|
|
89
|
+
y(), R();
|
|
90
90
|
}, K = (e, t) => {
|
|
91
91
|
c.update(() => {
|
|
92
92
|
const o = f();
|
|
@@ -97,7 +97,7 @@ const mt = 200, I = (p) => {
|
|
|
97
97
|
const l = rt(t);
|
|
98
98
|
s.replace(l), l.select();
|
|
99
99
|
}
|
|
100
|
-
if (t !==
|
|
100
|
+
if (t !== C.current && C.current === "") {
|
|
101
101
|
const { anchor: l, focus: E } = o;
|
|
102
102
|
o.insertText(t), l.offset -= t.length, E.offset = l.offset + t.length;
|
|
103
103
|
}
|
|
@@ -106,13 +106,13 @@ const mt = 200, I = (p) => {
|
|
|
106
106
|
}
|
|
107
107
|
b();
|
|
108
108
|
});
|
|
109
|
-
},
|
|
109
|
+
}, V = () => {
|
|
110
110
|
c.dispatchCommand(G, null), D();
|
|
111
|
-
},
|
|
111
|
+
}, j = {
|
|
112
112
|
children: /* @__PURE__ */ k(
|
|
113
113
|
nt,
|
|
114
114
|
{
|
|
115
|
-
isLink:
|
|
115
|
+
isLink: L,
|
|
116
116
|
onCloseHandler: b,
|
|
117
117
|
onSaveHandler: (e, t) => K(e, t),
|
|
118
118
|
ref: d
|
|
@@ -121,14 +121,14 @@ const mt = 200, I = (p) => {
|
|
|
121
121
|
};
|
|
122
122
|
return m(() => {
|
|
123
123
|
var e, t;
|
|
124
|
-
u ? (w.current = !0, (t = d.current) == null || t.focusFirstField()) : ((e = d.current) == null || e.clearForm(),
|
|
124
|
+
u ? (w.current = !0, (t = d.current) == null || t.focusFirstField()) : ((e = d.current) == null || e.clearForm(), C.current = g.current = "", setTimeout(() => w.current = !1, mt));
|
|
125
125
|
}, [d, u]), m(() => {
|
|
126
126
|
const e = (r) => {
|
|
127
127
|
if (N(r) && r.isCollapsed()) {
|
|
128
128
|
const i = O(r.anchor.getNode());
|
|
129
129
|
if (i) {
|
|
130
130
|
const s = c.getElementByKey(r.anchor.getNode().getKey()), l = s ? { top: s.getBoundingClientRect().bottom, left: s.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
131
|
-
return
|
|
131
|
+
return M(i.url, l), !0;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
return !1;
|
|
@@ -143,7 +143,7 @@ const mt = 200, I = (p) => {
|
|
|
143
143
|
$,
|
|
144
144
|
(r) => {
|
|
145
145
|
const i = f();
|
|
146
|
-
return
|
|
146
|
+
return v(), r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation(), e(i), !1;
|
|
147
147
|
},
|
|
148
148
|
0
|
|
149
149
|
);
|
|
@@ -156,16 +156,16 @@ const mt = 200, I = (p) => {
|
|
|
156
156
|
(o) => {
|
|
157
157
|
if (o.ctrlKey && o.shiftKey && o.key === "U") {
|
|
158
158
|
const r = f();
|
|
159
|
-
if (
|
|
159
|
+
if (v(), !N(r))
|
|
160
160
|
return !1;
|
|
161
|
-
const i = O(r.anchor.getNode()), s = (E = "",
|
|
161
|
+
const i = O(r.anchor.getNode()), s = (E = "", X = "") => {
|
|
162
162
|
F(), setTimeout(() => {
|
|
163
163
|
var B;
|
|
164
|
-
return (B = d.current) == null ? void 0 : B.setDefaults(E,
|
|
164
|
+
return (B = d.current) == null ? void 0 : B.setDefaults(E, X);
|
|
165
165
|
}, 0);
|
|
166
166
|
};
|
|
167
167
|
if (i)
|
|
168
|
-
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(),
|
|
168
|
+
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), C.current = i.linktext, s(i.url, i.linktext), !0;
|
|
169
169
|
const l = r.getTextContent();
|
|
170
170
|
return l !== "" ? (g.current = l, s("", g.current), !0) : (F(), !0);
|
|
171
171
|
}
|
|
@@ -173,10 +173,10 @@ const mt = 200, I = (p) => {
|
|
|
173
173
|
},
|
|
174
174
|
et
|
|
175
175
|
), t = c.registerUpdateListener(({ editorState: o }) => {
|
|
176
|
-
|
|
176
|
+
H(
|
|
177
177
|
o.read(() => {
|
|
178
178
|
const r = f();
|
|
179
|
-
if (
|
|
179
|
+
if (v(), N(r)) {
|
|
180
180
|
const i = r.anchor.getNode(), s = I(i);
|
|
181
181
|
if (s)
|
|
182
182
|
return {
|
|
@@ -202,17 +202,17 @@ const mt = 200, I = (p) => {
|
|
|
202
202
|
}, [u]), m(() => {
|
|
203
203
|
u && b();
|
|
204
204
|
}, [p]), m(() => {
|
|
205
|
-
|
|
206
|
-
}, [
|
|
205
|
+
L.active || y();
|
|
206
|
+
}, [L]), m(() => {
|
|
207
207
|
const e = (o) => (z(t), o.key === "Escape" && P.current && (o.preventDefault(), o.stopPropagation(), b()), !0);
|
|
208
208
|
window.addEventListener("keydown", e, { capture: !0 });
|
|
209
209
|
const t = () => {
|
|
210
|
-
|
|
210
|
+
y();
|
|
211
211
|
};
|
|
212
212
|
return z(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
213
213
|
window.removeEventListener("keydown", e), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), at(t);
|
|
214
214
|
};
|
|
215
|
-
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */
|
|
215
|
+
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ Y("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
|
|
216
216
|
/* @__PURE__ */ k(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
@@ -221,7 +221,7 @@ const mt = 200, I = (p) => {
|
|
|
221
221
|
className: q(
|
|
222
222
|
h["editor__toolbar-button"],
|
|
223
223
|
h["editor__toolbar-button--link"],
|
|
224
|
-
|
|
224
|
+
L.active && h["editor__toolbar-button--active"]
|
|
225
225
|
),
|
|
226
226
|
"aria-label": n.aria.labels.link,
|
|
227
227
|
"aria-keyshortcuts": n.aria.keyshortcuts.link,
|
|
@@ -230,11 +230,11 @@ const mt = 200, I = (p) => {
|
|
|
230
230
|
children: /* @__PURE__ */ k(lt, { name: "Link", size: 20 })
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
|
|
233
|
+
A
|
|
234
234
|
] }) });
|
|
235
235
|
};
|
|
236
236
|
export {
|
|
237
|
-
|
|
237
|
+
Xt as LinkPlugin,
|
|
238
238
|
O as getLinkNodeTag
|
|
239
239
|
};
|
|
240
240
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { o as
|
|
3
|
-
import { C as N, y as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { useState as p, useEffect as
|
|
2
|
+
import { o as S } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { C as N, y as P, _ as v, n as D, a as f, c as K } from "../../../../LexicalList.prod-WlGaeo0L.js";
|
|
4
|
+
import { _ as x } from "../../../../LexicalSelection.prod-B5grbYgk.js";
|
|
5
|
+
import { useState as p, useEffect as I } from "react";
|
|
6
6
|
import { c as O } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
-
import { ap as
|
|
8
|
-
import { Icon as
|
|
7
|
+
import { ap as U, L as w, V as B, N as b, c as h, I as E, P as $ } from "../../../../Lexical.prod-qoFV025v.js";
|
|
8
|
+
import { Icon as j } from "../../../Icon/Icon.js";
|
|
9
9
|
import { s as l } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
10
|
-
import { useTranslation as
|
|
11
|
-
const
|
|
10
|
+
import { useTranslation as z } from "../../hooks/useTranslation.js";
|
|
11
|
+
const V = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
14
|
}, Y = ["bullet", "number"], W = () => {
|
|
15
|
-
const c =
|
|
15
|
+
const c = z(), [e] = S(), [g, s] = p("paragraph"), [u, L] = p(!1), [m, _] = p(!1), k = () => {
|
|
16
16
|
e.update(() => {
|
|
17
17
|
const t = b();
|
|
18
|
-
h(t) &&
|
|
18
|
+
h(t) && x(t, () => $());
|
|
19
19
|
});
|
|
20
|
-
},
|
|
21
|
-
t === "number" && g !== "number" ? (e.dispatchCommand(
|
|
20
|
+
}, y = (t) => {
|
|
21
|
+
t === "number" && g !== "number" ? (e.dispatchCommand(P, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(v, void 0), s("bullet")) : (k(), s("paragraph"));
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return I(() => {
|
|
24
24
|
const t = e.registerCommand(
|
|
25
|
-
|
|
26
|
-
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(N, void 0) : e.dispatchCommand(
|
|
27
|
-
|
|
25
|
+
U,
|
|
26
|
+
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(N, void 0) : e.dispatchCommand(P, void 0), !0) : r.ctrlKey && r.shiftKey && r.code === "Digit8" ? (r.preventDefault(), u ? e.dispatchCommand(N, void 0) : e.dispatchCommand(v, void 0), !0) : !1,
|
|
27
|
+
w
|
|
28
28
|
);
|
|
29
29
|
return () => {
|
|
30
30
|
t();
|
|
31
31
|
};
|
|
32
|
-
}, [e, m, u]),
|
|
32
|
+
}, [e, m, u]), I(() => {
|
|
33
33
|
e.registerCommand(
|
|
34
|
-
|
|
34
|
+
B,
|
|
35
35
|
(r) => (r.preventDefault(), e.update(() => {
|
|
36
36
|
const n = b();
|
|
37
37
|
if (!h(n))
|
|
38
38
|
return;
|
|
39
39
|
const o = n.anchor.getNode(), i = o.getParent();
|
|
40
|
-
if (!
|
|
40
|
+
if (!D(i))
|
|
41
41
|
return;
|
|
42
42
|
const a = i.getParent();
|
|
43
43
|
if (f(a)) {
|
|
@@ -45,7 +45,7 @@ const z = {
|
|
|
45
45
|
i.append(C), C.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
48
|
-
|
|
48
|
+
E
|
|
49
49
|
);
|
|
50
50
|
const t = e.registerUpdateListener(({ editorState: r }) => {
|
|
51
51
|
r.read(() => {
|
|
@@ -55,14 +55,14 @@ const z = {
|
|
|
55
55
|
for (; o !== null; ) {
|
|
56
56
|
if (f(o)) {
|
|
57
57
|
const a = o.getTag();
|
|
58
|
-
|
|
58
|
+
L(a === "ul"), _(a === "ol"), a === "ul" && s("bullet"), a === "ol" && s("number");
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
const i = o.getParent();
|
|
62
62
|
if (i === null) break;
|
|
63
63
|
o = i;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
L(!1), _(!1), s("paragraph");
|
|
66
66
|
}
|
|
67
67
|
return !1;
|
|
68
68
|
});
|
|
@@ -73,7 +73,7 @@ const z = {
|
|
|
73
73
|
}, [e]), /* @__PURE__ */ d("div", { className: l["editor__toolbar-button-group"], children: Y.map((t) => /* @__PURE__ */ d(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
onClick: () =>
|
|
76
|
+
onClick: () => y(t),
|
|
77
77
|
title: c.format[`${t}Tooltip`],
|
|
78
78
|
className: O(
|
|
79
79
|
l["editor__toolbar-button"],
|
|
@@ -84,7 +84,7 @@ const z = {
|
|
|
84
84
|
"aria-label": c.aria.labels[t],
|
|
85
85
|
"aria-keyshortcuts": c.aria.keyshortcuts[t],
|
|
86
86
|
type: "button",
|
|
87
|
-
children: /* @__PURE__ */ d(
|
|
87
|
+
children: /* @__PURE__ */ d(j, { name: V[t], size: 24 })
|
|
88
88
|
},
|
|
89
89
|
t
|
|
90
90
|
)) });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as m } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
2
2
|
import { useEffect as c } from "react";
|
|
3
|
-
import { ae as f,
|
|
4
|
-
import { L as i } from "../../../../LexicalUtils.prod-
|
|
5
|
-
import { D as d } from "../../../../LexicalClipboard.prod-
|
|
3
|
+
import { ae as f, E as p, N as u } from "../../../../Lexical.prod-qoFV025v.js";
|
|
4
|
+
import { L as i } from "../../../../LexicalUtils.prod-BpZsS7jD.js";
|
|
5
|
+
import { D as d } from "../../../../LexicalClipboard.prod-BFJoO5qv.js";
|
|
6
6
|
import { d as D } from "../../../../index-DllfJcv4.js";
|
|
7
|
-
const
|
|
7
|
+
const N = () => {
|
|
8
8
|
const [e] = m(), l = (t) => {
|
|
9
9
|
t.preventDefault(), e.update(() => {
|
|
10
10
|
const r = u(), n = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
|
|
@@ -26,6 +26,6 @@ const L = () => {
|
|
|
26
26
|
}, [e]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
N as PasteHandlerPlugin
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=PasteHandlerPlugin.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { b as B } from "../../../../TablePlugin-
|
|
3
|
+
import { b as B } from "../../../../TablePlugin-6tDdOCQy.js";
|
|
4
4
|
import "../../../Buttons/Button.js";
|
|
5
5
|
import "../../../Buttons/LinkButton.js";
|
|
6
6
|
import "@react-aria/button";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
3
|
import "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import "../../../../LexicalTable.prod-
|
|
5
|
-
import "../../../../Lexical.prod-
|
|
4
|
+
import "../../../../LexicalTable.prod-osQj1CQX.js";
|
|
5
|
+
import "../../../../Lexical.prod-qoFV025v.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as F } from "../../../../TablePlugin-
|
|
7
|
+
import { T as F } from "../../../../TablePlugin-6tDdOCQy.js";
|
|
8
8
|
import "./helpers.js";
|
|
9
9
|
import "../../hooks/useFlyout.js";
|
|
10
10
|
import "../../../Icon/Icon.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { z as d, R as h, B as m, Z as S, H as w, P as E, x as C, K as p,
|
|
2
|
-
import {
|
|
3
|
-
const b = 100,
|
|
1
|
+
import { z as d, R as h, B as m, Z as S, H as w, P as E, x as C, K as p, L as I } from "../../../../LexicalTable.prod-osQj1CQX.js";
|
|
2
|
+
import { P as u } from "../../../../Lexical.prod-qoFV025v.js";
|
|
3
|
+
const b = 100, D = (e, n) => {
|
|
4
4
|
const t = I(0, 0, !1);
|
|
5
5
|
for (let o = 0; o < e; o++) {
|
|
6
6
|
const r = p();
|
|
@@ -17,7 +17,7 @@ const b = 100, P = (e, n) => {
|
|
|
17
17
|
const r = t.getFirstDescendant();
|
|
18
18
|
r && r.select();
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, P = (e) => {
|
|
21
21
|
d(e).remove();
|
|
22
22
|
}, B = (e, n) => {
|
|
23
23
|
const t = p(), o = w(e), r = o.getChildrenSize();
|
|
@@ -28,7 +28,7 @@ const b = 100, P = (e, n) => {
|
|
|
28
28
|
n === "insertRowAbove" ? o.insertBefore(t) : o.insertAfter(t);
|
|
29
29
|
const l = t.getFirstDescendant();
|
|
30
30
|
l && l.select();
|
|
31
|
-
},
|
|
31
|
+
}, L = (e, n) => {
|
|
32
32
|
const t = w(e);
|
|
33
33
|
if (!h(e))
|
|
34
34
|
throw new Error("Selected node is not a TableCellNode");
|
|
@@ -39,28 +39,28 @@ const b = 100, P = (e, n) => {
|
|
|
39
39
|
const a = C(0);
|
|
40
40
|
a.append(u());
|
|
41
41
|
const f = c[i].getChildren()[s];
|
|
42
|
-
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((x) => {
|
|
43
|
+
x.getChildren().forEach((T) => {
|
|
44
|
+
T.setWidth(b / r);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
s = n === "insertColumnLeft" ? s : s + 1;
|
|
49
49
|
const g = c[o].getChildren()[s];
|
|
50
50
|
g && g.select();
|
|
51
|
-
},
|
|
51
|
+
}, O = (e) => {
|
|
52
52
|
var r;
|
|
53
53
|
if (!h(e))
|
|
54
54
|
throw new Error("Selected node is not a TableCellNode");
|
|
55
55
|
const n = d(e), t = ((r = n.getFirstChild()) == null ? void 0 : r.getChildrenSize()) || 0, o = m(e);
|
|
56
|
-
t === 1 ?
|
|
56
|
+
t === 1 ? P(e) : S(n, o);
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
D as createTable,
|
|
60
|
+
O as deleteColumn,
|
|
61
61
|
A as deleteRow,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
P as deleteTable,
|
|
63
|
+
L as insertColumn,
|
|
64
64
|
B as insertRow
|
|
65
65
|
};
|
|
66
66
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as y, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { o as P } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
-
import {
|
|
4
|
-
import { useState as
|
|
5
|
-
import {
|
|
6
|
-
import { BlockFormatPlugin as
|
|
3
|
+
import { N as h, c as g, y as C } from "../../../../Lexical.prod-qoFV025v.js";
|
|
4
|
+
import { useState as L, useRef as E, useCallback as N, useEffect as m } from "react";
|
|
5
|
+
import { W as b } from "../../../../LexicalTable.prod-osQj1CQX.js";
|
|
6
|
+
import { BlockFormatPlugin as T } from "../BlockFormatPlugin/BlockFormatPlugin.js";
|
|
7
7
|
import { ListPlugin as k } from "../ListPlugin/ListPlugin.js";
|
|
8
8
|
import { LinkPlugin as x } from "../LinkPlugin/LinkPlugin.js";
|
|
9
9
|
import { HistoryPlugin as B } from "../HistoryPlugin/HistoryPlugin.js";
|
|
10
|
-
import { T as S } from "../../../../TablePlugin-
|
|
10
|
+
import { T as S } from "../../../../TablePlugin-6tDdOCQy.js";
|
|
11
11
|
import { TableCellContextMenu as z } from "../TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
12
12
|
import { s as A } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
13
|
-
import { setScrollableContainers as
|
|
14
|
-
const
|
|
15
|
-
const [t] = P(), [i, s] =
|
|
16
|
-
const e =
|
|
17
|
-
if (
|
|
18
|
-
const l = e.anchor.getNode(), a =
|
|
13
|
+
import { setScrollableContainers as w, removeScrollableContainers as K } from "../../helpers.js";
|
|
14
|
+
const O = ({ editorScrollPosition: d }) => {
|
|
15
|
+
const [t] = P(), [i, s] = L(null), u = E(null), f = N(() => {
|
|
16
|
+
const e = h();
|
|
17
|
+
if (g(e)) {
|
|
18
|
+
const l = e.anchor.getNode(), a = b(l);
|
|
19
19
|
if (a) {
|
|
20
20
|
const p = t.getElementByKey(a.getKey()), c = p ? p.getBoundingClientRect() : { right: 0, bottom: 0, height: 0 };
|
|
21
21
|
s({ xPos: c.right, yPos: c.bottom, height: c.height });
|
|
@@ -27,10 +27,10 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
27
27
|
(r = u.current) == null || r.mutateTable(e);
|
|
28
28
|
}, o = () => {
|
|
29
29
|
t.update(() => {
|
|
30
|
-
const e =
|
|
31
|
-
if (
|
|
30
|
+
const e = h();
|
|
31
|
+
if (g(e)) {
|
|
32
32
|
const l = e.anchor.getNode();
|
|
33
|
-
|
|
33
|
+
b(l) && (C(null), s(null));
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
};
|
|
@@ -40,17 +40,17 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
40
40
|
f();
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
|
-
}, [t, f]), m(() => (
|
|
43
|
+
}, [t, f]), m(() => (w(o), window.addEventListener("scroll", o), window.addEventListener("resize", o), () => {
|
|
44
44
|
window.removeEventListener("scroll", o), window.removeEventListener("resize", o), K(o);
|
|
45
45
|
}), [t]), m(() => {
|
|
46
46
|
const e = () => {
|
|
47
|
-
|
|
47
|
+
w(o);
|
|
48
48
|
};
|
|
49
49
|
return window.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
50
50
|
window.removeEventListener("keydown", e);
|
|
51
51
|
};
|
|
52
|
-
}, []), /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */ n(
|
|
52
|
+
}, []), /* @__PURE__ */ y("div", { className: A.editor__toolbar, children: [
|
|
53
|
+
/* @__PURE__ */ n(T, {}),
|
|
54
54
|
/* @__PURE__ */ n(k, {}),
|
|
55
55
|
/* @__PURE__ */ n(S, { isActive: !!i, ref: u }),
|
|
56
56
|
i && /* @__PURE__ */ n(
|
|
@@ -66,6 +66,6 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
66
66
|
] });
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
O as ToolBarPlugin
|
|
70
70
|
};
|
|
71
71
|
//# sourceMappingURL=ToolbarPlugin.js.map
|
|
@@ -3,7 +3,7 @@ import { BlockFormatPlugin as l } from "./BlockFormatPlugin/BlockFormatPlugin.js
|
|
|
3
3
|
import { ListPlugin as n } from "./ListPlugin/ListPlugin.js";
|
|
4
4
|
import { LinkPlugin as m, getLinkNodeTag as x } from "./LinkPlugin/LinkPlugin.js";
|
|
5
5
|
import { HistoryPlugin as p } from "./HistoryPlugin/HistoryPlugin.js";
|
|
6
|
-
import { T as a } from "../../../TablePlugin-
|
|
6
|
+
import { T as a } from "../../../TablePlugin-6tDdOCQy.js";
|
|
7
7
|
import { TableCellContextMenu as T } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
8
8
|
export {
|
|
9
9
|
l as BlockFormatPlugin,
|