@carbon/ibm-products 2.43.1-canary.0 → 2.43.1-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ declare const useSelectAllToggle: (hooks: Hooks) => void;
1
9
  export default useSelectAllToggle;
2
- declare function useSelectAllToggle(hooks: any): void;
@@ -20,9 +20,10 @@ var useSelectAllToggle = function useSelectAllToggle(hooks) {
20
20
  };
21
21
  var useSelectAllWithToggleComponent = function useSelectAllWithToggleComponent(hooks) {
22
22
  var useInstance = function useInstance(instance) {
23
- var headers = instance.headers,
24
- DatagridPagination = instance.DatagridPagination;
25
- var headersWithSelectAllToggle = headers.map(function (header) {
23
+ var _ref = instance,
24
+ headers = _ref.headers,
25
+ DatagridPagination = _ref.DatagridPagination;
26
+ var headersWithSelectAllToggle = headers === null || headers === void 0 ? void 0 : headers.map(function (header) {
26
27
  if (header.id === selectionColumnId && DatagridPagination) {
27
28
  Object.assign(header, {
28
29
  Header: Header
@@ -54,10 +55,10 @@ var useAddClassNameToSelectRow = function useAddClassNameToSelectRow(hooks) {
54
55
  hooks.getCellProps.push(function (props, data) {
55
56
  var _columns$;
56
57
  var column = data.cell.column;
57
- var _data$instance = data.instance,
58
- DatagridPagination = _data$instance.DatagridPagination,
59
- columns = _data$instance.columns,
60
- withStickyColumn = _data$instance.withStickyColumn;
58
+ var _ref2 = data.instance,
59
+ DatagridPagination = _ref2.DatagridPagination,
60
+ columns = _ref2.columns,
61
+ withStickyColumn = _ref2.withStickyColumn;
61
62
  var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
62
63
  if (column.id === selectionColumnId && DatagridPagination) {
63
64
  return [props, {
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ declare const useSelectAllToggle: (hooks: Hooks) => void;
1
9
  export default useSelectAllToggle;
2
- declare function useSelectAllToggle(hooks: any): void;
@@ -29,9 +29,10 @@ var useSelectAllToggle = function useSelectAllToggle(hooks) {
29
29
  };
30
30
  var useSelectAllWithToggleComponent = function useSelectAllWithToggleComponent(hooks) {
31
31
  var useInstance = function useInstance(instance) {
32
- var headers = instance.headers,
33
- DatagridPagination = instance.DatagridPagination;
34
- var headersWithSelectAllToggle = headers.map(function (header) {
32
+ var _ref = instance,
33
+ headers = _ref.headers,
34
+ DatagridPagination = _ref.DatagridPagination;
35
+ var headersWithSelectAllToggle = headers === null || headers === void 0 ? void 0 : headers.map(function (header) {
35
36
  if (header.id === commonColumnIds.selectionColumnId && DatagridPagination) {
36
37
  Object.assign(header, {
37
38
  Header: Header
@@ -63,10 +64,10 @@ var useAddClassNameToSelectRow = function useAddClassNameToSelectRow(hooks) {
63
64
  hooks.getCellProps.push(function (props, data) {
64
65
  var _columns$;
65
66
  var column = data.cell.column;
66
- var _data$instance = data.instance,
67
- DatagridPagination = _data$instance.DatagridPagination,
68
- columns = _data$instance.columns,
69
- withStickyColumn = _data$instance.withStickyColumn;
67
+ var _ref2 = data.instance,
68
+ DatagridPagination = _ref2.DatagridPagination,
69
+ columns = _ref2.columns,
70
+ withStickyColumn = _ref2.withStickyColumn;
70
71
  var isFirstColumnStickyLeft = ((_columns$ = columns[0]) === null || _columns$ === void 0 ? void 0 : _columns$.sticky) === 'left' && withStickyColumn;
71
72
  if (column.id === commonColumnIds.selectionColumnId && DatagridPagination) {
72
73
  return [props, {
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.43.1-canary.0+0be8378ce",
4
+ "version": "2.43.1-canary.1+2f1e993c3",
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": "0be8378ceeec3aa2c9af5495dbb8f9fa636bc237"
124
+ "gitHead": "2f1e993c3f547c4e7ca0f2f79b4d94232b979f8b"
125
125
  }