carbon-addons-iot-react 5.5.1 → 5.6.3

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.
@@ -7,6 +7,7 @@ import 'core-js/modules/es.array.concat.js';
7
7
  import 'core-js/modules/es.array.filter.js';
8
8
  import 'core-js/modules/es.array.find.js';
9
9
  import 'core-js/modules/es.array.find-index.js';
10
+ import 'core-js/modules/es.array.map.js';
10
11
  import 'core-js/modules/es.array.slice.js';
11
12
  import 'core-js/modules/es.array.sort.js';
12
13
  import 'core-js/modules/es.number.constructor.js';
@@ -312,9 +313,20 @@ var DataSeriesFormItemModal = function DataSeriesFormItemModal(_ref) {
312
313
  });
313
314
  var initialAggregation = matchedDataItem === null || matchedDataItem === void 0 ? void 0 : matchedDataItem.aggregationMethod;
314
315
  var initialGrain = matchedDataItem === null || matchedDataItem === void 0 ? void 0 : matchedDataItem.grain;
315
- var selectedDimensionFilter = editDataItem.dataFilter ? Object.keys(editDataItem.dataFilter)[0] : '';
316
+ var selectedDimensionFilter = useMemo(function () {
317
+ return editDataItem.dataFilter ? Object.keys(editDataItem.dataFilter)[0] : '';
318
+ }, [editDataItem.dataFilter]);
319
+ var availableDimensionsItems = useMemo(function () {
320
+ var _availableDimensions$;
321
+ return selectedDimensionFilter && ((_availableDimensions$ = availableDimensions[selectedDimensionFilter]) === null || _availableDimensions$ === void 0 ? void 0 : _availableDimensions$.sort().map(function (item) {
322
+ return {
323
+ id: item,
324
+ text: item.toString()
325
+ };
326
+ })) || [];
327
+ }, [availableDimensions, selectedDimensionFilter]);
316
328
  var DataEditorContent = useMemo(function () {
317
- var _editDataItem$aggrega, _editDataItem$aggrega2, _editDataItem$precisi, _availableDimensions$;
329
+ var _editDataItem$aggrega, _editDataItem$aggrega2, _editDataItem$precisi;
318
330
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, hasAggregationsDropDown && hasAggregationsDropDown(editDataItem) && /*#__PURE__*/React__default.createElement("div", {
319
331
  className: "".concat(baseClassName, "--input-group")
320
332
  }, !initialAggregation || !isSummaryDashboard ?
@@ -494,19 +506,22 @@ var DataSeriesFormItemModal = function DataSeriesFormItemModal(_ref) {
494
506
  autoAlign: true
495
507
  })), /*#__PURE__*/React__default.createElement("div", {
496
508
  className: "".concat(baseClassName, "--input-group--item")
497
- }, !isEmpty(editDataItem.dataFilter) && availableDimensions[selectedDimensionFilter] && /*#__PURE__*/React__default.createElement(Dropdown, {
509
+ }, !isEmpty(editDataItem.dataFilter) && (availableDimensionsItems === null || availableDimensionsItems === void 0 ? void 0 : availableDimensionsItems.length) > 0 && /*#__PURE__*/React__default.createElement(Dropdown, {
498
510
  id: "".concat(id, "_data-filter-value"),
499
511
  label: "",
500
512
  direction: "bottom",
501
- items: (_availableDimensions$ = availableDimensions[selectedDimensionFilter]) === null || _availableDimensions$ === void 0 ? void 0 : _availableDimensions$.sort(),
513
+ items: availableDimensionsItems,
502
514
  light: true,
503
515
  itemToString: function itemToString(item) {
504
- return item === null || item === void 0 ? void 0 : item.toString();
516
+ return item ? item.text : '';
505
517
  },
506
- selectedItem: editDataItem.dataFilter ? editDataItem.dataFilter[selectedDimensionFilter] : undefined,
518
+ selectedItem: availableDimensionsItems.find(function (item) {
519
+ var _editDataItem$dataFil;
520
+ return item.id === ((_editDataItem$dataFil = editDataItem.dataFilter) === null || _editDataItem$dataFil === void 0 ? void 0 : _editDataItem$dataFil[selectedDimensionFilter]);
521
+ }),
507
522
  onChange: function onChange(_ref9) {
508
523
  var selectedItem = _ref9.selectedItem;
509
- var dataFilter = _defineProperty({}, selectedDimensionFilter, selectedItem);
524
+ var dataFilter = _defineProperty({}, selectedDimensionFilter, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.id);
510
525
  setEditDataItem(_objectSpread(_objectSpread({}, editDataItem), {}, {
511
526
  dataFilter: dataFilter
512
527
  }));
@@ -536,7 +551,7 @@ var DataSeriesFormItemModal = function DataSeriesFormItemModal(_ref) {
536
551
  },
537
552
  columnType: editDataItem.columnType || editDataItem.type
538
553
  }));
539
- }, [availableDimensions, availableGrains, baseClassName, cardConfig, editDataItem, handleTranslation, hasAggregationsDropDown, hasColorDropdown, hasDataFilterDropdown, hasDecimalPlacesDropdown, hasGrainsDropDown, hasThresholds, hasTooltip, hasUnit, id, initialAggregation, initialGrain, isSummaryDashboard, isTimeBasedCard$1, mergedI18n, selectedDimensionFilter, setEditDataItem, type]);
554
+ }, [availableDimensions, availableDimensionsItems, availableGrains, baseClassName, cardConfig, editDataItem, handleTranslation, hasAggregationsDropDown, hasColorDropdown, hasDataFilterDropdown, hasDecimalPlacesDropdown, hasGrainsDropDown, hasThresholds, hasTooltip, hasUnit, id, initialAggregation, initialGrain, isSummaryDashboard, isTimeBasedCard$1, mergedI18n, selectedDimensionFilter, setEditDataItem, type]);
540
555
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showEditor && /*#__PURE__*/React__default.createElement("div", {
541
556
  className: "".concat(baseClassName, "--modal-wrapper")
542
557
  }, /*#__PURE__*/React__default.createElement(ComposedModal, {
@@ -68,16 +68,11 @@ var props = {
68
68
  /** Size of the empty state */
69
69
  size: PropTypes.oneOf([DEFAULT_SIZE, SMALL_SIZE]),
70
70
  /** Arrangement of the empty state */
71
- arrangement: PropTypes.oneOf(['stacked', 'inline'])
72
- };
73
- var defaultProps = {
74
- action: null,
75
- secondaryAction: null,
76
- icon: '',
77
- className: '',
78
- testId: 'EmptyState',
79
- size: 'default',
80
- arrangement: 'stacked'
71
+ arrangement: PropTypes.oneOf(['stacked', 'inline']),
72
+ /** aria-labe to be passed to the empty state icon */
73
+ iconAriaLabel: PropTypes.string,
74
+ /** aria-hidden to be passed to the empty state icon */
75
+ iconAriaHidden: PropTypes.bool
81
76
  };
82
77
 
83
78
  /**
@@ -86,15 +81,24 @@ var defaultProps = {
86
81
  */
87
82
  var EmptyState = function EmptyState(_ref) {
88
83
  var title = _ref.title,
89
- icon = _ref.icon,
84
+ _ref$icon = _ref.icon,
85
+ icon = _ref$icon === void 0 ? '' : _ref$icon,
90
86
  body = _ref.body,
91
- action = _ref.action,
92
- secondaryAction = _ref.secondaryAction,
93
- className = _ref.className,
94
- testId = _ref.testId,
87
+ _ref$action = _ref.action,
88
+ action = _ref$action === void 0 ? null : _ref$action,
89
+ _ref$secondaryAction = _ref.secondaryAction,
90
+ secondaryAction = _ref$secondaryAction === void 0 ? null : _ref$secondaryAction,
91
+ _ref$className = _ref.className,
92
+ className = _ref$className === void 0 ? '' : _ref$className,
93
+ _ref$testId = _ref.testId,
94
+ testId = _ref$testId === void 0 ? 'EmptyState' : _ref$testId,
95
95
  testID = _ref.testID,
96
- size = _ref.size,
97
- arrangement = _ref.arrangement;
96
+ _ref$size = _ref.size,
97
+ size = _ref$size === void 0 ? 'default' : _ref$size,
98
+ _ref$arrangement = _ref.arrangement,
99
+ arrangement = _ref$arrangement === void 0 ? 'stacked' : _ref$arrangement,
100
+ iconAriaLabel = _ref.iconAriaLabel,
101
+ iconAriaHidden = _ref.iconAriaHidden;
98
102
  var isSmall = size === SMALL_SIZE;
99
103
  return /*#__PURE__*/React__default.createElement("div", {
100
104
  className: classnames("".concat(iotPrefix, "--empty-state"), className, _defineProperty({}, "".concat(iotPrefix, "--empty-state--inline"), arrangement === 'inline'))
@@ -106,7 +110,9 @@ var EmptyState = function EmptyState(_ref) {
106
110
  }, icon && /*#__PURE__*/React__default.createElement(typeof icon === 'string' ? icons[icon] : icon, _objectSpread({
107
111
  className: classnames("".concat(iotPrefix, "--empty-state--icon"), _defineProperty({}, "".concat(iotPrefix, "--empty-state--icon--sm"), isSmall)),
108
112
  alt: '',
109
- 'data-testid': "".concat(testID || testId, "-icon")
113
+ 'data-testid': "".concat(testID || testId, "-icon"),
114
+ 'aria-label': iconAriaLabel,
115
+ 'aria-hidden': iconAriaHidden
110
116
  }, isSmall && smallIconProps)), /*#__PURE__*/React__default.createElement("h3", {
111
117
  className: classnames("".concat(iotPrefix, "--empty-state--title"), _defineProperty({}, "".concat(iotPrefix, "--empty-state--title--sm"), isSmall))
112
118
  // TODO: remove deprecated testID in v3.
@@ -139,12 +145,49 @@ var EmptyState = function EmptyState(_ref) {
139
145
  }, secondaryAction.label))));
140
146
  };
141
147
  EmptyState.propTypes = props;
142
- EmptyState.defaultProps = defaultProps;
143
148
  EmptyState.__docgenInfo = {
144
149
  "description": "Component to set empty states\nFor reference, visit https://pages.github.ibm.com/ai-applications/design/components/empty-states/usage/",
145
150
  "methods": [],
146
151
  "displayName": "EmptyState",
147
152
  "props": {
153
+ "icon": {
154
+ "defaultValue": {
155
+ "value": "''",
156
+ "computed": false
157
+ },
158
+ "description": "Optional image of state",
159
+ "type": {
160
+ "name": "union",
161
+ "value": [{
162
+ "name": "func"
163
+ }, {
164
+ "name": "enum",
165
+ "value": [{
166
+ "value": "'error'",
167
+ "computed": false
168
+ }, {
169
+ "value": "'error404'",
170
+ "computed": false
171
+ }, {
172
+ "value": "'empty'",
173
+ "computed": false
174
+ }, {
175
+ "value": "'not-authorized'",
176
+ "computed": false
177
+ }, {
178
+ "value": "'no-result'",
179
+ "computed": false
180
+ }, {
181
+ "value": "'success'",
182
+ "computed": false
183
+ }, {
184
+ "value": "''",
185
+ "computed": false
186
+ }]
187
+ }]
188
+ },
189
+ "required": false
190
+ },
148
191
  "action": {
149
192
  "defaultValue": {
150
193
  "value": "null",
@@ -204,44 +247,6 @@ EmptyState.__docgenInfo = {
204
247
  },
205
248
  "required": false
206
249
  },
207
- "icon": {
208
- "defaultValue": {
209
- "value": "''",
210
- "computed": false
211
- },
212
- "description": "Optional image of state",
213
- "type": {
214
- "name": "union",
215
- "value": [{
216
- "name": "func"
217
- }, {
218
- "name": "enum",
219
- "value": [{
220
- "value": "'error'",
221
- "computed": false
222
- }, {
223
- "value": "'error404'",
224
- "computed": false
225
- }, {
226
- "value": "'empty'",
227
- "computed": false
228
- }, {
229
- "value": "'not-authorized'",
230
- "computed": false
231
- }, {
232
- "value": "'no-result'",
233
- "computed": false
234
- }, {
235
- "value": "'success'",
236
- "computed": false
237
- }, {
238
- "value": "''",
239
- "computed": false
240
- }]
241
- }]
242
- },
243
- "required": false
244
- },
245
250
  "className": {
246
251
  "defaultValue": {
247
252
  "value": "''",
@@ -331,6 +336,20 @@ EmptyState.__docgenInfo = {
331
336
  "raw": "deprecate(\n PropTypes.string,\n `The 'testID' prop has been deprecated. Please use 'testId' instead.`\n)"
332
337
  },
333
338
  "required": false
339
+ },
340
+ "iconAriaLabel": {
341
+ "description": "aria-labe to be passed to the empty state icon",
342
+ "type": {
343
+ "name": "string"
344
+ },
345
+ "required": false
346
+ },
347
+ "iconAriaHidden": {
348
+ "description": "aria-hidden to be passed to the empty state icon",
349
+ "type": {
350
+ "name": "bool"
351
+ },
352
+ "required": false
334
353
  }
335
354
  }
336
355
  };
@@ -62,7 +62,11 @@ var propTypes = {
62
62
  /** Toggle side panel busy state */
63
63
  isBusy: PropTypes.bool,
64
64
  /** should the footer primary button be disabled */
65
- isPrimaryButtonDisabled: PropTypes.bool
65
+ isPrimaryButtonDisabled: PropTypes.bool,
66
+ /** Custom width in pixels for the side panel (e.g., 400, '400px', or '25rem') */
67
+ width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
68
+ /** Custom background color for the side panel (e.g., '#f4f4f4', 'gray', or any valid CSS color) */
69
+ backgroundColor: PropTypes.string
66
70
  };
67
71
  var defaultProps = {
68
72
  isOpen: false,
@@ -84,7 +88,9 @@ var defaultProps = {
84
88
  onPrimaryButtonClick: undefined,
85
89
  onSecondaryButtonClick: undefined,
86
90
  isBusy: false,
87
- isPrimaryButtonDisabled: false
91
+ isPrimaryButtonDisabled: false,
92
+ width: undefined,
93
+ backgroundColor: undefined
88
94
  };
89
95
  var baseClass = "".concat(iotPrefix, "--sidepanel");
90
96
  var SidePanel = function SidePanel(_ref) {
@@ -104,7 +110,9 @@ var SidePanel = function SidePanel(_ref) {
104
110
  children = _ref.children,
105
111
  style = _ref.style,
106
112
  isBusy = _ref.isBusy,
107
- isPrimaryButtonDisabled = _ref.isPrimaryButtonDisabled;
113
+ isPrimaryButtonDisabled = _ref.isPrimaryButtonDisabled,
114
+ width = _ref.width,
115
+ backgroundColor = _ref.backgroundColor;
108
116
  var titleRef = useRef();
109
117
  var subtitleRef = useRef();
110
118
  var contentRef = useRef();
@@ -192,11 +200,24 @@ var SidePanel = function SidePanel(_ref) {
192
200
  }
193
201
  return "".concat(str.substring(0, length), "...");
194
202
  };
203
+ var panelWidth = useMemo(function () {
204
+ if (width !== undefined) {
205
+ return typeof width === 'number' ? "".concat(width, "px") : width;
206
+ }
207
+ return undefined;
208
+ }, [width]);
209
+ var panelStyle = useMemo(function () {
210
+ return _objectSpread(_objectSpread(_objectSpread({}, style), panelWidth && {
211
+ width: panelWidth
212
+ }), backgroundColor && {
213
+ backgroundColor: backgroundColor
214
+ });
215
+ }, [style, panelWidth, backgroundColor]);
195
216
  return /*#__PURE__*/React__default.createElement("div", {
196
217
  key: "sidePanel--".concat(subtitle),
197
218
  "data-testid": testId,
198
219
  className: classnames("".concat(baseClass), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(baseClass, "--closed"), !isOpen), "".concat(baseClass, "--full-width"), isFullWidth), "".concat(baseClass, "--start"), direction === 'left'), "".concat(baseClass, "--inline"), type === 'inline'), "".concat(baseClass, "--slide-over"), type === 'over'), "".concat(baseClass, "--condensed"), isCondensed || isScrolled)),
199
- style: style
220
+ style: panelStyle
200
221
  }, onToggle && (isOpen || type === 'inline') ? /*#__PURE__*/React__default.createElement(Button, {
201
222
  testId: "".concat(testId, "-toggle-button"),
202
223
  hasIconOnly: true,
@@ -490,6 +511,33 @@ SidePanel.__docgenInfo = {
490
511
  "name": "bool"
491
512
  },
492
513
  "required": false
514
+ },
515
+ "width": {
516
+ "defaultValue": {
517
+ "value": "undefined",
518
+ "computed": true
519
+ },
520
+ "description": "Custom width in pixels for the side panel (e.g., 400, '400px', or '25rem')",
521
+ "type": {
522
+ "name": "union",
523
+ "value": [{
524
+ "name": "number"
525
+ }, {
526
+ "name": "string"
527
+ }]
528
+ },
529
+ "required": false
530
+ },
531
+ "backgroundColor": {
532
+ "defaultValue": {
533
+ "value": "undefined",
534
+ "computed": true
535
+ },
536
+ "description": "Custom background color for the side panel (e.g., '#f4f4f4', 'gray', or any valid CSS color)",
537
+ "type": {
538
+ "name": "string"
539
+ },
540
+ "required": false
493
541
  }
494
542
  }
495
543
  };
@@ -58,7 +58,7 @@ import ErrorTable from './ErrorTable/ErrorTable.js';
58
58
  import { PIN_COLUMN } from './tableUtilities.js';
59
59
  import { FilterEdit } from '@carbon/icons-react';
60
60
 
61
- var _excluded = ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex", "emptyStateIcon"],
61
+ var _excluded = ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex", "emptyStateIcon", "deletedAttribute"],
62
62
  _excluded2 = ["renderIcon"],
63
63
  _excluded3 = ["error"],
64
64
  _excluded4 = ["maxPages"];
@@ -393,7 +393,9 @@ var propTypes = {
393
393
  /** Specify the error message that need to be displayed by default.
394
394
  * Incase we use view.table.errorState property then the error state will be displayed instead of error message */
395
395
  error: PropTypes.string,
396
- testId: PropTypes.string
396
+ testId: PropTypes.string,
397
+ /** Attribute name to identify deleted rows */
398
+ deletedAttribute: PropTypes.string
397
399
  };
398
400
  var defaultProps = function defaultProps(baseProps) {
399
401
  return {
@@ -612,7 +614,8 @@ var defaultProps = function defaultProps(baseProps) {
612
614
  // previously used as testId.
613
615
  testId: null,
614
616
  enablePercentageColumnWidth: false,
615
- emptyStateIcon: ''
617
+ emptyStateIcon: '',
618
+ deletedAttribute: undefined
616
619
  };
617
620
  };
618
621
  var Table = function Table(props) {
@@ -640,6 +643,7 @@ var Table = function Table(props) {
640
643
  size = _merge2.size,
641
644
  zIndex = _merge2.zIndex,
642
645
  emptyStateIcon = _merge2.emptyStateIcon,
646
+ deletedAttribute = _merge2.deletedAttribute,
643
647
  others = _objectWithoutProperties(_merge2, _excluded);
644
648
 
645
649
  // There is no way to access the current search value in the Table
@@ -1020,7 +1024,8 @@ var Table = function Table(props) {
1020
1024
  testId: "".concat(id || testId, "-table-body"),
1021
1025
  showExpanderColumn: showExpanderColumn,
1022
1026
  size: size,
1023
- pinColumn: options.pinColumn
1027
+ pinColumn: options.pinColumn,
1028
+ deletedAttribute: deletedAttribute
1024
1029
  })) : /*#__PURE__*/React__default.createElement(EmptyTable, {
1025
1030
  id: id,
1026
1031
  totalColumns: totalColumns,
@@ -2027,6 +2032,13 @@ Table.__docgenInfo = {
2027
2032
  "name": "string"
2028
2033
  },
2029
2034
  "required": false
2035
+ },
2036
+ "deletedAttribute": {
2037
+ "description": "Attribute name to identify deleted rows",
2038
+ "type": {
2039
+ "name": "string"
2040
+ },
2041
+ "required": false
2030
2042
  }
2031
2043
  }
2032
2044
  };
@@ -118,7 +118,9 @@ var propTypes = {
118
118
  /** Optional base z-index for the drag image. See details on Table component. */
119
119
  zIndex: PropTypes.number,
120
120
  /** column to pin in the table */
121
- pinColumn: PinColumnPropTypes
121
+ pinColumn: PinColumnPropTypes,
122
+ /** Attribute name to identify deleted rows */
123
+ deletedAttribute: PropTypes.string
122
124
  };
123
125
  var defaultProps = {
124
126
  expandedIds: [],
@@ -157,7 +159,8 @@ var defaultProps = {
157
159
  hasBreadcrumbDrop: false,
158
160
  hideDragHandles: false,
159
161
  zIndex: 0,
160
- pinColumn: PIN_COLUMN.NONE
162
+ pinColumn: PIN_COLUMN.NONE,
163
+ deletedAttribute: '_deleted'
161
164
  };
162
165
  var TableBody = function TableBody(_ref) {
163
166
  var tableId = _ref.tableId,
@@ -202,7 +205,8 @@ var TableBody = function TableBody(_ref) {
202
205
  hasBreadcrumbDrop = _ref.hasBreadcrumbDrop,
203
206
  hideDragHandles = _ref.hideDragHandles,
204
207
  zIndex = _ref.zIndex,
205
- pinColumn = _ref.pinColumn;
208
+ pinColumn = _ref.pinColumn,
209
+ deletedAttribute = _ref.deletedAttribute;
206
210
  // Need to merge the ordering and the columns since the columns have the renderer function
207
211
  var orderingMap = useMemo(function () {
208
212
  return ordering.map(function (col) {
@@ -357,7 +361,8 @@ var TableBody = function TableBody(_ref) {
357
361
  onDragEnterRow: isDragging ? handleEnterRow : null,
358
362
  onDragLeaveRow: isDragging ? handleLeaveRow : null,
359
363
  dragRowIds: dragRowIds,
360
- canDropRowIds: canDropRowIds
364
+ canDropRowIds: canDropRowIds,
365
+ deletedAttribute: deletedAttribute
361
366
  });
362
367
  })), dragPreview);
363
368
  };
@@ -834,6 +839,17 @@ TableBody.__docgenInfo = {
834
839
  },
835
840
  "required": false
836
841
  },
842
+ "deletedAttribute": {
843
+ "defaultValue": {
844
+ "value": "'_deleted'",
845
+ "computed": false
846
+ },
847
+ "description": "Attribute name to identify deleted rows",
848
+ "type": {
849
+ "name": "string"
850
+ },
851
+ "required": false
852
+ },
837
853
  "tableId": {
838
854
  "description": "The unique id of the table",
839
855
  "type": {
@@ -138,7 +138,9 @@ var propTypes = {
138
138
  /** If this row is being dragged. */
139
139
  isDragRow: PropTypes.bool,
140
140
  /** If all drag handles should be hidden. This happens when an undraggable row is in the selection. */
141
- hideDragHandles: PropTypes.bool
141
+ hideDragHandles: PropTypes.bool,
142
+ /** Attribute name to identify deleted rows */
143
+ deletedAttribute: PropTypes.string
142
144
  };
143
145
  var defaultProps = {
144
146
  isSelected: false,
@@ -174,7 +176,8 @@ var defaultProps = {
174
176
  onDragEnterRow: null,
175
177
  onDragLeaveRow: null,
176
178
  isDraggable: false,
177
- isDragRow: false
179
+ isDragRow: false,
180
+ deletedAttribute: '_deleted'
178
181
  };
179
182
  var TableBodyRow = function TableBodyRow(_ref) {
180
183
  var id = _ref.id,
@@ -231,7 +234,8 @@ var TableBodyRow = function TableBodyRow(_ref) {
231
234
  isDragRow = _ref.isDragRow,
232
235
  isDraggable = _ref.isDraggable,
233
236
  hasDragAndDrop = _ref.hasDragAndDrop,
234
- hideDragHandles = _ref.hideDragHandles;
237
+ hideDragHandles = _ref.hideDragHandles,
238
+ deletedAttribute = _ref.deletedAttribute;
235
239
  var isEditMode = rowEditMode || singleRowEditMode;
236
240
  var singleSelectionIndicatorWidth = hasRowSelection === 'single' ? 0 : 5;
237
241
  var nestingLevelPixels = nestingLevel * 32;
@@ -374,7 +378,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
374
378
  key: id
375
379
  }, /*#__PURE__*/React__default.createElement(TableExpandRow, _extends({
376
380
  expandHeaderId: "".concat(tableId, "-expand"),
377
- className: classnames("".concat(iotPrefix, "--expandable-tablerow--expanded"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values._deleted)),
381
+ className: classnames("".concat(iotPrefix, "--expandable-tablerow--expanded"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
378
382
  ariaLabel: clickToCollapseAria,
379
383
  expandIconDescription: clickToCollapseAria,
380
384
  isExpanded: true,
@@ -402,13 +406,13 @@ var TableBodyRow = function TableBodyRow(_ref) {
402
406
  rowId: id,
403
407
  langDir: langDir
404
408
  }, dragEnterLeaveHandlers), tableCells), !hasRowNesting && /*#__PURE__*/React__default.createElement(TableRow, _extends({
405
- className: classnames("".concat(iotPrefix, "--expanded-tablerow"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values._deleted))
409
+ className: classnames("".concat(iotPrefix, "--expanded-tablerow"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expanded-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute]))
406
410
  }, dragEnterLeaveHandlers), /*#__PURE__*/React__default.createElement(TableCell, {
407
411
  colSpan: totalColumns
408
412
  }, rowDetails))) : /*#__PURE__*/React__default.createElement(TableExpandRow, _extends({
409
413
  key: id,
410
414
  expandHeaderId: "".concat(tableId, "-expand"),
411
- className: classnames("".concat(iotPrefix, "--expandable-tablerow"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values._deleted)),
415
+ className: classnames("".concat(iotPrefix, "--expandable-tablerow"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--expandable-tablerow--parent"), hasRowNesting && (hasRowNesting === null || hasRowNesting === void 0 ? void 0 : hasRowNesting.hasSingleNestedHierarchy) && nestingChildCount > 0), "".concat(iotPrefix, "--expandable-tablerow--childless"), hasRowNesting && nestingChildCount === 0), "".concat(iotPrefix, "--expandable-tablerow--indented"), parseInt(nestingOffset, 10) > 0), "".concat(iotPrefix, "--expandable-tablerow--singly-selected"), hasRowSelection === 'single' && isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--expandable-tablerow--last-child"), isLastChild), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
412
416
  "data-row-nesting": hasRowNesting,
413
417
  "data-child-count": nestingChildCount,
414
418
  "data-nesting-offset": nestingOffset,
@@ -437,7 +441,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
437
441
  rowId: id,
438
442
  langDir: langDir
439
443
  }, dragEnterLeaveHandlers), tableCells) : hasRowSelection === 'single' && isSelected ? /*#__PURE__*/React__default.createElement(TableRow, _extends({
440
- className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--background"), isSelected), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values._deleted)),
444
+ className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--singly-selected"), isSelected && !useRadioButtonSingleSelect), "".concat(iotPrefix, "--table__row--background"), isSelected), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
441
445
  key: id,
442
446
  onClick: function onClick() {
443
447
  if (isSelectable !== false) {
@@ -448,7 +452,7 @@ var TableBodyRow = function TableBodyRow(_ref) {
448
452
  }
449
453
  }
450
454
  }, dragEnterLeaveHandlers), tableCells) : /*#__PURE__*/React__default.createElement(TableRow, _extends({
451
- className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix, "--table__row--editing"), isEditMode), "".concat(iotPrefix, "--table__row--selected"), isSelected), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values._deleted)),
455
+ className: classnames("".concat(iotPrefix, "--table__row"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--table__row--unselectable"), isSelectable === false), "".concat(iotPrefix, "--table__row--selectable"), isSelectable !== false), "".concat(iotPrefix, "--table__row--editing"), isEditMode), "".concat(iotPrefix, "--table__row--selected"), isSelected), "".concat(iotPrefix, "--table__row--dragging"), isDragRow), "".concat(iotPrefix, "--table__row--softdeleted"), values === null || values === void 0 ? void 0 : values[deletedAttribute])),
452
456
  key: id,
453
457
  onClick: function onClick() {
454
458
  if (isSelectable !== false) {
@@ -933,6 +937,17 @@ TableBodyRow.__docgenInfo = {
933
937
  },
934
938
  "required": false
935
939
  },
940
+ "deletedAttribute": {
941
+ "defaultValue": {
942
+ "value": "'_deleted'",
943
+ "computed": false
944
+ },
945
+ "description": "Attribute name to identify deleted rows",
946
+ "type": {
947
+ "name": "string"
948
+ },
949
+ "required": false
950
+ },
936
951
  "ordering": {
937
952
  "description": "What column ordering is currently applied to the table",
938
953
  "type": {
@@ -127,7 +127,9 @@ var propTypes = {
127
127
  /** Callback for when a row is entered during a drag. This is null when there is not drag. */
128
128
  onDragEnterRow: PropTypes.func,
129
129
  /** Callback for when a row is left during a drag. This is null when there is not drag. */
130
- onDragLeaveRow: PropTypes.func
130
+ onDragLeaveRow: PropTypes.func,
131
+ /** Attribute name to identify deleted rows */
132
+ deletedAttribute: PropTypes.string
131
133
  };
132
134
  var defaultProps = {
133
135
  actionFailedText: 'Action failed',
@@ -172,7 +174,8 @@ var defaultProps = {
172
174
  onDragEnterRow: null,
173
175
  onDragLeaveRow: null,
174
176
  dragRowIds: [],
175
- canDropRowIds: []
177
+ canDropRowIds: [],
178
+ deletedAttribute: '_deleted'
176
179
  };
177
180
  function TableBodyRowRenderer(props) {
178
181
  var actionFailedText = props.actionFailedText,
@@ -222,7 +225,8 @@ function TableBodyRowRenderer(props) {
222
225
  onDragLeaveRow = props.onDragLeaveRow,
223
226
  onDragEnterRow = props.onDragEnterRow,
224
227
  canDropRowIds = props.canDropRowIds,
225
- dragRowIds = props.dragRowIds;
228
+ dragRowIds = props.dragRowIds,
229
+ deletedAttribute = props.deletedAttribute;
226
230
  var isRowExpanded = expandedIds.includes(row.id);
227
231
  var shouldShowChildren = hasRowNesting && isRowExpanded && row.children && row.children.length > 0;
228
232
  var myRowActionState = rowActionsState.find(function (rowAction) {
@@ -307,7 +311,8 @@ function TableBodyRowRenderer(props) {
307
311
  isDraggable: row.isDraggable,
308
312
  showExpanderColumn: showExpanderColumn,
309
313
  size: size,
310
- isLastChild: isLastChild
314
+ isLastChild: isLastChild,
315
+ deletedAttribute: deletedAttribute
311
316
  }) : /*#__PURE__*/React__default.createElement(TableBodyLoadMoreRow, {
312
317
  id: row.id,
313
318
  key: "".concat(row.id, "--load-more"),
@@ -899,6 +904,17 @@ TableBodyRowRenderer.__docgenInfo = {
899
904
  },
900
905
  "required": false
901
906
  },
907
+ "deletedAttribute": {
908
+ "defaultValue": {
909
+ "value": "'_deleted'",
910
+ "computed": false
911
+ },
912
+ "description": "Attribute name to identify deleted rows",
913
+ "type": {
914
+ "name": "string"
915
+ },
916
+ "required": false
917
+ },
902
918
  "tableId": {
903
919
  "description": "The unique id of the table",
904
920
  "type": {
@@ -50,6 +50,8 @@ var TimeSeriesDatasetPropTypes = PropTypes.shape({
50
50
  dataSourceId: PropTypes.string.isRequired,
51
51
  /** optional filter to apply to this particular line */
52
52
  dataFilter: PropTypes.objectOf(PropTypes.any),
53
+ /** optional param to disable DataFilter */
54
+ disableDataFilter: PropTypes.bool,
53
55
  /** optional param to set the colors */
54
56
  color: PropTypes.string
55
57
  });
@@ -218,10 +218,12 @@ var formatChartData = function formatChartData() {
218
218
  var dataSourceId = _ref2.dataSourceId,
219
219
  _ref2$dataFilter = _ref2.dataFilter,
220
220
  dataFilter = _ref2$dataFilter === void 0 ? {} : _ref2$dataFilter,
221
- label = _ref2.label;
221
+ label = _ref2.label,
222
+ _ref2$disableDataFilt = _ref2.disableDataFilter,
223
+ disableDataFilter = _ref2$disableDataFilt === void 0 ? false : _ref2$disableDataFilt;
222
224
  timestamps.forEach(function (timestamp) {
223
225
  // First filter based on on the dataFilter
224
- var filteredData = filter(values, dataFilter);
226
+ var filteredData = !disableDataFilter ? filter(values, dataFilter) : values;
225
227
  if (!isEmpty(filteredData)) {
226
228
  // have to filter out null values from the dataset, as it causes Carbon Charts to break
227
229
  filteredData.filter(function (dataItem) {
@@ -11,6 +11,9 @@ import warning from 'warning';
11
11
 
12
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
+
15
+ // trigger lerna build
16
+
14
17
  var didWarnAboutDeprecation = {};
15
18
  function deprecate(propType, message) {
16
19
  function checker(props, propName, componentName) {