@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.
Files changed (70) hide show
  1. package/dist/{Lexical.prod-YJ1n9pVJ.js → Lexical.prod-A4JuKqM3.js} +1494 -1428
  2. package/dist/Lexical.prod-A4JuKqM3.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-CDPAGlNs.js → LexicalClipboard.prod-CoyZP29w.js} +60 -60
  4. package/dist/{LexicalClipboard.prod-CDPAGlNs.js.map → LexicalClipboard.prod-CoyZP29w.js.map} +1 -1
  5. package/dist/{LexicalExtension.prod-2-giLTv9.js → LexicalExtension.prod-DFPuTMk1.js} +94 -93
  6. package/dist/LexicalExtension.prod-DFPuTMk1.js.map +1 -0
  7. package/dist/LexicalLink.prod-Dp06n3Hn.js +561 -0
  8. package/dist/LexicalLink.prod-Dp06n3Hn.js.map +1 -0
  9. package/dist/LexicalList.prod-D3TdO_Pq.js +632 -0
  10. package/dist/LexicalList.prod-D3TdO_Pq.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-CpZE7Sey.js → LexicalSelection.prod-BapitO0n.js} +39 -39
  12. package/dist/{LexicalSelection.prod-CpZE7Sey.js.map → LexicalSelection.prod-BapitO0n.js.map} +1 -1
  13. package/dist/LexicalTable.prod-bzYpvqMi.js +1892 -0
  14. package/dist/LexicalTable.prod-bzYpvqMi.js.map +1 -0
  15. package/dist/LexicalUtils.prod-CAsHFX57.js +134 -0
  16. package/dist/LexicalUtils.prod-CAsHFX57.js.map +1 -0
  17. package/dist/{TableCellResizerPlugin-BTfuE_kM.js → TableCellResizerPlugin-ffA1s2mD.js} +62 -62
  18. package/dist/{TableCellResizerPlugin-BTfuE_kM.js.map → TableCellResizerPlugin-ffA1s2mD.js.map} +1 -1
  19. package/dist/{TablePlugin-bFqq2Yd9.js → TablePlugin-CzmrXpxk.js} +89 -89
  20. package/dist/{TablePlugin-bFqq2Yd9.js.map → TablePlugin-CzmrXpxk.js.map} +1 -1
  21. package/dist/{chunk-2N4WE3KZ-nJkI9rUN.js → chunk-OPOZOKLO-nJkI9rUN.js} +1 -1
  22. package/dist/{chunk-2N4WE3KZ-nJkI9rUN.js.map → chunk-OPOZOKLO-nJkI9rUN.js.map} +1 -1
  23. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  24. package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
  25. package/dist/components/FormInput/FormInput.js +1 -1
  26. package/dist/components/InputField/InputField.stories.js +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  28. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  29. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  30. package/dist/components/MultiSelect/index.js +1 -1
  31. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  32. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  33. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  34. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  35. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
  36. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +51 -51
  37. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  38. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  39. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +42 -42
  40. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  41. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +7 -7
  42. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +22 -22
  43. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
  44. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  45. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  46. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  47. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  48. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +24 -24
  49. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  50. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +34 -34
  51. package/dist/components/RteEditor/Plugins/index.js +2 -2
  52. package/dist/components/RteEditor/RteEditor.js +488 -494
  53. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  54. package/dist/components/RteEditor/helpers.js +20 -20
  55. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +15 -15
  56. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +13 -13
  57. package/dist/components/index.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/storybook__react.d.js +1 -1
  60. package/package.json +15 -15
  61. package/dist/Lexical.prod-YJ1n9pVJ.js.map +0 -1
  62. package/dist/LexicalExtension.prod-2-giLTv9.js.map +0 -1
  63. package/dist/LexicalLink.prod-u8L4ioQd.js +0 -528
  64. package/dist/LexicalLink.prod-u8L4ioQd.js.map +0 -1
  65. package/dist/LexicalList.prod-DMU0XSLO.js +0 -630
  66. package/dist/LexicalList.prod-DMU0XSLO.js.map +0 -1
  67. package/dist/LexicalTable.prod-BOlKc5zf.js +0 -1846
  68. package/dist/LexicalTable.prod-BOlKc5zf.js.map +0 -1
  69. package/dist/LexicalUtils.prod-BQnuAaA9.js +0 -92
  70. 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-bFqq2Yd9.js";
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-2N4WE3KZ-nJkI9rUN.js";
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-bFqq2Yd9.js";
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-bFqq2Yd9.js";
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 "react/jsx-runtime";
2
2
  import "../../clsx-OuTLNxxd.js";
3
3
  import "../../MultiSelectItem-BzBmsKof.js";
4
- import { M as p } from "../../TablePlugin-bFqq2Yd9.js";
4
+ import { M as p } from "../../TablePlugin-CzmrXpxk.js";
5
5
  export {
6
6
  p as MultiSelect
7
7
  };
@@ -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-bFqq2Yd9.js";
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-bFqq2Yd9.js";
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";
@@ -1,4 +1,4 @@
1
- import { M as l } from "../../TablePlugin-bFqq2Yd9.js";
1
+ import { M as l } from "../../TablePlugin-CzmrXpxk.js";
2
2
  export {
3
3
  l as MultiSelect
4
4
  };
@@ -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-bFqq2Yd9.js";
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-bFqq2Yd9.js";
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-bFqq2Yd9.js";
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-bFqq2Yd9.js";
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 { a as _, N as p, a5 as h } from "../../../../Lexical.prod-YJ1n9pVJ.js";
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
- }, N = ["bold", "italic"], j = () => {
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: N.map((o) => /* @__PURE__ */ s(
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
- j as BlockFormatPlugin
46
+ w as BlockFormatPlugin
47
47
  };
48
48
  //# sourceMappingURL=BlockFormatPlugin.js.map
@@ -1,70 +1,70 @@
1
- import { jsx as b, jsxs as O } from "react/jsx-runtime";
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 Q } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
5
- import { aK as I, an as U, a as T, N as x, _ as P, g as S, aL as X, V as Y, ad as Z, r as ee } from "../../../../Lexical.prod-YJ1n9pVJ.js";
6
- import { v } from "../../../../LexicalUtils.prod-BQnuAaA9.js";
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 y, $getLinkTypeFromNode as F, REMOVE_COURSE_CATALOGUE_LINK as re, INSERT_COURSE_CATALOGUE_LINK as ne } from "../../nodes/CourseCatalogueNode/CourseCatalogueNode.js";
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 H, removeScrollableContainers as ae } from "../../helpers.js";
12
+ import { setScrollableContainers as F, removeScrollableContainers as ae } from "../../helpers.js";
13
13
  const ke = ({
14
14
  onSearch: A,
15
- searchResponse: V,
15
+ searchResponse: $,
16
16
  parentScrollPosition: j
17
17
  }) => {
18
- const [s] = Q(), d = oe(), [G, _] = k(!1), [M, h] = k(!1), K = L(null), R = L(null), D = L(null), [m, N] = k(null), [B, J] = k("course"), W = L(m !== null), C = (c) => {
19
- J(c);
20
- const r = c === "course" ? K.current?.getBoundingClientRect() : R.current?.getBoundingClientRect();
21
- r && N({ top: r.bottom, left: r.left });
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), N(null);
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
- U
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 (P(t) && a === t.getTextContentSize() && t.getNextSibling() instanceof y) {
35
+ if (U(t) && a === t.getTextContentSize() && t.getNextSibling() instanceof b) {
36
36
  const o = t.getNextSibling();
37
37
  if (o) {
38
- const g = F(o);
39
- _(g === "course"), h(g === "programme");
38
+ const g = H(o);
39
+ _(g === "course"), w(g === "programme");
40
40
  return;
41
41
  }
42
42
  }
43
- const i = v(t, y);
43
+ const i = v(t, b);
44
44
  if (i) {
45
- const o = F(i);
46
- _(o === "course"), h(o === "programme");
45
+ const o = H(i);
46
+ _(o === "course"), w(o === "programme");
47
47
  return;
48
48
  }
49
- _(!1), h(!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
- }, w = (e, n) => P(e) && n === e.getTextContentSize() && e.getNextSibling() instanceof y, $ = s.registerCommand(
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, y);
62
- if (w(a, i) && (o = a.getNextSibling()), !o)
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 (w(a, i)) {
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
- w(a, i) && (o.insertBefore(f), u(f)), i === g && (o.insertAfter(f), u(f));
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
- U
96
- ), q = s.registerCommand(
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, y);
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(), $(), q();
113
+ c(), r(), J(), Q();
114
114
  };
115
- }, [s]), se(D, () => N(null)), E(() => {
116
- const c = (u) => (H(r), u.key === "Escape" && W.current && (u.preventDefault(), u.stopPropagation(), p()), !0);
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 H(r), window.addEventListener("scroll", r), window.addEventListener("resize", r), () => {
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
- m && p();
126
- }, [j]), /* @__PURE__ */ b("div", { className: l["editor__toolbar-button-group"], children: /* @__PURE__ */ O("div", { className: l["editor__toolbar-button-flyoutwrapper"], children: [
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__ */ b(
128
+ /* @__PURE__ */ y(
129
129
  "button",
130
130
  {
131
131
  onClick: () => C("course"),
132
- title: d.cataloguelinks.courseTooltip,
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": d.aria.labels.courselink,
139
- "aria-keyshortcuts": d.aria.keyshortcuts.courselink,
138
+ "aria-label": m.aria.labels.courselink,
139
+ "aria-keyshortcuts": m.aria.keyshortcuts.courselink,
140
140
  type: "button",
141
- ref: K,
142
- children: d.cataloguelinks.courseButtonLabel
141
+ ref: D,
142
+ children: m.cataloguelinks.courseButtonLabel
143
143
  }
144
144
  ),
145
- /* @__PURE__ */ b(
145
+ /* @__PURE__ */ y(
146
146
  "button",
147
147
  {
148
148
  onClick: () => C("programme"),
149
- title: d.cataloguelinks.programmeTooltip,
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": d.aria.labels.programmelink,
156
- "aria-keyshortcuts": d.aria.keyshortcuts.programmelink,
155
+ "aria-label": m.aria.labels.programmelink,
156
+ "aria-keyshortcuts": m.aria.keyshortcuts.programmelink,
157
157
  type: "button",
158
- ref: R,
159
- children: d.cataloguelinks.programmeButtonLabel
158
+ ref: K,
159
+ children: m.cataloguelinks.programmeButtonLabel
160
160
  }
161
161
  )
162
162
  ] }),
163
- m && /* @__PURE__ */ b(
163
+ d && /* @__PURE__ */ y(
164
164
  "div",
165
165
  {
166
166
  className: l["editor__toolbar-flyout-wrapper"],
167
- style: { top: m.top, left: m.left },
168
- ref: D,
169
- children: /* @__PURE__ */ b(
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: V,
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 { aM as _, aN as C, aO as y, aP as k } from "../../../../Lexical.prod-YJ1n9pVJ.js";
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-bFqq2Yd9.js";
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-bFqq2Yd9.js";
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 J } from "react/jsx-runtime";
2
- import { o as W } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { c as Y } from "../../../../clsx-OuTLNxxd.js";
4
- import { N as b, E as q, J as G } from "../../../../LexicalLink.prod-u8L4ioQd.js";
5
- import { useRef as a, useState as Q, useEffect as u } from "react";
6
- import { aa as X, a as p, x as Z, aK as $, N, an as tt, r as et, g as ot } from "../../../../Lexical.prod-YJ1n9pVJ.js";
7
- import { v as w } from "../../../../LexicalUtils.prod-BQnuAaA9.js";
8
- import { A as rt } from "../../../../TablePlugin-bFqq2Yd9.js";
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 U, removeScrollableContainers as at } from "../../helpers.js";
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, Gt = ({ parentScrollPosition: z }) => {
40
- const T = lt(), [i] = W(), { flyout: H, 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 = () => {
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
- }, O = (r, t) => {
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) => B(e, ""),
57
- onDelete: () => j(),
58
- onClose: K,
56
+ onSave: (e) => K(e, ""),
57
+ onDelete: () => A(),
58
+ onClose: B,
59
59
  ref: F
60
60
  }
61
61
  )
62
62
  });
63
- }, K = () => {
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 }, ...A }), setTimeout(() => m.current?.setDefaults("", d.current), 0));
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
- }, B = (r, t) => {
70
+ }, K = (r, t) => {
71
71
  i.update(() => {
72
72
  const e = p();
73
- if (N(e)) {
74
- const o = e.anchor.getNode(), s = w(o, b);
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
- G(nt(r), { target: "_blank" });
85
+ Z(nt(r), { target: "_blank" });
86
86
  }
87
87
  y();
88
88
  });
89
- }, j = () => {
90
- i.dispatchCommand(q, null), K();
91
- }, A = {
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) => B(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 (N(o) && o.isCollapsed()) {
107
- const s = o.anchor.getNode(), n = w(s, b);
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 O(n.getURL(), L), !0;
110
+ return j(n.getURL(), L), !0;
111
111
  }
112
112
  }
113
113
  return !1;
114
114
  }, t = i.registerCommand(
115
- X,
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
- Z,
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(), !N(o))
138
+ if (v(), !w(o))
139
139
  return !1;
140
- const s = o.anchor.getNode(), n = w(s, b), c = (M = "", V = "") => {
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(), N(o)) {
156
- const s = o.anchor.getNode(), n = w(s, b);
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
- }, [z]), u(() => {
179
+ }, [O]), u(() => {
180
180
  k.active || h();
181
181
  }, [k]), u(() => {
182
- const r = (e) => (U(t), e.key === "Escape" && R.current && (e.preventDefault(), e.stopPropagation(), y()), !0);
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 U(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
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__ */ J("div", { className: g["editor__toolbar-button-flyoutwrapper"], children: [
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: Y(
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
- H
208
+ U
209
209
  ] }) });
210
210
  };
211
211
  export {
212
- Gt as LinkPlugin
212
+ Zt as LinkPlugin
213
213
  };
214
214
  //# sourceMappingURL=LinkPlugin.js.map