@progress/kendo-angular-grid 13.0.0-develop.14 → 13.0.0-develop.16

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.
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-grid',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1685438859,
13
- version: '13.0.0-develop.14',
12
+ publishDate: 1685462787,
13
+ version: '13.0.0-develop.16',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -111,6 +111,12 @@ export class CellSelectionService {
111
111
  this.aggregateChanges.emit(ev);
112
112
  ev.cellAggregates = this.aggregates;
113
113
  }
114
+ if (ev.shiftKey) {
115
+ ev.rangeStartCell = this.lastSelectionItem;
116
+ ev.rangeEndCell = {
117
+ ...this.settings.cellSelected({ dataItem: item.data, index: item.index }, item.column, item.column.leafIndex).item
118
+ };
119
+ }
114
120
  this.changes.emit(ev);
115
121
  }
116
122
  toggle(item) {
@@ -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,25 +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
27
  this.aggregateChanges = new EventEmitter();
25
- this.lastSelectionStartIndex = 0;
26
28
  this.currentSelection = [];
27
29
  this.selectAllChecked = false;
28
30
  this.active = false;
29
31
  this.dragging = false;
32
+ this.lastSelectionData = {};
30
33
  this.addSubscriptions();
31
34
  }
32
35
  get enableMarquee() {
@@ -45,6 +48,10 @@ export class SelectionService {
45
48
  }
46
49
  init(settings) {
47
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
+ }
48
55
  this.currentSelection = [];
49
56
  if (settings.selectable && settings.selectable.enabled !== false) {
50
57
  const iterator = this.getIterator();
@@ -109,12 +116,17 @@ export class SelectionService {
109
116
  this.aggregateChanges.emit(ev);
110
117
  ev.cellAggregates = this.aggregates;
111
118
  }
119
+ if (ev.shiftKey) {
120
+ ev.rangeStartRow = { dataItem: this.lastSelectionData, index: this.lastSelectionStartIndex };
121
+ ev.rangeEndRow = { dataItem: item.data, index: item.index };
122
+ }
112
123
  this.changes.emit(ev);
113
124
  }
114
125
  toggle(item) {
115
126
  const selectedRows = [];
116
127
  const deselectedRows = [];
117
128
  this.lastSelectionStartIndex = item.index;
129
+ this.lastSelectionData = item.data;
118
130
  const rowArgs = { dataItem: item.data, index: item.index };
119
131
  if (this.isSelected(item.index)) {
120
132
  deselectedRows.push(rowArgs);
@@ -153,6 +165,7 @@ export class SelectionService {
153
165
  const deselectedRows = [];
154
166
  const selectedRows = [];
155
167
  this.lastSelectionStartIndex = item.index;
168
+ this.lastSelectionData = item.data;
156
169
  if (!this.isSelected(item.index)) {
157
170
  selectedRows.push({ dataItem: item.data, index: item.index });
158
171
  }
@@ -367,8 +380,8 @@ export class SelectionService {
367
380
  }
368
381
  }
369
382
  }
370
- 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 });
371
384
  SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService });
372
385
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, decorators: [{
373
386
  type: Injectable
374
- }], 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 }]; } });
@@ -2076,17 +2076,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2076
2076
  * @hidden
2077
2077
  */
2078
2078
  class SelectionService {
2079
- constructor(domEvents, localDataChangesService, navigationService) {
2079
+ constructor(domEvents, localDataChangesService, navigationService, ctxService) {
2080
2080
  this.domEvents = domEvents;
2081
2081
  this.localDataChangesService = localDataChangesService;
2082
2082
  this.navigationService = navigationService;
2083
+ this.ctxService = ctxService;
2083
2084
  this.changes = new EventEmitter();
2084
2085
  this.aggregateChanges = new EventEmitter();
2085
- this.lastSelectionStartIndex = 0;
2086
2086
  this.currentSelection = [];
2087
2087
  this.selectAllChecked = false;
2088
2088
  this.active = false;
2089
2089
  this.dragging = false;
2090
+ this.lastSelectionData = {};
2090
2091
  this.addSubscriptions();
2091
2092
  }
2092
2093
  get enableMarquee() {
@@ -2104,7 +2105,12 @@ class SelectionService {
2104
2105
  return this.active && dragAndMultiple;
2105
2106
  }
2106
2107
  init(settings) {
2108
+ var _a, _b, _c, _d, _e, _f;
2107
2109
  this.settings = settings;
2110
+ if (!isPresent(this.lastSelectionStartIndex)) {
2111
+ this.lastSelectionStartIndex = ((_c = (_b = (_a = this.ctxService) === null || _a === void 0 ? void 0 : _a.grid.selectionDirective) === null || _b === void 0 ? void 0 : _b.rangeSelectionStartRow) === null || _c === void 0 ? void 0 : _c.index) || 0;
2112
+ this.lastSelectionData = ((_f = (_e = (_d = this.ctxService) === null || _d === void 0 ? void 0 : _d.grid.selectionDirective) === null || _e === void 0 ? void 0 : _e.rangeSelectionStartRow) === null || _f === void 0 ? void 0 : _f.dataItem) || {};
2113
+ }
2108
2114
  this.currentSelection = [];
2109
2115
  if (settings.selectable && settings.selectable.enabled !== false) {
2110
2116
  const iterator = this.getIterator();
@@ -2169,12 +2175,17 @@ class SelectionService {
2169
2175
  this.aggregateChanges.emit(ev);
2170
2176
  ev.cellAggregates = this.aggregates;
2171
2177
  }
2178
+ if (ev.shiftKey) {
2179
+ ev.rangeStartRow = { dataItem: this.lastSelectionData, index: this.lastSelectionStartIndex };
2180
+ ev.rangeEndRow = { dataItem: item.data, index: item.index };
2181
+ }
2172
2182
  this.changes.emit(ev);
2173
2183
  }
2174
2184
  toggle(item) {
2175
2185
  const selectedRows = [];
2176
2186
  const deselectedRows = [];
2177
2187
  this.lastSelectionStartIndex = item.index;
2188
+ this.lastSelectionData = item.data;
2178
2189
  const rowArgs = { dataItem: item.data, index: item.index };
2179
2190
  if (this.isSelected(item.index)) {
2180
2191
  deselectedRows.push(rowArgs);
@@ -2213,6 +2224,7 @@ class SelectionService {
2213
2224
  const deselectedRows = [];
2214
2225
  const selectedRows = [];
2215
2226
  this.lastSelectionStartIndex = item.index;
2227
+ this.lastSelectionData = item.data;
2216
2228
  if (!this.isSelected(item.index)) {
2217
2229
  selectedRows.push({ dataItem: item.data, index: item.index });
2218
2230
  }
@@ -2427,11 +2439,11 @@ class SelectionService {
2427
2439
  }
2428
2440
  }
2429
2441
  }
2430
- SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: DomEventsService }, { token: LocalDataChangesService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Injectable });
2442
+ SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: DomEventsService }, { token: LocalDataChangesService }, { token: NavigationService }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
2431
2443
  SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService });
2432
2444
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, decorators: [{
2433
2445
  type: Injectable
2434
- }], ctorParameters: function () { return [{ type: DomEventsService }, { type: LocalDataChangesService }, { type: NavigationService }]; } });
2446
+ }], ctorParameters: function () { return [{ type: DomEventsService }, { type: LocalDataChangesService }, { type: NavigationService }, { type: ContextService }]; } });
2435
2447
 
2436
2448
  /**
2437
2449
  * @hidden
@@ -2532,6 +2544,10 @@ class CellSelectionService {
2532
2544
  this.aggregateChanges.emit(ev);
2533
2545
  ev.cellAggregates = this.aggregates;
2534
2546
  }
2547
+ if (ev.shiftKey) {
2548
+ ev.rangeStartCell = this.lastSelectionItem;
2549
+ ev.rangeEndCell = Object.assign({}, this.settings.cellSelected({ dataItem: item.data, index: item.index }, item.column, item.column.leafIndex).item);
2550
+ }
2535
2551
  this.changes.emit(ev);
2536
2552
  }
2537
2553
  toggle(item) {
@@ -2932,8 +2948,8 @@ const packageMetadata = {
2932
2948
  name: '@progress/kendo-angular-grid',
2933
2949
  productName: 'Kendo UI for Angular',
2934
2950
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
2935
- publishDate: 1685438859,
2936
- version: '13.0.0-develop.14',
2951
+ publishDate: 1685462787,
2952
+ version: '13.0.0-develop.16',
2937
2953
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
2938
2954
  };
2939
2955
 
@@ -4579,6 +4595,12 @@ class Selection {
4579
4595
  * @default []
4580
4596
  */
4581
4597
  this.selectedKeys = [];
4598
+ /**
4599
+ * Defines the initial shift-click range selection starting column index when cell selection is enabled.
4600
+ *
4601
+ * @default 0
4602
+ */
4603
+ this.rangeSelectionStartColumnIndex = 0;
4582
4604
  /**
4583
4605
  * Fires when the `selectedKeys` collection has been updated.
4584
4606
  */
@@ -4626,6 +4648,9 @@ class Selection {
4626
4648
  this.rowSelectionState.clear();
4627
4649
  this.cellSelectionState.clear();
4628
4650
  }
4651
+ /**
4652
+ * @hidden
4653
+ */
4629
4654
  getItemKey(row) {
4630
4655
  if (this.selectionKey) {
4631
4656
  if (typeof this.selectionKey === "string") {
@@ -4704,7 +4729,7 @@ class Selection {
4704
4729
  }
4705
4730
  }
4706
4731
  Selection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, deps: [{ token: ContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
4707
- 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 });
4732
+ 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 });
4708
4733
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, decorators: [{
4709
4734
  type: Directive,
4710
4735
  args: [{
@@ -4713,6 +4738,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4713
4738
  }]
4714
4739
  }], ctorParameters: function () { return [{ type: ContextService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectedKeys: [{
4715
4740
  type: Input
4741
+ }], rangeSelectionStartRow: [{
4742
+ type: Input
4743
+ }], rangeSelectionStartColumnIndex: [{
4744
+ type: Input
4716
4745
  }], selectionKey: [{
4717
4746
  type: Input,
4718
4747
  args: ["kendoGridSelectBy"]
@@ -2069,17 +2069,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2069
2069
  * @hidden
2070
2070
  */
2071
2071
  class SelectionService {
2072
- constructor(domEvents, localDataChangesService, navigationService) {
2072
+ constructor(domEvents, localDataChangesService, navigationService, ctxService) {
2073
2073
  this.domEvents = domEvents;
2074
2074
  this.localDataChangesService = localDataChangesService;
2075
2075
  this.navigationService = navigationService;
2076
+ this.ctxService = ctxService;
2076
2077
  this.changes = new EventEmitter();
2077
2078
  this.aggregateChanges = new EventEmitter();
2078
- this.lastSelectionStartIndex = 0;
2079
2079
  this.currentSelection = [];
2080
2080
  this.selectAllChecked = false;
2081
2081
  this.active = false;
2082
2082
  this.dragging = false;
2083
+ this.lastSelectionData = {};
2083
2084
  this.addSubscriptions();
2084
2085
  }
2085
2086
  get enableMarquee() {
@@ -2098,6 +2099,10 @@ class SelectionService {
2098
2099
  }
2099
2100
  init(settings) {
2100
2101
  this.settings = settings;
2102
+ if (!isPresent(this.lastSelectionStartIndex)) {
2103
+ this.lastSelectionStartIndex = this.ctxService?.grid.selectionDirective?.rangeSelectionStartRow?.index || 0;
2104
+ this.lastSelectionData = this.ctxService?.grid.selectionDirective?.rangeSelectionStartRow?.dataItem || {};
2105
+ }
2101
2106
  this.currentSelection = [];
2102
2107
  if (settings.selectable && settings.selectable.enabled !== false) {
2103
2108
  const iterator = this.getIterator();
@@ -2162,12 +2167,17 @@ class SelectionService {
2162
2167
  this.aggregateChanges.emit(ev);
2163
2168
  ev.cellAggregates = this.aggregates;
2164
2169
  }
2170
+ if (ev.shiftKey) {
2171
+ ev.rangeStartRow = { dataItem: this.lastSelectionData, index: this.lastSelectionStartIndex };
2172
+ ev.rangeEndRow = { dataItem: item.data, index: item.index };
2173
+ }
2165
2174
  this.changes.emit(ev);
2166
2175
  }
2167
2176
  toggle(item) {
2168
2177
  const selectedRows = [];
2169
2178
  const deselectedRows = [];
2170
2179
  this.lastSelectionStartIndex = item.index;
2180
+ this.lastSelectionData = item.data;
2171
2181
  const rowArgs = { dataItem: item.data, index: item.index };
2172
2182
  if (this.isSelected(item.index)) {
2173
2183
  deselectedRows.push(rowArgs);
@@ -2206,6 +2216,7 @@ class SelectionService {
2206
2216
  const deselectedRows = [];
2207
2217
  const selectedRows = [];
2208
2218
  this.lastSelectionStartIndex = item.index;
2219
+ this.lastSelectionData = item.data;
2209
2220
  if (!this.isSelected(item.index)) {
2210
2221
  selectedRows.push({ dataItem: item.data, index: item.index });
2211
2222
  }
@@ -2420,11 +2431,11 @@ class SelectionService {
2420
2431
  }
2421
2432
  }
2422
2433
  }
2423
- SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: DomEventsService }, { token: LocalDataChangesService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Injectable });
2434
+ SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, deps: [{ token: DomEventsService }, { token: LocalDataChangesService }, { token: NavigationService }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
2424
2435
  SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService });
2425
2436
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SelectionService, decorators: [{
2426
2437
  type: Injectable
2427
- }], ctorParameters: function () { return [{ type: DomEventsService }, { type: LocalDataChangesService }, { type: NavigationService }]; } });
2438
+ }], ctorParameters: function () { return [{ type: DomEventsService }, { type: LocalDataChangesService }, { type: NavigationService }, { type: ContextService }]; } });
2428
2439
 
2429
2440
  /**
2430
2441
  * @hidden
@@ -2525,6 +2536,12 @@ class CellSelectionService {
2525
2536
  this.aggregateChanges.emit(ev);
2526
2537
  ev.cellAggregates = this.aggregates;
2527
2538
  }
2539
+ if (ev.shiftKey) {
2540
+ ev.rangeStartCell = this.lastSelectionItem;
2541
+ ev.rangeEndCell = {
2542
+ ...this.settings.cellSelected({ dataItem: item.data, index: item.index }, item.column, item.column.leafIndex).item
2543
+ };
2544
+ }
2528
2545
  this.changes.emit(ev);
2529
2546
  }
2530
2547
  toggle(item) {
@@ -2925,8 +2942,8 @@ const packageMetadata = {
2925
2942
  name: '@progress/kendo-angular-grid',
2926
2943
  productName: 'Kendo UI for Angular',
2927
2944
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
2928
- publishDate: 1685438859,
2929
- version: '13.0.0-develop.14',
2945
+ publishDate: 1685462787,
2946
+ version: '13.0.0-develop.16',
2930
2947
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
2931
2948
  };
2932
2949
 
@@ -4544,6 +4561,12 @@ class Selection {
4544
4561
  * @default []
4545
4562
  */
4546
4563
  this.selectedKeys = [];
4564
+ /**
4565
+ * Defines the initial shift-click range selection starting column index when cell selection is enabled.
4566
+ *
4567
+ * @default 0
4568
+ */
4569
+ this.rangeSelectionStartColumnIndex = 0;
4547
4570
  /**
4548
4571
  * Fires when the `selectedKeys` collection has been updated.
4549
4572
  */
@@ -4591,6 +4614,9 @@ class Selection {
4591
4614
  this.rowSelectionState.clear();
4592
4615
  this.cellSelectionState.clear();
4593
4616
  }
4617
+ /**
4618
+ * @hidden
4619
+ */
4594
4620
  getItemKey(row) {
4595
4621
  if (this.selectionKey) {
4596
4622
  if (typeof this.selectionKey === "string") {
@@ -4669,7 +4695,7 @@ class Selection {
4669
4695
  }
4670
4696
  }
4671
4697
  Selection.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, deps: [{ token: ContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
4672
- 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 });
4698
+ 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 });
4673
4699
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Selection, decorators: [{
4674
4700
  type: Directive,
4675
4701
  args: [{
@@ -4678,6 +4704,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4678
4704
  }]
4679
4705
  }], ctorParameters: function () { return [{ type: ContextService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { selectedKeys: [{
4680
4706
  type: Input
4707
+ }], rangeSelectionStartRow: [{
4708
+ type: Input
4709
+ }], rangeSelectionStartColumnIndex: [{
4710
+ type: Input
4681
4711
  }], selectionKey: [{
4682
4712
  type: Input,
4683
4713
  args: ["kendoGridSelectBy"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "13.0.0-develop.14",
3
+ "version": "13.0.0-develop.16",
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",
@@ -32,25 +32,25 @@
32
32
  "@progress/kendo-data-query": "^1.0.0",
33
33
  "@progress/kendo-drawing": "^1.17.2",
34
34
  "@progress/kendo-licensing": "^1.0.2",
35
- "@progress/kendo-angular-buttons": "13.0.0-develop.14",
36
- "@progress/kendo-angular-common": "13.0.0-develop.14",
37
- "@progress/kendo-angular-dateinputs": "13.0.0-develop.14",
38
- "@progress/kendo-angular-layout": "13.0.0-develop.14",
39
- "@progress/kendo-angular-dropdowns": "13.0.0-develop.14",
40
- "@progress/kendo-angular-excel-export": "13.0.0-develop.14",
41
- "@progress/kendo-angular-icons": "13.0.0-develop.14",
42
- "@progress/kendo-angular-inputs": "13.0.0-develop.14",
43
- "@progress/kendo-angular-intl": "13.0.0-develop.14",
44
- "@progress/kendo-angular-l10n": "13.0.0-develop.14",
45
- "@progress/kendo-angular-label": "13.0.0-develop.14",
46
- "@progress/kendo-angular-pdf-export": "13.0.0-develop.14",
47
- "@progress/kendo-angular-popup": "13.0.0-develop.14",
48
- "@progress/kendo-angular-utils": "13.0.0-develop.14",
35
+ "@progress/kendo-angular-buttons": "13.0.0-develop.16",
36
+ "@progress/kendo-angular-common": "13.0.0-develop.16",
37
+ "@progress/kendo-angular-dateinputs": "13.0.0-develop.16",
38
+ "@progress/kendo-angular-layout": "13.0.0-develop.16",
39
+ "@progress/kendo-angular-dropdowns": "13.0.0-develop.16",
40
+ "@progress/kendo-angular-excel-export": "13.0.0-develop.16",
41
+ "@progress/kendo-angular-icons": "13.0.0-develop.16",
42
+ "@progress/kendo-angular-inputs": "13.0.0-develop.16",
43
+ "@progress/kendo-angular-intl": "13.0.0-develop.16",
44
+ "@progress/kendo-angular-l10n": "13.0.0-develop.16",
45
+ "@progress/kendo-angular-label": "13.0.0-develop.16",
46
+ "@progress/kendo-angular-pdf-export": "13.0.0-develop.16",
47
+ "@progress/kendo-angular-popup": "13.0.0-develop.16",
48
+ "@progress/kendo-angular-utils": "13.0.0-develop.16",
49
49
  "rxjs": "^6.5.3 || ^7.0.0"
50
50
  },
51
51
  "dependencies": {
52
52
  "tslib": "^2.3.1",
53
- "@progress/kendo-angular-schematics": "13.0.0-develop.14",
53
+ "@progress/kendo-angular-schematics": "13.0.0-develop.16",
54
54
  "@progress/kendo-common": "^0.2.0",
55
55
  "@progress/kendo-file-saver": "^1.0.0"
56
56
  },
@@ -4,13 +4,13 @@ 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 dep of the dropdowns
7
- '@progress/kendo-angular-treeview': '13.0.0-develop.14',
7
+ '@progress/kendo-angular-treeview': '13.0.0-develop.16',
8
8
  // peer dependency of kendo-angular-inputs
9
- '@progress/kendo-angular-dialog': '13.0.0-develop.14',
9
+ '@progress/kendo-angular-dialog': '13.0.0-develop.16',
10
10
  // peer dependency of kendo-angular-icons
11
11
  '@progress/kendo-svg-icons': '^1.0.0',
12
12
  // peer dependency of kendo-angular-layout
13
- '@progress/kendo-angular-progressbar': '13.0.0-develop.14'
13
+ '@progress/kendo-angular-progressbar': '13.0.0-develop.16'
14
14
  } });
15
15
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
16
16
  }
@@ -21,6 +21,18 @@ export declare class Selection {
21
21
  * @default []
22
22
  */
23
23
  selectedKeys: any[];
24
+ /**
25
+ * Defines the initial shift-click range selection starting row index.
26
+ *
27
+ * @default 0
28
+ */
29
+ rangeSelectionStartRow: RowArgs;
30
+ /**
31
+ * Defines the initial shift-click range selection starting column index when cell selection is enabled.
32
+ *
33
+ * @default 0
34
+ */
35
+ rangeSelectionStartColumnIndex: number;
24
36
  /**
25
37
  * Defines the item key that will be stored in the `selectedKeys` collection.
26
38
  */
@@ -52,12 +64,15 @@ export declare class Selection {
52
64
  * @hidden
53
65
  */
54
66
  reset(): void;
55
- protected getItemKey(row: RowArgs): any;
67
+ /**
68
+ * @hidden
69
+ */
70
+ getItemKey(row: RowArgs): any;
56
71
  protected getSelectionItem(row: RowArgs, col: ColumnComponent, colIndex: number): CellSelectionItem;
57
72
  protected onSelectionChange(selection: SelectionEvent): void;
58
73
  private notifyChange;
59
74
  private setState;
60
75
  private stateToArray;
61
76
  static ɵfac: i0.ɵɵFactoryDeclaration<Selection, never>;
62
- static ɵdir: i0.ɵɵDirectiveDeclaration<Selection, "kendo-grid-selection-base", never, { "selectedKeys": "selectedKeys"; "selectionKey": "kendoGridSelectBy"; "columnKey": "columnKey"; }, { "selectedKeysChange": "selectedKeysChange"; }, never>;
77
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Selection, "kendo-grid-selection-base", never, { "selectedKeys": "selectedKeys"; "rangeSelectionStartRow": "rangeSelectionStartRow"; "rangeSelectionStartColumnIndex": "rangeSelectionStartColumnIndex"; "selectionKey": "kendoGridSelectBy"; "columnKey": "columnKey"; }, { "selectedKeysChange": "selectedKeysChange"; }, never>;
63
78
  }
@@ -9,6 +9,7 @@ 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
11
  import { SelectionAggregates } from '../aggregates/aggregate-types';
12
+ import { ContextService } from '../common/provider.service';
12
13
  import * as i0 from "@angular/core";
13
14
  /**
14
15
  * @hidden
@@ -29,9 +30,10 @@ export declare class SelectionService implements OnDestroy {
29
30
  private domEvents;
30
31
  private localDataChangesService?;
31
32
  private navigationService?;
33
+ private ctxService?;
32
34
  changes: EventEmitter<SelectionEvent>;
33
35
  aggregateChanges: EventEmitter<SelectionEvent>;
34
- lastSelectionStartIndex: number;
36
+ lastSelectionStartIndex: any;
35
37
  currentSelection: any[];
36
38
  selectAllChecked: boolean;
37
39
  settings: SelectionServiceSettings;
@@ -43,8 +45,9 @@ export declare class SelectionService implements OnDestroy {
43
45
  private cellClickSubscription;
44
46
  private mousedownSubscription;
45
47
  private dataChangedSubscription;
48
+ private lastSelectionData;
46
49
  private _selectAllState;
47
- constructor(domEvents: DomEventsService, localDataChangesService?: LocalDataChangesService, navigationService?: NavigationService);
50
+ constructor(domEvents: DomEventsService, localDataChangesService?: LocalDataChangesService, navigationService?: NavigationService, ctxService?: ContextService);
48
51
  init(settings: any): void;
49
52
  isSelected(index: number): boolean;
50
53
  handleClick(item: any, event: any): void;
@@ -45,6 +45,22 @@ export interface SelectionEvent {
45
45
  * Shows the state of the `Shift` key during the selection.
46
46
  */
47
47
  shiftKey?: boolean;
48
+ /**
49
+ * Represents the initially clicked row in a shift-click range row selection
50
+ */
51
+ rangeStartRow?: RowArgs;
52
+ /**
53
+ * Represents the shift-clicked item in a shift-click range row selection
54
+ */
55
+ rangeEndRow?: RowArgs;
56
+ /**
57
+ * Represents the initially clicked cell in a shift-click range cell selection
58
+ */
59
+ rangeStartCell?: CellSelectionItem;
60
+ /**
61
+ * Represents the shift-clicked cell in a shift-click range cell selection
62
+ */
63
+ rangeEndCell?: CellSelectionItem;
48
64
  }
49
65
  /**
50
66
  * The settings for the selection functionality of the Grid ([more information and example]({% slug selection_grid %}#toc-setup)).