@uva-glass/component-library 1.64.2 → 1.64.4
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-DSqOWcE1.js → Lexical.prod-RJB8n7sC.js} +24 -24
- package/dist/{Lexical.prod-DSqOWcE1.js.map → Lexical.prod-RJB8n7sC.js.map} +1 -1
- package/dist/LexicalClipboard.prod-DB_B0Sr6.js +259 -0
- package/dist/LexicalClipboard.prod-DB_B0Sr6.js.map +1 -0
- package/dist/{LexicalLink.prod-DWrTW8iE.js → LexicalLink.prod-BvJo1BD4.js} +3 -3
- package/dist/{LexicalLink.prod-DWrTW8iE.js.map → LexicalLink.prod-BvJo1BD4.js.map} +1 -1
- package/dist/{LexicalList.prod-Cg8npow-.js → LexicalList.prod-igdv32dp.js} +6 -4
- package/dist/{LexicalList.prod-Cg8npow-.js.map → LexicalList.prod-igdv32dp.js.map} +1 -1
- package/dist/LexicalSelection.prod-CL_DfdL6.js +86 -0
- package/dist/LexicalSelection.prod-CL_DfdL6.js.map +1 -0
- package/dist/{LexicalTable.prod-DEA4KRzX.js → LexicalTable.prod-CfgKmbyy.js} +4 -4
- package/dist/{LexicalTable.prod-DEA4KRzX.js.map → LexicalTable.prod-CfgKmbyy.js.map} +1 -1
- package/dist/{LexicalUtils.prod-CicP_X7u.js → LexicalUtils.prod-mYf1cd8X.js} +2 -2
- package/dist/{LexicalUtils.prod-CicP_X7u.js.map → LexicalUtils.prod-mYf1cd8X.js.map} +1 -1
- package/dist/RteEditor.module-oFMKEW6f.js +41 -0
- package/dist/RteEditor.module-oFMKEW6f.js.map +1 -0
- package/dist/{TablePlugin-aDKhmuu7.js → TablePlugin-BVkwu1Gt.js} +5 -5
- package/dist/{TablePlugin-aDKhmuu7.js.map → TablePlugin-BVkwu1Gt.js.map} +1 -1
- package/dist/assets/AccordionCard.css +1 -1
- package/dist/assets/RteEditor.css +1 -1
- package/dist/components/AccordionCard/AccordionCard.js +26 -26
- package/dist/components/AccordionCard/AccordionCard.stories.js +4 -4
- package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
- 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/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/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 +2 -2
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +3 -3
- 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 +14 -14
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +66 -43
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +12 -11
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/UvaTheme.d.ts +6 -2
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js +20 -4
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/{helpers-BuSJOvGF.js → helpers-BKqr9jXh.js} +4 -4
- package/dist/{helpers-BuSJOvGF.js.map → helpers-BKqr9jXh.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +8 -8
- package/dist/LexicalClipboard.prod-DP0us-xV.js +0 -311
- package/dist/LexicalClipboard.prod-DP0us-xV.js.map +0 -1
- package/dist/RteEditor.module-BeUn7GiA.js +0 -32
- package/dist/RteEditor.module-BeUn7GiA.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, Fragment as w, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as C, useState as u, useImperativeHandle as N, useLayoutEffect as L } from "react";
|
|
3
|
-
import { e as g } from "../../../../../helpers-
|
|
3
|
+
import { e as g } from "../../../../../helpers-BKqr9jXh.js";
|
|
4
4
|
import { Icon as s } from "../../../../Icon/Icon.js";
|
|
5
5
|
import { useTranslation as S } from "../../../hooks/useTranslation.js";
|
|
6
6
|
import { Button as _ } from "../../../../Buttons/Button.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as h, jsxs as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
3
|
-
import { c as
|
|
4
|
-
import { g as U, m as
|
|
5
|
-
import { useRef as a, useState as
|
|
6
|
-
import { B as
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
2
|
+
import { u as q } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
+
import { c as G } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { g as U, m as J, U as Q } from "../../../../LexicalLink.prod-BvJo1BD4.js";
|
|
5
|
+
import { useRef as a, useState as X, useEffect as d } from "react";
|
|
6
|
+
import { B as Z, M as f, a4 as $, a2 as tt, v as b, a3 as et, F as rt, c as ot } from "../../../../Lexical.prod-RJB8n7sC.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-BVkwu1Gt.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-BKqr9jXh.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 "../../../Input/Input.js";
|
|
|
22
22
|
import "../../../InputField/InputField.js";
|
|
23
23
|
import "react-router-dom";
|
|
24
24
|
import { setScrollableContainers as A, removeScrollableContainers as at } from "../../helpers.js";
|
|
25
|
-
import { s as y } from "../../../../RteEditor.module-
|
|
25
|
+
import { s as y } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
26
26
|
import { useTranslation as ut } from "../../hooks/useTranslation.js";
|
|
27
27
|
import "../../Providers/LanguageProvider.js";
|
|
28
28
|
import "../../../../index-DPQ9bZx5.js";
|
|
@@ -51,7 +51,7 @@ const mt = 200, B = (p) => {
|
|
|
51
51
|
}
|
|
52
52
|
return !1;
|
|
53
53
|
}, jt = ({ parentScrollPosition: p }) => {
|
|
54
|
-
const n = ut(), [c] =
|
|
54
|
+
const n = ut(), [c] = q(), { flyout: M, showFlyout: _, hideFlyout: g, isVisible: u } = ct(), m = a(), N = a(!1), C = a(""), k = a(""), [v, O] = X({ active: !1, url: "", linktext: "" }), P = a(u), x = a(null), R = a(null), T = a(), w = () => {
|
|
55
55
|
c.update(() => {
|
|
56
56
|
const r = f();
|
|
57
57
|
x.current = r;
|
|
@@ -101,12 +101,12 @@ const mt = 200, B = (p) => {
|
|
|
101
101
|
e.insertText(t), l.offset -= t.length, F.offset = l.offset + t.length;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
J(it(r), { target: "_blank" });
|
|
105
105
|
}
|
|
106
106
|
L();
|
|
107
107
|
});
|
|
108
108
|
}, V = () => {
|
|
109
|
-
c.dispatchCommand(
|
|
109
|
+
c.dispatchCommand(Q, null), H();
|
|
110
110
|
}, j = {
|
|
111
111
|
children: /* @__PURE__ */ h(
|
|
112
112
|
nt,
|
|
@@ -133,14 +133,14 @@ const mt = 200, B = (p) => {
|
|
|
133
133
|
}
|
|
134
134
|
return !1;
|
|
135
135
|
}, t = c.registerCommand(
|
|
136
|
-
|
|
136
|
+
Z,
|
|
137
137
|
() => {
|
|
138
138
|
const o = f();
|
|
139
139
|
return k.current = (o == null ? void 0 : o.getTextContent()) ?? "", r(o), !1;
|
|
140
140
|
},
|
|
141
141
|
0
|
|
142
142
|
), e = c.registerCommand(
|
|
143
|
-
|
|
143
|
+
$,
|
|
144
144
|
(o) => {
|
|
145
145
|
const i = f();
|
|
146
146
|
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), r(i), !1;
|
|
@@ -216,7 +216,7 @@ const mt = 200, B = (p) => {
|
|
|
216
216
|
{
|
|
217
217
|
onClick: E,
|
|
218
218
|
title: n.links.linkTooltip,
|
|
219
|
-
className:
|
|
219
|
+
className: G(
|
|
220
220
|
y["editor__toolbar-button"],
|
|
221
221
|
y["editor__toolbar-button--link"],
|
|
222
222
|
v.active && y["editor__toolbar-button--active"]
|
|
@@ -1,45 +1,68 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { u as
|
|
3
|
-
import { Y as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { u as K } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
+
import { Y as N, Q as v, G as D, V as S, H as f, q as y } from "../../../../LexicalList.prod-igdv32dp.js";
|
|
4
|
+
import { b as O } from "../../../../LexicalSelection.prod-CL_DfdL6.js";
|
|
5
|
+
import { useState as p, useEffect as I } from "react";
|
|
6
|
+
import { c as x } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
+
import { a2 as U, a3 as w, N as B, M as b, v as h, I as E, D as M } from "../../../../Lexical.prod-RJB8n7sC.js";
|
|
8
|
+
import { Icon as Y } from "../../../Icon/Icon.js";
|
|
9
|
+
import { s as l } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
10
|
+
import { useTranslation as $ } from "../../hooks/useTranslation.js";
|
|
11
|
+
const j = {
|
|
11
12
|
bullet: "BulletList",
|
|
12
13
|
number: "NumberedList"
|
|
13
|
-
},
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
}, q = ["bullet", "number"], W = () => {
|
|
15
|
+
const u = $(), [e] = K(), [g, s] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1), P = () => {
|
|
16
|
+
e.update(() => {
|
|
17
|
+
const t = b();
|
|
18
|
+
h(t) && O(t, () => M());
|
|
19
|
+
});
|
|
20
|
+
}, k = (t) => {
|
|
21
|
+
t === "number" && g !== "number" ? (e.dispatchCommand(v, void 0), s("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(D, void 0), s("bullet")) : (P(), s("paragraph"));
|
|
16
22
|
};
|
|
17
|
-
return
|
|
18
|
-
const t =
|
|
19
|
-
|
|
20
|
-
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ?
|
|
21
|
-
|
|
23
|
+
return I(() => {
|
|
24
|
+
const t = e.registerCommand(
|
|
25
|
+
U,
|
|
26
|
+
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(N, void 0) : e.dispatchCommand(v, void 0), !0) : r.ctrlKey && r.shiftKey && r.code === "Digit8" ? (r.preventDefault(), c ? e.dispatchCommand(N, void 0) : e.dispatchCommand(D, void 0), !0) : !1,
|
|
27
|
+
w
|
|
22
28
|
);
|
|
23
29
|
return () => {
|
|
24
30
|
t();
|
|
25
31
|
};
|
|
26
|
-
}, [
|
|
27
|
-
|
|
32
|
+
}, [e, m, c]), I(() => {
|
|
33
|
+
e.registerCommand(
|
|
34
|
+
B,
|
|
35
|
+
(r) => (r.preventDefault(), e.update(() => {
|
|
36
|
+
const n = b();
|
|
37
|
+
if (!h(n))
|
|
38
|
+
return;
|
|
39
|
+
const o = n.anchor.getNode(), i = o.getParent();
|
|
40
|
+
if (!S(i))
|
|
41
|
+
return;
|
|
42
|
+
const a = i.getParent();
|
|
43
|
+
if (f(a)) {
|
|
44
|
+
const C = y(f(a) ? a.getListType() : "bullet");
|
|
45
|
+
i.append(C), C.append(o);
|
|
46
|
+
}
|
|
47
|
+
}), !0),
|
|
48
|
+
E
|
|
49
|
+
);
|
|
50
|
+
const t = e.registerUpdateListener(({ editorState: r }) => {
|
|
28
51
|
r.read(() => {
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
let
|
|
32
|
-
for (;
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
|
|
52
|
+
const n = b();
|
|
53
|
+
if (h(n)) {
|
|
54
|
+
let o = n.anchor.getNode();
|
|
55
|
+
for (; o !== null; ) {
|
|
56
|
+
if (f(o)) {
|
|
57
|
+
const a = o.getTag();
|
|
58
|
+
L(a === "ul"), _(a === "ol"), a === "ul" && s("bullet"), a === "ol" && s("number");
|
|
36
59
|
return;
|
|
37
60
|
}
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
|
|
61
|
+
const i = o.getParent();
|
|
62
|
+
if (i === null) break;
|
|
63
|
+
o = i;
|
|
41
64
|
}
|
|
42
|
-
|
|
65
|
+
L(!1), _(!1), s("paragraph");
|
|
43
66
|
}
|
|
44
67
|
return !1;
|
|
45
68
|
});
|
|
@@ -47,26 +70,26 @@ const P = {
|
|
|
47
70
|
return () => {
|
|
48
71
|
t();
|
|
49
72
|
};
|
|
50
|
-
}, [
|
|
73
|
+
}, [e]), /* @__PURE__ */ d("div", { className: l["editor__toolbar-button-group"], children: q.map((t) => /* @__PURE__ */ d(
|
|
51
74
|
"button",
|
|
52
75
|
{
|
|
53
|
-
onClick: () =>
|
|
54
|
-
title:
|
|
55
|
-
className:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
t === "bullet" &&
|
|
59
|
-
t === "number" && m &&
|
|
76
|
+
onClick: () => k(t),
|
|
77
|
+
title: u.format[`${t}Tooltip`],
|
|
78
|
+
className: x(
|
|
79
|
+
l["editor__toolbar-button"],
|
|
80
|
+
l[`editor__toolbar-button--${t}`],
|
|
81
|
+
t === "bullet" && c && l["editor__toolbar-button--active"],
|
|
82
|
+
t === "number" && m && l["editor__toolbar-button--active"]
|
|
60
83
|
),
|
|
61
|
-
"aria-label":
|
|
62
|
-
"aria-keyshortcuts":
|
|
84
|
+
"aria-label": u.aria.labels[t],
|
|
85
|
+
"aria-keyshortcuts": u.aria.keyshortcuts[t],
|
|
63
86
|
type: "button",
|
|
64
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ d(Y, { name: j[t], size: 24 })
|
|
65
88
|
},
|
|
66
89
|
t
|
|
67
90
|
)) });
|
|
68
91
|
};
|
|
69
92
|
export {
|
|
70
|
-
|
|
93
|
+
W as ListPlugin
|
|
71
94
|
};
|
|
72
95
|
//# sourceMappingURL=ListPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/ListPlugin/ListPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport {\n $isListNode,\n INSERT_ORDERED_LIST_COMMAND,\n INSERT_UNORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from '@lexical/list';\nimport { useEffect, useState } from 'react';\nimport clsx from 'clsx';\nimport {
|
|
1
|
+
{"version":3,"file":"ListPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/ListPlugin/ListPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport {\n $createListNode,\n $isListItemNode,\n $isListNode,\n INSERT_ORDERED_LIST_COMMAND,\n INSERT_UNORDERED_LIST_COMMAND,\n REMOVE_LIST_COMMAND,\n} from '@lexical/list';\nimport { $setBlocksType } from '@lexical/selection';\nimport { useEffect, useState } from 'react';\nimport clsx from 'clsx';\nimport {\n $createParagraphNode,\n $getSelection,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n COMMAND_PRIORITY_LOW,\n KEY_DOWN_COMMAND,\n KEY_TAB_COMMAND,\n} from 'lexical';\n\nimport type { ElementNode, RangeSelection } from 'lexical';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\ntype ListTypesType = 'bullet' | 'number' | 'paragraph';\nconst LIST_TYPE_ICONS = {\n bullet: 'BulletList',\n number: 'NumberedList',\n};\n\nconst ListTypes = ['bullet', 'number'];\n\nexport const ListPlugin = () => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const [blockType, setBlockType] = useState<ListTypesType>('paragraph');\n const [isUList, setIsUList] = useState<boolean>(false);\n const [isOList, setIsOList] = useState<boolean>(false);\n\n const formatParagraph = () => {\n editor.update(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n $setBlocksType(selection, () => $createParagraphNode());\n }\n });\n };\n\n const formatList = (listType: ListTypesType): void => {\n if (listType === 'number' && blockType !== 'number') {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);\n setBlockType('number');\n } else if (listType === 'bullet' && blockType !== 'bullet') {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);\n setBlockType('bullet');\n } else {\n formatParagraph();\n setBlockType('paragraph');\n }\n };\n\n useEffect(() => {\n const removeKeyboardShortcut = editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event: KeyboardEvent) => {\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit7') {\n event.preventDefault();\n if (isOList) {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n } else {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);\n }\n return true;\n }\n if (event.ctrlKey && event.shiftKey && event.code === 'Digit8') {\n event.preventDefault();\n if (isUList) {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n } else {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);\n }\n return true;\n }\n return false;\n },\n COMMAND_PRIORITY_EDITOR\n );\n\n return () => {\n removeKeyboardShortcut();\n };\n }, [editor, isOList, isUList]);\n\n useEffect(() => {\n editor.registerCommand(\n KEY_TAB_COMMAND,\n (event) => {\n event.preventDefault();\n editor.update(() => {\n const selection = $getSelection() as RangeSelection;\n if (!$isRangeSelection(selection)) {\n return;\n }\n\n const currentNode = selection.anchor.getNode();\n const parent = currentNode.getParent();\n if (!$isListItemNode(parent)) {\n return;\n }\n\n const listParent = parent.getParent();\n if ($isListNode(listParent)) {\n const newList = $createListNode($isListNode(listParent) ? listParent.getListType() : 'bullet');\n parent.append(newList);\n newList.append(currentNode);\n }\n });\n return true;\n },\n COMMAND_PRIORITY_LOW\n );\n\n const removeStatusListener = editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection();\n if ($isRangeSelection(selection)) {\n let anchorNode = selection.anchor.getNode() as ElementNode;\n while (anchorNode !== null) {\n if ($isListNode(anchorNode)) {\n const tag = anchorNode.getTag();\n setIsUList(tag === 'ul');\n setIsOList(tag === 'ol');\n if (tag === 'ul') {\n setBlockType('bullet');\n }\n if (tag === 'ol') {\n setBlockType('number');\n }\n return;\n }\n const parentNode = anchorNode.getParent();\n if (parentNode === null) break;\n anchorNode = parentNode;\n }\n setIsUList(false);\n setIsOList(false);\n setBlockType('paragraph');\n }\n return false;\n });\n });\n\n return () => {\n removeStatusListener();\n };\n }, [editor]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n {ListTypes.map((listType) => (\n <button\n onClick={() => formatList(listType as ListTypesType)}\n key={listType}\n title={t.format[`${listType}Tooltip` as keyof typeof t.format]}\n className={clsx(\n styles['editor__toolbar-button'],\n styles[`editor__toolbar-button--${listType}`],\n listType === 'bullet' && isUList && styles['editor__toolbar-button--active'],\n listType === 'number' && isOList && styles['editor__toolbar-button--active']\n )}\n aria-label={t.aria.labels[listType as keyof typeof t.aria.labels]}\n aria-keyshortcuts={t.aria.keyshortcuts[listType as keyof typeof t.aria.keyshortcuts]}\n type=\"button\"\n >\n <Icon name={LIST_TYPE_ICONS[listType as keyof typeof Icon]} size={24} />\n </button>\n ))}\n </div>\n );\n};\n"],"names":["LIST_TYPE_ICONS","ListTypes","ListPlugin","t","useTranslation","editor","useLexicalComposerContext","blockType","setBlockType","useState","isUList","setIsUList","isOList","setIsOList","formatParagraph","selection","$getSelection","$isRangeSelection","$setBlocksType","$createParagraphNode","formatList","listType","INSERT_ORDERED_LIST_COMMAND","INSERT_UNORDERED_LIST_COMMAND","useEffect","removeKeyboardShortcut","KEY_DOWN_COMMAND","event","REMOVE_LIST_COMMAND","COMMAND_PRIORITY_EDITOR","KEY_TAB_COMMAND","currentNode","parent","$isListItemNode","listParent","$isListNode","newList","$createListNode","COMMAND_PRIORITY_LOW","removeStatusListener","editorState","anchorNode","tag","parentNode","jsx","styles","clsx","Icon"],"mappings":";;;;;;;;;;AA6BA,MAAMA,IAAkB;AAAA,EACtB,QAAQ;AAAA,EACR,QAAQ;AACV,GAEMC,IAAY,CAAC,UAAU,QAAQ,GAExBC,IAAa,MAAM;AAC9B,QAAMC,IAAIC,KACJ,CAACC,CAAM,IAAIC,KACX,CAACC,GAAWC,CAAY,IAAIC,EAAwB,WAAW,GAC/D,CAACC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,SAAkC;AAAA,MAC7D,WAAWyB;AAAA,QACTD,EAAO,wBAAwB;AAAA,QAC/BA,EAAO,2BAA2BxB,CAAQ,EAAE;AAAA,QAC5CA,MAAa,YAAYX,KAAWmC,EAAO,gCAAgC;AAAA,QAC3ExB,MAAa,YAAYT,KAAWiC,EAAO,gCAAgC;AAAA,MAC7E;AAAA,MACA,cAAY1C,EAAE,KAAK,OAAOkB,CAAsC;AAAA,MAChE,qBAAmBlB,EAAE,KAAK,aAAakB,CAA4C;AAAA,MACnF,MAAK;AAAA,MAEL,4BAAC0B,GAAK,EAAA,MAAM/C,EAAgBqB,CAA6B,GAAG,MAAM,IAAI;AAAA,IAAA;AAAA,IAZjEA;AAAA,EAcR,CAAA,EACH,CAAA;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { u as m } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
2
2
|
import { useEffect as c } from "react";
|
|
3
|
-
import { Y as f, z as u, M as d } from "../../../../Lexical.prod-
|
|
4
|
-
import { i } from "../../../../LexicalUtils.prod-
|
|
5
|
-
import { _ as p } from "../../../../LexicalClipboard.prod-
|
|
3
|
+
import { Y as f, z as u, M as d } from "../../../../Lexical.prod-RJB8n7sC.js";
|
|
4
|
+
import { i } from "../../../../LexicalUtils.prod-mYf1cd8X.js";
|
|
5
|
+
import { _ as p } from "../../../../LexicalClipboard.prod-DB_B0Sr6.js";
|
|
6
6
|
import { d as D } from "../../../../index-DPQ9bZx5.js";
|
|
7
7
|
const P = () => {
|
|
8
8
|
const [e] = m(), l = (t) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { b as z } from "../../../../TablePlugin-
|
|
3
|
+
import { b as z } from "../../../../TablePlugin-BVkwu1Gt.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-Dyvim1tK.js";
|
|
3
3
|
import "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import "../../../../LexicalTable.prod-
|
|
5
|
-
import "../../../../Lexical.prod-
|
|
4
|
+
import "../../../../LexicalTable.prod-CfgKmbyy.js";
|
|
5
|
+
import "../../../../Lexical.prod-RJB8n7sC.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as E } from "../../../../TablePlugin-
|
|
7
|
+
import { T as E } from "../../../../TablePlugin-BVkwu1Gt.js";
|
|
8
8
|
import "./helpers.js";
|
|
9
9
|
import "../../hooks/useFlyout.js";
|
|
10
10
|
import "../../../Icon/Icon.js";
|
|
@@ -20,7 +20,7 @@ import "../../../IconButton/IconButton.js";
|
|
|
20
20
|
import "../../../Input/Input.js";
|
|
21
21
|
import "../../../InputField/InputField.js";
|
|
22
22
|
import "react-router-dom";
|
|
23
|
-
import "../../../../RteEditor.module-
|
|
23
|
+
import "../../../../RteEditor.module-oFMKEW6f.js";
|
|
24
24
|
import "../../hooks/useTranslation.js";
|
|
25
25
|
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
26
26
|
import "../../Providers/LanguageProvider.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as S, a as h, n as d, f as C, p as w, o as m, m as D, C as p, T as E } from "../../../../LexicalTable.prod-
|
|
2
|
-
import { D as u } from "../../../../Lexical.prod-
|
|
1
|
+
import { d as S, a as h, n as d, f as C, p as w, o as m, m as D, C as p, T as E } from "../../../../LexicalTable.prod-CfgKmbyy.js";
|
|
2
|
+
import { D as u } from "../../../../Lexical.prod-RJB8n7sC.js";
|
|
3
3
|
const b = 100, O = (e, n) => {
|
|
4
4
|
const t = S(0, 0, !1);
|
|
5
5
|
for (let o = 0; o < e; o++) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as P, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { u as y } from "../../../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
-
import { M as g, v as h, F as C } from "../../../../Lexical.prod-
|
|
3
|
+
import { M as g, v as h, F as C } from "../../../../Lexical.prod-RJB8n7sC.js";
|
|
4
4
|
import { useState as E, useRef as L, useCallback as T, useEffect as m } from "react";
|
|
5
|
-
import { g as b } from "../../../../LexicalTable.prod-
|
|
5
|
+
import { g as b } from "../../../../LexicalTable.prod-CfgKmbyy.js";
|
|
6
6
|
import { BlockFormatPlugin as N } from "../BlockFormatPlugin/BlockFormatPlugin.js";
|
|
7
7
|
import { ListPlugin as k } from "../ListPlugin/ListPlugin.js";
|
|
8
8
|
import { LinkPlugin as x } from "../LinkPlugin/LinkPlugin.js";
|
|
9
9
|
import { HistoryPlugin as B } from "../HistoryPlugin/HistoryPlugin.js";
|
|
10
|
-
import { T as S } from "../../../../TablePlugin-
|
|
10
|
+
import { T as S } from "../../../../TablePlugin-BVkwu1Gt.js";
|
|
11
11
|
import { TableCellContextMenu as z } from "../TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
12
|
-
import { s as A } from "../../../../RteEditor.module-
|
|
12
|
+
import { s as A } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
13
13
|
import { setScrollableContainers as v, removeScrollableContainers as K } from "../../helpers.js";
|
|
14
14
|
const Q = ({ editorScrollPosition: d }) => {
|
|
15
15
|
const [t] = y(), [i, s] = E(null), u = L(null), f = T(() => {
|
|
@@ -3,7 +3,7 @@ import { BlockFormatPlugin as l } from "./BlockFormatPlugin/BlockFormatPlugin.js
|
|
|
3
3
|
import { ListPlugin as n } from "./ListPlugin/ListPlugin.js";
|
|
4
4
|
import { LinkPlugin as m, getLinkNodeTag as x } from "./LinkPlugin/LinkPlugin.js";
|
|
5
5
|
import { HistoryPlugin as p } from "./HistoryPlugin/HistoryPlugin.js";
|
|
6
|
-
import { T as a } from "../../../TablePlugin-
|
|
6
|
+
import { T as a } from "../../../TablePlugin-BVkwu1Gt.js";
|
|
7
7
|
import { TableCellContextMenu as T } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
8
8
|
export {
|
|
9
9
|
l as BlockFormatPlugin,
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsx as y, jsxs as K, Fragment as Oe } from "react/jsx-runtime";
|
|
2
2
|
import { l as Ye, o as Ze, u as P } from "../../LexicalComposerContext.prod-Dyvim1tK.js";
|
|
3
|
-
import { am as Fe, O as z, D as me, M as v, T as q, x as J, L as Ge, b as T, v as C, Y as Ke, an as Qe,
|
|
3
|
+
import { am as Fe, O as z, D as me, M as v, T as q, x as J, L as Ge, b as T, v as C, Y as Ke, an as Qe, a3 as p, n as et, al as F, ai as tt, ao as nt, ap as rt, aq as ot, C as ie, ar as it, as as st, K as at, P as lt, F as ct, i as dt, at as ut, au as ge, o as he, w as ft, s as se, l as mt, a1 as Ae, av as ve, p as pt, h as gt, e as ht, a0 as Ce, g as vt, aw as Ct, ax as yt, ay as wt, ag as Et, r as bt, q as $t, az as St, y as _t, k as xt, j as kt, a4 as Lt, t as Nt, I as ye, aA as Dt, a as Tt, a6 as Y, a5 as Z, aB as Pt, aC as Rt, a8 as Mt, a7 as It, H as Ot } from "../../Lexical.prod-RJB8n7sC.js";
|
|
4
4
|
import * as ae from "react";
|
|
5
5
|
import { useMemo as W, useLayoutEffect as j, useEffect as x, useRef as ze, useState as I, Suspense as Ft, forwardRef as Be, useCallback as Kt } from "react";
|
|
6
|
-
import { L as B, i as A, e as At, t as pe, r as zt, u as Bt } from "../../LexicalUtils.prod-
|
|
6
|
+
import { L as B, i as A, e as At, t as pe, r as zt, u as Bt } from "../../LexicalUtils.prod-mYf1cd8X.js";
|
|
7
7
|
import { r as we } from "../../index-DsprzSCj.js";
|
|
8
|
-
import { _ as Ee, O as be,
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { _ as Ee, O as be, h as Ut, m as jt } from "../../LexicalClipboard.prod-DB_B0Sr6.js";
|
|
9
|
+
import { L as $e, $ as Se } from "../../LexicalSelection.prod-CL_DfdL6.js";
|
|
10
|
+
import { J as Ue, D as je, Z as Ht } from "../../LexicalList.prod-igdv32dp.js";
|
|
11
|
+
import { a as He, U as _e, m as le, g as qt, f as Jt } from "../../LexicalLink.prod-BvJo1BD4.js";
|
|
12
|
+
import { u as re, e as oe, c as qe, K as Wt, n as xe, r as Vt, d as Xt, b as Yt, k as Zt, F as Gt, h as ke, o as Qt, U as en } from "../../LexicalTable.prod-CfgKmbyy.js";
|
|
13
|
+
import { a as tn, F as nn, M as rn } from "../../helpers-BKqr9jXh.js";
|
|
13
14
|
import { c as on } from "../../clsx-OuTLNxxd.js";
|
|
14
15
|
import { exportMap as sn, isStartingWithHtmlTag as an, mergeBoldStrongTags as ln } from "./helpers.js";
|
|
15
|
-
import { s as M } from "../../RteEditor.module-
|
|
16
|
+
import { s as M } from "../../RteEditor.module-oFMKEW6f.js";
|
|
16
17
|
import { ToolBarPlugin as cn } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
|
|
17
18
|
import { useTranslation as dn } from "./hooks/useTranslation.js";
|
|
18
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-BVkwu1Gt.js";
|
|
19
20
|
import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
20
21
|
import "./hooks/components/Flyout.js";
|
|
21
22
|
import "../Buttons/Button.js";
|
|
@@ -842,7 +843,7 @@ const Xe = 200, or = ({
|
|
|
842
843
|
] }) }),
|
|
843
844
|
s !== "" && /* @__PURE__ */ y(un, { level: "error", feedback: s })
|
|
844
845
|
] });
|
|
845
|
-
},
|
|
846
|
+
}, Jr = ({
|
|
846
847
|
currentLanguage: t = "NL",
|
|
847
848
|
initialValue: e = "",
|
|
848
849
|
placeholder: n = "",
|
|
@@ -868,6 +869,6 @@ const Xe = 200, or = ({
|
|
|
868
869
|
) });
|
|
869
870
|
export {
|
|
870
871
|
or as Rte,
|
|
871
|
-
|
|
872
|
+
Jr as RteEditor
|
|
872
873
|
};
|
|
873
874
|
//# sourceMappingURL=RteEditor.js.map
|