@progress/kendo-angular-grid 15.3.0-develop.2 → 15.3.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.
@@ -1415,7 +1415,13 @@ export class GridComponent {
1415
1415
  * Scrolls to the specified row and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
1416
1416
  */
1417
1417
  scrollTo(request) {
1418
- this.scrollRequestService.scrollTo(request);
1418
+ this.scrollRequestService.scrollTo(request, false);
1419
+ }
1420
+ /**
1421
+ * Scrolls to the specified data item and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
1422
+ */
1423
+ scrollToItem(request) {
1424
+ this.scrollRequestService.scrollToItem(request);
1419
1425
  }
1420
1426
  /**
1421
1427
  * Changes the position of the specified column.
@@ -152,8 +152,7 @@ export class NavigationService {
152
152
  this.zone.onStable.pipe(take(1), map(() => args), ...operators);
153
153
  const onStable = onStableSubscriber();
154
154
  this.subs = new Subscription();
155
- this.subs.add(this.cursor.changes
156
- .subscribe(args => this.onCursorChanges(args)));
155
+ this.subs.add(this.cursor.changes.subscribe(args => this.onCursorChanges(args)));
157
156
  this.subs.add(this.domEvents.focus.pipe(switchMap(onStable))
158
157
  .subscribe((args) => this.navigateTo(args.target)));
159
158
  this.subs.add(this.domEvents.focusOut.pipe(filter(() => this.mode !== 0 /* Standby */), switchMap(onStableSubscriber(takeUntil(this.domEvents.focus))))
@@ -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: 1710359369,
13
- version: '15.3.0-develop.2',
12
+ publishDate: 1710412821,
13
+ version: '15.3.0-develop.4',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -10,7 +10,7 @@ import { ScrollerService, PageAction, ScrollAction, ScrollBottomAction } from '.
10
10
  import { ScrollRequestService } from '../scrolling/scroll-request.service';
11
11
  import { ColumnBase } from '../columns/column-base';
12
12
  import { DetailTemplateDirective } from './details/detail-template.directive';
13
- import { isChanged, isPresent, isUniversal, anyChanged, isNumber, requestAnimationFrame, cancelAnimationFrame } from '../utils';
13
+ import { isChanged, isPresent, isUniversal, anyChanged, isNumber, requestAnimationFrame, cancelAnimationFrame, recursiveFlatMap } from '../utils';
14
14
  import { DetailsService } from './details/details.service';
15
15
  import { ColumnsContainer } from '../columns/columns-container';
16
16
  import { ChangeNotificationService } from '../data/change-notification.service';
@@ -65,7 +65,7 @@ const elementAt = (index, elements, elementOffset) => {
65
65
  elementIdx += offset;
66
66
  }
67
67
  };
68
- const rowAt = (index, rows) => elementAt(index, rows, row => row.hasAttribute('data-kendo-grid-item-index') ? 1 : 0);
68
+ const rowAt = (index, rows) => elementAt(index, rows, () => 1);
69
69
  const cellAt = (index, cells) => elementAt(index, cells, cell => !hasClasses(cell, NON_DATA_CELL_CLASSES) ? parseInt(cell.getAttribute('colSpan'), 10) || 1 : 0);
70
70
  const EMPTY_OBJECT = {};
71
71
  /**
@@ -142,7 +142,7 @@ export class ListComponent {
142
142
  this.rtl = false;
143
143
  this.scroller = scrollerFactory(this.dispatcher);
144
144
  this.subscriptions = detailsService.changes.subscribe(x => this.detailExpand(x));
145
- this.subscriptions.add(scrollRequestService.requests.subscribe(x => this.scrollTo(x)));
145
+ this.subscriptions.add(scrollRequestService.requests.subscribe(req => isPresent(req.adjustIndex) ? this.scrollTo(req.request, req.adjustIndex) : this.scrollToItem(req.request)));
146
146
  }
147
147
  get showFooter() {
148
148
  return this.groupable && this.groupable.showFooter;
@@ -385,21 +385,21 @@ export class ListComponent {
385
385
  }
386
386
  });
387
387
  }
388
- scrollToVirtualRow(itemIndex) {
388
+ scrollToVirtualRow(itemIndex, adjustIndexForDetailTemplate = true) {
389
389
  if (!isDocumentAvailable()) {
390
390
  return;
391
391
  }
392
- if (isPresent(this.detailTemplate)) {
392
+ if (isPresent(this.detailTemplate) && adjustIndexForDetailTemplate) {
393
393
  itemIndex = Math.floor(itemIndex / 2);
394
394
  }
395
- const offset = this.rowHeightService.offset(itemIndex);
395
+ const offset = this.rowHeightService.offset(itemIndex, !adjustIndexForDetailTemplate);
396
396
  this.container.nativeElement.scrollTop = offset;
397
397
  this.resetNavigationViewport();
398
398
  }
399
- scrollTo({ row, column }) {
399
+ scrollTo({ row, column }, adjustIndex = false) {
400
400
  if (isNumber(row)) {
401
401
  if (this.isVirtual) {
402
- this.scrollToVirtualRow(row);
402
+ this.scrollToVirtualRow(row, adjustIndex);
403
403
  }
404
404
  else {
405
405
  const element = rowAt(row, this.table.nativeElement.rows);
@@ -433,6 +433,23 @@ export class ListComponent {
433
433
  }
434
434
  }
435
435
  }
436
+ scrollToItem(item) {
437
+ if (!isDocumentAvailable()) {
438
+ return;
439
+ }
440
+ const data = this.ctx.grid.data;
441
+ const gridData = Array.isArray(data) ? data : data.data;
442
+ const gridDataItems = gridData.flatMap(recursiveFlatMap);
443
+ const dataItemIndex = gridDataItems.findIndex(dataItem => dataItem[item.idField] === item.id);
444
+ if (dataItemIndex !== -1) {
445
+ const row = Array.from(this.table.nativeElement.rows).find((r) => {
446
+ const dataAttribute = r.getAttribute('data-kendo-grid-item-index');
447
+ return dataAttribute && +dataAttribute === this.ctx.grid.skip + dataItemIndex;
448
+ });
449
+ row && row.scrollIntoView();
450
+ this.isVirtual && this.resetNavigationViewport();
451
+ }
452
+ }
436
453
  resetNavigationViewport() {
437
454
  if (!isDocumentAvailable) {
438
455
  return;
@@ -60,7 +60,26 @@ export class RowHeightService {
60
60
  }, undefined);
61
61
  return result === undefined ? this.total - 1 : result;
62
62
  }
63
- offset(rowIndex) {
63
+ offset(rowIndex, adjustIndex = false) {
64
+ if (adjustIndex) {
65
+ let targetOffset = 0;
66
+ let targetIndex = 0;
67
+ for (let i = 0; i < rowIndex; i++) {
68
+ targetOffset += this.rowHeight;
69
+ targetIndex++;
70
+ if (targetIndex === rowIndex) {
71
+ return targetOffset;
72
+ }
73
+ if (this.isExpanded(i)) {
74
+ targetOffset += this.detailRowHeight;
75
+ targetIndex++;
76
+ if (targetIndex === rowIndex) {
77
+ return targetOffset;
78
+ }
79
+ }
80
+ }
81
+ return targetOffset;
82
+ }
64
83
  return this.offsets[rowIndex];
65
84
  }
66
85
  totalHeight() {
@@ -12,8 +12,11 @@ export class ScrollRequestService {
12
12
  constructor() {
13
13
  this.requests = new Subject();
14
14
  }
15
- scrollTo(request) {
16
- this.requests.next(request);
15
+ scrollTo(request, adjustIndex = true) {
16
+ this.requests.next({ request, adjustIndex });
17
+ }
18
+ scrollToItem(request) {
19
+ this.requests.next({ request });
17
20
  }
18
21
  }
19
22
  ScrollRequestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ScrollRequestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -2526,8 +2526,11 @@ class ScrollRequestService {
2526
2526
  constructor() {
2527
2527
  this.requests = new Subject();
2528
2528
  }
2529
- scrollTo(request) {
2530
- this.requests.next(request);
2529
+ scrollTo(request, adjustIndex = true) {
2530
+ this.requests.next({ request, adjustIndex });
2531
+ }
2532
+ scrollToItem(request) {
2533
+ this.requests.next({ request });
2531
2534
  }
2532
2535
  }
2533
2536
  ScrollRequestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ScrollRequestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -3238,8 +3241,7 @@ class NavigationService {
3238
3241
  this.zone.onStable.pipe(take(1), map(() => args), ...operators);
3239
3242
  const onStable = onStableSubscriber();
3240
3243
  this.subs = new Subscription();
3241
- this.subs.add(this.cursor.changes
3242
- .subscribe(args => this.onCursorChanges(args)));
3244
+ this.subs.add(this.cursor.changes.subscribe(args => this.onCursorChanges(args)));
3243
3245
  this.subs.add(this.domEvents.focus.pipe(switchMap(onStable))
3244
3246
  .subscribe((args) => this.navigateTo(args.target)));
3245
3247
  this.subs.add(this.domEvents.focusOut.pipe(filter(() => this.mode !== 0 /* Standby */), switchMap(onStableSubscriber(takeUntil(this.domEvents.focus))))
@@ -4564,8 +4566,8 @@ const packageMetadata = {
4564
4566
  name: '@progress/kendo-angular-grid',
4565
4567
  productName: 'Kendo UI for Angular',
4566
4568
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
4567
- publishDate: 1710359369,
4568
- version: '15.3.0-develop.2',
4569
+ publishDate: 1710412821,
4570
+ version: '15.3.0-develop.4',
4569
4571
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
4570
4572
  };
4571
4573
 
@@ -16791,7 +16793,26 @@ class RowHeightService {
16791
16793
  }, undefined);
16792
16794
  return result === undefined ? this.total - 1 : result;
16793
16795
  }
16794
- offset(rowIndex) {
16796
+ offset(rowIndex, adjustIndex = false) {
16797
+ if (adjustIndex) {
16798
+ let targetOffset = 0;
16799
+ let targetIndex = 0;
16800
+ for (let i = 0; i < rowIndex; i++) {
16801
+ targetOffset += this.rowHeight;
16802
+ targetIndex++;
16803
+ if (targetIndex === rowIndex) {
16804
+ return targetOffset;
16805
+ }
16806
+ if (this.isExpanded(i)) {
16807
+ targetOffset += this.detailRowHeight;
16808
+ targetIndex++;
16809
+ if (targetIndex === rowIndex) {
16810
+ return targetOffset;
16811
+ }
16812
+ }
16813
+ }
16814
+ return targetOffset;
16815
+ }
16795
16816
  return this.offsets[rowIndex];
16796
16817
  }
16797
16818
  totalHeight() {
@@ -18791,7 +18812,7 @@ const elementAt = (index, elements, elementOffset) => {
18791
18812
  elementIdx += offset;
18792
18813
  }
18793
18814
  };
18794
- const rowAt = (index, rows) => elementAt(index, rows, row => row.hasAttribute('data-kendo-grid-item-index') ? 1 : 0);
18815
+ const rowAt = (index, rows) => elementAt(index, rows, () => 1);
18795
18816
  const cellAt = (index, cells) => elementAt(index, cells, cell => !hasClasses(cell, NON_DATA_CELL_CLASSES) ? parseInt(cell.getAttribute('colSpan'), 10) || 1 : 0);
18796
18817
  const EMPTY_OBJECT = {};
18797
18818
  /**
@@ -18868,7 +18889,7 @@ class ListComponent {
18868
18889
  this.rtl = false;
18869
18890
  this.scroller = scrollerFactory(this.dispatcher);
18870
18891
  this.subscriptions = detailsService.changes.subscribe(x => this.detailExpand(x));
18871
- this.subscriptions.add(scrollRequestService.requests.subscribe(x => this.scrollTo(x)));
18892
+ this.subscriptions.add(scrollRequestService.requests.subscribe(req => isPresent(req.adjustIndex) ? this.scrollTo(req.request, req.adjustIndex) : this.scrollToItem(req.request)));
18872
18893
  }
18873
18894
  get showFooter() {
18874
18895
  return this.groupable && this.groupable.showFooter;
@@ -19111,21 +19132,21 @@ class ListComponent {
19111
19132
  }
19112
19133
  });
19113
19134
  }
19114
- scrollToVirtualRow(itemIndex) {
19135
+ scrollToVirtualRow(itemIndex, adjustIndexForDetailTemplate = true) {
19115
19136
  if (!isDocumentAvailable()) {
19116
19137
  return;
19117
19138
  }
19118
- if (isPresent(this.detailTemplate)) {
19139
+ if (isPresent(this.detailTemplate) && adjustIndexForDetailTemplate) {
19119
19140
  itemIndex = Math.floor(itemIndex / 2);
19120
19141
  }
19121
- const offset = this.rowHeightService.offset(itemIndex);
19142
+ const offset = this.rowHeightService.offset(itemIndex, !adjustIndexForDetailTemplate);
19122
19143
  this.container.nativeElement.scrollTop = offset;
19123
19144
  this.resetNavigationViewport();
19124
19145
  }
19125
- scrollTo({ row, column }) {
19146
+ scrollTo({ row, column }, adjustIndex = false) {
19126
19147
  if (isNumber(row)) {
19127
19148
  if (this.isVirtual) {
19128
- this.scrollToVirtualRow(row);
19149
+ this.scrollToVirtualRow(row, adjustIndex);
19129
19150
  }
19130
19151
  else {
19131
19152
  const element = rowAt(row, this.table.nativeElement.rows);
@@ -19159,6 +19180,23 @@ class ListComponent {
19159
19180
  }
19160
19181
  }
19161
19182
  }
19183
+ scrollToItem(item) {
19184
+ if (!isDocumentAvailable()) {
19185
+ return;
19186
+ }
19187
+ const data = this.ctx.grid.data;
19188
+ const gridData = Array.isArray(data) ? data : data.data;
19189
+ const gridDataItems = gridData.flatMap(recursiveFlatMap);
19190
+ const dataItemIndex = gridDataItems.findIndex(dataItem => dataItem[item.idField] === item.id);
19191
+ if (dataItemIndex !== -1) {
19192
+ const row = Array.from(this.table.nativeElement.rows).find((r) => {
19193
+ const dataAttribute = r.getAttribute('data-kendo-grid-item-index');
19194
+ return dataAttribute && +dataAttribute === this.ctx.grid.skip + dataItemIndex;
19195
+ });
19196
+ row && row.scrollIntoView();
19197
+ this.isVirtual && this.resetNavigationViewport();
19198
+ }
19199
+ }
19162
19200
  resetNavigationViewport() {
19163
19201
  if (!isDocumentAvailable) {
19164
19202
  return;
@@ -21380,7 +21418,13 @@ class GridComponent {
21380
21418
  * Scrolls to the specified row and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
21381
21419
  */
21382
21420
  scrollTo(request) {
21383
- this.scrollRequestService.scrollTo(request);
21421
+ this.scrollRequestService.scrollTo(request, false);
21422
+ }
21423
+ /**
21424
+ * Scrolls to the specified data item and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
21425
+ */
21426
+ scrollToItem(request) {
21427
+ this.scrollRequestService.scrollToItem(request);
21384
21428
  }
21385
21429
  /**
21386
21430
  * Changes the position of the specified column.
@@ -1520,8 +1520,11 @@ class ScrollRequestService {
1520
1520
  constructor() {
1521
1521
  this.requests = new Subject();
1522
1522
  }
1523
- scrollTo(request) {
1524
- this.requests.next(request);
1523
+ scrollTo(request, adjustIndex = true) {
1524
+ this.requests.next({ request, adjustIndex });
1525
+ }
1526
+ scrollToItem(request) {
1527
+ this.requests.next({ request });
1525
1528
  }
1526
1529
  }
1527
1530
  ScrollRequestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ScrollRequestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -1653,8 +1656,7 @@ class NavigationService {
1653
1656
  this.zone.onStable.pipe(take(1), map(() => args), ...operators);
1654
1657
  const onStable = onStableSubscriber();
1655
1658
  this.subs = new Subscription();
1656
- this.subs.add(this.cursor.changes
1657
- .subscribe(args => this.onCursorChanges(args)));
1659
+ this.subs.add(this.cursor.changes.subscribe(args => this.onCursorChanges(args)));
1658
1660
  this.subs.add(this.domEvents.focus.pipe(switchMap(onStable))
1659
1661
  .subscribe((args) => this.navigateTo(args.target)));
1660
1662
  this.subs.add(this.domEvents.focusOut.pipe(filter(() => this.mode !== 0 /* Standby */), switchMap(onStableSubscriber(takeUntil(this.domEvents.focus))))
@@ -4532,8 +4534,8 @@ const packageMetadata = {
4532
4534
  name: '@progress/kendo-angular-grid',
4533
4535
  productName: 'Kendo UI for Angular',
4534
4536
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
4535
- publishDate: 1710359369,
4536
- version: '15.3.0-develop.2',
4537
+ publishDate: 1710412821,
4538
+ version: '15.3.0-develop.4',
4537
4539
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
4538
4540
  };
4539
4541
 
@@ -16711,7 +16713,26 @@ class RowHeightService {
16711
16713
  }, undefined);
16712
16714
  return result === undefined ? this.total - 1 : result;
16713
16715
  }
16714
- offset(rowIndex) {
16716
+ offset(rowIndex, adjustIndex = false) {
16717
+ if (adjustIndex) {
16718
+ let targetOffset = 0;
16719
+ let targetIndex = 0;
16720
+ for (let i = 0; i < rowIndex; i++) {
16721
+ targetOffset += this.rowHeight;
16722
+ targetIndex++;
16723
+ if (targetIndex === rowIndex) {
16724
+ return targetOffset;
16725
+ }
16726
+ if (this.isExpanded(i)) {
16727
+ targetOffset += this.detailRowHeight;
16728
+ targetIndex++;
16729
+ if (targetIndex === rowIndex) {
16730
+ return targetOffset;
16731
+ }
16732
+ }
16733
+ }
16734
+ return targetOffset;
16735
+ }
16715
16736
  return this.offsets[rowIndex];
16716
16737
  }
16717
16738
  totalHeight() {
@@ -18707,7 +18728,7 @@ const elementAt = (index, elements, elementOffset) => {
18707
18728
  elementIdx += offset;
18708
18729
  }
18709
18730
  };
18710
- const rowAt = (index, rows) => elementAt(index, rows, row => row.hasAttribute('data-kendo-grid-item-index') ? 1 : 0);
18731
+ const rowAt = (index, rows) => elementAt(index, rows, () => 1);
18711
18732
  const cellAt = (index, cells) => elementAt(index, cells, cell => !hasClasses(cell, NON_DATA_CELL_CLASSES) ? parseInt(cell.getAttribute('colSpan'), 10) || 1 : 0);
18712
18733
  const EMPTY_OBJECT = {};
18713
18734
  /**
@@ -18784,7 +18805,7 @@ class ListComponent {
18784
18805
  this.rtl = false;
18785
18806
  this.scroller = scrollerFactory(this.dispatcher);
18786
18807
  this.subscriptions = detailsService.changes.subscribe(x => this.detailExpand(x));
18787
- this.subscriptions.add(scrollRequestService.requests.subscribe(x => this.scrollTo(x)));
18808
+ this.subscriptions.add(scrollRequestService.requests.subscribe(req => isPresent(req.adjustIndex) ? this.scrollTo(req.request, req.adjustIndex) : this.scrollToItem(req.request)));
18788
18809
  }
18789
18810
  get showFooter() {
18790
18811
  return this.groupable && this.groupable.showFooter;
@@ -19027,21 +19048,21 @@ class ListComponent {
19027
19048
  }
19028
19049
  });
19029
19050
  }
19030
- scrollToVirtualRow(itemIndex) {
19051
+ scrollToVirtualRow(itemIndex, adjustIndexForDetailTemplate = true) {
19031
19052
  if (!isDocumentAvailable()) {
19032
19053
  return;
19033
19054
  }
19034
- if (isPresent(this.detailTemplate)) {
19055
+ if (isPresent(this.detailTemplate) && adjustIndexForDetailTemplate) {
19035
19056
  itemIndex = Math.floor(itemIndex / 2);
19036
19057
  }
19037
- const offset = this.rowHeightService.offset(itemIndex);
19058
+ const offset = this.rowHeightService.offset(itemIndex, !adjustIndexForDetailTemplate);
19038
19059
  this.container.nativeElement.scrollTop = offset;
19039
19060
  this.resetNavigationViewport();
19040
19061
  }
19041
- scrollTo({ row, column }) {
19062
+ scrollTo({ row, column }, adjustIndex = false) {
19042
19063
  if (isNumber(row)) {
19043
19064
  if (this.isVirtual) {
19044
- this.scrollToVirtualRow(row);
19065
+ this.scrollToVirtualRow(row, adjustIndex);
19045
19066
  }
19046
19067
  else {
19047
19068
  const element = rowAt(row, this.table.nativeElement.rows);
@@ -19075,6 +19096,23 @@ class ListComponent {
19075
19096
  }
19076
19097
  }
19077
19098
  }
19099
+ scrollToItem(item) {
19100
+ if (!isDocumentAvailable()) {
19101
+ return;
19102
+ }
19103
+ const data = this.ctx.grid.data;
19104
+ const gridData = Array.isArray(data) ? data : data.data;
19105
+ const gridDataItems = gridData.flatMap(recursiveFlatMap);
19106
+ const dataItemIndex = gridDataItems.findIndex(dataItem => dataItem[item.idField] === item.id);
19107
+ if (dataItemIndex !== -1) {
19108
+ const row = Array.from(this.table.nativeElement.rows).find((r) => {
19109
+ const dataAttribute = r.getAttribute('data-kendo-grid-item-index');
19110
+ return dataAttribute && +dataAttribute === this.ctx.grid.skip + dataItemIndex;
19111
+ });
19112
+ row && row.scrollIntoView();
19113
+ this.isVirtual && this.resetNavigationViewport();
19114
+ }
19115
+ }
19078
19116
  resetNavigationViewport() {
19079
19117
  if (!isDocumentAvailable) {
19080
19118
  return;
@@ -21292,7 +21330,13 @@ class GridComponent {
21292
21330
  * Scrolls to the specified row and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
21293
21331
  */
21294
21332
  scrollTo(request) {
21295
- this.scrollRequestService.scrollTo(request);
21333
+ this.scrollRequestService.scrollTo(request, false);
21334
+ }
21335
+ /**
21336
+ * Scrolls to the specified data item and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
21337
+ */
21338
+ scrollToItem(request) {
21339
+ this.scrollRequestService.scrollToItem(request);
21296
21340
  }
21297
21341
  /**
21298
21342
  * Changes the position of the specified column.
@@ -57,7 +57,7 @@ import { NavigationService } from './navigation/navigation.service';
57
57
  import { NavigationCell } from './navigation/navigation-cell.interface';
58
58
  import { NavigationRow } from './navigation/navigation-row.interface';
59
59
  import { ColumnInfoService } from "./common/column-info.service";
60
- import { ScrollRequestService, ScrollRequest } from './scrolling/scroll-request.service';
60
+ import { ScrollRequestService, ScrollRequest, ScrollToItemRequest } from './scrolling/scroll-request.service';
61
61
  import { SortService } from './common/sort.service';
62
62
  import { ColumnMenuTemplateDirective } from './column-menu/column-menu-template.directive';
63
63
  import { ColumnMenuSettings } from './column-menu/column-menu-settings.interface';
@@ -845,6 +845,10 @@ export declare class GridComponent implements AfterContentInit, AfterViewInit, O
845
845
  * Scrolls to the specified row and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
846
846
  */
847
847
  scrollTo(request: ScrollRequest): void;
848
+ /**
849
+ * Scrolls to the specified data item and column ([see example]({% slug scrollmmodes_grid %}#toc-scrolling-to-a-specific-row-and-column-index)).
850
+ */
851
+ scrollToItem(request: ScrollToItemRequest): void;
848
852
  /**
849
853
  * Changes the position of the specified column.
850
854
  * The reordering of columns operates only on the level
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "15.3.0-develop.2",
3
+ "version": "15.3.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",
@@ -33,26 +33,26 @@
33
33
  "@progress/kendo-data-query": "^1.0.0",
34
34
  "@progress/kendo-drawing": "^1.19.0",
35
35
  "@progress/kendo-licensing": "^1.0.2",
36
- "@progress/kendo-angular-buttons": "15.3.0-develop.2",
37
- "@progress/kendo-angular-common": "15.3.0-develop.2",
38
- "@progress/kendo-angular-dateinputs": "15.3.0-develop.2",
39
- "@progress/kendo-angular-layout": "15.3.0-develop.2",
40
- "@progress/kendo-angular-dropdowns": "15.3.0-develop.2",
41
- "@progress/kendo-angular-excel-export": "15.3.0-develop.2",
42
- "@progress/kendo-angular-icons": "15.3.0-develop.2",
43
- "@progress/kendo-angular-inputs": "15.3.0-develop.2",
44
- "@progress/kendo-angular-intl": "15.3.0-develop.2",
45
- "@progress/kendo-angular-l10n": "15.3.0-develop.2",
46
- "@progress/kendo-angular-label": "15.3.0-develop.2",
47
- "@progress/kendo-angular-pdf-export": "15.3.0-develop.2",
48
- "@progress/kendo-angular-popup": "15.3.0-develop.2",
49
- "@progress/kendo-angular-utils": "15.3.0-develop.2",
36
+ "@progress/kendo-angular-buttons": "15.3.0-develop.4",
37
+ "@progress/kendo-angular-common": "15.3.0-develop.4",
38
+ "@progress/kendo-angular-dateinputs": "15.3.0-develop.4",
39
+ "@progress/kendo-angular-layout": "15.3.0-develop.4",
40
+ "@progress/kendo-angular-dropdowns": "15.3.0-develop.4",
41
+ "@progress/kendo-angular-excel-export": "15.3.0-develop.4",
42
+ "@progress/kendo-angular-icons": "15.3.0-develop.4",
43
+ "@progress/kendo-angular-inputs": "15.3.0-develop.4",
44
+ "@progress/kendo-angular-intl": "15.3.0-develop.4",
45
+ "@progress/kendo-angular-l10n": "15.3.0-develop.4",
46
+ "@progress/kendo-angular-label": "15.3.0-develop.4",
47
+ "@progress/kendo-angular-pdf-export": "15.3.0-develop.4",
48
+ "@progress/kendo-angular-popup": "15.3.0-develop.4",
49
+ "@progress/kendo-angular-utils": "15.3.0-develop.4",
50
50
  "rxjs": "^6.5.3 || ^7.0.0",
51
- "@progress/kendo-angular-spreadsheet": "15.3.0-develop.2"
51
+ "@progress/kendo-angular-spreadsheet": "15.3.0-develop.4"
52
52
  },
53
53
  "dependencies": {
54
54
  "tslib": "^2.3.1",
55
- "@progress/kendo-angular-schematics": "15.3.0-develop.2",
55
+ "@progress/kendo-angular-schematics": "15.3.0-develop.4",
56
56
  "@progress/kendo-common": "^0.2.0",
57
57
  "@progress/kendo-file-saver": "^1.0.0"
58
58
  },
@@ -143,6 +143,7 @@ export declare class ListComponent implements OnInit, OnDestroy, AfterViewInit,
143
143
  private handleRowNavigationLocked;
144
144
  private scrollToVirtualRow;
145
145
  private scrollTo;
146
+ private scrollToItem;
146
147
  private resetNavigationViewport;
147
148
  private cleanupScroller;
148
149
  private initResizeService;
@@ -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': '15.3.0-develop.2',
7
+ '@progress/kendo-angular-treeview': '15.3.0-develop.4',
8
8
  // peer dependency of kendo-angular-inputs
9
- '@progress/kendo-angular-dialog': '15.3.0-develop.2',
9
+ '@progress/kendo-angular-dialog': '15.3.0-develop.4',
10
10
  // peer dependency of kendo-angular-icons
11
11
  '@progress/kendo-svg-icons': '^2.0.0',
12
12
  // peer dependency of kendo-angular-layout
13
- '@progress/kendo-angular-progressbar': '15.3.0-develop.2'
13
+ '@progress/kendo-angular-progressbar': '15.3.0-develop.4'
14
14
  } });
15
15
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
16
16
  }
@@ -17,7 +17,7 @@ export declare class RowHeightService {
17
17
  collapseDetail(rowIndex: number): void;
18
18
  isExpanded(rowIndex: number): boolean;
19
19
  index(position: number): number;
20
- offset(rowIndex: number): number;
20
+ offset(rowIndex: number, adjustIndex?: boolean): number;
21
21
  totalHeight(): number;
22
22
  private updateRowHeight;
23
23
  }
@@ -18,12 +18,30 @@ export interface ScrollRequest {
18
18
  */
19
19
  column?: number;
20
20
  }
21
+ /**
22
+ * Arguments for the `scrollToItem` method. Specifies to which data item and column should the Grid scroll to.
23
+ * [See example](slug:scrollmmodes_grid#toc-scrolling-to-a-specific-row-and-column-index).
24
+ */
25
+ export interface ScrollToItemRequest {
26
+ /**
27
+ * The property of the Grid data items that represents the unique ID of the item.
28
+ */
29
+ idField: string;
30
+ /**
31
+ * The value of the data item unique identifier.
32
+ */
33
+ id: any;
34
+ }
21
35
  /**
22
36
  * @hidden
23
37
  */
24
38
  export declare class ScrollRequestService {
25
- requests: Subject<ScrollRequest>;
26
- scrollTo(request: ScrollRequest): void;
39
+ requests: Subject<{
40
+ request: ScrollRequest | ScrollToItemRequest;
41
+ adjustIndex?: boolean;
42
+ }>;
43
+ scrollTo(request: ScrollRequest, adjustIndex?: boolean): void;
44
+ scrollToItem(request: ScrollToItemRequest): void;
27
45
  static ɵfac: i0.ɵɵFactoryDeclaration<ScrollRequestService, never>;
28
46
  static ɵprov: i0.ɵɵInjectableDeclaration<ScrollRequestService>;
29
47
  }