@uva-glass/component-library 3.5.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.prod-CniF7zEE.js → Lexical.prod-CWyHQUEM.js} +738 -736
- package/dist/Lexical.prod-CWyHQUEM.js.map +1 -0
- package/dist/{LexicalClipboard.prod-BXVNkwwS.js → LexicalClipboard.prod-DbqSWANZ.js} +41 -41
- package/dist/{LexicalClipboard.prod-BXVNkwwS.js.map → LexicalClipboard.prod-DbqSWANZ.js.map} +1 -1
- package/dist/LexicalLink.prod-DbxnRszt.js +275 -0
- package/dist/LexicalLink.prod-DbxnRszt.js.map +1 -0
- package/dist/{LexicalList.prod-BUcoZhe4.js → LexicalList.prod-pZmYrwOC.js} +212 -172
- package/dist/LexicalList.prod-pZmYrwOC.js.map +1 -0
- package/dist/{LexicalSelection.prod-BfAlhGGm.js → LexicalSelection.prod-DkvWlcln.js} +14 -14
- package/dist/{LexicalSelection.prod-BfAlhGGm.js.map → LexicalSelection.prod-DkvWlcln.js.map} +1 -1
- package/dist/LexicalTable.prod-C6duSS2P.js +1720 -0
- package/dist/LexicalTable.prod-C6duSS2P.js.map +1 -0
- package/dist/{LexicalUtils.prod-DVr8VsHc.js → LexicalUtils.prod-Dny9Fu94.js} +43 -43
- package/dist/{LexicalUtils.prod-DVr8VsHc.js.map → LexicalUtils.prod-Dny9Fu94.js.map} +1 -1
- package/dist/{TablePlugin-MjKuocl4.js → TablePlugin-Ba6PaBhf.js} +28 -28
- package/dist/{TablePlugin-MjKuocl4.js.map → TablePlugin-Ba6PaBhf.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.test.js +1 -1
- package/dist/components/Buttons/LinkButton.test.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.test.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.test.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/Icon/icons/index.d.ts +12 -0
- package/dist/components/Icon/icons/index.js +163 -153
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.js +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/RadioGroup/Radiogroup.test.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- 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 +35 -35
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
- 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 +11 -11
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +237 -235
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +1 -1
- package/dist/components/Timeline/Timeline.test.js +2 -2
- package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/{helpers-ChM6xtQG.js → helpers-BUwfVZhW.js} +15 -15
- package/dist/{helpers-ChM6xtQG.js.map → helpers-BUwfVZhW.js.map} +1 -1
- package/dist/{index-hwMTfLfH.js → index-Ck15_vKo.js} +2 -2
- package/dist/{index-hwMTfLfH.js.map → index-Ck15_vKo.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react.esm-DI5ilWeT.js → react.esm-CMg7bmSn.js} +372 -366
- package/dist/{react.esm-DI5ilWeT.js.map → react.esm-CMg7bmSn.js.map} +1 -1
- package/package.json +28 -28
- package/dist/Lexical.prod-CniF7zEE.js.map +0 -1
- package/dist/LexicalLink.prod-Du8ZoNsh.js +0 -259
- package/dist/LexicalLink.prod-Du8ZoNsh.js.map +0 -1
- package/dist/LexicalList.prod-BUcoZhe4.js.map +0 -1
- package/dist/LexicalTable.prod-CYafu_j9.js +0 -1555
- package/dist/LexicalTable.prod-CYafu_j9.js.map +0 -1
|
@@ -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-Ba6PaBhf.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-dmBn99rF.js";
|
|
3
|
-
import { r as t, s as l } from "../../react.esm-
|
|
3
|
+
import { r as t, s as l } from "../../react.esm-CMg7bmSn.js";
|
|
4
4
|
import { Label as r } from "./Label.js";
|
|
5
5
|
describe("Label", () => {
|
|
6
6
|
it("should render", () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
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-Ba6PaBhf.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-Ba6PaBhf.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-Ba6PaBhf.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-Ba6PaBhf.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";
|
|
@@ -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-Ba6PaBhf.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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-dmBn99rF.js";
|
|
3
|
-
import { r as l, s as t, f as s } from "../../react.esm-
|
|
3
|
+
import { r as l, s as t, f as s } from "../../react.esm-CMg7bmSn.js";
|
|
4
4
|
import { RadioGroup as a } from "./RadioGroup.js";
|
|
5
5
|
const i = [
|
|
6
6
|
{ id: "1", titleLabel: "Option 1", value: "option1" },
|
|
@@ -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-Ba6PaBhf.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
2
|
import { o as u } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
3
|
import { c as f } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { a as _, c as p,
|
|
4
|
+
import { a as _, c as p, P as h } from "../../../../Lexical.prod-CWyHQUEM.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";
|
|
@@ -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 {
|
|
4
|
+
import { aq as _, ar as y, as as C, at as k } from "../../../../Lexical.prod-CWyHQUEM.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-Ba6PaBhf.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-Ba6PaBhf.js";
|
|
4
|
+
import "../../../../../helpers-BUwfVZhW.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-BUwfVZhW.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
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 {
|
|
4
|
+
import { p as U, k as G, N as J } from "../../../../LexicalLink.prod-DbxnRszt.js";
|
|
5
5
|
import { useRef as a, useState as Q, useEffect as m } from "react";
|
|
6
|
-
import { W as Z, a as f,
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
6
|
+
import { W as Z, a as f, j as $, ap as tt, c as N, N as et, g as ot, X as rt } from "../../../../Lexical.prod-CWyHQUEM.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-Ba6PaBhf.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-BUwfVZhW.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,7 +22,7 @@ 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
|
|
25
|
+
import { setScrollableContainers as z, removeScrollableContainers as at } from "../../helpers.js";
|
|
26
26
|
import { s as h } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
27
27
|
import { useTranslation as ut } from "../../hooks/useTranslation.js";
|
|
28
28
|
import "../../Providers/LanguageProvider.js";
|
|
@@ -31,7 +31,7 @@ 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
37
|
if (U(n))
|
|
@@ -39,7 +39,7 @@ const mt = 200, z = (p) => {
|
|
|
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
45
|
if (U(n))
|
|
@@ -52,7 +52,7 @@ const mt = 200, z = (p) => {
|
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}, Wt = ({ parentScrollPosition: p }) => {
|
|
55
|
-
const n = ut(), [c] = Y(), { flyout:
|
|
55
|
+
const n = ut(), [c] = Y(), { flyout: j, showFlyout: _, hideFlyout: C, isVisible: u } = ct(), d = a(void 0), w = a(!1), y = a(""), g = a(""), [L, A] = 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;
|
|
@@ -61,7 +61,7 @@ const mt = 200, z = (p) => {
|
|
|
61
61
|
c.update(() => {
|
|
62
62
|
x.current && ot(x.current);
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, H = (e, t) => {
|
|
65
65
|
_({
|
|
66
66
|
position: t,
|
|
67
67
|
children: /* @__PURE__ */ k(
|
|
@@ -69,7 +69,7 @@ const mt = 200, z = (p) => {
|
|
|
69
69
|
{
|
|
70
70
|
url: e,
|
|
71
71
|
onSave: (o) => K(o, ""),
|
|
72
|
-
onDelete: () =>
|
|
72
|
+
onDelete: () => M(),
|
|
73
73
|
onClose: D,
|
|
74
74
|
ref: T
|
|
75
75
|
}
|
|
@@ -78,10 +78,10 @@ const mt = 200, z = (p) => {
|
|
|
78
78
|
}, D = () => {
|
|
79
79
|
var e;
|
|
80
80
|
(e = T.current) == null || e.clearForm(), C(), R();
|
|
81
|
-
},
|
|
81
|
+
}, F = () => {
|
|
82
82
|
var t;
|
|
83
83
|
const e = (t = S.current) == null ? void 0 : t.getBoundingClientRect();
|
|
84
|
-
!
|
|
84
|
+
!w.current && e && (b(), _({ position: { top: e.bottom, left: e.left }, ...V }), setTimeout(() => {
|
|
85
85
|
var o;
|
|
86
86
|
return (o = d.current) == null ? void 0 : o.setDefaults("", g.current);
|
|
87
87
|
}, 0));
|
|
@@ -90,25 +90,25 @@ const mt = 200, z = (p) => {
|
|
|
90
90
|
}, K = (e, t) => {
|
|
91
91
|
c.update(() => {
|
|
92
92
|
const o = f();
|
|
93
|
-
if (
|
|
94
|
-
const i = o.anchor.getNode(), s =
|
|
93
|
+
if (N(o)) {
|
|
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
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: E } = o;
|
|
102
|
+
o.insertText(t), l.offset -= t.length, E.offset = l.offset + t.length;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
J(it(e), { target: "_blank" });
|
|
106
106
|
}
|
|
107
107
|
v();
|
|
108
108
|
});
|
|
109
|
-
},
|
|
109
|
+
}, M = () => {
|
|
110
110
|
c.dispatchCommand(G, null), D();
|
|
111
|
-
},
|
|
111
|
+
}, V = {
|
|
112
112
|
children: /* @__PURE__ */ k(
|
|
113
113
|
nt,
|
|
114
114
|
{
|
|
@@ -121,14 +121,14 @@ const mt = 200, z = (p) => {
|
|
|
121
121
|
};
|
|
122
122
|
return m(() => {
|
|
123
123
|
var e, t;
|
|
124
|
-
u ? (
|
|
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));
|
|
125
125
|
}, [d, u]), m(() => {
|
|
126
126
|
const e = (r) => {
|
|
127
|
-
if (
|
|
128
|
-
const i =
|
|
127
|
+
if (N(r) && r.isCollapsed()) {
|
|
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 H(i.url, l), !0;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
return !1;
|
|
@@ -156,28 +156,28 @@ 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(), !N(r))
|
|
160
160
|
return !1;
|
|
161
|
-
const i =
|
|
162
|
-
|
|
161
|
+
const i = O(r.anchor.getNode()), s = (E = "", W = "") => {
|
|
162
|
+
F(), 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(E, 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) : (F(), !0);
|
|
171
171
|
}
|
|
172
172
|
return !1;
|
|
173
173
|
},
|
|
174
174
|
et
|
|
175
175
|
), t = c.registerUpdateListener(({ editorState: o }) => {
|
|
176
|
-
|
|
176
|
+
A(
|
|
177
177
|
o.read(() => {
|
|
178
178
|
const r = f();
|
|
179
|
-
if (b(),
|
|
180
|
-
const i = r.anchor.getNode(), s =
|
|
179
|
+
if (b(), N(r)) {
|
|
180
|
+
const i = r.anchor.getNode(), s = I(i);
|
|
181
181
|
if (s)
|
|
182
182
|
return {
|
|
183
183
|
active: !0,
|
|
@@ -204,19 +204,19 @@ const mt = 200, z = (p) => {
|
|
|
204
204
|
}, [p]), m(() => {
|
|
205
205
|
L.active || C();
|
|
206
206
|
}, [L]), m(() => {
|
|
207
|
-
const e = (o) => (
|
|
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
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: F,
|
|
220
220
|
title: n.links.linkTooltip,
|
|
221
221
|
className: q(
|
|
222
222
|
h["editor__toolbar-button"],
|
|
@@ -230,11 +230,11 @@ const mt = 200, z = (p) => {
|
|
|
230
230
|
children: /* @__PURE__ */ k(lt, { name: "Link", size: 20 })
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
|
|
233
|
+
j
|
|
234
234
|
] }) });
|
|
235
235
|
};
|
|
236
236
|
export {
|
|
237
237
|
Wt as LinkPlugin,
|
|
238
|
-
|
|
238
|
+
O as getLinkNodeTag
|
|
239
239
|
};
|
|
240
240
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { o as
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
import { useState as p, useEffect as
|
|
6
|
-
import { c as
|
|
7
|
-
import {
|
|
8
|
-
import { Icon as
|
|
2
|
+
import { o as I } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
+
import { C as N, y as P, _ as k, n as K, a as f, c as E } from "../../../../LexicalList.prod-pZmYrwOC.js";
|
|
4
|
+
import { _ as O } from "../../../../LexicalSelection.prod-DkvWlcln.js";
|
|
5
|
+
import { useState as p, useEffect as y } from "react";
|
|
6
|
+
import { c as w } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
+
import { ap as x, N as U, S as v, a as b, c as h, E as B, T } from "../../../../Lexical.prod-CWyHQUEM.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 z = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
|
-
},
|
|
15
|
-
const l =
|
|
14
|
+
}, Y = ["bullet", "number"], W = () => {
|
|
15
|
+
const l = j(), [e] = I(), [g, s] = p("paragraph"), [c, _] = p(!1), [m, L] = p(!1), S = () => {
|
|
16
16
|
e.update(() => {
|
|
17
17
|
const t = b();
|
|
18
|
-
h(t) &&
|
|
18
|
+
h(t) && O(t, () => 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
|
+
}, D = (t) => {
|
|
21
|
+
t === "number" && g !== "number" ? (e.dispatchCommand(P, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(k, void 0), s("bullet")) : (S(), s("paragraph"));
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return y(() => {
|
|
24
24
|
const t = e.registerCommand(
|
|
25
25
|
x,
|
|
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,
|
|
@@ -29,7 +29,7 @@ const H = {
|
|
|
29
29
|
return () => {
|
|
30
30
|
t();
|
|
31
31
|
};
|
|
32
|
-
}, [e, m, c]),
|
|
32
|
+
}, [e, m, c]), y(() => {
|
|
33
33
|
e.registerCommand(
|
|
34
34
|
v,
|
|
35
35
|
(r) => (r.preventDefault(), e.update(() => {
|
|
@@ -37,11 +37,11 @@ const H = {
|
|
|
37
37
|
if (!h(i))
|
|
38
38
|
return;
|
|
39
39
|
const o = i.anchor.getNode(), n = o.getParent();
|
|
40
|
-
if (!
|
|
40
|
+
if (!K(n))
|
|
41
41
|
return;
|
|
42
42
|
const a = n.getParent();
|
|
43
43
|
if (f(a)) {
|
|
44
|
-
const C =
|
|
44
|
+
const C = E(f(a) ? a.getListType() : "bullet");
|
|
45
45
|
n.append(C), C.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
@@ -55,14 +55,14 @@ const H = {
|
|
|
55
55
|
for (; o !== null; ) {
|
|
56
56
|
if (f(o)) {
|
|
57
57
|
const a = o.getTag();
|
|
58
|
-
|
|
58
|
+
_(a === "ul"), L(a === "ol"), a === "ul" && s("bullet"), a === "ol" && s("number");
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
const n = o.getParent();
|
|
62
62
|
if (n === null) break;
|
|
63
63
|
o = n;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
_(!1), L(!1), s("paragraph");
|
|
66
66
|
}
|
|
67
67
|
return !1;
|
|
68
68
|
});
|
|
@@ -70,12 +70,12 @@ const H = {
|
|
|
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: Y.map((t) => /* @__PURE__ */ d(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
onClick: () =>
|
|
76
|
+
onClick: () => D(t),
|
|
77
77
|
title: l.format[`${t}Tooltip`],
|
|
78
|
-
className:
|
|
78
|
+
className: w(
|
|
79
79
|
u["editor__toolbar-button"],
|
|
80
80
|
u[`editor__toolbar-button--${t}`],
|
|
81
81
|
t === "bullet" && c && u["editor__toolbar-button--active"],
|
|
@@ -84,12 +84,12 @@ const H = {
|
|
|
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: z[t], size: 24 })
|
|
88
88
|
},
|
|
89
89
|
t
|
|
90
90
|
)) });
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
W as ListPlugin
|
|
94
94
|
};
|
|
95
95
|
//# sourceMappingURL=ListPlugin.js.map
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { o as m } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
|
|
2
2
|
import { useEffect as c } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { L as i } from "../../../../LexicalUtils.prod-
|
|
5
|
-
import { D as
|
|
3
|
+
import { ae as f, H as p, a as u } from "../../../../Lexical.prod-CWyHQUEM.js";
|
|
4
|
+
import { L as i } from "../../../../LexicalUtils.prod-Dny9Fu94.js";
|
|
5
|
+
import { D as d } from "../../../../LexicalClipboard.prod-DbqSWANZ.js";
|
|
6
6
|
import { d as D } from "../../../../index-B3c5pcHk.js";
|
|
7
|
-
const
|
|
8
|
-
const [
|
|
9
|
-
t.preventDefault(),
|
|
10
|
-
const r =
|
|
7
|
+
const L = () => {
|
|
8
|
+
const [e] = m(), l = (t) => {
|
|
9
|
+
t.preventDefault(), e.update(() => {
|
|
10
|
+
const r = u(), 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
17
|
return c(() => {
|
|
18
|
-
const t =
|
|
18
|
+
const t = e.registerCommand(
|
|
19
19
|
f,
|
|
20
20
|
(r) => r instanceof ClipboardEvent ? (l(r), !0) : !1,
|
|
21
|
-
|
|
21
|
+
p
|
|
22
22
|
);
|
|
23
23
|
return () => {
|
|
24
24
|
t();
|
|
25
25
|
};
|
|
26
|
-
}, [
|
|
26
|
+
}, [e]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
L 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-Ba6PaBhf.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-C6duSS2P.js";
|
|
5
|
+
import "../../../../Lexical.prod-CWyHQUEM.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as F } from "../../../../TablePlugin-
|
|
7
|
+
import { T as F } from "../../../../TablePlugin-Ba6PaBhf.js";
|
|
8
8
|
import "./helpers.js";
|
|
9
9
|
import "../../hooks/useFlyout.js";
|
|
10
10
|
import "../../../Icon/Icon.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { z as d, R as h, B as m, Z as S, H as w, P as E, x as C, K as p, W as I } from "../../../../LexicalTable.prod-C6duSS2P.js";
|
|
2
|
+
import { T as u } from "../../../../Lexical.prod-CWyHQUEM.js";
|
|
3
3
|
const b = 100, P = (e, n) => {
|
|
4
|
-
const t =
|
|
4
|
+
const t = I(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++) {
|
|
@@ -17,7 +17,7 @@ const b = 100, P = (e, n) => {
|
|
|
17
17
|
const r = t.getFirstDescendant();
|
|
18
18
|
r && r.select();
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, v = (e) => {
|
|
21
21
|
d(e).remove();
|
|
22
22
|
}, B = (e, n) => {
|
|
23
23
|
const t = p(), o = w(e), r = o.getChildrenSize();
|
|
@@ -32,15 +32,15 @@ const b = 100, P = (e, n) => {
|
|
|
32
32
|
const t = w(e);
|
|
33
33
|
if (!h(e))
|
|
34
34
|
throw new Error("Selected node is not a TableCellNode");
|
|
35
|
-
const o =
|
|
35
|
+
const o = E(e), r = t.getChildren().length, l = d(e);
|
|
36
36
|
let s = m(e);
|
|
37
|
-
const c = l.getChildren(),
|
|
38
|
-
for (let i = 0; i <
|
|
37
|
+
const c = l.getChildren(), R = c.length;
|
|
38
|
+
for (let i = 0; i < R; i++) {
|
|
39
39
|
const a = C(0);
|
|
40
40
|
a.append(u());
|
|
41
41
|
const f = c[i].getChildren()[s];
|
|
42
|
-
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((
|
|
43
|
-
|
|
42
|
+
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((T) => {
|
|
43
|
+
T.getChildren().forEach((x) => {
|
|
44
44
|
x.setWidth(b / r);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
@@ -53,13 +53,13 @@ const b = 100, P = (e, n) => {
|
|
|
53
53
|
if (!h(e))
|
|
54
54
|
throw new Error("Selected node is not a TableCellNode");
|
|
55
55
|
const n = d(e), t = ((r = n.getFirstChild()) == null ? void 0 : r.getChildrenSize()) || 0, o = m(e);
|
|
56
|
-
t === 1 ?
|
|
56
|
+
t === 1 ? v(e) : S(n, o);
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
59
|
P as createTable,
|
|
60
60
|
F as deleteColumn,
|
|
61
61
|
A as deleteRow,
|
|
62
|
-
|
|
62
|
+
v as deleteTable,
|
|
63
63
|
O as insertColumn,
|
|
64
64
|
B as insertRow
|
|
65
65
|
};
|