@progress/kendo-angular-grid 24.1.1-develop.1 → 24.2.0-develop.10

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.
@@ -7,6 +7,9 @@ import { GridColSize } from "./grid-col-size";
7
7
  * Specifies the Grid data layout display mode.
8
8
  */
9
9
  export type DataLayoutMode = 'columns' | 'stacked';
10
+ /**
11
+ * Configures the data layout display mode for the Grid component.
12
+ */
10
13
  export interface DataLayoutModeSettings {
11
14
  /**
12
15
  * Specifies the Grid data layout display mode.
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
6
6
  import { EventEmitter, Injectable, SecurityContext, InjectionToken, Optional, Inject, Input, SkipSelf, Directive, isDevMode, QueryList, ContentChildren, ContentChild, Component, forwardRef, Host, Output, HostBinding, HostListener, Pipe, TemplateRef, ViewChild, ViewChildren, ChangeDetectionStrategy, Self, NgZone, ElementRef, ViewContainerRef, ViewEncapsulation, inject, Injector, NgModule } from '@angular/core';
7
7
  import { merge, of, Subject, zip as zip$1, from, Subscription, interval, fromEvent, Observable, BehaviorSubject } from 'rxjs';
8
8
  import * as i1$3 from '@progress/kendo-angular-common';
9
- import { isDocumentAvailable, Keys, hasClasses as hasClasses$1, isPresent as isPresent$1, normalizeKeys, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, replaceMessagePlaceholder, isChanged as isChanged$1, KendoInput, guid, areObjectsEqual, PrefixTemplateDirective, closest as closest$1, hasObservers, ResizeSensorComponent, isFirefox, firefoxMaxHeight, closestInScope as closestInScope$1, isFocusable as isFocusable$1, getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent, KENDO_WEBMCP_HOST, PreventableEvent as PreventableEvent$1, ResizeBatchService } from '@progress/kendo-angular-common';
9
+ import { isDocumentAvailable, Keys, hasClasses as hasClasses$1, isPresent as isPresent$1, normalizeKeys, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, replaceMessagePlaceholder, isChanged as isChanged$1, KendoInput, contains as contains$3, guid, areObjectsEqual, PrefixTemplateDirective, closest as closest$1, hasObservers, ResizeSensorComponent, isFirefox, firefoxMaxHeight, closestInScope as closestInScope$1, isFocusable as isFocusable$1, getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent, KENDO_WEBMCP_HOST, PreventableEvent as PreventableEvent$1, ResizeBatchService } from '@progress/kendo-angular-common';
10
10
  export { BrowserSupportService, ScrollbarService } from '@progress/kendo-angular-common';
11
11
  import * as i1 from '@angular/platform-browser';
12
12
  import * as i1$1 from '@progress/kendo-angular-icons';
@@ -3625,7 +3625,7 @@ class NavigationService {
3625
3625
  const columnGroup = column.parent;
3626
3626
  const columnGroupChildren = Array.from(columnGroup.children).sort((a, b) => a.orderIndex - b.orderIndex);
3627
3627
  const columnIndexInsideGroup = columnGroupChildren.indexOf(column);
3628
- if (column.isReordered || column.orderIndex > 0 || (column.isReordered && column.orderIndex === 0)) {
3628
+ if (column.isReordered || column.orderIndex > 0) {
3629
3629
  return (column.orderIndex - columnGroupChildren[0]['orderIndex']) !== columnGroupChildren.length - 1;
3630
3630
  }
3631
3631
  return columnIndexInsideGroup !== columnGroupChildren.length - 1;
@@ -4514,7 +4514,7 @@ class NavigationService {
4514
4514
  if (!cellSelectionEnabled || this.cursor.cell?.detailExpandCell) {
4515
4515
  return;
4516
4516
  }
4517
- const selectionService = this.ctx.grid[cellSelectionEnabled ? 'cellSelectionService' : 'selectionService'];
4517
+ const selectionService = this.ctx.grid.cellSelectionService;
4518
4518
  const row = this.activeRow;
4519
4519
  const colIdx = this.cursor.cell ? this.cursor.cell.colIndex : 0;
4520
4520
  const dataColIdx = colIdx - (this.metadata.hasDetailTemplate ? 1 : 0); // exclude the expand/collapse column in master-detail
@@ -10513,9 +10513,14 @@ class DateFilterMenuInputComponent {
10513
10513
  if (this.subscription) {
10514
10514
  this.subscription.unsubscribe();
10515
10515
  }
10516
+ let pickerPopupElement = null;
10516
10517
  this.subscription = this.popupService.onClose
10517
- .pipe(filter(() => picker.isActive))
10518
+ .pipe(filter((event) => picker.isActive || this.isDatePickerMouseEvent(event, pickerPopupElement)))
10518
10519
  .subscribe(e => e.preventDefault());
10520
+ // https://github.com/telerik/kendo-angular/issues/4074
10521
+ this.subscription.add(picker.close.pipe(take(1)).subscribe(() => {
10522
+ pickerPopupElement = picker.popupRef?.popupElement ?? null;
10523
+ }));
10519
10524
  }
10520
10525
  messageFor(key) {
10521
10526
  return this.ctx.localization.get(key);
@@ -10525,6 +10530,13 @@ class DateFilterMenuInputComponent {
10525
10530
  const columnName = this.column ? this.column.title || this.column.field : '';
10526
10531
  return replaceMessagePlaceholder(localizationMsg, 'columnName', columnName);
10527
10532
  }
10533
+ isDatePickerMouseEvent(event, popupElement) {
10534
+ const originalEvent = event?.originalEvent;
10535
+ if (!popupElement || !(originalEvent instanceof MouseEvent)) {
10536
+ return false;
10537
+ }
10538
+ return contains$3(popupElement, originalEvent.target, true);
10539
+ }
10528
10540
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: DateFilterMenuInputComponent, deps: [{ token: SinglePopupService }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Component });
10529
10541
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: DateFilterMenuInputComponent, isStandalone: true, selector: "kendo-grid-date-filter-menu-input", inputs: { operators: "operators", column: "column", filter: "filter", operator: "operator", currentFilter: "currentFilter", filterService: "filterService", menuTabbingService: "menuTabbingService", format: "format", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", min: "min", max: "max", activeView: "activeView", bottomView: "bottomView", topView: "topView", weekNumber: "weekNumber", isFirstDropDown: "isFirstDropDown" }, ngImport: i0, template: `
10530
10542
  <kendo-grid-filter-menu-input-wrapper
@@ -11337,8 +11349,9 @@ class MultiCheckboxFilterComponent {
11337
11349
  return this.ctx.localization.get(key);
11338
11350
  }
11339
11351
  getUniqueDateValues(data) {
11352
+ const fieldGetter = getter(this.column.field);
11340
11353
  return data.reduce((acc, current) => {
11341
- const value = current[this.column.field];
11354
+ const value = fieldGetter(current);
11342
11355
  if (value instanceof Date && acc.findIndex(d => d.getTime() === value.getTime()) === -1) {
11343
11356
  acc.push(value);
11344
11357
  }
@@ -11358,7 +11371,8 @@ class MultiCheckboxFilterComponent {
11358
11371
  }
11359
11372
  else {
11360
11373
  const field = this.column.field;
11361
- const mapped = this.gridData.map(item => item?.[field]);
11374
+ const fieldGetter = getter(field);
11375
+ const mapped = this.gridData.map(item => fieldGetter(item));
11362
11376
  this.baseListData = [...new Set(mapped)].sort((a, b) => {
11363
11377
  if (a > b) {
11364
11378
  return 1;
@@ -18921,7 +18935,7 @@ class ColumnHandleDirective {
18921
18935
  if (column.parent) {
18922
18936
  const groupChildren = Array.from(column.parent.children);
18923
18937
  const indexOfCurrentColumn = groupChildren.indexOf(column);
18924
- if (column.isReordered || column.orderIndex > 0 || (column.isReordered && column.orderIndex === 0)) {
18938
+ if (column.isReordered || column.orderIndex > 0) {
18925
18939
  return (column.orderIndex - groupChildren[0].orderIndex) === groupChildren.length - 1;
18926
18940
  }
18927
18941
  else {
@@ -19660,6 +19674,7 @@ class CellSelectionService {
19660
19674
  if (settings.selectable && settings.selectable.enabled !== false && !settings.isStacked) {
19661
19675
  const iterator = this.getIterator();
19662
19676
  let item = iterator.next();
19677
+ const seenItems = new Set();
19663
19678
  while (!item.done) {
19664
19679
  if (item.value?.type === "data") {
19665
19680
  const rowArgs = {
@@ -19667,9 +19682,16 @@ class CellSelectionService {
19667
19682
  index: item.value.index
19668
19683
  };
19669
19684
  settings.columns.forEach(col => {
19685
+ if (col.isColumnGroup) {
19686
+ return;
19687
+ }
19670
19688
  const selectedCellArgs = settings.cellSelected(rowArgs, col, col.leafIndex);
19671
19689
  if (selectedCellArgs.selected) {
19672
- this.currentSelection.push(selectedCellArgs.item);
19690
+ const key = `${selectedCellArgs.item.itemKey}-${selectedCellArgs.item.columnKey}`;
19691
+ if (!seenItems.has(key)) {
19692
+ seenItems.add(key);
19693
+ this.currentSelection.push(selectedCellArgs.item);
19694
+ }
19673
19695
  }
19674
19696
  if (!settings.isRowSelectable(rowArgs)) {
19675
19697
  this.nonSelectableRows.set(rowArgs.index, rowArgs.dataItem);
@@ -19721,7 +19743,7 @@ class CellSelectionService {
19721
19743
  ev = this.select(item);
19722
19744
  this.currentSelection = [this.lastSelectionItem];
19723
19745
  }
19724
- if (!ev.selectedCells.length && !ev.deselectedCells.length) {
19746
+ if (!ev || (!ev.selectedCells.length && !ev.deselectedCells.length)) {
19725
19747
  return;
19726
19748
  }
19727
19749
  ev.ctrlKey = ctrlKey;
@@ -19823,6 +19845,9 @@ class CellSelectionService {
19823
19845
  index: idx
19824
19846
  };
19825
19847
  this.settings.columns.forEach(col => {
19848
+ if (col.isColumnGroup) {
19849
+ return;
19850
+ }
19826
19851
  const { item } = this.settings.cellSelected(rowArgs, col, col.leafIndex);
19827
19852
  const selected = this.isCellSelected(next.value, col);
19828
19853
  const isInRowRange = selectionStartRow <= idx && idx <= selectionEndRow;
@@ -23242,7 +23267,7 @@ class TableBodyComponent {
23242
23267
  }
23243
23268
  @if (!rowsToRender?.length) {
23244
23269
  <tr class="k-grid-norecords" role="row">
23245
- <td [attr.colspan]="colSpan" class="k-table-td">
23270
+ <td [attr.colspan]="colSpan" class="k-table-td" role="gridcell">
23246
23271
  @if (noRecordsTemplate?.templateRef) {
23247
23272
  <ng-template
23248
23273
  [templateContext]="{
@@ -23593,7 +23618,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
23593
23618
  }
23594
23619
  @if (!rowsToRender?.length) {
23595
23620
  <tr class="k-grid-norecords" role="row">
23596
- <td [attr.colspan]="colSpan" class="k-table-td">
23621
+ <td [attr.colspan]="colSpan" class="k-table-td" role="gridcell">
23597
23622
  @if (noRecordsTemplate?.templateRef) {
23598
23623
  <ng-template
23599
23624
  [templateContext]="{
@@ -24800,8 +24825,8 @@ const packageMetadata = {
24800
24825
  productName: 'Kendo UI for Angular',
24801
24826
  productCode: 'KENDOUIANGULAR',
24802
24827
  productCodes: ['KENDOUIANGULAR'],
24803
- publishDate: 1780592763,
24804
- version: '24.1.1-develop.1',
24828
+ publishDate: 1782305817,
24829
+ version: '24.2.0-develop.10',
24805
24830
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
24806
24831
  };
24807
24832
 
@@ -29820,6 +29845,18 @@ class ListComponent {
29820
29845
  if (this.pendingToggleScroll && this.virtualPageSize) {
29821
29846
  this.scroller.virtualSkip = this.pendingToggleScroll.virtualSkip;
29822
29847
  }
29848
+ else if (this.skipScroll && this.virtualPageSize && this.scroller.virtualSkip >= this.allItems.length) {
29849
+ const clampedSkip = Math.max(0, this.allItems.length - this.virtualPageSize);
29850
+ this.scroller.virtualSkip = clampedSkip;
29851
+ this.scroller.firstToLoad = clampedSkip;
29852
+ this.scroller.lastLoaded = this.allItems.length - 1;
29853
+ const rowH = this.rowHeight || this.minRowHeight || 0;
29854
+ const newOffset = clampedSkip * rowH;
29855
+ this.scroller.tableTransformOffset = newOffset;
29856
+ [this.table?.nativeElement, this.lockedTable?.nativeElement]
29857
+ .filter(isPresent)
29858
+ .forEach(el => this.renderer.setStyle(el, 'transform', `translateY(${newOffset}px)`));
29859
+ }
29823
29860
  this.itemsToRender = this.allItems.slice(this.scroller.virtualSkip, this.scroller.virtualSkip + this.virtualPageSize);
29824
29861
  }
29825
29862
  else if (totalChanged && !this.ctx.grid?.group?.length) {
@@ -24,6 +24,9 @@ export type FilterableSettings = boolean | 'row' | 'menu' | 'menu, row';
24
24
  * - `multiCheckbox`&mdash;Renders a list of distinct column values with checkboxes for inclusion/exclusion filtering.
25
25
  */
26
26
  export type FilterVariant = 'default' | 'multiCheckbox';
27
+ /**
28
+ * Configures the filter variant for a column.
29
+ */
27
30
  export interface FilterVariantSettings {
28
31
  /**
29
32
  * Specifies the filter menu variant.
@@ -43,6 +43,7 @@ export declare class DateFilterMenuInputComponent implements OnDestroy {
43
43
  open(picker: DatePickerComponent): void;
44
44
  messageFor(key: string): string;
45
45
  get columnLabel(): string;
46
+ private isDatePickerMouseEvent;
46
47
  static ɵfac: i0.ɵɵFactoryDeclaration<DateFilterMenuInputComponent, never>;
47
48
  static ɵcmp: i0.ɵɵComponentDeclaration<DateFilterMenuInputComponent, "kendo-grid-date-filter-menu-input", never, { "operators": { "alias": "operators"; "required": false; }; "column": { "alias": "column"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "operator": { "alias": "operator"; "required": false; }; "currentFilter": { "alias": "currentFilter"; "required": false; }; "filterService": { "alias": "filterService"; "required": false; }; "menuTabbingService": { "alias": "menuTabbingService"; "required": false; }; "format": { "alias": "format"; "required": false; }; "formatPlaceholder": { "alias": "formatPlaceholder"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "bottomView": { "alias": "bottomView"; "required": false; }; "topView": { "alias": "topView"; "required": false; }; "weekNumber": { "alias": "weekNumber"; "required": false; }; "isFirstDropDown": { "alias": "isFirstDropDown"; "required": false; }; }, {}, never, never, true, never>;
48
49
  }
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1780592763,
11
- "version": "24.1.1-develop.1",
10
+ "publishDate": 1782305817,
11
+ "version": "24.2.0-develop.10",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "24.1.1-develop.1",
3
+ "version": "24.2.0-develop.10",
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",
@@ -94,7 +94,7 @@
94
94
  "package": {
95
95
  "productName": "Kendo UI for Angular",
96
96
  "productCode": "KENDOUIANGULAR",
97
- "publishDate": 1780592763,
97
+ "publishDate": 1782305817,
98
98
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
99
99
  }
100
100
  },
@@ -107,32 +107,32 @@
107
107
  "@progress/kendo-data-query": "^1.7.3",
108
108
  "@progress/kendo-drawing": "^1.25.0",
109
109
  "@progress/kendo-licensing": "^1.11.0",
110
- "@progress/kendo-angular-buttons": "24.1.1-develop.1",
111
- "@progress/kendo-angular-common": "24.1.1-develop.1",
112
- "@progress/kendo-angular-dateinputs": "24.1.1-develop.1",
113
- "@progress/kendo-angular-layout": "24.1.1-develop.1",
114
- "@progress/kendo-angular-navigation": "24.1.1-develop.1",
115
- "@progress/kendo-angular-dropdowns": "24.1.1-develop.1",
116
- "@progress/kendo-angular-excel-export": "24.1.1-develop.1",
117
- "@progress/kendo-angular-icons": "24.1.1-develop.1",
118
- "@progress/kendo-angular-indicators": "24.1.1-develop.1",
119
- "@progress/kendo-angular-inputs": "24.1.1-develop.1",
120
- "@progress/kendo-angular-conversational-ui": "24.1.1-develop.1",
121
- "@progress/kendo-angular-intl": "24.1.1-develop.1",
122
- "@progress/kendo-angular-l10n": "24.1.1-develop.1",
123
- "@progress/kendo-angular-label": "24.1.1-develop.1",
124
- "@progress/kendo-angular-menu": "24.1.1-develop.1",
125
- "@progress/kendo-angular-pager": "24.1.1-develop.1",
126
- "@progress/kendo-angular-pdf-export": "24.1.1-develop.1",
127
- "@progress/kendo-angular-popup": "24.1.1-develop.1",
128
- "@progress/kendo-angular-toolbar": "24.1.1-develop.1",
129
- "@progress/kendo-angular-upload": "24.1.1-develop.1",
130
- "@progress/kendo-angular-utils": "24.1.1-develop.1",
110
+ "@progress/kendo-angular-buttons": "24.2.0-develop.10",
111
+ "@progress/kendo-angular-common": "24.2.0-develop.10",
112
+ "@progress/kendo-angular-dateinputs": "24.2.0-develop.10",
113
+ "@progress/kendo-angular-layout": "24.2.0-develop.10",
114
+ "@progress/kendo-angular-navigation": "24.2.0-develop.10",
115
+ "@progress/kendo-angular-dropdowns": "24.2.0-develop.10",
116
+ "@progress/kendo-angular-excel-export": "24.2.0-develop.10",
117
+ "@progress/kendo-angular-icons": "24.2.0-develop.10",
118
+ "@progress/kendo-angular-indicators": "24.2.0-develop.10",
119
+ "@progress/kendo-angular-inputs": "24.2.0-develop.10",
120
+ "@progress/kendo-angular-conversational-ui": "24.2.0-develop.10",
121
+ "@progress/kendo-angular-intl": "24.2.0-develop.10",
122
+ "@progress/kendo-angular-l10n": "24.2.0-develop.10",
123
+ "@progress/kendo-angular-label": "24.2.0-develop.10",
124
+ "@progress/kendo-angular-menu": "24.2.0-develop.10",
125
+ "@progress/kendo-angular-pager": "24.2.0-develop.10",
126
+ "@progress/kendo-angular-pdf-export": "24.2.0-develop.10",
127
+ "@progress/kendo-angular-popup": "24.2.0-develop.10",
128
+ "@progress/kendo-angular-toolbar": "24.2.0-develop.10",
129
+ "@progress/kendo-angular-upload": "24.2.0-develop.10",
130
+ "@progress/kendo-angular-utils": "24.2.0-develop.10",
131
131
  "rxjs": "^6.5.3 || ^7.0.0"
132
132
  },
133
133
  "dependencies": {
134
134
  "tslib": "^2.3.1",
135
- "@progress/kendo-angular-schematics": "24.1.1-develop.1",
135
+ "@progress/kendo-angular-schematics": "24.2.0-develop.10",
136
136
  "@progress/kendo-common": "^1.0.1",
137
137
  "@progress/kendo-file-saver": "^1.0.0",
138
138
  "@progress/kendo-csv": "^1.0.0"
@@ -9,19 +9,19 @@ const schematics_1 = require("@angular-devkit/schematics");
9
9
  function default_1(options) {
10
10
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
11
11
  // peer deps of the dropdowns
12
- '@progress/kendo-angular-treeview': '24.1.1-develop.1',
13
- '@progress/kendo-angular-navigation': '24.1.1-develop.1',
12
+ '@progress/kendo-angular-treeview': '24.2.0-develop.10',
13
+ '@progress/kendo-angular-navigation': '24.2.0-develop.10',
14
14
  // peer dependency of kendo-angular-inputs
15
- '@progress/kendo-angular-dialog': '24.1.1-develop.1',
15
+ '@progress/kendo-angular-dialog': '24.2.0-develop.10',
16
16
  // peer dependency of kendo-angular-icons
17
17
  '@progress/kendo-svg-icons': '^4.0.0',
18
18
  // peer dependency of kendo-angular-layout
19
- '@progress/kendo-angular-progressbar': '24.1.1-develop.1',
19
+ '@progress/kendo-angular-progressbar': '24.2.0-develop.10',
20
20
  // transitive peer dependencies from toolbar
21
- '@progress/kendo-angular-indicators': '24.1.1-develop.1',
21
+ '@progress/kendo-angular-indicators': '24.2.0-develop.10',
22
22
  // transitive peer dependencies from conversational-ui
23
- '@progress/kendo-angular-menu': '24.1.1-develop.1',
24
- '@progress/kendo-angular-upload': '24.1.1-develop.1'
23
+ '@progress/kendo-angular-menu': '24.2.0-develop.10',
24
+ '@progress/kendo-angular-upload': '24.2.0-develop.10'
25
25
  } });
26
26
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
27
27
  }