@uva-glass/component-library 3.53.11 → 3.53.13

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 (65) hide show
  1. package/dist/{chunk-MDLQUVZN-Dk02kWJ8.js → chunk-2N4WE3KZ-DQvXvHLf.js} +534 -530
  2. package/dist/chunk-2N4WE3KZ-DQvXvHLf.js.map +1 -0
  3. package/dist/{client-3XNwBsl7.js → client-D5eE1v54.js} +90 -90
  4. package/dist/{client-3XNwBsl7.js.map → client-D5eE1v54.js.map} +1 -1
  5. package/dist/components/Accordion/Accordion.test.js +2 -2
  6. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  7. package/dist/components/ActionList/ActionList.test.js +2 -2
  8. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  9. package/dist/components/Attention/Attention.test.js +1 -1
  10. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  11. package/dist/components/Buttons/Button.stories.js +1 -1
  12. package/dist/components/Buttons/Button.test.js +1 -1
  13. package/dist/components/Buttons/LinkButton.stories.js +1 -1
  14. package/dist/components/Buttons/LinkButton.test.js +1 -1
  15. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  16. package/dist/components/Buttons/MenuButton.test.js +1 -1
  17. package/dist/components/Card/Card.test.js +1 -1
  18. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  19. package/dist/components/Checkbox/Checkbox.test.js +2 -2
  20. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  21. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  22. package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
  23. package/dist/components/Chip/Chip.stories.js +1 -1
  24. package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
  25. package/dist/components/Drawer/Drawer.stories.js +1 -1
  26. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  27. package/dist/components/FormInput/FormInput.stories.js +1 -1
  28. package/dist/components/IconButton/IconButton.stories.js +1 -1
  29. package/dist/components/InputField/InputField.stories.js +1 -1
  30. package/dist/components/Label/Label.test.js +1 -1
  31. package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
  32. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  33. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  34. package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
  35. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
  36. package/dist/components/Notification/Notification.stories.js +1 -1
  37. package/dist/components/Notification/Notification.test.js +1 -1
  38. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  39. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  40. package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
  41. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  42. package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
  43. package/dist/components/RteEditor/RteEditor.js +154 -153
  44. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  45. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  46. package/dist/components/Sortable/Sortable.stories.js +1 -1
  47. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  48. package/dist/components/TextArea/TextArea.stories.js +1 -1
  49. package/dist/components/TextArea/TextArea.test.js +2 -2
  50. package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
  51. package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
  52. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  53. package/dist/{index-CdPMY4ux.js → index-1WwGCyua.js} +8847 -7067
  54. package/dist/index-1WwGCyua.js.map +1 -0
  55. package/dist/{index-CLNHDZVV.js → index-YdDr6J97.js} +2 -2
  56. package/dist/{index-CLNHDZVV.js.map → index-YdDr6J97.js.map} +1 -1
  57. package/dist/{react-18-D3e2aqkg.js → react-18-CxCoNkIN.js} +2 -2
  58. package/dist/{react-18-D3e2aqkg.js.map → react-18-CxCoNkIN.js.map} +1 -1
  59. package/dist/{react.esm-QW7uOFDD.js → react.esm-C68fQMAi.js} +2 -2
  60. package/dist/{react.esm-QW7uOFDD.js.map → react.esm-C68fQMAi.js.map} +1 -1
  61. package/dist/storybook__react.d.js +281 -278
  62. package/dist/storybook__react.d.js.map +1 -1
  63. package/package.json +26 -26
  64. package/dist/chunk-MDLQUVZN-Dk02kWJ8.js.map +0 -1
  65. package/dist/index-CdPMY4ux.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { jsx as m, jsxs as F, Fragment as ke } from "react/jsx-runtime";
2
- import { t as Ye, r as qe, o as D } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { ar as Pe, al as A, $ as Ge, c as p, az as oe, at as ae, aA as H, M as se, U as Ve, p as I, b as g, a2 as Ze, V as c, aX as Qe, n as et, r as tt, i as rt, aY as nt, aZ as ot, X as at, k as T, aG as st, a_ as it, a$ as lt, b0 as ut, A as re, b1 as dt, b2 as ct, a7 as ft, S as mt, l as De, P as pt, b3 as gt, b4 as ue, h as de, W as ht, G as Z, T as vt, a8 as Le, b5 as ce, B as yt, N as Ct, y as bt, b6 as fe, z as Et, b7 as wt, b8 as St, aj as Te, aT as xt, a0 as _t, d as Be, Z as Nt, b9 as $t, a1 as kt, F as Pt, D as Dt, u as Lt, aI as Y, aH as q, ba as Tt, bb as Bt, aK as It, bc as ne, aJ as Rt, bd as Mt, be as Ft, ax as At } from "../../Lexical.prod-Dgzi-S1E.js";
1
+ import { jsx as f, jsxs as F, Fragment as $e } from "react/jsx-runtime";
2
+ import { t as Ye, r as qe, o as L } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
+ import { ar as Pe, al as A, $ as Ge, c as p, az as oe, at as ae, aA as H, M as se, U as Ve, p as I, b as g, a2 as Ze, V as c, aX as Qe, n as et, r as tt, i as rt, aY as nt, aZ as ot, X as at, k as T, aG as st, a_ as it, a$ as lt, b0 as ut, A as re, b1 as dt, b2 as ct, a7 as ft, S as mt, l as Le, P as pt, b3 as gt, b4 as ue, h as de, W as ht, G as Z, T as vt, a8 as De, b5 as ce, B as yt, N as Ct, y as bt, b6 as fe, z as Et, b7 as wt, b8 as St, aj as Te, aT as xt, a0 as _t, d as Be, Z as Nt, b9 as kt, a1 as $t, F as Pt, D as Lt, u as Dt, aI as Y, aH as q, ba as Tt, bb as Bt, aK as It, bc as ne, aJ as Rt, bd as Mt, be as Ft, ax as At } from "../../Lexical.prod-Dgzi-S1E.js";
4
4
  import * as Ut from "react";
5
5
  import { useMemo as O, useLayoutEffect as j, useEffect as b, useState as M, Suspense as zt, forwardRef as Ie, useCallback as Kt, Component as Ht, createElement as me, createContext as Ot, useId as jt } from "react";
6
6
  import { a as Wt, T as Jt } from "../../TableCellResizerPlugin-9kvw_LpH.js";
@@ -47,55 +47,55 @@ import { UvaTheme as wr } from "./UvaTheme/UvaTheme.js";
47
47
  import { EditorHeader as Sr } from "./EditorHeader/EditorHeader.js";
48
48
  import { LanguageProvider as xr, useLanguage as _r } from "./Providers/LanguageProvider.js";
49
49
  import { TableWrapperNode as Nr } from "./nodes/TableWrapperNode/TableWrapperNode.js";
50
- import { CourseCatalogueNode as $r } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
51
- const He = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, kr = He ? j : b, G = { tag: oe };
52
- function Pr({ initialConfig: r, children: e }) {
50
+ import { CourseCatalogueNode as kr, CourseCatalogueLinkPlugin as $r } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
51
+ const He = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Pr = He ? j : b, G = { tag: oe };
52
+ function Lr({ initialConfig: r, children: e }) {
53
53
  const t = O(() => {
54
- const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Ye(null, n), u = Pe({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (f) => s(f, u), theme: n });
55
- return (function(f, h) {
54
+ const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Ye(null, n), u = Pe({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
55
+ return (function(m, h) {
56
56
  if (h !== null) {
57
- if (h === void 0) f.update(() => {
57
+ if (h === void 0) m.update(() => {
58
58
  const S = A();
59
59
  if (S.isEmpty()) {
60
60
  const y = Ge();
61
61
  S.append(y);
62
62
  const x = He ? document.activeElement : null;
63
- (p() !== null || x !== null && x === f.getRootElement()) && y.select();
63
+ (p() !== null || x !== null && x === m.getRootElement()) && y.select();
64
64
  }
65
65
  }, G);
66
66
  else if (h !== null) switch (typeof h) {
67
67
  case "string": {
68
- const S = f.parseEditorState(h);
69
- f.setEditorState(S, G);
68
+ const S = m.parseEditorState(h);
69
+ m.setEditorState(S, G);
70
70
  break;
71
71
  }
72
72
  case "object":
73
- f.setEditorState(h, G);
73
+ m.setEditorState(h, G);
74
74
  break;
75
75
  case "function":
76
- f.update(() => {
77
- A().isEmpty() && h(f);
76
+ m.update(() => {
77
+ A().isEmpty() && h(m);
78
78
  }, G);
79
79
  }
80
80
  }
81
81
  })(u, i), [u, d];
82
82
  }, []);
83
- return kr(() => {
83
+ return Pr(() => {
84
84
  const n = r.editable, [o] = t;
85
85
  o.setEditable(n === void 0 || n);
86
- }, []), m(qe.Provider, { value: t, children: e });
86
+ }, []), f(qe.Provider, { value: t, children: e });
87
87
  }
88
88
  const Dr = ae({ name: "@lexical/react/ReactProvider" });
89
- function Lr() {
89
+ function Tr() {
90
90
  return A().getTextContent();
91
91
  }
92
- function Tr(r, e = !0) {
92
+ function Br(r, e = !0) {
93
93
  if (r) return !1;
94
- let t = Lr();
94
+ let t = Tr();
95
95
  return e && (t = t.trim()), t === "";
96
96
  }
97
- function Br(r) {
98
- if (!Tr(r, !1)) return !1;
97
+ function Ir(r) {
98
+ if (!Br(r, !1)) return !1;
99
99
  const e = A().getChildren(), t = e.length;
100
100
  if (t > 1) return !1;
101
101
  for (let n = 0; n < t; n++) {
@@ -113,9 +113,9 @@ function Br(r) {
113
113
  return !0;
114
114
  }
115
115
  function Oe(r) {
116
- return () => Br(r);
116
+ return () => Ir(r);
117
117
  }
118
- function Ir(r) {
118
+ function Rr(r) {
119
119
  const e = window.location.origin, t = (n) => {
120
120
  if (n.origin !== e) return;
121
121
  const o = r.getRootElement();
@@ -133,13 +133,13 @@ function Ir(r) {
133
133
  if (i && i.functionId === "makeChanges") {
134
134
  const l = i.args;
135
135
  if (l) {
136
- const [d, u, f, h, S] = l;
136
+ const [d, u, m, h, S] = l;
137
137
  r.update(() => {
138
138
  const y = p();
139
139
  if (g(y)) {
140
140
  const x = y.anchor;
141
141
  let E = x.getNode(), C = 0, v = 0;
142
- if (I(E) && d >= 0 && u >= 0 && (C = d, v = d + u, y.setTextNodeRange(E, C, E, v)), C === v && f === "" || (y.insertRawText(f), E = x.getNode()), I(E)) {
142
+ if (I(E) && d >= 0 && u >= 0 && (C = d, v = d + u, y.setTextNodeRange(E, C, E, v)), C === v && m === "" || (y.insertRawText(m), E = x.getNode()), I(E)) {
143
143
  C = h, v = h + S;
144
144
  const _ = E.getTextContentSize();
145
145
  C = C > _ ? _ : C, v = v > _ ? _ : v, y.setTextNodeRange(E, C, E, v);
@@ -167,7 +167,7 @@ function be(r, e) {
167
167
  }
168
168
  return null;
169
169
  }
170
- const U = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Rr = U && "documentMode" in document ? document.documentMode : null, Mr = U && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Fr = !(!U || !("InputEvent" in window) || Rr) && "getTargetRanges" in new window.InputEvent("input"), Ar = U && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = U && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ur = U && /^(?=.*Chrome).*/i.test(navigator.userAgent), zr = U && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Mr && !Ur, we = tt("DRAG_DROP_PASTE_FILE");
170
+ const U = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Mr = U && "documentMode" in document ? document.documentMode : null, Fr = U && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Ar = !(!U || !("InputEvent" in window) || Mr) && "getTargetRanges" in new window.InputEvent("input"), Ur = U && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = U && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, zr = U && /^(?=.*Chrome).*/i.test(navigator.userAgent), Kr = U && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Fr && !zr, we = tt("DRAG_DROP_PASTE_FILE");
171
171
  function V(r) {
172
172
  let e = null;
173
173
  if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
@@ -195,20 +195,20 @@ function xe(r) {
195
195
  function Q(r) {
196
196
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
197
197
  }
198
- function Kr(r) {
199
- return W(r.registerCommand(Lt, (e) => {
198
+ function Hr(r) {
199
+ return W(r.registerCommand(Dt, (e) => {
200
200
  const t = p();
201
201
  return !!T(t) && (t.clear(), !0);
202
202
  }, c), r.registerCommand(Z, (e) => {
203
203
  const t = p();
204
204
  return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
205
- }, c), r.registerCommand(Dt, (e) => {
205
+ }, c), r.registerCommand(Lt, (e) => {
206
206
  const t = p();
207
207
  return !!g(t) && (t.deleteWord(e), !0);
208
208
  }, c), r.registerCommand(Pt, (e) => {
209
209
  const t = p();
210
210
  return !!g(t) && (t.deleteLine(e), !0);
211
- }, c), r.registerCommand(kt, (e) => {
211
+ }, c), r.registerCommand($t, (e) => {
212
212
  const t = p();
213
213
  if (typeof e == "string") t !== null && t.insertText(e);
214
214
  else {
@@ -221,7 +221,7 @@ function Kr(r) {
221
221
  }
222
222
  }
223
223
  return !0;
224
- }, c), r.registerCommand($t, () => {
224
+ }, c), r.registerCommand(kt, () => {
225
225
  const e = p();
226
226
  return !!g(e) && (e.removeText(), !0);
227
227
  }, c), r.registerCommand(Nt, (e) => {
@@ -302,7 +302,7 @@ function Kr(r) {
302
302
  const { anchor: o } = n;
303
303
  if (o.offset !== 0) return !1;
304
304
  const a = o.getNode();
305
- if (Le(a)) return !1;
305
+ if (De(a)) return !1;
306
306
  const s = Qt(a);
307
307
  return s.getIndent() > 0 && (s.is(a) || a.is(s.getFirstDescendant()));
308
308
  })(t)) return e.preventDefault(), r.dispatchCommand(ce, void 0);
@@ -317,7 +317,7 @@ function Kr(r) {
317
317
  const t = p();
318
318
  if (!g(t)) return !1;
319
319
  if (Q(t), e !== null) {
320
- if ((Ee || Ar || zr) && Fr) return !1;
320
+ if ((Ee || Ur || Kr) && Ar) return !1;
321
321
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(ue, !1);
322
322
  }
323
323
  return r.dispatchCommand(de, void 0);
@@ -334,11 +334,11 @@ function Kr(r) {
334
334
  const l = ft();
335
335
  if (I(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
336
336
  else {
337
- const u = i.getParentOrThrow().getKey(), f = i.getIndexWithinParent() + 1;
338
- l.anchor.set(u, f, "element"), l.focus.set(u, f, "element");
337
+ const u = i.getParentOrThrow().getKey(), m = i.getIndexWithinParent() + 1;
338
+ l.anchor.set(u, m, "element"), l.focus.set(u, m, "element");
339
339
  }
340
340
  const d = mt(l);
341
- De(d);
341
+ Le(d);
342
342
  }
343
343
  r.dispatchCommand(we, t);
344
344
  }
@@ -379,14 +379,14 @@ function Kr(r) {
379
379
  return g(t) && Q(t), !1;
380
380
  }, c));
381
381
  }
382
- function Hr(r, ...e) {
382
+ function Or(r, ...e) {
383
383
  const t = new URL("https://lexical.dev/docs/error"), n = new URLSearchParams();
384
384
  n.append("code", r);
385
385
  for (const o of e) n.append("v", o);
386
386
  throw t.search = n.toString(), Error(`Minified Lexical error #${r}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
387
387
  }
388
388
  const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
389
- function Or({ editor: r, ErrorBoundary: e }) {
389
+ function jr({ editor: r, ErrorBoundary: e }) {
390
390
  return (function(t, n) {
391
391
  const [o, a] = M(() => t.getDecorators());
392
392
  return le(() => t.registerDecoratorListener((s) => {
@@ -398,34 +398,34 @@ function Or({ editor: r, ErrorBoundary: e }) {
398
398
  }, [t]), O(() => {
399
399
  const s = [], i = Object.keys(o);
400
400
  for (let l = 0; l < i.length; l++) {
401
- const d = i[l], u = m(n, { onError: (h) => t._onError(h), children: m(zt, { fallback: null, children: o[d] }) }), f = t.getElementByKey(d);
402
- f !== null && s.push(Zt(u, f, d));
401
+ const d = i[l], u = f(n, { onError: (h) => t._onError(h), children: f(zt, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
402
+ m !== null && s.push(Zt(u, m, d));
403
403
  }
404
404
  return s;
405
405
  }, [n, o, t]);
406
406
  })(r, e);
407
407
  }
408
- function jr({ editor: r, ErrorBoundary: e }) {
408
+ function Wr({ editor: r, ErrorBoundary: e }) {
409
409
  return (function(t) {
410
410
  const n = Xt.maybeFromEditor(t);
411
411
  if (n && n.hasExtensionByName(Dr.name)) {
412
- for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && Hr(320, o);
412
+ for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && Or(320, o);
413
413
  return !0;
414
414
  }
415
415
  return !1;
416
- })(r) ? null : m(Or, { editor: r, ErrorBoundary: e });
416
+ })(r) ? null : f(jr, { editor: r, ErrorBoundary: e });
417
417
  }
418
418
  function _e(r) {
419
419
  return r.getEditorState().read(Oe(r.isComposing()));
420
420
  }
421
- function Wr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
422
- const [n] = D();
421
+ function Jr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
422
+ const [n] = L();
423
423
  return (function(o) {
424
- le(() => W(Kr(o), Ir(o)), [o]);
425
- })(n), F(ke, { children: [r, m(Jr, { content: e }), m(jr, { editor: n, ErrorBoundary: t })] });
424
+ le(() => W(Hr(o), Rr(o)), [o]);
425
+ })(n), F($e, { children: [r, f(Xr, { content: e }), f(Wr, { editor: n, ErrorBoundary: t })] });
426
426
  }
427
- function Jr({ content: r }) {
428
- const [e] = D(), t = (function(o) {
427
+ function Xr({ content: r }) {
428
+ const [e] = L(), t = (function(o) {
429
429
  const [a, s] = M(() => _e(o));
430
430
  return le(() => {
431
431
  function i() {
@@ -442,28 +442,28 @@ function Jr({ content: r }) {
442
442
  return t ? typeof r == "function" ? r(n) : r : null;
443
443
  }
444
444
  const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
445
- function Xr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: f, ariaRequired: h, autoCapitalize: S, className: y, id: x, role: E = "textbox", spellCheck: C = !0, style: v, tabIndex: _, "data-testid": L, ...P }, k) {
446
- const [w, R] = M(r.isEditable()), N = Kt(($) => {
447
- $ && $.ownerDocument && $.ownerDocument.defaultView ? r.setRootElement($) : r.setRootElement(null);
448
- }, [r]), J = O(() => /* @__PURE__ */ (function(...$) {
445
+ function Yr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: h, autoCapitalize: S, className: y, id: x, role: E = "textbox", spellCheck: C = !0, style: v, tabIndex: _, "data-testid": D, ...P }, $) {
446
+ const [w, R] = M(r.isEditable()), N = Kt((k) => {
447
+ k && k.ownerDocument && k.ownerDocument.defaultView ? r.setRootElement(k) : r.setRootElement(null);
448
+ }, [r]), J = O(() => /* @__PURE__ */ (function(...k) {
449
449
  return (X) => {
450
- for (const K of $) typeof K == "function" ? K(X) : K != null && (K.current = X);
450
+ for (const K of k) typeof K == "function" ? K(X) : K != null && (K.current = X);
451
451
  };
452
- })(k, N), [N, k]);
453
- return je(() => (R(r.isEditable()), r.registerEditableListener(($) => {
454
- R($);
455
- })), [r]), m("div", { "aria-activedescendant": w ? e : void 0, "aria-autocomplete": w ? t : "none", "aria-controls": w ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": w && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": w ? f : void 0, "aria-readonly": !w || void 0, "aria-required": h, autoCapitalize: S, className: y, contentEditable: w, "data-testid": L, id: x, ref: J, role: E, spellCheck: C, style: v, tabIndex: _, ...P });
452
+ })($, N), [N, $]);
453
+ return je(() => (R(r.isEditable()), r.registerEditableListener((k) => {
454
+ R(k);
455
+ })), [r]), f("div", { "aria-activedescendant": w ? e : void 0, "aria-autocomplete": w ? t : "none", "aria-controls": w ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": w && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": w ? m : void 0, "aria-readonly": !w || void 0, "aria-required": h, autoCapitalize: S, className: y, contentEditable: w, "data-testid": D, id: x, ref: J, role: E, spellCheck: C, style: v, tabIndex: _, ...P });
456
456
  }
457
- const Yr = Ie(Xr);
457
+ const qr = Ie(Yr);
458
458
  function Ne(r) {
459
459
  return r.getEditorState().read(Oe(r.isComposing()));
460
460
  }
461
- const qr = Ie(Gr);
462
- function Gr(r, e) {
463
- const { placeholder: t, ...n } = r, [o] = D();
464
- return F(ke, { children: [m(Yr, { editor: o, ...n, ref: e }), t != null && m(Vr, { editor: o, content: t })] });
461
+ const Gr = Ie(Vr);
462
+ function Vr(r, e) {
463
+ const { placeholder: t, ...n } = r, [o] = L();
464
+ return F($e, { children: [f(qr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
465
465
  }
466
- function Vr({ content: r, editor: e }) {
466
+ function Zr({ content: r, editor: e }) {
467
467
  const t = (function(s) {
468
468
  const [i, l] = M(() => Ne(s));
469
469
  return je(() => {
@@ -482,13 +482,13 @@ function Vr({ content: r, editor: e }) {
482
482
  o(s);
483
483
  })), [e]), !t) return null;
484
484
  let a = null;
485
- return typeof r == "function" ? a = r(n) : r !== null && (a = r), a === null ? null : m("div", { "aria-hidden": !0, children: a });
485
+ return typeof r == "function" ? a = r(n) : r !== null && (a = r), a === null ? null : f("div", { "aria-hidden": !0, children: a });
486
486
  }
487
- const Zr = Ot(null), ee = {
487
+ const Qr = Ot(null), ee = {
488
488
  didCatch: !1,
489
489
  error: null
490
490
  };
491
- class Qr extends Ht {
491
+ class en extends Ht {
492
492
  constructor(e) {
493
493
  super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ee;
494
494
  }
@@ -507,7 +507,7 @@ class Qr extends Ht {
507
507
  }
508
508
  componentDidUpdate(e, t) {
509
509
  const { didCatch: n } = this.state, { resetKeys: o } = this.props;
510
- n && t.error !== null && en(e.resetKeys, o) && (this.props.onReset?.({
510
+ n && t.error !== null && tn(e.resetKeys, o) && (this.props.onReset?.({
511
511
  next: o,
512
512
  prev: e.resetKeys,
513
513
  reason: "keys"
@@ -531,7 +531,7 @@ class Qr extends Ht {
531
531
  throw s;
532
532
  }
533
533
  return me(
534
- Zr.Provider,
534
+ Qr.Provider,
535
535
  {
536
536
  value: {
537
537
  didCatch: a,
@@ -543,23 +543,23 @@ class Qr extends Ht {
543
543
  );
544
544
  }
545
545
  }
546
- function en(r = [], e = []) {
546
+ function tn(r = [], e = []) {
547
547
  return r.length !== e.length || r.some((t, n) => !Object.is(t, e[n]));
548
548
  }
549
- function tn({ children: r, onError: e }) {
550
- return m(Qr, { fallback: m("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
549
+ function rn({ children: r, onError: e }) {
550
+ return f(en, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
551
551
  }
552
- const rn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
553
- function nn({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
554
- const [n] = D();
555
- return rn(() => {
552
+ const nn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
553
+ function on({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
554
+ const [n] = L();
555
+ return nn(() => {
556
556
  if (t) return n.registerUpdateListener(({ editorState: o, dirtyElements: a, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
557
557
  e && a.size === 0 && s.size === 0 || r && l.has(oe) || i.isEmpty() || t(o, n, l);
558
558
  });
559
559
  }, [n, r, e, t]), null;
560
560
  }
561
- function on({ hasStrictIndent: r = !1 }) {
562
- const [e] = D();
561
+ function an({ hasStrictIndent: r = !1 }) {
562
+ const [e] = L();
563
563
  return b(() => {
564
564
  if (!e.hasNodes([Me, Fe])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
565
565
  }, [e]), b(() => {
@@ -568,13 +568,13 @@ function on({ hasStrictIndent: r = !1 }) {
568
568
  b(() => nr(t), [t]);
569
569
  })(e), null;
570
570
  }
571
- function an({ validateUrl: r, attributes: e }) {
572
- const [t] = D();
571
+ function sn({ validateUrl: r, attributes: e }) {
572
+ const [t] = L();
573
573
  return b(() => {
574
574
  if (!t.hasNodes([Ae])) throw new Error("LinkPlugin: LinkNode not registered on editor");
575
575
  }), b(() => or(t, ie({ attributes: e, validateUrl: r })), [t, r, e]), null;
576
576
  }
577
- function sn(r, e, t) {
577
+ function ln(r, e, t) {
578
578
  b(() => {
579
579
  r.hasNodes([Ue]) || (function(n, ...o) {
580
580
  const a = new URL("https://lexical.dev/docs/error"), s = new URLSearchParams();
@@ -584,29 +584,29 @@ function sn(r, e, t) {
584
584
  })(77);
585
585
  }), b(() => ar(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
586
586
  }
587
- function ln({ matchers: r, onChange: e }) {
588
- const [t] = D();
589
- return sn(t, r, e), null;
587
+ function un({ matchers: r, onChange: e }) {
588
+ const [t] = L();
589
+ return ln(t, r, e), null;
590
590
  }
591
- function un({ newTab: r = !0, disabled: e = !1 }) {
592
- const [t] = D();
591
+ function dn({ newTab: r = !0, disabled: e = !1 }) {
592
+ const [t] = L();
593
593
  return b(() => sr(t, ie({ disabled: e, newTab: r })), [t, r, e]), null;
594
594
  }
595
- function dn(r, e, t, n, o) {
595
+ function cn(r, e, t, n, o) {
596
596
  if (r === null || t.size === 0 && n.size === 0 && !o) return 0;
597
597
  const a = e._selection, s = r._selection;
598
598
  if (o) return 1;
599
599
  if (!(g(a) && g(s) && s.isCollapsed() && a.isCollapsed())) return 0;
600
600
  const i = (function(C, v, _) {
601
- const L = C._nodeMap, P = [];
602
- for (const k of v) {
603
- const w = L.get(k);
601
+ const D = C._nodeMap, P = [];
602
+ for (const $ of v) {
603
+ const w = D.get($);
604
604
  w !== void 0 && P.push(w);
605
605
  }
606
- for (const [k, w] of _) {
606
+ for (const [$, w] of _) {
607
607
  if (!w) continue;
608
- const R = L.get(k);
609
- R === void 0 || Le(R) || P.push(R);
608
+ const R = D.get($);
609
+ R === void 0 || De(R) || P.push(R);
610
610
  }
611
611
  return P;
612
612
  })(e, t, n);
@@ -617,38 +617,38 @@ function dn(r, e, t, n, o) {
617
617
  }
618
618
  const l = i[0], d = r._nodeMap.get(l.__key);
619
619
  if (!I(d) || !I(l) || d.__mode !== l.__mode) return 0;
620
- const u = d.__text, f = l.__text;
621
- if (u === f) return 0;
620
+ const u = d.__text, m = l.__text;
621
+ if (u === m) return 0;
622
622
  const h = a.anchor, S = s.anchor;
623
623
  if (h.key !== S.key || h.type !== "text") return 0;
624
- const y = h.offset, x = S.offset, E = f.length - u.length;
624
+ const y = h.offset, x = S.offset, E = m.length - u.length;
625
625
  return E === 1 && x === y - 1 ? 2 : E === -1 && x === y + 1 ? 3 : E === -1 && x === y ? 4 : 0;
626
626
  }
627
- function cn(r, e) {
627
+ function fn(r, e) {
628
628
  let t = Date.now(), n = 0;
629
629
  return (o, a, s, i, l, d) => {
630
630
  const u = Date.now();
631
631
  if (d.has(ne)) return n = 0, t = u, 2;
632
- const f = dn(o, a, i, l, r.isComposing()), h = (() => {
632
+ const m = cn(o, a, i, l, r.isComposing()), h = (() => {
633
633
  const S = s === null || s.editor === r, y = d.has(Mt);
634
634
  if (!y && S && d.has(oe)) return 0;
635
635
  if (o === null) return 1;
636
636
  const x = a._selection;
637
637
  if (!(i.size > 0 || l.size > 0)) return x !== null ? 0 : 2;
638
638
  const E = typeof e == "number" ? e : e.peek();
639
- return y === !1 && f !== 0 && f === n && u < t + E && S || i.size === 1 && (function(C, v, _) {
640
- const L = v._nodeMap.get(C), P = _._nodeMap.get(C), k = v._selection, w = _._selection;
641
- return !(g(k) && g(w) && k.anchor.type === "element" && k.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !I(L) || !I(P) || L.__parent !== P.__parent) && JSON.stringify(v.read(() => L.exportJSON())) === JSON.stringify(_.read(() => P.exportJSON()));
639
+ return y === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(C, v, _) {
640
+ const D = v._nodeMap.get(C), P = _._nodeMap.get(C), $ = v._selection, w = _._selection;
641
+ return !(g($) && g(w) && $.anchor.type === "element" && $.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !I(D) || !I(P) || D.__parent !== P.__parent) && JSON.stringify(v.read(() => D.exportJSON())) === JSON.stringify(_.read(() => P.exportJSON()));
642
642
  })(Array.from(i)[0], o, a) ? 0 : 1;
643
643
  })();
644
- return t = u, n = f, h;
644
+ return t = u, n = m, h;
645
645
  };
646
646
  }
647
- function $e(r) {
647
+ function ke(r) {
648
648
  r.undoStack = [], r.redoStack = [], r.current = null;
649
649
  }
650
650
  function We(r, e, t) {
651
- const n = cn(r, t);
651
+ const n = fn(r, t);
652
652
  return W(r.registerCommand(Rt, () => ((function(a, s) {
653
653
  const i = s.redoStack, l = s.undoStack;
654
654
  if (l.length !== 0) {
@@ -663,11 +663,11 @@ function We(r, e, t) {
663
663
  const u = i.pop();
664
664
  i.length === 0 && a.dispatchCommand(Y, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
665
665
  }
666
- })(r, e), !0), c), r.registerCommand(Bt, () => ($e(e), !1), c), r.registerCommand(Tt, () => ($e(e), r.dispatchCommand(Y, !1), r.dispatchCommand(q, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
667
- const u = e.current, f = e.redoStack, h = e.undoStack, S = u === null ? null : u.editorState;
666
+ })(r, e), !0), c), r.registerCommand(Bt, () => (ke(e), !1), c), r.registerCommand(Tt, () => (ke(e), r.dispatchCommand(Y, !1), r.dispatchCommand(q, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
667
+ const u = e.current, m = e.redoStack, h = e.undoStack, S = u === null ? null : u.editorState;
668
668
  if (u !== null && a === S) return;
669
669
  const y = n(s, a, u, i, l, d);
670
- if (y === 1) f.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), u !== null && (h.push({ ...u }), r.dispatchCommand(q, !0));
670
+ if (y === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), u !== null && (h.push({ ...u }), r.dispatchCommand(q, !0));
671
671
  else if (y === 2) return;
672
672
  e.current = { editor: r, editorState: a };
673
673
  }));
@@ -692,15 +692,15 @@ ae({ dependencies: [Ft(te, { createInitialHistoryState: () => {
692
692
  n.delay.value = a.delay.value, n.historyState.value = a.historyState.value, n.disabled.value = a.disabled.value;
693
693
  }));
694
694
  } });
695
- function fn({ delay: r, externalHistoryState: e }) {
696
- const [t] = D();
695
+ function mn({ delay: r, externalHistoryState: e }) {
696
+ const [t] = L();
697
697
  return (function(n, o, a = 1e3) {
698
698
  const s = O(() => o || Je(), [o]);
699
699
  b(() => We(n, s, a), [a, n, s]);
700
700
  })(t, e, r), null;
701
701
  }
702
- function mn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1, hasNestedTables: o = !1 }) {
703
- const [a] = D();
702
+ function pn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1, hasNestedTables: o = !1 }) {
703
+ const [a] = L();
704
704
  b(() => {
705
705
  ir(a) !== n && (lr(a, n), a.registerNodeTransform(ze, () => {
706
706
  })());
@@ -714,13 +714,13 @@ function mn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandle
714
714
  });
715
715
  }, [a, e, r]), null;
716
716
  }
717
- function pn({ editorRef: r }) {
718
- const [e] = D();
717
+ function gn({ editorRef: r }) {
718
+ const [e] = L();
719
719
  return Ut.useEffect(() => {
720
720
  typeof r == "function" ? r(e) : typeof r == "object" && (r.current = e);
721
721
  }, [e]), null;
722
722
  }
723
- const Xe = 200, gn = ({
723
+ const Xe = 200, hn = ({
724
724
  currentLanguage: r = "NL",
725
725
  initialValue: e = "",
726
726
  placeholder: t = "",
@@ -732,11 +732,11 @@ const Xe = 200, gn = ({
732
732
  maxHeightInRem: l = "20rem",
733
733
  maxWords: d = Xe,
734
734
  rteRef: u = null,
735
- onChange: f,
735
+ onChange: m,
736
736
  onCatalogueLinkSearch: h,
737
737
  catalogueSearchResponse: S = { state: "idle", results: [] }
738
738
  }) => {
739
- const { switchLanguage: y } = _r(), x = Cr(), [E] = M(() => Pe()), [C, v] = M(0), [_, L] = M(0), P = jt(), k = {
739
+ const { switchLanguage: y } = _r(), x = Cr(), [E] = M(() => Pe()), [C, v] = M(0), [_, D] = M(0), P = jt(), $ = {
740
740
  html: {
741
741
  export: mr
742
742
  },
@@ -755,16 +755,16 @@ const Xe = 200, gn = ({
755
755
  fr,
756
756
  ze,
757
757
  Nr,
758
- $r
758
+ kr
759
759
  ],
760
760
  editorState: (N) => {
761
- const $ = new DOMParser().parseFromString(e, "text/html"), X = er(N, $);
762
- A().clear(), Te(X), De(null);
761
+ const k = new DOMParser().parseFromString(e, "text/html"), X = er(N, k);
762
+ A().clear(), Te(X), Le(null);
763
763
  }
764
764
  }, w = (N) => N.trim().length === 0 ? 0 : N.split(" ").length, R = (N, J) => {
765
765
  N.read(() => {
766
- let $ = "";
767
- v(w(A().getTextContent().replace(/\s+/g, " ").trim())), $ = pr(tr(J)), $ = gr($), f($);
766
+ let k = "";
767
+ v(w(A().getTextContent().replace(/\s+/g, " ").trim())), k = pr(tr(J)), k = gr(k), m(k);
768
768
  });
769
769
  };
770
770
  return b(() => {
@@ -774,21 +774,21 @@ const Xe = 200, gn = ({
774
774
  v(w(N));
775
775
  }, [e]), /* @__PURE__ */ F("div", { className: B.editor__container, children: [
776
776
  /* @__PURE__ */ F("div", { className: B.editor__header, children: [
777
- /* @__PURE__ */ m(Sr, { label: n, info: o, required: a }),
777
+ /* @__PURE__ */ f(Sr, { label: n, info: o, required: a }),
778
778
  /* @__PURE__ */ F("div", { className: B["editor__header-word-count"], children: [
779
- /* @__PURE__ */ m("span", { className: Ce({ [B["editor__header-word-count--alert"]]: C > d }), children: C }),
779
+ /* @__PURE__ */ f("span", { className: Ce({ [B["editor__header-word-count--alert"]]: C > d }), children: C }),
780
780
  " / ",
781
781
  d
782
782
  ] })
783
783
  ] }),
784
- /* @__PURE__ */ m(
784
+ /* @__PURE__ */ f(
785
785
  "div",
786
786
  {
787
787
  className: Ce(B.editor, {
788
788
  [B["not-valid"]]: s
789
789
  }),
790
- children: /* @__PURE__ */ F(Pr, { initialConfig: k, children: [
791
- /* @__PURE__ */ m(
790
+ children: /* @__PURE__ */ F(Lr, { initialConfig: $, children: [
791
+ /* @__PURE__ */ f(
792
792
  yr,
793
793
  {
794
794
  editorScrollPosition: _,
@@ -797,44 +797,45 @@ const Xe = 200, gn = ({
797
797
  }
798
798
  ),
799
799
  /* @__PURE__ */ F("div", { className: B["editor__field-wrapper"], children: [
800
- /* @__PURE__ */ m(
801
- Wr,
800
+ /* @__PURE__ */ f(
801
+ Jr,
802
802
  {
803
- contentEditable: /* @__PURE__ */ m(
804
- qr,
803
+ contentEditable: /* @__PURE__ */ f(
804
+ Gr,
805
805
  {
806
806
  className: B.editor__field,
807
807
  "aria-label": x.common.rteAriaLabel,
808
808
  "aria-placeholder": t,
809
809
  title: x.common.rteTitle,
810
- placeholder: /* @__PURE__ */ m("div", { className: B.editor__placeholder, children: t }),
810
+ placeholder: /* @__PURE__ */ f("div", { className: B.editor__placeholder, children: t }),
811
811
  spellCheck: !1,
812
812
  id: `${P}_rteEditor`,
813
813
  style: { height: `${l}`, maxHeight: `${l}` },
814
- onScroll: (N) => L(N.currentTarget.scrollTop)
814
+ onScroll: (N) => D(N.currentTarget.scrollTop)
815
815
  }
816
816
  ),
817
- placeholder: /* @__PURE__ */ m("div", { className: B.editor__placeholder, children: t }),
818
- ErrorBoundary: tn
817
+ placeholder: /* @__PURE__ */ f("div", { className: B.editor__placeholder, children: t }),
818
+ ErrorBoundary: rn
819
819
  }
820
820
  ),
821
- /* @__PURE__ */ m(mn, {}),
822
- /* @__PURE__ */ m(Jt, {}),
823
- /* @__PURE__ */ m(fn, {}),
824
- /* @__PURE__ */ m(on, {}),
825
- /* @__PURE__ */ m(an, { validateUrl: hr }),
826
- /* @__PURE__ */ m(ln, { matchers: vr }),
827
- /* @__PURE__ */ m(un, {}),
828
- /* @__PURE__ */ m(nn, { onChange: R }),
829
- /* @__PURE__ */ m(Er, {}),
830
- u && /* @__PURE__ */ m(pn, { editorRef: u })
821
+ /* @__PURE__ */ f(pn, {}),
822
+ /* @__PURE__ */ f(Jt, {}),
823
+ /* @__PURE__ */ f(mn, {}),
824
+ /* @__PURE__ */ f(an, {}),
825
+ /* @__PURE__ */ f(sn, { validateUrl: hr }),
826
+ /* @__PURE__ */ f(un, { matchers: vr }),
827
+ /* @__PURE__ */ f(dn, {}),
828
+ /* @__PURE__ */ f(on, { onChange: R }),
829
+ /* @__PURE__ */ f(Er, {}),
830
+ /* @__PURE__ */ f($r, {}),
831
+ u && /* @__PURE__ */ f(gn, { editorRef: u })
831
832
  ] })
832
833
  ] })
833
834
  }
834
835
  ),
835
- i !== "" && /* @__PURE__ */ m(br, { level: "error", feedback: i })
836
+ i !== "" && /* @__PURE__ */ f(br, { level: "error", feedback: i })
836
837
  ] });
837
- }, fo = ({
838
+ }, mo = ({
838
839
  currentLanguage: r = "NL",
839
840
  initialValue: e = "",
840
841
  placeholder: t = "",
@@ -846,10 +847,10 @@ const Xe = 200, gn = ({
846
847
  maxWords: l = Xe,
847
848
  rteRef: d,
848
849
  onChange: u,
849
- onCatalogueLinkSearch: f,
850
+ onCatalogueLinkSearch: m,
850
851
  catalogueSearchResponse: h = { state: "idle", results: [] }
851
- }) => /* @__PURE__ */ m(xr, { children: /* @__PURE__ */ m(
852
- gn,
852
+ }) => /* @__PURE__ */ f(xr, { children: /* @__PURE__ */ f(
853
+ hn,
853
854
  {
854
855
  currentLanguage: r.toUpperCase(),
855
856
  initialValue: e,
@@ -862,12 +863,12 @@ const Xe = 200, gn = ({
862
863
  maxWords: l,
863
864
  rteRef: d,
864
865
  onChange: u,
865
- onCatalogueLinkSearch: f,
866
+ onCatalogueLinkSearch: m,
866
867
  catalogueSearchResponse: h
867
868
  }
868
869
  ) });
869
870
  export {
870
- gn as Rte,
871
- fo as RteEditor
871
+ hn as Rte,
872
+ mo as RteEditor
872
873
  };
873
874
  //# sourceMappingURL=RteEditor.js.map