@carbon/ibm-products 2.43.2-canary.38 → 2.43.2-canary.40

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.
@@ -59,6 +59,18 @@ interface Labels {
59
59
  allPageRows?: object;
60
60
  allRows?: object;
61
61
  }
62
+ interface ColumnLabels {
63
+ findColumnPlaceholderLabel?: string;
64
+ resetToDefaultLabel?: string;
65
+ customizeTearsheetHeadingLabel?: string;
66
+ primaryButtonTextLabel?: string;
67
+ secondaryButtonTextLabel?: string;
68
+ instructionsLabel?: string;
69
+ iconTooltipLabel?: string;
70
+ assistiveTextInstructionsLabel?: string;
71
+ assistiveTextDisabledInstructionsLabel?: string;
72
+ selectAllLabel?: string;
73
+ }
62
74
  interface Section {
63
75
  categoryTitle?: string;
64
76
  filters?: DataGridFilter[];
@@ -210,6 +222,13 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
210
222
  expandedRowIds?: object;
211
223
  onRowClick?: (row: any, event: any) => void;
212
224
  onSort?: boolean;
225
+ customizeColumnsProps?: {
226
+ onSaveColumnPrefs?: (args: any) => void;
227
+ labels?: ColumnLabels;
228
+ isTearsheetOpen?: boolean;
229
+ setIsTearsheetOpen?: (args: boolean) => void;
230
+ };
231
+ CustomizeColumnsButton?: (args: any) => ReactNode;
213
232
  column?: DatagridColumn;
214
233
  expandedContentHeight?: number;
215
234
  onRowExpand?: (row: DatagridRow, event: React.MouseEvent<HTMLElement>) => void;
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ declare const useCustomizeColumns: (hooks: Hooks) => void;
1
9
  export default useCustomizeColumns;
2
- declare function useCustomizeColumns(hooks: any): void;
@@ -16,9 +16,10 @@ var useCustomizeColumns = function useCustomizeColumns(hooks) {
16
16
  isTearsheetOpen = _React$useState2[0],
17
17
  setIsTearsheetOpen = _React$useState2[1];
18
18
  hooks.useInstance.push(function (instance) {
19
- var customizeColumnsProps = instance.customizeColumnsProps;
20
- var _ref = customizeColumnsProps || {},
21
- labels = _ref.labels;
19
+ var _ref = instance,
20
+ customizeColumnsProps = _ref.customizeColumnsProps;
21
+ var _ref2 = customizeColumnsProps || {},
22
+ labels = _ref2.labels;
22
23
  Object.assign(instance, {
23
24
  customizeColumnsProps: _objectSpread2(_objectSpread2({}, customizeColumnsProps), {}, {
24
25
  isTearsheetOpen: isTearsheetOpen,
@@ -27,6 +27,7 @@ import { ButtonSetWithOverflow } from '../ButtonSetWithOverflow/ButtonSetWithOve
27
27
 
28
28
  var _excluded = ["actionBarItems", "actionBarMenuOptionsClass", "actionBarOverflowAriaLabel", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTitle", "hasBackgroundAlways", "breadcrumbOverflowAriaLabel", "breadcrumbs", "children", "className", "collapseHeader", "collapseHeaderIconDescription", "collapseTitle", "disableBreadcrumbScroll", "enableBreadcrumbScroll", "expandHeaderIconDescription", "fullWidthGrid", "hasCollapseHeaderToggle", "narrowGrid", "navigation", "pageActions", "pageActionsOverflowLabel", "pageActionsMenuOptionsClass", "showAllTagsLabel", "subtitle", "tags", "title", "withoutBackground", "breadcrumbOverflowTooltipAlign"];
29
29
  var componentName = 'PageHeader';
30
+ pkg._silenceWarnings(true);
30
31
  pkg.component.ActionBar = true;
31
32
 
32
33
  // Default values for props
@@ -59,6 +59,18 @@ interface Labels {
59
59
  allPageRows?: object;
60
60
  allRows?: object;
61
61
  }
62
+ interface ColumnLabels {
63
+ findColumnPlaceholderLabel?: string;
64
+ resetToDefaultLabel?: string;
65
+ customizeTearsheetHeadingLabel?: string;
66
+ primaryButtonTextLabel?: string;
67
+ secondaryButtonTextLabel?: string;
68
+ instructionsLabel?: string;
69
+ iconTooltipLabel?: string;
70
+ assistiveTextInstructionsLabel?: string;
71
+ assistiveTextDisabledInstructionsLabel?: string;
72
+ selectAllLabel?: string;
73
+ }
62
74
  interface Section {
63
75
  categoryTitle?: string;
64
76
  filters?: DataGridFilter[];
@@ -210,6 +222,13 @@ export interface DataGridState<T extends object = any> extends TableCommonProps,
210
222
  expandedRowIds?: object;
211
223
  onRowClick?: (row: any, event: any) => void;
212
224
  onSort?: boolean;
225
+ customizeColumnsProps?: {
226
+ onSaveColumnPrefs?: (args: any) => void;
227
+ labels?: ColumnLabels;
228
+ isTearsheetOpen?: boolean;
229
+ setIsTearsheetOpen?: (args: boolean) => void;
230
+ };
231
+ CustomizeColumnsButton?: (args: any) => ReactNode;
213
232
  column?: DatagridColumn;
214
233
  expandedContentHeight?: number;
215
234
  onRowExpand?: (row: DatagridRow, event: React.MouseEvent<HTMLElement>) => void;
@@ -1,2 +1,9 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { Hooks } from 'react-table';
8
+ declare const useCustomizeColumns: (hooks: Hooks) => void;
1
9
  export default useCustomizeColumns;
2
- declare function useCustomizeColumns(hooks: any): void;
@@ -40,9 +40,10 @@ var useCustomizeColumns = function useCustomizeColumns(hooks) {
40
40
  isTearsheetOpen = _React$useState2[0],
41
41
  setIsTearsheetOpen = _React$useState2[1];
42
42
  hooks.useInstance.push(function (instance) {
43
- var customizeColumnsProps = instance.customizeColumnsProps;
44
- var _ref = customizeColumnsProps || {},
45
- labels = _ref.labels;
43
+ var _ref = instance,
44
+ customizeColumnsProps = _ref.customizeColumnsProps;
45
+ var _ref2 = customizeColumnsProps || {},
46
+ labels = _ref2.labels;
46
47
  Object.assign(instance, {
47
48
  customizeColumnsProps: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, customizeColumnsProps), {}, {
48
49
  isTearsheetOpen: isTearsheetOpen,
@@ -36,6 +36,7 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
36
36
 
37
37
  var _excluded = ["actionBarItems", "actionBarMenuOptionsClass", "actionBarOverflowAriaLabel", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "allTagsModalTitle", "hasBackgroundAlways", "breadcrumbOverflowAriaLabel", "breadcrumbs", "children", "className", "collapseHeader", "collapseHeaderIconDescription", "collapseTitle", "disableBreadcrumbScroll", "enableBreadcrumbScroll", "expandHeaderIconDescription", "fullWidthGrid", "hasCollapseHeaderToggle", "narrowGrid", "navigation", "pageActions", "pageActionsOverflowLabel", "pageActionsMenuOptionsClass", "showAllTagsLabel", "subtitle", "tags", "title", "withoutBackground", "breadcrumbOverflowTooltipAlign"];
38
38
  var componentName = 'PageHeader';
39
+ settings.pkg._silenceWarnings(true);
39
40
  settings.pkg.component.ActionBar = true;
40
41
 
41
42
  // Default values for 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.2-canary.38+2ab2d4401",
4
+ "version": "2.43.2-canary.40+01b4adde4",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -96,7 +96,7 @@
96
96
  "dependencies": {
97
97
  "@babel/runtime": "^7.23.9",
98
98
  "@carbon/feature-flags": "^0.20.0",
99
- "@carbon/ibm-products-styles": "^2.39.1-canary.48+2ab2d4401",
99
+ "@carbon/ibm-products-styles": "^2.40.0-rc.0",
100
100
  "@carbon/telemetry": "^0.1.0",
101
101
  "@dnd-kit/core": "^6.0.8",
102
102
  "@dnd-kit/modifiers": "^7.0.0",
@@ -120,5 +120,5 @@
120
120
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
121
121
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
122
122
  },
123
- "gitHead": "2ab2d440162e6712493383ca49388617add9dd4c"
123
+ "gitHead": "01b4adde4e5b2389da1bee6c9fe36361986d75a4"
124
124
  }