@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,28 +1,27 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
|
-
|
|
2
|
+
F,
|
|
5
3
|
equals,
|
|
6
|
-
|
|
7
|
-
type,
|
|
8
|
-
last,
|
|
4
|
+
findIndex,
|
|
9
5
|
inc,
|
|
10
|
-
F,
|
|
11
|
-
length,
|
|
12
6
|
isEmpty,
|
|
13
7
|
isNil,
|
|
8
|
+
last,
|
|
9
|
+
length,
|
|
14
10
|
not,
|
|
15
|
-
|
|
11
|
+
pipe,
|
|
12
|
+
pluck,
|
|
16
13
|
propEq,
|
|
17
|
-
|
|
14
|
+
remove,
|
|
15
|
+
type
|
|
18
16
|
} from 'ramda';
|
|
19
17
|
|
|
20
18
|
import { Typography } from '@mui/material';
|
|
21
19
|
|
|
22
|
-
import { ConnectedAutoCompleteFieldProps } from '../Connected';
|
|
23
20
|
import { Props as SingleAutocompletefieldProps } from '..';
|
|
24
21
|
import TextField from '../../../Text';
|
|
22
|
+
import { ConnectedAutoCompleteFieldProps } from '../Connected';
|
|
25
23
|
|
|
24
|
+
import { ChangeEvent, useEffect, useState } from 'react';
|
|
26
25
|
import SortableList, { DraggableSelectEntry } from './SortableList';
|
|
27
26
|
|
|
28
27
|
export interface ItemActionProps {
|
|
@@ -61,13 +60,13 @@ const DraggableAutocomplete = (
|
|
|
61
60
|
| ConnectedAutoCompleteFieldProps<string>
|
|
62
61
|
| SingleAutocompletefieldProps
|
|
63
62
|
)): JSX.Element => {
|
|
64
|
-
const [selectedValues, setSelectedValues] =
|
|
63
|
+
const [selectedValues, setSelectedValues] = useState<
|
|
65
64
|
Array<DraggableSelectEntry>
|
|
66
65
|
>(initialValues || []);
|
|
67
|
-
const [totalValues, setTotalValues] =
|
|
66
|
+
const [totalValues, setTotalValues] = useState<number>(
|
|
68
67
|
length(initialValues || [])
|
|
69
68
|
);
|
|
70
|
-
const [inputText, setInputText] =
|
|
69
|
+
const [inputText, setInputText] = useState<string | null>(null);
|
|
71
70
|
|
|
72
71
|
const onChangeSelectedValuesOrder = (newSelectedValues): void => {
|
|
73
72
|
setSelectedValues(newSelectedValues);
|
|
@@ -144,7 +143,7 @@ const DraggableAutocomplete = (
|
|
|
144
143
|
);
|
|
145
144
|
};
|
|
146
145
|
|
|
147
|
-
const changeInput = (e:
|
|
146
|
+
const changeInput = (e: ChangeEvent<HTMLInputElement>): void => {
|
|
148
147
|
if (pipe(isNil, not)(e)) {
|
|
149
148
|
setInputText(e.target.value);
|
|
150
149
|
}
|
|
@@ -193,7 +192,7 @@ const DraggableAutocomplete = (
|
|
|
193
192
|
/>
|
|
194
193
|
);
|
|
195
194
|
|
|
196
|
-
|
|
195
|
+
useEffect(() => {
|
|
197
196
|
if (isNil(initialValues)) {
|
|
198
197
|
return;
|
|
199
198
|
}
|
|
@@ -3,8 +3,8 @@ import { useState } from 'react';
|
|
|
3
3
|
import { equals, isEmpty } from 'ramda';
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
5
5
|
|
|
6
|
-
import { UseAutocompleteProps } from '@mui/material/useAutocomplete';
|
|
7
6
|
import { Avatar, Chip, useTheme } from '@mui/material';
|
|
7
|
+
import { UseAutocompleteProps } from '@mui/material/useAutocomplete';
|
|
8
8
|
|
|
9
9
|
import { ThemeMode } from '@centreon/ui-context';
|
|
10
10
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import EditIcon from '@mui/icons-material/Edit';
|
|
4
2
|
import { InputAdornment } from '@mui/material';
|
|
5
3
|
|
|
4
|
+
import { useState } from 'react';
|
|
6
5
|
import AutocompleteField from '.';
|
|
7
6
|
|
|
8
7
|
export default { title: 'InputField/Autocomplete' };
|
|
@@ -85,7 +84,7 @@ const AutoSizeAutocompleteField = ({
|
|
|
85
84
|
endAdornment,
|
|
86
85
|
customPadding
|
|
87
86
|
}: AutoSizeAutocompleteFieldProps): JSX.Element => {
|
|
88
|
-
const [value, setValue] =
|
|
87
|
+
const [value, setValue] = useState(null);
|
|
89
88
|
|
|
90
89
|
const change = (_, newValue): void => {
|
|
91
90
|
setValue(newValue);
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import { equals, isEmpty, isNil, pick } from 'ramda';
|
|
4
2
|
import { useTranslation } from 'react-i18next';
|
|
5
3
|
import { makeStyles } from 'tss-react/mui';
|
|
6
4
|
|
|
7
5
|
import {
|
|
8
|
-
CircularProgress,
|
|
9
|
-
InputAdornment,
|
|
10
6
|
Autocomplete,
|
|
11
7
|
AutocompleteProps,
|
|
8
|
+
CircularProgress,
|
|
9
|
+
InputAdornment,
|
|
12
10
|
useTheme
|
|
13
11
|
} from '@mui/material';
|
|
14
12
|
import { autocompleteClasses } from '@mui/material/Autocomplete';
|
|
@@ -16,11 +14,12 @@ import { UseAutocompleteProps } from '@mui/material/useAutocomplete';
|
|
|
16
14
|
|
|
17
15
|
import { ThemeMode } from '@centreon/ui-context';
|
|
18
16
|
|
|
19
|
-
import
|
|
20
|
-
import TextField from '../../Text';
|
|
17
|
+
import { ForwardedRef, HTMLAttributes, ReactElement, forwardRef } from 'react';
|
|
21
18
|
import { SelectEntry } from '..';
|
|
22
|
-
import { searchLabel } from '../../translatedLabels';
|
|
23
19
|
import { getNormalizedId } from '../../../utils';
|
|
20
|
+
import TextField from '../../Text';
|
|
21
|
+
import { searchLabel } from '../../translatedLabels';
|
|
22
|
+
import Option from '../Option';
|
|
24
23
|
|
|
25
24
|
export type Props = {
|
|
26
25
|
autoFocus?: boolean;
|
|
@@ -30,7 +29,7 @@ export type Props = {
|
|
|
30
29
|
dataTestId?: string;
|
|
31
30
|
displayOptionThumbnail?: boolean;
|
|
32
31
|
displayPopupIcon?: boolean;
|
|
33
|
-
endAdornment?:
|
|
32
|
+
endAdornment?: ReactElement;
|
|
34
33
|
error?: string;
|
|
35
34
|
getOptionItemLabel?: (option) => string;
|
|
36
35
|
hideInput?: boolean;
|
|
@@ -141,7 +140,7 @@ type Multiple = boolean;
|
|
|
141
140
|
type DisableClearable = boolean;
|
|
142
141
|
type FreeSolo = boolean;
|
|
143
142
|
|
|
144
|
-
const AutocompleteField =
|
|
143
|
+
const AutocompleteField = forwardRef(
|
|
145
144
|
(
|
|
146
145
|
{
|
|
147
146
|
options,
|
|
@@ -164,7 +163,7 @@ const AutocompleteField = React.forwardRef(
|
|
|
164
163
|
getOptionItemLabel = (option) => option.name,
|
|
165
164
|
...autocompleteProps
|
|
166
165
|
}: Props,
|
|
167
|
-
ref?:
|
|
166
|
+
ref?: ForwardedRef<HTMLDivElement>
|
|
168
167
|
): JSX.Element => {
|
|
169
168
|
const { classes, cx } = useStyles({ hideInput });
|
|
170
169
|
const { t } = useTranslation();
|
|
@@ -259,7 +258,7 @@ const AutocompleteField = React.forwardRef(
|
|
|
259
258
|
return (
|
|
260
259
|
<li
|
|
261
260
|
className={classes.options}
|
|
262
|
-
{...(props as
|
|
261
|
+
{...(props as HTMLAttributes<HTMLLIElement>)}
|
|
263
262
|
>
|
|
264
263
|
<Option
|
|
265
264
|
thumbnailUrl={displayOptionThumbnail ? option.url : undefined}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
3
|
import { find, isNil, pipe, propEq, reject } from 'ramda';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { makeStyles } from 'tss-react/mui';
|
|
6
6
|
|
|
7
|
+
import IconReset from '@mui/icons-material/RotateLeft';
|
|
7
8
|
import {
|
|
8
9
|
Button,
|
|
9
10
|
ClickAwayListener,
|
|
@@ -13,11 +14,10 @@ import {
|
|
|
13
14
|
PopperPlacementType,
|
|
14
15
|
useTheme
|
|
15
16
|
} from '@mui/material';
|
|
16
|
-
import IconReset from '@mui/icons-material/RotateLeft';
|
|
17
17
|
|
|
18
|
+
import { SelectEntry } from '..';
|
|
18
19
|
import { IconButton } from '../../..';
|
|
19
20
|
import Option from '../Option';
|
|
20
|
-
import { SelectEntry } from '..';
|
|
21
21
|
|
|
22
22
|
import { labelReset } from './translatedLabels';
|
|
23
23
|
|
|
@@ -2,15 +2,15 @@ import { isNil, propEq } from 'ramda';
|
|
|
2
2
|
import { makeStyles } from 'tss-react/mui';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
MenuItem,
|
|
5
|
+
Divider,
|
|
7
6
|
FormControl,
|
|
8
|
-
InputLabel,
|
|
9
|
-
Theme,
|
|
10
|
-
SelectProps,
|
|
11
7
|
FormHelperText,
|
|
8
|
+
InputLabel,
|
|
12
9
|
ListSubheader,
|
|
13
|
-
|
|
10
|
+
MenuItem,
|
|
11
|
+
Select,
|
|
12
|
+
SelectProps,
|
|
13
|
+
Theme
|
|
14
14
|
} from '@mui/material';
|
|
15
15
|
|
|
16
16
|
import { getNormalizedId } from '../../utils';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import { makeStyles } from 'tss-react/mui';
|
|
4
2
|
|
|
5
|
-
import { Theme } from '@mui/material';
|
|
6
3
|
import AbcIcon from '@mui/icons-material/Abc';
|
|
4
|
+
import { Theme } from '@mui/material';
|
|
7
5
|
|
|
6
|
+
import { useState } from 'react';
|
|
8
7
|
import TextField from '.';
|
|
9
8
|
|
|
10
9
|
const useStyles = makeStyles()((theme: Theme) => ({
|
|
@@ -79,7 +78,7 @@ export const autoSizeCustomPadding = (): JSX.Element => (
|
|
|
79
78
|
);
|
|
80
79
|
|
|
81
80
|
const ControlledTextFieldWithAutoSize = (): JSX.Element => {
|
|
82
|
-
const [value, setValue] =
|
|
81
|
+
const [value, setValue] = useState('');
|
|
83
82
|
|
|
84
83
|
const change = (event): void => {
|
|
85
84
|
setValue(event.target.value);
|
|
@@ -4,13 +4,13 @@ import { equals, isNil } from 'ramda';
|
|
|
4
4
|
import { makeStyles } from 'tss-react/mui';
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
-
|
|
7
|
+
Box,
|
|
8
8
|
InputAdornment,
|
|
9
|
+
TextField as MuiTextField,
|
|
9
10
|
TextFieldProps,
|
|
10
11
|
Theme,
|
|
11
12
|
Tooltip,
|
|
12
|
-
Typography
|
|
13
|
-
Box
|
|
13
|
+
Typography
|
|
14
14
|
} from '@mui/material';
|
|
15
15
|
|
|
16
16
|
import { getNormalizedId } from '../../utils';
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { useTheme } from '@mui/material';
|
|
4
|
-
|
|
5
|
-
interface UseAutoSizeProps {
|
|
6
|
-
autoSize: boolean;
|
|
7
|
-
autoSizeCustomPadding?: number;
|
|
8
|
-
autoSizeDefaultWidth: number;
|
|
9
|
-
value?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface UseAutoSizeState {
|
|
13
|
-
changeInputValue: (
|
|
14
|
-
event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
|
|
15
|
-
) => void;
|
|
16
|
-
innerValue: string;
|
|
17
|
-
inputRef: RefObject<HTMLDivElement>;
|
|
18
|
-
width: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const defaultPaddingTotal = 4.5;
|
|
22
|
-
|
|
23
|
-
const useAutoSize = ({
|
|
24
|
-
autoSize,
|
|
25
|
-
autoSizeDefaultWidth,
|
|
26
|
-
value,
|
|
27
|
-
autoSizeCustomPadding
|
|
28
|
-
}: UseAutoSizeProps): UseAutoSizeState => {
|
|
29
|
-
const [innerValue, setInnerValue] = useState(value || '');
|
|
30
|
-
const [width, setWidth] = useState(autoSizeDefaultWidth);
|
|
31
|
-
const inputRef = useRef();
|
|
32
|
-
const theme = useTheme();
|
|
33
|
-
|
|
34
|
-
const changeInputValue = (
|
|
35
|
-
event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
|
|
36
|
-
): void => {
|
|
37
|
-
setInnerValue(event.target.value);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const textFieldValue = autoSize && (value || innerValue);
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (!autoSize) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const newWidth = inputRef.current?.getBoundingClientRect().width || 0;
|
|
48
|
-
|
|
49
|
-
setWidth(newWidth < autoSizeDefaultWidth ? autoSizeDefaultWidth : newWidth);
|
|
50
|
-
}, [textFieldValue]);
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
changeInputValue,
|
|
54
|
-
innerValue,
|
|
55
|
-
inputRef,
|
|
56
|
-
width: `calc(${width}px + ${theme.spacing(
|
|
57
|
-
autoSizeCustomPadding || defaultPaddingTotal
|
|
58
|
-
)})`
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default useAutoSize;
|
|
1
|
+
import { ChangeEvent, RefObject, useEffect, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
4
|
+
|
|
5
|
+
interface UseAutoSizeProps {
|
|
6
|
+
autoSize: boolean;
|
|
7
|
+
autoSizeCustomPadding?: number;
|
|
8
|
+
autoSizeDefaultWidth: number;
|
|
9
|
+
value?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface UseAutoSizeState {
|
|
13
|
+
changeInputValue: (
|
|
14
|
+
event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
|
|
15
|
+
) => void;
|
|
16
|
+
innerValue: string;
|
|
17
|
+
inputRef: RefObject<HTMLDivElement>;
|
|
18
|
+
width: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const defaultPaddingTotal = 4.5;
|
|
22
|
+
|
|
23
|
+
const useAutoSize = ({
|
|
24
|
+
autoSize,
|
|
25
|
+
autoSizeDefaultWidth,
|
|
26
|
+
value,
|
|
27
|
+
autoSizeCustomPadding
|
|
28
|
+
}: UseAutoSizeProps): UseAutoSizeState => {
|
|
29
|
+
const [innerValue, setInnerValue] = useState(value || '');
|
|
30
|
+
const [width, setWidth] = useState(autoSizeDefaultWidth);
|
|
31
|
+
const inputRef = useRef();
|
|
32
|
+
const theme = useTheme();
|
|
33
|
+
|
|
34
|
+
const changeInputValue = (
|
|
35
|
+
event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
|
|
36
|
+
): void => {
|
|
37
|
+
setInnerValue(event.target.value);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const textFieldValue = autoSize && (value || innerValue);
|
|
41
|
+
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (!autoSize) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const newWidth = inputRef.current?.getBoundingClientRect().width || 0;
|
|
48
|
+
|
|
49
|
+
setWidth(newWidth < autoSizeDefaultWidth ? autoSizeDefaultWidth : newWidth);
|
|
50
|
+
}, [textFieldValue]);
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
changeInputValue,
|
|
54
|
+
innerValue,
|
|
55
|
+
inputRef,
|
|
56
|
+
width: `calc(${width}px + ${theme.spacing(
|
|
57
|
+
autoSizeCustomPadding || defaultPaddingTotal
|
|
58
|
+
)})`
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default useAutoSize;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next';
|
|
2
2
|
import { makeStyles } from 'tss-react/mui';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Paper, Typography, alpha } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
import { labelInvalidLicense } from './translatedLabels';
|
|
7
7
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { useTranslation } from 'react-i18next';
|
|
2
1
|
import { isNil, prop } from 'ramda';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
3
|
|
|
4
4
|
import ColumnIcon from '@mui/icons-material/ViewColumn';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import IconPopoverMultiSelect from '../../InputField/Select/IconPopover';
|
|
8
|
-
import { labelAddColumns } from '../translatedLabels';
|
|
6
|
+
import { Props as ListingProps, getVisibleColumns } from '..';
|
|
9
7
|
import { SelectEntry } from '../../InputField/Select';
|
|
8
|
+
import IconPopoverMultiSelect from '../../InputField/Select/IconPopover';
|
|
10
9
|
import { Column } from '../models';
|
|
10
|
+
import { labelAddColumns } from '../translatedLabels';
|
|
11
11
|
|
|
12
12
|
type Props = Pick<
|
|
13
13
|
ListingProps<unknown>,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next';
|
|
2
2
|
import { makeStyles } from 'tss-react/mui';
|
|
3
3
|
|
|
4
|
-
import IconButton from '@mui/material/IconButton';
|
|
5
4
|
import FirstPageIcon from '@mui/icons-material/FirstPage';
|
|
6
5
|
import KeyboardArrowLeft from '@mui/icons-material/KeyboardArrowLeft';
|
|
7
6
|
import KeyboardArrowRight from '@mui/icons-material/KeyboardArrowRight';
|
|
8
7
|
import LastPageIcon from '@mui/icons-material/LastPage';
|
|
8
|
+
import IconButton from '@mui/material/IconButton';
|
|
9
9
|
import { TablePaginationActionsProps } from '@mui/material/TablePagination/TablePaginationActions';
|
|
10
10
|
|
|
11
11
|
import {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAtomValue } from 'jotai';
|
|
2
2
|
import { equals, isEmpty, isNil, not, pick } from 'ramda';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
3
4
|
import { makeStyles } from 'tss-react/mui';
|
|
4
|
-
import { useAtomValue } from 'jotai';
|
|
5
5
|
|
|
6
6
|
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
|
7
7
|
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
8
8
|
import Divider from '@mui/material/Divider';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { ListingVariant, userAtom } from '@centreon/ui-context';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import { labelOf, labelRowsPerPage } from '../translatedLabels';
|
|
12
|
+
import { IconButton, ListingProps } from '../..';
|
|
14
13
|
import { useMemoComponent } from '../../utils';
|
|
14
|
+
import { labelOf, labelRowsPerPage } from '../translatedLabels';
|
|
15
15
|
|
|
16
|
+
import ColumnMultiSelect from './ColumnMultiSelect';
|
|
16
17
|
import StyledPagination from './Pagination';
|
|
17
18
|
import PaginationActions from './PaginationActions';
|
|
18
|
-
import ColumnMultiSelect from './ColumnMultiSelect';
|
|
19
19
|
|
|
20
20
|
interface StyleProps {
|
|
21
21
|
marginWidthTableListing: number;
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
} from '../models';
|
|
15
15
|
import useStyleTable from '../useStyleTable';
|
|
16
16
|
|
|
17
|
-
import EllipsisTypography from './EllipsisTypography';
|
|
18
17
|
import { useStyles } from './DataCell.styles';
|
|
18
|
+
import EllipsisTypography from './EllipsisTypography';
|
|
19
19
|
|
|
20
20
|
import Cell from '.';
|
|
21
21
|
|
|
@@ -280,4 +280,4 @@ const MemoizedDataCell = memo<Props>(
|
|
|
280
280
|
);
|
|
281
281
|
|
|
282
282
|
export default MemoizedDataCell;
|
|
283
|
-
export { useStyles, Props };
|
|
283
|
+
export { useStyles, type Props };
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { useAtom } from 'jotai';
|
|
3
2
|
import { append, equals, includes, isNil, omit, reject } from 'ramda';
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
5
3
|
import { CSSObject } from 'tss-react';
|
|
6
|
-
import {
|
|
4
|
+
import { makeStyles } from 'tss-react/mui';
|
|
7
5
|
|
|
8
6
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
9
7
|
import {
|
|
10
|
-
alpha,
|
|
11
8
|
TableCell,
|
|
12
9
|
TableCellBaseProps,
|
|
13
10
|
TableCellProps,
|
|
14
|
-
Theme
|
|
11
|
+
Theme,
|
|
12
|
+
alpha
|
|
15
13
|
} from '@mui/material';
|
|
16
14
|
|
|
17
15
|
import { ListingVariant } from '@centreon/ui-context';
|
|
18
16
|
|
|
19
17
|
import { IconButton } from '../..';
|
|
20
|
-
import { getTextStyleByViewMode } from '../useStyleTable';
|
|
21
18
|
import { subItemsPivotsAtom } from '../tableAtoms';
|
|
19
|
+
import { getTextStyleByViewMode } from '../useStyleTable';
|
|
22
20
|
|
|
21
|
+
import { ElementType } from 'react';
|
|
23
22
|
import { Props as DataCellProps } from './DataCell';
|
|
24
23
|
|
|
25
24
|
interface GetBackgroundColorProps extends Omit<Props, 'isRowHighlighted'> {
|
|
@@ -182,7 +181,7 @@ const Cell = ({
|
|
|
182
181
|
classes={{
|
|
183
182
|
root: cx(classes.root)
|
|
184
183
|
}}
|
|
185
|
-
component={'div' as unknown as
|
|
184
|
+
component={'div' as unknown as ElementType<TableCellBaseProps>}
|
|
186
185
|
{...omit(
|
|
187
186
|
[
|
|
188
187
|
'isRowHovered',
|
package/src/Listing/Checkbox.tsx
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import { always, and, equals, ifElse, isNil } from 'ramda';
|
|
4
2
|
|
|
5
3
|
import {
|
|
@@ -11,8 +9,8 @@ import {
|
|
|
11
9
|
|
|
12
10
|
import { Props as ListingProps } from '../..';
|
|
13
11
|
import { Column } from '../../models';
|
|
14
|
-
import HeaderLabel from '../_internals/Label';
|
|
15
12
|
import { DraggableIconButton } from '../_internals/DraggableIconButton';
|
|
13
|
+
import HeaderLabel from '../_internals/Label';
|
|
16
14
|
|
|
17
15
|
import { StylesProps, useStyles } from './ListingHeaderCell.styles';
|
|
18
16
|
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import { equals, isEmpty, not } from 'ramda';
|
|
4
2
|
|
|
5
|
-
import { TableCell, TableCellBaseProps } from '@mui/material';
|
|
6
3
|
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
4
|
+
import { TableCell, TableCellBaseProps } from '@mui/material';
|
|
7
5
|
|
|
8
|
-
import Checkbox from '../../Checkbox';
|
|
9
6
|
import PopoverMenu from '../../../PopoverMenu';
|
|
7
|
+
import Checkbox from '../../Checkbox';
|
|
8
|
+
import { PredefinedRowSelection } from '../../models';
|
|
10
9
|
import { labelPredefinedRowsSelectionMenu } from '../../translatedLabels';
|
|
11
10
|
import PredefinedSelectionList from '../_internals/PredefinedSelectionList';
|
|
12
|
-
import { PredefinedRowSelection } from '../../models';
|
|
13
11
|
|
|
14
12
|
import { useStyles } from './SelectActionListingHeaderCell.styles';
|
|
15
13
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { closestCenter, DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
1
|
+
import { DraggableSyntheticListeners, closestCenter } from '@dnd-kit/core';
|
|
4
2
|
import { horizontalListSortingStrategy } from '@dnd-kit/sortable';
|
|
5
3
|
import { equals, find, map, pick, propEq } from 'ramda';
|
|
6
4
|
|
|
@@ -8,16 +6,17 @@ import { TableHead, TableRow } from '@mui/material';
|
|
|
8
6
|
|
|
9
7
|
import { ListingVariant } from '@centreon/ui-context';
|
|
10
8
|
|
|
11
|
-
import {
|
|
9
|
+
import { Props as ListingProps, getVisibleColumns } from '..';
|
|
12
10
|
import SortableItems from '../../SortableItems';
|
|
13
11
|
import { Column } from '../models';
|
|
14
12
|
|
|
13
|
+
import { memo, useCallback } from 'react';
|
|
15
14
|
import ListingHeaderCell from './Cell/ListingHeaderCell';
|
|
16
|
-
import { useStyles } from './ListingHeader.styles';
|
|
17
15
|
import {
|
|
18
16
|
SelectActionListingHeaderCell,
|
|
19
17
|
SelectActionListingHeaderCellProps
|
|
20
18
|
} from './Cell/SelectActionListingHeaderCell';
|
|
19
|
+
import { useStyles } from './ListingHeader.styles';
|
|
21
20
|
|
|
22
21
|
type Props = Pick<
|
|
23
22
|
ListingProps<unknown>,
|
|
@@ -74,7 +73,7 @@ const ListingHeader = ({
|
|
|
74
73
|
return find(propEq(id, 'id'), columns) as Column;
|
|
75
74
|
};
|
|
76
75
|
|
|
77
|
-
const Content =
|
|
76
|
+
const Content = useCallback(
|
|
78
77
|
({
|
|
79
78
|
isInDragOverlay,
|
|
80
79
|
listeners,
|
|
@@ -145,7 +144,7 @@ const columnMemoProps = [
|
|
|
145
144
|
'type'
|
|
146
145
|
];
|
|
147
146
|
|
|
148
|
-
const MemoizedListingHeader =
|
|
147
|
+
const MemoizedListingHeader = memo<Props>(
|
|
149
148
|
ListingHeader,
|
|
150
149
|
(prevProps, nextProps) =>
|
|
151
150
|
equals(prevProps.sortOrder, nextProps.sortOrder) &&
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
1
|
import { useTranslation } from 'react-i18next';
|
|
4
2
|
|
|
5
|
-
import { SvgIcon, IconButton as MuiIconButton } from '@mui/material';
|
|
6
3
|
import DragIndicatorIcon from '@mui/icons-material/DragIndicator';
|
|
4
|
+
import { IconButton as MuiIconButton, SvgIcon } from '@mui/material';
|
|
7
5
|
|
|
8
6
|
import { labelDragHandle } from '../../translatedLabels';
|
|
9
7
|
|