@centreon/ui 24.8.6 → 24.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +36 -30
- 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,5 +1,7 @@
|
|
|
1
1
|
import { useAtomValue } from 'jotai';
|
|
2
2
|
import {
|
|
3
|
+
path,
|
|
4
|
+
T,
|
|
3
5
|
always,
|
|
4
6
|
cond,
|
|
5
7
|
equals,
|
|
@@ -7,20 +9,18 @@ import {
|
|
|
7
9
|
gt,
|
|
8
10
|
has,
|
|
9
11
|
isNil,
|
|
10
|
-
path,
|
|
11
12
|
prop,
|
|
12
13
|
reverse,
|
|
13
|
-
sortBy
|
|
14
|
-
T
|
|
14
|
+
sortBy
|
|
15
15
|
} from 'ramda';
|
|
16
16
|
|
|
17
17
|
import { Box, Typography } from '@mui/material';
|
|
18
18
|
|
|
19
|
-
import { TimeValue } from '../../common/timeSeries/models';
|
|
20
19
|
import { useLocaleDateTimeFormat } from '../../../utils';
|
|
20
|
+
import { Tooltip } from '../../Chart/models';
|
|
21
21
|
import { formatMetricValueWithUnit } from '../../common/timeSeries';
|
|
22
|
+
import { TimeValue } from '../../common/timeSeries/models';
|
|
22
23
|
import { tooltipDataAtom } from '../atoms';
|
|
23
|
-
import { Tooltip } from '../../Chart/models';
|
|
24
24
|
|
|
25
25
|
import { useBarChartTooltipStyles } from './useBarChartTooltipStyles';
|
|
26
26
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCallback, useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { BarStack, BarStackHorizontal } from '@visx/shape';
|
|
4
|
-
import { equals, keys, omit } from 'ramda';
|
|
5
3
|
import { scaleOrdinal } from '@visx/scale';
|
|
4
|
+
import { BarStack, BarStackHorizontal } from '@visx/shape';
|
|
6
5
|
import { useSetAtom } from 'jotai';
|
|
6
|
+
import { equals, keys, omit } from 'ramda';
|
|
7
7
|
|
|
8
8
|
import { useDeepMemo } from '../../utils';
|
|
9
9
|
import { Line, TimeValue } from '../common/timeSeries/models';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import { BarStack as BarStackVertical, BarStackHorizontal } from '@visx/shape';
|
|
4
3
|
import { Group } from '@visx/group';
|
|
5
|
-
import
|
|
4
|
+
import { BarStackHorizontal, BarStack as BarStackVertical } from '@visx/shape';
|
|
6
5
|
import { Text } from '@visx/text';
|
|
7
|
-
import
|
|
6
|
+
import numeral from 'numeral';
|
|
8
7
|
import { equals, lt } from 'ramda';
|
|
8
|
+
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
10
10
|
import { Tooltip } from '../../components';
|
|
11
|
-
import { LegendProps } from '../Legend/models';
|
|
12
11
|
import { Legend as LegendComponent } from '../Legend';
|
|
12
|
+
import { LegendProps } from '../Legend/models';
|
|
13
13
|
import { getValueByUnit } from '../common/utils';
|
|
14
14
|
|
|
15
|
-
import { BarStackProps } from './models';
|
|
16
15
|
import { useBarStackStyles } from './BarStack.styles';
|
|
16
|
+
import { BarStackProps } from './models';
|
|
17
17
|
import useResponsiveBarStack from './useResponsiveBarStack';
|
|
18
18
|
|
|
19
19
|
const DefaultLengd = ({ scale, direction }: LegendProps): JSX.Element => (
|
|
@@ -152,7 +152,11 @@ const ResponsiveBarStack = ({
|
|
|
152
152
|
isVerticalBar ? 'right-start' : 'bottom-start'
|
|
153
153
|
}
|
|
154
154
|
>
|
|
155
|
-
<g
|
|
155
|
+
<g
|
|
156
|
+
data-testid={bar.key}
|
|
157
|
+
onClick={onClick}
|
|
158
|
+
onKeyUp={() => undefined}
|
|
159
|
+
>
|
|
156
160
|
<rect
|
|
157
161
|
cursor="pointer"
|
|
158
162
|
fill={bar.color}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { scaleBand, scaleLinear, scaleOrdinal } from '@visx/scale';
|
|
2
2
|
import { equals, gt, pluck } from 'ramda';
|
|
3
3
|
|
|
4
|
-
import { getValueByUnit } from '../common/utils';
|
|
5
4
|
import { LegendScale } from '../Legend/models';
|
|
5
|
+
import { getValueByUnit } from '../common/utils';
|
|
6
6
|
|
|
7
7
|
import { BarType } from './models';
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ interface Size {
|
|
|
11
11
|
width: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
interface
|
|
14
|
+
interface UseBarStackProps {
|
|
15
15
|
data: Array<BarType>;
|
|
16
16
|
height: number;
|
|
17
17
|
legendRef;
|
|
@@ -21,7 +21,7 @@ interface useBarStackProps {
|
|
|
21
21
|
variant?: 'vertical' | 'horizontal';
|
|
22
22
|
width: number;
|
|
23
23
|
}
|
|
24
|
-
interface
|
|
24
|
+
interface UseBarStackState {
|
|
25
25
|
barSize: Size;
|
|
26
26
|
colorScale;
|
|
27
27
|
input;
|
|
@@ -43,7 +43,7 @@ const useResponsiveBarStack = ({
|
|
|
43
43
|
titleRef,
|
|
44
44
|
legendRef,
|
|
45
45
|
size
|
|
46
|
-
}:
|
|
46
|
+
}: UseBarStackProps): UseBarStackState => {
|
|
47
47
|
const isVerticalBar = equals(variant, 'vertical');
|
|
48
48
|
|
|
49
49
|
const heightOfTitle = titleRef.current?.offsetHeight || 0;
|
|
@@ -6,8 +6,8 @@ import { equals, isNil, pick, prop } from 'ramda';
|
|
|
6
6
|
|
|
7
7
|
import { getTime } from '../../../../common/timeSeries';
|
|
8
8
|
import { TimeValue } from '../../../../common/timeSeries/models';
|
|
9
|
-
import { getCurveFactory, getFillColor } from '../../../common';
|
|
10
9
|
import { getStrokeDashArray } from '../../../../common/utils';
|
|
10
|
+
import { getCurveFactory, getFillColor } from '../../../common';
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
areaColor: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { difference } from 'ramda';
|
|
2
2
|
|
|
3
|
-
import { Line } from '../../../../common/timeSeries/models';
|
|
4
3
|
import { getSortedStackedLines } from '../../../../common/timeSeries';
|
|
4
|
+
import { Line } from '../../../../common/timeSeries/models';
|
|
5
5
|
|
|
6
6
|
interface RegularLines {
|
|
7
7
|
regularLines: Array<Line>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Shape } from '@visx/visx';
|
|
2
2
|
import { ScaleLinear, ScaleTime } from 'd3-scale';
|
|
3
|
-
import { all, equals, isNil, map, not, nth,
|
|
3
|
+
import { path, all, equals, isNil, map, not, nth, pipe, prop } from 'ramda';
|
|
4
4
|
|
|
5
|
+
import { getDates, getTime } from '../../../../common/timeSeries';
|
|
6
|
+
import { Line, TimeValue } from '../../../../common/timeSeries/models';
|
|
7
|
+
import { getPointRadius, getStrokeDashArray } from '../../../../common/utils';
|
|
5
8
|
import StackedAnchorPoint, {
|
|
6
9
|
getYAnchorPoint
|
|
7
10
|
} from '../../../InteractiveComponents/AnchorPoint/StackedAnchorPoint';
|
|
8
11
|
import { StackValue } from '../../../InteractiveComponents/AnchorPoint/models';
|
|
9
12
|
import { getCurveFactory, getFillColor } from '../../../common';
|
|
10
|
-
import { getDates, getTime } from '../../../../common/timeSeries';
|
|
11
|
-
import { Line, TimeValue } from '../../../../common/timeSeries/models';
|
|
12
13
|
import Point from '../Point';
|
|
13
|
-
import { getPointRadius, getStrokeDashArray } from '../../../../common/utils';
|
|
14
14
|
|
|
15
15
|
interface Props {
|
|
16
16
|
areaTransparency?: number;
|
|
@@ -3,9 +3,9 @@ import { ScaleLinear } from 'd3-scale';
|
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '@mui/material/styles';
|
|
5
5
|
|
|
6
|
+
import { LineChartData } from '../../../../common/models';
|
|
6
7
|
import { adjustGraphData } from '../../../helpers/index';
|
|
7
8
|
import { PatternOrientation } from '../../../models';
|
|
8
|
-
import { LineChartData } from '../../../../common/models';
|
|
9
9
|
|
|
10
10
|
import BasicThreshold from './BasicThreshold';
|
|
11
11
|
import useScaleThreshold from './useScaleThreshold';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { equals, isNil } from 'ramda';
|
|
2
2
|
|
|
3
|
+
import { TimeValue } from '../../../../common/timeSeries/models';
|
|
3
4
|
import { displayArea } from '../../../helpers/index';
|
|
4
5
|
import {
|
|
5
6
|
PatternThreshold,
|
|
6
7
|
ThresholdType,
|
|
7
8
|
VariationThreshold
|
|
8
9
|
} from '../../../models';
|
|
9
|
-
import { TimeValue } from '../../../../common/timeSeries/models';
|
|
10
10
|
|
|
11
11
|
import BasicThreshold from './BasicThreshold';
|
|
12
12
|
import Circle from './Circle';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ScaleLinear } from 'd3-scale';
|
|
2
2
|
import { equals, reject } from 'ramda';
|
|
3
3
|
|
|
4
|
-
import { GlobalAreaLines, ThresholdType } from '../../../models';
|
|
5
4
|
import { Line, TimeValue } from '../../../../common/timeSeries/models';
|
|
5
|
+
import { GlobalAreaLines, ThresholdType } from '../../../models';
|
|
6
6
|
|
|
7
7
|
export interface Data {
|
|
8
8
|
lineColor: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { equals, isNil, prop } from 'ramda';
|
|
2
2
|
|
|
3
|
-
import { ThresholdType, VariationThreshold } from '../../../models';
|
|
4
|
-
import { TimeValue } from '../../../../common/timeSeries/models';
|
|
5
3
|
import { getTime, getYScale } from '../../../../common/timeSeries';
|
|
4
|
+
import { TimeValue } from '../../../../common/timeSeries/models';
|
|
6
5
|
import { displayArea } from '../../../helpers/index';
|
|
6
|
+
import { ThresholdType, VariationThreshold } from '../../../models';
|
|
7
7
|
|
|
8
8
|
import { envelopeVariationFormula } from './helpers';
|
|
9
9
|
import {
|
|
@@ -3,6 +3,12 @@ import { MutableRefObject } from 'react';
|
|
|
3
3
|
import { ScaleLinear } from 'd3-scale';
|
|
4
4
|
import { isNil } from 'ramda';
|
|
5
5
|
|
|
6
|
+
import {
|
|
7
|
+
getDates,
|
|
8
|
+
getTimeSeriesForLines,
|
|
9
|
+
getYScale
|
|
10
|
+
} from '../../../common/timeSeries';
|
|
11
|
+
import { Line, TimeValue } from '../../../common/timeSeries/models';
|
|
6
12
|
import { getPointRadius } from '../../../common/utils';
|
|
7
13
|
import GuidingLines from '../../InteractiveComponents/AnchorPoint/GuidingLines';
|
|
8
14
|
import RegularAnchorPoint, {
|
|
@@ -10,13 +16,8 @@ import RegularAnchorPoint, {
|
|
|
10
16
|
} from '../../InteractiveComponents/AnchorPoint/RegularAnchorPoint';
|
|
11
17
|
import { displayArea } from '../../helpers/index';
|
|
12
18
|
import { DisplayAnchor, GlobalAreaLines } from '../../models';
|
|
13
|
-
import {
|
|
14
|
-
getDates,
|
|
15
|
-
getTimeSeriesForLines,
|
|
16
|
-
getYScale
|
|
17
|
-
} from '../../../common/timeSeries';
|
|
18
|
-
import { Line, TimeValue } from '../../../common/timeSeries/models';
|
|
19
19
|
|
|
20
|
+
import Point from './Point';
|
|
20
21
|
import RegularLine from './RegularLines';
|
|
21
22
|
import useRegularLines from './RegularLines/useRegularLines';
|
|
22
23
|
import StackedLines from './StackedLines';
|
|
@@ -26,7 +27,6 @@ import {
|
|
|
26
27
|
canDisplayThreshold,
|
|
27
28
|
requiredNumberLinesThreshold
|
|
28
29
|
} from './Threshold/models';
|
|
29
|
-
import Point from './Point';
|
|
30
30
|
|
|
31
31
|
interface Props extends GlobalAreaLines {
|
|
32
32
|
areaTransparency?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ScaleLinear } from 'd3-scale';
|
|
2
2
|
|
|
3
|
-
import { Line, TimeValue } from '../../../common/timeSeries/models';
|
|
4
3
|
import { LineChartData } from '../../../common/models';
|
|
4
|
+
import { Line, TimeValue } from '../../../common/timeSeries/models';
|
|
5
5
|
|
|
6
6
|
import { FactorsVariation } from './Threshold/models';
|
|
7
7
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Provider, createStore } from 'jotai';
|
|
4
4
|
|
|
5
5
|
import { userAtom } from '@centreon/ui-context';
|
|
6
6
|
|
|
7
7
|
import { LineChartData } from '../common/models';
|
|
8
|
+
import dataCurvesWithSameColor from '../mockedData/curvesWithSameColor.json';
|
|
8
9
|
import dataLastDay from '../mockedData/lastDay.json';
|
|
9
|
-
import dataLastDayWithNullValues from '../mockedData/lastDayWithNullValues.json';
|
|
10
10
|
import dataLastDayWithIncompleteValues from '../mockedData/lastDayWithIncompleteValues.json';
|
|
11
|
-
import
|
|
11
|
+
import dataLastDayWithNullValues from '../mockedData/lastDayWithNullValues.json';
|
|
12
12
|
import dataPingServiceLinesBars from '../mockedData/pingServiceLinesBars.json';
|
|
13
|
-
import dataPingServiceLinesBarsStacked from '../mockedData/pingServiceLinesBarsStacked.json';
|
|
14
13
|
import dataPingServiceLinesBarsMixed from '../mockedData/pingServiceLinesBarsMixed.json';
|
|
14
|
+
import dataPingServiceLinesBarsStacked from '../mockedData/pingServiceLinesBarsStacked.json';
|
|
15
15
|
|
|
16
16
|
import { args as argumentsData } from './helpers/doc';
|
|
17
17
|
import { LineChartProps } from './models';
|
|
@@ -12,21 +12,22 @@ import { useLocaleDateTimeFormat } from '@centreon/ui';
|
|
|
12
12
|
import TimePeriod from '../../TimePeriods';
|
|
13
13
|
import { LineChartData } from '../common/models';
|
|
14
14
|
import annotationData from '../mockedData/annotationData.json';
|
|
15
|
+
import dataCurvesSameColor from '../mockedData/curvesWithSameColor.json';
|
|
15
16
|
import exclusionPeriodFirstPeriod from '../mockedData/exclusionPeriodFirstPeriod.json';
|
|
16
17
|
import exclusionPeriodSecondPeriod from '../mockedData/exclusionPeriodSecondPeriod.json';
|
|
17
18
|
import exclusionPeriodThirdPeriod from '../mockedData/exclusionPeriodThirdPeriod.json';
|
|
19
|
+
import dataLastDay from '../mockedData/lastDay.json';
|
|
18
20
|
import dataLastDayForword from '../mockedData/lastDayForward.json';
|
|
19
21
|
import dataLastDayThreshold from '../mockedData/lastDayThreshold.json';
|
|
22
|
+
import dataLastDayWithLotOfUnits from '../mockedData/lastDayWithLotOfUnits.json';
|
|
20
23
|
import dataLastMonth from '../mockedData/lastMonth.json';
|
|
21
24
|
import dataLastWeek from '../mockedData/lastWeek.json';
|
|
22
|
-
import dataZoomPreview from '../mockedData/zoomPreview.json';
|
|
23
|
-
import dataLastDay from '../mockedData/lastDay.json';
|
|
24
|
-
import dataCurvesSameColor from '../mockedData/curvesWithSameColor.json';
|
|
25
|
-
import dataLastDayWithLotOfUnits from '../mockedData/lastDayWithLotOfUnits.json';
|
|
26
25
|
import dataPingServiceLinesBars from '../mockedData/pingServiceLinesBars.json';
|
|
27
|
-
import dataPingServiceLinesBarsStacked from '../mockedData/pingServiceLinesBarsStacked.json';
|
|
28
26
|
import dataPingServiceLinesBarsMixed from '../mockedData/pingServiceLinesBarsMixed.json';
|
|
27
|
+
import dataPingServiceLinesBarsStacked from '../mockedData/pingServiceLinesBarsStacked.json';
|
|
28
|
+
import dataZoomPreview from '../mockedData/zoomPreview.json';
|
|
29
29
|
|
|
30
|
+
import { dateTimeFormat } from './common';
|
|
30
31
|
import {
|
|
31
32
|
argTypes,
|
|
32
33
|
args as argumentsData,
|
|
@@ -37,7 +38,6 @@ import {
|
|
|
37
38
|
lastDayForwardDate,
|
|
38
39
|
zoomPreviewDate
|
|
39
40
|
} from './helpers/doc';
|
|
40
|
-
import { dateTimeFormat } from './common';
|
|
41
41
|
import { Interval, ThresholdType, TooltipData } from './models';
|
|
42
42
|
|
|
43
43
|
import WrapperChart from '.';
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { MutableRefObject, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { equals, flatten, isNil, pluck, reject } from 'ramda';
|
|
4
3
|
import { useAtom } from 'jotai';
|
|
4
|
+
import { equals, flatten, isNil, pluck, reject } from 'ramda';
|
|
5
5
|
|
|
6
6
|
import { ClickAwayListener, Skeleton } from '@mui/material';
|
|
7
7
|
|
|
8
|
+
import { useDeepCompare } from '../../utils';
|
|
9
|
+
import BarGroup from '../BarChart/BarGroup';
|
|
10
|
+
import BaseChart from '../common/BaseChart/BaseChart';
|
|
11
|
+
import ChartSvgWrapper from '../common/BaseChart/ChartSvgWrapper';
|
|
12
|
+
import { useComputeBaseChartDimensions } from '../common/BaseChart/useComputeBaseChartDimensions';
|
|
13
|
+
import Thresholds from '../common/Thresholds/Thresholds';
|
|
14
|
+
import { Thresholds as ThresholdsModel } from '../common/models';
|
|
8
15
|
import {
|
|
9
16
|
getUnits,
|
|
10
17
|
getXScale,
|
|
@@ -12,13 +19,6 @@ import {
|
|
|
12
19
|
getYScalePerUnit
|
|
13
20
|
} from '../common/timeSeries';
|
|
14
21
|
import { Line } from '../common/timeSeries/models';
|
|
15
|
-
import { Thresholds as ThresholdsModel } from '../common/models';
|
|
16
|
-
import BaseChart from '../common/BaseChart/BaseChart';
|
|
17
|
-
import { useComputeBaseChartDimensions } from '../common/BaseChart/useComputeBaseChartDimensions';
|
|
18
|
-
import ChartSvgWrapper from '../common/BaseChart/ChartSvgWrapper';
|
|
19
|
-
import Thresholds from '../common/Thresholds/Thresholds';
|
|
20
|
-
import { useDeepCompare } from '../../utils';
|
|
21
|
-
import BarGroup from '../BarChart/BarGroup';
|
|
22
22
|
|
|
23
23
|
import Lines from './BasicComponents/Lines';
|
|
24
24
|
import {
|
|
@@ -27,15 +27,15 @@ import {
|
|
|
27
27
|
lowerLineName,
|
|
28
28
|
upperLineName
|
|
29
29
|
} from './BasicComponents/Lines/Threshold/models';
|
|
30
|
+
import { useChartStyles } from './Chart.styles';
|
|
30
31
|
import InteractionWithGraph from './InteractiveComponents';
|
|
32
|
+
import GraphValueTooltip from './InteractiveComponents/GraphValueTooltip/GraphValueTooltip';
|
|
31
33
|
import GraphTooltip from './InteractiveComponents/Tooltip';
|
|
32
34
|
import useGraphTooltip from './InteractiveComponents/Tooltip/useGraphTooltip';
|
|
33
35
|
import { margin } from './common';
|
|
36
|
+
import { thresholdTooltipAtom } from './graphAtoms';
|
|
34
37
|
import { Data, GlobalAreaLines, GraphInterval, LineChartProps } from './models';
|
|
35
38
|
import { useIntersection } from './useChartIntersection';
|
|
36
|
-
import { useChartStyles } from './Chart.styles';
|
|
37
|
-
import GraphValueTooltip from './InteractiveComponents/GraphValueTooltip/GraphValueTooltip';
|
|
38
|
-
import { thresholdTooltipAtom } from './graphAtoms';
|
|
39
39
|
|
|
40
40
|
interface Props extends LineChartProps {
|
|
41
41
|
graphData: Data;
|
|
@@ -4,8 +4,8 @@ import { isNil, prop } from 'ramda';
|
|
|
4
4
|
import { bisectDate, getDates } from '../../../common/timeSeries';
|
|
5
5
|
import { TimeValue } from '../../../common/timeSeries/models';
|
|
6
6
|
|
|
7
|
-
import useTickGraph from './useTickGraph';
|
|
8
7
|
import { GetYAnchorPoint } from './models';
|
|
8
|
+
import useTickGraph from './useTickGraph';
|
|
9
9
|
|
|
10
10
|
import AnchorPoint from '.';
|
|
11
11
|
|
|
@@ -4,9 +4,9 @@ import { ScaleLinear } from 'd3-scale';
|
|
|
4
4
|
import { useAtomValue } from 'jotai';
|
|
5
5
|
|
|
6
6
|
import useAxisY from '../../../common/Axes/useAxisY';
|
|
7
|
-
import { margin } from '../../common';
|
|
8
7
|
import { getTimeValue } from '../../../common/timeSeries';
|
|
9
8
|
import { Line, TimeValue } from '../../../common/timeSeries/models';
|
|
9
|
+
import { margin } from '../../common';
|
|
10
10
|
import { mousePositionAtom } from '../interactionWithGraphAtoms';
|
|
11
11
|
|
|
12
12
|
interface AnchorPointResult {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Shape } from '@visx/visx';
|
|
2
2
|
import { ScaleTime } from 'd3-scale';
|
|
3
|
-
import { max, pick, prop } from 'ramda';
|
|
4
3
|
import { useAtom, useAtomValue } from 'jotai';
|
|
4
|
+
import { max, pick, prop } from 'ramda';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
|
|
7
7
|
import { useLocaleDateTimeFormat, useMemoComponent } from '@centreon/ui';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Shape } from '@visx/visx';
|
|
2
2
|
import { ScaleTime } from 'd3-scale';
|
|
3
|
-
import { pick } from 'ramda';
|
|
4
3
|
import { useAtomValue } from 'jotai';
|
|
4
|
+
import { pick } from 'ramda';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
|
|
7
7
|
import { useLocaleDateTimeFormat, useMemoComponent } from '@centreon/ui';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useTranslation } from 'react-i18next';
|
|
2
1
|
import { useSetAtom } from 'jotai';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { makeStyles } from 'tss-react/mui';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Paper, Tooltip, Typography } from '@mui/material';
|
|
6
6
|
|
|
7
7
|
import { truncate } from '../../../helpers';
|
|
8
8
|
import { labelBy } from '../../../translatedLabels';
|
|
9
|
-
import { TimelineEvent } from '../models';
|
|
10
9
|
import { annotationHoveredAtom } from '../annotationsAtoms';
|
|
10
|
+
import { TimelineEvent } from '../models';
|
|
11
11
|
|
|
12
12
|
const yMargin = -32;
|
|
13
13
|
const iconSize = 20;
|
|
@@ -2,10 +2,10 @@ import { useTranslation } from 'react-i18next';
|
|
|
2
2
|
|
|
3
3
|
import { useTheme } from '@mui/material';
|
|
4
4
|
|
|
5
|
+
import { DowntimeIcon } from '../../../../../Icon';
|
|
5
6
|
import { labelDowntime } from '../../../translatedLabels';
|
|
6
7
|
import EventAnnotations from '../EventAnnotations';
|
|
7
8
|
import { Args } from '../models';
|
|
8
|
-
import { DowntimeIcon } from '../../../../../Icon';
|
|
9
9
|
|
|
10
10
|
const DowntimeAnnotations = (props: Args): JSX.Element => {
|
|
11
11
|
const { t } = useTranslation();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { filter, propEq, isNil } from 'ramda';
|
|
2
1
|
import { ScaleTime } from 'd3-scale';
|
|
2
|
+
import { filter, isNil, propEq } from 'ramda';
|
|
3
3
|
|
|
4
|
-
import { TimelineEvent } from './models';
|
|
5
|
-
import LineAnnotation from './Annotation/Line';
|
|
6
4
|
import AreaAnnotation from './Annotation/Area';
|
|
5
|
+
import LineAnnotation from './Annotation/Line';
|
|
6
|
+
import { TimelineEvent } from './models';
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
9
9
|
Icon: (props) => JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next';
|
|
2
2
|
|
|
3
|
-
import { useTheme } from '@mui/material';
|
|
4
3
|
import IconComment from '@mui/icons-material/Comment';
|
|
4
|
+
import { useTheme } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
import { labelComment } from '../../../translatedLabels';
|
|
7
7
|
import EventAnnotations from '../EventAnnotations';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ScaleTime } from 'd3-scale';
|
|
2
2
|
import { atom } from 'jotai';
|
|
3
3
|
import {
|
|
4
|
+
Pred,
|
|
5
|
+
T,
|
|
6
|
+
__,
|
|
4
7
|
always,
|
|
5
8
|
both,
|
|
6
9
|
cond,
|
|
@@ -14,10 +17,7 @@ import {
|
|
|
14
17
|
lte,
|
|
15
18
|
not,
|
|
16
19
|
or,
|
|
17
|
-
pipe
|
|
18
|
-
Pred,
|
|
19
|
-
T,
|
|
20
|
-
__
|
|
20
|
+
pipe
|
|
21
21
|
} from 'ramda';
|
|
22
22
|
|
|
23
23
|
import { alpha } from '@mui/material';
|
|
@@ -3,8 +3,8 @@ import { equals } from 'ramda';
|
|
|
3
3
|
import { Typography } from '@mui/material';
|
|
4
4
|
|
|
5
5
|
import { Tooltip as MuiTooltip } from '../../../../components/Tooltip';
|
|
6
|
-
import { ThresholdTooltip, Tooltip } from '../../models';
|
|
7
6
|
import { useTooltipStyles } from '../../../common/useTooltipStyles';
|
|
7
|
+
import { ThresholdTooltip, Tooltip } from '../../models';
|
|
8
8
|
|
|
9
9
|
import GraphValueTooltipContent from './GraphValueTooltipContent';
|
|
10
10
|
|
package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/GraphValueTooltipContent.tsx
CHANGED
|
@@ -3,9 +3,9 @@ import { equals, isNil } from 'ramda';
|
|
|
3
3
|
|
|
4
4
|
import { Box, Typography } from '@mui/material';
|
|
5
5
|
|
|
6
|
-
import { mousePositionAtom } from '../interactionWithGraphAtoms';
|
|
7
6
|
import { formatMetricValueWithUnit } from '../../../common/timeSeries';
|
|
8
7
|
import { Tooltip } from '../../models';
|
|
8
|
+
import { mousePositionAtom } from '../interactionWithGraphAtoms';
|
|
9
9
|
|
|
10
10
|
import { useGraphValueTooltip } from './useGraphValueTooltip';
|
|
11
11
|
import { useGraphValueTooltipStyles } from './useGraphValueTooltipStyles';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useAtomValue } from 'jotai';
|
|
2
2
|
import {
|
|
3
|
+
T,
|
|
3
4
|
always,
|
|
4
5
|
cond,
|
|
5
6
|
equals,
|
|
@@ -7,13 +8,12 @@ import {
|
|
|
7
8
|
isNil,
|
|
8
9
|
prop,
|
|
9
10
|
reverse,
|
|
10
|
-
sortBy
|
|
11
|
-
T
|
|
11
|
+
sortBy
|
|
12
12
|
} from 'ramda';
|
|
13
13
|
|
|
14
|
-
import { graphTooltipDataAtom } from '../interactionWithGraphAtoms';
|
|
15
14
|
import { useLocaleDateTimeFormat } from '../../../../utils';
|
|
16
15
|
import { GraphTooltipData, Tooltip } from '../../models';
|
|
16
|
+
import { graphTooltipDataAtom } from '../interactionWithGraphAtoms';
|
|
17
17
|
|
|
18
18
|
interface UseGraphValueTooltipState extends Omit<GraphTooltipData, 'date'> {
|
|
19
19
|
dateTime: string;
|
|
@@ -5,8 +5,8 @@ import { equals, isNil, negate } from 'ramda';
|
|
|
5
5
|
import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos';
|
|
6
6
|
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
|
|
7
7
|
|
|
8
|
-
import { GraphInterval, Interval } from '../../models';
|
|
9
8
|
import { margin } from '../../common';
|
|
9
|
+
import { GraphInterval, Interval } from '../../models';
|
|
10
10
|
|
|
11
11
|
import TimeShiftIcon, { timeShiftIconSize } from './TimeShiftIcon';
|
|
12
12
|
import TimeShiftZone from './TimeShiftZone';
|
|
@@ -4,8 +4,8 @@ import { Event, Tooltip } from '@visx/visx';
|
|
|
4
4
|
import { ScaleLinear } from 'd3-scale';
|
|
5
5
|
import { useAtomValue } from 'jotai';
|
|
6
6
|
|
|
7
|
-
import { getDate } from '../../helpers/index';
|
|
8
7
|
import { TimeValue } from '../../../common/timeSeries/models';
|
|
8
|
+
import { getDate } from '../../helpers/index';
|
|
9
9
|
import { applyingZoomAtomAtom } from '../ZoomPreview/zoomPreviewAtoms';
|
|
10
10
|
import { eventMouseUpAtom } from '../interactionWithGraphAtoms';
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Event } from '@visx/visx';
|
|
4
|
-
import {
|
|
4
|
+
import { ScaleLinear, ScaleTime } from 'd3-scale';
|
|
5
5
|
import { useSetAtom } from 'jotai';
|
|
6
6
|
import {
|
|
7
7
|
all,
|
|
@@ -21,12 +21,6 @@ import {
|
|
|
21
21
|
} from 'ramda';
|
|
22
22
|
import { makeStyles } from 'tss-react/mui';
|
|
23
23
|
|
|
24
|
-
import {
|
|
25
|
-
AnnotationEvent,
|
|
26
|
-
GraphInterval,
|
|
27
|
-
InteractedZone,
|
|
28
|
-
InteractedZone as ZoomPreviewModel
|
|
29
|
-
} from '../models';
|
|
30
24
|
import {
|
|
31
25
|
formatMetricName,
|
|
32
26
|
getLineForMetric,
|
|
@@ -36,6 +30,12 @@ import {
|
|
|
36
30
|
} from '../../common/timeSeries';
|
|
37
31
|
import { Line, TimeValue } from '../../common/timeSeries/models';
|
|
38
32
|
import { margin } from '../common';
|
|
33
|
+
import {
|
|
34
|
+
AnnotationEvent,
|
|
35
|
+
GraphInterval,
|
|
36
|
+
InteractedZone,
|
|
37
|
+
InteractedZone as ZoomPreviewModel
|
|
38
|
+
} from '../models';
|
|
39
39
|
|
|
40
40
|
import Annotations from './Annotations';
|
|
41
41
|
import { TimelineEvent } from './Annotations/models';
|