@uva-glass/component-library 3.57.0 → 3.57.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-DApSVwEN.js → Lexical.prod-nAj5fF96.js} +2200 -1708
- package/dist/Lexical.prod-nAj5fF96.js.map +1 -0
- package/dist/LexicalClipboard.prod-B9sWgdS2.js +348 -0
- package/dist/LexicalClipboard.prod-B9sWgdS2.js.map +1 -0
- package/dist/{LexicalComposerContext.prod-o3ynMZsi.js → LexicalComposerContext.prod-DumMmRBt.js} +2 -2
- package/dist/LexicalComposerContext.prod-DumMmRBt.js.map +1 -0
- package/dist/LexicalHtml.prod-RCMsF0qt.js +2139 -0
- package/dist/LexicalHtml.prod-RCMsF0qt.js.map +1 -0
- package/dist/{LexicalLink.prod-DCBvBDd1.js → LexicalLink.prod-BcBNTFEb.js} +212 -195
- package/dist/LexicalLink.prod-BcBNTFEb.js.map +1 -0
- package/dist/LexicalList.prod-THQt9B32.js +890 -0
- package/dist/LexicalList.prod-THQt9B32.js.map +1 -0
- package/dist/{LexicalTable.prod-Dw8vTvL0.js → LexicalTable.prod-BpHQYpBM.js} +691 -608
- package/dist/LexicalTable.prod-BpHQYpBM.js.map +1 -0
- package/dist/LexicalUtils.prod-7S6iuu9A.js +347 -0
- package/dist/LexicalUtils.prod-7S6iuu9A.js.map +1 -0
- package/dist/{LinkContextMenu-Jna2w4Ob.js → LinkContextMenu-Byu3AEqp.js} +2 -2
- package/dist/{LinkContextMenu-Jna2w4Ob.js.map → LinkContextMenu-Byu3AEqp.js.map} +1 -1
- package/dist/{PasteHandlerPlugin-IsbHaMUu.js → PasteHandlerPlugin-DyTXcFsj.js} +5 -5
- package/dist/{PasteHandlerPlugin-IsbHaMUu.js.map → PasteHandlerPlugin-DyTXcFsj.js.map} +1 -1
- package/dist/{TableCellContextMenu-Dm-UNfH8.js → TableCellContextMenu--4IdoKAU.js} +2 -2
- package/dist/{TableCellContextMenu-Dm-UNfH8.js.map → TableCellContextMenu--4IdoKAU.js.map} +1 -1
- package/dist/TableCellResizerPlugin-Dn8Ks2Lm.js +208 -0
- package/dist/TableCellResizerPlugin-Dn8Ks2Lm.js.map +1 -0
- package/dist/__mocks__/reactRouterMock.d.ts +27 -0
- package/dist/__mocks__/reactRouterMock.js +17 -0
- package/dist/__mocks__/reactRouterMock.js.map +1 -0
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/CheckboxTree/index.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/FormInput/index.js +1 -1
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.js +3 -2
- 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/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/PeriodSelector/index.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/RadioTabSelector/index.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/EditorHeader/index.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +35 -35
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +14 -14
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +1 -1
- 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/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +30 -30
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +2 -2
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/index.js +4 -4
- package/dist/components/RteEditor/RteEditor.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/RteEditor/index.js +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +18 -18
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +17 -17
- package/dist/components/index.js +64 -63
- package/dist/{components-DHB1OMJ8.js → components-KU0q76JR.js} +841 -686
- package/dist/components-KU0q76JR.js.map +1 -0
- package/dist/{helpers-C3IJbMVf.js → helpers-BzYayeT-.js} +9 -9
- package/dist/helpers-BzYayeT-.js.map +1 -0
- package/dist/index.js +64 -63
- package/package.json +17 -17
- package/dist/Lexical.prod-DApSVwEN.js.map +0 -1
- package/dist/LexicalClipboard.prod--xxt8Vi4.js +0 -651
- package/dist/LexicalClipboard.prod--xxt8Vi4.js.map +0 -1
- package/dist/LexicalComposerContext.prod-o3ynMZsi.js.map +0 -1
- package/dist/LexicalExtension.prod-efmFsltb.js +0 -913
- package/dist/LexicalExtension.prod-efmFsltb.js.map +0 -1
- package/dist/LexicalLink.prod-DCBvBDd1.js.map +0 -1
- package/dist/LexicalList.prod-DA6gHLh6.js +0 -806
- package/dist/LexicalList.prod-DA6gHLh6.js.map +0 -1
- package/dist/LexicalTable.prod-Dw8vTvL0.js.map +0 -1
- package/dist/LexicalUtils.prod-DRNc5TMZ.js +0 -343
- package/dist/LexicalUtils.prod-DRNc5TMZ.js.map +0 -1
- package/dist/TableCellResizerPlugin-OgsG5jSq.js +0 -208
- package/dist/TableCellResizerPlugin-OgsG5jSq.js.map +0 -1
- package/dist/components-DHB1OMJ8.js.map +0 -1
- package/dist/helpers-C3IJbMVf.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { p as e } from "../../../components-
|
|
1
|
+
import { p as e } from "../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as MultiSelectHeader };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as e } from "../../components-
|
|
1
|
+
import { f as e } from "../../components-KU0q76JR.js";
|
|
2
2
|
export { e as MultiSelect };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as e } from "../../components-
|
|
1
|
+
import { d as e } from "../../components-KU0q76JR.js";
|
|
2
2
|
export { e as PeriodSelector };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as e } from "../../components-
|
|
1
|
+
import { d as e } from "../../components-KU0q76JR.js";
|
|
2
2
|
export { e as PeriodSelector };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { u as e } from "../../components-
|
|
1
|
+
import { u as e } from "../../components-KU0q76JR.js";
|
|
2
2
|
export { e as RadioTabSelector };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { u as e } from "../../components-
|
|
1
|
+
import { u as e } from "../../components-KU0q76JR.js";
|
|
2
2
|
export { e as RadioTabSelector };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as e } from "../../../components-
|
|
1
|
+
import { r as e } from "../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as EditorHeader };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as e } from "../../../components-
|
|
1
|
+
import { r as e } from "../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as EditorHeader };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../../../../clsx-C67XSbzZ.js";
|
|
2
2
|
import { Icon as t } from "../../../Icon/Icon.js";
|
|
3
|
-
import { t as n } from "../../../../LexicalComposerContext.prod-
|
|
4
|
-
import {
|
|
3
|
+
import { t as n } from "../../../../LexicalComposerContext.prod-DumMmRBt.js";
|
|
4
|
+
import { Qn as r, gt as i, u as a } from "../../../../Lexical.prod-nAj5fF96.js";
|
|
5
5
|
import { t as o } from "../../../../RteEditor.module-pWBasED2.js";
|
|
6
6
|
import { useTranslation as s } from "../../hooks/useTranslation.js";
|
|
7
7
|
import { useEffect as c, useState as l } from "react";
|
|
@@ -12,13 +12,13 @@ var d = {
|
|
|
12
12
|
italic: "Italic"
|
|
13
13
|
}, f = ["bold", "italic"], p = () => {
|
|
14
14
|
let p = s(), [m] = n(), [h, g] = l(!1), [_, v] = l(!1), y = (e) => {
|
|
15
|
-
m.dispatchCommand(
|
|
15
|
+
m.dispatchCommand(a, e);
|
|
16
16
|
};
|
|
17
17
|
return c(() => {
|
|
18
18
|
let e = m.registerUpdateListener(({ editorState: e }) => {
|
|
19
19
|
e.read(() => {
|
|
20
20
|
let e = i();
|
|
21
|
-
|
|
21
|
+
r(e) && (g(e.hasFormat("bold")), v(e.hasFormat("italic")));
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
return () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../../../../clsx-C67XSbzZ.js";
|
|
2
|
-
import { t } from "../../../../LexicalComposerContext.prod-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { t } from "../../../../LexicalComposerContext.prod-DumMmRBt.js";
|
|
3
|
+
import { Gn as n, O as r, Qn as i, S as a, gt as o, n as s, or as c, p as l, rn as u } from "../../../../Lexical.prod-nAj5fF96.js";
|
|
4
|
+
import { l as d } from "../../../../LexicalUtils.prod-7S6iuu9A.js";
|
|
5
5
|
import { $getLinkTypeFromNode as f, CourseCatalogueNode as p, INSERT_COURSE_CATALOGUE_LINK as m, REMOVE_COURSE_CATALOGUE_LINK as h } from "../../nodes/CourseCatalogueNode/CourseCatalogueNode.js";
|
|
6
6
|
import { t as g } from "../../../../RteEditor.module-pWBasED2.js";
|
|
7
7
|
import { t as _ } from "../../../../AddCatalogueLinkForm-Di0xm7Ep.js";
|
|
@@ -22,12 +22,12 @@ var T = ({ onSearch: T, searchResponse: E, parentScrollPosition: D }) => {
|
|
|
22
22
|
T("", z), R(null);
|
|
23
23
|
};
|
|
24
24
|
b(() => {
|
|
25
|
-
let e = O.registerCommand(
|
|
25
|
+
let e = O.registerCommand(s, (e) => e.ctrlKey && e.shiftKey && e.altKey && e.key === "C" ? (e.preventDefault(), H("course"), !0) : e.ctrlKey && e.shiftKey && e.altKey && e.key === "P" ? (e.preventDefault(), H("programme"), !0) : !1, 4), t = O.registerUpdateListener(({ editorState: e }) => {
|
|
26
26
|
e.read(() => {
|
|
27
|
-
let e =
|
|
28
|
-
if (
|
|
27
|
+
let e = o();
|
|
28
|
+
if (i(e)) {
|
|
29
29
|
let t = e.anchor.getNode(), n = e.anchor.offset;
|
|
30
|
-
if (
|
|
30
|
+
if (r(t) && n === t.getTextContentSize() && t.getNextSibling() instanceof p) {
|
|
31
31
|
let e = t.getNextSibling();
|
|
32
32
|
if (e) {
|
|
33
33
|
let t = f(e);
|
|
@@ -35,47 +35,47 @@ var T = ({ onSearch: T, searchResponse: E, parentScrollPosition: D }) => {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
let
|
|
39
|
-
if (
|
|
40
|
-
let e = f(
|
|
38
|
+
let i = d(t, p);
|
|
39
|
+
if (i) {
|
|
40
|
+
let e = f(i);
|
|
41
41
|
j(e === "course"), N(e === "programme");
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
j(!1), N(!1);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
}),
|
|
48
|
-
let t =
|
|
49
|
-
t.setTextNodeRange(e,
|
|
50
|
-
}, m = (e, t) =>
|
|
51
|
-
let t =
|
|
52
|
-
if (
|
|
53
|
-
let
|
|
54
|
-
if (m(
|
|
55
|
-
let s =
|
|
56
|
-
if (
|
|
57
|
-
if (m(
|
|
58
|
-
let e =
|
|
59
|
-
|
|
47
|
+
}), u = (e) => {
|
|
48
|
+
let t = l(), n = e.getTextContentSize();
|
|
49
|
+
t.setTextNodeRange(e, n, e, n), a(t);
|
|
50
|
+
}, m = (e, t) => r(e) && t === e.getTextContentSize() && e.getNextSibling() instanceof p, g = O.registerCommand(s, (e) => {
|
|
51
|
+
let t = o();
|
|
52
|
+
if (i(t)) {
|
|
53
|
+
let r = e.key, i = t.anchor.getNode(), a = t.anchor.offset, o = d(i, p);
|
|
54
|
+
if (m(i, a) && (o = i.getNextSibling()), !o) return !1;
|
|
55
|
+
let s = o?.getTextContentSize();
|
|
56
|
+
if (o && e.key === "Enter") return e.preventDefault(), O.update(() => {
|
|
57
|
+
if (m(i, a)) {
|
|
58
|
+
let e = n("\n");
|
|
59
|
+
o.insertBefore(e);
|
|
60
60
|
}
|
|
61
|
-
if (
|
|
62
|
-
let e =
|
|
63
|
-
|
|
61
|
+
if (a === s) {
|
|
62
|
+
let e = n("\n");
|
|
63
|
+
o.insertAfter(e), u(e);
|
|
64
64
|
}
|
|
65
65
|
}), !0;
|
|
66
|
-
if (
|
|
67
|
-
let e =
|
|
68
|
-
m(
|
|
66
|
+
if (o && (r === " " || e.code === "Space")) return e.preventDefault(), O.update(() => {
|
|
67
|
+
let e = n(" ");
|
|
68
|
+
m(i, a) && (o.insertBefore(e), u(e)), a === s && (o.insertAfter(e), u(e));
|
|
69
69
|
}), !0;
|
|
70
|
-
if (
|
|
70
|
+
if (o && (r === "Backspace" || r === "Delete")) return e.preventDefault(), O.update(() => {
|
|
71
71
|
O.dispatchCommand(h, void 0);
|
|
72
72
|
}, { discrete: !0 }), !0;
|
|
73
|
-
if (
|
|
73
|
+
if (o && r !== "ArrowLeft" && r !== "ArrowRight" && r !== "ArrowUp" && r !== "ArrowDown" && r !== "Home" && r !== "End" && !(e.ctrlKey && (r.toLowerCase() === "z" || r.toLowerCase() === "y")) && !(e.ctrlKey && r.toLowerCase() === "c")) return e.preventDefault(), !0;
|
|
74
74
|
}
|
|
75
75
|
return !1;
|
|
76
|
-
}, 4), _ = O.registerCommand(
|
|
77
|
-
let t =
|
|
78
|
-
if (
|
|
76
|
+
}, 4), _ = O.registerCommand(c, (e) => {
|
|
77
|
+
let t = o();
|
|
78
|
+
if (i(t)) {
|
|
79
79
|
let n = d(t.anchor.getNode(), p);
|
|
80
80
|
if (n) {
|
|
81
81
|
e.preventDefault();
|
|
@@ -92,7 +92,7 @@ var T = ({ onSearch: T, searchResponse: E, parentScrollPosition: D }) => {
|
|
|
92
92
|
let W = () => {
|
|
93
93
|
U();
|
|
94
94
|
};
|
|
95
|
-
return b(() =>
|
|
95
|
+
return b(() => u(O.registerCommand(s, (e) => e.key === "Escape" && V.current ? (e.preventDefault(), U(), !0) : !1, 1), O.registerRootListener((e, t) => {
|
|
96
96
|
t && t.removeEventListener("scroll", W), e && e.addEventListener("scroll", W);
|
|
97
97
|
})), [O]), b(() => {
|
|
98
98
|
L && U();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as e } from "../../../../components-
|
|
1
|
+
import { o as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as HistoryPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as e } from "../../../../components-
|
|
1
|
+
import { o as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as HistoryPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e } from "../../../../../components-
|
|
1
|
+
import { c as e } from "../../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as AddLinkForm };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../../LinkContextMenu-
|
|
1
|
+
import { t as e } from "../../../../../LinkContextMenu-Byu3AEqp.js";
|
|
2
2
|
export { e as LinkContextMenu };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { s as e } from "../../../../components-
|
|
1
|
+
import { s as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as LinkPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../../../../helpers-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../../../../helpers-BzYayeT-.js";
|
|
2
2
|
export { r as MATCHERS, t as ensureHttps, n as validateUrl, e as validateUrlWithProtocol };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { s as e } from "../../../../components-
|
|
1
|
+
import { s as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as LinkPlugin };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "../../../../clsx-C67XSbzZ.js";
|
|
2
2
|
import { Icon as t } from "../../../Icon/Icon.js";
|
|
3
|
-
import { t as n } from "../../../../LexicalComposerContext.prod-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as c,
|
|
3
|
+
import { t as n } from "../../../../LexicalComposerContext.prod-DumMmRBt.js";
|
|
4
|
+
import { Qn as r, gt as i, n as a, nr as o } from "../../../../Lexical.prod-nAj5fF96.js";
|
|
5
|
+
import { l as s } from "../../../../LexicalUtils.prod-7S6iuu9A.js";
|
|
6
|
+
import { a as c, i as l, l as u, o as d, r as f, s as p, t as m } from "../../../../LexicalList.prod-THQt9B32.js";
|
|
7
7
|
import { t as h } from "../../../../RteEditor.module-pWBasED2.js";
|
|
8
8
|
import { useTranslation as g } from "../../hooks/useTranslation.js";
|
|
9
9
|
import { useEffect as _, useState as v } from "react";
|
|
@@ -14,10 +14,10 @@ var b = {
|
|
|
14
14
|
number: "NumberedList"
|
|
15
15
|
}, x = ["bullet", "number"], S = () => {
|
|
16
16
|
let S = g(), [C] = n(), [w, T] = v(null), [E, D] = v(!1), [O, k] = v(!1), A = (e) => {
|
|
17
|
-
e === "number" && w !== "number" ? (C.dispatchCommand(
|
|
17
|
+
e === "number" && w !== "number" ? (C.dispatchCommand(d, void 0), T("number")) : e === "bullet" && w !== "bullet" ? (C.dispatchCommand(m, void 0), T("bullet")) : (C.dispatchCommand(l, void 0), T(null));
|
|
18
18
|
};
|
|
19
19
|
return _(() => {
|
|
20
|
-
let e = C.registerCommand(
|
|
20
|
+
let e = C.registerCommand(a, (e) => e.ctrlKey && e.shiftKey && e.code === "Digit7" ? (e.preventDefault(), O ? C.dispatchCommand(l, void 0) : C.dispatchCommand(d, void 0), !0) : e.ctrlKey && e.shiftKey && e.code === "Digit8" ? (e.preventDefault(), E ? C.dispatchCommand(l, void 0) : C.dispatchCommand(m, void 0), !0) : !1, 4);
|
|
21
21
|
return () => {
|
|
22
22
|
e();
|
|
23
23
|
};
|
|
@@ -26,21 +26,21 @@ var b = {
|
|
|
26
26
|
O,
|
|
27
27
|
E
|
|
28
28
|
]), _(() => {
|
|
29
|
-
let e = C.registerCommand(
|
|
29
|
+
let e = C.registerCommand(o, (e) => (e.preventDefault(), C.update(() => {
|
|
30
30
|
let e = i();
|
|
31
|
-
if (!
|
|
31
|
+
if (!r(e)) return;
|
|
32
32
|
let t = e.anchor.getNode(), n = t.getParent();
|
|
33
|
-
if (!
|
|
34
|
-
let
|
|
35
|
-
if (c(
|
|
36
|
-
let e =
|
|
33
|
+
if (!u(n)) return;
|
|
34
|
+
let a = n.getParent();
|
|
35
|
+
if (c(a)) {
|
|
36
|
+
let e = f(c(a) ? a.getListType() : "bullet");
|
|
37
37
|
n.append(e), e.append(t);
|
|
38
38
|
}
|
|
39
39
|
}), !0), 1), t = C.registerUpdateListener(({ editorState: e }) => {
|
|
40
40
|
e.read(() => {
|
|
41
41
|
let e = i();
|
|
42
|
-
if (
|
|
43
|
-
let t = s(e.anchor.getNode(),
|
|
42
|
+
if (r(e)) {
|
|
43
|
+
let t = s(e.anchor.getNode(), p);
|
|
44
44
|
if (t) {
|
|
45
45
|
let e = t.getTag();
|
|
46
46
|
D(e === "ul"), k(e === "ol"), e === "ul" && T("bullet"), e === "ol" && T("number");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../PasteHandlerPlugin-
|
|
1
|
+
import { t as e } from "../../../../PasteHandlerPlugin-DyTXcFsj.js";
|
|
2
2
|
export { e as PasteHandlerPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../PasteHandlerPlugin-
|
|
1
|
+
import { t as e } from "../../../../PasteHandlerPlugin-DyTXcFsj.js";
|
|
2
2
|
export { e as PasteHandlerPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../TableCellResizerPlugin-
|
|
1
|
+
import { t as e } from "../../../../TableCellResizerPlugin-Dn8Ks2Lm.js";
|
|
2
2
|
export { e as TableCellResizerPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../TableCellResizerPlugin-
|
|
1
|
+
import { t as e } from "../../../../TableCellResizerPlugin-Dn8Ks2Lm.js";
|
|
2
2
|
export { e as TableCellResizerPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e } from "../../../../components-
|
|
1
|
+
import { a as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as AddTableForm };
|
package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../../TableCellContextMenu
|
|
1
|
+
import { t as e } from "../../../../../TableCellContextMenu--4IdoKAU.js";
|
|
2
2
|
export { e as TableCellContextMenu };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../../TableCellContextMenu
|
|
1
|
+
import { t as e } from "../../../../../TableCellContextMenu--4IdoKAU.js";
|
|
2
2
|
export { e as TableCellContextMenu };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e } from "../../../../components-
|
|
1
|
+
import { i as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as TablePlugin };
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as t,
|
|
1
|
+
import { Z as e } from "../../../../Lexical.prod-nAj5fF96.js";
|
|
2
|
+
import { C as t, T as n, _ as r, a as i, b as a, d as o, f as s, g as c, i as l, m as u, n as d, w as f } from "../../../../LexicalTable.prod-BpHQYpBM.js";
|
|
3
3
|
import { TableWrapperNode as p } from "../../nodes/TableWrapperNode/TableWrapperNode.js";
|
|
4
4
|
//#region src/components/RteEditor/Plugins/TablePlugin/helpers.ts
|
|
5
|
-
var m = 32, h = 48, g = 1, _ = 200, v = 320, y = (
|
|
6
|
-
let
|
|
7
|
-
for (let
|
|
8
|
-
let t =
|
|
9
|
-
for (let
|
|
10
|
-
let n =
|
|
5
|
+
var m = 32, h = 48, g = 1, _ = 200, v = 320, y = (n, r) => {
|
|
6
|
+
let o = t(0, 0, !1);
|
|
7
|
+
for (let t = 0; t < n; t++) {
|
|
8
|
+
let t = a();
|
|
9
|
+
for (let n = 0; n < r; n++) {
|
|
10
|
+
let n = i(0, void 0, void 0);
|
|
11
11
|
n.append(e()), t.append(n);
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
o.append(t);
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return o;
|
|
16
16
|
}, b = (e) => {
|
|
17
|
-
let t =
|
|
18
|
-
if (
|
|
19
|
-
let e =
|
|
17
|
+
let t = f(e), n = t.getNextSibling() || t.getPreviousSibling(), r = t.getParentOrThrow();
|
|
18
|
+
if (r.getChildrenSize() > 1 ? t.remove() : r.remove(), n !== null) {
|
|
19
|
+
let e = n.getFirstDescendant();
|
|
20
20
|
e && e.select();
|
|
21
21
|
}
|
|
22
22
|
}, x = (e) => {
|
|
23
|
-
let t =
|
|
23
|
+
let t = l(e);
|
|
24
24
|
if (!t) throw Error("Selected node is not a TableCellNode");
|
|
25
25
|
let n = t.getParent();
|
|
26
26
|
n instanceof p ? n.remove() : t.remove();
|
|
27
27
|
}, S = (e, t) => {
|
|
28
|
-
if (!
|
|
29
|
-
let n =
|
|
30
|
-
|
|
28
|
+
if (!d(e)) throw Error("Selected node is not a TableCellNode");
|
|
29
|
+
let n = a();
|
|
30
|
+
c(t === "insertRowBelow");
|
|
31
31
|
let r = n.getFirstDescendant();
|
|
32
32
|
r && r.select();
|
|
33
|
-
}, C = (e,
|
|
34
|
-
if (!
|
|
35
|
-
let
|
|
36
|
-
if (!
|
|
37
|
-
let
|
|
38
|
-
if (
|
|
39
|
-
let p =
|
|
33
|
+
}, C = (e, t) => {
|
|
34
|
+
if (!d(e)) throw Error("Selected node is not a TableCellNode");
|
|
35
|
+
let n = r(e), i = s(e), a = n.getChildren(), c = u(e), l = o(t === "insertColumnLeft");
|
|
36
|
+
if (!l) return;
|
|
37
|
+
let f = s(l);
|
|
38
|
+
if (f === -1) return;
|
|
39
|
+
let p = n.getColWidths();
|
|
40
40
|
if (!p) return;
|
|
41
|
-
let m = p.map((e, t) => t ===
|
|
42
|
-
|
|
43
|
-
let h = c
|
|
41
|
+
let m = p.map((e, t) => t === f ? 48 : e - Math.ceil(48 / (p.length - 1)));
|
|
42
|
+
n.setColWidths(m), i = t === "insertColumnLeft" ? i : i + 1;
|
|
43
|
+
let h = a[c].getChildren()[i];
|
|
44
44
|
h && h.select();
|
|
45
45
|
}, w = (e) => {
|
|
46
|
-
if (!
|
|
47
|
-
(
|
|
46
|
+
if (!d(e)) throw Error("Selected node is not a TableCellNode");
|
|
47
|
+
(r(e).getFirstChild()?.getChildrenSize() || 0) === 1 ? x(e) : n();
|
|
48
48
|
}, T = (e) => {
|
|
49
49
|
let t = e.getRootElement();
|
|
50
50
|
if (!t || typeof window > "u") return 0;
|
|
@@ -60,7 +60,7 @@ var m = 32, h = 48, g = 1, _ = 200, v = 320, y = (t, n) => {
|
|
|
60
60
|
let t = e.getChildren();
|
|
61
61
|
for (let e of t) {
|
|
62
62
|
let t = e.getChildren();
|
|
63
|
-
for (let e of t) if (
|
|
63
|
+
for (let e of t) if (d(e) && e.getTextContent().trim().length > 0) return !0;
|
|
64
64
|
}
|
|
65
65
|
return !1;
|
|
66
66
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as e } from "../../../../components-
|
|
2
|
-
import { t } from "../../../../TableCellContextMenu
|
|
1
|
+
import { i as e } from "../../../../components-KU0q76JR.js";
|
|
2
|
+
import { t } from "../../../../TableCellContextMenu--4IdoKAU.js";
|
|
3
3
|
export { t as TableCellContextMenu, e as TablePlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as e } from "../../../../components-
|
|
1
|
+
import { l as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as ToolBarPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as e } from "../../../../components-
|
|
1
|
+
import { l as e } from "../../../../components-KU0q76JR.js";
|
|
2
2
|
export { e as ToolBarPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as e, l as t, o as n, s as r } from "../../../components-
|
|
2
|
-
import { t as i } from "../../../TableCellResizerPlugin-
|
|
1
|
+
import { i as e, l as t, o as n, s as r } from "../../../components-KU0q76JR.js";
|
|
2
|
+
import { t as i } from "../../../TableCellResizerPlugin-Dn8Ks2Lm.js";
|
|
3
3
|
import { BlockFormatPlugin as a } from "./BlockFormatPlugin/BlockFormatPlugin.js";
|
|
4
4
|
import { ListPlugin as o } from "./ListPlugin/ListPlugin.js";
|
|
5
|
-
import { t as s } from "../../../TableCellContextMenu
|
|
6
|
-
import { t as c } from "../../../PasteHandlerPlugin-
|
|
5
|
+
import { t as s } from "../../../TableCellContextMenu--4IdoKAU.js";
|
|
6
|
+
import { t as c } from "../../../PasteHandlerPlugin-DyTXcFsj.js";
|
|
7
7
|
export { a as BlockFormatPlugin, n as HistoryPlugin, r as LinkPlugin, o as ListPlugin, c as PasteHandlerPlugin, s as TableCellContextMenu, i as TableCellResizerPlugin, e as TablePlugin, t as ToolBarPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../../components-
|
|
1
|
+
import { n as e, t } from "../../components-KU0q76JR.js";
|
|
2
2
|
export { t as Rte, e as RteEditor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "../../components-
|
|
1
|
+
import { n as e } from "../../components-KU0q76JR.js";
|
|
2
2
|
import { t } from "../../Container-DOcrVe7u.js";
|
|
3
3
|
import "../../storyComponents/Container/index.js";
|
|
4
4
|
import { MOCK_RTE_CONTENT as n } from "./mockRteContent.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { lt as e, mr as t } from "../../Lexical.prod-nAj5fF96.js";
|
|
2
|
+
import { s as n, u as r } from "../../LexicalList.prod-THQt9B32.js";
|
|
3
|
+
import { c as i } from "../../LexicalLink.prod-BcBNTFEb.js";
|
|
4
|
+
import { l as a } from "../../LexicalTable.prod-BpHQYpBM.js";
|
|
5
5
|
import { CourseCatalogueNode as o } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
|
|
6
6
|
//#region src/components/RteEditor/helpers.ts
|
|
7
7
|
var s = (e) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../../components-
|
|
1
|
+
import { n as e, t } from "../../components-KU0q76JR.js";
|
|
2
2
|
export { t as Rte, e as RteEditor };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as e } from "../../../../LexicalComposerContext.prod-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "../../../../LexicalComposerContext.prod-DumMmRBt.js";
|
|
2
|
+
import { Gn as t, O as n, Qn as r, bn as i, dn as a, gt as o, tt as s } from "../../../../Lexical.prod-nAj5fF96.js";
|
|
3
|
+
import { l as c } from "../../../../LexicalUtils.prod-7S6iuu9A.js";
|
|
4
4
|
import { useEffect as l } from "react";
|
|
5
5
|
//#region src/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.tsx
|
|
6
|
-
var u = class e extends
|
|
6
|
+
var u = class e extends a {
|
|
7
7
|
__linkType;
|
|
8
8
|
__code;
|
|
9
9
|
__label;
|
|
@@ -72,29 +72,29 @@ function f(e) {
|
|
|
72
72
|
function p(e) {
|
|
73
73
|
return f(e) ? e.__linkType : null;
|
|
74
74
|
}
|
|
75
|
-
var m =
|
|
75
|
+
var m = i("insertCourseCatalogueLink"), h = i("removeCourseCatalogueLink");
|
|
76
76
|
function g() {
|
|
77
|
-
let [
|
|
78
|
-
if (!
|
|
77
|
+
let [i] = e();
|
|
78
|
+
if (!i.hasNodes([u])) throw Error("CourseCataloguePlugin: CourseCatalogueNode is not registered on editor");
|
|
79
79
|
return l(() => {
|
|
80
|
-
let e =
|
|
81
|
-
let
|
|
82
|
-
return
|
|
83
|
-
}, 2),
|
|
80
|
+
let e = i.registerCommand(m, (e) => {
|
|
81
|
+
let n = d(e.linkType, e.code, e.label), r = t(e.label);
|
|
82
|
+
return n.append(r), s([n]), !0;
|
|
83
|
+
}, 2), a = i.registerCommand(h, () => {
|
|
84
84
|
let e = o();
|
|
85
|
-
if (
|
|
86
|
-
let
|
|
87
|
-
if (
|
|
88
|
-
let e =
|
|
89
|
-
|
|
85
|
+
if (r(e)) {
|
|
86
|
+
let r = e.anchor.getNode(), i = e.anchor.offset, a = c(r, u);
|
|
87
|
+
if (n(r) && i === r.getTextContentSize() && r.getNextSibling() instanceof u && (a = r.getNextSibling()), a) {
|
|
88
|
+
let e = a.getParent();
|
|
89
|
+
a.remove(), e && e.append(t(" "));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return !0;
|
|
93
93
|
}, 2);
|
|
94
94
|
return () => {
|
|
95
|
-
e(),
|
|
95
|
+
e(), a();
|
|
96
96
|
};
|
|
97
|
-
}, [
|
|
97
|
+
}, [i]), null;
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
100
|
export { d as $createCourseCatalogueNode, p as $getLinkTypeFromNode, f as $isCourseCatalogueNode, g as CourseCatalogueLinkPlugin, u as CourseCatalogueNode, m as INSERT_COURSE_CATALOGUE_LINK, h as REMOVE_COURSE_CATALOGUE_LINK };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "../../../../LexicalComposerContext.prod-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "../../../../LexicalComposerContext.prod-DumMmRBt.js";
|
|
2
|
+
import { Qn as t, Z as n, bn as r, dn as i, gt as a, zt as o } from "../../../../Lexical.prod-nAj5fF96.js";
|
|
3
|
+
import { h as s, l as c } from "../../../../LexicalUtils.prod-7S6iuu9A.js";
|
|
4
4
|
import { useEffect as l } from "react";
|
|
5
5
|
//#region src/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.tsx
|
|
6
6
|
var u = class e extends i {
|
|
@@ -28,32 +28,32 @@ function d() {
|
|
|
28
28
|
function f(e) {
|
|
29
29
|
return e instanceof u;
|
|
30
30
|
}
|
|
31
|
-
var p =
|
|
31
|
+
var p = r("insertTableWrapperNode"), m = r("removeTableWrapperNode");
|
|
32
32
|
function h() {
|
|
33
|
-
let [
|
|
34
|
-
if (!
|
|
33
|
+
let [r] = e();
|
|
34
|
+
if (!r.hasNodes([u])) throw Error("TableWrapperPlugin: TableWrapperNode is not registered on editor");
|
|
35
35
|
return l(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = r.registerCommand(p, () => {
|
|
37
37
|
let e = a();
|
|
38
|
-
return
|
|
39
|
-
}, 2), i =
|
|
38
|
+
return t(e) && s(e, d), !0;
|
|
39
|
+
}, 2), i = r.registerCommand(m, () => {
|
|
40
40
|
let e = a();
|
|
41
|
-
if (
|
|
41
|
+
if (t(e)) {
|
|
42
42
|
let t = e.anchor.getNode();
|
|
43
|
-
if (!
|
|
44
|
-
let
|
|
43
|
+
if (!o(t)) return !1;
|
|
44
|
+
let r = c(t, u);
|
|
45
|
+
if (!r) return !1;
|
|
46
|
+
let i = r?.getChildren();
|
|
45
47
|
if (!i) return !1;
|
|
46
|
-
let a =
|
|
47
|
-
|
|
48
|
-
let o = n();
|
|
49
|
-
a.forEach((e) => o.append(e)), i.replace(o);
|
|
48
|
+
let a = n();
|
|
49
|
+
i.forEach((e) => a.append(e)), r.replace(a);
|
|
50
50
|
}
|
|
51
51
|
return !0;
|
|
52
52
|
}, 2);
|
|
53
53
|
return () => {
|
|
54
54
|
e(), i();
|
|
55
55
|
};
|
|
56
|
-
}, [
|
|
56
|
+
}, [r]), null;
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
export { d as $createTableWrapperNode, f as $isTableWrapperNode, p as INSERT_TABLE_WRAPPER, m as REMOVE_TABLE_WRAPPER, u as TableWrapperNode, h as TableWrapperPlugin };
|