@uva-glass/component-library 3.0.9 → 3.0.11
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-BqkvGy5o.js → Lexical.prod-pVkgOp1j.js} +1501 -1485
- package/dist/Lexical.prod-pVkgOp1j.js.map +1 -0
- package/dist/LexicalClipboard.prod-DIvwPtmL.js +255 -0
- package/dist/LexicalClipboard.prod-DIvwPtmL.js.map +1 -0
- package/dist/LexicalComposerContext.prod-DLlRM5wP.js +22 -0
- package/dist/LexicalComposerContext.prod-DLlRM5wP.js.map +1 -0
- package/dist/{LexicalLink.prod-D-CG9yYv.js → LexicalLink.prod-NMeHB9CR.js} +67 -71
- package/dist/LexicalLink.prod-NMeHB9CR.js.map +1 -0
- package/dist/{LexicalList.prod-CDTuG8cz.js → LexicalList.prod-CicvwkCx.js} +121 -122
- package/dist/LexicalList.prod-CicvwkCx.js.map +1 -0
- package/dist/LexicalSelection.prod-mQvH0_ap.js +85 -0
- package/dist/LexicalSelection.prod-mQvH0_ap.js.map +1 -0
- package/dist/LexicalTable.prod-Bb6g8CAC.js +1542 -0
- package/dist/LexicalTable.prod-Bb6g8CAC.js.map +1 -0
- package/dist/LexicalUtils.prod-C_aSRWfh.js +109 -0
- package/dist/LexicalUtils.prod-C_aSRWfh.js.map +1 -0
- package/dist/{TablePlugin-BBgBJKsb.js → TablePlugin-o1MveXq2.js} +63 -63
- package/dist/{TablePlugin-BBgBJKsb.js.map → TablePlugin-o1MveXq2.js.map} +1 -1
- package/dist/TimelineItem-v4zDdKUz.js +52 -0
- package/dist/TimelineItem-v4zDdKUz.js.map +1 -0
- package/dist/__mocks__/svgrMock.js.map +1 -1
- package/dist/assets/TimelineItem.css +1 -0
- package/dist/assets/VarIndicator.css +1 -1
- package/dist/assets/variables.css +3 -3
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.test.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.test.js +1 -1
- package/dist/components/Buttons/MenuButton.test.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/Label/Label.test.js.map +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/OverlayStepBar/OverlayStepBar.js +1 -1
- 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 +11 -11
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +7 -7
- 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 +39 -39
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +17 -17
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +12 -12
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +22 -22
- 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 +483 -492
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +5 -5
- package/dist/components/Timeline/Timeline.d.ts +28 -0
- package/dist/components/Timeline/Timeline.js +29 -0
- package/dist/components/Timeline/Timeline.js.map +1 -0
- package/dist/components/Timeline/Timeline.stories.d.ts +5 -0
- package/dist/components/Timeline/Timeline.stories.js +43 -0
- package/dist/components/Timeline/Timeline.stories.js.map +1 -0
- package/dist/components/Timeline/Timeline.test.d.ts +0 -0
- package/dist/components/Timeline/Timeline.test.js +80 -0
- package/dist/components/Timeline/Timeline.test.js.map +1 -0
- package/dist/components/Timeline/TimelineItem.d.ts +2 -0
- package/dist/components/Timeline/TimelineItem.js +7 -0
- package/dist/components/Timeline/TimelineItem.js.map +1 -0
- package/dist/components/Timeline/index.d.ts +1 -0
- package/dist/components/Timeline/index.js +5 -0
- package/dist/components/Timeline/index.js.map +1 -0
- package/dist/components/Timeline/mockTimelineItem.d.ts +30 -0
- package/dist/components/Timeline/mockTimelineItem.js +95 -0
- package/dist/components/Timeline/mockTimelineItem.js.map +1 -0
- package/dist/components/VarIndicator/VarIndicator.js +11 -11
- package/dist/components/VarIndicator/VarIndicator.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +23 -21
- package/dist/components/index.js.map +1 -1
- package/dist/helpers-CtrLGKFA.js +164 -0
- package/dist/helpers-CtrLGKFA.js.map +1 -0
- package/dist/index.js +23 -21
- package/dist/index.js.map +1 -1
- package/dist/setupTests.js.map +1 -1
- package/package.json +20 -20
- package/dist/Lexical.prod-BqkvGy5o.js.map +0 -1
- package/dist/LexicalClipboard.prod-BSR9LEVL.js +0 -258
- package/dist/LexicalClipboard.prod-BSR9LEVL.js.map +0 -1
- package/dist/LexicalComposerContext.prod--Rm7-Z9o.js +0 -26
- package/dist/LexicalComposerContext.prod--Rm7-Z9o.js.map +0 -1
- package/dist/LexicalLink.prod-D-CG9yYv.js.map +0 -1
- package/dist/LexicalList.prod-CDTuG8cz.js.map +0 -1
- package/dist/LexicalSelection.prod-BxYY0fGG.js +0 -86
- package/dist/LexicalSelection.prod-BxYY0fGG.js.map +0 -1
- package/dist/LexicalTable.prod-Ckge-lZb.js +0 -1515
- package/dist/LexicalTable.prod-Ckge-lZb.js.map +0 -1
- package/dist/LexicalUtils.prod-CIQUUsvA.js +0 -112
- package/dist/LexicalUtils.prod-CIQUUsvA.js.map +0 -1
- package/dist/helpers-CzeCSkV-.js +0 -168
- package/dist/helpers-CzeCSkV-.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as k, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as k, jsxs as W } from "react/jsx-runtime";
|
|
2
|
+
import { o as Y } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
3
|
import { c as q } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import {
|
|
4
|
+
import { d as U, O as G, N as J } from "../../../../LexicalLink.prod-NMeHB9CR.js";
|
|
5
5
|
import { useRef as a, useState as X, useEffect as m } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
6
|
+
import { S as Z, a as f, i as $, ak as tt, l as N, N as et, g as ot, Q as rt } from "../../../../Lexical.prod-pVkgOp1j.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-o1MveXq2.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-CtrLGKFA.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";
|
|
@@ -22,7 +22,7 @@ import "../../../IconButton/IconButton.js";
|
|
|
22
22
|
import "../../../Input/Input.js";
|
|
23
23
|
import "../../../InputField/InputField.js";
|
|
24
24
|
import "react-router";
|
|
25
|
-
import { setScrollableContainers as
|
|
25
|
+
import { setScrollableContainers as O, removeScrollableContainers as at } from "../../helpers.js";
|
|
26
26
|
import { s as h } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
27
27
|
import { useTranslation as ut } from "../../hooks/useTranslation.js";
|
|
28
28
|
import "../../Providers/LanguageProvider.js";
|
|
@@ -31,7 +31,7 @@ import "../../../SelectListbox/SelectListbox.js";
|
|
|
31
31
|
import "../../../SelectListbox/SelectProvider.js";
|
|
32
32
|
import "../../../Sortable/components/SortableItem.js";
|
|
33
33
|
import "../../../../SortableProvider-Ck_XnBVq.js";
|
|
34
|
-
const mt = 200,
|
|
34
|
+
const mt = 200, z = (p) => {
|
|
35
35
|
let n = p;
|
|
36
36
|
for (; n; ) {
|
|
37
37
|
if (U(n))
|
|
@@ -39,7 +39,7 @@ const mt = 200, I = (p) => {
|
|
|
39
39
|
n = n.getParent();
|
|
40
40
|
}
|
|
41
41
|
return null;
|
|
42
|
-
},
|
|
42
|
+
}, I = (p) => {
|
|
43
43
|
let n = p;
|
|
44
44
|
for (; n; ) {
|
|
45
45
|
if (U(n))
|
|
@@ -51,15 +51,15 @@ const mt = 200, I = (p) => {
|
|
|
51
51
|
n = n.getParent();
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
|
-
},
|
|
55
|
-
const n = ut(), [c] =
|
|
54
|
+
}, Qt = ({ parentScrollPosition: p }) => {
|
|
55
|
+
const n = ut(), [c] = Y(), { flyout: A, showFlyout: _, hideFlyout: C, isVisible: u } = ct(), d = a(void 0), w = a(!1), y = a(""), g = a(""), [L, H] = X({ active: !1, url: "", linktext: "" }), P = a(u), T = a(null), S = a(null), x = a(void 0), b = () => {
|
|
56
56
|
c.update(() => {
|
|
57
57
|
const e = f();
|
|
58
|
-
|
|
58
|
+
T.current = e;
|
|
59
59
|
});
|
|
60
60
|
}, R = () => {
|
|
61
61
|
c.update(() => {
|
|
62
|
-
|
|
62
|
+
T.current && ot(T.current);
|
|
63
63
|
});
|
|
64
64
|
}, M = (e, t) => {
|
|
65
65
|
_({
|
|
@@ -71,27 +71,27 @@ const mt = 200, I = (p) => {
|
|
|
71
71
|
onSave: (o) => K(o, ""),
|
|
72
72
|
onDelete: () => V(),
|
|
73
73
|
onClose: D,
|
|
74
|
-
ref:
|
|
74
|
+
ref: x
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
});
|
|
78
78
|
}, D = () => {
|
|
79
79
|
var e;
|
|
80
|
-
(e =
|
|
80
|
+
(e = x.current) == null || e.clearForm(), C(), 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 && (b(), _({ 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
|
+
}, v = () => {
|
|
89
89
|
C(), R();
|
|
90
90
|
}, K = (e, t) => {
|
|
91
91
|
c.update(() => {
|
|
92
92
|
const o = f();
|
|
93
|
-
if (
|
|
94
|
-
const i = o.anchor.getNode(), s =
|
|
93
|
+
if (N(o)) {
|
|
94
|
+
const i = o.anchor.getNode(), s = z(i);
|
|
95
95
|
if (t && t !== "") {
|
|
96
96
|
if (s) {
|
|
97
97
|
const l = rt(t);
|
|
@@ -102,18 +102,18 @@ const mt = 200, I = (p) => {
|
|
|
102
102
|
o.insertText(t), l.offset -= t.length, E.offset = l.offset + t.length;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
J(it(e), { target: "_blank" });
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
v();
|
|
108
108
|
});
|
|
109
109
|
}, V = () => {
|
|
110
|
-
c.dispatchCommand(
|
|
111
|
-
},
|
|
110
|
+
c.dispatchCommand(G, null), D();
|
|
111
|
+
}, j = {
|
|
112
112
|
children: /* @__PURE__ */ k(
|
|
113
113
|
nt,
|
|
114
114
|
{
|
|
115
115
|
isLink: L,
|
|
116
|
-
onCloseHandler:
|
|
116
|
+
onCloseHandler: v,
|
|
117
117
|
onSaveHandler: (e, t) => K(e, t),
|
|
118
118
|
ref: d
|
|
119
119
|
}
|
|
@@ -124,8 +124,8 @@ const mt = 200, I = (p) => {
|
|
|
124
124
|
u ? (w.current = !0, (t = d.current) == null || t.focusFirstField()) : ((e = d.current) == null || e.clearForm(), y.current = g.current = "", setTimeout(() => w.current = !1, mt));
|
|
125
125
|
}, [d, u]), m(() => {
|
|
126
126
|
const e = (r) => {
|
|
127
|
-
if (
|
|
128
|
-
const i =
|
|
127
|
+
if (N(r) && r.isCollapsed()) {
|
|
128
|
+
const i = I(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
131
|
return M(i.url, l), !0;
|
|
@@ -143,7 +143,7 @@ const mt = 200, I = (p) => {
|
|
|
143
143
|
$,
|
|
144
144
|
(r) => {
|
|
145
145
|
const i = f();
|
|
146
|
-
return
|
|
146
|
+
return b(), r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation(), e(i), !1;
|
|
147
147
|
},
|
|
148
148
|
0
|
|
149
149
|
);
|
|
@@ -156,12 +156,12 @@ 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 (b(), !N(r))
|
|
160
160
|
return !1;
|
|
161
|
-
const i =
|
|
161
|
+
const i = I(r.anchor.getNode()), s = (E = "", Q = "") => {
|
|
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, Q);
|
|
165
165
|
}, 0);
|
|
166
166
|
};
|
|
167
167
|
if (i)
|
|
@@ -176,8 +176,8 @@ const mt = 200, I = (p) => {
|
|
|
176
176
|
H(
|
|
177
177
|
o.read(() => {
|
|
178
178
|
const r = f();
|
|
179
|
-
if (
|
|
180
|
-
const i = r.anchor.getNode(), s =
|
|
179
|
+
if (b(), N(r)) {
|
|
180
|
+
const i = r.anchor.getNode(), s = z(i);
|
|
181
181
|
if (s)
|
|
182
182
|
return {
|
|
183
183
|
active: !0,
|
|
@@ -198,21 +198,21 @@ const mt = 200, I = (p) => {
|
|
|
198
198
|
};
|
|
199
199
|
}, [c]), m(() => {
|
|
200
200
|
var e;
|
|
201
|
-
P.current = u, u || (e =
|
|
201
|
+
P.current = u, u || (e = x.current) == null || e.clearForm();
|
|
202
202
|
}, [u]), m(() => {
|
|
203
|
-
u &&
|
|
203
|
+
u && v();
|
|
204
204
|
}, [p]), m(() => {
|
|
205
205
|
L.active || C();
|
|
206
206
|
}, [L]), m(() => {
|
|
207
|
-
const e = (o) => (
|
|
207
|
+
const e = (o) => (O(t), o.key === "Escape" && P.current && (o.preventDefault(), o.stopPropagation(), v()), !0);
|
|
208
208
|
window.addEventListener("keydown", e, { capture: !0 });
|
|
209
209
|
const t = () => {
|
|
210
210
|
C();
|
|
211
211
|
};
|
|
212
|
-
return
|
|
212
|
+
return O(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__ */ W("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
|
|
216
216
|
/* @__PURE__ */ k(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
@@ -234,7 +234,7 @@ const mt = 200, I = (p) => {
|
|
|
234
234
|
] }) });
|
|
235
235
|
};
|
|
236
236
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
Qt as LinkPlugin,
|
|
238
|
+
I as getLinkNodeTag
|
|
239
239
|
};
|
|
240
240
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
2
|
+
import { o as S } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { r as C, t as k, Z as P, $ as y, Y as f, X as E } from "../../../../LexicalList.prod-CicvwkCx.js";
|
|
4
|
+
import { _ as O } from "../../../../LexicalSelection.prod-mQvH0_ap.js";
|
|
5
5
|
import { useState as p, useEffect as D } from "react";
|
|
6
|
-
import { c as
|
|
7
|
-
import {
|
|
8
|
-
import { Icon as
|
|
6
|
+
import { c as x } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
+
import { ak as T, N as U, M as $, a as b, l as h, E as v, T as w } from "../../../../Lexical.prod-pVkgOp1j.js";
|
|
8
|
+
import { Icon as B } from "../../../Icon/Icon.js";
|
|
9
9
|
import { s as u } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
10
|
-
import { useTranslation as
|
|
11
|
-
const
|
|
10
|
+
import { useTranslation as Y } from "../../hooks/useTranslation.js";
|
|
11
|
+
const j = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
|
-
}, z = ["bullet", "number"],
|
|
15
|
-
const l =
|
|
14
|
+
}, z = ["bullet", "number"], R = () => {
|
|
15
|
+
const l = Y(), [e] = S(), [g, n] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1), I = () => {
|
|
16
16
|
e.update(() => {
|
|
17
17
|
const t = b();
|
|
18
|
-
h(t) &&
|
|
18
|
+
h(t) && O(t, () => w());
|
|
19
19
|
});
|
|
20
20
|
}, K = (t) => {
|
|
21
21
|
t === "number" && g !== "number" ? (e.dispatchCommand(k, void 0), n("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(P, void 0), n("bullet")) : (I(), n("paragraph"));
|
|
22
22
|
};
|
|
23
23
|
return D(() => {
|
|
24
24
|
const t = e.registerCommand(
|
|
25
|
-
|
|
25
|
+
T,
|
|
26
26
|
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(C, void 0) : e.dispatchCommand(k, void 0), !0) : r.ctrlKey && r.shiftKey && r.code === "Digit8" ? (r.preventDefault(), c ? e.dispatchCommand(C, void 0) : e.dispatchCommand(P, void 0), !0) : !1,
|
|
27
27
|
U
|
|
28
28
|
);
|
|
@@ -31,7 +31,7 @@ const v = {
|
|
|
31
31
|
};
|
|
32
32
|
}, [e, m, c]), D(() => {
|
|
33
33
|
e.registerCommand(
|
|
34
|
-
|
|
34
|
+
$,
|
|
35
35
|
(r) => (r.preventDefault(), e.update(() => {
|
|
36
36
|
const i = b();
|
|
37
37
|
if (!h(i))
|
|
@@ -45,7 +45,7 @@ const v = {
|
|
|
45
45
|
s.append(N), N.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
48
|
-
|
|
48
|
+
v
|
|
49
49
|
);
|
|
50
50
|
const t = e.registerUpdateListener(({ editorState: r }) => {
|
|
51
51
|
r.read(() => {
|
|
@@ -75,7 +75,7 @@ const v = {
|
|
|
75
75
|
{
|
|
76
76
|
onClick: () => K(t),
|
|
77
77
|
title: l.format[`${t}Tooltip`],
|
|
78
|
-
className:
|
|
78
|
+
className: x(
|
|
79
79
|
u["editor__toolbar-button"],
|
|
80
80
|
u[`editor__toolbar-button--${t}`],
|
|
81
81
|
t === "bullet" && c && u["editor__toolbar-button--active"],
|
|
@@ -84,12 +84,12 @@ const v = {
|
|
|
84
84
|
"aria-label": l.aria.labels[t],
|
|
85
85
|
"aria-keyshortcuts": l.aria.keyshortcuts[t],
|
|
86
86
|
type: "button",
|
|
87
|
-
children: /* @__PURE__ */ d(
|
|
87
|
+
children: /* @__PURE__ */ d(B, { name: j[t], size: 24 })
|
|
88
88
|
},
|
|
89
89
|
t
|
|
90
90
|
)) });
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
R as ListPlugin
|
|
94
94
|
};
|
|
95
95
|
//# sourceMappingURL=ListPlugin.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as m } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
2
2
|
import { useEffect as c } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ac as f, z as p, a as u } from "../../../../Lexical.prod-pVkgOp1j.js";
|
|
4
|
+
import { E as i } from "../../../../LexicalUtils.prod-C_aSRWfh.js";
|
|
5
|
+
import { D as d } from "../../../../LexicalClipboard.prod-DIvwPtmL.js";
|
|
6
6
|
import { d as D } from "../../../../index-B3c5pcHk.js";
|
|
7
|
-
const
|
|
8
|
-
const [
|
|
9
|
-
t.preventDefault(),
|
|
7
|
+
const z = () => {
|
|
8
|
+
const [a] = m(), l = (t) => {
|
|
9
|
+
t.preventDefault(), a.update(() => {
|
|
10
10
|
const r = u(), n = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
|
|
11
11
|
if (n != null && r !== null) {
|
|
12
|
-
const
|
|
13
|
-
o.setData("text/html",
|
|
12
|
+
const e = n.getData("text/html"), o = new DataTransfer(), s = new D.MSWordNormalizer();
|
|
13
|
+
o.setData("text/html", e), s.isActive(e) && o.setData("text/html", s.normalize(e)), d(o, r, a);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
return c(() => {
|
|
18
|
-
const t =
|
|
18
|
+
const t = a.registerCommand(
|
|
19
19
|
f,
|
|
20
20
|
(r) => r instanceof ClipboardEvent ? (l(r), !0) : !1,
|
|
21
21
|
p
|
|
@@ -23,9 +23,9 @@ const P = () => {
|
|
|
23
23
|
return () => {
|
|
24
24
|
t();
|
|
25
25
|
};
|
|
26
|
-
}, [
|
|
26
|
+
}, [a]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
z 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-o1MveXq2.js";
|
|
4
4
|
import "../../../Buttons/Button.js";
|
|
5
5
|
import "../../../Buttons/LinkButton.js";
|
|
6
6
|
import "@react-aria/button";
|
package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as y, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as _, useRef as b, useEffect as R } from "react";
|
|
3
3
|
import { c as w } from "../../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import {
|
|
4
|
+
import { o as P } from "../../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
5
5
|
import { Icon as $ } from "../../../../Icon/Icon.js";
|
|
6
6
|
import { useTranslation as H } from "../../../hooks/useTranslation.js";
|
|
7
7
|
import '../../../../../assets/TableCellContextMenu.css';const n = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../../../../LexicalComposerContext.prod
|
|
2
|
+
import "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
3
|
import "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import "../../../../LexicalTable.prod-
|
|
5
|
-
import "../../../../Lexical.prod-
|
|
4
|
+
import "../../../../LexicalTable.prod-Bb6g8CAC.js";
|
|
5
|
+
import "../../../../Lexical.prod-pVkgOp1j.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as F } from "../../../../TablePlugin-
|
|
7
|
+
import { T as F } from "../../../../TablePlugin-o1MveXq2.js";
|
|
8
8
|
import "./helpers.js";
|
|
9
9
|
import "../../hooks/useFlyout.js";
|
|
10
10
|
import "../../../Icon/Icon.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as u } from "../../../../Lexical.prod-
|
|
3
|
-
const
|
|
4
|
-
const t =
|
|
1
|
+
import { W as d, v as h, B as m, X as S, z as w, H as v, x as C, A as p, $ as E } from "../../../../LexicalTable.prod-Bb6g8CAC.js";
|
|
2
|
+
import { T as u } from "../../../../Lexical.prod-pVkgOp1j.js";
|
|
3
|
+
const b = 100, D = (e, n) => {
|
|
4
|
+
const t = E(0, 0, !1);
|
|
5
5
|
for (let o = 0; o < e; o++) {
|
|
6
6
|
const r = p();
|
|
7
7
|
for (let l = 0; l < n; l++) {
|
|
8
|
-
const s = C(0, void 0,
|
|
8
|
+
const s = C(0, void 0, b / n);
|
|
9
9
|
s.append(u()), r.append(s);
|
|
10
10
|
}
|
|
11
11
|
t.append(r);
|
|
12
12
|
}
|
|
13
13
|
return t;
|
|
14
|
-
},
|
|
14
|
+
}, B = (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 r = t.getFirstDescendant();
|
|
18
18
|
r && r.select();
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, I = (e) => {
|
|
21
21
|
d(e).remove();
|
|
22
|
-
},
|
|
22
|
+
}, O = (e, n) => {
|
|
23
23
|
const t = p(), o = w(e), r = o.getChildrenSize();
|
|
24
24
|
for (let s = 0; s < r; s++) {
|
|
25
25
|
const c = C(0);
|
|
@@ -28,39 +28,39 @@ const T = 100, D = (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
|
+
}, F = (e, n) => {
|
|
32
32
|
const t = w(e);
|
|
33
33
|
if (!h(e))
|
|
34
34
|
throw new Error("Selected node is not a TableCellNode");
|
|
35
|
-
const o =
|
|
35
|
+
const o = v(e), r = t.getChildren().length, l = d(e);
|
|
36
36
|
let s = m(e);
|
|
37
|
-
const c = l.getChildren(),
|
|
38
|
-
for (let i = 0; i <
|
|
37
|
+
const c = l.getChildren(), T = c.length;
|
|
38
|
+
for (let i = 0; i < T; i++) {
|
|
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((R) => {
|
|
44
|
+
R.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
|
+
}, P = (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 ? I(e) : S(n, o);
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
59
|
D as createTable,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
P as deleteColumn,
|
|
61
|
+
B as deleteRow,
|
|
62
|
+
I as deleteTable,
|
|
63
|
+
F as insertColumn,
|
|
64
|
+
O as insertRow
|
|
65
65
|
};
|
|
66
66
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useState as
|
|
5
|
-
import {
|
|
6
|
-
import { BlockFormatPlugin as
|
|
1
|
+
import { jsxs as L, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { o as P } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { a as g, l as h, g as y } from "../../../../Lexical.prod-pVkgOp1j.js";
|
|
4
|
+
import { useState as C, useRef as E, useCallback as T, useEffect as m } from "react";
|
|
5
|
+
import { L as b } from "../../../../LexicalTable.prod-Bb6g8CAC.js";
|
|
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-
|
|
10
|
+
import { T as S } from "../../../../TablePlugin-o1MveXq2.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 w, removeScrollableContainers as
|
|
13
|
+
import { setScrollableContainers as w, removeScrollableContainers as K } from "../../helpers.js";
|
|
14
14
|
const Q = ({ editorScrollPosition: d }) => {
|
|
15
|
-
const [t] =
|
|
16
|
-
const e =
|
|
17
|
-
if (
|
|
15
|
+
const [t] = P(), [i, s] = C(null), u = E(null), f = T(() => {
|
|
16
|
+
const e = g();
|
|
17
|
+
if (h(e)) {
|
|
18
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 };
|
|
@@ -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 = g();
|
|
31
|
+
if (h(e)) {
|
|
32
32
|
const l = e.anchor.getNode();
|
|
33
|
-
b(l) && (
|
|
33
|
+
b(l) && (y(null), s(null));
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
};
|
|
@@ -41,7 +41,7 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
}, [t, f]), m(() => (w(o), window.addEventListener("scroll", o), window.addEventListener("resize", o), () => {
|
|
44
|
-
window.removeEventListener("scroll", o), window.removeEventListener("resize", o),
|
|
44
|
+
window.removeEventListener("scroll", o), window.removeEventListener("resize", o), K(o);
|
|
45
45
|
}), [t]), m(() => {
|
|
46
46
|
const e = () => {
|
|
47
47
|
w(o);
|
|
@@ -49,8 +49,8 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
49
49
|
return window.addEventListener("keydown", e, { capture: !0 }), () => {
|
|
50
50
|
window.removeEventListener("keydown", e);
|
|
51
51
|
};
|
|
52
|
-
}, []), /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */ n(
|
|
52
|
+
}, []), /* @__PURE__ */ L("div", { className: A.editor__toolbar, children: [
|
|
53
|
+
/* @__PURE__ */ n(N, {}),
|
|
54
54
|
/* @__PURE__ */ n(k, {}),
|
|
55
55
|
/* @__PURE__ */ n(S, { isActive: !!i, ref: u }),
|
|
56
56
|
i && /* @__PURE__ */ n(
|
|
@@ -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-o1MveXq2.js";
|
|
7
7
|
import { TableCellContextMenu as T } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
8
8
|
export {
|
|
9
9
|
l as BlockFormatPlugin,
|