@carbon/ibm-products 2.39.0 → 2.40.1-canary.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. package/css/index-full-carbon.css +47 -38
  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 +7 -1
  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 +47 -38
  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 +710 -38
  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/AddSelect/AddSelect.d.ts +44 -2
  18. package/es/components/AddSelect/AddSelect.js +8 -4
  19. package/es/components/AddSelect/AddSelectBody.d.ts +44 -2
  20. package/es/components/AddSelect/AddSelectBody.js +10 -12
  21. package/es/components/AddSelect/AddSelectSort.d.ts +16 -17
  22. package/es/components/AddSelect/AddSelectSort.js +5 -5
  23. package/es/components/AddSelect/types/index.d.ts +44 -0
  24. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
  25. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
  26. package/es/components/Card/Card.js +1 -1
  27. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -3
  28. package/es/components/ConditionBuilder/ConditionBuilder.js +6 -1
  29. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +3 -3
  30. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
  31. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -2
  32. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
  33. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  34. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +1 -1
  35. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +30 -18
  36. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -3
  37. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +7 -7
  38. package/es/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +6 -6
  39. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +11 -11
  40. package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +1 -0
  41. package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +16 -0
  42. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
  43. package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +125 -0
  44. package/es/components/ConditionBuilder/utils/util.d.ts +1 -1
  45. package/es/components/ConditionBuilder/utils/util.js +34 -5
  46. package/es/components/CreateInfluencer/CreateInfluencer.js +1 -1
  47. package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
  48. package/es/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
  49. package/es/components/DataSpreadsheet/DataSpreadsheet.js +4 -3
  50. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
  51. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -2
  52. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -4
  53. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  54. package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  55. package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
  56. package/es/components/Guidebanner/Guidebanner.js +8 -7
  57. package/es/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  58. package/es/components/Guidebanner/GuidebannerElement.js +4 -4
  59. package/es/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  60. package/es/components/Guidebanner/GuidebannerElementButton.js +10 -4
  61. package/es/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  62. package/es/components/Guidebanner/GuidebannerElementLink.js +3 -3
  63. package/es/components/InterstitialScreen/InterstitialScreen.js +3 -1
  64. package/es/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  65. package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
  66. package/es/components/NotificationsPanel/NotificationsPanel.js +0 -1
  67. package/es/components/PageHeader/PageHeader.d.ts +298 -5
  68. package/es/components/PageHeader/PageHeader.js +99 -47
  69. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  70. package/es/components/PageHeader/PageHeaderUtils.js +4 -1
  71. package/es/components/SidePanel/SidePanel.d.ts +6 -2
  72. package/es/components/SidePanel/SidePanel.js +17 -2
  73. package/es/components/SidePanel/constants.d.ts +1 -0
  74. package/es/components/SidePanel/constants.js +1 -0
  75. package/es/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  76. package/es/components/SingleAddSelect/SingleAddSelect.js +2 -1
  77. package/es/components/TagOverflow/TagOverflow.js +35 -20
  78. package/es/components/TagOverflow/TagOverflowModal.d.ts +3 -1
  79. package/es/components/TagOverflow/TagOverflowModal.js +14 -20
  80. package/es/components/TagOverflow/TagOverflowPopover.js +19 -4
  81. package/es/components/Tearsheet/Tearsheet.d.ts +132 -6
  82. package/es/components/Tearsheet/Tearsheet.js +25 -13
  83. package/es/components/Tearsheet/TearsheetShell.d.ts +5 -1
  84. package/es/components/Tearsheet/TearsheetShell.js +26 -4
  85. package/es/components/WebTerminal/WebTerminal.d.ts +4 -0
  86. package/es/components/WebTerminal/WebTerminal.js +11 -3
  87. package/es/global/js/hooks/useFocus.d.ts +3 -1
  88. package/es/global/js/hooks/useFocus.js +6 -3
  89. package/es/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  90. package/es/global/js/hooks/useRetrieveStepData.js +1 -1
  91. package/lib/components/AddSelect/AddSelect.d.ts +44 -2
  92. package/lib/components/AddSelect/AddSelect.js +7 -3
  93. package/lib/components/AddSelect/AddSelectBody.d.ts +44 -2
  94. package/lib/components/AddSelect/AddSelectBody.js +10 -12
  95. package/lib/components/AddSelect/AddSelectSort.d.ts +16 -17
  96. package/lib/components/AddSelect/AddSelectSort.js +5 -5
  97. package/lib/components/AddSelect/types/index.d.ts +44 -0
  98. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
  99. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
  100. package/lib/components/Card/Card.js +1 -1
  101. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -3
  102. package/lib/components/ConditionBuilder/ConditionBuilder.js +6 -1
  103. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +3 -3
  104. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
  105. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -2
  106. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
  107. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  108. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +1 -1
  109. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +29 -17
  110. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -3
  111. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +7 -7
  112. package/lib/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +6 -6
  113. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +11 -11
  114. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +1 -0
  115. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +20 -0
  116. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
  117. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +129 -0
  118. package/lib/components/ConditionBuilder/utils/util.d.ts +1 -1
  119. package/lib/components/ConditionBuilder/utils/util.js +36 -4
  120. package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -1
  121. package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
  122. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
  123. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +4 -3
  124. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
  125. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -2
  126. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -4
  127. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  128. package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  129. package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
  130. package/lib/components/Guidebanner/Guidebanner.js +8 -7
  131. package/lib/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  132. package/lib/components/Guidebanner/GuidebannerElement.js +4 -4
  133. package/lib/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  134. package/lib/components/Guidebanner/GuidebannerElementButton.js +10 -4
  135. package/lib/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  136. package/lib/components/Guidebanner/GuidebannerElementLink.js +3 -3
  137. package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -1
  138. package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  139. package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
  140. package/lib/components/NotificationsPanel/NotificationsPanel.js +0 -1
  141. package/lib/components/PageHeader/PageHeader.d.ts +298 -5
  142. package/lib/components/PageHeader/PageHeader.js +99 -47
  143. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  144. package/lib/components/PageHeader/PageHeaderUtils.js +4 -1
  145. package/lib/components/SidePanel/SidePanel.d.ts +6 -2
  146. package/lib/components/SidePanel/SidePanel.js +17 -2
  147. package/lib/components/SidePanel/constants.d.ts +1 -0
  148. package/lib/components/SidePanel/constants.js +1 -0
  149. package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  150. package/lib/components/SingleAddSelect/SingleAddSelect.js +2 -1
  151. package/lib/components/TagOverflow/TagOverflow.js +34 -19
  152. package/lib/components/TagOverflow/TagOverflowModal.d.ts +3 -1
  153. package/lib/components/TagOverflow/TagOverflowModal.js +14 -20
  154. package/lib/components/TagOverflow/TagOverflowPopover.js +19 -4
  155. package/lib/components/Tearsheet/Tearsheet.d.ts +132 -6
  156. package/lib/components/Tearsheet/Tearsheet.js +25 -13
  157. package/lib/components/Tearsheet/TearsheetShell.d.ts +5 -1
  158. package/lib/components/Tearsheet/TearsheetShell.js +26 -4
  159. package/lib/components/WebTerminal/WebTerminal.d.ts +4 -0
  160. package/lib/components/WebTerminal/WebTerminal.js +11 -3
  161. package/lib/global/js/hooks/useFocus.d.ts +3 -1
  162. package/lib/global/js/hooks/useFocus.js +6 -3
  163. package/lib/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  164. package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
  165. package/package.json +3 -3
  166. package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
  167. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +4 -4
  168. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +34 -34
  169. package/scss/components/Datagrid/styles/_datagrid.scss +2 -1
  170. package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
  171. package/scss/components/StringFormatter/_string-formatter.scss +1 -1
  172. package/scss/components/TagOverflow/_tag-overflow.scss +5 -2
  173. package/scss/components/_index-with-carbon.scss +1 -0
  174. package/telemetry.yml +2 -0
@@ -33,17 +33,17 @@ var ConditionBuilderItemTime = function ConditionBuilderItemTime(_ref) {
33
33
  onChange(timeValue ? timeToUpdate : undefined);
34
34
  // eslint-disable-next-line react-hooks/exhaustive-deps
35
35
  }, [timeValue, dayZoneValue, timeZoneValue]);
36
- var setTimeZone = function setTimeZone(e) {
37
- setTimeZoneValue(e.target.value);
36
+ var setTimeZone = function setTimeZone(evt) {
37
+ setTimeZoneValue(evt.target.value);
38
38
  };
39
- var setDayZone = function setDayZone(e) {
40
- setDayZoneValue(e.target.value);
39
+ var setDayZone = function setDayZone(evt) {
40
+ setDayZoneValue(evt.target.value);
41
41
  };
42
- var setTime = function setTime(e) {
43
- setTimeValue(e.target.value);
42
+ var setTime = function setTime(evt) {
43
+ setTimeValue(evt.target.value);
44
44
  };
45
45
  return /*#__PURE__*/React__default.createElement("div", {
46
- className: "".concat(blockClass, "__condition-builder-item-time")
46
+ className: "".concat(blockClass, "__item-time")
47
47
  }, /*#__PURE__*/React__default.createElement(TimePicker, {
48
48
  id: "time-picker",
49
49
  labelText: "Select a time",
@@ -28,17 +28,17 @@ function ConditionConnector(_ref) {
28
28
  parentGroup.classList.remove('hoveredConnector');
29
29
  }
30
30
  }, []);
31
- var activeConnectorHandler = function activeConnectorHandler(e) {
32
- var parentGroup = e.currentTarget.closest('.eachGroup');
31
+ var activeConnectorHandler = function activeConnectorHandler(evt) {
32
+ var parentGroup = evt.currentTarget.closest('.eachGroup');
33
33
  handleConnectorHover(parentGroup, true);
34
34
  };
35
- var inActiveConnectorHandler = function inActiveConnectorHandler(e) {
36
- var parentGroup = e.currentTarget.closest('.eachGroup');
35
+ var inActiveConnectorHandler = function inActiveConnectorHandler(evt) {
36
+ var parentGroup = evt.currentTarget.closest('.eachGroup');
37
37
  handleConnectorHover(parentGroup, false);
38
38
  };
39
- var onChangeHandler = function onChangeHandler(op, e) {
39
+ var onChangeHandler = function onChangeHandler(op, evt) {
40
40
  onChange(op);
41
- focusThisField(e);
41
+ focusThisField(evt);
42
42
  };
43
43
  return (
44
44
  /*#__PURE__*/
@@ -26,16 +26,16 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
26
26
  onChange = _ref.onChange,
27
27
  conditionBuilderRef = _ref.conditionBuilderRef,
28
28
  className = _ref.className;
29
- var onRemoveHandler = function onRemoveHandler(conditionId, e) {
29
+ var onRemoveHandler = function onRemoveHandler(conditionId, evt) {
30
30
  if (group.conditions.length > 1) {
31
31
  onChange(_objectSpread2(_objectSpread2({}, group), {}, {
32
32
  conditions: group.conditions.filter(function (condition) {
33
33
  return conditionId !== condition.id;
34
34
  })
35
35
  }));
36
- handleFocusOnClose(e);
36
+ handleFocusOnClose(evt);
37
37
  } else {
38
- onRemove();
38
+ onRemove(evt);
39
39
  }
40
40
  };
41
41
  var onChangeHandler = function onChangeHandler(updatedCondition, conditionIndex) {
@@ -59,9 +59,9 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
59
59
  var isLastCondition = function isLastCondition(conditionIndex, conditionArr) {
60
60
  return conditionIndex + 1 >= conditionArr.length || conditionArr.length - 1 != conditionIndex && conditionArr[conditionIndex + 1].conditions;
61
61
  };
62
- var handleFocusOnClose = function handleFocusOnClose(e) {
63
- var _e$currentTarget;
64
- var previousClose = (_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.closest('[role="row"]')) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.previousSibling) === null || _e$currentTarget === void 0 ? void 0 : _e$currentTarget.querySelector('[data-name="closeCondition"]');
62
+ var handleFocusOnClose = function handleFocusOnClose(evt) {
63
+ var _evt$currentTarget;
64
+ var previousClose = (_evt$currentTarget = evt.currentTarget) === null || _evt$currentTarget === void 0 || (_evt$currentTarget = _evt$currentTarget.closest('[role="row"]')) === null || _evt$currentTarget === void 0 || (_evt$currentTarget = _evt$currentTarget.parentElement) === null || _evt$currentTarget === void 0 || (_evt$currentTarget = _evt$currentTarget.previousSibling) === null || _evt$currentTarget === void 0 ? void 0 : _evt$currentTarget.querySelector('[data-name="closeCondition"]');
65
65
  if (previousClose) {
66
66
  previousClose.focus();
67
67
  }
@@ -76,7 +76,7 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
76
76
  return /*#__PURE__*/React__default.createElement("div", {
77
77
  key: eachCondition.id
78
78
  }, eachCondition.conditions && /*#__PURE__*/React__default.createElement(ConditionGroupBuilder, {
79
- className: "".concat(blockClass, "__condition-builder__group"),
79
+ className: "".concat(blockClass, "__group"),
80
80
  aria: {
81
81
  level: aria.level + 1,
82
82
  posinset: conditionIndex + 1,
@@ -86,8 +86,8 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
86
86
  onChange: function onChange(updatedCondition) {
87
87
  onChangeHandler(updatedCondition, conditionIndex);
88
88
  },
89
- onRemove: function onRemove(e) {
90
- onRemoveHandler(eachCondition.id, e);
89
+ onRemove: function onRemove(evt) {
90
+ onRemoveHandler(eachCondition.id, evt);
91
91
  },
92
92
  conditionBuilderRef: conditionBuilderRef
93
93
  }), !eachCondition.conditions && /*#__PURE__*/React__default.createElement(ConditionBlock, {
@@ -106,8 +106,8 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
106
106
  onChangeHandler(updatedConditions, conditionIndex);
107
107
  },
108
108
  addConditionHandler: addConditionHandler,
109
- onRemove: function onRemove(e) {
110
- onRemoveHandler(eachCondition.id, e);
109
+ onRemove: function onRemove(evt) {
110
+ onRemoveHandler(eachCondition.id, evt);
111
111
  },
112
112
  onConnectorOperatorChange: function onConnectorOperatorChange(op) {
113
113
  onChange(_objectSpread2(_objectSpread2({}, group), {}, {
@@ -0,0 +1 @@
1
+ export function checkForHoldingKey(evt: any, key: any): any;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 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
+
8
+ var checkForHoldingKey = function checkForHoldingKey(evt, key) {
9
+ // possible key inputs: altKey,ctrlKey,metaKey,shiftKey
10
+ if (key === 'cmd') {
11
+ return evt.metaKey || evt.ctrlKey;
12
+ }
13
+ return evt[key];
14
+ };
15
+
16
+ export { checkForHoldingKey };
@@ -0,0 +1 @@
1
+ export function handleKeyDown(evt: any, conditionBuilderRef: any): void;
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 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
+
8
+ import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
9
+ import { blockClass } from '../ConditionBuilderContext/DataConfigs.js';
10
+ import { checkForHoldingKey } from './checkForHoldingKey.js';
11
+ import { focusThisField, traverseReverse, traverseClockVise } from './util.js';
12
+
13
+ var handleKeyDown = function handleKeyDown(evt, conditionBuilderRef) {
14
+ var activeElement = document.activeElement;
15
+ if (activeElement.closest("[role=\"dialog\"]")) {
16
+ handleKeyPressForPopover(evt, activeElement.closest("[role=\"dialog\"]"));
17
+ } else {
18
+ handleKeyPressForMainContent(evt, conditionBuilderRef);
19
+ }
20
+ };
21
+ var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentContainer) {
22
+ var _parentContainer$quer;
23
+ var key = evt.key;
24
+ var isHoldingShiftKey = checkForHoldingKey(evt, 'shiftKey');
25
+ var isMultiSelect = (_parentContainer$quer = parentContainer.querySelector('ul')) === null || _parentContainer$quer === void 0 ? void 0 : _parentContainer$quer.dataset.multiSelect;
26
+ var allItems = [];
27
+ switch (key) {
28
+ case 'ArrowUp':
29
+ //traverse through the popover options, search box, selectAll button
30
+ parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
31
+ traverseReverse(eachElem, index, allElements);
32
+ });
33
+ break;
34
+ case 'ArrowDown':
35
+ //traverse through the popover options, search box, selectAll button
36
+ parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
37
+ traverseClockVise(eachElem, index, allElements);
38
+ });
39
+ break;
40
+ case 'Tab':
41
+ allItems = [].concat(_toConsumableArray(Array.from(parentContainer.querySelectorAll(".".concat(blockClass, "__selectAll-button,[role=\"searchbox\"]")))), [parentContainer.querySelector("[role=\"option\"]")]);
42
+ allItems.forEach(function (eachElem, index, allElements) {
43
+ if (isHoldingShiftKey) {
44
+ traverseReverse(eachElem, index, allElements, true, true);
45
+ } else {
46
+ traverseClockVise(eachElem, index, allElements, true, true);
47
+ }
48
+ });
49
+ evt.preventDefault();
50
+ break;
51
+ case ' ':
52
+ if (isMultiSelect === 'true') {
53
+ if (document.activeElement.type !== 'button') {
54
+ var _document$activeEleme;
55
+ //for button , enter key is click which already handled by framework, for other elements trigger click
56
+ (_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || _document$activeEleme.click();
57
+ }
58
+ evt.preventDefault();
59
+ }
60
+ break;
61
+ case 'Enter':
62
+ if (isMultiSelect !== 'true') {
63
+ if (document.activeElement.type !== 'button') {
64
+ var _document$activeEleme2;
65
+ //for button , enter key is click which already handled by framework, else trigger click
66
+ (_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.click();
67
+ focusThisField(evt);
68
+ }
69
+ }
70
+ break;
71
+ case 'Escape':
72
+ //focus the corresponding field in which the popover is triggered
73
+ focusThisField(evt);
74
+ break;
75
+ }
76
+ };
77
+ var getRows = function getRows(conditionBuilderRef) {
78
+ return Array.from(conditionBuilderRef.current.querySelectorAll('[role="row"]'));
79
+ };
80
+ var getRowIndex = function getRowIndex(element, conditionBuilderRef) {
81
+ var rows = getRows(conditionBuilderRef);
82
+ return rows.findIndex(function (row) {
83
+ return row.contains(element);
84
+ });
85
+ };
86
+ var handleRowNavigation = function handleRowNavigation(evt, conditionBuilderRef) {
87
+ var rows = getRows(conditionBuilderRef);
88
+ var currentRowIndex = getRowIndex(evt.target, conditionBuilderRef);
89
+ navigateToNextRowCell(evt, currentRowIndex, rows);
90
+ };
91
+ var navigateToNextRowCell = function navigateToNextRowCell(evt, currentRowIndex, rows) {
92
+ var _nextRow$querySelecto;
93
+ //when the focussed element is a cell of the row which has only 1 cell (connector or statement) , focus the next row
94
+
95
+ var nextRowIndex = currentRowIndex;
96
+ if (evt.key === 'ArrowUp') {
97
+ nextRowIndex = currentRowIndex == 0 ? currentRowIndex : currentRowIndex - 1;
98
+ }
99
+ if (evt.key === 'ArrowDown') {
100
+ nextRowIndex = currentRowIndex === rows.length - 1 ? rows.length - 1 : currentRowIndex + 1;
101
+ }
102
+ var nextRow = rows[nextRowIndex];
103
+ var itemName = evt.target.dataset.name;
104
+ nextRow === null || nextRow === void 0 || (_nextRow$querySelecto = nextRow.querySelector("[data-name=\"".concat(itemName, "\"]"))) === null || _nextRow$querySelecto === void 0 || _nextRow$querySelecto.focus();
105
+ };
106
+ var handleKeyPressForMainContent = function handleKeyPressForMainContent(evt, conditionBuilderRef) {
107
+ switch (evt.key) {
108
+ case 'ArrowRight':
109
+ case 'ArrowLeft':
110
+ conditionBuilderRef.current.querySelectorAll("[role=\"gridcell\"] button").forEach(function (eachElem, index, allElements) {
111
+ if (evt.key === 'ArrowRight') {
112
+ traverseClockVise(eachElem, index, allElements);
113
+ } else {
114
+ traverseReverse(eachElem, index, allElements);
115
+ }
116
+ });
117
+ break;
118
+ case 'ArrowUp':
119
+ case 'ArrowDown':
120
+ handleRowNavigation(evt, conditionBuilderRef);
121
+ break;
122
+ }
123
+ };
124
+
125
+ export { handleKeyDown };
@@ -1,4 +1,4 @@
1
- export function focusThisField(e: any): void;
1
+ export function focusThisField(evt: any): void;
2
2
  export function focusThisItem(currentElement: any): void;
3
3
  export function traverseClockVise(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any): void;
4
4
  export function traverseReverse(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any): void;
@@ -5,12 +5,41 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- var focusThisField = function focusThisField(e) {
8
+ var focusThisField = function focusThisField(evt) {
9
9
  setTimeout(function () {
10
- var _e$target$closest, _e$target$closest2;
11
- (_e$target$closest = e.target.closest('[role="gridcell"]')) === null || _e$target$closest === void 0 || (_e$target$closest = _e$target$closest.querySelector('button')) === null || _e$target$closest === void 0 || _e$target$closest.click();
12
- (_e$target$closest2 = e.target.closest('[role="gridcell"]')) === null || _e$target$closest2 === void 0 || (_e$target$closest2 = _e$target$closest2.querySelector('button')) === null || _e$target$closest2 === void 0 || _e$target$closest2.focus();
10
+ var _evt$target$closest, _evt$target$closest2;
11
+ (_evt$target$closest = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest === void 0 || (_evt$target$closest = _evt$target$closest.querySelector('button')) === null || _evt$target$closest === void 0 || _evt$target$closest.click();
12
+ (_evt$target$closest2 = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest2 === void 0 || (_evt$target$closest2 = _evt$target$closest2.querySelector('button')) === null || _evt$target$closest2 === void 0 || _evt$target$closest2.focus();
13
13
  }, 0);
14
14
  };
15
+ var focusThisItem = function focusThisItem(currentElement) {
16
+ setTimeout(function () {
17
+ //document.activeElement.setAttribute('tabindex', '-1');
18
+ // currentElement.setAttribute('tabindex', '0');
19
+ currentElement === null || currentElement === void 0 || currentElement.focus();
20
+ }, 0);
21
+ };
22
+ var traverseClockVise = function traverseClockVise(eachElem, index, allElements, rotate, trapFocus) {
23
+ if (eachElem == document.activeElement) {
24
+ if (index !== allElements.length - 1) {
25
+ focusThisItem(allElements[index + 1]);
26
+ } else {
27
+ focusThisItem(allElements[rotate ? 0 : allElements.length - 1]);
28
+ }
29
+ } else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
30
+ focusThisItem(allElements[0]);
31
+ }
32
+ };
33
+ var traverseReverse = function traverseReverse(eachElem, index, allElements, rotate, trapFocus) {
34
+ if (eachElem == document.activeElement) {
35
+ if (index !== 0) {
36
+ focusThisItem(allElements[index - 1]);
37
+ } else {
38
+ focusThisItem(allElements[rotate ? allElements.length - 1 : 0]);
39
+ }
40
+ } else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
41
+ focusThisItem(allElements[allElements.length - 1]);
42
+ }
43
+ };
15
44
 
16
- export { focusThisField };
45
+ export { focusThisField, focusThisItem, traverseClockVise, traverseReverse };
@@ -62,7 +62,7 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
62
62
  return /*#__PURE__*/React__default.createElement(ProgressStep, {
63
63
  label: step.title,
64
64
  key: stepIndex,
65
- secondaryLabel: step.secondaryLabel,
65
+ secondaryLabel: step.secondaryLabel || undefined,
66
66
  invalid: step.invalid
67
67
  });
68
68
  })));
@@ -1,2 +1,95 @@
1
- export let CreateTearsheetStep: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- import React from 'react';
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 React, { PropsWithChildren } from 'react';
8
+ type fieldsetLegendTextProps = {
9
+ /**
10
+ * This optional prop will render your form content inside of a fieldset html element
11
+ * and is defaulted to true.
12
+ * You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
13
+ */
14
+ hasFieldset: false;
15
+ /**
16
+ * This is the required legend text that appears above a fieldset html element for accessibility purposes.
17
+ * You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
18
+ * Otherwise, use CSS to hide/remove this label text.
19
+ */
20
+ fieldsetLegendText?: string;
21
+ } | {
22
+ /**
23
+ * This optional prop will render your form content inside of a fieldset html element
24
+ * and is defaulted to true.
25
+ * You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
26
+ */
27
+ hasFieldset?: true;
28
+ /**
29
+ * This is the required legend text that appears above a fieldset html element for accessibility purposes.
30
+ * You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
31
+ * Otherwise, use CSS to hide/remove this label text.
32
+ */
33
+ fieldsetLegendText: string;
34
+ };
35
+ interface CreateTearsheetStepBaseProps extends PropsWithChildren {
36
+ /**
37
+ * Content that shows in the tearsheet step
38
+ */
39
+ children?: React.ReactNode;
40
+ /**
41
+ * Sets an optional className to be added to the tearsheet step
42
+ */
43
+ className?: string;
44
+ /**
45
+ * Sets an optional description on the step component
46
+ */
47
+ description?: React.ReactNode;
48
+ /**
49
+ * This will conditionally disable the submit button in the multi step Tearsheet
50
+ */
51
+ disableSubmit?: boolean;
52
+ /**
53
+ * This prop is used to help track dynamic steps. If this value is `false` then the step is not included in the visible steps or the ProgressIndicator
54
+ * steps. If this value is `true` then the step will be included in the list of visible steps, as well as being included in the ProgressIndicator step list
55
+ */
56
+ includeStep?: boolean;
57
+ /**
58
+ * This prop can be used on the first step to mark it as an intro step, which will not render the progress indicator steps
59
+ */
60
+ introStep?: boolean;
61
+ /**
62
+ * This optional prop will indicate an error icon on the progress indicator step item
63
+ */
64
+ invalid?: boolean;
65
+ /**
66
+ * Optional function to be called on initial mount of a step.
67
+ * For example, this can be used to fetch data that is required on a particular step.
68
+ */
69
+ onMount?: () => void;
70
+ /**
71
+ * Optional function to be called when you move to the next step.
72
+ * For example, this can be used to validate input fields before proceeding to the next step.
73
+ * This function can _optionally_ return a promise that is either resolved or rejected and the CreateTearsheet will handle the submitting state of the next button.
74
+ */
75
+ onNext?: () => Promise<void>;
76
+ /**
77
+ * Optional function to be called when you move to the previous step.
78
+ */
79
+ onPrevious?: () => void;
80
+ /**
81
+ * Sets the optional secondary label on the progress step component
82
+ */
83
+ secondaryLabel?: string;
84
+ /**
85
+ * Sets an optional subtitle on the step component
86
+ */
87
+ subtitle?: string;
88
+ /**
89
+ * Sets the title text for a tearsheet step
90
+ */
91
+ title: React.ReactNode;
92
+ }
93
+ type CreateTearsheetStepProps = CreateTearsheetStepBaseProps & fieldsetLegendTextProps;
94
+ export declare let CreateTearsheetStep: React.ForwardRefExoticComponent<CreateTearsheetStepProps & React.RefAttributes<unknown>>;
95
+ export {};
@@ -46,7 +46,7 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
46
46
  rest = _objectWithoutProperties(_ref, _excluded);
47
47
  var stepsContext = useContext(StepsContext);
48
48
  var stepNumber = useContext(StepNumberContext);
49
- var _useState = useState(),
49
+ var _useState = useState(includeStep),
50
50
  _useState2 = _slicedToArray(_useState, 2),
51
51
  shouldIncludeStep = _useState2[0],
52
52
  setShouldIncludeStep = _useState2[1];
@@ -56,11 +56,11 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
56
56
  useRetrieveStepData({
57
57
  stepsContext: stepsContext,
58
58
  stepNumber: stepNumber,
59
- introStep: introStep,
59
+ introStep: !!introStep,
60
60
  shouldIncludeStep: shouldIncludeStep,
61
- secondaryLabel: secondaryLabel,
61
+ secondaryLabel: secondaryLabel || '',
62
62
  title: title,
63
- invalid: invalid
63
+ invalid: !!invalid
64
64
  });
65
65
 
66
66
  // This useEffect reports back the onMount value so that they can be used
@@ -80,7 +80,7 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
80
80
  // steps container context so that it can manage the 'Next' button appropriately.
81
81
  useEffect(function () {
82
82
  if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
83
- stepsContext.setIsDisabled(disableSubmit);
83
+ stepsContext.setIsDisabled(!!disableSubmit);
84
84
  stepsContext === null || stepsContext === void 0 || stepsContext.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
85
85
  stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
86
86
  }
@@ -144,6 +144,7 @@ CreateTearsheetStep.propTypes = {
144
144
  * You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
145
145
  * Otherwise, use CSS to hide/remove this label text.
146
146
  */
147
+ /**@ts-ignore*/
147
148
  fieldsetLegendText: PropTypes.string.isRequired.if(function (_ref2) {
148
149
  var hasFieldset = _ref2.hasFieldset;
149
150
  return !!hasFieldset;
@@ -153,6 +154,7 @@ CreateTearsheetStep.propTypes = {
153
154
  * and is defaulted to true.
154
155
  * You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
155
156
  */
157
+ /**@ts-ignore*/
156
158
  hasFieldset: PropTypes.bool,
157
159
  /**
158
160
  * This prop is used to help track dynamic steps. If this value is `false` then the step is not included in the visible steps or the ProgressIndicator
@@ -205,8 +205,9 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
205
205
  }
206
206
  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)) {
207
207
  if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) !== 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header') {
208
+ var _activeCellFullData$r;
208
209
  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;
209
- setActiveCellContent(activeCellFullData.render('Cell'));
210
+ setActiveCellContent((_activeCellFullData$r = activeCellFullData === null || activeCellFullData === void 0 ? void 0 : activeCellFullData.render('Cell')) !== null && _activeCellFullData$r !== void 0 ? _activeCellFullData$r : null);
210
211
  }
211
212
  if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' || (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header') {
212
213
  setActiveCellContent(null);
@@ -414,8 +415,8 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
414
415
  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;
415
416
  var activeCellValue;
416
417
  if (activeCellFullData && activeCellCoordinates !== null && activeCellCoordinates !== void 0 && activeCellCoordinates.column) {
417
- var _activeCellFullData$r;
418
- activeCellValue = activeCellFullData ? (_activeCellFullData$r = activeCellFullData.row.cells) === null || _activeCellFullData$r === void 0 || (_activeCellFullData$r = _activeCellFullData$r[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column]) === null || _activeCellFullData$r === void 0 ? void 0 : _activeCellFullData$r.value : null;
418
+ var _activeCellFullData$r2;
419
+ 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;
419
420
  }
420
421
  setCellEditorValue(activeCellValue || '');
421
422
  if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {
@@ -59,6 +59,11 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
59
59
  var scrollContainer = ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.querySelector(".".concat(blockClass, "__list--container"));
60
60
  var hasScrollBar = (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) > (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight);
61
61
  var scrollBarValue = hasScrollBar ? 0 : scrollBarSize;
62
+
63
+ // fix for a11y violation element_scrollable_tabbable
64
+ if (!(scrollContainer !== null && scrollContainer !== void 0 && scrollContainer.getAttribute('tabIndex'))) {
65
+ scrollContainer === null || scrollContainer === void 0 || scrollContainer.setAttribute('tabIndex', '0');
66
+ }
62
67
  setScrollBarSizeValue(scrollBarValue);
63
68
  }
64
69
  }, [cellSize, ref, scrollBarSize, previousState === null || previousState === void 0 ? void 0 : previousState.cellSize]);
@@ -87,7 +87,7 @@ var DatagridContent = function DatagridContent(_ref) {
87
87
  var renderTable = function renderTable() {
88
88
  var _getTableProps;
89
89
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Table, _extends({}, getTableProps(), {
90
- className: cx(withVirtualScroll ? '' : "".concat(blockClass, "__table-simple"), "".concat(blockClass, "__vertical-align-").concat(verticalAlign), _defineProperty({}, "".concat(blockClass, "__variable-row-height"), variableRowHeight), _defineProperty({}, "".concat(blockClass, "__table-with-inline-edit"), withInlineEdit), _defineProperty({}, "".concat(blockClass, "__table-grid-active"), gridActive), _defineProperty({}, "".concat(blockClass, "__table-is-resizing"), typeof (columnResizing === null || columnResizing === void 0 ? void 0 : columnResizing.isResizingColumn) === 'string'), (_getTableProps = getTableProps()) === null || _getTableProps === void 0 ? void 0 : _getTableProps.className),
90
+ className: cx(withVirtualScroll ? "".concat(blockClass, "__table-virtual-scroll") : "".concat(blockClass, "__table-simple"), "".concat(blockClass, "__vertical-align-").concat(verticalAlign), _defineProperty({}, "".concat(blockClass, "__variable-row-height"), variableRowHeight), _defineProperty({}, "".concat(blockClass, "__table-with-inline-edit"), withInlineEdit), _defineProperty({}, "".concat(blockClass, "__table-grid-active"), gridActive), _defineProperty({}, "".concat(blockClass, "__table-is-resizing"), typeof (columnResizing === null || columnResizing === void 0 ? void 0 : columnResizing.isResizingColumn) === 'string'), (_getTableProps = getTableProps()) === null || _getTableProps === void 0 ? void 0 : _getTableProps.className),
91
91
  role: withInlineEdit ? 'grid' : undefined,
92
92
  tabIndex: withInlineEdit ? 0 : -1,
93
93
  onKeyDown: /* istanbul ignore next */
@@ -106,7 +106,7 @@ var DatagridContent = function DatagridContent(_ref) {
106
106
  return handleGridFocus(inlineEditState, dispatch);
107
107
  },
108
108
  title: title
109
- }), !withVirtualScroll && /*#__PURE__*/React__default.createElement(DatagridHead, datagridState), /*#__PURE__*/React__default.createElement(DatagridBody, _extends({}, datagridState, {
109
+ }), (!withVirtualScroll || withVirtualScroll && !isFetching && !contentRows.length) && /*#__PURE__*/React__default.createElement(DatagridHead, datagridState), /*#__PURE__*/React__default.createElement(DatagridBody, _extends({}, datagridState, {
110
110
  rows: contentRows
111
111
  }))), (filterProps === null || filterProps === void 0 ? void 0 : filterProps.variation) === 'panel' && renderPagination());
112
112
  };
@@ -20,7 +20,7 @@ import { useInitialColumnSort } from '../useInitialColumnSort.js';
20
20
  var _th;
21
21
  var _excluded = ["role"],
22
22
  _excluded2 = ["className", "role"],
23
- _excluded3 = ["role", "className"];
23
+ _excluded3 = ["role"];
24
24
  var blockClass = "".concat(pkg.prefix, "--datagrid");
25
25
  var getAccessibilityProps = function getAccessibilityProps(header) {
26
26
  var props = {};
@@ -176,11 +176,10 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
176
176
  var originalCol = visibleColumns[index];
177
177
  var _header$getHeaderProp = header.getHeaderProps();
178
178
  _header$getHeaderProp.role;
179
- var headerClassName = _header$getHeaderProp.className,
180
- headerProps = _objectWithoutProperties(_header$getHeaderProp, _excluded3);
179
+ var headerProps = _objectWithoutProperties(_header$getHeaderProp, _excluded3);
181
180
  var resizerProps = header === null || header === void 0 || (_header$getResizerPro = header.getResizerProps) === null || _header$getResizerPro === void 0 ? void 0 : _header$getResizerPro.call(header);
182
181
  return /*#__PURE__*/React__default.createElement(TableHeader, _extends({}, headerProps, {
183
- className: cx(headerClassName, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__resizableColumn"), resizerProps), "".concat(blockClass, "__isResizing"), header.isResizing), "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), "".concat(blockClass, "__isSorted"), header.isSorted), "".concat(blockClass, "__header-actions-column"), header.isAction), "".concat(blockClass, "__with-slug"), header.slug && /*#__PURE__*/React__default.isValidElement(header.slug))),
182
+ className: cx(header.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__resizableColumn"), resizerProps), "".concat(blockClass, "__isResizing"), header.isResizing), "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), "".concat(blockClass, "__isSorted"), header.isSorted), "".concat(blockClass, "__header-actions-column"), header.isAction), "".concat(blockClass, "__with-slug"), header.slug && /*#__PURE__*/React__default.isValidElement(header.slug))),
184
183
  key: header.id,
185
184
  "aria-hidden": header.id === 'spacer' && 'true'
186
185
  }, getAccessibilityProps(header)), header.render('Header'), renderSlug(header.slug), resizerProps && !header.isAction && /*#__PURE__*/React__default.createElement(ResizeHeader, {
@@ -39,7 +39,8 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
39
39
  page = datagridState.page,
40
40
  handleResize = datagridState.handleResize,
41
41
  gridRef = datagridState.gridRef,
42
- tableId = datagridState.tableId;
42
+ tableId = datagridState.tableId,
43
+ onVirtualScroll = datagridState.onVirtualScroll;
43
44
 
44
45
  /* istanbul ignore next */
45
46
  var handleVirtualGridResize = function handleVirtualGridResize() {
@@ -89,6 +90,9 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
89
90
  },
90
91
  estimatedItemSize: rowHeight,
91
92
  onScroll: onScroll,
93
+ onItemsRendered: function onItemsRendered(e) {
94
+ return onVirtualScroll === null || onVirtualScroll === void 0 ? void 0 : onVirtualScroll(e);
95
+ },
92
96
  innerRef: innerListRef,
93
97
  outerRef: testRef,
94
98
  ref: listRef,
@@ -1,4 +1,5 @@
1
1
  import React, { PropsWithChildren, ReactNode } from 'react';
2
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
2
3
  type ActionIcon = {
3
4
  id?: string;
4
5
  icon?: () => void | object;
@@ -50,7 +51,7 @@ interface ExpressiveCardProps extends PropsWithChildren {
50
51
  /**
51
52
  * Provides the icon that's displayed at the top of the card
52
53
  */
53
- pictogram?: () => void | object;
54
+ pictogram?: CarbonIconType;
54
55
  /**
55
56
  * Optionally specify an href for your Button to become an <a> element
56
57
  */