@carbon/ibm-products 2.33.0 → 2.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (262) hide show
  1. package/css/index-full-carbon.css +31990 -32061
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +38 -17
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +636 -24096
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +2342 -17830
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/ActionSet/ActionSet.d.ts +38 -2
  18. package/es/components/ActionSet/ActionSet.js +3 -5
  19. package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  20. package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  21. package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
  22. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  23. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
  24. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  25. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
  26. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  27. package/es/components/ConditionBuilder/index.d.ts +1 -0
  28. package/es/components/CreateFullPage/CreateFullPage.js +3 -19
  29. package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
  30. package/es/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  31. package/es/components/CreateSidePanel/CreateSidePanel.js +5 -2
  32. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  33. package/es/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  34. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  35. package/es/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  36. package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +304 -0
  37. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  38. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  39. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  40. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  41. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -2
  42. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  43. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  44. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  45. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  46. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  47. package/es/components/Datagrid/useEditableCell.js +15 -0
  48. package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
  49. package/es/components/DelimitedList/DelimitedList.js +0 -1
  50. package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
  51. package/es/components/EditInPlace/EditInPlace.js +10 -6
  52. package/es/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  53. package/es/components/EditSidePanel/EditSidePanel.js +8 -10
  54. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  55. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  56. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  57. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  58. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  59. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  60. package/es/components/ExportModal/ExportModal.d.ts +110 -2
  61. package/es/components/ExportModal/ExportModal.js +10 -4
  62. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  63. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +83 -0
  64. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  65. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +94 -0
  66. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  67. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
  68. package/es/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  69. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  70. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +157 -0
  71. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  72. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +72 -0
  73. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  74. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  75. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
  76. package/es/components/FilterPanel/index.d.ts +5 -0
  77. package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  78. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  79. package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  80. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  81. package/es/components/ImportModal/ImportModal.d.ts +136 -2
  82. package/es/components/ImportModal/ImportModal.js +3 -2
  83. package/es/components/InlineTip/InlineTip.d.ts +90 -2
  84. package/es/components/InlineTip/InlineTip.js +3 -2
  85. package/es/components/Nav/Nav.js +1 -1
  86. package/es/components/Nav/NavList.js +7 -7
  87. package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
  88. package/es/components/OptionsTile/OptionsTile.d.ts +77 -3
  89. package/es/components/OptionsTile/OptionsTile.js +9 -20
  90. package/es/components/PageHeader/PageHeader.js +3 -3
  91. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  92. package/es/components/PageHeader/PageHeaderUtils.js +4 -3
  93. package/es/components/RemoveModal/RemoveModal.d.ts +81 -7
  94. package/es/components/RemoveModal/RemoveModal.js +1 -0
  95. package/es/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  96. package/es/components/ScrollGradient/ScrollGradient.js +156 -0
  97. package/es/components/ScrollGradient/constants.d.ts +15 -0
  98. package/es/components/ScrollGradient/constants.js +121 -0
  99. package/es/components/ScrollGradient/index.d.ts +1 -0
  100. package/es/components/SidePanel/SidePanel.d.ts +144 -2
  101. package/es/components/SidePanel/SidePanel.js +100 -75
  102. package/es/components/StatusIcon/StatusIcon.d.ts +34 -2
  103. package/es/components/StatusIcon/StatusIcon.js +97 -95
  104. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  105. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  106. package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
  107. package/es/components/TagOverflow/TagOverflow.js +209 -0
  108. package/es/components/TagOverflow/constants.d.ts +14 -0
  109. package/es/components/TagOverflow/constants.js +30 -0
  110. package/es/components/TagOverflow/index.d.ts +1 -0
  111. package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  112. package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
  113. package/es/components/Toolbar/Toolbar.d.ts +23 -5
  114. package/es/components/Toolbar/Toolbar.js +30 -26
  115. package/es/components/TruncatedList/TruncatedList.js +5 -3
  116. package/es/components/UserAvatar/UserAvatar.js +7 -4
  117. package/es/components/index.d.ts +5 -2
  118. package/es/global/js/package-settings.d.ts +8 -0
  119. package/es/global/js/package-settings.js +8 -0
  120. package/es/index.js +9 -0
  121. package/es/settings.d.ts +8 -0
  122. package/lib/components/ActionSet/ActionSet.d.ts +38 -2
  123. package/lib/components/ActionSet/ActionSet.js +3 -5
  124. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  125. package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  126. package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
  127. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  128. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
  129. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  130. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
  131. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  132. package/lib/components/ConditionBuilder/index.d.ts +1 -0
  133. package/lib/components/CreateFullPage/CreateFullPage.js +2 -18
  134. package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
  135. package/lib/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  136. package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -2
  137. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  138. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  139. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  140. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  141. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +311 -0
  142. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  143. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  144. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  145. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  146. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  147. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  148. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  149. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  150. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  151. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  152. package/lib/components/Datagrid/useEditableCell.js +19 -0
  153. package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
  154. package/lib/components/DelimitedList/DelimitedList.js +0 -1
  155. package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
  156. package/lib/components/EditInPlace/EditInPlace.js +10 -6
  157. package/lib/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  158. package/lib/components/EditSidePanel/EditSidePanel.js +8 -10
  159. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  160. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  161. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  162. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  163. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  164. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  165. package/lib/components/ExportModal/ExportModal.d.ts +110 -2
  166. package/lib/components/ExportModal/ExportModal.js +10 -4
  167. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  168. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +90 -0
  169. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  170. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +101 -0
  171. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  172. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
  173. package/lib/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  174. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  175. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +164 -0
  176. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  177. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +79 -0
  178. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  179. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  180. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
  181. package/lib/components/FilterPanel/index.d.ts +5 -0
  182. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  183. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  184. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  185. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  186. package/lib/components/ImportModal/ImportModal.d.ts +136 -2
  187. package/lib/components/ImportModal/ImportModal.js +3 -2
  188. package/lib/components/InlineTip/InlineTip.d.ts +90 -2
  189. package/lib/components/InlineTip/InlineTip.js +3 -2
  190. package/lib/components/Nav/Nav.js +1 -1
  191. package/lib/components/Nav/NavList.js +7 -7
  192. package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
  193. package/lib/components/OptionsTile/OptionsTile.d.ts +77 -3
  194. package/lib/components/OptionsTile/OptionsTile.js +9 -20
  195. package/lib/components/PageHeader/PageHeader.js +3 -3
  196. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  197. package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
  198. package/lib/components/RemoveModal/RemoveModal.d.ts +81 -7
  199. package/lib/components/RemoveModal/RemoveModal.js +1 -0
  200. package/lib/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  201. package/lib/components/ScrollGradient/ScrollGradient.js +163 -0
  202. package/lib/components/ScrollGradient/constants.d.ts +15 -0
  203. package/lib/components/ScrollGradient/constants.js +128 -0
  204. package/lib/components/ScrollGradient/index.d.ts +1 -0
  205. package/lib/components/SidePanel/SidePanel.d.ts +144 -2
  206. package/lib/components/SidePanel/SidePanel.js +100 -75
  207. package/lib/components/StatusIcon/StatusIcon.d.ts +34 -2
  208. package/lib/components/StatusIcon/StatusIcon.js +97 -95
  209. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  210. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  211. package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
  212. package/lib/components/TagOverflow/TagOverflow.js +216 -0
  213. package/lib/components/TagOverflow/constants.d.ts +14 -0
  214. package/lib/components/TagOverflow/constants.js +34 -0
  215. package/lib/components/TagOverflow/index.d.ts +1 -0
  216. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  217. package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
  218. package/lib/components/Toolbar/Toolbar.d.ts +23 -5
  219. package/lib/components/Toolbar/Toolbar.js +30 -26
  220. package/lib/components/TruncatedList/TruncatedList.js +5 -3
  221. package/lib/components/UserAvatar/UserAvatar.js +7 -4
  222. package/lib/components/index.d.ts +5 -2
  223. package/lib/global/js/package-settings.d.ts +8 -0
  224. package/lib/global/js/package-settings.js +8 -0
  225. package/lib/index.js +42 -0
  226. package/lib/settings.d.ts +8 -0
  227. package/package.json +3 -3
  228. package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
  229. package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
  230. package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
  231. package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
  232. package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
  233. package/scss/components/ConditionBuilder/_index.scss +8 -0
  234. package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
  235. package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
  236. package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
  237. package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +54 -0
  238. package/scss/components/FilterPanel/_filter-panel-accordion.scss +6 -0
  239. package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +60 -0
  240. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +24 -3
  241. package/scss/components/FilterPanel/_filter-panel-group.scss +39 -0
  242. package/scss/components/FilterPanel/_filter-panel-label.scss +0 -8
  243. package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
  244. package/scss/components/FilterPanel/_filter-panel.scss +2 -0
  245. package/scss/components/FilterPanel/_index-with-carbon.scss +5 -0
  246. package/scss/components/FilterPanel/_index.scss +5 -0
  247. package/scss/components/Guidebanner/_guidebanner.scss +1 -1
  248. package/scss/components/InlineTip/_inline-tip.scss +1 -1
  249. package/scss/components/ProductiveCard/_productive-card.scss +13 -0
  250. package/scss/components/ScrollGradient/_carbon-imports.scss +9 -0
  251. package/scss/components/ScrollGradient/_index-with-carbon.scss +9 -0
  252. package/scss/components/ScrollGradient/_index.scss +8 -0
  253. package/scss/components/ScrollGradient/_scroll-gradient.scss +102 -0
  254. package/scss/components/SidePanel/_side-panel.scss +9 -9
  255. package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
  256. package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
  257. package/scss/components/TagOverflow/_index.scss +8 -0
  258. package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
  259. package/scss/components/Tearsheet/_tearsheet.scss +10 -0
  260. package/scss/components/UserAvatar/_user-avatar.scss +38 -4
  261. package/scss/components/_index-with-carbon.scss +3 -0
  262. package/scss/components/_index.scss +3 -0
@@ -1,5 +1,84 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 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
+ */
7
+ import React, { ReactNode } from 'react';
8
+ interface CreateSidePanelProps {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * The description of the CreateSidePanel serves to provide more information about the form within the panel.
15
+ */
16
+ description?: ReactNode;
17
+ /**
18
+ * Specifies a boolean for disabling or enabling the primary button. This is important for form validation
19
+ * Returning `true` prevents the primary button from being clicked until required fields are completed.
20
+ */
21
+ disableSubmit?: boolean;
22
+ /**
23
+ * Specifies an optional field that provides a additional context for a form
24
+ */
25
+ formDescription?: ReactNode;
26
+ /**
27
+ * Specifies a required field that provides a title for a form
28
+ */
29
+ formTitle: ReactNode;
30
+ /**
31
+ * Unique identifier
32
+ */
33
+ id?: string;
34
+ /**
35
+ * Specifies an optional handler which is called when the CreateSidePanel
36
+ * is closed.
37
+ */
38
+ onRequestClose?(): void;
39
+ /**
40
+ * Specifies an optional handler which is called when the CreateSidePanel
41
+ * primary button is pressed.
42
+ */
43
+ onRequestSubmit?(): void;
44
+ /**
45
+ * Specifies whether the CreateSidePanel is open or not.
46
+ */
47
+ open: boolean;
48
+ /**
49
+ * Specifies the primary button's text in the modal.
50
+ */
51
+ primaryButtonText: string;
52
+ /**
53
+ * Specifies the secondary button's text in the modal.
54
+ */
55
+ secondaryButtonText: string;
56
+ /**
57
+ * This is the selector to the element that contains all of the page content that will shrink when the panel is a slide in.
58
+ * This prop is required since create flows use the `slideIn` variant of the side panel.
59
+ */
60
+ selectorPageContent: string;
61
+ /**
62
+ * Specifies which DOM element in the form should be focused.
63
+ */
64
+ selectorPrimaryFocus: string;
65
+ /**
66
+ * **Experimental:** Provide a `Slug` component to be rendered inside the `SidePanel` component
67
+ */
68
+ slug?: ReactNode;
69
+ /**
70
+ * The subtitle of the CreateSidePanel is optional and serves to provide more information about the modal.
71
+ */
72
+ subtitle?: ReactNode;
73
+ /**
74
+ * The title of the CreateSidePanel is usually the product or service name.
75
+ */
76
+ title: string;
77
+ }
1
78
  /**
2
79
  * Use with medium complexity creations if the user needs page context. On-page content can be seen and interacted with.
3
80
  */
4
- export let CreateSidePanel: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
81
+ export declare let CreateSidePanel: React.ForwardRefExoticComponent<CreateSidePanelProps & {
82
+ children?: React.ReactNode;
83
+ } & React.RefAttributes<HTMLDivElement>>;
84
+ export {};
@@ -47,7 +47,7 @@ var CreateSidePanel = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
47
47
  label: primaryButtonText,
48
48
  onClick: function onClick(event) {
49
49
  event.preventDefault();
50
- onRequestSubmit();
50
+ onRequestSubmit === null || onRequestSubmit === void 0 || onRequestSubmit();
51
51
  },
52
52
  kind: 'primary',
53
53
  disabled: disableSubmit,
@@ -90,6 +90,7 @@ CreateSidePanel.propTypes = {
90
90
  /**
91
91
  * Sets the body content of the create side panel
92
92
  */
93
+ /**@ts-ignore*/
93
94
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
94
95
  /**
95
96
  * Provide an optional class to be applied to the containing node.
@@ -129,6 +130,7 @@ CreateSidePanel.propTypes = {
129
130
  /**
130
131
  * Specifies whether the CreateSidePanel is open or not.
131
132
  */
133
+ /**@ts-ignore*/
132
134
  open: PropTypes.bool,
133
135
  /**
134
136
  * Specifies the primary button's text in the modal.
@@ -146,6 +148,7 @@ CreateSidePanel.propTypes = {
146
148
  /**
147
149
  * Specifies which DOM element in the form should be focused.
148
150
  */
151
+ /**@ts-ignore*/
149
152
  selectorPrimaryFocus: PropTypes.node.isRequired,
150
153
  /**
151
154
  * **Experimental:** Provide a `Slug` component to be rendered inside the `SidePanel` component
@@ -158,7 +161,7 @@ CreateSidePanel.propTypes = {
158
161
  /**
159
162
  * The title of the CreateSidePanel is usually the product or service name.
160
163
  */
161
- title: PropTypes.node.isRequired
164
+ title: PropTypes.string.isRequired
162
165
  };
163
166
 
164
167
  export { CreateSidePanel };
@@ -1,6 +1,86 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2021
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
+ */
7
+ import React, { PropsWithChildren, ReactNode } from 'react';
8
+ type VerticalPosition = 'normal' | 'lower';
9
+ interface CreateTearsheetNarrowProps extends PropsWithChildren {
10
+ /**
11
+ * Provide the contents of the CreateTearsheetNarrow.
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * A description of the flow, displayed in the header area of the tearsheet.
20
+ */
21
+ description?: ReactNode;
22
+ /**
23
+ * Specifies a boolean for disabling or enabling the primary button. This is important for form validation
24
+ * Returning `true` prevents the primary button from being clicked until required fields are completed.
25
+ */
26
+ disableSubmit?: boolean;
27
+ /**
28
+ * Specifies an optional field that provides a additional context for a form
29
+ */
30
+ formDescription?: ReactNode;
31
+ /**
32
+ * Specifies a field that provides a title for a form
33
+ */
34
+ formTitle?: ReactNode;
35
+ /**
36
+ * A label for the tearsheet, displayed in the header area of the tearsheet
37
+ * to maintain context for the tearsheet (e.g. as the title changes from page
38
+ * to page of a multi-page task).
39
+ */
40
+ label?: ReactNode;
41
+ /**
42
+ * An optional handler that is called when the user closes the tearsheet (by
43
+ * clicking the close button, if enabled, or clicking outside, if enabled).
44
+ * Returning `false` here prevents the modal from closing.
45
+ */
46
+ onRequestClose?: () => void;
47
+ /**
48
+ * Specifies an optional handler which is called when the CreateTearsheetNarrow
49
+ * primary button is pressed.
50
+ */
51
+ onRequestSubmit?: () => void;
52
+ /**
53
+ * Specifies whether the tearsheet is currently open.
54
+ */
55
+ open?: boolean;
56
+ /**
57
+ * Specifies the primary button's text in the CreateTearsheetNarrow.
58
+ */
59
+ primaryButtonText: string;
60
+ /**
61
+ * Specifies the secondary button's text in the CreateTearsheetNarrow.
62
+ */
63
+ secondaryButtonText: string;
64
+ /**
65
+ * Specifies which DOM element in the form should be focused.
66
+ */
67
+ selectorPrimaryFocus?: ReactNode;
68
+ /**
69
+ * The main title of the tearsheet, displayed in the header area.
70
+ */
71
+ title?: ReactNode;
72
+ /**
73
+ * The position of the top of tearsheet in the viewport. The 'normal'
74
+ * position (the default) is a short distance down from the top of the
75
+ * viewport, leaving room at the top for a global header bar to show through
76
+ * from below. The 'lower' position provides a little extra room at the top
77
+ * to allow an action bar navigation or breadcrumbs to also show through.
78
+ */
79
+ verticalPosition?: VerticalPosition;
80
+ }
1
81
  /**
2
82
  * Use a narrow tearsheet as an alternative to a modal when there is scrolling.
3
83
  * Use when the form fields can be broken down into sections using section headers.
4
84
  */
5
- export let CreateTearsheetNarrow: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
6
- import React from 'react';
85
+ export declare let CreateTearsheetNarrow: React.ForwardRefExoticComponent<CreateTearsheetNarrowProps & React.RefAttributes<unknown>>;
86
+ export {};
@@ -19,14 +19,11 @@ import uuidv4 from '../../global/js/utils/uuidv4.js';
19
19
  import { deepCloneObject } from '../../global/js/utils/deepCloneObject.js';
20
20
  import { createActiveCellFn } from './utils/createActiveCellFn.js';
21
21
  import { getCellSize } from './utils/getCellSize.js';
22
- import { includesShift, handleMultipleKeys, includesResourceKey } from './utils/handleMultipleKeys.js';
23
22
  import { handleHeaderCellSelection } from './utils/handleHeaderCellSelection.js';
24
23
  import { removeCellSelections } from './utils/removeCellSelections.js';
25
24
  import { selectAllCells } from './utils/selectAllCells.js';
26
25
  import { handleEditSubmit } from './utils/handleEditSubmit.js';
27
- import { handleActiveCellInSelectionEnter } from './utils/handleActiveCellInSelectionEnter.js';
28
- import { handleActiveCellInSelectionTab } from './utils/handleActiveCellInSelectionTab.js';
29
- import { handleCellDeletion } from './utils/handleCellDeletion.js';
26
+ import { handleKeyPress } from './utils/commonEventHandlers.js';
30
27
  import { useActiveElement } from '../../global/js/hooks/useActiveElement.js';
31
28
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
32
29
  import { useMultipleKeyTracking } from './hooks/useMultipleKeyTracking.js';
@@ -36,7 +33,6 @@ import { useMoveActiveCell } from './hooks/useMoveActiveCell.js';
36
33
  import { useSpreadsheetEdit } from './hooks/useSpreadsheetEdit.js';
37
34
 
38
35
  var _excluded = ["cellSize", "className", "columns", "data", "defaultEmptyRowCount", "onDataUpdate", "id", "onActiveCellChange", "onSelectionAreaChange", "selectAllAriaLabel", "spreadsheetAriaLabel", "theme", "totalVisibleColumns"];
39
- // cspell:words rowcount colcount
40
36
 
41
37
  // The block part of our conventional BEM class names (blockClass__E--M).
42
38
  var blockClass = "".concat(pkg.prefix, "--data-spreadsheet");
@@ -404,117 +400,8 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
404
400
  });
405
401
  }
406
402
  }, [handleInitialArrowPress, updateActiveCellCoordinates, activeCellCoordinates, columns, rows]);
407
- var handleKeyPress = useCallback(function (event) {
408
- var key = event.key;
409
- // Command keys need to be returned as there is default browser behavior with these keys
410
- // Needs to be returned in editing mode
411
- if (checkForReturnCondition(key)) {
412
- return;
413
- }
414
-
415
- // Clear out all cell selection areas if user uses any arrow key, except if the shift key is being held
416
- if (['ArrowLeft', 'ArrowUp', 'ArrowRight', 'ArrowDown'].indexOf(key) > -1) {
417
- if (selectionAreas !== null && selectionAreas !== void 0 && selectionAreas.length && keysPressedList.length < 2 && !includesShift(keysPressedList)) {
418
- setSelectionAreas([]);
419
- setSelectionAreaData([]);
420
- removeCellSelections({
421
- spreadsheetRef: spreadsheetRef
422
- });
423
- }
424
- }
425
- if ((keysPressedList === null || keysPressedList === void 0 ? void 0 : keysPressedList.length) > 1) {
426
- handleMultipleKeys({
427
- activeCellCoordinates: activeCellCoordinates,
428
- event: event,
429
- keysPressedList: keysPressedList,
430
- selectionAreas: selectionAreas,
431
- currentMatcher: currentMatcher,
432
- rows: rows,
433
- setSelectionAreas: setSelectionAreas,
434
- columns: columns,
435
- updateActiveCellCoordinates: updateActiveCellCoordinates,
436
- spreadsheetRef: spreadsheetRef,
437
- removeCellSelections: removeCellSelections,
438
- blockClass: blockClass,
439
- setCurrentMatcher: setCurrentMatcher,
440
- usingMac: usingMac
441
- });
442
- }
443
-
444
- // Allow arrow key navigation if there are less than two activeKeys OR
445
- // if one of the activeCellCoordinates is in a header position
446
- // Prevent arrow keys, home key, and end key from scrolling the page when the data spreadsheet container has focus
447
-
448
- if (keysPressedList.length < 2 && !includesShift(keysPressedList) || activeCellCoordinates.row === 'header' || activeCellCoordinates.column === 'header') {
449
- switch (key) {
450
- case 'Backspace':
451
- case 'Delete':
452
- {
453
- var deleteParams = {
454
- selectionAreas: selectionAreas,
455
- currentMatcher: currentMatcher,
456
- rows: rows,
457
- setActiveCellContent: setActiveCellContent,
458
- updateData: updateData,
459
- activeCellCoordinates: activeCellCoordinates
460
- };
461
- handleCellDeletion(deleteParams);
462
- break;
463
- }
464
- // Enter
465
- case 'Enter':
466
- {
467
- handleActiveCellInSelectionEnter({
468
- activeCellInsideSelectionArea: activeCellInsideSelectionArea,
469
- activeCellCoordinates: activeCellCoordinates,
470
- activeCellRef: activeCellRef,
471
- selectionAreas: selectionAreas,
472
- updateActiveCellCoordinates: updateActiveCellCoordinates
473
- });
474
- break;
475
- }
476
- // HOME
477
- case 'Home':
478
- case 'End':
479
- {
480
- event.preventDefault();
481
- if (includesResourceKey(keysPressedList, usingMac)) {
482
- return;
483
- }
484
- handleHomeEndKey({
485
- type: key
486
- });
487
- break;
488
- }
489
- // Tab
490
- case 'Tab':
491
- {
492
- if (activeCellInsideSelectionArea) {
493
- event.preventDefault();
494
- return handleActiveCellInSelectionTab({
495
- activeCellInsideSelectionArea: activeCellInsideSelectionArea,
496
- activeCellCoordinates: activeCellCoordinates,
497
- activeCellRef: activeCellRef,
498
- selectionAreas: selectionAreas,
499
- updateActiveCellCoordinates: updateActiveCellCoordinates
500
- });
501
- }
502
- setSelectionAreas([]);
503
- removeActiveCell();
504
- removeCellEditor();
505
- setContainerHasFocus(false);
506
- setActiveCellCoordinates(null);
507
- break;
508
- }
509
- case 'ArrowLeft':
510
- case 'ArrowUp':
511
- case 'ArrowRight':
512
- case 'ArrowDown':
513
- {
514
- handleArrowKeyPress(key);
515
- }
516
- }
517
- }
403
+ var handleKeyPressEvent = useCallback(function (event) {
404
+ 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);
518
405
  }, [activeCellInsideSelectionArea, updateActiveCellCoordinates, activeCellCoordinates, removeActiveCell, columns, rows, spreadsheetRef, currentMatcher, removeCellEditor, selectionAreas, handleHomeEndKey, keysPressedList, usingMac, updateData, checkForReturnCondition, handleArrowKeyPress]);
519
406
  var startEditMode = function startEditMode() {
520
407
  setIsEditing(true);
@@ -678,6 +565,7 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
678
565
  var handleActiveCellMouseEnter = useCallback(function () {
679
566
  handleActiveCellMouseEnterCallback(selectionAreas, clickAndHoldActive);
680
567
  }, [clickAndHoldActive, selectionAreas, handleActiveCellMouseEnterCallback]);
568
+ // cspell:words rowcount colcount
681
569
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, getTableProps(), getDevtoolsProps(componentName), {
682
570
  className: cx(blockClass, className, "".concat(blockClass, "--interactive-cell-element"), _defineProperty(_defineProperty({}, "".concat(blockClass, "__container-has-focus"), containerHasFocus), "".concat(blockClass, "__").concat(theme), theme === 'dark')),
683
571
  ref: spreadsheetRef,
@@ -686,7 +574,7 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
686
574
  "aria-rowcount": (rows === null || rows === void 0 ? void 0 : rows.length) || 0,
687
575
  "aria-colcount": (columns === null || columns === void 0 ? void 0 : columns.length) || 0,
688
576
  "aria-label": spreadsheetAriaLabel,
689
- onKeyDown: handleKeyPress,
577
+ onKeyDown: handleKeyPressEvent,
690
578
  onFocus: function onFocus() {
691
579
  return setContainerHasFocus(true);
692
580
  }
@@ -13,14 +13,12 @@ import cx from 'classnames';
13
13
  import { px } from '@carbon/layout';
14
14
  import { pkg } from '../../settings.js';
15
15
  import { deepCloneObject } from '../../global/js/utils/deepCloneObject.js';
16
- import uuidv4 from '../../global/js/utils/uuidv4.js';
17
16
  import { removeCellSelections } from './utils/removeCellSelections.js';
18
17
  import { createCellSelectionArea } from './utils/createCellSelectionArea.js';
19
18
  import { checkActiveHeaderCell } from './utils/checkActiveHeaderCell.js';
20
19
  import { checkSelectedHeaderCell } from './utils/checkSelectedHeaderCell.js';
21
- import { handleHeaderCellSelection } from './utils/handleHeaderCellSelection.js';
22
20
  import { getSpreadsheetWidth } from './utils/getSpreadsheetWidth.js';
23
- import { checkForHoldingKey } from './utils/checkForHoldingKey.js';
21
+ import { handleBodyCellClick, handleBodyCellHover, handleRowHeaderClick } from './utils/commonEventHandlers.js';
24
22
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
25
23
  import { useSpreadsheetMouseUp } from './hooks/useSpreadsheetMouseUp.js';
26
24
 
@@ -241,71 +239,10 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
241
239
 
242
240
  // onClick fn for each cell in the data spreadsheet body,
243
241
  // adds the active cell highlight
244
- var handleBodyCellClick = useCallback(function (cell, columnIndex) {
245
- return function (event) {
246
- event.preventDefault();
247
- var closestBodyCell = event.target.closest(".".concat(blockClass, "__body--td"));
248
- var isValidSelectionAreaStart = closestBodyCell.classList.contains("".concat(blockClass, "__body--td"));
249
- setValidStartingPoint(isValidSelectionAreaStart);
250
- var isHoldingCommandKey = checkForHoldingKey(event, 'cmd');
251
- var isHoldingShiftKey = checkForHoldingKey(event, 'shiftKey');
252
- setContainerHasFocus(true);
253
- var activeCoordinates = {
254
- row: cell.row.index,
255
- column: columnIndex
256
- };
257
- var tempMatcher = uuidv4();
258
- setClickAndHoldActive(true);
259
242
 
260
- // prevent multiple selections unless cmd key is held
261
- // meaning that selectionAreas should only have one item by default
262
- if (isHoldingCommandKey) {
263
- var activeCellElement = ref.current.querySelector(".".concat(blockClass, "__active-cell--highlight"));
264
- activeCellElement.setAttribute('data-selection-id', tempMatcher);
265
- setActiveCellInsideSelectionArea(true);
266
- setActiveCellCoordinates(activeCoordinates);
267
- setCurrentMatcher(tempMatcher);
268
- setSelectionAreas(function (prev) {
269
- return [].concat(_toConsumableArray(prev), [{
270
- point1: activeCoordinates,
271
- matcher: tempMatcher
272
- }]);
273
- });
274
- } else if (isHoldingShiftKey) {
275
- setContainerHasFocus(true);
276
- var selectionAreaClone = deepCloneObject(selectionAreas);
277
- var indexOfItemToUpdate = selectionAreaClone.findIndex(function (item) {
278
- return item.matcher === currentMatcher;
279
- });
280
- if (indexOfItemToUpdate === -1) {
281
- // There is always a selectionArea with a point1 object that updates
282
- // whenever the activeCellCoordinates update, we should always be able
283
- // to find an index, but if we do not for some reason we should return
284
- // at this point.
285
- return;
286
- } else {
287
- // Update the selectionArea that was found, do not update currentMatcher
288
- selectionAreaClone[indexOfItemToUpdate].point1 = activeCellCoordinates;
289
- selectionAreaClone[indexOfItemToUpdate].point2 = activeCoordinates;
290
- selectionAreaClone[indexOfItemToUpdate].areaCreated = false;
291
- selectionAreaClone[indexOfItemToUpdate].matcher = currentMatcher;
292
- setSelectionAreas(selectionAreaClone);
293
- }
294
- } else {
295
- activeCellRef.current.style.display = 'none';
296
- setActiveCellInsideSelectionArea(false);
297
- setActiveCellCoordinates(activeCoordinates);
298
- // remove all previous cell selections
299
- removeCellSelections({
300
- spreadsheetRef: ref
301
- });
302
- setSelectionAreas([{
303
- point1: activeCoordinates,
304
- matcher: tempMatcher
305
- }]);
306
- setCurrentMatcher(tempMatcher);
307
- setSelectionAreaData([]);
308
- }
243
+ var handleBodyCellClickEvent = useCallback(function (cell, columnIndex) {
244
+ return function (event) {
245
+ handleBodyCellClick(cell, columnIndex, event, currentMatcher, activeCellCoordinates, selectionAreas, setActiveCellCoordinates, setSelectionAreas, setContainerHasFocus, setClickAndHoldActive, setCurrentMatcher, ref, setSelectionAreaData, setActiveCellInsideSelectionArea, activeCellRef, setValidStartingPoint);
309
246
  };
310
247
  }, [currentMatcher, activeCellCoordinates, selectionAreas, setActiveCellCoordinates, setSelectionAreas, setContainerHasFocus, setClickAndHoldActive, setCurrentMatcher, ref, setSelectionAreaData, setActiveCellInsideSelectionArea, activeCellRef]);
311
248
  var handleBodyScroll = function handleBodyScroll() {
@@ -321,50 +258,14 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
321
258
  contentScrollElementRef.removeEventListener('scroll', handleBodyScroll);
322
259
  };
323
260
  });
324
- var handleBodyCellHover = useCallback(function (cell, columnIndex) {
261
+ var handleBodyCellHoverEvent = useCallback(function (cell, columnIndex) {
325
262
  return function () {
326
- if (clickAndHoldActive) {
327
- var cellCoordinates = {
328
- row: cell.row.index,
329
- column: columnIndex
330
- };
331
- setSelectionAreas(function (prev) {
332
- var _selectionAreaClone$i, _selectionAreaClone$i2;
333
- var selectionAreaClone = deepCloneObject(prev);
334
- var indexOfItemToUpdate = selectionAreaClone.findIndex(function (item) {
335
- return item.matcher === currentMatcher;
336
- });
337
- // No items in the array match up with the currentMatcher value
338
- if (indexOfItemToUpdate === -1) {
339
- return prev;
340
- }
341
- // Do not update state if you're still hovering on the same cell
342
- if (((_selectionAreaClone$i = selectionAreaClone[indexOfItemToUpdate].point2) === null || _selectionAreaClone$i === void 0 ? void 0 : _selectionAreaClone$i.row) === cellCoordinates.row && ((_selectionAreaClone$i2 = selectionAreaClone[indexOfItemToUpdate].point2) === null || _selectionAreaClone$i2 === void 0 ? void 0 : _selectionAreaClone$i2.column) === cellCoordinates.column) {
343
- return prev;
344
- }
345
- selectionAreaClone[indexOfItemToUpdate].point2 = cellCoordinates;
346
- selectionAreaClone[indexOfItemToUpdate].areaCreated = false;
347
- return selectionAreaClone;
348
- });
349
- }
263
+ handleBodyCellHover(cell, columnIndex, clickAndHoldActive, currentMatcher, setSelectionAreas);
350
264
  };
351
265
  }, [clickAndHoldActive, currentMatcher, setSelectionAreas]);
352
- var handleRowHeaderClick = useCallback(function (index) {
266
+ var handleRowHeaderClickEvent = useCallback(function (index) {
353
267
  return function (event) {
354
- var isHoldingCommandKey = checkForHoldingKey(event, 'cmd');
355
- handleHeaderCellSelection({
356
- type: 'row',
357
- activeCellCoordinates: activeCellCoordinates,
358
- rows: rows,
359
- columns: columns,
360
- setActiveCellCoordinates: setActiveCellCoordinates,
361
- setCurrentMatcher: setCurrentMatcher,
362
- setSelectionAreas: setSelectionAreas,
363
- spreadsheetRef: ref,
364
- index: index,
365
- setSelectionAreaData: setSelectionAreaData,
366
- isHoldingCommandKey: isHoldingCommandKey
367
- });
268
+ handleRowHeaderClick(index, event, columns, ref, setSelectionAreas, setCurrentMatcher, setActiveCellCoordinates, activeCellCoordinates, rows, setSelectionAreaData);
368
269
  };
369
270
  }, [columns, ref, setSelectionAreas, setCurrentMatcher, setActiveCellCoordinates, activeCellCoordinates, rows, setSelectionAreaData]);
370
271
 
@@ -414,7 +315,7 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
414
315
  "data-row-index": index,
415
316
  "data-column-index": "header",
416
317
  type: "button",
417
- onClick: handleRowHeaderClick(index),
318
+ onClick: handleRowHeaderClickEvent(index),
418
319
  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))),
419
320
  style: {
420
321
  width: defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.rowHeaderWidth
@@ -436,14 +337,14 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
436
337
  "data-row-index": cell.row.index,
437
338
  "data-column-index": index,
438
339
  className: cx("".concat(blockClass, "__td"), "".concat(blockClass, "__body--td"), "".concat(blockClass, "--interactive-cell-element")),
439
- onMouseDown: handleBodyCellClick(cell, index),
440
- onMouseOver: handleBodyCellHover(cell, index),
340
+ onMouseDown: handleBodyCellClickEvent(cell, index),
341
+ onMouseOver: handleBodyCellHoverEvent(cell, index),
441
342
  onFocus: function onFocus() {},
442
343
  type: "button"
443
344
  }, cell.render('Cell')));
444
345
  }));
445
346
  }
446
- }, [prepareRow, rows, activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, selectionAreas, handleRowHeaderClick, handleBodyCellClick, handleBodyCellHover, defaultColumn, columns]);
347
+ }, [prepareRow, rows, activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, selectionAreas, handleRowHeaderClickEvent, handleBodyCellClickEvent, handleBodyCellHoverEvent, defaultColumn, columns]);
447
348
  var spreadsheetBodyRef = useRef();
448
349
  return /*#__PURE__*/React__default.createElement("div", _extends({
449
350
  ref: spreadsheetBodyRef,
@@ -0,0 +1,4 @@
1
+ export function handleBodyCellClick(cell: any, columnIndex: any, event: any, ...rest: any[]): void;
2
+ export function handleBodyCellHover(cell: any, columnIndex: any, ...rest: any[]): void;
3
+ export function handleRowHeaderClick(index: any, event: any, ...rest: any[]): void;
4
+ export function handleKeyPress(event: any, ...rest: any[]): any;