@uva-glass/component-library 3.53.0 → 3.53.1

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 (121) hide show
  1. package/dist/{Lexical.prod-DH2XfwvA.js → Lexical.prod-CNQPQ6W-.js} +1427 -1409
  2. package/dist/Lexical.prod-CNQPQ6W-.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-DTuNvXAS.js → LexicalClipboard.prod-BdghxvkJ.js} +86 -86
  4. package/dist/{LexicalClipboard.prod-DTuNvXAS.js.map → LexicalClipboard.prod-BdghxvkJ.js.map} +1 -1
  5. package/dist/LexicalExtension.prod-qYTg6Mah.js +551 -0
  6. package/dist/LexicalExtension.prod-qYTg6Mah.js.map +1 -0
  7. package/dist/LexicalLink.prod-DjG5QZHP.js +502 -0
  8. package/dist/LexicalLink.prod-DjG5QZHP.js.map +1 -0
  9. package/dist/{LexicalList.prod-DA9du3qx.js → LexicalList.prod-CzxWmBG3.js} +65 -65
  10. package/dist/LexicalList.prod-CzxWmBG3.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-mQk00-U_.js → LexicalSelection.prod-CqTp0hfr.js} +44 -44
  12. package/dist/LexicalSelection.prod-CqTp0hfr.js.map +1 -0
  13. package/dist/{LexicalTable.prod-RGq0GKAR.js → LexicalTable.prod-C97KnedB.js} +331 -319
  14. package/dist/LexicalTable.prod-C97KnedB.js.map +1 -0
  15. package/dist/{LexicalUtils.prod-DU4QwthB.js → LexicalUtils.prod-lqA_upYF.js} +39 -39
  16. package/dist/LexicalUtils.prod-lqA_upYF.js.map +1 -0
  17. package/dist/{TableCellResizerPlugin-DRwI83s2.js → TableCellResizerPlugin-BdgrIlKp.js} +57 -57
  18. package/dist/{TableCellResizerPlugin-DRwI83s2.js.map → TableCellResizerPlugin-BdgrIlKp.js.map} +1 -1
  19. package/dist/{TablePlugin-DmE96vN7.js → TablePlugin-DBKzGTIm.js} +67 -67
  20. package/dist/{TablePlugin-DmE96vN7.js.map → TablePlugin-DBKzGTIm.js.map} +1 -1
  21. package/dist/{chunk-SS2NHR7W-qmI2h7CJ.js → chunk-GPBRNGY5-UqVYj0H5.js} +3 -3
  22. package/dist/chunk-GPBRNGY5-UqVYj0H5.js.map +1 -0
  23. package/dist/{client-D4oO7Spw.js → client-DkvV9jg_.js} +90 -90
  24. package/dist/{client-D4oO7Spw.js.map → client-DkvV9jg_.js.map} +1 -1
  25. package/dist/components/Accordion/Accordion.test.js +2 -2
  26. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  27. package/dist/components/ActionList/ActionList.test.js +2 -2
  28. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  29. package/dist/components/Attention/Attention.test.js +1 -1
  30. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  31. package/dist/components/Buttons/Button.stories.js +1 -1
  32. package/dist/components/Buttons/Button.test.js +1 -1
  33. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  34. package/dist/components/Buttons/LinkButton.test.js +1 -1
  35. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  36. package/dist/components/Buttons/MenuButton.test.js +1 -1
  37. package/dist/components/Card/Card.test.js +1 -1
  38. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  39. package/dist/components/Checkbox/Checkbox.test.js +2 -2
  40. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  41. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  42. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  43. package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
  44. package/dist/components/Chip/Chip.stories.js +1 -1
  45. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  46. package/dist/components/Drawer/Drawer.stories.js +1 -1
  47. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  48. package/dist/components/FormInput/FormInput.js +1 -1
  49. package/dist/components/FormInput/FormInput.stories.js +1 -1
  50. package/dist/components/IconButton/IconButton.stories.js +1 -1
  51. package/dist/components/InputField/InputField.stories.js +2 -2
  52. package/dist/components/Label/Label.test.js +1 -1
  53. package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
  54. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  55. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  56. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  57. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  58. package/dist/components/MultiSelect/index.js +1 -1
  59. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  60. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
  61. package/dist/components/Notification/Notification.stories.js +1 -1
  62. package/dist/components/Notification/Notification.test.js +1 -1
  63. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  64. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  65. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  66. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  67. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  68. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  69. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  70. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  71. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  72. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  73. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +49 -49
  74. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +7 -7
  75. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  76. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +64 -64
  77. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  78. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +21 -21
  79. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
  80. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  81. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  82. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  83. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  84. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +29 -29
  85. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  86. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +15 -15
  87. package/dist/components/RteEditor/Plugins/index.js +2 -2
  88. package/dist/components/RteEditor/RteEditor.js +218 -215
  89. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  90. package/dist/components/RteEditor/helpers.js +5 -5
  91. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +12 -12
  92. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +14 -14
  93. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  94. package/dist/components/Sortable/Sortable.stories.js +1 -1
  95. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  96. package/dist/components/TextArea/TextArea.stories.js +1 -1
  97. package/dist/components/TextArea/TextArea.test.js +2 -2
  98. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  99. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  100. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  101. package/dist/components/index.js +1 -1
  102. package/dist/{index-B4NxQN5d.js → index-BmvI9fji.js} +308 -307
  103. package/dist/index-BmvI9fji.js.map +1 -0
  104. package/dist/{index-ZQcmo1D_.js → index-Daa6JVq6.js} +2 -2
  105. package/dist/{index-ZQcmo1D_.js.map → index-Daa6JVq6.js.map} +1 -1
  106. package/dist/index.js +1 -1
  107. package/dist/{react-18-BczhA0zC.js → react-18-vQ75Numl.js} +2 -2
  108. package/dist/{react-18-BczhA0zC.js.map → react-18-vQ75Numl.js.map} +1 -1
  109. package/dist/{react.esm-BDo_tPxu.js → react.esm-CzkD5JmE.js} +2 -2
  110. package/dist/{react.esm-BDo_tPxu.js.map → react.esm-CzkD5JmE.js.map} +1 -1
  111. package/dist/storybook__react.d.js +3 -3
  112. package/package.json +21 -21
  113. package/dist/Lexical.prod-DH2XfwvA.js.map +0 -1
  114. package/dist/LexicalLink.prod-BV5Y2RYj.js +0 -1046
  115. package/dist/LexicalLink.prod-BV5Y2RYj.js.map +0 -1
  116. package/dist/LexicalList.prod-DA9du3qx.js.map +0 -1
  117. package/dist/LexicalSelection.prod-mQk00-U_.js.map +0 -1
  118. package/dist/LexicalTable.prod-RGq0GKAR.js.map +0 -1
  119. package/dist/LexicalUtils.prod-DU4QwthB.js.map +0 -1
  120. package/dist/chunk-SS2NHR7W-qmI2h7CJ.js.map +0 -1
  121. package/dist/index-B4NxQN5d.js.map +0 -1
@@ -1,49 +1,49 @@
1
1
  import { jsx as p, jsxs as O } from "react/jsx-runtime";
2
- import { useState as C, useRef as T, useEffect as z } from "react";
3
- import { c as I } from "../../../../clsx-OuTLNxxd.js";
4
- import { o as Y } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
5
- import { at as U, K as F, b as x, y as A, l as P, s as w, au as $, z as q, a3 as J, a0 as Q } from "../../../../Lexical.prod-DH2XfwvA.js";
6
- import { w as K } from "../../../../LexicalUtils.prod-DU4QwthB.js";
2
+ import { useState as C, useRef as L, useEffect as I } from "react";
3
+ import { c as U } from "../../../../clsx-OuTLNxxd.js";
4
+ import { o as W } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
5
+ import { aF as F, V as v, c as T, b as A, p as z, _ as S, aG as X, Y as q, a7 as J, l as Q } from "../../../../Lexical.prod-CNQPQ6W-.js";
6
+ import { x as E } from "../../../../LexicalUtils.prod-lqA_upYF.js";
7
7
  import { AddCatalogueLinkForm as Z } from "./AddCatalogueLinkForm/AddCatalogueLinkForm.js";
8
8
  import { s as i } from "../../../../RteEditor.module-DaBh86FK.js";
9
9
  import { useTranslation as tt } from "../../hooks/useTranslation.js";
10
- import { CourseCatalogueNode as g, $getLinkTypeFromNode as v, REMOVE_COURSE_CATALOGUE_LINK as et, INSERT_COURSE_CATALOGUE_LINK as ot } from "../../nodes/CourseCatalogueNode/CourseCatalogueNode.js";
10
+ import { CourseCatalogueNode as g, $getLinkTypeFromNode as P, REMOVE_COURSE_CATALOGUE_LINK as et, INSERT_COURSE_CATALOGUE_LINK as ot } from "../../nodes/CourseCatalogueNode/CourseCatalogueNode.js";
11
11
  import { useOnClickOutside as rt } from "../../../hooks/useOnClickOutside.js";
12
12
  const gt = ({
13
- onSearch: S,
13
+ onSearch: D,
14
14
  searchResponse: H,
15
15
  parentScrollPosition: j
16
16
  }) => {
17
- const [s] = Y(), c = tt(), [G, k] = C(!1), [M, _] = C(!1), E = T(null), D = T(null), R = T(null), [b, h] = C(null), [B, V] = C("course"), y = (f) => {
18
- V(f);
19
- const u = f === "course" ? E.current?.getBoundingClientRect() : D.current?.getBoundingClientRect();
17
+ const [s] = W(), c = tt(), [G, k] = C(!1), [V, _] = C(!1), K = L(null), w = L(null), B = L(null), [b, h] = C(null), [R, Y] = C("course"), y = (f) => {
18
+ Y(f);
19
+ const u = f === "course" ? K.current?.getBoundingClientRect() : w.current?.getBoundingClientRect();
20
20
  u && h({ top: u.bottom + window.scrollY, left: u.left + window.scrollX });
21
- }, L = () => {
22
- S("", B), h(null);
21
+ }, N = () => {
22
+ D("", R), h(null);
23
23
  };
24
- return z(() => {
25
- b && L();
26
- }, [j]), z(() => {
24
+ return I(() => {
25
+ b && N();
26
+ }, [j]), I(() => {
27
27
  const f = s.registerCommand(
28
- U,
28
+ F,
29
29
  (t) => t.ctrlKey && t.shiftKey && t.altKey && t.key === "C" ? (t.preventDefault(), y("course"), !0) : t.ctrlKey && t.shiftKey && t.altKey && t.key === "P" ? (t.preventDefault(), y("programme"), !0) : !1,
30
- F
30
+ v
31
31
  ), u = s.registerUpdateListener(({ editorState: t }) => {
32
32
  t.read(() => {
33
- const r = x();
33
+ const r = T();
34
34
  if (A(r)) {
35
35
  const e = r.anchor.getNode(), n = r.anchor.offset;
36
- if (P(e) && n === e.getTextContentSize() && e.getNextSibling() instanceof g) {
36
+ if (z(e) && n === e.getTextContentSize() && e.getNextSibling() instanceof g) {
37
37
  const o = e.getNextSibling();
38
38
  if (o) {
39
- const d = v(o);
39
+ const d = P(o);
40
40
  k(d === "course"), _(d === "programme");
41
41
  return;
42
42
  }
43
43
  }
44
- const a = K(e, g);
44
+ const a = E(e, g);
45
45
  if (a) {
46
- const o = v(a);
46
+ const o = P(a);
47
47
  k(o === "course"), _(o === "programme");
48
48
  return;
49
49
  }
@@ -53,33 +53,33 @@ const gt = ({
53
53
  }), m = (t) => {
54
54
  const r = J(), e = t.getTextContentSize();
55
55
  r.setTextNodeRange(t, e, t, e), Q(r);
56
- }, N = (t, r) => P(t) && r === t.getTextContentSize() && t.getNextSibling() instanceof g, W = s.registerCommand(
57
- U,
56
+ }, x = (t, r) => z(t) && r === t.getTextContentSize() && t.getNextSibling() instanceof g, M = s.registerCommand(
57
+ F,
58
58
  (t) => {
59
- const r = x();
59
+ const r = T();
60
60
  if (A(r)) {
61
61
  const e = t.key, n = r.anchor.getNode(), a = r.anchor.offset;
62
- let o = K(n, g);
63
- if (N(n, a) && (o = n.getNextSibling()), !o)
62
+ let o = E(n, g);
63
+ if (x(n, a) && (o = n.getNextSibling()), !o)
64
64
  return !1;
65
65
  const d = o?.getTextContentSize();
66
66
  if (o && t.key === "Enter")
67
67
  return t.preventDefault(), s.update(() => {
68
- if (N(n, a)) {
69
- const l = w(`
68
+ if (x(n, a)) {
69
+ const l = S(`
70
70
  `);
71
71
  o.insertBefore(l);
72
72
  }
73
73
  if (a === d) {
74
- const l = w(`
74
+ const l = S(`
75
75
  `);
76
76
  o.insertAfter(l), m(l);
77
77
  }
78
78
  }), !0;
79
79
  if (o && (e === " " || t.code === "Space"))
80
80
  return t.preventDefault(), s.update(() => {
81
- const l = w(" ");
82
- N(n, a) && (o.insertBefore(l), m(l)), a === d && (o.insertAfter(l), m(l));
81
+ const l = S(" ");
82
+ x(n, a) && (o.insertBefore(l), m(l)), a === d && (o.insertAfter(l), m(l));
83
83
  }), !0;
84
84
  if (o && (e === "Backspace" || e === "Delete"))
85
85
  return t.preventDefault(), s.update(
@@ -93,13 +93,13 @@ const gt = ({
93
93
  }
94
94
  return !1;
95
95
  },
96
- F
97
- ), X = s.registerCommand(
98
- $,
96
+ v
97
+ ), $ = s.registerCommand(
98
+ X,
99
99
  (t) => {
100
- const r = x();
100
+ const r = T();
101
101
  if (A(r)) {
102
- const e = r.anchor.getNode(), n = K(e, g);
102
+ const e = r.anchor.getNode(), n = E(e, g);
103
103
  if (n) {
104
104
  t.preventDefault();
105
105
  const a = s.getElementByKey(n.getKey());
@@ -111,16 +111,16 @@ const gt = ({
111
111
  q
112
112
  );
113
113
  return () => {
114
- f(), u(), W(), X();
114
+ f(), u(), M(), $();
115
115
  };
116
- }, [s]), rt(R, () => h(null)), /* @__PURE__ */ p("div", { className: i["editor__toolbar-button-group"], children: /* @__PURE__ */ O("div", { className: i["editor__toolbar-button-flyoutwrapper"], children: [
116
+ }, [s]), rt(B, () => h(null)), /* @__PURE__ */ p("div", { className: i["editor__toolbar-button-group"], children: /* @__PURE__ */ O("div", { className: i["editor__toolbar-button-flyoutwrapper"], children: [
117
117
  /* @__PURE__ */ O("div", { className: i["editor__toolbar-button-group--text"], children: [
118
118
  /* @__PURE__ */ p(
119
119
  "button",
120
120
  {
121
121
  onClick: () => y("course"),
122
122
  title: c.cataloguelinks.courseTooltip,
123
- className: I(
123
+ className: U(
124
124
  i["editor__toolbar-button"],
125
125
  i["editor__toolbar-button--text"],
126
126
  G && i["editor__toolbar-button--active"]
@@ -128,7 +128,7 @@ const gt = ({
128
128
  "aria-label": c.aria.labels.courselink,
129
129
  "aria-keyshortcuts": c.aria.keyshortcuts.courselink,
130
130
  type: "button",
131
- ref: E,
131
+ ref: K,
132
132
  children: c.cataloguelinks.courseButtonLabel
133
133
  }
134
134
  ),
@@ -137,15 +137,15 @@ const gt = ({
137
137
  {
138
138
  onClick: () => y("programme"),
139
139
  title: c.cataloguelinks.programmeTooltip,
140
- className: I(
140
+ className: U(
141
141
  i["editor__toolbar-button"],
142
142
  i["editor__toolbar-button--text"],
143
- M && i["editor__toolbar-button--active"]
143
+ V && i["editor__toolbar-button--active"]
144
144
  ),
145
145
  "aria-label": c.aria.labels.programmelink,
146
146
  "aria-keyshortcuts": c.aria.keyshortcuts.programmelink,
147
147
  type: "button",
148
- ref: D,
148
+ ref: w,
149
149
  children: c.cataloguelinks.programmeButtonLabel
150
150
  }
151
151
  )
@@ -155,20 +155,20 @@ const gt = ({
155
155
  {
156
156
  className: i["editor__toolbar-flyout-wrapper"],
157
157
  style: { top: b.top, left: b.left },
158
- ref: R,
158
+ ref: B,
159
159
  children: /* @__PURE__ */ p(
160
160
  Z,
161
161
  {
162
- linkType: B,
163
- onCloseHandler: L,
164
- onSearchHandler: S,
162
+ linkType: R,
163
+ onCloseHandler: N,
164
+ onSearchHandler: D,
165
165
  searchResponse: H,
166
166
  onSelect: (f, u, m) => {
167
167
  s.dispatchCommand(ot, {
168
168
  linkType: m,
169
169
  code: f,
170
170
  label: u
171
- }), L();
171
+ }), N();
172
172
  }
173
173
  }
174
174
  )
@@ -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 { av as y, aw as _, ax as C, ay as k } from "../../../../Lexical.prod-DH2XfwvA.js";
4
+ import { aH as _, aI as C, aJ as y, aK as k } from "../../../../Lexical.prod-CNQPQ6W-.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,9 +18,9 @@ import "../../../IconButton/IconButton.js";
18
18
  import "../../../Input/Input.js";
19
19
  import "../../../InputField/InputField.js";
20
20
  import "react-router";
21
- import "../../../../TablePlugin-DmE96vN7.js";
21
+ import "../../../../TablePlugin-DBKzGTIm.js";
22
22
  import { s as r } from "../../../../RteEditor.module-DaBh86FK.js";
23
- import { useTranslation as x } from "../../hooks/useTranslation.js";
23
+ import { useTranslation as g } from "../../hooks/useTranslation.js";
24
24
  import "../../Providers/LanguageProvider.js";
25
25
  import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
26
26
  import "../../hooks/components/Flyout.js";
@@ -33,17 +33,17 @@ import "../../../Sortable/components/SortableItem.js";
33
33
  import "../../../../SortableProvider-BbwlEPIr.js";
34
34
  import "../../../WeekSelector/components/WeekSelectorOptionContainer.js";
35
35
  const ro = () => {
36
- const o = x(), [t] = h(), [p, d] = m(!1), [l, c] = m(!1), u = () => {
37
- t.dispatchCommand(C, void 0);
36
+ const o = g(), [t] = h(), [p, d] = m(!1), [l, c] = m(!1), u = () => {
37
+ t.dispatchCommand(y, void 0);
38
38
  }, b = () => {
39
39
  t.dispatchCommand(k, void 0);
40
40
  };
41
41
  return s(() => t.registerCommand(
42
- y,
42
+ _,
43
43
  (a) => (d(a), !1),
44
44
  1
45
45
  ), [t]), s(() => t.registerCommand(
46
- _,
46
+ C,
47
47
  (a) => (c(a), !1),
48
48
  1
49
49
  ), [t]), /* @__PURE__ */ f("div", { className: r["editor__toolbar-button-group"], children: [
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { A as I } from "../../../../../TablePlugin-DmE96vN7.js";
3
+ import { A as I } from "../../../../../TablePlugin-DBKzGTIm.js";
4
4
  import "../helpers.js";
5
5
  import "../../../../Accordion/Accordion.js";
6
6
  import "../../../../Icon/Icon.js";
@@ -1,14 +1,14 @@
1
1
  import { jsx as f, jsxs as J } from "react/jsx-runtime";
2
2
  import { o as W } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
3
3
  import { c as Y } from "../../../../clsx-OuTLNxxd.js";
4
- import { y as v, P as $, J as q } from "../../../../LexicalLink.prod-BV5Y2RYj.js";
4
+ import { y as L, P as $, J as q } from "../../../../LexicalLink.prod-DjG5QZHP.js";
5
5
  import { useRef as a, useState as G, useEffect as u } from "react";
6
- import { $ as Q, b as p, p as X, at as Z, y as w, K as tt, a0 as et, s as ot } from "../../../../Lexical.prod-DH2XfwvA.js";
7
- import { w as N } from "../../../../LexicalUtils.prod-DU4QwthB.js";
8
- import { A as rt } from "../../../../TablePlugin-DmE96vN7.js";
6
+ import { a4 as Q, c as p, u as X, aF as Z, b as w, V as tt, l as et, _ as ot } from "../../../../Lexical.prod-CNQPQ6W-.js";
7
+ import { x as N } from "../../../../LexicalUtils.prod-lqA_upYF.js";
8
+ import { A as rt } from "../../../../TablePlugin-DBKzGTIm.js";
9
9
  import { ensureHttps as nt } from "./helpers.js";
10
- import { LinkContextMenu as st } from "./LinkContextMenu/LinkContextMenu.js";
11
- import { useFlyout as it } from "../../hooks/useFlyout.js";
10
+ import { LinkContextMenu as it } from "./LinkContextMenu/LinkContextMenu.js";
11
+ import { useFlyout as st } from "../../hooks/useFlyout.js";
12
12
  import "../../../Accordion/Accordion.js";
13
13
  import { Icon as ct } from "../../../Icon/Icon.js";
14
14
  import "../../../Buttons/Button.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 I, 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,124 +36,124 @@ 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, qt = ({ parentScrollPosition: z }) => {
40
- const T = lt(), [s] = W(), { flyout: I, showFlyout: P, hideFlyout: h, isVisible: l } = it(), m = a(void 0), x = a(!1), y = a(""), d = a(""), [C, O] = G({ active: !1, url: "", linktext: "" }), R = a(l), F = a(null), S = a(null), E = a(void 0), k = () => {
41
- s.update(() => {
39
+ const ut = 200, qt = ({ parentScrollPosition: U }) => {
40
+ const x = lt(), [i] = W(), { flyout: V, showFlyout: P, hideFlyout: h, isVisible: l } = st(), m = a(void 0), T = a(!1), C = a(""), d = a(""), [k, z] = G({ active: !1, url: "", linktext: "" }), R = a(l), F = a(null), S = a(null), _ = a(void 0), y = () => {
41
+ i.update(() => {
42
42
  const r = p();
43
43
  F.current = r;
44
44
  });
45
45
  }, D = () => {
46
- s.update(() => {
46
+ i.update(() => {
47
47
  F.current && et(F.current);
48
48
  });
49
- }, A = (r, t) => {
49
+ }, O = (r, t) => {
50
50
  P({
51
51
  position: t,
52
52
  children: /* @__PURE__ */ f(
53
- st,
53
+ it,
54
54
  {
55
55
  url: r,
56
56
  onSave: (e) => B(e, ""),
57
- onDelete: () => H(),
57
+ onDelete: () => A(),
58
58
  onClose: K,
59
- ref: E
59
+ ref: _
60
60
  }
61
61
  )
62
62
  });
63
63
  }, K = () => {
64
- E.current?.clearForm(), h(), D();
65
- }, _ = () => {
64
+ _.current?.clearForm(), h(), D();
65
+ }, E = () => {
66
66
  const r = S.current?.getBoundingClientRect();
67
- !x.current && r && (k(), P({ position: { top: r.bottom, left: r.left }, ...M }), setTimeout(() => m.current?.setDefaults("", d.current), 0));
68
- }, L = () => {
67
+ !T.current && r && (y(), P({ position: { top: r.bottom, left: r.left }, ...H }), setTimeout(() => m.current?.setDefaults("", d.current), 0));
68
+ }, b = () => {
69
69
  h(), D();
70
70
  }, B = (r, t) => {
71
- s.update(() => {
71
+ i.update(() => {
72
72
  const e = p();
73
73
  if (w(e)) {
74
- const o = e.anchor.getNode(), i = N(o, v);
74
+ const o = e.anchor.getNode(), s = N(o, L);
75
75
  if (t && t !== "") {
76
- if (i) {
76
+ if (s) {
77
77
  const n = ot(t);
78
- i.replace(n), n.select();
78
+ s.replace(n), n.select();
79
79
  }
80
- if (t !== y.current && y.current === "") {
80
+ if (t !== C.current && C.current === "") {
81
81
  const { anchor: n, focus: c } = e;
82
82
  e.insertText(t), n.offset -= t.length, c.offset = n.offset + t.length;
83
83
  }
84
84
  }
85
85
  q(nt(r), { target: "_blank" });
86
86
  }
87
- L();
87
+ b();
88
88
  });
89
- }, H = () => {
90
- s.dispatchCommand($, null), K();
91
- }, M = {
89
+ }, A = () => {
90
+ i.dispatchCommand($, null), K();
91
+ }, H = {
92
92
  children: /* @__PURE__ */ f(
93
93
  rt,
94
94
  {
95
- isLink: C,
96
- onCloseHandler: L,
95
+ isLink: k,
96
+ onCloseHandler: b,
97
97
  onSaveHandler: (r, t) => B(r, t),
98
98
  ref: m
99
99
  }
100
100
  )
101
101
  };
102
102
  return u(() => {
103
- l ? (x.current = !0, m.current?.focusFirstField()) : (m.current?.clearForm(), y.current = d.current = "", setTimeout(() => x.current = !1, ut));
103
+ l ? (T.current = !0, m.current?.focusFirstField()) : (m.current?.clearForm(), C.current = d.current = "", setTimeout(() => T.current = !1, ut));
104
104
  }, [m, l]), u(() => {
105
105
  const r = (o) => {
106
106
  if (w(o) && o.isCollapsed()) {
107
- const i = o.anchor.getNode(), n = N(i, v);
107
+ const s = o.anchor.getNode(), n = N(s, L);
108
108
  if (n) {
109
- const c = s.getElementByKey(o.anchor.getNode().getKey()), b = c ? { top: c.getBoundingClientRect().bottom, left: c.getBoundingClientRect().left } : { top: 0, left: 0 };
110
- return A(n.getURL(), b), !0;
109
+ const c = i.getElementByKey(o.anchor.getNode().getKey()), v = c ? { top: c.getBoundingClientRect().bottom, left: c.getBoundingClientRect().left } : { top: 0, left: 0 };
110
+ return O(n.getURL(), v), !0;
111
111
  }
112
112
  }
113
113
  return !1;
114
- }, t = s.registerCommand(
114
+ }, t = i.registerCommand(
115
115
  Q,
116
116
  () => {
117
117
  const o = p();
118
118
  return d.current = o?.getTextContent() ?? "", r(o), !1;
119
119
  },
120
120
  0
121
- ), e = s.registerCommand(
121
+ ), e = i.registerCommand(
122
122
  X,
123
123
  (o) => {
124
- const i = p();
125
- return k(), o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), r(i), !1;
124
+ const s = p();
125
+ return y(), o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), r(s), !1;
126
126
  },
127
127
  0
128
128
  );
129
129
  return () => {
130
130
  e(), t();
131
131
  };
132
- }, [s]), u(() => {
133
- const r = s.registerCommand(
132
+ }, [i]), u(() => {
133
+ const r = i.registerCommand(
134
134
  Z,
135
135
  (e) => {
136
136
  if (e.ctrlKey && e.shiftKey && e.key === "U") {
137
137
  const o = p();
138
- if (k(), !w(o))
138
+ if (y(), !w(o))
139
139
  return !1;
140
- const i = o.anchor.getNode(), n = N(i, v), c = (V = "", j = "") => {
141
- _(), setTimeout(() => m.current?.setDefaults(V, j), 0);
140
+ const s = o.anchor.getNode(), n = N(s, L), c = (M = "", j = "") => {
141
+ E(), setTimeout(() => m.current?.setDefaults(M, j), 0);
142
142
  };
143
143
  if (n)
144
- return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), y.current = n.getTextContent(), c(n.getURL(), n.getTextContent()), !0;
145
- const b = o.getTextContent();
146
- return b !== "" ? (d.current = b, c("", d.current), !0) : (_(), !0);
144
+ return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), C.current = n.getTextContent(), c(n.getURL(), n.getTextContent()), !0;
145
+ const v = o.getTextContent();
146
+ return v !== "" ? (d.current = v, c("", d.current), !0) : (E(), !0);
147
147
  }
148
148
  return !1;
149
149
  },
150
150
  tt
151
- ), t = s.registerUpdateListener(({ editorState: e }) => {
152
- O(
151
+ ), t = i.registerUpdateListener(({ editorState: e }) => {
152
+ z(
153
153
  e.read(() => {
154
154
  const o = p();
155
- if (k(), w(o)) {
156
- const i = o.anchor.getNode(), n = N(i, v);
155
+ if (y(), w(o)) {
156
+ const s = o.anchor.getNode(), n = N(s, L);
157
157
  if (n)
158
158
  return {
159
159
  active: !0,
@@ -172,40 +172,40 @@ const ut = 200, qt = ({ parentScrollPosition: z }) => {
172
172
  return () => {
173
173
  r(), t();
174
174
  };
175
- }, [s]), u(() => {
176
- R.current = l, l || E.current?.clearForm();
175
+ }, [i]), u(() => {
176
+ R.current = l, l || _.current?.clearForm();
177
177
  }, [l]), u(() => {
178
- l && L();
179
- }, [z]), u(() => {
180
- C.active || h();
181
- }, [C]), u(() => {
182
- const r = (e) => (U(t), e.key === "Escape" && R.current && (e.preventDefault(), e.stopPropagation(), L()), !0);
178
+ l && b();
179
+ }, [U]), u(() => {
180
+ k.active || h();
181
+ }, [k]), u(() => {
182
+ const r = (e) => (I(t), e.key === "Escape" && R.current && (e.preventDefault(), e.stopPropagation(), b()), !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 I(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
190
  }, []), /* @__PURE__ */ f("div", { className: g["editor__toolbar-button-group"], children: /* @__PURE__ */ J("div", { className: g["editor__toolbar-button-flyoutwrapper"], children: [
191
191
  /* @__PURE__ */ f(
192
192
  "button",
193
193
  {
194
- onClick: _,
195
- title: T.links.linkTooltip,
194
+ onClick: E,
195
+ title: x.links.linkTooltip,
196
196
  className: Y(
197
197
  g["editor__toolbar-button"],
198
198
  g["editor__toolbar-button--link"],
199
- C.active && g["editor__toolbar-button--active"]
199
+ k.active && g["editor__toolbar-button--active"]
200
200
  ),
201
- "aria-label": T.aria.labels.link,
202
- "aria-keyshortcuts": T.aria.keyshortcuts.link,
201
+ "aria-label": x.aria.labels.link,
202
+ "aria-keyshortcuts": x.aria.keyshortcuts.link,
203
203
  type: "button",
204
204
  ref: S,
205
205
  children: /* @__PURE__ */ f(ct, { name: "Link", size: 20 })
206
206
  }
207
207
  ),
208
- I
208
+ V
209
209
  ] }) });
210
210
  };
211
211
  export {
@@ -1,4 +1,4 @@
1
- import { H as w } from "../../../../LexicalLink.prod-BV5Y2RYj.js";
1
+ import { H as w } from "../../../../LexicalLink.prod-DjG5QZHP.js";
2
2
  const a = /^(http|https):\/\//, s = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/, A = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, z = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})?$/, n = (t) => t === "https://" || s.test(t), o = (t) => t === "https://" || z.test(t), r = [
3
3
  w(s, (t) => a.test(t) ? t : `//${t}`),
4
4
  w(A, (t) => `mailto:${t}`)
@@ -1,51 +1,51 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
- import { o as x } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { k as b, x as _, S as v, o as D, d as N, h as I, l as P } from "../../../../LexicalList.prod-DA9du3qx.js";
2
+ import { o as I } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
3
+ import { k as b, x as _, S as v, o as K, d as N, h as P, l as y } from "../../../../LexicalList.prod-CzxWmBG3.js";
4
4
  import { useState as p, useEffect as k } from "react";
5
- import { c as w } from "../../../../clsx-OuTLNxxd.js";
6
- import { at as z, K as O, Y as U, b as K, y as S, z as B } from "../../../../Lexical.prod-DH2XfwvA.js";
7
- import { w as E } from "../../../../LexicalUtils.prod-DU4QwthB.js";
8
- import { Icon as Y } from "../../../Icon/Icon.js";
5
+ import { c as $ } from "../../../../clsx-OuTLNxxd.js";
6
+ import { aF as O, V as U, a2 as Y, c as x, b as S, Y as B } from "../../../../Lexical.prod-CNQPQ6W-.js";
7
+ import { x as E } from "../../../../LexicalUtils.prod-lqA_upYF.js";
8
+ import { Icon as F } from "../../../Icon/Icon.js";
9
9
  import { s as n } from "../../../../RteEditor.module-DaBh86FK.js";
10
- import { useTranslation as $ } from "../../hooks/useTranslation.js";
10
+ import { useTranslation as V } from "../../hooks/useTranslation.js";
11
11
  const j = {
12
12
  bullet: "BulletList",
13
13
  number: "NumberedList"
14
- }, M = ["bullet", "number"], W = () => {
15
- const m = $(), [e] = x(), [h, s] = p(null), [u, g] = p(!1), [c, L] = p(!1), y = (t) => {
14
+ }, w = ["bullet", "number"], W = () => {
15
+ const m = V(), [e] = I(), [h, s] = p(null), [u, g] = p(!1), [c, L] = p(!1), D = (t) => {
16
16
  t === "number" && h !== "number" ? (e.dispatchCommand(_, void 0), s("number")) : t === "bullet" && h !== "bullet" ? (e.dispatchCommand(v, void 0), s("bullet")) : (e.dispatchCommand(b, void 0), s(null));
17
17
  };
18
18
  return k(() => {
19
19
  const t = e.registerCommand(
20
- z,
20
+ O,
21
21
  (o) => o.ctrlKey && o.shiftKey && o.code === "Digit7" ? (o.preventDefault(), c ? e.dispatchCommand(b, void 0) : e.dispatchCommand(_, void 0), !0) : o.ctrlKey && o.shiftKey && o.code === "Digit8" ? (o.preventDefault(), u ? e.dispatchCommand(b, void 0) : e.dispatchCommand(v, void 0), !0) : !1,
22
- O
22
+ U
23
23
  );
24
24
  return () => {
25
25
  t();
26
26
  };
27
27
  }, [e, c, u]), k(() => {
28
28
  const t = e.registerCommand(
29
- U,
29
+ Y,
30
30
  (d) => (d.preventDefault(), e.update(() => {
31
- const i = K();
31
+ const i = x();
32
32
  if (!S(i))
33
33
  return;
34
34
  const l = i.anchor.getNode(), a = l.getParent();
35
- if (!D(a))
35
+ if (!K(a))
36
36
  return;
37
37
  const r = a.getParent();
38
38
  if (N(r)) {
39
- const C = I(N(r) ? r.getListType() : "bullet");
39
+ const C = P(N(r) ? r.getListType() : "bullet");
40
40
  a.append(C), C.append(l);
41
41
  }
42
42
  }), !0),
43
43
  B
44
44
  ), o = e.registerUpdateListener(({ editorState: d }) => {
45
45
  d.read(() => {
46
- const i = K();
46
+ const i = x();
47
47
  if (S(i)) {
48
- const l = i.anchor.getNode(), a = E(l, P);
48
+ const l = i.anchor.getNode(), a = E(l, y);
49
49
  if (a) {
50
50
  const r = a.getTag();
51
51
  g(r === "ul"), L(r === "ol"), r === "ul" && s("bullet"), r === "ol" && s("number");
@@ -59,12 +59,12 @@ const j = {
59
59
  return () => {
60
60
  o(), t();
61
61
  };
62
- }, [e]), /* @__PURE__ */ f("div", { className: n["editor__toolbar-button-group"], children: M.map((t) => /* @__PURE__ */ f(
62
+ }, [e]), /* @__PURE__ */ f("div", { className: n["editor__toolbar-button-group"], children: w.map((t) => /* @__PURE__ */ f(
63
63
  "button",
64
64
  {
65
- onClick: () => y(t),
65
+ onClick: () => D(t),
66
66
  title: m.format[`${t}Tooltip`],
67
- className: w(
67
+ className: $(
68
68
  n["editor__toolbar-button"],
69
69
  n[`editor__toolbar-button--${t}`],
70
70
  t === "bullet" && u && n["editor__toolbar-button--active"],
@@ -73,7 +73,7 @@ const j = {
73
73
  "aria-label": m.aria.labels[t],
74
74
  "aria-keyshortcuts": m.aria.keyshortcuts[t],
75
75
  type: "button",
76
- children: /* @__PURE__ */ f(Y, { name: j[t], size: 24 })
76
+ children: /* @__PURE__ */ f(F, { name: j[t], size: 24 })
77
77
  },
78
78
  t
79
79
  )) });
@@ -1,16 +1,16 @@
1
1
  import { o as m } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
2
2
  import { useEffect as c } from "react";
3
- import { ad as f, ae as p, b as d } from "../../../../Lexical.prod-DH2XfwvA.js";
4
- import { L as i } from "../../../../LexicalUtils.prod-DU4QwthB.js";
5
- import { R as u } from "../../../../LexicalClipboard.prod-DTuNvXAS.js";
3
+ import { n as f, ah as p, c as u } from "../../../../Lexical.prod-CNQPQ6W-.js";
4
+ import { P as i } from "../../../../LexicalUtils.prod-lqA_upYF.js";
5
+ import { R as d } from "../../../../LexicalClipboard.prod-BdghxvkJ.js";
6
6
  import { d as D } from "../../../../index-yEhaxKq-.js";
7
- const L = () => {
7
+ const w = () => {
8
8
  const [e] = m(), l = (t) => {
9
9
  t.preventDefault(), e.update(() => {
10
- const r = d(), a = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
10
+ const r = u(), a = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
11
11
  if (a != null && r !== null) {
12
12
  const o = a.getData("text/html") || a.getData("text/plain"), n = new DataTransfer(), s = new D.MSWordNormalizer();
13
- n.setData("text/html", o), s.isActive(o) && n.setData("text/html", s.normalize(o)), u(n, r, e);
13
+ n.setData("text/html", o), s.isActive(o) && n.setData("text/html", s.normalize(o)), d(n, r, e);
14
14
  }
15
15
  });
16
16
  };
@@ -26,6 +26,6 @@ const L = () => {
26
26
  }, [e]), null;
27
27
  };
28
28
  export {
29
- L as PasteHandlerPlugin
29
+ w as PasteHandlerPlugin
30
30
  };
31
31
  //# sourceMappingURL=PasteHandlerPlugin.js.map