@carbon/ibm-products 2.43.2-canary.247 → 2.43.2-canary.249
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.
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +15 -13
- package/es/components/ProductiveCard/ProductiveCard.d.ts +4 -0
- package/es/components/ProductiveCard/ProductiveCard.js +4 -0
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +15 -13
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +4 -0
- package/lib/components/ProductiveCard/ProductiveCard.js +4 -0
- package/package.json +3 -3
@@ -36,20 +36,22 @@ var TearsheetWrapper = function TearsheetWrapper(_ref) {
|
|
36
36
|
columnDefinitions: instance.allColumns,
|
37
37
|
originalColumnDefinitions: instance.columns,
|
38
38
|
onSaveColumnPrefs: function onSaveColumnPrefs(updatedColDefs) {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
});
|
44
|
-
instance.setHiddenColumns(hiddenIds);
|
45
|
-
if (typeof instance.setColumnOrder === 'function') {
|
46
|
-
instance.setColumnOrder(updatedColDefs.map(function (colDef) {
|
39
|
+
setTimeout(function () {
|
40
|
+
var hiddenIds = updatedColDefs.filter(function (colDef) {
|
41
|
+
return !colDef.isVisible;
|
42
|
+
}).map(function (colDef) {
|
47
43
|
return colDef.id;
|
48
|
-
})
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
44
|
+
});
|
45
|
+
instance.setHiddenColumns(hiddenIds);
|
46
|
+
if (typeof instance.setColumnOrder === 'function') {
|
47
|
+
instance.setColumnOrder(updatedColDefs.map(function (colDef) {
|
48
|
+
return colDef.id;
|
49
|
+
}));
|
50
|
+
} else {
|
51
|
+
// eslint-disable-next-line no-console
|
52
|
+
console.warn("Column order can not be updated. Did you forget to add 'useColumnOrder' in 'useDatagrid'");
|
53
|
+
}
|
54
|
+
}, 0);
|
53
55
|
if (typeof _onSaveColumnPrefs === 'function') {
|
54
56
|
_onSaveColumnPrefs(updatedColDefs);
|
55
57
|
}
|
@@ -65,6 +65,10 @@ export interface ProductiveCardProps extends PropsWithChildren {
|
|
65
65
|
* Aria label prop required for OverflowMenu
|
66
66
|
*/
|
67
67
|
overflowAriaLabel?: string;
|
68
|
+
/**
|
69
|
+
* Determines if the primary button is enabled or not
|
70
|
+
*/
|
71
|
+
primaryButtonDisabled?: boolean;
|
68
72
|
/**
|
69
73
|
* Optionally specify an href for your Button to become an <a> element
|
70
74
|
*/
|
@@ -98,6 +98,10 @@ ProductiveCard.propTypes = {
|
|
98
98
|
* Aria label prop required for OverflowMenu
|
99
99
|
*/
|
100
100
|
overflowAriaLabel: PropTypes.string,
|
101
|
+
/**
|
102
|
+
* Determines if the primary button is enabled or not
|
103
|
+
*/
|
104
|
+
primaryButtonDisabled: PropTypes.bool,
|
101
105
|
/**
|
102
106
|
* Optionally specify an href for your Button to become an <a> element
|
103
107
|
*/
|
@@ -44,20 +44,22 @@ var TearsheetWrapper = function TearsheetWrapper(_ref) {
|
|
44
44
|
columnDefinitions: instance.allColumns,
|
45
45
|
originalColumnDefinitions: instance.columns,
|
46
46
|
onSaveColumnPrefs: function onSaveColumnPrefs(updatedColDefs) {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
});
|
52
|
-
instance.setHiddenColumns(hiddenIds);
|
53
|
-
if (typeof instance.setColumnOrder === 'function') {
|
54
|
-
instance.setColumnOrder(updatedColDefs.map(function (colDef) {
|
47
|
+
setTimeout(function () {
|
48
|
+
var hiddenIds = updatedColDefs.filter(function (colDef) {
|
49
|
+
return !colDef.isVisible;
|
50
|
+
}).map(function (colDef) {
|
55
51
|
return colDef.id;
|
56
|
-
})
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
52
|
+
});
|
53
|
+
instance.setHiddenColumns(hiddenIds);
|
54
|
+
if (typeof instance.setColumnOrder === 'function') {
|
55
|
+
instance.setColumnOrder(updatedColDefs.map(function (colDef) {
|
56
|
+
return colDef.id;
|
57
|
+
}));
|
58
|
+
} else {
|
59
|
+
// eslint-disable-next-line no-console
|
60
|
+
console.warn("Column order can not be updated. Did you forget to add 'useColumnOrder' in 'useDatagrid'");
|
61
|
+
}
|
62
|
+
}, 0);
|
61
63
|
if (typeof _onSaveColumnPrefs === 'function') {
|
62
64
|
_onSaveColumnPrefs(updatedColDefs);
|
63
65
|
}
|
@@ -65,6 +65,10 @@ export interface ProductiveCardProps extends PropsWithChildren {
|
|
65
65
|
* Aria label prop required for OverflowMenu
|
66
66
|
*/
|
67
67
|
overflowAriaLabel?: string;
|
68
|
+
/**
|
69
|
+
* Determines if the primary button is enabled or not
|
70
|
+
*/
|
71
|
+
primaryButtonDisabled?: boolean;
|
68
72
|
/**
|
69
73
|
* Optionally specify an href for your Button to become an <a> element
|
70
74
|
*/
|
@@ -106,6 +106,10 @@ exports.ProductiveCard.propTypes = {
|
|
106
106
|
* Aria label prop required for OverflowMenu
|
107
107
|
*/
|
108
108
|
overflowAriaLabel: index["default"].string,
|
109
|
+
/**
|
110
|
+
* Determines if the primary button is enabled or not
|
111
|
+
*/
|
112
|
+
primaryButtonDisabled: index["default"].bool,
|
109
113
|
/**
|
110
114
|
* Optionally specify an href for your Button to become an <a> element
|
111
115
|
*/
|
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.
|
4
|
+
"version": "2.43.2-canary.249+189f45221",
|
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.22.0",
|
99
|
-
"@carbon/ibm-products-styles": "^2.
|
99
|
+
"@carbon/ibm-products-styles": "^2.46.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": "
|
123
|
+
"gitHead": "189f4522187981788b0eb431b89f8b6e89eecd47"
|
124
124
|
}
|