@uva-glass/component-library 3.47.5 → 3.47.7
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-nXWuyOKD.js → Lexical.prod-DBU6xTBY.js} +1397 -1279
- package/dist/Lexical.prod-DBU6xTBY.js.map +1 -0
- package/dist/LexicalClipboard.prod-CzGBnMdD.js +272 -0
- package/dist/LexicalClipboard.prod-CzGBnMdD.js.map +1 -0
- package/dist/LexicalLink.prod-DV9kT537.js +1027 -0
- package/dist/LexicalLink.prod-DV9kT537.js.map +1 -0
- package/dist/{LexicalList.prod--mkvX0uW.js → LexicalList.prod-2UfLUgO1.js} +159 -154
- package/dist/LexicalList.prod-2UfLUgO1.js.map +1 -0
- package/dist/LexicalSelection.prod-C1JYA_go.js +114 -0
- package/dist/LexicalSelection.prod-C1JYA_go.js.map +1 -0
- package/dist/LexicalTable.prod-CZ1mYUR-.js +1802 -0
- package/dist/LexicalTable.prod-CZ1mYUR-.js.map +1 -0
- package/dist/LexicalUtils.prod-C3vvQk50.js +114 -0
- package/dist/LexicalUtils.prod-C3vvQk50.js.map +1 -0
- package/dist/{TableCellResizerPlugin-Cpbankb8.js → TableCellResizerPlugin-CxFy7dbe.js} +53 -53
- package/dist/TableCellResizerPlugin-CxFy7dbe.js.map +1 -0
- package/dist/{TablePlugin-CfXPNfT8.js → TablePlugin-CfTWvWk1.js} +59 -59
- package/dist/{TablePlugin-CfXPNfT8.js.map → TablePlugin-CfTWvWk1.js.map} +1 -1
- package/dist/client--GsCJ9Up.js +27328 -0
- package/dist/client--GsCJ9Up.js.map +1 -0
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.test.js +3 -3
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/Icon/icons/index.d.ts +12 -0
- package/dist/components/Icon/icons/index.js +169 -159
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +9 -9
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +35 -35
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +9 -5
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +40 -40
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- 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 +25 -25
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +19 -19
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +671 -627
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +8 -8
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +19 -19
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/TextArea/TextArea.test.js +2 -2
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/index.js +1 -1
- package/dist/{index-iImjiPdB.js → index-Bf2LCbD1.js} +2 -2
- package/dist/{index-iImjiPdB.js.map → index-Bf2LCbD1.js.map} +1 -1
- package/dist/{index-B32mP_-H.js → index-JOHbZ4si.js} +1172 -1128
- package/dist/{index-B32mP_-H.js.map → index-JOHbZ4si.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-DXfB7ZX7.js → react-18-BHQltW8V.js} +2 -2
- package/dist/{react-18-DXfB7ZX7.js.map → react-18-BHQltW8V.js.map} +1 -1
- package/dist/{react.esm-WLX_DeH0.js → react.esm-Bg7Fh9lz.js} +3 -3
- package/dist/{react.esm-WLX_DeH0.js.map → react.esm-Bg7Fh9lz.js.map} +1 -1
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +1 -1
- package/package.json +24 -24
- package/dist/Lexical.prod-nXWuyOKD.js.map +0 -1
- package/dist/LexicalClipboard.prod-pXq91TBU.js +0 -276
- package/dist/LexicalClipboard.prod-pXq91TBU.js.map +0 -1
- package/dist/LexicalLink.prod-Brzpgs_K.js +0 -285
- package/dist/LexicalLink.prod-Brzpgs_K.js.map +0 -1
- package/dist/LexicalList.prod--mkvX0uW.js.map +0 -1
- package/dist/LexicalSelection.prod-Ct4PZOht.js +0 -119
- package/dist/LexicalSelection.prod-Ct4PZOht.js.map +0 -1
- package/dist/LexicalTable.prod-Bexd4dGG.js +0 -1763
- package/dist/LexicalTable.prod-Bexd4dGG.js.map +0 -1
- package/dist/LexicalUtils.prod-Ckfw0Hjt.js +0 -123
- package/dist/LexicalUtils.prod-Ckfw0Hjt.js.map +0 -1
- package/dist/TableCellResizerPlugin-Cpbankb8.js.map +0 -1
- package/dist/client-BK9NlSVR.js +0 -25208
- package/dist/client-BK9NlSVR.js.map +0 -1
- package/dist/helpers-mE437H2Y.js +0 -164
- package/dist/helpers-mE437H2Y.js.map +0 -1
|
@@ -17,7 +17,7 @@ import "../GridRow/GridRow.js";
|
|
|
17
17
|
import "../IconButton/IconButton.js";
|
|
18
18
|
import "../Input/Input.js";
|
|
19
19
|
import "react-router";
|
|
20
|
-
import "../../TablePlugin-
|
|
20
|
+
import "../../TablePlugin-CfTWvWk1.js";
|
|
21
21
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
22
22
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
23
23
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as t, s as l } from "../../react.esm-
|
|
2
|
+
import "../../index-JOHbZ4si.js";
|
|
3
|
+
import { r as t, s as l } from "../../react.esm-Bg7Fh9lz.js";
|
|
4
4
|
import { Label as r } from "./Label.js";
|
|
5
5
|
describe("Label", () => {
|
|
6
6
|
it("should render", () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { l as d } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
|
-
import { M as e } from "../../TablePlugin-
|
|
4
|
+
import { M as e } from "../../TablePlugin-CfTWvWk1.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
const C = `
|
|
7
7
|
// MultiSelectHeader can be added optionally
|
|
@@ -16,7 +16,7 @@ import "../../IconButton/IconButton.js";
|
|
|
16
16
|
import "../../Input/Input.js";
|
|
17
17
|
import "../../InputField/InputField.js";
|
|
18
18
|
import "react-router";
|
|
19
|
-
import { a as C } from "../../../TablePlugin-
|
|
19
|
+
import { a as C } from "../../../TablePlugin-CfTWvWk1.js";
|
|
20
20
|
import "../../RteEditor/Providers/LanguageProvider.js";
|
|
21
21
|
import "../../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
22
|
import "../../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o, jsxs as d, Fragment as r } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as n, s as t, f as a } from "../../react.esm-
|
|
2
|
+
import "../../index-JOHbZ4si.js";
|
|
3
|
+
import { r as n, s as t, f as a } from "../../react.esm-Bg7Fh9lz.js";
|
|
4
4
|
import { MultiSelectBox as l } from "./MultiSelectBox.js";
|
|
5
5
|
const i = jest.fn(), c = [
|
|
6
6
|
{ label: "Option 1", value: "1" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as i, s as t } from "../../react.esm-
|
|
2
|
+
import "../../index-JOHbZ4si.js";
|
|
3
|
+
import { r as i, s as t } from "../../react.esm-Bg7Fh9lz.js";
|
|
4
4
|
import { Notification as n } from "./Notification.js";
|
|
5
5
|
describe("Notification", () => {
|
|
6
6
|
it("renders title and subtitle", () => {
|
|
@@ -18,7 +18,7 @@ import "../Input/Input.js";
|
|
|
18
18
|
import "../InputField/InputField.js";
|
|
19
19
|
import { Label as I } from "../Label/Label.js";
|
|
20
20
|
import "react-router";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-CfTWvWk1.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -18,7 +18,7 @@ import "../GridRow/GridRow.js";
|
|
|
18
18
|
import "../IconButton/IconButton.js";
|
|
19
19
|
import "../Input/Input.js";
|
|
20
20
|
import "../InputField/InputField.js";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-CfTWvWk1.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as l, s as t, f as s } from "../../react.esm-
|
|
2
|
+
import "../../index-JOHbZ4si.js";
|
|
3
|
+
import { r as l, s as t, f as s } from "../../react.esm-Bg7Fh9lz.js";
|
|
4
4
|
import { RadioGroup as a } from "./RadioGroup.js";
|
|
5
5
|
const i = [
|
|
6
6
|
{ id: "1", titleLabel: "Option 1", value: "option1" },
|
|
@@ -18,7 +18,7 @@ import "../IconButton/IconButton.js";
|
|
|
18
18
|
import "../Input/Input.js";
|
|
19
19
|
import "../InputField/InputField.js";
|
|
20
20
|
import "react-router";
|
|
21
|
-
import "../../TablePlugin-
|
|
21
|
+
import "../../TablePlugin-CfTWvWk1.js";
|
|
22
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
23
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
24
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
@@ -15,7 +15,7 @@ import "../../IconButton/IconButton.js";
|
|
|
15
15
|
import "../../Input/Input.js";
|
|
16
16
|
import "../../InputField/InputField.js";
|
|
17
17
|
import "react-router";
|
|
18
|
-
import "../../../TablePlugin-
|
|
18
|
+
import "../../../TablePlugin-CfTWvWk1.js";
|
|
19
19
|
import "../Providers/LanguageProvider.js";
|
|
20
20
|
import "../Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "../hooks/components/Flyout.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { o as
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
2
|
+
import { o as f } from "../../../../LexicalComposerContext.prod-DOyoZx0P.js";
|
|
3
|
+
import { c as u } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { a as _, f as p, V as h } from "../../../../Lexical.prod-DBU6xTBY.js";
|
|
5
5
|
import { useState as l, useEffect as k } from "react";
|
|
6
6
|
import { Icon as I } from "../../../Icon/Icon.js";
|
|
7
7
|
import { s as a } from "../../../../RteEditor.module-CovRFt0S.js";
|
|
@@ -9,8 +9,8 @@ import { useTranslation as B } from "../../hooks/useTranslation.js";
|
|
|
9
9
|
const C = {
|
|
10
10
|
bold: "Bold",
|
|
11
11
|
italic: "Italic"
|
|
12
|
-
}, T = ["bold", "italic"],
|
|
13
|
-
const t = B(), [i] =
|
|
12
|
+
}, T = ["bold", "italic"], E = () => {
|
|
13
|
+
const t = B(), [i] = f(), [e, c] = l(!1), [n, m] = l(!1), d = (o) => {
|
|
14
14
|
i.dispatchCommand(h, o);
|
|
15
15
|
};
|
|
16
16
|
return k(() => {
|
|
@@ -28,7 +28,7 @@ const C = {
|
|
|
28
28
|
{
|
|
29
29
|
onClick: () => d(o),
|
|
30
30
|
title: o === "bold" ? t.format.boldTooltip : t.format.italicTooltip,
|
|
31
|
-
className:
|
|
31
|
+
className: u(
|
|
32
32
|
a["editor__toolbar-button"],
|
|
33
33
|
a[`editor__toolbar-button--${o}`],
|
|
34
34
|
o === "bold" && e && a["editor__toolbar-button--active"],
|
|
@@ -43,6 +43,6 @@ const C = {
|
|
|
43
43
|
)) });
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
E as BlockFormatPlugin
|
|
47
47
|
};
|
|
48
48
|
//# sourceMappingURL=BlockFormatPlugin.js.map
|
|
@@ -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 { as as _, at as y, au as C, av as k } from "../../../../Lexical.prod-DBU6xTBY.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-CfTWvWk1.js";
|
|
22
22
|
import { s as r } from "../../../../RteEditor.module-CovRFt0S.js";
|
|
23
|
-
import { useTranslation as
|
|
23
|
+
import { useTranslation as g } from "../../hooks/useTranslation.js";
|
|
24
24
|
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
25
25
|
import "../../hooks/components/Flyout.js";
|
|
26
26
|
import "react-dom";
|
|
@@ -33,8 +33,8 @@ import "../../../Sortable/components/SortableItem.js";
|
|
|
33
33
|
import "../../../../SortableProvider-l8-7ClBJ.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(C, void 0);
|
|
38
38
|
}, b = () => {
|
|
39
39
|
t.dispatchCommand(k, void 0);
|
|
40
40
|
};
|
|
@@ -43,7 +43,7 @@ const ro = () => {
|
|
|
43
43
|
(a) => (d(a), !1),
|
|
44
44
|
1
|
|
45
45
|
), [t]), s(() => t.registerCommand(
|
|
46
|
-
|
|
46
|
+
y,
|
|
47
47
|
(a) => (c(a), !1),
|
|
48
48
|
1
|
|
49
49
|
), [t]), /* @__PURE__ */ f("div", { className: r["editor__toolbar-button-group"], children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { A as I } from "../../../../../TablePlugin-
|
|
4
|
-
import "
|
|
3
|
+
import { A as I } from "../../../../../TablePlugin-CfTWvWk1.js";
|
|
4
|
+
import "../helpers.js";
|
|
5
5
|
import "../../../../Accordion/Accordion.js";
|
|
6
6
|
import "../../../../Icon/Icon.js";
|
|
7
7
|
import "../../../../Buttons/Button.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as u, Fragment as L, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as K, useState as d, useRef as N, useImperativeHandle as T, useLayoutEffect as g } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { ensureHttps as E } from "../helpers.js";
|
|
4
4
|
import { Icon as k } from "../../../../Icon/Icon.js";
|
|
5
5
|
import { useTranslation as R } from "../../../hooks/useTranslation.js";
|
|
6
6
|
import { Button as b } from "../../../../Buttons/Button.js";
|
|
@@ -12,19 +12,19 @@ import '../../../../../assets/LinkContextMenu.css';const i = {
|
|
|
12
12
|
"link-context-menu__button": "_link-context-menu__button_139l7_25",
|
|
13
13
|
"link-context-menu__actions": "_link-context-menu__actions_139l7_36"
|
|
14
14
|
}, I = K(({ url: l, onSave: y, onDelete: f, onClose: h }, x) => {
|
|
15
|
-
const t = R(), [m, o] = d(l), [
|
|
15
|
+
const t = R(), [m, o] = d(l), [s, c] = d(!1), a = N(null), r = () => {
|
|
16
16
|
o(l), c(!1), a.current?.blur();
|
|
17
17
|
}, w = () => {
|
|
18
|
-
y(m),
|
|
18
|
+
y(m), r();
|
|
19
19
|
}, _ = () => {
|
|
20
|
-
f(), o(""),
|
|
20
|
+
f(), o(""), r();
|
|
21
21
|
}, C = () => {
|
|
22
|
-
|
|
22
|
+
r(), h();
|
|
23
23
|
}, p = () => {
|
|
24
24
|
window.open(E(l), "_blank");
|
|
25
25
|
};
|
|
26
26
|
return T(x, () => ({
|
|
27
|
-
clearForm:
|
|
27
|
+
clearForm: r
|
|
28
28
|
})), g(() => {
|
|
29
29
|
o(l), window.addEventListener("keydown", (e) => {
|
|
30
30
|
e.ctrlKey && e.shiftKey && e.key === "L" && (c(!0), setTimeout(() => a.current?.focus(), 0)), e.ctrlKey && e.shiftKey && e.code === "Digit1" && (p(), setTimeout(() => a.current?.focus(), 0)), e.ctrlKey && e.shiftKey && e.key === "Q" && (_(), setTimeout(() => a.current?.focus(), 0));
|
|
@@ -38,11 +38,11 @@ import '../../../../../assets/LinkContextMenu.css';const i = {
|
|
|
38
38
|
value: m,
|
|
39
39
|
onChange: (e) => o(e.target.value),
|
|
40
40
|
className: i["link-context-menu__input"],
|
|
41
|
-
disabled: !
|
|
41
|
+
disabled: !s,
|
|
42
42
|
ref: a
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
!
|
|
45
|
+
!s && /* @__PURE__ */ n(
|
|
46
46
|
"button",
|
|
47
47
|
{
|
|
48
48
|
type: "button",
|
|
@@ -79,7 +79,7 @@ import '../../../../../assets/LinkContextMenu.css';const i = {
|
|
|
79
79
|
}
|
|
80
80
|
)
|
|
81
81
|
] }),
|
|
82
|
-
|
|
82
|
+
s && /* @__PURE__ */ u("div", { className: i["link-context-menu__actions"], children: [
|
|
83
83
|
/* @__PURE__ */ n(b, { variant: "secondary", onClick: C, "aria-label": t.common.cancel, type: "button", children: t.common.cancel }),
|
|
84
84
|
/* @__PURE__ */ n(b, { variant: "primary", onClick: w, "aria-label": t.aria.labels.linkOkButton, type: "button", children: t.links.addLink })
|
|
85
85
|
] })
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as k, jsxs as
|
|
1
|
+
import { jsx as k, 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 {
|
|
5
|
-
import { useRef as a, useState as
|
|
6
|
-
import {
|
|
7
|
-
import { A as rt } from "../../../../TablePlugin-
|
|
8
|
-
import {
|
|
4
|
+
import { w as I, P as q, J as G } from "../../../../LexicalLink.prod-DV9kT537.js";
|
|
5
|
+
import { useRef as a, useState as Q, useEffect as m } from "react";
|
|
6
|
+
import { a0 as X, a as p, p as Z, ar as $, f as w, A as tt, a1 as et, t as ot } from "../../../../Lexical.prod-DBU6xTBY.js";
|
|
7
|
+
import { A as rt } from "../../../../TablePlugin-CfTWvWk1.js";
|
|
8
|
+
import { ensureHttps as nt } from "./helpers.js";
|
|
9
9
|
import { LinkContextMenu as it } from "./LinkContextMenu/LinkContextMenu.js";
|
|
10
10
|
import { useFlyout as st } from "../../hooks/useFlyout.js";
|
|
11
11
|
import "../../../Accordion/Accordion.js";
|
|
@@ -23,7 +23,7 @@ import "../../../IconButton/IconButton.js";
|
|
|
23
23
|
import "../../../Input/Input.js";
|
|
24
24
|
import "../../../InputField/InputField.js";
|
|
25
25
|
import "react-router";
|
|
26
|
-
import { setScrollableContainers as
|
|
26
|
+
import { setScrollableContainers as A, removeScrollableContainers as lt } from "../../helpers.js";
|
|
27
27
|
import { s as h } from "../../../../RteEditor.module-CovRFt0S.js";
|
|
28
28
|
import { useTranslation as at } from "../../hooks/useTranslation.js";
|
|
29
29
|
import "react-dom";
|
|
@@ -38,7 +38,7 @@ import "../../../WeekSelector/components/WeekSelectorOptionContainer.js";
|
|
|
38
38
|
const ut = 200, B = (f) => {
|
|
39
39
|
let n = f;
|
|
40
40
|
for (; n; ) {
|
|
41
|
-
if (
|
|
41
|
+
if (I(n))
|
|
42
42
|
return n;
|
|
43
43
|
n = n.getParent();
|
|
44
44
|
}
|
|
@@ -46,7 +46,7 @@ const ut = 200, B = (f) => {
|
|
|
46
46
|
}, z = (f) => {
|
|
47
47
|
let n = f;
|
|
48
48
|
for (; n; ) {
|
|
49
|
-
if (
|
|
49
|
+
if (I(n))
|
|
50
50
|
return {
|
|
51
51
|
active: !0,
|
|
52
52
|
url: n.getURL(),
|
|
@@ -56,7 +56,7 @@ const ut = 200, B = (f) => {
|
|
|
56
56
|
}
|
|
57
57
|
return !1;
|
|
58
58
|
}, qt = ({ parentScrollPosition: f }) => {
|
|
59
|
-
const n = at(), [c] = W(), { flyout:
|
|
59
|
+
const n = at(), [c] = W(), { flyout: M, showFlyout: P, hideFlyout: C, isVisible: u } = st(), d = a(void 0), N = a(!1), y = a(""), g = a(""), [L, O] = Q({ active: !1, url: "", linktext: "" }), _ = a(u), x = a(null), S = a(null), T = a(void 0), v = () => {
|
|
60
60
|
c.update(() => {
|
|
61
61
|
const o = p();
|
|
62
62
|
x.current = o;
|
|
@@ -65,15 +65,15 @@ const ut = 200, B = (f) => {
|
|
|
65
65
|
c.update(() => {
|
|
66
66
|
x.current && et(x.current);
|
|
67
67
|
});
|
|
68
|
-
},
|
|
69
|
-
|
|
68
|
+
}, U = (o, t) => {
|
|
69
|
+
P({
|
|
70
70
|
position: t,
|
|
71
71
|
children: /* @__PURE__ */ k(
|
|
72
72
|
it,
|
|
73
73
|
{
|
|
74
74
|
url: o,
|
|
75
|
-
onSave: (e) =>
|
|
76
|
-
onDelete: () =>
|
|
75
|
+
onSave: (e) => K(e, ""),
|
|
76
|
+
onDelete: () => H(),
|
|
77
77
|
onClose: D,
|
|
78
78
|
ref: T
|
|
79
79
|
}
|
|
@@ -83,10 +83,10 @@ const ut = 200, B = (f) => {
|
|
|
83
83
|
T.current?.clearForm(), C(), R();
|
|
84
84
|
}, F = () => {
|
|
85
85
|
const o = S.current?.getBoundingClientRect();
|
|
86
|
-
!N.current && o && (
|
|
86
|
+
!N.current && o && (v(), P({ position: { top: o.bottom, left: o.left }, ...V }), setTimeout(() => d.current?.setDefaults("", g.current), 0));
|
|
87
87
|
}, b = () => {
|
|
88
88
|
C(), R();
|
|
89
|
-
},
|
|
89
|
+
}, K = (o, t) => {
|
|
90
90
|
c.update(() => {
|
|
91
91
|
const e = p();
|
|
92
92
|
if (w(e)) {
|
|
@@ -96,7 +96,7 @@ const ut = 200, B = (f) => {
|
|
|
96
96
|
const l = ot(t);
|
|
97
97
|
s.replace(l), l.select();
|
|
98
98
|
}
|
|
99
|
-
if (t !==
|
|
99
|
+
if (t !== y.current && y.current === "") {
|
|
100
100
|
const { anchor: l, focus: E } = e;
|
|
101
101
|
e.insertText(t), l.offset -= t.length, E.offset = l.offset + t.length;
|
|
102
102
|
}
|
|
@@ -105,28 +105,28 @@ const ut = 200, B = (f) => {
|
|
|
105
105
|
}
|
|
106
106
|
b();
|
|
107
107
|
});
|
|
108
|
-
},
|
|
108
|
+
}, H = () => {
|
|
109
109
|
c.dispatchCommand(q, null), D();
|
|
110
110
|
}, V = {
|
|
111
111
|
children: /* @__PURE__ */ k(
|
|
112
112
|
rt,
|
|
113
113
|
{
|
|
114
|
-
isLink:
|
|
114
|
+
isLink: L,
|
|
115
115
|
onCloseHandler: b,
|
|
116
|
-
onSaveHandler: (o, t) =>
|
|
116
|
+
onSaveHandler: (o, t) => K(o, t),
|
|
117
117
|
ref: d
|
|
118
118
|
}
|
|
119
119
|
)
|
|
120
120
|
};
|
|
121
121
|
return m(() => {
|
|
122
|
-
u ? (N.current = !0, d.current?.focusFirstField()) : (d.current?.clearForm(),
|
|
122
|
+
u ? (N.current = !0, d.current?.focusFirstField()) : (d.current?.clearForm(), y.current = g.current = "", setTimeout(() => N.current = !1, ut));
|
|
123
123
|
}, [d, u]), m(() => {
|
|
124
124
|
const o = (r) => {
|
|
125
125
|
if (w(r) && r.isCollapsed()) {
|
|
126
126
|
const i = z(r.anchor.getNode());
|
|
127
127
|
if (i) {
|
|
128
128
|
const s = c.getElementByKey(r.anchor.getNode().getKey()), l = s ? { top: s.getBoundingClientRect().bottom, left: s.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
129
|
-
return
|
|
129
|
+
return U(i.url, l), !0;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
return !1;
|
|
@@ -141,7 +141,7 @@ const ut = 200, B = (f) => {
|
|
|
141
141
|
Z,
|
|
142
142
|
(r) => {
|
|
143
143
|
const i = p();
|
|
144
|
-
return
|
|
144
|
+
return v(), r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation(), o(i), !1;
|
|
145
145
|
},
|
|
146
146
|
0
|
|
147
147
|
);
|
|
@@ -154,13 +154,13 @@ const ut = 200, B = (f) => {
|
|
|
154
154
|
(e) => {
|
|
155
155
|
if (e.ctrlKey && e.shiftKey && e.key === "U") {
|
|
156
156
|
const r = p();
|
|
157
|
-
if (
|
|
157
|
+
if (v(), !w(r))
|
|
158
158
|
return !1;
|
|
159
159
|
const i = z(r.anchor.getNode()), s = (E = "", j = "") => {
|
|
160
160
|
F(), setTimeout(() => d.current?.setDefaults(E, j), 0);
|
|
161
161
|
};
|
|
162
162
|
if (i)
|
|
163
|
-
return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(),
|
|
163
|
+
return e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), y.current = i.linktext, s(i.url, i.linktext), !0;
|
|
164
164
|
const l = r.getTextContent();
|
|
165
165
|
return l !== "" ? (g.current = l, s("", g.current), !0) : (F(), !0);
|
|
166
166
|
}
|
|
@@ -168,10 +168,10 @@ const ut = 200, B = (f) => {
|
|
|
168
168
|
},
|
|
169
169
|
tt
|
|
170
170
|
), t = c.registerUpdateListener(({ editorState: e }) => {
|
|
171
|
-
|
|
171
|
+
O(
|
|
172
172
|
e.read(() => {
|
|
173
173
|
const r = p();
|
|
174
|
-
if (
|
|
174
|
+
if (v(), w(r)) {
|
|
175
175
|
const i = r.anchor.getNode(), s = B(i);
|
|
176
176
|
if (s)
|
|
177
177
|
return {
|
|
@@ -192,21 +192,21 @@ const ut = 200, B = (f) => {
|
|
|
192
192
|
o(), t();
|
|
193
193
|
};
|
|
194
194
|
}, [c]), m(() => {
|
|
195
|
-
|
|
195
|
+
_.current = u, u || T.current?.clearForm();
|
|
196
196
|
}, [u]), m(() => {
|
|
197
197
|
u && b();
|
|
198
198
|
}, [f]), m(() => {
|
|
199
|
-
|
|
200
|
-
}, [
|
|
201
|
-
const o = (e) => (
|
|
199
|
+
L.active || C();
|
|
200
|
+
}, [L]), m(() => {
|
|
201
|
+
const o = (e) => (A(t), e.key === "Escape" && _.current && (e.preventDefault(), e.stopPropagation(), b()), !0);
|
|
202
202
|
window.addEventListener("keydown", o, { capture: !0 });
|
|
203
203
|
const t = () => {
|
|
204
204
|
C();
|
|
205
205
|
};
|
|
206
|
-
return
|
|
206
|
+
return A(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
207
207
|
window.removeEventListener("keydown", o), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), lt(t);
|
|
208
208
|
};
|
|
209
|
-
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */
|
|
209
|
+
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ J("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
|
|
210
210
|
/* @__PURE__ */ k(
|
|
211
211
|
"button",
|
|
212
212
|
{
|
|
@@ -215,7 +215,7 @@ const ut = 200, B = (f) => {
|
|
|
215
215
|
className: Y(
|
|
216
216
|
h["editor__toolbar-button"],
|
|
217
217
|
h["editor__toolbar-button--link"],
|
|
218
|
-
|
|
218
|
+
L.active && h["editor__toolbar-button--active"]
|
|
219
219
|
),
|
|
220
220
|
"aria-label": n.aria.labels.link,
|
|
221
221
|
"aria-keyshortcuts": n.aria.keyshortcuts.link,
|
|
@@ -224,7 +224,7 @@ const ut = 200, B = (f) => {
|
|
|
224
224
|
children: /* @__PURE__ */ k(ct, { name: "Link", size: 20 })
|
|
225
225
|
}
|
|
226
226
|
),
|
|
227
|
-
|
|
227
|
+
M
|
|
228
228
|
] }) });
|
|
229
229
|
};
|
|
230
230
|
export {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as w } from "../../../../LexicalLink.prod-DV9kT537.js";
|
|
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
|
+
w(s, (t) => a.test(t) ? t : `//${t}`),
|
|
4
|
+
w(A, (t) => `mailto:${t}`)
|
|
5
|
+
], e = (t) => /^https?:\/\//i.test(t) ? t : `https://${t}`;
|
|
2
6
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
r as MATCHERS,
|
|
8
|
+
e as ensureHttps,
|
|
9
|
+
n as validateUrl,
|
|
10
|
+
o as validateUrlWithProtocol
|
|
7
11
|
};
|
|
8
12
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../src/components/RteEditor/Plugins/LinkPlugin/helpers.ts"],"sourcesContent":["import { createLinkMatcherWithRegExp } from '@lexical/react/LexicalAutoLinkPlugin';\n\nconst PROTOCOL_REGEX = /^(http|https):\\/\\//;\n\nconst URL_REGEX =\n /(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\nconst EMAIL_REGEX =\n /(([^<>()[\\]\\\\.,;:\\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,}))/;\n\nconst URL_REGEX_OR_BLANK =\n /^(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\nexport const validateUrl = (url: string): boolean => {\n return url === 'https://' || URL_REGEX.test(url);\n};\n\nexport const validateUrlWithProtocol = (url: string): boolean => {\n return url === 'https://' || URL_REGEX_OR_BLANK.test(url);\n};\n\nexport const MATCHERS = [\n createLinkMatcherWithRegExp(URL_REGEX, (text: string): string => {\n return !PROTOCOL_REGEX.test(text) ? `//${text}` : text;\n }),\n createLinkMatcherWithRegExp(EMAIL_REGEX, (text) => {\n return `mailto:${text}`;\n }),\n];\n\nexport const ensureHttps = (url: string) => {\n if (!/^https?:\\/\\//i.test(url)) {\n return `https://${url}`;\n }\n return url;\n};\n"],"names":["PROTOCOL_REGEX","URL_REGEX","EMAIL_REGEX","URL_REGEX_OR_BLANK","validateUrl","url","validateUrlWithProtocol","MATCHERS","createLinkMatcherWithRegExp","text","ensureHttps"],"mappings":";AAEA,MAAMA,IAAiB,sBAEjBC,IACJ,qNAEIC,IACJ,uJAEIC,IACJ,wNAEWC,IAAc,CAACC,MACnBA,MAAQ,cAAcJ,EAAU,KAAKI,CAAG,GAGpCC,IAA0B,CAACD,MAC/BA,MAAQ,cAAcF,EAAmB,KAAKE,CAAG,GAG7CE,IAAW;AAAA,EACtBC,EAA4BP,GAAW,CAACQ,MAC9BT,EAAe,KAAKS,CAAI,IAAkBA,IAAd,KAAKA,CAAI,EAC9C;AAAA,EACDD,EAA4BN,GAAa,CAACO,MACjC,UAAUA,CAAI,EACtB;AACH,GAEaC,IAAc,CAACL,MACrB,gBAAgB,KAAKA,CAAG,IAGtBA,IAFE,WAAWA,CAAG;"}
|