@uva-glass/component-library 3.34.0 → 3.34.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-BjpEXQJZ.js → Lexical.prod-C7FcGFd7.js} +528 -522
- package/dist/Lexical.prod-C7FcGFd7.js.map +1 -0
- package/dist/{LexicalClipboard.prod-B4j0EyWx.js → LexicalClipboard.prod-CeOlk1NB.js} +104 -104
- package/dist/{LexicalClipboard.prod-B4j0EyWx.js.map → LexicalClipboard.prod-CeOlk1NB.js.map} +1 -1
- package/dist/{LexicalLink.prod-CYNCWmMx.js → LexicalLink.prod-CSI9BSPD.js} +46 -46
- package/dist/{LexicalLink.prod-CYNCWmMx.js.map → LexicalLink.prod-CSI9BSPD.js.map} +1 -1
- package/dist/{LexicalList.prod-BRwEushm.js → LexicalList.prod-TMA2LN4v.js} +46 -46
- package/dist/{LexicalList.prod-BRwEushm.js.map → LexicalList.prod-TMA2LN4v.js.map} +1 -1
- package/dist/{LexicalSelection.prod-DYo5_Y2k.js → LexicalSelection.prod-DDwSrdAV.js} +31 -31
- package/dist/{LexicalSelection.prod-DYo5_Y2k.js.map → LexicalSelection.prod-DDwSrdAV.js.map} +1 -1
- package/dist/{LexicalTable.prod-BArw8Dt5.js → LexicalTable.prod-DYP5JQC0.js} +268 -268
- package/dist/{LexicalTable.prod-BArw8Dt5.js.map → LexicalTable.prod-DYP5JQC0.js.map} +1 -1
- package/dist/{LexicalUtils.prod-DJRX2pwP.js → LexicalUtils.prod-D_SPJ6vo.js} +42 -42
- package/dist/{LexicalUtils.prod-DJRX2pwP.js.map → LexicalUtils.prod-D_SPJ6vo.js.map} +1 -1
- package/dist/{TablePlugin-BagQHe1w.js → TablePlugin-CI_6HCsd.js} +56 -56
- package/dist/{TablePlugin-BagQHe1w.js.map → TablePlugin-CI_6HCsd.js.map} +1 -1
- package/dist/assets/MultiSelectBox.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/MultiSelectBox/MultiSelectBox.js +24 -24
- 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 +6 -6
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +10 -10
- 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 +43 -43
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +30 -30
- 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 +12 -12
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +17 -17
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +201 -201
- package/dist/components/RteEditor/helpers.js +6 -6
- package/dist/components/index.js +1 -1
- package/dist/{helpers-DM8qHaKY.js → helpers-CYiLlioz.js} +38 -38
- package/dist/{helpers-DM8qHaKY.js.map → helpers-CYiLlioz.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/dist/Lexical.prod-BjpEXQJZ.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as k, jsxs as
|
|
2
|
-
import { o as
|
|
3
|
-
import { c as
|
|
4
|
-
import { p as
|
|
5
|
-
import { useRef as a, useState as
|
|
6
|
-
import { Z as Q,
|
|
7
|
-
import { A as rt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as nt } from "../../../../helpers-
|
|
1
|
+
import { jsx as k, jsxs as J } from "react/jsx-runtime";
|
|
2
|
+
import { o as W } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { c as Y } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { p as I, k as Z, v as q } from "../../../../LexicalLink.prod-CSI9BSPD.js";
|
|
5
|
+
import { useRef as a, useState as G, useEffect as m } from "react";
|
|
6
|
+
import { Z as Q, P as f, n as X, ar as $, _ as w, J as tt, M as et, i as ot } from "../../../../Lexical.prod-C7FcGFd7.js";
|
|
7
|
+
import { A as rt } from "../../../../TablePlugin-CI_6HCsd.js";
|
|
8
|
+
import { e as nt } from "../../../../helpers-CYiLlioz.js";
|
|
9
9
|
import { LinkContextMenu as it } from "./LinkContextMenu/LinkContextMenu.js";
|
|
10
10
|
import { useFlyout as st } from "../../hooks/useFlyout.js";
|
|
11
11
|
import { Icon as ct } from "../../../Icon/Icon.js";
|
|
@@ -31,18 +31,18 @@ import "../../../SelectListbox/SelectListbox.js";
|
|
|
31
31
|
import "../../../SelectListbox/SelectProvider.js";
|
|
32
32
|
import "../../../Sortable/components/SortableItem.js";
|
|
33
33
|
import "../../../../SortableProvider-l8-7ClBJ.js";
|
|
34
|
-
const ut = 200,
|
|
34
|
+
const ut = 200, M = (p) => {
|
|
35
35
|
let n = p;
|
|
36
36
|
for (; n; ) {
|
|
37
|
-
if (
|
|
37
|
+
if (I(n))
|
|
38
38
|
return n;
|
|
39
39
|
n = n.getParent();
|
|
40
40
|
}
|
|
41
41
|
return null;
|
|
42
|
-
},
|
|
42
|
+
}, z = (p) => {
|
|
43
43
|
let n = p;
|
|
44
44
|
for (; n; ) {
|
|
45
|
-
if (
|
|
45
|
+
if (I(n))
|
|
46
46
|
return {
|
|
47
47
|
active: !0,
|
|
48
48
|
url: n.getURL(),
|
|
@@ -51,42 +51,42 @@ const ut = 200, z = (p) => {
|
|
|
51
51
|
n = n.getParent();
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
|
-
},
|
|
55
|
-
const n = at(), [c] =
|
|
54
|
+
}, jt = ({ parentScrollPosition: p }) => {
|
|
55
|
+
const n = at(), [c] = W(), { flyout: O, showFlyout: P, hideFlyout: C, isVisible: u } = st(), d = a(void 0), N = a(!1), v = a(""), g = a(""), [y, U] = G({ active: !1, url: "", linktext: "" }), E = a(u), x = a(null), S = a(null), T = a(void 0), L = () => {
|
|
56
56
|
c.update(() => {
|
|
57
57
|
const o = f();
|
|
58
58
|
x.current = o;
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, R = () => {
|
|
61
61
|
c.update(() => {
|
|
62
62
|
x.current && et(x.current);
|
|
63
63
|
});
|
|
64
|
-
},
|
|
65
|
-
|
|
64
|
+
}, A = (o, t) => {
|
|
65
|
+
P({
|
|
66
66
|
position: t,
|
|
67
67
|
children: /* @__PURE__ */ k(
|
|
68
68
|
it,
|
|
69
69
|
{
|
|
70
70
|
url: o,
|
|
71
71
|
onSave: (e) => K(e, ""),
|
|
72
|
-
onDelete: () =>
|
|
73
|
-
onClose:
|
|
72
|
+
onDelete: () => H(),
|
|
73
|
+
onClose: D,
|
|
74
74
|
ref: T
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
});
|
|
78
|
-
},
|
|
79
|
-
T.current?.clearForm(), C(),
|
|
80
|
-
},
|
|
78
|
+
}, D = () => {
|
|
79
|
+
T.current?.clearForm(), C(), R();
|
|
80
|
+
}, _ = () => {
|
|
81
81
|
const o = S.current?.getBoundingClientRect();
|
|
82
|
-
!N.current && o && (L(),
|
|
82
|
+
!N.current && o && (L(), P({ position: { top: o.bottom, left: o.left }, ...V }), setTimeout(() => d.current?.setDefaults("", g.current), 0));
|
|
83
83
|
}, b = () => {
|
|
84
|
-
C(),
|
|
84
|
+
C(), R();
|
|
85
85
|
}, K = (o, t) => {
|
|
86
86
|
c.update(() => {
|
|
87
87
|
const e = f();
|
|
88
88
|
if (w(e)) {
|
|
89
|
-
const i = e.anchor.getNode(), s =
|
|
89
|
+
const i = e.anchor.getNode(), s = M(i);
|
|
90
90
|
if (t && t !== "") {
|
|
91
91
|
if (s) {
|
|
92
92
|
const l = ot(t);
|
|
@@ -97,12 +97,12 @@ const ut = 200, z = (p) => {
|
|
|
97
97
|
e.insertText(t), l.offset -= t.length, F.offset = l.offset + t.length;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
q(nt(o), { target: "_blank" });
|
|
101
101
|
}
|
|
102
102
|
b();
|
|
103
103
|
});
|
|
104
|
-
},
|
|
105
|
-
c.dispatchCommand(
|
|
104
|
+
}, H = () => {
|
|
105
|
+
c.dispatchCommand(Z, null), D();
|
|
106
106
|
}, V = {
|
|
107
107
|
children: /* @__PURE__ */ k(
|
|
108
108
|
rt,
|
|
@@ -119,10 +119,10 @@ const ut = 200, z = (p) => {
|
|
|
119
119
|
}, [d, u]), m(() => {
|
|
120
120
|
const o = (r) => {
|
|
121
121
|
if (w(r) && r.isCollapsed()) {
|
|
122
|
-
const i =
|
|
122
|
+
const i = z(r.anchor.getNode());
|
|
123
123
|
if (i) {
|
|
124
124
|
const s = c.getElementByKey(r.anchor.getNode().getKey()), l = s ? { top: s.getBoundingClientRect().bottom, left: s.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
125
|
-
return
|
|
125
|
+
return A(i.url, l), !0;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
return !1;
|
|
@@ -152,23 +152,23 @@ const ut = 200, z = (p) => {
|
|
|
152
152
|
const r = f();
|
|
153
153
|
if (L(), !w(r))
|
|
154
154
|
return !1;
|
|
155
|
-
const i =
|
|
156
|
-
|
|
155
|
+
const i = z(r.anchor.getNode()), s = (F = "", j = "") => {
|
|
156
|
+
_(), setTimeout(() => d.current?.setDefaults(F, j), 0);
|
|
157
157
|
};
|
|
158
158
|
if (i)
|
|
159
159
|
return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), v.current = i.linktext, s(i.url, i.linktext), !0;
|
|
160
160
|
const l = r.getTextContent();
|
|
161
|
-
return l !== "" ? (g.current = l, s("", g.current), !0) : (
|
|
161
|
+
return l !== "" ? (g.current = l, s("", g.current), !0) : (_(), !0);
|
|
162
162
|
}
|
|
163
163
|
return !1;
|
|
164
164
|
},
|
|
165
165
|
tt
|
|
166
166
|
), t = c.registerUpdateListener(({ editorState: e }) => {
|
|
167
|
-
|
|
167
|
+
U(
|
|
168
168
|
e.read(() => {
|
|
169
169
|
const r = f();
|
|
170
170
|
if (L(), w(r)) {
|
|
171
|
-
const i = r.anchor.getNode(), s =
|
|
171
|
+
const i = r.anchor.getNode(), s = M(i);
|
|
172
172
|
if (s)
|
|
173
173
|
return {
|
|
174
174
|
active: !0,
|
|
@@ -188,13 +188,13 @@ const ut = 200, z = (p) => {
|
|
|
188
188
|
o(), t();
|
|
189
189
|
};
|
|
190
190
|
}, [c]), m(() => {
|
|
191
|
-
|
|
191
|
+
E.current = u, u || T.current?.clearForm();
|
|
192
192
|
}, [u]), m(() => {
|
|
193
193
|
u && b();
|
|
194
194
|
}, [p]), m(() => {
|
|
195
195
|
y.active || C();
|
|
196
196
|
}, [y]), m(() => {
|
|
197
|
-
const o = (e) => (B(t), e.key === "Escape" &&
|
|
197
|
+
const o = (e) => (B(t), e.key === "Escape" && E.current && (e.preventDefault(), e.stopPropagation(), b()), !0);
|
|
198
198
|
window.addEventListener("keydown", o, { capture: !0 });
|
|
199
199
|
const t = () => {
|
|
200
200
|
C();
|
|
@@ -202,13 +202,13 @@ const ut = 200, z = (p) => {
|
|
|
202
202
|
return B(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
203
203
|
window.removeEventListener("keydown", o), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), lt(t);
|
|
204
204
|
};
|
|
205
|
-
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */
|
|
205
|
+
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ J("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
|
|
206
206
|
/* @__PURE__ */ k(
|
|
207
207
|
"button",
|
|
208
208
|
{
|
|
209
|
-
onClick:
|
|
209
|
+
onClick: _,
|
|
210
210
|
title: n.links.linkTooltip,
|
|
211
|
-
className:
|
|
211
|
+
className: Y(
|
|
212
212
|
h["editor__toolbar-button"],
|
|
213
213
|
h["editor__toolbar-button--link"],
|
|
214
214
|
y.active && h["editor__toolbar-button--active"]
|
|
@@ -220,11 +220,11 @@ const ut = 200, z = (p) => {
|
|
|
220
220
|
children: /* @__PURE__ */ k(ct, { name: "Link", size: 20 })
|
|
221
221
|
}
|
|
222
222
|
),
|
|
223
|
-
|
|
223
|
+
O
|
|
224
224
|
] }) });
|
|
225
225
|
};
|
|
226
226
|
export {
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
jt as LinkPlugin,
|
|
228
|
+
z as getLinkNodeTag
|
|
229
229
|
};
|
|
230
230
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { o as
|
|
3
|
-
import { T as N, C as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { useState as p, useEffect as
|
|
6
|
-
import { c as
|
|
7
|
-
import { ar as
|
|
8
|
-
import { Icon as
|
|
2
|
+
import { o as I } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { T as N, C as P, y as v, n as K, a as f, c as S } from "../../../../LexicalList.prod-TMA2LN4v.js";
|
|
4
|
+
import { _ as B } from "../../../../LexicalSelection.prod-DDwSrdAV.js";
|
|
5
|
+
import { useState as p, useEffect as k } from "react";
|
|
6
|
+
import { c as $ } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
+
import { ar as w, J as x, X as O, P as b, _ as h, $ as U, B as E } from "../../../../Lexical.prod-C7FcGFd7.js";
|
|
8
|
+
import { Icon as J } from "../../../Icon/Icon.js";
|
|
9
9
|
import { s as l } from "../../../../RteEditor.module-B_3uFnFu.js";
|
|
10
10
|
import { useTranslation as T } from "../../hooks/useTranslation.js";
|
|
11
|
-
const
|
|
11
|
+
const j = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
|
-
},
|
|
15
|
-
const u = T(), [e] =
|
|
14
|
+
}, z = ["bullet", "number"], V = () => {
|
|
15
|
+
const u = T(), [e] = I(), [g, s] = p("paragraph"), [c, _] = p(!1), [m, L] = p(!1), y = () => {
|
|
16
16
|
e.update(() => {
|
|
17
17
|
const t = b();
|
|
18
|
-
|
|
18
|
+
h(t) && B(t, () => E());
|
|
19
19
|
});
|
|
20
|
-
},
|
|
21
|
-
t === "number" &&
|
|
20
|
+
}, D = (t) => {
|
|
21
|
+
t === "number" && g !== "number" ? (e.dispatchCommand(P, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(v, void 0), s("bullet")) : (y(), s("paragraph"));
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return k(() => {
|
|
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
|
+
w,
|
|
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(), c ? e.dispatchCommand(N, void 0) : e.dispatchCommand(v, void 0), !0) : !1,
|
|
27
|
+
x
|
|
28
28
|
);
|
|
29
29
|
return () => {
|
|
30
30
|
t();
|
|
31
31
|
};
|
|
32
|
-
}, [e, m, c]),
|
|
32
|
+
}, [e, m, c]), k(() => {
|
|
33
33
|
e.registerCommand(
|
|
34
|
-
|
|
34
|
+
O,
|
|
35
35
|
(r) => (r.preventDefault(), e.update(() => {
|
|
36
36
|
const n = b();
|
|
37
|
-
if (!
|
|
37
|
+
if (!h(n))
|
|
38
38
|
return;
|
|
39
39
|
const o = n.anchor.getNode(), i = o.getParent();
|
|
40
|
-
if (!
|
|
40
|
+
if (!K(i))
|
|
41
41
|
return;
|
|
42
42
|
const a = i.getParent();
|
|
43
43
|
if (f(a)) {
|
|
@@ -45,24 +45,24 @@ const W = {
|
|
|
45
45
|
i.append(C), C.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
48
|
-
|
|
48
|
+
U
|
|
49
49
|
);
|
|
50
50
|
const t = e.registerUpdateListener(({ editorState: r }) => {
|
|
51
51
|
r.read(() => {
|
|
52
52
|
const n = b();
|
|
53
|
-
if (
|
|
53
|
+
if (h(n)) {
|
|
54
54
|
let o = n.anchor.getNode();
|
|
55
55
|
for (; o !== null; ) {
|
|
56
56
|
if (f(o)) {
|
|
57
57
|
const a = o.getTag();
|
|
58
|
-
|
|
58
|
+
_(a === "ul"), L(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
|
+
_(!1), L(!1), s("paragraph");
|
|
66
66
|
}
|
|
67
67
|
return !1;
|
|
68
68
|
});
|
|
@@ -70,12 +70,12 @@ const W = {
|
|
|
70
70
|
return () => {
|
|
71
71
|
t();
|
|
72
72
|
};
|
|
73
|
-
}, [e]), /* @__PURE__ */ d("div", { className: l["editor__toolbar-button-group"], children:
|
|
73
|
+
}, [e]), /* @__PURE__ */ d("div", { className: l["editor__toolbar-button-group"], children: z.map((t) => /* @__PURE__ */ d(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
onClick: () =>
|
|
76
|
+
onClick: () => D(t),
|
|
77
77
|
title: u.format[`${t}Tooltip`],
|
|
78
|
-
className:
|
|
78
|
+
className: $(
|
|
79
79
|
l["editor__toolbar-button"],
|
|
80
80
|
l[`editor__toolbar-button--${t}`],
|
|
81
81
|
t === "bullet" && c && l["editor__toolbar-button--active"],
|
|
@@ -84,12 +84,12 @@ const W = {
|
|
|
84
84
|
"aria-label": u.aria.labels[t],
|
|
85
85
|
"aria-keyshortcuts": u.aria.keyshortcuts[t],
|
|
86
86
|
type: "button",
|
|
87
|
-
children: /* @__PURE__ */ d(
|
|
87
|
+
children: /* @__PURE__ */ d(J, { name: j[t], size: 24 })
|
|
88
88
|
},
|
|
89
89
|
t
|
|
90
90
|
)) });
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
V as ListPlugin
|
|
94
94
|
};
|
|
95
95
|
//# sourceMappingURL=ListPlugin.js.map
|
|
@@ -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 { af as f,
|
|
4
|
-
import { L as i } from "../../../../LexicalUtils.prod-
|
|
5
|
-
import { A as d } from "../../../../LexicalClipboard.prod-
|
|
3
|
+
import { af as f, V as p, P as u } from "../../../../Lexical.prod-C7FcGFd7.js";
|
|
4
|
+
import { L as i } from "../../../../LexicalUtils.prod-D_SPJ6vo.js";
|
|
5
|
+
import { A as d } from "../../../../LexicalClipboard.prod-CeOlk1NB.js";
|
|
6
6
|
import { d as D } from "../../../../index-nrPtQ1dv.js";
|
|
7
|
-
const
|
|
7
|
+
const w = () => {
|
|
8
8
|
const [e] = m(), l = (t) => {
|
|
9
9
|
t.preventDefault(), e.update(() => {
|
|
10
10
|
const r = u(), a = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
|
|
@@ -26,6 +26,6 @@ const P = () => {
|
|
|
26
26
|
}, [e]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
w 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-CI_6HCsd.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-DYP5JQC0.js";
|
|
5
|
+
import "../../../../Lexical.prod-C7FcGFd7.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as F } from "../../../../TablePlugin-
|
|
7
|
+
import { T as F } from "../../../../TablePlugin-CI_6HCsd.js";
|
|
8
8
|
import "./helpers.js";
|
|
9
9
|
import "../../hooks/useFlyout.js";
|
|
10
10
|
import "../../../Icon/Icon.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { H as d, R as h, B as m, Z as x, z as w, P as S, v as C, K as p, L as E } from "../../../../LexicalTable.prod-
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { H as d, R as h, B as m, Z as x, z as w, P as S, v as C, K as p, L as E } from "../../../../LexicalTable.prod-DYP5JQC0.js";
|
|
2
|
+
import { B as u } from "../../../../Lexical.prod-C7FcGFd7.js";
|
|
3
|
+
const b = 100, D = (e, n) => {
|
|
4
4
|
const t = E(0, 0, !1);
|
|
5
5
|
for (let o = 0; o < e; o++) {
|
|
6
6
|
const s = p();
|
|
7
7
|
for (let l = 0; l < n; l++) {
|
|
8
|
-
const r = C(0, void 0,
|
|
8
|
+
const r = C(0, void 0, b / n);
|
|
9
9
|
r.append(u()), s.append(r);
|
|
10
10
|
}
|
|
11
11
|
t.append(s);
|
|
12
12
|
}
|
|
13
13
|
return t;
|
|
14
|
-
},
|
|
14
|
+
}, P = (e) => {
|
|
15
15
|
const n = w(e), t = n.getNextSibling() || n.getPreviousSibling(), o = n.getParentOrThrow();
|
|
16
16
|
if (o.getChildrenSize() > 1 ? n.remove() : o.remove(), t !== null) {
|
|
17
17
|
const s = t.getFirstDescendant();
|
|
@@ -19,7 +19,7 @@ const R = 100, P = (e, n) => {
|
|
|
19
19
|
}
|
|
20
20
|
}, I = (e) => {
|
|
21
21
|
d(e).remove();
|
|
22
|
-
},
|
|
22
|
+
}, A = (e, n) => {
|
|
23
23
|
const t = p(), o = w(e), s = o.getChildrenSize();
|
|
24
24
|
for (let r = 0; r < s; r++) {
|
|
25
25
|
const c = C(0);
|
|
@@ -34,14 +34,14 @@ const R = 100, P = (e, n) => {
|
|
|
34
34
|
throw new Error("Selected node is not a TableCellNode");
|
|
35
35
|
const o = S(e), s = t.getChildren().length, l = d(e);
|
|
36
36
|
let r = m(e);
|
|
37
|
-
const c = l.getChildren(),
|
|
38
|
-
for (let i = 0; i <
|
|
37
|
+
const c = l.getChildren(), R = c.length;
|
|
38
|
+
for (let i = 0; i < R; i++) {
|
|
39
39
|
const a = C(0);
|
|
40
40
|
a.append(u());
|
|
41
41
|
const f = c[i].getChildren()[r];
|
|
42
42
|
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((T) => {
|
|
43
43
|
T.getChildren().forEach((v) => {
|
|
44
|
-
v.setWidth(
|
|
44
|
+
v.setWidth(b / s);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -55,11 +55,11 @@ const R = 100, P = (e, n) => {
|
|
|
55
55
|
t === 1 ? I(e) : x(n, o);
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
D as createTable,
|
|
59
59
|
O as deleteColumn,
|
|
60
|
-
|
|
60
|
+
P as deleteRow,
|
|
61
61
|
I as deleteTable,
|
|
62
62
|
L as insertColumn,
|
|
63
|
-
|
|
63
|
+
A as insertRow
|
|
64
64
|
};
|
|
65
65
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { o as
|
|
3
|
-
import {
|
|
4
|
-
import { useState as
|
|
5
|
-
import { W as
|
|
1
|
+
import { jsxs as P, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { o as y } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { P as p, _ as h, M as C } from "../../../../Lexical.prod-C7FcGFd7.js";
|
|
4
|
+
import { useState as L, useRef as E, useCallback as T, useEffect as c } from "react";
|
|
5
|
+
import { W as g } from "../../../../LexicalTable.prod-DYP5JQC0.js";
|
|
6
6
|
import { BlockFormatPlugin as N } 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-
|
|
11
|
-
import { TableCellContextMenu as
|
|
12
|
-
import { s as
|
|
13
|
-
import { setScrollableContainers as b, removeScrollableContainers as
|
|
10
|
+
import { T as S } from "../../../../TablePlugin-CI_6HCsd.js";
|
|
11
|
+
import { TableCellContextMenu as _ } from "../TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
12
|
+
import { s as z } from "../../../../RteEditor.module-B_3uFnFu.js";
|
|
13
|
+
import { setScrollableContainers as b, removeScrollableContainers as A } from "../../helpers.js";
|
|
14
14
|
const O = ({ editorScrollPosition: m }) => {
|
|
15
|
-
const [t] =
|
|
15
|
+
const [t] = y(), [r, i] = L(null), d = E(null), u = T(() => {
|
|
16
16
|
const e = p();
|
|
17
|
-
if (
|
|
18
|
-
const s = e.anchor.getNode(), l =
|
|
17
|
+
if (h(e)) {
|
|
18
|
+
const s = e.anchor.getNode(), l = g(s);
|
|
19
19
|
if (l) {
|
|
20
20
|
const f = t.getElementByKey(l.getKey()), a = f ? f.getBoundingClientRect() : { right: 0, bottom: 0, height: 0 };
|
|
21
21
|
i({ xPos: a.right, yPos: a.bottom, height: a.height });
|
|
@@ -27,9 +27,9 @@ const O = ({ editorScrollPosition: m }) => {
|
|
|
27
27
|
}, o = () => {
|
|
28
28
|
t.update(() => {
|
|
29
29
|
const e = p();
|
|
30
|
-
if (
|
|
30
|
+
if (h(e)) {
|
|
31
31
|
const s = e.anchor.getNode();
|
|
32
|
-
|
|
32
|
+
g(s) && (C(null), i(null));
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
};
|
|
@@ -40,7 +40,7 @@ const O = ({ editorScrollPosition: m }) => {
|
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
42
|
}, [t, u]), c(() => (b(o), window.addEventListener("scroll", o), window.addEventListener("resize", o), () => {
|
|
43
|
-
window.removeEventListener("scroll", o), window.removeEventListener("resize", o),
|
|
43
|
+
window.removeEventListener("scroll", o), window.removeEventListener("resize", o), A(o);
|
|
44
44
|
}), [t]), c(() => {
|
|
45
45
|
const e = () => {
|
|
46
46
|
b(o);
|
|
@@ -48,12 +48,12 @@ const O = ({ editorScrollPosition: m }) => {
|
|
|
48
48
|
return window.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
49
49
|
window.removeEventListener("keydown", e);
|
|
50
50
|
};
|
|
51
|
-
}, []), /* @__PURE__ */
|
|
51
|
+
}, []), /* @__PURE__ */ P("div", { className: z.editor__toolbar, children: [
|
|
52
52
|
/* @__PURE__ */ n(N, {}),
|
|
53
53
|
/* @__PURE__ */ n(k, {}),
|
|
54
54
|
/* @__PURE__ */ n(S, { isActive: !!r, ref: d }),
|
|
55
55
|
r && /* @__PURE__ */ n(
|
|
56
|
-
|
|
56
|
+
_,
|
|
57
57
|
{
|
|
58
58
|
position: r,
|
|
59
59
|
parentScrollPosition: m,
|
|
@@ -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-CI_6HCsd.js";
|
|
7
7
|
import { TableCellContextMenu as T } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
8
8
|
export {
|
|
9
9
|
l as BlockFormatPlugin,
|