rsuite 5.6.3 → 5.6.6
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 +20 -0
- package/Sidenav/styles/index.less +2 -1
- package/cjs/CheckTree/index.d.ts +2 -0
- package/cjs/InputNumber/InputNumber.js +2 -0
- package/cjs/Uploader/index.d.ts +1 -1
- package/cjs/utils/getDataGroupBy.d.ts +1 -1
- package/cjs/utils/getDataGroupBy.js +13 -3
- package/dist/rsuite-rtl.css +2 -1
- package/dist/rsuite-rtl.min.css +1 -1
- package/dist/rsuite-rtl.min.css.map +1 -1
- package/dist/rsuite.css +2 -1
- package/dist/rsuite.js +4 -4
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.css.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/CheckTree/index.d.ts +2 -0
- package/esm/InputNumber/InputNumber.js +2 -0
- package/esm/Uploader/index.d.ts +1 -1
- package/esm/utils/getDataGroupBy.d.ts +1 -1
- package/esm/utils/getDataGroupBy.js +10 -3
- package/package.json +2 -2
package/esm/CheckTree/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import { TreeBaseProps } from '../Tree/Tree';
|
|
|
4
4
|
export interface CheckTreeProps extends TreeBaseProps<ValueType>, FormControlPickerProps<ValueType> {
|
|
5
5
|
/** Tree node cascade */
|
|
6
6
|
cascade?: boolean;
|
|
7
|
+
/** Set the option value for the check box not to be rendered */
|
|
8
|
+
uncheckableItemValues?: ValueType;
|
|
7
9
|
}
|
|
8
10
|
declare const CheckTree: RsRefForwardingComponent<'div', CheckTreeProps>;
|
|
9
11
|
export default CheckTree;
|
|
@@ -267,11 +267,13 @@ var InputNumber = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
267
267
|
}), prefixElement && /*#__PURE__*/React.createElement(InputGroupAddon, null, prefixElement), input, /*#__PURE__*/React.createElement("span", {
|
|
268
268
|
className: prefix('btn-group-vertical')
|
|
269
269
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
270
|
+
tabIndex: -1,
|
|
270
271
|
appearance: buttonAppearance,
|
|
271
272
|
className: prefix('touchspin-up'),
|
|
272
273
|
onClick: handlePlus,
|
|
273
274
|
disabled: disabledUpButton || disabled || readOnly
|
|
274
275
|
}, /*#__PURE__*/React.createElement(AngleUpIcon, null)), /*#__PURE__*/React.createElement(Button, {
|
|
276
|
+
tabIndex: -1,
|
|
275
277
|
appearance: buttonAppearance,
|
|
276
278
|
className: prefix('touchspin-down'),
|
|
277
279
|
onClick: handleMinus,
|
package/esm/Uploader/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const KEY_GROUP: string | symbol;
|
|
2
2
|
export declare const KEY_GROUP_TITLE = "groupTitle";
|
|
3
|
-
export default function getDataGroupBy(data: any[] | undefined, key: string, sort
|
|
3
|
+
export default function getDataGroupBy(data: any[] | undefined, key: string, sort?: any): any[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _get from "lodash/get";
|
|
1
2
|
import { flattenTree } from '../utils/treeUtils';
|
|
2
3
|
var hasSymbol = typeof Symbol === 'function';
|
|
3
4
|
export var KEY_GROUP = hasSymbol ? Symbol('_$grouped') : '_$grouped';
|
|
@@ -10,11 +11,17 @@ export default function getDataGroupBy(data, key, sort) {
|
|
|
10
11
|
var tempData = {};
|
|
11
12
|
var isSort = typeof sort === 'function';
|
|
12
13
|
data.forEach(function (item) {
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
// this will allow getting data using dot notation
|
|
15
|
+
// i.e groupBy="country.name" as country will be a nested object
|
|
16
|
+
// to the item and the name will be nested key to the country object
|
|
17
|
+
// can be used with values in arrays, i.e groupBy="addresses.0.country.name"
|
|
18
|
+
var groupByValue = _get(item, key, '');
|
|
19
|
+
|
|
20
|
+
if (!tempData[groupByValue]) {
|
|
21
|
+
tempData[groupByValue] = [];
|
|
15
22
|
}
|
|
16
23
|
|
|
17
|
-
tempData[
|
|
24
|
+
tempData[groupByValue].push(item);
|
|
18
25
|
});
|
|
19
26
|
var nextData = Object.entries(tempData).map(function (_ref) {
|
|
20
27
|
var _ref2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsuite",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.6",
|
|
4
4
|
"description": "A suite of react components",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"lodash": "^4.17.11",
|
|
38
38
|
"prop-types": "^15.7.2",
|
|
39
39
|
"react-virtualized": "^9.22.3",
|
|
40
|
-
"rsuite-table": "^5.3.
|
|
40
|
+
"rsuite-table": "^5.3.6",
|
|
41
41
|
"schema-typed": "^2.0.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|