@centreon/ui 25.6.1 → 25.6.10
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 +7 -1
- package/src/Button/Save/index.stories.tsx +1 -0
- package/src/Colors/index.tsx +1 -1
- package/src/Dialog/UnsavedChanges/index.stories.tsx +1 -0
- package/src/Form/Inputs/ConnectedAutocomplete.tsx +2 -0
- package/src/Form/Inputs/models.ts +1 -0
- package/src/InputField/Select/Autocomplete/Connected/index.tsx +3 -0
- package/src/ListingPage/index.stories.tsx +1 -0
- package/src/MultiSelectEntries/index.stories.tsx +1 -0
- package/src/MultiSelectEntries/index.tsx +1 -1
- package/src/SortableItems/index.stories.tsx +2 -2
- package/src/components/CrudPage/CrudPage.stories.tsx +1 -0
- package/src/components/DataTable/DataTable.stories.tsx +1 -0
- package/src/components/DataTable/EmptyState/DataTableEmptyState.stories.tsx +1 -0
- package/src/components/DataTable/Item/DataTableItem.stories.tsx +1 -0
- package/src/components/Form/AccessRights/AccessRights.stories.tsx +1 -0
- package/src/components/Layout/AreaIndicator.tsx +2 -2
- package/src/components/Layout/PageLayout/PageLayout.stories.tsx +1 -0
- package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +1 -0
- package/src/components/Modal/Modal.stories.tsx +1 -0
- package/src/components/Tabs/Tabs.tsx +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@centreon/ui",
|
|
3
|
-
"version": "25.6.
|
|
3
|
+
"version": "25.6.10",
|
|
4
4
|
"description": "Centreon UI Components",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update:deps": "pnpx npm-check-updates -i --format group",
|
|
@@ -167,5 +167,11 @@
|
|
|
167
167
|
"workerDirectory": [
|
|
168
168
|
"public"
|
|
169
169
|
]
|
|
170
|
+
},
|
|
171
|
+
"nyc": {
|
|
172
|
+
"report-dir": "coverage",
|
|
173
|
+
"reporter": [
|
|
174
|
+
"json"
|
|
175
|
+
]
|
|
170
176
|
}
|
|
171
177
|
}
|
package/src/Colors/index.tsx
CHANGED
|
@@ -55,7 +55,7 @@ const ContainerDescription = ({
|
|
|
55
55
|
{toPairs(palette[keyTheme]).map(
|
|
56
56
|
([key, value]) =>
|
|
57
57
|
!includes(key, keysToRemove) && (
|
|
58
|
-
<Grid item key={key}
|
|
58
|
+
<Grid item key={key} size={6}>
|
|
59
59
|
<div className={classes.headerContainer}>
|
|
60
60
|
<Typography variant="h6">{key}</Typography>
|
|
61
61
|
<Typography variant="button">{value}</Typography>
|
|
@@ -135,6 +135,7 @@ const ConnectedAutocomplete = ({
|
|
|
135
135
|
error={error}
|
|
136
136
|
field={filterKey}
|
|
137
137
|
getEndpoint={getEndpoint}
|
|
138
|
+
decoder={connectedAutocomplete?.decoder}
|
|
138
139
|
getRenderedOptionText={connectedAutocomplete?.getRenderedOptionText}
|
|
139
140
|
initialPage={1}
|
|
140
141
|
isOptionEqualToValue={isOptionEqualToValue}
|
|
@@ -146,6 +147,7 @@ const ConnectedAutocomplete = ({
|
|
|
146
147
|
onChange={changeAutocomplete}
|
|
147
148
|
disableSelectAll={connectedAutocomplete?.disableSelectAll}
|
|
148
149
|
limitTags={connectedAutocomplete?.limitTags}
|
|
150
|
+
searchConditions={connectedAutocomplete?.additionalConditionParameters}
|
|
149
151
|
/>
|
|
150
152
|
),
|
|
151
153
|
memoProps: [
|
|
@@ -37,6 +37,7 @@ export interface ConnectedAutoCompleteFieldProps<TData> {
|
|
|
37
37
|
exclusionOptionProperty?: keyof SelectEntry;
|
|
38
38
|
field: string;
|
|
39
39
|
getEndpoint: ({ search, page }) => string;
|
|
40
|
+
decoder?;
|
|
40
41
|
getRenderedOptionText: (option: TData) => string;
|
|
41
42
|
getRequestHeaders?: HeadersInit;
|
|
42
43
|
initialPage: number;
|
|
@@ -52,6 +53,7 @@ const ConnectedAutocompleteField = (
|
|
|
52
53
|
const InnerConnectedAutocompleteField = <TData extends { name: string }>({
|
|
53
54
|
initialPage = 1,
|
|
54
55
|
getEndpoint,
|
|
56
|
+
decoder,
|
|
55
57
|
field,
|
|
56
58
|
labelKey,
|
|
57
59
|
open,
|
|
@@ -91,6 +93,7 @@ const ConnectedAutocompleteField = (
|
|
|
91
93
|
const { fetchQuery, isFetching, prefetchNextPage, data } = useFetchQuery<
|
|
92
94
|
ListingModel<TData>
|
|
93
95
|
>({
|
|
96
|
+
decoder,
|
|
94
97
|
baseEndpoint,
|
|
95
98
|
fetchHeaders: getRequestHeaders,
|
|
96
99
|
getEndpoint: (params) => {
|
|
@@ -230,7 +230,7 @@ const ContentWithGrid = ({
|
|
|
230
230
|
const { classes } = useContentStyles({ isDragging });
|
|
231
231
|
|
|
232
232
|
return (
|
|
233
|
-
<Grid item style={style}
|
|
233
|
+
<Grid item style={style} size={xs} {...listeners} {...attributes}>
|
|
234
234
|
<Paper className={classes.content} ref={itemRef}>
|
|
235
235
|
<Typography>{name as string}</Typography>
|
|
236
236
|
</Paper>
|
|
@@ -244,7 +244,7 @@ const RootComponent = ({
|
|
|
244
244
|
}: RootComponentProps): JSX.Element => (
|
|
245
245
|
<Grid container spacing={1} style={{ width: '550px' }}>
|
|
246
246
|
{not(isInDragOverlay) && (
|
|
247
|
-
<Grid item
|
|
247
|
+
<Grid item size={12}>
|
|
248
248
|
<Typography align="center">This item cannot move</Typography>
|
|
249
249
|
</Grid>
|
|
250
250
|
)}
|
|
@@ -7,6 +7,7 @@ import { ChangeEvent, useEffect } from 'react';
|
|
|
7
7
|
import { CrudPage } from '.';
|
|
8
8
|
import { SnackbarProvider } from '../../';
|
|
9
9
|
import { Column, ColumnType } from '../../Listing/models';
|
|
10
|
+
import '../../ThemeProvider/tailwindcss.css';
|
|
10
11
|
|
|
11
12
|
interface Item {
|
|
12
13
|
id: number;
|
|
@@ -17,12 +17,12 @@ const AreaIndicator = ({
|
|
|
17
17
|
}: AreaIndicatorProps): ReactElement => {
|
|
18
18
|
return (
|
|
19
19
|
<div
|
|
20
|
-
className={'bg-secondary-main/25
|
|
20
|
+
className={'bg-secondary-main/25 min-h-8 grid grid-cols-[3fr_1fr]'}
|
|
21
21
|
data-depth={depth}
|
|
22
22
|
style={{ height, width }}
|
|
23
23
|
>
|
|
24
24
|
{/* biome-ignore lint/a11y: */}
|
|
25
|
-
<label className="left-2 rounded-sm border border-[#9747FF7F] border-dashed text-[#9747FF] text-[0.75rem] font-medium left-2
|
|
25
|
+
<label className="left-2 rounded-sm border border-[#9747FF7F] border-dashed text-[#9747FF] text-[0.75rem] font-medium left-2 top-1.5 px-2 py-0.5">
|
|
26
26
|
{name}
|
|
27
27
|
</label>
|
|
28
28
|
{children}
|
|
@@ -4,6 +4,7 @@ import { Default as DefaultPageHeaderStory } from '../../Header/PageHeader/PageH
|
|
|
4
4
|
import { AreaIndicator } from '../AreaIndicator';
|
|
5
5
|
|
|
6
6
|
import { PageLayout } from './index';
|
|
7
|
+
import '../../../ThemeProvider/tailwindcss.css';
|
|
7
8
|
|
|
8
9
|
const meta: Meta<typeof PageLayout> = {
|
|
9
10
|
argTypes: {
|
|
@@ -4,6 +4,7 @@ import { Provider, atom, createStore, useSetAtom } from 'jotai';
|
|
|
4
4
|
import { Button } from '../../Button';
|
|
5
5
|
|
|
6
6
|
import { ConfirmationModal } from './ConfirmationModal';
|
|
7
|
+
import '../../../ThemeProvider/tailwindcss.css';
|
|
7
8
|
|
|
8
9
|
const meta: Meta<typeof ConfirmationModal> = {
|
|
9
10
|
component: ConfirmationModal
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCallback, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import { TabContext
|
|
4
|
-
import { Tab } from '@mui/material';
|
|
3
|
+
import { TabContext } from '@mui/lab';
|
|
4
|
+
import { Tab, Tabs as MuiTabs, TabsProps } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
import { useTabsStyles } from './Tab.styles';
|
|
7
7
|
|
|
8
8
|
type Props = {
|
|
9
9
|
children: Array<JSX.Element>;
|
|
10
10
|
defaultTab: string;
|
|
11
|
-
tabList?:
|
|
11
|
+
tabList?: TabsProps;
|
|
12
12
|
tabs: Array<{
|
|
13
13
|
label: string;
|
|
14
14
|
value: string;
|
|
@@ -31,12 +31,13 @@ export const Tabs = ({
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<TabContext value={selectedTab}>
|
|
34
|
-
<
|
|
34
|
+
<MuiTabs
|
|
35
35
|
classes={{
|
|
36
36
|
indicator: classes.indicator,
|
|
37
37
|
root: classes.tabs
|
|
38
38
|
}}
|
|
39
39
|
onChange={changeTab}
|
|
40
|
+
value={selectedTab}
|
|
40
41
|
{...tabList}
|
|
41
42
|
>
|
|
42
43
|
{tabs.map(({ value, label }) => (
|
|
@@ -48,7 +49,7 @@ export const Tabs = ({
|
|
|
48
49
|
value={value}
|
|
49
50
|
/>
|
|
50
51
|
))}
|
|
51
|
-
</
|
|
52
|
+
</MuiTabs>
|
|
52
53
|
{children}
|
|
53
54
|
</TabContext>
|
|
54
55
|
);
|