@uva-glass/component-library 1.64.5 → 1.64.6
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-CFhL_6Md.js +4211 -0
- package/dist/Lexical.prod-CFhL_6Md.js.map +1 -0
- package/dist/LexicalClipboard.prod-BsGZ_U-F.js +258 -0
- package/dist/LexicalClipboard.prod-BsGZ_U-F.js.map +1 -0
- package/dist/{LexicalLink.prod-BvJo1BD4.js → LexicalLink.prod-DOD0hvjh.js} +41 -41
- package/dist/LexicalLink.prod-DOD0hvjh.js.map +1 -0
- package/dist/{LexicalList.prod-igdv32dp.js → LexicalList.prod-C66L7HSr.js} +50 -48
- package/dist/LexicalList.prod-C66L7HSr.js.map +1 -0
- package/dist/LexicalSelection.prod-mI1PjnKs.js +86 -0
- package/dist/{LexicalSelection.prod-CL_DfdL6.js.map → LexicalSelection.prod-mI1PjnKs.js.map} +1 -1
- package/dist/LexicalTable.prod-Dg8eGg1m.js +1338 -0
- package/dist/LexicalTable.prod-Dg8eGg1m.js.map +1 -0
- package/dist/LexicalUtils.prod-0Sd05E-o.js +94 -0
- package/dist/LexicalUtils.prod-0Sd05E-o.js.map +1 -0
- package/dist/{TablePlugin-BVkwu1Gt.js → TablePlugin-ChuaCSFq.js} +45 -45
- package/dist/{TablePlugin-BVkwu1Gt.js.map → TablePlugin-ChuaCSFq.js.map} +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FormInput/FormInput.js +2 -2
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +3 -3
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -3
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +9 -9
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +69 -69
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +18 -18
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +10 -10
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +28 -28
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +26 -26
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +486 -485
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +5 -5
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-BKqr9jXh.js → helpers-CnEW_8nD.js} +39 -39
- package/dist/{helpers-BKqr9jXh.js.map → helpers-CnEW_8nD.js.map} +1 -1
- package/dist/index-0wq-B7do.js +238 -0
- package/dist/{index-DPQ9bZx5.js.map → index-0wq-B7do.js.map} +1 -1
- package/dist/{index-DsprzSCj.js → index-B9BWML6P.js} +1025 -963
- package/dist/{index-DsprzSCj.js.map → index-B9BWML6P.js.map} +1 -1
- package/dist/{index-C9QoqAAt.js → index-DQyNeMuh.js} +66 -66
- package/dist/index-DQyNeMuh.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/react-18-BIqxBxbW.js +65 -0
- package/dist/{react-18-C0Aiha-e.js.map → react-18-BIqxBxbW.js.map} +1 -1
- package/dist/storybook__react.d.js +186 -183
- package/dist/storybook__react.d.js.map +1 -1
- package/package.json +19 -19
- package/dist/Lexical.prod-RJB8n7sC.js +0 -4072
- package/dist/Lexical.prod-RJB8n7sC.js.map +0 -1
- package/dist/LexicalClipboard.prod-DB_B0Sr6.js +0 -259
- package/dist/LexicalClipboard.prod-DB_B0Sr6.js.map +0 -1
- package/dist/LexicalLink.prod-BvJo1BD4.js.map +0 -1
- package/dist/LexicalList.prod-igdv32dp.js.map +0 -1
- package/dist/LexicalSelection.prod-CL_DfdL6.js +0 -86
- package/dist/LexicalTable.prod-CfgKmbyy.js +0 -1221
- package/dist/LexicalTable.prod-CfgKmbyy.js.map +0 -1
- package/dist/LexicalUtils.prod-mYf1cd8X.js +0 -94
- package/dist/LexicalUtils.prod-mYf1cd8X.js.map +0 -1
- package/dist/index-C9QoqAAt.js.map +0 -1
- package/dist/index-DPQ9bZx5.js +0 -231
- package/dist/react-18-C0Aiha-e.js +0 -52
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as k, jsxs as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
3
|
-
import { c as
|
|
4
|
-
import { g as
|
|
5
|
-
import { useRef as a, useState as
|
|
6
|
-
import {
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as
|
|
9
|
-
import { LinkContextMenu as
|
|
2
|
+
import { u as $ } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
+
import { c as q } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { g as O, m as G, U as J } from "../../../../LexicalLink.prod-DOD0hvjh.js";
|
|
5
|
+
import { useRef as a, useState as Q, useEffect as m } from "react";
|
|
6
|
+
import { t as X, c as f, a7 as Z, a5 as tt, a as w, a6 as et, F as ot, d as rt } from "../../../../Lexical.prod-CFhL_6Md.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-ChuaCSFq.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-CnEW_8nD.js";
|
|
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";
|
|
12
12
|
import "../../../Buttons/Button.js";
|
|
@@ -21,27 +21,27 @@ import "../../../IconButton/IconButton.js";
|
|
|
21
21
|
import "../../../Input/Input.js";
|
|
22
22
|
import "../../../InputField/InputField.js";
|
|
23
23
|
import "react-router-dom";
|
|
24
|
-
import { setScrollableContainers as
|
|
24
|
+
import { setScrollableContainers as U, removeScrollableContainers as at } from "../../helpers.js";
|
|
25
25
|
import { s as h } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
26
26
|
import { useTranslation as ut } from "../../hooks/useTranslation.js";
|
|
27
27
|
import "../../Providers/LanguageProvider.js";
|
|
28
|
-
import "../../../../index-
|
|
28
|
+
import "../../../../index-0wq-B7do.js";
|
|
29
29
|
import "../../../SelectListbox/SelectListbox.js";
|
|
30
30
|
import "../../../SelectListbox/SelectProvider.js";
|
|
31
31
|
import "../../../Sortable/components/SortableItem.js";
|
|
32
32
|
import "../../../../SortableProvider-BUsvniX7.js";
|
|
33
|
-
const mt = 200,
|
|
33
|
+
const mt = 200, z = (p) => {
|
|
34
34
|
let n = p;
|
|
35
35
|
for (; n; ) {
|
|
36
|
-
if (
|
|
36
|
+
if (O(n))
|
|
37
37
|
return n;
|
|
38
38
|
n = n.getParent();
|
|
39
39
|
}
|
|
40
40
|
return null;
|
|
41
|
-
},
|
|
41
|
+
}, I = (p) => {
|
|
42
42
|
let n = p;
|
|
43
43
|
for (; n; ) {
|
|
44
|
-
if (
|
|
44
|
+
if (O(n))
|
|
45
45
|
return {
|
|
46
46
|
active: !0,
|
|
47
47
|
url: n.getURL(),
|
|
@@ -51,69 +51,69 @@ const mt = 200, O = (p) => {
|
|
|
51
51
|
}
|
|
52
52
|
return !1;
|
|
53
53
|
}, jt = ({ parentScrollPosition: p }) => {
|
|
54
|
-
const n = ut(), [c] =
|
|
54
|
+
const n = ut(), [c] = $(), { flyout: A, showFlyout: E, hideFlyout: C, isVisible: u } = ct(), d = a(), N = a(!1), y = a(""), g = a(""), [L, H] = Q({ active: !1, url: "", linktext: "" }), P = a(u), x = a(null), R = a(null), F = a(), b = () => {
|
|
55
55
|
c.update(() => {
|
|
56
56
|
const e = f();
|
|
57
57
|
x.current = e;
|
|
58
58
|
});
|
|
59
|
-
},
|
|
59
|
+
}, S = () => {
|
|
60
60
|
c.update(() => {
|
|
61
61
|
x.current && ot(x.current);
|
|
62
62
|
});
|
|
63
|
-
},
|
|
64
|
-
|
|
63
|
+
}, M = (e, t) => {
|
|
64
|
+
E({
|
|
65
65
|
position: t,
|
|
66
66
|
children: /* @__PURE__ */ k(
|
|
67
|
-
|
|
67
|
+
st,
|
|
68
68
|
{
|
|
69
69
|
url: e,
|
|
70
|
-
onSave: (o) =>
|
|
70
|
+
onSave: (o) => K(o, ""),
|
|
71
71
|
onDelete: () => V(),
|
|
72
72
|
onClose: D,
|
|
73
|
-
ref:
|
|
73
|
+
ref: F
|
|
74
74
|
}
|
|
75
75
|
)
|
|
76
76
|
});
|
|
77
77
|
}, D = () => {
|
|
78
78
|
var e;
|
|
79
|
-
(e =
|
|
80
|
-
},
|
|
79
|
+
(e = F.current) == null || e.clearForm(), C(), S();
|
|
80
|
+
}, T = () => {
|
|
81
81
|
var t;
|
|
82
|
-
const e = (t =
|
|
83
|
-
!N.current && e && (
|
|
82
|
+
const e = (t = R.current) == null ? void 0 : t.getBoundingClientRect();
|
|
83
|
+
!N.current && e && (b(), E({ position: { top: e.bottom, left: e.left }, ...j }), setTimeout(() => {
|
|
84
84
|
var o;
|
|
85
85
|
return (o = d.current) == null ? void 0 : o.setDefaults("", g.current);
|
|
86
86
|
}, 0));
|
|
87
|
-
},
|
|
88
|
-
C(),
|
|
89
|
-
},
|
|
87
|
+
}, v = () => {
|
|
88
|
+
C(), S();
|
|
89
|
+
}, K = (e, t) => {
|
|
90
90
|
c.update(() => {
|
|
91
91
|
const o = f();
|
|
92
92
|
if (w(o)) {
|
|
93
|
-
const
|
|
93
|
+
const i = o.anchor.getNode(), s = z(i);
|
|
94
94
|
if (t && t !== "") {
|
|
95
|
-
if (
|
|
95
|
+
if (s) {
|
|
96
96
|
const l = rt(t);
|
|
97
|
-
|
|
97
|
+
s.replace(l), l.select();
|
|
98
98
|
}
|
|
99
99
|
if (t !== y.current && y.current === "") {
|
|
100
|
-
const { anchor: l, focus:
|
|
101
|
-
o.insertText(t), l.offset -= t.length,
|
|
100
|
+
const { anchor: l, focus: _ } = o;
|
|
101
|
+
o.insertText(t), l.offset -= t.length, _.offset = l.offset + t.length;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
G(it(e), { target: "_blank" });
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
v();
|
|
107
107
|
});
|
|
108
108
|
}, V = () => {
|
|
109
|
-
c.dispatchCommand(
|
|
109
|
+
c.dispatchCommand(J, null), D();
|
|
110
110
|
}, j = {
|
|
111
111
|
children: /* @__PURE__ */ k(
|
|
112
112
|
nt,
|
|
113
113
|
{
|
|
114
114
|
isLink: L,
|
|
115
|
-
onCloseHandler:
|
|
116
|
-
onSaveHandler: (e, t) =>
|
|
115
|
+
onCloseHandler: v,
|
|
116
|
+
onSaveHandler: (e, t) => K(e, t),
|
|
117
117
|
ref: d
|
|
118
118
|
}
|
|
119
119
|
)
|
|
@@ -124,25 +124,25 @@ const mt = 200, O = (p) => {
|
|
|
124
124
|
}, [d, u]), m(() => {
|
|
125
125
|
const e = (r) => {
|
|
126
126
|
if (w(r) && r.isCollapsed()) {
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
const
|
|
130
|
-
return
|
|
127
|
+
const i = I(r.anchor.getNode());
|
|
128
|
+
if (i) {
|
|
129
|
+
const s = c.getElementByKey(r.anchor.getNode().getKey()), l = s ? { top: s.getBoundingClientRect().bottom, left: s.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
130
|
+
return M(i.url, l), !0;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
return !1;
|
|
134
134
|
}, t = c.registerCommand(
|
|
135
|
-
|
|
135
|
+
X,
|
|
136
136
|
() => {
|
|
137
137
|
const r = f();
|
|
138
138
|
return g.current = (r == null ? void 0 : r.getTextContent()) ?? "", e(r), !1;
|
|
139
139
|
},
|
|
140
140
|
0
|
|
141
141
|
), o = c.registerCommand(
|
|
142
|
-
|
|
142
|
+
Z,
|
|
143
143
|
(r) => {
|
|
144
|
-
const
|
|
145
|
-
return
|
|
144
|
+
const i = f();
|
|
145
|
+
return b(), r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation(), e(i), !1;
|
|
146
146
|
},
|
|
147
147
|
0
|
|
148
148
|
);
|
|
@@ -155,33 +155,33 @@ const mt = 200, O = (p) => {
|
|
|
155
155
|
(o) => {
|
|
156
156
|
if (o.ctrlKey && o.shiftKey && o.key === "U") {
|
|
157
157
|
const r = f();
|
|
158
|
-
if (
|
|
158
|
+
if (b(), !w(r))
|
|
159
159
|
return !1;
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
return (
|
|
160
|
+
const i = I(r.anchor.getNode()), s = (_ = "", W = "") => {
|
|
161
|
+
T(), setTimeout(() => {
|
|
162
|
+
var B;
|
|
163
|
+
return (B = d.current) == null ? void 0 : B.setDefaults(_, W);
|
|
164
164
|
}, 0);
|
|
165
165
|
};
|
|
166
|
-
if (
|
|
167
|
-
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), y.current =
|
|
166
|
+
if (i)
|
|
167
|
+
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), y.current = i.linktext, s(i.url, i.linktext), !0;
|
|
168
168
|
const l = r.getTextContent();
|
|
169
|
-
return l !== "" ? (g.current = l,
|
|
169
|
+
return l !== "" ? (g.current = l, s("", g.current), !0) : (T(), !0);
|
|
170
170
|
}
|
|
171
171
|
return !1;
|
|
172
172
|
},
|
|
173
173
|
et
|
|
174
174
|
), t = c.registerUpdateListener(({ editorState: o }) => {
|
|
175
|
-
|
|
175
|
+
H(
|
|
176
176
|
o.read(() => {
|
|
177
177
|
const r = f();
|
|
178
|
-
if (
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
178
|
+
if (b(), w(r)) {
|
|
179
|
+
const i = r.anchor.getNode(), s = z(i);
|
|
180
|
+
if (s)
|
|
181
181
|
return {
|
|
182
182
|
active: !0,
|
|
183
|
-
url:
|
|
184
|
-
linktext:
|
|
183
|
+
url: s.getURL(),
|
|
184
|
+
linktext: s.getTextContent()
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
return {
|
|
@@ -197,27 +197,27 @@ const mt = 200, O = (p) => {
|
|
|
197
197
|
};
|
|
198
198
|
}, [c]), m(() => {
|
|
199
199
|
var e;
|
|
200
|
-
P.current = u, u || (e =
|
|
200
|
+
P.current = u, u || (e = F.current) == null || e.clearForm();
|
|
201
201
|
}, [u]), m(() => {
|
|
202
|
-
u &&
|
|
202
|
+
u && v();
|
|
203
203
|
}, [p]), m(() => {
|
|
204
204
|
L.active || C();
|
|
205
205
|
}, [L]), m(() => {
|
|
206
|
-
const e = (o) => (
|
|
206
|
+
const e = (o) => (U(t), o.key === "Escape" && P.current && (o.preventDefault(), o.stopPropagation(), v()), !0);
|
|
207
207
|
window.addEventListener("keydown", e, { capture: !0 });
|
|
208
208
|
const t = () => {
|
|
209
209
|
C();
|
|
210
210
|
};
|
|
211
|
-
return
|
|
211
|
+
return U(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
212
212
|
window.removeEventListener("keydown", e), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), at(t);
|
|
213
213
|
};
|
|
214
214
|
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ Y("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
|
|
215
215
|
/* @__PURE__ */ k(
|
|
216
216
|
"button",
|
|
217
217
|
{
|
|
218
|
-
onClick:
|
|
218
|
+
onClick: T,
|
|
219
219
|
title: n.links.linkTooltip,
|
|
220
|
-
className:
|
|
220
|
+
className: q(
|
|
221
221
|
h["editor__toolbar-button"],
|
|
222
222
|
h["editor__toolbar-button--link"],
|
|
223
223
|
L.active && h["editor__toolbar-button--active"]
|
|
@@ -225,15 +225,15 @@ const mt = 200, O = (p) => {
|
|
|
225
225
|
"aria-label": n.aria.labels.link,
|
|
226
226
|
"aria-keyshortcuts": n.aria.keyshortcuts.link,
|
|
227
227
|
type: "button",
|
|
228
|
-
ref:
|
|
228
|
+
ref: R,
|
|
229
229
|
children: /* @__PURE__ */ k(lt, { name: "Link", size: 20 })
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
|
-
|
|
232
|
+
A
|
|
233
233
|
] }) });
|
|
234
234
|
};
|
|
235
235
|
export {
|
|
236
236
|
jt as LinkPlugin,
|
|
237
|
-
|
|
237
|
+
I as getLinkNodeTag
|
|
238
238
|
};
|
|
239
239
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { u as K } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
-
import { Y as N, Q as
|
|
4
|
-
import { b as
|
|
5
|
-
import { useState as p, useEffect as
|
|
3
|
+
import { Y as N, Q as k, G as v, V as S, H as f, q as y } from "../../../../LexicalList.prod-C66L7HSr.js";
|
|
4
|
+
import { b as B } from "../../../../LexicalSelection.prod-mI1PjnKs.js";
|
|
5
|
+
import { useState as p, useEffect as P } from "react";
|
|
6
6
|
import { c as x } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
-
import {
|
|
7
|
+
import { a5 as O, a6 as R, N as U, c as b, a as h, R as w, B as E } from "../../../../Lexical.prod-CFhL_6Md.js";
|
|
8
8
|
import { Icon as Y } from "../../../Icon/Icon.js";
|
|
9
9
|
import { s as l } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
10
10
|
import { useTranslation as $ } from "../../hooks/useTranslation.js";
|
|
11
11
|
const j = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
|
-
}, q = ["bullet", "number"],
|
|
15
|
-
const u = $(), [e] = K(), [g, s] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1),
|
|
14
|
+
}, q = ["bullet", "number"], T = () => {
|
|
15
|
+
const u = $(), [e] = K(), [g, s] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1), D = () => {
|
|
16
16
|
e.update(() => {
|
|
17
17
|
const t = b();
|
|
18
|
-
h(t) &&
|
|
18
|
+
h(t) && B(t, () => E());
|
|
19
19
|
});
|
|
20
|
-
},
|
|
21
|
-
t === "number" && g !== "number" ? (e.dispatchCommand(
|
|
20
|
+
}, I = (t) => {
|
|
21
|
+
t === "number" && g !== "number" ? (e.dispatchCommand(k, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(v, void 0), s("bullet")) : (D(), s("paragraph"));
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return P(() => {
|
|
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
|
+
O,
|
|
26
|
+
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(N, void 0) : e.dispatchCommand(k, 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
|
+
R
|
|
28
28
|
);
|
|
29
29
|
return () => {
|
|
30
30
|
t();
|
|
31
31
|
};
|
|
32
|
-
}, [e, m, c]),
|
|
32
|
+
}, [e, m, c]), P(() => {
|
|
33
33
|
e.registerCommand(
|
|
34
|
-
|
|
34
|
+
U,
|
|
35
35
|
(r) => (r.preventDefault(), e.update(() => {
|
|
36
36
|
const n = b();
|
|
37
37
|
if (!h(n))
|
|
@@ -45,7 +45,7 @@ const j = {
|
|
|
45
45
|
i.append(C), C.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
48
|
-
|
|
48
|
+
w
|
|
49
49
|
);
|
|
50
50
|
const t = e.registerUpdateListener(({ editorState: r }) => {
|
|
51
51
|
r.read(() => {
|
|
@@ -73,7 +73,7 @@ const j = {
|
|
|
73
73
|
}, [e]), /* @__PURE__ */ d("div", { className: l["editor__toolbar-button-group"], children: q.map((t) => /* @__PURE__ */ d(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
onClick: () =>
|
|
76
|
+
onClick: () => I(t),
|
|
77
77
|
title: u.format[`${t}Tooltip`],
|
|
78
78
|
className: x(
|
|
79
79
|
l["editor__toolbar-button"],
|
|
@@ -90,6 +90,6 @@ const j = {
|
|
|
90
90
|
)) });
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
T as ListPlugin
|
|
94
94
|
};
|
|
95
95
|
//# sourceMappingURL=ListPlugin.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { u as m } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
2
2
|
import { useEffect as c } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { i } from "../../../../LexicalUtils.prod-
|
|
5
|
-
import {
|
|
6
|
-
import { d as D } from "../../../../index-
|
|
7
|
-
const
|
|
3
|
+
import { a0 as u, $ as f, c as p } from "../../../../Lexical.prod-CFhL_6Md.js";
|
|
4
|
+
import { u as i } from "../../../../LexicalUtils.prod-0Sd05E-o.js";
|
|
5
|
+
import { N as d } from "../../../../LexicalClipboard.prod-BsGZ_U-F.js";
|
|
6
|
+
import { d as D } from "../../../../index-0wq-B7do.js";
|
|
7
|
+
const g = () => {
|
|
8
8
|
const [e] = m(), l = (t) => {
|
|
9
9
|
t.preventDefault(), e.update(() => {
|
|
10
|
-
const r =
|
|
10
|
+
const r = p(), n = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
|
|
11
11
|
if (n != null && r !== null) {
|
|
12
12
|
const a = n.getData("text/html"), o = new DataTransfer(), s = new D.MSWordNormalizer();
|
|
13
|
-
o.setData("text/html", a), s.isActive(a) && o.setData("text/html", s.normalize(a)),
|
|
13
|
+
o.setData("text/html", a), s.isActive(a) && o.setData("text/html", s.normalize(a)), d(o, r, e);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
return c(() => {
|
|
18
18
|
const t = e.registerCommand(
|
|
19
|
-
|
|
19
|
+
u,
|
|
20
20
|
(r) => r instanceof ClipboardEvent ? (l(r), !0) : !1,
|
|
21
|
-
|
|
21
|
+
f
|
|
22
22
|
);
|
|
23
23
|
return () => {
|
|
24
24
|
t();
|
|
@@ -26,6 +26,6 @@ const P = () => {
|
|
|
26
26
|
}, [e]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
g 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 z } from "../../../../TablePlugin-
|
|
3
|
+
import { b as z } from "../../../../TablePlugin-ChuaCSFq.js";
|
|
4
4
|
import "../../../Buttons/Button.js";
|
|
5
5
|
import "../../../Buttons/LinkButton.js";
|
|
6
6
|
import "@react-aria/button";
|
|
@@ -20,7 +20,7 @@ import "../../hooks/useTranslation.js";
|
|
|
20
20
|
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "../../hooks/components/Flyout.js";
|
|
22
22
|
import "../../Providers/LanguageProvider.js";
|
|
23
|
-
import "../../../../index-
|
|
23
|
+
import "../../../../index-0wq-B7do.js";
|
|
24
24
|
import "../../../SelectListbox/SelectListbox.js";
|
|
25
25
|
import "../../../SelectListbox/SelectProvider.js";
|
|
26
26
|
import "../../../Sortable/components/SortableItem.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
3
|
import "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import "../../../../LexicalTable.prod-
|
|
5
|
-
import "../../../../Lexical.prod-
|
|
4
|
+
import "../../../../LexicalTable.prod-Dg8eGg1m.js";
|
|
5
|
+
import "../../../../Lexical.prod-CFhL_6Md.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as E } from "../../../../TablePlugin-
|
|
7
|
+
import { T as E } from "../../../../TablePlugin-ChuaCSFq.js";
|
|
8
8
|
import "./helpers.js";
|
|
9
9
|
import "../../hooks/useFlyout.js";
|
|
10
10
|
import "../../../Icon/Icon.js";
|
|
@@ -24,7 +24,7 @@ import "../../../../RteEditor.module-oFMKEW6f.js";
|
|
|
24
24
|
import "../../hooks/useTranslation.js";
|
|
25
25
|
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
26
26
|
import "../../Providers/LanguageProvider.js";
|
|
27
|
-
import "../../../../index-
|
|
27
|
+
import "../../../../index-0wq-B7do.js";
|
|
28
28
|
import "../../../SelectListbox/SelectListbox.js";
|
|
29
29
|
import "../../../SelectListbox/SelectProvider.js";
|
|
30
30
|
import "../../../Sortable/components/SortableItem.js";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { C as S, m as h, l as d, _ as w, w as C, s as m, b as E, y as b, a as I } from "../../../../LexicalTable.prod-Dg8eGg1m.js";
|
|
2
|
+
import { B as u } from "../../../../Lexical.prod-CFhL_6Md.js";
|
|
3
|
+
const p = 100, B = (e, n) => {
|
|
4
4
|
const t = S(0, 0, !1);
|
|
5
5
|
for (let o = 0; o < e; o++) {
|
|
6
6
|
const r = h();
|
|
7
7
|
for (let l = 0; l < n; l++) {
|
|
8
|
-
const s = d(0, void 0,
|
|
8
|
+
const s = d(0, void 0, p / n);
|
|
9
9
|
s.append(u()), r.append(s);
|
|
10
10
|
}
|
|
11
11
|
t.append(r);
|
|
12
12
|
}
|
|
13
13
|
return t;
|
|
14
|
-
},
|
|
15
|
-
const n =
|
|
14
|
+
}, O = (e) => {
|
|
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
|
-
},
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
const t = h(), o =
|
|
20
|
+
}, v = (e) => {
|
|
21
|
+
C(e).remove();
|
|
22
|
+
}, z = (e, n) => {
|
|
23
|
+
const t = h(), o = w(e), r = o.getChildrenSize();
|
|
24
24
|
for (let s = 0; s < r; s++) {
|
|
25
25
|
const c = d(0);
|
|
26
26
|
c.append(u()), t.append(c);
|
|
@@ -28,39 +28,39 @@ const b = 100, O = (e, n) => {
|
|
|
28
28
|
n === "insertRowAbove" ? o.insertBefore(t) : o.insertAfter(t);
|
|
29
29
|
const l = t.getFirstDescendant();
|
|
30
30
|
l && l.select();
|
|
31
|
-
},
|
|
32
|
-
const t =
|
|
31
|
+
}, F = (e, n) => {
|
|
32
|
+
const t = w(e);
|
|
33
33
|
if (!m(e))
|
|
34
34
|
throw new Error("Selected node is not a TableCellNode");
|
|
35
|
-
const o =
|
|
36
|
-
let s =
|
|
37
|
-
const c = l.getChildren(),
|
|
38
|
-
for (let i = 0; i <
|
|
35
|
+
const o = E(e), r = t.getChildren().length, l = C(e);
|
|
36
|
+
let s = b(e);
|
|
37
|
+
const c = l.getChildren(), R = c.length;
|
|
38
|
+
for (let i = 0; i < R; i++) {
|
|
39
39
|
const a = d(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
|
-
x.setWidth(
|
|
42
|
+
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((T) => {
|
|
43
|
+
T.getChildren().forEach((x) => {
|
|
44
|
+
x.setWidth(p / 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 (!m(e))
|
|
54
54
|
throw new Error("Selected node is not a TableCellNode");
|
|
55
|
-
const n =
|
|
56
|
-
t === 1 ?
|
|
55
|
+
const n = C(e), t = ((r = n.getFirstChild()) == null ? void 0 : r.getChildrenSize()) || 0, o = b(e);
|
|
56
|
+
t === 1 ? v(e) : I(n, o);
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
B as createTable,
|
|
60
|
+
P as deleteColumn,
|
|
61
|
+
O as deleteRow,
|
|
62
|
+
v as deleteTable,
|
|
63
|
+
F as insertColumn,
|
|
64
|
+
z as insertRow
|
|
65
65
|
};
|
|
66
66
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs as P, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { u as y } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
-
import {
|
|
4
|
-
import { useState as
|
|
5
|
-
import {
|
|
6
|
-
import { BlockFormatPlugin as
|
|
3
|
+
import { c as h, a as g, F as C } from "../../../../Lexical.prod-CFhL_6Md.js";
|
|
4
|
+
import { useState as L, useRef as E, useCallback as S, useEffect as m } from "react";
|
|
5
|
+
import { S as b } from "../../../../LexicalTable.prod-Dg8eGg1m.js";
|
|
6
|
+
import { BlockFormatPlugin as T } from "../BlockFormatPlugin/BlockFormatPlugin.js";
|
|
7
7
|
import { ListPlugin as k } from "../ListPlugin/ListPlugin.js";
|
|
8
|
-
import { LinkPlugin as
|
|
9
|
-
import { HistoryPlugin as
|
|
10
|
-
import { T as
|
|
11
|
-
import { TableCellContextMenu as
|
|
12
|
-
import { s as
|
|
13
|
-
import { setScrollableContainers as
|
|
8
|
+
import { LinkPlugin as N } from "../LinkPlugin/LinkPlugin.js";
|
|
9
|
+
import { HistoryPlugin as x } from "../HistoryPlugin/HistoryPlugin.js";
|
|
10
|
+
import { T as B } from "../../../../TablePlugin-ChuaCSFq.js";
|
|
11
|
+
import { TableCellContextMenu as R } from "../TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
12
|
+
import { s as z } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
13
|
+
import { setScrollableContainers as w, removeScrollableContainers as A } from "../../helpers.js";
|
|
14
14
|
const Q = ({ editorScrollPosition: d }) => {
|
|
15
|
-
const [t] = y(), [i, s] =
|
|
16
|
-
const e =
|
|
17
|
-
if (
|
|
15
|
+
const [t] = y(), [i, s] = L(null), u = E(null), f = S(() => {
|
|
16
|
+
const e = h();
|
|
17
|
+
if (g(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 };
|
|
@@ -22,13 +22,13 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
22
22
|
} else
|
|
23
23
|
s(null);
|
|
24
24
|
}
|
|
25
|
-
}, [t]),
|
|
25
|
+
}, [t]), v = (e) => {
|
|
26
26
|
var r;
|
|
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
|
}
|
|
@@ -40,29 +40,29 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
40
40
|
f();
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
|
-
}, [t, f]), m(() => (
|
|
44
|
-
window.removeEventListener("scroll", o), window.removeEventListener("resize", o),
|
|
43
|
+
}, [t, f]), m(() => (w(o), window.addEventListener("scroll", o), window.addEventListener("resize", o), () => {
|
|
44
|
+
window.removeEventListener("scroll", o), window.removeEventListener("resize", o), A(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__ */ P("div", { className:
|
|
53
|
-
/* @__PURE__ */ n(
|
|
52
|
+
}, []), /* @__PURE__ */ P("div", { className: z.editor__toolbar, children: [
|
|
53
|
+
/* @__PURE__ */ n(T, {}),
|
|
54
54
|
/* @__PURE__ */ n(k, {}),
|
|
55
|
-
/* @__PURE__ */ n(
|
|
55
|
+
/* @__PURE__ */ n(B, { isActive: !!i, ref: u }),
|
|
56
56
|
i && /* @__PURE__ */ n(
|
|
57
|
-
|
|
57
|
+
R,
|
|
58
58
|
{
|
|
59
59
|
position: i,
|
|
60
60
|
parentScrollPosition: d,
|
|
61
|
-
onAction:
|
|
61
|
+
onAction: v
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
|
-
/* @__PURE__ */ n(
|
|
65
|
-
/* @__PURE__ */ n(
|
|
64
|
+
/* @__PURE__ */ n(N, { parentScrollPosition: d }),
|
|
65
|
+
/* @__PURE__ */ n(x, {})
|
|
66
66
|
] });
|
|
67
67
|
};
|
|
68
68
|
export {
|