@carbon/ibm-products 2.44.0-rc.2 → 2.45.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/css/index-full-carbon.css +118 -15
  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 +203 -5
  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 +118 -15
  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 +118 -15
  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/Coachmark/Coachmark.js +12 -7
  18. package/es/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  19. package/es/components/CoachmarkStack/CoachmarkStack.js +7 -3
  20. package/es/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  21. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +35 -22
  22. package/es/components/ConditionBuilder/ConditionBuilder.js +17 -7
  23. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -2
  24. package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +58 -36
  25. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  26. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +23 -11
  27. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +4 -1
  28. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +14 -4
  29. package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +8 -4
  30. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +17 -9
  31. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +29 -16
  32. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +12 -6
  33. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +20 -7
  34. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +2 -1
  35. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +23 -20
  36. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +37 -39
  37. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +37 -38
  38. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
  39. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +49 -23
  40. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  41. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  42. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +12 -9
  43. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +9 -4
  44. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +10 -5
  45. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  46. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +19 -7
  47. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  48. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +70 -17
  49. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  50. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +31 -14
  51. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -1
  52. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +120 -28
  53. package/es/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  54. package/es/components/ConditionBuilder/utils/useTranslations.js +26 -0
  55. package/es/components/ConditionBuilder/utils/util.js +1 -9
  56. package/es/components/CreateFullPage/CreateFullPage.js +2 -2
  57. package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +8 -0
  58. package/es/components/DataSpreadsheet/DataSpreadsheet.js +25 -7
  59. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  60. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +13 -3
  61. package/es/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  62. package/es/components/Datagrid/Datagrid/Datagrid.js +2 -8
  63. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -7
  64. package/es/components/Datagrid/Datagrid/DatagridRow.js +8 -6
  65. package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
  66. package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  67. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +1 -1
  68. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -2
  69. package/es/components/Datagrid/types/index.d.ts +28 -6
  70. package/es/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  71. package/es/components/Datagrid/useCustomizeColumns.js +4 -3
  72. package/es/components/Datagrid/useDefaultStringRenderer.js +0 -1
  73. package/es/components/Datagrid/useNestedRowExpander.js +1 -3
  74. package/es/components/Datagrid/useRowExpander.js +1 -3
  75. package/es/components/Datagrid/useSelectRows.js +2 -1
  76. package/es/components/Datagrid/useStickyColumn.d.ts +8 -1
  77. package/es/components/Datagrid/useStickyColumn.js +12 -9
  78. package/es/components/EditInPlace/EditInPlace.d.ts +4 -0
  79. package/es/components/EditInPlace/EditInPlace.js +21 -10
  80. package/es/components/EditTearsheet/EditTearsheet.d.ts +2 -1
  81. package/es/components/EditTearsheet/EditTearsheet.js +44 -9
  82. package/es/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  83. package/es/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  84. package/es/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  85. package/es/components/Nav/NavItem.js +12 -3
  86. package/es/components/OptionsTile/OptionsTile.js +11 -6
  87. package/es/components/PageHeader/PageHeader.js +1 -0
  88. package/es/components/SearchBar/SearchBar.d.ts +1 -1
  89. package/es/components/SearchBar/SearchBar.js +2 -2
  90. package/es/components/SidePanel/SidePanel.js +17 -21
  91. package/es/components/SidePanel/motion/variants.d.ts +4 -6
  92. package/es/components/SidePanel/motion/variants.js +10 -11
  93. package/es/components/Tearsheet/TearsheetShell.js +3 -1
  94. package/es/components/WebTerminal/WebTerminal.js +10 -12
  95. package/es/global/js/hooks/usePrefersReducedMotion.js +14 -8
  96. package/es/global/js/package-settings.d.ts +1 -1
  97. package/es/global/js/package-settings.js +1 -1
  98. package/es/settings.d.ts +1 -1
  99. package/lib/components/Coachmark/Coachmark.js +12 -7
  100. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +13 -11
  101. package/lib/components/CoachmarkStack/CoachmarkStack.js +7 -3
  102. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +8 -4
  103. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +34 -21
  104. package/lib/components/ConditionBuilder/ConditionBuilder.js +17 -7
  105. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +2 -2
  106. package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +56 -33
  107. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +3 -1
  108. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +22 -10
  109. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +4 -1
  110. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +13 -3
  111. package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +6 -2
  112. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +16 -8
  113. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +28 -15
  114. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +12 -6
  115. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +20 -7
  116. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +2 -1
  117. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +22 -20
  118. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +37 -39
  119. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +37 -38
  120. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
  121. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +48 -22
  122. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +3 -1
  123. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +24 -9
  124. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +11 -8
  125. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +8 -3
  126. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +9 -4
  127. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +5 -1
  128. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +18 -6
  129. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
  130. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +68 -15
  131. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +3 -1
  132. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +30 -13
  133. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -1
  134. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +119 -27
  135. package/lib/components/ConditionBuilder/utils/useTranslations.d.ts +1 -0
  136. package/lib/components/ConditionBuilder/utils/useTranslations.js +30 -0
  137. package/lib/components/ConditionBuilder/utils/util.js +0 -9
  138. package/lib/components/CreateFullPage/CreateFullPage.js +2 -2
  139. package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +8 -0
  140. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +25 -7
  141. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +8 -0
  142. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +13 -3
  143. package/lib/components/Datagrid/Datagrid/Datagrid.d.ts +0 -4
  144. package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -8
  145. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +12 -7
  146. package/lib/components/Datagrid/Datagrid/DatagridRow.js +8 -6
  147. package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +2 -1
  148. package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +3 -2
  149. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +1 -1
  150. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -2
  151. package/lib/components/Datagrid/types/index.d.ts +28 -6
  152. package/lib/components/Datagrid/useCustomizeColumns.d.ts +8 -1
  153. package/lib/components/Datagrid/useCustomizeColumns.js +4 -3
  154. package/lib/components/Datagrid/useDefaultStringRenderer.js +0 -1
  155. package/lib/components/Datagrid/useNestedRowExpander.js +1 -3
  156. package/lib/components/Datagrid/useRowExpander.js +1 -3
  157. package/lib/components/Datagrid/useSelectRows.js +2 -1
  158. package/lib/components/Datagrid/useStickyColumn.d.ts +8 -1
  159. package/lib/components/Datagrid/useStickyColumn.js +12 -9
  160. package/lib/components/EditInPlace/EditInPlace.d.ts +4 -0
  161. package/lib/components/EditInPlace/EditInPlace.js +21 -10
  162. package/lib/components/EditTearsheet/EditTearsheet.d.ts +2 -1
  163. package/lib/components/EditTearsheet/EditTearsheet.js +43 -8
  164. package/lib/components/HTTPErrors/assets/HTTPErrorSvg403.js +204 -200
  165. package/lib/components/HTTPErrors/assets/HTTPErrorSvg404.js +116 -112
  166. package/lib/components/HTTPErrors/assets/HTTPErrorSvgOther.js +110 -106
  167. package/lib/components/Nav/NavItem.js +10 -1
  168. package/lib/components/OptionsTile/OptionsTile.js +11 -6
  169. package/lib/components/PageHeader/PageHeader.js +1 -0
  170. package/lib/components/SearchBar/SearchBar.d.ts +1 -1
  171. package/lib/components/SearchBar/SearchBar.js +2 -2
  172. package/lib/components/SidePanel/SidePanel.js +16 -20
  173. package/lib/components/SidePanel/motion/variants.d.ts +4 -6
  174. package/lib/components/SidePanel/motion/variants.js +10 -11
  175. package/lib/components/Tearsheet/TearsheetShell.js +3 -1
  176. package/lib/components/WebTerminal/WebTerminal.js +10 -12
  177. package/lib/global/js/hooks/usePrefersReducedMotion.js +13 -7
  178. package/lib/global/js/package-settings.d.ts +1 -1
  179. package/lib/global/js/package-settings.js +1 -1
  180. package/lib/settings.d.ts +1 -1
  181. package/package.json +4 -4
  182. package/scss/components/ConditionBuilder/_condition-builder.scss +1 -1
  183. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +5 -1
  184. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +8 -4
  185. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +9 -2
  186. package/scss/components/Datagrid/_datagrid.scss +0 -4
  187. package/scss/components/HTTPErrors/_http-errors.scss +77 -0
  188. package/scss/components/OptionsTile/_options-tile.scss +6 -6
  189. package/scss/components/SidePanel/_side-panel.scss +1 -1
  190. package/scss/components/_index-released-only.scss +1 -0
  191. package/telemetry.yml +12 -2
  192. package/es/global/js/utils/window.d.ts +0 -2
  193. package/es/global/js/utils/window.js +0 -12
  194. package/lib/global/js/utils/window.d.ts +0 -2
  195. package/lib/global/js/utils/window.js +0 -16
@@ -32,10 +32,8 @@ var _excluded = ["className"],
32
32
  var blockClass = "".concat(settings.pkg.prefix, "--datagrid");
33
33
  var getAccessibilityProps = function getAccessibilityProps(header) {
34
34
  var props = {};
35
- var title = getNodeTextContent.getNodeTextContent(header.Header);
36
- if (title) {
37
- props.title = title;
38
- } else {
35
+ var content = getNodeTextContent.getNodeTextContent(header.Header);
36
+ if (!content) {
39
37
  props['aria-hidden'] = true;
40
38
  }
41
39
  return props;
@@ -91,6 +89,7 @@ var ResizeHeader = function ResizeHeader(_ref) {
91
89
  "aria-label": resizerAriaLabel || 'Resize column',
92
90
  disabled: isFetching
93
91
  })), /*#__PURE__*/React__default["default"].createElement("span", {
92
+ role: "separator",
94
93
  className: "".concat(blockClass, "__col-resize-indicator")
95
94
  }));
96
95
  };
@@ -145,7 +144,9 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
145
144
  }
146
145
  onMouseDown === null || onMouseDown === void 0 || onMouseDown(event);
147
146
  };
148
- var _headerGroup$getHeade = headerGroup.getHeaderGroupProps(),
147
+ var _headerGroup$getHeade = headerGroup.getHeaderGroupProps({
148
+ role: undefined
149
+ }),
149
150
  headerGroupClassName = _headerGroup$getHeade.className,
150
151
  headerGroupProps = _rollupPluginBabelHelpers.objectWithoutProperties(_headerGroup$getHeade, _excluded);
151
152
  var renderSlug = function renderSlug(slug) {
@@ -194,9 +195,13 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
194
195
  var _ref5 = columnResizing || {},
195
196
  columnWidths = _ref5.columnWidths;
196
197
  var originalCol = visibleColumns[index];
197
- var _header$getHeaderProp = header.getHeaderProps(),
198
+ var _header$getHeaderProp = header.getHeaderProps({
199
+ role: undefined
200
+ }),
198
201
  headerProps = _rollupPluginBabelHelpers["extends"]({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_header$getHeaderProp), _header$getHeaderProp));
199
- var resizerProps = header === null || header === void 0 || (_header$getResizerPro = header.getResizerProps) === null || _header$getResizerPro === void 0 ? void 0 : _header$getResizerPro.call(header);
202
+ var resizerProps = header === null || header === void 0 || (_header$getResizerPro = header.getResizerProps) === null || _header$getResizerPro === void 0 ? void 0 : _header$getResizerPro.call(header, {
203
+ role: undefined
204
+ });
200
205
  var headerStyle = headerProps === null || headerProps === void 0 ? void 0 : headerProps.style;
201
206
  var lastVisibleIndex = withActionsColumn ? 2 : 1;
202
207
  var lastVisibleFlexStyle = index === visibleColumns.length - lastVisibleIndex ? '1 1 0' : '0 0 auto';
@@ -117,7 +117,9 @@ var DatagridRow = function DatagridRow(datagridState) {
117
117
  }
118
118
  return {};
119
119
  };
120
- var _row$getRowProps = row.getRowProps(),
120
+ var _row$getRowProps = row.getRowProps({
121
+ role: undefined
122
+ }),
121
123
  className = _row$getRowProps.className,
122
124
  rowProps = _rollupPluginBabelHelpers.objectWithoutProperties(_row$getRowProps, _excluded);
123
125
  var foundAIRow = rows.some(function (r) {
@@ -145,8 +147,10 @@ var DatagridRow = function DatagridRow(datagridState) {
145
147
  })) : /*#__PURE__*/React__default["default"].createElement("td", {
146
148
  className: "".concat(blockClass, "__table-row-ai-spacer")
147
149
  }) : null, row.cells.map(function (cell, index) {
148
- var _cell$column, _cell$column2, _content$props, _associatedHeader$;
149
- var cellProps = cell.getCellProps();
150
+ var _cell$column, _cell$column2, _associatedHeader$;
151
+ var cellProps = cell.getCellProps({
152
+ role: undefined
153
+ });
150
154
  // eslint-disable-next-line no-unused-vars
151
155
  var _ref2 = cellProps,
152
156
  style = _ref2.style,
@@ -160,7 +164,6 @@ var DatagridRow = function DatagridRow(datagridState) {
160
164
  key: cell.column.id
161
165
  });
162
166
  }
163
- var title = content === null || content === void 0 || (_content$props = content.props) === null || _content$props === void 0 || (_content$props = _content$props.children[0]) === null || _content$props === void 0 || (_content$props = _content$props.props) === null || _content$props === void 0 ? void 0 : _content$props.value;
164
167
  var associatedHeader = headers === null || headers === void 0 ? void 0 : headers.filter(function (h) {
165
168
  return h.id === cell.column.id;
166
169
  });
@@ -173,8 +176,7 @@ var DatagridRow = function DatagridRow(datagridState) {
173
176
  className: cx__default["default"]("".concat(blockClass, "__cell"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__expandable-row-cell"), row.canExpand && index === 0), "".concat(blockClass, "__expandable-row-cell--is-expanded"), row.isExpanded && index === 0), "".concat(blockClass, "__slug--cell"), associatedHeader && associatedHeader.length && /*#__PURE__*/React.isValidElement((_associatedHeader$ = associatedHeader[0]) === null || _associatedHeader$ === void 0 ? void 0 : _associatedHeader$.slug)), columnClassname)
174
177
  }, restProps, {
175
178
  style: style,
176
- key: cell.column.id,
177
- title: title
179
+ key: cell.column.id
178
180
  }), content);
179
181
  })), (renderExpandedRow === null || renderExpandedRow === void 0 ? void 0 : renderExpandedRow()) || undefined);
180
182
  };
@@ -25,11 +25,12 @@ var _excluded = ["onChange"];
25
25
  var blockClass = "".concat(settings.pkg.prefix, "--datagrid");
26
26
  var SelectAll = function SelectAll(datagridState) {
27
27
  var _columns$;
28
- var _useState = React.useState(typeof window !== 'undefined' ? window.innerWidth : ''),
28
+ var _useState = React.useState(),
29
29
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
30
30
  windowSize = _useState2[0],
31
31
  setWindowSize = _useState2[1];
32
32
  React.useLayoutEffect(function () {
33
+ setWindowSize(window.innerWidth);
33
34
  /* istanbul ignore next */
34
35
  function updateSize() {
35
36
  setWindowSize(window.innerWidth);
@@ -52,11 +52,12 @@ var SelectAllWithToggle = function SelectAllWithToggle(_ref) {
52
52
  onSelectAllRows(isAllRowsSelected && selectAllMode === SELECT_ALL_ROWS);
53
53
  }
54
54
  }, [isAllRowsSelected, selectAllMode, onSelectAllRows]);
55
- var _useState3 = React.useState(window.innerWidth),
55
+ var _useState3 = React.useState(),
56
56
  _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
57
57
  windowSize = _useState4[0],
58
58
  setWindowSize = _useState4[1];
59
59
  React.useLayoutEffect(function () {
60
+ setWindowSize(window.innerWidth);
60
61
  function updateSize() {
61
62
  setWindowSize(window.innerWidth);
62
63
  }
@@ -77,7 +78,7 @@ var SelectAllWithToggle = function SelectAllWithToggle(_ref) {
77
78
  var isFirstColumnStickyLeft = (columns === null || columns === void 0 || (_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
78
79
  return /*#__PURE__*/React__default["default"].createElement("th", {
79
80
  scope: "col",
80
- className: cx__default["default"]("".concat(blockClass, "__select-all-toggle-on"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__select-all-sticky-left"), isFirstColumnStickyLeft && windowSize > 671))
81
+ className: cx__default["default"]("".concat(blockClass, "__select-all-toggle-on"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__select-all-sticky-left"), isFirstColumnStickyLeft && (windowSize !== null && windowSize !== void 0 ? windowSize : 0) > 671))
81
82
  }, /*#__PURE__*/React__default["default"].createElement("span", null, /*#__PURE__*/React__default["default"].createElement(react.Checkbox, _rollupPluginBabelHelpers["extends"]({}, selectProps, {
82
83
  name: "".concat(tableId, "-select-all-checkbox-name"),
83
84
  onClick: function onClick(e) {
@@ -70,7 +70,7 @@ var clearSingleFilter = function clearSingleFilter(_ref, setAllFilters, state) {
70
70
  This checks if all the checkboxes are selected = false and removes it from the array
71
71
  */
72
72
  var valueIndex = filterValues.findIndex(function (val) {
73
- return val.id === value;
73
+ return val.value === value;
74
74
  });
75
75
  filterValues[valueIndex].selected = false;
76
76
  var updatedFilterObject = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, f), {}, {
@@ -36,8 +36,7 @@ var InlineEditButton = function InlineEditButton(_ref) {
36
36
  tabIndex: isActiveCell ? 0 : -1,
37
37
  "data-disabled": disabledCell,
38
38
  "aria-disabled": disabledCell,
39
- role: "button",
40
- title: label
39
+ role: "button"
41
40
  }, LabelIcon && /*#__PURE__*/React__default["default"].createElement("div", {
42
41
  className: "".concat(blockClass, "__label-icon")
43
42
  }, /*#__PURE__*/React__default["default"].createElement(LabelIcon, null)), label !== '' ? /*#__PURE__*/React__default["default"].createElement("span", {
@@ -6,7 +6,7 @@ import { RadioButtonGroupProps } from '@carbon/react/lib/components/RadioButtonG
6
6
  import { CheckboxProps } from '@carbon/react/lib/components/Checkbox';
7
7
  import { NumberInputProps } from '@carbon/react/lib/components/NumberInput/NumberInput';
8
8
  import React, { CSSProperties, ComponentType, FunctionComponent, JSXElementConstructor, MutableRefObject, ReactNode, TouchEventHandler } from 'react';
9
- import { Cell, Column, ColumnInstance, FilterValue, Filters, HeaderGroup, Meta, Row, TableCommonProps, TableDispatch, TableInstance, TableToggleAllRowsSelectedProps, UseExpandedRowProps, UseFiltersInstanceProps, UsePaginationInstanceProps, UseResizeColumnsColumnProps, UseResizeColumnsState, UseRowSelectInstanceProps, UseRowSelectRowProps, UseRowSelectState, UseSortByColumnProps, UseSortByOptions, UseTableHooks } from 'react-table';
9
+ import { Cell, Column, ColumnInstance, FilterValue, Filters, HeaderGroup, Meta, Row, TableCommonProps, TableDispatch, TableInstance, TableToggleAllRowsSelectedProps, UseExpandedRowProps, UseFiltersInstanceProps, UsePaginationInstanceProps, UseResizeColumnsColumnProps, UseResizeColumnsOptions, UseResizeColumnsState, UseRowSelectInstanceProps, UseRowSelectRowProps, UseRowSelectState, UseSortByColumnProps, UseSortByOptions, UseTableHooks } from 'react-table';
10
10
  import { CarbonIconType } from '@carbon/react/icons';
11
11
  import { IconButton, type ButtonProps } from '@carbon/react';
12
12
  import { TableBatchActionsProps } from '@carbon/react/lib/components/DataTable/TableBatchActions';
@@ -59,6 +59,18 @@ interface Labels {
59
59
  allPageRows?: object;
60
60
  allRows?: object;
61
61
  }
62
+ interface ColumnLabels {
63
+ findColumnPlaceholderLabel?: string;
64
+ resetToDefaultLabel?: string;
65
+ customizeTearsheetHeadingLabel?: string;
66
+ primaryButtonTextLabel?: string;
67
+ secondaryButtonTextLabel?: string;
68
+ instructionsLabel?: string;
69
+ iconTooltipLabel?: string;
70
+ assistiveTextInstructionsLabel?: string;
71
+ assistiveTextDisabledInstructionsLabel?: string;
72
+ selectAllLabel?: string;
73
+ }
62
74
  interface Section {
63
75
  categoryTitle?: string;
64
76
  filters?: DataGridFilter[];
@@ -85,7 +97,7 @@ export interface DataGridToggleAllRowsProps extends TableToggleAllRowsSelectedPr
85
97
  }
86
98
  export interface DatagridTableHooks<T extends object = any> extends UseTableHooks<T> {
87
99
  }
88
- export interface DatagridColumn<T extends object = any> extends ColumnInstance<T>, UseSortByOptions<T> {
100
+ export interface DatagridColumn<T extends object = any> extends ColumnInstance<T>, UseSortByOptions<T>, Partial<UseResizeColumnsColumnProps<T>>, UseResizeColumnsOptions<T> {
89
101
  sticky?: 'left' | 'right';
90
102
  className?: string;
91
103
  rightAlignedColumn?: boolean;
@@ -112,15 +124,13 @@ export interface DataGridHeader<T extends object = any> extends ColumnInstance,
112
124
  }
113
125
  export interface DataGridHeaderGroup<T extends object = any> extends HeaderGroup<T>, UseResizeColumnsColumnProps<T> {
114
126
  }
115
- export interface TableProps {
116
- className?: string;
117
- role?: string;
118
- style?: CSSStyleDeclaration;
127
+ export interface DataGridTableProps extends TableCommonProps {
119
128
  }
120
129
  interface DataGridTableState extends UseResizeColumnsState<any>, UseRowSelectState<any> {
121
130
  filters: Filters<DataGridFilter>;
122
131
  }
123
132
  export interface DataGridTableInstance<T extends object = any> extends TableInstance<T> {
133
+ withSelectRows?: boolean;
124
134
  }
125
135
  export interface RowAction {
126
136
  id?: string;
@@ -210,11 +220,23 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
210
220
  expandedRowIds?: object;
211
221
  onRowClick?: (row: any, event: any) => void;
212
222
  onSort?: boolean;
223
+ customizeColumnsProps?: {
224
+ onSaveColumnPrefs?: (args: any) => void;
225
+ labels?: ColumnLabels;
226
+ isTearsheetOpen?: boolean;
227
+ setIsTearsheetOpen?: (args: boolean) => void;
228
+ };
229
+ CustomizeColumnsButton?: (args: any) => ReactNode;
213
230
  column?: DatagridColumn;
214
231
  expandedContentHeight?: number;
215
232
  onRowExpand?: (row: DatagridRow, event: React.MouseEvent<HTMLElement>) => void;
216
233
  ExpandedRowContentComponent?: JSXElementConstructor<any>;
217
234
  }
235
+ export interface DataGridData {
236
+ instance?: DataGridTableInstance;
237
+ column?: DatagridColumn;
238
+ cell?: DataGridCell;
239
+ }
218
240
  export interface ResizeHeaderProps {
219
241
  resizerProps?: ResizerProps;
220
242
  header: DataGridHeader;
@@ -1,2 +1,9 @@
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 { Hooks } from 'react-table';
8
+ declare const useCustomizeColumns: (hooks: Hooks) => void;
1
9
  export default useCustomizeColumns;
2
- declare function useCustomizeColumns(hooks: any): void;
@@ -40,9 +40,10 @@ var useCustomizeColumns = function useCustomizeColumns(hooks) {
40
40
  isTearsheetOpen = _React$useState2[0],
41
41
  setIsTearsheetOpen = _React$useState2[1];
42
42
  hooks.useInstance.push(function (instance) {
43
- var customizeColumnsProps = instance.customizeColumnsProps;
44
- var _ref = customizeColumnsProps || {},
45
- labels = _ref.labels;
43
+ var _ref = instance,
44
+ customizeColumnsProps = _ref.customizeColumnsProps;
45
+ var _ref2 = customizeColumnsProps || {},
46
+ labels = _ref2.labels;
46
47
  Object.assign(instance, {
47
48
  customizeColumnsProps: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, customizeColumnsProps), {}, {
48
49
  isTearsheetOpen: isTearsheetOpen,
@@ -30,7 +30,6 @@ var useDefaultStringRenderer = function useDefaultStringRenderer(hooks) {
30
30
  var HeaderRenderer = function HeaderRenderer(header, slug) {
31
31
  return /*#__PURE__*/React__default["default"].createElement("div", {
32
32
  className: cx__default["default"]("".concat(blockClass, "__defaultStringRenderer"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__defaultStringRenderer--slug"), slug && /*#__PURE__*/React__default["default"].isValidElement(slug))),
33
- title: typeof header === 'string' ? header : '',
34
33
  key: typeof header === 'string' ? header : ''
35
34
  }, header);
36
35
  };
@@ -57,9 +57,7 @@ var useNestedRowExpander = function useNestedRowExpander(hooks) {
57
57
  type: "button",
58
58
  "aria-label": expanderTitle,
59
59
  className: cx__default["default"]("".concat(blockClass, "__row-expander"), "".concat(settings.carbon.prefix, "--btn"), "".concat(settings.carbon.prefix, "--btn--ghost"))
60
- }, expanderButtonProps, {
61
- title: expanderTitle
62
- }), /*#__PURE__*/React__default["default"].createElement(icons.ChevronRight, {
60
+ }, expanderButtonProps), /*#__PURE__*/React__default["default"].createElement(icons.ChevronRight, {
63
61
  className: cx__default["default"]("".concat(blockClass, "__expander-icon"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__expander-icon--not-open"), !row.isExpanded), "".concat(blockClass, "__expander-icon--open"), row.isExpanded))
64
62
  }));
65
63
  },
@@ -59,9 +59,7 @@ var useRowExpander = function useRowExpander(hooks) {
59
59
  type: "button",
60
60
  "aria-label": expanderTitle,
61
61
  className: cx__default["default"]("".concat(blockClass, "__row-expander"), "".concat(settings.carbon.prefix, "--btn"), "".concat(settings.carbon.prefix, "--btn--ghost"))
62
- }, expanderButtonProps, {
63
- title: expanderTitle
64
- }), row.isExpanded ? /*#__PURE__*/React__default["default"].createElement(icons.ChevronUp, {
62
+ }, expanderButtonProps), row.isExpanded ? /*#__PURE__*/React__default["default"].createElement(icons.ChevronUp, {
65
63
  className: "".concat(blockClass, "__row-expander--icon")
66
64
  }) : /*#__PURE__*/React__default["default"].createElement(icons.ChevronDown, {
67
65
  className: "".concat(blockClass, "__row-expander--icon")
@@ -90,11 +90,12 @@ var SelectRow = function SelectRow(datagridState) {
90
90
  withStickyColumn = datagridState.withStickyColumn,
91
91
  dispatch = datagridState.dispatch,
92
92
  getRowId = datagridState.getRowId;
93
- var _useState = React.useState(typeof window !== 'undefined' ? window.innerWidth : ''),
93
+ var _useState = React.useState(),
94
94
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
95
95
  windowSize = _useState2[0],
96
96
  setWindowSize = _useState2[1];
97
97
  React.useLayoutEffect(function () {
98
+ setWindowSize(window.innerWidth);
98
99
  function updateSize() {
99
100
  setWindowSize(window.innerWidth);
100
101
  }
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2023
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 { Hooks } from 'react-table';
8
+ declare const useStickyColumn: (hooks: Hooks) => void;
1
9
  export default useStickyColumn;
2
- declare function useStickyColumn(hooks: any): void;
@@ -27,12 +27,13 @@ var OFFSET_SCROLL_CLASS = "".concat(styleClassPrefix, "-offset-scroll");
27
27
  var useStickyColumn = function useStickyColumn(hooks) {
28
28
  var tableBodyRef = React.useRef();
29
29
  var stickyHeaderCellRef = React.useRef();
30
- var _useState = React.useState(null),
30
+ var _useState = React.useState(),
31
31
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
32
32
  windowSize = _useState2[0],
33
33
  setWindowSize = _useState2[1];
34
34
  React.useEffect(function () {
35
- setWindowSize(window.innerWidth);
35
+ var _window;
36
+ setWindowSize((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth);
36
37
  }, []);
37
38
  React.useLayoutEffect(function () {
38
39
  /* istanbul ignore next */
@@ -58,10 +59,11 @@ var useStickyColumn = function useStickyColumn(hooks) {
58
59
  var useEventListener = function useEventListener(instance) {
59
60
  React.useEffect(function () {
60
61
  var tableBodyElement = tableBodyRef.current;
61
- var headerCellElement = stickyHeaderCellRef.current;
62
+ var headerCellElement = stickyHeaderCellRef === null || stickyHeaderCellRef === void 0 ? void 0 : stickyHeaderCellRef.current;
62
63
  /* istanbul ignore next */
63
64
  if (hasVertScroll(tableBodyElement) && headerCellElement) {
64
- headerCellElement.classList.add(OFFSET_SCROLL_CLASS);
65
+ var _headerCellElement$cl;
66
+ headerCellElement === null || headerCellElement === void 0 || (_headerCellElement$cl = headerCellElement.classList) === null || _headerCellElement$cl === void 0 || _headerCellElement$cl.add(OFFSET_SCROLL_CLASS);
65
67
  }
66
68
  var boundListener = debounce__default["default"](onBodyResize.bind(null, tableBodyElement, headerCellElement), 250);
67
69
  /* istanbul ignore next */
@@ -83,7 +85,7 @@ var useStickyColumn = function useStickyColumn(hooks) {
83
85
  };
84
86
  toggleStickyShadow(tableBodyElement, headerCellElement);
85
87
  if (tableBodyElement) {
86
- tableBodyElement.addEventListener('scroll', listener);
88
+ tableBodyElement === null || tableBodyElement === void 0 || tableBodyElement.addEventListener('scroll', listener);
87
89
  }
88
90
  return function () {
89
91
  if (tableBodyElement) {
@@ -147,18 +149,19 @@ var addTableBodyProps = function addTableBodyProps(tableBodyRef, props) {
147
149
  }];
148
150
  };
149
151
  var changeProps = function changeProps(elementName, headerCellRef, windowSize, props, data) {
150
- var column = data.column || data.cell.column;
151
- if (column.sticky === 'right') {
152
+ var _data$cell;
153
+ var column = data.column || ((_data$cell = data.cell) === null || _data$cell === void 0 ? void 0 : _data$cell.column);
154
+ if ((column === null || column === void 0 ? void 0 : column.sticky) === 'right') {
152
155
  return [props, _rollupPluginBabelHelpers.objectSpread2({
153
156
  className: cx__default["default"](_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(styleClassPrefix, "-").concat(elementName), true), "".concat(blockClass, "__resizableColumn"), false), "".concat(blockClass, "__sortableColumn"), false))
154
157
  }, headerCellRef && {
155
158
  ref: headerCellRef
156
159
  })];
157
160
  }
158
- if (column.sticky === 'left') {
161
+ if ((column === null || column === void 0 ? void 0 : column.sticky) === 'left') {
159
162
  var _data$instance;
160
163
  return [props, _rollupPluginBabelHelpers.objectSpread2({
161
- className: cx__default["default"](_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(leftStickyStyleClassPrefix, "-").concat(elementName), windowSize > 671), "".concat(leftStickyStyleClassPrefix, "-").concat(elementName, "--with-extra-select-column"), (data === null || data === void 0 || (_data$instance = data.instance) === null || _data$instance === void 0 ? void 0 : _data$instance.withSelectRows) && windowSize > 671))
164
+ className: cx__default["default"](_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(leftStickyStyleClassPrefix, "-").concat(elementName), windowSize && windowSize > 671), "".concat(leftStickyStyleClassPrefix, "-").concat(elementName, "--with-extra-select-column"), (data === null || data === void 0 || (_data$instance = data.instance) === null || _data$instance === void 0 ? void 0 : _data$instance.withSelectRows) && windowSize && windowSize > 671))
162
165
  }, headerCellRef && {
163
166
  ref: headerCellRef
164
167
  })];
@@ -50,6 +50,10 @@ interface EditInplaceProps extends PropsWithChildren {
50
50
  * Provide the text that will be read by a screen reader when visiting this control
51
51
  */
52
52
  labelText: string;
53
+ /**
54
+ * handler to add custom onBlur event
55
+ */
56
+ onBlur?: (value: string) => void;
53
57
  /**
54
58
  * handler that is called when the cancel button is pressed or when the user removes focus from the input and there is no new value
55
59
  */
@@ -24,7 +24,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
24
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
25
25
 
26
26
  var _Close, _Checkmark, _Edit;
27
- var _excluded = ["cancelLabel", "editAlwaysVisible", "editLabel", "id", "inheritTypography", "invalid", "invalidLabel", "invalidText", "labelText", "onCancel", "onChange", "onSave", "saveLabel", "size", "tooltipAlignment", "value"];
27
+ var _excluded = ["cancelLabel", "editAlwaysVisible", "editLabel", "id", "inheritTypography", "invalid", "invalidLabel", "invalidText", "labelText", "onCancel", "onChange", "onSave", "onBlur", "saveLabel", "size", "tooltipAlignment", "value"];
28
28
  var componentName = 'EditInPlace';
29
29
  var blockClass = "".concat(settings.pkg.prefix, "--edit-in-place");
30
30
  var defaults = {
@@ -45,6 +45,7 @@ exports.EditInPlace = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
45
45
  onCancel = _ref.onCancel,
46
46
  onChange = _ref.onChange,
47
47
  onSave = _ref.onSave,
48
+ onBlur = _ref.onBlur,
48
49
  saveLabel = _ref.saveLabel,
49
50
  _ref$size = _ref.size,
50
51
  size = _ref$size === void 0 ? 'sm' : _ref$size,
@@ -112,15 +113,21 @@ exports.EditInPlace = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
112
113
  onCancel(initialValue);
113
114
  };
114
115
  var onBlurHandler = function onBlurHandler(e) {
115
- // if (readOnly || escaping.current) {
116
- if (escaping.current) {
117
- return;
118
- }
119
- if (!isTargetingChild(e)) {
120
- if (canSave) {
121
- onSaveHandler();
122
- } else {
123
- onCancelHandler();
116
+ // Use custom function provided if passed through
117
+ if (typeof onBlur === 'function' && !isTargetingChild(e)) {
118
+ onBlur(initialValue);
119
+ setFocused(false);
120
+ } else {
121
+ // Use Default behavior if no custom function provided
122
+ if (escaping.current) {
123
+ return;
124
+ }
125
+ if (!isTargetingChild(e)) {
126
+ if (canSave) {
127
+ onSaveHandler();
128
+ } else {
129
+ onCancelHandler();
130
+ }
124
131
  }
125
132
  }
126
133
  };
@@ -260,6 +267,10 @@ exports.EditInPlace.propTypes = _rollupPluginBabelHelpers.objectSpread2({
260
267
  * Provide the text that will be read by a screen reader when visiting this control
261
268
  */
262
269
  labelText: index["default"].string.isRequired,
270
+ /**
271
+ * handler to add custom onBlur event
272
+ */
273
+ onBlur: index["default"].func,
263
274
  /**
264
275
  * handler that is called when the cancel button is pressed or when the user removes focus from the input and there is no new value
265
276
  */
@@ -51,7 +51,8 @@ interface EditTearsheetProps extends PropsWithChildren {
51
51
  */
52
52
  onFormChange?: (formIndex: number) => number;
53
53
  /**
54
- * Specify a handler for submitting the tearsheet.
54
+ * Specify a handler for submitting the tearsheet. Throughout its execution
55
+ * the submit button will be disabled and include a loading indicator.
55
56
  */
56
57
  onRequestSubmit: () => void;
57
58
  /**
@@ -68,10 +68,45 @@ exports.EditTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
68
68
  _ref$sideNavAriaLabel = _ref.sideNavAriaLabel,
69
69
  sideNavAriaLabel = _ref$sideNavAriaLabel === void 0 ? defaults.sideNavAriaLabel : _ref$sideNavAriaLabel,
70
70
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
71
+ var _useState = React.useState(false),
72
+ _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
73
+ isSubmitting = _useState2[0],
74
+ setIsSubmitting = _useState2[1];
75
+ var handleOnRequestSubmit = /*#__PURE__*/function () {
76
+ var _ref2 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee() {
77
+ return _rollupPluginBabelHelpers.regeneratorRuntime().wrap(function _callee$(_context) {
78
+ while (1) switch (_context.prev = _context.next) {
79
+ case 0:
80
+ setIsSubmitting(true);
81
+ _context.prev = 1;
82
+ _context.next = 4;
83
+ return onRequestSubmit();
84
+ case 4:
85
+ _context.next = 9;
86
+ break;
87
+ case 6:
88
+ _context.prev = 6;
89
+ _context.t0 = _context["catch"](1);
90
+ console.warn("".concat(componentName, " submit error: ").concat(_context.t0));
91
+ case 9:
92
+ setIsSubmitting(false);
93
+ case 10:
94
+ case "end":
95
+ return _context.stop();
96
+ }
97
+ }, _callee, null, [[1, 6]]);
98
+ }));
99
+ return function handleOnRequestSubmit() {
100
+ return _ref2.apply(this, arguments);
101
+ };
102
+ }();
71
103
  var actions = [{
72
104
  key: 'edit-action-button-submit',
73
105
  label: submitButtonText,
74
- onClick: onRequestSubmit,
106
+ onClick: function onClick() {
107
+ return handleOnRequestSubmit();
108
+ },
109
+ loading: isSubmitting,
75
110
  kind: 'primary'
76
111
  }, {
77
112
  key: 'edit-action-button-cancel',
@@ -79,14 +114,14 @@ exports.EditTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
79
114
  onClick: onClose,
80
115
  kind: 'ghost'
81
116
  }];
82
- var _useState = React.useState(0),
83
- _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
84
- currentForm = _useState2[0],
85
- setCurrentForm = _useState2[1];
86
- var _useState3 = React.useState([]),
117
+ var _useState3 = React.useState(0),
87
118
  _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
88
- formTitles = _useState4[0],
89
- setFormTitles = _useState4[1];
119
+ currentForm = _useState4[0],
120
+ setCurrentForm = _useState4[1];
121
+ var _useState5 = React.useState([]),
122
+ _useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
123
+ formTitles = _useState6[0],
124
+ setFormTitles = _useState6[1];
90
125
  var contentRef = React.useRef(null);
91
126
  var handleCurrentForm = function handleCurrentForm(formIndex) {
92
127
  setCurrentForm(formIndex);