@centreon/ui 24.11.0 → 24.11.2

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.
Files changed (70) hide show
  1. package/package.json +3 -2
  2. package/src/Dashboard/Dashboard.styles.ts +3 -4
  3. package/src/Dashboard/DashboardLayout.stories.tsx +1 -1
  4. package/src/Dashboard/Grid.tsx +11 -17
  5. package/src/Dashboard/Layout.tsx +27 -56
  6. package/src/FileDropZone/index.tsx +23 -21
  7. package/src/Form/CollapsibleGroup.tsx +2 -3
  8. package/src/Form/Form.cypress.spec.tsx +0 -39
  9. package/src/Form/Form.tsx +0 -1
  10. package/src/Form/Inputs/Autocomplete.tsx +4 -27
  11. package/src/Form/Inputs/ConnectedAutocomplete.tsx +10 -20
  12. package/src/Form/Inputs/Grid.tsx +2 -30
  13. package/src/Form/Inputs/Radio.tsx +4 -12
  14. package/src/Form/Inputs/Switch.tsx +2 -10
  15. package/src/Form/Inputs/Text.tsx +4 -13
  16. package/src/Form/Inputs/index.tsx +2 -5
  17. package/src/Form/Inputs/models.ts +2 -18
  18. package/src/Form/storiesData.tsx +3 -15
  19. package/src/Form/translatedLabels.ts +0 -1
  20. package/src/Graph/BarChart/BarChart.tsx +1 -4
  21. package/src/Graph/BarChart/ResponsiveBarChart.tsx +2 -3
  22. package/src/Graph/Chart/Chart.tsx +2 -9
  23. package/src/Graph/Chart/InteractiveComponents/AnchorPoint/useTickGraph.ts +2 -2
  24. package/src/Graph/Chart/InteractiveComponents/index.tsx +2 -10
  25. package/src/Graph/Chart/helpers/index.ts +5 -5
  26. package/src/Graph/Chart/index.tsx +0 -7
  27. package/src/Graph/Chart/models.ts +0 -1
  28. package/src/InputField/Text/index.tsx +1 -1
  29. package/src/Listing/index.tsx +27 -39
  30. package/src/Listing/models.ts +0 -8
  31. package/src/MultiSelectEntries/index.tsx +2 -0
  32. package/src/PopoverMenu/index.tsx +2 -9
  33. package/src/SortableItems/index.tsx +0 -1
  34. package/src/ThemeProvider/index.tsx +1 -1
  35. package/src/ThemeProvider/palettes.ts +4 -4
  36. package/src/components/DataTable/DataTable.cypress.spec.tsx +1 -2
  37. package/src/components/DataTable/DataTable.stories.tsx +0 -17
  38. package/src/components/DataTable/EmptyState/DataTableEmptyState.styles.ts +1 -3
  39. package/src/components/DataTable/EmptyState/DataTableEmptyState.tsx +0 -6
  40. package/src/components/Layout/AreaIndicator.tsx +1 -1
  41. package/src/components/Layout/PageLayout/PageLayout.styles.ts +2 -7
  42. package/src/components/Layout/PageLayout/PageLayoutBody.tsx +0 -1
  43. package/src/components/Modal/Modal.styles.ts +1 -1
  44. package/src/components/Zoom/Zoom.tsx +2 -2
  45. package/src/components/Zoom/ZoomContent.tsx +2 -2
  46. package/src/components/index.ts +0 -1
  47. package/src/Form/Inputs/File.tsx +0 -69
  48. package/src/components/CrudPage/Actions/Actions.styles.ts +0 -16
  49. package/src/components/CrudPage/Actions/Actions.tsx +0 -24
  50. package/src/components/CrudPage/Actions/AddButton.tsx +0 -23
  51. package/src/components/CrudPage/Actions/Filters.tsx +0 -25
  52. package/src/components/CrudPage/Actions/Search.tsx +0 -31
  53. package/src/components/CrudPage/Actions/useSearch.tsx +0 -24
  54. package/src/components/CrudPage/Columns/Actions.tsx +0 -88
  55. package/src/components/CrudPage/CrudPage.cypress.spec.tsx +0 -559
  56. package/src/components/CrudPage/CrudPage.stories.tsx +0 -278
  57. package/src/components/CrudPage/CrudPageRoot.tsx +0 -142
  58. package/src/components/CrudPage/DeleteModal.tsx +0 -77
  59. package/src/components/CrudPage/Form/AddModal.tsx +0 -35
  60. package/src/components/CrudPage/Form/Buttons.tsx +0 -98
  61. package/src/components/CrudPage/Form/UpdateModal.tsx +0 -60
  62. package/src/components/CrudPage/Listing.tsx +0 -63
  63. package/src/components/CrudPage/atoms.ts +0 -30
  64. package/src/components/CrudPage/hooks/useDeleteItem.ts +0 -53
  65. package/src/components/CrudPage/hooks/useGetItem.ts +0 -36
  66. package/src/components/CrudPage/hooks/useGetItems.ts +0 -67
  67. package/src/components/CrudPage/hooks/useListingQueryKey.ts +0 -31
  68. package/src/components/CrudPage/index.tsx +0 -7
  69. package/src/components/CrudPage/models.ts +0 -118
  70. package/src/components/CrudPage/utils.ts +0 -4
@@ -2,11 +2,11 @@ import { ChangeEvent, useCallback, useState } from 'react';
2
2
 
3
3
  import { FormikValues, useFormikContext } from 'formik';
4
4
  import {
5
+ path,
5
6
  equals,
6
7
  gt,
7
8
  isEmpty,
8
9
  not,
9
- path,
10
10
  split,
11
11
  type as variableType
12
12
  } from 'ramda';
@@ -42,9 +42,7 @@ const Text = ({
42
42
  touched,
43
43
  errors,
44
44
  handleBlur,
45
- setFieldTouched,
46
- setValues,
47
- setTouched
45
+ setFieldTouched
48
46
  } = useFormikContext<FormikValues>();
49
47
 
50
48
  const fieldNamePath = split('.', fieldName);
@@ -52,14 +50,7 @@ const Text = ({
52
50
  const changeText = (event: ChangeEvent<HTMLInputElement>): void => {
53
51
  const { value } = event.target;
54
52
  if (change) {
55
- change({
56
- setFieldValue,
57
- value,
58
- setFieldTouched,
59
- setValues,
60
- values,
61
- setTouched
62
- });
53
+ change({ setFieldValue, value, setFieldTouched });
63
54
 
64
55
  return;
65
56
  }
@@ -122,7 +113,7 @@ const Text = ({
122
113
  return useMemoComponent({
123
114
  Component: (
124
115
  <TextField
125
- fullWidth={text?.fullWidth ?? true}
116
+ fullWidth
126
117
  EndAdornment={EndAdornment}
127
118
  ariaLabel={t(label) || ''}
128
119
  autoFocus={autoFocus}
@@ -36,7 +36,6 @@ import CheckboxGroup from './CheckboxGroup';
36
36
  import ConnectedAutocomplete from './ConnectedAutocomplete';
37
37
  import Custom from './Custom';
38
38
  import FieldsTable from './FieldsTable/FieldsTable';
39
- import File from './File';
40
39
  import Grid from './Grid';
41
40
  import List from './List/List';
42
41
  import LoadingSkeleton from './LoadingSkeleton';
@@ -79,7 +78,6 @@ export const getInput = cond<
79
78
  always(CheckboxGroup)
80
79
  ],
81
80
  [equals(InputType.List) as (b: InputType) => boolean, always(List)],
82
- [equals(InputType.File) as (b: InputType) => boolean, always(File)],
83
81
  [T, always(TextInput)]
84
82
  ]);
85
83
 
@@ -115,8 +113,7 @@ const useStyles = makeStyles<StylesProps>()((theme, { groupDirection }) => ({
115
113
  display: 'flex',
116
114
  flexDirection: 'column',
117
115
  marginTop: theme.spacing(1),
118
- rowGap: theme.spacing(2),
119
- marginBottom: theme.spacing(1)
116
+ rowGap: theme.spacing(2)
120
117
  }
121
118
  }));
122
119
 
@@ -168,7 +165,7 @@ const Inputs = ({
168
165
  );
169
166
 
170
167
  return pluck('name', usedGroups);
171
- }, [inputsByGroup, groups]);
168
+ }, []);
172
169
 
173
170
  const sortedInputsByGroup = useMemo(
174
171
  () =>
@@ -19,8 +19,7 @@ export enum InputType {
19
19
  Custom = 10,
20
20
  Checkbox = 11,
21
21
  CheckboxGroup = 12,
22
- List = 13,
23
- File = 14
22
+ List = 13
24
23
  }
25
24
 
26
25
  interface FieldsTableGetRequiredProps {
@@ -38,16 +37,8 @@ export interface InputProps {
38
37
  autocomplete?: {
39
38
  creatable?: boolean;
40
39
  options: Array<SelectEntry>;
41
- fullWidth?: boolean;
42
40
  };
43
- change?: ({
44
- setFieldValue,
45
- value,
46
- setFieldTouched,
47
- setValues,
48
- values,
49
- setTouched
50
- }) => void;
41
+ change?: ({ setFieldValue, value, setFieldTouched }) => void;
51
42
  checkbox?: {
52
43
  direction?: 'horizontal' | 'vertical';
53
44
  labelPlacement?: LabelPlacement;
@@ -60,12 +51,6 @@ export interface InputProps {
60
51
  filterKey?: string;
61
52
  getRenderedOptionText?: (option) => string | JSX.Element;
62
53
  };
63
- file?: {
64
- multiple?: boolean;
65
- accept?: string;
66
- maxFileSize?: number;
67
- CustomDropZoneContent: ({ files }) => JSX.Element;
68
- };
69
54
  custom?: {
70
55
  Component: React.ComponentType<InputPropsWithoutGroup>;
71
56
  };
@@ -118,7 +103,6 @@ export interface InputProps {
118
103
  placeholder?: string;
119
104
  type?: string;
120
105
  min?: number;
121
- fullWidth?: boolean;
122
106
  };
123
107
  type: InputType;
124
108
  }
@@ -8,7 +8,7 @@ import { Typography } from '@mui/material';
8
8
  import { SelectEntry } from '../InputField/Select';
9
9
  import { Listing } from '../api/models';
10
10
 
11
- import { array, boolean, mixed, number, object, string } from 'yup';
11
+ import { array, boolean, number, object, string } from 'yup';
12
12
  import {
13
13
  Group,
14
14
  InputProps,
@@ -78,8 +78,7 @@ export const basicFormValidationSchema = object().shape({
78
78
  })
79
79
  ),
80
80
  scopes: array().of(string().min(3, '3 characters min').required('Required')),
81
- sports: array().of(selectEntryValidationSchema.required('Required')),
82
- file: mixed()
81
+ sports: array().of(selectEntryValidationSchema.required('Required'))
83
82
  });
84
83
 
85
84
  const roleEntries: Array<SelectEntry> = [
@@ -135,8 +134,7 @@ export const basicFormInitialValues = {
135
134
  }
136
135
  ],
137
136
  scopes: [],
138
- sports: [],
139
- file: null
137
+ sports: []
140
138
  };
141
139
 
142
140
  export const classOptions = [...Array(10).keys()].map((idx) => ({
@@ -446,16 +444,6 @@ export const basicFormInputs: Array<InputProps> = [
446
444
  multilineRows: 4
447
445
  },
448
446
  type: InputType.Text
449
- },
450
- {
451
- fieldName: 'file',
452
- group: 'First group',
453
- label: 'File',
454
- type: InputType.File,
455
- file: {
456
- accept: 'image/*',
457
- multiple: true
458
- }
459
447
  }
460
448
  ];
461
449
 
@@ -5,4 +5,3 @@ export const labelSaved = 'Saved';
5
5
  export const labelReset = 'Reset';
6
6
  export const labelDisplayThePassword = 'Display the password';
7
7
  export const labelHideThePassword = 'Hide the password';
8
- export const labelDropOrSelectAFile = 'Drop or select a file';
@@ -38,7 +38,6 @@ export interface BarChartProps
38
38
  start: string;
39
39
  thresholdUnit?: string;
40
40
  thresholds?: Thresholds;
41
- skipIntersectionObserver?: boolean;
42
41
  }
43
42
 
44
43
  const BarChart = ({
@@ -58,8 +57,7 @@ const BarChart = ({
58
57
  barStyle = {
59
58
  opacity: 1,
60
59
  radius: 0.2
61
- },
62
- skipIntersectionObserver
60
+ }
63
61
  }: BarChartProps): JSX.Element => {
64
62
  const { adjustedData } = useChartData({ data, end, start });
65
63
  const lineChartRef = useRef<HTMLDivElement | null>(null);
@@ -95,7 +93,6 @@ const BarChart = ({
95
93
  thresholds={thresholds}
96
94
  tooltip={tooltip}
97
95
  width={width}
98
- skipIntersectionObserver={skipIntersectionObserver}
99
96
  />
100
97
  )}
101
98
  </ParentSize>
@@ -54,8 +54,7 @@ const ResponsiveBarChart = ({
54
54
  limitLegend,
55
55
  orientation,
56
56
  tooltip,
57
- barStyle,
58
- skipIntersectionObserver
57
+ barStyle
59
58
  }: Props): JSX.Element => {
60
59
  const { title, timeSeries, baseAxis, lines } = graphData;
61
60
 
@@ -150,7 +149,7 @@ const ResponsiveBarChart = ({
150
149
  [axis?.showGridLines]
151
150
  );
152
151
 
153
- if (!isInViewport && !skipIntersectionObserver) {
152
+ if (!isInViewport) {
154
153
  return (
155
154
  <Skeleton
156
155
  height={graphSvgRef?.current?.clientHeight ?? graphHeight}
@@ -56,10 +56,6 @@ interface Props extends LineChartProps {
56
56
  shapeLines?: GlobalAreaLines;
57
57
  thresholdUnit?: string;
58
58
  thresholds?: ThresholdsModel;
59
- transformMatrix?: {
60
- fx?: (pointX: number) => number;
61
- fy?: (pointY: number) => number;
62
- }
63
59
  }
64
60
 
65
61
  const filterLines = (lines: Array<Line>, displayThreshold): Array<Line> => {
@@ -101,9 +97,7 @@ const Chart = ({
101
97
  },
102
98
  thresholds,
103
99
  thresholdUnit,
104
- limitLegend,
105
- skipIntersectionObserver,
106
- transformMatrix
100
+ limitLegend
107
101
  }: Props): JSX.Element => {
108
102
  const { classes } = useChartStyles();
109
103
 
@@ -225,7 +219,7 @@ const Chart = ({
225
219
  [axis?.showGridLines]
226
220
  );
227
221
 
228
- if (!isInViewport && !skipIntersectionObserver) {
222
+ if (!isInViewport) {
229
223
  return (
230
224
  <Skeleton
231
225
  height={graphSvgRef?.current?.clientHeight ?? graphHeight}
@@ -325,7 +319,6 @@ const Chart = ({
325
319
  graphInterval
326
320
  }}
327
321
  zoomData={{ ...zoomPreview }}
328
- transformMatrix={transformMatrix}
329
322
  />
330
323
  {thresholds?.enabled && (
331
324
  <Thresholds
@@ -58,10 +58,10 @@ const useTickGraph = ({
58
58
  return;
59
59
  }
60
60
  const mousePositionTimeTick = mousePosition
61
- ? getTimeValue({ timeSeries, x: mousePosition[0], xScale })?.timeTick
61
+ ? getTimeValue({ timeSeries, x: mousePosition[0], xScale }).timeTick
62
62
  : 0;
63
63
  const timeTickValue = mousePosition
64
- ? new Date(mousePositionTimeTick || 0)
64
+ ? new Date(mousePositionTimeTick)
65
65
  : null;
66
66
 
67
67
  setTickAxisBottom(timeTickValue);
@@ -76,18 +76,13 @@ interface Props {
76
76
  commonData: CommonData;
77
77
  timeShiftZonesData: TimeShiftZonesData;
78
78
  zoomData: ZoomPreviewModel;
79
- transformMatrix?: {
80
- fx?: (pointX: number) => number;
81
- fy?: (pointY: number) => number;
82
- }
83
79
  }
84
80
 
85
81
  const InteractionWithGraph = ({
86
82
  zoomData,
87
83
  commonData,
88
84
  annotationData,
89
- timeShiftZonesData,
90
- transformMatrix
85
+ timeShiftZonesData
91
86
  }: Props): JSX.Element => {
92
87
  const { classes } = useStyles();
93
88
 
@@ -132,10 +127,7 @@ const InteractionWithGraph = ({
132
127
  if (!mousePoint) {
133
128
  return;
134
129
  }
135
- updateMousePosition([
136
- transformMatrix?.fx?.(mousePoint.x) ?? mousePoint.x,
137
- transformMatrix?.fy?.(mousePoint.y) ?? mousePoint.y
138
- ]);
130
+ updateMousePosition([mousePoint.x, mousePoint.y]);
139
131
  };
140
132
 
141
133
  const mouseDown = (event): void => {
@@ -2,15 +2,15 @@ import dayjs from 'dayjs';
2
2
  import durationPlugin from 'dayjs/plugin/duration';
3
3
  import { gt, gte, isEmpty, isNil, prop, propEq, reject, sortBy } from 'ramda';
4
4
 
5
- import type { LineChartData } from '../../common/models';
5
+ import { LineChartData } from '../../common/models';
6
6
  import {
7
7
  getLineData,
8
8
  getTimeSeries,
9
9
  getTimeValue
10
10
  } from '../../common/timeSeries';
11
- import type { LinesData } from '../BasicComponents/Lines/models';
11
+ import { LinesData } from '../BasicComponents/Lines/models';
12
12
  import { dateFormat, timeFormat } from '../common';
13
- import type { GetDate, GraphInterval } from '../models';
13
+ import { GetDate, GraphInterval } from '../models';
14
14
 
15
15
  dayjs.extend(durationPlugin);
16
16
 
@@ -56,11 +56,11 @@ export const displayArea = (data: unknown): boolean =>
56
56
  !isEmpty(data) && !isNil(data);
57
57
 
58
58
  export const getDate = ({ positionX, xScale, timeSeries }: GetDate): Date => {
59
- const timeValue = getTimeValue({
59
+ const { timeTick } = getTimeValue({
60
60
  timeSeries,
61
61
  x: positionX,
62
62
  xScale
63
63
  });
64
64
 
65
- return new Date(timeValue?.timeTick || 0);
65
+ return new Date(timeTick);
66
66
  };
@@ -34,10 +34,6 @@ interface Props extends Partial<LineChartProps> {
34
34
  thresholds?: Thresholds;
35
35
  getRef?: (ref: MutableRefObject<HTMLDivElement | null>) => void;
36
36
  containerStyle?: string;
37
- transformMatrix?: {
38
- fx?: (pointX: number) => number;
39
- fy?: (pointY: number) => number;
40
- }
41
37
  }
42
38
 
43
39
  const WrapperChart = ({
@@ -69,7 +65,6 @@ const WrapperChart = ({
69
65
  thresholdUnit,
70
66
  limitLegend,
71
67
  getRef,
72
- transformMatrix,
73
68
  ...rest
74
69
  }: Props): JSX.Element | null => {
75
70
  const { classes, cx } = useChartStyles();
@@ -125,8 +120,6 @@ const WrapperChart = ({
125
120
  tooltip={tooltip}
126
121
  width={width ?? responsiveWidth}
127
122
  zoomPreview={zoomPreview}
128
- skipIntersectionObserver={rest.skipIntersectionObserver}
129
- transformMatrix={transformMatrix}
130
123
  />
131
124
  );
132
125
  }}
@@ -120,7 +120,6 @@ export interface LineChartProps {
120
120
  tooltip?: Tooltip;
121
121
  width: number;
122
122
  zoomPreview?: InteractedZone;
123
- skipIntersectionObserver?: boolean;
124
123
  }
125
124
 
126
125
  export interface Area {
@@ -77,7 +77,7 @@ const OptionalLabelInputAdornment = ({
77
77
  type SizeVariant = 'large' | 'medium' | 'small' | 'compact';
78
78
 
79
79
  export type TextProps = {
80
- EndAdornment?: React.FC | JSX.Element;
80
+ EndAdornment?: React.FC;
81
81
  StartAdornment?: React.FC;
82
82
  ariaLabel?: string;
83
83
  autoSize?: boolean;
@@ -139,7 +139,6 @@ export interface Props<TRow> {
139
139
  totalRows?: number;
140
140
  viewerModeConfiguration?: ViewerModeConfiguration;
141
141
  widthToMoveTablePagination?: number;
142
- isActionBarVisible: boolean;
143
142
  }
144
143
 
145
144
  const defaultColumnConfiguration = {
@@ -148,13 +147,7 @@ const defaultColumnConfiguration = {
148
147
 
149
148
  export const performanceRowsLimit = 60;
150
149
 
151
- const Listing = <
152
- TRow extends {
153
- id: RowId;
154
- internalListingParentId?: RowId;
155
- internalListingParentRow: TRow;
156
- }
157
- >({
150
+ const Listing = <TRow extends { id: RowId; internalListingParentId?: RowId }>({
158
151
  customListingComponent,
159
152
  displayCustomListing,
160
153
  limit = 10,
@@ -198,8 +191,7 @@ const Listing = <
198
191
  getRowProperty: () => '',
199
192
  labelCollapse: 'Collapse',
200
193
  labelExpand: 'Expand'
201
- },
202
- isActionBarVisible = true
194
+ }
203
195
  }: Props<TRow>): JSX.Element => {
204
196
  const currentVisibleColumns = getVisibleColumns({
205
197
  columnConfiguration,
@@ -254,8 +246,7 @@ const Listing = <
254
246
  row,
255
247
  ...row[subItems.getRowProperty()].map((subRow) => ({
256
248
  ...subRow,
257
- internalListingParentId: row.id,
258
- internalListingParentRow: row
249
+ internalListingParentId: row.id
259
250
  }))
260
251
  ];
261
252
  }
@@ -526,33 +517,30 @@ const Listing = <
526
517
  className={classes.container}
527
518
  ref={containerRef as RefObject<HTMLDivElement>}
528
519
  >
529
- {
530
- isActionBarVisible &&
531
- <div
532
- className={classes.actionBar}
533
- ref={actionBarRef as RefObject<HTMLDivElement>}
534
- >
535
- <ListingActionBar
536
- actions={actions}
537
- actionsBarMemoProps={actionsBarMemoProps}
538
- columnConfiguration={columnConfiguration}
539
- columns={columns}
540
- currentPage={currentPage}
541
- customPaginationClassName={customPaginationClassName}
542
- limit={limit}
543
- listingVariant={listingVariant}
544
- moveTablePagination={moveTablePagination}
545
- paginated={paginated}
546
- totalRows={totalRows}
547
- viewerModeConfiguration={viewerModeConfiguration}
548
- widthToMoveTablePagination={widthToMoveTablePagination}
549
- onLimitChange={changeLimit}
550
- onPaginate={onPaginate}
551
- onResetColumns={onResetColumns}
552
- onSelectColumns={onSelectColumns}
553
- />
554
- </div>
555
- }
520
+ <div
521
+ className={classes.actionBar}
522
+ ref={actionBarRef as RefObject<HTMLDivElement>}
523
+ >
524
+ <ListingActionBar
525
+ actions={actions}
526
+ actionsBarMemoProps={actionsBarMemoProps}
527
+ columnConfiguration={columnConfiguration}
528
+ columns={columns}
529
+ currentPage={currentPage}
530
+ customPaginationClassName={customPaginationClassName}
531
+ limit={limit}
532
+ listingVariant={listingVariant}
533
+ moveTablePagination={moveTablePagination}
534
+ paginated={paginated}
535
+ totalRows={totalRows}
536
+ viewerModeConfiguration={viewerModeConfiguration}
537
+ widthToMoveTablePagination={widthToMoveTablePagination}
538
+ onLimitChange={changeLimit}
539
+ onPaginate={onPaginate}
540
+ onResetColumns={onResetColumns}
541
+ onSelectColumns={onSelectColumns}
542
+ />
543
+ </div>
556
544
 
557
545
  <ParentSize
558
546
  parentSizeStyles={{
@@ -76,11 +76,3 @@ export interface TableStyleAtom {
76
76
  width: number;
77
77
  };
78
78
  }
79
-
80
- export interface ListingSubItems {
81
- canCheckSubItems: boolean;
82
- enable: boolean;
83
- getRowProperty: (row?) => string;
84
- labelCollapse: string;
85
- labelExpand: string;
86
- }
@@ -134,6 +134,8 @@ const MultiSelectEntries = ({
134
134
  [classes.container]: true
135
135
  } as CxArg)}
136
136
  ref={hoverRef as Ref<HTMLDivElement>}
137
+ role="button"
138
+ tabIndex={0}
137
139
  onClick={onClick}
138
140
  onKeyDown={onClick}
139
141
  >
@@ -10,7 +10,6 @@ import {
10
10
  } from '@mui/material';
11
11
  import type { PopperProps } from '@mui/material/Popper';
12
12
 
13
- import { equals, type } from 'ramda';
14
13
  import { IconButton } from '..';
15
14
 
16
15
  const useStyles = makeStyles()((theme) => ({
@@ -30,9 +29,8 @@ interface PopoverData {
30
29
 
31
30
  interface Props {
32
31
  canOpen?: boolean;
33
- children: (props?) => JSX.Element | JSX.Element;
32
+ children: (props?) => JSX.Element;
34
33
  className?: string;
35
- tooltipClassName?: string;
36
34
  dataTestId?: string;
37
35
  getPopoverData?: (data: PopoverData) => void;
38
36
  icon: JSX.Element;
@@ -54,7 +52,6 @@ const PopoverMenu = ({
54
52
  className,
55
53
  dataTestId,
56
54
  getPopoverData,
57
- tooltipClassName,
58
55
  popperProps
59
56
  }: Props): JSX.Element => {
60
57
  const { classes, cx } = useStyles();
@@ -116,11 +113,7 @@ const PopoverMenu = ({
116
113
  onResizeCapture={(): undefined => undefined}
117
114
  {...popperProps}
118
115
  >
119
- <Paper className={tooltipClassName}>
120
- {equals(type(children), 'Function')
121
- ? children({ close })
122
- : children}
123
- </Paper>
116
+ <Paper>{children({ close })}</Paper>
124
117
  </Popper>
125
118
  </ClickAwayListener>
126
119
  )}
@@ -185,7 +185,6 @@ const SortableItems = <T extends { [propertyToFilterItemsOn]: string }>({
185
185
  >
186
186
  <SortableContext items={sortableItemsIds} strategy={sortingStrategy}>
187
187
  <RootComponent>
188
- {/* biome-ignore lint: */}
189
188
  <>
190
189
  {sortableItemsIds.map((sortableItemId, index) => {
191
190
  const item = getItemById(sortableItemId) as
@@ -261,7 +261,7 @@ export const getTheme = (mode: ThemeMode): ThemeOptions => ({
261
261
  {
262
262
  backgroundColor: theme.palette.background.default,
263
263
  border: 'none',
264
- borderRadius: `${theme.shape.borderRadius}px`,
264
+ borderRadius: 0,
265
265
  boxShadow: theme.shadows[3]
266
266
  }
267
267
  })
@@ -157,7 +157,7 @@ declare module '@mui/material/Badge' {
157
157
 
158
158
  export const lightPalette: PaletteOptions = {
159
159
  action: {
160
- acknowledged: '#745F35',
160
+ acknowledged: '#67532C',
161
161
  acknowledgedBackground: '#DFD2B9',
162
162
  activatedOpacity: 0.12,
163
163
  active: '#666666',
@@ -167,7 +167,7 @@ export const lightPalette: PaletteOptions = {
167
167
  focusOpacity: 0.12,
168
168
  hover: 'rgba(0, 0, 0, 0.06)',
169
169
  hoverOpacity: 0.06,
170
- inDowntime: '#512980',
170
+ inDowntime: '#4B2352',
171
171
  inDowntimeBackground: '#E5D8F3',
172
172
  selected: 'rgba(102, 102, 102, 0.3)',
173
173
  selectedOpacity: 0.3
@@ -297,7 +297,7 @@ export const lightPalette: PaletteOptions = {
297
297
 
298
298
  export const darkPalette: PaletteOptions = {
299
299
  action: {
300
- acknowledged: '#DFD2B9',
300
+ acknowledged: '#67532C',
301
301
  acknowledgedBackground: '#745F35',
302
302
  activatedOpacity: 0.3,
303
303
  active: '#B5B5B5',
@@ -307,7 +307,7 @@ export const darkPalette: PaletteOptions = {
307
307
  focusOpacity: 0.3,
308
308
  hover: 'rgba(255, 255, 255, 0.16)',
309
309
  hoverOpacity: 0.16,
310
- inDowntime: '#E5D8F3',
310
+ inDowntime: '#4B2352',
311
311
  inDowntimeBackground: '#512980',
312
312
  selected: 'rgba(255, 255, 255, 0.5)',
313
313
  selectedOpacity: 0.5
@@ -53,8 +53,7 @@ const initializeDataTableEmpty = (canCreate = false): void => {
53
53
  actions: {
54
54
  create: 'Create'
55
55
  },
56
- title: 'Welcome',
57
- description: 'Description'
56
+ title: 'Welcome'
58
57
  }}
59
58
  onCreate={cy.stub()}
60
59
  />
@@ -48,23 +48,6 @@ export const AsEmptyState: Story = {
48
48
  }
49
49
  };
50
50
 
51
- export const AsEmptyStateWithDescription: Story = {
52
- args: {
53
- children: (
54
- <DataTable.EmptyState
55
- labels={{
56
- actions: {
57
- create: 'Create item'
58
- },
59
- title: 'No items found',
60
- description: 'Description'
61
- }}
62
- />
63
- ),
64
- isEmpty: true
65
- }
66
- };
67
-
68
51
  export const withFixedHeightContainer: Story = {
69
52
  args: { ...Default.args },
70
53
  render: (args) => (
@@ -10,6 +10,7 @@ const useStyles = makeStyles()((theme) => ({
10
10
  display: 'flex',
11
11
  flexDirection: 'column',
12
12
  gap: theme.spacing(4),
13
+
13
14
  h2: {
14
15
  color: theme.palette.text.primary,
15
16
  font: 'normal normal 600 34px/36px Roboto',
@@ -19,9 +20,6 @@ const useStyles = makeStyles()((theme) => ({
19
20
  justifyContent: 'center',
20
21
  minHeight: '30vh',
21
22
  width: '100%'
22
- },
23
- description: {
24
- maxWidth: '65%'
25
23
  }
26
24
  }));
27
25