@uva-glass/component-library 3.0.6 → 3.0.8
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-D0woeN3R.js +4770 -0
- package/dist/Lexical.prod-D0woeN3R.js.map +1 -0
- package/dist/LexicalClipboard.prod-D9CvlqSO.js +258 -0
- package/dist/LexicalClipboard.prod-D9CvlqSO.js.map +1 -0
- package/dist/LexicalComposerContext.prod--Rm7-Z9o.js +26 -0
- package/dist/LexicalComposerContext.prod--Rm7-Z9o.js.map +1 -0
- package/dist/{LexicalLink.prod-JpC4y56U.js → LexicalLink.prod-__08uNAw.js} +51 -51
- package/dist/LexicalLink.prod-__08uNAw.js.map +1 -0
- package/dist/{LexicalList.prod-w0kSq9sB.js → LexicalList.prod-BgI8r9BS.js} +44 -44
- package/dist/LexicalList.prod-BgI8r9BS.js.map +1 -0
- package/dist/LexicalSelection.prod-B-SXpOS9.js +86 -0
- package/dist/LexicalSelection.prod-B-SXpOS9.js.map +1 -0
- package/dist/LexicalTable.prod-DJWDvnB3.js +1494 -0
- package/dist/LexicalTable.prod-DJWDvnB3.js.map +1 -0
- package/dist/LexicalUtils.prod-BYrJ1Iih.js +112 -0
- package/dist/LexicalUtils.prod-BYrJ1Iih.js.map +1 -0
- package/dist/{TablePlugin-Co5vgBHF.js → TablePlugin-BHY7_5Z8.js} +44 -44
- package/dist/{TablePlugin-Co5vgBHF.js.map → TablePlugin-BHY7_5Z8.js.map} +1 -1
- package/dist/assets/variables.css +21 -21
- package/dist/components/Accordion/Accordion.test.d.ts +0 -0
- package/dist/components/Accordion/Accordion.test.js +29 -0
- package/dist/components/Accordion/Accordion.test.js.map +1 -0
- package/dist/components/AccordionCard/AccordionCard.test.d.ts +0 -0
- package/dist/components/AccordionCard/AccordionCard.test.js +33 -0
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -0
- package/dist/components/ActionList/ActionList.test.d.ts +0 -0
- package/dist/components/ActionList/ActionList.test.js +60 -0
- package/dist/components/ActionList/ActionList.test.js.map +1 -0
- package/dist/components/AppStatusBar/AppStatusBar.test.d.ts +0 -0
- package/dist/components/AppStatusBar/AppStatusBar.test.js +10 -0
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -0
- package/dist/components/Attention/Attention.test.d.ts +0 -0
- package/dist/components/Attention/Attention.test.js +10 -0
- package/dist/components/Attention/Attention.test.js.map +1 -0
- package/dist/components/Backdrop/Backdrop.test.d.ts +0 -0
- package/dist/components/Backdrop/Backdrop.test.js +10 -0
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -0
- package/dist/components/Buttons/Button.test.d.ts +0 -0
- package/dist/components/Buttons/Button.test.js +35 -0
- package/dist/components/Buttons/Button.test.js.map +1 -0
- package/dist/components/Buttons/LinkButton.test.d.ts +0 -0
- package/dist/components/Buttons/LinkButton.test.js +67 -0
- package/dist/components/Buttons/LinkButton.test.js.map +1 -0
- package/dist/components/Buttons/MenuButton.test.d.ts +0 -0
- package/dist/components/Buttons/MenuButton.test.js +66 -0
- package/dist/components/Buttons/MenuButton.test.js.map +1 -0
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.js +19 -4254
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +10 -10
- 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 +66 -66
- 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 +14 -14
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +26 -26
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +9 -9
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +350 -350
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +5 -5
- package/dist/components/index.js +1 -1
- package/dist/helpers-Cgw7V6LR.js +168 -0
- package/dist/helpers-Cgw7V6LR.js.map +1 -0
- package/dist/index-CcK2jjMp.js.map +1 -1
- package/dist/index-OJvb7CGo.js +2962 -0
- package/dist/index-OJvb7CGo.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/react.esm-BZoQ2TxA.js +4271 -0
- package/dist/react.esm-BZoQ2TxA.js.map +1 -0
- package/dist/setupTests.js.map +1 -1
- package/package.json +27 -26
- package/dist/Lexical.prod-DTADK2yJ.js +0 -4263
- package/dist/Lexical.prod-DTADK2yJ.js.map +0 -1
- package/dist/LexicalClipboard.prod-Dx5Fm6e5.js +0 -258
- package/dist/LexicalClipboard.prod-Dx5Fm6e5.js.map +0 -1
- package/dist/LexicalComposerContext.prod-BCXERl09.js +0 -26
- package/dist/LexicalComposerContext.prod-BCXERl09.js.map +0 -1
- package/dist/LexicalLink.prod-JpC4y56U.js.map +0 -1
- package/dist/LexicalList.prod-w0kSq9sB.js.map +0 -1
- package/dist/LexicalSelection.prod-DQLHaigk.js +0 -78
- package/dist/LexicalSelection.prod-DQLHaigk.js.map +0 -1
- package/dist/LexicalTable.prod-DjfZc87j.js +0 -1465
- package/dist/LexicalTable.prod-DjfZc87j.js.map +0 -1
- package/dist/LexicalUtils.prod-BBwue2Aj.js +0 -122
- package/dist/LexicalUtils.prod-BBwue2Aj.js.map +0 -1
- package/dist/helpers-DgTW1vIO.js +0 -168
- package/dist/helpers-DgTW1vIO.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { f as d } from "../../index-CcK2jjMp.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
|
-
import { M as e } from "../../TablePlugin-
|
|
4
|
+
import { M as e } from "../../TablePlugin-BHY7_5Z8.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-BHY7_5Z8.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";
|
|
@@ -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-BHY7_5Z8.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-BHY7_5Z8.js";
|
|
21
21
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
22
22
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
23
23
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -17,7 +17,7 @@ import "../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-BHY7_5Z8.js";
|
|
21
21
|
import { Repeater as i } from "../Repeater/Repeater.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.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-BHY7_5Z8.js";
|
|
18
18
|
import "../Providers/LanguageProvider.js";
|
|
19
19
|
import "../Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
20
20
|
import "../hooks/components/Flyout.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { u } from "../../../../LexicalComposerContext.prod-
|
|
2
|
+
import { u } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
3
3
|
import { c as f } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import {
|
|
4
|
+
import { h as _, G as h, x as p } from "../../../../Lexical.prod-D0woeN3R.js";
|
|
5
5
|
import { useState as l, useEffect as k } from "react";
|
|
6
6
|
import { Icon as I } from "../../../Icon/Icon.js";
|
|
7
7
|
import { s as a } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
@@ -9,15 +9,15 @@ import { useTranslation as B } from "../../hooks/useTranslation.js";
|
|
|
9
9
|
const C = {
|
|
10
10
|
bold: "Bold",
|
|
11
11
|
italic: "Italic"
|
|
12
|
-
}, T = ["bold", "italic"],
|
|
12
|
+
}, T = ["bold", "italic"], E = () => {
|
|
13
13
|
const t = B(), [i] = u(), [e, c] = l(!1), [n, m] = l(!1), d = (o) => {
|
|
14
|
-
i.dispatchCommand(
|
|
14
|
+
i.dispatchCommand(p, o);
|
|
15
15
|
};
|
|
16
16
|
return k(() => {
|
|
17
17
|
const o = i.registerUpdateListener(({ editorState: b }) => {
|
|
18
18
|
b.read(() => {
|
|
19
19
|
const r = _();
|
|
20
|
-
|
|
20
|
+
h(r) && (c(r.hasFormat("bold")), m(r.hasFormat("italic")));
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
return () => {
|
|
@@ -43,6 +43,6 @@ const C = {
|
|
|
43
43
|
)) });
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
E as BlockFormatPlugin
|
|
47
47
|
};
|
|
48
48
|
//# sourceMappingURL=BlockFormatPlugin.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as f, jsx as
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "../../../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { u as h } from "../../../../LexicalComposerContext.prod-
|
|
4
|
-
import {
|
|
3
|
+
import { u as h } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
4
|
+
import { ae as _, af as y, ag as C, ah as k } from "../../../../Lexical.prod-D0woeN3R.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-BHY7_5Z8.js";
|
|
21
21
|
import { s as r } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
22
22
|
import { useTranslation as g } from "../../hooks/useTranslation.js";
|
|
23
23
|
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
@@ -36,14 +36,14 @@ const Z = () => {
|
|
|
36
36
|
};
|
|
37
37
|
return m(() => t.registerCommand(
|
|
38
38
|
_,
|
|
39
|
-
(
|
|
39
|
+
(a) => (p(a), !1),
|
|
40
40
|
1
|
|
41
41
|
), [t]), m(() => t.registerCommand(
|
|
42
42
|
y,
|
|
43
|
-
(
|
|
43
|
+
(a) => (u(a), !1),
|
|
44
44
|
1
|
|
45
45
|
), [t]), /* @__PURE__ */ f("div", { className: r["editor__toolbar-button-group"], children: [
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ e(
|
|
47
47
|
"button",
|
|
48
48
|
{
|
|
49
49
|
onClick: c,
|
|
@@ -53,10 +53,10 @@ const Z = () => {
|
|
|
53
53
|
disabled: !d,
|
|
54
54
|
title: o.format.undoTooltip,
|
|
55
55
|
type: "button",
|
|
56
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ e(n, { name: "StepBack", size: 24 })
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ e(
|
|
60
60
|
"button",
|
|
61
61
|
{
|
|
62
62
|
onClick: b,
|
|
@@ -66,7 +66,7 @@ const Z = () => {
|
|
|
66
66
|
disabled: !l,
|
|
67
67
|
title: o.format.redoTooltip,
|
|
68
68
|
type: "button",
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ e(n, { name: "StepForwards", size: 24 })
|
|
70
70
|
}
|
|
71
71
|
)
|
|
72
72
|
] });
|
|
@@ -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-BHY7_5Z8.js";
|
|
4
|
+
import "../../../../../helpers-Cgw7V6LR.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-Cgw7V6LR.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
|
|
2
|
-
import { u as Y } from "../../../../LexicalComposerContext.prod-
|
|
3
|
-
import { c as
|
|
4
|
-
import { m as
|
|
5
|
-
import { useRef as a, useState as
|
|
6
|
-
import {
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
1
|
+
import { jsx as h, jsxs as G } from "react/jsx-runtime";
|
|
2
|
+
import { u as Y } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
3
|
+
import { c as W } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { m as U, N as J, w as Q } from "../../../../LexicalLink.prod-__08uNAw.js";
|
|
5
|
+
import { useRef as a, useState as X, useEffect as m } from "react";
|
|
6
|
+
import { E as Z, h as f, ad as $, ac as tt, G as w, e as et, q as ot, B as rt } from "../../../../Lexical.prod-D0woeN3R.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-BHY7_5Z8.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-Cgw7V6LR.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";
|
|
@@ -22,8 +22,8 @@ import "../../../IconButton/IconButton.js";
|
|
|
22
22
|
import "../../../Input/Input.js";
|
|
23
23
|
import "../../../InputField/InputField.js";
|
|
24
24
|
import "react-router";
|
|
25
|
-
import { setScrollableContainers as
|
|
26
|
-
import { s as
|
|
25
|
+
import { setScrollableContainers as z, removeScrollableContainers as at } from "../../helpers.js";
|
|
26
|
+
import { s as k } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
27
27
|
import { useTranslation as ut } from "../../hooks/useTranslation.js";
|
|
28
28
|
import "../../Providers/LanguageProvider.js";
|
|
29
29
|
import "../../../../index-B3c5pcHk.js";
|
|
@@ -31,18 +31,18 @@ import "../../../SelectListbox/SelectListbox.js";
|
|
|
31
31
|
import "../../../SelectListbox/SelectProvider.js";
|
|
32
32
|
import "../../../Sortable/components/SortableItem.js";
|
|
33
33
|
import "../../../../SortableProvider-Ck_XnBVq.js";
|
|
34
|
-
const mt = 200,
|
|
34
|
+
const mt = 200, I = (p) => {
|
|
35
35
|
let n = p;
|
|
36
36
|
for (; n; ) {
|
|
37
|
-
if (
|
|
37
|
+
if (U(n))
|
|
38
38
|
return n;
|
|
39
39
|
n = n.getParent();
|
|
40
40
|
}
|
|
41
41
|
return null;
|
|
42
|
-
},
|
|
42
|
+
}, O = (p) => {
|
|
43
43
|
let n = p;
|
|
44
44
|
for (; n; ) {
|
|
45
|
-
if (
|
|
45
|
+
if (U(n))
|
|
46
46
|
return {
|
|
47
47
|
active: !0,
|
|
48
48
|
url: n.getURL(),
|
|
@@ -51,8 +51,8 @@ const mt = 200, z = (p) => {
|
|
|
51
51
|
n = n.getParent();
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
|
-
},
|
|
55
|
-
const n = ut(), [c] = Y(), { flyout:
|
|
54
|
+
}, qt = ({ 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] = X({ 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;
|
|
@@ -61,15 +61,15 @@ const mt = 200, z = (p) => {
|
|
|
61
61
|
c.update(() => {
|
|
62
62
|
x.current && ot(x.current);
|
|
63
63
|
});
|
|
64
|
-
},
|
|
65
|
-
|
|
64
|
+
}, M = (e, t) => {
|
|
65
|
+
_({
|
|
66
66
|
position: t,
|
|
67
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ h(
|
|
68
68
|
st,
|
|
69
69
|
{
|
|
70
70
|
url: e,
|
|
71
|
-
onSave: (o) =>
|
|
72
|
-
onDelete: () =>
|
|
71
|
+
onSave: (o) => B(o, ""),
|
|
72
|
+
onDelete: () => V(),
|
|
73
73
|
onClose: D,
|
|
74
74
|
ref: T
|
|
75
75
|
}
|
|
@@ -78,69 +78,69 @@ const mt = 200, z = (p) => {
|
|
|
78
78
|
}, D = () => {
|
|
79
79
|
var e;
|
|
80
80
|
(e = T.current) == null || e.clearForm(), C(), R();
|
|
81
|
-
},
|
|
81
|
+
}, E = () => {
|
|
82
82
|
var t;
|
|
83
|
-
const e = (t =
|
|
84
|
-
!N.current && e && (b(),
|
|
83
|
+
const e = (t = S.current) == null ? void 0 : t.getBoundingClientRect();
|
|
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));
|
|
88
88
|
}, v = () => {
|
|
89
89
|
C(), R();
|
|
90
|
-
},
|
|
90
|
+
}, B = (e, t) => {
|
|
91
91
|
c.update(() => {
|
|
92
92
|
const o = f();
|
|
93
93
|
if (w(o)) {
|
|
94
|
-
const i = o.anchor.getNode(), s =
|
|
94
|
+
const i = o.anchor.getNode(), s = I(i);
|
|
95
95
|
if (t && t !== "") {
|
|
96
96
|
if (s) {
|
|
97
97
|
const l = rt(t);
|
|
98
98
|
s.replace(l), l.select();
|
|
99
99
|
}
|
|
100
|
-
if (t !==
|
|
101
|
-
const { anchor: l, focus:
|
|
102
|
-
o.insertText(t), l.offset -= t.length,
|
|
100
|
+
if (t !== y.current && y.current === "") {
|
|
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
|
+
Q(it(e), { target: "_blank" });
|
|
106
106
|
}
|
|
107
107
|
v();
|
|
108
108
|
});
|
|
109
|
-
},
|
|
110
|
-
c.dispatchCommand(
|
|
111
|
-
},
|
|
112
|
-
children: /* @__PURE__ */
|
|
109
|
+
}, V = () => {
|
|
110
|
+
c.dispatchCommand(J, null), D();
|
|
111
|
+
}, j = {
|
|
112
|
+
children: /* @__PURE__ */ h(
|
|
113
113
|
nt,
|
|
114
114
|
{
|
|
115
|
-
isLink:
|
|
115
|
+
isLink: L,
|
|
116
116
|
onCloseHandler: v,
|
|
117
|
-
onSaveHandler: (e, t) =>
|
|
117
|
+
onSaveHandler: (e, t) => B(e, t),
|
|
118
118
|
ref: d
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
};
|
|
122
122
|
return m(() => {
|
|
123
123
|
var e, t;
|
|
124
|
-
u ? (N.current = !0, (t = d.current) == null || t.focusFirstField()) : ((e = d.current) == null || e.clearForm(),
|
|
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
127
|
if (w(r) && r.isCollapsed()) {
|
|
128
|
-
const i =
|
|
128
|
+
const i = O(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 };
|
|
131
|
-
return
|
|
131
|
+
return M(i.url, l), !0;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
return !1;
|
|
135
135
|
}, t = c.registerCommand(
|
|
136
|
-
|
|
136
|
+
Z,
|
|
137
137
|
() => {
|
|
138
138
|
const r = f();
|
|
139
139
|
return g.current = (r == null ? void 0 : r.getTextContent()) ?? "", e(r), !1;
|
|
140
140
|
},
|
|
141
141
|
0
|
|
142
142
|
), o = c.registerCommand(
|
|
143
|
-
|
|
143
|
+
$,
|
|
144
144
|
(r) => {
|
|
145
145
|
const i = f();
|
|
146
146
|
return b(), r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation(), e(i), !1;
|
|
@@ -158,26 +158,26 @@ const mt = 200, z = (p) => {
|
|
|
158
158
|
const r = f();
|
|
159
159
|
if (b(), !w(r))
|
|
160
160
|
return !1;
|
|
161
|
-
const i =
|
|
162
|
-
|
|
163
|
-
var
|
|
164
|
-
return (
|
|
161
|
+
const i = O(r.anchor.getNode()), s = (F = "", q = "") => {
|
|
162
|
+
E(), setTimeout(() => {
|
|
163
|
+
var K;
|
|
164
|
+
return (K = d.current) == null ? void 0 : K.setDefaults(F, q);
|
|
165
165
|
}, 0);
|
|
166
166
|
};
|
|
167
167
|
if (i)
|
|
168
|
-
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(),
|
|
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
|
},
|
|
174
174
|
et
|
|
175
175
|
), t = c.registerUpdateListener(({ editorState: o }) => {
|
|
176
|
-
|
|
176
|
+
H(
|
|
177
177
|
o.read(() => {
|
|
178
178
|
const r = f();
|
|
179
179
|
if (b(), w(r)) {
|
|
180
|
-
const i = r.anchor.getNode(), s =
|
|
180
|
+
const i = r.anchor.getNode(), s = I(i);
|
|
181
181
|
if (s)
|
|
182
182
|
return {
|
|
183
183
|
active: !0,
|
|
@@ -198,43 +198,43 @@ const mt = 200, z = (p) => {
|
|
|
198
198
|
};
|
|
199
199
|
}, [c]), m(() => {
|
|
200
200
|
var e;
|
|
201
|
-
|
|
201
|
+
P.current = u, u || (e = T.current) == null || e.clearForm();
|
|
202
202
|
}, [u]), m(() => {
|
|
203
203
|
u && v();
|
|
204
204
|
}, [p]), m(() => {
|
|
205
|
-
|
|
206
|
-
}, [
|
|
207
|
-
const e = (o) => (
|
|
205
|
+
L.active || C();
|
|
206
|
+
}, [L]), m(() => {
|
|
207
|
+
const e = (o) => (z(t), o.key === "Escape" && P.current && (o.preventDefault(), o.stopPropagation(), v()), !0);
|
|
208
208
|
window.addEventListener("keydown", e, { capture: !0 });
|
|
209
209
|
const t = () => {
|
|
210
210
|
C();
|
|
211
211
|
};
|
|
212
|
-
return
|
|
212
|
+
return z(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__ */
|
|
216
|
-
/* @__PURE__ */
|
|
215
|
+
}, []), /* @__PURE__ */ h("div", { className: k["editor__toolbar-button-group"], children: /* @__PURE__ */ G("div", { className: k["editor__toolbar-button-flyoutwrapper"], children: [
|
|
216
|
+
/* @__PURE__ */ h(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
219
|
-
onClick:
|
|
219
|
+
onClick: E,
|
|
220
220
|
title: n.links.linkTooltip,
|
|
221
|
-
className:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
className: W(
|
|
222
|
+
k["editor__toolbar-button"],
|
|
223
|
+
k["editor__toolbar-button--link"],
|
|
224
|
+
L.active && k["editor__toolbar-button--active"]
|
|
225
225
|
),
|
|
226
226
|
"aria-label": n.aria.labels.link,
|
|
227
227
|
"aria-keyshortcuts": n.aria.keyshortcuts.link,
|
|
228
228
|
type: "button",
|
|
229
|
-
ref:
|
|
230
|
-
children: /* @__PURE__ */
|
|
229
|
+
ref: S,
|
|
230
|
+
children: /* @__PURE__ */ h(lt, { name: "Link", size: 20 })
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
|
|
233
|
+
A
|
|
234
234
|
] }) });
|
|
235
235
|
};
|
|
236
236
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
qt as LinkPlugin,
|
|
238
|
+
O as getLinkNodeTag
|
|
239
239
|
};
|
|
240
240
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { u as S } from "../../../../LexicalComposerContext.prod-
|
|
3
|
-
import { Y as N, Q as P, G as k, K as
|
|
4
|
-
import {
|
|
5
|
-
import { useState as p, useEffect as
|
|
6
|
-
import { c as
|
|
7
|
-
import {
|
|
8
|
-
import { Icon as
|
|
2
|
+
import { u as S } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
3
|
+
import { Y as N, Q as P, G as k, K as y, H as f, q as x } from "../../../../LexicalList.prod-BgI8r9BS.js";
|
|
4
|
+
import { L as G } from "../../../../LexicalSelection.prod-B-SXpOS9.js";
|
|
5
|
+
import { useState as p, useEffect as K } from "react";
|
|
6
|
+
import { c as O } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
+
import { ac as U, e as w, A as B, h as b, G as h, g as E, f as Y } from "../../../../Lexical.prod-D0woeN3R.js";
|
|
8
|
+
import { Icon as $ } 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 j } from "../../hooks/useTranslation.js";
|
|
11
|
+
const q = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
14
|
}, v = ["bullet", "number"], W = () => {
|
|
15
|
-
const l =
|
|
15
|
+
const l = j(), [e] = S(), [g, n] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1), D = () => {
|
|
16
16
|
e.update(() => {
|
|
17
17
|
const t = b();
|
|
18
|
-
|
|
18
|
+
h(t) && G(t, () => Y());
|
|
19
19
|
});
|
|
20
|
-
},
|
|
21
|
-
t === "number" &&
|
|
20
|
+
}, I = (t) => {
|
|
21
|
+
t === "number" && g !== "number" ? (e.dispatchCommand(P, void 0), n("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(k, void 0), n("bullet")) : (D(), n("paragraph"));
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return K(() => {
|
|
24
24
|
const t = e.registerCommand(
|
|
25
|
-
|
|
25
|
+
U,
|
|
26
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
|
+
w
|
|
28
28
|
);
|
|
29
29
|
return () => {
|
|
30
30
|
t();
|
|
31
31
|
};
|
|
32
|
-
}, [e, m, c]),
|
|
32
|
+
}, [e, m, c]), K(() => {
|
|
33
33
|
e.registerCommand(
|
|
34
|
-
|
|
34
|
+
B,
|
|
35
35
|
(r) => (r.preventDefault(), e.update(() => {
|
|
36
36
|
const i = b();
|
|
37
|
-
if (!
|
|
37
|
+
if (!h(i))
|
|
38
38
|
return;
|
|
39
39
|
const o = i.anchor.getNode(), s = o.getParent();
|
|
40
|
-
if (!
|
|
40
|
+
if (!y(s))
|
|
41
41
|
return;
|
|
42
42
|
const a = s.getParent();
|
|
43
43
|
if (f(a)) {
|
|
44
|
-
const C =
|
|
44
|
+
const C = x(f(a) ? a.getListType() : "bullet");
|
|
45
45
|
s.append(C), C.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
48
|
-
|
|
48
|
+
E
|
|
49
49
|
);
|
|
50
50
|
const t = e.registerUpdateListener(({ editorState: r }) => {
|
|
51
51
|
r.read(() => {
|
|
52
52
|
const i = b();
|
|
53
|
-
if (
|
|
53
|
+
if (h(i)) {
|
|
54
54
|
let o = i.anchor.getNode();
|
|
55
55
|
for (; o !== null; ) {
|
|
56
56
|
if (f(o)) {
|
|
@@ -73,9 +73,9 @@ const Y = {
|
|
|
73
73
|
}, [e]), /* @__PURE__ */ d("div", { className: u["editor__toolbar-button-group"], children: v.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 Y = {
|
|
|
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($, { name: q[t], size: 24 })
|
|
88
88
|
},
|
|
89
89
|
t
|
|
90
90
|
)) });
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { u as m } from "../../../../LexicalComposerContext.prod-
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { N as
|
|
1
|
+
import { u as m } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
2
|
+
import { useEffect as u } from "react";
|
|
3
|
+
import { a2 as c, u as f, h as p } from "../../../../Lexical.prod-D0woeN3R.js";
|
|
4
|
+
import { x as i } from "../../../../LexicalUtils.prod-BYrJ1Iih.js";
|
|
5
|
+
import { N as d } from "../../../../LexicalClipboard.prod-D9CvlqSO.js";
|
|
6
6
|
import { d as D } from "../../../../index-B3c5pcHk.js";
|
|
7
7
|
const g = () => {
|
|
8
|
-
const [
|
|
9
|
-
t.preventDefault(),
|
|
10
|
-
const r =
|
|
8
|
+
const [e] = m(), l = (t) => {
|
|
9
|
+
t.preventDefault(), e.update(() => {
|
|
10
|
+
const r = p(), n = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
|
|
11
11
|
if (n != null && r !== null) {
|
|
12
|
-
const
|
|
13
|
-
o.setData("text/html",
|
|
12
|
+
const a = n.getData("text/html"), o = new DataTransfer(), s = new D.MSWordNormalizer();
|
|
13
|
+
o.setData("text/html", a), s.isActive(a) && o.setData("text/html", s.normalize(a)), d(o, r, e);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
return
|
|
18
|
-
const t =
|
|
19
|
-
|
|
17
|
+
return u(() => {
|
|
18
|
+
const t = e.registerCommand(
|
|
19
|
+
c,
|
|
20
20
|
(r) => r instanceof ClipboardEvent ? (l(r), !0) : !1,
|
|
21
21
|
f
|
|
22
22
|
);
|
|
23
23
|
return () => {
|
|
24
24
|
t();
|
|
25
25
|
};
|
|
26
|
-
}, [
|
|
26
|
+
}, [e]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
29
|
g as PasteHandlerPlugin
|
|
@@ -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-BHY7_5Z8.js";
|
|
4
4
|
import "../../../Buttons/Button.js";
|
|
5
5
|
import "../../../Buttons/LinkButton.js";
|
|
6
6
|
import "@react-aria/button";
|
package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as y, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as _, useRef as b, useEffect as R } from "react";
|
|
3
3
|
import { c as w } from "../../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { u as P } from "../../../../../LexicalComposerContext.prod-
|
|
4
|
+
import { u as P } from "../../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
5
5
|
import { Icon as $ } from "../../../../Icon/Icon.js";
|
|
6
6
|
import { useTranslation as H } from "../../../hooks/useTranslation.js";
|
|
7
7
|
import '../../../../../assets/TableCellContextMenu.css';const n = {
|