From e5f99323dc662942f83be17fabafa740a8ca80f1 Mon Sep 17 00:00:00 2001 From: Frank Niessink Date: Tue, 17 Dec 2024 16:09:10 +0100 Subject: [PATCH] Migrate components from SUIR to MUI. --- components/frontend/src/fields/DateInput.js | 7 +- components/frontend/src/issue/IssuesRows.js | 11 +- .../src/measurement/MeasurementValue.js | 10 +- .../src/measurement/MeasurementValue.test.js | 5 +- .../frontend/src/metric/MetricDetails.js | 42 +- .../frontend/src/metric/MetricDetails.test.js | 10 +- components/frontend/src/metric/MetricType.js | 9 +- .../frontend/src/metric/MetricTypeHeader.js | 9 +- .../notification/NotificationDestinations.js | 49 ++- components/frontend/src/report/ReportTitle.js | 26 +- .../frontend/src/report/ReportsOverview.js | 24 +- .../src/report/ReportsOverview.test.js | 2 +- .../src/semantic_ui_react_wrappers.js | 1 - .../src/semantic_ui_react_wrappers/Icon.js | 21 - components/frontend/src/source/Source.js | 36 +- .../frontend/src/source/SourceEntities.js | 5 +- .../src/source/SourceEntities.test.js | 2 +- .../src/source/SourceParameter.test.js | 2 +- components/frontend/src/source/SourceType.js | 15 +- .../frontend/src/source/SourceTypeHeader.js | 8 +- components/frontend/src/source/Sources.js | 9 +- .../frontend/src/subject/SubjectTable.test.js | 3 +- .../src/subject/SubjectTableFooter.js | 59 +-- .../src/subject/SubjectTableFooter.test.js | 1 + .../src/subject/SubjectTableHeader.js | 64 +-- .../src/subject/SubjectTableHeader.test.js | 12 +- .../frontend/src/subject/SubjectTitle.js | 25 +- .../frontend/src/subject/SubjectTitle.test.js | 2 +- .../frontend/src/subject/SubjectType.js | 28 +- .../frontend/src/subject/SubjectsButtonRow.js | 63 +-- .../src/subject/SubjectsButtonRow.test.js | 4 +- components/frontend/src/widgets/Button.js | 400 ------------------ .../frontend/src/widgets/Button.test.js | 367 ---------------- components/frontend/src/widgets/ButtonRow.js | 17 + .../frontend/src/widgets/HeaderWithDetails.js | 7 +- .../frontend/src/widgets/LabelWithHelp.js | 2 +- .../src/widgets/LabelWithHelp.test.js | 2 +- .../frontend/src/widgets/ReadTheDocsLink.js | 15 + components/frontend/src/widgets/TabPane.js | 17 +- .../frontend/src/widgets/TabPane.test.js | 5 +- .../src/widgets/TableRowWithDetails.js | 6 +- .../buttons/ActionAndItemPickerButton.js | 67 +++ .../src/widgets/buttons/ActionButton.js | 27 ++ .../frontend/src/widgets/buttons/AddButton.js | 20 + .../src/widgets/buttons/AddButton.test.js | 8 + .../src/widgets/buttons/AddDropdownButton.js | 150 +++++++ .../widgets/buttons/AddDropdownButton.test.js | 145 +++++++ .../src/widgets/buttons/CopyButton.js | 6 + .../src/widgets/buttons/CopyButton.test.js | 69 +++ .../src/widgets/buttons/DeleteButton.js | 19 + .../src/widgets/buttons/DeleteButton.test.js | 8 + .../src/widgets/buttons/MoveButton.js | 6 + .../src/widgets/buttons/MoveButton.test.js | 10 + .../src/widgets/buttons/PermLinkButton.js | 32 ++ .../widgets/buttons/PermLinkButton.test.js | 39 ++ .../src/widgets/buttons/ReorderButtonGroup.js | 47 ++ .../buttons/ReorderButtonGroup.test.js | 21 + components/frontend/src/widgets/icons.js | 73 ++++ 58 files changed, 1100 insertions(+), 1049 deletions(-) delete mode 100644 components/frontend/src/semantic_ui_react_wrappers/Icon.js delete mode 100644 components/frontend/src/widgets/Button.js delete mode 100644 components/frontend/src/widgets/Button.test.js create mode 100644 components/frontend/src/widgets/ButtonRow.js create mode 100644 components/frontend/src/widgets/ReadTheDocsLink.js create mode 100644 components/frontend/src/widgets/buttons/ActionAndItemPickerButton.js create mode 100644 components/frontend/src/widgets/buttons/ActionButton.js create mode 100644 components/frontend/src/widgets/buttons/AddButton.js create mode 100644 components/frontend/src/widgets/buttons/AddButton.test.js create mode 100644 components/frontend/src/widgets/buttons/AddDropdownButton.js create mode 100644 components/frontend/src/widgets/buttons/AddDropdownButton.test.js create mode 100644 components/frontend/src/widgets/buttons/CopyButton.js create mode 100644 components/frontend/src/widgets/buttons/CopyButton.test.js create mode 100644 components/frontend/src/widgets/buttons/DeleteButton.js create mode 100644 components/frontend/src/widgets/buttons/DeleteButton.test.js create mode 100644 components/frontend/src/widgets/buttons/MoveButton.js create mode 100644 components/frontend/src/widgets/buttons/MoveButton.test.js create mode 100644 components/frontend/src/widgets/buttons/PermLinkButton.js create mode 100644 components/frontend/src/widgets/buttons/PermLinkButton.test.js create mode 100644 components/frontend/src/widgets/buttons/ReorderButtonGroup.js create mode 100644 components/frontend/src/widgets/buttons/ReorderButtonGroup.test.js create mode 100644 components/frontend/src/widgets/icons.js diff --git a/components/frontend/src/fields/DateInput.js b/components/frontend/src/fields/DateInput.js index 1f6ed54a7c..a987f1a7db 100644 --- a/components/frontend/src/fields/DateInput.js +++ b/components/frontend/src/fields/DateInput.js @@ -3,18 +3,19 @@ import "./DateInput.css" import { bool, func, string } from "prop-types" import { ReadOnlyOrEditable } from "../context/Permissions" -import { Form, Icon, Label } from "../semantic_ui_react_wrappers" +import { Form, Label } from "../semantic_ui_react_wrappers" import { labelPropType, permissionsPropType } from "../sharedPropTypes" import { toISODateStringInCurrentTZ } from "../utils" import { DatePicker } from "../widgets/DatePicker" +import { CalendarIcon } from "../widgets/icons" import { ReadOnlyInput } from "./ReadOnlyInput" function EditableDateInput({ ariaLabelledBy, label, placeholder, required, set_value, value }) { value = value ? new Date(value) : null return ( -