@uva-glass/component-library 3.53.0 → 3.53.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-DH2XfwvA.js → Lexical.prod-CNQPQ6W-.js} +1427 -1409
- package/dist/Lexical.prod-CNQPQ6W-.js.map +1 -0
- package/dist/{LexicalClipboard.prod-DTuNvXAS.js → LexicalClipboard.prod-BdghxvkJ.js} +86 -86
- package/dist/{LexicalClipboard.prod-DTuNvXAS.js.map → LexicalClipboard.prod-BdghxvkJ.js.map} +1 -1
- package/dist/LexicalExtension.prod-qYTg6Mah.js +551 -0
- package/dist/LexicalExtension.prod-qYTg6Mah.js.map +1 -0
- package/dist/LexicalLink.prod-DjG5QZHP.js +502 -0
- package/dist/LexicalLink.prod-DjG5QZHP.js.map +1 -0
- package/dist/{LexicalList.prod-DA9du3qx.js → LexicalList.prod-CzxWmBG3.js} +65 -65
- package/dist/LexicalList.prod-CzxWmBG3.js.map +1 -0
- package/dist/{LexicalSelection.prod-mQk00-U_.js → LexicalSelection.prod-CqTp0hfr.js} +44 -44
- package/dist/LexicalSelection.prod-CqTp0hfr.js.map +1 -0
- package/dist/{LexicalTable.prod-RGq0GKAR.js → LexicalTable.prod-C97KnedB.js} +331 -319
- package/dist/LexicalTable.prod-C97KnedB.js.map +1 -0
- package/dist/{LexicalUtils.prod-DU4QwthB.js → LexicalUtils.prod-lqA_upYF.js} +39 -39
- package/dist/LexicalUtils.prod-lqA_upYF.js.map +1 -0
- package/dist/{TableCellResizerPlugin-DRwI83s2.js → TableCellResizerPlugin-BdgrIlKp.js} +57 -57
- package/dist/{TableCellResizerPlugin-DRwI83s2.js.map → TableCellResizerPlugin-BdgrIlKp.js.map} +1 -1
- package/dist/{TablePlugin-DmE96vN7.js → TablePlugin-DBKzGTIm.js} +67 -67
- package/dist/{TablePlugin-DmE96vN7.js.map → TablePlugin-DBKzGTIm.js.map} +1 -1
- package/dist/{chunk-SS2NHR7W-qmI2h7CJ.js → chunk-GPBRNGY5-UqVYj0H5.js} +3 -3
- package/dist/chunk-GPBRNGY5-UqVYj0H5.js.map +1 -0
- package/dist/{client-D4oO7Spw.js → client-DkvV9jg_.js} +90 -90
- package/dist/{client-D4oO7Spw.js.map → client-DkvV9jg_.js.map} +1 -1
- package/dist/components/Accordion/Accordion.test.js +2 -2
- package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
- package/dist/components/ActionList/ActionList.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
- package/dist/components/Attention/Attention.test.js +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +1 -1
- package/dist/components/Card/Card.test.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/Label/Label.test.js +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.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/CourseCataloguePlugin/CourseCataloguePlugin.js +49 -49
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +64 -64
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +21 -21
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- 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 +29 -29
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +15 -15
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +218 -215
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +5 -5
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +12 -12
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +14 -14
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +2 -2
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
- package/dist/components/index.js +1 -1
- package/dist/{index-B4NxQN5d.js → index-BmvI9fji.js} +308 -307
- package/dist/index-BmvI9fji.js.map +1 -0
- package/dist/{index-ZQcmo1D_.js → index-Daa6JVq6.js} +2 -2
- package/dist/{index-ZQcmo1D_.js.map → index-Daa6JVq6.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-BczhA0zC.js → react-18-vQ75Numl.js} +2 -2
- package/dist/{react-18-BczhA0zC.js.map → react-18-vQ75Numl.js.map} +1 -1
- package/dist/{react.esm-BDo_tPxu.js → react.esm-CzkD5JmE.js} +2 -2
- package/dist/{react.esm-BDo_tPxu.js.map → react.esm-CzkD5JmE.js.map} +1 -1
- package/dist/storybook__react.d.js +3 -3
- package/package.json +21 -21
- package/dist/Lexical.prod-DH2XfwvA.js.map +0 -1
- package/dist/LexicalLink.prod-BV5Y2RYj.js +0 -1046
- package/dist/LexicalLink.prod-BV5Y2RYj.js.map +0 -1
- package/dist/LexicalList.prod-DA9du3qx.js.map +0 -1
- package/dist/LexicalSelection.prod-mQk00-U_.js.map +0 -1
- package/dist/LexicalTable.prod-RGq0GKAR.js.map +0 -1
- package/dist/LexicalUtils.prod-DU4QwthB.js.map +0 -1
- package/dist/chunk-SS2NHR7W-qmI2h7CJ.js.map +0 -1
- package/dist/index-B4NxQN5d.js.map +0 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { jsx as p, jsxs as O } from "react/jsx-runtime";
|
|
2
|
-
import { useState as C, useRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { o as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { useState as C, useRef as L, useEffect as I } from "react";
|
|
3
|
+
import { c as U } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { o as W } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
5
|
+
import { aF as F, V as v, c as T, b as A, p as z, _ as S, aG as X, Y as q, a7 as J, l as Q } from "../../../../Lexical.prod-CNQPQ6W-.js";
|
|
6
|
+
import { x as E } from "../../../../LexicalUtils.prod-lqA_upYF.js";
|
|
7
7
|
import { AddCatalogueLinkForm as Z } from "./AddCatalogueLinkForm/AddCatalogueLinkForm.js";
|
|
8
8
|
import { s as i } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
9
9
|
import { useTranslation as tt } from "../../hooks/useTranslation.js";
|
|
10
|
-
import { CourseCatalogueNode as g, $getLinkTypeFromNode as
|
|
10
|
+
import { CourseCatalogueNode as g, $getLinkTypeFromNode as P, REMOVE_COURSE_CATALOGUE_LINK as et, INSERT_COURSE_CATALOGUE_LINK as ot } from "../../nodes/CourseCatalogueNode/CourseCatalogueNode.js";
|
|
11
11
|
import { useOnClickOutside as rt } from "../../../hooks/useOnClickOutside.js";
|
|
12
12
|
const gt = ({
|
|
13
|
-
onSearch:
|
|
13
|
+
onSearch: D,
|
|
14
14
|
searchResponse: H,
|
|
15
15
|
parentScrollPosition: j
|
|
16
16
|
}) => {
|
|
17
|
-
const [s] =
|
|
18
|
-
|
|
19
|
-
const u = f === "course" ?
|
|
17
|
+
const [s] = W(), c = tt(), [G, k] = C(!1), [V, _] = C(!1), K = L(null), w = L(null), B = L(null), [b, h] = C(null), [R, Y] = C("course"), y = (f) => {
|
|
18
|
+
Y(f);
|
|
19
|
+
const u = f === "course" ? K.current?.getBoundingClientRect() : w.current?.getBoundingClientRect();
|
|
20
20
|
u && h({ top: u.bottom + window.scrollY, left: u.left + window.scrollX });
|
|
21
|
-
},
|
|
22
|
-
|
|
21
|
+
}, N = () => {
|
|
22
|
+
D("", R), h(null);
|
|
23
23
|
};
|
|
24
|
-
return
|
|
25
|
-
b &&
|
|
26
|
-
}, [j]),
|
|
24
|
+
return I(() => {
|
|
25
|
+
b && N();
|
|
26
|
+
}, [j]), I(() => {
|
|
27
27
|
const f = s.registerCommand(
|
|
28
|
-
|
|
28
|
+
F,
|
|
29
29
|
(t) => t.ctrlKey && t.shiftKey && t.altKey && t.key === "C" ? (t.preventDefault(), y("course"), !0) : t.ctrlKey && t.shiftKey && t.altKey && t.key === "P" ? (t.preventDefault(), y("programme"), !0) : !1,
|
|
30
|
-
|
|
30
|
+
v
|
|
31
31
|
), u = s.registerUpdateListener(({ editorState: t }) => {
|
|
32
32
|
t.read(() => {
|
|
33
|
-
const r =
|
|
33
|
+
const r = T();
|
|
34
34
|
if (A(r)) {
|
|
35
35
|
const e = r.anchor.getNode(), n = r.anchor.offset;
|
|
36
|
-
if (
|
|
36
|
+
if (z(e) && n === e.getTextContentSize() && e.getNextSibling() instanceof g) {
|
|
37
37
|
const o = e.getNextSibling();
|
|
38
38
|
if (o) {
|
|
39
|
-
const d =
|
|
39
|
+
const d = P(o);
|
|
40
40
|
k(d === "course"), _(d === "programme");
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const a =
|
|
44
|
+
const a = E(e, g);
|
|
45
45
|
if (a) {
|
|
46
|
-
const o =
|
|
46
|
+
const o = P(a);
|
|
47
47
|
k(o === "course"), _(o === "programme");
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
@@ -53,33 +53,33 @@ const gt = ({
|
|
|
53
53
|
}), m = (t) => {
|
|
54
54
|
const r = J(), e = t.getTextContentSize();
|
|
55
55
|
r.setTextNodeRange(t, e, t, e), Q(r);
|
|
56
|
-
},
|
|
57
|
-
|
|
56
|
+
}, x = (t, r) => z(t) && r === t.getTextContentSize() && t.getNextSibling() instanceof g, M = s.registerCommand(
|
|
57
|
+
F,
|
|
58
58
|
(t) => {
|
|
59
|
-
const r =
|
|
59
|
+
const r = T();
|
|
60
60
|
if (A(r)) {
|
|
61
61
|
const e = t.key, n = r.anchor.getNode(), a = r.anchor.offset;
|
|
62
|
-
let o =
|
|
63
|
-
if (
|
|
62
|
+
let o = E(n, g);
|
|
63
|
+
if (x(n, a) && (o = n.getNextSibling()), !o)
|
|
64
64
|
return !1;
|
|
65
65
|
const d = o?.getTextContentSize();
|
|
66
66
|
if (o && t.key === "Enter")
|
|
67
67
|
return t.preventDefault(), s.update(() => {
|
|
68
|
-
if (
|
|
69
|
-
const l =
|
|
68
|
+
if (x(n, a)) {
|
|
69
|
+
const l = S(`
|
|
70
70
|
`);
|
|
71
71
|
o.insertBefore(l);
|
|
72
72
|
}
|
|
73
73
|
if (a === d) {
|
|
74
|
-
const l =
|
|
74
|
+
const l = S(`
|
|
75
75
|
`);
|
|
76
76
|
o.insertAfter(l), m(l);
|
|
77
77
|
}
|
|
78
78
|
}), !0;
|
|
79
79
|
if (o && (e === " " || t.code === "Space"))
|
|
80
80
|
return t.preventDefault(), s.update(() => {
|
|
81
|
-
const l =
|
|
82
|
-
|
|
81
|
+
const l = S(" ");
|
|
82
|
+
x(n, a) && (o.insertBefore(l), m(l)), a === d && (o.insertAfter(l), m(l));
|
|
83
83
|
}), !0;
|
|
84
84
|
if (o && (e === "Backspace" || e === "Delete"))
|
|
85
85
|
return t.preventDefault(), s.update(
|
|
@@ -93,13 +93,13 @@ const gt = ({
|
|
|
93
93
|
}
|
|
94
94
|
return !1;
|
|
95
95
|
},
|
|
96
|
-
|
|
97
|
-
),
|
|
98
|
-
|
|
96
|
+
v
|
|
97
|
+
), $ = s.registerCommand(
|
|
98
|
+
X,
|
|
99
99
|
(t) => {
|
|
100
|
-
const r =
|
|
100
|
+
const r = T();
|
|
101
101
|
if (A(r)) {
|
|
102
|
-
const e = r.anchor.getNode(), n =
|
|
102
|
+
const e = r.anchor.getNode(), n = E(e, g);
|
|
103
103
|
if (n) {
|
|
104
104
|
t.preventDefault();
|
|
105
105
|
const a = s.getElementByKey(n.getKey());
|
|
@@ -111,16 +111,16 @@ const gt = ({
|
|
|
111
111
|
q
|
|
112
112
|
);
|
|
113
113
|
return () => {
|
|
114
|
-
f(), u(),
|
|
114
|
+
f(), u(), M(), $();
|
|
115
115
|
};
|
|
116
|
-
}, [s]), rt(
|
|
116
|
+
}, [s]), rt(B, () => h(null)), /* @__PURE__ */ p("div", { className: i["editor__toolbar-button-group"], children: /* @__PURE__ */ O("div", { className: i["editor__toolbar-button-flyoutwrapper"], children: [
|
|
117
117
|
/* @__PURE__ */ O("div", { className: i["editor__toolbar-button-group--text"], children: [
|
|
118
118
|
/* @__PURE__ */ p(
|
|
119
119
|
"button",
|
|
120
120
|
{
|
|
121
121
|
onClick: () => y("course"),
|
|
122
122
|
title: c.cataloguelinks.courseTooltip,
|
|
123
|
-
className:
|
|
123
|
+
className: U(
|
|
124
124
|
i["editor__toolbar-button"],
|
|
125
125
|
i["editor__toolbar-button--text"],
|
|
126
126
|
G && i["editor__toolbar-button--active"]
|
|
@@ -128,7 +128,7 @@ const gt = ({
|
|
|
128
128
|
"aria-label": c.aria.labels.courselink,
|
|
129
129
|
"aria-keyshortcuts": c.aria.keyshortcuts.courselink,
|
|
130
130
|
type: "button",
|
|
131
|
-
ref:
|
|
131
|
+
ref: K,
|
|
132
132
|
children: c.cataloguelinks.courseButtonLabel
|
|
133
133
|
}
|
|
134
134
|
),
|
|
@@ -137,15 +137,15 @@ const gt = ({
|
|
|
137
137
|
{
|
|
138
138
|
onClick: () => y("programme"),
|
|
139
139
|
title: c.cataloguelinks.programmeTooltip,
|
|
140
|
-
className:
|
|
140
|
+
className: U(
|
|
141
141
|
i["editor__toolbar-button"],
|
|
142
142
|
i["editor__toolbar-button--text"],
|
|
143
|
-
|
|
143
|
+
V && i["editor__toolbar-button--active"]
|
|
144
144
|
),
|
|
145
145
|
"aria-label": c.aria.labels.programmelink,
|
|
146
146
|
"aria-keyshortcuts": c.aria.keyshortcuts.programmelink,
|
|
147
147
|
type: "button",
|
|
148
|
-
ref:
|
|
148
|
+
ref: w,
|
|
149
149
|
children: c.cataloguelinks.programmeButtonLabel
|
|
150
150
|
}
|
|
151
151
|
)
|
|
@@ -155,20 +155,20 @@ const gt = ({
|
|
|
155
155
|
{
|
|
156
156
|
className: i["editor__toolbar-flyout-wrapper"],
|
|
157
157
|
style: { top: b.top, left: b.left },
|
|
158
|
-
ref:
|
|
158
|
+
ref: B,
|
|
159
159
|
children: /* @__PURE__ */ p(
|
|
160
160
|
Z,
|
|
161
161
|
{
|
|
162
|
-
linkType:
|
|
163
|
-
onCloseHandler:
|
|
164
|
-
onSearchHandler:
|
|
162
|
+
linkType: R,
|
|
163
|
+
onCloseHandler: N,
|
|
164
|
+
onSearchHandler: D,
|
|
165
165
|
searchResponse: H,
|
|
166
166
|
onSelect: (f, u, m) => {
|
|
167
167
|
s.dispatchCommand(ot, {
|
|
168
168
|
linkType: m,
|
|
169
169
|
code: f,
|
|
170
170
|
label: u
|
|
171
|
-
}),
|
|
171
|
+
}), N();
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { c as e } from "../../../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { o as h } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
4
|
-
import {
|
|
4
|
+
import { aH as _, aI as C, aJ as y, aK as k } from "../../../../Lexical.prod-CNQPQ6W-.js";
|
|
5
5
|
import { useState as m, useEffect as s } from "react";
|
|
6
6
|
import "../../../Accordion/Accordion.js";
|
|
7
7
|
import { Icon as n } from "../../../Icon/Icon.js";
|
|
@@ -18,9 +18,9 @@ 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-DBKzGTIm.js";
|
|
22
22
|
import { s as r } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
23
|
-
import { useTranslation as
|
|
23
|
+
import { useTranslation as g } from "../../hooks/useTranslation.js";
|
|
24
24
|
import "../../Providers/LanguageProvider.js";
|
|
25
25
|
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
26
26
|
import "../../hooks/components/Flyout.js";
|
|
@@ -33,17 +33,17 @@ import "../../../Sortable/components/SortableItem.js";
|
|
|
33
33
|
import "../../../../SortableProvider-BbwlEPIr.js";
|
|
34
34
|
import "../../../WeekSelector/components/WeekSelectorOptionContainer.js";
|
|
35
35
|
const ro = () => {
|
|
36
|
-
const o =
|
|
37
|
-
t.dispatchCommand(
|
|
36
|
+
const o = g(), [t] = h(), [p, d] = m(!1), [l, c] = m(!1), u = () => {
|
|
37
|
+
t.dispatchCommand(y, void 0);
|
|
38
38
|
}, b = () => {
|
|
39
39
|
t.dispatchCommand(k, void 0);
|
|
40
40
|
};
|
|
41
41
|
return s(() => t.registerCommand(
|
|
42
|
-
|
|
42
|
+
_,
|
|
43
43
|
(a) => (d(a), !1),
|
|
44
44
|
1
|
|
45
45
|
), [t]), s(() => t.registerCommand(
|
|
46
|
-
|
|
46
|
+
C,
|
|
47
47
|
(a) => (c(a), !1),
|
|
48
48
|
1
|
|
49
49
|
), [t]), /* @__PURE__ */ f("div", { className: r["editor__toolbar-button-group"], children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { A as I } from "../../../../../TablePlugin-
|
|
3
|
+
import { A as I } from "../../../../../TablePlugin-DBKzGTIm.js";
|
|
4
4
|
import "../helpers.js";
|
|
5
5
|
import "../../../../Accordion/Accordion.js";
|
|
6
6
|
import "../../../../Icon/Icon.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as f, jsxs as J } from "react/jsx-runtime";
|
|
2
2
|
import { o as W } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
3
3
|
import { c as Y } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { y as
|
|
4
|
+
import { y as L, P as $, J as q } from "../../../../LexicalLink.prod-DjG5QZHP.js";
|
|
5
5
|
import { useRef as a, useState as G, useEffect as u } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { A as rt } from "../../../../TablePlugin-
|
|
6
|
+
import { a4 as Q, c as p, u as X, aF as Z, b as w, V as tt, l as et, _ as ot } from "../../../../Lexical.prod-CNQPQ6W-.js";
|
|
7
|
+
import { x as N } from "../../../../LexicalUtils.prod-lqA_upYF.js";
|
|
8
|
+
import { A as rt } from "../../../../TablePlugin-DBKzGTIm.js";
|
|
9
9
|
import { ensureHttps as nt } from "./helpers.js";
|
|
10
|
-
import { LinkContextMenu as
|
|
11
|
-
import { useFlyout as
|
|
10
|
+
import { LinkContextMenu as it } from "./LinkContextMenu/LinkContextMenu.js";
|
|
11
|
+
import { useFlyout as st } from "../../hooks/useFlyout.js";
|
|
12
12
|
import "../../../Accordion/Accordion.js";
|
|
13
13
|
import { Icon as ct } from "../../../Icon/Icon.js";
|
|
14
14
|
import "../../../Buttons/Button.js";
|
|
@@ -24,7 +24,7 @@ import "../../../IconButton/IconButton.js";
|
|
|
24
24
|
import "../../../Input/Input.js";
|
|
25
25
|
import "../../../InputField/InputField.js";
|
|
26
26
|
import "react-router";
|
|
27
|
-
import { setScrollableContainers as
|
|
27
|
+
import { setScrollableContainers as I, removeScrollableContainers as at } from "../../helpers.js";
|
|
28
28
|
import { s as g } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
29
29
|
import { useTranslation as lt } from "../../hooks/useTranslation.js";
|
|
30
30
|
import "../../Providers/LanguageProvider.js";
|
|
@@ -36,124 +36,124 @@ import "../../../SelectListbox/SelectProvider.js";
|
|
|
36
36
|
import "../../../Sortable/components/SortableItem.js";
|
|
37
37
|
import "../../../../SortableProvider-BbwlEPIr.js";
|
|
38
38
|
import "../../../WeekSelector/components/WeekSelectorOptionContainer.js";
|
|
39
|
-
const ut = 200, qt = ({ parentScrollPosition:
|
|
40
|
-
const
|
|
41
|
-
|
|
39
|
+
const ut = 200, qt = ({ parentScrollPosition: U }) => {
|
|
40
|
+
const x = lt(), [i] = W(), { flyout: V, showFlyout: P, hideFlyout: h, isVisible: l } = st(), m = a(void 0), T = a(!1), C = a(""), d = a(""), [k, z] = G({ active: !1, url: "", linktext: "" }), R = a(l), F = a(null), S = a(null), _ = a(void 0), y = () => {
|
|
41
|
+
i.update(() => {
|
|
42
42
|
const r = p();
|
|
43
43
|
F.current = r;
|
|
44
44
|
});
|
|
45
45
|
}, D = () => {
|
|
46
|
-
|
|
46
|
+
i.update(() => {
|
|
47
47
|
F.current && et(F.current);
|
|
48
48
|
});
|
|
49
|
-
},
|
|
49
|
+
}, O = (r, t) => {
|
|
50
50
|
P({
|
|
51
51
|
position: t,
|
|
52
52
|
children: /* @__PURE__ */ f(
|
|
53
|
-
|
|
53
|
+
it,
|
|
54
54
|
{
|
|
55
55
|
url: r,
|
|
56
56
|
onSave: (e) => B(e, ""),
|
|
57
|
-
onDelete: () =>
|
|
57
|
+
onDelete: () => A(),
|
|
58
58
|
onClose: K,
|
|
59
|
-
ref:
|
|
59
|
+
ref: _
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
63
|
}, K = () => {
|
|
64
|
-
|
|
65
|
-
},
|
|
64
|
+
_.current?.clearForm(), h(), D();
|
|
65
|
+
}, E = () => {
|
|
66
66
|
const r = S.current?.getBoundingClientRect();
|
|
67
|
-
!
|
|
68
|
-
},
|
|
67
|
+
!T.current && r && (y(), P({ position: { top: r.bottom, left: r.left }, ...H }), setTimeout(() => m.current?.setDefaults("", d.current), 0));
|
|
68
|
+
}, b = () => {
|
|
69
69
|
h(), D();
|
|
70
70
|
}, B = (r, t) => {
|
|
71
|
-
|
|
71
|
+
i.update(() => {
|
|
72
72
|
const e = p();
|
|
73
73
|
if (w(e)) {
|
|
74
|
-
const o = e.anchor.getNode(),
|
|
74
|
+
const o = e.anchor.getNode(), s = N(o, L);
|
|
75
75
|
if (t && t !== "") {
|
|
76
|
-
if (
|
|
76
|
+
if (s) {
|
|
77
77
|
const n = ot(t);
|
|
78
|
-
|
|
78
|
+
s.replace(n), n.select();
|
|
79
79
|
}
|
|
80
|
-
if (t !==
|
|
80
|
+
if (t !== C.current && C.current === "") {
|
|
81
81
|
const { anchor: n, focus: c } = e;
|
|
82
82
|
e.insertText(t), n.offset -= t.length, c.offset = n.offset + t.length;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
q(nt(r), { target: "_blank" });
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
b();
|
|
88
88
|
});
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
89
|
+
}, A = () => {
|
|
90
|
+
i.dispatchCommand($, null), K();
|
|
91
|
+
}, H = {
|
|
92
92
|
children: /* @__PURE__ */ f(
|
|
93
93
|
rt,
|
|
94
94
|
{
|
|
95
|
-
isLink:
|
|
96
|
-
onCloseHandler:
|
|
95
|
+
isLink: k,
|
|
96
|
+
onCloseHandler: b,
|
|
97
97
|
onSaveHandler: (r, t) => B(r, t),
|
|
98
98
|
ref: m
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
};
|
|
102
102
|
return u(() => {
|
|
103
|
-
l ? (
|
|
103
|
+
l ? (T.current = !0, m.current?.focusFirstField()) : (m.current?.clearForm(), C.current = d.current = "", setTimeout(() => T.current = !1, ut));
|
|
104
104
|
}, [m, l]), u(() => {
|
|
105
105
|
const r = (o) => {
|
|
106
106
|
if (w(o) && o.isCollapsed()) {
|
|
107
|
-
const
|
|
107
|
+
const s = o.anchor.getNode(), n = N(s, L);
|
|
108
108
|
if (n) {
|
|
109
|
-
const c =
|
|
110
|
-
return
|
|
109
|
+
const c = i.getElementByKey(o.anchor.getNode().getKey()), v = c ? { top: c.getBoundingClientRect().bottom, left: c.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
110
|
+
return O(n.getURL(), v), !0;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return !1;
|
|
114
|
-
}, t =
|
|
114
|
+
}, t = i.registerCommand(
|
|
115
115
|
Q,
|
|
116
116
|
() => {
|
|
117
117
|
const o = p();
|
|
118
118
|
return d.current = o?.getTextContent() ?? "", r(o), !1;
|
|
119
119
|
},
|
|
120
120
|
0
|
|
121
|
-
), e =
|
|
121
|
+
), e = i.registerCommand(
|
|
122
122
|
X,
|
|
123
123
|
(o) => {
|
|
124
|
-
const
|
|
125
|
-
return
|
|
124
|
+
const s = p();
|
|
125
|
+
return y(), o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), r(s), !1;
|
|
126
126
|
},
|
|
127
127
|
0
|
|
128
128
|
);
|
|
129
129
|
return () => {
|
|
130
130
|
e(), t();
|
|
131
131
|
};
|
|
132
|
-
}, [
|
|
133
|
-
const r =
|
|
132
|
+
}, [i]), u(() => {
|
|
133
|
+
const r = i.registerCommand(
|
|
134
134
|
Z,
|
|
135
135
|
(e) => {
|
|
136
136
|
if (e.ctrlKey && e.shiftKey && e.key === "U") {
|
|
137
137
|
const o = p();
|
|
138
|
-
if (
|
|
138
|
+
if (y(), !w(o))
|
|
139
139
|
return !1;
|
|
140
|
-
const
|
|
141
|
-
|
|
140
|
+
const s = o.anchor.getNode(), n = N(s, L), c = (M = "", j = "") => {
|
|
141
|
+
E(), setTimeout(() => m.current?.setDefaults(M, j), 0);
|
|
142
142
|
};
|
|
143
143
|
if (n)
|
|
144
|
-
return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(),
|
|
145
|
-
const
|
|
146
|
-
return
|
|
144
|
+
return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), C.current = n.getTextContent(), c(n.getURL(), n.getTextContent()), !0;
|
|
145
|
+
const v = o.getTextContent();
|
|
146
|
+
return v !== "" ? (d.current = v, c("", d.current), !0) : (E(), !0);
|
|
147
147
|
}
|
|
148
148
|
return !1;
|
|
149
149
|
},
|
|
150
150
|
tt
|
|
151
|
-
), t =
|
|
152
|
-
|
|
151
|
+
), t = i.registerUpdateListener(({ editorState: e }) => {
|
|
152
|
+
z(
|
|
153
153
|
e.read(() => {
|
|
154
154
|
const o = p();
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
155
|
+
if (y(), w(o)) {
|
|
156
|
+
const s = o.anchor.getNode(), n = N(s, L);
|
|
157
157
|
if (n)
|
|
158
158
|
return {
|
|
159
159
|
active: !0,
|
|
@@ -172,40 +172,40 @@ const ut = 200, qt = ({ parentScrollPosition: z }) => {
|
|
|
172
172
|
return () => {
|
|
173
173
|
r(), t();
|
|
174
174
|
};
|
|
175
|
-
}, [
|
|
176
|
-
R.current = l, l ||
|
|
175
|
+
}, [i]), u(() => {
|
|
176
|
+
R.current = l, l || _.current?.clearForm();
|
|
177
177
|
}, [l]), u(() => {
|
|
178
|
-
l &&
|
|
179
|
-
}, [
|
|
180
|
-
|
|
181
|
-
}, [
|
|
182
|
-
const r = (e) => (
|
|
178
|
+
l && b();
|
|
179
|
+
}, [U]), u(() => {
|
|
180
|
+
k.active || h();
|
|
181
|
+
}, [k]), u(() => {
|
|
182
|
+
const r = (e) => (I(t), e.key === "Escape" && R.current && (e.preventDefault(), e.stopPropagation(), b()), !0);
|
|
183
183
|
window.addEventListener("keydown", r, { capture: !0 });
|
|
184
184
|
const t = () => {
|
|
185
185
|
h();
|
|
186
186
|
};
|
|
187
|
-
return
|
|
187
|
+
return I(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
188
188
|
window.removeEventListener("keydown", r), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), at(t);
|
|
189
189
|
};
|
|
190
190
|
}, []), /* @__PURE__ */ f("div", { className: g["editor__toolbar-button-group"], children: /* @__PURE__ */ J("div", { className: g["editor__toolbar-button-flyoutwrapper"], children: [
|
|
191
191
|
/* @__PURE__ */ f(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
|
-
onClick:
|
|
195
|
-
title:
|
|
194
|
+
onClick: E,
|
|
195
|
+
title: x.links.linkTooltip,
|
|
196
196
|
className: Y(
|
|
197
197
|
g["editor__toolbar-button"],
|
|
198
198
|
g["editor__toolbar-button--link"],
|
|
199
|
-
|
|
199
|
+
k.active && g["editor__toolbar-button--active"]
|
|
200
200
|
),
|
|
201
|
-
"aria-label":
|
|
202
|
-
"aria-keyshortcuts":
|
|
201
|
+
"aria-label": x.aria.labels.link,
|
|
202
|
+
"aria-keyshortcuts": x.aria.keyshortcuts.link,
|
|
203
203
|
type: "button",
|
|
204
204
|
ref: S,
|
|
205
205
|
children: /* @__PURE__ */ f(ct, { name: "Link", size: 20 })
|
|
206
206
|
}
|
|
207
207
|
),
|
|
208
|
-
|
|
208
|
+
V
|
|
209
209
|
] }) });
|
|
210
210
|
};
|
|
211
211
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as w } from "../../../../LexicalLink.prod-
|
|
1
|
+
import { H as w } from "../../../../LexicalLink.prod-DjG5QZHP.js";
|
|
2
2
|
const a = /^(http|https):\/\//, s = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/, A = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, z = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})?$/, n = (t) => t === "https://" || s.test(t), o = (t) => t === "https://" || z.test(t), r = [
|
|
3
3
|
w(s, (t) => a.test(t) ? t : `//${t}`),
|
|
4
4
|
w(A, (t) => `mailto:${t}`)
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { o as
|
|
3
|
-
import { k as b, x as _, S as v, o as
|
|
2
|
+
import { o as I } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
3
|
+
import { k as b, x as _, S as v, o as K, d as N, h as P, l as y } from "../../../../LexicalList.prod-CzxWmBG3.js";
|
|
4
4
|
import { useState as p, useEffect as k } from "react";
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Icon as
|
|
5
|
+
import { c as $ } from "../../../../clsx-OuTLNxxd.js";
|
|
6
|
+
import { aF as O, V as U, a2 as Y, c as x, b as S, Y as B } from "../../../../Lexical.prod-CNQPQ6W-.js";
|
|
7
|
+
import { x as E } from "../../../../LexicalUtils.prod-lqA_upYF.js";
|
|
8
|
+
import { Icon as F } from "../../../Icon/Icon.js";
|
|
9
9
|
import { s as n } from "../../../../RteEditor.module-DaBh86FK.js";
|
|
10
|
-
import { useTranslation as
|
|
10
|
+
import { useTranslation as V } from "../../hooks/useTranslation.js";
|
|
11
11
|
const j = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
|
-
},
|
|
15
|
-
const m =
|
|
14
|
+
}, w = ["bullet", "number"], W = () => {
|
|
15
|
+
const m = V(), [e] = I(), [h, s] = p(null), [u, g] = p(!1), [c, L] = p(!1), D = (t) => {
|
|
16
16
|
t === "number" && h !== "number" ? (e.dispatchCommand(_, void 0), s("number")) : t === "bullet" && h !== "bullet" ? (e.dispatchCommand(v, void 0), s("bullet")) : (e.dispatchCommand(b, void 0), s(null));
|
|
17
17
|
};
|
|
18
18
|
return k(() => {
|
|
19
19
|
const t = e.registerCommand(
|
|
20
|
-
|
|
20
|
+
O,
|
|
21
21
|
(o) => o.ctrlKey && o.shiftKey && o.code === "Digit7" ? (o.preventDefault(), c ? e.dispatchCommand(b, void 0) : e.dispatchCommand(_, void 0), !0) : o.ctrlKey && o.shiftKey && o.code === "Digit8" ? (o.preventDefault(), u ? e.dispatchCommand(b, void 0) : e.dispatchCommand(v, void 0), !0) : !1,
|
|
22
|
-
|
|
22
|
+
U
|
|
23
23
|
);
|
|
24
24
|
return () => {
|
|
25
25
|
t();
|
|
26
26
|
};
|
|
27
27
|
}, [e, c, u]), k(() => {
|
|
28
28
|
const t = e.registerCommand(
|
|
29
|
-
|
|
29
|
+
Y,
|
|
30
30
|
(d) => (d.preventDefault(), e.update(() => {
|
|
31
|
-
const i =
|
|
31
|
+
const i = x();
|
|
32
32
|
if (!S(i))
|
|
33
33
|
return;
|
|
34
34
|
const l = i.anchor.getNode(), a = l.getParent();
|
|
35
|
-
if (!
|
|
35
|
+
if (!K(a))
|
|
36
36
|
return;
|
|
37
37
|
const r = a.getParent();
|
|
38
38
|
if (N(r)) {
|
|
39
|
-
const C =
|
|
39
|
+
const C = P(N(r) ? r.getListType() : "bullet");
|
|
40
40
|
a.append(C), C.append(l);
|
|
41
41
|
}
|
|
42
42
|
}), !0),
|
|
43
43
|
B
|
|
44
44
|
), o = e.registerUpdateListener(({ editorState: d }) => {
|
|
45
45
|
d.read(() => {
|
|
46
|
-
const i =
|
|
46
|
+
const i = x();
|
|
47
47
|
if (S(i)) {
|
|
48
|
-
const l = i.anchor.getNode(), a = E(l,
|
|
48
|
+
const l = i.anchor.getNode(), a = E(l, y);
|
|
49
49
|
if (a) {
|
|
50
50
|
const r = a.getTag();
|
|
51
51
|
g(r === "ul"), L(r === "ol"), r === "ul" && s("bullet"), r === "ol" && s("number");
|
|
@@ -59,12 +59,12 @@ const j = {
|
|
|
59
59
|
return () => {
|
|
60
60
|
o(), t();
|
|
61
61
|
};
|
|
62
|
-
}, [e]), /* @__PURE__ */ f("div", { className: n["editor__toolbar-button-group"], children:
|
|
62
|
+
}, [e]), /* @__PURE__ */ f("div", { className: n["editor__toolbar-button-group"], children: w.map((t) => /* @__PURE__ */ f(
|
|
63
63
|
"button",
|
|
64
64
|
{
|
|
65
|
-
onClick: () =>
|
|
65
|
+
onClick: () => D(t),
|
|
66
66
|
title: m.format[`${t}Tooltip`],
|
|
67
|
-
className:
|
|
67
|
+
className: $(
|
|
68
68
|
n["editor__toolbar-button"],
|
|
69
69
|
n[`editor__toolbar-button--${t}`],
|
|
70
70
|
t === "bullet" && u && n["editor__toolbar-button--active"],
|
|
@@ -73,7 +73,7 @@ const j = {
|
|
|
73
73
|
"aria-label": m.aria.labels[t],
|
|
74
74
|
"aria-keyshortcuts": m.aria.keyshortcuts[t],
|
|
75
75
|
type: "button",
|
|
76
|
-
children: /* @__PURE__ */ f(
|
|
76
|
+
children: /* @__PURE__ */ f(F, { name: j[t], size: 24 })
|
|
77
77
|
},
|
|
78
78
|
t
|
|
79
79
|
)) });
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { o as m } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
2
2
|
import { useEffect as c } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { R as
|
|
3
|
+
import { n as f, ah as p, c as u } from "../../../../Lexical.prod-CNQPQ6W-.js";
|
|
4
|
+
import { P as i } from "../../../../LexicalUtils.prod-lqA_upYF.js";
|
|
5
|
+
import { R as d } from "../../../../LexicalClipboard.prod-BdghxvkJ.js";
|
|
6
6
|
import { d as D } from "../../../../index-yEhaxKq-.js";
|
|
7
|
-
const
|
|
7
|
+
const w = () => {
|
|
8
8
|
const [e] = m(), l = (t) => {
|
|
9
9
|
t.preventDefault(), e.update(() => {
|
|
10
|
-
const r =
|
|
10
|
+
const r = u(), a = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
|
|
11
11
|
if (a != null && r !== null) {
|
|
12
12
|
const o = a.getData("text/html") || a.getData("text/plain"), n = new DataTransfer(), s = new D.MSWordNormalizer();
|
|
13
|
-
n.setData("text/html", o), s.isActive(o) && n.setData("text/html", s.normalize(o)),
|
|
13
|
+
n.setData("text/html", o), s.isActive(o) && n.setData("text/html", s.normalize(o)), d(n, r, e);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
};
|
|
@@ -26,6 +26,6 @@ const L = () => {
|
|
|
26
26
|
}, [e]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
w as PasteHandlerPlugin
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=PasteHandlerPlugin.js.map
|