@uva-glass/component-library 3.53.0 → 3.53.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.prod-DH2XfwvA.js → Lexical.prod-Dgzi-S1E.js} +1427 -1409
- package/dist/Lexical.prod-Dgzi-S1E.js.map +1 -0
- package/dist/{LexicalClipboard.prod-DTuNvXAS.js → LexicalClipboard.prod-Dxc8c2F_.js} +86 -86
- package/dist/{LexicalClipboard.prod-DTuNvXAS.js.map → LexicalClipboard.prod-Dxc8c2F_.js.map} +1 -1
- package/dist/LexicalExtension.prod-CNBWjmfs.js +551 -0
- package/dist/LexicalExtension.prod-CNBWjmfs.js.map +1 -0
- package/dist/LexicalLink.prod-EEOzXxej.js +502 -0
- package/dist/LexicalLink.prod-EEOzXxej.js.map +1 -0
- package/dist/{LexicalList.prod-DA9du3qx.js → LexicalList.prod-DADZlhem.js} +65 -65
- package/dist/LexicalList.prod-DADZlhem.js.map +1 -0
- package/dist/{LexicalSelection.prod-mQk00-U_.js → LexicalSelection.prod-B0uiXGSS.js} +44 -44
- package/dist/LexicalSelection.prod-B0uiXGSS.js.map +1 -0
- package/dist/{LexicalTable.prod-RGq0GKAR.js → LexicalTable.prod-QpQxZNNH.js} +331 -319
- package/dist/LexicalTable.prod-QpQxZNNH.js.map +1 -0
- package/dist/{LexicalUtils.prod-DU4QwthB.js → LexicalUtils.prod-D1mwAww-.js} +39 -39
- package/dist/LexicalUtils.prod-D1mwAww-.js.map +1 -0
- package/dist/{TableCellResizerPlugin-DRwI83s2.js → TableCellResizerPlugin-9kvw_LpH.js} +57 -57
- package/dist/{TableCellResizerPlugin-DRwI83s2.js.map → TableCellResizerPlugin-9kvw_LpH.js.map} +1 -1
- package/dist/{TablePlugin-DmE96vN7.js → TablePlugin-Culqb83M.js} +67 -67
- package/dist/{TablePlugin-DmE96vN7.js.map → TablePlugin-Culqb83M.js.map} +1 -1
- package/dist/{chunk-SS2NHR7W-qmI2h7CJ.js → chunk-GPBRNGY5-BSRMHXbx.js} +3 -3
- package/dist/chunk-GPBRNGY5-BSRMHXbx.js.map +1 -0
- package/dist/{client-D4oO7Spw.js → client-DdSuZDnt.js} +93 -95
- package/dist/{client-D4oO7Spw.js.map → client-DdSuZDnt.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.d.ts +1 -1
- 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.d.ts +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.d.ts +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.d.ts +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InfoBanner/InfoBanner.d.ts +1 -1
- package/dist/components/InfoBanner/InfoBanner.stories.d.ts +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.d.ts +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.d.ts +2 -2
- 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.d.ts +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 +63 -63
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.d.ts +1 -1
- 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/TableCellContextMenu/TableCellContextMenu.d.ts +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.d.ts +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/SectionNotification/SectionNotification.stories.d.ts +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/components/SelectButton.d.ts +1 -1
- package/dist/components/SelectListbox/components/SelectOption.d.ts +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/components/SortableItem.d.ts +1 -1
- package/dist/components/StatusBadge/StatusBadge.stories.d.ts +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/WeekSelector/WeekSelector.stories.d.ts +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOption.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{index-B4NxQN5d.js → index-Cfzi-sRQ.js} +333 -332
- package/dist/index-Cfzi-sRQ.js.map +1 -0
- package/dist/{index-ZQcmo1D_.js → index-DcECbqp4.js} +12 -12
- package/dist/{index-ZQcmo1D_.js.map → index-DcECbqp4.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-BczhA0zC.js → react-18-plvLTuyc.js} +2 -2
- package/dist/{react-18-BczhA0zC.js.map → react-18-plvLTuyc.js.map} +1 -1
- package/dist/{react.esm-BDo_tPxu.js → react.esm-BpII5CMY.js} +712 -733
- package/dist/{react.esm-BDo_tPxu.js.map → react.esm-BpII5CMY.js.map} +1 -1
- package/dist/storybook__react.d.js +8 -8
- package/dist/storybook__react.d.js.map +1 -1
- package/package.json +26 -26
- 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,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-EEOzXxej.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-Dgzi-S1E.js";
|
|
7
|
+
import { x as N } from "../../../../LexicalUtils.prod-D1mwAww-.js";
|
|
8
|
+
import { A as rt } from "../../../../TablePlugin-Culqb83M.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-EEOzXxej.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-DADZlhem.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-Dgzi-S1E.js";
|
|
7
|
+
import { x as E } from "../../../../LexicalUtils.prod-D1mwAww-.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-Dgzi-S1E.js";
|
|
4
|
+
import { P as i } from "../../../../LexicalUtils.prod-D1mwAww-.js";
|
|
5
|
+
import { R as d } from "../../../../LexicalClipboard.prod-Dxc8c2F_.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
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
4
|
-
import { T as b } from "../../../../TableCellResizerPlugin-
|
|
5
|
-
import "../../../../LexicalTable.prod-
|
|
6
|
-
import "../../../../LexicalUtils.prod-
|
|
7
|
-
import "../../../../Lexical.prod-
|
|
4
|
+
import { T as b } from "../../../../TableCellResizerPlugin-9kvw_LpH.js";
|
|
5
|
+
import "../../../../LexicalTable.prod-QpQxZNNH.js";
|
|
6
|
+
import "../../../../LexicalUtils.prod-D1mwAww-.js";
|
|
7
|
+
import "../../../../Lexical.prod-Dgzi-S1E.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "../TablePlugin/helpers.js";
|
|
10
10
|
import "../../nodes/TableWrapperNode/TableWrapperNode.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { b as G } from "../../../../TablePlugin-
|
|
3
|
+
import { b as G } from "../../../../TablePlugin-Culqb83M.js";
|
|
4
4
|
import "../../../Accordion/Accordion.js";
|
|
5
5
|
import "../../../Buttons/Button.js";
|
|
6
6
|
import "../../../Buttons/LinkButton.js";
|
package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Position } from '
|
|
1
|
+
import { Position } from '../../ToolbarPlugin';
|
|
2
2
|
export type Actions = 'insertRowAbove' | 'insertRowBelow' | 'deleteRow' | 'deleteTable' | 'insertColumnLeft' | 'insertColumnRight' | 'deleteColumn';
|
|
3
3
|
interface TableCellContextMenuProps {
|
|
4
4
|
position: Position;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
3
3
|
import "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import "../../../../LexicalTable.prod-
|
|
5
|
-
import "../../../../Lexical.prod-
|
|
6
|
-
import "../../../../LexicalUtils.prod-
|
|
4
|
+
import "../../../../LexicalTable.prod-QpQxZNNH.js";
|
|
5
|
+
import "../../../../Lexical.prod-Dgzi-S1E.js";
|
|
6
|
+
import "../../../../LexicalUtils.prod-D1mwAww-.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import { T as L } from "../../../../TablePlugin-
|
|
8
|
+
import { T as L } from "../../../../TablePlugin-Culqb83M.js";
|
|
9
9
|
import "./helpers.js";
|
|
10
10
|
import "../../nodes/TableWrapperNode/TableWrapperNode.js";
|
|
11
11
|
import "../../hooks/useFlyout.js";
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { TableWrapperNode as
|
|
1
|
+
import { Z as p, A as i, I as w, s as T, J as u, U as b, e as E, D, $ as g, V as I, B as R, O as x } from "../../../../LexicalTable.prod-QpQxZNNH.js";
|
|
2
|
+
import { $ as S } from "../../../../Lexical.prod-Dgzi-S1E.js";
|
|
3
|
+
import { TableWrapperNode as N } from "../../nodes/TableWrapperNode/TableWrapperNode.js";
|
|
4
4
|
import "react";
|
|
5
|
-
const
|
|
5
|
+
const F = 32, a = 48, W = 1, B = 200, P = 320, A = (t, e) => {
|
|
6
6
|
const n = R(0, 0, !1);
|
|
7
7
|
for (let o = 0; o < t; o++) {
|
|
8
8
|
const r = g();
|
|
9
9
|
for (let s = 0; s < e; s++) {
|
|
10
10
|
const l = x(0, void 0, void 0);
|
|
11
|
-
l.append(
|
|
11
|
+
l.append(S()), r.append(l);
|
|
12
12
|
}
|
|
13
13
|
n.append(r);
|
|
14
14
|
}
|
|
15
15
|
return n;
|
|
16
|
-
},
|
|
16
|
+
}, H = (t) => {
|
|
17
17
|
const e = D(t), n = e.getNextSibling() || e.getPreviousSibling(), o = e.getParentOrThrow();
|
|
18
18
|
if (o.getChildrenSize() > 1 ? e.remove() : o.remove(), n !== null) {
|
|
19
19
|
const r = n.getFirstDescendant();
|
|
20
20
|
r && r.select();
|
|
21
21
|
}
|
|
22
|
-
},
|
|
22
|
+
}, O = (t) => {
|
|
23
23
|
const e = p(t);
|
|
24
24
|
if (!e)
|
|
25
25
|
throw new Error("Selected node is not a TableCellNode");
|
|
26
26
|
const n = e.getParent();
|
|
27
|
-
n instanceof
|
|
28
|
-
},
|
|
27
|
+
n instanceof N ? n.remove() : e.remove();
|
|
28
|
+
}, U = (t, e) => {
|
|
29
29
|
if (!i(t))
|
|
30
30
|
throw new Error("Selected node is not a TableCellNode");
|
|
31
31
|
const n = g();
|
|
32
32
|
I(e === "insertRowBelow");
|
|
33
33
|
const o = n.getFirstDescendant();
|
|
34
34
|
o && o.select();
|
|
35
|
-
},
|
|
35
|
+
}, M = (t, e) => {
|
|
36
36
|
if (!i(t))
|
|
37
37
|
throw new Error("Selected node is not a TableCellNode");
|
|
38
38
|
const n = w(t);
|
|
@@ -49,22 +49,22 @@ const P = 32, a = 48, N = 1, v = 200, M = 320, H = (t, e) => {
|
|
|
49
49
|
n.setColWidths(C), o = e === "insertColumnLeft" ? o : o + 1;
|
|
50
50
|
const f = r[s].getChildren()[o];
|
|
51
51
|
f && f.select();
|
|
52
|
-
},
|
|
52
|
+
}, $ = (t) => {
|
|
53
53
|
if (!i(t))
|
|
54
54
|
throw new Error("Selected node is not a TableCellNode");
|
|
55
|
-
(w(t).getFirstChild()?.getChildrenSize() || 0) === 1 ?
|
|
56
|
-
},
|
|
55
|
+
(w(t).getFirstChild()?.getChildrenSize() || 0) === 1 ? O(t) : T();
|
|
56
|
+
}, V = (t) => {
|
|
57
57
|
const e = t.getRootElement();
|
|
58
58
|
if (!e || typeof window > "u") return 0;
|
|
59
59
|
const n = e.getBoundingClientRect(), o = window.getComputedStyle(e), r = parseFloat(o.paddingLeft || "0") + parseFloat(o.paddingRight || "0") + a;
|
|
60
60
|
return Math.max(0, n.width - r);
|
|
61
|
-
},
|
|
61
|
+
}, z = (t, e, n) => {
|
|
62
62
|
if (!t) return 0;
|
|
63
63
|
const o = n.getElementByKey(t.getKey());
|
|
64
64
|
if (!o) return 0;
|
|
65
65
|
const r = window.getComputedStyle(o);
|
|
66
|
-
return parseInt(r.width) - e *
|
|
67
|
-
},
|
|
66
|
+
return parseInt(r.width) - e * W - 1;
|
|
67
|
+
}, J = (t) => {
|
|
68
68
|
const e = t.getChildren();
|
|
69
69
|
for (const n of e) {
|
|
70
70
|
const o = n.getChildren();
|
|
@@ -75,19 +75,19 @@ const P = 32, a = 48, N = 1, v = 200, M = 320, H = (t, e) => {
|
|
|
75
75
|
return !1;
|
|
76
76
|
};
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
W as BORDER_WIDTHS,
|
|
79
79
|
a as DEFAULT_COL_WIDTH,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
P as DEFAULT_EDITOR_WIDTH,
|
|
81
|
+
F as MIN_COLUMN_WIDTH,
|
|
82
|
+
B as PREVENT_OPEN_DELAY,
|
|
83
|
+
A as createTable,
|
|
84
|
+
$ as deleteColumn,
|
|
85
|
+
H as deleteRow,
|
|
86
|
+
O as deleteTable,
|
|
87
|
+
V as getEditorContentWidth,
|
|
88
|
+
z as getEditorParrentCellWidth,
|
|
89
|
+
M as insertColumn,
|
|
90
|
+
U as insertRow,
|
|
91
|
+
J as tableHasContent
|
|
92
92
|
};
|
|
93
93
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
-
import { SearchResponse } from '
|
|
2
|
+
import { SearchResponse } from '../CourseCataloguePlugin/AddCatalogueLinkForm';
|
|
3
3
|
export type Position = {
|
|
4
4
|
xPos: number;
|
|
5
5
|
yPos: number;
|