@progress/kendo-angular-grid 13.0.0-develop.2 → 13.0.0-develop.20
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/aggregates/aggregate-types.d.ts +58 -0
- package/aggregates/status-bar-template.directive.d.ts +19 -0
- package/aggregates/status-bar.component.d.ts +53 -0
- package/column-menu/column-chooser.component.d.ts +1 -1
- package/column-menu/column-menu-autosize-all.component.d.ts +3 -4
- package/column-menu/column-menu-chooser.component.d.ts +3 -4
- package/column-menu/column-menu-filter.component.d.ts +3 -4
- package/column-menu/column-menu-lock.component.d.ts +3 -4
- package/column-menu/column-menu-position.component.d.ts +3 -4
- package/column-menu/column-menu-sort.component.d.ts +4 -2
- package/esm2020/aggregates/aggregate-types.mjs +6 -0
- package/esm2020/aggregates/status-bar-template.directive.mjs +26 -0
- package/esm2020/aggregates/status-bar.component.mjs +236 -0
- package/esm2020/column-menu/column-chooser.component.mjs +1 -1
- package/esm2020/column-menu/column-list.component.mjs +3 -3
- package/esm2020/column-menu/column-menu-autosize-all.component.mjs +3 -4
- package/esm2020/column-menu/column-menu-chooser.component.mjs +4 -5
- package/esm2020/column-menu/column-menu-filter.component.mjs +4 -5
- package/esm2020/column-menu/column-menu-item.component.mjs +1 -1
- package/esm2020/column-menu/column-menu-lock.component.mjs +3 -4
- package/esm2020/column-menu/column-menu-position.component.mjs +3 -4
- package/esm2020/column-menu/column-menu-sort.component.mjs +4 -2
- package/esm2020/column-menu/column-menu.component.mjs +1 -1
- package/esm2020/editing/add-command.directive.mjs +1 -1
- package/esm2020/editing/cancel-command.directive.mjs +1 -1
- package/esm2020/editing/edit-command.directive.mjs +1 -1
- package/esm2020/editing/remove-command.directive.mjs +1 -1
- package/esm2020/editing/save-command.directive.mjs +1 -1
- package/esm2020/excel/excel-command.directive.mjs +1 -1
- package/esm2020/filtering/cell/boolean-filter-cell.component.mjs +1 -1
- package/esm2020/filtering/cell/filter-cell-operators.component.mjs +15 -1
- package/esm2020/filtering/cell/filter-cell-wrapper.component.mjs +3 -1
- package/esm2020/filtering/cell/string-filter-cell.component.mjs +1 -1
- package/esm2020/filtering/filter-input.directive.mjs +5 -1
- package/esm2020/filtering/menu/filter-menu-container.component.mjs +11 -11
- package/esm2020/filtering/menu/filter-menu.component.mjs +1 -1
- package/esm2020/grid.component.mjs +574 -540
- package/esm2020/grid.module.mjs +10 -2
- package/esm2020/grouping/group-header.component.mjs +25 -8
- package/esm2020/grouping/group-panel.component.mjs +2 -2
- package/esm2020/index.mjs +1 -0
- package/esm2020/localization/messages.mjs +5 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pager/pager-element.component.mjs +17 -0
- package/esm2020/pager/pager-next-buttons.component.mjs +8 -11
- package/esm2020/pager/pager-page-sizes.component.mjs +1 -1
- package/esm2020/pager/pager-prev-buttons.component.mjs +8 -11
- package/esm2020/pdf/pdf-command.directive.mjs +1 -1
- package/esm2020/rendering/cell.component.mjs +1 -1
- package/esm2020/rendering/header/header.component.mjs +1 -1
- package/esm2020/rendering/list.component.mjs +12 -14
- package/esm2020/rendering/table-body.component.mjs +1 -1
- package/esm2020/selection/cell-selection.service.mjs +20 -1
- package/esm2020/selection/selection-checkbox.directive.mjs +2 -0
- package/esm2020/selection/selection-default.mjs +14 -1
- package/esm2020/selection/selection.service.mjs +31 -5
- package/fesm2015/progress-kendo-angular-grid.mjs +1026 -646
- package/fesm2020/progress-kendo-angular-grid.mjs +1027 -646
- package/filtering/cell/filter-cell-operators.component.d.ts +10 -1
- package/grid.component.d.ts +10 -1
- package/grid.module.d.ts +100 -98
- package/grouping/group-header.component.d.ts +6 -3
- package/grouping/group-panel.component.d.ts +0 -1
- package/index.d.ts +2 -0
- package/localization/messages.d.ts +25 -1
- package/package.json +16 -16
- package/pager/pager-element.component.d.ts +9 -0
- package/pager/pager-next-buttons.component.d.ts +0 -3
- package/pager/pager-prev-buttons.component.d.ts +0 -3
- package/schematics/ngAdd/index.js +3 -3
- package/scrolling/scroll-request.service.d.ts +6 -0
- package/selection/cell-selection.service.d.ts +3 -0
- package/selection/selection-default.d.ts +17 -2
- package/selection/selection.service.d.ts +8 -2
- package/selection/types.d.ts +27 -0
|
@@ -20,6 +20,12 @@ export class Selection {
|
|
|
20
20
|
* @default []
|
|
21
21
|
*/
|
|
22
22
|
this.selectedKeys = [];
|
|
23
|
+
/**
|
|
24
|
+
* Defines the initial shift-click range selection starting column index when cell selection is enabled.
|
|
25
|
+
*
|
|
26
|
+
* @default 0
|
|
27
|
+
*/
|
|
28
|
+
this.rangeSelectionStartColumnIndex = 0;
|
|
23
29
|
/**
|
|
24
30
|
* Fires when the `selectedKeys` collection has been updated.
|
|
25
31
|
*/
|
|
@@ -67,6 +73,9 @@ export class Selection {
|
|
|
67
73
|
this.rowSelectionState.clear();
|
|
68
74
|
this.cellSelectionState.clear();
|
|
69
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* @hidden
|
|
78
|
+
*/
|
|
70
79
|
getItemKey(row) {
|
|
71
80
|
if (this.selectionKey) {
|
|
72
81
|
if (typeof this.selectionKey === "string") {
|
|
@@ -145,7 +154,7 @@ export class Selection {
|
|
|
145
154
|
}
|
|
146
155
|
}
|
|
147
156
|
Selection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, deps: [{ token: i1.ContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
148
|
-
Selection.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: Selection, selector: "kendo-grid-selection-base", inputs: { selectedKeys: "selectedKeys", selectionKey: ["kendoGridSelectBy", "selectionKey"], columnKey: "columnKey" }, outputs: { selectedKeysChange: "selectedKeysChange" }, usesOnChanges: true, ngImport: i0 });
|
|
157
|
+
Selection.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: Selection, selector: "kendo-grid-selection-base", inputs: { selectedKeys: "selectedKeys", rangeSelectionStartRow: "rangeSelectionStartRow", rangeSelectionStartColumnIndex: "rangeSelectionStartColumnIndex", selectionKey: ["kendoGridSelectBy", "selectionKey"], columnKey: "columnKey" }, outputs: { selectedKeysChange: "selectedKeysChange" }, usesOnChanges: true, ngImport: i0 });
|
|
149
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, decorators: [{
|
|
150
159
|
type: Directive,
|
|
151
160
|
args: [{
|
|
@@ -154,6 +163,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
154
163
|
}]
|
|
155
164
|
}], ctorParameters: function () { return [{ type: i1.ContextService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectedKeys: [{
|
|
156
165
|
type: Input
|
|
166
|
+
}], rangeSelectionStartRow: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], rangeSelectionStartColumnIndex: [{
|
|
169
|
+
type: Input
|
|
157
170
|
}], selectionKey: [{
|
|
158
171
|
type: Input,
|
|
159
172
|
args: ["kendoGridSelectBy"]
|
|
@@ -8,24 +8,28 @@ import { isPresent } from '../utils';
|
|
|
8
8
|
import { DomEventsService } from '../common/dom-events.service';
|
|
9
9
|
import { LocalDataChangesService } from '../editing/local-data-changes.service';
|
|
10
10
|
import { NavigationService } from '../navigation/navigation.service';
|
|
11
|
+
import { ContextService } from '../common/provider.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
import * as i1 from "../common/dom-events.service";
|
|
13
14
|
import * as i2 from "../editing/local-data-changes.service";
|
|
14
15
|
import * as i3 from "../navigation/navigation.service";
|
|
16
|
+
import * as i4 from "../common/provider.service";
|
|
15
17
|
/**
|
|
16
18
|
* @hidden
|
|
17
19
|
*/
|
|
18
20
|
export class SelectionService {
|
|
19
|
-
constructor(domEvents, localDataChangesService, navigationService) {
|
|
21
|
+
constructor(domEvents, localDataChangesService, navigationService, ctxService) {
|
|
20
22
|
this.domEvents = domEvents;
|
|
21
23
|
this.localDataChangesService = localDataChangesService;
|
|
22
24
|
this.navigationService = navigationService;
|
|
25
|
+
this.ctxService = ctxService;
|
|
23
26
|
this.changes = new EventEmitter();
|
|
24
|
-
this.
|
|
27
|
+
this.aggregateChanges = new EventEmitter();
|
|
25
28
|
this.currentSelection = [];
|
|
26
29
|
this.selectAllChecked = false;
|
|
27
30
|
this.active = false;
|
|
28
31
|
this.dragging = false;
|
|
32
|
+
this.lastSelectionData = {};
|
|
29
33
|
this.addSubscriptions();
|
|
30
34
|
}
|
|
31
35
|
get enableMarquee() {
|
|
@@ -44,6 +48,10 @@ export class SelectionService {
|
|
|
44
48
|
}
|
|
45
49
|
init(settings) {
|
|
46
50
|
this.settings = settings;
|
|
51
|
+
if (!isPresent(this.lastSelectionStartIndex)) {
|
|
52
|
+
this.lastSelectionStartIndex = this.ctxService?.grid.selectionDirective?.rangeSelectionStartRow?.index || 0;
|
|
53
|
+
this.lastSelectionData = this.ctxService?.grid.selectionDirective?.rangeSelectionStartRow?.dataItem || {};
|
|
54
|
+
}
|
|
47
55
|
this.currentSelection = [];
|
|
48
56
|
if (settings.selectable && settings.selectable.enabled !== false) {
|
|
49
57
|
const iterator = this.getIterator();
|
|
@@ -104,12 +112,21 @@ export class SelectionService {
|
|
|
104
112
|
}
|
|
105
113
|
ev.ctrlKey = ctrlKey;
|
|
106
114
|
ev.shiftKey = event.shiftKey;
|
|
115
|
+
if (this.options.cellAggregates) {
|
|
116
|
+
this.aggregateChanges.emit(ev);
|
|
117
|
+
ev.cellAggregates = this.aggregates;
|
|
118
|
+
}
|
|
119
|
+
if (ev.shiftKey) {
|
|
120
|
+
ev.rangeStartRow = { dataItem: this.lastSelectionData, index: this.lastSelectionStartIndex };
|
|
121
|
+
ev.rangeEndRow = { dataItem: item.data, index: item.index };
|
|
122
|
+
}
|
|
107
123
|
this.changes.emit(ev);
|
|
108
124
|
}
|
|
109
125
|
toggle(item) {
|
|
110
126
|
const selectedRows = [];
|
|
111
127
|
const deselectedRows = [];
|
|
112
128
|
this.lastSelectionStartIndex = item.index;
|
|
129
|
+
this.lastSelectionData = item.data;
|
|
113
130
|
const rowArgs = { dataItem: item.data, index: item.index };
|
|
114
131
|
if (this.isSelected(item.index)) {
|
|
115
132
|
deselectedRows.push(rowArgs);
|
|
@@ -148,6 +165,7 @@ export class SelectionService {
|
|
|
148
165
|
const deselectedRows = [];
|
|
149
166
|
const selectedRows = [];
|
|
150
167
|
this.lastSelectionStartIndex = item.index;
|
|
168
|
+
this.lastSelectionData = item.data;
|
|
151
169
|
if (!this.isSelected(item.index)) {
|
|
152
170
|
selectedRows.push({ dataItem: item.data, index: item.index });
|
|
153
171
|
}
|
|
@@ -258,9 +276,15 @@ export class SelectionService {
|
|
|
258
276
|
}
|
|
259
277
|
next = iterator.next();
|
|
260
278
|
}
|
|
279
|
+
let cellAggregates;
|
|
280
|
+
if (this.options.cellAggregates) {
|
|
281
|
+
this.aggregateChanges.emit({ selectedRows, deselectedRows });
|
|
282
|
+
cellAggregates = this.aggregates;
|
|
283
|
+
}
|
|
261
284
|
return {
|
|
262
285
|
deselectedRows: deselectedRows,
|
|
263
|
-
selectedRows: selectedRows
|
|
286
|
+
selectedRows: selectedRows,
|
|
287
|
+
cellAggregates
|
|
264
288
|
};
|
|
265
289
|
}
|
|
266
290
|
get selectAllState() {
|
|
@@ -273,6 +297,7 @@ export class SelectionService {
|
|
|
273
297
|
}
|
|
274
298
|
get options() {
|
|
275
299
|
const defaultOptions = {
|
|
300
|
+
cellAggregates: false,
|
|
276
301
|
checkboxOnly: false,
|
|
277
302
|
enabled: true,
|
|
278
303
|
mode: "multiple"
|
|
@@ -282,6 +307,7 @@ export class SelectionService {
|
|
|
282
307
|
}
|
|
283
308
|
if (typeof this.settings.selectable === 'boolean') {
|
|
284
309
|
return {
|
|
310
|
+
cellAggregates: false,
|
|
285
311
|
checkboxOnly: false,
|
|
286
312
|
enabled: this.settings.selectable,
|
|
287
313
|
mode: "multiple"
|
|
@@ -354,8 +380,8 @@ export class SelectionService {
|
|
|
354
380
|
}
|
|
355
381
|
}
|
|
356
382
|
}
|
|
357
|
-
SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: i1.DomEventsService }, { token: i2.LocalDataChangesService }, { token: i3.NavigationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
383
|
+
SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: i1.DomEventsService }, { token: i2.LocalDataChangesService }, { token: i3.NavigationService }, { token: i4.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
358
384
|
SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService });
|
|
359
385
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, decorators: [{
|
|
360
386
|
type: Injectable
|
|
361
|
-
}], ctorParameters: function () { return [{ type: i1.DomEventsService }, { type: i2.LocalDataChangesService }, { type: i3.NavigationService }]; } });
|
|
387
|
+
}], ctorParameters: function () { return [{ type: i1.DomEventsService }, { type: i2.LocalDataChangesService }, { type: i3.NavigationService }, { type: i4.ContextService }]; } });
|