@uva-glass/component-library 3.0.8 → 3.0.9
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-BqkvGy5o.js +4879 -0
- package/dist/Lexical.prod-BqkvGy5o.js.map +1 -0
- package/dist/{LexicalClipboard.prod-D9CvlqSO.js → LexicalClipboard.prod-BSR9LEVL.js} +39 -39
- package/dist/{LexicalClipboard.prod-D9CvlqSO.js.map → LexicalClipboard.prod-BSR9LEVL.js.map} +1 -1
- package/dist/{LexicalLink.prod-__08uNAw.js → LexicalLink.prod-D-CG9yYv.js} +44 -44
- package/dist/LexicalLink.prod-D-CG9yYv.js.map +1 -0
- package/dist/LexicalList.prod-CDTuG8cz.js +600 -0
- package/dist/LexicalList.prod-CDTuG8cz.js.map +1 -0
- package/dist/LexicalSelection.prod-BxYY0fGG.js +86 -0
- package/dist/LexicalSelection.prod-BxYY0fGG.js.map +1 -0
- package/dist/LexicalTable.prod-Ckge-lZb.js +1515 -0
- package/dist/LexicalTable.prod-Ckge-lZb.js.map +1 -0
- package/dist/{LexicalUtils.prod-BYrJ1Iih.js → LexicalUtils.prod-CIQUUsvA.js} +44 -44
- package/dist/LexicalUtils.prod-CIQUUsvA.js.map +1 -0
- package/dist/{TablePlugin-BHY7_5Z8.js → TablePlugin-BBgBJKsb.js} +41 -41
- package/dist/{TablePlugin-BHY7_5Z8.js.map → TablePlugin-BBgBJKsb.js.map} +1 -1
- package/dist/assets/VarIndicator.css +1 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +2 -2
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.stories.d.ts +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.stories.d.ts +1 -1
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.stories.d.ts +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.stories.d.ts +1 -1
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.stories.d.ts +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +1 -1
- package/dist/components/Buttons/Button.stories.d.ts +2 -2
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.stories.d.ts +2 -2
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.stories.d.ts +3 -3
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Card/Card.stories.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.d.ts +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.d.ts +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.d.ts +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +109 -87
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.d.ts +2 -2
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.d.ts +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.stories.d.ts +1 -1
- package/dist/components/FieldHint/FieldHint.stories.d.ts +2 -2
- package/dist/components/Fieldset/Fieldset.stories.d.ts +2 -2
- package/dist/components/FormField/FormField.stories.d.ts +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.d.ts +2 -2
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/GridRow/GridRow.stories.d.ts +2 -2
- package/dist/components/HorizontalList/HorizontalList.stories.d.ts +2 -2
- package/dist/components/Icon/Icon.stories.d.ts +1 -1
- package/dist/components/Icon/icons/index.d.ts +30 -0
- package/dist/components/Icon/icons/index.js +160 -135
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InfoMessage/InfoMessage.stories.d.ts +1 -1
- package/dist/components/Input/Input.stories.d.ts +4 -4
- package/dist/components/InputField/InputField.stories.d.ts +3 -3
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/Label/Label.stories.d.ts +2 -2
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/MenuLink/MenuLink.stories.d.ts +2 -2
- package/dist/components/MetaDataList/MetaDataList.stories.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.d.ts +3 -3
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +3 -3
- 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/OverlayCloseButton/OverlayCloseButton.stories.d.ts +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
- package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.d.ts +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.d.ts +3 -3
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.d.ts +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/Periods/Periods.stories.d.ts +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.d.ts +3 -3
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/dist/components/Repeater/Repeater.stories.d.ts +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- 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 +45 -45
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +27 -27
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +10 -10
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +19 -19
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +9 -9
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +259 -259
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.stories.d.ts +1 -1
- package/dist/components/RteEditor/helpers.js +12 -12
- package/dist/components/SectionNotification/SectionNotification.stories.d.ts +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.d.ts +2 -2
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.d.ts +3 -3
- package/dist/components/Sortable/Sortable.stories.js +7 -7
- package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
- package/dist/components/StatusPill/StatusPill.stories.d.ts +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.d.ts +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +5 -5
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/VarIndicator/VarIndicator.d.ts +9 -0
- package/dist/components/VarIndicator/VarIndicator.js +32 -0
- package/dist/components/VarIndicator/VarIndicator.js.map +1 -0
- package/dist/components/VarIndicator/VarIndicator.stories.d.ts +5 -0
- package/dist/components/VarIndicator/VarIndicator.stories.js +30 -0
- package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -0
- package/dist/components/VarIndicator/VarIndicator.test.d.ts +0 -0
- package/dist/components/VarIndicator/VarIndicator.test.js +58 -0
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -0
- package/dist/components/VarIndicator/index.d.ts +1 -0
- package/dist/components/VarIndicator/index.js +5 -0
- package/dist/components/VarIndicator/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +32 -30
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-Cgw7V6LR.js → helpers-CzeCSkV-.js} +42 -42
- package/dist/{helpers-Cgw7V6LR.js.map → helpers-CzeCSkV-.js.map} +1 -1
- package/dist/index-BldK5xU9.js +9513 -0
- package/dist/index-BldK5xU9.js.map +1 -0
- package/dist/{index-OJvb7CGo.js → index-DMVXQIB9.js} +2 -2
- package/dist/{index-OJvb7CGo.js.map → index-DMVXQIB9.js.map} +1 -1
- package/dist/index-DpyOH4wL.js +14735 -0
- package/dist/index-DpyOH4wL.js.map +1 -0
- package/dist/{index-BqHyOZsF.js → index-Z7qwJmRM.js} +2 -2
- package/dist/{index-BqHyOZsF.js.map → index-Z7qwJmRM.js.map} +1 -1
- package/dist/index.js +32 -30
- package/dist/index.js.map +1 -1
- package/dist/{react.esm-BZoQ2TxA.js → react.esm-BOUd0cvD.js} +3 -3
- package/dist/{react.esm-BZoQ2TxA.js.map → react.esm-BOUd0cvD.js.map} +1 -1
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +8528 -537
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-utils-CTqdUiUm.js → test-utils-uaSbIYda.js} +2 -2
- package/dist/{test-utils-CTqdUiUm.js.map → test-utils-uaSbIYda.js.map} +1 -1
- package/package.json +24 -24
- package/dist/Lexical.prod-D0woeN3R.js +0 -4770
- package/dist/Lexical.prod-D0woeN3R.js.map +0 -1
- package/dist/LexicalLink.prod-__08uNAw.js.map +0 -1
- package/dist/LexicalList.prod-BgI8r9BS.js +0 -579
- package/dist/LexicalList.prod-BgI8r9BS.js.map +0 -1
- package/dist/LexicalSelection.prod-B-SXpOS9.js +0 -86
- package/dist/LexicalSelection.prod-B-SXpOS9.js.map +0 -1
- package/dist/LexicalTable.prod-DJWDvnB3.js +0 -1494
- package/dist/LexicalTable.prod-DJWDvnB3.js.map +0 -1
- package/dist/LexicalUtils.prod-BYrJ1Iih.js.map +0 -1
- package/dist/index-2mUSc_Ki.js +0 -8
- package/dist/index-2mUSc_Ki.js.map +0 -1
- package/dist/index-CcK2jjMp.js +0 -23343
- package/dist/index-CcK2jjMp.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { u as
|
|
3
|
-
import { c as
|
|
4
|
-
import { m as U, N as J, w as Q } from "../../../../LexicalLink.prod-
|
|
1
|
+
import { jsx as k, jsxs as G } from "react/jsx-runtime";
|
|
2
|
+
import { u as W } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
3
|
+
import { c as q } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { m as U, N as J, w as Q } from "../../../../LexicalLink.prod-D-CG9yYv.js";
|
|
5
5
|
import { useRef as a, useState as X, useEffect as m } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
6
|
+
import { G as Z, N as f, k as $, af as tt, a as v, l as et, h as ot, Y as rt } from "../../../../Lexical.prod-BqkvGy5o.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-BBgBJKsb.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-CzeCSkV-.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";
|
|
@@ -23,7 +23,7 @@ import "../../../Input/Input.js";
|
|
|
23
23
|
import "../../../InputField/InputField.js";
|
|
24
24
|
import "react-router";
|
|
25
25
|
import { setScrollableContainers as z, removeScrollableContainers as at } from "../../helpers.js";
|
|
26
|
-
import { s as
|
|
26
|
+
import { s as h } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
27
27
|
import { useTranslation as ut } from "../../hooks/useTranslation.js";
|
|
28
28
|
import "../../Providers/LanguageProvider.js";
|
|
29
29
|
import "../../../../index-B3c5pcHk.js";
|
|
@@ -51,8 +51,8 @@ const mt = 200, I = (p) => {
|
|
|
51
51
|
n = n.getParent();
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
|
-
},
|
|
55
|
-
const n = ut(), [c] =
|
|
54
|
+
}, jt = ({ parentScrollPosition: p }) => {
|
|
55
|
+
const n = ut(), [c] = W(), { flyout: A, showFlyout: _, hideFlyout: C, isVisible: u } = ct(), d = a(void 0), w = a(!1), y = a(""), g = a(""), [L, H] = X({ active: !1, url: "", linktext: "" }), P = a(u), x = a(null), S = a(null), T = a(void 0), N = () => {
|
|
56
56
|
c.update(() => {
|
|
57
57
|
const e = f();
|
|
58
58
|
x.current = e;
|
|
@@ -64,11 +64,11 @@ const mt = 200, I = (p) => {
|
|
|
64
64
|
}, M = (e, t) => {
|
|
65
65
|
_({
|
|
66
66
|
position: t,
|
|
67
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ k(
|
|
68
68
|
st,
|
|
69
69
|
{
|
|
70
70
|
url: e,
|
|
71
|
-
onSave: (o) =>
|
|
71
|
+
onSave: (o) => K(o, ""),
|
|
72
72
|
onDelete: () => V(),
|
|
73
73
|
onClose: D,
|
|
74
74
|
ref: T
|
|
@@ -78,19 +78,19 @@ const mt = 200, I = (p) => {
|
|
|
78
78
|
}, D = () => {
|
|
79
79
|
var e;
|
|
80
80
|
(e = T.current) == null || e.clearForm(), C(), R();
|
|
81
|
-
},
|
|
81
|
+
}, F = () => {
|
|
82
82
|
var t;
|
|
83
83
|
const e = (t = S.current) == null ? void 0 : t.getBoundingClientRect();
|
|
84
|
-
!
|
|
84
|
+
!w.current && e && (N(), _({ position: { top: e.bottom, left: e.left }, ...Y }), setTimeout(() => {
|
|
85
85
|
var o;
|
|
86
86
|
return (o = d.current) == null ? void 0 : o.setDefaults("", g.current);
|
|
87
87
|
}, 0));
|
|
88
|
-
},
|
|
88
|
+
}, b = () => {
|
|
89
89
|
C(), R();
|
|
90
|
-
},
|
|
90
|
+
}, K = (e, t) => {
|
|
91
91
|
c.update(() => {
|
|
92
92
|
const o = f();
|
|
93
|
-
if (
|
|
93
|
+
if (v(o)) {
|
|
94
94
|
const i = o.anchor.getNode(), s = I(i);
|
|
95
95
|
if (t && t !== "") {
|
|
96
96
|
if (s) {
|
|
@@ -98,33 +98,33 @@ const mt = 200, I = (p) => {
|
|
|
98
98
|
s.replace(l), l.select();
|
|
99
99
|
}
|
|
100
100
|
if (t !== y.current && y.current === "") {
|
|
101
|
-
const { anchor: l, focus:
|
|
102
|
-
o.insertText(t), l.offset -= t.length,
|
|
101
|
+
const { anchor: l, focus: E } = o;
|
|
102
|
+
o.insertText(t), l.offset -= t.length, E.offset = l.offset + t.length;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
Q(it(e), { target: "_blank" });
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
b();
|
|
108
108
|
});
|
|
109
109
|
}, V = () => {
|
|
110
110
|
c.dispatchCommand(J, null), D();
|
|
111
|
-
},
|
|
112
|
-
children: /* @__PURE__ */
|
|
111
|
+
}, Y = {
|
|
112
|
+
children: /* @__PURE__ */ k(
|
|
113
113
|
nt,
|
|
114
114
|
{
|
|
115
115
|
isLink: L,
|
|
116
|
-
onCloseHandler:
|
|
117
|
-
onSaveHandler: (e, t) =>
|
|
116
|
+
onCloseHandler: b,
|
|
117
|
+
onSaveHandler: (e, t) => K(e, t),
|
|
118
118
|
ref: d
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
};
|
|
122
122
|
return m(() => {
|
|
123
123
|
var e, t;
|
|
124
|
-
u ? (
|
|
124
|
+
u ? (w.current = !0, (t = d.current) == null || t.focusFirstField()) : ((e = d.current) == null || e.clearForm(), y.current = g.current = "", setTimeout(() => w.current = !1, mt));
|
|
125
125
|
}, [d, u]), m(() => {
|
|
126
126
|
const e = (r) => {
|
|
127
|
-
if (
|
|
127
|
+
if (v(r) && r.isCollapsed()) {
|
|
128
128
|
const i = O(r.anchor.getNode());
|
|
129
129
|
if (i) {
|
|
130
130
|
const s = c.getElementByKey(r.anchor.getNode().getKey()), l = s ? { top: s.getBoundingClientRect().bottom, left: s.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
@@ -143,7 +143,7 @@ const mt = 200, I = (p) => {
|
|
|
143
143
|
$,
|
|
144
144
|
(r) => {
|
|
145
145
|
const i = f();
|
|
146
|
-
return
|
|
146
|
+
return N(), r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation(), e(i), !1;
|
|
147
147
|
},
|
|
148
148
|
0
|
|
149
149
|
);
|
|
@@ -156,18 +156,18 @@ const mt = 200, I = (p) => {
|
|
|
156
156
|
(o) => {
|
|
157
157
|
if (o.ctrlKey && o.shiftKey && o.key === "U") {
|
|
158
158
|
const r = f();
|
|
159
|
-
if (
|
|
159
|
+
if (N(), !v(r))
|
|
160
160
|
return !1;
|
|
161
|
-
const i = O(r.anchor.getNode()), s = (
|
|
162
|
-
|
|
163
|
-
var
|
|
164
|
-
return (
|
|
161
|
+
const i = O(r.anchor.getNode()), s = (E = "", j = "") => {
|
|
162
|
+
F(), setTimeout(() => {
|
|
163
|
+
var B;
|
|
164
|
+
return (B = d.current) == null ? void 0 : B.setDefaults(E, j);
|
|
165
165
|
}, 0);
|
|
166
166
|
};
|
|
167
167
|
if (i)
|
|
168
168
|
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), y.current = i.linktext, s(i.url, i.linktext), !0;
|
|
169
169
|
const l = r.getTextContent();
|
|
170
|
-
return l !== "" ? (g.current = l, s("", g.current), !0) : (
|
|
170
|
+
return l !== "" ? (g.current = l, s("", g.current), !0) : (F(), !0);
|
|
171
171
|
}
|
|
172
172
|
return !1;
|
|
173
173
|
},
|
|
@@ -176,7 +176,7 @@ const mt = 200, I = (p) => {
|
|
|
176
176
|
H(
|
|
177
177
|
o.read(() => {
|
|
178
178
|
const r = f();
|
|
179
|
-
if (
|
|
179
|
+
if (N(), v(r)) {
|
|
180
180
|
const i = r.anchor.getNode(), s = I(i);
|
|
181
181
|
if (s)
|
|
182
182
|
return {
|
|
@@ -200,11 +200,11 @@ const mt = 200, I = (p) => {
|
|
|
200
200
|
var e;
|
|
201
201
|
P.current = u, u || (e = T.current) == null || e.clearForm();
|
|
202
202
|
}, [u]), m(() => {
|
|
203
|
-
u &&
|
|
203
|
+
u && b();
|
|
204
204
|
}, [p]), m(() => {
|
|
205
205
|
L.active || C();
|
|
206
206
|
}, [L]), m(() => {
|
|
207
|
-
const e = (o) => (z(t), o.key === "Escape" && P.current && (o.preventDefault(), o.stopPropagation(),
|
|
207
|
+
const e = (o) => (z(t), o.key === "Escape" && P.current && (o.preventDefault(), o.stopPropagation(), b()), !0);
|
|
208
208
|
window.addEventListener("keydown", e, { capture: !0 });
|
|
209
209
|
const t = () => {
|
|
210
210
|
C();
|
|
@@ -212,29 +212,29 @@ const mt = 200, I = (p) => {
|
|
|
212
212
|
return z(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
213
213
|
window.removeEventListener("keydown", e), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), at(t);
|
|
214
214
|
};
|
|
215
|
-
}, []), /* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
215
|
+
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ G("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
|
|
216
|
+
/* @__PURE__ */ k(
|
|
217
217
|
"button",
|
|
218
218
|
{
|
|
219
|
-
onClick:
|
|
219
|
+
onClick: F,
|
|
220
220
|
title: n.links.linkTooltip,
|
|
221
|
-
className:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
L.active &&
|
|
221
|
+
className: q(
|
|
222
|
+
h["editor__toolbar-button"],
|
|
223
|
+
h["editor__toolbar-button--link"],
|
|
224
|
+
L.active && h["editor__toolbar-button--active"]
|
|
225
225
|
),
|
|
226
226
|
"aria-label": n.aria.labels.link,
|
|
227
227
|
"aria-keyshortcuts": n.aria.keyshortcuts.link,
|
|
228
228
|
type: "button",
|
|
229
229
|
ref: S,
|
|
230
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ k(lt, { name: "Link", size: 20 })
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
233
|
A
|
|
234
234
|
] }) });
|
|
235
235
|
};
|
|
236
236
|
export {
|
|
237
|
-
|
|
237
|
+
jt as LinkPlugin,
|
|
238
238
|
O as getLinkNodeTag
|
|
239
239
|
};
|
|
240
240
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { u as S } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useState as p, useEffect as
|
|
6
|
-
import { c as
|
|
7
|
-
import {
|
|
8
|
-
import { Icon as
|
|
3
|
+
import { n as C, e as k, t as P, j as y, Z as f, Y as E } from "../../../../LexicalList.prod-CDTuG8cz.js";
|
|
4
|
+
import { _ as x } from "../../../../LexicalSelection.prod-BxYY0fGG.js";
|
|
5
|
+
import { useState as p, useEffect as D } from "react";
|
|
6
|
+
import { c as B } from "../../../../clsx-OuTLNxxd.js";
|
|
7
|
+
import { af as O, l as U, B as j, N as b, a as h, E as w, T } from "../../../../Lexical.prod-BqkvGy5o.js";
|
|
8
|
+
import { Icon as Y } from "../../../Icon/Icon.js";
|
|
9
9
|
import { s as u } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
10
|
-
import { useTranslation as
|
|
11
|
-
const
|
|
10
|
+
import { useTranslation as $ } from "../../hooks/useTranslation.js";
|
|
11
|
+
const v = {
|
|
12
12
|
bullet: "BulletList",
|
|
13
13
|
number: "NumberedList"
|
|
14
|
-
},
|
|
15
|
-
const l =
|
|
14
|
+
}, z = ["bullet", "number"], V = () => {
|
|
15
|
+
const l = $(), [e] = S(), [g, n] = p("paragraph"), [c, L] = p(!1), [m, _] = p(!1), I = () => {
|
|
16
16
|
e.update(() => {
|
|
17
17
|
const t = b();
|
|
18
|
-
h(t) &&
|
|
18
|
+
h(t) && x(t, () => T());
|
|
19
19
|
});
|
|
20
|
-
},
|
|
21
|
-
t === "number" && g !== "number" ? (e.dispatchCommand(
|
|
20
|
+
}, K = (t) => {
|
|
21
|
+
t === "number" && g !== "number" ? (e.dispatchCommand(k, void 0), n("number")) : t === "bullet" && g !== "bullet" ? (e.dispatchCommand(P, void 0), n("bullet")) : (I(), n("paragraph"));
|
|
22
22
|
};
|
|
23
|
-
return
|
|
23
|
+
return D(() => {
|
|
24
24
|
const t = e.registerCommand(
|
|
25
|
-
|
|
26
|
-
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(
|
|
27
|
-
|
|
25
|
+
O,
|
|
26
|
+
(r) => r.ctrlKey && r.shiftKey && r.code === "Digit7" ? (r.preventDefault(), m ? e.dispatchCommand(C, void 0) : e.dispatchCommand(k, void 0), !0) : r.ctrlKey && r.shiftKey && r.code === "Digit8" ? (r.preventDefault(), c ? e.dispatchCommand(C, void 0) : e.dispatchCommand(P, void 0), !0) : !1,
|
|
27
|
+
U
|
|
28
28
|
);
|
|
29
29
|
return () => {
|
|
30
30
|
t();
|
|
31
31
|
};
|
|
32
|
-
}, [e, m, c]),
|
|
32
|
+
}, [e, m, c]), D(() => {
|
|
33
33
|
e.registerCommand(
|
|
34
|
-
|
|
34
|
+
j,
|
|
35
35
|
(r) => (r.preventDefault(), e.update(() => {
|
|
36
36
|
const i = b();
|
|
37
37
|
if (!h(i))
|
|
@@ -41,11 +41,11 @@ const q = {
|
|
|
41
41
|
return;
|
|
42
42
|
const a = s.getParent();
|
|
43
43
|
if (f(a)) {
|
|
44
|
-
const
|
|
45
|
-
s.append(
|
|
44
|
+
const N = E(f(a) ? a.getListType() : "bullet");
|
|
45
|
+
s.append(N), N.append(o);
|
|
46
46
|
}
|
|
47
47
|
}), !0),
|
|
48
|
-
|
|
48
|
+
w
|
|
49
49
|
);
|
|
50
50
|
const t = e.registerUpdateListener(({ editorState: r }) => {
|
|
51
51
|
r.read(() => {
|
|
@@ -70,12 +70,12 @@ const q = {
|
|
|
70
70
|
return () => {
|
|
71
71
|
t();
|
|
72
72
|
};
|
|
73
|
-
}, [e]), /* @__PURE__ */ d("div", { className: u["editor__toolbar-button-group"], children:
|
|
73
|
+
}, [e]), /* @__PURE__ */ d("div", { className: u["editor__toolbar-button-group"], children: z.map((t) => /* @__PURE__ */ d(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
onClick: () =>
|
|
76
|
+
onClick: () => K(t),
|
|
77
77
|
title: l.format[`${t}Tooltip`],
|
|
78
|
-
className:
|
|
78
|
+
className: B(
|
|
79
79
|
u["editor__toolbar-button"],
|
|
80
80
|
u[`editor__toolbar-button--${t}`],
|
|
81
81
|
t === "bullet" && c && u["editor__toolbar-button--active"],
|
|
@@ -84,12 +84,12 @@ const q = {
|
|
|
84
84
|
"aria-label": l.aria.labels[t],
|
|
85
85
|
"aria-keyshortcuts": l.aria.keyshortcuts[t],
|
|
86
86
|
type: "button",
|
|
87
|
-
children: /* @__PURE__ */ d(
|
|
87
|
+
children: /* @__PURE__ */ d(Y, { name: v[t], size: 24 })
|
|
88
88
|
},
|
|
89
89
|
t
|
|
90
90
|
)) });
|
|
91
91
|
};
|
|
92
92
|
export {
|
|
93
|
-
|
|
93
|
+
V as ListPlugin
|
|
94
94
|
};
|
|
95
95
|
//# sourceMappingURL=ListPlugin.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { u as m } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { N as d } from "../../../../LexicalClipboard.prod-
|
|
2
|
+
import { useEffect as c } from "react";
|
|
3
|
+
import { a6 as f, L as p, N as u } from "../../../../Lexical.prod-BqkvGy5o.js";
|
|
4
|
+
import { S as i } from "../../../../LexicalUtils.prod-CIQUUsvA.js";
|
|
5
|
+
import { N as d } from "../../../../LexicalClipboard.prod-BSR9LEVL.js";
|
|
6
6
|
import { d as D } from "../../../../index-B3c5pcHk.js";
|
|
7
|
-
const
|
|
7
|
+
const P = () => {
|
|
8
8
|
const [e] = m(), l = (t) => {
|
|
9
9
|
t.preventDefault(), e.update(() => {
|
|
10
|
-
const r =
|
|
10
|
+
const r = u(), n = i(t, InputEvent) || i(t, KeyboardEvent) ? null : t.clipboardData;
|
|
11
11
|
if (n != null && r !== null) {
|
|
12
12
|
const a = n.getData("text/html"), o = new DataTransfer(), s = new D.MSWordNormalizer();
|
|
13
13
|
o.setData("text/html", a), s.isActive(a) && o.setData("text/html", s.normalize(a)), d(o, r, e);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
return
|
|
17
|
+
return c(() => {
|
|
18
18
|
const t = e.registerCommand(
|
|
19
|
-
|
|
19
|
+
f,
|
|
20
20
|
(r) => r instanceof ClipboardEvent ? (l(r), !0) : !1,
|
|
21
|
-
|
|
21
|
+
p
|
|
22
22
|
);
|
|
23
23
|
return () => {
|
|
24
24
|
t();
|
|
@@ -26,6 +26,6 @@ const g = () => {
|
|
|
26
26
|
}, [e]), null;
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
P as PasteHandlerPlugin
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=PasteHandlerPlugin.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { b as B } from "../../../../TablePlugin-
|
|
3
|
+
import { b as B } from "../../../../TablePlugin-BBgBJKsb.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--Rm7-Z9o.js";
|
|
3
3
|
import "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import "../../../../LexicalTable.prod-
|
|
5
|
-
import "../../../../Lexical.prod-
|
|
4
|
+
import "../../../../LexicalTable.prod-Ckge-lZb.js";
|
|
5
|
+
import "../../../../Lexical.prod-BqkvGy5o.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { T as F } from "../../../../TablePlugin-
|
|
7
|
+
import { T as F } from "../../../../TablePlugin-BBgBJKsb.js";
|
|
8
8
|
import "./helpers.js";
|
|
9
9
|
import "../../hooks/useFlyout.js";
|
|
10
10
|
import "../../../Icon/Icon.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { A as d, p as h, k as m, H as x, O as w, E as S, m as C, y as p, T as I } from "../../../../LexicalTable.prod-Ckge-lZb.js";
|
|
2
|
+
import { T as u } from "../../../../Lexical.prod-BqkvGy5o.js";
|
|
3
|
+
const T = 100, D = (e, n) => {
|
|
4
4
|
const t = I(0, 0, !1);
|
|
5
5
|
for (let o = 0; o < e; o++) {
|
|
6
|
-
const r =
|
|
6
|
+
const r = p();
|
|
7
7
|
for (let l = 0; l < n; l++) {
|
|
8
|
-
const s = C(0, void 0,
|
|
8
|
+
const s = C(0, void 0, T / n);
|
|
9
9
|
s.append(u()), r.append(s);
|
|
10
10
|
}
|
|
11
11
|
t.append(r);
|
|
12
12
|
}
|
|
13
13
|
return t;
|
|
14
|
-
},
|
|
14
|
+
}, z = (e) => {
|
|
15
15
|
const n = w(e), t = n.getNextSibling() || n.getPreviousSibling(), o = n.getParentOrThrow();
|
|
16
16
|
if (o.getChildrenSize() > 1 ? n.remove() : o.remove(), t !== null) {
|
|
17
17
|
const r = t.getFirstDescendant();
|
|
@@ -19,8 +19,8 @@ const p = 100, D = (e, n) => {
|
|
|
19
19
|
}
|
|
20
20
|
}, A = (e) => {
|
|
21
21
|
d(e).remove();
|
|
22
|
-
},
|
|
23
|
-
const t =
|
|
22
|
+
}, F = (e, n) => {
|
|
23
|
+
const t = p(), o = w(e), r = o.getChildrenSize();
|
|
24
24
|
for (let s = 0; s < r; s++) {
|
|
25
25
|
const c = C(0);
|
|
26
26
|
c.append(u()), t.append(c);
|
|
@@ -28,20 +28,20 @@ const p = 100, D = (e, n) => {
|
|
|
28
28
|
n === "insertRowAbove" ? o.insertBefore(t) : o.insertAfter(t);
|
|
29
29
|
const l = t.getFirstDescendant();
|
|
30
30
|
l && l.select();
|
|
31
|
-
},
|
|
31
|
+
}, P = (e, n) => {
|
|
32
32
|
const t = w(e);
|
|
33
33
|
if (!h(e))
|
|
34
34
|
throw new Error("Selected node is not a TableCellNode");
|
|
35
|
-
const o =
|
|
35
|
+
const o = S(e), r = t.getChildren().length, l = d(e);
|
|
36
36
|
let s = m(e);
|
|
37
|
-
const c = l.getChildren(),
|
|
38
|
-
for (let i = 0; i <
|
|
37
|
+
const c = l.getChildren(), b = c.length;
|
|
38
|
+
for (let i = 0; i < b; i++) {
|
|
39
39
|
const a = C(0);
|
|
40
40
|
a.append(u());
|
|
41
41
|
const f = c[i].getChildren()[s];
|
|
42
|
-
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
f && (n === "insertColumnLeft" ? f.insertBefore(a) : f.insertAfter(a)), c.forEach((R) => {
|
|
43
|
+
R.getChildren().forEach((E) => {
|
|
44
|
+
E.setWidth(T / r);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -53,14 +53,14 @@ const p = 100, D = (e, n) => {
|
|
|
53
53
|
if (!h(e))
|
|
54
54
|
throw new Error("Selected node is not a TableCellNode");
|
|
55
55
|
const n = d(e), t = ((r = n.getFirstChild()) == null ? void 0 : r.getChildrenSize()) || 0, o = m(e);
|
|
56
|
-
t === 1 ? A(e) :
|
|
56
|
+
t === 1 ? A(e) : x(n, o);
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
59
|
D as createTable,
|
|
60
60
|
k as deleteColumn,
|
|
61
|
-
|
|
61
|
+
z as deleteRow,
|
|
62
62
|
A as deleteTable,
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
P as insertColumn,
|
|
64
|
+
F as insertRow
|
|
65
65
|
};
|
|
66
66
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as P, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { u as y } from "../../../../LexicalComposerContext.prod--Rm7-Z9o.js";
|
|
3
|
-
import { h,
|
|
4
|
-
import { useState as L, useRef as
|
|
5
|
-
import {
|
|
6
|
-
import { BlockFormatPlugin as
|
|
3
|
+
import { N as h, a as g, h as C } from "../../../../Lexical.prod-BqkvGy5o.js";
|
|
4
|
+
import { useState as L, useRef as E, useCallback as N, useEffect as m } from "react";
|
|
5
|
+
import { F as b } from "../../../../LexicalTable.prod-Ckge-lZb.js";
|
|
6
|
+
import { BlockFormatPlugin as T } 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-BBgBJKsb.js";
|
|
11
11
|
import { TableCellContextMenu as z } from "../TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
12
12
|
import { s as A } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
13
|
-
import { setScrollableContainers as w, removeScrollableContainers as
|
|
13
|
+
import { setScrollableContainers as w, removeScrollableContainers as F } from "../../helpers.js";
|
|
14
14
|
const Q = ({ editorScrollPosition: d }) => {
|
|
15
|
-
const [t] = y(), [i, s] = L(null), u =
|
|
15
|
+
const [t] = y(), [i, s] = L(null), u = E(null), f = N(() => {
|
|
16
16
|
const e = h();
|
|
17
17
|
if (g(e)) {
|
|
18
18
|
const l = e.anchor.getNode(), a = b(l);
|
|
@@ -41,7 +41,7 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
}, [t, f]), m(() => (w(o), window.addEventListener("scroll", o), window.addEventListener("resize", o), () => {
|
|
44
|
-
window.removeEventListener("scroll", o), window.removeEventListener("resize", o),
|
|
44
|
+
window.removeEventListener("scroll", o), window.removeEventListener("resize", o), F(o);
|
|
45
45
|
}), [t]), m(() => {
|
|
46
46
|
const e = () => {
|
|
47
47
|
w(o);
|
|
@@ -50,7 +50,7 @@ const Q = ({ editorScrollPosition: d }) => {
|
|
|
50
50
|
window.removeEventListener("keydown", e);
|
|
51
51
|
};
|
|
52
52
|
}, []), /* @__PURE__ */ P("div", { className: A.editor__toolbar, children: [
|
|
53
|
-
/* @__PURE__ */ n(
|
|
53
|
+
/* @__PURE__ */ n(T, {}),
|
|
54
54
|
/* @__PURE__ */ n(k, {}),
|
|
55
55
|
/* @__PURE__ */ n(S, { isActive: !!i, ref: u }),
|
|
56
56
|
i && /* @__PURE__ */ n(
|
|
@@ -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-BBgBJKsb.js";
|
|
7
7
|
import { TableCellContextMenu as T } from "./TablePlugin/TableCellContextMenu/TableCellContextMenu.js";
|
|
8
8
|
export {
|
|
9
9
|
l as BlockFormatPlugin,
|