@uva-glass/component-library 3.10.0 → 3.11.0
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-CWyHQUEM.js → Lexical.prod-D8x7Ii0F.js} +469 -469
- package/dist/{Lexical.prod-CWyHQUEM.js.map → Lexical.prod-D8x7Ii0F.js.map} +1 -1
- package/dist/{LexicalClipboard.prod-DbqSWANZ.js → LexicalClipboard.prod-D5GjiArS.js} +16 -16
- package/dist/{LexicalClipboard.prod-DbqSWANZ.js.map → LexicalClipboard.prod-D5GjiArS.js.map} +1 -1
- package/dist/{LexicalLink.prod-DbxnRszt.js → LexicalLink.prod-CkldFE8u.js} +60 -60
- package/dist/{LexicalLink.prod-DbxnRszt.js.map → LexicalLink.prod-CkldFE8u.js.map} +1 -1
- package/dist/{LexicalList.prod-pZmYrwOC.js → LexicalList.prod-CsVDXdmw.js} +215 -215
- package/dist/LexicalList.prod-CsVDXdmw.js.map +1 -0
- package/dist/LexicalSelection.prod-JQDTaUpX.js +90 -0
- package/dist/{LexicalSelection.prod-DkvWlcln.js.map → LexicalSelection.prod-JQDTaUpX.js.map} +1 -1
- package/dist/{LexicalTable.prod-C6duSS2P.js → LexicalTable.prod-rZbTmo9K.js} +125 -125
- package/dist/{LexicalTable.prod-C6duSS2P.js.map → LexicalTable.prod-rZbTmo9K.js.map} +1 -1
- package/dist/{LexicalUtils.prod-Dny9Fu94.js → LexicalUtils.prod-CpMJ4I9h.js} +6 -6
- package/dist/{LexicalUtils.prod-Dny9Fu94.js.map → LexicalUtils.prod-CpMJ4I9h.js.map} +1 -1
- package/dist/{SelectListbox.module-BD2qbcmZ.js → SelectListbox.module-ignbxWNU.js} +21 -21
- package/dist/SelectListbox.module-ignbxWNU.js.map +1 -0
- package/dist/{SortableProvider-Ck_XnBVq.js → SortableProvider-DZggDO3M.js} +20 -20
- package/dist/{SortableProvider-Ck_XnBVq.js.map → SortableProvider-DZggDO3M.js.map} +1 -1
- package/dist/{TablePlugin-Ba6PaBhf.js → TablePlugin-WOgWan8s.js} +36 -36
- package/dist/{TablePlugin-Ba6PaBhf.js.map → TablePlugin-WOgWan8s.js.map} +1 -1
- package/dist/assets/MultiSelectBox.css +1 -0
- package/dist/assets/SelectListbox.css +1 -1
- 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.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +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.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +2 -2
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +3 -3
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FormInput/FormInput.js +3 -3
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.js +17 -17
- package/dist/components/InputField/InputField.stories.js +17 -17
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -3
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.d.ts +16 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.js +191 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.d.ts +5 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +31 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +1 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.d.ts +0 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +26 -0
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -0
- package/dist/components/MultiSelectBox/index.d.ts +1 -0
- package/dist/components/MultiSelectBox/index.js +5 -0
- package/dist/components/MultiSelectBox/index.js.map +1 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js +3 -3
- package/dist/components/PeriodSelector/PeriodSelector.js +3 -3
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -3
- package/dist/components/RadioButton/RadioButton.js +3 -3
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -3
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +14 -14
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +23 -23
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +40 -40
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/Providers/LanguageProvider.js +7 -7
- package/dist/components/RteEditor/RteEditor.js +327 -327
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +10 -10
- package/dist/components/SelectListbox/components/SelectButton.js +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js +1 -1
- package/dist/components/SelectListbox/components/SelectOptionBox.js +1 -1
- package/dist/components/Sortable/Sortable.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/SortableProvider.js +1 -1
- package/dist/components/Sortable/components/SortableContainer.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js +15 -15
- package/dist/components/Sortable/sortableReducer.js +21 -21
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/TextArea/TextArea.js +2 -2
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/Timeline/Timeline.test.js +5 -5
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +22 -22
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/hooks/useDebounce.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +53 -51
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-BUwfVZhW.js → helpers-E_SsILnP.js} +10 -10
- package/dist/{helpers-BUwfVZhW.js.map → helpers-E_SsILnP.js.map} +1 -1
- package/dist/{index-DXR-TB1d.js → index-BCvy9BiK.js} +1886 -1886
- package/dist/{index-DXR-TB1d.js.map → index-BCvy9BiK.js.map} +1 -1
- package/dist/{index-dmBn99rF.js → index-BqLi4tOb.js} +908 -908
- package/dist/{index-dmBn99rF.js.map → index-BqLi4tOb.js.map} +1 -1
- package/dist/{index-B3c5pcHk.js → index-DllfJcv4.js} +32 -32
- package/dist/{index-B3c5pcHk.js.map → index-DllfJcv4.js.map} +1 -1
- package/dist/{index-Ck15_vKo.js → index-xaEX581l.js} +481 -481
- package/dist/{index-Ck15_vKo.js.map → index-xaEX581l.js.map} +1 -1
- package/dist/index.js +53 -51
- package/dist/index.js.map +1 -1
- package/dist/{react.esm-CMg7bmSn.js → react.esm-PmLHNn73.js} +3 -3
- package/dist/{react.esm-CMg7bmSn.js.map → react.esm-PmLHNn73.js.map} +1 -1
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +2 -2
- package/dist/{test-utils-B2AIdiiO.js → test-utils-grX3FDss.js} +157 -157
- package/dist/{test-utils-B2AIdiiO.js.map → test-utils-grX3FDss.js.map} +1 -1
- package/package.json +6 -6
- package/dist/LexicalList.prod-pZmYrwOC.js.map +0 -1
- package/dist/LexicalSelection.prod-DkvWlcln.js +0 -90
- package/dist/SelectListbox.module-BD2qbcmZ.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { CLEAR_DRAGGING_SOURCE as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { CLEAR_DRAGGING_SOURCE as s, CLEAR_DRAGGING_TARGET as c, MOVE_TO_POSITION as l, SET_DRAGGING_SOURCE as u, SET_DRAGGING_TARGET as t, DROP as S, RESET as p, DRAG_END as T, DRAG_START as R, SET_CLONE as m } from "./constants.js";
|
|
3
|
+
const G = {
|
|
4
4
|
clone: void 0,
|
|
5
5
|
draggingSource: void 0,
|
|
6
6
|
draggingTarget: void 0,
|
|
@@ -8,75 +8,75 @@ const m = {
|
|
|
8
8
|
itemsBeforeDrag: [],
|
|
9
9
|
maxIndex: 0,
|
|
10
10
|
sortableItems: []
|
|
11
|
-
},
|
|
12
|
-
function
|
|
13
|
-
return g.splice(e, 1), [...g.splice(r, 0, /* @__PURE__ */
|
|
11
|
+
}, d = (e, r, ...g) => (e === r || g.splice(r, 0, ...g.splice(e, 1)), g);
|
|
12
|
+
function E(e, r, ...g) {
|
|
13
|
+
return g.splice(e, 1), [...g.splice(r, 0, /* @__PURE__ */ n("span", {})), ...g];
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const _ = (e = G, r) => {
|
|
16
16
|
const g = e;
|
|
17
17
|
switch (r.type) {
|
|
18
|
-
case
|
|
18
|
+
case m:
|
|
19
19
|
return {
|
|
20
20
|
...e,
|
|
21
21
|
clone: r.payload
|
|
22
22
|
};
|
|
23
|
-
case
|
|
23
|
+
case R:
|
|
24
24
|
return {
|
|
25
25
|
...e,
|
|
26
26
|
draggingSource: r.payload,
|
|
27
27
|
itemsBeforeDrag: e.sortableItems
|
|
28
28
|
};
|
|
29
|
-
case
|
|
29
|
+
case T:
|
|
30
30
|
return {
|
|
31
31
|
...e,
|
|
32
32
|
draggingSource: void 0,
|
|
33
33
|
draggingTarget: void 0
|
|
34
34
|
};
|
|
35
|
-
case
|
|
35
|
+
case p:
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
38
38
|
draggingTarget: void 0,
|
|
39
39
|
sortableItems: e.itemsBeforeDrag
|
|
40
40
|
};
|
|
41
41
|
case S: {
|
|
42
|
-
const
|
|
42
|
+
const o = d(g.draggingSource, r.payload, ...e.itemsBeforeDrag), i = o.map(({ props: a }) => a.index);
|
|
43
43
|
return {
|
|
44
44
|
...e,
|
|
45
45
|
clone: void 0,
|
|
46
46
|
draggingSource: void 0,
|
|
47
47
|
draggingTarget: void 0,
|
|
48
48
|
indices: i,
|
|
49
|
-
sortableItems:
|
|
49
|
+
sortableItems: o
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
case t:
|
|
53
53
|
return {
|
|
54
54
|
...e,
|
|
55
55
|
draggingTarget: r.payload,
|
|
56
|
-
sortableItems:
|
|
56
|
+
sortableItems: E(
|
|
57
57
|
g.draggingSource,
|
|
58
58
|
r.payload,
|
|
59
59
|
...e.itemsBeforeDrag
|
|
60
60
|
)
|
|
61
61
|
};
|
|
62
|
-
case
|
|
62
|
+
case u:
|
|
63
63
|
return {
|
|
64
64
|
...e,
|
|
65
65
|
draggingSource: r.payload
|
|
66
66
|
};
|
|
67
|
-
case
|
|
67
|
+
case l:
|
|
68
68
|
return {
|
|
69
69
|
...e,
|
|
70
70
|
draggingTarget: r.payload,
|
|
71
71
|
draggingSource: r.payload,
|
|
72
|
-
sortableItems:
|
|
72
|
+
sortableItems: d(g.draggingSource, r.payload, ...e.sortableItems)
|
|
73
73
|
};
|
|
74
|
-
case
|
|
74
|
+
case c:
|
|
75
75
|
return {
|
|
76
76
|
...e,
|
|
77
77
|
draggingTarget: void 0
|
|
78
78
|
};
|
|
79
|
-
case
|
|
79
|
+
case s:
|
|
80
80
|
return {
|
|
81
81
|
...e,
|
|
82
82
|
draggingSource: void 0
|
|
@@ -86,7 +86,7 @@ const D = (e = m, r) => {
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
G as initialState,
|
|
90
|
+
_ as sortableReducer
|
|
91
91
|
};
|
|
92
92
|
//# sourceMappingURL=sortableReducer.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as t, s } from "../../react.esm-
|
|
2
|
+
import "../../index-BqLi4tOb.js";
|
|
3
|
+
import { r as t, s } from "../../react.esm-PmLHNn73.js";
|
|
4
4
|
import { StatusBadge as a } from "./StatusBage.js";
|
|
5
5
|
describe("StatusBadge", () => {
|
|
6
6
|
it("should render with message", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as _ } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as i, useState as u } from "react";
|
|
3
3
|
import { c as x } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import '../../assets/TextArea.css';const t = {
|
|
5
5
|
"text-area__wrapper": "_text-area__wrapper_13ivw_1",
|
|
@@ -10,7 +10,7 @@ import '../../assets/TextArea.css';const t = {
|
|
|
10
10
|
"text-area": "_text-area_13ivw_1"
|
|
11
11
|
};
|
|
12
12
|
function h({ onChange: l, label: c, maxCharacters: a = 0 }) {
|
|
13
|
-
const e =
|
|
13
|
+
const e = i(null), [n, o] = u(0), s = () => {
|
|
14
14
|
e.current && (e.current.style.height = "auto", e.current.style.height = `${e.current.scrollHeight}px`, o(e.current.value.length), l(e.current.value.trim()));
|
|
15
15
|
};
|
|
16
16
|
return /* @__PURE__ */ r("div", { className: t["text-area__wrapper"], children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { fn as r } from "../../index-
|
|
2
|
+
import { fn as r } from "../../index-BCvy9BiK.js";
|
|
3
3
|
import { TextArea as e } from "./TextArea.js";
|
|
4
4
|
const o = `
|
|
5
5
|
<TextArea label={label} maxCharacters={maxCharacters} /> `, x = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as n, s as t, f as r } from "../../react.esm-
|
|
4
|
-
import { userEvent as s } from "../../index-
|
|
2
|
+
import "../../index-BqLi4tOb.js";
|
|
3
|
+
import { r as n, s as t, f as r } from "../../react.esm-PmLHNn73.js";
|
|
4
|
+
import { userEvent as s } from "../../index-BCvy9BiK.js";
|
|
5
5
|
import { TextArea as o } from "./TextArea.js";
|
|
6
6
|
describe("TextArea", () => {
|
|
7
7
|
it("should render correctly with label", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as n, s as e, f as i } from "../../react.esm-
|
|
2
|
+
import "../../index-BqLi4tOb.js";
|
|
3
|
+
import { r as n, s as e, f as i } from "../../react.esm-PmLHNn73.js";
|
|
4
4
|
import { MOCK_TIMELINE_ITEM as r } from "./mockTimelineItem.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "../Buttons/Button.js";
|
|
@@ -16,15 +16,15 @@ import "../IconButton/IconButton.js";
|
|
|
16
16
|
import "../Input/Input.js";
|
|
17
17
|
import "../InputField/InputField.js";
|
|
18
18
|
import "react-router";
|
|
19
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-WOgWan8s.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";
|
|
23
|
-
import "../../index-
|
|
23
|
+
import "../../index-DllfJcv4.js";
|
|
24
24
|
import "../SelectListbox/SelectListbox.js";
|
|
25
25
|
import "../SelectListbox/SelectProvider.js";
|
|
26
26
|
import "../Sortable/components/SortableItem.js";
|
|
27
|
-
import "../../SortableProvider-
|
|
27
|
+
import "../../SortableProvider-DZggDO3M.js";
|
|
28
28
|
import { Timeline as p } from "./Timeline.js";
|
|
29
29
|
describe("should render", () => {
|
|
30
30
|
it("should render completed items", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { fn as l } from "../../index-
|
|
2
|
+
import { fn as l } from "../../index-BCvy9BiK.js";
|
|
3
3
|
import { ToggleSwitch as e } from "./ToggleSwitch.js";
|
|
4
4
|
const n = `
|
|
5
5
|
// Has all InputHTMLAttributes props available except "className" and "style"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as M, jsx as R } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as y, useState as E, useCallback as b, useEffect as
|
|
3
|
-
import '../../assets/Tooltip.css';const j = "_tooltip_small_g4g5w_8", I = "_tooltip_medium_g4g5w_9", N = "_tooltip_large_g4g5w_10",
|
|
2
|
+
import { useRef as y, useState as E, useCallback as b, useEffect as p } from "react";
|
|
3
|
+
import '../../assets/Tooltip.css';const j = "_tooltip_small_g4g5w_8", I = "_tooltip_medium_g4g5w_9", N = "_tooltip_large_g4g5w_10", f = {
|
|
4
4
|
"tooltip-container": "_tooltip-container_g4g5w_1",
|
|
5
5
|
tooltip_small: j,
|
|
6
6
|
tooltip_medium: I,
|
|
@@ -8,46 +8,46 @@ import '../../assets/Tooltip.css';const j = "_tooltip_small_g4g5w_8", I = "_tool
|
|
|
8
8
|
"tooltip_under-trigger": "_tooltip_under-trigger_g4g5w_64"
|
|
9
9
|
};
|
|
10
10
|
function Y({ element: L, id: _, text: k, size: n = "medium", openUnderTrigger: s = !1 }) {
|
|
11
|
-
const l = y(null), c = y(null), [i,
|
|
11
|
+
const l = y(null), c = y(null), [i, o] = E(!1), [d, x] = E({ top: 0, left: 0 }), g = n === "small" && 20 || n === "large" && 35 || 27, m = n === "small" && 25 || n === "large" && 70 || 47, e = b(() => {
|
|
12
12
|
if (l.current && c.current) {
|
|
13
|
-
const t = l.current.getBoundingClientRect(),
|
|
14
|
-
let r = t.top + a + g -
|
|
15
|
-
const B = t.left + O + m + (t.width -
|
|
13
|
+
const t = l.current.getBoundingClientRect(), h = c.current.getBoundingClientRect(), a = window.scrollY, O = window.scrollX;
|
|
14
|
+
let r = t.top + a + g - h.height;
|
|
15
|
+
const B = t.left + O + m + (t.width - h.width) / 2;
|
|
16
16
|
r -= a, r < 0 && (r = t.bottom + a), x({ top: r, left: B });
|
|
17
17
|
}
|
|
18
18
|
}, [m, g]), u = b(
|
|
19
19
|
(t) => {
|
|
20
|
-
t.key === "Escape" &&
|
|
20
|
+
t.key === "Escape" && o(!1);
|
|
21
21
|
},
|
|
22
|
-
[
|
|
22
|
+
[o]
|
|
23
23
|
);
|
|
24
24
|
function w() {
|
|
25
|
-
|
|
25
|
+
o(!0);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
27
|
+
function v() {
|
|
28
|
+
o(!1);
|
|
29
29
|
}
|
|
30
30
|
function C() {
|
|
31
|
-
|
|
31
|
+
o(!i);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return p(() => {
|
|
34
34
|
if (!l.current) return;
|
|
35
35
|
const t = l.current;
|
|
36
36
|
return t.addEventListener("keyup", u, !0), () => {
|
|
37
37
|
t.removeEventListener("keyup", u, !0);
|
|
38
38
|
};
|
|
39
|
-
}, [u]),
|
|
40
|
-
window.removeEventListener("resize",
|
|
41
|
-
}), [
|
|
42
|
-
i && !s &&
|
|
43
|
-
}, [i, s,
|
|
39
|
+
}, [u]), p(() => (e(), window.addEventListener("resize", e), () => {
|
|
40
|
+
window.removeEventListener("resize", e);
|
|
41
|
+
}), [e]), p(() => {
|
|
42
|
+
i && !s && e();
|
|
43
|
+
}, [i, s, e]), /* @__PURE__ */ M(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
|
-
className:
|
|
47
|
-
onBlur:
|
|
46
|
+
className: f["tooltip-container"],
|
|
47
|
+
onBlur: v,
|
|
48
48
|
onFocus: w,
|
|
49
49
|
onMouseEnter: w,
|
|
50
|
-
onMouseLeave:
|
|
50
|
+
onMouseLeave: v,
|
|
51
51
|
onMouseUp: C,
|
|
52
52
|
ref: l,
|
|
53
53
|
role: "button",
|
|
@@ -58,7 +58,7 @@ function Y({ element: L, id: _, text: k, size: n = "medium", openUnderTrigger: s
|
|
|
58
58
|
"span",
|
|
59
59
|
{
|
|
60
60
|
ref: c,
|
|
61
|
-
className: s ?
|
|
61
|
+
className: s ? f["tooltip_under-trigger"] : f[`tooltip_${n}`],
|
|
62
62
|
id: _,
|
|
63
63
|
role: "tooltip",
|
|
64
64
|
style: s ? {} : { top: d.top, left: d.left },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as l, s as e, w as a } from "../../react.esm-
|
|
4
|
-
import { u as i } from "../../index-
|
|
2
|
+
import "../../index-BqLi4tOb.js";
|
|
3
|
+
import { r as l, s as e, w as a } from "../../react.esm-PmLHNn73.js";
|
|
4
|
+
import { u as i } from "../../index-xaEX581l.js";
|
|
5
5
|
import { useState as s } from "react";
|
|
6
6
|
import { VarIndicator as n } from "./VarIndicator.js";
|
|
7
7
|
const o = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useRef as c, useEffect as o } from "react";
|
|
2
2
|
const i = 200;
|
|
3
|
-
function
|
|
3
|
+
function f(t, n = i) {
|
|
4
4
|
const e = c(void 0);
|
|
5
5
|
return o(() => () => {
|
|
6
6
|
e.current && clearTimeout(e.current);
|
|
7
7
|
}, []), (...r) => {
|
|
8
8
|
const u = setTimeout(() => {
|
|
9
|
-
|
|
10
|
-
},
|
|
9
|
+
t(...r);
|
|
10
|
+
}, n);
|
|
11
11
|
clearTimeout(e.current), e.current = u;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
f as useDebounce
|
|
16
16
|
};
|
|
17
17
|
//# sourceMappingURL=useDebounce.js.map
|
|
@@ -32,6 +32,7 @@ export * from './MenuLink';
|
|
|
32
32
|
export * from './MetaDataList';
|
|
33
33
|
export * from './ModalDialog';
|
|
34
34
|
export * from './MultiSelect';
|
|
35
|
+
export * from './MultiSelectBox';
|
|
35
36
|
export * from './OverlayCloseButton';
|
|
36
37
|
export * from './OverlayStepBar';
|
|
37
38
|
export * from './PageOverlay';
|
package/dist/components/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import { ButtonGroup as u } from "./ButtonGroup/ButtonGroup.js";
|
|
|
8
8
|
import { Button as s } from "./Buttons/Button.js";
|
|
9
9
|
import { LinkButton as b } from "./Buttons/LinkButton.js";
|
|
10
10
|
import { MenuButton as C } from "./Buttons/MenuButton.js";
|
|
11
|
-
import { Card as
|
|
12
|
-
import { Checkbox as
|
|
11
|
+
import { Card as M } from "./Card/Card.js";
|
|
12
|
+
import { Checkbox as I } from "./Checkbox/Checkbox.js";
|
|
13
13
|
import { CheckboxButton as h } from "./CheckboxButton/CheckboxButton.js";
|
|
14
14
|
import { CheckboxButtonBar as P } from "./CheckboxButtonBar/CheckboxButtonBar.js";
|
|
15
15
|
import { CheckboxTree as y } from "./CheckboxTree/CheckboxTree.js";
|
|
@@ -33,29 +33,30 @@ import { Label as no } from "./Label/Label.js";
|
|
|
33
33
|
import { MenuLink as co } from "./MenuLink/MenuLink.js";
|
|
34
34
|
import { MetaDataList as Bo } from "./MetaDataList/MetaDataList.js";
|
|
35
35
|
import { ModalDialog as So } from "./ModalDialog/ModalDialog.js";
|
|
36
|
-
import { M as ko } from "../TablePlugin-
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
36
|
+
import { M as ko } from "../TablePlugin-WOgWan8s.js";
|
|
37
|
+
import { MultiSelectBox as Fo } from "./MultiSelectBox/MultiSelectBox.js";
|
|
38
|
+
import { OverlayCloseButton as go } from "./OverlayCloseButton/OverlayCloseButton.js";
|
|
39
|
+
import { OverlayStepBar as Lo } from "./OverlayStepBar/OverlayStepBar.js";
|
|
40
|
+
import { PageOverlay as Ao } from "./PageOverlay/PageOverlay.js";
|
|
41
|
+
import { Periods as Ro } from "./Periods/Periods.js";
|
|
42
|
+
import { PeriodSelector as Do } from "./PeriodSelector/PeriodSelector.js";
|
|
43
|
+
import { ProgrammeCard as vo } from "./ProgrammeCard/ProgrammeCard.js";
|
|
44
|
+
import { RadioButton as Go } from "./RadioButton/RadioButton.js";
|
|
45
|
+
import { RadioGroup as Eo } from "./RadioGroup/RadioGroup.js";
|
|
46
|
+
import { Repeater as zo } from "./Repeater/Repeater.js";
|
|
47
|
+
import { Rte as Vo, RteEditor as jo } from "./RteEditor/RteEditor.js";
|
|
48
|
+
import { SectionNotification as Jo } from "./SectionNotification/SectionNotification.js";
|
|
49
|
+
import { SelectListbox as Qo } from "./SelectListbox/SelectListbox.js";
|
|
50
|
+
import { SelectProvider as Wo, useSelect as Xo } from "./SelectListbox/SelectProvider.js";
|
|
51
|
+
import { Sortable as Zo } from "./Sortable/Sortable.js";
|
|
52
|
+
import { Spinner as $o } from "./Spinner/Spinner.js";
|
|
53
|
+
import { StatusBadge as rr } from "./StatusBadge/StatusBage.js";
|
|
54
|
+
import { StatusPill as er } from "./StatusPill/StatusPill.js";
|
|
55
|
+
import { TextArea as xr } from "./TextArea/TextArea.js";
|
|
56
|
+
import { Timeline as fr } from "./Timeline/Timeline.js";
|
|
57
|
+
import { ToggleSwitch as ir } from "./ToggleSwitch/ToggleSwitch.js";
|
|
58
|
+
import { Tooltip as lr } from "./Tooltip/Tooltip.js";
|
|
59
|
+
import { VarIndicator as dr } from "./VarIndicator/VarIndicator.js";
|
|
59
60
|
export {
|
|
60
61
|
t as Accordion,
|
|
61
62
|
p as AccordionCard,
|
|
@@ -65,8 +66,8 @@ export {
|
|
|
65
66
|
c as Backdrop,
|
|
66
67
|
s as Button,
|
|
67
68
|
u as ButtonGroup,
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
M as Card,
|
|
70
|
+
I as Checkbox,
|
|
70
71
|
h as CheckboxButton,
|
|
71
72
|
P as CheckboxButtonBar,
|
|
72
73
|
y as CheckboxTree,
|
|
@@ -93,29 +94,30 @@ export {
|
|
|
93
94
|
Bo as MetaDataList,
|
|
94
95
|
So as ModalDialog,
|
|
95
96
|
ko as MultiSelect,
|
|
96
|
-
Fo as
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
vo as
|
|
103
|
-
Go as
|
|
104
|
-
Eo as
|
|
105
|
-
zo as
|
|
106
|
-
|
|
107
|
-
jo as
|
|
108
|
-
Jo as
|
|
109
|
-
Qo as
|
|
110
|
-
|
|
111
|
-
Zo as
|
|
112
|
-
$o as
|
|
113
|
-
rr as
|
|
114
|
-
er as
|
|
115
|
-
xr as
|
|
116
|
-
fr as
|
|
117
|
-
ir as
|
|
118
|
-
lr as
|
|
119
|
-
|
|
97
|
+
Fo as MultiSelectBox,
|
|
98
|
+
go as OverlayCloseButton,
|
|
99
|
+
Lo as OverlayStepBar,
|
|
100
|
+
Ao as PageOverlay,
|
|
101
|
+
Do as PeriodSelector,
|
|
102
|
+
Ro as Periods,
|
|
103
|
+
vo as ProgrammeCard,
|
|
104
|
+
Go as RadioButton,
|
|
105
|
+
Eo as RadioGroup,
|
|
106
|
+
zo as Repeater,
|
|
107
|
+
Vo as Rte,
|
|
108
|
+
jo as RteEditor,
|
|
109
|
+
Jo as SectionNotification,
|
|
110
|
+
Qo as SelectListbox,
|
|
111
|
+
Wo as SelectProvider,
|
|
112
|
+
Zo as Sortable,
|
|
113
|
+
$o as Spinner,
|
|
114
|
+
rr as StatusBadge,
|
|
115
|
+
er as StatusPill,
|
|
116
|
+
xr as TextArea,
|
|
117
|
+
fr as Timeline,
|
|
118
|
+
ir as ToggleSwitch,
|
|
119
|
+
lr as Tooltip,
|
|
120
|
+
dr as VarIndicator,
|
|
121
|
+
Xo as useSelect
|
|
120
122
|
};
|
|
121
123
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { m as X, k as _, O as x, p as y, U as F } from "./LexicalLink.prod-
|
|
1
|
+
import { m as X, k as _, O as x, p as y, U as F } from "./LexicalLink.prod-CkldFE8u.js";
|
|
2
2
|
import { o as G } from "./LexicalComposerContext.prod-DLlRM5wP.js";
|
|
3
|
-
import { j } from "./LexicalUtils.prod-
|
|
4
|
-
import { a as
|
|
3
|
+
import { j } from "./LexicalUtils.prod-CpMJ4I9h.js";
|
|
4
|
+
import { a as b, c as E, E as H, J, Y as T, X as v, u as Y, M as k, d as N } from "./Lexical.prod-D8x7Ii0F.js";
|
|
5
5
|
import { useEffect as B } from "react";
|
|
6
|
-
function
|
|
6
|
+
function L(t, e = (n) => n) {
|
|
7
7
|
return (n) => {
|
|
8
8
|
const i = t.exec(n);
|
|
9
9
|
return i === null ? null : { index: i.index, length: i[0].length, text: i[0], url: e(i[0]) };
|
|
@@ -52,7 +52,7 @@ function Q(t, e, n, i) {
|
|
|
52
52
|
if (t.length === 1) {
|
|
53
53
|
let o, s = t[0];
|
|
54
54
|
e === 0 ? [o, s] = s.splitText(n) : [, o, s] = s.splitText(e, n);
|
|
55
|
-
const r =
|
|
55
|
+
const r = v(i.text);
|
|
56
56
|
return r.setFormat(o.getFormat()), r.setDetail(o.getDetail()), r.setStyle(o.getStyle()), u.append(r), o.replace(u), s;
|
|
57
57
|
}
|
|
58
58
|
if (t.length > 1) {
|
|
@@ -70,7 +70,7 @@ function Q(t, e, n, i) {
|
|
|
70
70
|
}
|
|
71
71
|
r += p;
|
|
72
72
|
}
|
|
73
|
-
const l =
|
|
73
|
+
const l = b(), c = l ? l.getNodes().find(T) : void 0, f = v(s.getTextContent());
|
|
74
74
|
return f.setFormat(s.getFormat()), f.setDetail(s.getDetail()), f.setStyle(s.getStyle()), u.append(f, ...a), c && c === s && (E(l) ? f.select(l.anchor.offset, l.focus.offset) : Y(l) && f.select(0, f.getTextContent().length)), s.replace(u), g;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -138,7 +138,7 @@ function V(t, e, n) {
|
|
|
138
138
|
})(u, e, i);
|
|
139
139
|
}
|
|
140
140
|
}), t.registerCommand(_, (u) => {
|
|
141
|
-
const o =
|
|
141
|
+
const o = b();
|
|
142
142
|
return u !== null || !E(o) || o.extract().forEach((s) => {
|
|
143
143
|
const r = s.getParent();
|
|
144
144
|
if (x(r)) return r.setIsUnlinked(!r.getIsUnlinked()), r.markDirty(), !0;
|
|
@@ -151,8 +151,8 @@ function at({ matchers: t, onChange: e }) {
|
|
|
151
151
|
return V(n, t, e), null;
|
|
152
152
|
}
|
|
153
153
|
const tt = /^(http|https):\/\//, M = /(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,})/, et = /(([^<>()[\]\\.,;:\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,}))/, nt = /^(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,})?$/, ut = (t) => t === "https://" || M.test(t), gt = (t) => t === "https://" || nt.test(t), ct = [
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
L(M, (t) => tt.test(t) ? t : `//${t}`),
|
|
155
|
+
L(et, (t) => `mailto:${t}`)
|
|
156
156
|
], ft = (t) => /^https?:\/\//i.test(t) ? t : `https://${t}`;
|
|
157
157
|
export {
|
|
158
158
|
ct as M,
|
|
@@ -161,4 +161,4 @@ export {
|
|
|
161
161
|
gt as v,
|
|
162
162
|
at as w
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=helpers-
|
|
164
|
+
//# sourceMappingURL=helpers-E_SsILnP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-BUwfVZhW.js","sources":["../node_modules/@lexical/react/LexicalAutoLinkPlugin.prod.mjs","../src/components/RteEditor/Plugins/LinkPlugin/helpers.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{AutoLinkNode as t,$isAutoLinkNode as e,$isLinkNode as n,TOGGLE_LINK_COMMAND as r,$createAutoLinkNode as l}from\"@lexical/link\";import{useLexicalComposerContext as i}from\"@lexical/react/LexicalComposerContext\";import{mergeRegister as o}from\"@lexical/utils\";import{TextNode as s,$getSelection as u,$isRangeSelection as g,COMMAND_PRIORITY_LOW as c,$isTextNode as a,$isElementNode as f,$isLineBreakNode as x,$createTextNode as h,$isNodeSelection as p}from\"lexical\";import{useEffect as d}from\"react\";function m(t,e=(t=>t)){return n=>{const r=t.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function T(t,e){for(let n=0;n<e.length;n++){const r=e[n](t);if(r)return r}return null}const C=/[.,;\\s]/;function S(t){return C.test(t)}function b(t){return S(t[t.length-1])}function U(t){return S(t[0])}function v(t){let e=t.getPreviousSibling();return f(e)&&(e=e.getLastDescendant()),null===e||x(e)||a(e)&&b(e.getTextContent())}function L(t){let e=t.getNextSibling();return f(e)&&(e=e.getFirstDescendant()),null===e||x(e)||a(e)&&U(e.getTextContent())}function R(t,e,n,r){if(!(t>0?S(n[t-1]):v(r[0])))return!1;return e<n.length?S(n[e]):L(r[r.length-1])}function k(t,e,n){const r=[],l=[],i=[];let o=0,s=0;const u=[...t];for(;u.length>0;){const t=u[0],g=t.getTextContent().length,c=s;s+g<=e?(r.push(t),o+=g):c>=n?i.push(t):l.push(t),s+=g,u.shift()}return[o,r,l,i]}function D(t,e,n,r){const i=l(r.url,r.attributes);if(1===t.length){let l,o=t[0];0===e?[l,o]=o.splitText(n):[,l,o]=o.splitText(e,n);const s=h(r.text);return s.setFormat(l.getFormat()),s.setDetail(l.getDetail()),s.setStyle(l.getStyle()),i.append(s),l.replace(i),o}if(t.length>1){const r=t[0];let l,o=r.getTextContent().length;0===e?l=r:[,l]=r.splitText(e);const s=[];let c;for(let e=1;e<t.length;e++){const r=t[e],l=r.getTextContent().length,i=o;if(i<n)if(o+l<=n)s.push(r);else{const[t,e]=r.splitText(n-i);s.push(t),c=e}o+=l}const f=u(),x=f?f.getNodes().find(a):void 0,d=h(l.getTextContent());return d.setFormat(l.getFormat()),d.setDetail(l.getDetail()),d.setStyle(l.getStyle()),i.append(d,...s),x&&x===l&&(g(f)?d.select(f.anchor.offset,f.focus.offset):p(f)&&d.select(0,d.getTextContent().length)),l.replace(i),c}}function N(t,e,n){const r=t.getChildren(),l=r.length;for(let e=0;e<l;e++){const l=r[e];if(!a(l)||!l.isSimpleText())return I(t),void n(null,t.getURL())}const i=t.getTextContent(),o=T(i,e);if(null===o||o.text!==i)return I(t),void n(null,t.getURL());if(!v(t)||!L(t))return I(t),void n(null,t.getURL());const s=t.getURL();if(s!==o.url&&(t.setURL(o.url),n(o.url,s)),o.attributes){const e=t.getRel();e!==o.attributes.rel&&(t.setRel(o.attributes.rel||null),n(o.attributes.rel||null,e));const r=t.getTarget();r!==o.attributes.target&&(t.setTarget(o.attributes.target||null),n(o.attributes.target||null,r))}}function I(t){const e=t.getChildren();for(let n=e.length-1;n>=0;n--)t.insertAfter(e[n]);return t.remove(),e.map((t=>t.getLatest()))}function P(l,i,f){d((()=>{l.hasNodes([t])||function(t,...e){const n=new URL(\"https://lexical.dev/docs/error\"),r=new URLSearchParams;r.append(\"code\",t);for(const t of e)r.append(\"v\",t);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const x=(t,e)=>{f&&f(t,e)};return o(l.registerNodeTransform(s,(t=>{const r=t.getParentOrThrow(),l=t.getPreviousSibling();if(e(r)&&!r.getIsUnlinked())N(r,i,x);else if(!n(r)){if(t.isSimpleText()&&(U(t.getTextContent())||!e(l))){const e=function(t){const e=[t];let n=t.getNextSibling();for(;null!==n&&a(n)&&n.isSimpleText()&&(e.push(n),!/[\\s]/.test(n.getTextContent()));)n=n.getNextSibling();return e}(t);!function(t,e,n){let r=[...t];const l=r.map((t=>t.getTextContent())).join(\"\");let i,o=l,s=0;for(;(i=T(o,e))&&null!==i;){const t=i.index,e=t+i.length;if(R(s+t,s+e,l,r)){const[l,,o,u]=k(r,s+t,s+e),g=D(o,s+t-l,s+e-l,i);r=g?[g,...u]:u,n(i.url,null),s=0}else s+=e;o=o.substring(e)}}(e,i,x)}!function(t,n,r){const l=t.getPreviousSibling(),i=t.getNextSibling(),o=t.getTextContent();var s;!e(l)||l.getIsUnlinked()||U(o)&&(s=o,!(l.isEmailURI()?/^\\.[a-zA-Z]{2,}/.test(s):/^\\.[a-zA-Z0-9]{1,}/.test(s)))||(l.append(t),N(l,n,r),r(null,l.getURL())),!e(i)||i.getIsUnlinked()||b(o)||(I(i),N(i,n,r),r(null,i.getURL()))}(t,i,x)}})),l.registerCommand(r,(t=>{const n=u();if(null!==t||!g(n))return!1;return n.extract().forEach((t=>{const n=t.getParent();if(e(n))return n.setIsUnlinked(!n.getIsUnlinked()),n.markDirty(),!0})),!1}),c))}),[l,i,f])}function w({matchers:t,onChange:e}){const[n]=i();return P(n,t,e),null}export{w as AutoLinkPlugin,m as createLinkMatcherWithRegExp};\n","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":["m","t","r","T","C","S","b","U","v","f","x","a","L","R","k","l","i","o","s","u","g","D","h","c","e","d","p","N","I","P","n","w","PROTOCOL_REGEX","URL_REGEX","EMAIL_REGEX","URL_REGEX_OR_BLANK","validateUrl","url","validateUrlWithProtocol","MATCHERS","createLinkMatcherWithRegExp","text","ensureHttps"],"mappings":";;;;;AAQqf,SAASA,EAAE,GAAE,IAAG,CAAAC,MAAGA,GAAG;AAAC,SAAO,OAAG;AAAC,UAAMC,IAAE,EAAE,KAAK,CAAC;AAAE,WAAcA,MAAP,OAAS,OAAK,EAAC,OAAMA,EAAE,OAAM,QAAOA,EAAE,CAAC,EAAE,QAAO,MAAKA,EAAE,CAAC,GAAE,KAAI,EAAEA,EAAE,CAAC,CAAC,EAAC;AAAA,EAAC;AAAC;AAAC,SAASC,EAAE,GAAE,GAAE;AAAC,WAAQ,IAAE,GAAE,IAAE,EAAE,QAAO,KAAI;AAAC,UAAMD,IAAE,EAAE,CAAC,EAAE,CAAC;AAAE,QAAGA,EAAE,QAAOA;AAAA,EAAC;AAAC,SAAO;AAAI;AAAC,MAAME,IAAE;AAAU,SAASC,EAAE,GAAE;AAAC,SAAO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IC,KACJ,uJAEIC,KACJ,wNAEWC,KAAc,CAACC,MACnBA,MAAQ,cAAcJ,EAAU,KAAKI,CAAG,GAGpCC,KAA0B,CAACD,MAC/BA,MAAQ,cAAcF,GAAmB,KAAKE,CAAG,GAG7CE,KAAW;AAAA,EACtBC,EAA4BP,GAAW,CAACQ,MAC9BT,GAAe,KAAKS,CAAI,IAAkBA,IAAd,KAAKA,CAAI,EAC9C;AAAA,EACDD,EAA4BN,IAAa,CAACO,MACjC,UAAUA,CAAI,EACtB;AACH,GAEaC,KAAc,CAACL,MACrB,gBAAgB,KAAKA,CAAG,IAGtBA,IAFE,WAAWA,CAAG;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"helpers-E_SsILnP.js","sources":["../node_modules/@lexical/react/LexicalAutoLinkPlugin.prod.mjs","../src/components/RteEditor/Plugins/LinkPlugin/helpers.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{AutoLinkNode as t,$isAutoLinkNode as e,$isLinkNode as n,TOGGLE_LINK_COMMAND as r,$createAutoLinkNode as l}from\"@lexical/link\";import{useLexicalComposerContext as i}from\"@lexical/react/LexicalComposerContext\";import{mergeRegister as o}from\"@lexical/utils\";import{TextNode as s,$getSelection as u,$isRangeSelection as g,COMMAND_PRIORITY_LOW as c,$isTextNode as a,$isElementNode as f,$isLineBreakNode as x,$createTextNode as h,$isNodeSelection as p}from\"lexical\";import{useEffect as d}from\"react\";function m(t,e=(t=>t)){return n=>{const r=t.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function T(t,e){for(let n=0;n<e.length;n++){const r=e[n](t);if(r)return r}return null}const C=/[.,;\\s]/;function S(t){return C.test(t)}function b(t){return S(t[t.length-1])}function U(t){return S(t[0])}function v(t){let e=t.getPreviousSibling();return f(e)&&(e=e.getLastDescendant()),null===e||x(e)||a(e)&&b(e.getTextContent())}function L(t){let e=t.getNextSibling();return f(e)&&(e=e.getFirstDescendant()),null===e||x(e)||a(e)&&U(e.getTextContent())}function R(t,e,n,r){if(!(t>0?S(n[t-1]):v(r[0])))return!1;return e<n.length?S(n[e]):L(r[r.length-1])}function k(t,e,n){const r=[],l=[],i=[];let o=0,s=0;const u=[...t];for(;u.length>0;){const t=u[0],g=t.getTextContent().length,c=s;s+g<=e?(r.push(t),o+=g):c>=n?i.push(t):l.push(t),s+=g,u.shift()}return[o,r,l,i]}function D(t,e,n,r){const i=l(r.url,r.attributes);if(1===t.length){let l,o=t[0];0===e?[l,o]=o.splitText(n):[,l,o]=o.splitText(e,n);const s=h(r.text);return s.setFormat(l.getFormat()),s.setDetail(l.getDetail()),s.setStyle(l.getStyle()),i.append(s),l.replace(i),o}if(t.length>1){const r=t[0];let l,o=r.getTextContent().length;0===e?l=r:[,l]=r.splitText(e);const s=[];let c;for(let e=1;e<t.length;e++){const r=t[e],l=r.getTextContent().length,i=o;if(i<n)if(o+l<=n)s.push(r);else{const[t,e]=r.splitText(n-i);s.push(t),c=e}o+=l}const f=u(),x=f?f.getNodes().find(a):void 0,d=h(l.getTextContent());return d.setFormat(l.getFormat()),d.setDetail(l.getDetail()),d.setStyle(l.getStyle()),i.append(d,...s),x&&x===l&&(g(f)?d.select(f.anchor.offset,f.focus.offset):p(f)&&d.select(0,d.getTextContent().length)),l.replace(i),c}}function N(t,e,n){const r=t.getChildren(),l=r.length;for(let e=0;e<l;e++){const l=r[e];if(!a(l)||!l.isSimpleText())return I(t),void n(null,t.getURL())}const i=t.getTextContent(),o=T(i,e);if(null===o||o.text!==i)return I(t),void n(null,t.getURL());if(!v(t)||!L(t))return I(t),void n(null,t.getURL());const s=t.getURL();if(s!==o.url&&(t.setURL(o.url),n(o.url,s)),o.attributes){const e=t.getRel();e!==o.attributes.rel&&(t.setRel(o.attributes.rel||null),n(o.attributes.rel||null,e));const r=t.getTarget();r!==o.attributes.target&&(t.setTarget(o.attributes.target||null),n(o.attributes.target||null,r))}}function I(t){const e=t.getChildren();for(let n=e.length-1;n>=0;n--)t.insertAfter(e[n]);return t.remove(),e.map((t=>t.getLatest()))}function P(l,i,f){d((()=>{l.hasNodes([t])||function(t,...e){const n=new URL(\"https://lexical.dev/docs/error\"),r=new URLSearchParams;r.append(\"code\",t);for(const t of e)r.append(\"v\",t);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const x=(t,e)=>{f&&f(t,e)};return o(l.registerNodeTransform(s,(t=>{const r=t.getParentOrThrow(),l=t.getPreviousSibling();if(e(r)&&!r.getIsUnlinked())N(r,i,x);else if(!n(r)){if(t.isSimpleText()&&(U(t.getTextContent())||!e(l))){const e=function(t){const e=[t];let n=t.getNextSibling();for(;null!==n&&a(n)&&n.isSimpleText()&&(e.push(n),!/[\\s]/.test(n.getTextContent()));)n=n.getNextSibling();return e}(t);!function(t,e,n){let r=[...t];const l=r.map((t=>t.getTextContent())).join(\"\");let i,o=l,s=0;for(;(i=T(o,e))&&null!==i;){const t=i.index,e=t+i.length;if(R(s+t,s+e,l,r)){const[l,,o,u]=k(r,s+t,s+e),g=D(o,s+t-l,s+e-l,i);r=g?[g,...u]:u,n(i.url,null),s=0}else s+=e;o=o.substring(e)}}(e,i,x)}!function(t,n,r){const l=t.getPreviousSibling(),i=t.getNextSibling(),o=t.getTextContent();var s;!e(l)||l.getIsUnlinked()||U(o)&&(s=o,!(l.isEmailURI()?/^\\.[a-zA-Z]{2,}/.test(s):/^\\.[a-zA-Z0-9]{1,}/.test(s)))||(l.append(t),N(l,n,r),r(null,l.getURL())),!e(i)||i.getIsUnlinked()||b(o)||(I(i),N(i,n,r),r(null,i.getURL()))}(t,i,x)}})),l.registerCommand(r,(t=>{const n=u();if(null!==t||!g(n))return!1;return n.extract().forEach((t=>{const n=t.getParent();if(e(n))return n.setIsUnlinked(!n.getIsUnlinked()),n.markDirty(),!0})),!1}),c))}),[l,i,f])}function w({matchers:t,onChange:e}){const[n]=i();return P(n,t,e),null}export{w as AutoLinkPlugin,m as createLinkMatcherWithRegExp};\n","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":["m","t","r","T","C","S","b","U","v","f","x","a","L","R","k","l","i","o","s","u","g","D","h","c","e","d","p","N","I","P","n","w","PROTOCOL_REGEX","URL_REGEX","EMAIL_REGEX","URL_REGEX_OR_BLANK","validateUrl","url","validateUrlWithProtocol","MATCHERS","createLinkMatcherWithRegExp","text","ensureHttps"],"mappings":";;;;;AAQqf,SAASA,EAAE,GAAE,IAAG,CAAAC,MAAGA,GAAG;AAAC,SAAO,OAAG;AAAC,UAAMC,IAAE,EAAE,KAAK,CAAC;AAAE,WAAcA,MAAP,OAAS,OAAK,EAAC,OAAMA,EAAE,OAAM,QAAOA,EAAE,CAAC,EAAE,QAAO,MAAKA,EAAE,CAAC,GAAE,KAAI,EAAEA,EAAE,CAAC,CAAC,EAAC;AAAA,EAAC;AAAC;AAAC,SAASC,EAAE,GAAE,GAAE;AAAC,WAAQ,IAAE,GAAE,IAAE,EAAE,QAAO,KAAI;AAAC,UAAMD,IAAE,EAAE,CAAC,EAAE,CAAC;AAAE,QAAGA,EAAE,QAAOA;AAAA,EAAC;AAAC,SAAO;AAAI;AAAC,MAAME,IAAE;AAAU,SAASC,EAAE,GAAE;AAAC,SAAOD,EAAE,KAAK,CAAC;AAAC;AAAC,SAASE,EAAE,GAAE;AAAC,SAAOD,EAAE,EAAE,EAAE,SAAO,CAAC,CAAC;AAAC;AAAC,SAASE,EAAE,GAAE;AAAC,SAAOF,EAAE,EAAE,CAAC,CAAC;AAAC;AAAC,SAASG,EAAE,GAAE;AAAC,MAAI,IAAE,EAAE,mBAAoB;AAAC,SAAOC,EAAE,CAAC,MAAI,IAAE,EAAE,kBAAmB,IAAS,MAAP,QAAUC,EAAE,CAAC,KAAGC,EAAE,CAAC,KAAGL,EAAE,EAAE,eAAgB,CAAA;AAAC;AAAC,SAASM,EAA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