@carbon/ibm-products 2.43.2-canary.194 → 2.43.2-canary.197
Sign up to get free protection for your applications and to get access to all the features.
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +4 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +3 -1
- package/es/components/TagSet/TagSet.d.ts +4 -6
- package/es/components/TagSet/TagSet.js +15 -21
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +4 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +3 -1
- package/lib/components/TagSet/TagSet.d.ts +4 -6
- package/lib/components/TagSet/TagSet.js +15 -21
- package/package.json +2 -2
@@ -31,6 +31,9 @@ var defaults = {
|
|
31
31
|
secondaryActionLabel: 'Cancel',
|
32
32
|
align: 'bottom'
|
33
33
|
};
|
34
|
+
|
35
|
+
// Use same empty array every time, for benefit of useEffect() etc. dependency checking.
|
36
|
+
var emptyArray = [];
|
34
37
|
var FilterFlyout = function FilterFlyout(_ref) {
|
35
38
|
var updateMethod = _ref.updateMethod,
|
36
39
|
_ref$flyoutIconDescri = _ref.flyoutIconDescription,
|
@@ -38,7 +41,7 @@ var FilterFlyout = function FilterFlyout(_ref) {
|
|
38
41
|
_ref$align = _ref.align,
|
39
42
|
align = _ref$align === void 0 ? defaults.align : _ref$align,
|
40
43
|
_ref$filters = _ref.filters,
|
41
|
-
filters = _ref$filters === void 0 ?
|
44
|
+
filters = _ref$filters === void 0 ? emptyArray : _ref$filters,
|
42
45
|
_ref$title = _ref.title,
|
43
46
|
title = _ref$title === void 0 ? defaults.title : _ref$title,
|
44
47
|
_ref$primaryActionLab = _ref.primaryActionLabel,
|
@@ -55,9 +58,9 @@ var FilterFlyout = function FilterFlyout(_ref) {
|
|
55
58
|
secondaryActionLabel = _ref$secondaryActionL === void 0 ? defaults.secondaryActionLabel : _ref$secondaryActionL,
|
56
59
|
setAllFilters = _ref.setAllFilters,
|
57
60
|
_ref$data = _ref.data,
|
58
|
-
data = _ref$data === void 0 ?
|
61
|
+
data = _ref$data === void 0 ? emptyArray : _ref$data,
|
59
62
|
_ref$reactTableFilter = _ref.reactTableFiltersState,
|
60
|
-
reactTableFiltersState = _ref$reactTableFilter === void 0 ?
|
63
|
+
reactTableFiltersState = _ref$reactTableFilter === void 0 ? emptyArray : _ref$reactTableFilter;
|
61
64
|
/** State */
|
62
65
|
var _useState = useState(false),
|
63
66
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -34,6 +34,9 @@ var defaults = {
|
|
34
34
|
searchLabelText: 'Filter search',
|
35
35
|
searchPlaceholder: 'Find filters'
|
36
36
|
};
|
37
|
+
|
38
|
+
// Use same empty array every time, for benefit of useEffect() etc. dependency checking.
|
39
|
+
var emptyArray = [];
|
37
40
|
var FilterPanel = function FilterPanel(_ref) {
|
38
41
|
var _ref$title = _ref.title,
|
39
42
|
title = _ref$title === void 0 ? defaults.title : _ref$title,
|
@@ -63,7 +66,7 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
63
66
|
_ref$searchPlaceholde = _ref.searchPlaceholder,
|
64
67
|
searchPlaceholder = _ref$searchPlaceholde === void 0 ? defaults.searchPlaceholder : _ref$searchPlaceholde,
|
65
68
|
_ref$reactTableFilter = _ref.reactTableFiltersState,
|
66
|
-
reactTableFiltersState = _ref$reactTableFilter === void 0 ?
|
69
|
+
reactTableFiltersState = _ref$reactTableFilter === void 0 ? emptyArray : _ref$reactTableFilter,
|
67
70
|
_ref$autoHideFilters = _ref.autoHideFilters,
|
68
71
|
autoHideFilters = _ref$autoHideFilters === void 0 ? false : _ref$autoHideFilters,
|
69
72
|
_ref$isFetching = _ref.isFetching,
|
@@ -16,10 +16,12 @@ import { handleCheckboxChange } from '../handleCheckboxChange.js';
|
|
16
16
|
import uuidv4 from '../../../../../../global/js/utils/uuidv4.js';
|
17
17
|
import { usePreviousValue } from '../../../../../../global/js/hooks/usePreviousValue.js';
|
18
18
|
|
19
|
+
// Use same empty array every time, for benefit of useEffect() etc. dependency checking.
|
20
|
+
var emptyArray = [];
|
19
21
|
var useFilters = function useFilters(_ref) {
|
20
22
|
var updateMethod = _ref.updateMethod,
|
21
23
|
_ref$filters = _ref.filters,
|
22
|
-
filters = _ref$filters === void 0 ?
|
24
|
+
filters = _ref$filters === void 0 ? emptyArray : _ref$filters,
|
23
25
|
setAllFilters = _ref.setAllFilters,
|
24
26
|
variation = _ref.variation,
|
25
27
|
reactTableFiltersState = _ref.reactTableFiltersState,
|
@@ -13,11 +13,11 @@ export interface TagSetProps extends PropsWithChildren {
|
|
13
13
|
*/
|
14
14
|
align?: Align;
|
15
15
|
/**
|
16
|
-
* label text for the show all search.
|
16
|
+
* label text for the show all search.
|
17
17
|
*/
|
18
18
|
allTagsModalSearchLabel?: string;
|
19
19
|
/**
|
20
|
-
* placeholder text for the show all search.
|
20
|
+
* placeholder text for the show all search.
|
21
21
|
*/
|
22
22
|
allTagsModalSearchPlaceholderText?: string;
|
23
23
|
/**
|
@@ -25,7 +25,7 @@ export interface TagSetProps extends PropsWithChildren {
|
|
25
25
|
*/
|
26
26
|
allTagsModalTarget?: ReactNode;
|
27
27
|
/**
|
28
|
-
* title for the show all modal.
|
28
|
+
* title for the show all modal.
|
29
29
|
*/
|
30
30
|
allTagsModalTitle?: string;
|
31
31
|
/**
|
@@ -68,10 +68,8 @@ export interface TagSetProps extends PropsWithChildren {
|
|
68
68
|
overflowType?: OverflowType;
|
69
69
|
/**
|
70
70
|
* label for the overflow show all tags link.
|
71
|
-
*
|
72
|
-
* **Note:** Required if more than 10 tags
|
73
71
|
*/
|
74
|
-
showAllTagsLabel
|
72
|
+
showAllTagsLabel?: string;
|
75
73
|
/**
|
76
74
|
* The tags to be shown in the TagSet. Each tag is specified as an object
|
77
75
|
* with properties: **label**\* (required) to supply the tag content, and
|
@@ -32,14 +32,6 @@ var defaults = {
|
|
32
32
|
overflowType: 'default',
|
33
33
|
onOverflowTagChange: function onOverflowTagChange() {}
|
34
34
|
};
|
35
|
-
|
36
|
-
// interface TagType extends TagBaseProps
|
37
|
-
// {
|
38
|
-
// label: string;
|
39
|
-
// // we duplicate this prop to improve the DocGen
|
40
|
-
// type?: typeof tagTypes[number];
|
41
|
-
// }
|
42
|
-
|
43
35
|
var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
44
36
|
var _ref$align = _ref.align,
|
45
37
|
align = _ref$align === void 0 ? 'start' : _ref$align,
|
@@ -52,10 +44,14 @@ var TagSet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
52
44
|
overflowClassName = _ref.overflowClassName,
|
53
45
|
_ref$overflowType = _ref.overflowType,
|
54
46
|
overflowType = _ref$overflowType === void 0 ? 'default' : _ref$overflowType,
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
47
|
+
_ref$allTagsModalTitl = _ref.allTagsModalTitle,
|
48
|
+
allTagsModalTitle = _ref$allTagsModalTitl === void 0 ? 'All tags' : _ref$allTagsModalTitl,
|
49
|
+
_ref$allTagsModalSear = _ref.allTagsModalSearchLabel,
|
50
|
+
allTagsModalSearchLabel = _ref$allTagsModalSear === void 0 ? 'Search all tags' : _ref$allTagsModalSear,
|
51
|
+
_ref$allTagsModalSear2 = _ref.allTagsModalSearchPlaceholderText,
|
52
|
+
allTagsModalSearchPlaceholderText = _ref$allTagsModalSear2 === void 0 ? 'Search all tags' : _ref$allTagsModalSear2,
|
53
|
+
_ref$showAllTagsLabel = _ref.showAllTagsLabel,
|
54
|
+
showAllTagsLabel = _ref$showAllTagsLabel === void 0 ? 'View all tags' : _ref$showAllTagsLabel,
|
59
55
|
tags = _ref.tags,
|
60
56
|
containingElementRef = _ref.containingElementRef,
|
61
57
|
_ref$measurementOffse = _ref.measurementOffset,
|
@@ -279,21 +275,21 @@ TagSet.propTypes = {
|
|
279
275
|
*/
|
280
276
|
align: PropTypes.oneOf(['start', 'center', 'end']),
|
281
277
|
/**
|
282
|
-
* label text for the show all search.
|
278
|
+
* label text for the show all search.
|
283
279
|
*/
|
284
|
-
allTagsModalSearchLabel:
|
280
|
+
allTagsModalSearchLabel: PropTypes.string,
|
285
281
|
/**
|
286
|
-
* placeholder text for the show all search.
|
282
|
+
* placeholder text for the show all search.
|
287
283
|
*/
|
288
|
-
allTagsModalSearchPlaceholderText:
|
284
|
+
allTagsModalSearchPlaceholderText: PropTypes.string,
|
289
285
|
/**
|
290
286
|
* portal target for the all tags modal
|
291
287
|
*/
|
292
288
|
allTagsModalTarget: PropTypes.node,
|
293
289
|
/**
|
294
|
-
* title for the show all modal.
|
290
|
+
* title for the show all modal.
|
295
291
|
*/
|
296
|
-
allTagsModalTitle:
|
292
|
+
allTagsModalTitle: PropTypes.string,
|
297
293
|
/**
|
298
294
|
* className
|
299
295
|
*/
|
@@ -335,10 +331,8 @@ TagSet.propTypes = {
|
|
335
331
|
overflowType: PropTypes.oneOf(['default', 'tag']),
|
336
332
|
/**
|
337
333
|
* label for the overflow show all tags link.
|
338
|
-
*
|
339
|
-
* **Note:** Required if more than 10 tags
|
340
334
|
*/
|
341
|
-
showAllTagsLabel:
|
335
|
+
showAllTagsLabel: PropTypes.string,
|
342
336
|
/**
|
343
337
|
* The tags to be shown in the TagSet. Each tag is specified as an object
|
344
338
|
* with properties: **label**\* (required) to supply the tag content, and
|
@@ -40,6 +40,9 @@ var defaults = {
|
|
40
40
|
secondaryActionLabel: 'Cancel',
|
41
41
|
align: 'bottom'
|
42
42
|
};
|
43
|
+
|
44
|
+
// Use same empty array every time, for benefit of useEffect() etc. dependency checking.
|
45
|
+
var emptyArray = [];
|
43
46
|
var FilterFlyout = function FilterFlyout(_ref) {
|
44
47
|
var updateMethod = _ref.updateMethod,
|
45
48
|
_ref$flyoutIconDescri = _ref.flyoutIconDescription,
|
@@ -47,7 +50,7 @@ var FilterFlyout = function FilterFlyout(_ref) {
|
|
47
50
|
_ref$align = _ref.align,
|
48
51
|
align = _ref$align === void 0 ? defaults.align : _ref$align,
|
49
52
|
_ref$filters = _ref.filters,
|
50
|
-
filters = _ref$filters === void 0 ?
|
53
|
+
filters = _ref$filters === void 0 ? emptyArray : _ref$filters,
|
51
54
|
_ref$title = _ref.title,
|
52
55
|
title = _ref$title === void 0 ? defaults.title : _ref$title,
|
53
56
|
_ref$primaryActionLab = _ref.primaryActionLabel,
|
@@ -64,9 +67,9 @@ var FilterFlyout = function FilterFlyout(_ref) {
|
|
64
67
|
secondaryActionLabel = _ref$secondaryActionL === void 0 ? defaults.secondaryActionLabel : _ref$secondaryActionL,
|
65
68
|
setAllFilters = _ref.setAllFilters,
|
66
69
|
_ref$data = _ref.data,
|
67
|
-
data = _ref$data === void 0 ?
|
70
|
+
data = _ref$data === void 0 ? emptyArray : _ref$data,
|
68
71
|
_ref$reactTableFilter = _ref.reactTableFiltersState,
|
69
|
-
reactTableFiltersState = _ref$reactTableFilter === void 0 ?
|
72
|
+
reactTableFiltersState = _ref$reactTableFilter === void 0 ? emptyArray : _ref$reactTableFilter;
|
70
73
|
/** State */
|
71
74
|
var _useState = React.useState(false),
|
72
75
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
@@ -43,6 +43,9 @@ var defaults = {
|
|
43
43
|
searchLabelText: 'Filter search',
|
44
44
|
searchPlaceholder: 'Find filters'
|
45
45
|
};
|
46
|
+
|
47
|
+
// Use same empty array every time, for benefit of useEffect() etc. dependency checking.
|
48
|
+
var emptyArray = [];
|
46
49
|
var FilterPanel = function FilterPanel(_ref) {
|
47
50
|
var _ref$title = _ref.title,
|
48
51
|
title = _ref$title === void 0 ? defaults.title : _ref$title,
|
@@ -72,7 +75,7 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
72
75
|
_ref$searchPlaceholde = _ref.searchPlaceholder,
|
73
76
|
searchPlaceholder = _ref$searchPlaceholde === void 0 ? defaults.searchPlaceholder : _ref$searchPlaceholde,
|
74
77
|
_ref$reactTableFilter = _ref.reactTableFiltersState,
|
75
|
-
reactTableFiltersState = _ref$reactTableFilter === void 0 ?
|
78
|
+
reactTableFiltersState = _ref$reactTableFilter === void 0 ? emptyArray : _ref$reactTableFilter,
|
76
79
|
_ref$autoHideFilters = _ref.autoHideFilters,
|
77
80
|
autoHideFilters = _ref$autoHideFilters === void 0 ? false : _ref$autoHideFilters,
|
78
81
|
_ref$isFetching = _ref.isFetching,
|
@@ -24,10 +24,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
24
24
|
|
25
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
26
26
|
|
27
|
+
// Use same empty array every time, for benefit of useEffect() etc. dependency checking.
|
28
|
+
var emptyArray = [];
|
27
29
|
var useFilters = function useFilters(_ref) {
|
28
30
|
var updateMethod = _ref.updateMethod,
|
29
31
|
_ref$filters = _ref.filters,
|
30
|
-
filters = _ref$filters === void 0 ?
|
32
|
+
filters = _ref$filters === void 0 ? emptyArray : _ref$filters,
|
31
33
|
setAllFilters = _ref.setAllFilters,
|
32
34
|
variation = _ref.variation,
|
33
35
|
reactTableFiltersState = _ref.reactTableFiltersState,
|
@@ -13,11 +13,11 @@ export interface TagSetProps extends PropsWithChildren {
|
|
13
13
|
*/
|
14
14
|
align?: Align;
|
15
15
|
/**
|
16
|
-
* label text for the show all search.
|
16
|
+
* label text for the show all search.
|
17
17
|
*/
|
18
18
|
allTagsModalSearchLabel?: string;
|
19
19
|
/**
|
20
|
-
* placeholder text for the show all search.
|
20
|
+
* placeholder text for the show all search.
|
21
21
|
*/
|
22
22
|
allTagsModalSearchPlaceholderText?: string;
|
23
23
|
/**
|
@@ -25,7 +25,7 @@ export interface TagSetProps extends PropsWithChildren {
|
|
25
25
|
*/
|
26
26
|
allTagsModalTarget?: ReactNode;
|
27
27
|
/**
|
28
|
-
* title for the show all modal.
|
28
|
+
* title for the show all modal.
|
29
29
|
*/
|
30
30
|
allTagsModalTitle?: string;
|
31
31
|
/**
|
@@ -68,10 +68,8 @@ export interface TagSetProps extends PropsWithChildren {
|
|
68
68
|
overflowType?: OverflowType;
|
69
69
|
/**
|
70
70
|
* label for the overflow show all tags link.
|
71
|
-
*
|
72
|
-
* **Note:** Required if more than 10 tags
|
73
71
|
*/
|
74
|
-
showAllTagsLabel
|
72
|
+
showAllTagsLabel?: string;
|
75
73
|
/**
|
76
74
|
* The tags to be shown in the TagSet. Each tag is specified as an object
|
77
75
|
* with properties: **label**\* (required) to supply the tag content, and
|
@@ -41,14 +41,6 @@ var defaults = {
|
|
41
41
|
overflowType: 'default',
|
42
42
|
onOverflowTagChange: function onOverflowTagChange() {}
|
43
43
|
};
|
44
|
-
|
45
|
-
// interface TagType extends TagBaseProps
|
46
|
-
// {
|
47
|
-
// label: string;
|
48
|
-
// // we duplicate this prop to improve the DocGen
|
49
|
-
// type?: typeof tagTypes[number];
|
50
|
-
// }
|
51
|
-
|
52
44
|
exports.TagSet = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
53
45
|
var _ref$align = _ref.align,
|
54
46
|
align = _ref$align === void 0 ? 'start' : _ref$align,
|
@@ -61,10 +53,14 @@ exports.TagSet = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
61
53
|
overflowClassName = _ref.overflowClassName,
|
62
54
|
_ref$overflowType = _ref.overflowType,
|
63
55
|
overflowType = _ref$overflowType === void 0 ? 'default' : _ref$overflowType,
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
56
|
+
_ref$allTagsModalTitl = _ref.allTagsModalTitle,
|
57
|
+
allTagsModalTitle = _ref$allTagsModalTitl === void 0 ? 'All tags' : _ref$allTagsModalTitl,
|
58
|
+
_ref$allTagsModalSear = _ref.allTagsModalSearchLabel,
|
59
|
+
allTagsModalSearchLabel = _ref$allTagsModalSear === void 0 ? 'Search all tags' : _ref$allTagsModalSear,
|
60
|
+
_ref$allTagsModalSear2 = _ref.allTagsModalSearchPlaceholderText,
|
61
|
+
allTagsModalSearchPlaceholderText = _ref$allTagsModalSear2 === void 0 ? 'Search all tags' : _ref$allTagsModalSear2,
|
62
|
+
_ref$showAllTagsLabel = _ref.showAllTagsLabel,
|
63
|
+
showAllTagsLabel = _ref$showAllTagsLabel === void 0 ? 'View all tags' : _ref$showAllTagsLabel,
|
68
64
|
tags = _ref.tags,
|
69
65
|
containingElementRef = _ref.containingElementRef,
|
70
66
|
_ref$measurementOffse = _ref.measurementOffset,
|
@@ -288,21 +284,21 @@ exports.TagSet.propTypes = {
|
|
288
284
|
*/
|
289
285
|
align: index["default"].oneOf(['start', 'center', 'end']),
|
290
286
|
/**
|
291
|
-
* label text for the show all search.
|
287
|
+
* label text for the show all search.
|
292
288
|
*/
|
293
|
-
allTagsModalSearchLabel:
|
289
|
+
allTagsModalSearchLabel: index["default"].string,
|
294
290
|
/**
|
295
|
-
* placeholder text for the show all search.
|
291
|
+
* placeholder text for the show all search.
|
296
292
|
*/
|
297
|
-
allTagsModalSearchPlaceholderText:
|
293
|
+
allTagsModalSearchPlaceholderText: index["default"].string,
|
298
294
|
/**
|
299
295
|
* portal target for the all tags modal
|
300
296
|
*/
|
301
297
|
allTagsModalTarget: index["default"].node,
|
302
298
|
/**
|
303
|
-
* title for the show all modal.
|
299
|
+
* title for the show all modal.
|
304
300
|
*/
|
305
|
-
allTagsModalTitle:
|
301
|
+
allTagsModalTitle: index["default"].string,
|
306
302
|
/**
|
307
303
|
* className
|
308
304
|
*/
|
@@ -344,10 +340,8 @@ exports.TagSet.propTypes = {
|
|
344
340
|
overflowType: index["default"].oneOf(['default', 'tag']),
|
345
341
|
/**
|
346
342
|
* label for the overflow show all tags link.
|
347
|
-
*
|
348
|
-
* **Note:** Required if more than 10 tags
|
349
343
|
*/
|
350
|
-
showAllTagsLabel:
|
344
|
+
showAllTagsLabel: index["default"].string,
|
351
345
|
/**
|
352
346
|
* The tags to be shown in the TagSet. Each tag is specified as an object
|
353
347
|
* with properties: **label**\* (required) to supply the tag content, and
|
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.197+cf7c88c29",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -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": "cf7c88c293fa05406837afe68d9775d39998818c"
|
124
124
|
}
|