@centreon/ui 24.4.59 → 24.4.61

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 (163) hide show
  1. package/package.json +50 -42
  2. package/public/mockServiceWorker.js +1 -1
  3. package/src/ActionsList/ActionsList.styles.ts +40 -71
  4. package/src/Button/Icon/index.tsx +1 -1
  5. package/src/Button/Save/StartIcon.tsx +3 -3
  6. package/src/Button/Save/index.tsx +9 -5
  7. package/src/Checkbox/Checkbox.tsx +2 -2
  8. package/src/Checkbox/CheckboxGroup/index.tsx +2 -2
  9. package/src/Dashboard/Item.tsx +1 -1
  10. package/src/Dashboard/Layout.tsx +2 -2
  11. package/src/Dialog/Confirm/index.tsx +10 -2
  12. package/src/Dialog/UnsavedChanges/index.tsx +21 -20
  13. package/src/Dialog/UnsavedChanges/translatedLabels.ts +4 -6
  14. package/src/Dialog/index.tsx +9 -2
  15. package/src/FallbackPage/FallbackPage.tsx +3 -3
  16. package/src/FileDropZone/index.tsx +3 -1
  17. package/src/Form/Form.cypress.spec.tsx +133 -0
  18. package/src/Form/Inputs/List/Content.tsx +62 -0
  19. package/src/Form/Inputs/List/List.styles.ts +29 -0
  20. package/src/Form/Inputs/List/List.tsx +58 -0
  21. package/src/Form/Inputs/List/useList.ts +81 -0
  22. package/src/Form/Inputs/Text.tsx +3 -1
  23. package/src/Form/Inputs/index.tsx +3 -1
  24. package/src/Form/Inputs/models.ts +10 -1
  25. package/src/Graph/BarStack/BarStack.cypress.spec.tsx +154 -0
  26. package/src/Graph/BarStack/BarStack.stories.tsx +123 -0
  27. package/src/Graph/BarStack/BarStack.styles.ts +37 -0
  28. package/src/Graph/BarStack/BarStack.tsx +14 -0
  29. package/src/Graph/BarStack/ResponsiveBarStack.tsx +222 -0
  30. package/src/Graph/BarStack/index.ts +1 -0
  31. package/src/Graph/BarStack/models.ts +20 -0
  32. package/src/Graph/BarStack/useResponsiveBarStack.ts +137 -0
  33. package/src/Graph/Gauge/Gauge.cypress.spec.tsx +102 -0
  34. package/src/Graph/Gauge/Gauge.tsx +1 -1
  35. package/src/Graph/HeatMap/HeatMap.cypress.spec.tsx +145 -0
  36. package/src/Graph/HeatMap/HeatMap.stories.tsx +0 -25
  37. package/src/Graph/HeatMap/ResponsiveHeatMap.tsx +8 -2
  38. package/src/Graph/Legend/Legend.tsx +21 -0
  39. package/src/Graph/Legend/index.ts +1 -0
  40. package/src/Graph/Legend/models.ts +11 -0
  41. package/src/Graph/LineChart/BasicComponents/Lines/Threshold/Circle.tsx +2 -2
  42. package/src/Graph/LineChart/BasicComponents/Thresholds.tsx +2 -2
  43. package/src/Graph/LineChart/BasicComponents/useFilterLines.ts +1 -1
  44. package/src/Graph/LineChart/InteractiveComponents/AnchorPoint/GuidingLines.tsx +2 -2
  45. package/src/Graph/LineChart/InteractiveComponents/Annotations/EventAnnotations.tsx +1 -1
  46. package/src/Graph/LineChart/Legend/Legend.styles.ts +1 -1
  47. package/src/Graph/LineChart/Legend/LegendHeader.tsx +1 -1
  48. package/src/Graph/LineChart/Legend/useInteractiveValues.ts +2 -2
  49. package/src/Graph/LineChart/Legend/useLegend.ts +3 -3
  50. package/src/Graph/LineChart/helpers/doc.ts +16 -13
  51. package/src/Graph/LineChart/helpers/index.ts +1 -1
  52. package/src/Graph/LineChart/index.stories.tsx +4 -2
  53. package/src/Graph/LineChart/index.tsx +1 -1
  54. package/src/Graph/PieChart/PieChart.cypress.spec.tsx +169 -0
  55. package/src/Graph/PieChart/PieChart.stories.tsx +194 -0
  56. package/src/Graph/PieChart/PieChart.styles.ts +39 -0
  57. package/src/Graph/PieChart/PieChart.tsx +14 -0
  58. package/src/Graph/PieChart/ResponsivePie.tsx +254 -0
  59. package/src/Graph/PieChart/index.ts +1 -0
  60. package/src/Graph/PieChart/models.ts +20 -0
  61. package/src/Graph/PieChart/useResponsivePie.ts +85 -0
  62. package/src/Graph/SingleBar/SingleBar.cypress.spec.tsx +121 -0
  63. package/src/Graph/SingleBar/Thresholds.tsx +2 -2
  64. package/src/Graph/Text/Text.cypress.spec.tsx +101 -0
  65. package/src/Graph/Text/Text.stories.tsx +60 -4
  66. package/src/Graph/Text/Text.tsx +1 -1
  67. package/src/Graph/common/testUtils.ts +71 -0
  68. package/src/Graph/common/timeSeries/index.ts +22 -14
  69. package/src/Graph/common/utils.ts +19 -0
  70. package/src/Graph/index.ts +3 -0
  71. package/src/Graph/translatedLabels.ts +1 -0
  72. package/src/InputField/Select/Autocomplete/Connected/index.tsx +10 -7
  73. package/src/InputField/Select/Autocomplete/Draggable/SortableList.tsx +1 -1
  74. package/src/InputField/Select/Autocomplete/Draggable/SortableListContent.tsx +1 -1
  75. package/src/InputField/Select/Autocomplete/Draggable/index.tsx +1 -1
  76. package/src/InputField/Select/Autocomplete/Multi/index.tsx +4 -2
  77. package/src/InputField/Select/Autocomplete/index.tsx +129 -116
  78. package/src/InputField/Select/IconPopover/index.tsx +2 -2
  79. package/src/InputField/Select/index.tsx +15 -2
  80. package/src/InputField/Text/index.tsx +2 -2
  81. package/src/Listing/ActionBar/index.tsx +9 -8
  82. package/src/Listing/Cell/DataCell.styles.ts +3 -0
  83. package/src/Listing/Cell/DataCell.tsx +23 -5
  84. package/src/Listing/Header/ListingHeader.tsx +1 -1
  85. package/src/Listing/Listing.cypress.spec.tsx +218 -33
  86. package/src/Listing/Listing.styles.ts +4 -7
  87. package/src/Listing/Row/Row.tsx +7 -3
  88. package/src/Listing/index.stories.tsx +37 -3
  89. package/src/Listing/index.test.tsx +1 -1
  90. package/src/Listing/index.tsx +80 -36
  91. package/src/Listing/models.ts +1 -0
  92. package/src/Listing/useStyleTable.ts +1 -0
  93. package/src/Module/Module.cypress.spec.tsx +129 -0
  94. package/src/Module/index.tsx +2 -4
  95. package/src/PopoverMenu/index.tsx +6 -5
  96. package/src/RichTextEditor/RichTextEditor.tsx +12 -1
  97. package/src/SortableItems/index.tsx +2 -7
  98. package/src/ThemeProvider/index.tsx +24 -0
  99. package/src/TimePeriods/CustomTimePeriod/CompactCustomTimePeriod.styles.ts +6 -7
  100. package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/PickersStartEndDate.tsx +8 -3
  101. package/src/TimePeriods/CustomTimePeriod/PopoverCustomTimePeriod/models.ts +0 -2
  102. package/src/TimePeriods/DateTimePickerInput.tsx +56 -19
  103. package/src/TimePeriods/ResolutionTimePeriod.cypress.spec.tsx +12 -9
  104. package/src/TimePeriods/TimePeriods.cypress.spec.tsx +9 -33
  105. package/src/TimePeriods/helpers/index.ts +1 -1
  106. package/src/TimePeriods/index.stories.tsx +12 -4
  107. package/src/TimePeriods/index.tsx +2 -2
  108. package/src/Typography/FluidTypography/FluidTypography.cypress.spec.tsx +27 -0
  109. package/src/Typography/FluidTypography/index.stories.tsx +2 -2
  110. package/src/Typography/FluidTypography/index.tsx +21 -28
  111. package/src/api/QueryProvider.tsx +1 -1
  112. package/src/api/TestQueryProvider.tsx +1 -1
  113. package/src/api/index.ts +3 -3
  114. package/src/api/useFetchQuery/index.ts +27 -23
  115. package/src/api/useMutationQuery/index.test.ts +4 -4
  116. package/src/api/useMutationQuery/index.ts +60 -25
  117. package/src/components/Button/Icon/IconButton.tsx +6 -2
  118. package/src/components/DataTable/DataListing.tsx +6 -0
  119. package/src/components/DataTable/DataTable.cypress.spec.tsx +174 -0
  120. package/src/components/DataTable/DataTable.stories.tsx +40 -0
  121. package/src/components/DataTable/DataTable.styles.ts +3 -0
  122. package/src/components/DataTable/DataTable.tsx +3 -3
  123. package/src/components/DataTable/Item/DataTableItem.styles.ts +7 -2
  124. package/src/components/DataTable/Item/DataTableItem.tsx +4 -60
  125. package/src/components/DataTable/index.ts +3 -1
  126. package/src/components/Form/AccessRights/AccessRights.cypress.spec.tsx +13 -13
  127. package/src/components/Form/AccessRights/ShareInput/ContactSwitch.tsx +3 -3
  128. package/src/components/Form/AccessRights/ShareInput/ShareInput.tsx +1 -0
  129. package/src/components/Form/AccessRights/storiesData.ts +22 -22
  130. package/src/components/Form/Dashboard/DashboardDuplicationForm.tsx +85 -0
  131. package/src/components/Form/Dashboard/DashboardForm.tsx +15 -12
  132. package/src/components/Form/Dashboard/index.ts +1 -0
  133. package/src/components/Form/FormActions.tsx +7 -2
  134. package/src/components/ItemComposition/ItemComposition.styles.ts +2 -2
  135. package/src/components/Layout/PageLayout/PageLayout.tsx +1 -1
  136. package/src/components/Layout/PageLayout/PageLayoutActions.tsx +1 -0
  137. package/src/components/Layout/PageLayout/PageLayoutBody.tsx +1 -0
  138. package/src/components/Layout/PageLayout/PageLayoutHeader.tsx +5 -1
  139. package/src/components/Layout/PageLayout/PageQuickAccess.tsx +76 -0
  140. package/src/components/Layout/PageLayout/index.ts +3 -1
  141. package/src/components/Layout/PageLayout.cypress.spec.tsx +66 -0
  142. package/src/components/List/Item/ListItem.tsx +3 -3
  143. package/src/components/Modal/ConfirmationModal/ConfirmationModal.cypress.spec.tsx +168 -0
  144. package/src/components/Modal/ConfirmationModal/ConfirmationModal.stories.tsx +62 -0
  145. package/src/components/Modal/ConfirmationModal/ConfirmationModal.tsx +87 -0
  146. package/src/components/Modal/Modal.styles.ts +8 -3
  147. package/src/components/Modal/index.ts +2 -0
  148. package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.stories.tsx +3 -3
  149. package/src/components/Tooltip/ConfirmationTooltip/ConfirmationTooltip.tsx +1 -1
  150. package/src/components/Tooltip/ConfirmationTooltip/models.ts +1 -1
  151. package/src/index.ts +2 -2
  152. package/src/queryParameters/url/index.ts +5 -1
  153. package/src/utils/index.ts +1 -1
  154. package/src/utils/useFullscreen/Fullscreen.cypress.spec.tsx +1 -3
  155. package/src/utils/useFullscreen/useFullscreenListener.ts +10 -7
  156. package/src/utils/useInfiniteScrollListing.ts +4 -1
  157. package/src/utils/{useLicenseExpirationWarning.cypress.spec.tsx → useLicenseExpirationWarning.test.tsx} +48 -37
  158. package/src/utils/useLicenseExpirationWarning.ts +18 -18
  159. package/src/utils/usePluralizedTranslation.ts +21 -0
  160. package/src/Typography/FluidTypography/useFluidResizeObserver.ts +0 -56
  161. package/src/screens/dashboard/DashboardsDetail.stories.tsx +0 -108
  162. package/src/screens/dashboard/DashboardsOverview.stories.tsx +0 -281
  163. package/src/utils/useDateTimePickerAdapter.ts +0 -309
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
 
3
- import { equals, isNil, pick } from 'ramda';
3
+ import { equals, isEmpty, isNil, pick } from 'ramda';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { makeStyles } from 'tss-react/mui';
6
6
 
@@ -141,126 +141,139 @@ type Multiple = boolean;
141
141
  type DisableClearable = boolean;
142
142
  type FreeSolo = boolean;
143
143
 
144
- const AutocompleteField = ({
145
- options,
146
- label,
147
- placeholder,
148
- loading = false,
149
- onTextChange = (): void => undefined,
150
- endAdornment = undefined,
151
- inputValue,
152
- displayOptionThumbnail = false,
153
- required = false,
154
- error,
155
- displayPopupIcon = true,
156
- autoFocus = false,
157
- hideInput = false,
158
- dataTestId,
159
- autoSize = false,
160
- autoSizeDefaultWidth = 0,
161
- autoSizeCustomPadding,
162
- getOptionItemLabel = (option) => option.name,
163
- ...autocompleteProps
164
- }: Props): JSX.Element => {
165
- const { classes, cx } = useStyles({ hideInput });
166
- const { t } = useTranslation();
167
- const theme = useTheme();
144
+ const AutocompleteField = React.forwardRef(
145
+ (
146
+ {
147
+ options,
148
+ label,
149
+ placeholder,
150
+ loading = false,
151
+ onTextChange = (): void => undefined,
152
+ endAdornment = undefined,
153
+ inputValue,
154
+ displayOptionThumbnail = false,
155
+ required = false,
156
+ error,
157
+ displayPopupIcon = true,
158
+ autoFocus = false,
159
+ hideInput = false,
160
+ dataTestId,
161
+ autoSize = false,
162
+ autoSizeDefaultWidth = 0,
163
+ autoSizeCustomPadding,
164
+ getOptionItemLabel = (option) => option.name,
165
+ ...autocompleteProps
166
+ }: Props,
167
+ ref?: React.ForwardedRef<HTMLDivElement>
168
+ ): JSX.Element => {
169
+ const { classes, cx } = useStyles({ hideInput });
170
+ const { t } = useTranslation();
171
+ const theme = useTheme();
168
172
 
169
- const areSelectEntriesEqual = (option, value): boolean => {
170
- const identifyingProps = ['id', 'name'];
173
+ const areSelectEntriesEqual = (option, value): boolean => {
174
+ const identifyingProps = ['id', 'name'];
171
175
 
172
- return equals(
173
- pick(identifyingProps, option),
174
- pick(identifyingProps, value)
176
+ return equals(
177
+ pick(identifyingProps, option),
178
+ pick(identifyingProps, value)
179
+ );
180
+ };
181
+
182
+ const renderInput = (params): JSX.Element => (
183
+ <TextField
184
+ {...params}
185
+ InputLabelProps={{
186
+ classes: {
187
+ marginDense: classes.inputLabel,
188
+ shrink: classes.inputLabelShrink
189
+ }
190
+ }}
191
+ InputProps={{
192
+ ...params.InputProps,
193
+ endAdornment: (
194
+ <>
195
+ {endAdornment && (
196
+ <InputAdornment position="end">{endAdornment}</InputAdornment>
197
+ )}
198
+ {params.InputProps.endAdornment}
199
+ </>
200
+ ),
201
+ style: {
202
+ background: 'transparent',
203
+ minWidth: 0,
204
+ padding: theme.spacing(
205
+ 0.75,
206
+ isEmpty(placeholder) ? 0 : 5,
207
+ 0.75,
208
+ 0.75
209
+ )
210
+ }
211
+ }}
212
+ autoFocus={autoFocus}
213
+ autoSize={autoSize}
214
+ autoSizeCustomPadding={7 + (autoSizeCustomPadding || 0)}
215
+ autoSizeDefaultWidth={autoSizeDefaultWidth}
216
+ classes={{
217
+ root: classes.textfield
218
+ }}
219
+ error={error}
220
+ externalValueForAutoSize={autocompleteProps?.value?.name}
221
+ inputProps={{
222
+ ...params.inputProps,
223
+ 'aria-label': label,
224
+ 'data-testid': dataTestId || label,
225
+ id: getNormalizedId(label || ''),
226
+ ...autocompleteProps?.inputProps
227
+ }}
228
+ label={label}
229
+ placeholder={isNil(placeholder) ? t(searchLabel) : placeholder}
230
+ required={required}
231
+ value={inputValue || undefined}
232
+ onChange={onTextChange}
233
+ />
175
234
  );
176
- };
177
235
 
178
- const renderInput = (params): JSX.Element => (
179
- <TextField
180
- {...params}
181
- InputLabelProps={{
182
- classes: {
183
- marginDense: classes.inputLabel,
184
- shrink: classes.inputLabelShrink
185
- }
186
- }}
187
- InputProps={{
188
- ...params.InputProps,
189
- endAdornment: (
190
- <>
191
- {endAdornment && (
192
- <InputAdornment position="end">{endAdornment}</InputAdornment>
193
- )}
194
- {params.InputProps.endAdornment}
195
- </>
196
- ),
197
- style: {
198
- background: 'transparent',
199
- paddingRight: theme.spacing(5)
236
+ return (
237
+ <Autocomplete
238
+ disableClearable
239
+ classes={{
240
+ groupLabel: classes.inputLabel,
241
+ inputRoot: cx([
242
+ classes.input,
243
+ label ? classes.inputWithLabel : classes.inputWithoutLabel
244
+ ]),
245
+ popper: classes.popper,
246
+ root: classes.textfield
247
+ }}
248
+ forcePopupIcon={displayPopupIcon}
249
+ getOptionLabel={(option): string =>
250
+ (option as SelectEntry)?.name?.toString() || ''
200
251
  }
201
- }}
202
- autoFocus={autoFocus}
203
- autoSize={autoSize}
204
- autoSizeCustomPadding={7 + (autoSizeCustomPadding || 0)}
205
- autoSizeDefaultWidth={autoSizeDefaultWidth}
206
- classes={{
207
- root: classes.textfield
208
- }}
209
- error={error}
210
- externalValueForAutoSize={autocompleteProps?.value?.name}
211
- inputProps={{
212
- ...params.inputProps,
213
- 'aria-label': label,
214
- 'data-testid': dataTestId || label,
215
- id: getNormalizedId(label || '')
216
- }}
217
- label={label}
218
- placeholder={isNil(placeholder) ? t(searchLabel) : placeholder}
219
- required={required}
220
- value={inputValue || undefined}
221
- onChange={onTextChange}
222
- />
223
- );
224
-
225
- return (
226
- <Autocomplete
227
- disableClearable
228
- classes={{
229
- groupLabel: classes.inputLabel,
230
- inputRoot: cx([
231
- classes.input,
232
- label ? classes.inputWithLabel : classes.inputWithoutLabel
233
- ]),
234
- popper: classes.popper,
235
- root: classes.textfield
236
- }}
237
- forcePopupIcon={displayPopupIcon}
238
- getOptionLabel={(option): string =>
239
- (option as SelectEntry)?.name?.toString() || ''
240
- }
241
- isOptionEqualToValue={areSelectEntriesEqual}
242
- loading={loading}
243
- loadingText={<LoadingIndicator />}
244
- options={options}
245
- renderInput={renderInput}
246
- renderOption={(props, option): JSX.Element => {
247
- return (
248
- <li
249
- className={classes.options}
250
- {...(props as React.HTMLAttributes<HTMLLIElement>)}
251
- >
252
- <Option
253
- thumbnailUrl={displayOptionThumbnail ? option.url : undefined}
252
+ isOptionEqualToValue={areSelectEntriesEqual}
253
+ loading={loading}
254
+ loadingText={<LoadingIndicator />}
255
+ options={options}
256
+ ref={ref}
257
+ renderInput={renderInput}
258
+ renderOption={(props, option): JSX.Element => {
259
+ return (
260
+ <li
261
+ className={classes.options}
262
+ {...(props as React.HTMLAttributes<HTMLLIElement>)}
254
263
  >
255
- {getOptionItemLabel(option)}
256
- </Option>
257
- </li>
258
- );
259
- }}
260
- size="small"
261
- {...autocompleteProps}
262
- />
263
- );
264
- };
264
+ <Option
265
+ thumbnailUrl={displayOptionThumbnail ? option.url : undefined}
266
+ >
267
+ {getOptionItemLabel(option)}
268
+ </Option>
269
+ </li>
270
+ );
271
+ }}
272
+ size="small"
273
+ {...autocompleteProps}
274
+ />
275
+ );
276
+ }
277
+ );
265
278
 
266
279
  export default AutocompleteField;
@@ -73,14 +73,14 @@ const IconPopoverMultiAutocomplete = ({
73
73
  };
74
74
 
75
75
  const isSelected = (id: number | string): boolean => {
76
- return pipe(find(propEq('id', id)), Boolean)(value);
76
+ return pipe(find(propEq(id, 'id')), Boolean)(value);
77
77
  };
78
78
 
79
79
  const unSelect = (option: SelectEntry): void => {
80
80
  const { id } = option;
81
81
 
82
82
  const updatedValue = isSelected(id)
83
- ? reject(propEq('id', id), value)
83
+ ? reject(propEq(id, 'id'), value)
84
84
  : [...value, option];
85
85
 
86
86
  onChange(updatedValue);
@@ -27,6 +27,14 @@ const useStyles = makeStyles()((theme: Theme) => ({
27
27
  },
28
28
  noLabelInput: {
29
29
  padding: theme.spacing(1)
30
+ },
31
+ select: {
32
+ '& .MuiInputLabel-shrink~.MuiInputBase-root fieldset legend': {
33
+ maxWidth: '100%'
34
+ },
35
+ '& fieldset legend': {
36
+ maxWidth: 0
37
+ }
30
38
  }
31
39
  }));
32
40
 
@@ -69,7 +77,7 @@ const SelectField = ({
69
77
  const { classes, cx } = useStyles();
70
78
 
71
79
  const getOption = (id): SelectEntry => {
72
- return options.find(propEq('id', id)) as SelectEntry;
80
+ return options.find(propEq(id, 'id')) as SelectEntry;
73
81
  };
74
82
 
75
83
  const changeOption = (event): void => {
@@ -79,7 +87,12 @@ const SelectField = ({
79
87
  };
80
88
 
81
89
  return (
82
- <FormControl error={!isNil(error)} fullWidth={fullWidth} size="small">
90
+ <FormControl
91
+ className={classes.select}
92
+ error={!isNil(error)}
93
+ fullWidth={fullWidth}
94
+ size="small"
95
+ >
83
96
  {label && <InputLabel>{label}</InputLabel>}
84
97
  <Select
85
98
  displayEmpty
@@ -154,9 +154,9 @@ const TextField = forwardRef(
154
154
  helperText={displayErrorInTooltip ? undefined : error}
155
155
  id={getNormalizedId(dataTestId || '')}
156
156
  inputProps={{
157
- ...rest.inputProps,
158
157
  'aria-label': ariaLabel,
159
- 'data-testid': dataTestId
158
+ 'data-testid': dataTestId,
159
+ ...rest.inputProps
160
160
  }}
161
161
  label={label}
162
162
  ref={ref}
@@ -174,14 +174,15 @@ const MemoListingActionBar = ({
174
174
  </IconButton>
175
175
  )}
176
176
  <div className={classes.ModeViewer} />
177
- {columnConfiguration?.selectedColumnIds && (
178
- <ColumnMultiSelect
179
- columnConfiguration={columnConfiguration}
180
- columns={columns}
181
- onResetColumns={onResetColumns}
182
- onSelectColumns={onSelectColumns}
183
- />
184
- )}
177
+ {columnConfiguration?.selectedColumnIds &&
178
+ columnConfiguration?.sortable && (
179
+ <ColumnMultiSelect
180
+ columnConfiguration={columnConfiguration}
181
+ columns={columns}
182
+ onResetColumns={onResetColumns}
183
+ onSelectColumns={onSelectColumns}
184
+ />
185
+ )}
185
186
  {paginated && (
186
187
  <StyledPagination
187
188
  ActionsComponent={PaginationActions}
@@ -8,6 +8,9 @@ const useStyles = makeStyles()((theme) => ({
8
8
  overflow: 'hidden',
9
9
  whiteSpace: 'nowrap'
10
10
  },
11
+ clickable: {
12
+ cursor: 'default'
13
+ },
11
14
  componentColumn: {
12
15
  width: theme.spacing(2.75)
13
16
  },
@@ -46,7 +46,7 @@ const DataCell = ({
46
46
  labelCollapse,
47
47
  labelExpand
48
48
  }: Props): JSX.Element | null => {
49
- const { classes } = useStyles();
49
+ const { classes, cx } = useStyles();
50
50
  const { dataStyle } = useStyleTable({ listingVariant });
51
51
 
52
52
  const commonCellProps = {
@@ -64,7 +64,7 @@ const DataCell = ({
64
64
 
65
65
  const cellByColumnType = {
66
66
  [ColumnType.string]: (): JSX.Element => {
67
- const { getFormattedString, isTruncated, getColSpan } = column;
67
+ const { getFormattedString, isTruncated, getColSpan, align } = column;
68
68
 
69
69
  const colSpan = getColSpan?.(isRowSelected);
70
70
 
@@ -87,6 +87,7 @@ const DataCell = ({
87
87
  isRowHighlighted={isRowHighlighted}
88
88
  listingVariant={listingVariant}
89
89
  style={{
90
+ alignItems: align,
90
91
  gridColumn
91
92
  }}
92
93
  {...commonCellProps}
@@ -99,7 +100,7 @@ const DataCell = ({
99
100
  );
100
101
  },
101
102
  [ColumnType.component]: (): JSX.Element | null => {
102
- const { getHiddenCondition, clickable } = column;
103
+ const { getHiddenCondition, clickable, align } = column;
103
104
  const Component = column.Component as (
104
105
  props: ComponentColumnProps
105
106
  ) => JSX.Element;
@@ -107,14 +108,31 @@ const DataCell = ({
107
108
  const isCellHidden = getHiddenCondition?.(isRowSelected);
108
109
 
109
110
  if (isCellHidden) {
110
- return null;
111
+ return (
112
+ <Cell
113
+ className={classes.cell}
114
+ isRowHighlighted={isRowHighlighted}
115
+ listingVariant={listingVariant}
116
+ onClick={(e): void => {
117
+ if (!clickable) {
118
+ return;
119
+ }
120
+ e.preventDefault();
121
+ e.stopPropagation();
122
+ }}
123
+ {...commonCellProps}
124
+ />
125
+ );
111
126
  }
112
127
 
113
128
  return (
114
129
  <Cell
115
- className={classes.cell}
130
+ className={cx(classes.cell, clickable && classes.clickable)}
116
131
  isRowHighlighted={isRowHighlighted}
117
132
  listingVariant={listingVariant}
133
+ style={{
134
+ alignItems: align
135
+ }}
118
136
  onClick={(e): void => {
119
137
  if (!clickable) {
120
138
  return;
@@ -71,7 +71,7 @@ const ListingHeader = ({
71
71
  });
72
72
 
73
73
  const getColumnById = (id: string): Column => {
74
- return find(propEq('id', id), columns) as Column;
74
+ return find(propEq(id, 'id'), columns) as Column;
75
75
  };
76
76
 
77
77
  const Content = React.useCallback(