@carbon/ibm-products 1.61.1 → 1.62.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/css/index-full-carbon.css +156 -68
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +3 -3
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +1753 -0
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +3 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +156 -68
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +3 -3
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +156 -68
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +3 -3
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Coachmark/Coachmark.js +17 -5
  18. package/es/components/Coachmark/CoachmarkDragbar.js +12 -5
  19. package/es/components/Coachmark/CoachmarkHeader.js +2 -1
  20. package/es/components/Coachmark/CoachmarkOverlay.js +105 -9
  21. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
  22. package/es/components/CoachmarkFixed/CoachmarkFixed.js +26 -6
  23. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +28 -3
  24. package/es/components/CoachmarkStack/CoachmarkStack.js +19 -4
  25. package/es/components/CoachmarkStack/CoachmarkStackHome.js +45 -11
  26. package/es/components/Datagrid/Datagrid/DatagridContent.js +12 -9
  27. package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +4 -4
  28. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +41 -25
  29. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
  30. package/es/components/Datagrid/Datagrid/DatagridRow.js +5 -2
  31. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +12 -11
  32. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  33. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +29 -23
  34. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
  35. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +50 -14
  36. package/es/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
  37. package/es/components/Datagrid/useActionsColumn.js +9 -9
  38. package/es/components/Datagrid/useDatagrid.js +13 -1
  39. package/es/components/Datagrid/useFlexResize.js +19 -9
  40. package/es/components/Datagrid/useInfiniteScroll.js +10 -9
  41. package/es/components/Datagrid/useOnRowClick.js +6 -7
  42. package/es/components/Datagrid/useParentDimensions.js +6 -6
  43. package/es/components/Datagrid/useResizeTable.js +7 -7
  44. package/es/components/Datagrid/useSelectAllToggle.js +2 -2
  45. package/es/components/Datagrid/useSelectRows.js +31 -21
  46. package/es/components/Datagrid/useSkeletonRows.js +6 -6
  47. package/es/components/Datagrid/useSortableColumns.js +4 -5
  48. package/es/components/Datagrid/useStickyColumn.js +13 -6
  49. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
  50. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
  51. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
  52. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
  53. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
  54. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
  55. package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -4
  56. package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -4
  57. package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
  58. package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
  59. package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
  60. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
  61. package/es/global/js/hooks/index.js +3 -2
  62. package/es/global/js/hooks/usePrefix.js +11 -0
  63. package/es/global/js/package-settings.js +1 -2
  64. package/lib/components/Coachmark/Coachmark.js +16 -4
  65. package/lib/components/Coachmark/CoachmarkDragbar.js +12 -5
  66. package/lib/components/Coachmark/CoachmarkHeader.js +2 -1
  67. package/lib/components/Coachmark/CoachmarkOverlay.js +105 -8
  68. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
  69. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +25 -5
  70. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +28 -3
  71. package/lib/components/CoachmarkStack/CoachmarkStack.js +18 -3
  72. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +44 -10
  73. package/lib/components/Datagrid/Datagrid/DatagridContent.js +12 -9
  74. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +4 -4
  75. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +41 -32
  76. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
  77. package/lib/components/Datagrid/Datagrid/DatagridRow.js +5 -2
  78. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +6 -4
  79. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  80. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +29 -23
  81. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +12 -12
  82. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +52 -15
  83. package/lib/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
  84. package/lib/components/Datagrid/useActionsColumn.js +9 -12
  85. package/lib/components/Datagrid/useDatagrid.js +13 -1
  86. package/lib/components/Datagrid/useFlexResize.js +19 -9
  87. package/lib/components/Datagrid/useInfiniteScroll.js +9 -9
  88. package/lib/components/Datagrid/useOnRowClick.js +6 -7
  89. package/lib/components/Datagrid/useParentDimensions.js +5 -6
  90. package/lib/components/Datagrid/useResizeTable.js +6 -7
  91. package/lib/components/Datagrid/useSelectAllToggle.js +2 -2
  92. package/lib/components/Datagrid/useSelectRows.js +31 -21
  93. package/lib/components/Datagrid/useSkeletonRows.js +6 -6
  94. package/lib/components/Datagrid/useSortableColumns.js +4 -5
  95. package/lib/components/Datagrid/useStickyColumn.js +8 -0
  96. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
  97. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
  98. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
  99. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
  100. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
  101. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
  102. package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -4
  103. package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -4
  104. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
  105. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
  106. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
  107. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
  108. package/lib/global/js/hooks/index.js +8 -1
  109. package/lib/global/js/hooks/usePrefix.js +19 -0
  110. package/lib/global/js/package-settings.js +1 -2
  111. package/package.json +2 -2
  112. package/scss/components/Checklist/_checklist.scss +13 -25
  113. package/scss/components/Coachmark/styles/_coachmark-dragbar.scss +1 -45
  114. package/scss/components/Coachmark/styles/_coachmark-header.scss +0 -33
  115. package/scss/components/Coachmark/styles/_coachmark-overlay.scss +113 -5
  116. package/scss/components/Coachmark/styles/_coachmark-tagline.scss +18 -0
  117. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +19 -1
  118. package/scss/components/CoachmarkOverlayElement/_coachmark-overlay-element.scss +2 -0
  119. package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +1 -0
  120. package/scss/components/CoachmarkStack/_coachmark-stack.scss +3 -0
  121. package/scss/components/Datagrid/styles/_datagrid.scss +31 -5
  122. package/scss/components/Datagrid/styles/_useNestedRows.scss +1 -1
  123. package/scss/components/_index-released-only.scss +1 -0
@@ -31,7 +31,7 @@ var TableContainer = DataTable.TableContainer,
31
31
  Table = DataTable.Table;
32
32
  var blockClass = "".concat(pkg.prefix, "--datagrid");
33
33
  export var DatagridContent = function DatagridContent(_ref) {
34
- var _cx4;
34
+ var _cx5;
35
35
  var datagridState = _ref.datagridState,
36
36
  title = _ref.title;
37
37
  var _useContext = useContext(InlineEditContext),
@@ -44,8 +44,7 @@ export var DatagridContent = function DatagridContent(_ref) {
44
44
  var activeCellId = inlineEditState.activeCellId,
45
45
  gridActive = inlineEditState.gridActive,
46
46
  editId = inlineEditState.editId;
47
- var _datagridState$getTab = datagridState.getTableProps,
48
- getTableProps = _datagridState$getTab === void 0 ? function () {} : _datagridState$getTab,
47
+ var getTableProps = datagridState.getTableProps,
49
48
  getFilterFlyoutProps = datagridState.getFilterFlyoutProps,
50
49
  withVirtualScroll = datagridState.withVirtualScroll,
51
50
  DatagridPagination = datagridState.DatagridPagination,
@@ -68,6 +67,7 @@ export var DatagridContent = function DatagridContent(_ref) {
68
67
  state = datagridState.state,
69
68
  page = datagridState.page,
70
69
  rows = datagridState.rows;
70
+ var columnResizing = state.columnResizing;
71
71
  var contentRows = DatagridPagination && page || rows;
72
72
  var gridAreaRef = useRef();
73
73
  var multiKeyTrackingRef = useRef();
@@ -89,10 +89,11 @@ export var DatagridContent = function DatagridContent(_ref) {
89
89
  var renderTable = function renderTable() {
90
90
  var _getTableProps;
91
91
  return /*#__PURE__*/React.createElement(Table, _extends({}, getTableProps(), {
92
- className: cx(withVirtualScroll ? '' : "".concat(blockClass, "__table-simple"), "".concat(blockClass, "__vertical-align-").concat(verticalAlign), _defineProperty({}, "".concat(blockClass, "__variable-row-height"), variableRowHeight), _defineProperty({}, "".concat(blockClass, "__table-with-inline-edit"), withInlineEdit), _defineProperty({}, "".concat(blockClass, "__table-grid-active"), gridActive), (_getTableProps = getTableProps()) === null || _getTableProps === void 0 ? void 0 : _getTableProps.className),
92
+ className: cx(withVirtualScroll ? '' : "".concat(blockClass, "__table-simple"), "".concat(blockClass, "__vertical-align-").concat(verticalAlign), _defineProperty({}, "".concat(blockClass, "__variable-row-height"), variableRowHeight), _defineProperty({}, "".concat(blockClass, "__table-with-inline-edit"), withInlineEdit), _defineProperty({}, "".concat(blockClass, "__table-grid-active"), gridActive), _defineProperty({}, "".concat(blockClass, "__table-is-resizing"), typeof columnResizing.isResizingColumn === 'string'), (_getTableProps = getTableProps()) === null || _getTableProps === void 0 ? void 0 : _getTableProps.className),
93
93
  role: withInlineEdit && 'grid',
94
94
  tabIndex: withInlineEdit && 0,
95
- onKeyDown: withInlineEdit ? function (event) {
95
+ onKeyDown: /* istanbul ignore next */
96
+ withInlineEdit && function (event) {
96
97
  return handleGridKeyPress({
97
98
  event: event,
98
99
  dispatch: dispatch,
@@ -101,10 +102,10 @@ export var DatagridContent = function DatagridContent(_ref) {
101
102
  state: inlineEditState,
102
103
  usingMac: usingMac
103
104
  });
104
- } : null,
105
- onFocus: withInlineEdit ? function () {
105
+ },
106
+ onFocus: withInlineEdit && function () {
106
107
  return handleGridFocus(inlineEditState, dispatch);
107
- } : null,
108
+ },
108
109
  title: title
109
110
  }), !withVirtualScroll && /*#__PURE__*/React.createElement(DatagridHead, datagridState), /*#__PURE__*/React.createElement(DatagridBody, _extends({}, datagridState, {
110
111
  rows: contentRows
@@ -133,6 +134,8 @@ export var DatagridContent = function DatagridContent(_ref) {
133
134
  useSubscribeToEventEmitter(CLEAR_SINGLE_FILTER, function (id) {
134
135
  return clearSingleFilter(id, setAllFilters, state);
135
136
  });
137
+
138
+ /* istanbul ignore next */
136
139
  var renderFilterSummary = function renderFilterSummary() {
137
140
  return state.filters.length > 0 && /*#__PURE__*/React.createElement(FilterSummary, {
138
141
  className: "".concat(blockClass, "__filter-summary"),
@@ -145,7 +148,7 @@ export var DatagridContent = function DatagridContent(_ref) {
145
148
  });
146
149
  };
147
150
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TableContainer, {
148
- className: cx("".concat(blockClass, "__grid-container"), withVirtualScroll || fullHeightDatagrid ? "".concat(blockClass, "__full-height") : '', DatagridPagination ? "".concat(blockClass, "__with-pagination") : '', useDenseHeader ? "".concat(blockClass, "__dense-header") : '', (_cx4 = {}, _defineProperty(_cx4, "".concat(blockClass, "__grid-container-grid-active"), gridActive), _defineProperty(_cx4, "".concat(blockClass, "__grid-container-inline-edit"), withInlineEdit), _defineProperty(_cx4, "".concat(blockClass, "__grid-container-grid-active--without-toolbar"), withInlineEdit && !DatagridActions), _cx4)),
151
+ className: cx("".concat(blockClass, "__grid-container"), withVirtualScroll || fullHeightDatagrid ? "".concat(blockClass, "__full-height") : '', DatagridPagination ? "".concat(blockClass, "__with-pagination") : '', useDenseHeader ? "".concat(blockClass, "__dense-header") : '', (_cx5 = {}, _defineProperty(_cx5, "".concat(blockClass, "__grid-container-grid-active"), gridActive), _defineProperty(_cx5, "".concat(blockClass, "__grid-container-inline-edit"), withInlineEdit), _defineProperty(_cx5, "".concat(blockClass, "__grid-container-grid-active--without-toolbar"), withInlineEdit && !DatagridActions), _cx5)),
149
152
  title: gridTitle,
150
153
  description: gridDescription
151
154
  }, /*#__PURE__*/React.createElement(DatagridToolbar, datagridState), /*#__PURE__*/React.createElement("div", {
@@ -13,10 +13,10 @@ var blockClass = "".concat(pkg.prefix, "--datagrid");
13
13
  var DatagridExpandedRow = function DatagridExpandedRow(ExpandedRowContentComponent) {
14
14
  return function (datagridState) {
15
15
  var row = datagridState.row;
16
- var _ref = row || {},
17
- expandedContentHeight = _ref.expandedContentHeight;
16
+ var expandedContentHeight = row.expandedContentHeight;
18
17
  var toggleParentHoverClass = function toggleParentHoverClass(event, eventType) {
19
18
  var _event$target, _event$target$parentN;
19
+ /* istanbul ignore else */
20
20
  if (event !== null && event !== void 0 && (_event$target = event.target) !== null && _event$target !== void 0 && (_event$target$parentN = _event$target.parentNode) !== null && _event$target$parentN !== void 0 && _event$target$parentN.previousElementSibling) {
21
21
  var parentNode = event.target.parentNode.previousElementSibling;
22
22
  if (eventType === 'enter') {
@@ -37,9 +37,9 @@ var DatagridExpandedRow = function DatagridExpandedRow(ExpandedRowContentCompone
37
37
  }, /*#__PURE__*/React.createElement("div", {
38
38
  className: "".concat(blockClass, "__expanded-row-content"),
39
39
  style: {
40
- height: expandedContentHeight ? expandedContentHeight : null
40
+ height: expandedContentHeight && expandedContentHeight
41
41
  }
42
- }, ExpandedRowContentComponent(datagridState)));
42
+ }, /*#__PURE__*/React.createElement(ExpandedRowContentComponent, datagridState)));
43
43
  };
44
44
  };
45
45
  export default DatagridExpandedRow;
@@ -1,6 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
6
  /**
5
7
  * Copyright IBM Corp. 2020, 2023
6
8
  *
@@ -28,35 +30,45 @@ var getAccessibilityProps = function getAccessibilityProps(header) {
28
30
  return props;
29
31
  };
30
32
  var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
33
+ var resizerAriaLabel = datagridState.resizerAriaLabel;
31
34
  // Used to measure the height of the table and uses that value
32
35
  // to display a vertical line to indicate the column you are resizing
33
36
  useEffect(function () {
34
37
  var tableId = datagridState.tableId;
35
- if (tableId) {
36
- var gridElement = document.querySelector("#".concat(tableId));
37
- var tableElement = gridElement.querySelector('table');
38
- var headerRowElement = document.querySelector("#".concat(tableId, " .").concat(blockClass, "__head"));
39
- var hasHorizontalScrollbar = tableElement.scrollWidth > tableElement.clientWidth;
40
- var scrollBuffer = hasHorizontalScrollbar ? 18 : 2;
41
- var tableToolbar = gridElement.querySelector(".".concat(blockClass, "__table-toolbar"));
42
- var tableToolbarHeight = (tableToolbar === null || tableToolbar === void 0 ? void 0 : tableToolbar.offsetHeight) || 0;
43
- var setCustomValues = function setCustomValues(_ref) {
44
- var _ref$rowHeight = _ref.rowHeight,
45
- rowHeight = _ref$rowHeight === void 0 ? 48 : _ref$rowHeight,
46
- gridHeight = _ref.gridHeight;
47
- headerRowElement.style.setProperty("--".concat(blockClass, "--row-height"), px(rowHeight));
48
- headerRowElement.style.setProperty("--".concat(blockClass, "--grid-height"), px(gridHeight - scrollBuffer - tableToolbarHeight));
49
- headerRowElement.style.setProperty("--".concat(blockClass, "--header-height"), px(headerRowElement.offsetHeight));
50
- };
51
- setCustomValues({
52
- gridHeight: gridElement.offsetHeight,
53
- rowHeight: headerRowElement.clientHeight
54
- });
55
- }
38
+ var gridElement = document.querySelector("#".concat(tableId));
39
+ var tableElement = gridElement.querySelector('table');
40
+ var headerRowElement = document.querySelector("#".concat(tableId, " .").concat(blockClass, "__head"));
41
+ var hasHorizontalScrollbar = tableElement.scrollWidth > tableElement.clientWidth;
42
+ var scrollBuffer = hasHorizontalScrollbar ? 18 : 2;
43
+ var tableToolbar = gridElement.querySelector(".".concat(blockClass, "__table-toolbar"));
44
+ var tableToolbarHeight = (tableToolbar === null || tableToolbar === void 0 ? void 0 : tableToolbar.offsetHeight) || 0;
45
+ var setCustomValues = function setCustomValues(_ref) {
46
+ var _ref$rowHeight = _ref.rowHeight,
47
+ rowHeight = _ref$rowHeight === void 0 ? 48 : _ref$rowHeight,
48
+ gridHeight = _ref.gridHeight;
49
+ headerRowElement.style.setProperty("--".concat(blockClass, "--row-height"), px(rowHeight));
50
+ headerRowElement.style.setProperty("--".concat(blockClass, "--grid-height"), px(gridHeight - scrollBuffer - tableToolbarHeight));
51
+ headerRowElement.style.setProperty("--".concat(blockClass, "--header-height"), px(headerRowElement.offsetHeight));
52
+ };
53
+ setCustomValues({
54
+ gridHeight: gridElement.offsetHeight,
55
+ rowHeight: headerRowElement.clientHeight
56
+ });
56
57
  }, [datagridState.rowSize, datagridState.tableId, datagridState]);
57
58
  var _useState = useState(2),
58
59
  _useState2 = _slicedToArray(_useState, 1),
59
60
  incrementAmount = _useState2[0];
61
+ var handleOnMouseDownResize = function handleOnMouseDownResize(event, resizeProps) {
62
+ var _resizeProps = _objectSpread({}, resizeProps()),
63
+ onMouseDown = _resizeProps.onMouseDown;
64
+ // When event.button is 2, that is a right click
65
+ // and we do not want to resize
66
+ if (event.button === 2 || event.ctrlKey) {
67
+ event.target.blur();
68
+ return;
69
+ }
70
+ onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(event);
71
+ };
60
72
  return /*#__PURE__*/React.createElement(TableRow, _extends({}, headerGroup.getHeaderGroupProps({
61
73
  role: false
62
74
  }), {
@@ -80,15 +92,19 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
80
92
  dispatch = datagridState.dispatch,
81
93
  onColResizeEnd = datagridState.onColResizeEnd;
82
94
  var columnResizing = state.columnResizing;
83
- var columnWidths = columnResizing.columnWidths;
95
+ var _ref4 = columnResizing || {},
96
+ columnWidths = _ref4.columnWidths;
84
97
  var originalCol = visibleColumns[index];
85
98
  return /*#__PURE__*/React.createElement(TableHeader, _extends({}, header.getHeaderProps({
86
99
  role: false
87
100
  }), {
88
- className: cx((_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__resizableColumn"), header.getResizerProps), _defineProperty(_cx, "".concat(blockClass, "__isResizing"), header.isResizing), _defineProperty(_cx, "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), _defineProperty(_cx, "".concat(blockClass, "__isSorted"), header.isSorted), _cx), header.getHeaderProps().className),
101
+ className: cx((_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__resizableColumn"), header.getResizerProps), _defineProperty(_cx, "".concat(blockClass, "__isResizing"), header.isResizing), _defineProperty(_cx, "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), _defineProperty(_cx, "".concat(blockClass, "__isSorted"), header.isSorted), _defineProperty(_cx, "".concat(blockClass, "__header-actions-column"), header.isAction), _cx), header.getHeaderProps().className),
89
102
  key: header.id,
90
103
  "aria-hidden": header.id === 'spacer' && 'true'
91
- }, getAccessibilityProps(header)), header.render('Header'), header.getResizerProps && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({}, header.getResizerProps(), {
104
+ }, getAccessibilityProps(header)), header.render('Header'), header.getResizerProps && !header.isAction && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({}, header.getResizerProps(), {
105
+ onMouseDown: function onMouseDown(event) {
106
+ return handleOnMouseDownResize(event, header.getResizerProps);
107
+ },
92
108
  onKeyDown: function onKeyDown(event) {
93
109
  var key = event.key;
94
110
  if (key === 'ArrowLeft' || key === 'ArrowRight') {
@@ -112,7 +128,7 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
112
128
  className: cx("".concat(blockClass, "__col-resizer-range")),
113
129
  type: "range",
114
130
  defaultValue: originalCol.width,
115
- "aria-label": "Resize column"
131
+ "aria-label": resizerAriaLabel || 'Resize column'
116
132
  })), /*#__PURE__*/React.createElement("span", {
117
133
  className: "".concat(blockClass, "__col-resize-indicator")
118
134
  })));
@@ -28,8 +28,11 @@ var DatagridRefBody = function DatagridRefBody(datagridState) {
28
28
  className: cx("".concat(blockClass, "__simple-body"), getTableBodyProps().className)
29
29
  }), rows.map(function (row) {
30
30
  prepareRow(row);
31
+ var _row$getRowProps = row.getRowProps(),
32
+ key = _row$getRowProps.key;
31
33
  return row.RowRenderer(_objectSpread(_objectSpread({}, datagridState), {}, {
32
- row: row
34
+ row: row,
35
+ key: key
33
36
  }));
34
37
  }));
35
38
  };
@@ -35,7 +35,8 @@ var DatagridRow = function DatagridRow(datagridState) {
35
35
  var row = datagridState.row,
36
36
  rowSize = datagridState.rowSize,
37
37
  withNestedRows = datagridState.withNestedRows,
38
- prepareRow = datagridState.prepareRow;
38
+ prepareRow = datagridState.prepareRow,
39
+ key = datagridState.key;
39
40
  var getVisibleNestedRowCount = function getVisibleNestedRowCount(_ref) {
40
41
  var isExpanded = _ref.isExpanded,
41
42
  subRows = _ref.subRows;
@@ -93,7 +94,9 @@ var DatagridRow = function DatagridRow(datagridState) {
93
94
  }
94
95
  };
95
96
  var rowClassNames = cx("".concat(blockClass, "__carbon-row"), (_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__carbon-row-expanded"), row.isExpanded), _defineProperty(_cx, "".concat(blockClass, "__carbon-row-expandable"), row.canExpand), _defineProperty(_cx, "".concat(carbon.prefix, "--data-table--selected"), row.isSelected), _cx));
96
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TableRow, _extends({
97
+ return /*#__PURE__*/React.createElement(React.Fragment, {
98
+ key: key
99
+ }, /*#__PURE__*/React.createElement(TableRow, _extends({
97
100
  className: rowClassNames
98
101
  }, row.getRowProps({
99
102
  role: false
@@ -3,14 +3,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
  var _excluded = ["onChange"];
6
- /*
7
- * Licensed Materials - Property of IBM
8
- * 5724-Q36
9
- * (c) Copyright IBM Corp. 2023
10
- * US Government Users Restricted Rights - Use, duplication or disclosure
11
- * restricted by GSA ADP Schedule Contract with IBM Corp.
6
+ /**
7
+ * Copyright IBM Corp. 2020, 2023
8
+ *
9
+ * This source code is licensed under the Apache-2.0 license found in the
10
+ * LICENSE file in the root directory of this source tree.
12
11
  */
13
- // @flow
12
+
14
13
  import React, { useLayoutEffect, useState } from 'react';
15
14
  import { DataTable } from 'carbon-components-react';
16
15
  import cx from 'classnames';
@@ -23,6 +22,7 @@ var SelectAll = function SelectAll(datagridState) {
23
22
  windowSize = _useState2[0],
24
23
  setWindowSize = _useState2[1];
25
24
  useLayoutEffect(function () {
25
+ /* istanbul ignore next */
26
26
  function updateSize() {
27
27
  setWindowSize(window.innerWidth);
28
28
  }
@@ -43,15 +43,15 @@ var SelectAll = function SelectAll(datagridState) {
43
43
  var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
44
44
  if (hideSelectAll || radio) {
45
45
  return /*#__PURE__*/React.createElement("div", {
46
- className: cx("".concat(blockClass, "__head-hidden-select-all"), _defineProperty({}, "".concat(blockClass, "__select-all-sticky-left"), isFirstColumnStickyLeft && windowSize > 671))
46
+ className: cx("".concat(blockClass, "__head-hidden-select-all"), _defineProperty({}, "".concat(blockClass, "__select-all-sticky-left"), /* istanbul ignore next */
47
+ isFirstColumnStickyLeft && windowSize > 671))
47
48
  });
48
49
  }
49
50
  var getProps = DatagridPagination ? getToggleAllPageRowsSelectedProps : getToggleAllRowsSelectedProps;
50
51
  var _getProps = getProps(),
51
52
  onChange = _getProps.onChange,
52
53
  selectProps = _objectWithoutProperties(_getProps, _excluded);
53
- var _ref = selectProps || {},
54
- indeterminate = _ref.indeterminate;
54
+ var indeterminate = selectProps.indeterminate;
55
55
  var handleSelectAllChange = function handleSelectAllChange(event) {
56
56
  if (indeterminate) {
57
57
  return onChange === null || onChange === void 0 ? void 0 : onChange({
@@ -63,7 +63,8 @@ var SelectAll = function SelectAll(datagridState) {
63
63
  return onChange === null || onChange === void 0 ? void 0 : onChange(event);
64
64
  };
65
65
  return /*#__PURE__*/React.createElement("div", {
66
- className: cx("".concat(blockClass, "__head-select-all"), "".concat(blockClass, "__checkbox-cell"), _defineProperty({}, "".concat(blockClass, "__checkbox-cell-sticky-left"), isFirstColumnStickyLeft && windowSize > 671))
66
+ className: cx("".concat(blockClass, "__head-select-all"), "".concat(blockClass, "__checkbox-cell"), _defineProperty({}, "".concat(blockClass, "__checkbox-cell-sticky-left"), /* istanbul ignore next */
67
+ isFirstColumnStickyLeft && windowSize > 671))
67
68
  }, /*#__PURE__*/React.createElement(TableSelectAll, _extends({}, selectProps, {
68
69
  name: "".concat(tableId, "-select-all-checkbox-name"),
69
70
  onSelect: handleSelectAllChange,
@@ -25,8 +25,11 @@ var DatagridSimpleBody = function DatagridSimpleBody(datagridState) {
25
25
  className: cx("".concat(blockClass, "__simple-body"), getTableBodyProps().className)
26
26
  }), rows.map(function (row) {
27
27
  prepareRow(row);
28
+ var _row$getRowProps = row.getRowProps(),
29
+ key = _row$getRowProps.key;
28
30
  return row.RowRenderer(_objectSpread(_objectSpread({}, datagridState), {}, {
29
- row: row
31
+ row: row,
32
+ key: key
30
33
  }));
31
34
  }));
32
35
  };
@@ -15,9 +15,10 @@ import { ButtonMenu, ButtonMenuItem } from '../../ButtonMenu';
15
15
  import { pkg, carbon } from '../../../settings';
16
16
  import cx from 'classnames';
17
17
  var blockClass = "".concat(pkg.prefix, "--datagrid");
18
+ var toolbarClass = "".concat(blockClass, "__table-toolbar");
19
+ var menuClass = "".concat(blockClass, "__button-menu");
18
20
  var TableToolbar = DataTable.TableToolbar;
19
21
  var DatagridBatchActionsToolbar = function DatagridBatchActionsToolbar(datagridState, width, ref) {
20
- var _Object$keys;
21
22
  var _useState = useState(false),
22
23
  _useState2 = _slicedToArray(_useState, 2),
23
24
  displayAllInMenu = _useState2[0],
@@ -33,8 +34,12 @@ var DatagridBatchActionsToolbar = function DatagridBatchActionsToolbar(datagridS
33
34
  var selectedRowIds = datagridState.state.selectedRowIds,
34
35
  toggleAllRowsSelected = datagridState.toggleAllRowsSelected,
35
36
  toolbarBatchActions = datagridState.toolbarBatchActions,
36
- setGlobalFilter = datagridState.setGlobalFilter;
37
- var totalSelected = (_Object$keys = Object.keys(selectedRowIds || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length;
37
+ setGlobalFilter = datagridState.setGlobalFilter,
38
+ batchActionMenuButtonLabel = datagridState.batchActionMenuButtonLabel,
39
+ translateWithIdBatchActions = datagridState.translateWithIdBatchActions;
40
+ var batchActionMenuButtonLabelText = batchActionMenuButtonLabel !== null && batchActionMenuButtonLabel !== void 0 ? batchActionMenuButtonLabel : 'More';
41
+ var selectedKeys = Object.keys(selectedRowIds || {});
42
+ var totalSelected = selectedKeys.length;
38
43
 
39
44
  // Get initial width of batch actions container,
40
45
  // used to measure when all items are put inside
@@ -64,25 +69,25 @@ var DatagridBatchActionsToolbar = function DatagridBatchActionsToolbar(datagridS
64
69
  return null;
65
70
  }
66
71
  return /*#__PURE__*/React.createElement(ButtonMenu, {
67
- label: width > minWidthBeforeOverflowIcon ? 'More' : null,
72
+ label: width > minWidthBeforeOverflowIcon ? batchActionMenuButtonLabelText : null,
68
73
  renderIcon: width > minWidthBeforeOverflowIcon ? Add16 : OverflowMenuVertical16,
69
- className: cx("".concat(blockClass, "__button-menu"), _defineProperty({}, "".concat(blockClass, "__button-menu--icon-only"), width <= minWidthBeforeOverflowIcon)),
70
- menuOptionsClass: "".concat(blockClass, "__button-menu-options"),
74
+ className: cx([menuClass, _defineProperty({}, "".concat(menuClass, "--icon-only"), width <= minWidthBeforeOverflowIcon)]),
75
+ menuOptionsClass: "".concat(menuClass, "-options"),
71
76
  flipped: true
72
- }, toolbarBatchActions && toolbarBatchActions.map(function (batchAction, index) {
73
- if (index < 2 && !displayAllInMenu) {
74
- return;
75
- }
76
- return /*#__PURE__*/React.createElement(ButtonMenuItem, {
77
- key: "".concat(batchAction.label, "-").concat(index),
78
- itemText: batchAction.label,
79
- onClick: function onClick() {
80
- batchAction.onClick();
81
- if (batchAction.type === 'select_all') {
82
- toggleAllRowsSelected(true);
77
+ }, toolbarBatchActions === null || toolbarBatchActions === void 0 ? void 0 : toolbarBatchActions.map(function (batchAction, index) {
78
+ var hidden = index < 2 && !displayAllInMenu;
79
+ if (!hidden) {
80
+ return /*#__PURE__*/React.createElement(ButtonMenuItem, {
81
+ key: "".concat(batchAction.label, "-").concat(index),
82
+ itemText: batchAction.label,
83
+ onClick: function onClick() {
84
+ batchAction.onClick();
85
+ if (batchAction.type === 'select_all') {
86
+ toggleAllRowsSelected(true);
87
+ }
83
88
  }
84
- }
85
- });
89
+ });
90
+ }
86
91
  }));
87
92
  };
88
93
 
@@ -95,7 +100,8 @@ var DatagridBatchActionsToolbar = function DatagridBatchActionsToolbar(datagridS
95
100
  onCancel: function onCancel() {
96
101
  toggleAllRowsSelected(false);
97
102
  setGlobalFilter(null);
98
- }
103
+ },
104
+ translateWithId: translateWithIdBatchActions
99
105
  }, !displayAllInMenu && toolbarBatchActions && (toolbarBatchActions === null || toolbarBatchActions === void 0 ? void 0 : toolbarBatchActions.map(function (batchAction, index) {
100
106
  if (index < 2 && toolbarBatchActions.length > 3 || index < 3 && toolbarBatchActions.length <= 3) {
101
107
  return /*#__PURE__*/React.createElement(TableBatchAction, {
@@ -120,12 +126,12 @@ var DatagridToolbar = function DatagridToolbar(datagridState) {
120
126
  DatagridBatchActions = datagridState.DatagridBatchActions,
121
127
  batchActions = datagridState.batchActions,
122
128
  rowSize = datagridState.rowSize;
123
- var getRowHeight = rowSize ? rowSize : 'lg';
129
+ var getRowHeight = rowSize || 'lg';
124
130
  return batchActions && DatagridActions ? /*#__PURE__*/React.createElement("div", {
125
131
  ref: ref,
126
- className: cx("".concat(blockClass, "__table-toolbar"), "".concat(blockClass, "__table-toolbar--").concat(getRowHeight))
132
+ className: cx([toolbarClass, "".concat(toolbarClass, "--").concat(getRowHeight)])
127
133
  }, /*#__PURE__*/React.createElement(TableToolbar, null, DatagridActions && DatagridActions(datagridState), DatagridBatchActionsToolbar && DatagridBatchActionsToolbar(datagridState, width, ref))) : DatagridActions ? /*#__PURE__*/React.createElement("div", {
128
- className: "".concat(blockClass, "__table-toolbar")
134
+ className: toolbarClass
129
135
  }, /*#__PURE__*/React.createElement(TableToolbar, null, DatagridActions && DatagridActions(datagridState), DatagridBatchActions && DatagridBatchActions(datagridState))) : null;
130
136
  };
131
137
  export default DatagridToolbar;
@@ -2,13 +2,13 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
- /*
6
- * Licensed Materials - Property of IBM
7
- * 5724-Q36
8
- * (c) Copyright IBM Corp. 2020 - 2023
9
- * US Government Users Restricted Rights - Use, duplication or disclosure
10
- * restricted by GSA ADP Schedule Contract with IBM Corp.
5
+ /**
6
+ * Copyright IBM Corp. 2020, 2023
7
+ *
8
+ * This source code is licensed under the Apache-2.0 license found in the
9
+ * LICENSE file in the root directory of this source tree.
11
10
  */
11
+
12
12
  import React, { useEffect } from 'react';
13
13
  import { VariableSizeList } from 'react-window';
14
14
  import { DataTable } from 'carbon-components-react';
@@ -23,12 +23,7 @@ var rowSizeMap = {
23
23
  sm: 32,
24
24
  md: 40,
25
25
  lg: 48,
26
- xl: 64,
27
- // TODO: deprecate the below values in next major release (v8) on carbon-components-react
28
- short: 32,
29
- compact: 24,
30
- normal: 48,
31
- tall: 64
26
+ xl: 64
32
27
  };
33
28
  var defaultRowHeight = rowSizeMap.lg;
34
29
  var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
@@ -47,13 +42,17 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
47
42
  page = datagridState.page,
48
43
  handleResize = datagridState.handleResize,
49
44
  gridRef = datagridState.gridRef;
45
+
46
+ /* istanbul ignore next */
50
47
  var handleVirtualGridResize = function handleVirtualGridResize() {
51
48
  var gridRefElement = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current;
52
49
  gridRefElement.style.width = gridRefElement === null || gridRefElement === void 0 ? void 0 : gridRefElement.clientWidth;
53
50
  };
54
51
  useResizeObserver(gridRef, handleVirtualGridResize);
55
- var syncScroll = function syncScroll(e) {
56
- var virtualBody = e.target;
52
+
53
+ /* istanbul ignore next */
54
+ var syncScroll = function syncScroll(event) {
55
+ var virtualBody = event.target;
57
56
  document.querySelector(".".concat(blockClass, "__head-wrap")).scrollLeft = virtualBody.scrollLeft;
58
57
  var spacerColumn = document.querySelector(".".concat(blockClass, "__head-wrap thead th:last-child"));
59
58
  spacerColumn.style.width = px(32 + (virtualBody.offsetWidth - virtualBody.clientWidth)); // scrollbar width to header column to fix header alignment
@@ -76,9 +75,7 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
76
75
  }, /*#__PURE__*/React.createElement(DatagridHead, datagridState)), /*#__PURE__*/React.createElement(TableBody, _extends({}, getTableBodyProps({
77
76
  role: false
78
77
  }), {
79
- onScroll: function onScroll(e) {
80
- return syncScroll(e);
81
- }
78
+ onScroll: syncScroll
82
79
  }), /*#__PURE__*/React.createElement(VariableSizeList, {
83
80
  height: virtualHeight || tableHeight,
84
81
  itemCount: visibleRows.length,
@@ -98,10 +95,13 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
98
95
  style = _ref.style;
99
96
  var row = visibleRows[index];
100
97
  prepareRow(row);
98
+ var _row$getRowProps = row.getRowProps(),
99
+ key = _row$getRowProps.key;
101
100
  return /*#__PURE__*/React.createElement("div", {
102
101
  style: _objectSpread({}, style)
103
102
  }, row.RowRenderer(_objectSpread(_objectSpread({}, datagridState), {}, {
104
- row: row
103
+ row: row,
104
+ key: key
105
105
  })));
106
106
  })));
107
107
  };
@@ -15,6 +15,7 @@ var COLUMN_RESIZE_START = 'columnStartResizing';
15
15
  var COLUMN_RESIZING = 'columnResizing';
16
16
  var COLUMN_RESIZE_END = 'columnDoneResizing';
17
17
  var INIT = 'init';
18
+ var TOGGLE_ROW_SELECTED = 'toggleRowSelected';
18
19
  var blockClass = "".concat(pkg.prefix, "--datagrid");
19
20
  export var handleColumnResizeEndEvent = function handleColumnResizeEndEvent(dispatch, onColResizeEnd, headerId, isKeyEvent) {
20
21
  dispatch({
@@ -46,8 +47,43 @@ export var handleColumnResizingEvent = function handleColumnResizingEvent(dispat
46
47
  }
47
48
  });
48
49
  };
50
+ export var handleToggleRowSelected = function handleToggleRowSelected(dispatch, rowData, isChecked) {
51
+ return dispatch({
52
+ type: TOGGLE_ROW_SELECTED,
53
+ payload: {
54
+ rowData: rowData,
55
+ isChecked: isChecked
56
+ }
57
+ });
58
+ };
49
59
  export var stateReducer = function stateReducer(newState, action) {
50
60
  switch (action.type) {
61
+ case TOGGLE_ROW_SELECTED:
62
+ {
63
+ var _ref = action.payload || {},
64
+ rowData = _ref.rowData,
65
+ isChecked = _ref.isChecked;
66
+ if (!rowData) {
67
+ return;
68
+ }
69
+ if (isChecked) {
70
+ return _objectSpread(_objectSpread({}, newState), {}, {
71
+ selectedRowData: _objectSpread(_objectSpread({}, newState.selectedRowData), {}, _defineProperty({}, rowData.index, rowData))
72
+ });
73
+ }
74
+ if (rowData && !isChecked) {
75
+ var newData = _objectSpread({}, newState.selectedRowData);
76
+ var dataWithRemovedRow = Object.fromEntries(Object.entries(newData).filter(function (_ref2) {
77
+ var _ref3 = _slicedToArray(_ref2, 1),
78
+ key = _ref3[0];
79
+ return parseInt(key) !== parseInt(rowData.index);
80
+ }));
81
+ return _objectSpread(_objectSpread({}, newState), {}, {
82
+ selectedRowData: dataWithRemovedRow
83
+ });
84
+ }
85
+ return _objectSpread({}, newState);
86
+ }
51
87
  case INIT:
52
88
  {
53
89
  return _objectSpread(_objectSpread({}, newState), {}, {
@@ -56,27 +92,27 @@ export var stateReducer = function stateReducer(newState, action) {
56
92
  }
57
93
  case COLUMN_RESIZE_START:
58
94
  {
59
- var _ref = action.payload || {},
60
- headerId = _ref.headerId;
95
+ var _ref4 = action.payload || {},
96
+ headerId = _ref4.headerId;
61
97
  return _objectSpread(_objectSpread({}, newState), {}, {
62
98
  isResizing: headerId
63
99
  });
64
100
  }
65
101
  case COLUMN_RESIZING:
66
102
  {
67
- var _ref2 = action.payload || {},
68
- _headerId = _ref2.headerId,
69
- newWidth = _ref2.newWidth,
70
- defaultWidth = _ref2.defaultWidth;
103
+ var _ref5 = action.payload || {},
104
+ _headerId = _ref5.headerId,
105
+ newWidth = _ref5.newWidth,
106
+ defaultWidth = _ref5.defaultWidth;
71
107
  var newColumnWidth = {};
72
108
  if (typeof _headerId === 'undefined') {
73
109
  return _objectSpread({}, newState);
74
110
  }
75
111
  newColumnWidth[_headerId] = newWidth;
76
- var cleanedWidths = Object.fromEntries(Object.entries(newState.columnResizing.columnWidths).filter(function (_ref3) {
77
- var _ref4 = _slicedToArray(_ref3, 2),
78
- _ = _ref4[0],
79
- value = _ref4[1];
112
+ var cleanedWidths = Object.fromEntries(Object.entries(newState.columnResizing.columnWidths).filter(function (_ref6) {
113
+ var _ref7 = _slicedToArray(_ref6, 2),
114
+ _ = _ref7[0],
115
+ value = _ref7[1];
80
116
  return !isNaN(value);
81
117
  }));
82
118
  var headerIdArray = newState.columnResizing.headerIdWidths || [];
@@ -91,10 +127,10 @@ export var stateReducer = function stateReducer(newState, action) {
91
127
  }
92
128
  case COLUMN_RESIZE_END:
93
129
  {
94
- var _ref5 = action.payload || {},
95
- onColResizeEnd = _ref5.onColResizeEnd,
96
- _headerId2 = _ref5.headerId,
97
- isKeyEvent = _ref5.isKeyEvent;
130
+ var _ref8 = action.payload || {},
131
+ onColResizeEnd = _ref8.onColResizeEnd,
132
+ _headerId2 = _ref8.headerId,
133
+ isKeyEvent = _ref8.isKeyEvent;
98
134
  var currentColumn = {};
99
135
  currentColumn[_headerId2] = newState.columnResizing.columnWidths[_headerId2];
100
136
  var allChangedColumns = newState.columnResizing.columnWidths;
@@ -45,7 +45,7 @@
45
45
 
46
46
  // ## Sample usage:
47
47
  // 1. include \`useActionsColumn\` hook
48
- // 2. add \`isAction = true\` to the column object in which you which to add the overflow menu actions
48
+ // 2. add \`isAction = true\` to the column object in which you wish to add the overflow menu actions
49
49
  // 3. add \`rowActions = []\` array to the props
50
50
  // - \`rowActions[].id\` for callback to identify the action is called
51
51
  // - \`rowActions[].onClick(actionId: string, row: Row, event: ClickEvent)\` callback on menuitem clicked. [Row properties](https://react-table.tanstack.com/docs/api/useTable#row-properties)