@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,7 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatMetricValue,
|
|
3
|
+
formatMetricValueWithUnit,
|
|
4
|
+
getDates,
|
|
5
|
+
getInvertedStackedLines,
|
|
6
|
+
getLineData,
|
|
7
|
+
getLineForMetric,
|
|
8
|
+
getMetricValuesForLines,
|
|
9
|
+
getMetricValuesForUnit,
|
|
10
|
+
getMetrics,
|
|
11
|
+
getNotInvertedStackedLines,
|
|
12
|
+
getSortedStackedLines,
|
|
13
|
+
getStackedMetricValues,
|
|
14
|
+
getTimeSeries,
|
|
15
|
+
getTimeSeriesForLines,
|
|
16
|
+
getUnits,
|
|
17
|
+
hasUnitStackedLines
|
|
18
|
+
} from '.';
|
|
1
19
|
import { LineChartData } from '../models';
|
|
2
20
|
|
|
3
|
-
import * as timeSeries from '.';
|
|
4
|
-
|
|
5
21
|
type TestCase = [number | null, string, 1000 | 1024, string | null];
|
|
6
22
|
|
|
7
23
|
describe('timeSeries', () => {
|
|
@@ -114,7 +130,7 @@ describe('timeSeries', () => {
|
|
|
114
130
|
|
|
115
131
|
describe('getTimeSeries', () => {
|
|
116
132
|
it('returns the time series for the given graph data', () => {
|
|
117
|
-
expect(
|
|
133
|
+
expect(getTimeSeries(graphData)).toEqual([
|
|
118
134
|
{
|
|
119
135
|
1: 0,
|
|
120
136
|
2: 0.5,
|
|
@@ -142,7 +158,7 @@ describe('timeSeries', () => {
|
|
|
142
158
|
}
|
|
143
159
|
};
|
|
144
160
|
|
|
145
|
-
expect(
|
|
161
|
+
expect(getTimeSeries(graphDataWithLowerLimit)).toEqual([
|
|
146
162
|
{
|
|
147
163
|
2: 0.5,
|
|
148
164
|
3: 6,
|
|
@@ -163,7 +179,7 @@ describe('timeSeries', () => {
|
|
|
163
179
|
|
|
164
180
|
describe('getLineData', () => {
|
|
165
181
|
it('returns the line information for the given graph data', () => {
|
|
166
|
-
expect(
|
|
182
|
+
expect(getLineData(graphData)).toEqual([
|
|
167
183
|
{
|
|
168
184
|
areaColor: 'transparent',
|
|
169
185
|
average_value: 1,
|
|
@@ -266,7 +282,7 @@ describe('timeSeries', () => {
|
|
|
266
282
|
describe('getMetrics', () => {
|
|
267
283
|
it('returns the metrics for the given time value', () => {
|
|
268
284
|
expect(
|
|
269
|
-
|
|
285
|
+
getMetrics({
|
|
270
286
|
rta: 1,
|
|
271
287
|
time: 0,
|
|
272
288
|
timeTick: '2020-11-05T10:40:00Z'
|
|
@@ -277,29 +293,29 @@ describe('timeSeries', () => {
|
|
|
277
293
|
|
|
278
294
|
describe('getMetricValuesForUnit', () => {
|
|
279
295
|
it('returns the values in the given time series corresponding to the given line unit', () => {
|
|
280
|
-
const series =
|
|
281
|
-
const lines =
|
|
296
|
+
const series = getTimeSeries(graphData);
|
|
297
|
+
const lines = getLineData(graphData);
|
|
282
298
|
const unit = 'ms';
|
|
283
299
|
|
|
284
300
|
expect(
|
|
285
|
-
|
|
301
|
+
getMetricValuesForUnit({ lines, timeSeries: series, unit })
|
|
286
302
|
).toEqual([0, 1, 0.5, 3, 6, 4, 12, 25]);
|
|
287
303
|
});
|
|
288
304
|
});
|
|
289
305
|
|
|
290
306
|
describe('getUnits', () => {
|
|
291
307
|
it('returns the units for the given lines', () => {
|
|
292
|
-
const lines =
|
|
308
|
+
const lines = getLineData(graphData);
|
|
293
309
|
|
|
294
|
-
expect(
|
|
310
|
+
expect(getUnits(lines)).toEqual(['ms', '%']);
|
|
295
311
|
});
|
|
296
312
|
});
|
|
297
313
|
|
|
298
314
|
describe('getDates', () => {
|
|
299
315
|
it('teruns the dates for the given time series', () => {
|
|
300
|
-
const series =
|
|
316
|
+
const series = getTimeSeries(graphData);
|
|
301
317
|
|
|
302
|
-
expect(
|
|
318
|
+
expect(getDates(series)).toEqual([
|
|
303
319
|
new Date('2020-11-05T10:35:00.000Z'),
|
|
304
320
|
new Date('2020-11-05T10:40:00.000Z')
|
|
305
321
|
]);
|
|
@@ -308,9 +324,9 @@ describe('timeSeries', () => {
|
|
|
308
324
|
|
|
309
325
|
describe('getLineForMetric', () => {
|
|
310
326
|
it('returns the line corresponding to the given metrics', () => {
|
|
311
|
-
const lines =
|
|
327
|
+
const lines = getLineData(graphData);
|
|
312
328
|
|
|
313
|
-
expect(
|
|
329
|
+
expect(getLineForMetric({ lines, metric_id: 1 })).toEqual({
|
|
314
330
|
areaColor: 'transparent',
|
|
315
331
|
average_value: 1,
|
|
316
332
|
color: 'black',
|
|
@@ -334,16 +350,16 @@ describe('timeSeries', () => {
|
|
|
334
350
|
|
|
335
351
|
describe('getMetricValuesForLines', () => {
|
|
336
352
|
it('returns the metric values for the given lines within the given time series', () => {
|
|
337
|
-
const lines =
|
|
338
|
-
const series =
|
|
353
|
+
const lines = getLineData(graphData);
|
|
354
|
+
const series = getTimeSeries(graphData);
|
|
339
355
|
|
|
340
|
-
expect(
|
|
341
|
-
|
|
342
|
-
|
|
356
|
+
expect(getMetricValuesForLines({ lines, timeSeries: series })).toEqual([
|
|
357
|
+
0, 1, 0.5, 3, 6, 4, 12, 25, 0, 1
|
|
358
|
+
]);
|
|
343
359
|
});
|
|
344
360
|
});
|
|
345
361
|
|
|
346
|
-
describe(
|
|
362
|
+
describe(formatMetricValue, () => {
|
|
347
363
|
const cases: Array<TestCase> = [
|
|
348
364
|
[218857269, '', 1000, '218.86m'],
|
|
349
365
|
[218857269, '', 1024, '208.72 M'],
|
|
@@ -356,7 +372,7 @@ describe('timeSeries', () => {
|
|
|
356
372
|
it.each(cases)(
|
|
357
373
|
'formats the given value to a human readable form according to the given unit and base',
|
|
358
374
|
(value, unit, base, formattedResult) => {
|
|
359
|
-
expect(
|
|
375
|
+
expect(formatMetricValue({ base, unit, value })).toEqual(
|
|
360
376
|
formattedResult
|
|
361
377
|
);
|
|
362
378
|
}
|
|
@@ -365,9 +381,9 @@ describe('timeSeries', () => {
|
|
|
365
381
|
|
|
366
382
|
describe('getSortedStackedLines', () => {
|
|
367
383
|
it('returns stacked lines sorted by their own order for the given lines', () => {
|
|
368
|
-
const lines =
|
|
384
|
+
const lines = getLineData(graphData);
|
|
369
385
|
|
|
370
|
-
expect(
|
|
386
|
+
expect(getSortedStackedLines(lines)).toEqual([
|
|
371
387
|
{
|
|
372
388
|
areaColor: 'yellow',
|
|
373
389
|
average_value: 1,
|
|
@@ -412,12 +428,12 @@ describe('timeSeries', () => {
|
|
|
412
428
|
|
|
413
429
|
describe('getStackedMetricValues', () => {
|
|
414
430
|
it('returns stacked metrics values for the given lines and the given time series', () => {
|
|
415
|
-
const lines =
|
|
416
|
-
const series =
|
|
431
|
+
const lines = getLineData(graphData);
|
|
432
|
+
const series = getTimeSeries(graphData);
|
|
417
433
|
|
|
418
434
|
expect(
|
|
419
|
-
|
|
420
|
-
lines:
|
|
435
|
+
getStackedMetricValues({
|
|
436
|
+
lines: getSortedStackedLines(lines),
|
|
421
437
|
timeSeries: series
|
|
422
438
|
})
|
|
423
439
|
).toEqual([18, 29]);
|
|
@@ -426,12 +442,12 @@ describe('timeSeries', () => {
|
|
|
426
442
|
|
|
427
443
|
describe('getTimeSeriesForLines', () => {
|
|
428
444
|
it('returns the specific time series for the given lines and the fiven time series', () => {
|
|
429
|
-
const lines =
|
|
430
|
-
const series =
|
|
445
|
+
const lines = getLineData(graphData);
|
|
446
|
+
const series = getTimeSeries(graphData);
|
|
431
447
|
|
|
432
448
|
expect(
|
|
433
|
-
|
|
434
|
-
lines:
|
|
449
|
+
getTimeSeriesForLines({
|
|
450
|
+
lines: getSortedStackedLines(lines),
|
|
435
451
|
timeSeries: series
|
|
436
452
|
})
|
|
437
453
|
).toEqual([
|
|
@@ -451,9 +467,9 @@ describe('timeSeries', () => {
|
|
|
451
467
|
|
|
452
468
|
describe('getInvertedStackedLines', () => {
|
|
453
469
|
it('returns inverted and stacked lines for the given lines', () => {
|
|
454
|
-
const lines =
|
|
470
|
+
const lines = getLineData(graphData);
|
|
455
471
|
|
|
456
|
-
expect(
|
|
472
|
+
expect(getInvertedStackedLines(lines)).toEqual([
|
|
457
473
|
{
|
|
458
474
|
areaColor: 'yellow',
|
|
459
475
|
average_value: 1,
|
|
@@ -479,9 +495,9 @@ describe('timeSeries', () => {
|
|
|
479
495
|
|
|
480
496
|
describe('getNotInvertedStackedLines', () => {
|
|
481
497
|
it('returns not inverted and stacked lines for the given lines', () => {
|
|
482
|
-
const lines =
|
|
498
|
+
const lines = getLineData(graphData);
|
|
483
499
|
|
|
484
|
-
expect(
|
|
500
|
+
expect(getNotInvertedStackedLines(lines)).toEqual([
|
|
485
501
|
{
|
|
486
502
|
areaColor: 'red',
|
|
487
503
|
average_value: 1,
|
|
@@ -507,15 +523,11 @@ describe('timeSeries', () => {
|
|
|
507
523
|
|
|
508
524
|
describe('hasUnitStackedLines', () => {
|
|
509
525
|
it('returns true if the given unit contains stacked lines following the given lines, false otherwise', () => {
|
|
510
|
-
const lines =
|
|
526
|
+
const lines = getLineData(graphData);
|
|
511
527
|
|
|
512
|
-
expect(
|
|
513
|
-
true
|
|
514
|
-
);
|
|
528
|
+
expect(hasUnitStackedLines({ lines, unit: 'ms' })).toEqual(true);
|
|
515
529
|
|
|
516
|
-
expect(
|
|
517
|
-
false
|
|
518
|
-
);
|
|
530
|
+
expect(hasUnitStackedLines({ lines, unit: '%' })).toEqual(false);
|
|
519
531
|
});
|
|
520
532
|
});
|
|
521
533
|
});
|
|
@@ -598,7 +610,7 @@ describe('Format value with unit', () => {
|
|
|
598
610
|
'formats the value with $unit',
|
|
599
611
|
({ value, unit, expectedResult }) => {
|
|
600
612
|
expect(
|
|
601
|
-
|
|
613
|
+
formatMetricValueWithUnit({
|
|
602
614
|
unit,
|
|
603
615
|
value
|
|
604
616
|
})
|
|
@@ -612,7 +624,7 @@ describe('Format value with unit', () => {
|
|
|
612
624
|
'formats the value with $unit',
|
|
613
625
|
({ value, unit, expectedResult }) => {
|
|
614
626
|
expect(
|
|
615
|
-
|
|
627
|
+
formatMetricValueWithUnit({
|
|
616
628
|
isRaw: true,
|
|
617
629
|
unit,
|
|
618
630
|
value
|