@uva-glass/component-library 2.6.1 → 2.6.3
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-sR6tW7N6.js +4236 -0
- package/dist/Lexical.prod-sR6tW7N6.js.map +1 -0
- package/dist/LexicalClipboard.prod-BbRoaXo6.js +258 -0
- package/dist/LexicalClipboard.prod-BbRoaXo6.js.map +1 -0
- package/dist/{LexicalComposerContext.prod-Dyvim1tK.js → LexicalComposerContext.prod-DxxjdrXB.js} +2 -2
- package/dist/{LexicalComposerContext.prod-Dyvim1tK.js.map → LexicalComposerContext.prod-DxxjdrXB.js.map} +1 -1
- package/dist/LexicalLink.prod-iDKxtfCF.js +263 -0
- package/dist/LexicalLink.prod-iDKxtfCF.js.map +1 -0
- package/dist/LexicalList.prod-ywkx7SnO.js +576 -0
- package/dist/LexicalList.prod-ywkx7SnO.js.map +1 -0
- package/dist/LexicalSelection.prod-mYXylG1z.js +86 -0
- package/dist/LexicalSelection.prod-mYXylG1z.js.map +1 -0
- package/dist/LexicalTable.prod-XN7avk7R.js +1447 -0
- package/dist/LexicalTable.prod-XN7avk7R.js.map +1 -0
- package/dist/LexicalUtils.prod-DnFLi0Ww.js +122 -0
- package/dist/LexicalUtils.prod-DnFLi0Ww.js.map +1 -0
- package/dist/{SortableProvider-BUsvniX7.js → SortableProvider-RaH_ZXB3.js} +20 -20
- package/dist/{SortableProvider-BUsvniX7.js.map → SortableProvider-RaH_ZXB3.js.map} +1 -1
- package/dist/{TablePlugin-E6UFlCgy.js → TablePlugin-5Cs2F_co.js} +75 -74
- package/dist/{TablePlugin-E6UFlCgy.js.map → TablePlugin-5Cs2F_co.js.map} +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +6 -5
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.d.ts +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +110 -74
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.d.ts +2 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +121 -31
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FormInput/FormInput.js +14 -13
- package/dist/components/FormInput/FormInput.js.map +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.js +17 -17
- package/dist/components/InputField/InputField.stories.js +17 -16
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +5 -4
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
- package/dist/components/OverlayStepBar/OverlayStepBar.js +13 -12
- package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +15 -14
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +11 -10
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.js +3 -3
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +6 -5
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +15 -14
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +6 -5
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +43 -42
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +42 -42
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +15 -15
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +5 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +8 -7
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +29 -29
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +18 -18
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/Providers/LanguageProvider.js +7 -7
- package/dist/components/RteEditor/RteEditor.js +608 -663
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +11 -11
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +10 -10
- package/dist/components/Sortable/Sortable.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +7 -7
- 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/ToggleSwitch/ToggleSwitch.stories.js +5 -5
- package/dist/components/Tooltip/Tooltip.js +22 -22
- package/dist/components/index.js +1 -1
- package/dist/{helpers-BVGma1u6.js → helpers-BpqX-Lj3.js} +32 -32
- package/dist/helpers-BpqX-Lj3.js.map +1 -0
- package/dist/{index-0wq-B7do.js → index-B3c5pcHk.js} +22 -22
- package/dist/{index-0wq-B7do.js.map → index-B3c5pcHk.js.map} +1 -1
- package/dist/{index-B9BWML6P.js → index-BpZ8v2ye.js} +7088 -7092
- package/dist/{index-B9BWML6P.js.map → index-BpZ8v2ye.js.map} +1 -1
- package/dist/index-CHX1d9_A.js +21922 -0
- package/dist/{index-DWzkl4aY.js.map → index-CHX1d9_A.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-BIqxBxbW.js → react-18-CT6mjea2.js} +2 -2
- package/dist/{react-18-BIqxBxbW.js.map → react-18-CT6mjea2.js.map} +1 -1
- package/dist/storybook__react.d.js +510 -510
- package/dist/storybook__react.d.js.map +1 -1
- package/package.json +14 -14
- package/dist/Lexical.prod-Bzma_w4s.js +0 -4216
- package/dist/Lexical.prod-Bzma_w4s.js.map +0 -1
- package/dist/LexicalClipboard.prod-Dg23ixPD.js +0 -258
- package/dist/LexicalClipboard.prod-Dg23ixPD.js.map +0 -1
- package/dist/LexicalLink.prod-C1RDJLfo.js +0 -208
- package/dist/LexicalLink.prod-C1RDJLfo.js.map +0 -1
- package/dist/LexicalList.prod-BGzfDPU0.js +0 -568
- package/dist/LexicalList.prod-BGzfDPU0.js.map +0 -1
- package/dist/LexicalSelection.prod-CNWFGVlh.js +0 -86
- package/dist/LexicalSelection.prod-CNWFGVlh.js.map +0 -1
- package/dist/LexicalTable.prod-D-4NN9o5.js +0 -1366
- package/dist/LexicalTable.prod-D-4NN9o5.js.map +0 -1
- package/dist/LexicalUtils.prod-Cg2siy-c.js +0 -94
- package/dist/LexicalUtils.prod-Cg2siy-c.js.map +0 -1
- package/dist/helpers-BVGma1u6.js.map +0 -1
- package/dist/index-DWzkl4aY.js +0 -21915
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as a } from "../../index-CHX1d9_A.js";
|
|
3
3
|
import { ProgrammeCard as o } from "./ProgrammeCard.js";
|
|
4
4
|
import { Container as n } from "../../storyComponents/Container/Container.js";
|
|
5
5
|
import "react";
|
|
@@ -7,6 +7,7 @@ import { Icon as m } from "../Icon/Icon.js";
|
|
|
7
7
|
import "../Buttons/Button.js";
|
|
8
8
|
import "../Buttons/LinkButton.js";
|
|
9
9
|
import "@react-aria/button";
|
|
10
|
+
import "../Checkbox/Checkbox.js";
|
|
10
11
|
import "@react-aria/dialog";
|
|
11
12
|
import "@react-aria/focus";
|
|
12
13
|
import "@react-aria/overlays";
|
|
@@ -16,25 +17,25 @@ import "../IconButton/IconButton.js";
|
|
|
16
17
|
import "../Input/Input.js";
|
|
17
18
|
import "../InputField/InputField.js";
|
|
18
19
|
import "react-router";
|
|
19
|
-
import "../../TablePlugin-
|
|
20
|
+
import "../../TablePlugin-5Cs2F_co.js";
|
|
20
21
|
import { Repeater as i } from "../Repeater/Repeater.js";
|
|
21
22
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
22
23
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
23
24
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
24
|
-
import "../../index-
|
|
25
|
+
import "../../index-B3c5pcHk.js";
|
|
25
26
|
import "../SelectListbox/SelectListbox.js";
|
|
26
27
|
import "../SelectListbox/SelectProvider.js";
|
|
27
28
|
import "../Sortable/components/SortableItem.js";
|
|
28
|
-
import "../../SortableProvider-
|
|
29
|
-
const
|
|
29
|
+
import "../../SortableProvider-RaH_ZXB3.js";
|
|
30
|
+
const p = "<ProgrammeCard key={key} header={header} details={details} onClick={onClickFunction} />", K = {
|
|
30
31
|
title: "Atoms/ProgrammeCard",
|
|
31
32
|
component: o,
|
|
32
33
|
parameters: {
|
|
33
34
|
inspectComponent: o,
|
|
34
|
-
codeString:
|
|
35
|
+
codeString: p
|
|
35
36
|
}
|
|
36
|
-
}, s = (t) => /* @__PURE__ */ r(n, { size: "large", children: /* @__PURE__ */ r(o, { ...t }) }),
|
|
37
|
-
|
|
37
|
+
}, s = (t) => /* @__PURE__ */ r(n, { size: "large", children: /* @__PURE__ */ r(o, { ...t }) }), l = s.bind({});
|
|
38
|
+
l.args = {
|
|
38
39
|
header: "This is my header",
|
|
39
40
|
details: "This is my details",
|
|
40
41
|
onClick: a()
|
|
@@ -73,8 +74,8 @@ h.args = {
|
|
|
73
74
|
};
|
|
74
75
|
export {
|
|
75
76
|
h as MultiProgrammeCards,
|
|
76
|
-
|
|
77
|
+
l as ProgrammeCardExample,
|
|
77
78
|
d as WithComplexContent,
|
|
78
|
-
|
|
79
|
+
K as default
|
|
79
80
|
};
|
|
80
81
|
//# sourceMappingURL=ProgrammeCard.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgrammeCard.stories.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ProgrammeCardProps } from './ProgrammeCard';\n\nimport { ProgrammeCard } from './ProgrammeCard';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon, Repeater } from 'components';\n\nconst codeString = '<ProgrammeCard key={key} header={header} details={details} onClick={onClickFunction} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/ProgrammeCard',\n component: ProgrammeCard,\n parameters: {\n inspectComponent: ProgrammeCard,\n codeString: codeString,\n },\n} as Meta<ProgrammeCardProps>;\n\nconst Template: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <ProgrammeCard {...args} />\n </Container>\n);\n\nexport const ProgrammeCardExample = Template.bind({});\nProgrammeCardExample.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\n};\n\nexport const WithComplexContent = Template.bind({});\nWithComplexContent.args = {\n header: (\n <Repeater flexDirection=\"row\" gap=\"150\">\n <Icon name=\"Envelope\" size={32} />\n <h2 style={{ margin: 0 }}>This is my header</h2>\n </Repeater>\n ),\n details: (\n <Repeater flexDirection=\"row\" gap=\"150\">\n <Repeater flexDirection=\"row\">\n <Icon name=\"FaceFrown\" />\n Details 1\n </Repeater>\n <Repeater flexDirection=\"row\">\n <Icon name=\"Heart\" />\n Details 2\n </Repeater>\n <Repeater flexDirection=\"row\">\n <Icon name=\"Sparkles\" />\n Details 3\n </Repeater>\n </Repeater>\n ),\n onClick: fn(),\n};\n\nconst MultiProgrammeCardsTemplate: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <Repeater>\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n </Repeater>\n </Container>\n);\n\nexport const MultiProgrammeCards = MultiProgrammeCardsTemplate.bind({});\nMultiProgrammeCards.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\n};\n"],"names":["codeString","ProgrammeCard_stories","ProgrammeCard","Template","args","jsx","Container","ProgrammeCardExample","fn","WithComplexContent","jsxs","Repeater","Icon","MultiProgrammeCardsTemplate","MultiProgrammeCards"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProgrammeCard.stories.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ProgrammeCardProps } from './ProgrammeCard';\n\nimport { ProgrammeCard } from './ProgrammeCard';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon, Repeater } from 'components';\n\nconst codeString = '<ProgrammeCard key={key} header={header} details={details} onClick={onClickFunction} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/ProgrammeCard',\n component: ProgrammeCard,\n parameters: {\n inspectComponent: ProgrammeCard,\n codeString: codeString,\n },\n} as Meta<ProgrammeCardProps>;\n\nconst Template: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <ProgrammeCard {...args} />\n </Container>\n);\n\nexport const ProgrammeCardExample = Template.bind({});\nProgrammeCardExample.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\n};\n\nexport const WithComplexContent = Template.bind({});\nWithComplexContent.args = {\n header: (\n <Repeater flexDirection=\"row\" gap=\"150\">\n <Icon name=\"Envelope\" size={32} />\n <h2 style={{ margin: 0 }}>This is my header</h2>\n </Repeater>\n ),\n details: (\n <Repeater flexDirection=\"row\" gap=\"150\">\n <Repeater flexDirection=\"row\">\n <Icon name=\"FaceFrown\" />\n Details 1\n </Repeater>\n <Repeater flexDirection=\"row\">\n <Icon name=\"Heart\" />\n Details 2\n </Repeater>\n <Repeater flexDirection=\"row\">\n <Icon name=\"Sparkles\" />\n Details 3\n </Repeater>\n </Repeater>\n ),\n onClick: fn(),\n};\n\nconst MultiProgrammeCardsTemplate: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <Repeater>\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n </Repeater>\n </Container>\n);\n\nexport const MultiProgrammeCards = MultiProgrammeCardsTemplate.bind({});\nMultiProgrammeCards.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\n};\n"],"names":["codeString","ProgrammeCard_stories","ProgrammeCard","Template","args","jsx","Container","ProgrammeCardExample","fn","WithComplexContent","jsxs","Repeater","Icon","MultiProgrammeCardsTemplate","MultiProgrammeCards"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,IAAa,2FAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAwC,CAACC,MAC5C,gBAAAC,EAAAC,GAAA,EAAU,MAAK,SACd,UAAC,gBAAAD,EAAAH,GAAA,EAAe,GAAGE,EAAA,CAAM,EAC3B,CAAA,GAGWG,IAAuBJ,EAAS,KAAK,CAAE,CAAA;AACpDI,EAAqB,OAAO;AAAA,EAC1B,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAASC,EAAG;AACd;AAEO,MAAMC,IAAqBN,EAAS,KAAK,CAAE,CAAA;AAClDM,EAAmB,OAAO;AAAA,EACxB,QACG,gBAAAC,EAAAC,GAAA,EAAS,eAAc,OAAM,KAAI,OAChC,UAAA;AAAA,IAAA,gBAAAN,EAACO,GAAK,EAAA,MAAK,YAAW,MAAM,IAAI;AAAA,sBAC/B,MAAG,EAAA,OAAO,EAAE,QAAQ,KAAK,UAAiB,oBAAA,CAAA;AAAA,EAAA,GAC7C;AAAA,EAEF,SACG,gBAAAF,EAAAC,GAAA,EAAS,eAAc,OAAM,KAAI,OAChC,UAAA;AAAA,IAAC,gBAAAD,EAAAC,GAAA,EAAS,eAAc,OACtB,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EAAK,MAAK,YAAY,CAAA;AAAA,MAAE;AAAA,IAAA,GAE3B;AAAA,IACA,gBAAAF,EAACC,GAAS,EAAA,eAAc,OACtB,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EAAK,MAAK,QAAQ,CAAA;AAAA,MAAE;AAAA,IAAA,GAEvB;AAAA,IACA,gBAAAF,EAACC,GAAS,EAAA,eAAc,OACtB,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EAAK,MAAK,WAAW,CAAA;AAAA,MAAE;AAAA,IAAA,EAE1B,CAAA;AAAA,EAAA,GACF;AAAA,EAEF,SAASJ,EAAG;AACd;AAEA,MAAMK,IAA2D,CAACT,MAChE,gBAAAC,EAACC,KAAU,MAAK,SACd,4BAACK,GACC,EAAA,UAAA;AAAA,EAAC,gBAAAN,EAAAH,GAAA,EAAe,GAAGE,GAAM;AAAA,EACzB,gBAAAC,EAACH,GAAe,EAAA,GAAGE,GAAM;AAAA,EACzB,gBAAAC,EAACH,GAAe,EAAA,GAAGE,EAAM,CAAA;AAAA,EAAA,CAC3B,EACF,CAAA,GAGWU,IAAsBD,EAA4B,KAAK,CAAE,CAAA;AACtEC,EAAoB,OAAO;AAAA,EACzB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAASN,EAAG;AACd;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import '../../assets/RadioButton.css';const t = {
|
|
4
4
|
"radio-button": "_radio-button_1if7s_1",
|
|
5
5
|
"radio-button__input": "_radio-button__input_1if7s_8",
|
|
6
6
|
"radio-button__label": "_radio-button__label_1if7s_13",
|
|
7
7
|
"radio-button__description": "_radio-button__description_1if7s_19",
|
|
8
8
|
"radio-button--gap-large": "_radio-button--gap-large_1if7s_34"
|
|
9
|
-
}, l = ({ id: o, label: r, gap: _ = "normal", description: i, ...n }) => /* @__PURE__ */
|
|
9
|
+
}, l = ({ id: o, label: r, gap: _ = "normal", description: i, ...n }) => /* @__PURE__ */ d("div", { className: s(t["radio-button"], t[`radio-button--gap-${_}`]), children: [
|
|
10
10
|
/* @__PURE__ */ a(
|
|
11
11
|
"input",
|
|
12
12
|
{
|
|
@@ -3,6 +3,7 @@ import { useId as d } from "react";
|
|
|
3
3
|
import "../../Buttons/Button.js";
|
|
4
4
|
import "../../Buttons/LinkButton.js";
|
|
5
5
|
import "@react-aria/button";
|
|
6
|
+
import "../../Checkbox/Checkbox.js";
|
|
6
7
|
import { Label as n } from "../../Label/Label.js";
|
|
7
8
|
import "@react-aria/dialog";
|
|
8
9
|
import "@react-aria/focus";
|
|
@@ -13,19 +14,19 @@ import "../../IconButton/IconButton.js";
|
|
|
13
14
|
import "../../Input/Input.js";
|
|
14
15
|
import "../../InputField/InputField.js";
|
|
15
16
|
import "react-router";
|
|
16
|
-
import "../../../TablePlugin-
|
|
17
|
+
import "../../../TablePlugin-5Cs2F_co.js";
|
|
17
18
|
import "../Providers/LanguageProvider.js";
|
|
18
19
|
import "../Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
19
20
|
import "../hooks/components/Flyout.js";
|
|
20
|
-
import "../../../index-
|
|
21
|
+
import "../../../index-B3c5pcHk.js";
|
|
21
22
|
import "../../SelectListbox/SelectListbox.js";
|
|
22
23
|
import "../../SelectListbox/SelectProvider.js";
|
|
23
24
|
import "../../Sortable/components/SortableItem.js";
|
|
24
|
-
import "../../../SortableProvider-
|
|
25
|
+
import "../../../SortableProvider-RaH_ZXB3.js";
|
|
25
26
|
import '../../../assets/EditorHeader.css';const t = {
|
|
26
27
|
"editor-header__container": "_editor-header__container_nsi6h_1",
|
|
27
28
|
"editor-header__info": "_editor-header__info_nsi6h_10"
|
|
28
|
-
},
|
|
29
|
+
}, A = ({ label: i, info: o = "", required: e = !1 }) => {
|
|
29
30
|
const m = `info_${d()}`;
|
|
30
31
|
return /* @__PURE__ */ p("div", { className: t["editor-header__container"], children: [
|
|
31
32
|
i !== "" && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(n, { htmlFor: m, required: e, children: i }) }),
|
|
@@ -33,6 +34,6 @@ import '../../../assets/EditorHeader.css';const t = {
|
|
|
33
34
|
] });
|
|
34
35
|
};
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
A as EditorHeader
|
|
37
38
|
};
|
|
38
39
|
//# sourceMappingURL=EditorHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorHeader.js","sources":["../../../../src/components/RteEditor/EditorHeader/EditorHeader.tsx"],"sourcesContent":["import { useId } from 'react';\n\nimport styles from './EditorHeader.module.css';\n\nimport { Label } from 'components';\n\ninterface EditorHeaderProps {\n label: string;\n info?: string;\n required?: boolean;\n}\n\nexport const EditorHeader = ({ label, info = '', required = false }: EditorHeaderProps) => {\n const infoId = `info_${useId()}`;\n\n return (\n <div className={styles['editor-header__container']}>\n {label !== '' && (\n <div>\n <Label htmlFor={infoId} required={required}>\n {label}\n </Label>\n </div>\n )}\n {info !== '' && <div className={styles['editor-header__info']}>{info}</div>}\n </div>\n );\n};\n"],"names":["EditorHeader","label","info","required","infoId","useId","jsxs","styles","jsx","Label"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditorHeader.js","sources":["../../../../src/components/RteEditor/EditorHeader/EditorHeader.tsx"],"sourcesContent":["import { useId } from 'react';\n\nimport styles from './EditorHeader.module.css';\n\nimport { Label } from 'components';\n\ninterface EditorHeaderProps {\n label: string;\n info?: string;\n required?: boolean;\n}\n\nexport const EditorHeader = ({ label, info = '', required = false }: EditorHeaderProps) => {\n const infoId = `info_${useId()}`;\n\n return (\n <div className={styles['editor-header__container']}>\n {label !== '' && (\n <div>\n <Label htmlFor={infoId} required={required}>\n {label}\n </Label>\n </div>\n )}\n {info !== '' && <div className={styles['editor-header__info']}>{info}</div>}\n </div>\n );\n};\n"],"names":["EditorHeader","label","info","required","infoId","useId","jsxs","styles","jsx","Label"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYaA,IAAe,CAAC,EAAE,OAAAC,GAAO,MAAAC,IAAO,IAAI,UAAAC,IAAW,SAA+B;AACnF,QAAAC,IAAS,QAAQC,EAAO,CAAA;AAE9B,SACG,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,0BAA0B,GAC9C,UAAA;AAAA,IAAUN,MAAA,wBACR,OACC,EAAA,UAAA,gBAAAO,EAACC,KAAM,SAASL,GAAQ,UAAAD,GACrB,UAAAF,EAAA,CACH,EACF,CAAA;AAAA,IAEDC,MAAS,MAAO,gBAAAM,EAAA,OAAA,EAAI,WAAWD,EAAO,qBAAqB,GAAI,UAAKL,EAAA,CAAA;AAAA,EAAA,GACvE;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { u } from "../../../../LexicalComposerContext.prod-
|
|
2
|
+
import { u } from "../../../../LexicalComposerContext.prod-DxxjdrXB.js";
|
|
3
3
|
import { c as f } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import {
|
|
4
|
+
import { H as _, a as p, l as h } from "../../../../Lexical.prod-sR6tW7N6.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-oFMKEW6f.js";
|
|
@@ -9,7 +9,7 @@ import { useTranslation as B } from "../../hooks/useTranslation.js";
|
|
|
9
9
|
const C = {
|
|
10
10
|
bold: "Bold",
|
|
11
11
|
italic: "Italic"
|
|
12
|
-
}, T = ["bold", "italic"],
|
|
12
|
+
}, T = ["bold", "italic"], $ = () => {
|
|
13
13
|
const t = B(), [i] = u(), [e, c] = l(!1), [n, m] = l(!1), d = (o) => {
|
|
14
14
|
i.dispatchCommand(h, o);
|
|
15
15
|
};
|
|
@@ -43,6 +43,6 @@ const C = {
|
|
|
43
43
|
)) });
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
$ as BlockFormatPlugin
|
|
47
47
|
};
|
|
48
48
|
//# sourceMappingURL=BlockFormatPlugin.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as f, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as h } from "../../../../LexicalComposerContext.prod-
|
|
4
|
-
import {
|
|
2
|
+
import { c as i } from "../../../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { u as h } from "../../../../LexicalComposerContext.prod-DxxjdrXB.js";
|
|
4
|
+
import { a9 as _, aa as y, ab as C, ac as k } from "../../../../Lexical.prod-sR6tW7N6.js";
|
|
5
5
|
import { useState as s, useEffect as m } from "react";
|
|
6
6
|
import { Icon as n } from "../../../Icon/Icon.js";
|
|
7
7
|
import "../../../Buttons/Button.js";
|
|
8
8
|
import "../../../Buttons/LinkButton.js";
|
|
9
9
|
import "@react-aria/button";
|
|
10
|
+
import "../../../Checkbox/Checkbox.js";
|
|
10
11
|
import "@react-aria/dialog";
|
|
11
12
|
import "@react-aria/focus";
|
|
12
13
|
import "@react-aria/overlays";
|
|
@@ -16,37 +17,37 @@ import "../../../IconButton/IconButton.js";
|
|
|
16
17
|
import "../../../Input/Input.js";
|
|
17
18
|
import "../../../InputField/InputField.js";
|
|
18
19
|
import "react-router";
|
|
19
|
-
import "../../../../TablePlugin-
|
|
20
|
+
import "../../../../TablePlugin-5Cs2F_co.js";
|
|
20
21
|
import { s as r } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
21
22
|
import { useTranslation as g } from "../../hooks/useTranslation.js";
|
|
22
23
|
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
23
24
|
import "../../hooks/components/Flyout.js";
|
|
24
25
|
import "../../Providers/LanguageProvider.js";
|
|
25
|
-
import "../../../../index-
|
|
26
|
+
import "../../../../index-B3c5pcHk.js";
|
|
26
27
|
import "../../../SelectListbox/SelectListbox.js";
|
|
27
28
|
import "../../../SelectListbox/SelectProvider.js";
|
|
28
29
|
import "../../../Sortable/components/SortableItem.js";
|
|
29
|
-
import "../../../../SortableProvider-
|
|
30
|
-
const
|
|
31
|
-
const o = g(), [t] = h(), [d, p] = s(!1), [l,
|
|
30
|
+
import "../../../../SortableProvider-RaH_ZXB3.js";
|
|
31
|
+
const Z = () => {
|
|
32
|
+
const o = g(), [t] = h(), [d, p] = s(!1), [l, u] = s(!1), c = () => {
|
|
32
33
|
t.dispatchCommand(C, void 0);
|
|
33
34
|
}, b = () => {
|
|
34
35
|
t.dispatchCommand(k, void 0);
|
|
35
36
|
};
|
|
36
37
|
return m(() => t.registerCommand(
|
|
37
38
|
_,
|
|
38
|
-
(
|
|
39
|
+
(e) => (p(e), !1),
|
|
39
40
|
1
|
|
40
41
|
), [t]), m(() => t.registerCommand(
|
|
41
42
|
y,
|
|
42
|
-
(
|
|
43
|
+
(e) => (u(e), !1),
|
|
43
44
|
1
|
|
44
45
|
), [t]), /* @__PURE__ */ f("div", { className: r["editor__toolbar-button-group"], children: [
|
|
45
46
|
/* @__PURE__ */ a(
|
|
46
47
|
"button",
|
|
47
48
|
{
|
|
48
|
-
onClick:
|
|
49
|
-
className:
|
|
49
|
+
onClick: c,
|
|
50
|
+
className: i(r["editor__toolbar-button"], r["editor__toolbar-button--undo"]),
|
|
50
51
|
"aria-label": o.aria.labels.undo,
|
|
51
52
|
"aria-keyshortcuts": o.aria.keyshortcuts.undo,
|
|
52
53
|
disabled: !d,
|
|
@@ -59,7 +60,7 @@ const Y = () => {
|
|
|
59
60
|
"button",
|
|
60
61
|
{
|
|
61
62
|
onClick: b,
|
|
62
|
-
className:
|
|
63
|
+
className: i(r["editor__toolbar-button"], r["editor__toolbar-button--redo"]),
|
|
63
64
|
"aria-label": o.aria.labels.redo,
|
|
64
65
|
"aria-keyshortcuts": o.aria.keyshortcuts.redo,
|
|
65
66
|
disabled: !l,
|
|
@@ -71,6 +72,6 @@ const Y = () => {
|
|
|
71
72
|
] });
|
|
72
73
|
};
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
Z as HistoryPlugin
|
|
75
76
|
};
|
|
76
77
|
//# sourceMappingURL=HistoryPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HistoryPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { CAN_UNDO_COMMAND, CAN_REDO_COMMAND, UNDO_COMMAND, REDO_COMMAND } from 'lexical';\nimport { useEffect, useState } from 'react';\n\nimport { Icon } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\nexport const HistoryPlugin = () => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const [canUndo, setCanUndo] = useState(false);\n const [canRedo, setCanRedo] = useState(false);\n\n const handleUndo = () => {\n editor.dispatchCommand(UNDO_COMMAND, undefined);\n };\n\n const handleRedo = () => {\n editor.dispatchCommand(REDO_COMMAND, undefined);\n };\n\n useEffect(() => {\n return editor.registerCommand<boolean>(\n CAN_UNDO_COMMAND,\n (payload) => {\n setCanUndo(payload);\n return false;\n },\n 1\n );\n }, [editor]);\n\n useEffect(() => {\n return editor.registerCommand<boolean>(\n CAN_REDO_COMMAND,\n (payload) => {\n setCanRedo(payload);\n return false;\n },\n 1\n );\n }, [editor]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <button\n onClick={handleUndo}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--undo`])}\n aria-label={t.aria.labels.undo}\n aria-keyshortcuts={t.aria.keyshortcuts.undo}\n disabled={!canUndo}\n title={t.format.undoTooltip}\n type=\"button\"\n >\n <Icon name=\"StepBack\" size={24} />\n </button>\n <button\n onClick={handleRedo}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--redo`])}\n aria-label={t.aria.labels.redo}\n aria-keyshortcuts={t.aria.keyshortcuts.redo}\n disabled={!canRedo}\n title={t.format.redoTooltip}\n type=\"button\"\n >\n <Icon name=\"StepForwards\" size={24} />\n </button>\n </div>\n );\n};\n"],"names":["HistoryPlugin","t","useTranslation","editor","useLexicalComposerContext","canUndo","setCanUndo","useState","canRedo","setCanRedo","handleUndo","UNDO_COMMAND","handleRedo","REDO_COMMAND","useEffect","CAN_UNDO_COMMAND","payload","CAN_REDO_COMMAND","jsxs","styles","jsx","clsx","Icon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"HistoryPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { CAN_UNDO_COMMAND, CAN_REDO_COMMAND, UNDO_COMMAND, REDO_COMMAND } from 'lexical';\nimport { useEffect, useState } from 'react';\n\nimport { Icon } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\nimport { useTranslation } from 'components/RteEditor/hooks/useTranslation';\n\nexport const HistoryPlugin = () => {\n const t = useTranslation();\n const [editor] = useLexicalComposerContext();\n const [canUndo, setCanUndo] = useState(false);\n const [canRedo, setCanRedo] = useState(false);\n\n const handleUndo = () => {\n editor.dispatchCommand(UNDO_COMMAND, undefined);\n };\n\n const handleRedo = () => {\n editor.dispatchCommand(REDO_COMMAND, undefined);\n };\n\n useEffect(() => {\n return editor.registerCommand<boolean>(\n CAN_UNDO_COMMAND,\n (payload) => {\n setCanUndo(payload);\n return false;\n },\n 1\n );\n }, [editor]);\n\n useEffect(() => {\n return editor.registerCommand<boolean>(\n CAN_REDO_COMMAND,\n (payload) => {\n setCanRedo(payload);\n return false;\n },\n 1\n );\n }, [editor]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <button\n onClick={handleUndo}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--undo`])}\n aria-label={t.aria.labels.undo}\n aria-keyshortcuts={t.aria.keyshortcuts.undo}\n disabled={!canUndo}\n title={t.format.undoTooltip}\n type=\"button\"\n >\n <Icon name=\"StepBack\" size={24} />\n </button>\n <button\n onClick={handleRedo}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--redo`])}\n aria-label={t.aria.labels.redo}\n aria-keyshortcuts={t.aria.keyshortcuts.redo}\n disabled={!canRedo}\n title={t.format.redoTooltip}\n type=\"button\"\n >\n <Icon name=\"StepForwards\" size={24} />\n </button>\n </div>\n );\n};\n"],"names":["HistoryPlugin","t","useTranslation","editor","useLexicalComposerContext","canUndo","setCanUndo","useState","canRedo","setCanRedo","handleUndo","UNDO_COMMAND","handleRedo","REDO_COMMAND","useEffect","CAN_UNDO_COMMAND","payload","CAN_REDO_COMMAND","jsxs","styles","jsx","clsx","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,MAAMA,IAAgB,MAAM;AACjC,QAAMC,IAAIC,EAAe,GACnB,CAACC,CAAM,IAAIC,EAA0B,GACrC,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK,GACtC,CAACC,GAASC,CAAU,IAAIF,EAAS,EAAK,GAEtCG,IAAa,MAAM;AAChB,IAAAP,EAAA,gBAAgBQ,GAAc,MAAS;AAAA,EAChD,GAEMC,IAAa,MAAM;AAChB,IAAAT,EAAA,gBAAgBU,GAAc,MAAS;AAAA,EAChD;AAEA,SAAAC,EAAU,MACDX,EAAO;AAAA,IACZY;AAAAA,IACA,CAACC,OACCV,EAAWU,CAAO,GACX;AAAA,IAET;AAAA,EACF,GACC,CAACb,CAAM,CAAC,GAEXW,EAAU,MACDX,EAAO;AAAA,IACZc;AAAAA,IACA,CAACD,OACCP,EAAWO,CAAO,GACX;AAAA,IAET;AAAA,EACF,GACC,CAACb,CAAM,CAAC,GAGR,gBAAAe,EAAA,OAAA,EAAI,WAAWC,EAAO,8BAA8B,GACnD,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAASV;AAAA,QACT,WAAWW,EAAKF,EAAO,wBAAwB,GAAGA,EAAO,8BAA8B,CAAC;AAAA,QACxF,cAAYlB,EAAE,KAAK,OAAO;AAAA,QAC1B,qBAAmBA,EAAE,KAAK,aAAa;AAAA,QACvC,UAAU,CAACI;AAAA,QACX,OAAOJ,EAAE,OAAO;AAAA,QAChB,MAAK;AAAA,QAEL,UAAC,gBAAAmB,EAAAE,GAAA,EAAK,MAAK,YAAW,MAAM,GAAI,CAAA;AAAA,MAAA;AAAA,IAClC;AAAA,IACA,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAASR;AAAA,QACT,WAAWS,EAAKF,EAAO,wBAAwB,GAAGA,EAAO,8BAA8B,CAAC;AAAA,QACxF,cAAYlB,EAAE,KAAK,OAAO;AAAA,QAC1B,qBAAmBA,EAAE,KAAK,aAAa;AAAA,QACvC,UAAU,CAACO;AAAA,QACX,OAAOP,EAAE,OAAO;AAAA,QAChB,MAAK;AAAA,QAEL,UAAC,gBAAAmB,EAAAE,GAAA,EAAK,MAAK,gBAAe,MAAM,GAAI,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACtC,GACF;AAEJ;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { A as
|
|
4
|
-
import "../../../../../helpers-
|
|
3
|
+
import { A as D } from "../../../../../TablePlugin-5Cs2F_co.js";
|
|
4
|
+
import "../../../../../helpers-BpqX-Lj3.js";
|
|
5
5
|
import "../../../../Icon/Icon.js";
|
|
6
6
|
import "../../../../Buttons/Button.js";
|
|
7
7
|
import "../../../../Buttons/LinkButton.js";
|
|
8
8
|
import "@react-aria/button";
|
|
9
|
+
import "../../../../Checkbox/Checkbox.js";
|
|
9
10
|
import "../../../../Label/Label.js";
|
|
10
11
|
import "@react-aria/dialog";
|
|
11
12
|
import "@react-aria/focus";
|
|
@@ -22,12 +23,12 @@ import "../../../hooks/useTranslation.js";
|
|
|
22
23
|
import "../LinkContextMenu/LinkContextMenu.js";
|
|
23
24
|
import "../../../hooks/components/Flyout.js";
|
|
24
25
|
import "../../../Providers/LanguageProvider.js";
|
|
25
|
-
import "../../../../../index-
|
|
26
|
+
import "../../../../../index-B3c5pcHk.js";
|
|
26
27
|
import "../../../../SelectListbox/SelectListbox.js";
|
|
27
28
|
import "../../../../SelectListbox/SelectProvider.js";
|
|
28
29
|
import "../../../../Sortable/components/SortableItem.js";
|
|
29
|
-
import "../../../../../SortableProvider-
|
|
30
|
+
import "../../../../../SortableProvider-RaH_ZXB3.js";
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
+
D as AddLinkForm
|
|
32
33
|
};
|
|
33
34
|
//# sourceMappingURL=AddLinkFrom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddLinkFrom.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddLinkFrom.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as k, Fragment as v, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as K, useState as b, useRef as N, useImperativeHandle as T, useLayoutEffect as g } from "react";
|
|
3
|
-
import { e as E } from "../../../../../helpers-
|
|
3
|
+
import { e as E } from "../../../../../helpers-BpqX-Lj3.js";
|
|
4
4
|
import { Icon as m } from "../../../../Icon/Icon.js";
|
|
5
5
|
import { useTranslation as R } from "../../../hooks/useTranslation.js";
|
|
6
6
|
import { Button as y } from "../../../../Buttons/Button.js";
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsx as k, jsxs as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as $ } from "../../../../LexicalComposerContext.prod-
|
|
2
|
+
import { u as $ } from "../../../../LexicalComposerContext.prod-DxxjdrXB.js";
|
|
3
3
|
import { c as q } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import {
|
|
4
|
+
import { m as z, x as G, N as J } from "../../../../LexicalLink.prod-iDKxtfCF.js";
|
|
5
5
|
import { useRef as a, useState as Q, useEffect as m } from "react";
|
|
6
|
-
import { t as X,
|
|
7
|
-
import { A as nt } from "../../../../TablePlugin-
|
|
8
|
-
import { e as it } from "../../../../helpers-
|
|
6
|
+
import { t as X, H as f, a8 as Z, a7 as tt, a as w, f as et, M as ot, b as rt } from "../../../../Lexical.prod-sR6tW7N6.js";
|
|
7
|
+
import { A as nt } from "../../../../TablePlugin-5Cs2F_co.js";
|
|
8
|
+
import { e as it } from "../../../../helpers-BpqX-Lj3.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";
|
|
12
12
|
import "../../../Buttons/Button.js";
|
|
13
13
|
import "../../../Buttons/LinkButton.js";
|
|
14
14
|
import "@react-aria/button";
|
|
15
|
+
import "../../../Checkbox/Checkbox.js";
|
|
15
16
|
import "@react-aria/dialog";
|
|
16
17
|
import "@react-aria/focus";
|
|
17
18
|
import "@react-aria/overlays";
|
|
@@ -21,27 +22,27 @@ import "../../../IconButton/IconButton.js";
|
|
|
21
22
|
import "../../../Input/Input.js";
|
|
22
23
|
import "../../../InputField/InputField.js";
|
|
23
24
|
import "react-router";
|
|
24
|
-
import { setScrollableContainers as
|
|
25
|
+
import { setScrollableContainers as B, removeScrollableContainers as at } from "../../helpers.js";
|
|
25
26
|
import { s as h } from "../../../../RteEditor.module-oFMKEW6f.js";
|
|
26
27
|
import { useTranslation as ut } from "../../hooks/useTranslation.js";
|
|
27
28
|
import "../../Providers/LanguageProvider.js";
|
|
28
|
-
import "../../../../index-
|
|
29
|
+
import "../../../../index-B3c5pcHk.js";
|
|
29
30
|
import "../../../SelectListbox/SelectListbox.js";
|
|
30
31
|
import "../../../SelectListbox/SelectProvider.js";
|
|
31
32
|
import "../../../Sortable/components/SortableItem.js";
|
|
32
|
-
import "../../../../SortableProvider-
|
|
33
|
-
const mt = 200,
|
|
33
|
+
import "../../../../SortableProvider-RaH_ZXB3.js";
|
|
34
|
+
const mt = 200, M = (p) => {
|
|
34
35
|
let n = p;
|
|
35
36
|
for (; n; ) {
|
|
36
|
-
if (
|
|
37
|
+
if (z(n))
|
|
37
38
|
return n;
|
|
38
39
|
n = n.getParent();
|
|
39
40
|
}
|
|
40
41
|
return null;
|
|
41
|
-
},
|
|
42
|
+
}, O = (p) => {
|
|
42
43
|
let n = p;
|
|
43
44
|
for (; n; ) {
|
|
44
|
-
if (
|
|
45
|
+
if (z(n))
|
|
45
46
|
return {
|
|
46
47
|
active: !0,
|
|
47
48
|
url: n.getURL(),
|
|
@@ -50,47 +51,47 @@ const mt = 200, z = (p) => {
|
|
|
50
51
|
n = n.getParent();
|
|
51
52
|
}
|
|
52
53
|
return !1;
|
|
53
|
-
},
|
|
54
|
-
const n = ut(), [c] = $(), { flyout:
|
|
54
|
+
}, Wt = ({ parentScrollPosition: p }) => {
|
|
55
|
+
const n = ut(), [c] = $(), { flyout: I, showFlyout: E, hideFlyout: C, isVisible: u } = ct(), d = a(), N = a(!1), y = a(""), g = a(""), [L, U] = Q({ active: !1, url: "", linktext: "" }), P = a(u), x = a(null), S = a(null), T = a(), b = () => {
|
|
55
56
|
c.update(() => {
|
|
56
57
|
const e = f();
|
|
57
58
|
x.current = e;
|
|
58
59
|
});
|
|
59
|
-
},
|
|
60
|
+
}, R = () => {
|
|
60
61
|
c.update(() => {
|
|
61
62
|
x.current && ot(x.current);
|
|
62
63
|
});
|
|
63
|
-
},
|
|
64
|
+
}, A = (e, t) => {
|
|
64
65
|
E({
|
|
65
66
|
position: t,
|
|
66
67
|
children: /* @__PURE__ */ k(
|
|
67
68
|
st,
|
|
68
69
|
{
|
|
69
70
|
url: e,
|
|
70
|
-
onSave: (o) =>
|
|
71
|
+
onSave: (o) => H(o, ""),
|
|
71
72
|
onDelete: () => V(),
|
|
72
73
|
onClose: D,
|
|
73
|
-
ref:
|
|
74
|
+
ref: T
|
|
74
75
|
}
|
|
75
76
|
)
|
|
76
77
|
});
|
|
77
78
|
}, D = () => {
|
|
78
79
|
var e;
|
|
79
|
-
(e =
|
|
80
|
-
},
|
|
80
|
+
(e = T.current) == null || e.clearForm(), C(), R();
|
|
81
|
+
}, F = () => {
|
|
81
82
|
var t;
|
|
82
|
-
const e = (t =
|
|
83
|
+
const e = (t = S.current) == null ? void 0 : t.getBoundingClientRect();
|
|
83
84
|
!N.current && e && (b(), E({ position: { top: e.bottom, left: e.left }, ...j }), setTimeout(() => {
|
|
84
85
|
var o;
|
|
85
86
|
return (o = d.current) == null ? void 0 : o.setDefaults("", g.current);
|
|
86
87
|
}, 0));
|
|
87
88
|
}, v = () => {
|
|
88
|
-
C(),
|
|
89
|
-
},
|
|
89
|
+
C(), R();
|
|
90
|
+
}, H = (e, t) => {
|
|
90
91
|
c.update(() => {
|
|
91
92
|
const o = f();
|
|
92
93
|
if (w(o)) {
|
|
93
|
-
const i = o.anchor.getNode(), s =
|
|
94
|
+
const i = o.anchor.getNode(), s = M(i);
|
|
94
95
|
if (t && t !== "") {
|
|
95
96
|
if (s) {
|
|
96
97
|
const l = rt(t);
|
|
@@ -113,7 +114,7 @@ const mt = 200, z = (p) => {
|
|
|
113
114
|
{
|
|
114
115
|
isLink: L,
|
|
115
116
|
onCloseHandler: v,
|
|
116
|
-
onSaveHandler: (e, t) =>
|
|
117
|
+
onSaveHandler: (e, t) => H(e, t),
|
|
117
118
|
ref: d
|
|
118
119
|
}
|
|
119
120
|
)
|
|
@@ -124,10 +125,10 @@ const mt = 200, z = (p) => {
|
|
|
124
125
|
}, [d, u]), m(() => {
|
|
125
126
|
const e = (r) => {
|
|
126
127
|
if (w(r) && r.isCollapsed()) {
|
|
127
|
-
const i =
|
|
128
|
+
const i = O(r.anchor.getNode());
|
|
128
129
|
if (i) {
|
|
129
130
|
const s = c.getElementByKey(r.anchor.getNode().getKey()), l = s ? { top: s.getBoundingClientRect().bottom, left: s.getBoundingClientRect().left } : { top: 0, left: 0 };
|
|
130
|
-
return
|
|
131
|
+
return A(i.url, l), !0;
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
return !1;
|
|
@@ -157,26 +158,26 @@ const mt = 200, z = (p) => {
|
|
|
157
158
|
const r = f();
|
|
158
159
|
if (b(), !w(r))
|
|
159
160
|
return !1;
|
|
160
|
-
const i =
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
return (
|
|
161
|
+
const i = O(r.anchor.getNode()), s = (_ = "", W = "") => {
|
|
162
|
+
F(), setTimeout(() => {
|
|
163
|
+
var K;
|
|
164
|
+
return (K = d.current) == null ? void 0 : K.setDefaults(_, W);
|
|
164
165
|
}, 0);
|
|
165
166
|
};
|
|
166
167
|
if (i)
|
|
167
168
|
return o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), y.current = i.linktext, s(i.url, i.linktext), !0;
|
|
168
169
|
const l = r.getTextContent();
|
|
169
|
-
return l !== "" ? (g.current = l, s("", g.current), !0) : (
|
|
170
|
+
return l !== "" ? (g.current = l, s("", g.current), !0) : (F(), !0);
|
|
170
171
|
}
|
|
171
172
|
return !1;
|
|
172
173
|
},
|
|
173
174
|
et
|
|
174
175
|
), t = c.registerUpdateListener(({ editorState: o }) => {
|
|
175
|
-
|
|
176
|
+
U(
|
|
176
177
|
o.read(() => {
|
|
177
178
|
const r = f();
|
|
178
179
|
if (b(), w(r)) {
|
|
179
|
-
const i = r.anchor.getNode(), s =
|
|
180
|
+
const i = r.anchor.getNode(), s = M(i);
|
|
180
181
|
if (s)
|
|
181
182
|
return {
|
|
182
183
|
active: !0,
|
|
@@ -197,25 +198,25 @@ const mt = 200, z = (p) => {
|
|
|
197
198
|
};
|
|
198
199
|
}, [c]), m(() => {
|
|
199
200
|
var e;
|
|
200
|
-
|
|
201
|
+
P.current = u, u || (e = T.current) == null || e.clearForm();
|
|
201
202
|
}, [u]), m(() => {
|
|
202
203
|
u && v();
|
|
203
204
|
}, [p]), m(() => {
|
|
204
205
|
L.active || C();
|
|
205
206
|
}, [L]), m(() => {
|
|
206
|
-
const e = (o) => (
|
|
207
|
+
const e = (o) => (B(t), o.key === "Escape" && P.current && (o.preventDefault(), o.stopPropagation(), v()), !0);
|
|
207
208
|
window.addEventListener("keydown", e, { capture: !0 });
|
|
208
209
|
const t = () => {
|
|
209
210
|
C();
|
|
210
211
|
};
|
|
211
|
-
return
|
|
212
|
+
return B(t), window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
212
213
|
window.removeEventListener("keydown", e), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), at(t);
|
|
213
214
|
};
|
|
214
215
|
}, []), /* @__PURE__ */ k("div", { className: h["editor__toolbar-button-group"], children: /* @__PURE__ */ Y("div", { className: h["editor__toolbar-button-flyoutwrapper"], children: [
|
|
215
216
|
/* @__PURE__ */ k(
|
|
216
217
|
"button",
|
|
217
218
|
{
|
|
218
|
-
onClick:
|
|
219
|
+
onClick: F,
|
|
219
220
|
title: n.links.linkTooltip,
|
|
220
221
|
className: q(
|
|
221
222
|
h["editor__toolbar-button"],
|
|
@@ -225,15 +226,15 @@ const mt = 200, z = (p) => {
|
|
|
225
226
|
"aria-label": n.aria.labels.link,
|
|
226
227
|
"aria-keyshortcuts": n.aria.keyshortcuts.link,
|
|
227
228
|
type: "button",
|
|
228
|
-
ref:
|
|
229
|
+
ref: S,
|
|
229
230
|
children: /* @__PURE__ */ k(lt, { name: "Link", size: 20 })
|
|
230
231
|
}
|
|
231
232
|
),
|
|
232
|
-
|
|
233
|
+
I
|
|
233
234
|
] }) });
|
|
234
235
|
};
|
|
235
236
|
export {
|
|
236
|
-
|
|
237
|
-
|
|
237
|
+
Wt as LinkPlugin,
|
|
238
|
+
O as getLinkNodeTag
|
|
238
239
|
};
|
|
239
240
|
//# sourceMappingURL=LinkPlugin.js.map
|