@carbon/ibm-products 2.42.1-canary.27 → 2.42.1-canary.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/css/index-full-carbon.css +9 -302
  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.css +9 -302
  6. package/css/index-without-carbon.css.map +1 -1
  7. package/css/index-without-carbon.min.css +1 -1
  8. package/css/index-without-carbon.min.css.map +1 -1
  9. package/css/index.css +9 -302
  10. package/css/index.css.map +1 -1
  11. package/css/index.min.css +1 -1
  12. package/css/index.min.css.map +1 -1
  13. package/es/components/Carousel/Carousel.d.ts +1 -1
  14. package/es/components/Carousel/Carousel.js +1 -1
  15. package/es/components/Coachmark/CoachmarkDragbar.d.ts +1 -1
  16. package/es/components/Coachmark/CoachmarkDragbar.js +1 -1
  17. package/es/components/Coachmark/CoachmarkHeader.d.ts +1 -1
  18. package/es/components/Coachmark/CoachmarkHeader.js +1 -1
  19. package/es/components/Coachmark/CoachmarkOverlay.d.ts +1 -1
  20. package/es/components/Coachmark/CoachmarkOverlay.js +1 -1
  21. package/es/components/Coachmark/CoachmarkTagline.d.ts +1 -1
  22. package/es/components/Coachmark/CoachmarkTagline.js +1 -1
  23. package/es/components/CoachmarkStack/CoachmarkStackHome.d.ts +1 -1
  24. package/es/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  25. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +0 -6
  26. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +33 -74
  27. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +1 -15
  28. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +12 -95
  29. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +2 -11
  30. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +9 -27
  31. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +0 -5
  32. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +14 -95
  33. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
  34. package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +0 -1
  35. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +0 -7
  36. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -8
  37. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  38. package/es/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.js +33 -38
  39. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +67 -197
  40. package/es/components/ConditionBuilder/utils/util.d.ts +0 -1
  41. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  42. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +1 -1
  43. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -0
  44. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -7
  45. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +1 -7
  46. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +0 -1
  47. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -13
  48. package/es/components/Datagrid/types/index.d.ts +0 -2
  49. package/es/components/Datagrid/useColumnOrder.d.ts +1 -7
  50. package/es/components/Datagrid/useFiltering.d.ts +1 -8
  51. package/es/components/Datagrid/useFiltering.js +7 -8
  52. package/es/components/Datagrid/useFlexResize.d.ts +1 -1
  53. package/es/components/Datagrid/useFlexResize.js +11 -11
  54. package/es/components/Datagrid/useNestedRows.js +2 -24
  55. package/es/components/Datagrid/useOnRowClick.d.ts +1 -8
  56. package/es/components/Datagrid/useOnRowClick.js +1 -2
  57. package/es/components/Datagrid/useRowIsMouseOver.d.ts +1 -2
  58. package/es/components/Datagrid/useRowIsMouseOver.js +1 -1
  59. package/es/components/Datagrid/useSelectRows.d.ts +1 -8
  60. package/es/components/Datagrid/useSelectRows.js +2 -3
  61. package/es/components/Datagrid/useSortableColumns.d.ts +3 -10
  62. package/es/components/Datagrid/useSortableColumns.js +2 -3
  63. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +1 -8
  64. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.js +7 -0
  65. package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +1 -1
  66. package/es/components/InterstitialScreenView/InterstitialScreenView.js +1 -1
  67. package/es/components/SidePanel/SidePanel.d.ts +2 -2
  68. package/es/components/SidePanel/SidePanel.js +5 -9
  69. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +1 -1
  70. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
  71. package/es/global/js/package-settings.js +2 -2
  72. package/lib/components/Carousel/Carousel.d.ts +1 -1
  73. package/lib/components/Carousel/Carousel.js +1 -1
  74. package/lib/components/Coachmark/CoachmarkDragbar.d.ts +1 -1
  75. package/lib/components/Coachmark/CoachmarkDragbar.js +1 -1
  76. package/lib/components/Coachmark/CoachmarkHeader.d.ts +1 -1
  77. package/lib/components/Coachmark/CoachmarkHeader.js +1 -1
  78. package/lib/components/Coachmark/CoachmarkOverlay.d.ts +1 -1
  79. package/lib/components/Coachmark/CoachmarkOverlay.js +1 -1
  80. package/lib/components/Coachmark/CoachmarkTagline.d.ts +1 -1
  81. package/lib/components/Coachmark/CoachmarkTagline.js +1 -1
  82. package/lib/components/CoachmarkStack/CoachmarkStackHome.d.ts +1 -1
  83. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  84. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +0 -6
  85. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +32 -73
  86. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +1 -15
  87. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +9 -92
  88. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +2 -11
  89. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +8 -26
  90. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +0 -5
  91. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +11 -92
  92. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
  93. package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +0 -1
  94. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +0 -7
  95. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -8
  96. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
  97. package/lib/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.js +31 -36
  98. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +64 -195
  99. package/lib/components/ConditionBuilder/utils/util.d.ts +0 -1
  100. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
  101. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +1 -1
  102. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -0
  103. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -7
  104. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +1 -7
  105. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +0 -1
  106. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -13
  107. package/lib/components/Datagrid/types/index.d.ts +0 -2
  108. package/lib/components/Datagrid/useColumnOrder.d.ts +1 -7
  109. package/lib/components/Datagrid/useFiltering.d.ts +1 -8
  110. package/lib/components/Datagrid/useFiltering.js +7 -8
  111. package/lib/components/Datagrid/useFlexResize.d.ts +1 -1
  112. package/lib/components/Datagrid/useFlexResize.js +11 -11
  113. package/lib/components/Datagrid/useNestedRows.js +2 -24
  114. package/lib/components/Datagrid/useOnRowClick.d.ts +1 -8
  115. package/lib/components/Datagrid/useOnRowClick.js +1 -2
  116. package/lib/components/Datagrid/useRowIsMouseOver.d.ts +1 -2
  117. package/lib/components/Datagrid/useRowIsMouseOver.js +1 -1
  118. package/lib/components/Datagrid/useSelectRows.d.ts +1 -8
  119. package/lib/components/Datagrid/useSelectRows.js +2 -3
  120. package/lib/components/Datagrid/useSortableColumns.d.ts +3 -10
  121. package/lib/components/Datagrid/useSortableColumns.js +2 -3
  122. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +1 -8
  123. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +7 -0
  124. package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +1 -1
  125. package/lib/components/InterstitialScreenView/InterstitialScreenView.js +1 -1
  126. package/lib/components/SidePanel/SidePanel.d.ts +2 -2
  127. package/lib/components/SidePanel/SidePanel.js +5 -9
  128. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +1 -1
  129. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
  130. package/lib/global/js/package-settings.js +2 -2
  131. package/package.json +2 -2
  132. package/scss/components/ConditionBuilder/_condition-builder.scss +1 -21
  133. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +3 -22
  134. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +21 -58
  135. package/scss/components/NonLinearReading/_non-linear-reading.scss +1 -1
  136. package/telemetry.yml +0 -23
  137. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +0 -2
  138. package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +0 -44
  139. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +0 -10
  140. package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +0 -69
  141. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +0 -2
  142. package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +0 -52
  143. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +0 -10
  144. package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +0 -77
  145. /package/es/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.d.ts +0 -0
  146. /package/lib/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.d.ts +0 -0
@@ -2,4 +2,3 @@ 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
- export function checkForHoldingKey(evt: any, key: any): any;
@@ -194,7 +194,7 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
194
194
  headerProps = _rollupPluginBabelHelpers["extends"]({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(_header$getHeaderProp), _header$getHeaderProp));
195
195
  var resizerProps = header === null || header === void 0 || (_header$getResizerPro = header.getResizerProps) === null || _header$getResizerPro === void 0 ? void 0 : _header$getResizerPro.call(header);
196
196
  return /*#__PURE__*/React__default["default"].createElement(react.TableHeader, _rollupPluginBabelHelpers["extends"]({}, headerProps, {
197
- className: cx__default["default"](header === null || header === void 0 ? void 0 : header.className, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__resizableColumn"), resizerProps), "".concat(blockClass, "__isResizing"), header === null || header === void 0 ? void 0 : header.isResizing), "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), "".concat(blockClass, "__isSorted"), header === null || header === void 0 ? void 0 : header.isSorted), "".concat(blockClass, "__header-actions-column"), header === null || header === void 0 ? void 0 : header.isAction), "".concat(blockClass, "__with-slug"), header.slug && /*#__PURE__*/React__default["default"].isValidElement(header === null || header === void 0 ? void 0 : header.slug)), headerProps.className),
197
+ className: cx__default["default"](header === null || header === void 0 ? void 0 : header.className, _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__resizableColumn"), resizerProps), "".concat(blockClass, "__isResizing"), header === null || header === void 0 ? void 0 : header.isResizing), "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), "".concat(blockClass, "__isSorted"), header === null || header === void 0 ? void 0 : header.isSorted), "".concat(blockClass, "__header-actions-column"), header === null || header === void 0 ? void 0 : header.isAction), "".concat(blockClass, "__with-slug"), header.slug && /*#__PURE__*/React__default["default"].isValidElement(header === null || header === void 0 ? void 0 : header.slug))),
198
198
  key: header.id,
199
199
  "aria-hidden": header.id === 'spacer' && 'true'
200
200
  }, getAccessibilityProps(header)), header.render('Header'), renderSlug(header.slug), resizerProps && !header.isAction && /*#__PURE__*/React__default["default"].createElement(ResizeHeader, {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2020, 2024
2
+ * Copyright IBM Corp. 2020, 2023
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -15,6 +15,7 @@ var reactWindow = require('react-window');
15
15
  var react = require('@carbon/react');
16
16
  var settings = require('../../../settings.js');
17
17
  var DatagridHead = require('./DatagridHead.js');
18
+ var layout = require('@carbon/layout');
18
19
  var useResizeObserver = require('../../../global/js/hooks/useResizeObserver.js');
19
20
 
20
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -79,6 +80,10 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
79
80
  if (headWrapEl) {
80
81
  headWrapEl.scrollLeft = virtualBody === null || virtualBody === void 0 ? void 0 : virtualBody.scrollLeft;
81
82
  }
83
+ var spacerColumn = document.querySelector("#".concat(tableId, " .").concat(blockClass, "__head-wrap thead th:last-child"));
84
+ if (spacerColumn) {
85
+ spacerColumn.style.width = layout.px(32 + (virtualBody.offsetWidth - virtualBody.clientWidth)); // scrollbar width to header column to fix header alignment
86
+ }
82
87
  }
83
88
  var testRefValue = testRef === null || testRef === void 0 ? void 0 : testRef.current;
84
89
  testRefValue === null || testRefValue === void 0 || testRefValue.addEventListener('scroll', handleScroll);
@@ -82,7 +82,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
82
82
  };
83
83
  var onCheckboxCheck = function onCheckboxCheck(col, value) {
84
84
  var changedDefinitions = columnObjects.map(function (definition) {
85
- if ((Array.isArray(col) && col.indexOf(definition) != -1 || definition.id === col.id) && definition.canFilter && !definition.disabled) {
85
+ if (Array.isArray(col) && col.indexOf(definition) != -1 || definition.id === col.id) {
86
86
  return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, definition), {}, {
87
87
  isVisible: value
88
88
  });
@@ -106,12 +106,9 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
106
106
  React.useEffect(function () {
107
107
  var notFilterableCount = columnObjects.filter(function (col) {
108
108
  return !col.canFilter;
109
- }).length;
110
- var actionCount = columnObjects.filter(function (col) {
111
- return col.id === 'actions';
112
- }).length;
113
- setVisibleColumnsCount(getVisibleColumnsCount() - notFilterableCount - actionCount);
114
- setTotalColumns(columnObjects.length - notFilterableCount - actionCount);
109
+ });
110
+ setVisibleColumnsCount(getVisibleColumnsCount() - notFilterableCount.length);
111
+ setTotalColumns(columnObjects.length - notFilterableCount.length);
115
112
  }, [getVisibleColumnsCount, columnObjects]);
116
113
  return /*#__PURE__*/React__default["default"].createElement(TearsheetNarrow.TearsheetNarrow, {
117
114
  className: "".concat(blockClass, "__customize-columns-tearsheet"),
@@ -1,8 +1,2 @@
1
- /**
2
- * Copyright IBM Corp. 2023, 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
- declare const useFilterContext: () => any;
8
1
  export default useFilterContext;
2
+ declare function useFilterContext(): any;
@@ -20,7 +20,6 @@ export namespace InlineEditCell {
20
20
  rows: PropTypes.Requireable<(object | null | undefined)[]>;
21
21
  rowSize: PropTypes.Requireable<string>;
22
22
  tableId: PropTypes.Requireable<string>;
23
- cellEditing: PropTypes.Requireable<object>;
24
23
  }>>;
25
24
  let nonEditCell: PropTypes.Requireable<boolean>;
26
25
  let placeholder: PropTypes.Requireable<string>;
@@ -45,8 +45,7 @@ var InlineEditCell = function InlineEditCell(_ref) {
45
45
  var columnIndex = instance.columns.findIndex(function (col) {
46
46
  return col.id === columnId;
47
47
  });
48
- var rowIndex = cell.row.index;
49
- var cellId = "column-".concat(columnIndex, "-row-").concat(rowIndex);
48
+ var cellId = "column-".concat(columnIndex, "-row-").concat(cell.row.index);
50
49
  var _useContext = React.useContext(InlineEditContext.InlineEditContext),
51
50
  state = _useContext.state,
52
51
  dispatch = _useContext.dispatch;
@@ -82,14 +81,6 @@ var InlineEditCell = function InlineEditCell(_ref) {
82
81
  var rowSize = instance.rowSize,
83
82
  onDataUpdate = instance.onDataUpdate;
84
83
  var saveCellData;
85
- if (inEditMode) {
86
- instance.cellEditing = {
87
- cellId: cellId,
88
- columnIndex: columnIndex,
89
- rowIndex: rowIndex,
90
- curCellValue: cellValue
91
- };
92
- }
93
84
  React.useEffect(function () {
94
85
  setInitialValue(value);
95
86
  var columnId = cell.column.id;
@@ -463,7 +454,7 @@ var InlineEditCell = function InlineEditCell(_ref) {
463
454
  "data-inline-type": type,
464
455
  onClick: !nonEditCell ? handleInlineCellClick : addActiveState,
465
456
  onKeyDown: !nonEditCell ? handleKeyDown : null,
466
- className: cx__default["default"]("".concat(blockClass, "__inline-edit--outer-cell-button"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__inline-edit--outer-cell-button--").concat(rowSize), rowSize), "".concat(blockClass, "__inline-edit--outer-cell-button--lg"), !rowSize), "".concat(blockClass, "__inline-edit--outer-cell-button--invalid"), inEditMode && (config === null || config === void 0 || (_config$validator = config.validator) === null || _config$validator === void 0 ? void 0 : _config$validator.call(config, cellValue))), "".concat(blockClass, "__static--outer-cell"), !disabledCell))
457
+ className: cx__default["default"]("".concat(blockClass, "__inline-edit--outer-cell-button"), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__inline-edit--outer-cell-button--").concat(rowSize), rowSize), "".concat(blockClass, "__inline-edit--outer-cell-button--lg"), !rowSize), "".concat(blockClass, "__inline-edit--outer-cell-button--invalid"), config === null || config === void 0 || (_config$validator = config.validator) === null || _config$validator === void 0 ? void 0 : _config$validator.call(config, cellValue)), "".concat(blockClass, "__static--outer-cell"), !disabledCell))
467
458
  }, !nonEditCell && !disabledCell && renderRegularCell(), (!inEditMode || disabledCell) && /*#__PURE__*/React__default["default"].createElement(InlineEditButton.InlineEditButton, {
468
459
  isActiveCell: cellId === activeCellId,
469
460
  renderIcon: setRenderIcon(),
@@ -487,8 +478,7 @@ InlineEditCell.propTypes = {
487
478
  onDataUpdate: index["default"].func,
488
479
  rows: index["default"].arrayOf(index["default"].object),
489
480
  rowSize: index["default"].string,
490
- tableId: index["default"].string,
491
- cellEditing: index["default"].object
481
+ tableId: index["default"].string
492
482
  }),
493
483
  nonEditCell: index["default"].bool,
494
484
  placeholder: index["default"].string,
@@ -192,8 +192,6 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
192
192
  onVirtualScroll?: (evt?: boolean) => void;
193
193
  fetchMoreData?: () => void;
194
194
  loadMoreThreshold?: number;
195
- onRowClick?: (row: any, event: any) => void;
196
- onSort?: boolean;
197
195
  }
198
196
  export interface ResizeHeaderProps {
199
197
  resizerProps?: ResizerProps;
@@ -1,8 +1,2 @@
1
- /**
2
- * Copyright IBM Corp. 2022, 2022
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 { useColumnOrder } from 'react-table';
8
1
  export default useColumnOrder;
2
+ import { useColumnOrder } from 'react-table';
@@ -1,9 +1,2 @@
1
- /**
2
- * Copyright IBM Corp. 2022, 2024
3
- *
4
- * This source code is licensed under the Apache-2.0 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import { Hooks } from 'react-table';
8
- declare const useFiltering: (hooks: Hooks) => void;
9
1
  export default useFiltering;
2
+ declare function useFiltering(hooks: any): void;
@@ -67,13 +67,12 @@ var useFiltering = function useFiltering(hooks) {
67
67
  });
68
68
  }, []);
69
69
  hooks.useInstance.push(function (instance) {
70
- var _ref4 = instance,
71
- filterProps = _ref4.filterProps,
72
- setAllFilters = _ref4.setAllFilters,
73
- setFilter = _ref4.setFilter,
74
- headers = _ref4.headers,
75
- data = _ref4.data,
76
- state = _ref4.state;
70
+ var filterProps = instance.filterProps,
71
+ setAllFilters = instance.setAllFilters,
72
+ setFilter = instance.setFilter,
73
+ headers = instance.headers,
74
+ data = instance.data,
75
+ state = instance.state;
77
76
  var defaultProps = {
78
77
  variation: 'flyout',
79
78
  updateMethod: constants.BATCH,
@@ -89,7 +88,7 @@ var useFiltering = function useFiltering(hooks) {
89
88
  });
90
89
  };
91
90
  Object.assign(instance, {
92
- filterProps: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, defaultProps), instance === null || instance === void 0 ? void 0 : instance.filterProps),
91
+ filterProps: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, defaultProps), instance.filterProps),
93
92
  filterTypes: filterTypes,
94
93
  getFilterFlyoutProps: getFilterFlyoutProps,
95
94
  FilterFlyout: FilterFlyout["default"]
@@ -1,6 +1,6 @@
1
1
  export default useFlexResize;
2
2
  /**
3
- * Copyright IBM Corp. 2020, 2024
3
+ * Copyright IBM Corp. 2020, 2023
4
4
  *
5
5
  * This source code is licensed under the Apache-2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
@@ -11,31 +11,31 @@ Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
12
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
13
 
14
- /* eslint-disable no-unreachable */
15
14
  /**
16
- * Copyright IBM Corp. 2020, 2024
15
+ * Copyright IBM Corp. 2020, 2023
17
16
  *
18
17
  * This source code is licensed under the Apache-2.0 license found in the
19
18
  * LICENSE file in the root directory of this source tree.
20
19
  */
21
20
 
22
21
  var useFlexResize = function useFlexResize(hooks) {
22
+ var spacer = {
23
+ id: 'spacer',
24
+ width: 0,
25
+ disableSortBy: true,
26
+ disableResizing: true
27
+ };
23
28
  hooks.visibleColumns.push(function (columns) {
24
- // always move actions to the end
29
+ // always move actions and spacer to the end
25
30
  var actionsIdx = columns.findIndex(function (col) {
26
31
  return col.isAction;
27
32
  });
28
33
  if (actionsIdx === -1) {
29
- var _lastCol = columns.at(-1);
30
- _lastCol.isFlexCol = true;
31
- return _rollupPluginBabelHelpers.toConsumableArray(columns);
34
+ return [].concat(_rollupPluginBabelHelpers.toConsumableArray(columns), [spacer]);
32
35
  }
33
36
  var cols = _rollupPluginBabelHelpers.toConsumableArray(columns);
34
37
  var actions = cols.splice(actionsIdx, 1)[0];
35
- cols.splice(columns.length, 0, actions);
36
- // the last non-action action column should flex remaining space
37
- var lastCol = columns.at(-2);
38
- lastCol.isFlexCol = true;
38
+ cols.splice(columns.length, 0, spacer, actions);
39
39
  return cols;
40
40
  });
41
41
  var changeProps = function changeProps(props, data) {
@@ -43,7 +43,7 @@ var useFlexResize = function useFlexResize(hooks) {
43
43
  if (!column && data.cell) {
44
44
  column = data.cell.column;
45
45
  }
46
- if (column.isFlexCol) {
46
+ if (column.id === spacer.id) {
47
47
  return [props, {
48
48
  style: {
49
49
  flex: '1 1 0'
@@ -23,23 +23,6 @@ var blockClass = "".concat(settings.pkg.prefix, "--datagrid");
23
23
  var useNestedRows = function useNestedRows(hooks) {
24
24
  useNestedRowExpander["default"](hooks);
25
25
  var useInstance = function useInstance(instance) {
26
- React.useEffect(function () {
27
- var rows = instance.rows;
28
- var defaultExpandedRows = rows.filter(function (row) {
29
- var _row$original;
30
- return row === null || row === void 0 || (_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.defaultExpanded;
31
- });
32
- if (defaultExpandedRows !== null && defaultExpandedRows !== void 0 && defaultExpandedRows.length) {
33
- defaultExpandedRows.map(function (defaultExpandedRow) {
34
- if (!defaultExpandedRow.isExpanded && !defaultExpandedRow.hasExpanded) {
35
- var _defaultExpandedRow$t;
36
- defaultExpandedRow === null || defaultExpandedRow === void 0 || (_defaultExpandedRow$t = defaultExpandedRow.toggleRowExpanded) === null || _defaultExpandedRow$t === void 0 || _defaultExpandedRow$t.call(defaultExpandedRow);
37
- defaultExpandedRow.hasExpanded = true;
38
- return;
39
- }
40
- });
41
- }
42
- }, [instance, instance.rows]);
43
26
  // This useEffect will expand rows if they exist in the initialState obj
44
27
  React.useEffect(function () {
45
28
  var rows = instance.rows,
@@ -71,21 +54,16 @@ var useNestedRows = function useNestedRows(hooks) {
71
54
  }
72
55
  }];
73
56
  };
74
- var getIndentation = function getIndentation(depth) {
75
- return 32 * depth + 16;
76
- }; // row indentation padding
77
57
  var getCellProps = function getCellProps(props, _ref3) {
78
58
  var cell = _ref3.cell,
79
59
  instance = _ref3.instance;
80
- // we add a dynamic -ve margin right only if the cell is resized below minimum width i.e 50px, else we set the width based on indentation at different levels
60
+ // reduce the "first cell"s width to compensate added (left) margin
81
61
  var isFirstCell = instance.columns.findIndex(function (c) {
82
62
  return c.id === cell.column.id;
83
63
  }) === 0;
84
64
  return [props, {
85
65
  style: {
86
- marginRight: isFirstCell && cell.row.depth > 0 && parseInt(props.style.width, 10) <= getIndentation(cell.row.depth) + 50 // indentation padding + expander cell or empty cell width
87
- ? "".concat(parseInt(props.style.width, 10) - (getIndentation(cell.row.depth) + 50), "px") : '',
88
- width: isFirstCell && cell.row.depth > 0 ? parseInt(props.style.width, 10) - getIndentation(cell.row.depth) : props.style.width
66
+ marginRight: "".concat(isFirstCell && cell.row.depth > 0 ? "".concat(-32 * cell.row.depth - 18, "px") : '')
89
67
  }
90
68
  }];
91
69
  };
@@ -1,9 +1,2 @@
1
- /**
2
- * Copyright IBM Corp. 2020, 2023
3
- *
4
- * This source code is licensed under the Apache-2.0 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import { Hooks } from 'react-table';
8
- declare const useOnRowClick: (hooks: Hooks) => void;
9
1
  export default useOnRowClick;
2
+ declare function useOnRowClick(hooks: any): void;
@@ -13,8 +13,7 @@ var settings = require('../../settings.js');
13
13
 
14
14
  var useOnRowClick = function useOnRowClick(hooks) {
15
15
  var useInstance = function useInstance(rowInstance) {
16
- var _ref = rowInstance,
17
- onRowClick = _ref.onRowClick;
16
+ var onRowClick = rowInstance.onRowClick;
18
17
  var getRowProps = function getRowProps(props, datagridState) {
19
18
  var isFetching = datagridState.isFetching,
20
19
  row = datagridState.row,
@@ -1,3 +1,2 @@
1
- import { Hooks } from 'react-table';
2
- declare const useRowIsMouseOver: (hooks: Hooks) => void;
3
1
  export default useRowIsMouseOver;
2
+ declare function useRowIsMouseOver(hooks: any): void;
@@ -25,7 +25,7 @@ var useRowIsMouseOver = function useRowIsMouseOver(hooks) {
25
25
  setMouseOverRowIndex = _useState2[1];
26
26
  var onMouseChange = useDebounce(function (datagridState) {
27
27
  var row = datagridState.row;
28
- setMouseOverRowIndex(row === null || row === void 0 ? void 0 : row.index);
28
+ setMouseOverRowIndex(row.index);
29
29
  }, 100);
30
30
  var getRowProps = function getRowProps(props, datagridState) {
31
31
  var onMouseOver = function onMouseOver() {
@@ -1,9 +1,2 @@
1
- /**
2
- * Copyright IBM Corp. 2020, 2023
3
- *
4
- * This source code is licensed under the Apache-2.0 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import { Hooks } from 'react-table';
8
- declare const useSelectRows: (hooks: Hooks) => void;
9
1
  export default useSelectRows;
2
+ declare function useSelectRows(hooks: any): void;
@@ -117,8 +117,7 @@ var SelectRow = function SelectRow(datagridState) {
117
117
  dispatch: dispatch,
118
118
  rowData: row,
119
119
  isChecked: event.target.checked,
120
- getRowId: getRowId,
121
- selectAll: null
120
+ getRowId: getRowId
122
121
  });
123
122
  };
124
123
  var selectDisabled = isFetching || row.getRowProps().disabled;
@@ -138,7 +137,7 @@ var SelectRow = function SelectRow(datagridState) {
138
137
  onSelect: onSelectHandler,
139
138
  id: rowId,
140
139
  name: "".concat(rowId, "-name"),
141
- className: cx__default["default"]([checkboxClass, cellProps.className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && Number(windowSize) > 671)]),
140
+ className: cx__default["default"]([checkboxClass, cellProps.className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(checkboxClass, "-sticky-left"), isFirstColumnStickyLeft && windowSize > 671)]),
142
141
  ariaLabel: title,
143
142
  disabled: selectDisabled
144
143
  }));
@@ -1,13 +1,6 @@
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
- import { Hooks } from 'react-table';
8
- export declare const getNewSortOrder: (sortOrder?: boolean | string) => {
9
- newSortDesc: boolean;
1
+ export function getNewSortOrder(sortOrder: any): {
2
+ newSortDesc: undefined;
10
3
  newOrder: string;
11
4
  };
12
- declare const useSortableColumns: (hooks: Hooks) => void;
13
5
  export default useSortableColumns;
6
+ declare function useSortableColumns(hooks: any): void;
@@ -31,7 +31,7 @@ var ordering = {
31
31
  };
32
32
  var getNewSortOrder = function getNewSortOrder(sortOrder) {
33
33
  var order = {
34
- newSortDesc: false,
34
+ newSortDesc: undefined,
35
35
  newOrder: ordering.NONE
36
36
  };
37
37
  if (sortOrder === false || sortOrder === ordering.DESC) {
@@ -146,8 +146,7 @@ var useSortableColumns = function useSortableColumns(hooks) {
146
146
  return (_instance$customizeCo = instance.customizeColumnsProps) !== null && _instance$customizeCo !== void 0 && _instance$customizeCo.isTearsheetOpen ? visibleColumns : _rollupPluginBabelHelpers.toConsumableArray(sortableColumns);
147
147
  };
148
148
  var sortInstanceProps = function sortInstanceProps(instance) {
149
- var _ref3 = instance,
150
- onSort = _ref3.onSort;
149
+ var onSort = instance.onSort;
151
150
  Object.assign(instance, {
152
151
  manualSortBy: !!onSort,
153
152
  isTableSortable: true
@@ -1,8 +1 @@
1
- /**
2
- * Copyright IBM Corp. 2023, 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 { Row } from 'react-table';
8
- export declare const getAutoSizedColumnWidth: (rows: Array<Row<object>>, accessor: string, headerText: string) => number;
1
+ export function getAutoSizedColumnWidth(rows: Array<object>, accessor: string, headerText: string): number;
@@ -18,6 +18,13 @@ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHel
18
18
  * LICENSE file in the root directory of this source tree.
19
19
  */
20
20
 
21
+ /**
22
+ * Calculates the auto sized width of a column
23
+ * @param {Array<object>} rows - The datagrid rows
24
+ * @param {string} accessor - The accessor for the column
25
+ * @param {string} headerText - The header text for the column
26
+ */
27
+
21
28
  var getAutoSizedColumnWidth = function getAutoSizedColumnWidth(rows, accessor, headerText) {
22
29
  var maxWidth = 400;
23
30
  var minWidth = 58;
@@ -20,7 +20,7 @@ interface InterstitialScreenViewProps extends PropsWithChildren {
20
20
  stepTitle: string;
21
21
  }
22
22
  /**
23
- * An Onboarding component intended to be used as the child elements of the InterstitialScreen component.
23
+ * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
24
24
  */
25
25
  export declare let InterstitialScreenView: React.ForwardRefExoticComponent<InterstitialScreenViewProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export {};
@@ -30,7 +30,7 @@ var _excluded = ["children", "className", "stepTitle"];
30
30
  var blockClass = "".concat(settings.pkg.prefix, "--interstitial-screen-view");
31
31
  var componentName = 'InterstitialScreenView';
32
32
  /**
33
- * An Onboarding component intended to be used as the child elements of the InterstitialScreen component.
33
+ * A Novice to Pro component intended to be used as the child elements of the InterstitialScreen component.
34
34
  */
35
35
  exports.InterstitialScreenView = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
36
36
  var children = _ref.children,
@@ -11,7 +11,7 @@ type SidePanelBaseProps = {
11
11
  /**
12
12
  * Sets the action toolbar buttons
13
13
  */
14
- actionToolbarButtons?: ButtonProps<any>[];
14
+ actionToolbarButtons?: ButtonProps[];
15
15
  /**
16
16
  * The primary actions to be shown in the side panel. Each action is
17
17
  * specified as an object that will render expressive Buttons. Any Button
@@ -20,7 +20,7 @@ type SidePanelBaseProps = {
20
20
  *
21
21
  * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
22
22
  */
23
- actions?: ButtonProps<any>[];
23
+ actions?: ButtonProps[];
24
24
  /**
25
25
  * Determines if the title will animate on scroll
26
26
  */
@@ -104,8 +104,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
104
104
  var subtitleRef = React.useRef(null);
105
105
  var previousState = usePreviousValue.usePreviousValue({
106
106
  size: size,
107
- open: open,
108
- currentStep: currentStep
107
+ open: open
109
108
  });
110
109
  var _useState3 = React.useState(-1),
111
110
  _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
@@ -172,10 +171,9 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
172
171
  if (sidePanelRef && panelRefValue) {
173
172
  var _animatedScrollRef$cu;
174
173
  var scrollableSection = (_animatedScrollRef$cu = animatedScrollRef.current) !== null && _animatedScrollRef$cu !== void 0 ? _animatedScrollRef$cu : innerContentRef.current;
175
- if (previousState && previousState['currentStep'] !== currentStep && scrollableSection) {
174
+ if (scrollableSection) {
176
175
  scrollableSection.scrollTop = 0;
177
176
  }
178
-
179
177
  // The size of the panel has changed while it is still opened
180
178
  // so we need to scroll it to the top and reset the header
181
179
  // height css custom property
@@ -334,12 +332,12 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
334
332
  if (primeFocusEl) {
335
333
  primeFocusEl === null || primeFocusEl === void 0 || primeFocusEl.focus();
336
334
  }
337
- } else if (!slideIn) {
335
+ } else {
338
336
  firstElement === null || firstElement === void 0 || firstElement.focus();
339
337
  }
340
338
  }, 0);
341
339
  }
342
- }, [animationComplete, firstElement, open, selectorPrimaryFocus, slideIn]);
340
+ }, [animationComplete, firstElement, open, selectorPrimaryFocus]);
343
341
  var primaryActionContainerClassNames = cx__default["default"](["".concat(blockClass, "__actions-container"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__actions-container--condensed"), condensedActions)]);
344
342
  var mainPanelClassNames = cx__default["default"]([blockClass, className, "".concat(blockClass), "".concat(blockClass, "--").concat(size), _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--right-placement"), placement === 'right'), "".concat(blockClass, "--left-placement"), placement === 'left'), "".concat(blockClass, "--slide-in"), slideIn), "".concat(blockClass, "--has-slug"), slug), "".concat(blockClass, "--condensed-actions"), condensedActions), "".concat(blockClass, "--has-overlay"), includeOverlay)]);
345
343
  var renderTitle = function renderTitle() {
@@ -459,7 +457,7 @@ exports.SidePanel = /*#__PURE__*/React__default["default"].forwardRef(function (
459
457
  placement: placement,
460
458
  shouldReduceMotion: shouldReduceMotion
461
459
  },
462
- onKeyDown: slideIn ? undefined : keyDownListener
460
+ onKeyDown: keyDownListener
463
461
  }), /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, renderHeader(), renderMain()), /*#__PURE__*/React__default["default"].createElement(MotionActionSet, {
464
462
  actions: actions !== null && actions !== void 0 ? actions : [],
465
463
  className: primaryActionContainerClassNames,
@@ -482,7 +480,6 @@ exports.SidePanel.propTypes = {
482
480
  /**
483
481
  * Sets the action toolbar buttons
484
482
  */
485
- /**@ts-ignore */
486
483
  actionToolbarButtons: index["default"].arrayOf(index["default"].shape({
487
484
  label: index["default"].string,
488
485
  leading: index["default"].bool,
@@ -516,7 +513,6 @@ exports.SidePanel.propTypes = {
516
513
  label: index["default"].string,
517
514
  loading: index["default"].bool,
518
515
  // we duplicate this Button prop to improve the DocGen here
519
- /**@ts-ignore */
520
516
  onClick: react.Button.propTypes.onClick
521
517
  })))]),
522
518
  /**
@@ -20,7 +20,7 @@ interface SteppedAnimatedMediaProps {
20
20
  playStep?: number;
21
21
  }
22
22
  /**
23
- * The SteppedAnimatedMedia is an Onboarding internal component and is not intended for general use.
23
+ * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
24
24
  */
25
25
  export declare const SteppedAnimatedMedia: React.ForwardRefExoticComponent<SteppedAnimatedMediaProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export {};
@@ -38,7 +38,7 @@ var defaults = {
38
38
  playStep: 0
39
39
  };
40
40
  /**
41
- * The SteppedAnimatedMedia is an Onboarding internal component and is not intended for general use.
41
+ * The SteppedAnimatedMedia is a Novice to Pro internal component and is not intended for general use.
42
42
  */
43
43
  var SteppedAnimatedMedia = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
44
44
  var className = _ref.className,
@@ -102,7 +102,7 @@ var defaults = {
102
102
  GetStartedCard: false,
103
103
  /* new component flags here - comment used by generate CLI */
104
104
 
105
- // Onboarding components not yet reviewed and released:
105
+ // Novice to pro components not yet reviewed and released:
106
106
  Coachmark: false,
107
107
  CoachmarkBeacon: false,
108
108
  CoachmarkButton: false,
@@ -122,7 +122,7 @@ var defaults = {
122
122
  UserAvatar: false,
123
123
  /* new component flags here - comment used by generate CLI */
124
124
 
125
- // Onboarding components not yet reviewed and released:
125
+ // Novice to pro components not yet reviewed and released:
126
126
  EmptyStateV2: false,
127
127
  Guidebanner: false,
128
128
  GuidebannerElement: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "2.42.1-canary.27+452089a1f",
4
+ "version": "2.42.1-canary.3+dc4a98a67",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -121,5 +121,5 @@
121
121
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
122
122
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
123
123
  },
124
- "gitHead": "452089a1f3aca14aa3626e2d6cdce7c9c5dbc880"
124
+ "gitHead": "dc4a98a67feda8a1f00d989a426f26efbc34aaf1"
125
125
  }