@progress/kendo-angular-grid 19.2.0-develop.2 → 19.2.0-develop.4
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/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/list.component.mjs +2 -1
- package/esm2022/selection/selection-checkbox.directive.mjs +1 -1
- package/esm2022/selection/selection.service.mjs +23 -4
- package/esm2022/utils.mjs +4 -0
- package/fesm2022/progress-kendo-angular-grid.mjs +31 -8
- package/package.json +20 -20
- package/schematics/ngAdd/index.js +4 -4
- package/selection/selection.service.d.ts +1 -1
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '19.2.0-develop.
|
|
13
|
+
publishDate: 1750933458,
|
|
14
|
+
version: '19.2.0-develop.4',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -270,7 +270,8 @@ export class ListComponent {
|
|
|
270
270
|
if (this.virtualColumns && (!this.viewportColumns || this.viewportWidthChange())) {
|
|
271
271
|
this.updateViewportColumns();
|
|
272
272
|
}
|
|
273
|
-
|
|
273
|
+
const shouldCalculatePageSize = isDocumentAvailable() && this.isVirtual && this.ctx.grid && !this.ctx.grid.pageSize;
|
|
274
|
+
if (shouldCalculatePageSize) {
|
|
274
275
|
const calculatedPageSize = this.calcVirtualPageSize();
|
|
275
276
|
if (calculatedPageSize > 0) {
|
|
276
277
|
this.ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {
|
|
@@ -82,7 +82,7 @@ export class SelectionCheckboxDirective {
|
|
|
82
82
|
const ctrlKey = event.ctrlKey || event.metaKey;
|
|
83
83
|
if (event.shiftKey && this.selectionService.options.mode === 'multiple') {
|
|
84
84
|
const item = { index: this.itemIndex };
|
|
85
|
-
ev = this.selectionService.addAllTo(item, ctrlKey);
|
|
85
|
+
ev = this.selectionService.addAllTo(item, ctrlKey, false, event.shiftKey);
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
88
|
ev = this.selectionService.toggleByIndex(this.itemIndex);
|
|
@@ -143,6 +143,8 @@ export class SelectionService {
|
|
|
143
143
|
if (ev.shiftKey) {
|
|
144
144
|
ev.rangeStartRow = { dataItem: this.lastSelectionData, index: this.lastSelectionStartIndex };
|
|
145
145
|
ev.rangeEndRow = { dataItem: item.data, index: item.index };
|
|
146
|
+
this.lastSelectionData = item.data;
|
|
147
|
+
this.lastSelectionStartIndex = item.index;
|
|
146
148
|
}
|
|
147
149
|
this.syncCurrentSelection(ev);
|
|
148
150
|
this.changes.emit(ev);
|
|
@@ -231,13 +233,14 @@ export class SelectionService {
|
|
|
231
233
|
item = iterator.next();
|
|
232
234
|
}
|
|
233
235
|
}
|
|
234
|
-
addAllTo(item, ctrlKey, preserveSelection = false) {
|
|
236
|
+
addAllTo(item, ctrlKey, preserveSelection = false, shiftKey = false) {
|
|
235
237
|
const selectedRows = [];
|
|
236
238
|
const deselectedRows = [];
|
|
237
239
|
const start = Math.min(this.lastSelectionStartIndex, item.index);
|
|
238
240
|
const end = Math.max(this.lastSelectionStartIndex, item.index);
|
|
239
241
|
const iterator = this.getIterator();
|
|
240
242
|
let next = iterator.next();
|
|
243
|
+
let selectedItem;
|
|
241
244
|
while (!next.done) {
|
|
242
245
|
if (next.value && next.value.type === "data") {
|
|
243
246
|
const idx = next.value.index;
|
|
@@ -248,6 +251,9 @@ export class SelectionService {
|
|
|
248
251
|
if ((idx >= start && idx <= end) && !this.isSelected(idx) && !this.nonSelectableRows.has(idx)) {
|
|
249
252
|
selectedRows.push(rowArgs);
|
|
250
253
|
}
|
|
254
|
+
if (idx === item.index && !this.nonSelectableRows.has(idx)) {
|
|
255
|
+
selectedItem = rowArgs;
|
|
256
|
+
}
|
|
251
257
|
}
|
|
252
258
|
next = iterator.next();
|
|
253
259
|
}
|
|
@@ -255,10 +261,23 @@ export class SelectionService {
|
|
|
255
261
|
const nonSelectableRows = this.currentSelection.filter(i => this.nonSelectableRows.has(i.index));
|
|
256
262
|
deselectedRows.push(...nonSelectableRows);
|
|
257
263
|
}
|
|
258
|
-
|
|
259
|
-
deselectedRows
|
|
260
|
-
selectedRows
|
|
264
|
+
const selectionEvent = {
|
|
265
|
+
deselectedRows,
|
|
266
|
+
selectedRows
|
|
261
267
|
};
|
|
268
|
+
if (shiftKey && selectedItem) {
|
|
269
|
+
selectionEvent.rangeStartRow = {
|
|
270
|
+
dataItem: this.lastSelectionData,
|
|
271
|
+
index: this.lastSelectionStartIndex
|
|
272
|
+
};
|
|
273
|
+
selectionEvent.rangeEndRow = {
|
|
274
|
+
dataItem: selectedItem.dataItem,
|
|
275
|
+
index: selectedItem.index
|
|
276
|
+
};
|
|
277
|
+
this.lastSelectionData = selectedItem.dataItem;
|
|
278
|
+
this.lastSelectionStartIndex = selectedItem.index;
|
|
279
|
+
}
|
|
280
|
+
return selectionEvent;
|
|
262
281
|
}
|
|
263
282
|
updateAll(selectAllChecked) {
|
|
264
283
|
this.selectAllChecked = selectAllChecked;
|
package/esm2022/utils.mjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { InjectionToken } from '@angular/core';
|
|
6
6
|
import { merge, of } from 'rxjs';
|
|
7
|
+
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
8
|
export { isChanged, anyChanged, hasObservers } from '@progress/kendo-angular-common';
|
|
8
9
|
const EMPTY_REGEX = /^\s*$/;
|
|
9
10
|
/**
|
|
@@ -205,6 +206,9 @@ export const isMultipleRangesEnabled = (selectableSettings) => {
|
|
|
205
206
|
*/
|
|
206
207
|
export const calcRowHeight = (tableBody) => {
|
|
207
208
|
let result = 0;
|
|
209
|
+
if (!isDocumentAvailable()) {
|
|
210
|
+
return result;
|
|
211
|
+
}
|
|
208
212
|
if (tableBody) {
|
|
209
213
|
const row = tableBody.insertRow(0);
|
|
210
214
|
const cell = row.insertCell(0);
|
|
@@ -532,6 +532,9 @@ const isMultipleRangesEnabled = (selectableSettings) => {
|
|
|
532
532
|
*/
|
|
533
533
|
const calcRowHeight = (tableBody) => {
|
|
534
534
|
let result = 0;
|
|
535
|
+
if (!isDocumentAvailable()) {
|
|
536
|
+
return result;
|
|
537
|
+
}
|
|
535
538
|
if (tableBody) {
|
|
536
539
|
const row = tableBody.insertRow(0);
|
|
537
540
|
const cell = row.insertCell(0);
|
|
@@ -16985,6 +16988,8 @@ class SelectionService {
|
|
|
16985
16988
|
if (ev.shiftKey) {
|
|
16986
16989
|
ev.rangeStartRow = { dataItem: this.lastSelectionData, index: this.lastSelectionStartIndex };
|
|
16987
16990
|
ev.rangeEndRow = { dataItem: item.data, index: item.index };
|
|
16991
|
+
this.lastSelectionData = item.data;
|
|
16992
|
+
this.lastSelectionStartIndex = item.index;
|
|
16988
16993
|
}
|
|
16989
16994
|
this.syncCurrentSelection(ev);
|
|
16990
16995
|
this.changes.emit(ev);
|
|
@@ -17073,13 +17078,14 @@ class SelectionService {
|
|
|
17073
17078
|
item = iterator.next();
|
|
17074
17079
|
}
|
|
17075
17080
|
}
|
|
17076
|
-
addAllTo(item, ctrlKey, preserveSelection = false) {
|
|
17081
|
+
addAllTo(item, ctrlKey, preserveSelection = false, shiftKey = false) {
|
|
17077
17082
|
const selectedRows = [];
|
|
17078
17083
|
const deselectedRows = [];
|
|
17079
17084
|
const start = Math.min(this.lastSelectionStartIndex, item.index);
|
|
17080
17085
|
const end = Math.max(this.lastSelectionStartIndex, item.index);
|
|
17081
17086
|
const iterator = this.getIterator();
|
|
17082
17087
|
let next = iterator.next();
|
|
17088
|
+
let selectedItem;
|
|
17083
17089
|
while (!next.done) {
|
|
17084
17090
|
if (next.value && next.value.type === "data") {
|
|
17085
17091
|
const idx = next.value.index;
|
|
@@ -17090,6 +17096,9 @@ class SelectionService {
|
|
|
17090
17096
|
if ((idx >= start && idx <= end) && !this.isSelected(idx) && !this.nonSelectableRows.has(idx)) {
|
|
17091
17097
|
selectedRows.push(rowArgs);
|
|
17092
17098
|
}
|
|
17099
|
+
if (idx === item.index && !this.nonSelectableRows.has(idx)) {
|
|
17100
|
+
selectedItem = rowArgs;
|
|
17101
|
+
}
|
|
17093
17102
|
}
|
|
17094
17103
|
next = iterator.next();
|
|
17095
17104
|
}
|
|
@@ -17097,10 +17106,23 @@ class SelectionService {
|
|
|
17097
17106
|
const nonSelectableRows = this.currentSelection.filter(i => this.nonSelectableRows.has(i.index));
|
|
17098
17107
|
deselectedRows.push(...nonSelectableRows);
|
|
17099
17108
|
}
|
|
17100
|
-
|
|
17101
|
-
deselectedRows
|
|
17102
|
-
selectedRows
|
|
17109
|
+
const selectionEvent = {
|
|
17110
|
+
deselectedRows,
|
|
17111
|
+
selectedRows
|
|
17103
17112
|
};
|
|
17113
|
+
if (shiftKey && selectedItem) {
|
|
17114
|
+
selectionEvent.rangeStartRow = {
|
|
17115
|
+
dataItem: this.lastSelectionData,
|
|
17116
|
+
index: this.lastSelectionStartIndex
|
|
17117
|
+
};
|
|
17118
|
+
selectionEvent.rangeEndRow = {
|
|
17119
|
+
dataItem: selectedItem.dataItem,
|
|
17120
|
+
index: selectedItem.index
|
|
17121
|
+
};
|
|
17122
|
+
this.lastSelectionData = selectedItem.dataItem;
|
|
17123
|
+
this.lastSelectionStartIndex = selectedItem.index;
|
|
17124
|
+
}
|
|
17125
|
+
return selectionEvent;
|
|
17104
17126
|
}
|
|
17105
17127
|
updateAll(selectAllChecked) {
|
|
17106
17128
|
this.selectAllChecked = selectAllChecked;
|
|
@@ -19089,7 +19111,7 @@ class SelectionCheckboxDirective {
|
|
|
19089
19111
|
const ctrlKey = event.ctrlKey || event.metaKey;
|
|
19090
19112
|
if (event.shiftKey && this.selectionService.options.mode === 'multiple') {
|
|
19091
19113
|
const item = { index: this.itemIndex };
|
|
19092
|
-
ev = this.selectionService.addAllTo(item, ctrlKey);
|
|
19114
|
+
ev = this.selectionService.addAllTo(item, ctrlKey, false, event.shiftKey);
|
|
19093
19115
|
}
|
|
19094
19116
|
else {
|
|
19095
19117
|
ev = this.selectionService.toggleByIndex(this.itemIndex);
|
|
@@ -21194,8 +21216,8 @@ const packageMetadata = {
|
|
|
21194
21216
|
productName: 'Kendo UI for Angular',
|
|
21195
21217
|
productCode: 'KENDOUIANGULAR',
|
|
21196
21218
|
productCodes: ['KENDOUIANGULAR'],
|
|
21197
|
-
publishDate:
|
|
21198
|
-
version: '19.2.0-develop.
|
|
21219
|
+
publishDate: 1750933458,
|
|
21220
|
+
version: '19.2.0-develop.4',
|
|
21199
21221
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
21200
21222
|
};
|
|
21201
21223
|
|
|
@@ -23576,7 +23598,8 @@ class ListComponent {
|
|
|
23576
23598
|
if (this.virtualColumns && (!this.viewportColumns || this.viewportWidthChange())) {
|
|
23577
23599
|
this.updateViewportColumns();
|
|
23578
23600
|
}
|
|
23579
|
-
|
|
23601
|
+
const shouldCalculatePageSize = isDocumentAvailable() && this.isVirtual && this.ctx.grid && !this.ctx.grid.pageSize;
|
|
23602
|
+
if (shouldCalculatePageSize) {
|
|
23580
23603
|
const calculatedPageSize = this.calcVirtualPageSize();
|
|
23581
23604
|
if (calculatedPageSize > 0) {
|
|
23582
23605
|
this.ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "19.2.0-develop.
|
|
3
|
+
"version": "19.2.0-develop.4",
|
|
4
4
|
"description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"package": {
|
|
27
27
|
"productName": "Kendo UI for Angular",
|
|
28
28
|
"productCode": "KENDOUIANGULAR",
|
|
29
|
-
"publishDate":
|
|
29
|
+
"publishDate": 1750933458,
|
|
30
30
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
@@ -39,28 +39,28 @@
|
|
|
39
39
|
"@progress/kendo-data-query": "^1.0.0",
|
|
40
40
|
"@progress/kendo-drawing": "^1.21.0",
|
|
41
41
|
"@progress/kendo-licensing": "^1.5.0",
|
|
42
|
-
"@progress/kendo-angular-buttons": "19.2.0-develop.
|
|
43
|
-
"@progress/kendo-angular-common": "19.2.0-develop.
|
|
44
|
-
"@progress/kendo-angular-dateinputs": "19.2.0-develop.
|
|
45
|
-
"@progress/kendo-angular-layout": "19.2.0-develop.
|
|
46
|
-
"@progress/kendo-angular-navigation": "19.2.0-develop.
|
|
47
|
-
"@progress/kendo-angular-dropdowns": "19.2.0-develop.
|
|
48
|
-
"@progress/kendo-angular-excel-export": "19.2.0-develop.
|
|
49
|
-
"@progress/kendo-angular-icons": "19.2.0-develop.
|
|
50
|
-
"@progress/kendo-angular-inputs": "19.2.0-develop.
|
|
51
|
-
"@progress/kendo-angular-intl": "19.2.0-develop.
|
|
52
|
-
"@progress/kendo-angular-l10n": "19.2.0-develop.
|
|
53
|
-
"@progress/kendo-angular-label": "19.2.0-develop.
|
|
54
|
-
"@progress/kendo-angular-pager": "19.2.0-develop.
|
|
55
|
-
"@progress/kendo-angular-pdf-export": "19.2.0-develop.
|
|
56
|
-
"@progress/kendo-angular-popup": "19.2.0-develop.
|
|
57
|
-
"@progress/kendo-angular-toolbar": "19.2.0-develop.
|
|
58
|
-
"@progress/kendo-angular-utils": "19.2.0-develop.
|
|
42
|
+
"@progress/kendo-angular-buttons": "19.2.0-develop.4",
|
|
43
|
+
"@progress/kendo-angular-common": "19.2.0-develop.4",
|
|
44
|
+
"@progress/kendo-angular-dateinputs": "19.2.0-develop.4",
|
|
45
|
+
"@progress/kendo-angular-layout": "19.2.0-develop.4",
|
|
46
|
+
"@progress/kendo-angular-navigation": "19.2.0-develop.4",
|
|
47
|
+
"@progress/kendo-angular-dropdowns": "19.2.0-develop.4",
|
|
48
|
+
"@progress/kendo-angular-excel-export": "19.2.0-develop.4",
|
|
49
|
+
"@progress/kendo-angular-icons": "19.2.0-develop.4",
|
|
50
|
+
"@progress/kendo-angular-inputs": "19.2.0-develop.4",
|
|
51
|
+
"@progress/kendo-angular-intl": "19.2.0-develop.4",
|
|
52
|
+
"@progress/kendo-angular-l10n": "19.2.0-develop.4",
|
|
53
|
+
"@progress/kendo-angular-label": "19.2.0-develop.4",
|
|
54
|
+
"@progress/kendo-angular-pager": "19.2.0-develop.4",
|
|
55
|
+
"@progress/kendo-angular-pdf-export": "19.2.0-develop.4",
|
|
56
|
+
"@progress/kendo-angular-popup": "19.2.0-develop.4",
|
|
57
|
+
"@progress/kendo-angular-toolbar": "19.2.0-develop.4",
|
|
58
|
+
"@progress/kendo-angular-utils": "19.2.0-develop.4",
|
|
59
59
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"tslib": "^2.3.1",
|
|
63
|
-
"@progress/kendo-angular-schematics": "19.2.0-develop.
|
|
63
|
+
"@progress/kendo-angular-schematics": "19.2.0-develop.4",
|
|
64
64
|
"@progress/kendo-common": "^1.0.1",
|
|
65
65
|
"@progress/kendo-file-saver": "^1.0.0"
|
|
66
66
|
},
|
|
@@ -4,14 +4,14 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
|
|
6
6
|
// peer deps of the dropdowns
|
|
7
|
-
'@progress/kendo-angular-treeview': '19.2.0-develop.
|
|
8
|
-
'@progress/kendo-angular-navigation': '19.2.0-develop.
|
|
7
|
+
'@progress/kendo-angular-treeview': '19.2.0-develop.4',
|
|
8
|
+
'@progress/kendo-angular-navigation': '19.2.0-develop.4',
|
|
9
9
|
// peer dependency of kendo-angular-inputs
|
|
10
|
-
'@progress/kendo-angular-dialog': '19.2.0-develop.
|
|
10
|
+
'@progress/kendo-angular-dialog': '19.2.0-develop.4',
|
|
11
11
|
// peer dependency of kendo-angular-icons
|
|
12
12
|
'@progress/kendo-svg-icons': '^4.0.0',
|
|
13
13
|
// peer dependency of kendo-angular-layout
|
|
14
|
-
'@progress/kendo-angular-progressbar': '19.2.0-develop.
|
|
14
|
+
'@progress/kendo-angular-progressbar': '19.2.0-develop.4'
|
|
15
15
|
} });
|
|
16
16
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
17
17
|
}
|
|
@@ -59,7 +59,7 @@ export declare class SelectionService implements OnDestroy {
|
|
|
59
59
|
toggleByIndex(index: number): any;
|
|
60
60
|
select(item: any): any;
|
|
61
61
|
deselect(removedItem: any): void;
|
|
62
|
-
addAllTo(item: any, ctrlKey: boolean, preserveSelection?: boolean): any;
|
|
62
|
+
addAllTo(item: any, ctrlKey: boolean, preserveSelection?: boolean, shiftKey?: boolean): any;
|
|
63
63
|
updateAll(selectAllChecked: boolean): void;
|
|
64
64
|
selectRange(startIndex: number, endIndex: number, preserveSelection: boolean, existingSelections?: any[]): any;
|
|
65
65
|
get selectAllState(): any;
|