@progress/kendo-react-grid 5.19.0 → 5.20.0-dev.202309281201
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/dist/cdn/js/kendo-react-grid.js +1 -1
- package/dist/es/StatusBar.d.ts +1 -1
- package/dist/es/StatusBar.js +10 -10
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/StatusBar.d.ts +1 -1
- package/dist/npm/StatusBar.js +10 -10
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
package/dist/es/StatusBar.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const leafColumns: (columns: GridColumnProps[]) => GridColumnProp
|
|
|
36
36
|
/**
|
|
37
37
|
* Represents the arguments of the getStatusData function.
|
|
38
38
|
*/
|
|
39
|
-
export interface StatusDataArgs extends Pick<GridSelectionChangeEvent, '
|
|
39
|
+
export interface StatusDataArgs extends Pick<GridSelectionChangeEvent, 'selectedField' | 'dataItems' | 'target'> {
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Calculates the status data.
|
package/dist/es/StatusBar.js
CHANGED
|
@@ -44,13 +44,10 @@ export var leafColumns = function (columns) {
|
|
|
44
44
|
* @returns StatusItem[]
|
|
45
45
|
*/
|
|
46
46
|
export var getStatusData = function (args) {
|
|
47
|
-
var dataItems = args.dataItems, target = args.target,
|
|
47
|
+
var dataItems = args.dataItems, target = args.target, selectedField = args.selectedField;
|
|
48
48
|
var columns = leafColumns(target.columns);
|
|
49
|
-
if (args.cell) {
|
|
50
|
-
columns = columns.slice(startColIndex, endColIndex + 1);
|
|
51
|
-
}
|
|
52
49
|
var getters = columns.map(function (c) { return c.field; }).filter(function (f) { return f && typeof f === 'string'; }).map(function (f) { return getter(f); });
|
|
53
|
-
var
|
|
50
|
+
var getSelected = getter(selectedField);
|
|
54
51
|
var grouped = { dates: [], numbers: [], booleans: [], others: [] };
|
|
55
52
|
var add = function (value) {
|
|
56
53
|
if (typeof value === 'number') {
|
|
@@ -62,14 +59,17 @@ export var getStatusData = function (args) {
|
|
|
62
59
|
else if (value instanceof Date) {
|
|
63
60
|
grouped.dates.push(value);
|
|
64
61
|
}
|
|
65
|
-
else
|
|
62
|
+
else {
|
|
66
63
|
grouped.others.push(value);
|
|
67
64
|
}
|
|
68
65
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
dataItems.forEach(function (item) {
|
|
67
|
+
var selected = getSelected(item);
|
|
68
|
+
if (selected) {
|
|
69
|
+
selected.forEach(function (colIndex) {
|
|
70
|
+
add(getters[colIndex](item));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
73
|
});
|
|
74
74
|
var datesAsNumbers = grouped.dates.map(function (d) { return d.getTime(); });
|
|
75
75
|
var isTrueCount = grouped.booleans.filter(function (bool) { return bool; }).length;
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-grid',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1695901014,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
package/dist/npm/StatusBar.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const leafColumns: (columns: GridColumnProps[]) => GridColumnProp
|
|
|
36
36
|
/**
|
|
37
37
|
* Represents the arguments of the getStatusData function.
|
|
38
38
|
*/
|
|
39
|
-
export interface StatusDataArgs extends Pick<GridSelectionChangeEvent, '
|
|
39
|
+
export interface StatusDataArgs extends Pick<GridSelectionChangeEvent, 'selectedField' | 'dataItems' | 'target'> {
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Calculates the status data.
|
package/dist/npm/StatusBar.js
CHANGED
|
@@ -49,13 +49,10 @@ exports.leafColumns = leafColumns;
|
|
|
49
49
|
* @returns StatusItem[]
|
|
50
50
|
*/
|
|
51
51
|
var getStatusData = function (args) {
|
|
52
|
-
var dataItems = args.dataItems, target = args.target,
|
|
52
|
+
var dataItems = args.dataItems, target = args.target, selectedField = args.selectedField;
|
|
53
53
|
var columns = (0, exports.leafColumns)(target.columns);
|
|
54
|
-
if (args.cell) {
|
|
55
|
-
columns = columns.slice(startColIndex, endColIndex + 1);
|
|
56
|
-
}
|
|
57
54
|
var getters = columns.map(function (c) { return c.field; }).filter(function (f) { return f && typeof f === 'string'; }).map(function (f) { return (0, kendo_react_common_1.getter)(f); });
|
|
58
|
-
var
|
|
55
|
+
var getSelected = (0, kendo_react_common_1.getter)(selectedField);
|
|
59
56
|
var grouped = { dates: [], numbers: [], booleans: [], others: [] };
|
|
60
57
|
var add = function (value) {
|
|
61
58
|
if (typeof value === 'number') {
|
|
@@ -67,14 +64,17 @@ var getStatusData = function (args) {
|
|
|
67
64
|
else if (value instanceof Date) {
|
|
68
65
|
grouped.dates.push(value);
|
|
69
66
|
}
|
|
70
|
-
else
|
|
67
|
+
else {
|
|
71
68
|
grouped.others.push(value);
|
|
72
69
|
}
|
|
73
70
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
dataItems.forEach(function (item) {
|
|
72
|
+
var selected = getSelected(item);
|
|
73
|
+
if (selected) {
|
|
74
|
+
selected.forEach(function (colIndex) {
|
|
75
|
+
add(getters[colIndex](item));
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
78
|
});
|
|
79
79
|
var datesAsNumbers = grouped.dates.map(function (d) { return d.getTime(); });
|
|
80
80
|
var isTrueCount = grouped.booleans.filter(function (bool) { return bool; }).length;
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-grid',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1695901014,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|