@uva-glass/component-library 3.2.1 → 3.3.0

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/{Lexical.prod-Bu-Iw9VX.js → Lexical.prod-CniF7zEE.js} +670 -666
  2. package/dist/Lexical.prod-CniF7zEE.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-C5dHfEke.js → LexicalClipboard.prod-BXVNkwwS.js} +42 -42
  4. package/dist/{LexicalClipboard.prod-C5dHfEke.js.map → LexicalClipboard.prod-BXVNkwwS.js.map} +1 -1
  5. package/dist/{LexicalLink.prod-DdERpPPj.js → LexicalLink.prod-Du8ZoNsh.js} +3 -3
  6. package/dist/{LexicalLink.prod-DdERpPPj.js.map → LexicalLink.prod-Du8ZoNsh.js.map} +1 -1
  7. package/dist/{LexicalList.prod-CzJqqstH.js → LexicalList.prod-BUcoZhe4.js} +35 -35
  8. package/dist/{LexicalList.prod-CzJqqstH.js.map → LexicalList.prod-BUcoZhe4.js.map} +1 -1
  9. package/dist/{LexicalSelection.prod-CkM-3E0b.js → LexicalSelection.prod-BfAlhGGm.js} +25 -25
  10. package/dist/{LexicalSelection.prod-CkM-3E0b.js.map → LexicalSelection.prod-BfAlhGGm.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-BsmIydKv.js → LexicalTable.prod-CYafu_j9.js} +458 -453
  12. package/dist/LexicalTable.prod-CYafu_j9.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-BVZbsLIa.js → LexicalUtils.prod-DVr8VsHc.js} +36 -36
  14. package/dist/{LexicalUtils.prod-BVZbsLIa.js.map → LexicalUtils.prod-DVr8VsHc.js.map} +1 -1
  15. package/dist/{TablePlugin-DKzssVbg.js → TablePlugin-MjKuocl4.js} +53 -53
  16. package/dist/{TablePlugin-DKzssVbg.js.map → TablePlugin-MjKuocl4.js.map} +1 -1
  17. package/dist/assets/RadioGroup.css +1 -0
  18. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  19. package/dist/components/FormInput/FormInput.js +1 -1
  20. package/dist/components/InputField/InputField.stories.js +1 -1
  21. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  22. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  23. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  24. package/dist/components/MultiSelect/index.js +1 -1
  25. package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
  26. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  27. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  28. package/dist/components/RadioGroup/RadioGroup.d.ts +19 -0
  29. package/dist/components/RadioGroup/RadioGroup.js +51 -0
  30. package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
  31. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +5 -0
  32. package/dist/components/RadioGroup/RadioGroup.stories.js +48 -0
  33. package/dist/components/RadioGroup/RadioGroup.stories.js.map +1 -0
  34. package/dist/components/RadioGroup/Radiogroup.test.d.ts +0 -0
  35. package/dist/components/RadioGroup/Radiogroup.test.js +24 -0
  36. package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -0
  37. package/dist/components/RadioGroup/index.d.ts +1 -0
  38. package/dist/components/RadioGroup/index.js +5 -0
  39. package/dist/components/RadioGroup/index.js.map +1 -0
  40. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  41. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +11 -11
  42. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  43. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  44. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  45. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +29 -29
  46. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  47. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +26 -26
  48. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
  49. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  50. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  51. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +14 -14
  52. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  53. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +22 -22
  54. package/dist/components/RteEditor/Plugins/index.js +1 -1
  55. package/dist/components/RteEditor/RteEditor.js +116 -116
  56. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  57. package/dist/components/RteEditor/helpers.js +4 -4
  58. package/dist/components/Timeline/Timeline.test.js +1 -1
  59. package/dist/components/index.js +1 -1
  60. package/dist/{helpers-D13uK95u.js → helpers-ChM6xtQG.js} +63 -63
  61. package/dist/{helpers-D13uK95u.js.map → helpers-ChM6xtQG.js.map} +1 -1
  62. package/dist/index.js +1 -1
  63. package/package.json +5 -5
  64. package/dist/Lexical.prod-Bu-Iw9VX.js.map +0 -1
  65. package/dist/LexicalTable.prod-BsmIydKv.js.map +0 -1
@@ -0,0 +1,48 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { fn as a } from "../../index-DXR-TB1d.js";
3
+ import { RadioGroup as o } from "./RadioGroup.js";
4
+ const l = `
5
+ <RadioGroup label={label} options={options}
6
+ onChange={onChangeFunction} disabled={disabled} /> `, b = {
7
+ title: "Molecules/RadioGroup",
8
+ component: o,
9
+ argTypes: {
10
+ label: {
11
+ control: "text"
12
+ },
13
+ disabled: {
14
+ control: "boolean"
15
+ }
16
+ },
17
+ parameters: {
18
+ inspectComponent: o,
19
+ codeString: l
20
+ }
21
+ }, n = [
22
+ {
23
+ id: "1",
24
+ titleLabel: "Option 1",
25
+ value: "option1"
26
+ },
27
+ {
28
+ id: "2",
29
+ titleLabel: "Option 2",
30
+ value: "option2"
31
+ },
32
+ {
33
+ id: "3",
34
+ titleLabel: "Option 3",
35
+ value: "option3"
36
+ }
37
+ ], i = (e) => /* @__PURE__ */ t(o, { ...e }), p = i.bind({});
38
+ p.args = {
39
+ disabled: !1,
40
+ label: "Sample label",
41
+ options: n,
42
+ onChange: a()
43
+ };
44
+ export {
45
+ p as RadioGroupExample,
46
+ b as default
47
+ };
48
+ //# sourceMappingURL=RadioGroup.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioGroup.stories.js","sources":["../../../src/components/RadioGroup/RadioGroup.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { RadioGroupProps } from './RadioGroup';\n\nimport { RadioGroup } from './RadioGroup';\n\nconst codeString = `\n <RadioGroup label={label} options={options} \n onChange={onChangeFunction} disabled={disabled} /> `;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/RadioGroup',\n component: RadioGroup,\n argTypes: {\n label: {\n control: 'text',\n },\n disabled: {\n control: 'boolean',\n },\n },\n parameters: {\n inspectComponent: RadioGroup,\n codeString: codeString,\n },\n} as Meta<RadioGroupProps>;\n\nconst mockData = [\n {\n id: '1',\n titleLabel: 'Option 1',\n value: 'option1',\n },\n {\n id: '2',\n titleLabel: 'Option 2',\n value: 'option2',\n },\n {\n id: '3',\n titleLabel: 'Option 3',\n value: 'option3',\n },\n];\n\nconst Template: StoryFn<RadioGroupProps> = (args) => <RadioGroup {...args} />;\n\nexport const RadioGroupExample = Template.bind({});\nRadioGroupExample.args = {\n disabled: false,\n label: 'Sample label',\n options: mockData,\n onChange: fn(),\n};\n"],"names":["codeString","RadioGroup_stories","RadioGroup","mockData","Template","args","jsx","RadioGroupExample","fn"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA,0DAKJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAW;AAAA,EACf;AAAA,IACE,IAAI;AAAA,IACJ,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,YAAY;AAAA,IACZ,OAAO;AAAA,EAAA;AAEX,GAEMC,IAAqC,CAACC,MAAU,gBAAAC,EAAAJ,GAAA,EAAY,GAAGG,GAAM,GAE9DE,IAAoBH,EAAS,KAAK,CAAE,CAAA;AACjDG,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAASJ;AAAA,EACT,UAAUK,EAAG;AACf;"}
@@ -0,0 +1,24 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import "../../index-Z7qwJmRM.js";
3
+ import { r as l, s as t, f as s } from "../../react.esm-B8teOYlo.js";
4
+ import { RadioGroup as a } from "./RadioGroup.js";
5
+ const i = [
6
+ { id: "1", titleLabel: "Option 1", value: "option1" },
7
+ { id: "2", titleLabel: "Option 2", value: "option2" }
8
+ ];
9
+ describe("RadioGroup", () => {
10
+ it("should render correctly", () => {
11
+ l(/* @__PURE__ */ n(a, { label: "Test Label", options: i, onChange: jest.fn() })), expect(t.getByText("Test Label")).toBeInTheDocument(), expect(t.getByText("Option 1")).toBeInTheDocument(), expect(t.getByText("Option 2")).toBeInTheDocument();
12
+ }), it("should call onChange when an option is selected", () => {
13
+ const e = jest.fn();
14
+ l(/* @__PURE__ */ n(a, { label: "Test Label", options: i, onChange: e }));
15
+ const o = t.getByLabelText("Option 1");
16
+ s.click(o), expect(e).toHaveBeenCalledWith("option1");
17
+ }), it("should not allow selection when disabled", () => {
18
+ const e = jest.fn();
19
+ l(/* @__PURE__ */ n(a, { label: "Test Label", options: i, onChange: e, disabled: !0 }));
20
+ const o = t.getByLabelText("Option 1");
21
+ s.click(o), expect(e).not.toHaveBeenCalled();
22
+ });
23
+ });
24
+ //# sourceMappingURL=Radiogroup.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radiogroup.test.js","sources":["../../../src/components/RadioGroup/Radiogroup.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { RadioGroup } from './RadioGroup';\n\nconst options = [\n { id: '1', titleLabel: 'Option 1', value: 'option1' },\n { id: '2', titleLabel: 'Option 2', value: 'option2' },\n];\n\ndescribe('RadioGroup', () => {\n it('should render correctly', () => {\n render(<RadioGroup label=\"Test Label\" options={options} onChange={jest.fn()} />);\n expect(screen.getByText('Test Label')).toBeInTheDocument();\n expect(screen.getByText('Option 1')).toBeInTheDocument();\n expect(screen.getByText('Option 2')).toBeInTheDocument();\n });\n\n it('should call onChange when an option is selected', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).toHaveBeenCalledWith('option1');\n });\n\n it('should not allow selection when disabled', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} disabled />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).not.toHaveBeenCalled();\n });\n});\n"],"names":["options","render","jsx","RadioGroup","screen","handleChange","option1","fireEvent"],"mappings":";;;;AAKA,MAAMA,IAAU;AAAA,EACd,EAAE,IAAI,KAAK,YAAY,YAAY,OAAO,UAAU;AAAA,EACpD,EAAE,IAAI,KAAK,YAAY,YAAY,OAAO,UAAU;AACtD;AAEA,SAAS,cAAc,MAAM;AAC3B,KAAG,2BAA2B,MAAM;AAC3B,IAAAC,EAAA,gBAAAC,EAACC,KAAW,OAAM,cAAa,SAAAH,GAAkB,UAAU,KAAK,GAAG,EAAG,CAAA,CAAE,GAC/E,OAAOI,EAAO,UAAU,YAAY,CAAC,EAAE,kBAAkB,GACzD,OAAOA,EAAO,UAAU,UAAU,CAAC,EAAE,kBAAkB,GACvD,OAAOA,EAAO,UAAU,UAAU,CAAC,EAAE,kBAAkB;AAAA,EAAA,CACxD,GAED,GAAG,mDAAmD,MAAM;AACpD,UAAAC,IAAe,KAAK,GAAG;AAC7B,IAAAJ,oBAAQE,GAAW,EAAA,OAAM,cAAa,SAAAH,GAAkB,UAAUK,GAAc,CAAE;AAE5E,UAAAC,IAAUF,EAAO,eAAe,UAAU;AAChD,IAAAG,EAAU,MAAMD,CAAO,GAChB,OAAAD,CAAY,EAAE,qBAAqB,SAAS;AAAA,EAAA,CACpD,GAED,GAAG,4CAA4C,MAAM;AAC7C,UAAAA,IAAe,KAAK,GAAG;AACtB,IAAAJ,EAAA,gBAAAC,EAACC,KAAW,OAAM,cAAa,SAAAH,GAAkB,UAAUK,GAAc,UAAQ,GAAC,CAAA,CAAE;AAErF,UAAAC,IAAUF,EAAO,eAAe,UAAU;AAChD,IAAAG,EAAU,MAAMD,CAAO,GAChB,OAAAD,CAAY,EAAE,IAAI,iBAAiB;AAAA,EAAA,CAC3C;AACH,CAAC;"}
@@ -0,0 +1 @@
1
+ export * from './RadioGroup';
@@ -0,0 +1,5 @@
1
+ import { RadioGroup as p } from "./RadioGroup.js";
2
+ export {
3
+ p as RadioGroup
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -14,7 +14,7 @@ import "../../IconButton/IconButton.js";
14
14
  import "../../Input/Input.js";
15
15
  import "../../InputField/InputField.js";
16
16
  import "react-router";
17
- import "../../../TablePlugin-DKzssVbg.js";
17
+ import "../../../TablePlugin-MjKuocl4.js";
18
18
  import "../Providers/LanguageProvider.js";
19
19
  import "../Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
20
20
  import "../hooks/components/Flyout.js";
@@ -1,29 +1,29 @@
1
- import { jsx as l } from "react/jsx-runtime";
1
+ import { jsx as s } from "react/jsx-runtime";
2
2
  import { o as u } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
3
3
  import { c as f } from "../../../../clsx-OuTLNxxd.js";
4
- import { a as _, l as p, G as h } from "../../../../Lexical.prod-Bu-Iw9VX.js";
5
- import { useState as s, useEffect as k } from "react";
4
+ import { a as _, c as p, O as h } from "../../../../Lexical.prod-CniF7zEE.js";
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-oFMKEW6f.js";
8
8
  import { useTranslation as B } from "../../hooks/useTranslation.js";
9
- const T = {
9
+ const C = {
10
10
  bold: "Bold",
11
11
  italic: "Italic"
12
- }, C = ["bold", "italic"], E = () => {
13
- const t = B(), [i] = u(), [e, c] = s(!1), [n, m] = s(!1), d = (o) => {
12
+ }, T = ["bold", "italic"], $ = () => {
13
+ const t = B(), [i] = u(), [c, e] = l(!1), [n, m] = l(!1), d = (o) => {
14
14
  i.dispatchCommand(h, o);
15
15
  };
16
16
  return k(() => {
17
17
  const o = i.registerUpdateListener(({ editorState: b }) => {
18
18
  b.read(() => {
19
19
  const r = _();
20
- p(r) && (c(r.hasFormat("bold")), m(r.hasFormat("italic")));
20
+ p(r) && (e(r.hasFormat("bold")), m(r.hasFormat("italic")));
21
21
  });
22
22
  });
23
23
  return () => {
24
24
  o();
25
25
  };
26
- }, [i]), /* @__PURE__ */ l("div", { className: a["editor__toolbar-button-group"], children: C.map((o) => /* @__PURE__ */ l(
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),
@@ -31,18 +31,18 @@ const T = {
31
31
  className: f(
32
32
  a["editor__toolbar-button"],
33
33
  a[`editor__toolbar-button--${o}`],
34
- o === "bold" && e && a["editor__toolbar-button--active"],
34
+ o === "bold" && c && a["editor__toolbar-button--active"],
35
35
  o === "italic" && n && a["editor__toolbar-button--active"]
36
36
  ),
37
37
  "aria-label": `${o === "bold" ? t.aria.labels.bold : t.aria.labels.italic}`,
38
38
  "aria-keyshortcuts": `${o === "bold" ? t.aria.keyshortcuts.bold : t.aria.keyshortcuts.italic}`,
39
39
  type: "button",
40
- children: /* @__PURE__ */ l(I, { name: T[o], size: 24 })
40
+ children: /* @__PURE__ */ s(I, { name: C[o], size: 24 })
41
41
  },
42
42
  o
43
43
  )) });
44
44
  };
45
45
  export {
46
- E as BlockFormatPlugin
46
+ $ as BlockFormatPlugin
47
47
  };
48
48
  //# sourceMappingURL=BlockFormatPlugin.js.map
@@ -1,7 +1,7 @@
1
1
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import { c as i } from "../../../../clsx-OuTLNxxd.js";
3
3
  import { o as h } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
4
- import { ap as _, aq as y, ar as C, as as k } from "../../../../Lexical.prod-Bu-Iw9VX.js";
4
+ import { ap as _, aq as y, ar as C, as as k } from "../../../../Lexical.prod-CniF7zEE.js";
5
5
  import { useState as s, useEffect as m } from "react";
6
6
  import { Icon as n } from "../../../Icon/Icon.js";
7
7
  import "../../../Buttons/Button.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-DKzssVbg.js";
20
+ import "../../../../TablePlugin-MjKuocl4.js";
21
21
  import { s as r } from "../../../../RteEditor.module-oFMKEW6f.js";
22
22
  import { useTranslation as x } from "../../hooks/useTranslation.js";
23
23
  import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { A as D } from "../../../../../TablePlugin-DKzssVbg.js";
4
- import "../../../../../helpers-D13uK95u.js";
3
+ import { A as D } from "../../../../../TablePlugin-MjKuocl4.js";
4
+ import "../../../../../helpers-ChM6xtQG.js";
5
5
  import "../../../../Icon/Icon.js";
6
6
  import "../../../../Buttons/Button.js";
7
7
  import "../../../../Buttons/LinkButton.js";
@@ -1,6 +1,6 @@
1
1
  import { jsxs as k, Fragment as v, jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as K, useState as b, useRef as N, useImperativeHandle as T, useLayoutEffect as g } from "react";
3
- import { e as E } from "../../../../../helpers-D13uK95u.js";
3
+ import { e as E } from "../../../../../helpers-ChM6xtQG.js";
4
4
  import { Icon as m } from "../../../../Icon/Icon.js";
5
5
  import { useTranslation as R } from "../../../hooks/useTranslation.js";
6
6
  import { Button as y } from "../../../../Buttons/Button.js";
@@ -1,11 +1,11 @@
1
- import { jsx as k, jsxs as W } from "react/jsx-runtime";
1
+ import { jsx as k, jsxs as X } from "react/jsx-runtime";
2
2
  import { o as Y } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
3
3
  import { c as q } from "../../../../clsx-OuTLNxxd.js";
4
- import { d as U, O as G, N as J } from "../../../../LexicalLink.prod-DdERpPPj.js";
5
- import { useRef as a, useState as X, useEffect as m } from "react";
6
- import { S as Z, a as f, i as $, ao as tt, l as N, N as et, g as ot, Q as rt } from "../../../../Lexical.prod-Bu-Iw9VX.js";
7
- import { A as nt } from "../../../../TablePlugin-DKzssVbg.js";
8
- import { e as it } from "../../../../helpers-D13uK95u.js";
4
+ import { d as U, O as G, N as J } from "../../../../LexicalLink.prod-Du8ZoNsh.js";
5
+ import { useRef as a, useState as Q, useEffect as m } from "react";
6
+ import { W as Z, a as f, g as $, ao as tt, c as w, E as et, u as ot, X as rt } from "../../../../Lexical.prod-CniF7zEE.js";
7
+ import { A as nt } from "../../../../TablePlugin-MjKuocl4.js";
8
+ import { e as it } from "../../../../helpers-ChM6xtQG.js";
9
9
  import { LinkContextMenu as st } from "./LinkContextMenu/LinkContextMenu.js";
10
10
  import { useFlyout as ct } from "../../hooks/useFlyout.js";
11
11
  import { Icon as lt } from "../../../Icon/Icon.js";
@@ -51,15 +51,15 @@ const mt = 200, z = (p) => {
51
51
  n = n.getParent();
52
52
  }
53
53
  return !1;
54
- }, Qt = ({ parentScrollPosition: p }) => {
55
- const n = ut(), [c] = Y(), { flyout: A, showFlyout: _, hideFlyout: C, isVisible: u } = ct(), d = a(void 0), w = a(!1), y = a(""), g = a(""), [L, H] = X({ active: !1, url: "", linktext: "" }), P = a(u), T = a(null), S = a(null), x = a(void 0), b = () => {
54
+ }, Wt = ({ parentScrollPosition: p }) => {
55
+ const n = ut(), [c] = Y(), { flyout: A, showFlyout: _, hideFlyout: C, isVisible: u } = ct(), d = a(void 0), N = a(!1), y = a(""), g = a(""), [L, H] = Q({ active: !1, url: "", linktext: "" }), P = a(u), x = a(null), S = a(null), T = a(void 0), b = () => {
56
56
  c.update(() => {
57
57
  const e = f();
58
- T.current = e;
58
+ x.current = e;
59
59
  });
60
60
  }, R = () => {
61
61
  c.update(() => {
62
- T.current && ot(T.current);
62
+ x.current && ot(x.current);
63
63
  });
64
64
  }, M = (e, t) => {
65
65
  _({
@@ -71,17 +71,17 @@ const mt = 200, z = (p) => {
71
71
  onSave: (o) => K(o, ""),
72
72
  onDelete: () => V(),
73
73
  onClose: D,
74
- ref: x
74
+ ref: T
75
75
  }
76
76
  )
77
77
  });
78
78
  }, D = () => {
79
79
  var e;
80
- (e = x.current) == null || e.clearForm(), C(), R();
81
- }, F = () => {
80
+ (e = T.current) == null || e.clearForm(), C(), R();
81
+ }, E = () => {
82
82
  var t;
83
83
  const e = (t = S.current) == null ? void 0 : t.getBoundingClientRect();
84
- !w.current && e && (b(), _({ position: { top: e.bottom, left: e.left }, ...j }), setTimeout(() => {
84
+ !N.current && e && (b(), _({ position: { top: e.bottom, left: e.left }, ...j }), setTimeout(() => {
85
85
  var o;
86
86
  return (o = d.current) == null ? void 0 : o.setDefaults("", g.current);
87
87
  }, 0));
@@ -90,7 +90,7 @@ const mt = 200, z = (p) => {
90
90
  }, K = (e, t) => {
91
91
  c.update(() => {
92
92
  const o = f();
93
- if (N(o)) {
93
+ if (w(o)) {
94
94
  const i = o.anchor.getNode(), s = z(i);
95
95
  if (t && t !== "") {
96
96
  if (s) {
@@ -98,8 +98,8 @@ const mt = 200, z = (p) => {
98
98
  s.replace(l), l.select();
99
99
  }
100
100
  if (t !== y.current && y.current === "") {
101
- const { anchor: l, focus: E } = o;
102
- o.insertText(t), l.offset -= t.length, E.offset = l.offset + t.length;
101
+ const { anchor: l, focus: F } = o;
102
+ o.insertText(t), l.offset -= t.length, F.offset = l.offset + t.length;
103
103
  }
104
104
  }
105
105
  J(it(e), { target: "_blank" });
@@ -121,10 +121,10 @@ const mt = 200, z = (p) => {
121
121
  };
122
122
  return m(() => {
123
123
  var e, t;
124
- u ? (w.current = !0, (t = d.current) == null || t.focusFirstField()) : ((e = d.current) == null || e.clearForm(), y.current = g.current = "", setTimeout(() => w.current = !1, mt));
124
+ u ? (N.current = !0, (t = d.current) == null || t.focusFirstField()) : ((e = d.current) == null || e.clearForm(), y.current = g.current = "", setTimeout(() => N.current = !1, mt));
125
125
  }, [d, u]), m(() => {
126
126
  const e = (r) => {
127
- if (N(r) && r.isCollapsed()) {
127
+ if (w(r) && r.isCollapsed()) {
128
128
  const i = I(r.anchor.getNode());
129
129
  if (i) {
130
130
  const s = c.getElementByKey(r.anchor.getNode().getKey()), l = s ? { top: s.getBoundingClientRect().bottom, left: s.getBoundingClientRect().left } : { top: 0, left: 0 };
@@ -156,18 +156,18 @@ const mt = 200, z = (p) => {
156
156
  (o) => {
157
157
  if (o.ctrlKey && o.shiftKey && o.key === "U") {
158
158
  const r = f();
159
- if (b(), !N(r))
159
+ if (b(), !w(r))
160
160
  return !1;
161
- const i = I(r.anchor.getNode()), s = (E = "", Q = "") => {
162
- F(), setTimeout(() => {
161
+ const i = I(r.anchor.getNode()), s = (F = "", W = "") => {
162
+ E(), setTimeout(() => {
163
163
  var B;
164
- return (B = d.current) == null ? void 0 : B.setDefaults(E, Q);
164
+ return (B = d.current) == null ? void 0 : B.setDefaults(F, W);
165
165
  }, 0);
166
166
  };
167
167
  if (i)
168
168
  return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), y.current = i.linktext, s(i.url, i.linktext), !0;
169
169
  const l = r.getTextContent();
170
- return l !== "" ? (g.current = l, s("", g.current), !0) : (F(), !0);
170
+ return l !== "" ? (g.current = l, s("", g.current), !0) : (E(), !0);
171
171
  }
172
172
  return !1;
173
173
  },
@@ -176,7 +176,7 @@ const mt = 200, z = (p) => {
176
176
  H(
177
177
  o.read(() => {
178
178
  const r = f();
179
- if (b(), N(r)) {
179
+ if (b(), w(r)) {
180
180
  const i = r.anchor.getNode(), s = z(i);
181
181
  if (s)
182
182
  return {
@@ -198,7 +198,7 @@ const mt = 200, z = (p) => {
198
198
  };
199
199
  }, [c]), m(() => {
200
200
  var e;
201
- P.current = u, u || (e = x.current) == null || e.clearForm();
201
+ P.current = u, u || (e = T.current) == null || e.clearForm();
202
202
  }, [u]), m(() => {
203
203
  u && v();
204
204
  }, [p]), m(() => {
@@ -212,11 +212,11 @@ const mt = 200, z = (p) => {
212
212
  return O(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
213
213
  window.removeEventListener("keydown", e), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), at(t);
214
214
  };
215
- }, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ W("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
215
+ }, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ X("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
216
216
  /* @__PURE__ */ k(
217
217
  "button",
218
218
  {
219
- onClick: F,
219
+ onClick: E,
220
220
  title: n.links.linkTooltip,
221
221
  className: q(
222
222
  h["editor__toolbar-button"],
@@ -234,7 +234,7 @@ const mt = 200, z = (p) => {
234
234
  ] }) });
235
235
  };
236
236
  export {
237
- Qt as LinkPlugin,
237
+ Wt as LinkPlugin,
238
238
  I as getLinkNodeTag
239
239
  };
240
240
  //# sourceMappingURL=LinkPlugin.js.map
@@ -1,4 +1,4 @@
1
- import { M as e, e as r, a as s, v as l } from "../../../../helpers-D13uK95u.js";
1
+ import { M as e, e as r, a as s, v as l } from "../../../../helpers-ChM6xtQG.js";
2
2
  export {
3
3
  e as MATCHERS,
4
4
  r as ensureHttps,
@@ -1,35 +1,35 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
- import { o as S } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
3
- import { s as C, r as P, e as k, H as y, t as f, Z as E } from "../../../../LexicalList.prod-CzJqqstH.js";
4
- import { _ as O } from "../../../../LexicalSelection.prod-CkM-3E0b.js";
5
- import { useState as p, useEffect as D } from "react";
6
- import { c as x } from "../../../../clsx-OuTLNxxd.js";
7
- import { ao as T, N as U, P as v, a as b, l as h, E as w, T as B } from "../../../../Lexical.prod-Bu-Iw9VX.js";
8
- import { Icon as $ } from "../../../Icon/Icon.js";
2
+ import { o as K } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
3
+ import { s as N, r as P, e as k, H as S, t as f, Z as y } from "../../../../LexicalList.prod-BUcoZhe4.js";
4
+ import { _ as E } from "../../../../LexicalSelection.prod-BfAlhGGm.js";
5
+ import { useState as p, useEffect as w } from "react";
6
+ import { c as O } from "../../../../clsx-OuTLNxxd.js";
7
+ import { ao as x, E as U, T as v, a as b, c as h, P as B, w as $ } from "../../../../Lexical.prod-CniF7zEE.js";
8
+ import { Icon as j } from "../../../Icon/Icon.js";
9
9
  import { s as u } from "../../../../RteEditor.module-oFMKEW6f.js";
10
- import { useTranslation as j } from "../../hooks/useTranslation.js";
11
- const z = {
10
+ import { useTranslation as z } from "../../hooks/useTranslation.js";
11
+ const H = {
12
12
  bullet: "BulletList",
13
13
  number: "NumberedList"
14
- }, H = ["bullet", "number"], V = () => {
15
- const l = j(), [e] = S(), [g, s] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1), I = () => {
14
+ }, T = ["bullet", "number"], V = () => {
15
+ const l = z(), [e] = K(), [g, s] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1), D = () => {
16
16
  e.update(() => {
17
17
  const t = b();
18
- h(t) && O(t, () => B());
18
+ h(t) && E(t, () => $());
19
19
  });
20
- }, K = (t) => {
21
- t === "number" && g !== "number" ? (e.dispatchCommand(P, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(k, void 0), s("bullet")) : (I(), s("paragraph"));
20
+ }, I = (t) => {
21
+ t === "number" && g !== "number" ? (e.dispatchCommand(P, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(k, void 0), s("bullet")) : (D(), s("paragraph"));
22
22
  };
23
- return D(() => {
23
+ return w(() => {
24
24
  const t = e.registerCommand(
25
- T,
26
- (r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(C, void 0) : e.dispatchCommand(P, void 0), !0) : r.ctrlKey && r.shiftKey && r.code === "Digit8" ? (r.preventDefault(), c ? e.dispatchCommand(C, void 0) : e.dispatchCommand(k, void 0), !0) : !1,
25
+ x,
26
+ (r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(N, void 0) : e.dispatchCommand(P, void 0), !0) : r.ctrlKey && r.shiftKey && r.code === "Digit8" ? (r.preventDefault(), c ? e.dispatchCommand(N, void 0) : e.dispatchCommand(k, void 0), !0) : !1,
27
27
  U
28
28
  );
29
29
  return () => {
30
30
  t();
31
31
  };
32
- }, [e, m, c]), D(() => {
32
+ }, [e, m, c]), w(() => {
33
33
  e.registerCommand(
34
34
  v,
35
35
  (r) => (r.preventDefault(), e.update(() => {
@@ -37,15 +37,15 @@ const z = {
37
37
  if (!h(i))
38
38
  return;
39
39
  const o = i.anchor.getNode(), n = o.getParent();
40
- if (!y(n))
40
+ if (!S(n))
41
41
  return;
42
42
  const a = n.getParent();
43
43
  if (f(a)) {
44
- const N = E(f(a) ? a.getListType() : "bullet");
45
- n.append(N), N.append(o);
44
+ const C = y(f(a) ? a.getListType() : "bullet");
45
+ n.append(C), C.append(o);
46
46
  }
47
47
  }), !0),
48
- w
48
+ B
49
49
  );
50
50
  const t = e.registerUpdateListener(({ editorState: r }) => {
51
51
  r.read(() => {
@@ -70,12 +70,12 @@ const z = {
70
70
  return () => {
71
71
  t();
72
72
  };
73
- }, [e]), /* @__PURE__ */ d("div", { className: u["editor__toolbar-button-group"], children: H.map((t) => /* @__PURE__ */ d(
73
+ }, [e]), /* @__PURE__ */ d("div", { className: u["editor__toolbar-button-group"], children: T.map((t) => /* @__PURE__ */ d(
74
74
  "button",
75
75
  {
76
- onClick: () => K(t),
76
+ onClick: () => I(t),
77
77
  title: l.format[`${t}Tooltip`],
78
- className: x(
78
+ className: O(
79
79
  u["editor__toolbar-button"],
80
80
  u[`editor__toolbar-button--${t}`],
81
81
  t === "bullet" && c && u["editor__toolbar-button--active"],
@@ -84,7 +84,7 @@ const z = {
84
84
  "aria-label": l.aria.labels[t],
85
85
  "aria-keyshortcuts": l.aria.keyshortcuts[t],
86
86
  type: "button",
87
- children: /* @__PURE__ */ d($, { name: z[t], size: 24 })
87
+ children: /* @__PURE__ */ d(j, { name: H[t], size: 24 })
88
88
  },
89
89
  t
90
90
  )) });
@@ -1,10 +1,10 @@
1
1
  import { o as m } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
2
2
  import { useEffect as c } from "react";
3
- import { ad as f, y as d, a as p } from "../../../../Lexical.prod-Bu-Iw9VX.js";
4
- import { L as i } from "../../../../LexicalUtils.prod-BVZbsLIa.js";
5
- import { D as u } from "../../../../LexicalClipboard.prod-C5dHfEke.js";
3
+ import { ad as f, L as d, a as p } from "../../../../Lexical.prod-CniF7zEE.js";
4
+ import { L as i } from "../../../../LexicalUtils.prod-DVr8VsHc.js";
5
+ import { D as u } from "../../../../LexicalClipboard.prod-BXVNkwwS.js";
6
6
  import { d as D } from "../../../../index-B3c5pcHk.js";
7
- const P = () => {
7
+ const g = () => {
8
8
  const [a] = m(), l = (t) => {
9
9
  t.preventDefault(), a.update(() => {
10
10
  const r = p(), n = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
@@ -26,6 +26,6 @@ const P = () => {
26
26
  }, [a]), null;
27
27
  };
28
28
  export {
29
- P as PasteHandlerPlugin
29
+ g as PasteHandlerPlugin
30
30
  };
31
31
  //# sourceMappingURL=PasteHandlerPlugin.js.map
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { b as B } from "../../../../TablePlugin-DKzssVbg.js";
3
+ import { b as B } from "../../../../TablePlugin-MjKuocl4.js";
4
4
  import "../../../Buttons/Button.js";
5
5
  import "../../../Buttons/LinkButton.js";
6
6
  import "@react-aria/button";
@@ -1,10 +1,10 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
3
3
  import "../../../../clsx-OuTLNxxd.js";
4
- import "../../../../LexicalTable.prod-BsmIydKv.js";
5
- import "../../../../Lexical.prod-Bu-Iw9VX.js";
4
+ import "../../../../LexicalTable.prod-CYafu_j9.js";
5
+ import "../../../../Lexical.prod-CniF7zEE.js";
6
6
  import "react";
7
- import { T as F } from "../../../../TablePlugin-DKzssVbg.js";
7
+ import { T as F } from "../../../../TablePlugin-MjKuocl4.js";
8
8
  import "./helpers.js";
9
9
  import "../../hooks/useFlyout.js";
10
10
  import "../../../Icon/Icon.js";
@@ -1,17 +1,17 @@
1
- import { H as d, T as h, B as m, j as S, W as w, P as v, v as C, K as p, L as E } from "../../../../LexicalTable.prod-BsmIydKv.js";
2
- import { T as u } from "../../../../Lexical.prod-Bu-Iw9VX.js";
3
- const T = 100, A = (e, n) => {
1
+ import { H as d, T as h, B as m, j as S, z as w, P as v, v as C, K as p, W as E } from "../../../../LexicalTable.prod-CYafu_j9.js";
2
+ import { w as u } from "../../../../Lexical.prod-CniF7zEE.js";
3
+ const b = 100, P = (e, n) => {
4
4
  const t = E(0, 0, !1);
5
5
  for (let o = 0; o < e; o++) {
6
6
  const r = p();
7
7
  for (let l = 0; l < n; l++) {
8
- const s = C(0, void 0, T / n);
8
+ const s = C(0, void 0, b / n);
9
9
  s.append(u()), r.append(s);
10
10
  }
11
11
  t.append(r);
12
12
  }
13
13
  return t;
14
- }, B = (e) => {
14
+ }, A = (e) => {
15
15
  const n = w(e), t = n.getNextSibling() || n.getPreviousSibling(), o = n.getParentOrThrow();
16
16
  if (o.getChildrenSize() > 1 ? n.remove() : o.remove(), t !== null) {
17
17
  const r = t.getFirstDescendant();
@@ -19,7 +19,7 @@ const T = 100, A = (e, n) => {
19
19
  }
20
20
  }, I = (e) => {
21
21
  d(e).remove();
22
- }, L = (e, n) => {
22
+ }, B = (e, n) => {
23
23
  const t = p(), o = w(e), r = o.getChildrenSize();
24
24
  for (let s = 0; s < r; s++) {
25
25
  const c = C(0);
@@ -34,21 +34,21 @@ const T = 100, A = (e, n) => {
34
34
  throw new Error("Selected node is not a TableCellNode");
35
35
  const o = v(e), r = t.getChildren().length, l = d(e);
36
36
  let s = m(e);
37
- const c = l.getChildren(), b = c.length;
38
- for (let i = 0; i < b; i++) {
37
+ const c = l.getChildren(), T = c.length;
38
+ for (let i = 0; i < T; i++) {
39
39
  const a = C(0);
40
40
  a.append(u());
41
41
  const f = c[i].getChildren()[s];
42
42
  f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((R) => {
43
43
  R.getChildren().forEach((x) => {
44
- x.setWidth(T / r);
44
+ x.setWidth(b / r);
45
45
  });
46
46
  });
47
47
  }
48
48
  s = n === "insertColumnLeft" ? s : s + 1;
49
49
  const g = c[o].getChildren()[s];
50
50
  g && g.select();
51
- }, z = (e) => {
51
+ }, F = (e) => {
52
52
  var r;
53
53
  if (!h(e))
54
54
  throw new Error("Selected node is not a TableCellNode");
@@ -56,11 +56,11 @@ const T = 100, A = (e, n) => {
56
56
  t === 1 ? I(e) : S(n, o);
57
57
  };
58
58
  export {
59
- A as createTable,
60
- z as deleteColumn,
61
- B as deleteRow,
59
+ P as createTable,
60
+ F as deleteColumn,
61
+ A as deleteRow,
62
62
  I as deleteTable,
63
63
  O as insertColumn,
64
- L as insertRow
64
+ B as insertRow
65
65
  };
66
66
  //# sourceMappingURL=helpers.js.map
@@ -1,4 +1,4 @@
1
- import { T as o } from "../../../../TablePlugin-DKzssVbg.js";
1
+ import { T as o } from "../../../../TablePlugin-MjKuocl4.js";
2
2
  import { TableCellContextMenu as t } from "./TableCellContextMenu/TableCellContextMenu.js";
3
3
  export {
4
4
  t as TableCellContextMenu,