@centreon/ui 25.3.4 → 25.4.0-MON-191119-npm-develop.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 +25 -11
- package/public/mockServiceWorker.js +8 -31
- package/src/Button/Save/index.stories.tsx +1 -0
- package/src/Checkbox/Checkbox.tsx +3 -1
- package/src/Checkbox/CheckboxGroup/index.tsx +6 -1
- package/src/Colors/index.tsx +1 -1
- package/src/Dashboard/Dashboard.styles.ts +1 -1
- package/src/Dashboard/Layout.tsx +1 -1
- package/src/Dialog/UnsavedChanges/index.stories.tsx +1 -0
- package/src/Form/CollapsibleGroup.tsx +13 -13
- package/src/Form/Form.cypress.spec.tsx +137 -2
- package/src/Form/Form.stories.tsx +11 -31
- package/src/Form/Form.tsx +2 -0
- package/src/Form/Inputs/Checkbox.tsx +3 -2
- package/src/Form/Inputs/ConnectedAutocomplete.tsx +6 -1
- package/src/Form/Inputs/Grid.tsx +18 -29
- package/src/Form/Inputs/SubGroupDivider.tsx +7 -0
- package/src/Form/Inputs/Text.tsx +1 -0
- package/src/Form/Inputs/index.tsx +31 -24
- package/src/Form/Inputs/models.ts +8 -1
- package/src/Form/Section/FormSection.tsx +34 -0
- package/src/Form/Section/PanelTabs.tsx +13 -0
- package/src/Form/Section/navigateToSection.ts +9 -0
- package/src/Form/storiesData.tsx +14 -4
- package/src/Graph/BarChart/BarChart.cypress.spec.tsx +46 -6
- package/src/Graph/BarChart/BarChart.stories.tsx +60 -0
- package/src/Graph/BarChart/BarChart.tsx +56 -32
- package/src/Graph/BarChart/BarGroup.tsx +22 -32
- package/src/Graph/BarChart/MemoizedGroup.tsx +8 -11
- package/src/Graph/BarChart/ResponsiveBarChart.tsx +145 -32
- package/src/Graph/BarChart/Tooltip/BarChartTooltip.tsx +2 -2
- package/src/Graph/Chart/BasicComponents/Lines/StackedLines/index.tsx +7 -1
- package/src/Graph/Chart/BasicComponents/Lines/StackedLines/useStackedLines.ts +18 -45
- package/src/Graph/Chart/BasicComponents/Lines/index.tsx +42 -28
- package/src/Graph/Chart/Chart.cypress.spec.tsx +85 -15
- package/src/Graph/Chart/Chart.stories.tsx +84 -1
- package/src/Graph/Chart/Chart.tsx +17 -4
- package/src/Graph/Chart/InteractiveComponents/AnchorPoint/RegularAnchorPoint.tsx +8 -2
- package/src/Graph/Chart/InteractiveComponents/AnchorPoint/StackedAnchorPoint.tsx +10 -3
- package/src/Graph/Chart/InteractiveComponents/AnchorPoint/useTickGraph.ts +19 -2
- package/src/Graph/Chart/InteractiveComponents/GraphValueTooltip/useGraphValueTooltip.ts +2 -4
- package/src/Graph/Chart/InteractiveComponents/ZoomPreview/index.tsx +14 -3
- package/src/Graph/Chart/InteractiveComponents/ZoomPreview/models.ts +3 -0
- package/src/Graph/Chart/InteractiveComponents/ZoomPreview/useZoomPreview.ts +12 -10
- package/src/Graph/Chart/InteractiveComponents/index.tsx +63 -5
- package/src/Graph/Chart/Legend/index.tsx +26 -2
- package/src/Graph/Chart/index.tsx +45 -45
- package/src/Graph/Chart/models.ts +8 -0
- package/src/Graph/Chart/useChartData.ts +14 -2
- package/src/Graph/Gauge/Gauge.tsx +18 -14
- package/src/Graph/Gauge/ResponsiveGauge.tsx +10 -6
- package/src/Graph/Gauge/useResizeObserver.ts +68 -0
- package/src/Graph/SingleBar/ResponsiveSingleBar.tsx +18 -16
- package/src/Graph/SingleBar/ThresholdLine.tsx +4 -4
- package/src/Graph/SingleBar/models.ts +1 -0
- package/src/Graph/Text/Text.styles.ts +2 -2
- package/src/Graph/Text/Text.tsx +23 -10
- package/src/Graph/Timeline/ResponsiveTimeline.tsx +4 -0
- package/src/Graph/Timeline/Timeline.tsx +21 -4
- package/src/Graph/Tree/Links.tsx +2 -2
- package/src/Graph/Tree/Tree.tsx +2 -2
- package/src/Graph/Tree/constants.ts +1 -1
- package/src/Graph/common/BaseChart/BaseChart.tsx +6 -1
- package/src/Graph/common/BaseChart/ChartSvgWrapper.tsx +5 -4
- package/src/Graph/common/BaseChart/Header/index.tsx +3 -1
- package/src/Graph/common/BaseChart/useComputeBaseChartDimensions.ts +13 -9
- package/src/Graph/common/timeSeries/index.test.ts +20 -0
- package/src/Graph/common/timeSeries/index.ts +225 -44
- package/src/Graph/common/timeSeries/models.ts +6 -2
- package/src/Graph/common/utils.ts +45 -12
- package/src/Graph/index.ts +3 -1
- package/src/Graph/mockedData/dataWithMissingPoint.json +74 -0
- package/src/Graph/mockedData/pingServiceWithStackedKeys.json +205 -0
- package/src/Icon/RegexIcon.tsx +20 -0
- package/src/Icon/index.ts +1 -0
- package/src/InputField/Select/Autocomplete/Connected/Multi/MultiConnectedAutocompleteField.cypress.spec.tsx +68 -14
- package/src/InputField/Select/Autocomplete/Connected/index.tsx +49 -14
- package/src/InputField/Select/Autocomplete/Multi/Listbox.tsx +78 -0
- package/src/InputField/Select/Autocomplete/Multi/Multi.styles.ts +26 -0
- package/src/InputField/Select/Autocomplete/Multi/Multi.tsx +124 -0
- package/src/InputField/Select/Autocomplete/Multi/index.tsx +1 -117
- package/src/InputField/Select/Autocomplete/index.tsx +28 -17
- package/src/InputField/Select/Option.tsx +3 -3
- package/src/InputField/Select/index.tsx +4 -0
- package/src/InputField/Text/index.tsx +4 -2
- package/src/InputField/translatedLabels.ts +4 -0
- package/src/Listing/ActionBar/Pagination.tsx +10 -23
- package/src/Listing/ActionBar/PaginationActions.tsx +1 -10
- package/src/Listing/ActionBar/index.tsx +1 -1
- package/src/Listing/Cell/DataCell.tsx +6 -6
- package/src/Listing/Cell/EllipsisTypography.tsx +10 -32
- package/src/Listing/Cell/index.tsx +37 -76
- package/src/Listing/Checkbox.tsx +8 -20
- package/src/Listing/Header/Cell/ListingHeaderCell.tsx +17 -14
- package/src/Listing/Header/Cell/SelectActionListingHeaderCell.tsx +5 -9
- package/src/Listing/Header/ListingHeader.tsx +2 -5
- package/src/Listing/Header/_internals/Label.tsx +1 -17
- package/src/Listing/Row/EmptyRow.tsx +2 -6
- package/src/Listing/Row/Row.tsx +7 -36
- package/src/Listing/index.stories.tsx +1 -0
- package/src/Listing/index.tsx +26 -26
- package/src/Listing/useStyleTable.ts +58 -32
- package/src/ListingPage/index.stories.tsx +1 -0
- package/src/Module/index.tsx +8 -2
- package/src/MultiSelectEntries/index.stories.tsx +1 -0
- package/src/MultiSelectEntries/index.tsx +1 -1
- package/src/Pagination/Pagination.cypress.spec.tsx +137 -0
- package/src/Pagination/Pagination.stories.tsx +46 -0
- package/src/Pagination/Pagination.styles.ts +56 -0
- package/src/Pagination/Pagination.tsx +146 -0
- package/src/Pagination/index.ts +3 -0
- package/src/Pagination/utils.ts +7 -0
- package/src/SortableItems/index.stories.tsx +2 -2
- package/src/StoryBookThemeProvider/index.tsx +3 -1
- package/src/ThemeProvider/base.css +49 -0
- package/src/ThemeProvider/index.tsx +21 -47
- package/src/ThemeProvider/palettes.ts +3 -1
- package/src/ThemeProvider/tailwindcss.css +230 -0
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/PickersStartEndDate.tsx +9 -11
- package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/models.ts +1 -0
- package/src/TimePeriods/DateTimePickerInput.tsx +3 -1
- package/src/api/models.ts +9 -0
- package/src/api/useGraphQuery/index.ts +108 -12
- package/src/components/Avatar/Avatar.stories.tsx +1 -0
- package/src/components/Button/Button.module.css +38 -0
- package/src/components/Button/Button.stories.tsx +25 -0
- package/src/components/Button/Button.tsx +2 -5
- package/src/components/CrudPage/CrudPage.stories.tsx +1 -0
- package/src/components/CrudPage/CrudPageRoot.tsx +1 -1
- package/src/components/DataTable/DataTable.stories.tsx +1 -0
- package/src/components/DataTable/EmptyState/DataTableEmptyState.stories.tsx +1 -0
- package/src/components/DataTable/EmptyState/DataTableEmptyState.styles.ts +3 -1
- package/src/components/DataTable/EmptyState/DataTableEmptyState.tsx +4 -1
- package/src/components/DataTable/Item/DataTableItem.stories.tsx +1 -0
- package/src/components/Form/AccessRights/AccessRights.stories.tsx +1 -0
- package/src/components/Form/AccessRights/ShareInput/ShareInput.tsx +4 -3
- package/src/components/Form/AccessRights/ShareInput/useShareInput.tsx +15 -10
- package/src/components/Form/FormActions.tsx +21 -12
- package/src/components/Layout/AreaIndicator.tsx +4 -6
- package/src/components/Layout/PageLayout/PageLayout.stories.tsx +1 -0
- package/src/components/Layout/PageLayout/PageLayout.tsx +9 -3
- package/src/components/Layout/PageLayout/PageLayoutActions.tsx +5 -3
- package/src/components/Layout/PageLayout/PageLayoutBody.tsx +5 -3
- package/src/components/Layout/PageLayout/PageLayoutHeader.tsx +5 -3
- package/src/components/Layout/PageLayout/PageQuickAccess.tsx +17 -17
- package/src/components/Menu/Button/MenuButton.tsx +6 -6
- package/src/components/Menu/MenuDivider.tsx +1 -5
- package/src/components/Menu/MenuItem.tsx +1 -5
- package/src/components/Menu/MenuItems.tsx +5 -4
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +1 -0
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.tsx +4 -1
- package/src/components/Modal/Modal.stories.tsx +21 -0
- package/src/components/Modal/Modal.styles.ts +1 -19
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Modal/ModalBody.tsx +6 -4
- package/src/components/Modal/ModalHeader.tsx +9 -5
- package/src/components/Modal/modal.module.css +16 -0
- package/src/components/Tabs/Tab.styles.ts +0 -6
- package/src/components/Tabs/Tabs.tsx +37 -15
- package/src/index.ts +3 -0
- package/src/queryParameters/url/index.ts +7 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/useLocale/index.ts +9 -0
- package/src/utils/useLocale/useLocale.cypress.spec.tsx +38 -0
- package/src/utils/useLocaleDateTimeFormat/index.ts +4 -2
- package/src/utils/usePluralizedTranslation.ts +2 -3
- package/src/Listing/Cell/DataCell.styles.ts +0 -27
- package/src/Listing/Header/Cell/ListingHeaderCell.styles.ts +0 -71
- package/src/Listing/Header/Cell/SelectActionListingHeaderCell.styles.ts +0 -26
- package/src/Listing/Header/ListingHeader.styles.ts +0 -16
- package/src/Listing/Listing.styles.ts +0 -78
- package/src/Listing/Row/EmptyRow.styles.ts +0 -14
- package/src/components/Button/Button.styles.ts +0 -44
- package/src/components/Layout/AreaIndicator.styles.ts +0 -33
- package/src/components/Menu/Button/MenuButton.styles.ts +0 -27
- package/src/components/Menu/Menu.styles.ts +0 -68
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { makeStyles } from 'tss-react/mui';
|
|
2
|
-
|
|
3
|
-
export const useStyles = makeStyles()((theme) => ({
|
|
4
|
-
areaIndicator: {
|
|
5
|
-
'& .areaIndicator': {
|
|
6
|
-
left: theme.spacing(10)
|
|
7
|
-
},
|
|
8
|
-
'& label:first-of-type': {
|
|
9
|
-
border: '1px dashed #9747FF7F',
|
|
10
|
-
borderRadius: '4px',
|
|
11
|
-
color: '#9747FFFF',
|
|
12
|
-
fontSize: '0.75rem',
|
|
13
|
-
fontWeight: 500,
|
|
14
|
-
left: theme.spacing(1),
|
|
15
|
-
padding: theme.spacing(0.125, 1),
|
|
16
|
-
position: 'absolute',
|
|
17
|
-
top: theme.spacing(0.75)
|
|
18
|
-
},
|
|
19
|
-
'&[data-depth="1"]': {
|
|
20
|
-
'& label:first-of-type': {
|
|
21
|
-
'&:before': {
|
|
22
|
-
content: '"+ "'
|
|
23
|
-
},
|
|
24
|
-
left: theme.spacing(10)
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
backgroundColor: '#9747FF19',
|
|
29
|
-
minHeight: theme.spacing(4),
|
|
30
|
-
|
|
31
|
-
position: 'relative'
|
|
32
|
-
}
|
|
33
|
-
}));
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { makeStyles } from 'tss-react/mui';
|
|
2
|
-
|
|
3
|
-
export const useStyles = makeStyles()((theme) => ({
|
|
4
|
-
buttonIcon: {
|
|
5
|
-
'[data-is-active="true"] &': {
|
|
6
|
-
transform: 'rotate(180deg)'
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
fontSize: '1.25rem',
|
|
10
|
-
transition: 'transform 0.15s ease-in-out'
|
|
11
|
-
},
|
|
12
|
-
menuButton: {
|
|
13
|
-
'&:hover:not(&[data-is-active="true"])': {
|
|
14
|
-
backgroundColor: theme.palette.menu.button.background.hover,
|
|
15
|
-
color: theme.palette.menu.button.color.hover
|
|
16
|
-
},
|
|
17
|
-
'&[data-is-active="true"]': {
|
|
18
|
-
backgroundColor: theme.palette.menu.button.background.active,
|
|
19
|
-
color: theme.palette.menu.button.color.active
|
|
20
|
-
},
|
|
21
|
-
backgroundColor: theme.palette.menu.button.background.default,
|
|
22
|
-
color: theme.palette.menu.button.color.default,
|
|
23
|
-
display: 'flex',
|
|
24
|
-
height: 'unset',
|
|
25
|
-
minWidth: 'unset'
|
|
26
|
-
}
|
|
27
|
-
}));
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { makeStyles } from 'tss-react/mui';
|
|
2
|
-
|
|
3
|
-
export const useStyles = makeStyles()((theme) => ({
|
|
4
|
-
menuDivider: {
|
|
5
|
-
'&, &.MuiDivider-root': {
|
|
6
|
-
borderColor: theme.palette.menu.divider.border
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
menuItem: {
|
|
10
|
-
'&, &.MuiMenuItem-root': {
|
|
11
|
-
'& > button': {
|
|
12
|
-
fontSize: '1rem',
|
|
13
|
-
justifyContent: 'flex-start'
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
'&:has(button)': {
|
|
17
|
-
'& > .MuiTouchRipple-root': {
|
|
18
|
-
display: 'none'
|
|
19
|
-
},
|
|
20
|
-
'&:hover:not(&[data-is-active="true"])': {
|
|
21
|
-
backgroundColor: 'unset'
|
|
22
|
-
},
|
|
23
|
-
padding: theme.spacing(0, 2)
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
'&:not(:has(button))': {
|
|
27
|
-
'&:hover:not(&[data-is-active="true"])': {
|
|
28
|
-
backgroundColor: theme.palette.menu.item.background.hover,
|
|
29
|
-
color: theme.palette.menu.item.color.hover
|
|
30
|
-
},
|
|
31
|
-
'&[data-is-active="true"], &.Mui-selected': {
|
|
32
|
-
'&[data-is-disabled="true"], &.Mui-disabled': {
|
|
33
|
-
opacity: 1
|
|
34
|
-
},
|
|
35
|
-
backgroundColor: theme.palette.menu.item.background.active,
|
|
36
|
-
color: theme.palette.menu.item.color.active,
|
|
37
|
-
opacity: 1
|
|
38
|
-
},
|
|
39
|
-
'&[data-is-disabled="true"], &.Mui-disabled': {
|
|
40
|
-
opacity: 0.5
|
|
41
|
-
},
|
|
42
|
-
backgroundColor: theme.palette.menu.item.background.default,
|
|
43
|
-
color: theme.palette.menu.item.color.default,
|
|
44
|
-
padding: theme.spacing(0.75, 2)
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
alignItems: 'center',
|
|
48
|
-
display: 'flex',
|
|
49
|
-
flexDirection: 'row',
|
|
50
|
-
fontSize: '1rem',
|
|
51
|
-
gap: theme.spacing(2),
|
|
52
|
-
justifyContent: 'space-between',
|
|
53
|
-
minHeight: 'unset'
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
menuItems: {
|
|
57
|
-
'& > .MuiPaper-root.MuiMenu-paper': {
|
|
58
|
-
backgroundColor: theme.palette.menu.background,
|
|
59
|
-
borderRadius: '4px',
|
|
60
|
-
boxShadow: theme.shadows[8],
|
|
61
|
-
minWidth: '240px',
|
|
62
|
-
transform: `translateY(${theme.spacing(0.5)}) !important`
|
|
63
|
-
},
|
|
64
|
-
'& ul, & ul.MuiMenu-list': {
|
|
65
|
-
padding: theme.spacing(1, 0)
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}));
|