@uva-glass/component-library 3.57.4 → 3.57.5
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/{DataTable-Guuh0GZc.js → DataTable-UslvEf3c.js} +3 -3
- package/dist/{DataTable-Guuh0GZc.js.map → DataTable-UslvEf3c.js.map} +1 -1
- package/dist/{Lexical.prod-Dy5aDppc.js → Lexical.prod-BlUfEvo-.js} +1461 -1476
- package/dist/{Lexical.prod-Dy5aDppc.js.map → Lexical.prod-BlUfEvo-.js.map} +1 -1
- package/dist/{LexicalClipboard.prod-CS8a49uL.js → LexicalClipboard.prod-DQbm50C_.js} +132 -131
- package/dist/LexicalClipboard.prod-DQbm50C_.js.map +1 -0
- package/dist/LexicalHtml.prod-Czkg35Fe.js +1129 -0
- package/dist/LexicalHtml.prod-Czkg35Fe.js.map +1 -0
- package/dist/{LexicalLink.prod-DzgwWhQM.js → LexicalLink.prod-6gI2ABQo.js} +141 -141
- package/dist/{LexicalLink.prod-DzgwWhQM.js.map → LexicalLink.prod-6gI2ABQo.js.map} +1 -1
- package/dist/{LexicalList.prod-icY8mpm6.js → LexicalList.prod-CMGvSM1c.js} +265 -265
- package/dist/{LexicalList.prod-icY8mpm6.js.map → LexicalList.prod-CMGvSM1c.js.map} +1 -1
- package/dist/LexicalSelection.prod-DS_R6Cl1.js +99 -0
- package/dist/LexicalSelection.prod-DS_R6Cl1.js.map +1 -0
- package/dist/{LexicalTable.prod-Bf0is-op.js → LexicalTable.prod-D3FUVxbr.js} +582 -582
- package/dist/LexicalTable.prod-D3FUVxbr.js.map +1 -0
- package/dist/LexicalUtils.prod-CNWf_0sq.js +164 -0
- package/dist/LexicalUtils.prod-CNWf_0sq.js.map +1 -0
- package/dist/{LinkContextMenu-C8ehPbP8.js → LinkContextMenu-59-rbxa2.js} +2 -2
- package/dist/{LinkContextMenu-C8ehPbP8.js.map → LinkContextMenu-59-rbxa2.js.map} +1 -1
- package/dist/{PasteHandlerPlugin-CSo_lOE8.js → PasteHandlerPlugin-CTzYRyAx.js} +9 -9
- package/dist/{PasteHandlerPlugin-CSo_lOE8.js.map → PasteHandlerPlugin-CTzYRyAx.js.map} +1 -1
- package/dist/{Slider-Czd2xAGf.js → Slider-CqYFsgRL.js} +3 -3
- package/dist/{Slider-Czd2xAGf.js.map → Slider-CqYFsgRL.js.map} +1 -1
- package/dist/{TableCellResizerPlugin-Bb2blXnq.js → TableCellResizerPlugin-D-fX5I3p.js} +12 -5
- package/dist/{TableCellResizerPlugin-Bb2blXnq.js.map → TableCellResizerPlugin-D-fX5I3p.js.map} +1 -1
- package/dist/{chunk-5WKL7XVT-CvOIS3NE.js → chunk-SNLGT2ZI--XVeLAcq.js} +2540 -2881
- package/dist/chunk-SNLGT2ZI--XVeLAcq.js.map +1 -0
- package/dist/{client-CXlG3hNo.js → client-CTHUtwUP.js} +4 -4
- package/dist/{client-CXlG3hNo.js.map → client-CTHUtwUP.js.map} +1 -1
- package/dist/components/Accordion/Accordion.test.js +15 -14
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +20 -19
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +26 -25
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +6 -5
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +5 -4
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +5 -4
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +20 -19
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +22 -21
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +20 -19
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.test.js +5 -4
- package/dist/components/Card/Card.test.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +9 -8
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +16 -15
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +3 -3
- package/dist/components/CheckboxTree/index.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DataTable/DataTable.stories.js +1 -1
- package/dist/components/DataTable/index.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +8 -7
- package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +2 -2
- package/dist/components/FormInput/index.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/Label/Label.test.js +12 -11
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +5 -4
- package/dist/components/MetaDataBar/MetaDataBar.test.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 +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +12 -11
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +8 -7
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +2 -2
- package/dist/components/PeriodSelector/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +10 -9
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +2 -2
- package/dist/components/RadioTabSelector/index.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/EditorHeader/index.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +20 -20
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +7 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +12 -12
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/index.js +3 -3
- package/dist/components/RteEditor/RteEditor.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +1 -1
- package/dist/components/RteEditor/helpers.js +5 -5
- package/dist/components/RteEditor/index.js +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +14 -14
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +20 -19
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +2 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.stories.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js +2 -2
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +7 -6
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +14 -13
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +26 -25
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/hooks/useResponsive.js +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +3 -3
- package/dist/{components-CgBF6db6.js → components-D2rPfyIW.js} +438 -408
- package/dist/components-D2rPfyIW.js.map +1 -0
- package/dist/{dist-oLwM--0y.js → dist-CuwCMU7Y.js} +4 -4
- package/dist/{dist-oLwM--0y.js.map → dist-CuwCMU7Y.js.map} +1 -1
- package/dist/{react.esm-DwWzhs9e.js → dom.esm-S0SD0DBW.js} +938 -1029
- package/dist/dom.esm-S0SD0DBW.js.map +1 -0
- package/dist/{esm-BXzGXYWZ.js → esm-Bfz5h0_d.js} +5 -5
- package/dist/{esm-BXzGXYWZ.js.map → esm-Bfz5h0_d.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/{react-18-BwdnKC48.js → react-18-yf-KbRra.js} +3 -3
- package/dist/{react-18-BwdnKC48.js.map → react-18-yf-KbRra.js.map} +1 -1
- package/dist/react.esm-D50lAl1F.js +226 -0
- package/dist/react.esm-D50lAl1F.js.map +1 -0
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +22 -22
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-Gtly6H2f.js → test-BjtC-Q32.js} +3684 -6919
- package/dist/test-BjtC-Q32.js.map +1 -0
- package/package.json +13 -13
- package/dist/LexicalClipboard.prod-CS8a49uL.js.map +0 -1
- package/dist/LexicalHtml.prod-BtzosUOH.js +0 -1611
- package/dist/LexicalHtml.prod-BtzosUOH.js.map +0 -1
- package/dist/LexicalTable.prod-Bf0is-op.js.map +0 -1
- package/dist/LexicalUtils.prod-CjGUKarD.js +0 -259
- package/dist/LexicalUtils.prod-CjGUKarD.js.map +0 -1
- package/dist/chunk-5WKL7XVT-CvOIS3NE.js.map +0 -1
- package/dist/components-CgBF6db6.js.map +0 -1
- package/dist/helpers-MMNO9vlK.js +0 -34
- package/dist/helpers-MMNO9vlK.js.map +0 -1
- package/dist/react.esm-DwWzhs9e.js.map +0 -1
- package/dist/test-Gtly6H2f.js.map +0 -1
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../Label-52ny6d06.js";
|
|
4
|
+
import { n } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/Label/Label.test.tsx
|
|
6
7
|
describe("Label", () => {
|
|
7
8
|
it("should render", () => {
|
|
8
|
-
n(/* @__PURE__ */ r(
|
|
9
|
+
n(/* @__PURE__ */ r(t, {
|
|
9
10
|
htmlFor: "testComponent",
|
|
10
11
|
children: "Test label"
|
|
11
|
-
})), expect(
|
|
12
|
+
})), expect(e.getByText("Test label")).toBeInTheDocument();
|
|
12
13
|
}), it("should render with required", () => {
|
|
13
|
-
n(/* @__PURE__ */ r(
|
|
14
|
+
n(/* @__PURE__ */ r(t, {
|
|
14
15
|
htmlFor: "testComponent",
|
|
15
16
|
required: !0,
|
|
16
17
|
children: "Test label"
|
|
17
|
-
})), expect(
|
|
18
|
+
})), expect(e.getByText("Test label")).toHaveClass("label--required");
|
|
18
19
|
}), it("should render with noFontWeight", () => {
|
|
19
|
-
n(/* @__PURE__ */ r(
|
|
20
|
+
n(/* @__PURE__ */ r(t, {
|
|
20
21
|
htmlFor: "testComponent",
|
|
21
22
|
noFontWeight: !0,
|
|
22
23
|
children: "Test label"
|
|
23
|
-
})), expect(
|
|
24
|
+
})), expect(e.getByText("Test label")).toHaveClass("label--unset-font-weight");
|
|
24
25
|
}), it("should render with alignRight", () => {
|
|
25
|
-
n(/* @__PURE__ */ r(
|
|
26
|
+
n(/* @__PURE__ */ r(t, {
|
|
26
27
|
htmlFor: "testComponent",
|
|
27
28
|
alignRight: !0,
|
|
28
29
|
children: "Test label"
|
|
29
|
-
})), expect(
|
|
30
|
+
})), expect(e.getByText("Test label")).toHaveClass("label--align-right");
|
|
30
31
|
});
|
|
31
32
|
});
|
|
32
33
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.test.js","names":[],"sources":["../../../src/components/Label/Label.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Label } from './Label';\n\ndescribe('Label', () => {\n it('should render', () => {\n render(<Label htmlFor=\"testComponent\">Test label</Label>);\n expect(screen.getByText('Test label')).toBeInTheDocument();\n });\n\n it('should render with required', () => {\n render(\n <Label htmlFor=\"testComponent\" required={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--required');\n });\n\n it('should render with noFontWeight', () => {\n render(\n <Label htmlFor=\"testComponent\" noFontWeight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--unset-font-weight');\n });\n\n it('should render with alignRight', () => {\n render(\n <Label htmlFor=\"testComponent\" alignRight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--align-right');\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Label.test.js","names":[],"sources":["../../../src/components/Label/Label.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Label } from './Label';\n\ndescribe('Label', () => {\n it('should render', () => {\n render(<Label htmlFor=\"testComponent\">Test label</Label>);\n expect(screen.getByText('Test label')).toBeInTheDocument();\n });\n\n it('should render with required', () => {\n render(\n <Label htmlFor=\"testComponent\" required={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--required');\n });\n\n it('should render with noFontWeight', () => {\n render(\n <Label htmlFor=\"testComponent\" noFontWeight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--unset-font-weight');\n });\n\n it('should render with alignRight', () => {\n render(\n <Label htmlFor=\"testComponent\" alignRight={true}>\n Test label\n </Label>\n );\n expect(screen.getByText('Test label')).toHaveClass('label--align-right');\n });\n});\n"],"mappings":";;;;;;AAKA,SAAS,eAAe;CAwBtB,AAvBA,GAAG,uBAAuB;EAExB,AADA,EAAO,kBAAC,GAAD;GAAO,SAAQ;aAAgB;EAAiB,CAAA,CAAC,GACxD,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,kBAAkB;CAC3D,CAAC,GAED,GAAG,qCAAqC;EAMtC,AALA,EACE,kBAAC,GAAD;GAAO,SAAQ;GAAgB,UAAU;aAAM;EAExC,CAAA,CACT,GACA,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,YAAY,iBAAiB;CACtE,CAAC,GAED,GAAG,yCAAyC;EAM1C,AALA,EACE,kBAAC,GAAD;GAAO,SAAQ;GAAgB,cAAc;aAAM;EAE5C,CAAA,CACT,GACA,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,YAAY,0BAA0B;CAC/E,CAAC,GAED,GAAG,uCAAuC;EAMxC,AALA,EACE,kBAAC,GAAD;GAAO,SAAQ;GAAgB,YAAY;aAAM;EAE1C,CAAA,CACT,GACA,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,YAAY,oBAAoB;CACzE,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import { t } from "../../MetaDataBar-48J7yPrb.js";
|
|
3
|
+
import { n } from "../../react.esm-D50lAl1F.js";
|
|
3
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/MetaDataBar/MetaDataBar.test.tsx
|
|
5
6
|
jest.mock("components/Icon", () => ({ Icon: ({ name: e }) => /* @__PURE__ */ r("span", {
|
|
@@ -15,9 +16,9 @@ var i = [{
|
|
|
15
16
|
}];
|
|
16
17
|
describe("MetaDataBar", () => {
|
|
17
18
|
it("renders correctly with content items", () => {
|
|
18
|
-
n(/* @__PURE__ */ r(
|
|
19
|
+
n(/* @__PURE__ */ r(t, { itemData: i })), expect(e.getByText("AcademicCap")).toBeInTheDocument(), expect(e.getByText("Jedi Academy")).toBeInTheDocument(), expect(e.getByText("User")).toBeInTheDocument(), expect(e.getByText("Luuk Hemelwandelaar")).toBeInTheDocument(), expect(e.getAllByTestId("icon")).toHaveLength(i.length);
|
|
19
20
|
}), it("renders nothing when content is empty", () => {
|
|
20
|
-
n(/* @__PURE__ */ r(
|
|
21
|
+
n(/* @__PURE__ */ r(t, { itemData: [] })), expect(e.queryByTestId("icon")).not.toBeInTheDocument(), expect(e.queryByText(/.+/)).not.toBeInTheDocument();
|
|
21
22
|
});
|
|
22
23
|
});
|
|
23
24
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetaDataBar.test.js","names":[],"sources":["../../../src/components/MetaDataBar/MetaDataBar.test.tsx"],"sourcesContent":["import { render, screen } from '@testing-library/react';\n\nimport type { IconProps } from 'components/Icon';\n\nimport { MetaDataBar } from './MetaDataBar';\n\njest.mock('components/Icon', () => ({\n Icon: ({ name }: { name: IconProps['name'] }) => <span data-testid=\"icon\">{name}</span>,\n}));\n\nconst mockItemData = [\n { iconName: 'AcademicCap' as IconProps['name'], itemLabel: 'Jedi Academy' },\n { iconName: 'User' as IconProps['name'], itemLabel: 'Luuk Hemelwandelaar' },\n];\n\ndescribe('MetaDataBar', () => {\n it('renders correctly with content items', () => {\n render(<MetaDataBar itemData={mockItemData} />);\n\n expect(screen.getByText('AcademicCap')).toBeInTheDocument();\n expect(screen.getByText('Jedi Academy')).toBeInTheDocument();\n expect(screen.getByText('User')).toBeInTheDocument();\n expect(screen.getByText('Luuk Hemelwandelaar')).toBeInTheDocument();\n\n expect(screen.getAllByTestId('icon')).toHaveLength(mockItemData.length);\n });\n\n it('renders nothing when content is empty', () => {\n render(<MetaDataBar itemData={[]} />);\n expect(screen.queryByTestId('icon')).not.toBeInTheDocument();\n expect(screen.queryByText(/.+/)).not.toBeInTheDocument();\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetaDataBar.test.js","names":[],"sources":["../../../src/components/MetaDataBar/MetaDataBar.test.tsx"],"sourcesContent":["import { render, screen } from '@testing-library/react';\n\nimport type { IconProps } from 'components/Icon';\n\nimport { MetaDataBar } from './MetaDataBar';\n\njest.mock('components/Icon', () => ({\n Icon: ({ name }: { name: IconProps['name'] }) => <span data-testid=\"icon\">{name}</span>,\n}));\n\nconst mockItemData = [\n { iconName: 'AcademicCap' as IconProps['name'], itemLabel: 'Jedi Academy' },\n { iconName: 'User' as IconProps['name'], itemLabel: 'Luuk Hemelwandelaar' },\n];\n\ndescribe('MetaDataBar', () => {\n it('renders correctly with content items', () => {\n render(<MetaDataBar itemData={mockItemData} />);\n\n expect(screen.getByText('AcademicCap')).toBeInTheDocument();\n expect(screen.getByText('Jedi Academy')).toBeInTheDocument();\n expect(screen.getByText('User')).toBeInTheDocument();\n expect(screen.getByText('Luuk Hemelwandelaar')).toBeInTheDocument();\n\n expect(screen.getAllByTestId('icon')).toHaveLength(mockItemData.length);\n });\n\n it('renders nothing when content is empty', () => {\n render(<MetaDataBar itemData={[]} />);\n expect(screen.queryByTestId('icon')).not.toBeInTheDocument();\n expect(screen.queryByText(/.+/)).not.toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;AAMA,KAAK,KAAK,0BAA0B,EAClC,OAAO,EAAE,cAAwC,kBAAC,QAAD;CAAM,eAAY;WAAQ;AAAW,CAAA,EACxF,EAAE;AAEF,IAAM,IAAe,CACnB;CAAE,UAAU;CAAoC,WAAW;AAAe,GAC1E;CAAE,UAAU;CAA6B,WAAW;AAAsB,CAC5E;AAEA,SAAS,qBAAqB;CAY5B,AAXA,GAAG,8CAA8C;EAQ/C,AAPA,EAAO,kBAAC,GAAD,EAAa,UAAU,EAAe,CAAA,CAAC,GAE9C,OAAO,EAAO,UAAU,aAAa,CAAC,CAAC,CAAC,kBAAkB,GAC1D,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,CAAC,kBAAkB,GAC3D,OAAO,EAAO,UAAU,MAAM,CAAC,CAAC,CAAC,kBAAkB,GACnD,OAAO,EAAO,UAAU,qBAAqB,CAAC,CAAC,CAAC,kBAAkB,GAElE,OAAO,EAAO,eAAe,MAAM,CAAC,CAAC,CAAC,aAAa,EAAa,MAAM;CACxE,CAAC,GAED,GAAG,+CAA+C;EAGhD,AAFA,EAAO,kBAAC,GAAD,EAAa,UAAU,CAAC,EAAI,CAAA,CAAC,GACpC,OAAO,EAAO,cAAc,MAAM,CAAC,CAAC,CAAC,IAAI,kBAAkB,GAC3D,OAAO,EAAO,YAAY,IAAI,CAAC,CAAC,CAAC,IAAI,kBAAkB;CACzD,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as e } from "../../components-
|
|
1
|
+
import { f as e } from "../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as MultiSelect };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e } from "../../test-
|
|
2
|
-
import { f as t } from "../../components-
|
|
1
|
+
import { r as e } from "../../test-BjtC-Q32.js";
|
|
2
|
+
import { f as t } from "../../components-D2rPfyIW.js";
|
|
3
3
|
import { t as n } from "../../Container-DOcrVe7u.js";
|
|
4
4
|
import "../../storyComponents/Container/index.js";
|
|
5
5
|
import { useState as r } from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { p as e } from "../../../components-
|
|
1
|
+
import { p as e } from "../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as MultiSelectHeader };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as e } from "../../components-
|
|
1
|
+
import { f as e } from "../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as MultiSelect };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../MultiSelectBox-D34qAgzc.js";
|
|
4
|
+
import { n, t as r } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/MultiSelectBox/MultiSelectBox.test.tsx
|
|
6
7
|
var s = jest.fn(), c = [
|
|
@@ -19,23 +20,23 @@ var s = jest.fn(), c = [
|
|
|
19
20
|
];
|
|
20
21
|
describe("MultiSelectBox", () => {
|
|
21
22
|
it("renders the component with default props", () => {
|
|
22
|
-
n(/* @__PURE__ */ a(
|
|
23
|
+
n(/* @__PURE__ */ a(t, {
|
|
23
24
|
selectData: c,
|
|
24
25
|
onChange: s,
|
|
25
26
|
labelSuffix: "selected"
|
|
26
27
|
}));
|
|
27
|
-
let r =
|
|
28
|
+
let r = e.getByRole("button");
|
|
28
29
|
expect(r).toBeInTheDocument(), expect(r).toHaveAttribute("aria-expanded", "false");
|
|
29
30
|
}), it("opens the dropdown when the button is clicked", () => {
|
|
30
|
-
n(/* @__PURE__ */ a(
|
|
31
|
+
n(/* @__PURE__ */ a(t, {
|
|
31
32
|
selectData: c,
|
|
32
33
|
onChange: s,
|
|
33
34
|
labelSuffix: "selected"
|
|
34
35
|
}));
|
|
35
|
-
let i =
|
|
36
|
-
r.click(i), expect(i).toHaveAttribute("aria-expanded", "true"), expect(
|
|
36
|
+
let i = e.getByRole("button");
|
|
37
|
+
r.click(i), expect(i).toHaveAttribute("aria-expanded", "true"), expect(e.getByRole("listbox")).toBeInTheDocument();
|
|
37
38
|
}), it("closes the dropdown when clicking outside", () => {
|
|
38
|
-
n(/* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(
|
|
39
|
+
n(/* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(t, {
|
|
39
40
|
selectData: c,
|
|
40
41
|
onChange: s,
|
|
41
42
|
labelSuffix: "selected"
|
|
@@ -43,9 +44,9 @@ describe("MultiSelectBox", () => {
|
|
|
43
44
|
"data-testid": "outside-element",
|
|
44
45
|
children: "Outside"
|
|
45
46
|
})] }));
|
|
46
|
-
let l =
|
|
47
|
+
let l = e.getByRole("button");
|
|
47
48
|
r.click(l), expect(l).toHaveAttribute("aria-expanded", "true");
|
|
48
|
-
let u =
|
|
49
|
+
let u = e.getByTestId("outside-element");
|
|
49
50
|
r.click(u), expect(l).toHaveAttribute("aria-expanded", "false");
|
|
50
51
|
});
|
|
51
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectBox.test.js","names":[],"sources":["../../../src/components/MultiSelectBox/MultiSelectBox.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { MultiSelectBox } from './MultiSelectBox';\n\nconst onChangeSpy = jest.fn();\n\nconst mockSelectData = [\n { label: 'Option 1', value: '1' },\n { label: 'Option 2', value: '2' },\n { label: 'Option 3', value: '3' },\n];\n\ndescribe('MultiSelectBox', () => {\n it('renders the component with default props', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('opens the dropdown when the button is clicked', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n expect(screen.getByRole('listbox')).toBeInTheDocument();\n });\n\n it('closes the dropdown when clicking outside', () => {\n render(\n <>\n <MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />\n <div data-testid=\"outside-element\">Outside</div>\n </>\n );\n\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n const outsideElement = screen.getByTestId('outside-element');\n fireEvent.click(outsideElement);\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiSelectBox.test.js","names":[],"sources":["../../../src/components/MultiSelectBox/MultiSelectBox.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { MultiSelectBox } from './MultiSelectBox';\n\nconst onChangeSpy = jest.fn();\n\nconst mockSelectData = [\n { label: 'Option 1', value: '1' },\n { label: 'Option 2', value: '2' },\n { label: 'Option 3', value: '3' },\n];\n\ndescribe('MultiSelectBox', () => {\n it('renders the component with default props', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n expect(button).toBeInTheDocument();\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n\n it('opens the dropdown when the button is clicked', () => {\n render(<MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />);\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n expect(screen.getByRole('listbox')).toBeInTheDocument();\n });\n\n it('closes the dropdown when clicking outside', () => {\n render(\n <>\n <MultiSelectBox selectData={mockSelectData} onChange={onChangeSpy} labelSuffix=\"selected\" />\n <div data-testid=\"outside-element\">Outside</div>\n </>\n );\n\n const button = screen.getByRole('button');\n fireEvent.click(button);\n expect(button).toHaveAttribute('aria-expanded', 'true');\n const outsideElement = screen.getByTestId('outside-element');\n fireEvent.click(outsideElement);\n expect(button).toHaveAttribute('aria-expanded', 'false');\n });\n});\n"],"mappings":";;;;;;AAKA,IAAM,IAAc,KAAK,GAAG,GAEtB,IAAiB;CACrB;EAAE,OAAO;EAAY,OAAO;CAAI;CAChC;EAAE,OAAO;EAAY,OAAO;CAAI;CAChC;EAAE,OAAO;EAAY,OAAO;CAAI;AAClC;AAEA,SAAS,wBAAwB;CAgB/B,AAfA,GAAG,kDAAkD;EACnD,EAAO,kBAAC,GAAD;GAAgB,YAAY;GAAgB,UAAU;GAAa,aAAY;EAAY,CAAA,CAAC;EACnG,IAAM,IAAS,EAAO,UAAU,QAAQ;EAExC,AADA,OAAO,CAAM,CAAC,CAAC,kBAAkB,GACjC,OAAO,CAAM,CAAC,CAAC,gBAAgB,iBAAiB,OAAO;CACzD,CAAC,GAED,GAAG,uDAAuD;EACxD,EAAO,kBAAC,GAAD;GAAgB,YAAY;GAAgB,UAAU;GAAa,aAAY;EAAY,CAAA,CAAC;EACnG,IAAM,IAAS,EAAO,UAAU,QAAQ;EAGxC,AAFA,EAAU,MAAM,CAAM,GACtB,OAAO,CAAM,CAAC,CAAC,gBAAgB,iBAAiB,MAAM,GACtD,OAAO,EAAO,UAAU,SAAS,CAAC,CAAC,CAAC,kBAAkB;CACxD,CAAC,GAED,GAAG,mDAAmD;EACpD,EACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;GAAgB,YAAY;GAAgB,UAAU;GAAa,aAAY;EAAY,CAAA,GAC3F,kBAAC,OAAD;GAAK,eAAY;aAAkB;EAAY,CAAA,CAC/C,EAAA,CAAA,CACJ;EAEA,IAAM,IAAS,EAAO,UAAU,QAAQ;EAExC,AADA,EAAU,MAAM,CAAM,GACtB,OAAO,CAAM,CAAC,CAAC,gBAAgB,iBAAiB,MAAM;EACtD,IAAM,IAAiB,EAAO,YAAY,iBAAiB;EAE3D,AADA,EAAU,MAAM,CAAc,GAC9B,OAAO,CAAM,CAAC,CAAC,gBAAgB,iBAAiB,OAAO;CACzD,CAAC;AACH,CAAC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../Notification-BhqWENfu.js";
|
|
4
|
+
import { n } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/Notification/Notification.test.tsx
|
|
6
7
|
describe("Notification", () => {
|
|
7
8
|
it("renders title and subtitle", () => {
|
|
8
|
-
n(/* @__PURE__ */ r(
|
|
9
|
+
n(/* @__PURE__ */ r(t, {
|
|
9
10
|
level: "information",
|
|
10
11
|
title: "Info title",
|
|
11
12
|
subtitle: "Info subtitle"
|
|
12
|
-
})), expect(
|
|
13
|
+
})), expect(e.getByText("Info title")).toBeInTheDocument(), expect(e.getByText("Info subtitle")).toBeInTheDocument();
|
|
13
14
|
}), it("renders bar variant", () => {
|
|
14
|
-
n(/* @__PURE__ */ r(
|
|
15
|
+
n(/* @__PURE__ */ r(t, {
|
|
15
16
|
level: "danger",
|
|
16
17
|
variant: "bar",
|
|
17
18
|
title: "Danger title"
|
|
18
|
-
})), expect(
|
|
19
|
+
})), expect(e.getByText("Danger title")).toBeInTheDocument();
|
|
19
20
|
});
|
|
20
21
|
});
|
|
21
22
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.test.js","names":[],"sources":["../../../src/components/Notification/Notification.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Notification } from './Notification';\n\ndescribe('Notification', () => {\n it('renders title and subtitle', () => {\n render(<Notification level=\"information\" title=\"Info title\" subtitle=\"Info subtitle\" />);\n expect(screen.getByText('Info title')).toBeInTheDocument();\n expect(screen.getByText('Info subtitle')).toBeInTheDocument();\n });\n\n it('renders bar variant', () => {\n render(<Notification level=\"danger\" variant=\"bar\" title=\"Danger title\" />);\n expect(screen.getByText('Danger title')).toBeInTheDocument();\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Notification.test.js","names":[],"sources":["../../../src/components/Notification/Notification.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen } from '@testing-library/react';\n\nimport { Notification } from './Notification';\n\ndescribe('Notification', () => {\n it('renders title and subtitle', () => {\n render(<Notification level=\"information\" title=\"Info title\" subtitle=\"Info subtitle\" />);\n expect(screen.getByText('Info title')).toBeInTheDocument();\n expect(screen.getByText('Info subtitle')).toBeInTheDocument();\n });\n\n it('renders bar variant', () => {\n render(<Notification level=\"danger\" variant=\"bar\" title=\"Danger title\" />);\n expect(screen.getByText('Danger title')).toBeInTheDocument();\n });\n});\n"],"mappings":";;;;;;AAKA,SAAS,sBAAsB;CAO7B,AANA,GAAG,oCAAoC;EAGrC,AAFA,EAAO,kBAAC,GAAD;GAAc,OAAM;GAAc,OAAM;GAAa,UAAS;EAAiB,CAAA,CAAC,GACvF,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,kBAAkB,GACzD,OAAO,EAAO,UAAU,eAAe,CAAC,CAAC,CAAC,kBAAkB;CAC9D,CAAC,GAED,GAAG,6BAA6B;EAE9B,AADA,EAAO,kBAAC,GAAD;GAAc,OAAM;GAAS,SAAQ;GAAM,OAAM;EAAgB,CAAA,CAAC,GACzE,OAAO,EAAO,UAAU,cAAc,CAAC,CAAC,CAAC,kBAAkB;CAC7D,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as e } from "../../components-
|
|
1
|
+
import { d as e } from "../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as PeriodSelector };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e } from "../../test-
|
|
2
|
-
import { d as t } from "../../components-
|
|
1
|
+
import { r as e } from "../../test-BjtC-Q32.js";
|
|
2
|
+
import { d as t } from "../../components-D2rPfyIW.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
var r = {
|
|
5
5
|
title: "Organisms/PeriodSelector",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as e } from "../../components-
|
|
1
|
+
import { d as e } from "../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as PeriodSelector };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "../../
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { s as e } from "../../dom.esm-S0SD0DBW.js";
|
|
2
|
+
import "../../dist-CuwCMU7Y.js";
|
|
3
|
+
import { t } from "../../RadioGroup-DlQjMmpa.js";
|
|
4
|
+
import { n, t as r } from "../../react.esm-D50lAl1F.js";
|
|
4
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/RadioGroup/Radiogroup.test.tsx
|
|
6
7
|
var a = [{
|
|
@@ -14,29 +15,29 @@ var a = [{
|
|
|
14
15
|
}];
|
|
15
16
|
describe("RadioGroup", () => {
|
|
16
17
|
it("should render correctly", () => {
|
|
17
|
-
n(/* @__PURE__ */ i(
|
|
18
|
+
n(/* @__PURE__ */ i(t, {
|
|
18
19
|
label: "Test Label",
|
|
19
20
|
options: a,
|
|
20
21
|
onChange: jest.fn()
|
|
21
|
-
})), expect(
|
|
22
|
+
})), expect(e.getByText("Test Label")).toBeInTheDocument(), expect(e.getByText("Option 1")).toBeInTheDocument(), expect(e.getByText("Option 2")).toBeInTheDocument();
|
|
22
23
|
}), it("should call onChange when an option is selected", () => {
|
|
23
24
|
let o = jest.fn();
|
|
24
|
-
n(/* @__PURE__ */ i(
|
|
25
|
+
n(/* @__PURE__ */ i(t, {
|
|
25
26
|
label: "Test Label",
|
|
26
27
|
options: a,
|
|
27
28
|
onChange: o
|
|
28
29
|
}));
|
|
29
|
-
let s =
|
|
30
|
+
let s = e.getByLabelText("Option 1");
|
|
30
31
|
r.click(s), expect(o).toHaveBeenCalledWith("option1");
|
|
31
32
|
}), it("should not allow selection when disabled", () => {
|
|
32
33
|
let o = jest.fn();
|
|
33
|
-
n(/* @__PURE__ */ i(
|
|
34
|
+
n(/* @__PURE__ */ i(t, {
|
|
34
35
|
label: "Test Label",
|
|
35
36
|
options: a,
|
|
36
37
|
onChange: o,
|
|
37
38
|
disabled: !0
|
|
38
39
|
}));
|
|
39
|
-
let s =
|
|
40
|
+
let s = e.getByLabelText("Option 1");
|
|
40
41
|
r.click(s), expect(o).not.toHaveBeenCalled();
|
|
41
42
|
});
|
|
42
43
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radiogroup.test.js","names":[],"sources":["../../../src/components/RadioGroup/Radiogroup.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { RadioGroup } from './RadioGroup';\n\nconst options = [\n { id: '1', titleLabel: 'Option 1', value: 'option1' },\n { id: '2', titleLabel: 'Option 2', value: 'option2' },\n];\n\ndescribe('RadioGroup', () => {\n it('should render correctly', () => {\n render(<RadioGroup label=\"Test Label\" options={options} onChange={jest.fn()} />);\n expect(screen.getByText('Test Label')).toBeInTheDocument();\n expect(screen.getByText('Option 1')).toBeInTheDocument();\n expect(screen.getByText('Option 2')).toBeInTheDocument();\n });\n\n it('should call onChange when an option is selected', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).toHaveBeenCalledWith('option1');\n });\n\n it('should not allow selection when disabled', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} disabled />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).not.toHaveBeenCalled();\n });\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radiogroup.test.js","names":[],"sources":["../../../src/components/RadioGroup/Radiogroup.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { RadioGroup } from './RadioGroup';\n\nconst options = [\n { id: '1', titleLabel: 'Option 1', value: 'option1' },\n { id: '2', titleLabel: 'Option 2', value: 'option2' },\n];\n\ndescribe('RadioGroup', () => {\n it('should render correctly', () => {\n render(<RadioGroup label=\"Test Label\" options={options} onChange={jest.fn()} />);\n expect(screen.getByText('Test Label')).toBeInTheDocument();\n expect(screen.getByText('Option 1')).toBeInTheDocument();\n expect(screen.getByText('Option 2')).toBeInTheDocument();\n });\n\n it('should call onChange when an option is selected', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).toHaveBeenCalledWith('option1');\n });\n\n it('should not allow selection when disabled', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} disabled />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).not.toHaveBeenCalled();\n });\n});\n"],"mappings":";;;;;;AAKA,IAAM,IAAU,CACd;CAAE,IAAI;CAAK,YAAY;CAAY,OAAO;AAAU,GACpD;CAAE,IAAI;CAAK,YAAY;CAAY,OAAO;AAAU,CACtD;AAEA,SAAS,oBAAoB;CAiB3B,AAhBA,GAAG,iCAAiC;EAIlC,AAHA,EAAO,kBAAC,GAAD;GAAY,OAAM;GAAsB;GAAS,UAAU,KAAK,GAAG;EAAI,CAAA,CAAC,GAC/E,OAAO,EAAO,UAAU,YAAY,CAAC,CAAC,CAAC,kBAAkB,GACzD,OAAO,EAAO,UAAU,UAAU,CAAC,CAAC,CAAC,kBAAkB,GACvD,OAAO,EAAO,UAAU,UAAU,CAAC,CAAC,CAAC,kBAAkB;CACzD,CAAC,GAED,GAAG,yDAAyD;EAC1D,IAAM,IAAe,KAAK,GAAG;EAC7B,EAAO,kBAAC,GAAD;GAAY,OAAM;GAAsB;GAAS,UAAU;EAAe,CAAA,CAAC;EAElF,IAAM,IAAU,EAAO,eAAe,UAAU;EAEhD,AADA,EAAU,MAAM,CAAO,GACvB,OAAO,CAAY,CAAC,CAAC,qBAAqB,SAAS;CACrD,CAAC,GAED,GAAG,kDAAkD;EACnD,IAAM,IAAe,KAAK,GAAG;EAC7B,EAAO,kBAAC,GAAD;GAAY,OAAM;GAAsB;GAAS,UAAU;GAAc,UAAA;EAAU,CAAA,CAAC;EAE3F,IAAM,IAAU,EAAO,eAAe,UAAU;EAEhD,AADA,EAAU,MAAM,CAAO,GACvB,OAAO,CAAY,CAAC,CAAC,IAAI,iBAAiB;CAC5C,CAAC;AACH,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { u as e } from "../../components-
|
|
1
|
+
import { u as e } from "../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as RadioTabSelector };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e } from "../../test-
|
|
2
|
-
import { u as t } from "../../components-
|
|
1
|
+
import { r as e } from "../../test-BjtC-Q32.js";
|
|
2
|
+
import { u as t } from "../../components-D2rPfyIW.js";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
var r = {
|
|
5
5
|
title: "Molecules/RadioTabSelector",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { u as e } from "../../components-
|
|
1
|
+
import { u as e } from "../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as RadioTabSelector };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as e } from "../../../components-
|
|
1
|
+
import { r as e } from "../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as EditorHeader };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as e } from "../../../components-
|
|
1
|
+
import { r as e } from "../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as EditorHeader };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../../../../clsx-C67XSbzZ.js";
|
|
2
2
|
import { Icon as t } from "../../../Icon/Icon.js";
|
|
3
3
|
import { t as n } from "../../../../LexicalComposerContext.prod-D4HOlWII.js";
|
|
4
|
-
import {
|
|
4
|
+
import { C as r, W as i, ln as a } from "../../../../Lexical.prod-BlUfEvo-.js";
|
|
5
5
|
import { t as o } from "../../../../RteEditor.module-pWBasED2.js";
|
|
6
6
|
import { useTranslation as s } from "../../hooks/useTranslation.js";
|
|
7
7
|
import { useEffect as c, useState as l } from "react";
|
|
@@ -12,13 +12,13 @@ var d = {
|
|
|
12
12
|
italic: "Italic"
|
|
13
13
|
}, f = ["bold", "italic"], p = () => {
|
|
14
14
|
let p = s(), [m] = n(), [h, g] = l(!1), [_, v] = l(!1), y = (e) => {
|
|
15
|
-
m.dispatchCommand(
|
|
15
|
+
m.dispatchCommand(r, e);
|
|
16
16
|
};
|
|
17
17
|
return c(() => {
|
|
18
18
|
let e = m.registerUpdateListener(({ editorState: e }) => {
|
|
19
19
|
e.read(() => {
|
|
20
|
-
let e =
|
|
21
|
-
|
|
20
|
+
let e = i();
|
|
21
|
+
a(e) && (g(e.hasFormat("bold")), v(e.hasFormat("italic")));
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
return () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../../../../clsx-C67XSbzZ.js";
|
|
2
2
|
import { t } from "../../../../LexicalComposerContext.prod-D4HOlWII.js";
|
|
3
|
-
import {
|
|
4
|
-
import { l as d } from "../../../../LexicalUtils.prod-
|
|
3
|
+
import { Bt as n, W as r, Xn as i, _t as a, gn as o, ht as s, ln as c, rn as l, s as u } from "../../../../Lexical.prod-BlUfEvo-.js";
|
|
4
|
+
import { l as d } from "../../../../LexicalUtils.prod-CNWf_0sq.js";
|
|
5
5
|
import { $getLinkTypeFromNode as f, CourseCatalogueNode as p, INSERT_COURSE_CATALOGUE_LINK as m, REMOVE_COURSE_CATALOGUE_LINK as h } from "../../nodes/CourseCatalogueNode/CourseCatalogueNode.js";
|
|
6
6
|
import { t as g } from "../../../../RteEditor.module-pWBasED2.js";
|
|
7
7
|
import { t as _ } from "../../../../AddCatalogueLinkForm-CvJoaUFz.js";
|
|
@@ -22,12 +22,12 @@ var T = ({ onSearch: T, searchResponse: E, parentScrollPosition: D }) => {
|
|
|
22
22
|
T("", z), R(null);
|
|
23
23
|
};
|
|
24
24
|
b(() => {
|
|
25
|
-
let e = O.registerCommand(
|
|
25
|
+
let e = O.registerCommand(n, (e) => e.ctrlKey && e.shiftKey && e.altKey && e.key === "C" ? (e.preventDefault(), H("course"), !0) : e.ctrlKey && e.shiftKey && e.altKey && e.key === "P" ? (e.preventDefault(), H("programme"), !0) : !1, 4), t = O.registerUpdateListener(({ editorState: e }) => {
|
|
26
26
|
e.read(() => {
|
|
27
|
-
let e =
|
|
28
|
-
if (
|
|
27
|
+
let e = r();
|
|
28
|
+
if (c(e)) {
|
|
29
29
|
let t = e.anchor.getNode(), n = e.anchor.offset;
|
|
30
|
-
if (
|
|
30
|
+
if (o(t) && n === t.getTextContentSize() && t.getNextSibling() instanceof p) {
|
|
31
31
|
let e = t.getNextSibling();
|
|
32
32
|
if (e) {
|
|
33
33
|
let t = f(e);
|
|
@@ -44,28 +44,28 @@ var T = ({ onSearch: T, searchResponse: E, parentScrollPosition: D }) => {
|
|
|
44
44
|
j(!1), N(!1);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
}),
|
|
48
|
-
let t =
|
|
47
|
+
}), a = (e) => {
|
|
48
|
+
let t = u(), n = e.getTextContentSize();
|
|
49
49
|
t.setTextNodeRange(e, n, e, n), l(t);
|
|
50
|
-
}, m = (e, t) =>
|
|
51
|
-
let t =
|
|
52
|
-
if (
|
|
50
|
+
}, m = (e, t) => o(e) && t === e.getTextContentSize() && e.getNextSibling() instanceof p, g = O.registerCommand(n, (e) => {
|
|
51
|
+
let t = r();
|
|
52
|
+
if (c(t)) {
|
|
53
53
|
let n = e.key, r = t.anchor.getNode(), o = t.anchor.offset, s = d(r, p);
|
|
54
54
|
if (m(r, o) && (s = r.getNextSibling()), !s) return !1;
|
|
55
55
|
let c = s?.getTextContentSize();
|
|
56
56
|
if (s && e.key === "Enter") return e.preventDefault(), O.update(() => {
|
|
57
57
|
if (m(r, o)) {
|
|
58
|
-
let e =
|
|
58
|
+
let e = i("\n");
|
|
59
59
|
s.insertBefore(e);
|
|
60
60
|
}
|
|
61
61
|
if (o === c) {
|
|
62
|
-
let e =
|
|
63
|
-
s.insertAfter(e),
|
|
62
|
+
let e = i("\n");
|
|
63
|
+
s.insertAfter(e), a(e);
|
|
64
64
|
}
|
|
65
65
|
}), !0;
|
|
66
66
|
if (s && (n === " " || e.code === "Space")) return e.preventDefault(), O.update(() => {
|
|
67
|
-
let e =
|
|
68
|
-
m(r, o) && (s.insertBefore(e),
|
|
67
|
+
let e = i(" ");
|
|
68
|
+
m(r, o) && (s.insertBefore(e), a(e)), o === c && (s.insertAfter(e), a(e));
|
|
69
69
|
}), !0;
|
|
70
70
|
if (s && (n === "Backspace" || n === "Delete")) return e.preventDefault(), O.update(() => {
|
|
71
71
|
O.dispatchCommand(h, void 0);
|
|
@@ -73,9 +73,9 @@ var T = ({ onSearch: T, searchResponse: E, parentScrollPosition: D }) => {
|
|
|
73
73
|
if (s && n !== "ArrowLeft" && n !== "ArrowRight" && n !== "ArrowUp" && n !== "ArrowDown" && n !== "Home" && n !== "End" && !(e.ctrlKey && (n.toLowerCase() === "z" || n.toLowerCase() === "y")) && !(e.ctrlKey && n.toLowerCase() === "c")) return e.preventDefault(), !0;
|
|
74
74
|
}
|
|
75
75
|
return !1;
|
|
76
|
-
}, 4), _ = O.registerCommand(
|
|
77
|
-
let t =
|
|
78
|
-
if (
|
|
76
|
+
}, 4), _ = O.registerCommand(s, (e) => {
|
|
77
|
+
let t = r();
|
|
78
|
+
if (c(t)) {
|
|
79
79
|
let n = d(t.anchor.getNode(), p);
|
|
80
80
|
if (n) {
|
|
81
81
|
e.preventDefault();
|
|
@@ -92,7 +92,7 @@ var T = ({ onSearch: T, searchResponse: E, parentScrollPosition: D }) => {
|
|
|
92
92
|
let W = () => {
|
|
93
93
|
U();
|
|
94
94
|
};
|
|
95
|
-
return b(() =>
|
|
95
|
+
return b(() => a(O.registerCommand(n, (e) => e.key === "Escape" && V.current ? (e.preventDefault(), U(), !0) : !1, 1), O.registerRootListener((e, t) => {
|
|
96
96
|
t && t.removeEventListener("scroll", W), e && e.addEventListener("scroll", W);
|
|
97
97
|
})), [O]), b(() => {
|
|
98
98
|
L && U();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as e } from "../../../../components-
|
|
1
|
+
import { o as e } from "../../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as HistoryPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as e } from "../../../../components-
|
|
1
|
+
import { o as e } from "../../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as HistoryPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e } from "../../../../../components-
|
|
1
|
+
import { c as e } from "../../../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as AddLinkForm };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../../../LinkContextMenu-
|
|
1
|
+
import { t as e } from "../../../../../LinkContextMenu-59-rbxa2.js";
|
|
2
2
|
export { e as LinkContextMenu };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { s as e } from "../../../../components-
|
|
1
|
+
import { s as e } from "../../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as LinkPlugin };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import { i as e
|
|
2
|
-
|
|
1
|
+
import { i as e } from "../../../../LexicalLink.prod-6gI2ABQo.js";
|
|
2
|
+
//#region src/components/RteEditor/Plugins/LinkPlugin/helpers.ts
|
|
3
|
+
var t = /^(http|https):\/\//, n = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/, r = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, i = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})?$/, a = (e) => e === "https://" || n.test(e), o = (e) => e === "https://" || i.test(e), s = [e(n, (e) => t.test(e) ? e : `//${e}`), e(r, (e) => `mailto:${e}`)], c = (e) => /^https?:\/\//i.test(e) ? e : `https://${e}`;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { s as MATCHERS, c as ensureHttps, a as validateUrl, o as validateUrlWithProtocol };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","names":[],"sources":["../../../../../src/components/RteEditor/Plugins/LinkPlugin/helpers.ts"],"sourcesContent":["import { createLinkMatcherWithRegExp } from '@lexical/react/LexicalAutoLinkPlugin';\n\nconst PROTOCOL_REGEX = /^(http|https):\\/\\//;\n\nconst URL_REGEX =\n /(https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^\\s]{2,}|www\\.[a-zA-Z0-9]+\\.[^\\s]{2,})/;\n\nconst EMAIL_REGEX =\n /(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))/;\n\nconst URL_REGEX_OR_BLANK =\n /^(https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^\\s]{2,}|www\\.[a-zA-Z0-9]+\\.[^\\s]{2,})?$/;\n\nexport const validateUrl = (url: string): boolean => {\n return url === 'https://' || URL_REGEX.test(url);\n};\n\nexport const validateUrlWithProtocol = (url: string): boolean => {\n return url === 'https://' || URL_REGEX_OR_BLANK.test(url);\n};\n\nexport const MATCHERS = [\n createLinkMatcherWithRegExp(URL_REGEX, (text: string): string => {\n return !PROTOCOL_REGEX.test(text) ? `//${text}` : text;\n }),\n createLinkMatcherWithRegExp(EMAIL_REGEX, (text) => {\n return `mailto:${text}`;\n }),\n];\n\nexport const ensureHttps = (url: string) => {\n if (!/^https?:\\/\\//i.test(url)) {\n return `https://${url}`;\n }\n return url;\n};\n"],"mappings":";;AAEA,IAAM,IAAiB,sBAEjB,IACJ,qNAEI,IACJ,uJAEI,IACJ,wNAEW,KAAe,MACnB,MAAQ,cAAc,EAAU,KAAK,CAAG,GAGpC,KAA2B,MAC/B,MAAQ,cAAc,EAAmB,KAAK,CAAG,GAG7C,IAAW,CACtB,EAA4B,IAAY,MAC9B,EAAe,KAAK,CAAI,IAAkB,IAAd,KAAK,GAC1C,GACD,EAA4B,IAAc,MACjC,UAAU,GAClB,CACH,GAEa,KAAe,MACrB,gBAAgB,KAAK,CAAG,IAGtB,IAFE,WAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { s as e } from "../../../../components-
|
|
1
|
+
import { s as e } from "../../../../components-D2rPfyIW.js";
|
|
2
2
|
export { e as LinkPlugin };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "../../../../clsx-C67XSbzZ.js";
|
|
2
2
|
import { Icon as t } from "../../../Icon/Icon.js";
|
|
3
3
|
import { t as n } from "../../../../LexicalComposerContext.prod-D4HOlWII.js";
|
|
4
|
-
import {
|
|
5
|
-
import { l as s } from "../../../../LexicalUtils.prod-
|
|
6
|
-
import { i as c, n as l, o as u, r as d, s as f, t as p, u as m } from "../../../../LexicalList.prod-
|
|
4
|
+
import { Bt as r, W as i, ln as a, tn as o } from "../../../../Lexical.prod-BlUfEvo-.js";
|
|
5
|
+
import { l as s } from "../../../../LexicalUtils.prod-CNWf_0sq.js";
|
|
6
|
+
import { i as c, n as l, o as u, r as d, s as f, t as p, u as m } from "../../../../LexicalList.prod-CMGvSM1c.js";
|
|
7
7
|
import { t as h } from "../../../../RteEditor.module-pWBasED2.js";
|
|
8
8
|
import { useTranslation as g } from "../../hooks/useTranslation.js";
|
|
9
9
|
import { useEffect as _, useState as v } from "react";
|
|
@@ -17,7 +17,7 @@ var b = {
|
|
|
17
17
|
e === "number" && w !== "number" ? (C.dispatchCommand(u, void 0), T("number")) : e === "bullet" && w !== "bullet" ? (C.dispatchCommand(c, void 0), T("bullet")) : (C.dispatchCommand(f, void 0), T(null));
|
|
18
18
|
};
|
|
19
19
|
return _(() => {
|
|
20
|
-
let e = C.registerCommand(
|
|
20
|
+
let e = C.registerCommand(r, (e) => e.ctrlKey && e.shiftKey && e.code === "Digit7" ? (e.preventDefault(), O ? C.dispatchCommand(f, void 0) : C.dispatchCommand(u, void 0), !0) : e.ctrlKey && e.shiftKey && e.code === "Digit8" ? (e.preventDefault(), E ? C.dispatchCommand(f, void 0) : C.dispatchCommand(c, void 0), !0) : !1, 4);
|
|
21
21
|
return () => {
|
|
22
22
|
e();
|
|
23
23
|
};
|
|
@@ -26,20 +26,20 @@ var b = {
|
|
|
26
26
|
O,
|
|
27
27
|
E
|
|
28
28
|
]), _(() => {
|
|
29
|
-
let e = C.registerCommand(
|
|
30
|
-
let e =
|
|
31
|
-
if (!
|
|
29
|
+
let e = C.registerCommand(o, (e) => (e.preventDefault(), C.update(() => {
|
|
30
|
+
let e = i();
|
|
31
|
+
if (!a(e)) return;
|
|
32
32
|
let t = e.anchor.getNode(), n = t.getParent();
|
|
33
33
|
if (!d(n)) return;
|
|
34
|
-
let
|
|
35
|
-
if (l(
|
|
36
|
-
let e = m(l(
|
|
34
|
+
let r = n.getParent();
|
|
35
|
+
if (l(r)) {
|
|
36
|
+
let e = m(l(r) ? r.getListType() : "bullet");
|
|
37
37
|
n.append(e), e.append(t);
|
|
38
38
|
}
|
|
39
39
|
}), !0), 1), t = C.registerUpdateListener(({ editorState: e }) => {
|
|
40
40
|
e.read(() => {
|
|
41
|
-
let e =
|
|
42
|
-
if (
|
|
41
|
+
let e = i();
|
|
42
|
+
if (a(e)) {
|
|
43
43
|
let t = s(e.anchor.getNode(), p);
|
|
44
44
|
if (t) {
|
|
45
45
|
let e = t.getTag();
|