@carbon/ibm-products 2.43.2-canary.11 → 2.43.2-canary.112

Sign up to get free protection for your applications and to get access to all the features.
Files changed (416) hide show
  1. package/css/config-dev.css +6 -1
  2. package/css/config-dev.css.map +1 -1
  3. package/css/config.css +6 -1
  4. package/css/config.css.map +1 -1
  5. package/css/index-full-carbon.css +1846 -499
  6. package/css/index-full-carbon.css.map +1 -1
  7. package/css/index-full-carbon.min.css +1 -1
  8. package/css/index-full-carbon.min.css.map +1 -1
  9. package/css/index-without-carbon-released-only.css +267 -65
  10. package/css/index-without-carbon-released-only.css.map +1 -1
  11. package/css/index-without-carbon-released-only.min.css +1 -1
  12. package/css/index-without-carbon-released-only.min.css.map +1 -1
  13. package/css/index-without-carbon.css +1455 -250
  14. package/css/index-without-carbon.css.map +1 -1
  15. package/css/index-without-carbon.min.css +1 -1
  16. package/css/index-without-carbon.min.css.map +1 -1
  17. package/css/index.css +1651 -369
  18. package/css/index.css.map +1 -1
  19. package/css/index.min.css +1 -1
  20. package/css/index.min.css.map +1 -1
  21. package/es/components/APIKeyModal/APIKeyModal.types.d.ts +6 -0
  22. package/es/components/ActionBar/ActionBar.d.ts +58 -2
  23. package/es/components/ActionBar/ActionBar.js +14 -9
  24. package/es/components/ActionBar/ActionBarItem.d.ts +36 -2
  25. package/es/components/ActionBar/ActionBarItem.js +8 -5
  26. package/es/components/ActionBar/ActionBarOverflowItems.d.ts +55 -16
  27. package/es/components/ActionBar/ActionBarOverflowItems.js +8 -4
  28. package/es/components/AddSelect/types/index.d.ts +6 -0
  29. package/es/components/Card/Card.d.ts +68 -2
  30. package/es/components/Card/Card.js +28 -35
  31. package/es/components/Card/CardFooter.d.ts +51 -48
  32. package/es/components/Card/CardFooter.js +4 -2
  33. package/es/components/Card/CardHeader.d.ts +67 -49
  34. package/es/components/Card/CardHeader.js +4 -2
  35. package/es/components/Coachmark/Coachmark.d.ts +6 -1
  36. package/es/components/Coachmark/Coachmark.js +47 -11
  37. package/es/components/Coachmark/CoachmarkOverlay.js +2 -4
  38. package/es/components/Coachmark/utils/enums.d.ts +6 -0
  39. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  40. package/es/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  41. package/es/components/CoachmarkStack/CoachmarkStack.js +7 -3
  42. package/es/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  43. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -0
  44. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +90 -56
  45. package/es/components/ConditionBuilder/ConditionBuilder.js +82 -25
  46. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  47. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +154 -0
  48. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  49. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +29 -13
  50. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  51. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +35 -11
  52. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +18 -10
  53. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +19 -11
  54. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  55. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +83 -64
  56. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  57. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  58. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  59. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +35 -24
  60. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +43 -36
  61. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +43 -36
  62. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  63. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +114 -40
  64. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  65. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  66. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +27 -9
  67. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  68. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +114 -0
  69. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  70. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +71 -38
  71. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  72. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +22 -9
  73. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  74. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  75. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +131 -42
  76. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +5 -1
  77. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +51 -19
  78. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  79. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +152 -42
  80. package/es/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  81. package/es/components/ConditionBuilder/utils/useTranslations.js +26 -0
  82. package/es/components/ConditionBuilder/utils/util.d.ts +6 -4
  83. package/es/components/ConditionBuilder/utils/util.js +42 -17
  84. package/es/components/CreateFullPage/CreateFullPage.js +2 -2
  85. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  86. package/es/components/DataSpreadsheet/DataSpreadsheet.js +129 -53
  87. package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +16 -0
  88. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +32 -7
  89. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  90. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +16 -3
  91. package/es/components/DataSpreadsheet/types/index.d.ts +7 -0
  92. package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  93. package/es/components/Datagrid/Datagrid/Datagrid.js +4 -9
  94. package/es/components/Datagrid/Datagrid/DatagridBody.d.ts +6 -0
  95. package/es/components/Datagrid/Datagrid/DatagridContent.js +4 -3
  96. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  97. package/es/components/Datagrid/Datagrid/DatagridRefBody.d.ts +6 -0
  98. package/es/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  99. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +6 -6
  100. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  101. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +6 -0
  102. package/es/components/Datagrid/Datagrid/DraggableElement.d.ts +6 -0
  103. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  104. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  105. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  106. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +6 -3
  107. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +20 -12
  108. package/es/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +7 -0
  109. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  110. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +54 -17
  111. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  112. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +75 -12
  113. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  114. package/es/components/Datagrid/common-column-ids.d.ts +6 -0
  115. package/es/components/Datagrid/types/index.d.ts +63 -9
  116. package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
  117. package/es/components/Datagrid/useActionsColumn.js +7 -6
  118. package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  119. package/es/components/Datagrid/useColumnRightAlign.js +4 -3
  120. package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  121. package/es/components/Datagrid/useCustomizeColumns.js +4 -3
  122. package/es/components/Datagrid/useDatagrid.d.ts +6 -0
  123. package/es/components/Datagrid/useDefaultStringRenderer.js +0 -1
  124. package/es/components/Datagrid/useDisableSelectRows.d.ts +8 -1
  125. package/es/components/Datagrid/useDisableSelectRows.js +27 -22
  126. package/es/components/Datagrid/useInlineEdit.js +12 -2
  127. package/es/components/Datagrid/useNestedRowExpander.js +1 -3
  128. package/es/components/Datagrid/useNestedRows.js +32 -13
  129. package/es/components/Datagrid/useRowExpander.js +1 -3
  130. package/es/components/Datagrid/useRowIsMouseOver.d.ts +6 -0
  131. package/es/components/Datagrid/useSelectRows.js +2 -1
  132. package/es/components/Datagrid/useStickyColumn.d.ts +8 -1
  133. package/es/components/Datagrid/useStickyColumn.js +12 -9
  134. package/es/components/EditInPlace/EditInPlace.d.ts +4 -0
  135. package/es/components/EditInPlace/EditInPlace.js +21 -10
  136. package/es/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  137. package/es/components/EditTearsheet/EditTearsheet.js +44 -10
  138. package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  139. package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
  140. package/es/components/EmptyStates/EmptyState.d.ts +72 -5
  141. package/es/components/EmptyStates/EmptyState.js +8 -5
  142. package/es/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  143. package/es/components/EmptyStates/EmptyStateV2.js +3 -2
  144. package/es/components/FullPageError/FullPageError.d.ts +36 -2
  145. package/es/components/FullPageError/FullPageError.js +0 -3
  146. package/es/components/GetStartedCard/GetStartedCard.d.ts +60 -2
  147. package/es/components/GetStartedCard/GetStartedCard.js +11 -10
  148. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  149. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  150. package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  151. package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  152. package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  153. package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  154. package/es/components/Nav/NavItem.js +12 -3
  155. package/es/components/OptionsTile/OptionsTile.js +11 -6
  156. package/es/components/PageHeader/PageHeader.js +1 -0
  157. package/es/components/PageHeader/PageHeaderUtils.js +1 -1
  158. package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
  159. package/es/components/RemoveModal/RemoveModal.js +7 -1
  160. package/es/components/SearchBar/SearchBar.d.ts +1 -1
  161. package/es/components/SearchBar/SearchBar.js +2 -2
  162. package/es/components/SidePanel/SidePanel.js +17 -21
  163. package/es/components/SidePanel/motion/variants.d.ts +4 -6
  164. package/es/components/SidePanel/motion/variants.js +10 -11
  165. package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
  166. package/es/components/StringFormatter/StringFormatter.js +14 -3
  167. package/es/components/StringFormatter/utils/enums.d.ts +20 -1
  168. package/es/components/StringFormatter/utils/enums.js +29 -2
  169. package/es/components/TagOverflow/TagOverflow.d.ts +35 -4
  170. package/es/components/TagOverflow/TagOverflow.js +47 -64
  171. package/es/components/TagOverflow/TagOverflowModal.js +4 -6
  172. package/es/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  173. package/es/components/TagOverflow/TagOverflowPopover.js +38 -41
  174. package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
  175. package/es/components/Tearsheet/Tearsheet.js +9 -1
  176. package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  177. package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
  178. package/es/components/Tearsheet/TearsheetShell.d.ts +11 -1
  179. package/es/components/Tearsheet/TearsheetShell.js +28 -7
  180. package/es/components/Toolbar/ToolbarButton.js +1 -1
  181. package/es/components/UserAvatar/UserAvatar.d.ts +59 -1
  182. package/es/components/UserAvatar/UserAvatar.js +7 -23
  183. package/es/components/WebTerminal/WebTerminal.js +10 -12
  184. package/es/components/index.d.ts +1 -1
  185. package/es/global/js/hooks/useFocus.d.ts +1 -0
  186. package/es/global/js/hooks/useFocus.js +5 -2
  187. package/es/global/js/hooks/usePrefersReducedMotion.js +14 -8
  188. package/es/global/js/package-settings.d.ts +1 -1
  189. package/es/global/js/package-settings.js +1 -1
  190. package/es/global/js/utils/scrollableAncestor.js +7 -0
  191. package/es/global/js/utils/uuidv4.d.ts +6 -0
  192. package/es/global/js/utils/uuidv4.js +2 -0
  193. package/es/global/js/utils/wait.d.ts +6 -0
  194. package/es/global/js/utils/wait.js +2 -0
  195. package/es/index.js +1 -0
  196. package/es/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  197. package/es/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1020 -1058
  198. package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +881 -758
  199. package/es/settings.d.ts +1 -1
  200. package/flags.js +7 -0
  201. package/lib/components/APIKeyModal/APIKeyModal.types.d.ts +6 -0
  202. package/lib/components/ActionBar/ActionBar.d.ts +58 -2
  203. package/lib/components/ActionBar/ActionBar.js +14 -9
  204. package/lib/components/ActionBar/ActionBarItem.d.ts +36 -2
  205. package/lib/components/ActionBar/ActionBarItem.js +7 -4
  206. package/lib/components/ActionBar/ActionBarOverflowItems.d.ts +55 -16
  207. package/lib/components/ActionBar/ActionBarOverflowItems.js +8 -4
  208. package/lib/components/AddSelect/types/index.d.ts +6 -0
  209. package/lib/components/Card/Card.d.ts +68 -2
  210. package/lib/components/Card/Card.js +28 -35
  211. package/lib/components/Card/CardFooter.d.ts +51 -48
  212. package/lib/components/Card/CardFooter.js +4 -2
  213. package/lib/components/Card/CardHeader.d.ts +67 -49
  214. package/lib/components/Card/CardHeader.js +4 -2
  215. package/lib/components/Coachmark/Coachmark.d.ts +6 -1
  216. package/lib/components/Coachmark/Coachmark.js +46 -10
  217. package/lib/components/Coachmark/CoachmarkOverlay.js +2 -4
  218. package/lib/components/Coachmark/utils/enums.d.ts +6 -0
  219. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -7
  220. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  221. package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -3
  222. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  223. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +1 -0
  224. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +87 -53
  225. package/lib/components/ConditionBuilder/ConditionBuilder.js +82 -25
  226. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
  227. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +163 -0
  228. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  229. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +28 -11
  230. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +8 -1
  231. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +33 -9
  232. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +16 -8
  233. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +18 -10
  234. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -13
  235. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +81 -62
  236. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +13 -7
  237. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +31 -8
  238. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +8 -2
  239. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +34 -24
  240. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +43 -36
  241. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +43 -36
  242. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +6 -2
  243. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +112 -38
  244. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  245. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  246. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +28 -10
  247. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
  248. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +122 -0
  249. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
  250. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +68 -35
  251. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  252. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +21 -8
  253. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  254. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
  255. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +128 -39
  256. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +5 -1
  257. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +50 -17
  258. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +2 -1
  259. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +152 -41
  260. package/lib/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  261. package/lib/components/ConditionBuilder/utils/useTranslations.js +30 -0
  262. package/lib/components/ConditionBuilder/utils/util.d.ts +6 -4
  263. package/lib/components/ConditionBuilder/utils/util.js +44 -16
  264. package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
  265. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +26 -0
  266. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +129 -53
  267. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +16 -0
  268. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +32 -7
  269. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  270. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +16 -3
  271. package/lib/components/DataSpreadsheet/types/index.d.ts +7 -0
  272. package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  273. package/lib/components/Datagrid/Datagrid/Datagrid.js +4 -9
  274. package/lib/components/Datagrid/Datagrid/DatagridBody.d.ts +6 -0
  275. package/lib/components/Datagrid/Datagrid/DatagridContent.js +4 -3
  276. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +23 -8
  277. package/lib/components/Datagrid/Datagrid/DatagridRefBody.d.ts +6 -0
  278. package/lib/components/Datagrid/Datagrid/DatagridRow.js +21 -8
  279. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +6 -6
  280. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  281. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.d.ts +6 -0
  282. package/lib/components/Datagrid/Datagrid/DraggableElement.d.ts +6 -0
  283. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +34 -10
  284. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
  285. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
  286. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +6 -3
  287. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +20 -12
  288. package/lib/components/Datagrid/Datagrid/addons/Filtering/handleCheckboxChange.js +7 -0
  289. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
  290. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +53 -16
  291. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +2 -3
  292. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
  293. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
  294. package/lib/components/Datagrid/common-column-ids.d.ts +6 -0
  295. package/lib/components/Datagrid/types/index.d.ts +63 -9
  296. package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
  297. package/lib/components/Datagrid/useActionsColumn.js +7 -6
  298. package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
  299. package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
  300. package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  301. package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
  302. package/lib/components/Datagrid/useDatagrid.d.ts +6 -0
  303. package/lib/components/Datagrid/useDefaultStringRenderer.js +0 -1
  304. package/lib/components/Datagrid/useDisableSelectRows.d.ts +8 -1
  305. package/lib/components/Datagrid/useDisableSelectRows.js +27 -22
  306. package/lib/components/Datagrid/useInlineEdit.js +12 -2
  307. package/lib/components/Datagrid/useNestedRowExpander.js +1 -3
  308. package/lib/components/Datagrid/useNestedRows.js +32 -13
  309. package/lib/components/Datagrid/useRowExpander.js +1 -3
  310. package/lib/components/Datagrid/useRowIsMouseOver.d.ts +6 -0
  311. package/lib/components/Datagrid/useSelectRows.js +2 -1
  312. package/lib/components/Datagrid/useStickyColumn.d.ts +8 -1
  313. package/lib/components/Datagrid/useStickyColumn.js +12 -9
  314. package/lib/components/EditInPlace/EditInPlace.d.ts +4 -0
  315. package/lib/components/EditInPlace/EditInPlace.js +21 -10
  316. package/lib/components/EditTearsheet/EditTearsheet.d.ts +7 -2
  317. package/lib/components/EditTearsheet/EditTearsheet.js +43 -9
  318. package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
  319. package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
  320. package/lib/components/EmptyStates/EmptyState.d.ts +72 -5
  321. package/lib/components/EmptyStates/EmptyState.js +8 -5
  322. package/lib/components/EmptyStates/EmptyStateV2.d.ts +63 -2
  323. package/lib/components/EmptyStates/EmptyStateV2.js +3 -2
  324. package/lib/components/FullPageError/FullPageError.d.ts +36 -2
  325. package/lib/components/FullPageError/FullPageError.js +0 -3
  326. package/lib/components/GetStartedCard/GetStartedCard.d.ts +60 -2
  327. package/lib/components/GetStartedCard/GetStartedCard.js +10 -9
  328. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
  329. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
  330. package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
  331. package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  332. package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  333. package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  334. package/lib/components/Nav/NavItem.js +10 -1
  335. package/lib/components/OptionsTile/OptionsTile.js +11 -6
  336. package/lib/components/PageHeader/PageHeader.js +1 -0
  337. package/lib/components/PageHeader/PageHeaderUtils.js +1 -1
  338. package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
  339. package/lib/components/RemoveModal/RemoveModal.js +7 -1
  340. package/lib/components/SearchBar/SearchBar.d.ts +1 -1
  341. package/lib/components/SearchBar/SearchBar.js +2 -2
  342. package/lib/components/SidePanel/SidePanel.js +16 -20
  343. package/lib/components/SidePanel/motion/variants.d.ts +4 -6
  344. package/lib/components/SidePanel/motion/variants.js +10 -11
  345. package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
  346. package/lib/components/StringFormatter/StringFormatter.js +13 -2
  347. package/lib/components/StringFormatter/utils/enums.d.ts +20 -1
  348. package/lib/components/StringFormatter/utils/enums.js +30 -1
  349. package/lib/components/TagOverflow/TagOverflow.d.ts +35 -4
  350. package/lib/components/TagOverflow/TagOverflow.js +46 -63
  351. package/lib/components/TagOverflow/TagOverflowModal.js +4 -6
  352. package/lib/components/TagOverflow/TagOverflowPopover.d.ts +13 -1
  353. package/lib/components/TagOverflow/TagOverflowPopover.js +37 -40
  354. package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
  355. package/lib/components/Tearsheet/Tearsheet.js +9 -1
  356. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
  357. package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
  358. package/lib/components/Tearsheet/TearsheetShell.d.ts +11 -1
  359. package/lib/components/Tearsheet/TearsheetShell.js +26 -5
  360. package/lib/components/Toolbar/ToolbarButton.js +1 -1
  361. package/lib/components/UserAvatar/UserAvatar.d.ts +59 -1
  362. package/lib/components/UserAvatar/UserAvatar.js +7 -23
  363. package/lib/components/WebTerminal/WebTerminal.js +10 -12
  364. package/lib/components/index.d.ts +1 -1
  365. package/lib/global/js/hooks/useFocus.d.ts +1 -0
  366. package/lib/global/js/hooks/useFocus.js +5 -1
  367. package/lib/global/js/hooks/usePrefersReducedMotion.js +13 -7
  368. package/lib/global/js/package-settings.d.ts +1 -1
  369. package/lib/global/js/package-settings.js +1 -1
  370. package/lib/global/js/utils/scrollableAncestor.js +7 -0
  371. package/lib/global/js/utils/uuidv4.d.ts +6 -0
  372. package/lib/global/js/utils/uuidv4.js +2 -0
  373. package/lib/global/js/utils/wait.d.ts +6 -0
  374. package/lib/global/js/utils/wait.js +2 -0
  375. package/lib/index.js +5 -0
  376. package/lib/node_modules/@carbon/icon-helpers/es/index.js +49 -62
  377. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1036 -1074
  378. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +946 -823
  379. package/lib/settings.d.ts +1 -1
  380. package/package.json +8 -7
  381. package/scss/components/Coachmark/_coachmark-overlay.scss +6 -70
  382. package/scss/components/Coachmark/_coachmark.scss +5 -4
  383. package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +1 -3
  384. package/scss/components/ConditionBuilder/_condition-builder.scss +8 -1
  385. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +38 -5
  386. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +68 -22
  387. package/scss/components/ConditionBuilder/styles/_index.scss +7 -0
  388. package/scss/components/CreateModal/_create-modal.scss +0 -4
  389. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +16 -2
  390. package/scss/components/Datagrid/_datagrid.scss +0 -4
  391. package/scss/components/Datagrid/styles/_datagrid.scss +1 -0
  392. package/scss/components/Datagrid/styles/_useActionsColumn.scss +6 -7
  393. package/scss/components/Datagrid/styles/_useColumnRightAlign.scss +6 -7
  394. package/scss/components/Datagrid/styles/_useExpandedRow.scss +6 -7
  395. package/scss/components/Datagrid/styles/_useInlineEdit.scss +19 -7
  396. package/scss/components/Datagrid/styles/_useNestedRows.scss +6 -7
  397. package/scss/components/Datagrid/styles/_useNestedTable.scss +6 -7
  398. package/scss/components/Datagrid/styles/_useStickyColumn.scss +6 -7
  399. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +7 -5
  400. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +5 -4
  401. package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +6 -7
  402. package/scss/components/HTTPErrors/_http-errors.scss +77 -0
  403. package/scss/components/OptionsTile/_options-tile.scss +6 -6
  404. package/scss/components/SidePanel/_side-panel.scss +1 -1
  405. package/scss/components/_index-released-only.scss +1 -0
  406. package/scss/config-dev.scss +7 -0
  407. package/scss/config.scss +7 -0
  408. package/telemetry.yml +32 -19
  409. package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  410. package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
  411. package/es/global/js/utils/window.d.ts +0 -2
  412. package/es/global/js/utils/window.js +0 -12
  413. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
  414. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
  415. package/lib/global/js/utils/window.d.ts +0 -2
  416. package/lib/global/js/utils/window.js +0 -16
@@ -32,7 +32,7 @@ import { useSpreadsheetOutsideClick } from './hooks/useSpreadsheetOutsideClick.j
32
32
  import { useMoveActiveCell } from './hooks/useMoveActiveCell.js';
33
33
  import { useSpreadsheetEdit } from './hooks/useSpreadsheetEdit.js';
34
34
 
35
- var _excluded = ["cellSize", "className", "columns", "data", "defaultEmptyRowCount", "onDataUpdate", "id", "onActiveCellChange", "onSelectionAreaChange", "selectAllAriaLabel", "spreadsheetAriaLabel", "theme", "totalVisibleColumns"];
35
+ var _excluded = ["cellSize", "className", "columns", "data", "defaultEmptyRowCount", "onDataUpdate", "onColDrag", "id", "onActiveCellChange", "onSelectionAreaChange", "renderRowHeader", "renderRowHeaderDirection", "disableColumnSwapping", "readOnlyTable", "selectAllAriaLabel", "spreadsheetAriaLabel", "theme", "totalVisibleColumns"];
36
36
  // The block part of our conventional BEM class names (blockClass__E--M).
37
37
  var blockClass = "".concat(pkg.prefix, "--data-spreadsheet");
38
38
  var componentName = 'DataSpreadsheet';
@@ -43,6 +43,7 @@ var defaults = {
43
43
  data: Object.freeze([]),
44
44
  defaultEmptyRowCount: 16,
45
45
  onDataUpdate: Object.freeze(function () {}),
46
+ onColDrag: Object.freeze(function () {}),
46
47
  onActiveCellChange: Object.freeze(function () {}),
47
48
  onSelectionAreaChange: Object.freeze(function () {}),
48
49
  theme: 'light'
@@ -62,11 +63,19 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
62
63
  defaultEmptyRowCount = _ref$defaultEmptyRowC === void 0 ? defaults.defaultEmptyRowCount : _ref$defaultEmptyRowC,
63
64
  _ref$onDataUpdate = _ref.onDataUpdate,
64
65
  onDataUpdate = _ref$onDataUpdate === void 0 ? defaults.onDataUpdate : _ref$onDataUpdate,
66
+ _ref$onColDrag = _ref.onColDrag,
67
+ onColDrag = _ref$onColDrag === void 0 ? defaults.onColDrag : _ref$onColDrag,
65
68
  id = _ref.id,
66
69
  _ref$onActiveCellChan = _ref.onActiveCellChange,
67
70
  onActiveCellChange = _ref$onActiveCellChan === void 0 ? defaults.onActiveCellChange : _ref$onActiveCellChan,
68
71
  _ref$onSelectionAreaC = _ref.onSelectionAreaChange,
69
72
  onSelectionAreaChange = _ref$onSelectionAreaC === void 0 ? defaults.onSelectionAreaChange : _ref$onSelectionAreaC,
73
+ renderRowHeader = _ref.renderRowHeader,
74
+ renderRowHeaderDirection = _ref.renderRowHeaderDirection,
75
+ _ref$disableColumnSwa = _ref.disableColumnSwapping,
76
+ disableColumnSwapping = _ref$disableColumnSwa === void 0 ? false : _ref$disableColumnSwa,
77
+ _ref$readOnlyTable = _ref.readOnlyTable,
78
+ readOnlyTable = _ref$readOnlyTable === void 0 ? false : _ref$readOnlyTable,
70
79
  selectAllAriaLabel = _ref.selectAllAriaLabel,
71
80
  spreadsheetAriaLabel = _ref.spreadsheetAriaLabel,
72
81
  theme = _ref.theme,
@@ -76,75 +85,86 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
76
85
  var localRef = useRef();
77
86
  var spreadsheetRef = ref || localRef;
78
87
  var focusedElement = useActiveElement();
79
- var _useState = useState(false),
88
+ var _useState = useState(columns),
80
89
  _useState2 = _slicedToArray(_useState, 2),
81
- containerHasFocus = _useState2[0],
82
- setContainerHasFocus = _useState2[1];
83
- var _useState3 = useState(null),
90
+ currentColumns = _useState2[0],
91
+ setCurrentColumns = _useState2[1];
92
+ var _useState3 = useState([]),
84
93
  _useState4 = _slicedToArray(_useState3, 2),
85
- activeCellCoordinates = _useState4[0],
86
- setActiveCellCoordinates = _useState4[1];
87
- var _useState5 = useState([]),
94
+ pastColumns = _useState4[0],
95
+ setPastColumns = _useState4[1];
96
+ var _useState5 = useState(false),
88
97
  _useState6 = _slicedToArray(_useState5, 2),
89
- selectionAreas = _useState6[0],
90
- setSelectionAreas = _useState6[1];
91
- var _useState7 = useState([]),
98
+ containerHasFocus = _useState6[0],
99
+ setContainerHasFocus = _useState6[1];
100
+ var _useState7 = useState(null),
92
101
  _useState8 = _slicedToArray(_useState7, 2),
93
- selectionAreaData = _useState8[0],
94
- setSelectionAreaData = _useState8[1];
95
- var _useState9 = useState(false),
102
+ activeCellCoordinates = _useState8[0],
103
+ setActiveCellCoordinates = _useState8[1];
104
+ var _useState9 = useState([]),
96
105
  _useState10 = _slicedToArray(_useState9, 2),
97
- clickAndHoldActive = _useState10[0],
98
- setClickAndHoldActive = _useState10[1];
99
- var _useState11 = useState(''),
106
+ selectionAreas = _useState10[0],
107
+ setSelectionAreas = _useState10[1];
108
+ var _useState11 = useState([]),
100
109
  _useState12 = _slicedToArray(_useState11, 2),
101
- currentMatcher = _useState12[0],
102
- setCurrentMatcher = _useState12[1];
110
+ selectionAreaData = _useState12[0],
111
+ setSelectionAreaData = _useState12[1];
103
112
  var _useState13 = useState(false),
104
113
  _useState14 = _slicedToArray(_useState13, 2),
105
- isEditing = _useState14[0],
106
- setIsEditing = _useState14[1];
114
+ clickAndHoldActive = _useState14[0],
115
+ setClickAndHoldActive = _useState14[1];
107
116
  var _useState15 = useState(''),
108
117
  _useState16 = _slicedToArray(_useState15, 2),
109
- cellEditorValue = _useState16[0],
110
- setCellEditorValue = _useState16[1];
118
+ currentMatcher = _useState16[0],
119
+ setCurrentMatcher = _useState16[1];
111
120
  var _useState17 = useState(false),
112
121
  _useState18 = _slicedToArray(_useState17, 2),
113
- headerCellHoldActive = _useState18[0],
114
- setHeaderCellHoldActive = _useState18[1];
115
- var _useState19 = useState(false),
122
+ isEditing = _useState18[0],
123
+ setIsEditing = _useState18[1];
124
+ var _useState19 = useState(''),
116
125
  _useState20 = _slicedToArray(_useState19, 2),
117
- selectedHeaderReorderActive = _useState20[0],
118
- setSelectedHeaderReorderActive = _useState20[1];
119
- var isBlurSpreadsheet = useRef(false);
126
+ cellEditorValue = _useState20[0],
127
+ setCellEditorValue = _useState20[1];
120
128
  var _useState21 = useState(false),
121
129
  _useState22 = _slicedToArray(_useState21, 2),
122
- isActiveHeaderCellChanged = _useState22[0],
123
- setIsActiveHeaderCellChanged = _useState22[1];
130
+ headerCellHoldActive = _useState22[0],
131
+ setHeaderCellHoldActive = _useState22[1];
124
132
  var _useState23 = useState(false),
125
133
  _useState24 = _slicedToArray(_useState23, 2),
126
- activeCellInsideSelectionArea = _useState24[0],
127
- setActiveCellInsideSelectionArea = _useState24[1];
134
+ selectedHeaderReorderActive = _useState24[0],
135
+ setSelectedHeaderReorderActive = _useState24[1];
136
+ var isBlurSpreadsheet = useRef(false);
137
+ var _useState25 = useState(false),
138
+ _useState26 = _slicedToArray(_useState25, 2),
139
+ isActiveHeaderCellChanged = _useState26[0],
140
+ setIsActiveHeaderCellChanged = _useState26[1];
141
+ var _useState27 = useState(false),
142
+ _useState28 = _slicedToArray(_useState27, 2),
143
+ activeCellInsideSelectionArea = _useState28[0],
144
+ setActiveCellInsideSelectionArea = _useState28[1];
128
145
  var previousState = usePreviousValue({
129
146
  activeCellCoordinates: activeCellCoordinates,
130
147
  isEditing: isEditing,
131
- cellEditorValue: cellEditorValue
148
+ cellEditorValue: cellEditorValue,
149
+ selectedHeaderReorderActive: selectedHeaderReorderActive
132
150
  }) || {};
133
151
  var cellSizeValue = getCellSize(cellSize);
134
152
  var cellEditorRef = useRef();
135
- var _useState25 = useState(),
136
- _useState26 = _slicedToArray(_useState25, 2),
137
- activeCellContent = _useState26[0],
138
- setActiveCellContent = _useState26[1];
153
+ var _useState29 = useState(),
154
+ _useState30 = _slicedToArray(_useState29, 2),
155
+ activeCellContent = _useState30[0],
156
+ setActiveCellContent = _useState30[1];
139
157
  var activeCellRef = useRef();
140
158
  var cellEditorRulerRef = useRef();
159
+ var hasCustomRowHeader = typeof renderRowHeader === 'function';
160
+ var maxNumRowsCount = data.length.toString().length;
141
161
  var defaultColumn = useMemo(function () {
142
162
  return {
143
163
  width: 150,
144
- rowHeaderWidth: 64,
164
+ rowHeaderWidth: hasCustomRowHeader ? 40 + maxNumRowsCount * 8.56 : 64,
145
165
  rowHeight: cellSizeValue
146
166
  };
147
- }, [cellSizeValue]);
167
+ }, [cellSizeValue, hasCustomRowHeader, maxNumRowsCount]);
148
168
  var _useMultipleKeyTracki = useMultipleKeyTracking({
149
169
  ref: multiKeyTrackingRef,
150
170
  containerHasFocus: containerHasFocus,
@@ -180,6 +200,28 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
180
200
  });
181
201
  });
182
202
  }, [cellEditorValue, onDataUpdate]);
203
+ useEffect(function () {
204
+ var currentHeaders = [];
205
+ if (Object.keys(currentColumns).length > 0) {
206
+ Object.keys(currentColumns).forEach(function (itemIndex) {
207
+ if (currentColumns[itemIndex].Header) {
208
+ currentHeaders.push(currentColumns[itemIndex].Header);
209
+ }
210
+ });
211
+ }
212
+ if (previousState.selectedHeaderReorderActive) {
213
+ setPastColumns(currentHeaders);
214
+ }
215
+ if (!previousState.selectedHeaderReorderActive && pastColumns.length > 0 && !headerCellHoldActive && JSON.stringify(currentHeaders) !== JSON.stringify(pastColumns)) {
216
+ onColDrag({
217
+ headers: currentHeaders,
218
+ data: activeCellContent.props.data
219
+ });
220
+ if (currentHeaders.length === 0) {
221
+ setPastColumns([]);
222
+ }
223
+ }
224
+ }, [previousState === null || previousState === void 0 ? void 0 : previousState.selectedHeaderReorderActive, currentColumns, headerCellHoldActive, columns, activeCellContent, onColDrag, pastColumns]);
183
225
 
184
226
  // Removes the active cell element
185
227
  var removeActiveCell = useCallback(function () {
@@ -211,9 +253,12 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
211
253
  }
212
254
  if ((prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) || (prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.column) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column)) {
213
255
  if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) !== 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header') {
214
- var _activeCellFullData$r;
215
256
  var activeCellFullData = typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'number' && typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'number' ? rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row].cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column] : null;
216
- setActiveCellContent((_activeCellFullData$r = activeCellFullData === null || activeCellFullData === void 0 ? void 0 : activeCellFullData.render('Cell')) !== null && _activeCellFullData$r !== void 0 ? _activeCellFullData$r : null);
257
+ if (activeCellFullData) {
258
+ setActiveCellContent(activeCellFullData.render('Cell'));
259
+ } else {
260
+ setActiveCellContent(null);
261
+ }
217
262
  }
218
263
  if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' || (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header') {
219
264
  setActiveCellContent(null);
@@ -420,17 +465,14 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
420
465
  }
421
466
  }, [handleInitialArrowPress, updateActiveCellCoordinates, activeCellCoordinates, columns, rows]);
422
467
  var handleKeyPressEvent = useCallback(function (event) {
423
- handleKeyPress(event, activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkForReturnCondition, handleArrowKeyPress, setSelectionAreas, setSelectionAreaData, setCurrentMatcher, activeCellRef, setActiveCellCoordinates, setContainerHasFocus, setActiveCellContent);
424
- }, [activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkForReturnCondition, handleArrowKeyPress]);
468
+ handleKeyPress(event, activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkForReturnCondition, handleArrowKeyPress, setSelectionAreas, setSelectionAreaData, setCurrentMatcher, activeCellRef, setActiveCellCoordinates, setContainerHasFocus, setActiveCellContent, readOnlyTable);
469
+ }, [activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkForReturnCondition, handleArrowKeyPress, readOnlyTable]);
425
470
  var startEditMode = function startEditMode() {
471
+ var _activeCellFullData$r;
426
472
  setIsEditing(true);
427
473
  setClickAndHoldActive(false);
428
474
  var activeCellFullData = typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'number' && typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'number' ? rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row].cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column] : null;
429
- var activeCellValue;
430
- if (activeCellFullData && activeCellCoordinates !== null && activeCellCoordinates !== void 0 && activeCellCoordinates.column) {
431
- var _activeCellFullData$r2;
432
- activeCellValue = activeCellFullData ? (_activeCellFullData$r2 = activeCellFullData.row.cells) === null || _activeCellFullData$r2 === void 0 || (_activeCellFullData$r2 = _activeCellFullData$r2[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column]) === null || _activeCellFullData$r2 === void 0 ? void 0 : _activeCellFullData$r2.value : null;
433
- }
475
+ var activeCellValue = activeCellFullData === null || activeCellFullData === void 0 || (_activeCellFullData$r = activeCellFullData.row) === null || _activeCellFullData$r === void 0 || (_activeCellFullData$r = _activeCellFullData$r.cells) === null || _activeCellFullData$r === void 0 || (_activeCellFullData$r = _activeCellFullData$r[Number(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column)]) === null || _activeCellFullData$r === void 0 ? void 0 : _activeCellFullData$r.value;
434
476
  setCellEditorValue(activeCellValue || '');
435
477
  if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {
436
478
  cellEditorRulerRef.current.textContent = activeCellValue;
@@ -492,7 +534,7 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
492
534
  // Go into edit mode if 'Enter' key is pressed on activeCellRef
493
535
  var handleActiveCellKeyDown = function handleActiveCellKeyDown(event) {
494
536
  var key = event.key;
495
- if (key === 'Enter' && !activeCellInsideSelectionArea) {
537
+ if (key === 'Enter' && !activeCellInsideSelectionArea && !readOnlyTable) {
496
538
  if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) !== 'header') {
497
539
  startEditMode();
498
540
  }
@@ -548,8 +590,10 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
548
590
  };
549
591
 
550
592
  // Go into edit mode if double click is detected on activeCellRef
551
- var handleActiveCellDoubleClick = function handleActiveCellDoubleClick() {
552
- startEditMode();
593
+ var handleActiveCellDoubleClick = function handleActiveCellDoubleClick(readOnlyTable) {
594
+ if (!readOnlyTable) {
595
+ startEditMode();
596
+ }
553
597
  };
554
598
  useSpreadsheetEdit({
555
599
  isEditing: isEditing,
@@ -629,6 +673,8 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
629
673
  setSelectionAreas: setSelectionAreas,
630
674
  setCurrentMatcher: setCurrentMatcher,
631
675
  setSelectionAreaData: setSelectionAreaData,
676
+ disableColumnSwapping: disableColumnSwapping,
677
+ readOnlyTable: readOnlyTable,
632
678
  totalVisibleColumns: totalVisibleColumns,
633
679
  updateActiveCellCoordinates: updateActiveCellCoordinates,
634
680
  setHeaderCellHoldActive: setHeaderCellHoldActive,
@@ -638,6 +684,7 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
638
684
  }), /*#__PURE__*/React__default.createElement(DataSpreadsheetBody, {
639
685
  activeCellRef: activeCellRef,
640
686
  activeCellCoordinates: activeCellCoordinates,
687
+ setCurrentColumns: setCurrentColumns,
641
688
  ref: spreadsheetRef,
642
689
  clickAndHoldActive: clickAndHoldActive,
643
690
  setClickAndHoldActive: setClickAndHoldActive,
@@ -651,7 +698,10 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
651
698
  headerGroups: headerGroups,
652
699
  defaultColumn: defaultColumn,
653
700
  getTableBodyProps: getTableBodyProps,
701
+ hasCustomRowHeader: hasCustomRowHeader,
654
702
  onDataUpdate: onDataUpdate,
703
+ renderRowHeaderDirection: renderRowHeaderDirection,
704
+ renderRowHeader: renderRowHeader,
655
705
  onActiveCellChange: onActiveCellChange,
656
706
  onSelectionAreaChange: onSelectionAreaChange,
657
707
  prepareRow: prepareRow,
@@ -674,7 +724,9 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
674
724
  onMouseUp: handleActiveCellMouseUp,
675
725
  onClick: handleActiveCellClick,
676
726
  onKeyDown: handleActiveCellKeyDown,
677
- onDoubleClick: handleActiveCellDoubleClick,
727
+ onDoubleClick: function onDoubleClick() {
728
+ return handleActiveCellDoubleClick(readOnlyTable);
729
+ },
678
730
  onMouseEnter: handleActiveCellMouseEnter,
679
731
  ref: activeCellRef,
680
732
  className: cx("".concat(blockClass, "--interactive-cell-element"), "".concat(blockClass, "__active-cell--highlight"), _defineProperty({}, "".concat(blockClass, "__active-cell--with-selection"), activeCellInsideSelectionArea)),
@@ -750,6 +802,14 @@ DataSpreadsheet.propTypes = {
750
802
  * Sets the number of empty rows to be created when there is no data provided
751
803
  */
752
804
  defaultEmptyRowCount: PropTypes.number,
805
+ /**
806
+ * Disable column swapping, default false
807
+ */
808
+ disableColumnSwapping: PropTypes.bool,
809
+ /**
810
+ * Check if spreadsheet is using custom row header component attached
811
+ */
812
+ hasCustomRowHeader: PropTypes.bool,
753
813
  /**
754
814
  * The spreadsheet id
755
815
  */
@@ -758,6 +818,10 @@ DataSpreadsheet.propTypes = {
758
818
  * The event handler that is called when the active cell changes
759
819
  */
760
820
  onActiveCellChange: PropTypes.func,
821
+ /**
822
+ * Callback for when columns are dropped after dragged
823
+ */
824
+ onColDrag: PropTypes.func,
761
825
  /**
762
826
  * The setter fn for the data prop
763
827
  */
@@ -766,6 +830,18 @@ DataSpreadsheet.propTypes = {
766
830
  * The event handler that is called when the selection area values change
767
831
  */
768
832
  onSelectionAreaChange: PropTypes.func,
833
+ /**
834
+ * Read-only table
835
+ */
836
+ readOnlyTable: PropTypes.bool,
837
+ /**
838
+ * Component next to numbering rows
839
+ */
840
+ renderRowHeader: PropTypes.func,
841
+ /**
842
+ * Component next to numbering rows
843
+ */
844
+ renderRowHeaderDirection: PropTypes.oneOf(['left', 'right']),
769
845
  /**
770
846
  * The aria label applied to the Select all button
771
847
  */
@@ -48,10 +48,26 @@ interface DataSpreadsheetBodyProps {
48
48
  * The spreadsheet id
49
49
  */
50
50
  id?: number | string;
51
+ /**
52
+ * Set current columns after drag drop
53
+ */
54
+ setCurrentColumns?: Dispatch<SetStateAction<object[]>>;
51
55
  /**
52
56
  * The event handler that is called when the active cell changes
53
57
  */
54
58
  onActiveCellChange?: () => void;
59
+ /**
60
+ * Check if user is using custom component
61
+ */
62
+ hasCustomRowHeader?: boolean;
63
+ /**
64
+ * Component next to numbering rows
65
+ */
66
+ renderRowHeader?: (index: number) => any[];
67
+ /**
68
+ * Component next to numbering rows
69
+ */
70
+ renderRowHeaderDirection?: string;
55
71
  /**
56
72
  * The event handler that is called to set the rows for the empty spreadsheet
57
73
  */
@@ -33,8 +33,12 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
33
33
  defaultEmptyRowCount = _ref.defaultEmptyRowCount,
34
34
  getTableBodyProps = _ref.getTableBodyProps,
35
35
  headerGroups = _ref.headerGroups,
36
+ setCurrentColumns = _ref.setCurrentColumns,
36
37
  id = _ref.id,
37
38
  onDataUpdate = _ref.onDataUpdate,
39
+ renderRowHeader = _ref.renderRowHeader,
40
+ renderRowHeaderDirection = _ref.renderRowHeaderDirection,
41
+ hasCustomRowHeader = _ref.hasCustomRowHeader,
38
42
  prepareRow = _ref.prepareRow,
39
43
  rows = _ref.rows,
40
44
  selectionAreaData = _ref.selectionAreaData,
@@ -138,7 +142,7 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
138
142
  return;
139
143
  });
140
144
  }
141
- }, [selectionAreas, setSelectionAreas, defaultColumn, onSelectionAreaChange, setSelectionAreaData, ref, activeCellCoordinates, setActiveCellInsideSelectionArea, visibleColumns]);
145
+ }, [selectionAreas, setSelectionAreas, defaultColumn, onSelectionAreaChange, setSelectionAreaData, ref, activeCellCoordinates, setActiveCellInsideSelectionArea, visibleColumns, hasCustomRowHeader]);
142
146
  var populateSelectionAreaCellData = function populateSelectionAreaCellData(_ref2) {
143
147
  var rowStart = _ref2.rowStart,
144
148
  rowEnd = _ref2.rowEnd,
@@ -212,7 +216,7 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
212
216
  });
213
217
  }
214
218
  }
215
- }, [defaultColumn, ref, activeCellCoordinates, previousState === null || previousState === void 0 ? void 0 : previousState.rowHeight, selectionAreas, setActiveCellInsideSelectionArea, setSelectionAreas, visibleColumns]);
219
+ }, [defaultColumn, ref, activeCellCoordinates, previousState === null || previousState === void 0 ? void 0 : previousState.rowHeight, selectionAreas, setActiveCellInsideSelectionArea, setSelectionAreas, visibleColumns, hasCustomRowHeader]);
216
220
 
217
221
  //this method will check for any duplicate selection area and remove.
218
222
  //same selections are those have the same height, width, top, left styles. These inline styles are being set in createCellSelection util.
@@ -306,7 +310,11 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
306
310
  };
307
311
  buildEmptyRows();
308
312
  }
309
- }, [rows, headerGroups, defaultEmptyRowCount, onDataUpdate]);
313
+ if (headerGroups !== null && headerGroups !== void 0 && headerGroups[0] && typeof setCurrentColumns === 'function') {
314
+ var headers = headerGroups[0].headers;
315
+ setCurrentColumns(headers);
316
+ }
317
+ }, [rows, headerGroups, defaultEmptyRowCount, onDataUpdate, setCurrentColumns]);
310
318
  var RenderEmptyRows = function RenderEmptyRows() {
311
319
  return _div || (_div = /*#__PURE__*/React__default.createElement("div", null));
312
320
  };
@@ -338,11 +346,12 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
338
346
  "data-column-index": "header",
339
347
  type: "button",
340
348
  onClick: handleRowHeaderClickEvent(index),
341
- className: cx("".concat(blockClass, "__td"), "".concat(blockClass, "__td-th"), "".concat(blockClass, "--interactive-cell-element"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__td-th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === index || checkActiveHeaderCell(index, selectionAreas, 'row')), "".concat(blockClass, "__td-th--selected-header"), checkSelectedHeaderCell(index, selectionAreas, 'row', columns))),
349
+ className: cx("".concat(blockClass, "__td"), "".concat(blockClass, "__td-th"), "".concat(blockClass, "--interactive-cell-element"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__td_custom"), hasCustomRowHeader ? true : false), "".concat(blockClass, "__td-th--active-header"), !hasCustomRowHeader && ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === index || checkActiveHeaderCell(index, selectionAreas, 'row'))), "".concat(blockClass, "__td-th--selected-header"), !hasCustomRowHeader && checkSelectedHeaderCell(index, selectionAreas, 'row', columns))),
342
350
  style: {
343
- width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth
351
+ width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth,
352
+ flexDirection: hasCustomRowHeader ? renderRowHeaderDirection === 'Left' ? 'row-reverse' : row : undefined
344
353
  }
345
- }, index + 1)), row.cells.map(function (cell, index) {
354
+ }, index + 1, hasCustomRowHeader && typeof renderRowHeader === 'function' && renderRowHeader(index))), row.cells.map(function (cell, index) {
346
355
  var _cell$column;
347
356
  var cellProps = prepareProps(cell.getCellProps(), 'key');
348
357
  return /*#__PURE__*/React__default.createElement("div", _extends({
@@ -367,7 +376,7 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
367
376
  }, cell.render('Cell')));
368
377
  }));
369
378
  }
370
- }, [prepareRow, rows, activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, selectionAreas, handleRowHeaderClickEvent, handleBodyCellClickEvent, handleBodyCellHoverEvent, defaultColumn, columns]);
379
+ }, [prepareRow, renderRowHeader, renderRowHeaderDirection, rows, hasCustomRowHeader, activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, selectionAreas, handleRowHeaderClickEvent, handleBodyCellClickEvent, handleBodyCellHoverEvent, defaultColumn, columns]);
371
380
  var spreadsheetBodyRef = useRef();
372
381
  return /*#__PURE__*/React__default.createElement("div", _extends({
373
382
  ref: spreadsheetBodyRef,
@@ -433,6 +442,10 @@ DataSpreadsheetBody.propTypes = {
433
442
  */
434
443
  /**@ts-ignore */
435
444
  getTableBodyProps: PropTypes.func,
445
+ /**
446
+ * Check if spreadsheet is using custom row header component attached
447
+ */
448
+ hasCustomRowHeader: PropTypes.bool,
436
449
  /**
437
450
  * Headers provided from useTable hook
438
451
  */
@@ -457,6 +470,14 @@ DataSpreadsheetBody.propTypes = {
457
470
  * Prepare row function from react-table
458
471
  */
459
472
  prepareRow: PropTypes.func,
473
+ /**
474
+ * Component next to numbering rows
475
+ */
476
+ renderRowHeader: PropTypes.func,
477
+ /**
478
+ * Component next to numbering rows
479
+ */
480
+ renderRowHeaderDirection: PropTypes.string,
460
481
  /**
461
482
  * All of the spreadsheet row data
462
483
  */
@@ -497,6 +518,10 @@ DataSpreadsheetBody.propTypes = {
497
518
  * Setter fn for containerHasFocus state value
498
519
  */
499
520
  setContainerHasFocus: PropTypes.func,
521
+ /**
522
+ * Set current columns after drag drop
523
+ */
524
+ setCurrentColumns: PropTypes.func,
500
525
  /**
501
526
  * Setter fn for currentMatcher state value
502
527
  */
@@ -16,6 +16,10 @@ interface DataSpreadsheetHeaderProps {
16
16
  * Specifies the cell height
17
17
  */
18
18
  cellSize?: Size;
19
+ /**
20
+ * Disable column swapping, default false
21
+ */
22
+ disableColumnSwapping?: boolean;
19
23
  /**
20
24
  * All of the spreadsheet columns
21
25
  */
@@ -36,6 +40,10 @@ interface DataSpreadsheetHeaderProps {
36
40
  * Headers provided from useTable hook
37
41
  */
38
42
  headerGroups?: any[];
43
+ /**
44
+ * Read-only table
45
+ */
46
+ readOnlyTable?: boolean;
39
47
  /**
40
48
  * All of the spreadsheet row data
41
49
  */
@@ -36,6 +36,8 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
36
36
  setActiveCellCoordinates = _ref.setActiveCellCoordinates,
37
37
  setCurrentMatcher = _ref.setCurrentMatcher,
38
38
  setSelectionAreas = _ref.setSelectionAreas,
39
+ readOnlyTable = _ref.readOnlyTable,
40
+ disableColumnSwapping = _ref.disableColumnSwapping,
39
41
  setSelectionAreaData = _ref.setSelectionAreaData,
40
42
  rows = _ref.rows,
41
43
  totalVisibleColumns = _ref.totalVisibleColumns,
@@ -175,6 +177,9 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
175
177
  "data-row-index": "header",
176
178
  "data-column-index": "header",
177
179
  type: "button",
180
+ style: {
181
+ width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth
182
+ },
178
183
  tabIndex: -1,
179
184
  "aria-label": selectAllAriaLabel,
180
185
  onClick: handleSelectAllClick,
@@ -191,8 +196,8 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
191
196
  "data-row-index": "header",
192
197
  "data-column-index": index,
193
198
  tabIndex: -1,
194
- onMouseDown: selectedHeader ? handleHeaderMouseDown(index) : undefined,
195
- onMouseUp: selectedHeader && typeof setSelectedHeaderReorderActive === 'function' ? function () {
199
+ onMouseDown: selectedHeader && !readOnlyTable && !disableColumnSwapping ? handleHeaderMouseDown(index) : undefined,
200
+ onMouseUp: selectedHeader && !readOnlyTable && !disableColumnSwapping && typeof setSelectedHeaderReorderActive === 'function' ? function () {
196
201
  return setSelectedHeaderReorderActive(false);
197
202
  } : undefined,
198
203
  onClick: !selectedHeader ? handleColumnHeaderClick(index) : undefined,
@@ -200,7 +205,7 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
200
205
  height: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeight,
201
206
  width: (column === null || column === void 0 ? void 0 : column.width) || (defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.width)
202
207
  },
203
- className: cx("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === index || checkActiveHeaderCell(index, selectionAreas, 'column')), "".concat(blockClass, "__th--selected-header"), selectedHeader), "".concat(blockClass, "__th--selected-header-reorder-active"), selectedHeaderReorderActive)),
208
+ className: cx("".concat(blockClass, "__th"), "".concat(blockClass, "--interactive-cell-element"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__th--active-header"), (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === index || checkActiveHeaderCell(index, selectionAreas, 'column')), "".concat(blockClass, "__th--active-header-disabledSwapping"), disableColumnSwapping || readOnlyTable), "".concat(blockClass, "__th--selected-header"), selectedHeader), "".concat(blockClass, "__th--selected-header-reorder-active"), selectedHeaderReorderActive)),
204
209
  type: "button"
205
210
  }, column.render('Header')));
206
211
  }));
@@ -236,6 +241,10 @@ DataSpreadsheetHeader.propTypes = {
236
241
  rowHeaderWidth: PropTypes.number,
237
242
  width: PropTypes.number
238
243
  }),
244
+ /**
245
+ * Disable column swapping, default false
246
+ */
247
+ disableColumnSwapping: PropTypes.bool,
239
248
  /**
240
249
  * Whether or not a click/hold is active on a header cell
241
250
  */
@@ -244,6 +253,10 @@ DataSpreadsheetHeader.propTypes = {
244
253
  * Headers provided from useTable hook
245
254
  */
246
255
  headerGroups: PropTypes.arrayOf(PropTypes.object),
256
+ /**
257
+ * Read-only table
258
+ */
259
+ readOnlyTable: PropTypes.bool,
247
260
  /**
248
261
  * All of the spreadsheet row data
249
262
  */
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
1
7
  export type Size = 'xs' | 'sm' | 'md' | 'lg';
2
8
  export type Theme = 'light' | 'dark';
3
9
  export interface SpreadsheetColumn {
@@ -15,6 +21,7 @@ export interface PrevState {
15
21
  isEditing?: boolean;
16
22
  selectionAreaData?: any[];
17
23
  clickAndHoldActive?: boolean;
24
+ selectedHeaderReorderActive?: boolean;
18
25
  rowHeight?: number;
19
26
  cellSize?: Size;
20
27
  }
@@ -16,10 +16,6 @@ export interface DatagridProps {
16
16
  * The data grid state, much of it being supplied by the useDatagrid hook
17
17
  */
18
18
  datagridState: DataGridState;
19
- /**
20
- * Table title
21
- */
22
- title?: string;
23
19
  }
24
20
  /**
25
21
  * The `Datagrid` component is an extension of Carbon's DataTable component. At the most basic level, the `Datagrid` component takes in columns and rows and renders a data table. There is a set of data table extensions which this component provides support for, these can be found [here](https://pages.github.ibm.com/cdai-design/pal/components/data-table/overview/). This component is data driven and allows you to choose what pieces will be included based on the hooks/plugins that are provided.
@@ -16,7 +16,7 @@ import { DatagridContent } from './DatagridContent.js';
16
16
  import { FilterProvider } from './addons/Filtering/FilterProvider.js';
17
17
  import { InlineEditProvider } from './addons/InlineEdit/InlineEditContext/InlineEditContext.js';
18
18
 
19
- var _excluded = ["datagridState", "title", "ariaToolbarLabel"];
19
+ var _excluded = ["datagridState", "ariaToolbarLabel"];
20
20
  var blockClass = "".concat(pkg.prefix, "--datagrid");
21
21
  var componentName = 'Datagrid';
22
22
  /**
@@ -24,7 +24,6 @@ var componentName = 'Datagrid';
24
24
  */
25
25
  var Datagrid = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
26
26
  var datagridState = _ref.datagridState,
27
- title = _ref.title,
28
27
  ariaToolbarLabel = _ref.ariaToolbarLabel,
29
28
  rest = _objectWithoutProperties(_ref, _excluded);
30
29
  if (!datagridState) {
@@ -40,13 +39,13 @@ var Datagrid = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
40
39
  state = datagridState.state;
41
40
  var rows = DatagridPagination && datagridState.page || datagridState.rows;
42
41
  var props = {
43
- title: title,
44
42
  datagridState: datagridState,
45
43
  ariaToolbarLabel: ariaToolbarLabel
46
44
  };
47
45
  return /*#__PURE__*/React__default.createElement(FilterProvider, {
48
46
  filters: state === null || state === void 0 ? void 0 : state.filters,
49
- filterProps: filterProps
47
+ filterProps: filterProps,
48
+ tableId: tableId
50
49
  }, /*#__PURE__*/React__default.createElement(InlineEditProvider, null, /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
51
50
  id: tableId,
52
51
  ref: ref,
@@ -72,11 +71,7 @@ Datagrid.propTypes = {
72
71
  * The data grid state, much of it being supplied by the useDatagrid hook
73
72
  */
74
73
  /**@ts-ignore */
75
- datagridState: PropTypes.object.isRequired,
76
- /**
77
- * Table title
78
- */
79
- title: PropTypes.string
74
+ datagridState: PropTypes.object.isRequired
80
75
  };
81
76
 
82
77
  export { Datagrid };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
1
7
  import { DataGridState } from '../types';
2
8
  declare const DatagridBody: (datagridState: DataGridState) => import("react/jsx-runtime").JSX.Element;
3
9
  export default DatagridBody;