@uva-glass/component-library 3.54.1 → 3.54.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-YJ1n9pVJ.js → Lexical.prod-A4JuKqM3.js} +1494 -1428
- package/dist/Lexical.prod-A4JuKqM3.js.map +1 -0
- package/dist/{LexicalClipboard.prod-CDPAGlNs.js → LexicalClipboard.prod-CoyZP29w.js} +60 -60
- package/dist/{LexicalClipboard.prod-CDPAGlNs.js.map → LexicalClipboard.prod-CoyZP29w.js.map} +1 -1
- package/dist/{LexicalExtension.prod-2-giLTv9.js → LexicalExtension.prod-DFPuTMk1.js} +94 -93
- package/dist/LexicalExtension.prod-DFPuTMk1.js.map +1 -0
- package/dist/LexicalLink.prod-Dp06n3Hn.js +561 -0
- package/dist/LexicalLink.prod-Dp06n3Hn.js.map +1 -0
- package/dist/LexicalList.prod-D3TdO_Pq.js +632 -0
- package/dist/LexicalList.prod-D3TdO_Pq.js.map +1 -0
- package/dist/{LexicalSelection.prod-CpZE7Sey.js → LexicalSelection.prod-BapitO0n.js} +39 -39
- package/dist/{LexicalSelection.prod-CpZE7Sey.js.map → LexicalSelection.prod-BapitO0n.js.map} +1 -1
- package/dist/LexicalTable.prod-bzYpvqMi.js +1892 -0
- package/dist/LexicalTable.prod-bzYpvqMi.js.map +1 -0
- package/dist/LexicalUtils.prod-CAsHFX57.js +134 -0
- package/dist/LexicalUtils.prod-CAsHFX57.js.map +1 -0
- package/dist/{TableCellResizerPlugin-BTfuE_kM.js → TableCellResizerPlugin-ffA1s2mD.js} +62 -62
- package/dist/{TableCellResizerPlugin-BTfuE_kM.js.map → TableCellResizerPlugin-ffA1s2mD.js.map} +1 -1
- package/dist/{TablePlugin-bFqq2Yd9.js → TablePlugin-CzmrXpxk.js} +89 -89
- package/dist/{TablePlugin-bFqq2Yd9.js.map → TablePlugin-CzmrXpxk.js.map} +1 -1
- package/dist/{chunk-2N4WE3KZ-nJkI9rUN.js → chunk-OPOZOKLO-nJkI9rUN.js} +1 -1
- package/dist/{chunk-2N4WE3KZ-nJkI9rUN.js.map → chunk-OPOZOKLO-nJkI9rUN.js.map} +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.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/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 +4 -4
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +51 -51
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +42 -42
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +7 -7
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +22 -22
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +24 -24
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +34 -34
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +488 -494
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +20 -20
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +15 -15
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +13 -13
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/storybook__react.d.js +1 -1
- package/package.json +15 -15
- package/dist/Lexical.prod-YJ1n9pVJ.js.map +0 -1
- package/dist/LexicalExtension.prod-2-giLTv9.js.map +0 -1
- package/dist/LexicalLink.prod-u8L4ioQd.js +0 -528
- package/dist/LexicalLink.prod-u8L4ioQd.js.map +0 -1
- package/dist/LexicalList.prod-DMU0XSLO.js +0 -630
- package/dist/LexicalList.prod-DMU0XSLO.js.map +0 -1
- package/dist/LexicalTable.prod-BOlKc5zf.js +0 -1846
- package/dist/LexicalTable.prod-BOlKc5zf.js.map +0 -1
- package/dist/LexicalUtils.prod-BQnuAaA9.js +0 -92
- package/dist/LexicalUtils.prod-BQnuAaA9.js.map +0 -1
|
@@ -18,7 +18,7 @@ import "../IconButton/IconButton.js";
|
|
|
18
18
|
import "../Input/Input.js";
|
|
19
19
|
import "../InputField/InputField.js";
|
|
20
20
|
import "react-router";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-CzmrXpxk.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
import { s as O, f as _ } from "../../index-B_q_4aBT.js";
|
|
3
|
-
import { I as C, a as v } from "../../chunk-
|
|
3
|
+
import { I as C, a as v } from "../../chunk-OPOZOKLO-nJkI9rUN.js";
|
|
4
4
|
import { useState as R } from "react";
|
|
5
5
|
import { CheckboxTree as u } from "./CheckboxTree.js";
|
|
6
6
|
import { Chip as w } from "../Chip/Chip.js";
|
|
@@ -17,7 +17,7 @@ import "../IconButton/IconButton.js";
|
|
|
17
17
|
import "../Input/Input.js";
|
|
18
18
|
import "../InputField/InputField.js";
|
|
19
19
|
import "react-router";
|
|
20
|
-
import "../../TablePlugin-
|
|
20
|
+
import "../../TablePlugin-CzmrXpxk.js";
|
|
21
21
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
22
22
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
23
23
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -17,7 +17,7 @@ import "../GridRow/GridRow.js";
|
|
|
17
17
|
import "../IconButton/IconButton.js";
|
|
18
18
|
import "../Input/Input.js";
|
|
19
19
|
import "react-router";
|
|
20
|
-
import "../../TablePlugin-
|
|
20
|
+
import "../../TablePlugin-CzmrXpxk.js";
|
|
21
21
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
22
22
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
23
23
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { f as d } from "../../index-B_q_4aBT.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
|
-
import { M as e } from "../../TablePlugin-
|
|
4
|
+
import { M as e } from "../../TablePlugin-CzmrXpxk.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
const C = `
|
|
7
7
|
// MultiSelectHeader can be added optionally
|
|
@@ -16,7 +16,7 @@ import "../../IconButton/IconButton.js";
|
|
|
16
16
|
import "../../Input/Input.js";
|
|
17
17
|
import "../../InputField/InputField.js";
|
|
18
18
|
import "react-router";
|
|
19
|
-
import { a as C } from "../../../TablePlugin-
|
|
19
|
+
import { a as C } from "../../../TablePlugin-CzmrXpxk.js";
|
|
20
20
|
import "../../RteEditor/Providers/LanguageProvider.js";
|
|
21
21
|
import "../../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
22
|
import "../../RteEditor/hooks/components/Flyout.js";
|
|
@@ -18,7 +18,7 @@ import "../Input/Input.js";
|
|
|
18
18
|
import "../InputField/InputField.js";
|
|
19
19
|
import { Label as I } from "../Label/Label.js";
|
|
20
20
|
import "react-router";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-CzmrXpxk.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -18,7 +18,7 @@ import "../GridRow/GridRow.js";
|
|
|
18
18
|
import "../IconButton/IconButton.js";
|
|
19
19
|
import "../Input/Input.js";
|
|
20
20
|
import "../InputField/InputField.js";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-CzmrXpxk.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -18,7 +18,7 @@ import "../IconButton/IconButton.js";
|
|
|
18
18
|
import "../Input/Input.js";
|
|
19
19
|
import "../InputField/InputField.js";
|
|
20
20
|
import "react-router";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-CzmrXpxk.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -15,7 +15,7 @@ import "../../IconButton/IconButton.js";
|
|
|
15
15
|
import "../../Input/Input.js";
|
|
16
16
|
import "../../InputField/InputField.js";
|
|
17
17
|
import "react-router";
|
|
18
|
-
import "../../../TablePlugin-
|
|
18
|
+
import "../../../TablePlugin-CzmrXpxk.js";
|
|
19
19
|
import "../Providers/LanguageProvider.js";
|
|
20
20
|
import "../Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "../hooks/components/Flyout.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { o as u } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
3
3
|
import { c as f } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import {
|
|
4
|
+
import { $ as _, w as p, a8 as h } from "../../../../Lexical.prod-A4JuKqM3.js";
|
|
5
5
|
import { useState as l, useEffect as k } from "react";
|
|
6
6
|
import { Icon as I } from "../../../Icon/Icon.js";
|
|
7
7
|
import { s as a } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
@@ -9,7 +9,7 @@ import { useTranslation as B } from "../../hooks/useTranslation.js";
|
|
|
9
9
|
const C = {
|
|
10
10
|
bold: "Bold",
|
|
11
11
|
italic: "Italic"
|
|
12
|
-
},
|
|
12
|
+
}, T = ["bold", "italic"], w = () => {
|
|
13
13
|
const t = B(), [i] = u(), [e, c] = l(!1), [n, m] = l(!1), d = (o) => {
|
|
14
14
|
i.dispatchCommand(h, o);
|
|
15
15
|
};
|
|
@@ -23,7 +23,7 @@ const C = {
|
|
|
23
23
|
return () => {
|
|
24
24
|
o();
|
|
25
25
|
};
|
|
26
|
-
}, [i]), /* @__PURE__ */ s("div", { className: a["editor__toolbar-button-group"], children:
|
|
26
|
+
}, [i]), /* @__PURE__ */ s("div", { className: a["editor__toolbar-button-group"], children: T.map((o) => /* @__PURE__ */ s(
|
|
27
27
|
"button",
|
|
28
28
|
{
|
|
29
29
|
onClick: () => d(o),
|
|
@@ -43,6 +43,6 @@ const C = {
|
|
|
43
43
|
)) });
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
w as BlockFormatPlugin
|
|
47
47
|
};
|
|
48
48
|
//# sourceMappingURL=BlockFormatPlugin.js.map
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as y, jsxs as O } from "react/jsx-runtime";
|
|
2
2
|
import { useState as k, useRef as L, useEffect as E } from "react";
|
|
3
3
|
import { c as z } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { o as
|
|
5
|
-
import {
|
|
6
|
-
import { v } from "../../../../LexicalUtils.prod-
|
|
4
|
+
import { o as q } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
5
|
+
import { aO as I, ap as P, $ as T, w as x, y as U, p as S, aP as X, H as Y, ag as Z, m as ee } from "../../../../Lexical.prod-A4JuKqM3.js";
|
|
6
|
+
import { v } from "../../../../LexicalUtils.prod-CAsHFX57.js";
|
|
7
7
|
import { AddCatalogueLinkForm as te } from "./AddCatalogueLinkForm/AddCatalogueLinkForm.js";
|
|
8
8
|
import { s as l } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
9
9
|
import { useTranslation as oe } from "../../hooks/useTranslation.js";
|
|
10
|
-
import { CourseCatalogueNode as
|
|
10
|
+
import { CourseCatalogueNode as b, $getLinkTypeFromNode as H, REMOVE_COURSE_CATALOGUE_LINK as re, INSERT_COURSE_CATALOGUE_LINK as ne } from "../../nodes/CourseCatalogueNode/CourseCatalogueNode.js";
|
|
11
11
|
import { useOnClickOutside as se } from "../../../hooks/useOnClickOutside.js";
|
|
12
|
-
import { setScrollableContainers as
|
|
12
|
+
import { setScrollableContainers as F, removeScrollableContainers as ae } from "../../helpers.js";
|
|
13
13
|
const ke = ({
|
|
14
14
|
onSearch: A,
|
|
15
|
-
searchResponse:
|
|
15
|
+
searchResponse: $,
|
|
16
16
|
parentScrollPosition: j
|
|
17
17
|
}) => {
|
|
18
|
-
const [s] =
|
|
19
|
-
|
|
20
|
-
const r = c === "course" ?
|
|
21
|
-
r &&
|
|
18
|
+
const [s] = q(), m = oe(), [G, _] = k(!1), [M, w] = k(!1), D = L(null), K = L(null), R = L(null), [d, h] = k(null), [B, V] = k("course"), W = L(d !== null), C = (c) => {
|
|
19
|
+
V(c);
|
|
20
|
+
const r = c === "course" ? D.current?.getBoundingClientRect() : K.current?.getBoundingClientRect();
|
|
21
|
+
r && h({ top: r.bottom, left: r.left });
|
|
22
22
|
}, p = () => {
|
|
23
|
-
A("", B),
|
|
23
|
+
A("", B), h(null);
|
|
24
24
|
};
|
|
25
25
|
return E(() => {
|
|
26
26
|
const c = s.registerCommand(
|
|
27
27
|
I,
|
|
28
28
|
(e) => e.ctrlKey && e.shiftKey && e.altKey && e.key === "C" ? (e.preventDefault(), C("course"), !0) : e.ctrlKey && e.shiftKey && e.altKey && e.key === "P" ? (e.preventDefault(), C("programme"), !0) : !1,
|
|
29
|
-
|
|
29
|
+
P
|
|
30
30
|
), r = s.registerUpdateListener(({ editorState: e }) => {
|
|
31
31
|
e.read(() => {
|
|
32
32
|
const n = T();
|
|
33
33
|
if (x(n)) {
|
|
34
34
|
const t = n.anchor.getNode(), a = n.anchor.offset;
|
|
35
|
-
if (
|
|
35
|
+
if (U(t) && a === t.getTextContentSize() && t.getNextSibling() instanceof b) {
|
|
36
36
|
const o = t.getNextSibling();
|
|
37
37
|
if (o) {
|
|
38
|
-
const g =
|
|
39
|
-
_(g === "course"),
|
|
38
|
+
const g = H(o);
|
|
39
|
+
_(g === "course"), w(g === "programme");
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
const i = v(t,
|
|
43
|
+
const i = v(t, b);
|
|
44
44
|
if (i) {
|
|
45
|
-
const o =
|
|
46
|
-
_(o === "course"),
|
|
45
|
+
const o = H(i);
|
|
46
|
+
_(o === "course"), w(o === "programme");
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
_(!1),
|
|
49
|
+
_(!1), w(!1);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
}), u = (e) => {
|
|
53
53
|
const n = Z(), t = e.getTextContentSize();
|
|
54
54
|
n.setTextNodeRange(e, t, e, t), ee(n);
|
|
55
|
-
},
|
|
55
|
+
}, N = (e, n) => U(e) && n === e.getTextContentSize() && e.getNextSibling() instanceof b, J = s.registerCommand(
|
|
56
56
|
I,
|
|
57
57
|
(e) => {
|
|
58
58
|
const n = T();
|
|
59
59
|
if (x(n)) {
|
|
60
60
|
const t = e.key, a = n.anchor.getNode(), i = n.anchor.offset;
|
|
61
|
-
let o = v(a,
|
|
62
|
-
if (
|
|
61
|
+
let o = v(a, b);
|
|
62
|
+
if (N(a, i) && (o = a.getNextSibling()), !o)
|
|
63
63
|
return !1;
|
|
64
64
|
const g = o?.getTextContentSize();
|
|
65
65
|
if (o && e.key === "Enter")
|
|
66
66
|
return e.preventDefault(), s.update(() => {
|
|
67
|
-
if (
|
|
67
|
+
if (N(a, i)) {
|
|
68
68
|
const f = S(`
|
|
69
69
|
`);
|
|
70
70
|
o.insertBefore(f);
|
|
@@ -78,7 +78,7 @@ const ke = ({
|
|
|
78
78
|
if (o && (t === " " || e.code === "Space"))
|
|
79
79
|
return e.preventDefault(), s.update(() => {
|
|
80
80
|
const f = S(" ");
|
|
81
|
-
|
|
81
|
+
N(a, i) && (o.insertBefore(f), u(f)), i === g && (o.insertAfter(f), u(f));
|
|
82
82
|
}), !0;
|
|
83
83
|
if (o && (t === "Backspace" || t === "Delete"))
|
|
84
84
|
return e.preventDefault(), s.update(
|
|
@@ -92,13 +92,13 @@ const ke = ({
|
|
|
92
92
|
}
|
|
93
93
|
return !1;
|
|
94
94
|
},
|
|
95
|
-
|
|
96
|
-
),
|
|
95
|
+
P
|
|
96
|
+
), Q = s.registerCommand(
|
|
97
97
|
X,
|
|
98
98
|
(e) => {
|
|
99
99
|
const n = T();
|
|
100
100
|
if (x(n)) {
|
|
101
|
-
const t = n.anchor.getNode(), a = v(t,
|
|
101
|
+
const t = n.anchor.getNode(), a = v(t, b);
|
|
102
102
|
if (a) {
|
|
103
103
|
e.preventDefault();
|
|
104
104
|
const i = s.getElementByKey(a.getKey());
|
|
@@ -110,69 +110,69 @@ const ke = ({
|
|
|
110
110
|
Y
|
|
111
111
|
);
|
|
112
112
|
return () => {
|
|
113
|
-
c(), r(),
|
|
113
|
+
c(), r(), J(), Q();
|
|
114
114
|
};
|
|
115
|
-
}, [s]), se(
|
|
116
|
-
const c = (u) => (
|
|
115
|
+
}, [s]), se(R, () => h(null)), E(() => {
|
|
116
|
+
const c = (u) => (F(r), u.key === "Escape" && W.current && (u.preventDefault(), u.stopPropagation(), p()), !0);
|
|
117
117
|
window.addEventListener("keydown", c, { capture: !0 });
|
|
118
118
|
const r = () => {
|
|
119
119
|
p();
|
|
120
120
|
};
|
|
121
|
-
return
|
|
121
|
+
return F(r), window.addEventListener("scroll", r), window.addEventListener("resize", r), () => {
|
|
122
122
|
window.removeEventListener("keydown", c), window.removeEventListener("scroll", r), window.removeEventListener("resize", r), ae(r);
|
|
123
123
|
};
|
|
124
124
|
}, []), E(() => {
|
|
125
|
-
|
|
126
|
-
}, [j]), /* @__PURE__ */
|
|
125
|
+
d && p();
|
|
126
|
+
}, [j]), /* @__PURE__ */ y("div", { className: l["editor__toolbar-button-group"], children: /* @__PURE__ */ O("div", { className: l["editor__toolbar-button-flyoutwrapper"], children: [
|
|
127
127
|
/* @__PURE__ */ O("div", { className: l["editor__toolbar-button-group--text"], children: [
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ y(
|
|
129
129
|
"button",
|
|
130
130
|
{
|
|
131
131
|
onClick: () => C("course"),
|
|
132
|
-
title:
|
|
132
|
+
title: m.cataloguelinks.courseTooltip,
|
|
133
133
|
className: z(
|
|
134
134
|
l["editor__toolbar-button"],
|
|
135
135
|
l["editor__toolbar-button--text"],
|
|
136
136
|
G && l["editor__toolbar-button--active"]
|
|
137
137
|
),
|
|
138
|
-
"aria-label":
|
|
139
|
-
"aria-keyshortcuts":
|
|
138
|
+
"aria-label": m.aria.labels.courselink,
|
|
139
|
+
"aria-keyshortcuts": m.aria.keyshortcuts.courselink,
|
|
140
140
|
type: "button",
|
|
141
|
-
ref:
|
|
142
|
-
children:
|
|
141
|
+
ref: D,
|
|
142
|
+
children: m.cataloguelinks.courseButtonLabel
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ y(
|
|
146
146
|
"button",
|
|
147
147
|
{
|
|
148
148
|
onClick: () => C("programme"),
|
|
149
|
-
title:
|
|
149
|
+
title: m.cataloguelinks.programmeTooltip,
|
|
150
150
|
className: z(
|
|
151
151
|
l["editor__toolbar-button"],
|
|
152
152
|
l["editor__toolbar-button--text"],
|
|
153
153
|
M && l["editor__toolbar-button--active"]
|
|
154
154
|
),
|
|
155
|
-
"aria-label":
|
|
156
|
-
"aria-keyshortcuts":
|
|
155
|
+
"aria-label": m.aria.labels.programmelink,
|
|
156
|
+
"aria-keyshortcuts": m.aria.keyshortcuts.programmelink,
|
|
157
157
|
type: "button",
|
|
158
|
-
ref:
|
|
159
|
-
children:
|
|
158
|
+
ref: K,
|
|
159
|
+
children: m.cataloguelinks.programmeButtonLabel
|
|
160
160
|
}
|
|
161
161
|
)
|
|
162
162
|
] }),
|
|
163
|
-
|
|
163
|
+
d && /* @__PURE__ */ y(
|
|
164
164
|
"div",
|
|
165
165
|
{
|
|
166
166
|
className: l["editor__toolbar-flyout-wrapper"],
|
|
167
|
-
style: { top:
|
|
168
|
-
ref:
|
|
169
|
-
children: /* @__PURE__ */
|
|
167
|
+
style: { top: d.top, left: d.left },
|
|
168
|
+
ref: R,
|
|
169
|
+
children: /* @__PURE__ */ y(
|
|
170
170
|
te,
|
|
171
171
|
{
|
|
172
172
|
linkType: B,
|
|
173
173
|
onCloseHandler: p,
|
|
174
174
|
onSearchHandler: A,
|
|
175
|
-
searchResponse:
|
|
175
|
+
searchResponse: $,
|
|
176
176
|
onSelect: (c, r, u) => {
|
|
177
177
|
s.dispatchCommand(ne, {
|
|
178
178
|
linkType: u,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { c as e } from "../../../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { o as h } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
4
|
-
import {
|
|
4
|
+
import { aQ as _, aR as C, aS as y, aT as k } from "../../../../Lexical.prod-A4JuKqM3.js";
|
|
5
5
|
import { useState as m, useEffect as s } from "react";
|
|
6
6
|
import "../../../Accordion/Accordion.js";
|
|
7
7
|
import { Icon as n } from "../../../Icon/Icon.js";
|
|
@@ -18,7 +18,7 @@ import "../../../IconButton/IconButton.js";
|
|
|
18
18
|
import "../../../Input/Input.js";
|
|
19
19
|
import "../../../InputField/InputField.js";
|
|
20
20
|
import "react-router";
|
|
21
|
-
import "../../../../TablePlugin-
|
|
21
|
+
import "../../../../TablePlugin-CzmrXpxk.js";
|
|
22
22
|
import { s as r } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
23
23
|
import { useTranslation as x } from "../../hooks/useTranslation.js";
|
|
24
24
|
import "../../Providers/LanguageProvider.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { A as I } from "../../../../../TablePlugin-
|
|
3
|
+
import { A as I } from "../../../../../TablePlugin-CzmrXpxk.js";
|
|
4
4
|
import "../helpers.js";
|
|
5
5
|
import "../../../../Accordion/Accordion.js";
|
|
6
6
|
import "../../../../Icon/Icon.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as f, jsxs as
|
|
2
|
-
import { o as
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { useRef as a, useState as
|
|
6
|
-
import {
|
|
7
|
-
import { v as
|
|
8
|
-
import { A as rt } from "../../../../TablePlugin-
|
|
1
|
+
import { jsx as f, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
+
import { o as Q } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
3
|
+
import { c as W } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { E as b, j as Y, Z } from "../../../../LexicalLink.prod-Dp06n3Hn.js";
|
|
5
|
+
import { useRef as a, useState as q, useEffect as u } from "react";
|
|
6
|
+
import { ad as G, $ as p, B as J, aO as X, w, ap as tt, m as et, p as ot } from "../../../../Lexical.prod-A4JuKqM3.js";
|
|
7
|
+
import { v as N } from "../../../../LexicalUtils.prod-CAsHFX57.js";
|
|
8
|
+
import { A as rt } from "../../../../TablePlugin-CzmrXpxk.js";
|
|
9
9
|
import { ensureHttps as nt } from "./helpers.js";
|
|
10
10
|
import { LinkContextMenu as it } from "./LinkContextMenu/LinkContextMenu.js";
|
|
11
11
|
import { useFlyout as st } from "../../hooks/useFlyout.js";
|
|
@@ -24,7 +24,7 @@ import "../../../IconButton/IconButton.js";
|
|
|
24
24
|
import "../../../Input/Input.js";
|
|
25
25
|
import "../../../InputField/InputField.js";
|
|
26
26
|
import "react-router";
|
|
27
|
-
import { setScrollableContainers as
|
|
27
|
+
import { setScrollableContainers as z, removeScrollableContainers as at } from "../../helpers.js";
|
|
28
28
|
import { s as g } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
29
29
|
import { useTranslation as lt } from "../../hooks/useTranslation.js";
|
|
30
30
|
import "../../Providers/LanguageProvider.js";
|
|
@@ -36,8 +36,8 @@ import "../../../SelectListbox/SelectProvider.js";
|
|
|
36
36
|
import "../../../Sortable/components/SortableItem.js";
|
|
37
37
|
import "../../../../SortableProvider-BbwlEPIr.js";
|
|
38
38
|
import "../../../WeekSelector/components/WeekSelectorOptionContainer.js";
|
|
39
|
-
const ut = 200,
|
|
40
|
-
const T = lt(), [i] =
|
|
39
|
+
const ut = 200, Zt = ({ parentScrollPosition: O }) => {
|
|
40
|
+
const T = lt(), [i] = Q(), { flyout: U, showFlyout: S, hideFlyout: h, isVisible: l } = st(), m = a(void 0), x = a(!1), C = a(""), d = a(""), [k, I] = q({ active: !1, url: "", linktext: "" }), R = a(l), E = a(null), P = a(null), F = a(void 0), v = () => {
|
|
41
41
|
i.update(() => {
|
|
42
42
|
const r = p();
|
|
43
43
|
E.current = r;
|
|
@@ -46,32 +46,32 @@ const ut = 200, Gt = ({ parentScrollPosition: z }) => {
|
|
|
46
46
|
i.update(() => {
|
|
47
47
|
E.current && et(E.current);
|
|
48
48
|
});
|
|
49
|
-
},
|
|
49
|
+
}, j = (r, t) => {
|
|
50
50
|
S({
|
|
51
51
|
position: t,
|
|
52
52
|
children: /* @__PURE__ */ f(
|
|
53
53
|
it,
|
|
54
54
|
{
|
|
55
55
|
url: r,
|
|
56
|
-
onSave: (e) =>
|
|
57
|
-
onDelete: () =>
|
|
58
|
-
onClose:
|
|
56
|
+
onSave: (e) => K(e, ""),
|
|
57
|
+
onDelete: () => A(),
|
|
58
|
+
onClose: B,
|
|
59
59
|
ref: F
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
},
|
|
63
|
+
}, B = () => {
|
|
64
64
|
F.current?.clearForm(), h(), D();
|
|
65
65
|
}, _ = () => {
|
|
66
66
|
const r = P.current?.getBoundingClientRect();
|
|
67
|
-
!x.current && r && (v(), S({ position: { top: r.bottom, left: r.left }, ...
|
|
67
|
+
!x.current && r && (v(), S({ position: { top: r.bottom, left: r.left }, ...H }), setTimeout(() => m.current?.setDefaults("", d.current), 0));
|
|
68
68
|
}, y = () => {
|
|
69
69
|
h(), D();
|
|
70
|
-
},
|
|
70
|
+
}, K = (r, t) => {
|
|
71
71
|
i.update(() => {
|
|
72
72
|
const e = p();
|
|
73
|
-
if (
|
|
74
|
-
const o = e.anchor.getNode(), s =
|
|
73
|
+
if (w(e)) {
|
|
74
|
+
const o = e.anchor.getNode(), s = N(o, b);
|
|
75
75
|
if (t && t !== "") {
|
|
76
76
|
if (s) {
|
|
77
77
|
const n = ot(t);
|
|
@@ -82,19 +82,19 @@ const ut = 200, Gt = ({ parentScrollPosition: z }) => {
|
|
|
82
82
|
e.insertText(t), n.offset -= t.length, c.offset = n.offset + t.length;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
Z(nt(r), { target: "_blank" });
|
|
86
86
|
}
|
|
87
87
|
y();
|
|
88
88
|
});
|
|
89
|
-
},
|
|
90
|
-
i.dispatchCommand(
|
|
91
|
-
},
|
|
89
|
+
}, A = () => {
|
|
90
|
+
i.dispatchCommand(Y, null), B();
|
|
91
|
+
}, H = {
|
|
92
92
|
children: /* @__PURE__ */ f(
|
|
93
93
|
rt,
|
|
94
94
|
{
|
|
95
95
|
isLink: k,
|
|
96
96
|
onCloseHandler: y,
|
|
97
|
-
onSaveHandler: (r, t) =>
|
|
97
|
+
onSaveHandler: (r, t) => K(r, t),
|
|
98
98
|
ref: m
|
|
99
99
|
}
|
|
100
100
|
)
|
|
@@ -103,23 +103,23 @@ const ut = 200, Gt = ({ parentScrollPosition: z }) => {
|
|
|
103
103
|
l ? (x.current = !0, m.current?.focusFirstField()) : (m.current?.clearForm(), C.current = d.current = "", setTimeout(() => x.current = !1, ut));
|
|
104
104
|
}, [m, l]), u(() => {
|
|
105
105
|
const r = (o) => {
|
|
106
|
-
if (
|
|
107
|
-
const s = o.anchor.getNode(), n =
|
|
106
|
+
if (w(o) && o.isCollapsed()) {
|
|
107
|
+
const s = o.anchor.getNode(), n = N(s, b);
|
|
108
108
|
if (n) {
|
|
109
109
|
const c = i.getElementByKey(o.anchor.getNode().getKey()), L = c ? { top: c.getBoundingClientRect().bottom, left: c.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
110
|
-
return
|
|
110
|
+
return j(n.getURL(), L), !0;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return !1;
|
|
114
114
|
}, t = i.registerCommand(
|
|
115
|
-
|
|
115
|
+
G,
|
|
116
116
|
() => {
|
|
117
117
|
const o = p();
|
|
118
118
|
return d.current = o?.getTextContent() ?? "", r(o), !1;
|
|
119
119
|
},
|
|
120
120
|
0
|
|
121
121
|
), e = i.registerCommand(
|
|
122
|
-
|
|
122
|
+
J,
|
|
123
123
|
(o) => {
|
|
124
124
|
const s = p();
|
|
125
125
|
return v(), o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), r(s), !1;
|
|
@@ -131,13 +131,13 @@ const ut = 200, Gt = ({ parentScrollPosition: z }) => {
|
|
|
131
131
|
};
|
|
132
132
|
}, [i]), u(() => {
|
|
133
133
|
const r = i.registerCommand(
|
|
134
|
-
|
|
134
|
+
X,
|
|
135
135
|
(e) => {
|
|
136
136
|
if (e.ctrlKey && e.shiftKey && e.key === "U") {
|
|
137
137
|
const o = p();
|
|
138
|
-
if (v(), !
|
|
138
|
+
if (v(), !w(o))
|
|
139
139
|
return !1;
|
|
140
|
-
const s = o.anchor.getNode(), n =
|
|
140
|
+
const s = o.anchor.getNode(), n = N(s, b), c = (M = "", V = "") => {
|
|
141
141
|
_(), setTimeout(() => m.current?.setDefaults(M, V), 0);
|
|
142
142
|
};
|
|
143
143
|
if (n)
|
|
@@ -152,8 +152,8 @@ const ut = 200, Gt = ({ parentScrollPosition: z }) => {
|
|
|
152
152
|
I(
|
|
153
153
|
e.read(() => {
|
|
154
154
|
const o = p();
|
|
155
|
-
if (v(),
|
|
156
|
-
const s = o.anchor.getNode(), n =
|
|
155
|
+
if (v(), w(o)) {
|
|
156
|
+
const s = o.anchor.getNode(), n = N(s, b);
|
|
157
157
|
if (n)
|
|
158
158
|
return {
|
|
159
159
|
active: !0,
|
|
@@ -176,24 +176,24 @@ const ut = 200, Gt = ({ parentScrollPosition: z }) => {
|
|
|
176
176
|
R.current = l, l || F.current?.clearForm();
|
|
177
177
|
}, [l]), u(() => {
|
|
178
178
|
l && y();
|
|
179
|
-
}, [
|
|
179
|
+
}, [O]), u(() => {
|
|
180
180
|
k.active || h();
|
|
181
181
|
}, [k]), u(() => {
|
|
182
|
-
const r = (e) => (
|
|
182
|
+
const r = (e) => (z(t), e.key === "Escape" && R.current && (e.preventDefault(), e.stopPropagation(), y()), !0);
|
|
183
183
|
window.addEventListener("keydown", r, { capture: !0 });
|
|
184
184
|
const t = () => {
|
|
185
185
|
h();
|
|
186
186
|
};
|
|
187
|
-
return
|
|
187
|
+
return z(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
188
188
|
window.removeEventListener("keydown", r), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), at(t);
|
|
189
189
|
};
|
|
190
|
-
}, []), /* @__PURE__ */ f("div", { className: g["editor__toolbar-button-group"], children: /* @__PURE__ */
|
|
190
|
+
}, []), /* @__PURE__ */ f("div", { className: g["editor__toolbar-button-group"], children: /* @__PURE__ */ $("div", { className: g["editor__toolbar-button-flyoutwrapper"], children: [
|
|
191
191
|
/* @__PURE__ */ f(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
194
|
onClick: _,
|
|
195
195
|
title: T.links.linkTooltip,
|
|
196
|
-
className:
|
|
196
|
+
className: W(
|
|
197
197
|
g["editor__toolbar-button"],
|
|
198
198
|
g["editor__toolbar-button--link"],
|
|
199
199
|
k.active && g["editor__toolbar-button--active"]
|
|
@@ -205,10 +205,10 @@ const ut = 200, Gt = ({ parentScrollPosition: z }) => {
|
|
|
205
205
|
children: /* @__PURE__ */ f(ct, { name: "Link", size: 20 })
|
|
206
206
|
}
|
|
207
207
|
),
|
|
208
|
-
|
|
208
|
+
U
|
|
209
209
|
] }) });
|
|
210
210
|
};
|
|
211
211
|
export {
|
|
212
|
-
|
|
212
|
+
Zt as LinkPlugin
|
|
213
213
|
};
|
|
214
214
|
//# sourceMappingURL=LinkPlugin.js.map
|