@carbon/ibm-products 2.12.0 → 2.12.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.
- package/css/index-full-carbon.css +3 -5
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon.css +3 -5
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +3 -5
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -3
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -5
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +1 -3
- package/es/components/Datagrid/Datagrid/DatagridRow.js +2 -6
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -3
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +1 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +9 -8
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +6 -12
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +0 -5
- package/es/components/Datagrid/Datagrid.docs-page.js +1 -1
- package/es/components/Datagrid/useDisableSelectRows.js +1 -1
- package/es/components/Datagrid/useInlineEdit.js +1 -6
- package/es/components/Datagrid/useSelectRows.js +1 -1
- package/es/components/Datagrid/useSortableColumns.js +14 -25
- package/es/global/js/hooks/useCreateComponentStepChange.js +14 -20
- package/es/global/js/utils/getNodeTextContent.js +4 -0
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +1 -3
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -5
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +1 -3
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +2 -6
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +1 -3
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +1 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +9 -8
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +6 -12
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +0 -5
- package/lib/components/Datagrid/Datagrid.docs-page.js +1 -1
- package/lib/components/Datagrid/useDisableSelectRows.js +1 -1
- package/lib/components/Datagrid/useInlineEdit.js +1 -6
- package/lib/components/Datagrid/useSelectRows.js +1 -1
- package/lib/components/Datagrid/useSortableColumns.js +14 -25
- package/lib/global/js/hooks/useCreateComponentStepChange.js +14 -20
- package/lib/global/js/utils/getNodeTextContent.js +4 -0
- package/package.json +2 -2
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +8 -11
- package/es/components/Datagrid/utils/getColTitle.js +0 -25
- package/lib/components/Datagrid/utils/getColTitle.js +0 -32
@@ -108,38 +108,32 @@ var useCreateComponentStepChange = function useCreateComponentStepChange(_ref) {
|
|
108
108
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
109
109
|
while (1) switch (_context2.prev = _context2.next) {
|
110
110
|
case 0:
|
111
|
-
|
112
|
-
_context2.next = 2;
|
113
|
-
break;
|
114
|
-
}
|
115
|
-
return _context2.abrupt("return");
|
116
|
-
case 2:
|
117
|
-
setLoadingPrevious(true);
|
111
|
+
setLoadingPrevious === null || setLoadingPrevious === void 0 || setLoadingPrevious(true);
|
118
112
|
if (!(typeof onPrevious === 'function')) {
|
119
|
-
_context2.next =
|
113
|
+
_context2.next = 13;
|
120
114
|
break;
|
121
115
|
}
|
122
|
-
_context2.prev =
|
123
|
-
_context2.next =
|
116
|
+
_context2.prev = 2;
|
117
|
+
_context2.next = 5;
|
124
118
|
return onPrevious();
|
125
|
-
case
|
119
|
+
case 5:
|
126
120
|
moveToPreviousStep();
|
127
|
-
_context2.next =
|
121
|
+
_context2.next = 11;
|
128
122
|
break;
|
129
|
-
case
|
130
|
-
_context2.prev =
|
131
|
-
_context2.t0 = _context2["catch"](
|
123
|
+
case 8:
|
124
|
+
_context2.prev = 8;
|
125
|
+
_context2.t0 = _context2["catch"](2);
|
132
126
|
console.warn("".concat(componentName, " onBack error: ").concat(_context2.t0));
|
133
|
-
case
|
134
|
-
_context2.next =
|
127
|
+
case 11:
|
128
|
+
_context2.next = 14;
|
135
129
|
break;
|
136
|
-
case
|
130
|
+
case 13:
|
137
131
|
moveToPreviousStep();
|
138
|
-
case
|
132
|
+
case 14:
|
139
133
|
case "end":
|
140
134
|
return _context2.stop();
|
141
135
|
}
|
142
|
-
}, _callee2, null, [[
|
136
|
+
}, _callee2, null, [[2, 8]]);
|
143
137
|
}))).apply(this, arguments);
|
144
138
|
};
|
145
139
|
var handleNext = function handleNext() {
|
@@ -47,6 +47,10 @@ var getNodeTextContent = function getNodeTextContent(node) {
|
|
47
47
|
// Ignore any other JavaScript 'object' types.
|
48
48
|
return '';
|
49
49
|
}
|
50
|
+
case 'function':
|
51
|
+
{
|
52
|
+
return getNodeTextContent(node());
|
53
|
+
}
|
50
54
|
default:
|
51
55
|
// Ignore all other JavaScript types.
|
52
56
|
return '';
|
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.12.
|
4
|
+
"version": "2.12.1",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -96,5 +96,5 @@
|
|
96
96
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
97
97
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
98
98
|
},
|
99
|
-
"gitHead": "
|
99
|
+
"gitHead": "c27ea01ddb03bae10002fd7fc853159cacc14204"
|
100
100
|
}
|
@@ -116,18 +116,15 @@ $row-heights: (
|
|
116
116
|
justify-content: flex-start;
|
117
117
|
}
|
118
118
|
// Always show renderIcon if inline edit columns are less than half of total columns
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
.#{variables.$block-class}__inline-edit-button-icon {
|
123
|
-
display: none;
|
124
|
-
}
|
119
|
+
.#{variables.$block-class}__inline-edit-button-icon {
|
120
|
+
display: none;
|
121
|
+
}
|
125
122
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
123
|
+
/* stylelint-disable-next-line */
|
124
|
+
&:hover,
|
125
|
+
&.#{variables.$block-class}__inline-edit-button--active {
|
126
|
+
.#{variables.$block-class}__inline-edit-button-icon {
|
127
|
+
display: block;
|
131
128
|
}
|
132
129
|
}
|
133
130
|
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
// This function recursively looks for the nested header element until we can find the key which contains the title.
|
2
|
-
// This can happen if multiple hooks are used together that manipulate the rendering of the column
|
3
|
-
// header, such as `useColumnCenterAlign` and `useSortableColumns`.
|
4
|
-
var getNestedTitle = function getNestedTitle(component) {
|
5
|
-
if (component && !component.key) {
|
6
|
-
return getNestedTitle(component.children);
|
7
|
-
}
|
8
|
-
if (component && component.key && typeof component.key === 'string') {
|
9
|
-
return component.key;
|
10
|
-
}
|
11
|
-
};
|
12
|
-
var getColTitle = function getColTitle(col) {
|
13
|
-
var _col$Header;
|
14
|
-
if (!col) {
|
15
|
-
return;
|
16
|
-
}
|
17
|
-
var checkTitle = function checkTitle() {
|
18
|
-
if (col.Header().props.children.props && col.Header().props.children.props.title) {
|
19
|
-
return col.Header().props.children.props.title;
|
20
|
-
}
|
21
|
-
return getNestedTitle(col.Header().props.children.props);
|
22
|
-
};
|
23
|
-
return typeof (col === null || col === void 0 ? void 0 : col.Header) === 'function' ? checkTitle() : col === null || col === void 0 || (_col$Header = col.Header) === null || _col$Header === void 0 || (_col$Header = _col$Header.props) === null || _col$Header === void 0 ? void 0 : _col$Header.title;
|
24
|
-
};
|
25
|
-
export default getColTitle;
|
@@ -1,32 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = void 0;
|
7
|
-
// This function recursively looks for the nested header element until we can find the key which contains the title.
|
8
|
-
// This can happen if multiple hooks are used together that manipulate the rendering of the column
|
9
|
-
// header, such as `useColumnCenterAlign` and `useSortableColumns`.
|
10
|
-
var getNestedTitle = function getNestedTitle(component) {
|
11
|
-
if (component && !component.key) {
|
12
|
-
return getNestedTitle(component.children);
|
13
|
-
}
|
14
|
-
if (component && component.key && typeof component.key === 'string') {
|
15
|
-
return component.key;
|
16
|
-
}
|
17
|
-
};
|
18
|
-
var getColTitle = function getColTitle(col) {
|
19
|
-
var _col$Header;
|
20
|
-
if (!col) {
|
21
|
-
return;
|
22
|
-
}
|
23
|
-
var checkTitle = function checkTitle() {
|
24
|
-
if (col.Header().props.children.props && col.Header().props.children.props.title) {
|
25
|
-
return col.Header().props.children.props.title;
|
26
|
-
}
|
27
|
-
return getNestedTitle(col.Header().props.children.props);
|
28
|
-
};
|
29
|
-
return typeof (col === null || col === void 0 ? void 0 : col.Header) === 'function' ? checkTitle() : col === null || col === void 0 || (_col$Header = col.Header) === null || _col$Header === void 0 || (_col$Header = _col$Header.props) === null || _col$Header === void 0 ? void 0 : _col$Header.title;
|
30
|
-
};
|
31
|
-
var _default = getColTitle;
|
32
|
-
exports.default = _default;
|