@patternfly/react-table 4.61.1 → 4.61.5
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/CHANGELOG.md +38 -0
- package/dist/umd/react-table.js +72 -50
- package/dist/umd/react-table.min.css +1922 -1922
- package/dist/umd/react-table.min.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 4.61.5 (2022-01-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 4.61.4 (2022-01-20)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **DatePicker:** update empty state validation and add onblur event ([#6822](https://github.com/patternfly/patternfly-react/issues/6822)) ([258e818](https://github.com/patternfly/patternfly-react/commit/258e81861adc0488ae42f349aff78f06f2874fa7))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 4.61.3 (2022-01-20)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## 4.61.2 (2022-01-20)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* **Select:** Fixed dot next to the spinner in grouped view more variant ([#6831](https://github.com/patternfly/patternfly-react/issues/6831)) ([ccc81b4](https://github.com/patternfly/patternfly-react/commit/ccc81b4c8c30506f28e61e73dcbc106da50ca692))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## 4.61.1 (2022-01-20)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package @patternfly/react-table
|
package/dist/umd/react-table.js
CHANGED
|
@@ -4902,7 +4902,7 @@
|
|
|
4902
4902
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4903
4903
|
const _a = this.props, { children, className, id, description, itemCount, value, onClick, isDisabled, isPlaceholder, isNoResultsOption, isSelected, isChecked, isFocused, sendRef, keyHandler, index, component, inputId, isFavorite, ariaIsFavoriteLabel = 'starred', ariaIsNotFavoriteLabel = 'not starred', isLoad, isLoading, setViewMoreNextIndex,
|
|
4904
4904
|
// eslint-disable-next-line no-console
|
|
4905
|
-
isLastOptionBeforeFooter } = _a, props = __rest$1(_a, ["children", "className", "id", "description", "itemCount", "value", "onClick", "isDisabled", "isPlaceholder", "isNoResultsOption", "isSelected", "isChecked", "isFocused", "sendRef", "keyHandler", "index", "component", "inputId", "isFavorite", "ariaIsFavoriteLabel", "ariaIsNotFavoriteLabel", "isLoad", "isLoading", "setViewMoreNextIndex", "isLastOptionBeforeFooter"]);
|
|
4905
|
+
isLastOptionBeforeFooter, isGrouped = false } = _a, props = __rest$1(_a, ["children", "className", "id", "description", "itemCount", "value", "onClick", "isDisabled", "isPlaceholder", "isNoResultsOption", "isSelected", "isChecked", "isFocused", "sendRef", "keyHandler", "index", "component", "inputId", "isFavorite", "ariaIsFavoriteLabel", "ariaIsNotFavoriteLabel", "isLoad", "isLoading", "setViewMoreNextIndex", "isLastOptionBeforeFooter", "isGrouped"]);
|
|
4906
4906
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
4907
4907
|
const Component = component;
|
|
4908
4908
|
if (!id && isFavorite !== null) {
|
|
@@ -4925,56 +4925,78 @@
|
|
|
4925
4925
|
setViewMoreNextIndex();
|
|
4926
4926
|
onClick(event);
|
|
4927
4927
|
};
|
|
4928
|
-
|
|
4929
|
-
variant !== SelectVariant.checkbox &&
|
|
4930
|
-
isLoading && children
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4928
|
+
const renderOption = (onSelect, onClose, variant, inputIdPrefix, onFavorite) => {
|
|
4929
|
+
if (variant !== SelectVariant.checkbox && isLoading && isGrouped) {
|
|
4930
|
+
return (React__namespace.createElement("div", { role: "presentation", className: css(_default$b.selectListItem, isLoading && _default$b.modifiers.loading, className) }, children));
|
|
4931
|
+
}
|
|
4932
|
+
else if (variant !== SelectVariant.checkbox && isLoad && isGrouped) {
|
|
4933
|
+
return (React__namespace.createElement("div", null,
|
|
4934
|
+
React__namespace.createElement("button", Object.assign({}, props, { role: "presentation", className: css(_default$b.selectMenuItem, _default$b.modifiers.load, className), onClick: (event) => {
|
|
4935
|
+
onViewMoreClick(event);
|
|
4936
|
+
event.stopPropagation();
|
|
4937
|
+
}, ref: this.ref, type: "button" }), children || value.toString())));
|
|
4938
|
+
}
|
|
4939
|
+
else if (variant !== SelectVariant.checkbox) {
|
|
4940
|
+
return (React__namespace.createElement("li", { id: generatedId, role: "presentation", className: css(isLoading && _default$b.selectListItem, !isLoad && !isLoading && _default$b.selectMenuWrapper, isFavorite && _default$b.modifiers.favorite, isFocused && _default$b.modifiers.focus, isLoading && _default$b.modifiers.loading), ref: this.liRef },
|
|
4941
|
+
isLoading && children,
|
|
4942
|
+
isLoad && !isGrouped && (React__namespace.createElement("button", Object.assign({}, props, { className: css(_default$b.selectMenuItem, _default$b.modifiers.load, className), onClick: (event) => {
|
|
4943
|
+
onViewMoreClick(event);
|
|
4944
|
+
event.stopPropagation();
|
|
4945
|
+
}, ref: this.ref, type: "button" }), itemDisplay)),
|
|
4946
|
+
!isLoading && !isLoad && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4947
|
+
React__namespace.createElement(Component, Object.assign({}, props, { className: css(_default$b.selectMenuItem, isLoad && _default$b.modifiers.load, isSelected && _default$b.modifiers.selected, isDisabled && _default$b.modifiers.disabled, description && _default$b.modifiers.description, isFavorite !== null && _default$b.modifiers.link, className), onClick: (event) => {
|
|
4948
|
+
if (!isDisabled) {
|
|
4949
|
+
onClick(event);
|
|
4950
|
+
onSelect(event, value, isPlaceholder);
|
|
4951
|
+
onClose();
|
|
4952
|
+
}
|
|
4953
|
+
}, role: "option", "aria-selected": isSelected || null, ref: this.ref, onKeyDown: (event) => {
|
|
4954
|
+
this.onKeyDown(event, 0);
|
|
4955
|
+
}, type: "button" }),
|
|
4956
|
+
description && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4957
|
+
React__namespace.createElement("span", { className: css(_default$b.selectMenuItemMain) },
|
|
4958
|
+
itemDisplay,
|
|
4959
|
+
isSelected && (React__namespace.createElement("span", { className: css(_default$b.selectMenuItemIcon) },
|
|
4960
|
+
React__namespace.createElement(CheckIcon$1, { "aria-hidden": true })))),
|
|
4961
|
+
React__namespace.createElement("span", { className: css(_default$b.selectMenuItemDescription) }, description))),
|
|
4962
|
+
!description && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4947
4963
|
itemDisplay,
|
|
4948
4964
|
isSelected && (React__namespace.createElement("span", { className: css(_default$b.selectMenuItemIcon) },
|
|
4949
|
-
React__namespace.createElement(CheckIcon$1, { "aria-hidden": true })))),
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
React__namespace.createElement(CheckIcon$1, { "aria-hidden": true })))))),
|
|
4955
|
-
isFavorite !== null && id && favoriteButton(onFavorite))))),
|
|
4956
|
-
variant === SelectVariant.checkbox && isLoad && (React__namespace.createElement("button", { className: css(_default$b.selectMenuItem, _default$b.modifiers.load, isFocused && _default$b.modifiers.focus, className), onKeyDown: (event) => {
|
|
4957
|
-
this.onKeyDown(event, 0, undefined, true);
|
|
4958
|
-
}, onClick: (event) => {
|
|
4959
|
-
onViewMoreClick(event);
|
|
4960
|
-
event.stopPropagation();
|
|
4961
|
-
}, ref: this.ref }, children || (value && value.toString && value.toString()))),
|
|
4962
|
-
variant === SelectVariant.checkbox && isLoading && (React__namespace.createElement("div", { className: css(_default$b.selectListItem, isLoading && _default$b.modifiers.loading, className) }, children)),
|
|
4963
|
-
variant === SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad && (React__namespace.createElement("label", Object.assign({}, props, { className: css(_default$9.check, _default$b.selectMenuItem, isDisabled && _default$b.modifiers.disabled, description && _default$b.modifiers.description, className), onKeyDown: (event) => {
|
|
4964
|
-
this.onKeyDown(event, 0, undefined, true);
|
|
4965
|
-
} }),
|
|
4966
|
-
React__namespace.createElement("input", { id: inputId || `${inputIdPrefix}-${value.toString()}`, className: css(_default$9.checkInput), type: "checkbox", onChange: event => {
|
|
4967
|
-
if (!isDisabled) {
|
|
4968
|
-
onClick(event);
|
|
4969
|
-
onSelect(event, value);
|
|
4970
|
-
}
|
|
4971
|
-
}, ref: this.ref, checked: isChecked || false, disabled: isDisabled }),
|
|
4972
|
-
React__namespace.createElement("span", { className: css(_default$9.checkLabel, isDisabled && _default$b.modifiers.disabled) }, itemDisplay),
|
|
4973
|
-
description && React__namespace.createElement("div", { className: css(_default$9.checkDescription) }, description))),
|
|
4974
|
-
variant === SelectVariant.checkbox && isNoResultsOption && !isLoading && !isLoad && (React__namespace.createElement("div", null,
|
|
4975
|
-
React__namespace.createElement(Component, Object.assign({}, props, { className: css(_default$b.selectMenuItem, isSelected && _default$b.modifiers.selected, isDisabled && _default$b.modifiers.disabled, className), role: "option", "aria-selected": isSelected || null, ref: this.ref, onKeyDown: (event) => {
|
|
4965
|
+
React__namespace.createElement(CheckIcon$1, { "aria-hidden": true })))))),
|
|
4966
|
+
isFavorite !== null && id && favoriteButton(onFavorite)))));
|
|
4967
|
+
}
|
|
4968
|
+
else if (variant === SelectVariant.checkbox && isLoad) {
|
|
4969
|
+
return (React__namespace.createElement("button", { className: css(_default$b.selectMenuItem, _default$b.modifiers.load, isFocused && _default$b.modifiers.focus, className), onKeyDown: (event) => {
|
|
4976
4970
|
this.onKeyDown(event, 0, undefined, true);
|
|
4977
|
-
},
|
|
4971
|
+
}, onClick: (event) => {
|
|
4972
|
+
onViewMoreClick(event);
|
|
4973
|
+
event.stopPropagation();
|
|
4974
|
+
}, ref: this.ref }, children || (value && value.toString && value.toString())));
|
|
4975
|
+
}
|
|
4976
|
+
else if (variant === SelectVariant.checkbox && isLoading) {
|
|
4977
|
+
return (React__namespace.createElement("div", { className: css(_default$b.selectListItem, isLoading && _default$b.modifiers.loading, className) }, children));
|
|
4978
|
+
}
|
|
4979
|
+
else if (variant === SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad) {
|
|
4980
|
+
return (React__namespace.createElement("label", Object.assign({}, props, { className: css(_default$9.check, _default$b.selectMenuItem, isDisabled && _default$b.modifiers.disabled, description && _default$b.modifiers.description, className), onKeyDown: (event) => {
|
|
4981
|
+
this.onKeyDown(event, 0, undefined, true);
|
|
4982
|
+
} }),
|
|
4983
|
+
React__namespace.createElement("input", { id: inputId || `${inputIdPrefix}-${value.toString()}`, className: css(_default$9.checkInput), type: "checkbox", onChange: event => {
|
|
4984
|
+
if (!isDisabled) {
|
|
4985
|
+
onClick(event);
|
|
4986
|
+
onSelect(event, value);
|
|
4987
|
+
}
|
|
4988
|
+
}, ref: this.ref, checked: isChecked || false, disabled: isDisabled }),
|
|
4989
|
+
React__namespace.createElement("span", { className: css(_default$9.checkLabel, isDisabled && _default$b.modifiers.disabled) }, itemDisplay),
|
|
4990
|
+
description && React__namespace.createElement("div", { className: css(_default$9.checkDescription) }, description)));
|
|
4991
|
+
}
|
|
4992
|
+
else if (variant === SelectVariant.checkbox && isNoResultsOption && !isLoading && !isLoad) {
|
|
4993
|
+
return (React__namespace.createElement("div", null,
|
|
4994
|
+
React__namespace.createElement(Component, Object.assign({}, props, { className: css(_default$b.selectMenuItem, isSelected && _default$b.modifiers.selected, isDisabled && _default$b.modifiers.disabled, className), role: "option", "aria-selected": isSelected || null, ref: this.ref, onKeyDown: (event) => {
|
|
4995
|
+
this.onKeyDown(event, 0, undefined, true);
|
|
4996
|
+
}, type: "button" }), itemDisplay)));
|
|
4997
|
+
}
|
|
4998
|
+
};
|
|
4999
|
+
return (React__namespace.createElement(SelectConsumer, null, ({ onSelect, onClose, variant, inputIdPrefix, onFavorite }) => (React__namespace.createElement(React__namespace.Fragment, null, renderOption(onSelect, onClose, variant, inputIdPrefix, onFavorite)))));
|
|
4978
5000
|
}
|
|
4979
5001
|
}
|
|
4980
5002
|
SelectOption.displayName = 'SelectOption';
|
|
@@ -5982,11 +6004,11 @@
|
|
|
5982
6004
|
if (isOpen) {
|
|
5983
6005
|
if (renderableItems.find(item => { var _a; return ((_a = item) === null || _a === void 0 ? void 0 : _a.key) === 'loading'; }) === undefined) {
|
|
5984
6006
|
if (loadingVariant === 'spinner') {
|
|
5985
|
-
renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading" },
|
|
6007
|
+
renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading", isGrouped: true },
|
|
5986
6008
|
React__namespace.createElement(Spinner, { size: "lg" })));
|
|
5987
6009
|
}
|
|
5988
6010
|
else if (loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.text) {
|
|
5989
|
-
renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text, setViewMoreNextIndex: this.setVieMoreNextIndex, onClick: loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.onClick }));
|
|
6011
|
+
renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text, isGrouped: true, setViewMoreNextIndex: this.setVieMoreNextIndex, onClick: loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.onClick }));
|
|
5990
6012
|
}
|
|
5991
6013
|
}
|
|
5992
6014
|
}
|