carbon-addons-iot-react 2.154.0-next.13 → 2.154.0-next.14

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/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.154.0-next.14](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.154.0-next.13...v2.154.0-next.14) (2024-02-26)
7
+
8
+
9
+ ### Features
10
+
11
+ * code review changes and storybook example ([ad2c042](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/ad2c04288fd28689ca120d04def04a060c697460))
12
+ * expose noDataIcon props to display more icon while table is empty ([1d7c69f](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/1d7c69f3bf986979326072f724c9f144e3ea28b8))
13
+ * snapshort updated ([65c281b](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/65c281bf18943e8598888cc9b0a05877b172d22f))
14
+
15
+
16
+
17
+
18
+
6
19
  # [2.154.0-next.13](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.154.0-next.12...v2.154.0-next.13) (2024-02-20)
7
20
 
8
21
 
@@ -19,12 +19,16 @@ var propTypes = {
19
19
  // TODO: remove deprecated 'testID' in v3
20
20
  // eslint-disable-next-line react/require-default-props
21
21
  testID: deprecate(PropTypes.string, "The 'testID' prop has been deprecated. Please use 'testId' instead."),
22
- testId: PropTypes.string
22
+ testId: PropTypes.string,
23
+
24
+ /** icon to display while no data in table */
25
+ emptyStateIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOf(['error', 'error404', 'empty', 'not-authorized', 'no-result', 'success', ''])])
23
26
  };
24
27
  var defaultProps = {
25
28
  id: 'EmptyTable',
26
29
  onEmptyStateAction: null,
27
- testId: ''
30
+ testId: '',
31
+ emptyStateIcon: ''
28
32
  };
29
33
 
30
34
  var EmptyTable = function EmptyTable(_ref) {
@@ -41,18 +45,9 @@ var EmptyTable = function EmptyTable(_ref) {
41
45
  messageBody = _ref$emptyState.messageBody,
42
46
  messageWithFiltersBody = _ref$emptyState.messageWithFiltersBody,
43
47
  testID = _ref.testID,
44
- testId = _ref.testId;
45
- return /*#__PURE__*/React__default.createElement(TableBody, {
46
- id: "".concat(id, "-empty-table") // TODO: remove deprecated 'testID' in v3
47
- ,
48
- "data-testid": testID || testId
49
- }, /*#__PURE__*/React__default.createElement(TableRow, {
50
- className: "".concat(iotPrefix, "--empty-table--table-row")
51
- }, /*#__PURE__*/React__default.createElement(TableCell, {
52
- colSpan: totalColumns
53
- }, /*#__PURE__*/React__default.isValidElement(emptyState) ? emptyState : /*#__PURE__*/React__default.createElement("div", {
54
- className: "empty-table-cell--default"
55
- }, isFiltered ? /*#__PURE__*/React__default.createElement(EmptyState, {
48
+ testId = _ref.testId,
49
+ emptyStateIcon = _ref.emptyStateIcon;
50
+ var isFilterEmptyTable = /*#__PURE__*/React__default.createElement(EmptyState, {
56
51
  icon: "no-result",
57
52
  title: messageWithFilters,
58
53
  body: messageWithFiltersBody || '',
@@ -61,15 +56,27 @@ var EmptyTable = function EmptyTable(_ref) {
61
56
  onClick: onEmptyStateAction,
62
57
  kind: 'secondary'
63
58
  } : null
64
- }) : /*#__PURE__*/React__default.createElement(EmptyState, {
65
- icon: "empty",
59
+ });
60
+ var defaultEmptyTable = /*#__PURE__*/React__default.createElement(EmptyState, {
61
+ icon: emptyStateIcon !== null && emptyStateIcon !== void 0 ? emptyStateIcon : 'empty',
66
62
  title: message,
67
63
  body: messageBody || '',
68
64
  action: onEmptyStateAction ? {
69
65
  label: buttonLabel,
70
66
  onClick: onEmptyStateAction
71
67
  } : null
72
- })))));
68
+ });
69
+ return /*#__PURE__*/React__default.createElement(TableBody, {
70
+ id: "".concat(id, "-empty-table") // TODO: remove deprecated 'testID' in v3
71
+ ,
72
+ "data-testid": testID || testId
73
+ }, /*#__PURE__*/React__default.createElement(TableRow, {
74
+ className: "".concat(iotPrefix, "--empty-table--table-row")
75
+ }, /*#__PURE__*/React__default.createElement(TableCell, {
76
+ colSpan: totalColumns
77
+ }, /*#__PURE__*/React__default.isValidElement(emptyState) ? emptyState : /*#__PURE__*/React__default.createElement("div", {
78
+ className: "empty-table-cell--default"
79
+ }, isFiltered ? isFilterEmptyTable : defaultEmptyTable))));
73
80
  };
74
81
 
75
82
  EmptyTable.propTypes = propTypes;
@@ -112,6 +119,44 @@ EmptyTable.__docgenInfo = {
112
119
  "required": false,
113
120
  "description": ""
114
121
  },
122
+ "emptyStateIcon": {
123
+ "defaultValue": {
124
+ "value": "''",
125
+ "computed": false
126
+ },
127
+ "type": {
128
+ "name": "union",
129
+ "value": [{
130
+ "name": "func"
131
+ }, {
132
+ "name": "enum",
133
+ "value": [{
134
+ "value": "'error'",
135
+ "computed": false
136
+ }, {
137
+ "value": "'error404'",
138
+ "computed": false
139
+ }, {
140
+ "value": "'empty'",
141
+ "computed": false
142
+ }, {
143
+ "value": "'not-authorized'",
144
+ "computed": false
145
+ }, {
146
+ "value": "'no-result'",
147
+ "computed": false
148
+ }, {
149
+ "value": "'success'",
150
+ "computed": false
151
+ }, {
152
+ "value": "''",
153
+ "computed": false
154
+ }]
155
+ }]
156
+ },
157
+ "required": false,
158
+ "description": "icon to display while no data in table"
159
+ },
115
160
  "emptyState": {
116
161
  "type": {
117
162
  "name": "custom",
@@ -197,7 +197,10 @@ var propTypes = {
197
197
  hasBreadcrumbDrop: PropTypes.bool,
198
198
 
199
199
  /** Freezes table header and footer */
200
- pinHeaderAndFooter: PropTypes.bool
200
+ pinHeaderAndFooter: PropTypes.bool,
201
+
202
+ /** display icon while Table data is empty */
203
+ emptyStateIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOf(['error', 'error404', 'empty', 'not-authorized', 'no-result', 'success', ''])])
201
204
  }),
202
205
 
203
206
  /** Size prop from Carbon to shrink row height (and header height in some instances) */
@@ -693,7 +696,8 @@ var defaultProps = function defaultProps(baseProps) {
693
696
  // TODO: set default in v3. Leaving null for backwards compat. to match 'id' which was
694
697
  // previously used as testId.
695
698
  testId: null,
696
- enablePercentageColumnWidth: false
699
+ enablePercentageColumnWidth: false,
700
+ emptyStateIcon: ''
697
701
  };
698
702
  };
699
703
 
@@ -722,7 +726,8 @@ var Table = function Table(props) {
722
726
  testId = _merge2.testId,
723
727
  size = _merge2.size,
724
728
  zIndex = _merge2.zIndex,
725
- others = _objectWithoutProperties(_merge2, ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex"]); // There is no way to access the current search value in the Table
729
+ emptyStateIcon = _merge2.emptyStateIcon,
730
+ others = _objectWithoutProperties(_merge2, ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex", "emptyStateIcon"]); // There is no way to access the current search value in the Table
726
731
  // so we need to track that for the save view functionality.
727
732
 
728
733
 
@@ -1121,6 +1126,7 @@ var Table = function Table(props) {
1121
1126
  id: id,
1122
1127
  totalColumns: totalColumns,
1123
1128
  isFiltered: isFiltered,
1129
+ emptyStateIcon: emptyStateIcon,
1124
1130
  emptyState: // only show emptyState if no filters or search is applied
1125
1131
  view.table.emptyState && !isFiltered ? view.table.emptyState : {
1126
1132
  message: i18n.emptyMessage,
@@ -1469,6 +1475,38 @@ Table.__docgenInfo = {
1469
1475
  "name": "bool",
1470
1476
  "description": "Freezes table header and footer",
1471
1477
  "required": false
1478
+ },
1479
+ "emptyStateIcon": {
1480
+ "name": "union",
1481
+ "value": [{
1482
+ "name": "func"
1483
+ }, {
1484
+ "name": "enum",
1485
+ "value": [{
1486
+ "value": "'error'",
1487
+ "computed": false
1488
+ }, {
1489
+ "value": "'error404'",
1490
+ "computed": false
1491
+ }, {
1492
+ "value": "'empty'",
1493
+ "computed": false
1494
+ }, {
1495
+ "value": "'not-authorized'",
1496
+ "computed": false
1497
+ }, {
1498
+ "value": "'no-result'",
1499
+ "computed": false
1500
+ }, {
1501
+ "value": "'success'",
1502
+ "computed": false
1503
+ }, {
1504
+ "value": "''",
1505
+ "computed": false
1506
+ }]
1507
+ }],
1508
+ "description": "display icon while Table data is empty",
1509
+ "required": false
1472
1510
  }
1473
1511
  }
1474
1512
  },
@@ -26,12 +26,16 @@ var propTypes = {
26
26
  // TODO: remove deprecated 'testID' in v3
27
27
  // eslint-disable-next-line react/require-default-props
28
28
  testID: deprecate(PropTypes__default['default'].string, "The 'testID' prop has been deprecated. Please use 'testId' instead."),
29
- testId: PropTypes__default['default'].string
29
+ testId: PropTypes__default['default'].string,
30
+
31
+ /** icon to display while no data in table */
32
+ emptyStateIcon: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].oneOf(['error', 'error404', 'empty', 'not-authorized', 'no-result', 'success', ''])])
30
33
  };
31
34
  var defaultProps = {
32
35
  id: 'EmptyTable',
33
36
  onEmptyStateAction: null,
34
- testId: ''
37
+ testId: '',
38
+ emptyStateIcon: ''
35
39
  };
36
40
 
37
41
  var EmptyTable = function EmptyTable(_ref) {
@@ -48,18 +52,9 @@ var EmptyTable = function EmptyTable(_ref) {
48
52
  messageBody = _ref$emptyState.messageBody,
49
53
  messageWithFiltersBody = _ref$emptyState.messageWithFiltersBody,
50
54
  testID = _ref.testID,
51
- testId = _ref.testId;
52
- return /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableBody, {
53
- id: "".concat(id, "-empty-table") // TODO: remove deprecated 'testID' in v3
54
- ,
55
- "data-testid": testID || testId
56
- }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableRow, {
57
- className: "".concat(iotPrefix, "--empty-table--table-row")
58
- }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableCell, {
59
- colSpan: totalColumns
60
- }, /*#__PURE__*/React__default['default'].isValidElement(emptyState) ? emptyState : /*#__PURE__*/React__default['default'].createElement("div", {
61
- className: "empty-table-cell--default"
62
- }, isFiltered ? /*#__PURE__*/React__default['default'].createElement(EmptyState, {
55
+ testId = _ref.testId,
56
+ emptyStateIcon = _ref.emptyStateIcon;
57
+ var isFilterEmptyTable = /*#__PURE__*/React__default['default'].createElement(EmptyState, {
63
58
  icon: "no-result",
64
59
  title: messageWithFilters,
65
60
  body: messageWithFiltersBody || '',
@@ -68,15 +63,27 @@ var EmptyTable = function EmptyTable(_ref) {
68
63
  onClick: onEmptyStateAction,
69
64
  kind: 'secondary'
70
65
  } : null
71
- }) : /*#__PURE__*/React__default['default'].createElement(EmptyState, {
72
- icon: "empty",
66
+ });
67
+ var defaultEmptyTable = /*#__PURE__*/React__default['default'].createElement(EmptyState, {
68
+ icon: emptyStateIcon !== null && emptyStateIcon !== void 0 ? emptyStateIcon : 'empty',
73
69
  title: message,
74
70
  body: messageBody || '',
75
71
  action: onEmptyStateAction ? {
76
72
  label: buttonLabel,
77
73
  onClick: onEmptyStateAction
78
74
  } : null
79
- })))));
75
+ });
76
+ return /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableBody, {
77
+ id: "".concat(id, "-empty-table") // TODO: remove deprecated 'testID' in v3
78
+ ,
79
+ "data-testid": testID || testId
80
+ }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableRow, {
81
+ className: "".concat(iotPrefix, "--empty-table--table-row")
82
+ }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableCell, {
83
+ colSpan: totalColumns
84
+ }, /*#__PURE__*/React__default['default'].isValidElement(emptyState) ? emptyState : /*#__PURE__*/React__default['default'].createElement("div", {
85
+ className: "empty-table-cell--default"
86
+ }, isFiltered ? isFilterEmptyTable : defaultEmptyTable))));
80
87
  };
81
88
 
82
89
  EmptyTable.propTypes = propTypes;
@@ -119,6 +126,44 @@ EmptyTable.__docgenInfo = {
119
126
  "required": false,
120
127
  "description": ""
121
128
  },
129
+ "emptyStateIcon": {
130
+ "defaultValue": {
131
+ "value": "''",
132
+ "computed": false
133
+ },
134
+ "type": {
135
+ "name": "union",
136
+ "value": [{
137
+ "name": "func"
138
+ }, {
139
+ "name": "enum",
140
+ "value": [{
141
+ "value": "'error'",
142
+ "computed": false
143
+ }, {
144
+ "value": "'error404'",
145
+ "computed": false
146
+ }, {
147
+ "value": "'empty'",
148
+ "computed": false
149
+ }, {
150
+ "value": "'not-authorized'",
151
+ "computed": false
152
+ }, {
153
+ "value": "'no-result'",
154
+ "computed": false
155
+ }, {
156
+ "value": "'success'",
157
+ "computed": false
158
+ }, {
159
+ "value": "''",
160
+ "computed": false
161
+ }]
162
+ }]
163
+ },
164
+ "required": false,
165
+ "description": "icon to display while no data in table"
166
+ },
122
167
  "emptyState": {
123
168
  "type": {
124
169
  "name": "custom",
@@ -214,7 +214,10 @@ var propTypes = {
214
214
  hasBreadcrumbDrop: PropTypes__default['default'].bool,
215
215
 
216
216
  /** Freezes table header and footer */
217
- pinHeaderAndFooter: PropTypes__default['default'].bool
217
+ pinHeaderAndFooter: PropTypes__default['default'].bool,
218
+
219
+ /** display icon while Table data is empty */
220
+ emptyStateIcon: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].oneOf(['error', 'error404', 'empty', 'not-authorized', 'no-result', 'success', ''])])
218
221
  }),
219
222
 
220
223
  /** Size prop from Carbon to shrink row height (and header height in some instances) */
@@ -710,7 +713,8 @@ var defaultProps = function defaultProps(baseProps) {
710
713
  // TODO: set default in v3. Leaving null for backwards compat. to match 'id' which was
711
714
  // previously used as testId.
712
715
  testId: null,
713
- enablePercentageColumnWidth: false
716
+ enablePercentageColumnWidth: false,
717
+ emptyStateIcon: ''
714
718
  };
715
719
  };
716
720
 
@@ -739,7 +743,8 @@ var Table = function Table(props) {
739
743
  testId = _merge2.testId,
740
744
  size = _merge2.size,
741
745
  zIndex = _merge2.zIndex,
742
- others = _objectWithoutProperties__default['default'](_merge2, ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex"]); // There is no way to access the current search value in the Table
746
+ emptyStateIcon = _merge2.emptyStateIcon,
747
+ others = _objectWithoutProperties__default['default'](_merge2, ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex", "emptyStateIcon"]); // There is no way to access the current search value in the Table
743
748
  // so we need to track that for the save view functionality.
744
749
 
745
750
 
@@ -1138,6 +1143,7 @@ var Table = function Table(props) {
1138
1143
  id: id,
1139
1144
  totalColumns: totalColumns,
1140
1145
  isFiltered: isFiltered,
1146
+ emptyStateIcon: emptyStateIcon,
1141
1147
  emptyState: // only show emptyState if no filters or search is applied
1142
1148
  view.table.emptyState && !isFiltered ? view.table.emptyState : {
1143
1149
  message: i18n.emptyMessage,
@@ -1486,6 +1492,38 @@ Table.__docgenInfo = {
1486
1492
  "name": "bool",
1487
1493
  "description": "Freezes table header and footer",
1488
1494
  "required": false
1495
+ },
1496
+ "emptyStateIcon": {
1497
+ "name": "union",
1498
+ "value": [{
1499
+ "name": "func"
1500
+ }, {
1501
+ "name": "enum",
1502
+ "value": [{
1503
+ "value": "'error'",
1504
+ "computed": false
1505
+ }, {
1506
+ "value": "'error404'",
1507
+ "computed": false
1508
+ }, {
1509
+ "value": "'empty'",
1510
+ "computed": false
1511
+ }, {
1512
+ "value": "'not-authorized'",
1513
+ "computed": false
1514
+ }, {
1515
+ "value": "'no-result'",
1516
+ "computed": false
1517
+ }, {
1518
+ "value": "'success'",
1519
+ "computed": false
1520
+ }, {
1521
+ "value": "''",
1522
+ "computed": false
1523
+ }]
1524
+ }],
1525
+ "description": "display icon while Table data is empty",
1526
+ "required": false
1489
1527
  }
1490
1528
  }
1491
1529
  },
package/package.json CHANGED
@@ -336,11 +336,11 @@
336
336
  "whatwg-fetch": "^3.0.0"
337
337
  },
338
338
  "sideEffects": false,
339
- "version": "2.154.0-next.13",
339
+ "version": "2.154.0-next.14",
340
340
  "resolutions": {
341
341
  "chokidar": "3.3.1",
342
342
  "react-grid-layout": "1.2.2",
343
343
  "got": "11.8.5"
344
344
  },
345
- "gitHead": "a1c09550275fdb86b5d49377c2e32edd7d391a70"
345
+ "gitHead": "74abb5b40164fe8be16e73ed8c637a51d7df0dab"
346
346
  }
@@ -20657,12 +20657,16 @@
20657
20657
  // TODO: remove deprecated 'testID' in v3
20658
20658
  // eslint-disable-next-line react/require-default-props
20659
20659
  testID: deprecate$2(PropTypes__default['default'].string, "The 'testID' prop has been deprecated. Please use 'testId' instead."),
20660
- testId: PropTypes__default['default'].string
20660
+ testId: PropTypes__default['default'].string,
20661
+
20662
+ /** icon to display while no data in table */
20663
+ emptyStateIcon: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].oneOf(['error', 'error404', 'empty', 'not-authorized', 'no-result', 'success', ''])])
20661
20664
  };
20662
20665
  var defaultProps$2x = {
20663
20666
  id: 'EmptyTable',
20664
20667
  onEmptyStateAction: null,
20665
- testId: ''
20668
+ testId: '',
20669
+ emptyStateIcon: ''
20666
20670
  };
20667
20671
 
20668
20672
  var EmptyTable = function EmptyTable(_ref) {
@@ -20679,18 +20683,9 @@
20679
20683
  messageBody = _ref$emptyState.messageBody,
20680
20684
  messageWithFiltersBody = _ref$emptyState.messageWithFiltersBody,
20681
20685
  testID = _ref.testID,
20682
- testId = _ref.testId;
20683
- return /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableBody, {
20684
- id: "".concat(id, "-empty-table") // TODO: remove deprecated 'testID' in v3
20685
- ,
20686
- "data-testid": testID || testId
20687
- }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableRow, {
20688
- className: "".concat(iotPrefix$2n, "--empty-table--table-row")
20689
- }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableCell, {
20690
- colSpan: totalColumns
20691
- }, /*#__PURE__*/React__default['default'].isValidElement(emptyState) ? emptyState : /*#__PURE__*/React__default['default'].createElement("div", {
20692
- className: "empty-table-cell--default"
20693
- }, isFiltered ? /*#__PURE__*/React__default['default'].createElement(EmptyState, {
20686
+ testId = _ref.testId,
20687
+ emptyStateIcon = _ref.emptyStateIcon;
20688
+ var isFilterEmptyTable = /*#__PURE__*/React__default['default'].createElement(EmptyState, {
20694
20689
  icon: "no-result",
20695
20690
  title: messageWithFilters,
20696
20691
  body: messageWithFiltersBody || '',
@@ -20699,15 +20694,27 @@
20699
20694
  onClick: onEmptyStateAction,
20700
20695
  kind: 'secondary'
20701
20696
  } : null
20702
- }) : /*#__PURE__*/React__default['default'].createElement(EmptyState, {
20703
- icon: "empty",
20697
+ });
20698
+ var defaultEmptyTable = /*#__PURE__*/React__default['default'].createElement(EmptyState, {
20699
+ icon: emptyStateIcon !== null && emptyStateIcon !== void 0 ? emptyStateIcon : 'empty',
20704
20700
  title: message,
20705
20701
  body: messageBody || '',
20706
20702
  action: onEmptyStateAction ? {
20707
20703
  label: buttonLabel,
20708
20704
  onClick: onEmptyStateAction
20709
20705
  } : null
20710
- })))));
20706
+ });
20707
+ return /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableBody, {
20708
+ id: "".concat(id, "-empty-table") // TODO: remove deprecated 'testID' in v3
20709
+ ,
20710
+ "data-testid": testID || testId
20711
+ }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableRow, {
20712
+ className: "".concat(iotPrefix$2n, "--empty-table--table-row")
20713
+ }, /*#__PURE__*/React__default['default'].createElement(carbonComponentsReact.TableCell, {
20714
+ colSpan: totalColumns
20715
+ }, /*#__PURE__*/React__default['default'].isValidElement(emptyState) ? emptyState : /*#__PURE__*/React__default['default'].createElement("div", {
20716
+ className: "empty-table-cell--default"
20717
+ }, isFiltered ? isFilterEmptyTable : defaultEmptyTable))));
20711
20718
  };
20712
20719
 
20713
20720
  EmptyTable.propTypes = propTypes$2r;
@@ -20750,6 +20757,44 @@
20750
20757
  "required": false,
20751
20758
  "description": ""
20752
20759
  },
20760
+ "emptyStateIcon": {
20761
+ "defaultValue": {
20762
+ "value": "''",
20763
+ "computed": false
20764
+ },
20765
+ "type": {
20766
+ "name": "union",
20767
+ "value": [{
20768
+ "name": "func"
20769
+ }, {
20770
+ "name": "enum",
20771
+ "value": [{
20772
+ "value": "'error'",
20773
+ "computed": false
20774
+ }, {
20775
+ "value": "'error404'",
20776
+ "computed": false
20777
+ }, {
20778
+ "value": "'empty'",
20779
+ "computed": false
20780
+ }, {
20781
+ "value": "'not-authorized'",
20782
+ "computed": false
20783
+ }, {
20784
+ "value": "'no-result'",
20785
+ "computed": false
20786
+ }, {
20787
+ "value": "'success'",
20788
+ "computed": false
20789
+ }, {
20790
+ "value": "''",
20791
+ "computed": false
20792
+ }]
20793
+ }]
20794
+ },
20795
+ "required": false,
20796
+ "description": "icon to display while no data in table"
20797
+ },
20753
20798
  "emptyState": {
20754
20799
  "type": {
20755
20800
  "name": "custom",
@@ -48470,7 +48515,10 @@
48470
48515
  hasBreadcrumbDrop: PropTypes__default['default'].bool,
48471
48516
 
48472
48517
  /** Freezes table header and footer */
48473
- pinHeaderAndFooter: PropTypes__default['default'].bool
48518
+ pinHeaderAndFooter: PropTypes__default['default'].bool,
48519
+
48520
+ /** display icon while Table data is empty */
48521
+ emptyStateIcon: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].oneOf(['error', 'error404', 'empty', 'not-authorized', 'no-result', 'success', ''])])
48474
48522
  }),
48475
48523
 
48476
48524
  /** Size prop from Carbon to shrink row height (and header height in some instances) */
@@ -48966,7 +49014,8 @@
48966
49014
  // TODO: set default in v3. Leaving null for backwards compat. to match 'id' which was
48967
49015
  // previously used as testId.
48968
49016
  testId: null,
48969
- enablePercentageColumnWidth: false
49017
+ enablePercentageColumnWidth: false,
49018
+ emptyStateIcon: ''
48970
49019
  };
48971
49020
  };
48972
49021
 
@@ -48995,7 +49044,8 @@
48995
49044
  testId = _merge2.testId,
48996
49045
  size = _merge2.size,
48997
49046
  zIndex = _merge2.zIndex,
48998
- others = objectWithoutProperties(_merge2, ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex"]); // There is no way to access the current search value in the Table
49047
+ emptyStateIcon = _merge2.emptyStateIcon,
49048
+ others = objectWithoutProperties(_merge2, ["id", "columns", "enablePercentageColumnWidth", "columnGroups", "data", "expandedData", "locale", "view", "actions", "actions", "options", "lightweight", "className", "style", "i18n", "secondaryTitle", "tooltip", "error", "testId", "size", "zIndex", "emptyStateIcon"]); // There is no way to access the current search value in the Table
48999
49049
  // so we need to track that for the save view functionality.
49000
49050
 
49001
49051
 
@@ -49394,6 +49444,7 @@
49394
49444
  id: id,
49395
49445
  totalColumns: totalColumns,
49396
49446
  isFiltered: isFiltered,
49447
+ emptyStateIcon: emptyStateIcon,
49397
49448
  emptyState: // only show emptyState if no filters or search is applied
49398
49449
  view.table.emptyState && !isFiltered ? view.table.emptyState : {
49399
49450
  message: i18n.emptyMessage,
@@ -49742,6 +49793,38 @@
49742
49793
  "name": "bool",
49743
49794
  "description": "Freezes table header and footer",
49744
49795
  "required": false
49796
+ },
49797
+ "emptyStateIcon": {
49798
+ "name": "union",
49799
+ "value": [{
49800
+ "name": "func"
49801
+ }, {
49802
+ "name": "enum",
49803
+ "value": [{
49804
+ "value": "'error'",
49805
+ "computed": false
49806
+ }, {
49807
+ "value": "'error404'",
49808
+ "computed": false
49809
+ }, {
49810
+ "value": "'empty'",
49811
+ "computed": false
49812
+ }, {
49813
+ "value": "'not-authorized'",
49814
+ "computed": false
49815
+ }, {
49816
+ "value": "'no-result'",
49817
+ "computed": false
49818
+ }, {
49819
+ "value": "'success'",
49820
+ "computed": false
49821
+ }, {
49822
+ "value": "''",
49823
+ "computed": false
49824
+ }]
49825
+ }],
49826
+ "description": "display icon while Table data is empty",
49827
+ "required": false
49745
49828
  }
49746
49829
  }
49747
49830
  },