@carbon/ibm-products 1.11.2 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. package/README.md +0 -3
  2. package/css/components/Datagrid/styles/addons/CustomizeColumnsModal.css +47 -0
  3. package/css/components/Datagrid/styles/addons/CustomizeColumnsModal.css.map +1 -0
  4. package/css/components/Datagrid/styles/addons/RowSizeDropdown.css +20 -0
  5. package/css/components/Datagrid/styles/addons/RowSizeDropdown.css.map +1 -0
  6. package/css/components/Datagrid/styles/datagrid.css +264 -0
  7. package/css/components/Datagrid/styles/datagrid.css.map +1 -0
  8. package/css/components/Datagrid/styles/index.css +509 -0
  9. package/css/components/Datagrid/styles/index.css.map +1 -0
  10. package/css/components/Datagrid/styles/useActionsColumn.css +23 -0
  11. package/css/components/Datagrid/styles/useActionsColumn.css.map +1 -0
  12. package/css/components/Datagrid/styles/useColumnRightAlign.css +28 -0
  13. package/css/components/Datagrid/styles/useColumnRightAlign.css.map +1 -0
  14. package/css/components/Datagrid/styles/useNestedRows.css +15 -0
  15. package/css/components/Datagrid/styles/useNestedRows.css.map +1 -0
  16. package/css/components/Datagrid/styles/useNestedTable.css +25 -0
  17. package/css/components/Datagrid/styles/useNestedTable.css.map +1 -0
  18. package/css/components/Datagrid/styles/useSelectAllToggle.css +28 -0
  19. package/css/components/Datagrid/styles/useSelectAllToggle.css.map +1 -0
  20. package/css/components/Datagrid/styles/useSortableColumns.css +50 -0
  21. package/css/components/Datagrid/styles/useSortableColumns.css.map +1 -0
  22. package/css/components/Datagrid/styles/useStickyColumn.css +35 -0
  23. package/css/components/Datagrid/styles/useStickyColumn.css.map +1 -0
  24. package/css/index-full-carbon.css +2019 -376
  25. package/css/index-full-carbon.css.map +1 -1
  26. package/css/index-full-carbon.min.css +6 -6
  27. package/css/index-full-carbon.min.css.map +1 -1
  28. package/css/index-without-carbon-released-only.css +18 -6
  29. package/css/index-without-carbon-released-only.css.map +1 -1
  30. package/css/index-without-carbon-released-only.min.css +2 -2
  31. package/css/index-without-carbon-released-only.min.css.map +1 -1
  32. package/css/index-without-carbon.css +679 -19
  33. package/css/index-without-carbon.css.map +1 -1
  34. package/css/index-without-carbon.min.css +5 -5
  35. package/css/index-without-carbon.min.css.map +1 -1
  36. package/css/index.css +679 -19
  37. package/css/index.css.map +1 -1
  38. package/css/index.min.css +6 -6
  39. package/css/index.min.css.map +1 -1
  40. package/es/components/ActionBar/ActionBar.js +3 -1
  41. package/es/components/ActionBar/ActionBarOverflowItems.js +5 -3
  42. package/es/components/AddSelect/AddSelect.js +133 -30
  43. package/es/components/AddSelect/AddSelectColumn.js +0 -1
  44. package/es/components/AddSelect/AddSelectFilter.js +129 -0
  45. package/es/components/AddSelect/AddSelectList.js +59 -13
  46. package/es/components/AddSelect/AddSelectSidebar.js +15 -5
  47. package/es/components/AddSelect/add-select-utils.js +30 -0
  48. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -0
  49. package/es/components/DataSpreadsheet/DataSpreadsheet.js +262 -164
  50. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +191 -51
  51. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +65 -13
  52. package/es/components/DataSpreadsheet/hooks/index.js +10 -0
  53. package/es/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +111 -0
  54. package/es/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +2 -4
  55. package/es/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +6 -6
  56. package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +3 -1
  57. package/es/components/DataSpreadsheet/utils/handleMultipleKeys.js +80 -6
  58. package/es/components/Datagrid/Datagrid/Datagrid.js +70 -0
  59. package/es/components/Datagrid/Datagrid/DatagridBody.js +36 -0
  60. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +19 -0
  61. package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +26 -0
  62. package/es/components/Datagrid/Datagrid/DatagridHead.js +31 -0
  63. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +57 -0
  64. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +37 -0
  65. package/es/components/Datagrid/Datagrid/DatagridRow.js +50 -0
  66. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +50 -0
  67. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +122 -0
  68. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +36 -0
  69. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +22 -0
  70. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +87 -0
  71. package/es/components/Datagrid/Datagrid/DraggableElement.js +188 -0
  72. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +78 -0
  73. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +51 -0
  74. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +140 -0
  75. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +157 -0
  76. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +62 -0
  77. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +13 -0
  78. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +9 -0
  79. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +62 -0
  80. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +139 -0
  81. package/es/components/Datagrid/Datagrid/addons/RowSize/index.js +8 -0
  82. package/es/components/Datagrid/Datagrid/index.js +8 -0
  83. package/es/components/Datagrid/Datagrid.stories/CustomizeColumnStory.js +6 -0
  84. package/es/components/Datagrid/Datagrid.stories/LeftPanelStory.js +6 -0
  85. package/es/components/Datagrid/Datagrid.stories/RowSizeDropdownStory.js +6 -0
  86. package/es/components/Datagrid/Datagrid.stories/SelectAllWithToggleStory.js +6 -0
  87. package/es/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +92 -0
  88. package/es/components/Datagrid/Datagrid.stories/common.js +199 -0
  89. package/es/components/Datagrid/Datagrid.stories/index.js +5 -0
  90. package/es/components/Datagrid/common-column-ids.js +8 -0
  91. package/es/components/Datagrid/index.js +22 -0
  92. package/es/components/Datagrid/useActionsColumn.js +86 -0
  93. package/es/components/Datagrid/useColumnRightAlign.js +52 -0
  94. package/es/components/Datagrid/useCustomizeColumns.js +45 -0
  95. package/es/components/Datagrid/useDatagrid.js +44 -0
  96. package/es/components/Datagrid/useDefaultStringRenderer.js +48 -0
  97. package/es/components/Datagrid/useDisableSelectRows.js +84 -0
  98. package/es/components/Datagrid/useExpandedRow.js +52 -0
  99. package/es/components/Datagrid/useFlexResize.js +51 -0
  100. package/es/components/Datagrid/useFloatingScroll.js +88 -0
  101. package/es/components/Datagrid/useInfiniteScroll.js +54 -0
  102. package/es/components/Datagrid/useNestedRows.js +53 -0
  103. package/es/components/Datagrid/useOnRowClick.js +37 -0
  104. package/es/components/Datagrid/useParentDimensions.js +65 -0
  105. package/es/components/Datagrid/useResizeTable.js +40 -0
  106. package/es/components/Datagrid/useRowExpander.js +34 -0
  107. package/es/components/Datagrid/useRowIsMouseOver.js +61 -0
  108. package/es/components/Datagrid/useRowRenderer.js +30 -0
  109. package/es/components/Datagrid/useRowSize.js +56 -0
  110. package/es/components/Datagrid/useSelectAllToggle.js +74 -0
  111. package/es/components/Datagrid/useSelectRows.js +107 -0
  112. package/es/components/Datagrid/useSkeletonRows.js +32 -0
  113. package/es/components/Datagrid/useSortableColumns.js +110 -0
  114. package/es/components/Datagrid/useStickyColumn.js +183 -0
  115. package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +2 -3
  116. package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +2 -3
  117. package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +2 -3
  118. package/es/components/ImportModal/ImportModal.js +2 -2
  119. package/es/components/TagSet/TagSet.js +12 -3
  120. package/es/components/UserProfileImage/UserProfileImage.js +38 -10
  121. package/es/components/index.js +2 -1
  122. package/es/global/js/package-settings.js +2 -1
  123. package/lib/components/ActionBar/ActionBar.js +3 -1
  124. package/lib/components/ActionBar/ActionBarOverflowItems.js +5 -3
  125. package/lib/components/AddSelect/AddSelect.js +132 -28
  126. package/lib/components/AddSelect/AddSelectColumn.js +0 -1
  127. package/lib/components/AddSelect/AddSelectFilter.js +147 -0
  128. package/lib/components/AddSelect/AddSelectList.js +61 -12
  129. package/lib/components/AddSelect/AddSelectSidebar.js +15 -11
  130. package/lib/components/AddSelect/add-select-utils.js +35 -2
  131. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -0
  132. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +267 -168
  133. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +191 -57
  134. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +67 -18
  135. package/lib/components/DataSpreadsheet/hooks/index.js +37 -0
  136. package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +123 -0
  137. package/lib/components/DataSpreadsheet/hooks/useResetSpreadsheetFocus.js +2 -4
  138. package/lib/components/DataSpreadsheet/hooks/useSpreadsheetOutsideClick.js +6 -5
  139. package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +3 -1
  140. package/lib/components/DataSpreadsheet/utils/handleMultipleKeys.js +83 -7
  141. package/lib/components/Datagrid/Datagrid/Datagrid.js +86 -0
  142. package/lib/components/Datagrid/Datagrid/DatagridBody.js +50 -0
  143. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +31 -0
  144. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +38 -0
  145. package/lib/components/Datagrid/Datagrid/DatagridHead.js +43 -0
  146. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +73 -0
  147. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +44 -0
  148. package/lib/components/Datagrid/Datagrid/DatagridRow.js +56 -0
  149. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +55 -0
  150. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +139 -0
  151. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +44 -0
  152. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +35 -0
  153. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +101 -0
  154. package/lib/components/Datagrid/Datagrid/DraggableElement.js +210 -0
  155. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +92 -0
  156. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +65 -0
  157. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +166 -0
  158. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +173 -0
  159. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +73 -0
  160. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +25 -0
  161. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +23 -0
  162. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +80 -0
  163. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +160 -0
  164. package/lib/components/Datagrid/Datagrid/addons/RowSize/index.js +15 -0
  165. package/lib/components/Datagrid/Datagrid/index.js +15 -0
  166. package/lib/components/Datagrid/Datagrid.stories/CustomizeColumnStory.js +13 -0
  167. package/lib/components/Datagrid/Datagrid.stories/LeftPanelStory.js +13 -0
  168. package/lib/components/Datagrid/Datagrid.stories/RowSizeDropdownStory.js +13 -0
  169. package/lib/components/Datagrid/Datagrid.stories/SelectAllWithToggleStory.js +13 -0
  170. package/lib/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +112 -0
  171. package/lib/components/Datagrid/Datagrid.stories/common.js +215 -0
  172. package/lib/components/Datagrid/Datagrid.stories/index.js +47 -0
  173. package/lib/components/Datagrid/common-column-ids.js +16 -0
  174. package/lib/components/Datagrid/index.js +127 -0
  175. package/lib/components/Datagrid/useActionsColumn.js +94 -0
  176. package/lib/components/Datagrid/useColumnRightAlign.js +59 -0
  177. package/lib/components/Datagrid/useCustomizeColumns.js +55 -0
  178. package/lib/components/Datagrid/useDatagrid.js +58 -0
  179. package/lib/components/Datagrid/useDefaultStringRenderer.js +54 -0
  180. package/lib/components/Datagrid/useDisableSelectRows.js +92 -0
  181. package/lib/components/Datagrid/useExpandedRow.js +58 -0
  182. package/lib/components/Datagrid/useFlexResize.js +61 -0
  183. package/lib/components/Datagrid/useFloatingScroll.js +101 -0
  184. package/lib/components/Datagrid/useInfiniteScroll.js +67 -0
  185. package/lib/components/Datagrid/useNestedRows.js +65 -0
  186. package/lib/components/Datagrid/useOnRowClick.js +45 -0
  187. package/lib/components/Datagrid/useParentDimensions.js +75 -0
  188. package/lib/components/Datagrid/useResizeTable.js +48 -0
  189. package/lib/components/Datagrid/useRowExpander.js +45 -0
  190. package/lib/components/Datagrid/useRowIsMouseOver.js +66 -0
  191. package/lib/components/Datagrid/useRowRenderer.js +40 -0
  192. package/lib/components/Datagrid/useRowSize.js +67 -0
  193. package/lib/components/Datagrid/useSelectAllToggle.js +88 -0
  194. package/lib/components/Datagrid/useSelectRows.js +119 -0
  195. package/lib/components/Datagrid/useSkeletonRows.js +42 -0
  196. package/lib/components/Datagrid/useSortableColumns.js +117 -0
  197. package/lib/components/Datagrid/useStickyColumn.js +190 -0
  198. package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +2 -3
  199. package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +2 -3
  200. package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +2 -3
  201. package/lib/components/ImportModal/ImportModal.js +1 -1
  202. package/lib/components/TagSet/TagSet.js +12 -3
  203. package/lib/components/UserProfileImage/UserProfileImage.js +38 -10
  204. package/lib/components/index.js +9 -1
  205. package/lib/global/js/package-settings.js +2 -1
  206. package/package.json +19 -15
  207. package/scss/components/AboutModal/_about-modal.scss +2 -2
  208. package/scss/components/ActionSet/_action-set.scss +3 -1
  209. package/scss/components/AddSelect/_add-select.scss +87 -3
  210. package/scss/components/CreateModal/_create-modal.scss +7 -5
  211. package/scss/components/CreateModal/_storybook-styles.scss +8 -7
  212. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +70 -10
  213. package/scss/components/Datagrid/_datagrid.scss +66 -0
  214. package/scss/components/Datagrid/_index.scss +8 -0
  215. package/scss/components/Datagrid/_storybook-styles.scss +26 -0
  216. package/scss/components/Datagrid/styles/_variables.scss +9 -0
  217. package/scss/components/Datagrid/styles/addons/CustomizeColumnsModal.scss +48 -0
  218. package/scss/components/Datagrid/styles/addons/RowSizeDropdown.scss +23 -0
  219. package/scss/components/Datagrid/styles/datagrid.scss +318 -0
  220. package/scss/components/Datagrid/styles/index.scss +17 -0
  221. package/scss/components/Datagrid/styles/useActionsColumn.scss +24 -0
  222. package/scss/components/Datagrid/styles/useColumnRightAlign.scss +29 -0
  223. package/scss/components/Datagrid/styles/useNestedRows.scss +17 -0
  224. package/scss/components/Datagrid/styles/useNestedTable.scss +28 -0
  225. package/scss/components/Datagrid/styles/useSelectAllToggle.scss +28 -0
  226. package/scss/components/Datagrid/styles/useSortableColumns.scss +55 -0
  227. package/scss/components/Datagrid/styles/useStickyColumn.scss +38 -0
  228. package/scss/components/ExportModal/_export-modal.scss +3 -3
  229. package/scss/components/HTTPErrors/_http-errors.scss +16 -16
  230. package/scss/components/InlineEdit/_inline-edit.scss +0 -1
  231. package/scss/components/ModifiedTabs/_modified-tabs.scss +0 -10
  232. package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -3
  233. package/scss/components/OptionsTile/_options-tile.scss +0 -1
  234. package/scss/components/PageHeader/_page-header.scss +4 -0
  235. package/scss/components/RemoveModal/_remove-modal.scss +3 -3
  236. package/scss/components/TagSet/_tag-set.scss +2 -1
  237. package/scss/components/Tearsheet/_tearsheet.scss +5 -2
  238. package/scss/components/_index.scss +1 -0
@@ -5,7 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { useEffect } from 'react';
8
- import { pkg } from '../../../settings'; // Click outside useEffect for spreadsheet
8
+ import { pkg } from '../../../settings';
9
+ import { removeCellSelections } from '../utils/removeCellSelections'; // Click outside useEffect for spreadsheet
9
10
 
10
11
  export var useSpreadsheetOutsideClick = function useSpreadsheetOutsideClick(_ref) {
11
12
  var spreadsheetRef = _ref.spreadsheetRef,
@@ -14,9 +15,7 @@ export var useSpreadsheetOutsideClick = function useSpreadsheetOutsideClick(_ref
14
15
  setActiveCellCoordinates = _ref.setActiveCellCoordinates,
15
16
  setSelectionAreas = _ref.setSelectionAreas,
16
17
  removeActiveCell = _ref.removeActiveCell,
17
- removeCellSelections = _ref.removeCellSelections,
18
18
  setContainerHasFocus = _ref.setContainerHasFocus,
19
- activeKeys = _ref.activeKeys,
20
19
  removeCellEditor = _ref.removeCellEditor;
21
20
  useEffect(function () {
22
21
  var handleOutsideClick = function handleOutsideClick(event) {
@@ -27,15 +26,16 @@ export var useSpreadsheetOutsideClick = function useSpreadsheetOutsideClick(_ref
27
26
  setActiveCellCoordinates(null);
28
27
  setSelectionAreas([]);
29
28
  removeActiveCell();
30
- removeCellSelections();
29
+ removeCellSelections({
30
+ spreadsheetRef: spreadsheetRef
31
+ });
31
32
  setContainerHasFocus(false);
32
33
  removeCellEditor();
33
- activeKeys.current = [];
34
34
  };
35
35
 
36
36
  document.addEventListener('click', handleOutsideClick);
37
37
  return function () {
38
38
  document.removeEventListener('click', handleOutsideClick);
39
39
  };
40
- }, [spreadsheetRef, removeActiveCell, removeCellSelections, activeKeys, blockClass, setActiveCellCoordinates, setContainerHasFocus, setSelectionAreas, removeCellEditor]);
40
+ }, [spreadsheetRef, removeActiveCell, blockClass, setActiveCellCoordinates, setContainerHasFocus, setSelectionAreas, removeCellEditor]);
41
41
  };
@@ -16,7 +16,9 @@ export var handleHeaderCellSelection = function handleHeaderCellSelection(_ref)
16
16
  setSelectionAreas = _ref.setSelectionAreas,
17
17
  spreadsheetRef = _ref.spreadsheetRef,
18
18
  index = _ref.index,
19
- isKeyboard = _ref.isKeyboard;
19
+ isKeyboard = _ref.isKeyboard,
20
+ setSelectionAreaData = _ref.setSelectionAreaData;
21
+ setSelectionAreaData([]);
20
22
  var rowValue = isKeyboard ? activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row : index;
21
23
  var columnValue = isKeyboard ? activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column : index;
22
24
  var point1 = {
@@ -5,23 +5,48 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { deepCloneObject } from '../../../global/js/utils/deepCloneObject';
8
+ export var includesShift = function includesShift(arr) {
9
+ if (arr.includes('ShiftLeft') || arr.includes('ShiftRight')) {
10
+ return true;
11
+ }
12
+
13
+ return false;
14
+ };
15
+
16
+ var includesMeta = function includesMeta(arr) {
17
+ if (arr.includes('MetaLeft') || arr.includes('MetaRight')) {
18
+ return true;
19
+ }
20
+
21
+ return false;
22
+ };
23
+
24
+ var includesControl = function includesControl(arr) {
25
+ if (arr.includes('ControlLeft') || arr.includes('ControlRight')) {
26
+ return true;
27
+ }
28
+
29
+ return false;
30
+ };
31
+
8
32
  export var handleMultipleKeys = function handleMultipleKeys(_ref) {
9
33
  var _selectionAreasClone$;
10
34
 
11
- var activeKeys = _ref.activeKeys,
35
+ var activeCellCoordinates = _ref.activeCellCoordinates,
36
+ event = _ref.event,
37
+ keysPressedList = _ref.keysPressedList,
12
38
  selectionAreas = _ref.selectionAreas,
13
39
  currentMatcher = _ref.currentMatcher,
14
40
  rows = _ref.rows,
15
41
  setSelectionAreas = _ref.setSelectionAreas,
16
42
  columns = _ref.columns;
17
- var activeKeyValues = activeKeys.current;
18
43
  var selectionAreasClone = deepCloneObject(selectionAreas);
19
44
  var indexOfCurrentArea = selectionAreasClone.findIndex(function (item) {
20
45
  return item.matcher === currentMatcher;
21
46
  });
22
47
  var pointToUpdate = (_selectionAreasClone$ = selectionAreasClone[indexOfCurrentArea]) !== null && _selectionAreasClone$ !== void 0 && _selectionAreasClone$.point2 ? selectionAreasClone[indexOfCurrentArea].point2 : selectionAreasClone[indexOfCurrentArea].point1; // Down + Shift
23
48
 
24
- if (activeKeyValues.includes('Shift') && activeKeyValues.includes('ArrowDown')) {
49
+ if (includesShift(keysPressedList) && keysPressedList.includes('ArrowDown') && keysPressedList.length === 2) {
25
50
  if (rows.length - 1 === pointToUpdate.row) {
26
51
  return;
27
52
  }
@@ -36,7 +61,7 @@ export var handleMultipleKeys = function handleMultipleKeys(_ref) {
36
61
  } // Right + Shift
37
62
 
38
63
 
39
- if (activeKeyValues.includes('Shift') && activeKeyValues.includes('ArrowRight')) {
64
+ if (includesShift(keysPressedList) && keysPressedList.includes('ArrowRight') && keysPressedList.length === 2) {
40
65
  if (columns.length - 1 === pointToUpdate.column) {
41
66
  return;
42
67
  }
@@ -51,7 +76,7 @@ export var handleMultipleKeys = function handleMultipleKeys(_ref) {
51
76
  } // Up + Shift
52
77
 
53
78
 
54
- if (activeKeyValues.includes('Shift') && activeKeyValues.includes('ArrowUp')) {
79
+ if (includesShift(keysPressedList) && keysPressedList.includes('ArrowUp') && keysPressedList.length === 2) {
55
80
  if (pointToUpdate.row === 0) {
56
81
  return;
57
82
  }
@@ -66,7 +91,7 @@ export var handleMultipleKeys = function handleMultipleKeys(_ref) {
66
91
  } // Left + Shift
67
92
 
68
93
 
69
- if (activeKeyValues.includes('Shift') && activeKeyValues.includes('ArrowLeft')) {
94
+ if (includesShift(keysPressedList) && keysPressedList.includes('ArrowLeft') && keysPressedList.length === 2) {
70
95
  if (pointToUpdate.column === 0) {
71
96
  return;
72
97
  }
@@ -78,5 +103,54 @@ export var handleMultipleKeys = function handleMultipleKeys(_ref) {
78
103
  selectionAreasClone[indexOfCurrentArea].point2 = _newPoint3;
79
104
  selectionAreasClone[indexOfCurrentArea].areaCreated = false;
80
105
  setSelectionAreas(selectionAreasClone);
106
+ } // CMD + a (select all)
107
+
108
+
109
+ if (includesMeta(keysPressedList) && keysPressedList.includes('KeyA')) {
110
+ event.preventDefault();
111
+ var selectionPoint1 = {
112
+ row: 0,
113
+ column: 0
114
+ };
115
+ var selectionPoint2 = {
116
+ row: rows.length - 1,
117
+ column: columns.length - 1
118
+ };
119
+ selectionAreasClone[indexOfCurrentArea].point1 = selectionPoint1;
120
+ selectionAreasClone[indexOfCurrentArea].point2 = selectionPoint2;
121
+ selectionAreasClone[indexOfCurrentArea].areaCreated = false;
122
+ setSelectionAreas(selectionAreasClone);
123
+ } // CONTROL + SPACE (Select current column)
124
+
125
+
126
+ if (includesControl(keysPressedList) && keysPressedList.includes('Space')) {
127
+ var _selectionPoint = {
128
+ row: 0,
129
+ column: activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column
130
+ };
131
+ var _selectionPoint2 = {
132
+ row: rows.length - 1,
133
+ column: activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column
134
+ };
135
+ selectionAreasClone[indexOfCurrentArea].point1 = _selectionPoint;
136
+ selectionAreasClone[indexOfCurrentArea].point2 = _selectionPoint2;
137
+ selectionAreasClone[indexOfCurrentArea].areaCreated = false;
138
+ setSelectionAreas(selectionAreasClone);
139
+ } // Shift + SPACE (Select current row)
140
+
141
+
142
+ if (includesShift(keysPressedList) && keysPressedList.includes('Space')) {
143
+ var _selectionPoint3 = {
144
+ row: activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row,
145
+ column: 0
146
+ };
147
+ var _selectionPoint4 = {
148
+ row: activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row,
149
+ column: columns.length - 1
150
+ };
151
+ selectionAreasClone[indexOfCurrentArea].point1 = _selectionPoint3;
152
+ selectionAreasClone[indexOfCurrentArea].point2 = _selectionPoint4;
153
+ selectionAreasClone[indexOfCurrentArea].areaCreated = false;
154
+ setSelectionAreas(selectionAreasClone);
81
155
  }
82
156
  };
@@ -0,0 +1,70 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ var _excluded = ["getTableProps", "withVirtualScroll", "DatagridPagination", "isFetching", "tableId", "CustomizeColumnsModal", "leftPanel", "fullHeightDatagrid", "verticalAlign", "variableRowHeight", "className"];
5
+
6
+ /*
7
+ * Licensed Materials - Property of IBM
8
+ * 5724-Q36
9
+ * (c) Copyright IBM Corp. 2020 - 2021
10
+ * US Government Users Restricted Rights - Use, duplication or disclosure
11
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
12
+ */
13
+ import React from 'react';
14
+ import { DataTable } from 'carbon-components-react';
15
+ import cx from 'classnames';
16
+ import DatagridHead from './DatagridHead';
17
+ import DatagridBody from './DatagridBody';
18
+ import DatagridToolbar from './DatagridToolbar';
19
+ import { getDevtoolsProps } from '../../../global/js/utils/devtools';
20
+ import { pkg } from '../../../settings';
21
+ var blockClass = "".concat(pkg.prefix, "--datagrid");
22
+ var componentName = 'Datagrid';
23
+ var TableContainer = DataTable.TableContainer,
24
+ Table = DataTable.Table;
25
+ var Datagrid = /*#__PURE__*/React.forwardRef(function (datagridState, ref) {
26
+ var _getTableProps;
27
+
28
+ var _datagridState$getTab = datagridState.getTableProps,
29
+ getTableProps = _datagridState$getTab === void 0 ? function () {} : _datagridState$getTab,
30
+ withVirtualScroll = datagridState.withVirtualScroll,
31
+ DatagridPagination = datagridState.DatagridPagination,
32
+ isFetching = datagridState.isFetching,
33
+ tableId = datagridState.tableId,
34
+ CustomizeColumnsModal = datagridState.CustomizeColumnsModal,
35
+ leftPanel = datagridState.leftPanel,
36
+ fullHeightDatagrid = datagridState.fullHeightDatagrid,
37
+ _datagridState$vertic = datagridState.verticalAlign,
38
+ verticalAlign = _datagridState$vertic === void 0 ? 'center' : _datagridState$vertic,
39
+ variableRowHeight = datagridState.variableRowHeight,
40
+ className = datagridState.className,
41
+ rest = _objectWithoutProperties(datagridState, _excluded);
42
+
43
+ var rows = DatagridPagination && datagridState.page || datagridState.rows;
44
+ var dataGrid = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TableContainer, {
45
+ className: cx("".concat(blockClass, "__grid-container"), withVirtualScroll || fullHeightDatagrid ? "".concat(blockClass, "__full-height") : '')
46
+ }, /*#__PURE__*/React.createElement(Table, _extends({}, getTableProps(), {
47
+ className: cx(DatagridPagination ? "".concat(blockClass, "__with-pagination") : '', withVirtualScroll ? '' : "".concat(blockClass, "__table-simple"), "".concat(blockClass, "__vertical-align-").concat(verticalAlign), _defineProperty({}, "".concat(blockClass, "__variable-row-height"), variableRowHeight), (_getTableProps = getTableProps()) === null || _getTableProps === void 0 ? void 0 : _getTableProps.className)
48
+ }), /*#__PURE__*/React.createElement(DatagridHead, datagridState), /*#__PURE__*/React.createElement(DatagridBody, _extends({}, datagridState, {
49
+ rows: rows
50
+ })))), (rows === null || rows === void 0 ? void 0 : rows.length) > 0 && !isFetching && DatagridPagination && DatagridPagination(datagridState), CustomizeColumnsModal && /*#__PURE__*/React.createElement(CustomizeColumnsModal, {
51
+ instance: datagridState
52
+ }));
53
+ return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
54
+ id: tableId,
55
+ ref: ref,
56
+ className: cx(className, blockClass, withVirtualScroll ? "".concat(blockClass, "__datagridWrap") : "".concat(blockClass, "__datagridWrap-simple"))
57
+ }, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(DatagridToolbar, datagridState), leftPanel && /*#__PURE__*/React.createElement("div", {
58
+ className: "".concat(blockClass, "__grid-container ").concat(blockClass, "__displayFlex")
59
+ }, leftPanel && leftPanel.isOpen && /*#__PURE__*/React.createElement("div", {
60
+ className: "".concat(blockClass, "__datagridLeftPanel")
61
+ }, leftPanel.panelContent), /*#__PURE__*/React.createElement("div", {
62
+ className: "".concat(blockClass, "__datagridWithPanel")
63
+ }, dataGrid)), leftPanel === undefined && dataGrid);
64
+ }); // Return a placeholder if not released and not enabled by feature flag
65
+
66
+ Datagrid = pkg.checkComponentEnabled(Datagrid, componentName); // The display name of the component, used by React. Note that displayName
67
+ // is used in preference to relying on function.name.
68
+
69
+ Datagrid.displayName = componentName;
70
+ export default Datagrid;
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Licensed Materials - Property of IBM
3
+ * 5724-Q36
4
+ * (c) Copyright IBM Corp. 2021
5
+ * US Government Users Restricted Rights - Use, duplication or disclosure
6
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
7
+ */
8
+ import React from 'react';
9
+ import DatagridEmptyBody from './DatagridEmptyBody';
10
+ import DatagridVirtualBody from './DatagridVirtualBody';
11
+ import DatagridSimpleBody from './DatagridSimpleBody';
12
+ import DatagridRefBody from './DatagridRefBody';
13
+
14
+ var DatagridBody = function DatagridBody(datagridState) {
15
+ var isFetching = datagridState.isFetching,
16
+ _datagridState$rows = datagridState.rows,
17
+ rows = _datagridState$rows === void 0 ? [] : _datagridState$rows,
18
+ withVirtualScroll = datagridState.withVirtualScroll,
19
+ withStickyColumn = datagridState.withStickyColumn;
20
+
21
+ if (!isFetching && rows.length === 0) {
22
+ return /*#__PURE__*/React.createElement(DatagridEmptyBody, datagridState);
23
+ }
24
+
25
+ if (withVirtualScroll) {
26
+ return /*#__PURE__*/React.createElement(DatagridVirtualBody, datagridState);
27
+ }
28
+
29
+ if (withStickyColumn) {
30
+ return /*#__PURE__*/React.createElement(DatagridRefBody, datagridState);
31
+ }
32
+
33
+ return /*#__PURE__*/React.createElement(DatagridSimpleBody, datagridState);
34
+ };
35
+
36
+ export default DatagridBody;
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Licensed Materials - Property of IBM
3
+ * 5724-Q36
4
+ * (c) Copyright IBM Corp. 2020
5
+ * US Government Users Restricted Rights - Use, duplication or disclosure
6
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
7
+ */
8
+ import React from 'react';
9
+ import { pkg } from '../../../settings';
10
+ var blockClass = "".concat(pkg.prefix, "--datagrid");
11
+
12
+ var DatagridEmptyBody = function DatagridEmptyBody(datagridState) {
13
+ var EmptyState = datagridState.EmptyState;
14
+ return /*#__PURE__*/React.createElement("div", {
15
+ className: "".concat(blockClass, "__empty-state-body")
16
+ }, EmptyState);
17
+ };
18
+
19
+ export default DatagridEmptyBody;
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Licensed Materials - Property of IBM
3
+ * 5724-Q36
4
+ * (c) Copyright IBM Corp. 2020
5
+ * US Government Users Restricted Rights - Use, duplication or disclosure
6
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
7
+ */
8
+ import React from 'react';
9
+ import { pkg } from '../../../settings';
10
+ var blockClass = "".concat(pkg.prefix, "--datagrid"); // eslint-disable-next-line react/prop-types
11
+
12
+ var DatagridExpandedRow = function DatagridExpandedRow(PreviousRowRenderer, ExpandedRowContentComponent) {
13
+ return function (datagridState) {
14
+ var row = datagridState.row;
15
+
16
+ if (!row.isExpanded) {
17
+ return PreviousRowRenderer(datagridState);
18
+ }
19
+
20
+ return /*#__PURE__*/React.createElement("div", {
21
+ className: "".concat(blockClass, "__expanded-row")
22
+ }, PreviousRowRenderer(datagridState), ExpandedRowContentComponent(datagridState));
23
+ };
24
+ };
25
+
26
+ export default DatagridExpandedRow;
@@ -0,0 +1,31 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+
3
+ /*
4
+ * Licensed Materials - Property of IBM
5
+ * 5724-Q36
6
+ * (c) Copyright IBM Corp. 2020, 2021
7
+ * US Government Users Restricted Rights - Use, duplication or disclosure
8
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
9
+ */
10
+ import React from 'react';
11
+ import { DataTable } from 'carbon-components-react';
12
+ var TableHead = DataTable.TableHead;
13
+
14
+ var DatagridHead = function DatagridHead(datagridState) {
15
+ var _datagridState$header = datagridState.headerGroups,
16
+ headerGroups = _datagridState$header === void 0 ? [] : _datagridState$header,
17
+ headRef = datagridState.headRef,
18
+ HeaderRow = datagridState.HeaderRow;
19
+ return /*#__PURE__*/React.createElement(TableHead, null, headerGroups.map(function (headerGroup, index) {
20
+ return (
21
+ /*#__PURE__*/
22
+ // doesn't support header grouping.
23
+ React.createElement("div", _extends({}, headerGroup.getHeaderGroupProps(), {
24
+ ref: headRef,
25
+ key: "header_".concat(index)
26
+ }), HeaderRow(datagridState))
27
+ );
28
+ }));
29
+ };
30
+
31
+ export default DatagridHead;
@@ -0,0 +1,57 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+
4
+ /*
5
+ * Licensed Materials - Property of IBM
6
+ * 5724-Q36
7
+ * (c) Copyright IBM Corp. 2020, 2021
8
+ * US Government Users Restricted Rights - Use, duplication or disclosure
9
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
10
+ */
11
+ // @flow
12
+ import React from 'react';
13
+ import cx from 'classnames';
14
+ import { DataTable } from 'carbon-components-react';
15
+ import { selectionColumnId } from '../common-column-ids';
16
+ import { pkg } from '../../../settings';
17
+ var blockClass = "".concat(pkg.prefix, "--datagrid");
18
+
19
+ var HeaderRow = function HeaderRow(datagridState) {
20
+ return /*#__PURE__*/React.createElement(TableRow, {
21
+ className: "".concat(blockClass, "__head")
22
+ }, datagridState.headers.filter(function (_ref) {
23
+ var isVisible = _ref.isVisible;
24
+ return isVisible;
25
+ }).map(function (header) {
26
+ var _cx;
27
+
28
+ if (header.id === selectionColumnId) {
29
+ // render directly without the wrapper TableHeader
30
+ return header.render('Header', {
31
+ key: header.id
32
+ });
33
+ }
34
+
35
+ return /*#__PURE__*/React.createElement(TableHeader, _extends({}, header.getHeaderProps(), {
36
+ className: cx((_cx = {}, _defineProperty(_cx, "".concat(blockClass, "__resizableColumn"), header.getResizerProps), _defineProperty(_cx, "".concat(blockClass, "__isResizing"), header.isResizing), _defineProperty(_cx, "".concat(blockClass, "__sortableColumn"), header.canSort), _defineProperty(_cx, "".concat(blockClass, "__isSorted"), header.isSorted), _cx), header.getHeaderProps().className),
37
+ key: header.id
38
+ }), header.render('Header'), header.getResizerProps && /*#__PURE__*/React.createElement("div", _extends({}, header.getResizerProps(), {
39
+ className: "".concat(blockClass, "__resizer")
40
+ })));
41
+ }));
42
+ };
43
+
44
+ var TableHeader = DataTable.TableHeader,
45
+ TableRow = DataTable.TableRow;
46
+
47
+ var useHeaderRow = function useHeaderRow(hooks) {
48
+ var useInstance = function useInstance(instance) {
49
+ Object.assign(instance, {
50
+ HeaderRow: HeaderRow
51
+ });
52
+ };
53
+
54
+ hooks.useInstance.push(useInstance);
55
+ };
56
+
57
+ export default useHeaderRow;
@@ -0,0 +1,37 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+
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
+
6
+ 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; }
7
+
8
+ /*
9
+ * Licensed Materials - Property of IBM
10
+ * 5724-Q36
11
+ * (c) Copyright IBM Corp. 2021
12
+ * US Government Users Restricted Rights - Use, duplication or disclosure
13
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
14
+ */
15
+ import React from 'react';
16
+ import cx from 'classnames';
17
+ import { pkg } from '../../../settings';
18
+ var blockClass = "".concat(pkg.prefix, "--datagrid"); // TableBody from carbon is a functional component
19
+ // hence no way to pass the ref to html element without changes in carbon side
20
+ // define html directly here.
21
+ // ref should be passed in thru getTableBodyProps
22
+
23
+ var DatagridRefBody = function DatagridRefBody(datagridState) {
24
+ var getTableBodyProps = datagridState.getTableBodyProps,
25
+ rows = datagridState.rows,
26
+ prepareRow = datagridState.prepareRow;
27
+ return /*#__PURE__*/React.createElement("tbody", _extends({}, getTableBodyProps(), {
28
+ className: cx("".concat(blockClass, "__simple-body"), getTableBodyProps().className)
29
+ }), rows.map(function (row) {
30
+ prepareRow(row);
31
+ return row.RowRenderer(_objectSpread(_objectSpread({}, datagridState), {}, {
32
+ row: row
33
+ }));
34
+ }));
35
+ };
36
+
37
+ export default DatagridRefBody;
@@ -0,0 +1,50 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["children"];
4
+
5
+ /*
6
+ * Licensed Materials - Property of IBM
7
+ * 5724-Q36
8
+ * (c) Copyright IBM Corp. 2020
9
+ * US Government Users Restricted Rights - Use, duplication or disclosure
10
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
11
+ */
12
+ // @flow
13
+ import React from 'react';
14
+ import { DataTable, SkeletonText } from 'carbon-components-react';
15
+ import { selectionColumnId } from '../common-column-ids';
16
+ import { pkg } from '../../../settings';
17
+ var blockClass = "".concat(pkg.prefix, "--datagrid");
18
+ var TableRow = DataTable.TableRow,
19
+ TableCell = DataTable.TableCell; // eslint-disable-next-line react/prop-types
20
+
21
+ var DatagridRow = function DatagridRow(datagridState) {
22
+ var row = datagridState.row;
23
+ return /*#__PURE__*/React.createElement(TableRow, _extends({
24
+ className: "".concat(blockClass, "__carbon-row")
25
+ }, row.getRowProps(), {
26
+ key: row.id
27
+ }), row.cells.map(function (cell) {
28
+ var cellProps = cell.getCellProps();
29
+
30
+ var children = cellProps.children,
31
+ restProps = _objectWithoutProperties(cellProps, _excluded);
32
+
33
+ var content = children || /*#__PURE__*/React.createElement(React.Fragment, null, !row.isSkeleton && cell.render('Cell'), row.isSkeleton && /*#__PURE__*/React.createElement(SkeletonText, null));
34
+
35
+ if (cell && cell.column && cell.column.id === selectionColumnId) {
36
+ // directly render component without the wrapping TableCell
37
+ return cell.render('Cell', {
38
+ key: cell.column.id
39
+ });
40
+ }
41
+
42
+ return /*#__PURE__*/React.createElement(TableCell, _extends({
43
+ className: "".concat(blockClass, "__cell")
44
+ }, restProps, {
45
+ key: cell.column.id
46
+ }), content);
47
+ }));
48
+ };
49
+
50
+ export default DatagridRow;
@@ -0,0 +1,50 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["onChange"];
4
+
5
+ /*
6
+ * Licensed Materials - Property of IBM
7
+ * 5724-Q36
8
+ * (c) Copyright IBM Corp. 2020
9
+ * US Government Users Restricted Rights - Use, duplication or disclosure
10
+ * restricted by GSA ADP Schedule Contract with IBM Corp.
11
+ */
12
+ // @flow
13
+ import React from 'react';
14
+ import { DataTable } from 'carbon-components-react';
15
+ import { pkg } from '../../../settings';
16
+ var blockClass = "".concat(pkg.prefix, "--datagrid");
17
+
18
+ var SelectAll = function SelectAll(datagridState) {
19
+ var isFetching = datagridState.isFetching,
20
+ getToggleAllRowsSelectedProps = datagridState.getToggleAllRowsSelectedProps,
21
+ getToggleAllPageRowsSelectedProps = datagridState.getToggleAllPageRowsSelectedProps,
22
+ tableId = datagridState.tableId,
23
+ hideSelectAll = datagridState.hideSelectAll,
24
+ DatagridPagination = datagridState.DatagridPagination,
25
+ radio = datagridState.radio;
26
+
27
+ if (hideSelectAll || radio) {
28
+ return /*#__PURE__*/React.createElement("div", {
29
+ className: "".concat(blockClass, "__head-hidden-select-all")
30
+ });
31
+ }
32
+
33
+ var getProps = DatagridPagination ? getToggleAllPageRowsSelectedProps : getToggleAllRowsSelectedProps;
34
+
35
+ var _getProps = getProps(),
36
+ onChange = _getProps.onChange,
37
+ selectProps = _objectWithoutProperties(_getProps, _excluded);
38
+
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ className: "".concat(blockClass, "__head-select-all ").concat(blockClass, "__checkbox-cell")
41
+ }, /*#__PURE__*/React.createElement(TableSelectAll, _extends({}, selectProps, {
42
+ name: "".concat(tableId, "-select-all-checkbox-name"),
43
+ onSelect: onChange,
44
+ disabled: isFetching || selectProps.disabled,
45
+ id: "".concat(tableId, "-select-all-checkbox-id")
46
+ })));
47
+ };
48
+
49
+ var TableSelectAll = DataTable.TableSelectAll;
50
+ export { SelectAll };