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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. package/css/index-full-carbon.css +45 -37
  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 +5 -0
  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 +45 -37
  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 +708 -37
  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/DatagridHeaderRow.js +3 -4
  52. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  53. package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  54. package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
  55. package/es/components/Guidebanner/Guidebanner.js +8 -7
  56. package/es/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  57. package/es/components/Guidebanner/GuidebannerElement.js +4 -4
  58. package/es/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  59. package/es/components/Guidebanner/GuidebannerElementButton.js +10 -4
  60. package/es/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  61. package/es/components/Guidebanner/GuidebannerElementLink.js +3 -3
  62. package/es/components/InterstitialScreen/InterstitialScreen.js +3 -1
  63. package/es/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  64. package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
  65. package/es/components/NotificationsPanel/NotificationsPanel.js +0 -1
  66. package/es/components/PageHeader/PageHeader.d.ts +298 -5
  67. package/es/components/PageHeader/PageHeader.js +98 -47
  68. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  69. package/es/components/PageHeader/PageHeaderUtils.js +4 -1
  70. package/es/components/SidePanel/SidePanel.d.ts +6 -2
  71. package/es/components/SidePanel/SidePanel.js +17 -2
  72. package/es/components/SidePanel/constants.d.ts +1 -0
  73. package/es/components/SidePanel/constants.js +1 -0
  74. package/es/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  75. package/es/components/SingleAddSelect/SingleAddSelect.js +2 -1
  76. package/es/components/TagOverflow/TagOverflow.js +35 -20
  77. package/es/components/TagOverflow/TagOverflowModal.d.ts +3 -1
  78. package/es/components/TagOverflow/TagOverflowModal.js +14 -20
  79. package/es/components/TagOverflow/TagOverflowPopover.js +19 -4
  80. package/es/components/Tearsheet/Tearsheet.d.ts +132 -6
  81. package/es/components/Tearsheet/Tearsheet.js +25 -13
  82. package/es/components/Tearsheet/TearsheetShell.d.ts +5 -1
  83. package/es/components/Tearsheet/TearsheetShell.js +26 -4
  84. package/es/components/WebTerminal/WebTerminal.d.ts +4 -0
  85. package/es/components/WebTerminal/WebTerminal.js +11 -3
  86. package/es/global/js/hooks/useFocus.d.ts +3 -1
  87. package/es/global/js/hooks/useFocus.js +6 -3
  88. package/es/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  89. package/es/global/js/hooks/useRetrieveStepData.js +1 -1
  90. package/lib/components/AddSelect/AddSelect.d.ts +44 -2
  91. package/lib/components/AddSelect/AddSelect.js +7 -3
  92. package/lib/components/AddSelect/AddSelectBody.d.ts +44 -2
  93. package/lib/components/AddSelect/AddSelectBody.js +10 -12
  94. package/lib/components/AddSelect/AddSelectSort.d.ts +16 -17
  95. package/lib/components/AddSelect/AddSelectSort.js +5 -5
  96. package/lib/components/AddSelect/types/index.d.ts +44 -0
  97. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
  98. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
  99. package/lib/components/Card/Card.js +1 -1
  100. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -3
  101. package/lib/components/ConditionBuilder/ConditionBuilder.js +6 -1
  102. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +3 -3
  103. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
  104. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -2
  105. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
  106. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
  107. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +1 -1
  108. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +29 -17
  109. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -3
  110. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +7 -7
  111. package/lib/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +6 -6
  112. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +11 -11
  113. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +1 -0
  114. package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +20 -0
  115. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
  116. package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +129 -0
  117. package/lib/components/ConditionBuilder/utils/util.d.ts +1 -1
  118. package/lib/components/ConditionBuilder/utils/util.js +36 -4
  119. package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -1
  120. package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
  121. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
  122. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +4 -3
  123. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
  124. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -4
  125. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  126. package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
  127. package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
  128. package/lib/components/Guidebanner/Guidebanner.js +8 -7
  129. package/lib/components/Guidebanner/GuidebannerElement.d.ts +30 -17
  130. package/lib/components/Guidebanner/GuidebannerElement.js +4 -4
  131. package/lib/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
  132. package/lib/components/Guidebanner/GuidebannerElementButton.js +10 -4
  133. package/lib/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
  134. package/lib/components/Guidebanner/GuidebannerElementLink.js +3 -3
  135. package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -1
  136. package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
  137. package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
  138. package/lib/components/NotificationsPanel/NotificationsPanel.js +0 -1
  139. package/lib/components/PageHeader/PageHeader.d.ts +298 -5
  140. package/lib/components/PageHeader/PageHeader.js +98 -47
  141. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  142. package/lib/components/PageHeader/PageHeaderUtils.js +4 -1
  143. package/lib/components/SidePanel/SidePanel.d.ts +6 -2
  144. package/lib/components/SidePanel/SidePanel.js +17 -2
  145. package/lib/components/SidePanel/constants.d.ts +1 -0
  146. package/lib/components/SidePanel/constants.js +1 -0
  147. package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
  148. package/lib/components/SingleAddSelect/SingleAddSelect.js +2 -1
  149. package/lib/components/TagOverflow/TagOverflow.js +34 -19
  150. package/lib/components/TagOverflow/TagOverflowModal.d.ts +3 -1
  151. package/lib/components/TagOverflow/TagOverflowModal.js +14 -20
  152. package/lib/components/TagOverflow/TagOverflowPopover.js +19 -4
  153. package/lib/components/Tearsheet/Tearsheet.d.ts +132 -6
  154. package/lib/components/Tearsheet/Tearsheet.js +25 -13
  155. package/lib/components/Tearsheet/TearsheetShell.d.ts +5 -1
  156. package/lib/components/Tearsheet/TearsheetShell.js +26 -4
  157. package/lib/components/WebTerminal/WebTerminal.d.ts +4 -0
  158. package/lib/components/WebTerminal/WebTerminal.js +11 -3
  159. package/lib/global/js/hooks/useFocus.d.ts +3 -1
  160. package/lib/global/js/hooks/useFocus.js +6 -3
  161. package/lib/global/js/hooks/useRetrieveStepData.d.ts +1 -1
  162. package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
  163. package/package.json +3 -3
  164. package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
  165. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +4 -4
  166. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +34 -34
  167. package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
  168. package/scss/components/StringFormatter/_string-formatter.scss +1 -1
  169. package/scss/components/TagOverflow/_tag-overflow.scss +5 -2
  170. package/scss/components/_index-with-carbon.scss +1 -0
  171. package/telemetry.yml +2 -0
@@ -41,6 +41,7 @@ var ConditionBuilderItemOption = function ConditionBuilderItemOption(_ref) {
41
41
  filteredItems = _useState4[0],
42
42
  setFilteredItems = _useState4[1];
43
43
  var selection = Array.isArray(conditionState.value) ? conditionState.value : conditionState.value !== undefined ? [conditionState.value] : [];
44
+ var contentRef = React.useRef();
44
45
  React.useEffect(function () {
45
46
  if (!allOptions && getOptions) {
46
47
  var fetchData = /*#__PURE__*/function () {
@@ -71,8 +72,18 @@ var ConditionBuilderItemOption = function ConditionBuilderItemOption(_ref) {
71
72
  }
72
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
73
74
  }, []);
74
- var handleSelectAll = function handleSelectAll(e) {
75
- if (e.currentTarget.dataset.selectedAll == 'false') {
75
+ React.useEffect(function () {
76
+ //this will focus the first input field in the popover
77
+
78
+ if (contentRef.current) {
79
+ var _contentRef$current;
80
+ var firstFocusableElement = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.querySelector('input, button,li');
81
+ firstFocusableElement === null || firstFocusableElement === void 0 || firstFocusableElement.focus();
82
+ }
83
+ // eslint-disable-next-line react-hooks/exhaustive-deps
84
+ }, [allOptions]);
85
+ var handleSelectAll = function handleSelectAll(evt) {
86
+ if (evt.currentTarget.dataset.selectedAll == 'false') {
76
87
  onChange(undefined);
77
88
  } else {
78
89
  onChange(allOptions.map(function (op) {
@@ -80,31 +91,32 @@ var ConditionBuilderItemOption = function ConditionBuilderItemOption(_ref) {
80
91
  }));
81
92
  }
82
93
  };
83
- var onSearchChangeHandler = function onSearchChangeHandler(e) {
84
- var value = e.target.value;
94
+ var onSearchChangeHandler = function onSearchChangeHandler(evt) {
95
+ var value = evt.target.value;
85
96
  var _filteredItems = allOptions.filter(function (opt) {
86
97
  return opt.label.toLowerCase().includes(value.toLowerCase());
87
98
  });
88
99
  setFilteredItems(_filteredItems);
89
100
  };
90
- var onClickHandler = function onClickHandler(e, option, isSelected) {
101
+ var onClickHandler = function onClickHandler(evt, option, isSelected) {
91
102
  if (multiSelectable) {
92
103
  if (isSelected) {
93
104
  var items = selection.filter(function (v) {
94
105
  return v !== option.id;
95
106
  });
96
- onChange(items.length > 0 ? items : undefined, e);
107
+ onChange(items.length > 0 ? items : undefined, evt);
97
108
  } else {
98
- onChange([].concat(_rollupPluginBabelHelpers.toConsumableArray(selection), [option.id]), e);
109
+ onChange([].concat(_rollupPluginBabelHelpers.toConsumableArray(selection), [option.id]), evt);
99
110
  }
100
111
  } else {
101
- onChange(option.id, e);
112
+ onChange(option.id, evt);
102
113
  }
103
114
  };
104
115
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, allOptions && /*#__PURE__*/React__default["default"].createElement("div", {
105
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-option")
116
+ className: "".concat(DataConfigs.blockClass, "__item-option"),
117
+ ref: contentRef
106
118
  }, (config.includeSearch || allOptions.length > popOverSearchThreshold) && /*#__PURE__*/React__default["default"].createElement("div", {
107
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-option__search")
119
+ className: "".concat(DataConfigs.blockClass, "__item-option__search")
108
120
  }, /*#__PURE__*/React__default["default"].createElement(react.Search, {
109
121
  size: "sm",
110
122
  labelText: DataConfigs.translateWithId('clear_search'),
@@ -130,25 +142,25 @@ var ConditionBuilderItemOption = function ConditionBuilderItemOption(_ref) {
130
142
  key: option.id,
131
143
  role: "option",
132
144
  "aria-selected": isSelected,
133
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-option__option"),
145
+ className: "".concat(DataConfigs.blockClass, "__item-option__option"),
134
146
  onKeyUp: function onKeyUp() {
135
147
  return false;
136
148
  },
137
- onClick: function onClick(e) {
138
- return onClickHandler(e, option, isSelected);
149
+ onClick: function onClick(evt) {
150
+ return onClickHandler(evt, option, isSelected);
139
151
  }
140
152
  }, /*#__PURE__*/React__default["default"].createElement("div", {
141
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-option__option-content")
153
+ className: "".concat(DataConfigs.blockClass, "__item-option__option-content")
142
154
  }, multiSelectable ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
143
155
  className: "".concat(DataConfigs.blockClass, "__option-check-box")
144
156
  }, isSelected ? _CheckboxCheckedFille || (_CheckboxCheckedFille = /*#__PURE__*/React__default["default"].createElement(icons.CheckboxCheckedFilled, null)) : _Checkbox || (_Checkbox = /*#__PURE__*/React__default["default"].createElement(icons.Checkbox, null))), /*#__PURE__*/React__default["default"].createElement("span", {
145
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-option__option-label")
157
+ className: "".concat(DataConfigs.blockClass, "__item-option__option-label")
146
158
  }, option.label), Icon && /*#__PURE__*/React__default["default"].createElement("span", {
147
159
  className: "".concat(DataConfigs.blockClass, "__option-icon")
148
160
  }, /*#__PURE__*/React__default["default"].createElement(Icon, null))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
149
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-option__option-label")
161
+ className: "".concat(DataConfigs.blockClass, "__item-option__option-label")
150
162
  }, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, null), option.label), isSelected && /*#__PURE__*/React__default["default"].createElement(icons.Checkmark, {
151
- className: "".concat(DataConfigs.blockClass, "__condition-builder-checkmark")
163
+ className: "".concat(DataConfigs.blockClass, "__checkmark")
152
164
  }))));
153
165
  }))), !allOptions && (_SelectSkeleton || (_SelectSkeleton = /*#__PURE__*/React__default["default"].createElement(react.SelectSkeleton, null))));
154
166
  };
@@ -23,14 +23,14 @@ var ConditionBuilderItemText = function ConditionBuilderItemText(_ref) {
23
23
  var conditionState = _ref.conditionState,
24
24
  _onChange = _ref.onChange;
25
25
  return /*#__PURE__*/React__default["default"].createElement("div", {
26
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-text")
26
+ className: "".concat(DataConfigs.blockClass, "__item-text")
27
27
  }, /*#__PURE__*/React__default["default"].createElement(react.TextInput, {
28
28
  labelText: conditionState.property,
29
29
  hideLabel: true,
30
30
  value: (_conditionState$value = conditionState.value) !== null && _conditionState$value !== void 0 ? _conditionState$value : '',
31
31
  id: (_conditionState$prope = conditionState.property) === null || _conditionState$prope === void 0 ? void 0 : _conditionState$prope.replace(/\s/g, ''),
32
- onChange: function onChange(e) {
33
- _onChange(e.target.value);
32
+ onChange: function onChange(evt) {
33
+ _onChange(evt.target.value);
34
34
  }
35
35
  }));
36
36
  };
@@ -41,17 +41,17 @@ var ConditionBuilderItemTime = function ConditionBuilderItemTime(_ref) {
41
41
  onChange(timeValue ? timeToUpdate : undefined);
42
42
  // eslint-disable-next-line react-hooks/exhaustive-deps
43
43
  }, [timeValue, dayZoneValue, timeZoneValue]);
44
- var setTimeZone = function setTimeZone(e) {
45
- setTimeZoneValue(e.target.value);
44
+ var setTimeZone = function setTimeZone(evt) {
45
+ setTimeZoneValue(evt.target.value);
46
46
  };
47
- var setDayZone = function setDayZone(e) {
48
- setDayZoneValue(e.target.value);
47
+ var setDayZone = function setDayZone(evt) {
48
+ setDayZoneValue(evt.target.value);
49
49
  };
50
- var setTime = function setTime(e) {
51
- setTimeValue(e.target.value);
50
+ var setTime = function setTime(evt) {
51
+ setTimeValue(evt.target.value);
52
52
  };
53
53
  return /*#__PURE__*/React__default["default"].createElement("div", {
54
- className: "".concat(DataConfigs.blockClass, "__condition-builder-item-time")
54
+ className: "".concat(DataConfigs.blockClass, "__item-time")
55
55
  }, /*#__PURE__*/React__default["default"].createElement(react.TimePicker, {
56
56
  id: "time-picker",
57
57
  labelText: "Select a time",
@@ -36,17 +36,17 @@ function ConditionConnector(_ref) {
36
36
  parentGroup.classList.remove('hoveredConnector');
37
37
  }
38
38
  }, []);
39
- var activeConnectorHandler = function activeConnectorHandler(e) {
40
- var parentGroup = e.currentTarget.closest('.eachGroup');
39
+ var activeConnectorHandler = function activeConnectorHandler(evt) {
40
+ var parentGroup = evt.currentTarget.closest('.eachGroup');
41
41
  handleConnectorHover(parentGroup, true);
42
42
  };
43
- var inActiveConnectorHandler = function inActiveConnectorHandler(e) {
44
- var parentGroup = e.currentTarget.closest('.eachGroup');
43
+ var inActiveConnectorHandler = function inActiveConnectorHandler(evt) {
44
+ var parentGroup = evt.currentTarget.closest('.eachGroup');
45
45
  handleConnectorHover(parentGroup, false);
46
46
  };
47
- var onChangeHandler = function onChangeHandler(op, e) {
47
+ var onChangeHandler = function onChangeHandler(op, evt) {
48
48
  onChange(op);
49
- util.focusThisField(e);
49
+ util.focusThisField(evt);
50
50
  };
51
51
  return (
52
52
  /*#__PURE__*/
@@ -34,16 +34,16 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
34
34
  onChange = _ref.onChange,
35
35
  conditionBuilderRef = _ref.conditionBuilderRef,
36
36
  className = _ref.className;
37
- var onRemoveHandler = function onRemoveHandler(conditionId, e) {
37
+ var onRemoveHandler = function onRemoveHandler(conditionId, evt) {
38
38
  if (group.conditions.length > 1) {
39
39
  onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
40
40
  conditions: group.conditions.filter(function (condition) {
41
41
  return conditionId !== condition.id;
42
42
  })
43
43
  }));
44
- handleFocusOnClose(e);
44
+ handleFocusOnClose(evt);
45
45
  } else {
46
- onRemove();
46
+ onRemove(evt);
47
47
  }
48
48
  };
49
49
  var onChangeHandler = function onChangeHandler(updatedCondition, conditionIndex) {
@@ -67,9 +67,9 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
67
67
  var isLastCondition = function isLastCondition(conditionIndex, conditionArr) {
68
68
  return conditionIndex + 1 >= conditionArr.length || conditionArr.length - 1 != conditionIndex && conditionArr[conditionIndex + 1].conditions;
69
69
  };
70
- var handleFocusOnClose = function handleFocusOnClose(e) {
71
- var _e$currentTarget;
72
- 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"]');
70
+ var handleFocusOnClose = function handleFocusOnClose(evt) {
71
+ var _evt$currentTarget;
72
+ 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"]');
73
73
  if (previousClose) {
74
74
  previousClose.focus();
75
75
  }
@@ -84,7 +84,7 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
84
84
  return /*#__PURE__*/React__default["default"].createElement("div", {
85
85
  key: eachCondition.id
86
86
  }, eachCondition.conditions && /*#__PURE__*/React__default["default"].createElement(ConditionGroupBuilder, {
87
- className: "".concat(DataConfigs.blockClass, "__condition-builder__group"),
87
+ className: "".concat(DataConfigs.blockClass, "__group"),
88
88
  aria: {
89
89
  level: aria.level + 1,
90
90
  posinset: conditionIndex + 1,
@@ -94,8 +94,8 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
94
94
  onChange: function onChange(updatedCondition) {
95
95
  onChangeHandler(updatedCondition, conditionIndex);
96
96
  },
97
- onRemove: function onRemove(e) {
98
- onRemoveHandler(eachCondition.id, e);
97
+ onRemove: function onRemove(evt) {
98
+ onRemoveHandler(eachCondition.id, evt);
99
99
  },
100
100
  conditionBuilderRef: conditionBuilderRef
101
101
  }), !eachCondition.conditions && /*#__PURE__*/React__default["default"].createElement(ConditionBlock["default"], {
@@ -114,8 +114,8 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
114
114
  onChangeHandler(updatedConditions, conditionIndex);
115
115
  },
116
116
  addConditionHandler: addConditionHandler,
117
- onRemove: function onRemove(e) {
118
- onRemoveHandler(eachCondition.id, e);
117
+ onRemove: function onRemove(evt) {
118
+ onRemoveHandler(eachCondition.id, evt);
119
119
  },
120
120
  onConnectorOperatorChange: function onConnectorOperatorChange(op) {
121
121
  onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
@@ -0,0 +1 @@
1
+ export function checkForHoldingKey(evt: any, key: any): any;
@@ -0,0 +1,20 @@
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
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var checkForHoldingKey = function checkForHoldingKey(evt, key) {
13
+ // possible key inputs: altKey,ctrlKey,metaKey,shiftKey
14
+ if (key === 'cmd') {
15
+ return evt.metaKey || evt.ctrlKey;
16
+ }
17
+ return evt[key];
18
+ };
19
+
20
+ exports.checkForHoldingKey = checkForHoldingKey;
@@ -0,0 +1 @@
1
+ export function handleKeyDown(evt: any, conditionBuilderRef: any): void;
@@ -0,0 +1,129 @@
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
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var DataConfigs = require('../ConditionBuilderContext/DataConfigs.js');
14
+ var checkForHoldingKey = require('./checkForHoldingKey.js');
15
+ var util = require('./util.js');
16
+
17
+ var handleKeyDown = function handleKeyDown(evt, conditionBuilderRef) {
18
+ var activeElement = document.activeElement;
19
+ if (activeElement.closest("[role=\"dialog\"]")) {
20
+ handleKeyPressForPopover(evt, activeElement.closest("[role=\"dialog\"]"));
21
+ } else {
22
+ handleKeyPressForMainContent(evt, conditionBuilderRef);
23
+ }
24
+ };
25
+ var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentContainer) {
26
+ var _parentContainer$quer;
27
+ var key = evt.key;
28
+ var isHoldingShiftKey = checkForHoldingKey.checkForHoldingKey(evt, 'shiftKey');
29
+ var isMultiSelect = (_parentContainer$quer = parentContainer.querySelector('ul')) === null || _parentContainer$quer === void 0 ? void 0 : _parentContainer$quer.dataset.multiSelect;
30
+ var allItems = [];
31
+ switch (key) {
32
+ case 'ArrowUp':
33
+ //traverse through the popover options, search box, selectAll button
34
+ parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
35
+ util.traverseReverse(eachElem, index, allElements);
36
+ });
37
+ break;
38
+ case 'ArrowDown':
39
+ //traverse through the popover options, search box, selectAll button
40
+ parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
41
+ util.traverseClockVise(eachElem, index, allElements);
42
+ });
43
+ break;
44
+ case 'Tab':
45
+ allItems = [].concat(_rollupPluginBabelHelpers.toConsumableArray(Array.from(parentContainer.querySelectorAll(".".concat(DataConfigs.blockClass, "__selectAll-button,[role=\"searchbox\"]")))), [parentContainer.querySelector("[role=\"option\"]")]);
46
+ allItems.forEach(function (eachElem, index, allElements) {
47
+ if (isHoldingShiftKey) {
48
+ util.traverseReverse(eachElem, index, allElements, true, true);
49
+ } else {
50
+ util.traverseClockVise(eachElem, index, allElements, true, true);
51
+ }
52
+ });
53
+ evt.preventDefault();
54
+ break;
55
+ case ' ':
56
+ if (isMultiSelect === 'true') {
57
+ if (document.activeElement.type !== 'button') {
58
+ var _document$activeEleme;
59
+ //for button , enter key is click which already handled by framework, for other elements trigger click
60
+ (_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || _document$activeEleme.click();
61
+ }
62
+ evt.preventDefault();
63
+ }
64
+ break;
65
+ case 'Enter':
66
+ if (isMultiSelect !== 'true') {
67
+ if (document.activeElement.type !== 'button') {
68
+ var _document$activeEleme2;
69
+ //for button , enter key is click which already handled by framework, else trigger click
70
+ (_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.click();
71
+ util.focusThisField(evt);
72
+ }
73
+ }
74
+ break;
75
+ case 'Escape':
76
+ //focus the corresponding field in which the popover is triggered
77
+ util.focusThisField(evt);
78
+ break;
79
+ }
80
+ };
81
+ var getRows = function getRows(conditionBuilderRef) {
82
+ return Array.from(conditionBuilderRef.current.querySelectorAll('[role="row"]'));
83
+ };
84
+ var getRowIndex = function getRowIndex(element, conditionBuilderRef) {
85
+ var rows = getRows(conditionBuilderRef);
86
+ return rows.findIndex(function (row) {
87
+ return row.contains(element);
88
+ });
89
+ };
90
+ var handleRowNavigation = function handleRowNavigation(evt, conditionBuilderRef) {
91
+ var rows = getRows(conditionBuilderRef);
92
+ var currentRowIndex = getRowIndex(evt.target, conditionBuilderRef);
93
+ navigateToNextRowCell(evt, currentRowIndex, rows);
94
+ };
95
+ var navigateToNextRowCell = function navigateToNextRowCell(evt, currentRowIndex, rows) {
96
+ var _nextRow$querySelecto;
97
+ //when the focussed element is a cell of the row which has only 1 cell (connector or statement) , focus the next row
98
+
99
+ var nextRowIndex = currentRowIndex;
100
+ if (evt.key === 'ArrowUp') {
101
+ nextRowIndex = currentRowIndex == 0 ? currentRowIndex : currentRowIndex - 1;
102
+ }
103
+ if (evt.key === 'ArrowDown') {
104
+ nextRowIndex = currentRowIndex === rows.length - 1 ? rows.length - 1 : currentRowIndex + 1;
105
+ }
106
+ var nextRow = rows[nextRowIndex];
107
+ var itemName = evt.target.dataset.name;
108
+ nextRow === null || nextRow === void 0 || (_nextRow$querySelecto = nextRow.querySelector("[data-name=\"".concat(itemName, "\"]"))) === null || _nextRow$querySelecto === void 0 || _nextRow$querySelecto.focus();
109
+ };
110
+ var handleKeyPressForMainContent = function handleKeyPressForMainContent(evt, conditionBuilderRef) {
111
+ switch (evt.key) {
112
+ case 'ArrowRight':
113
+ case 'ArrowLeft':
114
+ conditionBuilderRef.current.querySelectorAll("[role=\"gridcell\"] button").forEach(function (eachElem, index, allElements) {
115
+ if (evt.key === 'ArrowRight') {
116
+ util.traverseClockVise(eachElem, index, allElements);
117
+ } else {
118
+ util.traverseReverse(eachElem, index, allElements);
119
+ }
120
+ });
121
+ break;
122
+ case 'ArrowUp':
123
+ case 'ArrowDown':
124
+ handleRowNavigation(evt, conditionBuilderRef);
125
+ break;
126
+ }
127
+ };
128
+
129
+ exports.handleKeyDown = 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;
@@ -9,12 +9,44 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
- var focusThisField = function focusThisField(e) {
12
+ var focusThisField = function focusThisField(evt) {
13
13
  setTimeout(function () {
14
- var _e$target$closest, _e$target$closest2;
15
- (_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();
16
- (_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();
14
+ var _evt$target$closest, _evt$target$closest2;
15
+ (_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();
16
+ (_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();
17
17
  }, 0);
18
18
  };
19
+ var focusThisItem = function focusThisItem(currentElement) {
20
+ setTimeout(function () {
21
+ //document.activeElement.setAttribute('tabindex', '-1');
22
+ // currentElement.setAttribute('tabindex', '0');
23
+ currentElement === null || currentElement === void 0 || currentElement.focus();
24
+ }, 0);
25
+ };
26
+ var traverseClockVise = function traverseClockVise(eachElem, index, allElements, rotate, trapFocus) {
27
+ if (eachElem == document.activeElement) {
28
+ if (index !== allElements.length - 1) {
29
+ focusThisItem(allElements[index + 1]);
30
+ } else {
31
+ focusThisItem(allElements[rotate ? 0 : allElements.length - 1]);
32
+ }
33
+ } else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
34
+ focusThisItem(allElements[0]);
35
+ }
36
+ };
37
+ var traverseReverse = function traverseReverse(eachElem, index, allElements, rotate, trapFocus) {
38
+ if (eachElem == document.activeElement) {
39
+ if (index !== 0) {
40
+ focusThisItem(allElements[index - 1]);
41
+ } else {
42
+ focusThisItem(allElements[rotate ? allElements.length - 1 : 0]);
43
+ }
44
+ } else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
45
+ focusThisItem(allElements[allElements.length - 1]);
46
+ }
47
+ };
19
48
 
20
49
  exports.focusThisField = focusThisField;
50
+ exports.focusThisItem = focusThisItem;
51
+ exports.traverseClockVise = traverseClockVise;
52
+ exports.traverseReverse = traverseReverse;
@@ -71,7 +71,7 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
71
71
  return /*#__PURE__*/React__default["default"].createElement(react.ProgressStep, {
72
72
  label: step.title,
73
73
  key: stepIndex,
74
- secondaryLabel: step.secondaryLabel,
74
+ secondaryLabel: step.secondaryLabel || undefined,
75
75
  invalid: step.invalid
76
76
  });
77
77
  })));
@@ -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 {};
@@ -55,7 +55,7 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
55
55
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
56
56
  var stepsContext = React.useContext(CreateTearsheet.StepsContext);
57
57
  var stepNumber = React.useContext(CreateTearsheet.StepNumberContext);
58
- var _useState = React.useState(),
58
+ var _useState = React.useState(includeStep),
59
59
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
60
60
  shouldIncludeStep = _useState2[0],
61
61
  setShouldIncludeStep = _useState2[1];
@@ -65,11 +65,11 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
65
65
  useRetrieveStepData.useRetrieveStepData({
66
66
  stepsContext: stepsContext,
67
67
  stepNumber: stepNumber,
68
- introStep: introStep,
68
+ introStep: !!introStep,
69
69
  shouldIncludeStep: shouldIncludeStep,
70
- secondaryLabel: secondaryLabel,
70
+ secondaryLabel: secondaryLabel || '',
71
71
  title: title,
72
- invalid: invalid
72
+ invalid: !!invalid
73
73
  });
74
74
 
75
75
  // This useEffect reports back the onMount value so that they can be used
@@ -89,7 +89,7 @@ exports.CreateTearsheetStep = /*#__PURE__*/React.forwardRef(function (_ref, ref)
89
89
  // steps container context so that it can manage the 'Next' button appropriately.
90
90
  React.useEffect(function () {
91
91
  if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
92
- stepsContext.setIsDisabled(disableSubmit);
92
+ stepsContext.setIsDisabled(!!disableSubmit);
93
93
  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
94
94
  stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
95
95
  }
@@ -153,6 +153,7 @@ exports.CreateTearsheetStep.propTypes = {
153
153
  * 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.
154
154
  * Otherwise, use CSS to hide/remove this label text.
155
155
  */
156
+ /**@ts-ignore*/
156
157
  fieldsetLegendText: index["default"].string.isRequired.if(function (_ref2) {
157
158
  var hasFieldset = _ref2.hasFieldset;
158
159
  return !!hasFieldset;
@@ -162,6 +163,7 @@ exports.CreateTearsheetStep.propTypes = {
162
163
  * and is defaulted to true.
163
164
  * 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.
164
165
  */
166
+ /**@ts-ignore*/
165
167
  hasFieldset: index["default"].bool,
166
168
  /**
167
169
  * 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
@@ -214,8 +214,9 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
214
214
  }
215
215
  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)) {
216
216
  if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) !== 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header') {
217
+ var _activeCellFullData$r;
217
218
  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;
218
- setActiveCellContent(activeCellFullData.render('Cell'));
219
+ setActiveCellContent((_activeCellFullData$r = activeCellFullData === null || activeCellFullData === void 0 ? void 0 : activeCellFullData.render('Cell')) !== null && _activeCellFullData$r !== void 0 ? _activeCellFullData$r : null);
219
220
  }
220
221
  if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' || (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header') {
221
222
  setActiveCellContent(null);
@@ -423,8 +424,8 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
423
424
  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;
424
425
  var activeCellValue;
425
426
  if (activeCellFullData && activeCellCoordinates !== null && activeCellCoordinates !== void 0 && activeCellCoordinates.column) {
426
- var _activeCellFullData$r;
427
- 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;
427
+ var _activeCellFullData$r2;
428
+ 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;
428
429
  }
429
430
  setCellEditorValue(activeCellValue || '');
430
431
  if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {