@uva-glass/component-library 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.prod-Bu-Iw9VX.js → Lexical.prod-CniF7zEE.js} +670 -666
- package/dist/Lexical.prod-CniF7zEE.js.map +1 -0
- package/dist/{LexicalClipboard.prod-C5dHfEke.js → LexicalClipboard.prod-BXVNkwwS.js} +42 -42
- package/dist/{LexicalClipboard.prod-C5dHfEke.js.map → LexicalClipboard.prod-BXVNkwwS.js.map} +1 -1
- package/dist/{LexicalLink.prod-DdERpPPj.js → LexicalLink.prod-Du8ZoNsh.js} +3 -3
- package/dist/{LexicalLink.prod-DdERpPPj.js.map → LexicalLink.prod-Du8ZoNsh.js.map} +1 -1
- package/dist/{LexicalList.prod-CzJqqstH.js → LexicalList.prod-BUcoZhe4.js} +35 -35
- package/dist/{LexicalList.prod-CzJqqstH.js.map → LexicalList.prod-BUcoZhe4.js.map} +1 -1
- package/dist/{LexicalSelection.prod-CkM-3E0b.js → LexicalSelection.prod-BfAlhGGm.js} +25 -25
- package/dist/{LexicalSelection.prod-CkM-3E0b.js.map → LexicalSelection.prod-BfAlhGGm.js.map} +1 -1
- package/dist/{LexicalTable.prod-BsmIydKv.js → LexicalTable.prod-CYafu_j9.js} +458 -453
- package/dist/LexicalTable.prod-CYafu_j9.js.map +1 -0
- package/dist/{LexicalUtils.prod-BVZbsLIa.js → LexicalUtils.prod-DVr8VsHc.js} +36 -36
- package/dist/{LexicalUtils.prod-BVZbsLIa.js.map → LexicalUtils.prod-DVr8VsHc.js.map} +1 -1
- package/dist/{TablePlugin-DKzssVbg.js → TablePlugin-MjKuocl4.js} +53 -53
- package/dist/{TablePlugin-DKzssVbg.js.map → TablePlugin-MjKuocl4.js.map} +1 -1
- package/dist/components/Accordion/Accordion.test.js +2 -2
- package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
- package/dist/components/ActionList/ActionList.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
- package/dist/components/Attention/Attention.test.js +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +1 -1
- package/dist/components/Card/Card.test.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.test.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/Label/Label.test.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +11 -11
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +29 -29
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +26 -26
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +14 -14
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +22 -22
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +116 -116
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
- package/dist/components/Timeline/Timeline.test.js +2 -2
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/{helpers-D13uK95u.js → helpers-ChM6xtQG.js} +63 -63
- package/dist/{helpers-D13uK95u.js.map → helpers-ChM6xtQG.js.map} +1 -1
- package/dist/{index-DMVXQIB9.js → index-COab4Oy9.js} +2 -2
- package/dist/{index-DMVXQIB9.js.map → index-COab4Oy9.js.map} +1 -1
- package/dist/{index-C7jFUWYs.js → index-DXR-TB1d.js} +2155 -2135
- package/dist/index-DXR-TB1d.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{react.esm-BOUd0cvD.js → react.esm-B8teOYlo.js} +2 -2
- package/dist/{react.esm-BOUd0cvD.js.map → react.esm-B8teOYlo.js.map} +1 -1
- package/dist/storybook__react.d.js +641 -637
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-utils-uaSbIYda.js → test-utils-Brqoydie.js} +279 -259
- package/dist/{test-utils-uaSbIYda.js.map → test-utils-Brqoydie.js.map} +1 -1
- package/package.json +18 -18
- package/dist/Lexical.prod-Bu-Iw9VX.js.map +0 -1
- package/dist/LexicalTable.prod-BsmIydKv.js.map +0 -1
- package/dist/index-C7jFUWYs.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { fn as t } from "../../index-
|
|
2
|
+
import { fn as t } from "../../index-DXR-TB1d.js";
|
|
3
3
|
import { Chip as e } from "./Chip.js";
|
|
4
4
|
const s = "<Chip label={string} onDelete={onDeleteFunction(label)}/>", b = {
|
|
5
5
|
title: "Atoms/Chip",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { OverlayProvider as p } from "@react-aria/overlays";
|
|
3
|
-
import { fn as m } from "../../index-
|
|
3
|
+
import { fn as m } from "../../index-DXR-TB1d.js";
|
|
4
4
|
import { useState as c } from "react";
|
|
5
5
|
import { Drawer as r } from "./Drawer.js";
|
|
6
6
|
import { Button as o } from "../Buttons/Button.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-Z7qwJmRM.js";
|
|
3
|
-
import { r as s, s as e, f as r } from "../../react.esm-
|
|
3
|
+
import { r as s, s as e, f as r } from "../../react.esm-B8teOYlo.js";
|
|
4
4
|
import { FeedbackBar as c } from "./FeedbackBar.js";
|
|
5
5
|
describe("FeedbackBar", () => {
|
|
6
6
|
it("should render with children text", () => {
|
|
@@ -16,7 +16,7 @@ import "../IconButton/IconButton.js";
|
|
|
16
16
|
import "../Input/Input.js";
|
|
17
17
|
import "../InputField/InputField.js";
|
|
18
18
|
import "react-router";
|
|
19
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-MjKuocl4.js";
|
|
20
20
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
21
21
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
22
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { fn as i } from "../../index-
|
|
2
|
+
import { fn as i } from "../../index-DXR-TB1d.js";
|
|
3
3
|
import { FormInput as a } from "./FormInput.js";
|
|
4
4
|
import { SelectListbox as o } from "../SelectListbox/SelectListbox.js";
|
|
5
5
|
const m = `
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { fn as r } from "../../index-
|
|
2
|
+
import { fn as r } from "../../index-DXR-TB1d.js";
|
|
3
3
|
import { IconButton as t } from "./IconButton.js";
|
|
4
4
|
import { Icon as i } from "../Icon/Icon.js";
|
|
5
5
|
const l = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g } from "react";
|
|
3
|
-
import { fn as p } from "../../index-
|
|
3
|
+
import { fn as p } from "../../index-DXR-TB1d.js";
|
|
4
4
|
import { InputField as o } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
import { Icon as f } from "../Icon/Icon.js";
|
|
@@ -16,7 +16,7 @@ import "../GridRow/GridRow.js";
|
|
|
16
16
|
import "../IconButton/IconButton.js";
|
|
17
17
|
import "../Input/Input.js";
|
|
18
18
|
import "react-router";
|
|
19
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-MjKuocl4.js";
|
|
20
20
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
21
21
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
22
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-Z7qwJmRM.js";
|
|
3
|
-
import { r as t, s as l } from "../../react.esm-
|
|
3
|
+
import { r as t, s as l } from "../../react.esm-B8teOYlo.js";
|
|
4
4
|
import { Label as r } from "./Label.js";
|
|
5
5
|
describe("Label", () => {
|
|
6
6
|
it("should render", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { ModalProvider as l } from "@react-aria/overlays";
|
|
3
|
-
import { fn as i } from "../../index-
|
|
3
|
+
import { fn as i } from "../../index-DXR-TB1d.js";
|
|
4
4
|
import { ModalDialog as t } from "./ModalDialog.js";
|
|
5
5
|
import { Button as n } from "../Buttons/Button.js";
|
|
6
6
|
import "../Buttons/LinkButton.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { fn as d } from "../../index-
|
|
2
|
+
import { fn as d } from "../../index-DXR-TB1d.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
|
-
import { M as e } from "../../TablePlugin-
|
|
4
|
+
import { M as e } from "../../TablePlugin-MjKuocl4.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
const C = `
|
|
7
7
|
// MultiSelectHeader can be added optionally
|
|
@@ -15,7 +15,7 @@ import "../../IconButton/IconButton.js";
|
|
|
15
15
|
import "../../Input/Input.js";
|
|
16
16
|
import "../../InputField/InputField.js";
|
|
17
17
|
import "react-router";
|
|
18
|
-
import { a as y } from "../../../TablePlugin-
|
|
18
|
+
import { a as y } from "../../../TablePlugin-MjKuocl4.js";
|
|
19
19
|
import "../../RteEditor/Providers/LanguageProvider.js";
|
|
20
20
|
import "../../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "../../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { fn as a } from "../../index-
|
|
2
|
+
import { fn as a } from "../../index-DXR-TB1d.js";
|
|
3
3
|
import { OverlayCloseButton as o } from "./OverlayCloseButton.js";
|
|
4
4
|
import { Container as l } from "../../storyComponents/Container/Container.js";
|
|
5
5
|
const n = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />", c = {
|
|
@@ -15,7 +15,7 @@ import "../IconButton/IconButton.js";
|
|
|
15
15
|
import "../Input/Input.js";
|
|
16
16
|
import "../InputField/InputField.js";
|
|
17
17
|
import "react-router";
|
|
18
|
-
import "../../TablePlugin-
|
|
18
|
+
import "../../TablePlugin-MjKuocl4.js";
|
|
19
19
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
20
20
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -17,7 +17,7 @@ import "../Input/Input.js";
|
|
|
17
17
|
import "../InputField/InputField.js";
|
|
18
18
|
import { Label as D } from "../Label/Label.js";
|
|
19
19
|
import "react-router";
|
|
20
|
-
import "../../TablePlugin-
|
|
20
|
+
import "../../TablePlugin-MjKuocl4.js";
|
|
21
21
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
22
22
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
23
23
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { fn as t } from "../../index-
|
|
2
|
+
import { fn as t } from "../../index-DXR-TB1d.js";
|
|
3
3
|
import { PeriodSelector as e } from "./PeriodSelector.js";
|
|
4
4
|
const i = "<PeriodSelector maxPeriods={} defaultValues={} label={} labelPosition={} required={} onChange={} />", m = {
|
|
5
5
|
title: "Organisms/PeriodSelector",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { fn as a } from "../../index-
|
|
2
|
+
import { fn as a } from "../../index-DXR-TB1d.js";
|
|
3
3
|
import { ProgrammeCard as o } from "./ProgrammeCard.js";
|
|
4
4
|
import { Container as n } from "../../storyComponents/Container/Container.js";
|
|
5
5
|
import "react";
|
|
@@ -18,7 +18,7 @@ import "../IconButton/IconButton.js";
|
|
|
18
18
|
import "../Input/Input.js";
|
|
19
19
|
import "../InputField/InputField.js";
|
|
20
20
|
import "react-router";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-MjKuocl4.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -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-
|
|
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
|
|
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 _,
|
|
5
|
-
import { useState as
|
|
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
|
|
9
|
+
const C = {
|
|
10
10
|
bold: "Bold",
|
|
11
11
|
italic: "Italic"
|
|
12
|
-
},
|
|
13
|
-
const t = B(), [i] = u(), [
|
|
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) && (
|
|
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__ */
|
|
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" &&
|
|
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__ */
|
|
40
|
+
children: /* @__PURE__ */ s(I, { name: C[o], size: 24 })
|
|
41
41
|
},
|
|
42
42
|
o
|
|
43
43
|
)) });
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
4
|
-
import "../../../../../helpers-
|
|
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-
|
|
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
|
|
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-
|
|
5
|
-
import { useRef as a, useState as
|
|
6
|
-
import {
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
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
|
-
},
|
|
55
|
-
const n = ut(), [c] = Y(), { flyout: A, showFlyout: _, hideFlyout: C, isVisible: u } = ct(), d = a(void 0),
|
|
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
|
-
|
|
58
|
+
x.current = e;
|
|
59
59
|
});
|
|
60
60
|
}, R = () => {
|
|
61
61
|
c.update(() => {
|
|
62
|
-
|
|
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:
|
|
74
|
+
ref: T
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
});
|
|
78
78
|
}, D = () => {
|
|
79
79
|
var e;
|
|
80
|
-
(e =
|
|
81
|
-
},
|
|
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
|
-
!
|
|
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 (
|
|
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:
|
|
102
|
-
o.insertText(t), 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 ? (
|
|
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 (
|
|
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(), !
|
|
159
|
+
if (b(), !w(r))
|
|
160
160
|
return !1;
|
|
161
|
-
const i = I(r.anchor.getNode()), s = (
|
|
162
|
-
|
|
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(
|
|
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) : (
|
|
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(),
|
|
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 =
|
|
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__ */
|
|
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:
|
|
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
|
-
|
|
237
|
+
Wt as LinkPlugin,
|
|
238
238
|
I as getLinkNodeTag
|
|
239
239
|
};
|
|
240
240
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { o as
|
|
3
|
-
import { s as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { useState as p, useEffect as
|
|
6
|
-
import { c as
|
|
7
|
-
import { ao as
|
|
8
|
-
import { Icon as
|
|
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
|
|
11
|
-
const
|
|
10
|
+
import { useTranslation as z } from "../../hooks/useTranslation.js";
|
|
11
|
+
const H = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
|
-
},
|
|
15
|
-
const l =
|
|
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) &&
|
|
18
|
+
h(t) && E(t, () => $());
|
|
19
19
|
});
|
|
20
|
-
},
|
|
21
|
-
t === "number" && g !== "number" ? (e.dispatchCommand(P, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(k, void 0), s("bullet")) : (
|
|
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
|
|
23
|
+
return w(() => {
|
|
24
24
|
const t = e.registerCommand(
|
|
25
|
-
|
|
26
|
-
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(
|
|
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]),
|
|
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 (!
|
|
40
|
+
if (!S(n))
|
|
41
41
|
return;
|
|
42
42
|
const a = n.getParent();
|
|
43
43
|
if (f(a)) {
|
|
44
|
-
const
|
|
45
|
-
n.append(
|
|
44
|
+
const C = y(f(a) ? a.getListType() : "bullet");
|
|
45
|
+
n.append(C), C.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
48
|
-
|
|
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:
|
|
73
|
+
}, [e]), /* @__PURE__ */ d("div", { className: u["editor__toolbar-button-group"], children: T.map((t) => /* @__PURE__ */ d(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
onClick: () =>
|
|
76
|
+
onClick: () => I(t),
|
|
77
77
|
title: l.format[`${t}Tooltip`],
|
|
78
|
-
className:
|
|
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(
|
|
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,
|
|
4
|
-
import { L as i } from "../../../../LexicalUtils.prod-
|
|
5
|
-
import { D as u } from "../../../../LexicalClipboard.prod-
|
|
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
|
|
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
|
-
|
|
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-
|
|
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-
|
|
5
|
-
import "../../../../Lexical.prod-
|
|
4
|
+
import "../../../../LexicalTable.prod-CYafu_j9.js";
|
|
5
|
+
import "../../../../Lexical.prod-CniF7zEE.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as F } from "../../../../TablePlugin-
|
|
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";
|