@centreon/ui 24.8.6 → 24.8.7
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/package.json +4 -3
- package/src/@types/globals.d.ts +4 -4
- package/src/ActionsList/ActionsList.styles.ts +1 -1
- package/src/ActionsList/index.stories.tsx +1 -1
- package/src/ActionsList/index.tsx +6 -6
- package/src/Button/Icon/index.stories.tsx +1 -1
- package/src/Button/Icon/index.tsx +1 -1
- package/src/Button/Save/StartIcon.tsx +1 -1
- package/src/Checkbox/Checkbox.tsx +2 -2
- package/src/Colors/index.stories.tsx +0 -2
- package/src/Colors/index.tsx +7 -3
- package/src/ContentWithCircularProgress/index.stories.tsx +1 -1
- package/src/Dashboard/Dashboard.styles.ts +111 -111
- package/src/Dashboard/Grid.tsx +2 -2
- package/src/Dashboard/Item.tsx +3 -3
- package/src/Dashboard/Layout.tsx +3 -3
- package/src/Dashboard/index.tsx +9 -9
- package/src/Dialog/Duplicate/index.test.tsx +1 -1
- package/src/Dialog/Duplicate/index.tsx +5 -2
- package/src/Dialog/UnsavedChanges/index.tsx +2 -2
- package/src/Dialog/index.stories.tsx +1 -1
- package/src/Dialog/index.tsx +5 -5
- package/src/FallbackPage/FallbackPage.tsx +4 -4
- package/src/FileDropZone/index.stories.tsx +1 -1
- package/src/FileDropZone/index.tsx +5 -5
- package/src/FileDropZone/useDropzone.test.ts +1 -1
- package/src/FileDropZone/useDropzone.ts +1 -1
- package/src/Form/CollapsibleGroup.tsx +6 -6
- package/src/Form/Form.cypress.spec.tsx +1 -1
- package/src/Form/Form.stories.tsx +3 -3
- package/src/Form/Form.tsx +5 -4
- package/src/Form/FormButtons.tsx +2 -2
- package/src/Form/Inputs/Autocomplete.tsx +3 -3
- package/src/Form/Inputs/Checkbox.tsx +1 -1
- package/src/Form/Inputs/CheckboxGroup.tsx +2 -2
- package/src/Form/Inputs/ConnectedAutocomplete.tsx +1 -1
- package/src/Form/Inputs/FieldsTable/FieldsTable.tsx +15 -15
- package/src/Form/Inputs/FieldsTable/Row.tsx +2 -2
- package/src/Form/Inputs/List/Content.tsx +1 -1
- package/src/Form/Inputs/List/List.tsx +3 -3
- package/src/Form/Inputs/PasswordEndAdornment.tsx +1 -1
- package/src/Form/Inputs/Radio.tsx +3 -3
- package/src/Form/Inputs/Switch.tsx +1 -1
- package/src/Form/Inputs/Text.tsx +4 -4
- package/src/Form/Inputs/index.tsx +81 -72
- package/src/Form/Inputs/models.ts +14 -14
- package/src/Form/storiesData.tsx +26 -30
- package/src/Form/storiesData.tsx-E +481 -0
- package/src/Graph/BarChart/BarChart.stories.tsx +1 -1
- package/src/Graph/BarChart/BarChart.tsx +3 -3
- package/src/Graph/BarChart/BarGroup.tsx +6 -4
- package/src/Graph/BarChart/BarStack.tsx +4 -4
- package/src/Graph/BarChart/ResponsiveBarChart.tsx +10 -10
- package/src/Graph/BarChart/Tooltip/BarChartTooltip.tsx +5 -5
- package/src/Graph/BarChart/useBarStack.ts +2 -2
- package/src/Graph/BarStack/BarStack.cypress.spec.tsx +1 -1
- package/src/Graph/BarStack/BarStack.stories.tsx +1 -1
- package/src/Graph/BarStack/ResponsiveBarStack.tsx +10 -6
- package/src/Graph/BarStack/useResponsiveBarStack.ts +4 -4
- package/src/Graph/Chart/BasicComponents/Lines/RegularLines/index.tsx +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/RegularLines/useRegularLines.ts +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/StackedLines/index.tsx +4 -4
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/ThresholdWithPatternLines.tsx +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/index.tsx +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/models.ts +1 -1
- package/src/Graph/Chart/BasicComponents/Lines/Threshold/useScaleThreshold.ts +2 -2
- package/src/Graph/Chart/BasicComponents/Lines/index.tsx +7 -7
- package/src/Graph/Chart/BasicComponents/Lines/models.ts +1 -1
- package/src/Graph/Chart/Chart.cypress.spec.tsx +4 -4
- package/src/Graph/Chart/Chart.stories.tsx +6 -6
- package/src/Graph/Chart/Chart.tsx +11 -11
- package/src/Graph/Chart/InteractiveComponents/AnchorPoint/RegularAnchorPoint.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/AnchorPoint/useTickGraph.ts +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/Area.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/Line.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/Annotation/index.tsx +3 -3
- package/src/Graph/Chart/InteractiveComponents/Annotations/Area/Downtime.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/EventAnnotations.tsx +3 -3
- package/src/Graph/Chart/InteractiveComponents/Annotations/Line/Comments.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/Annotations/annotationsAtoms.ts +4 -4
- package/src/Graph/Chart/InteractiveComponents/Bar.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltip.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltipContent.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltip.ts +3 -3
- package/src/Graph/Chart/InteractiveComponents/TimeShiftZones/index.tsx +1 -1
- package/src/Graph/Chart/InteractiveComponents/TimeShiftZones/models.ts +2 -2
- package/src/Graph/Chart/InteractiveComponents/Tooltip/useGraphTooltip.ts +1 -1
- package/src/Graph/Chart/InteractiveComponents/index.tsx +7 -7
- package/src/Graph/Chart/Legend/LegendHeader.tsx +2 -2
- package/src/Graph/Chart/Legend/index.tsx +3 -3
- package/src/Graph/Chart/common/index.ts +5 -5
- package/src/Graph/Chart/helpers/index.ts +5 -5
- package/src/Graph/Chart/index.tsx +2 -2
- package/src/Graph/Chart/models.ts +4 -4
- package/src/Graph/Gauge/AnimatedPie.tsx +1 -1
- package/src/Graph/Gauge/Gauge.cypress.spec.tsx +2 -2
- package/src/Graph/Gauge/PieData.tsx +1 -1
- package/src/Graph/Gauge/ResponsiveGauge.tsx +5 -5
- package/src/Graph/Gauge/models.ts +3 -3
- package/src/Graph/HeatMap/HeatMap.cypress.spec.tsx +3 -3
- package/src/Graph/HeatMap/HeatMapData.json +1 -1
- package/src/Graph/HeatMap/ResponsiveHeatMap.tsx +1 -1
- package/src/Graph/PieChart/PieChart.stories.tsx +1 -1
- package/src/Graph/PieChart/ResponsivePie.tsx +7 -3
- package/src/Graph/SingleBar/ResponsiveSingleBar.tsx +8 -8
- package/src/Graph/SingleBar/SingleBar.cypress.spec.tsx +1 -1
- package/src/Graph/SingleBar/SingleBar.tsx +1 -1
- package/src/Graph/Text/Text.cypress.spec.tsx +2 -2
- package/src/Graph/Tree/DescendantNodes.tsx +1 -1
- package/src/Graph/Tree/Links.tsx +5 -5
- package/src/Graph/Tree/StandaloneTree.tsx +1 -1
- package/src/Graph/Tree/Tree.cypress.spec.tsx +2 -2
- package/src/Graph/Tree/Tree.stories.tsx +2 -2
- package/src/Graph/Tree/Tree.tsx +3 -3
- package/src/Graph/Tree/stories/contents.tsx +2 -2
- package/src/Graph/common/Axes/index.tsx +1 -1
- package/src/Graph/common/Axes/models.ts +1 -1
- package/src/Graph/common/Axes/useAxisY.ts +1 -1
- package/src/Graph/common/BaseChart/BaseChart.tsx +1 -1
- package/src/Graph/common/BaseChart/Header/index.tsx +1 -1
- package/src/Graph/common/Thresholds/Thresholds.tsx +2 -2
- package/src/Graph/common/timeSeries/index.test.ts +57 -45
- package/src/Graph/common/timeSeries/index.test.ts-E +622 -0
- package/src/Graph/common/timeSeries/index.ts +30 -30
- package/src/Graph/common/utils.ts +2 -2
- package/src/Graph/mockedData/annotationData.json +318 -320
- package/src/Graph/mockedData/curvesWithSameColor.json +1 -1
- package/src/Graph/mockedData/exclusionPeriodFirstPeriod.json +366 -586
- package/src/Graph/mockedData/exclusionPeriodSecondPeriod.json +370 -586
- package/src/Graph/mockedData/exclusionPeriodThirdPeriod.json +365 -579
- package/src/Graph/mockedData/lastDay.json +1290 -1324
- package/src/Graph/mockedData/lastDayAreaStack.json +3048 -3104
- package/src/Graph/mockedData/lastDayForward.json +1303 -1336
- package/src/Graph/mockedData/lastDayThreshold.json +2318 -2350
- package/src/Graph/mockedData/lastDayWithIncompleteValues.json +7 -41
- package/src/Graph/mockedData/lastDayWithLotOfUnits.json +1618 -1665
- package/src/Graph/mockedData/lastDayWithNullValues.json +7 -41
- package/src/Graph/mockedData/lastMonth.json +1639 -1672
- package/src/Graph/mockedData/lastWeek.json +2167 -2200
- package/src/Graph/mockedData/pingService.json +4 -12
- package/src/Graph/mockedData/pingServiceLinesBars.json +242 -250
- package/src/Graph/mockedData/pingServiceLinesBarsMixed.json +242 -250
- package/src/Graph/mockedData/pingServiceLinesBarsStacked.json +242 -250
- package/src/Graph/mockedData/pingServiceMixedStacked.json +4 -12
- package/src/Graph/mockedData/pingServiceStacked.json +4 -12
- package/src/Graph/mockedData/zoomPreview.json +370 -740
- package/src/Icon/IconAttach/index.tsx +1 -6
- package/src/Image/Image.tsx +75 -75
- package/src/Image/atoms.ts +3 -3
- package/src/Image/index.stories.tsx +1 -1
- package/src/Image/index.test.tsx +53 -53
- package/src/Image/models.ts +3 -3
- package/src/Image/useLoadImage.ts +49 -49
- package/src/InputField/Number/Number.tsx +2 -2
- package/src/InputField/Search/PersistentTooltip.tsx +2 -2
- package/src/InputField/Search/RegexpHelpTooltip.tsx +1 -1
- package/src/InputField/Search/index.stories.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Connected/Multi/index.test.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Connected/Multi/index.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Connected/index.stories.tsx +4 -4
- package/src/InputField/Select/Autocomplete/Connected/index.test.tsx +6 -6
- package/src/InputField/Select/Autocomplete/Connected/index.tsx +12 -12
- package/src/InputField/Select/Autocomplete/Draggable/MultiConnected.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Draggable/SortableList.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Draggable/SortableListContent.tsx +5 -6
- package/src/InputField/Select/Autocomplete/Draggable/index.stories.tsx +6 -6
- package/src/InputField/Select/Autocomplete/Draggable/index.tsx +15 -16
- package/src/InputField/Select/Autocomplete/Multi/index.tsx +1 -1
- package/src/InputField/Select/Autocomplete/Popover/index.tsx +1 -1
- package/src/InputField/Select/Autocomplete/index.stories.tsx +2 -3
- package/src/InputField/Select/Autocomplete/index.tsx +10 -11
- package/src/InputField/Select/IconPopover/index.tsx +3 -3
- package/src/InputField/Select/Option.tsx +1 -1
- package/src/InputField/Select/index.tsx +6 -6
- package/src/InputField/Text/index.stories.tsx +3 -4
- package/src/InputField/Text/index.tsx +3 -3
- package/src/InputField/Text/useAutoSize.ts +62 -62
- package/src/LicenseMessage/index.tsx +1 -1
- package/src/Listing/ActionBar/ColumnMultiSelect.tsx +4 -4
- package/src/Listing/ActionBar/PaginationActions.tsx +1 -1
- package/src/Listing/ActionBar/index.tsx +6 -6
- package/src/Listing/Cell/DataCell.tsx +2 -2
- package/src/Listing/Cell/EllipsisTypography.tsx +0 -2
- package/src/Listing/Cell/index.tsx +7 -8
- package/src/Listing/Checkbox.tsx +1 -1
- package/src/Listing/EmptyResult/EmptyResult.tsx +0 -2
- package/src/Listing/Header/Cell/ListingHeaderCell.styles.ts +1 -1
- package/src/Listing/Header/Cell/ListingHeaderCell.tsx +1 -3
- package/src/Listing/Header/Cell/SelectActionListingHeaderCell.tsx +3 -5
- package/src/Listing/Header/ListingHeader.tsx +6 -7
- package/src/Listing/Header/_internals/DraggableIconButton.tsx +1 -3
- package/src/Listing/Header/_internals/Label.tsx +2 -3
- package/src/Listing/Listing.cypress.spec.tsx +307 -307
- package/src/Listing/Row/Row.tsx +4 -5
- package/src/Listing/Row/SkeletonLoaderRows.tsx +7 -9
- package/src/Listing/index.stories.tsx +1 -1
- package/src/Listing/index.tsx +32 -27
- package/src/Listing/useResizeObserver.ts +1 -1
- package/src/ListingPage/Filter.tsx +15 -18
- package/src/ListingPage/index.tsx +2 -2
- package/src/Logo/CentreonLogo.tsx +2 -2
- package/src/MenuSkeleton/index.tsx +1 -1
- package/src/Module/LicensedModule/LicenseCheck/index.tsx +1 -1
- package/src/Module/index.tsx +3 -3
- package/src/MultiSelectEntries/index.tsx +1 -1
- package/src/MultiSelectEntries/useHover.ts +1 -1
- package/src/Panel/Section/ExpandableSection.tsx +6 -6
- package/src/Panel/Section/index.test.tsx +1 -1
- package/src/Panel/Section/index.tsx +1 -1
- package/src/Panel/index.tsx +15 -13
- package/src/RichTextEditor/ContentEditable.tsx +195 -195
- package/src/RichTextEditor/RichTextEditor.tsx +244 -244
- package/src/RichTextEditor/index.ts +2 -2
- package/src/RichTextEditor/initialEditorState.json +113 -113
- package/src/RichTextEditor/plugins/AutoLinkPlugin/index.tsx +4 -4
- package/src/RichTextEditor/plugins/FloatingLinkEditorPlugin.tsx +10 -10
- package/src/RichTextEditor/plugins/ToolbarPlugin/AlignPicker.tsx +4 -4
- package/src/RichTextEditor/plugins/ToolbarPlugin/BlockButtons.tsx +7 -7
- package/src/RichTextEditor/plugins/ToolbarPlugin/FormatButtons.tsx +124 -124
- package/src/RichTextEditor/plugins/ToolbarPlugin/LinkButton.tsx +5 -5
- package/src/RichTextEditor/plugins/ToolbarPlugin/ListButton.tsx +2 -2
- package/src/RichTextEditor/plugins/ToolbarPlugin/MacrosButton.tsx +4 -4
- package/src/RichTextEditor/plugins/ToolbarPlugin/UndoRedoButtons.tsx +97 -97
- package/src/RichTextEditor/plugins/ToolbarPlugin/index.tsx +62 -62
- package/src/RichTextEditor/translatedLabels.ts +8 -8
- package/src/Snackbar/SnackbarProvider.tsx +3 -4
- package/src/Snackbar/Transition.tsx +5 -6
- package/src/Snackbar/index.tsx +7 -8
- package/src/SortableItems/Item.tsx +3 -3
- package/src/SortableItems/SortableItem.tsx +1 -1
- package/src/SortableItems/index.stories.tsx +5 -6
- package/src/SortableItems/index.tsx +18 -19
- package/src/StatusChip/index.tsx +1 -1
- package/src/StoryBookThemeProvider/index.tsx +35 -36
- package/src/ThemeProvider/index.tsx +8 -10
- package/src/ThemeProvider/palettes.ts +42 -27
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/PickersStartEndDate.tsx +1 -1
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/index.tsx +1 -1
- package/src/TimePeriods/SelectedTimePeriod.tsx +1 -1
- package/src/TimePeriods/TimePeriods.cypress.spec.tsx +3 -3
- package/src/TimePeriods/TimePeriods.tsx +1 -1
- package/src/TimePeriods/helpers/index.ts +1 -1
- package/src/TimePeriods/index.stories.tsx +1 -1
- package/src/TimePeriods/index.tsx +1 -1
- package/src/TimePeriods/models.ts +2 -2
- package/src/TimePeriods/timePeriodsAtoms.ts +1 -1
- package/src/TimePeriods/useTimePeriod.ts +4 -4
- package/src/TopCounterElements/ResourceSubMenu.tsx +1 -4
- package/src/TopCounterElements/StatusCounter.tsx +2 -2
- package/src/Typography/FluidTypography/index.tsx +46 -46
- package/src/Typography/Subtitle.tsx +2 -2
- package/src/Typography/story.utils.tsx +6 -6
- package/src/WallpaperPage/index.tsx +1 -1
- package/src/Wizard/ActionsBar.test.tsx +1 -1
- package/src/Wizard/ActionsBar.tsx +1 -1
- package/src/Wizard/StepIcon.tsx +1 -1
- package/src/Wizard/Stepper.tsx +2 -2
- package/src/Wizard/WizardContent.tsx +1 -1
- package/src/Wizard/index.stories.tsx +2 -2
- package/src/Wizard/index.test.tsx +3 -3
- package/src/Wizard/index.tsx +2 -2
- package/src/Wizard/models.ts +1 -1
- package/src/api/TestQueryProvider.tsx +24 -24
- package/src/api/buildListingDecoder.ts +1 -1
- package/src/api/buildListingEndpoint/getSearchQueryParameterValue.ts +11 -11
- package/src/api/buildListingEndpoint/index.ts +1 -1
- package/src/api/useFetchQuery/index.test.ts +1 -1
- package/src/api/useFetchQuery/index.ts +8 -8
- package/src/api/useGraphQuery/index.ts +1 -1
- package/src/api/useMutationQuery/index.test.ts +1 -1
- package/src/api/useMutationQuery/index.ts +4 -4
- package/src/api/useRequest/index.test.ts +1 -1
- package/src/api/useRequest/index.ts +3 -3
- package/src/base/tokens/source/$metadata.json +2 -4
- package/src/base/tokens/source/base.json +1 -1
- package/src/base/tokens/themes/base.tokens.json +34 -166
- package/src/base/tokens/themes/ui-dark.tokens.json +34 -166
- package/src/base/tokens/themes/ui-light.tokens.json +34 -166
- package/src/components/Button/Icon/IconButton.tsx +1 -1
- package/src/components/CollapsibleItem/CollapsibleItem.tsx +2 -2
- package/src/components/DataTable/DataListing.tsx +1 -1
- package/src/components/DataTable/DataTable.cypress.spec.tsx +1 -1
- package/src/components/DataTable/DataTable.stories.tsx +4 -1
- package/src/components/DataTable/EmptyState/DataTableEmptyState.tsx +1 -1
- package/src/components/DataTable/index.ts +2 -2
- package/src/components/Form/AccessRights/AccessRights.cypress.spec.tsx +11 -11
- package/src/components/Form/AccessRights/Actions/Actions.tsx +1 -1
- package/src/components/Form/AccessRights/List/Item.tsx +5 -5
- package/src/components/Form/AccessRights/List/List.tsx +4 -4
- package/src/components/Form/AccessRights/ShareInput/ContactSwitch.tsx +2 -2
- package/src/components/Form/AccessRights/ShareInput/ShareInput.styles.ts +1 -1
- package/src/components/Form/AccessRights/ShareInput/ShareInput.tsx +3 -3
- package/src/components/Form/AccessRights/ShareInput/useShareInput.tsx +2 -2
- package/src/components/Form/AccessRights/Stats/Stats.tsx +2 -2
- package/src/components/Form/AccessRights/atoms.ts +1 -1
- package/src/components/Form/AccessRights/storiesData.ts +1 -1
- package/src/components/Form/AccessRights/useAccessRightsChange.ts +1 -1
- package/src/components/Form/Dashboard/DashboardDuplicationForm.tsx +3 -3
- package/src/components/Form/Dashboard/DashboardForm.tsx +5 -5
- package/src/components/Form/Dashboard/GlobalRefreshFieldOption.tsx +4 -4
- package/src/components/Header/PageHeader/PageHeader.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderActions.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderMain.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderMenu.tsx +1 -1
- package/src/components/Header/PageHeader/PageHeaderTitle.tsx +1 -1
- package/src/components/Header/PageHeader/index.ts +2 -2
- package/src/components/Inputs/Switch/Switch.tsx +1 -1
- package/src/components/ItemComposition/ItemComposition.stories.tsx +6 -4
- package/src/components/ItemComposition/index.ts +1 -1
- package/src/components/Layout/PageLayout/PageLayout.stories.tsx +1 -1
- package/src/components/Layout/PageLayout/PageQuickAccess.tsx +12 -13
- package/src/components/Layout/PageLayout/index.ts +2 -2
- package/src/components/List/Item/ListItem.tsx +3 -3
- package/src/components/List/Item/index.ts +2 -2
- package/src/components/List/List.stories.tsx +16 -14
- package/src/components/List/List.tsx +2 -2
- package/src/components/List/index.ts +1 -1
- package/src/components/Menu/Button/MenuButton.tsx +1 -1
- package/src/components/Menu/index.ts +2 -2
- package/src/components/Menu/useMenu.tsx +3 -3
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.cypress.spec.tsx +1 -1
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +1 -1
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.tsx +1 -1
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Modal/ModalBody.tsx +1 -1
- package/src/components/Modal/ModalHeader.tsx +1 -1
- package/src/components/Modal/index.ts +2 -2
- package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.tsx +2 -2
- package/src/components/Tooltip/ConfirmationTooltip/TooltipContent.tsx +1 -1
- package/src/components/Tooltip/TextOverflowTooltip/TextOverflowTooltip.tsx +1 -1
- package/src/components/Zoom/Minimap.tsx +1 -1
- package/src/components/Zoom/Zoom.stories.tsx +1 -1
- package/src/components/Zoom/ZoomContent.tsx +3 -3
- package/src/components/Zoom/localPoint.ts +4 -4
- package/src/components/Zoom/useMinimap.ts +1 -1
- package/src/queryParameters/index.ts +1 -1
- package/src/styles/tokens/themes/_ui-dark.tokens.json +34 -166
- package/src/styles/tokens/themes/_ui-light.tokens.json +34 -166
- package/src/utils/index.ts +29 -29
- package/src/utils/resourcesStatusURL.ts +2 -2
- package/src/utils/sanitizedHTML.ts +1 -1
- package/src/utils/useCopyToClipboard.ts +1 -1
- package/src/utils/useDebounce.ts +1 -1
- package/src/utils/useFullscreen/useFullscreen.ts +2 -2
- package/src/utils/useInfiniteScrollListing.ts +129 -129
- package/src/utils/useIntersectionObserver.ts +1 -1
- package/src/utils/useKeyObserver.tsx +1 -1
- package/src/utils/useLicenseExpirationWarning.test.tsx +1 -1
- package/src/utils/useLicenseExpirationWarning.ts +1 -1
- package/src/utils/useLocaleDateTimeFormat/index.test.tsx +3 -3
- package/src/utils/useLocaleDateTimeFormat/index.ts +1 -1
- package/src/utils/useLocaleDateTimeFormat/localeFallback.test.tsx +4 -4
- package/src/utils/useLocaleTimezoneDate/LocaleTimezoneDate.cypress.spec.tsx +2 -2
- package/src/utils/useMemoComponent.ts +1 -1
- package/src/utils/usePluralizedTranslation.ts +2 -2
- package/src/utils/useViewportIntersection.ts +1 -1
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import { useAtomValue } from 'jotai';
|
|
4
|
-
import { CSSInterpolation } from 'tss-react';
|
|
5
2
|
import { equals } from 'ramda';
|
|
3
|
+
import { CSSInterpolation } from 'tss-react';
|
|
6
4
|
|
|
7
5
|
import {
|
|
8
6
|
ButtonProps,
|
|
9
|
-
createTheme,
|
|
10
7
|
InputBaseProps,
|
|
8
|
+
ThemeProvider as MuiThemeProvider,
|
|
11
9
|
StyledEngineProvider,
|
|
12
10
|
Theme,
|
|
13
|
-
|
|
11
|
+
createTheme
|
|
14
12
|
} from '@mui/material';
|
|
15
|
-
import CssBaseline from '@mui/material/CssBaseline';
|
|
16
13
|
import { autocompleteClasses } from '@mui/material/Autocomplete';
|
|
14
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
17
15
|
import { ThemeOptions } from '@mui/material/styles/createTheme';
|
|
18
16
|
|
|
19
17
|
import { ThemeMode, userAtom } from '@centreon/ui-context';
|
|
20
18
|
|
|
21
|
-
import RobotoMediumWoff2 from '../fonts/roboto-medium-webfont.woff2';
|
|
22
19
|
import RobotoBoldWoff2 from '../fonts/roboto-bold-webfont.woff2';
|
|
23
20
|
import RobotoLightWoff2 from '../fonts/roboto-light-webfont.woff2';
|
|
21
|
+
import RobotoMediumWoff2 from '../fonts/roboto-medium-webfont.woff2';
|
|
24
22
|
import RobotoRegularWoff2 from '../fonts/roboto-regular-webfont.woff2';
|
|
25
23
|
|
|
24
|
+
import { ReactNode, useMemo } from 'react';
|
|
26
25
|
import { getPalette } from './palettes';
|
|
27
26
|
|
|
28
27
|
declare module '@mui/styles/defaultTheme' {
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
30
28
|
interface DefaultTheme extends Theme {}
|
|
31
29
|
}
|
|
32
30
|
|
|
@@ -294,13 +292,13 @@ export const getTheme = (mode: ThemeMode): ThemeOptions => ({
|
|
|
294
292
|
});
|
|
295
293
|
|
|
296
294
|
interface Props {
|
|
297
|
-
children:
|
|
295
|
+
children: ReactNode;
|
|
298
296
|
}
|
|
299
297
|
|
|
300
298
|
const ThemeProvider = ({ children }: Props): JSX.Element => {
|
|
301
299
|
const { themeMode } = useAtomValue(userAtom);
|
|
302
300
|
|
|
303
|
-
const theme =
|
|
301
|
+
const theme = useMemo(
|
|
304
302
|
() => createTheme(getTheme(themeMode || ThemeMode.light)),
|
|
305
303
|
[themeMode]
|
|
306
304
|
);
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import { equals } from 'ramda';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { PaletteOptions, alpha } from '@mui/material';
|
|
4
4
|
|
|
5
5
|
import { ThemeMode } from '@centreon/ui-context';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
colorBlue50,
|
|
8
|
+
colorBlue400,
|
|
9
|
+
colorBlue600,
|
|
10
|
+
colorBlue900,
|
|
11
|
+
colorGrey50,
|
|
12
|
+
colorGrey100,
|
|
13
|
+
colorGrey200,
|
|
14
|
+
colorGrey300,
|
|
15
|
+
colorGrey400,
|
|
16
|
+
colorGrey500,
|
|
17
|
+
colorGrey600,
|
|
18
|
+
colorGrey700,
|
|
19
|
+
colorGrey800,
|
|
20
|
+
colorGrey900,
|
|
21
|
+
colorGrey950
|
|
22
|
+
} from '../base/tokens/themes/base.tokens';
|
|
8
23
|
|
|
9
24
|
declare module '@mui/material/styles/createPalette' {
|
|
10
25
|
interface TypeAction {
|
|
@@ -170,7 +185,7 @@ export const lightPalette: PaletteOptions = {
|
|
|
170
185
|
color: {
|
|
171
186
|
error: '#FF6666',
|
|
172
187
|
info: '#1588D1',
|
|
173
|
-
neutral:
|
|
188
|
+
neutral: colorGrey300,
|
|
174
189
|
success: '#88B922',
|
|
175
190
|
warning: '#FD9B27'
|
|
176
191
|
}
|
|
@@ -214,29 +229,29 @@ export const lightPalette: PaletteOptions = {
|
|
|
214
229
|
background: '#FFFFFF',
|
|
215
230
|
button: {
|
|
216
231
|
background: {
|
|
217
|
-
active:
|
|
232
|
+
active: colorBlue50,
|
|
218
233
|
default: 'transparent',
|
|
219
|
-
hover:
|
|
234
|
+
hover: colorGrey100
|
|
220
235
|
},
|
|
221
236
|
color: {
|
|
222
|
-
active:
|
|
223
|
-
default:
|
|
224
|
-
hover:
|
|
237
|
+
active: colorBlue400,
|
|
238
|
+
default: colorGrey400,
|
|
239
|
+
hover: colorGrey500
|
|
225
240
|
}
|
|
226
241
|
},
|
|
227
242
|
divider: {
|
|
228
|
-
border:
|
|
243
|
+
border: colorGrey200
|
|
229
244
|
},
|
|
230
245
|
item: {
|
|
231
246
|
background: {
|
|
232
|
-
active:
|
|
247
|
+
active: colorBlue50,
|
|
233
248
|
default: 'transparent',
|
|
234
|
-
hover:
|
|
249
|
+
hover: colorGrey100
|
|
235
250
|
},
|
|
236
251
|
color: {
|
|
237
|
-
active:
|
|
238
|
-
default:
|
|
239
|
-
hover:
|
|
252
|
+
active: colorBlue400,
|
|
253
|
+
default: colorGrey900,
|
|
254
|
+
hover: colorGrey950
|
|
240
255
|
}
|
|
241
256
|
}
|
|
242
257
|
},
|
|
@@ -310,7 +325,7 @@ export const darkPalette: PaletteOptions = {
|
|
|
310
325
|
color: {
|
|
311
326
|
error: '#D60101',
|
|
312
327
|
info: '#1CA9F4',
|
|
313
|
-
neutral:
|
|
328
|
+
neutral: colorGrey700,
|
|
314
329
|
success: '#5F8118',
|
|
315
330
|
warning: '#C55400'
|
|
316
331
|
}
|
|
@@ -351,31 +366,31 @@ export const darkPalette: PaletteOptions = {
|
|
|
351
366
|
}
|
|
352
367
|
},
|
|
353
368
|
menu: {
|
|
354
|
-
background:
|
|
369
|
+
background: colorGrey950,
|
|
355
370
|
button: {
|
|
356
371
|
background: {
|
|
357
|
-
active:
|
|
372
|
+
active: colorBlue900,
|
|
358
373
|
default: 'transparent',
|
|
359
|
-
hover:
|
|
374
|
+
hover: colorGrey900
|
|
360
375
|
},
|
|
361
376
|
color: {
|
|
362
|
-
active:
|
|
363
|
-
default:
|
|
364
|
-
hover:
|
|
377
|
+
active: colorBlue600,
|
|
378
|
+
default: colorGrey600,
|
|
379
|
+
hover: colorGrey500
|
|
365
380
|
}
|
|
366
381
|
},
|
|
367
382
|
divider: {
|
|
368
|
-
border:
|
|
383
|
+
border: colorGrey800
|
|
369
384
|
},
|
|
370
385
|
item: {
|
|
371
386
|
background: {
|
|
372
|
-
active:
|
|
387
|
+
active: colorBlue900,
|
|
373
388
|
default: 'transparent',
|
|
374
|
-
hover:
|
|
389
|
+
hover: colorGrey900
|
|
375
390
|
},
|
|
376
391
|
color: {
|
|
377
|
-
active:
|
|
378
|
-
default:
|
|
392
|
+
active: colorBlue400,
|
|
393
|
+
default: colorGrey50,
|
|
379
394
|
hover: '#fff'
|
|
380
395
|
}
|
|
381
396
|
}
|
|
@@ -12,8 +12,8 @@ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
|
12
12
|
|
|
13
13
|
import { userAtom } from '@centreon/ui-context';
|
|
14
14
|
|
|
15
|
-
import { isInvalidDate } from '../../helpers';
|
|
16
15
|
import DateTimePickerInput from '../../DateTimePickerInput';
|
|
16
|
+
import { isInvalidDate } from '../../helpers';
|
|
17
17
|
import {
|
|
18
18
|
CustomTimePeriodProperty,
|
|
19
19
|
DateTimePickerInputModel
|
|
@@ -2,6 +2,7 @@ import { makeStyles } from 'tss-react/mui';
|
|
|
2
2
|
|
|
3
3
|
import { Popover } from '@mui/material';
|
|
4
4
|
|
|
5
|
+
import PickersStartEndDate from './PickersStartEndDate';
|
|
5
6
|
import {
|
|
6
7
|
PickersData,
|
|
7
8
|
PopoverData,
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
defaultTransformOrigin
|
|
10
11
|
} from './models';
|
|
11
12
|
import usePickersStartEndDate from './usePickersStartEndDate';
|
|
12
|
-
import PickersStartEndDate from './PickersStartEndDate';
|
|
13
13
|
|
|
14
14
|
const useStyles = makeStyles()((theme) => ({
|
|
15
15
|
paper: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAtomValue, useSetAtom } from 'jotai';
|
|
2
2
|
import { T, always, cond, equals, lte, map, pick } from 'ramda';
|
|
3
|
-
import { makeStyles } from 'tss-react/mui';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { makeStyles } from 'tss-react/mui';
|
|
5
5
|
|
|
6
6
|
import { Button, ButtonGroup, Tooltip, useTheme } from '@mui/material';
|
|
7
7
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { renderHook } from '@testing-library/react';
|
|
1
2
|
import dayjs from 'dayjs';
|
|
2
3
|
import localizedFormatPlugin from 'dayjs/plugin/localizedFormat';
|
|
3
4
|
import timezonePlugin from 'dayjs/plugin/timezone';
|
|
4
5
|
import utcPlugin from 'dayjs/plugin/utc';
|
|
5
6
|
import { Provider, createStore } from 'jotai';
|
|
6
7
|
import { equals } from 'ramda';
|
|
7
|
-
import { renderHook } from '@testing-library/react';
|
|
8
8
|
|
|
9
9
|
import { useLocaleDateTimeFormat } from '@centreon/ui';
|
|
10
10
|
import { ListingVariant, userAtom } from '@centreon/ui-context';
|
|
11
11
|
|
|
12
|
-
import { CustomTimePeriodProperty } from './models';
|
|
13
12
|
import DateTimePickerInput from './DateTimePickerInput';
|
|
13
|
+
import { CustomTimePeriodProperty } from './models';
|
|
14
14
|
|
|
15
15
|
dayjs.extend(timezonePlugin);
|
|
16
16
|
dayjs.extend(utcPlugin);
|
|
@@ -339,7 +339,7 @@ testData.forEach((item) =>
|
|
|
339
339
|
cy.get('@listWeeks').children('button').as('days');
|
|
340
340
|
|
|
341
341
|
cy.get('@days')
|
|
342
|
-
.each((
|
|
342
|
+
.each((day) => daysInCurrentMonth.push(day.text()))
|
|
343
343
|
.as('currentDays');
|
|
344
344
|
|
|
345
345
|
cy.get('@currentDays').then(() => {
|
|
@@ -14,8 +14,8 @@ import { Paper, Theme, useMediaQuery } from '@mui/material';
|
|
|
14
14
|
import CustomTimePeriod from './CustomTimePeriod';
|
|
15
15
|
import SelectedTimePeriod from './SelectedTimePeriod';
|
|
16
16
|
import { useStyles } from './TimePeriods.styles';
|
|
17
|
-
import useTimePeriod from './useTimePeriod';
|
|
18
17
|
import { WrapperTimePeriodProps } from './models';
|
|
18
|
+
import useTimePeriod from './useTimePeriod';
|
|
19
19
|
|
|
20
20
|
dayjs.extend(isSameOrAfter);
|
|
21
21
|
dayjs.extend(utcPlugin);
|
|
@@ -3,8 +3,8 @@ import dayjs from 'dayjs';
|
|
|
3
3
|
|
|
4
4
|
import Switch from '@mui/material/Switch';
|
|
5
5
|
|
|
6
|
-
import { dateFormat } from './models';
|
|
7
6
|
import SimpleCustomTimePeriod from './CustomTimePeriod/SimpleCustomTimePeriod';
|
|
7
|
+
import { dateFormat } from './models';
|
|
8
8
|
|
|
9
9
|
import TimePeriod from '.';
|
|
10
10
|
|
|
@@ -11,8 +11,8 @@ import utcPlugin from 'dayjs/plugin/utc';
|
|
|
11
11
|
import { ParentSize } from '..';
|
|
12
12
|
import LoadingSkeleton from '../LoadingSkeleton';
|
|
13
13
|
|
|
14
|
-
import { WrapperTimePeriodProps } from './models';
|
|
15
14
|
import TimePeriods from './TimePeriods';
|
|
15
|
+
import { WrapperTimePeriodProps } from './models';
|
|
16
16
|
|
|
17
17
|
dayjs.extend(isSameOrAfter);
|
|
18
18
|
dayjs.extend(utcPlugin);
|
|
@@ -3,12 +3,12 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
labelLastDay,
|
|
7
6
|
label1Day,
|
|
8
7
|
label7Days,
|
|
9
8
|
label31Days,
|
|
10
9
|
labelLast7Days,
|
|
11
|
-
labelLast31Days
|
|
10
|
+
labelLast31Days,
|
|
11
|
+
labelLastDay
|
|
12
12
|
} from './translatedLabels';
|
|
13
13
|
|
|
14
14
|
export const dateFormat = 'L';
|
|
@@ -2,14 +2,14 @@ import { useEffect } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { useAtomValue, useSetAtom } from 'jotai';
|
|
4
4
|
|
|
5
|
+
import { WrapperTimePeriodProps } from './models';
|
|
5
6
|
import {
|
|
7
|
+
adjustTimePeriodDerivedAtom,
|
|
6
8
|
customTimePeriodAtom,
|
|
7
|
-
getDatesDerivedAtom,
|
|
8
|
-
selectedTimePeriodAtom,
|
|
9
9
|
errorTimePeriodAtom,
|
|
10
|
-
|
|
10
|
+
getDatesDerivedAtom,
|
|
11
|
+
selectedTimePeriodAtom
|
|
11
12
|
} from './timePeriodsAtoms';
|
|
12
|
-
import { WrapperTimePeriodProps } from './models';
|
|
13
13
|
|
|
14
14
|
const useTimePeriod = ({
|
|
15
15
|
getParameters,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import { equals } from 'ramda';
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
5
2
|
import { Link } from 'react-router-dom';
|
|
3
|
+
import { makeStyles } from 'tss-react/mui';
|
|
6
4
|
|
|
7
5
|
import { List, ListItem } from '@mui/material';
|
|
8
6
|
|
|
@@ -80,7 +78,6 @@ const SubMenu = ({ items, onClose }: SubMenuProps): JSX.Element => {
|
|
|
80
78
|
disableGutters
|
|
81
79
|
className={classes.submenuItem}
|
|
82
80
|
key={to}
|
|
83
|
-
role="none"
|
|
84
81
|
onClick={onClose}
|
|
85
82
|
>
|
|
86
83
|
<Link
|
|
@@ -3,7 +3,7 @@ import { makeStyles } from 'tss-react/mui';
|
|
|
3
3
|
|
|
4
4
|
import { Badge, Tooltip } from '@mui/material';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { SeverityCode, getStatusColors } from '@centreon/ui';
|
|
7
7
|
|
|
8
8
|
export interface StyleProps {
|
|
9
9
|
severityCode?: SeverityCode | null;
|
|
@@ -55,7 +55,7 @@ const StatusCounter = ({
|
|
|
55
55
|
classes={{
|
|
56
56
|
badge: cx(classes.badge, className)
|
|
57
57
|
}}
|
|
58
|
-
max={
|
|
58
|
+
max={Number.POSITIVE_INFINITY}
|
|
59
59
|
overlap="circular"
|
|
60
60
|
/>
|
|
61
61
|
</Tooltip>
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { Typography, TypographyProps } from '@mui/material';
|
|
2
|
-
|
|
3
|
-
type CustomTypographyProps = Pick<TypographyProps, 'variant' | 'sx'>;
|
|
4
|
-
export interface FluidTypographyProps extends CustomTypographyProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
containerClassName?: string;
|
|
7
|
-
max?: string;
|
|
8
|
-
min?: string;
|
|
9
|
-
pref?: number;
|
|
10
|
-
text: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const FluidTypography = ({
|
|
14
|
-
text,
|
|
15
|
-
variant = 'body1',
|
|
16
|
-
className,
|
|
17
|
-
containerClassName,
|
|
18
|
-
min = '10px',
|
|
19
|
-
max = '1000px',
|
|
20
|
-
pref = 19,
|
|
21
|
-
sx
|
|
22
|
-
}: FluidTypographyProps): JSX.Element => {
|
|
23
|
-
return (
|
|
24
|
-
<div
|
|
25
|
-
className={containerClassName}
|
|
26
|
-
style={{
|
|
27
|
-
containerType: 'inline-size',
|
|
28
|
-
height:
|
|
29
|
-
width:
|
|
30
|
-
}}
|
|
31
|
-
>
|
|
32
|
-
<Typography
|
|
33
|
-
className={className}
|
|
34
|
-
sx={{
|
|
35
|
-
fontSize: `clamp(${min}, ${pref}cqi, ${max})`,
|
|
36
|
-
...sx
|
|
37
|
-
}}
|
|
38
|
-
variant={variant}
|
|
39
|
-
>
|
|
40
|
-
{text}
|
|
41
|
-
</Typography>
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default FluidTypography;
|
|
1
|
+
import { Typography, TypographyProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
type CustomTypographyProps = Pick<TypographyProps, 'variant' | 'sx'>;
|
|
4
|
+
export interface FluidTypographyProps extends CustomTypographyProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
containerClassName?: string;
|
|
7
|
+
max?: string;
|
|
8
|
+
min?: string;
|
|
9
|
+
pref?: number;
|
|
10
|
+
text: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const FluidTypography = ({
|
|
14
|
+
text,
|
|
15
|
+
variant = 'body1',
|
|
16
|
+
className,
|
|
17
|
+
containerClassName,
|
|
18
|
+
min = '10px',
|
|
19
|
+
max = '1000px',
|
|
20
|
+
pref = 19,
|
|
21
|
+
sx
|
|
22
|
+
}: FluidTypographyProps): JSX.Element => {
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
className={containerClassName}
|
|
26
|
+
style={{
|
|
27
|
+
containerType: 'inline-size',
|
|
28
|
+
height: '100%',
|
|
29
|
+
width: '100%'
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<Typography
|
|
33
|
+
className={className}
|
|
34
|
+
sx={{
|
|
35
|
+
fontSize: `clamp(${min}, ${pref}cqi, ${max})`,
|
|
36
|
+
...sx
|
|
37
|
+
}}
|
|
38
|
+
variant={variant}
|
|
39
|
+
>
|
|
40
|
+
{text}
|
|
41
|
+
</Typography>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default FluidTypography;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { equals, type } from 'ramda';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
6
|
-
import { Typography } from '@mui/material';
|
|
7
6
|
import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
|
|
7
|
+
import { Typography } from '@mui/material';
|
|
8
8
|
|
|
9
9
|
import { Tooltip } from '../components';
|
|
10
10
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { makeStyles } from 'tss-react/mui';
|
|
2
1
|
import { toPairs } from 'ramda';
|
|
2
|
+
import { makeStyles } from 'tss-react/mui';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
useTheme,
|
|
6
|
-
Typography,
|
|
7
5
|
Box,
|
|
8
|
-
Stack,
|
|
9
|
-
CardContent,
|
|
10
6
|
Card,
|
|
11
|
-
|
|
7
|
+
CardContent,
|
|
8
|
+
CardHeader,
|
|
9
|
+
Stack,
|
|
10
|
+
Typography,
|
|
11
|
+
useTheme
|
|
12
12
|
} from '@mui/material';
|
|
13
13
|
|
|
14
14
|
const useStyles = makeStyles()((theme) => ({
|
package/src/Wizard/StepIcon.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { makeStyles } from 'tss-react/mui';
|
|
2
2
|
|
|
3
|
+
import Check from '@mui/icons-material/Check';
|
|
3
4
|
import { StepIconProps } from '@mui/material';
|
|
4
5
|
import Avatar from '@mui/material/Avatar';
|
|
5
|
-
import Check from '@mui/icons-material/Check';
|
|
6
6
|
|
|
7
7
|
const useStepIconStyles = makeStyles()((theme) => ({
|
|
8
8
|
avatar: {
|
package/src/Wizard/Stepper.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { gte, length } from 'ramda';
|
|
2
2
|
import { makeStyles } from 'tss-react/mui';
|
|
3
3
|
|
|
4
4
|
import { Stepper as MUIStepper, Step, StepLabel } from '@mui/material';
|
|
5
5
|
|
|
6
|
-
import { Step as StepType } from './models';
|
|
7
6
|
import StepIcon from './StepIcon';
|
|
7
|
+
import { Step as StepType } from './models';
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
currentStep: number;
|
|
@@ -4,8 +4,8 @@ import { useFormikContext } from 'formik';
|
|
|
4
4
|
import { equals } from 'ramda';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
|
|
7
|
-
import { WizardContentProps } from './models';
|
|
8
7
|
import ActionsBar from './ActionsBar';
|
|
8
|
+
import { WizardContentProps } from './models';
|
|
9
9
|
|
|
10
10
|
const useStyles = makeStyles()(() => ({
|
|
11
11
|
content: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { FormikErrors, FormikValues, useFormikContext } from 'formik';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { TextField, Typography } from '@mui/material';
|
|
6
6
|
|
|
7
7
|
import { StepComponentProps } from './models';
|
|
8
8
|
|
|
@@ -3,11 +3,11 @@ import { useEffect } from 'react';
|
|
|
3
3
|
import * as Yup from 'yup';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
RenderResult,
|
|
7
7
|
fireEvent,
|
|
8
|
-
|
|
8
|
+
render,
|
|
9
9
|
screen,
|
|
10
|
-
|
|
10
|
+
waitFor
|
|
11
11
|
} from '../../test/testRenderer';
|
|
12
12
|
|
|
13
13
|
import { StepComponentProps } from './models';
|
package/src/Wizard/index.tsx
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { equals, length, dec, pipe, inc, filter, isEmpty, not } from 'ramda';
|
|
4
3
|
import { Formik } from 'formik';
|
|
4
|
+
import { dec, equals, filter, inc, isEmpty, length, not, pipe } from 'ramda';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
|
|
7
7
|
import { Dialog, DialogContent } from '@mui/material';
|
|
8
8
|
|
|
9
9
|
import Confirm from '../Dialog/Confirm';
|
|
10
10
|
|
|
11
|
-
import { WizardProps } from './models';
|
|
12
11
|
import Stepper from './Stepper';
|
|
13
12
|
import WizardContent from './WizardContent';
|
|
13
|
+
import { WizardProps } from './models';
|
|
14
14
|
|
|
15
15
|
const useStyles = makeStyles()(() => ({
|
|
16
16
|
dialogContent: {
|
package/src/Wizard/models.ts
CHANGED