rsuite 5.6.2 → 5.6.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 +15 -0
- package/Sidenav/styles/index.less +2 -1
- package/cjs/CheckTree/index.d.ts +2 -0
- 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 +17 -336
- package/dist/rsuite.js.map +1 -1
- 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/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;
|
|
@@ -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.5",
|
|
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": {
|