@uva-glass/component-library 1.52.1 → 1.54.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-zUeT_jIr.js → Lexical.prod-DNRTKPfN.js} +72 -66
- package/dist/Lexical.prod-DNRTKPfN.js.map +1 -0
- package/dist/{LexicalUtils.prod-DtRifALg.js → LexicalUtils.prod-D_BPEjfg.js} +2 -2
- package/dist/{LexicalUtils.prod-DtRifALg.js.map → LexicalUtils.prod-D_BPEjfg.js.map} +1 -1
- package/dist/{ListPlugin-CxyYg2bv.js → ListPlugin-CgNBzfIl.js} +4 -4
- package/dist/{ListPlugin-CxyYg2bv.js.map → ListPlugin-CgNBzfIl.js.map} +1 -1
- package/dist/{MultiSelect-D1FnMER4.js → MultiSelect-DQaqItEH.js} +13 -11
- package/dist/{MultiSelect-D1FnMER4.js.map → MultiSelect-DQaqItEH.js.map} +1 -1
- package/dist/RteEditor.module-BjGyWKhW.js +26 -0
- package/dist/RteEditor.module-BjGyWKhW.js.map +1 -0
- package/dist/Sortable.module-BrgGu8qp.js +24 -0
- package/dist/Sortable.module-BrgGu8qp.js.map +1 -0
- package/dist/SortableProvider-Z0e0qeQT.js +152 -0
- package/dist/SortableProvider-Z0e0qeQT.js.map +1 -0
- package/dist/assets/RteEditor.css +1 -1
- package/dist/assets/Sortable.css +1 -0
- package/dist/components/CheckboxTree/CheckboxTree.js +11 -9
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/Icon/icons/index.d.ts +9 -0
- package/dist/components/Icon/icons/index.js +52 -37
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +13 -11
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +4 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +26 -24
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +64 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +5 -0
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js.map +1 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +23 -21
- 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 +3 -3
- package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +22 -20
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.d.ts +2 -0
- package/dist/components/RteEditor/Plugins/index.js +10 -6
- package/dist/components/RteEditor/Plugins/index.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.js +569 -462
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js +9 -7
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/Sortable/Sortable.d.ts +16 -0
- package/dist/components/Sortable/Sortable.js +27 -0
- package/dist/components/Sortable/Sortable.js.map +1 -0
- package/dist/components/Sortable/Sortable.stories.d.ts +7 -0
- package/dist/components/Sortable/Sortable.stories.js +53 -0
- package/dist/components/Sortable/Sortable.stories.js.map +1 -0
- package/dist/components/Sortable/SortableProvider.d.ts +23 -0
- package/dist/components/Sortable/SortableProvider.js +10 -0
- package/dist/components/Sortable/SortableProvider.js.map +1 -0
- package/dist/components/Sortable/actions.d.ts +49 -0
- package/dist/components/Sortable/actions.js +33 -0
- package/dist/components/Sortable/actions.js.map +1 -0
- package/dist/components/Sortable/components/SortableContainer.d.ts +7 -0
- package/dist/components/Sortable/components/SortableContainer.js +9 -0
- package/dist/components/Sortable/components/SortableContainer.js.map +1 -0
- package/dist/components/Sortable/components/SortableHandle.d.ts +4 -0
- package/dist/components/Sortable/components/SortableHandle.js +11 -0
- package/dist/components/Sortable/components/SortableHandle.js.map +1 -0
- package/dist/components/Sortable/components/SortableItem.d.ts +9 -0
- package/dist/components/Sortable/components/SortableItem.js +113 -0
- package/dist/components/Sortable/components/SortableItem.js.map +1 -0
- package/dist/components/Sortable/constants.d.ts +10 -0
- package/dist/components/Sortable/constants.js +14 -0
- package/dist/components/Sortable/constants.js.map +1 -0
- package/dist/components/Sortable/index.d.ts +1 -0
- package/dist/components/Sortable/index.js +5 -0
- package/dist/components/Sortable/index.js.map +1 -0
- package/dist/components/Sortable/sortableReducer.d.ts +24 -0
- package/dist/components/Sortable/sortableReducer.js +92 -0
- package/dist/components/Sortable/sortableReducer.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +14 -12
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-DpGAANJ8.js → helpers-TSjo3aAv.js} +3 -3
- package/dist/{helpers-DpGAANJ8.js.map → helpers-TSjo3aAv.js.map} +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/Lexical.prod-zUeT_jIr.js.map +0 -1
- package/dist/RteEditor.module--4R0Ql6Y.js +0 -26
- package/dist/RteEditor.module--4R0Ql6Y.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g } from "react";
|
|
3
3
|
import { fn as l } from "../../index-MQ0yPLdl.js";
|
|
4
|
-
import { InputField as
|
|
4
|
+
import { InputField as o } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
import { Icon as f } from "../Icon/Icon.js";
|
|
7
7
|
import "../Buttons/Button.js";
|
|
@@ -15,9 +15,11 @@ import "../GridRow/GridRow.js";
|
|
|
15
15
|
import "../IconButton/IconButton.js";
|
|
16
16
|
import "../Input/Input.js";
|
|
17
17
|
import "react-router-dom";
|
|
18
|
-
import "../../MultiSelect-
|
|
18
|
+
import "../../MultiSelect-DQaqItEH.js";
|
|
19
19
|
import "../SelectListbox/SelectListbox.js";
|
|
20
20
|
import "../SelectListbox/SelectProvider.js";
|
|
21
|
+
import "../Sortable/components/SortableItem.js";
|
|
22
|
+
import "../../SortableProvider-Z0e0qeQT.js";
|
|
21
23
|
const C = `
|
|
22
24
|
// Has all HTMLInputElement props available except "className" and "style"
|
|
23
25
|
<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}
|
|
@@ -25,9 +27,9 @@ const C = `
|
|
|
25
27
|
`, h = (t) => {
|
|
26
28
|
const e = t.variant ?? [];
|
|
27
29
|
return { ...t, variant: e.toString() };
|
|
28
|
-
},
|
|
30
|
+
}, G = {
|
|
29
31
|
title: "Atoms/InputField",
|
|
30
|
-
component:
|
|
32
|
+
component: o,
|
|
31
33
|
argTypes: {
|
|
32
34
|
variant: {
|
|
33
35
|
options: ["large"],
|
|
@@ -47,17 +49,17 @@ const C = `
|
|
|
47
49
|
}
|
|
48
50
|
},
|
|
49
51
|
parameters: {
|
|
50
|
-
inspectComponent:
|
|
52
|
+
inspectComponent: o,
|
|
51
53
|
codeString: C
|
|
52
54
|
}
|
|
53
|
-
},
|
|
55
|
+
}, a = (t) => {
|
|
54
56
|
const [e, i] = d(""), p = g(null), s = (c) => {
|
|
55
57
|
i(c.target.value), l()("handleChange");
|
|
56
58
|
}, m = () => {
|
|
57
59
|
i(""), l()("handleClear");
|
|
58
60
|
};
|
|
59
61
|
return /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
|
|
60
|
-
|
|
62
|
+
o,
|
|
61
63
|
{
|
|
62
64
|
...h(t),
|
|
63
65
|
value: e,
|
|
@@ -70,16 +72,16 @@ const C = `
|
|
|
70
72
|
type: "text",
|
|
71
73
|
variant: void 0,
|
|
72
74
|
id: "4f9ca77d"
|
|
73
|
-
}, v =
|
|
75
|
+
}, v = a.bind({});
|
|
74
76
|
v.args = {
|
|
75
77
|
...n
|
|
76
78
|
};
|
|
77
|
-
const b =
|
|
79
|
+
const b = a.bind({});
|
|
78
80
|
b.args = {
|
|
79
81
|
...n,
|
|
80
82
|
clearTrigger: "Clear"
|
|
81
83
|
};
|
|
82
|
-
const y =
|
|
84
|
+
const y = a.bind({});
|
|
83
85
|
y.args = {
|
|
84
86
|
...n,
|
|
85
87
|
clearTrigger: /* @__PURE__ */ r(f, { name: "Cross" })
|
|
@@ -88,6 +90,6 @@ export {
|
|
|
88
90
|
v as InputFieldExample,
|
|
89
91
|
y as WithIconClearTrigger,
|
|
90
92
|
b as WithStringClearTrigger,
|
|
91
|
-
|
|
93
|
+
G as default
|
|
92
94
|
};
|
|
93
95
|
//# sourceMappingURL=InputField.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon } from 'components';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}\n value={value} type={type} clearTrigger={clearTrigger} />\n`;\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: InputField,\n codeString: codeString,\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["codeString","transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon } from 'components';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}\n value={value} type={type} clearTrigger={clearTrigger} />\n`;\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: InputField,\n codeString: codeString,\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["codeString","transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA,GAMbC,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,YAAY,OAAO;AAAA,IACvC;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAL;AAAA,EACF;AACF,GAEMM,IAAqC,CAACJ,MAAS;AACnD,QAAM,CAACK,GAAYC,CAAa,IAAIC,EAAmC,EAAE,GACnEC,IAAWC,EAAyB,IAAI,GAExCC,IAAe,CAACC,MAAyC;AAC/C,IAAAL,EAAAK,EAAM,OAAO,KAAK,GAChCC,EAAA,EAAK,cAAc;AAAA,EAAA,GAGfC,IAAc,MAAM;AACxB,IAAAP,EAAc,EAAE,GAChBM,EAAA,EAAK,aAAa;AAAA,EAAA;AAGpB,2BACGE,GACC,EAAA,UAAA,gBAAAC;AAAA,IAACZ;AAAA,IAAA;AAAA,MACE,GAAGJ,EAAcC,CAAI;AAAA,MACtB,OAAOK;AAAA,MACP,UAAUK;AAAA,MACV,SAASG;AAAA,MACT,KAAKL;AAAA,IAAA;AAAA,EAET,EAAA,CAAA;AAEJ,GAEMQ,IAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AACN,GAEaC,IAAoBb,EAAS,KAAK,EAAE;AACjDa,EAAkB,OAAO;AAAA,EACvB,GAAGD;AACL;AAEO,MAAME,IAAyBd,EAAS,KAAK,EAAE;AACtDc,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,cAAc;AAChB;AAEO,MAAMG,IAAuBf,EAAS,KAAK,EAAE;AACpDe,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,cAAc,gBAAAD,EAACK,GAAK,EAAA,MAAK,QAAQ,CAAA;AACnC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { fn as d } from "../../index-MQ0yPLdl.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
|
-
import { M as e } from "../../MultiSelect-
|
|
4
|
+
import { M as e } from "../../MultiSelect-DQaqItEH.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
const C = `
|
|
7
7
|
// MultiSelectHeader can be added optionally
|
|
@@ -14,10 +14,12 @@ import "../../IconButton/IconButton.js";
|
|
|
14
14
|
import "../../Input/Input.js";
|
|
15
15
|
import "../../InputField/InputField.js";
|
|
16
16
|
import "react-router-dom";
|
|
17
|
-
import { a as
|
|
17
|
+
import { a as k } from "../../../MultiSelect-DQaqItEH.js";
|
|
18
18
|
import "../../SelectListbox/SelectListbox.js";
|
|
19
19
|
import "../../SelectListbox/SelectProvider.js";
|
|
20
|
+
import "../../Sortable/components/SortableItem.js";
|
|
21
|
+
import "../../../SortableProvider-Z0e0qeQT.js";
|
|
20
22
|
export {
|
|
21
|
-
|
|
23
|
+
k as MultiSelectHeader
|
|
22
24
|
};
|
|
23
25
|
//# sourceMappingURL=MultiSelectHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiSelectHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { fn as a } from "../../index-MQ0yPLdl.js";
|
|
3
3
|
import { ProgrammeCard as o } from "./ProgrammeCard.js";
|
|
4
4
|
import { Container as n } from "../../storyComponents/Container/Container.js";
|
|
@@ -16,49 +16,51 @@ import "../IconButton/IconButton.js";
|
|
|
16
16
|
import "../Input/Input.js";
|
|
17
17
|
import "../InputField/InputField.js";
|
|
18
18
|
import "react-router-dom";
|
|
19
|
-
import "../../MultiSelect-
|
|
19
|
+
import "../../MultiSelect-DQaqItEH.js";
|
|
20
20
|
import { Repeater as i } from "../Repeater/Repeater.js";
|
|
21
21
|
import "../SelectListbox/SelectListbox.js";
|
|
22
22
|
import "../SelectListbox/SelectProvider.js";
|
|
23
|
-
|
|
23
|
+
import "../Sortable/components/SortableItem.js";
|
|
24
|
+
import "../../SortableProvider-Z0e0qeQT.js";
|
|
25
|
+
const l = "<ProgrammeCard key={key} header={header} details={details} onClick={onClickFunction} />", _ = {
|
|
24
26
|
title: "Atoms/ProgrammeCard",
|
|
25
27
|
component: o,
|
|
26
28
|
parameters: {
|
|
27
29
|
inspectComponent: o,
|
|
28
30
|
codeString: l
|
|
29
31
|
}
|
|
30
|
-
}, s = (t) => /* @__PURE__ */
|
|
31
|
-
|
|
32
|
+
}, s = (t) => /* @__PURE__ */ r(n, { size: "large", children: /* @__PURE__ */ r(o, { ...t }) }), p = s.bind({});
|
|
33
|
+
p.args = {
|
|
32
34
|
header: "This is my header",
|
|
33
35
|
details: "This is my details",
|
|
34
36
|
onClick: a()
|
|
35
37
|
};
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
header: /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
38
|
+
const d = s.bind({});
|
|
39
|
+
d.args = {
|
|
40
|
+
header: /* @__PURE__ */ e(i, { flexDirection: "row", gap: "150", children: [
|
|
41
|
+
/* @__PURE__ */ r(m, { name: "Envelope", size: 32 }),
|
|
42
|
+
/* @__PURE__ */ r("h2", { style: { margin: 0 }, children: "This is my header" })
|
|
41
43
|
] }),
|
|
42
|
-
details: /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
details: /* @__PURE__ */ e(i, { flexDirection: "row", gap: "150", children: [
|
|
45
|
+
/* @__PURE__ */ e(i, { flexDirection: "row", children: [
|
|
46
|
+
/* @__PURE__ */ r(m, { name: "FaceFrown" }),
|
|
45
47
|
"Details 1"
|
|
46
48
|
] }),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ e(i, { flexDirection: "row", children: [
|
|
50
|
+
/* @__PURE__ */ r(m, { name: "Heart" }),
|
|
49
51
|
"Details 2"
|
|
50
52
|
] }),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ e(i, { flexDirection: "row", children: [
|
|
54
|
+
/* @__PURE__ */ r(m, { name: "Sparkles" }),
|
|
53
55
|
"Details 3"
|
|
54
56
|
] })
|
|
55
57
|
] }),
|
|
56
58
|
onClick: a()
|
|
57
59
|
};
|
|
58
|
-
const c = (t) => /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
60
|
+
const c = (t) => /* @__PURE__ */ r(n, { size: "large", children: /* @__PURE__ */ e(i, { children: [
|
|
61
|
+
/* @__PURE__ */ r(o, { ...t }),
|
|
62
|
+
/* @__PURE__ */ r(o, { ...t }),
|
|
63
|
+
/* @__PURE__ */ r(o, { ...t })
|
|
62
64
|
] }) }), h = c.bind({});
|
|
63
65
|
h.args = {
|
|
64
66
|
header: "This is my header",
|
|
@@ -67,8 +69,8 @@ h.args = {
|
|
|
67
69
|
};
|
|
68
70
|
export {
|
|
69
71
|
h as MultiProgrammeCards,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
p as ProgrammeCardExample,
|
|
73
|
+
d as WithComplexContent,
|
|
74
|
+
_ as default
|
|
73
75
|
};
|
|
74
76
|
//# 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,EACF;AACF,GAEMG,IAAwC,CAACC,MAC5C,gBAAAC,EAAAC,GAAA,EAAU,MAAK,SACd,UAAC,gBAAAD,EAAAH,GAAA,EAAe,GAAGE,EAAM,CAAA,EAC3B,CAAA,GAGWG,IAAuBJ,EAAS,KAAK,EAAE;AACpDI,EAAqB,OAAO;AAAA,EAC1B,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAASC,EAAG;AACd;AAEO,MAAMC,IAAqBN,EAAS,KAAK,EAAE;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,qBAAA;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,GAE1B;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,GAAM;AAAA,EAC3B,CAAA,EACF,CAAA,GAGWU,IAAsBD,EAA4B,KAAK,EAAE;AACtEC,EAAoB,OAAO;AAAA,EACzB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAASN,EAAG;AACd;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { u as m, d as n } from "../../../../Lexical.prod-
|
|
2
|
+
import { u as m, d as n } from "../../../../Lexical.prod-DNRTKPfN.js";
|
|
3
3
|
import { c as s } from "../../../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { Icon as d } from "../../../Icon/Icon.js";
|
|
5
|
-
import { s as t } from "../../../../RteEditor.module
|
|
5
|
+
import { s as t } from "../../../../RteEditor.module-BjGyWKhW.js";
|
|
6
6
|
const b = {
|
|
7
7
|
bold: "FormatBold",
|
|
8
8
|
italic: "FormatItalic"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HistoryPlugin: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as b, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "../../../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { u as f, $ as _, K as h, h as C, g as U } from "../../../../Lexical.prod-DNRTKPfN.js";
|
|
4
|
+
import { useState as n, useEffect as m } from "react";
|
|
5
|
+
import { Icon as a } from "../../../Icon/Icon.js";
|
|
6
|
+
import "../../../Buttons/Button.js";
|
|
7
|
+
import "../../../Buttons/LinkButton.js";
|
|
8
|
+
import "@react-aria/button";
|
|
9
|
+
import "@react-aria/dialog";
|
|
10
|
+
import "@react-aria/focus";
|
|
11
|
+
import "@react-aria/overlays";
|
|
12
|
+
import "../../../OverlayCloseButton/OverlayCloseButton.js";
|
|
13
|
+
import "../../../GridRow/GridRow.js";
|
|
14
|
+
import "../../../IconButton/IconButton.js";
|
|
15
|
+
import "../../../Input/Input.js";
|
|
16
|
+
import "../../../InputField/InputField.js";
|
|
17
|
+
import "react-router-dom";
|
|
18
|
+
import "../../../../MultiSelect-DQaqItEH.js";
|
|
19
|
+
import { s as t } from "../../../../RteEditor.module-BjGyWKhW.js";
|
|
20
|
+
import "../../../SelectListbox/SelectListbox.js";
|
|
21
|
+
import "../../../SelectListbox/SelectProvider.js";
|
|
22
|
+
import "../../../Sortable/components/SortableItem.js";
|
|
23
|
+
import "../../../../SortableProvider-Z0e0qeQT.js";
|
|
24
|
+
const J = () => {
|
|
25
|
+
const [o] = f(), [s, d] = n(!1), [l, p] = n(!1), c = () => {
|
|
26
|
+
o.dispatchCommand(C, void 0);
|
|
27
|
+
}, u = () => {
|
|
28
|
+
o.dispatchCommand(U, void 0);
|
|
29
|
+
};
|
|
30
|
+
return m(() => o.registerCommand(
|
|
31
|
+
_,
|
|
32
|
+
(i) => (d(i), !1),
|
|
33
|
+
1
|
|
34
|
+
), [o]), m(() => o.registerCommand(
|
|
35
|
+
h,
|
|
36
|
+
(i) => (p(i), !1),
|
|
37
|
+
1
|
|
38
|
+
), [o]), /* @__PURE__ */ b("div", { className: t["editor__toolbar-button-group"], children: [
|
|
39
|
+
/* @__PURE__ */ r(
|
|
40
|
+
"button",
|
|
41
|
+
{
|
|
42
|
+
onClick: c,
|
|
43
|
+
className: e(t["editor__toolbar-button"], t["editor__toolbar-button--undo"]),
|
|
44
|
+
"aria-label": "Undo",
|
|
45
|
+
disabled: !s,
|
|
46
|
+
children: /* @__PURE__ */ r(a, { name: "Undo", size: 20 })
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ r(
|
|
50
|
+
"button",
|
|
51
|
+
{
|
|
52
|
+
onClick: u,
|
|
53
|
+
className: e(t["editor__toolbar-button"], t["editor__toolbar-button--redo"]),
|
|
54
|
+
"aria-label": "Undo",
|
|
55
|
+
disabled: !l,
|
|
56
|
+
children: /* @__PURE__ */ r(a, { name: "Redo", size: 20 })
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
J as HistoryPlugin
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=HistoryPlugin.js.map
|
|
@@ -0,0 +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';\n\nexport const HistoryPlugin = () => {\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={`Undo`}\n disabled={!canUndo}\n >\n <Icon name=\"Undo\" size={20} />\n </button>\n <button\n onClick={handleRedo}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--redo`])}\n aria-label={`Undo`}\n disabled={!canRedo}\n >\n <Icon name=\"Redo\" size={20} />\n </button>\n </div>\n );\n};\n"],"names":["HistoryPlugin","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":";;;;;;;;;;;;;;;;;;;;;;;AAQO,MAAMA,IAAgB,MAAM;AAC3B,QAAA,CAACC,CAAM,IAAIC,KACX,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK,GACtC,CAACC,GAASC,CAAU,IAAIF,EAAS,EAAK,GAEtCG,IAAa,MAAM;AAChB,IAAAP,EAAA,gBAAgBQ,GAAc,MAAS;AAAA,EAAA,GAG1CC,IAAa,MAAM;AAChB,IAAAT,EAAA,gBAAgBU,GAAc,MAAS;AAAA,EAAA;AAGhD,SAAAC,EAAU,MACDX,EAAO;AAAA,IACZY;AAAAA,IACA,CAACC,OACCV,EAAWU,CAAO,GACX;AAAA,IAET;AAAA,EAAA,GAED,CAACb,CAAM,CAAC,GAEXW,EAAU,MACDX,EAAO;AAAA,IACZc;AAAAA,IACA,CAACD,OACCP,EAAWO,CAAO,GACX;AAAA,IAET;AAAA,EAAA,GAED,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,cAAY;AAAA,QACZ,UAAU,CAACd;AAAA,QAEX,UAAC,gBAAAe,EAAAE,GAAA,EAAK,MAAK,QAAO,MAAM,IAAI;AAAA,MAAA;AAAA,IAC9B;AAAA,IACA,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAASR;AAAA,QACT,WAAWS,EAAKF,EAAO,wBAAwB,GAAGA,EAAO,8BAA8B,CAAC;AAAA,QACxF,cAAY;AAAA,QACZ,UAAU,CAACX;AAAA,QAEX,UAAC,gBAAAY,EAAAE,GAAA,EAAK,MAAK,QAAO,MAAM,IAAI;AAAA,MAAA;AAAA,IAC9B;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HistoryPlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { u as S } from "../../../../Lexical.prod-
|
|
2
|
+
import { u as S } from "../../../../Lexical.prod-DNRTKPfN.js";
|
|
3
3
|
import { c as _ } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { U as k, v as E } from "../../../../helpers-
|
|
5
|
-
import { useState as g, useRef as R, useEffect as
|
|
4
|
+
import { U as k, v as E } from "../../../../helpers-TSjo3aAv.js";
|
|
5
|
+
import { useState as g, useRef as R, useEffect as p } from "react";
|
|
6
6
|
import { useFlyout as T } from "../../hooks/useFlyout.js";
|
|
7
7
|
import { Icon as v } from "../../../Icon/Icon.js";
|
|
8
8
|
import { Button as F } from "../../../Buttons/Button.js";
|
|
@@ -21,35 +21,37 @@ import "../../../IconButton/IconButton.js";
|
|
|
21
21
|
import "../../../Input/Input.js";
|
|
22
22
|
import { InputField as z } from "../../../InputField/InputField.js";
|
|
23
23
|
import "react-router-dom";
|
|
24
|
-
import "../../../../MultiSelect-
|
|
25
|
-
import { s as t } from "../../../../RteEditor.module
|
|
24
|
+
import "../../../../MultiSelect-DQaqItEH.js";
|
|
25
|
+
import { s as t } from "../../../../RteEditor.module-BjGyWKhW.js";
|
|
26
26
|
import "../../../SelectListbox/SelectListbox.js";
|
|
27
27
|
import "../../../SelectListbox/SelectProvider.js";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
import "../../../Sortable/components/SortableItem.js";
|
|
29
|
+
import "../../../../SortableProvider-Z0e0qeQT.js";
|
|
30
|
+
const sr = ({ isLink: e = { active: !1, url: "", target: "_self" } }) => {
|
|
31
|
+
const [m, c] = g(e.target === "_blank"), o = R(null), [f] = S(), { flyout: N, showFlyout: s, closeFlyout: u, isVisible: n } = T(), [a, h] = g(null), x = () => {
|
|
32
|
+
c((l) => !l);
|
|
31
33
|
}, w = () => {
|
|
32
34
|
var b;
|
|
33
|
-
const l = (b =
|
|
35
|
+
const l = (b = o.current) == null ? void 0 : b.value;
|
|
34
36
|
if (!l && l.trim() === "" || E(l) === !1) {
|
|
35
37
|
h("Geen of geen geldige url ingevoerd");
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
|
-
|
|
40
|
+
f.dispatchCommand(k, {
|
|
39
41
|
url: l,
|
|
40
|
-
target:
|
|
42
|
+
target: m ? "_blank" : "_self"
|
|
41
43
|
}), u();
|
|
42
44
|
}, U = () => {
|
|
43
|
-
|
|
45
|
+
f.dispatchCommand(k, null);
|
|
44
46
|
}, d = {
|
|
45
47
|
children: /* @__PURE__ */ i("div", { className: t.editor__linkform, children: [
|
|
46
48
|
/* @__PURE__ */ i(C, { className: t["editor__linkform-input-field"], children: [
|
|
47
49
|
/* @__PURE__ */ r(y, { htmlFor: "lnikUrl", children: "Link" }),
|
|
48
|
-
/* @__PURE__ */ r(z, { id: "lnikUrl", ref:
|
|
50
|
+
/* @__PURE__ */ r(z, { id: "lnikUrl", ref: o, placeholder: "http(s)://" }),
|
|
49
51
|
a && /* @__PURE__ */ r(j, { level: "error", feedback: a })
|
|
50
52
|
] }),
|
|
51
53
|
/* @__PURE__ */ i(C, { inline: !0, children: [
|
|
52
|
-
/* @__PURE__ */ r(V, { id: "linkTarget", onChange: x, checked:
|
|
54
|
+
/* @__PURE__ */ r(V, { id: "linkTarget", onChange: x, checked: m }),
|
|
53
55
|
/* @__PURE__ */ r(y, { htmlFor: "linkTarget", children: "Open in nieuwe window" })
|
|
54
56
|
] }),
|
|
55
57
|
/* @__PURE__ */ i("div", { className: t["editor__linkform-footer"], children: [
|
|
@@ -58,13 +60,13 @@ const cr = ({ isLink: o = { active: !1, url: "", target: "_self" } }) => {
|
|
|
58
60
|
] })
|
|
59
61
|
] })
|
|
60
62
|
};
|
|
61
|
-
return
|
|
63
|
+
return p(() => {
|
|
62
64
|
a && s(d);
|
|
63
|
-
}, [a]),
|
|
65
|
+
}, [a]), p(() => {
|
|
64
66
|
n && s(d);
|
|
65
|
-
}, [
|
|
66
|
-
!n &&
|
|
67
|
-
}, [n,
|
|
67
|
+
}, [m]), p(() => {
|
|
68
|
+
!n && o.current ? (h(null), o.current.value = "", c(!1)) : o.current && e.url && (o.current.value = e.url || "", c(e.target === "_blank"), console.log("focus", o.current), o.current.focus());
|
|
69
|
+
}, [n, e.url, e.target]), /* @__PURE__ */ i("div", { className: t["editor__toolbar-button-group"], children: [
|
|
68
70
|
/* @__PURE__ */ i("div", { className: t["editor__toolbar-button-flyoutwrapper"], children: [
|
|
69
71
|
/* @__PURE__ */ r(
|
|
70
72
|
"button",
|
|
@@ -73,7 +75,7 @@ const cr = ({ isLink: o = { active: !1, url: "", target: "_self" } }) => {
|
|
|
73
75
|
className: _(
|
|
74
76
|
t["editor__toolbar-button"],
|
|
75
77
|
t["editor__toolbar-button--link"],
|
|
76
|
-
|
|
78
|
+
e.active && t["editor__toolbar-button--active"]
|
|
77
79
|
),
|
|
78
80
|
"aria-label": "Format link",
|
|
79
81
|
children: /* @__PURE__ */ r(v, { name: "Link", size: 20 })
|
|
@@ -93,6 +95,6 @@ const cr = ({ isLink: o = { active: !1, url: "", target: "_self" } }) => {
|
|
|
93
95
|
] });
|
|
94
96
|
};
|
|
95
97
|
export {
|
|
96
|
-
|
|
98
|
+
sr as LinkPlugin
|
|
97
99
|
};
|
|
98
100
|
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport clsx from 'clsx';\nimport { TOGGLE_LINK_COMMAND } from '@lexical/link';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { LinkType } from 'components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin';\n\nimport { validateUrlWithProtocol } from './helpers';\n\nimport { useFlyout } from 'components/RteEditor/hooks';\nimport { Button, InputField, Icon, Label, FormField, Checkbox, FeedbackBox } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\ninterface LinkPluginProps {\n isLink: LinkType;\n}\n\nexport const LinkPlugin = ({ isLink = { active: false, url: '', target: '_self' } }: LinkPluginProps) => {\n const [targetSelectedValue, setTargetSelectedValue] = useState<boolean>(isLink.target === '_blank');\n const urlRef = useRef<HTMLInputElement>(null);\n const [editor] = useLexicalComposerContext();\n const { flyout, showFlyout, closeFlyout, isVisible } = useFlyout();\n const [urlError, setUrlError] = useState<string | null>(null);\n\n const handleChange = () => {\n setTargetSelectedValue((prev) => !prev);\n };\n\n const insertLink = () => {\n const url = urlRef.current?.value as string;\n if ((!url && url.trim() === '') || validateUrlWithProtocol(url) === false) {\n setUrlError('Geen of geen geldige url ingevoerd');\n return;\n }\n\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n url,\n target: targetSelectedValue ? '_blank' : '_self',\n });\n\n closeFlyout();\n };\n\n const removeLink = (): void => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);\n };\n\n const flyoutOptions = {\n children: (\n <div className={styles['editor__linkform']}>\n <FormField className={styles['editor__linkform-input-field']}>\n <Label htmlFor=\"lnikUrl\">Link</Label>\n <InputField id=\"lnikUrl\" ref={urlRef} placeholder=\"http(s)://\" />\n {urlError && <FeedbackBox level=\"error\" feedback={urlError} />}\n </FormField>\n <FormField inline>\n <Checkbox id=\"linkTarget\" onChange={handleChange} checked={targetSelectedValue} />\n <Label htmlFor=\"linkTarget\">Open in nieuwe window</Label>\n </FormField>\n <div className={styles['editor__linkform-footer']}>\n <Button variant={'secondary'} onClick={closeFlyout}>\n Annuleer\n </Button>\n <Button variant={'primary'} onClick={insertLink}>\n Link\n </Button>\n </div>\n </div>\n ),\n };\n\n useEffect(() => {\n if (urlError) {\n showFlyout(flyoutOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [urlError]);\n\n useEffect(() => {\n if (isVisible) {\n showFlyout(flyoutOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [targetSelectedValue]);\n\n useEffect(() => {\n if (!isVisible && urlRef.current) {\n setUrlError(null);\n urlRef.current.value = '';\n setTargetSelectedValue(false);\n } else if (urlRef.current && isLink.url) {\n urlRef.current.value = isLink.url || '';\n setTargetSelectedValue(isLink.target === '_blank');\n console.log('focus', urlRef.current);\n urlRef.current.focus();\n }\n }, [isVisible, isLink.url, isLink.target]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <div className={styles['editor__toolbar-button-flyoutwrapper']}>\n <button\n onClick={() => (isVisible ? closeFlyout() : showFlyout(flyoutOptions))}\n className={clsx(\n styles['editor__toolbar-button'],\n styles[`editor__toolbar-button--link`],\n isLink.active && styles['editor__toolbar-button--active']\n )}\n aria-label={`Format link`}\n >\n <Icon name=\"Link\" size={20} />\n </button>\n {flyout}\n </div>\n <button\n onClick={removeLink}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--link`])}\n aria-label={`Remove link`}\n >\n <Icon name=\"LinkSlash\" size={20} />\n </button>\n </div>\n );\n};\n"],"names":["LinkPlugin","isLink","targetSelectedValue","setTargetSelectedValue","useState","urlRef","useRef","editor","useLexicalComposerContext","flyout","showFlyout","closeFlyout","isVisible","useFlyout","urlError","setUrlError","handleChange","prev","insertLink","url","_a","validateUrlWithProtocol","TOGGLE_LINK_COMMAND","removeLink","flyoutOptions","jsxs","styles","FormField","jsx","Label","InputField","FeedbackBox","Checkbox","Button","useEffect","clsx","Icon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinkPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport clsx from 'clsx';\nimport { TOGGLE_LINK_COMMAND } from '@lexical/link';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { LinkType } from 'components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin';\n\nimport { validateUrlWithProtocol } from './helpers';\n\nimport { useFlyout } from 'components/RteEditor/hooks';\nimport { Button, InputField, Icon, Label, FormField, Checkbox, FeedbackBox } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\ninterface LinkPluginProps {\n isLink: LinkType;\n}\n\nexport const LinkPlugin = ({ isLink = { active: false, url: '', target: '_self' } }: LinkPluginProps) => {\n const [targetSelectedValue, setTargetSelectedValue] = useState<boolean>(isLink.target === '_blank');\n const urlRef = useRef<HTMLInputElement>(null);\n const [editor] = useLexicalComposerContext();\n const { flyout, showFlyout, closeFlyout, isVisible } = useFlyout();\n const [urlError, setUrlError] = useState<string | null>(null);\n\n const handleChange = () => {\n setTargetSelectedValue((prev) => !prev);\n };\n\n const insertLink = () => {\n const url = urlRef.current?.value as string;\n if ((!url && url.trim() === '') || validateUrlWithProtocol(url) === false) {\n setUrlError('Geen of geen geldige url ingevoerd');\n return;\n }\n\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n url,\n target: targetSelectedValue ? '_blank' : '_self',\n });\n\n closeFlyout();\n };\n\n const removeLink = (): void => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);\n };\n\n const flyoutOptions = {\n children: (\n <div className={styles['editor__linkform']}>\n <FormField className={styles['editor__linkform-input-field']}>\n <Label htmlFor=\"lnikUrl\">Link</Label>\n <InputField id=\"lnikUrl\" ref={urlRef} placeholder=\"http(s)://\" />\n {urlError && <FeedbackBox level=\"error\" feedback={urlError} />}\n </FormField>\n <FormField inline>\n <Checkbox id=\"linkTarget\" onChange={handleChange} checked={targetSelectedValue} />\n <Label htmlFor=\"linkTarget\">Open in nieuwe window</Label>\n </FormField>\n <div className={styles['editor__linkform-footer']}>\n <Button variant={'secondary'} onClick={closeFlyout}>\n Annuleer\n </Button>\n <Button variant={'primary'} onClick={insertLink}>\n Link\n </Button>\n </div>\n </div>\n ),\n };\n\n useEffect(() => {\n if (urlError) {\n showFlyout(flyoutOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [urlError]);\n\n useEffect(() => {\n if (isVisible) {\n showFlyout(flyoutOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [targetSelectedValue]);\n\n useEffect(() => {\n if (!isVisible && urlRef.current) {\n setUrlError(null);\n urlRef.current.value = '';\n setTargetSelectedValue(false);\n } else if (urlRef.current && isLink.url) {\n urlRef.current.value = isLink.url || '';\n setTargetSelectedValue(isLink.target === '_blank');\n console.log('focus', urlRef.current);\n urlRef.current.focus();\n }\n }, [isVisible, isLink.url, isLink.target]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <div className={styles['editor__toolbar-button-flyoutwrapper']}>\n <button\n onClick={() => (isVisible ? closeFlyout() : showFlyout(flyoutOptions))}\n className={clsx(\n styles['editor__toolbar-button'],\n styles[`editor__toolbar-button--link`],\n isLink.active && styles['editor__toolbar-button--active']\n )}\n aria-label={`Format link`}\n >\n <Icon name=\"Link\" size={20} />\n </button>\n {flyout}\n </div>\n <button\n onClick={removeLink}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--link`])}\n aria-label={`Remove link`}\n >\n <Icon name=\"LinkSlash\" size={20} />\n </button>\n </div>\n );\n};\n"],"names":["LinkPlugin","isLink","targetSelectedValue","setTargetSelectedValue","useState","urlRef","useRef","editor","useLexicalComposerContext","flyout","showFlyout","closeFlyout","isVisible","useFlyout","urlError","setUrlError","handleChange","prev","insertLink","url","_a","validateUrlWithProtocol","TOGGLE_LINK_COMMAND","removeLink","flyoutOptions","jsxs","styles","FormField","jsx","Label","InputField","FeedbackBox","Checkbox","Button","useEffect","clsx","Icon"],"mappings":"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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "../../../../Lexical.prod-
|
|
3
|
-
import { L as a } from "../../../../ListPlugin-
|
|
2
|
+
import "../../../../Lexical.prod-DNRTKPfN.js";
|
|
3
|
+
import { L as a } from "../../../../ListPlugin-CgNBzfIl.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../../../clsx-OuTLNxxd.js";
|
|
6
6
|
import "../../../Icon/Icon.js";
|
|
7
|
-
import "../../../../RteEditor.module
|
|
7
|
+
import "../../../../RteEditor.module-BjGyWKhW.js";
|
|
8
8
|
export {
|
|
9
9
|
a as ListPlugin
|
|
10
10
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsxs as _, jsx as
|
|
2
|
-
import { u as I, I as
|
|
3
|
-
import { useState as r, useCallback as
|
|
4
|
-
import { L as B, H as h } from "../../../../ListPlugin-
|
|
5
|
-
import { g as v } from "../../../../helpers-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { jsxs as _, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { u as I, I as P, m as k } from "../../../../Lexical.prod-DNRTKPfN.js";
|
|
3
|
+
import { useState as r, useCallback as N, useEffect as b } from "react";
|
|
4
|
+
import { L as B, H as h } from "../../../../ListPlugin-CgNBzfIl.js";
|
|
5
|
+
import { g as v } from "../../../../helpers-TSjo3aAv.js";
|
|
6
|
+
import { BlockFormatPlugin as x } from "../BlockFormatPlugin/BlockFormatPlugin.js";
|
|
7
|
+
import { LinkPlugin as F } from "../LinkPlugin/LinkPlugin.js";
|
|
8
|
+
import { HistoryPlugin as U } from "../HistoryPlugin/HistoryPlugin.js";
|
|
9
|
+
import { s as j } from "../../../../RteEditor.module-BjGyWKhW.js";
|
|
9
10
|
const n = (o, s) => {
|
|
10
11
|
let t = o, i;
|
|
11
12
|
for (; t !== null; ) {
|
|
@@ -16,13 +17,13 @@ const n = (o, s) => {
|
|
|
16
17
|
t = t.getParent();
|
|
17
18
|
}
|
|
18
19
|
return !1;
|
|
19
|
-
},
|
|
20
|
-
const [o] = I(), [s, t] = r(!1), [i,
|
|
21
|
-
const e =
|
|
22
|
-
if (
|
|
23
|
-
t(e.hasFormat("bold")),
|
|
24
|
-
const
|
|
25
|
-
u(n(
|
|
20
|
+
}, z = () => {
|
|
21
|
+
const [o] = I(), [s, t] = r(!1), [i, m] = r(!1), [c, u] = r(!1), [g, d] = r(!1), [p, L] = r({ active: !1, url: "", target: "_self" }), f = N(() => {
|
|
22
|
+
const e = P();
|
|
23
|
+
if (k(e)) {
|
|
24
|
+
t(e.hasFormat("bold")), m(e.hasFormat("italic"));
|
|
25
|
+
const a = e.anchor.getNode();
|
|
26
|
+
u(n(a, "ul")), d(n(a, "ol")), L(n(a, "a"));
|
|
26
27
|
}
|
|
27
28
|
}, []);
|
|
28
29
|
return b(() => {
|
|
@@ -31,13 +32,14 @@ const n = (o, s) => {
|
|
|
31
32
|
f();
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
|
-
}, [o, f]), /* @__PURE__ */ _("div", { className:
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
35
|
+
}, [o, f]), /* @__PURE__ */ _("div", { className: j.editor__toolbar, children: [
|
|
36
|
+
/* @__PURE__ */ l(x, { isBold: s, isItalic: i }),
|
|
37
|
+
/* @__PURE__ */ l(B, { isUList: c, isOList: g }),
|
|
38
|
+
/* @__PURE__ */ l(F, { isLink: p }),
|
|
39
|
+
/* @__PURE__ */ l(U, {})
|
|
38
40
|
] });
|
|
39
41
|
};
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
z as ToolBarPlugin
|
|
42
44
|
};
|
|
43
45
|
//# sourceMappingURL=ToolbarPlugin.js.map
|