@progress/kendo-angular-grid 21.2.0 → 21.3.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.
@@ -2102,15 +2102,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
2102
2102
  type: Optional
2103
2103
  }] }] });
2104
2104
 
2105
- // Incremented each time the service is instantiated.
2106
- let sequence = 0;
2105
+ // Registry to track active Grid instances and their indices
2106
+ const activeGridIndices = new Set();
2107
+ // Get the next available grid index (reuses freed indices)
2108
+ function getNextGridIndex() {
2109
+ let index = 0;
2110
+ while (activeGridIndices.has(index)) {
2111
+ index++;
2112
+ }
2113
+ activeGridIndices.add(index);
2114
+ return index;
2115
+ }
2116
+ // Release a grid index when the Grid is destroyed
2117
+ function releaseGridIndex(index) {
2118
+ activeGridIndices.delete(index);
2119
+ }
2107
2120
  /**
2108
2121
  * @hidden
2109
2122
  */
2110
2123
  class IdService {
2111
2124
  prefix;
2125
+ gridIndex;
2126
+ columnCounter = 0;
2112
2127
  constructor() {
2113
- this.prefix = `k-grid${sequence++}`;
2128
+ this.gridIndex = getNextGridIndex();
2129
+ this.prefix = `k-grid${this.gridIndex}`;
2130
+ }
2131
+ ngOnDestroy() {
2132
+ releaseGridIndex(this.gridIndex);
2114
2133
  }
2115
2134
  gridId() {
2116
2135
  return this.prefix;
@@ -2127,6 +2146,9 @@ class IdService {
2127
2146
  columnId(colIndex) {
2128
2147
  return `${this.prefix}-col${colIndex}`;
2129
2148
  }
2149
+ nextColumnId() {
2150
+ return `${this.prefix}-col${this.columnCounter++}`;
2151
+ }
2130
2152
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2131
2153
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService });
2132
2154
  }
@@ -2208,7 +2230,6 @@ const isCheckboxColumn = column => column?.isCheckboxColumn;
2208
2230
  */
2209
2231
  const isRowReorderColumn = column => column?.isRowReorderColumn;
2210
2232
  const isColumnContainer = column => column?.isColumnGroup || isSpanColumn(column);
2211
- let columnId = 0;
2212
2233
  /**
2213
2234
  * The base class for the column components of the Grid.
2214
2235
  *
@@ -2539,7 +2560,7 @@ class ColumnBase {
2539
2560
  if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
2540
2561
  throw new Error(ColumnConfigurationErrorMessages.columnNested);
2541
2562
  }
2542
- this._id = this.idService?.columnId(columnId++);
2563
+ this._id = this.idService?.nextColumnId();
2543
2564
  }
2544
2565
  ngAfterViewInit() {
2545
2566
  this.initialMinResizableWidth = this.minResizableWidth || 10;
@@ -10237,12 +10258,12 @@ class DateFilterMenuInputComponent {
10237
10258
  this.subscription.unsubscribe();
10238
10259
  }
10239
10260
  }
10240
- open() {
10261
+ open(picker) {
10241
10262
  if (this.subscription) {
10242
10263
  this.subscription.unsubscribe();
10243
10264
  }
10244
10265
  this.subscription = this.popupService.onClose
10245
- .pipe(take(1))
10266
+ .pipe(filter(() => picker.isActive))
10246
10267
  .subscribe(e => e.preventDefault());
10247
10268
  }
10248
10269
  messageFor(key) {
@@ -10264,13 +10285,13 @@ class DateFilterMenuInputComponent {
10264
10285
  [filterService]="filterService"
10265
10286
  [isFirstDropDown]="isFirstDropDown"
10266
10287
  [menuTabbingService]="menuTabbingService">
10267
- <kendo-datepicker
10288
+ <kendo-datepicker #picker
10268
10289
  kendoFilterInput
10269
10290
  [adaptiveMode]="ctx.grid?.adaptiveMode"
10270
10291
  [size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
10271
10292
  [columnLabel]="columnLabel"
10272
10293
  [filterDelay]="0"
10273
- (open)="open()"
10294
+ (open)="open(picker)"
10274
10295
  [value]="currentFilter?.value"
10275
10296
  [placeholder]="placeholder"
10276
10297
  [formatPlaceholder]="formatPlaceholder"
@@ -10303,13 +10324,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
10303
10324
  [filterService]="filterService"
10304
10325
  [isFirstDropDown]="isFirstDropDown"
10305
10326
  [menuTabbingService]="menuTabbingService">
10306
- <kendo-datepicker
10327
+ <kendo-datepicker #picker
10307
10328
  kendoFilterInput
10308
10329
  [adaptiveMode]="ctx.grid?.adaptiveMode"
10309
10330
  [size]="ctx.grid?.isActionSheetExpanded ? 'large' : null"
10310
10331
  [columnLabel]="columnLabel"
10311
10332
  [filterDelay]="0"
10312
- (open)="open()"
10333
+ (open)="open(picker)"
10313
10334
  [value]="currentFilter?.value"
10314
10335
  [placeholder]="placeholder"
10315
10336
  [formatPlaceholder]="formatPlaceholder"
@@ -12834,6 +12855,7 @@ class ColumnListComponent {
12834
12855
  _columns;
12835
12856
  domSubscriptions = new Subscription();
12836
12857
  lastDisabledCheckbox;
12858
+ handledKeys = [Keys.ArrowDown, Keys.ArrowUp, Keys.Space];
12837
12859
  constructor(element, ngZone, renderer, listNavigationService, cdr, columnInfoService, adaptiveGridService, ctx) {
12838
12860
  this.element = element;
12839
12861
  this.ngZone = ngZone;
@@ -12976,7 +12998,7 @@ class ColumnListComponent {
12976
12998
  }
12977
12999
  onKeydown = (e) => {
12978
13000
  const code = normalizeKeys(e);
12979
- if (code !== Keys.Tab) {
13001
+ if (this.handledKeys.includes(code)) {
12980
13002
  e.preventDefault();
12981
13003
  }
12982
13004
  if (code === 'Tab' && e.shiftKey) {
@@ -14957,7 +14979,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
14957
14979
  </kendo-grid-columnmenu-item>
14958
14980
  `,
14959
14981
  standalone: true,
14960
- imports: [ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnListComponent, ColumnChooserContentComponent]
14982
+ imports: [ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnChooserContentComponent]
14961
14983
  }]
14962
14984
  }], ctorParameters: () => [{ type: ContextService }, { type: ColumnInfoService }, { type: i0.ElementRef }], propDecorators: { expand: [{
14963
14985
  type: Output
@@ -16230,7 +16252,7 @@ class ColumnMenuComponent {
16230
16252
  >
16231
16253
  </kendo-grid-columnmenu-autosize-column>
16232
16254
  }
16233
-
16255
+
16234
16256
  @if (hasAutoSizeAllColumns) {
16235
16257
  <kendo-grid-columnmenu-autosize-all-columns
16236
16258
  #autoSizeAllColumnsItem
@@ -16358,7 +16380,7 @@ class ColumnMenuComponent {
16358
16380
  }
16359
16381
  </kendo-tabstrip>
16360
16382
  </ng-template>
16361
-
16383
+
16362
16384
  `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ColumnMenuContainerComponent, selector: "kendo-grid-columnmenu-container" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ColumnMenuSortComponent, selector: "kendo-grid-columnmenu-sort" }, { kind: "directive", type: ColumnMenuItemDirective, selector: "[kendoGridColumnMenuItem]", inputs: ["kendoGridColumnMenuItem"] }, { kind: "component", type: ColumnMenuLockComponent, selector: "kendo-grid-columnmenu-lock" }, { kind: "component", type: ColumnMenuStickComponent, selector: "kendo-grid-columnmenu-stick" }, { kind: "component", type: ColumnMenuPositionComponent, selector: "kendo-grid-columnmenu-position", inputs: ["expanded", "showLock", "showStick", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuChooserComponent, selector: "kendo-grid-columnmenu-chooser", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: ColumnMenuAutoSizeColumnComponent, selector: "kendo-grid-columnmenu-autosize-column", inputs: ["column"] }, { kind: "component", type: ColumnMenuAutoSizeAllColumnsComponent, selector: "kendo-grid-columnmenu-autosize-all-columns" }, { kind: "component", type: ColumnMenuFilterComponent, selector: "kendo-grid-columnmenu-filter", inputs: ["expanded", "isLast"], outputs: ["expand", "collapse"] }, { kind: "component", type: TabStripComponent, selector: "kendo-tabstrip", inputs: ["height", "animate", "tabAlignment", "tabPosition", "keepTabContent", "closable", "scrollable", "size", "closeIcon", "closeIconClass", "closeSVGIcon", "showContentArea"], outputs: ["tabSelect", "tabClose", "tabScroll"], exportAs: ["kendoTabStrip"] }, { kind: "component", type: TabStripTabComponent, selector: "kendo-tabstrip-tab", inputs: ["title", "disabled", "cssClass", "cssStyle", "selected", "closable", "closeIcon", "closeIconClass", "closeSVGIcon"], exportAs: ["kendoTabStripTab"] }, { kind: "directive", type: TabTitleDirective, selector: "[kendoTabTitle]" }, { kind: "directive", type: TabContentDirective, selector: "[kendoTabContent]" }, { kind: "component", type: FilterMenuContainerComponent, selector: "kendo-grid-filter-menu-container", inputs: ["column", "isLast", "isExpanded", "menuTabbingService", "filter", "actionsClass"], outputs: ["close"] }, { kind: "component", type: ColumnChooserContentComponent, selector: "kendo-grid-column-chooser-content", inputs: ["filterable", "showSelectAll", "showCheckedCount", "allowHideAll", "autoSync", "actionsClass", "closeOnReset", "columns", "isLast", "isExpanded", "service"], outputs: ["close"] }] });
16363
16385
  }
16364
16386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuComponent, decorators: [{
@@ -16441,7 +16463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
16441
16463
  >
16442
16464
  </kendo-grid-columnmenu-autosize-column>
16443
16465
  }
16444
-
16466
+
16445
16467
  @if (hasAutoSizeAllColumns) {
16446
16468
  <kendo-grid-columnmenu-autosize-all-columns
16447
16469
  #autoSizeAllColumnsItem
@@ -16569,7 +16591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
16569
16591
  }
16570
16592
  </kendo-tabstrip>
16571
16593
  </ng-template>
16572
-
16594
+
16573
16595
  `,
16574
16596
  standalone: true,
16575
16597
  imports: [
@@ -16591,7 +16613,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
16591
16613
  TabTitleDirective,
16592
16614
  TabContentDirective,
16593
16615
  FilterMenuContainerComponent,
16594
- ColumnListComponent,
16595
16616
  ColumnChooserContentComponent
16596
16617
  ]
16597
16618
  }]
@@ -19727,7 +19748,7 @@ class HeaderComponent {
19727
19748
  }
19728
19749
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HeaderComponent, deps: [{ token: SinglePopupService }, { token: DragHintService }, { token: DropCueService }, { token: ColumnReorderService }, { token: IdService }, { token: SortService }, { token: ColumnInfoService }, { token: i0.ChangeDetectorRef }, { token: ContextService }, { token: NavigationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
19729
19750
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: HeaderComponent, isStandalone: true, selector: "[kendoGridHeader]", inputs: { totalColumnLevels: "totalColumnLevels", columns: "columns", groups: "groups", detailTemplate: "detailTemplate", scrollable: "scrollable", filterable: "filterable", sort: "sort", filter: "filter", sortable: "sortable", groupable: "groupable", lockedColumnsCount: "lockedColumnsCount", resizable: "resizable", reorderable: "reorderable", columnMenu: "columnMenu", columnMenuTemplate: "columnMenuTemplate", totalColumnsCount: "totalColumnsCount", totalColumns: "totalColumns", tabIndex: "tabIndex", size: "size" }, host: { properties: { "class.k-table-thead": "this.hostClass" } }, viewQueries: [{ propertyName: "dropTargets", predicate: DropTargetDirective, descendants: true }, { propertyName: "filterMenus", predicate: FilterMenuComponent, descendants: true }, { propertyName: "columnMenus", predicate: ColumnMenuComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
19730
- @for (i of columnLevels; track i; let levelIndex = $index) {
19751
+ @for (i of columnLevels; track $index; let levelIndex = $index) {
19731
19752
  <tr
19732
19753
  kendoGridLogicalRow
19733
19754
  [logicalRowIndex]="levelIndex"
@@ -19748,7 +19769,7 @@ class HeaderComponent {
19748
19769
  >
19749
19770
  </th>
19750
19771
  }
19751
- @for (column of columnsForLevel(levelIndex); track column; let columnIndex = $index; let last = $last) {
19772
+ @for (column of columnsForLevel(levelIndex); track column.id; let columnIndex = $index; let last = $last) {
19752
19773
  @if (!isColumnGroupComponent(column)) {
19753
19774
  <th
19754
19775
  kendoGridLogicalCell
@@ -19975,7 +19996,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
19975
19996
  args: [{
19976
19997
  selector: '[kendoGridHeader]',
19977
19998
  template: `
19978
- @for (i of columnLevels; track i; let levelIndex = $index) {
19999
+ @for (i of columnLevels; track $index; let levelIndex = $index) {
19979
20000
  <tr
19980
20001
  kendoGridLogicalRow
19981
20002
  [logicalRowIndex]="levelIndex"
@@ -19996,7 +20017,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
19996
20017
  >
19997
20018
  </th>
19998
20019
  }
19999
- @for (column of columnsForLevel(levelIndex); track column; let columnIndex = $index; let last = $last) {
20020
+ @for (column of columnsForLevel(levelIndex); track column.id; let columnIndex = $index; let last = $last) {
20000
20021
  @if (!isColumnGroupComponent(column)) {
20001
20022
  <th
20002
20023
  kendoGridLogicalCell
@@ -23575,474 +23596,1172 @@ const packageMetadata = {
23575
23596
  productName: 'Kendo UI for Angular',
23576
23597
  productCode: 'KENDOUIANGULAR',
23577
23598
  productCodes: ['KENDOUIANGULAR'],
23578
- publishDate: 1764751621,
23579
- version: '21.2.0',
23599
+ publishDate: 1765273123,
23600
+ version: '21.3.0-develop.10',
23580
23601
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
23581
23602
  };
23582
23603
 
23583
23604
  /**
23584
23605
  * @hidden
23606
+ * Converts date strings in a filter to Date objects.
23585
23607
  */
23586
- const normalizeSettings = ({ buttonCount = 10, info = true, type = 'numeric', pageSizes = false, previousNext = true, responsive = true, position = 'bottom' }) => ({
23587
- buttonCount,
23588
- info,
23589
- pageSizes,
23590
- previousNext,
23591
- type,
23592
- responsive,
23593
- position
23594
- });
23595
- /**
23596
- * @hidden
23597
- */
23598
- const normalize = (settings) => normalizeSettings(settings === true ? {} : settings);
23599
-
23600
- const canCreateElement = () => isDocumentAvailable() && document.createElement;
23601
- let cachedScrollbarWidth = null;
23602
- let cachedPixelRatio;
23603
- let cachedRtlScrollLeft = null;
23604
- function scrollbarWidth() {
23605
- if (cachedScrollbarWidth === null && canCreateElement()) {
23606
- cachedPixelRatio = window.devicePixelRatio || 1;
23607
- const div = document.createElement("div");
23608
- div.style.cssText = "overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block";
23609
- div.innerHTML = "&nbsp;";
23610
- document.body.appendChild(div);
23611
- cachedScrollbarWidth = div.offsetWidth - div.scrollWidth;
23612
- document.body.removeChild(div);
23613
- }
23614
- return cachedScrollbarWidth;
23615
- }
23616
- function rtlScrollLeft() {
23617
- if (cachedRtlScrollLeft === null && canCreateElement()) {
23618
- const outer = document.createElement('div');
23619
- outer.style.direction = 'rtl';
23620
- outer.style.display = 'block';
23621
- outer.style.clear = 'both';
23622
- outer.style.width = '100px';
23623
- outer.style.visibility = 'hidden';
23624
- outer.style.position = 'absolute';
23625
- outer.style.left = '-10000px';
23626
- outer.style.overflow = 'scroll';
23627
- outer.style.zoom = '1';
23628
- const inner = document.createElement('div');
23629
- inner.style.width = '200px';
23630
- inner.style.height = '1px';
23631
- outer.append(inner);
23632
- document.body.appendChild(outer);
23633
- const initial = outer.scrollLeft;
23634
- outer.scrollLeft = -1;
23635
- cachedRtlScrollLeft = outer.scrollLeft < 0 ? outer.scrollLeft : initial;
23636
- document.body.removeChild(outer);
23608
+ const convertDateStringsInFilter = (filter) => {
23609
+ if (!filter) {
23610
+ return filter;
23637
23611
  }
23638
- return cachedRtlScrollLeft;
23639
- }
23640
- /**
23641
- * @hidden
23642
- * move to kendo-common
23643
- */
23644
- class BrowserSupportService {
23645
- zone;
23646
- changeDetector;
23647
- changes = new EventEmitter();
23648
- subscriptions;
23649
- constructor(zone, changeDetector) {
23650
- this.zone = zone;
23651
- this.changeDetector = changeDetector;
23652
- if (typeof window === 'undefined') {
23653
- return;
23654
- }
23655
- this.zone.runOutsideAngular(() => {
23656
- this.subscriptions = fromEvent(window, 'resize').pipe(auditTime(100)).subscribe(() => {
23657
- if (cachedPixelRatio !== window.devicePixelRatio) {
23658
- zone.run(() => {
23659
- cachedScrollbarWidth = null;
23660
- this.changes.emit();
23661
- this.changeDetector.markForCheck();
23662
- });
23663
- }
23664
- });
23665
- });
23612
+ if (filter.filters && Array.isArray(filter.filters)) {
23613
+ return {
23614
+ ...filter,
23615
+ filters: filter.filters.map(f => convertDateStringsInFilter(f))
23616
+ };
23666
23617
  }
23667
- ngOnDestroy() {
23668
- if (this.subscriptions) {
23669
- this.subscriptions.unsubscribe();
23670
- this.subscriptions = null;
23618
+ if (filter.field && filter.value !== undefined) {
23619
+ if (typeof filter.value === 'string' && isDateOperator(filter.operator)) {
23620
+ const date = parseDate(filter.value);
23621
+ return {
23622
+ ...filter,
23623
+ value: date || filter.value
23624
+ };
23671
23625
  }
23672
23626
  }
23673
- get scrollbarWidth() {
23674
- return scrollbarWidth();
23675
- }
23676
- get rtlScrollLeft() {
23677
- return rtlScrollLeft();
23678
- }
23679
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
23680
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService });
23681
- }
23682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService, decorators: [{
23683
- type: Injectable
23684
- }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }] });
23685
-
23686
- const isGroupItem = (source) => {
23687
- return source.items !== undefined &&
23688
- source.field !== undefined;
23689
- };
23690
- const flattenGroups = (groups) => (groups.reduce((acc, curr) => {
23691
- if (isGroupItem(curr)) {
23692
- return acc.concat(flattenGroups(curr.items));
23693
- }
23694
- return acc.concat([curr]);
23695
- }, []));
23696
- /**
23697
- * @hidden
23698
- */
23699
- const itemAt = (data, index) => {
23700
- const first = data[0];
23701
- if (isPresent(first) && isGroupItem(first)) {
23702
- return flattenGroups(data)[index];
23703
- }
23704
- return data[index];
23627
+ return filter;
23705
23628
  };
23706
23629
  /**
23707
23630
  * @hidden
23708
23631
  */
23709
- const getIterator = (data, { footers, level, dataIndex, parentGroupIndex, groupIndex, parentGroup }) => {
23710
- const first = data[0];
23711
- if (isPresent(first) && isGroupItem(first)) {
23712
- return new GroupIterator(data, footers, level, dataIndex, parentGroupIndex, groupIndex, parentGroup);
23713
- }
23714
- return new ItemIterator(data, dataIndex, parentGroupIndex, parentGroup);
23632
+ const isDateOperator = (operator) => {
23633
+ const dateOperators = [
23634
+ 'eq', 'neq', 'lt', 'lte', 'gt', 'gte'
23635
+ ];
23636
+ return dateOperators.includes(operator);
23715
23637
  };
23716
- class ArrayIterator {
23717
- arr;
23718
- idx;
23719
- constructor(arr, idx = 0) {
23720
- this.arr = arr;
23721
- this.idx = idx;
23722
- this.arr = arr || [];
23723
- }
23724
- [iterator]() {
23725
- return this;
23726
- }
23727
- next() {
23728
- return this.idx < this.arr.length ? {
23729
- done: false,
23730
- value: this.arr[this.idx++]
23731
- } : { done: true, value: undefined };
23732
- }
23733
- }
23734
- /**
23735
- * @hidden
23736
- */
23737
- class Iterator {
23738
- dataIndex;
23739
- resultMap;
23740
- _innerIterator;
23741
- constructor(arr, dataIndex = 0, resultMap = (x) => x) {
23742
- this.dataIndex = dataIndex;
23743
- this.resultMap = resultMap;
23744
- const iter = arr[iterator];
23745
- this._innerIterator = iter ? arr[iterator]() : new ArrayIterator(arr);
23746
- }
23747
- [iterator]() {
23748
- return this;
23749
- }
23750
- next() {
23751
- return this.resultMap(this._innerIterator.next(), this.dataIndex++);
23752
- }
23753
- }
23754
23638
  /**
23755
23639
  * @hidden
23640
+ * Processes cell highlights for a specific filter and item.
23756
23641
  */
23757
- class ItemIterator extends Iterator {
23758
- constructor(arr, dataIndex, groupIndex, group) {
23759
- super(arr, dataIndex, (x, idx) => ({
23760
- done: x.done,
23761
- value: {
23762
- data: x.value,
23763
- groupIndex: groupIndex,
23764
- index: idx,
23765
- type: 'data',
23766
- group
23767
- }
23768
- }));
23769
- }
23770
- /**
23771
- * The index of the next record.
23772
- * @readonly
23773
- * @type {number}
23774
- */
23775
- get index() {
23776
- return this.dataIndex;
23777
- }
23778
- }
23779
- const prefix = (s, n) => {
23780
- const p = s ? s + "_" : s;
23781
- return `${p}${n}`;
23642
+ const processCellHighlights = (filter, rowIndex, columns, highlightItems) => {
23643
+ Object.keys(filter.cells).forEach((columnField) => {
23644
+ const actualColumnIndex = Array.from(columns).findIndex((col) => col.field === columnField);
23645
+ if (actualColumnIndex !== -1) {
23646
+ highlightItems.push({
23647
+ itemKey: rowIndex,
23648
+ columnKey: actualColumnIndex,
23649
+ });
23650
+ }
23651
+ });
23782
23652
  };
23783
23653
  /**
23784
23654
  * @hidden
23655
+ * Processes filtered results and adds highlight items.
23785
23656
  */
23786
- class GroupIterator {
23787
- arr;
23788
- outputFooters;
23789
- level;
23790
- dataIndex;
23791
- parentIndex;
23792
- groupIndex;
23793
- parentGroup;
23794
- current;
23795
- _innerIterator;
23796
- _iterator;
23797
- currentGroupIndex = "";
23798
- constructor(arr, outputFooters = false, level = 0, dataIndex = 0, parentIndex = '', groupIndex = 0, parentGroup = undefined) {
23799
- this.arr = arr;
23800
- this.outputFooters = outputFooters;
23801
- this.level = level;
23802
- this.dataIndex = dataIndex;
23803
- this.parentIndex = parentIndex;
23804
- this.groupIndex = groupIndex;
23805
- this.parentGroup = parentGroup;
23806
- this.arr = arr || [];
23807
- this._iterator = new Iterator(this.arr, this.dataIndex);
23808
- }
23809
- [iterator]() {
23810
- return this;
23811
- }
23812
- nextGroupItem() {
23813
- this.current = this._iterator.next().value;
23814
- this._innerIterator = null;
23815
- if (this.current) {
23816
- this.currentGroupIndex = prefix(this.parentIndex, this.groupIndex++);
23817
- return {
23818
- done: false,
23819
- value: {
23820
- data: this.current,
23821
- index: this.currentGroupIndex,
23822
- level: this.level,
23823
- type: 'group',
23824
- parentGroup: this.parentGroup
23825
- }
23826
- };
23827
- }
23828
- else {
23829
- this.current = null;
23830
- return { done: true, value: undefined };
23831
- }
23832
- }
23833
- footerItem() {
23834
- if (this.current) {
23835
- const group = this.current;
23836
- this.current = null;
23837
- return {
23838
- done: false,
23839
- value: {
23840
- data: group,
23841
- groupIndex: this.currentGroupIndex,
23842
- level: this.level,
23843
- type: 'footer',
23844
- group: {
23845
- data: group,
23846
- index: this.currentGroupIndex,
23847
- level: this.level,
23848
- type: 'group',
23849
- parentGroup: this.parentGroup
23850
- }
23851
- }
23852
- };
23657
+ const processFilteredResults = (filteredResults, data, filter, columns, highlightItems) => {
23658
+ filteredResults?.forEach((item) => {
23659
+ const rowIndex = data.findIndex((dataItem) => dataItem === item);
23660
+ if (filter.cells && Object.keys(filter.cells).length > 0) {
23661
+ processCellHighlights(filter, rowIndex, columns, highlightItems);
23853
23662
  }
23854
23663
  else {
23855
- this.current = null;
23856
- return { done: true, value: undefined };
23857
- }
23858
- }
23859
- innerIterator(group) {
23860
- if (!this._innerIterator) {
23861
- this._innerIterator = getIterator(group.items, {
23862
- dataIndex: this.dataIndex,
23863
- footers: this.outputFooters,
23864
- level: this.level + 1,
23865
- parentGroupIndex: this.currentGroupIndex,
23866
- parentGroup: {
23867
- data: this.current,
23868
- index: this.currentGroupIndex,
23869
- level: this.level,
23870
- type: 'group',
23871
- parentGroup: this.parentGroup
23872
- }
23664
+ highlightItems.push({
23665
+ itemKey: rowIndex,
23873
23666
  });
23874
23667
  }
23875
- return this._innerIterator;
23876
- }
23877
- nextDataItem(group) {
23878
- const iterator = this.innerIterator(group);
23879
- const result = iterator.next();
23880
- if (isPresent(result.value) && !result.done && result.value.type === "data") {
23881
- this.dataIndex = result.value.index + 1;
23882
- }
23883
- return !result.done ? result : undefined;
23884
- }
23885
- next() {
23886
- if (!isPresent(this.current)) {
23887
- return this.nextGroupItem();
23888
- }
23889
- const item = this.nextDataItem(this.current);
23890
- return item ? item : (this.outputFooters ? this.footerItem() : this.nextGroupItem());
23891
- }
23892
- /**
23893
- * The index of the last iterated data record.
23894
- * @readonly
23895
- * @type {number}
23896
- */
23897
- get index() {
23898
- return this.dataIndex + 1;
23899
- }
23900
- }
23901
-
23668
+ });
23669
+ };
23902
23670
  /**
23903
23671
  * @hidden
23672
+ * Highlights items in a grid based on the provided filters and columns.
23673
+ * @param data - The data to be highlighted.
23674
+ * @param filters - The composite highlight descriptors containing the filters and logic.
23675
+ * @param columns - The columns of the grid.
23676
+ * @returns An array of HighlightItem objects representing the highlighted items.
23904
23677
  */
23905
- class DataResultIterator {
23906
- source;
23907
- skip;
23908
- groupFooters;
23909
- isObject;
23910
- constructor(source, skip = 0, groupFooters = false) {
23911
- this.source = source;
23912
- this.skip = skip;
23913
- this.groupFooters = groupFooters;
23914
- this.source = this.source ? this.source : [];
23915
- this.isObject = this.isGridDataResult(this.source);
23916
- }
23917
- isGridDataResult(source) {
23918
- return source.total !== undefined && source.data !== undefined;
23919
- }
23920
- get total() {
23921
- return this.isObject ? this.source.total : this.source.length;
23922
- }
23923
- get data() {
23924
- return this.isObject ? this.source.data : this.source;
23925
- }
23926
- map(fn) {
23927
- return this.data.map(fn);
23928
- }
23929
- filter(fn) {
23930
- return this.data.filter(fn);
23931
- }
23932
- reduce(fn, init) {
23933
- return this.data.reduce(fn, init);
23934
- }
23935
- forEach(fn) {
23936
- this.data.forEach(fn);
23937
- }
23938
- some(fn) {
23939
- return this.data.some(fn);
23940
- }
23941
- [iterator]() {
23942
- return getIterator(this.data, {
23943
- dataIndex: this.skip,
23944
- footers: this.groupFooters,
23945
- groupIndex: this.skip
23678
+ const highlightBy = (data, filters, columns) => {
23679
+ const highlightItems = [];
23680
+ filters.forEach((filter) => {
23681
+ const processedFilters = filter.filters.map((filter) => convertDateStringsInFilter(filter));
23682
+ const filteredResults = filterBy(data, {
23683
+ logic: filter.logic || "and",
23684
+ filters: processedFilters,
23946
23685
  });
23947
- }
23948
- toString() { return this.data.toString(); }
23949
- }
23950
- /**
23951
- * @hidden
23952
- */
23953
- class DataCollection {
23954
- accessor;
23955
- constructor(accessor) {
23956
- this.accessor = accessor;
23957
- }
23958
- get total() { return this.accessor().total; }
23959
- get length() { return this.accessor().data.length; }
23960
- get first() { return this.accessor().data[0]; }
23961
- get last() { return this.accessor().data[this.length - 1]; }
23962
- at(index) {
23963
- return itemAt(this.accessor().data, index);
23964
- }
23965
- map(fn) { return this.accessor().map(fn); }
23966
- filter(fn) {
23967
- return this.accessor().filter(fn);
23968
- }
23969
- reduce(fn, init) {
23970
- return this.accessor().reduce(fn, init);
23971
- }
23972
- forEach(fn) {
23973
- this.accessor().forEach(fn);
23974
- }
23975
- some(fn) {
23976
- return this.accessor().some(fn);
23977
- }
23978
- [iterator]() {
23979
- return this.accessor()[iterator]();
23980
- }
23981
- toString() { return this.accessor().toString(); }
23982
- }
23686
+ processFilteredResults(filteredResults, data, filter, columns, highlightItems);
23687
+ });
23688
+ return highlightItems;
23689
+ };
23983
23690
 
23984
23691
  /**
23985
23692
  * @hidden
23986
23693
  *
23987
- * Quick look-up structure for combinations of keys or single keys.
23988
- * Similar to the native JS Set, however, working with single keys or a couple of keys.
23989
- * Supports both primitive keys and object keys (compared by reference).
23694
+ * Service that builds AI requests and processes AI responses for the Grid.
23695
+ * Used internally by both the Grid component and the AI Assistant tool.
23990
23696
  */
23991
- class PairSet {
23992
- /**
23993
- * Symbol used internally to represent "no Y key" when storing single X keys.
23994
- */
23995
- static SINGLE_KEY_SYMBOL = Symbol('SINGLE_KEY');
23996
- /**
23997
- * Gets the total number of key entries (both single keys and key pairs).
23998
- */
23999
- get size() {
24000
- return this.totalKeysCount;
23697
+ class GridAIRequestResponseService {
23698
+ ctx;
23699
+ columnInfoService;
23700
+ zone;
23701
+ constructor(ctx, columnInfoService, zone) {
23702
+ this.ctx = ctx;
23703
+ this.columnInfoService = columnInfoService;
23704
+ this.zone = zone;
24001
23705
  }
24002
23706
  /**
24003
- * Holds a set of Y keys for each defined X key.
24004
- * Each X key creates a map which holds a set of Y keys.
24005
- * For single keys, the Y value is the SINGLE_KEY_SYMBOL.
24006
- *
24007
- * Map { 'foo' => Set { Symbol(SINGLE_KEY) } } // single key: {x: 'foo'}
24008
- * Map { 'foo2' => Set { 'bar', 'baz' } } // pairs: {x: 'foo2', y: 'bar'}, {x: 'foo2', y: 'baz'}
24009
- */
24010
- keysX = new Map();
24011
- /**
24012
- * Count each added or deleted key manually to avoid iterating over all items when calling `this.size`.
23707
+ * Builds the request body for the AI service based on the Grid's column structure.
23708
+ * Returns a column descriptor tree that includes column metadata for the AI service.
24013
23709
  */
24014
- totalKeysCount = 0;
24015
- constructor(items, keyXField, keyYField) {
24016
- if (items && keyXField) {
24017
- items.forEach(item => {
24018
- if (keyYField && item[keyYField] !== undefined) {
24019
- this.add(item[keyXField], item[keyYField]);
24020
- }
24021
- else {
24022
- this.addSingle(item[keyXField]);
23710
+ buildRequestBody(promptMessage, role) {
23711
+ const columnsTree = this.buildColumnDescriptors();
23712
+ return {
23713
+ role: role || 'user',
23714
+ contents: [
23715
+ {
23716
+ text: promptMessage
24023
23717
  }
24024
- });
24025
- }
24026
- }
24027
- /**
24028
- * Adds a single key entry.
24029
- */
24030
- addSingle(keyX) {
24031
- if (!this.keysX.has(keyX)) {
24032
- this.keysX.set(keyX, new Set());
24033
- }
24034
- if (!this.hasSingle(keyX)) {
24035
- this.keysX.get(keyX).add(PairSet.SINGLE_KEY_SYMBOL);
24036
- this.totalKeysCount += 1;
24037
- }
23718
+ ],
23719
+ columns: columnsTree
23720
+ };
24038
23721
  }
24039
23722
  /**
24040
- * Adds a couple of items identified as a combination.
23723
+ * Builds a nested column descriptor tree based on the Grid's column structure.
23724
+ * Includes root columns and their nested children (for ColumnGroup and SpanColumn).
24041
23725
  */
24042
- add(keyX, keyY) {
24043
- if (!this.keysX.has(keyX)) {
24044
- this.keysX.set(keyX, new Set());
24045
- }
23726
+ buildColumnDescriptors() {
23727
+ const rootColumns = this.ctx?.grid?.columnList?.rootColumns() || [];
23728
+ const buildDescriptor = (col) => {
23729
+ const hasChildren = Boolean(col.hasChildren && col.childrenArray?.length);
23730
+ const descriptor = {
23731
+ id: col.id,
23732
+ field: col.field,
23733
+ header: col.title
23734
+ };
23735
+ if (hasChildren) {
23736
+ descriptor.columns = col.childrenArray.map((c) => buildDescriptor(c));
23737
+ }
23738
+ // For special columns that don't have a field, emit an optional type token
23739
+ // so the AI service knows how to treat them (checkbox/command/reorder)
23740
+ if (!col.field) {
23741
+ if (isCheckboxColumn(col)) {
23742
+ descriptor.type = 'checkbox';
23743
+ }
23744
+ else if (col instanceof CommandColumnComponent) {
23745
+ descriptor.type = 'command';
23746
+ }
23747
+ }
23748
+ return descriptor;
23749
+ };
23750
+ return rootColumns.map((col) => buildDescriptor(col));
23751
+ }
23752
+ /**
23753
+ * Processes AI response commands and applies them to the Grid.
23754
+ * Returns an array of display messages for each command.
23755
+ */
23756
+ processCommands(commands, columns, leafColumns) {
23757
+ const messages = [];
23758
+ this.executeCommands(commands || [], columns, leafColumns, messages);
23759
+ return messages;
23760
+ }
23761
+ executeCommands(commands, columns, leafColumns, messages) {
23762
+ if (!commands?.length) {
23763
+ return;
23764
+ }
23765
+ const grid = this.ctx.grid;
23766
+ const isFilterable = Boolean(grid.filterable);
23767
+ const isSortable = Boolean(grid.sortable);
23768
+ const isGroupable = Boolean(grid.groupable);
23769
+ const findColumnById = (id) => grid.columnList.toArray().find((c) => c.id === id);
23770
+ const updateColumnHierarchy = (column, updater) => {
23771
+ const changed = [];
23772
+ const queue = [column];
23773
+ while (queue.length) {
23774
+ const current = queue.shift();
23775
+ if (!current) {
23776
+ continue;
23777
+ }
23778
+ const didChange = updater(current);
23779
+ if (didChange) {
23780
+ changed.push(current);
23781
+ }
23782
+ if (current.hasChildren && current.childrenArray?.length) {
23783
+ queue.push(...current.childrenArray);
23784
+ }
23785
+ }
23786
+ return changed;
23787
+ };
23788
+ commands.forEach((cmd) => {
23789
+ let displayMessage = cmd.message || '';
23790
+ if (this.isColumnCommand(cmd.type)) {
23791
+ if (cmd.id) {
23792
+ const column = findColumnById(cmd.id);
23793
+ const replacement = this.getColumnReplacement(column);
23794
+ displayMessage = this.replaceQuotedColumnId(displayMessage, replacement);
23795
+ }
23796
+ }
23797
+ messages.push(displayMessage);
23798
+ switch (cmd.type) {
23799
+ case 'GridSort':
23800
+ if (!isSortable) {
23801
+ break;
23802
+ }
23803
+ this.processArrayResponse([cmd.sort], grid.currentState.sort || [], (item) => item.field, (mergedArray) => grid.sortChange.next(mergedArray));
23804
+ break;
23805
+ case 'GridClearSort':
23806
+ if (!isSortable) {
23807
+ break;
23808
+ }
23809
+ grid.sortChange.next([]);
23810
+ break;
23811
+ case 'GridFilter':
23812
+ if (!isFilterable) {
23813
+ break;
23814
+ }
23815
+ this.processFilterResponse(cmd.filter);
23816
+ break;
23817
+ case 'GridClearFilter':
23818
+ if (!isFilterable) {
23819
+ break;
23820
+ }
23821
+ grid.filterChange.next(undefined);
23822
+ break;
23823
+ case 'GridGroup':
23824
+ if (!isGroupable) {
23825
+ break;
23826
+ }
23827
+ this.processArrayResponse([cmd.group], grid.currentState.group || [], (item) => item.field, (mergedArray) => grid.groupChange.next(mergedArray));
23828
+ break;
23829
+ case 'GridClearGroup':
23830
+ if (!isGroupable) {
23831
+ break;
23832
+ }
23833
+ grid.groupChange.next([]);
23834
+ break;
23835
+ case 'GridHighlight':
23836
+ if (!this.ctx.highlightDirective) {
23837
+ break;
23838
+ }
23839
+ this.processHighlightResponse([cmd.highlight], columns);
23840
+ break;
23841
+ case 'GridClearHighlight':
23842
+ if (!this.ctx.highlightDirective) {
23843
+ break;
23844
+ }
23845
+ this.ctx.highlightDirective['setState']([]);
23846
+ break;
23847
+ case 'GridSelect': {
23848
+ this.processSelectionResponse([cmd.select], columns, leafColumns, messages);
23849
+ break;
23850
+ }
23851
+ case 'GridClearSelect': {
23852
+ const selectionInstance = this.getSelectionInstance();
23853
+ if (!selectionInstance) {
23854
+ this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
23855
+ break;
23856
+ }
23857
+ this.applySelectionState(selectionInstance, []);
23858
+ break;
23859
+ }
23860
+ case 'GridColumnResize': {
23861
+ const col = findColumnById(cmd.id);
23862
+ if (!col) {
23863
+ break;
23864
+ }
23865
+ let newWidth;
23866
+ if (typeof cmd.size === 'number') {
23867
+ newWidth = cmd.size;
23868
+ }
23869
+ else if (typeof cmd.size === 'string') {
23870
+ const numericPart = parseFloat(cmd.size);
23871
+ if (!isNaN(numericPart)) {
23872
+ newWidth = numericPart;
23873
+ }
23874
+ }
23875
+ if (typeof newWidth === 'number') {
23876
+ const oldWidth = col.width;
23877
+ col.width = newWidth;
23878
+ const args = [{ column: col, oldWidth: oldWidth, newWidth: newWidth }];
23879
+ grid.columnResize.emit(args);
23880
+ }
23881
+ break;
23882
+ }
23883
+ case 'GridColumnReorder': {
23884
+ const col = findColumnById(cmd.id);
23885
+ if (!col) {
23886
+ break;
23887
+ }
23888
+ const newPosition = Number(cmd.position);
23889
+ if (!isNaN(newPosition) && newPosition >= 0) {
23890
+ this.changeColumnPosition(col, newPosition);
23891
+ }
23892
+ break;
23893
+ }
23894
+ case 'GridColumnShow':
23895
+ case 'GridColumnHide': {
23896
+ const col = findColumnById(cmd.id);
23897
+ if (!col) {
23898
+ break;
23899
+ }
23900
+ const targetHidden = cmd.type === 'GridColumnHide';
23901
+ const changed = updateColumnHierarchy(col, (current) => {
23902
+ if (current.hidden === targetHidden) {
23903
+ return false;
23904
+ }
23905
+ current.hidden = targetHidden;
23906
+ return true;
23907
+ });
23908
+ if (changed.length) {
23909
+ this.columnInfoService.changeVisibility(changed);
23910
+ }
23911
+ break;
23912
+ }
23913
+ case 'GridColumnLock':
23914
+ case 'GridColumnUnlock': {
23915
+ const col = findColumnById(cmd.id);
23916
+ if (!col) {
23917
+ break;
23918
+ }
23919
+ const targetLocked = cmd.type === 'GridColumnLock';
23920
+ const changed = updateColumnHierarchy(col, (current) => {
23921
+ if (current.locked === targetLocked) {
23922
+ return false;
23923
+ }
23924
+ current.locked = targetLocked;
23925
+ return true;
23926
+ });
23927
+ if (changed.length) {
23928
+ this.columnInfoService.changeLocked(changed);
23929
+ }
23930
+ break;
23931
+ }
23932
+ case 'GridPage': {
23933
+ this.processPageCommand(cmd);
23934
+ break;
23935
+ }
23936
+ case 'GridPageSize': {
23937
+ this.processPageSizeCommand(cmd);
23938
+ break;
23939
+ }
23940
+ case 'GridExportExcel': {
23941
+ this.runExportWithFileName(this.ctx.excelComponent, cmd.fileName, () => grid.saveAsExcel());
23942
+ break;
23943
+ }
23944
+ case 'GridExportPDF': {
23945
+ this.runExportWithFileName(this.ctx.pdfComponent, cmd.fileName, () => grid.emitPDFExportEvent());
23946
+ break;
23947
+ }
23948
+ default:
23949
+ break;
23950
+ }
23951
+ });
23952
+ }
23953
+ processArrayResponse(newItems, currentItems, getField, updateGrid) {
23954
+ if (newItems?.length === 0) {
23955
+ updateGrid([]);
23956
+ }
23957
+ else if (newItems?.length) {
23958
+ let mergedArray = [...newItems];
23959
+ const newFields = newItems.map(getField);
23960
+ const existingItemsToKeep = currentItems.filter(item => !newFields.includes(getField(item)));
23961
+ mergedArray = [...mergedArray, ...existingItemsToKeep];
23962
+ updateGrid(mergedArray);
23963
+ }
23964
+ }
23965
+ runExportWithFileName(component, fileName, action) {
23966
+ if (!component || !fileName) {
23967
+ action();
23968
+ return;
23969
+ }
23970
+ const previousFileName = component.fileName;
23971
+ component.fileName = fileName;
23972
+ action();
23973
+ const isExcel = component === this.ctx.excelComponent;
23974
+ if (isExcel) {
23975
+ this.zone.runOutsideAngular(() => {
23976
+ this.ctx.excelComponent.fileCreated.subscribe(() => {
23977
+ component.fileName = previousFileName;
23978
+ });
23979
+ });
23980
+ }
23981
+ else {
23982
+ component.fileName = previousFileName;
23983
+ }
23984
+ }
23985
+ processPageCommand(command) {
23986
+ const pageSize = this.getCurrentPageSizeValue();
23987
+ if (!isPresent$1(pageSize) || pageSize <= 0) {
23988
+ return;
23989
+ }
23990
+ const total = this.getTotalItemsCount();
23991
+ const requestedPage = Number(command.page);
23992
+ let targetPage = Number.isFinite(requestedPage) ? Math.floor(requestedPage) : 1;
23993
+ if (targetPage < 1) {
23994
+ targetPage = 1;
23995
+ }
23996
+ if (isPresent$1(total) && pageSize > 0) {
23997
+ const maxPage = Math.max(1, Math.ceil(total / pageSize));
23998
+ targetPage = Math.min(targetPage, maxPage);
23999
+ }
24000
+ const skip = (targetPage - 1) * pageSize;
24001
+ this.emitGridPageChange(skip, pageSize);
24002
+ }
24003
+ processPageSizeCommand(command) {
24004
+ const rawPageSize = Number(command.pageSize);
24005
+ if (!Number.isFinite(rawPageSize)) {
24006
+ return;
24007
+ }
24008
+ const newPageSize = Math.max(1, Math.floor(rawPageSize));
24009
+ const skip = Math.max(0, this.ctx.grid?.skip ?? 0);
24010
+ this.ensurePageSizeOption(newPageSize);
24011
+ this.emitGridPageChange(skip, newPageSize);
24012
+ }
24013
+ emitGridPageChange(skip, take) {
24014
+ const grid = this.ctx.grid;
24015
+ const normalizedSkip = Math.max(0, Math.floor(skip));
24016
+ const normalizedTake = Math.max(1, Math.floor(take));
24017
+ grid.skip = normalizedSkip;
24018
+ grid.pageSize = normalizedTake;
24019
+ grid.pageChange.emit({ skip: normalizedSkip, take: normalizedTake });
24020
+ }
24021
+ ensurePageSizeOption(pageSize) {
24022
+ const grid = this.ctx.grid;
24023
+ if (!grid) {
24024
+ return;
24025
+ }
24026
+ const pageable = grid.pageable;
24027
+ if (!pageable || typeof pageable === 'boolean') {
24028
+ return;
24029
+ }
24030
+ const pageSizes = pageable.pageSizes;
24031
+ if (!Array.isArray(pageSizes) || pageSizes.length === 0) {
24032
+ return;
24033
+ }
24034
+ if (pageSizes.includes(pageSize)) {
24035
+ return;
24036
+ }
24037
+ const uniqueSizes = [pageSize, ...pageSizes.filter(size => size !== pageSize)];
24038
+ grid.pageable = {
24039
+ ...pageable,
24040
+ pageSizes: uniqueSizes
24041
+ };
24042
+ const changeDetector = grid?.changeDetectorRef;
24043
+ if (changeDetector && typeof changeDetector.markForCheck === 'function') {
24044
+ changeDetector.markForCheck();
24045
+ }
24046
+ }
24047
+ getCurrentPageSizeValue() {
24048
+ const grid = this.ctx.grid;
24049
+ if (!grid) {
24050
+ return null;
24051
+ }
24052
+ const candidates = [grid.pageSize, grid.currentState?.take, this.ctx.dataBindingDirective?.['state']?.take];
24053
+ for (const candidate of candidates) {
24054
+ if (typeof candidate === 'number' && candidate > 0) {
24055
+ return candidate;
24056
+ }
24057
+ }
24058
+ const pageable = grid.pageable;
24059
+ if (pageable && typeof pageable === 'object' && Array.isArray(pageable.pageSizes)) {
24060
+ const numericSize = pageable.pageSizes.find(size => typeof size === 'number' && size > 0);
24061
+ if (numericSize) {
24062
+ return numericSize;
24063
+ }
24064
+ }
24065
+ const originalData = this.ctx.dataBindingDirective?.['originalData'];
24066
+ if (Array.isArray(originalData) && originalData.length > 0) {
24067
+ return originalData.length;
24068
+ }
24069
+ return null;
24070
+ }
24071
+ getTotalItemsCount() {
24072
+ const grid = this.ctx.grid;
24073
+ if (!grid) {
24074
+ return null;
24075
+ }
24076
+ const gridData = grid.data;
24077
+ if (gridData && typeof gridData.total === 'number') {
24078
+ return gridData.total;
24079
+ }
24080
+ const view = grid.view;
24081
+ if (view && typeof view.total === 'number') {
24082
+ return view.total;
24083
+ }
24084
+ const originalData = this.ctx.dataBindingDirective?.['originalData'];
24085
+ if (Array.isArray(originalData)) {
24086
+ return originalData.length;
24087
+ }
24088
+ return null;
24089
+ }
24090
+ getSelectionInstance() {
24091
+ const selectionDirective = this.ctx.grid?.selectionDirective;
24092
+ if (selectionDirective && typeof selectionDirective === 'object') {
24093
+ return selectionDirective;
24094
+ }
24095
+ const defaultSelection = this.ctx.grid?.defaultSelection;
24096
+ if (defaultSelection && typeof defaultSelection === 'object') {
24097
+ return defaultSelection;
24098
+ }
24099
+ return null;
24100
+ }
24101
+ updateLastMessage(messages, newMessage) {
24102
+ if (!messages.length) {
24103
+ return;
24104
+ }
24105
+ messages[messages.length - 1] = newMessage;
24106
+ }
24107
+ isColumnCommand(type) {
24108
+ return type === 'GridColumnResize' ||
24109
+ type === 'GridColumnReorder' ||
24110
+ type === 'GridColumnShow' ||
24111
+ type === 'GridColumnHide' ||
24112
+ type === 'GridColumnLock' ||
24113
+ type === 'GridColumnUnlock';
24114
+ }
24115
+ getColumnReplacement(column) {
24116
+ if (!column) {
24117
+ return '';
24118
+ }
24119
+ if (column.title && String(column.title).trim()) {
24120
+ return String(column.title).trim();
24121
+ }
24122
+ if (column.field && String(column.field).trim()) {
24123
+ return String(column.field).trim();
24124
+ }
24125
+ return '';
24126
+ }
24127
+ replaceQuotedColumnId(message, replacement) {
24128
+ if (!replacement) {
24129
+ const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")\s*/g;
24130
+ return message.replace(columnIdPattern, '').replace(/\s{2,}/g, ' ').trim();
24131
+ }
24132
+ const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")/g;
24133
+ return message.replace(columnIdPattern, (match) => {
24134
+ const isEncoded = match.startsWith('&quot;');
24135
+ return isEncoded ? `&quot;${replacement}&quot;` : `"${replacement}"`;
24136
+ });
24137
+ }
24138
+ getHighlightItems(descriptors, columns) {
24139
+ if (!descriptors?.length) {
24140
+ return [];
24141
+ }
24142
+ const data = this.ctx.dataBindingDirective?.['originalData'] || [];
24143
+ return highlightBy(data, descriptors, columns);
24144
+ }
24145
+ processSelectionResponse(selection, columns, leafColumns, messages) {
24146
+ const selectionInstance = this.getSelectionInstance();
24147
+ if (!selectionInstance) {
24148
+ this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
24149
+ return;
24150
+ }
24151
+ const descriptors = (selection || []).filter((descriptor) => Boolean(descriptor));
24152
+ if (descriptors.length === 0) {
24153
+ this.applySelectionState(selectionInstance, []);
24154
+ return;
24155
+ }
24156
+ const highlightItems = this.getHighlightItems(descriptors, columns);
24157
+ if (!highlightItems.length) {
24158
+ this.applySelectionState(selectionInstance, []);
24159
+ return;
24160
+ }
24161
+ const hasCellSelections = highlightItems.some(item => isPresent$1(item.columnKey));
24162
+ const hasRowSelections = highlightItems.some(item => !isPresent$1(item.columnKey));
24163
+ const isCellMode = selectionInstance.isCellSelectionMode;
24164
+ if ((!isCellMode && hasCellSelections) || (isCellMode && hasRowSelections)) {
24165
+ const key = isCellMode ? 'aiAssistantSelectionRowModeRequired' : 'aiAssistantSelectionCellModeRequired';
24166
+ this.updateLastMessage(messages, this.ctx.localization?.get(key));
24167
+ return;
24168
+ }
24169
+ const selectionState = this.mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode, leafColumns);
24170
+ this.applySelectionState(selectionInstance, selectionState);
24171
+ }
24172
+ mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode, leafColumns) {
24173
+ const data = this.ctx.dataBindingDirective?.['originalData'] || [];
24174
+ if (isCellMode) {
24175
+ const mapped = highlightItems
24176
+ .filter(item => isPresent$1(item.itemKey) && isPresent$1(item.columnKey))
24177
+ .map(item => {
24178
+ const rowIndex = item.itemKey;
24179
+ const columnIndex = item.columnKey;
24180
+ const dataItem = data[rowIndex];
24181
+ if (!isPresent$1(dataItem)) {
24182
+ return null;
24183
+ }
24184
+ if (typeof selectionInstance['getSelectionItem'] === 'function') {
24185
+ const columnComponent = leafColumns[columnIndex];
24186
+ const selectionItem = selectionInstance['getSelectionItem']({ dataItem, index: rowIndex }, columnComponent, columnIndex);
24187
+ if (selectionItem && isPresent$1(selectionItem.itemKey) && isPresent$1(selectionItem.columnKey)) {
24188
+ return selectionItem;
24189
+ }
24190
+ return null;
24191
+ }
24192
+ const itemKey = typeof selectionInstance.getItemKey === 'function'
24193
+ ? selectionInstance.getItemKey({ dataItem, index: rowIndex })
24194
+ : rowIndex;
24195
+ return isPresent$1(itemKey) ? { itemKey, columnKey: columnIndex } : null;
24196
+ })
24197
+ .filter((item) => isPresent$1(item));
24198
+ return mapped.filter((item, index, self) => self.findIndex(other => other.itemKey === item.itemKey && other.columnKey === item.columnKey) === index);
24199
+ }
24200
+ const rowKeys = highlightItems
24201
+ .filter(item => isPresent$1(item.itemKey))
24202
+ .map(item => {
24203
+ const rowIndex = item.itemKey;
24204
+ const dataItem = data[rowIndex];
24205
+ if (!isPresent$1(dataItem)) {
24206
+ return null;
24207
+ }
24208
+ if (typeof selectionInstance.getItemKey === 'function') {
24209
+ return selectionInstance.getItemKey({ dataItem, index: rowIndex });
24210
+ }
24211
+ return rowIndex;
24212
+ })
24213
+ .filter(isPresent$1);
24214
+ return Array.from(new Set(rowKeys));
24215
+ }
24216
+ applySelectionState(selectionInstance, selectionState) {
24217
+ selectionInstance.selectedKeys = selectionState;
24218
+ if (typeof selectionInstance['setState'] === 'function') {
24219
+ selectionInstance['setState'](selectionState);
24220
+ }
24221
+ const changeDetector = selectionInstance['cd'];
24222
+ if (changeDetector && typeof changeDetector.markForCheck === 'function') {
24223
+ changeDetector.markForCheck();
24224
+ }
24225
+ if (typeof selectionInstance['notifyChange'] === 'function') {
24226
+ selectionInstance['notifyChange']();
24227
+ }
24228
+ }
24229
+ processHighlightResponse(highlight, columns) {
24230
+ const highlightedItems = this.getHighlightItems(highlight, columns);
24231
+ this.ctx.highlightDirective['setState'](highlightedItems);
24232
+ }
24233
+ processFilterResponse(filter) {
24234
+ const processedFilter = convertDateStringsInFilter(filter);
24235
+ const clearFilter = Object.keys(processedFilter).length === 0;
24236
+ if (clearFilter) {
24237
+ this.ctx.grid.filterChange.next(undefined);
24238
+ }
24239
+ else if (processedFilter?.filters.length) {
24240
+ const currentFilter = this.ctx.grid.currentState.filter;
24241
+ let mergedFilter = processedFilter;
24242
+ if (currentFilter && currentFilter.filters?.length > 0) {
24243
+ mergedFilter = {
24244
+ logic: 'and',
24245
+ filters: [
24246
+ currentFilter,
24247
+ processedFilter
24248
+ ]
24249
+ };
24250
+ }
24251
+ this.ctx.grid.filterChange.next(mergedFilter);
24252
+ }
24253
+ }
24254
+ changeColumnPosition(column, newPosition) {
24255
+ const grid = this.ctx.grid;
24256
+ if (!grid?.columns) {
24257
+ return;
24258
+ }
24259
+ const currentColumns = grid.columns.toArray();
24260
+ const currentIndex = currentColumns.findIndex(col => col === column);
24261
+ if (currentIndex === -1) {
24262
+ return;
24263
+ }
24264
+ if (newPosition < 0 || newPosition >= currentColumns.length) {
24265
+ return;
24266
+ }
24267
+ const sortedColumns = currentColumns
24268
+ .map((col, idx) => ({ col, physicalIndex: idx, visualOrder: col.orderIndex ?? idx }))
24269
+ .sort((a, b) => a.visualOrder - b.visualOrder);
24270
+ const currentVisualPos = sortedColumns.findIndex(item => item.physicalIndex === currentIndex);
24271
+ if (currentVisualPos === newPosition) {
24272
+ return;
24273
+ }
24274
+ currentColumns.forEach((col, idx) => {
24275
+ const sortedIndex = sortedColumns.findIndex(item => item.physicalIndex === idx);
24276
+ if (idx === currentIndex) {
24277
+ col.orderIndex = newPosition;
24278
+ }
24279
+ else if (currentVisualPos < newPosition) {
24280
+ col.orderIndex = (sortedIndex > currentVisualPos && sortedIndex <= newPosition)
24281
+ ? sortedIndex - 1 : sortedIndex;
24282
+ }
24283
+ else {
24284
+ col.orderIndex = (sortedIndex >= newPosition && sortedIndex < currentVisualPos)
24285
+ ? sortedIndex + 1 : sortedIndex;
24286
+ }
24287
+ col.isReordered = true;
24288
+ });
24289
+ grid.columnReorder.emit({
24290
+ column: column,
24291
+ oldIndex: currentVisualPos,
24292
+ newIndex: newPosition
24293
+ });
24294
+ }
24295
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridAIRequestResponseService, deps: [{ token: ContextService }, { token: ColumnInfoService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
24296
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridAIRequestResponseService });
24297
+ }
24298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridAIRequestResponseService, decorators: [{
24299
+ type: Injectable
24300
+ }], ctorParameters: () => [{ type: ContextService }, { type: ColumnInfoService }, { type: i0.NgZone }] });
24301
+
24302
+ /**
24303
+ * @hidden
24304
+ */
24305
+ const normalizeSettings = ({ buttonCount = 10, info = true, type = 'numeric', pageSizes = false, previousNext = true, responsive = true, position = 'bottom' }) => ({
24306
+ buttonCount,
24307
+ info,
24308
+ pageSizes,
24309
+ previousNext,
24310
+ type,
24311
+ responsive,
24312
+ position
24313
+ });
24314
+ /**
24315
+ * @hidden
24316
+ */
24317
+ const normalize = (settings) => normalizeSettings(settings === true ? {} : settings);
24318
+
24319
+ const canCreateElement = () => isDocumentAvailable() && document.createElement;
24320
+ let cachedScrollbarWidth = null;
24321
+ let cachedPixelRatio;
24322
+ let cachedRtlScrollLeft = null;
24323
+ function scrollbarWidth() {
24324
+ if (cachedScrollbarWidth === null && canCreateElement()) {
24325
+ cachedPixelRatio = window.devicePixelRatio || 1;
24326
+ const div = document.createElement("div");
24327
+ div.style.cssText = "overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block";
24328
+ div.innerHTML = "&nbsp;";
24329
+ document.body.appendChild(div);
24330
+ cachedScrollbarWidth = div.offsetWidth - div.scrollWidth;
24331
+ document.body.removeChild(div);
24332
+ }
24333
+ return cachedScrollbarWidth;
24334
+ }
24335
+ function rtlScrollLeft() {
24336
+ if (cachedRtlScrollLeft === null && canCreateElement()) {
24337
+ const outer = document.createElement('div');
24338
+ outer.style.direction = 'rtl';
24339
+ outer.style.display = 'block';
24340
+ outer.style.clear = 'both';
24341
+ outer.style.width = '100px';
24342
+ outer.style.visibility = 'hidden';
24343
+ outer.style.position = 'absolute';
24344
+ outer.style.left = '-10000px';
24345
+ outer.style.overflow = 'scroll';
24346
+ outer.style.zoom = '1';
24347
+ const inner = document.createElement('div');
24348
+ inner.style.width = '200px';
24349
+ inner.style.height = '1px';
24350
+ outer.append(inner);
24351
+ document.body.appendChild(outer);
24352
+ const initial = outer.scrollLeft;
24353
+ outer.scrollLeft = -1;
24354
+ cachedRtlScrollLeft = outer.scrollLeft < 0 ? outer.scrollLeft : initial;
24355
+ document.body.removeChild(outer);
24356
+ }
24357
+ return cachedRtlScrollLeft;
24358
+ }
24359
+ /**
24360
+ * @hidden
24361
+ * move to kendo-common
24362
+ */
24363
+ class BrowserSupportService {
24364
+ zone;
24365
+ changeDetector;
24366
+ changes = new EventEmitter();
24367
+ subscriptions;
24368
+ constructor(zone, changeDetector) {
24369
+ this.zone = zone;
24370
+ this.changeDetector = changeDetector;
24371
+ if (typeof window === 'undefined') {
24372
+ return;
24373
+ }
24374
+ this.zone.runOutsideAngular(() => {
24375
+ this.subscriptions = fromEvent(window, 'resize').pipe(auditTime(100)).subscribe(() => {
24376
+ if (cachedPixelRatio !== window.devicePixelRatio) {
24377
+ zone.run(() => {
24378
+ cachedScrollbarWidth = null;
24379
+ this.changes.emit();
24380
+ this.changeDetector.markForCheck();
24381
+ });
24382
+ }
24383
+ });
24384
+ });
24385
+ }
24386
+ ngOnDestroy() {
24387
+ if (this.subscriptions) {
24388
+ this.subscriptions.unsubscribe();
24389
+ this.subscriptions = null;
24390
+ }
24391
+ }
24392
+ get scrollbarWidth() {
24393
+ return scrollbarWidth();
24394
+ }
24395
+ get rtlScrollLeft() {
24396
+ return rtlScrollLeft();
24397
+ }
24398
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
24399
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService });
24400
+ }
24401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService, decorators: [{
24402
+ type: Injectable
24403
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }] });
24404
+
24405
+ const isGroupItem = (source) => {
24406
+ return source.items !== undefined &&
24407
+ source.field !== undefined;
24408
+ };
24409
+ const flattenGroups = (groups) => (groups.reduce((acc, curr) => {
24410
+ if (isGroupItem(curr)) {
24411
+ return acc.concat(flattenGroups(curr.items));
24412
+ }
24413
+ return acc.concat([curr]);
24414
+ }, []));
24415
+ /**
24416
+ * @hidden
24417
+ */
24418
+ const itemAt = (data, index) => {
24419
+ const first = data[0];
24420
+ if (isPresent(first) && isGroupItem(first)) {
24421
+ return flattenGroups(data)[index];
24422
+ }
24423
+ return data[index];
24424
+ };
24425
+ /**
24426
+ * @hidden
24427
+ */
24428
+ const getIterator = (data, { footers, level, dataIndex, parentGroupIndex, groupIndex, parentGroup }) => {
24429
+ const first = data[0];
24430
+ if (isPresent(first) && isGroupItem(first)) {
24431
+ return new GroupIterator(data, footers, level, dataIndex, parentGroupIndex, groupIndex, parentGroup);
24432
+ }
24433
+ return new ItemIterator(data, dataIndex, parentGroupIndex, parentGroup);
24434
+ };
24435
+ class ArrayIterator {
24436
+ arr;
24437
+ idx;
24438
+ constructor(arr, idx = 0) {
24439
+ this.arr = arr;
24440
+ this.idx = idx;
24441
+ this.arr = arr || [];
24442
+ }
24443
+ [iterator]() {
24444
+ return this;
24445
+ }
24446
+ next() {
24447
+ return this.idx < this.arr.length ? {
24448
+ done: false,
24449
+ value: this.arr[this.idx++]
24450
+ } : { done: true, value: undefined };
24451
+ }
24452
+ }
24453
+ /**
24454
+ * @hidden
24455
+ */
24456
+ class Iterator {
24457
+ dataIndex;
24458
+ resultMap;
24459
+ _innerIterator;
24460
+ constructor(arr, dataIndex = 0, resultMap = (x) => x) {
24461
+ this.dataIndex = dataIndex;
24462
+ this.resultMap = resultMap;
24463
+ const iter = arr[iterator];
24464
+ this._innerIterator = iter ? arr[iterator]() : new ArrayIterator(arr);
24465
+ }
24466
+ [iterator]() {
24467
+ return this;
24468
+ }
24469
+ next() {
24470
+ return this.resultMap(this._innerIterator.next(), this.dataIndex++);
24471
+ }
24472
+ }
24473
+ /**
24474
+ * @hidden
24475
+ */
24476
+ class ItemIterator extends Iterator {
24477
+ constructor(arr, dataIndex, groupIndex, group) {
24478
+ super(arr, dataIndex, (x, idx) => ({
24479
+ done: x.done,
24480
+ value: {
24481
+ data: x.value,
24482
+ groupIndex: groupIndex,
24483
+ index: idx,
24484
+ type: 'data',
24485
+ group
24486
+ }
24487
+ }));
24488
+ }
24489
+ /**
24490
+ * The index of the next record.
24491
+ * @readonly
24492
+ * @type {number}
24493
+ */
24494
+ get index() {
24495
+ return this.dataIndex;
24496
+ }
24497
+ }
24498
+ const prefix = (s, n) => {
24499
+ const p = s ? s + "_" : s;
24500
+ return `${p}${n}`;
24501
+ };
24502
+ /**
24503
+ * @hidden
24504
+ */
24505
+ class GroupIterator {
24506
+ arr;
24507
+ outputFooters;
24508
+ level;
24509
+ dataIndex;
24510
+ parentIndex;
24511
+ groupIndex;
24512
+ parentGroup;
24513
+ current;
24514
+ _innerIterator;
24515
+ _iterator;
24516
+ currentGroupIndex = "";
24517
+ constructor(arr, outputFooters = false, level = 0, dataIndex = 0, parentIndex = '', groupIndex = 0, parentGroup = undefined) {
24518
+ this.arr = arr;
24519
+ this.outputFooters = outputFooters;
24520
+ this.level = level;
24521
+ this.dataIndex = dataIndex;
24522
+ this.parentIndex = parentIndex;
24523
+ this.groupIndex = groupIndex;
24524
+ this.parentGroup = parentGroup;
24525
+ this.arr = arr || [];
24526
+ this._iterator = new Iterator(this.arr, this.dataIndex);
24527
+ }
24528
+ [iterator]() {
24529
+ return this;
24530
+ }
24531
+ nextGroupItem() {
24532
+ this.current = this._iterator.next().value;
24533
+ this._innerIterator = null;
24534
+ if (this.current) {
24535
+ this.currentGroupIndex = prefix(this.parentIndex, this.groupIndex++);
24536
+ return {
24537
+ done: false,
24538
+ value: {
24539
+ data: this.current,
24540
+ index: this.currentGroupIndex,
24541
+ level: this.level,
24542
+ type: 'group',
24543
+ parentGroup: this.parentGroup
24544
+ }
24545
+ };
24546
+ }
24547
+ else {
24548
+ this.current = null;
24549
+ return { done: true, value: undefined };
24550
+ }
24551
+ }
24552
+ footerItem() {
24553
+ if (this.current) {
24554
+ const group = this.current;
24555
+ this.current = null;
24556
+ return {
24557
+ done: false,
24558
+ value: {
24559
+ data: group,
24560
+ groupIndex: this.currentGroupIndex,
24561
+ level: this.level,
24562
+ type: 'footer',
24563
+ group: {
24564
+ data: group,
24565
+ index: this.currentGroupIndex,
24566
+ level: this.level,
24567
+ type: 'group',
24568
+ parentGroup: this.parentGroup
24569
+ }
24570
+ }
24571
+ };
24572
+ }
24573
+ else {
24574
+ this.current = null;
24575
+ return { done: true, value: undefined };
24576
+ }
24577
+ }
24578
+ innerIterator(group) {
24579
+ if (!this._innerIterator) {
24580
+ this._innerIterator = getIterator(group.items, {
24581
+ dataIndex: this.dataIndex,
24582
+ footers: this.outputFooters,
24583
+ level: this.level + 1,
24584
+ parentGroupIndex: this.currentGroupIndex,
24585
+ parentGroup: {
24586
+ data: this.current,
24587
+ index: this.currentGroupIndex,
24588
+ level: this.level,
24589
+ type: 'group',
24590
+ parentGroup: this.parentGroup
24591
+ }
24592
+ });
24593
+ }
24594
+ return this._innerIterator;
24595
+ }
24596
+ nextDataItem(group) {
24597
+ const iterator = this.innerIterator(group);
24598
+ const result = iterator.next();
24599
+ if (isPresent(result.value) && !result.done && result.value.type === "data") {
24600
+ this.dataIndex = result.value.index + 1;
24601
+ }
24602
+ return !result.done ? result : undefined;
24603
+ }
24604
+ next() {
24605
+ if (!isPresent(this.current)) {
24606
+ return this.nextGroupItem();
24607
+ }
24608
+ const item = this.nextDataItem(this.current);
24609
+ return item ? item : (this.outputFooters ? this.footerItem() : this.nextGroupItem());
24610
+ }
24611
+ /**
24612
+ * The index of the last iterated data record.
24613
+ * @readonly
24614
+ * @type {number}
24615
+ */
24616
+ get index() {
24617
+ return this.dataIndex + 1;
24618
+ }
24619
+ }
24620
+
24621
+ /**
24622
+ * @hidden
24623
+ */
24624
+ class DataResultIterator {
24625
+ source;
24626
+ skip;
24627
+ groupFooters;
24628
+ isObject;
24629
+ constructor(source, skip = 0, groupFooters = false) {
24630
+ this.source = source;
24631
+ this.skip = skip;
24632
+ this.groupFooters = groupFooters;
24633
+ this.source = this.source ? this.source : [];
24634
+ this.isObject = this.isGridDataResult(this.source);
24635
+ }
24636
+ isGridDataResult(source) {
24637
+ return source.total !== undefined && source.data !== undefined;
24638
+ }
24639
+ get total() {
24640
+ return this.isObject ? this.source.total : this.source.length;
24641
+ }
24642
+ get data() {
24643
+ return this.isObject ? this.source.data : this.source;
24644
+ }
24645
+ map(fn) {
24646
+ return this.data.map(fn);
24647
+ }
24648
+ filter(fn) {
24649
+ return this.data.filter(fn);
24650
+ }
24651
+ reduce(fn, init) {
24652
+ return this.data.reduce(fn, init);
24653
+ }
24654
+ forEach(fn) {
24655
+ this.data.forEach(fn);
24656
+ }
24657
+ some(fn) {
24658
+ return this.data.some(fn);
24659
+ }
24660
+ [iterator]() {
24661
+ return getIterator(this.data, {
24662
+ dataIndex: this.skip,
24663
+ footers: this.groupFooters,
24664
+ groupIndex: this.skip
24665
+ });
24666
+ }
24667
+ toString() { return this.data.toString(); }
24668
+ }
24669
+ /**
24670
+ * @hidden
24671
+ */
24672
+ class DataCollection {
24673
+ accessor;
24674
+ constructor(accessor) {
24675
+ this.accessor = accessor;
24676
+ }
24677
+ get total() { return this.accessor().total; }
24678
+ get length() { return this.accessor().data.length; }
24679
+ get first() { return this.accessor().data[0]; }
24680
+ get last() { return this.accessor().data[this.length - 1]; }
24681
+ at(index) {
24682
+ return itemAt(this.accessor().data, index);
24683
+ }
24684
+ map(fn) { return this.accessor().map(fn); }
24685
+ filter(fn) {
24686
+ return this.accessor().filter(fn);
24687
+ }
24688
+ reduce(fn, init) {
24689
+ return this.accessor().reduce(fn, init);
24690
+ }
24691
+ forEach(fn) {
24692
+ this.accessor().forEach(fn);
24693
+ }
24694
+ some(fn) {
24695
+ return this.accessor().some(fn);
24696
+ }
24697
+ [iterator]() {
24698
+ return this.accessor()[iterator]();
24699
+ }
24700
+ toString() { return this.accessor().toString(); }
24701
+ }
24702
+
24703
+ /**
24704
+ * @hidden
24705
+ *
24706
+ * Quick look-up structure for combinations of keys or single keys.
24707
+ * Similar to the native JS Set, however, working with single keys or a couple of keys.
24708
+ * Supports both primitive keys and object keys (compared by reference).
24709
+ */
24710
+ class PairSet {
24711
+ /**
24712
+ * Symbol used internally to represent "no Y key" when storing single X keys.
24713
+ */
24714
+ static SINGLE_KEY_SYMBOL = Symbol('SINGLE_KEY');
24715
+ /**
24716
+ * Gets the total number of key entries (both single keys and key pairs).
24717
+ */
24718
+ get size() {
24719
+ return this.totalKeysCount;
24720
+ }
24721
+ /**
24722
+ * Holds a set of Y keys for each defined X key.
24723
+ * Each X key creates a map which holds a set of Y keys.
24724
+ * For single keys, the Y value is the SINGLE_KEY_SYMBOL.
24725
+ *
24726
+ * Map { 'foo' => Set { Symbol(SINGLE_KEY) } } // single key: {x: 'foo'}
24727
+ * Map { 'foo2' => Set { 'bar', 'baz' } } // pairs: {x: 'foo2', y: 'bar'}, {x: 'foo2', y: 'baz'}
24728
+ */
24729
+ keysX = new Map();
24730
+ /**
24731
+ * Count each added or deleted key manually to avoid iterating over all items when calling `this.size`.
24732
+ */
24733
+ totalKeysCount = 0;
24734
+ constructor(items, keyXField, keyYField) {
24735
+ if (items && keyXField) {
24736
+ items.forEach(item => {
24737
+ if (keyYField && item[keyYField] !== undefined) {
24738
+ this.add(item[keyXField], item[keyYField]);
24739
+ }
24740
+ else {
24741
+ this.addSingle(item[keyXField]);
24742
+ }
24743
+ });
24744
+ }
24745
+ }
24746
+ /**
24747
+ * Adds a single key entry.
24748
+ */
24749
+ addSingle(keyX) {
24750
+ if (!this.keysX.has(keyX)) {
24751
+ this.keysX.set(keyX, new Set());
24752
+ }
24753
+ if (!this.hasSingle(keyX)) {
24754
+ this.keysX.get(keyX).add(PairSet.SINGLE_KEY_SYMBOL);
24755
+ this.totalKeysCount += 1;
24756
+ }
24757
+ }
24758
+ /**
24759
+ * Adds a couple of items identified as a combination.
24760
+ */
24761
+ add(keyX, keyY) {
24762
+ if (!this.keysX.has(keyX)) {
24763
+ this.keysX.set(keyX, new Set());
24764
+ }
24046
24765
  if (!this.has(keyX, keyY)) {
24047
24766
  this.keysX.get(keyX).add(keyY);
24048
24767
  this.totalKeysCount += 1;
@@ -25477,6 +26196,7 @@ class ScrollerService {
25477
26196
  total = 0;
25478
26197
  rowHeightService;
25479
26198
  table = null;
26199
+ lockedTable = null;
25480
26200
  tableBody = null;
25481
26201
  container = null;
25482
26202
  scrollHeightContainer = null;
@@ -25487,12 +26207,12 @@ class ScrollerService {
25487
26207
  firstToLoad = 0;
25488
26208
  lastLoaded = 0;
25489
26209
  scrollSyncing = false;
25490
- take;
25491
26210
  scrollSubscription;
25492
26211
  subscription;
25493
26212
  lastScrollTop = 0;
25494
26213
  firstLoaded = 0;
25495
26214
  expandedRows = {};
26215
+ take;
25496
26216
  constructor(scrollObservable, ctx) {
25497
26217
  this.scrollObservable = scrollObservable;
25498
26218
  this.ctx = ctx;
@@ -25606,6 +26326,9 @@ class ScrollerService {
25606
26326
  if (this.scrollableVirtual && this.table) {
25607
26327
  if (forceSet) {
25608
26328
  this.table.style.transform = 'translateY(' + dY + 'px)';
26329
+ if (this.lockedTable) {
26330
+ this.lockedTable.style.transform = 'translateY(' + dY + 'px)';
26331
+ }
25609
26332
  }
25610
26333
  else {
25611
26334
  this.tableTransformOffset = dY;
@@ -26185,6 +26908,12 @@ class ListComponent {
26185
26908
  this.container.nativeElement.scrollTop = (this.isVirtual && this.ctx.grid?.pageable) ? 0 : this.rowHeightService.offset(this.skip);
26186
26909
  }
26187
26910
  if (anyChanged(['total', 'take'], changes)) {
26911
+ // For virtual scrolling without paging, preserve scroll position when only take/pageSize changes
26912
+ const isVirtualOnly = this.isVirtual && !this.ctx.grid?.pageable;
26913
+ const onlyTakeChanged = isChanged$1('take', changes) && !isChanged$1('total', changes);
26914
+ if (isVirtualOnly && onlyTakeChanged) {
26915
+ this.skipScroll = true;
26916
+ }
26188
26917
  this.init();
26189
26918
  }
26190
26919
  this.rebind = false;
@@ -26339,6 +27068,9 @@ class ListComponent {
26339
27068
  this.rowHeightService = this.scroller.rowHeightService = new RowHeightService(total, this.rowHeight || this.minRowHeight);
26340
27069
  if (!isUniversal()) {
26341
27070
  if (this.skipScroll) {
27071
+ // Update scroller's take value when preserving scroll position
27072
+ this.scroller.take = this.take;
27073
+ this.scroller.total = this.total;
26342
27074
  this.setScrollerOptions();
26343
27075
  this.scroller.update();
26344
27076
  }
@@ -26709,6 +27441,7 @@ class ListComponent {
26709
27441
  setScrollerOptions() {
26710
27442
  this.scroller.scrollableVirtual = this.isVirtual;
26711
27443
  this.scroller.table = this.table.nativeElement;
27444
+ this.scroller.lockedTable = this.lockedTable?.nativeElement || null;
26712
27445
  this.scroller.tableBody = this.table.nativeElement.tBodies[0];
26713
27446
  this.scroller.container = this.container.nativeElement;
26714
27447
  this.scroller.scrollHeightContainer = this.container.nativeElement.querySelector('.k-height-container');
@@ -30728,6 +31461,8 @@ class GridComponent {
30728
31461
  adaptiveGridService;
30729
31462
  rowReorderService;
30730
31463
  dataMappingService;
31464
+ aiRequestResponseService;
31465
+ idService;
30731
31466
  /**
30732
31467
  * Sets the data of the Grid. If you provide an array, the Grid gets the total count automatically.
30733
31468
  * ([more information and example]({% slug binding_grid %})).
@@ -31685,7 +32420,7 @@ class GridComponent {
31685
32420
  rowReorderSubscription;
31686
32421
  rtl = false;
31687
32422
  _rowSticky;
31688
- constructor(supportService, selectionService, cellSelectionService, wrapper, groupInfoService, groupsService, changeNotification, detailsService, editService, filterService, pdfService, responsiveService, renderer, excelService, ngZone, scrollSyncService, domEvents, columnResizingService, changeDetectorRef, columnReorderService, columnInfoService, navigationService, sortService, scrollRequestService, localization, ctx, sizingService, adaptiveGridService, rowReorderService, dataMappingService) {
32423
+ constructor(supportService, selectionService, cellSelectionService, wrapper, groupInfoService, groupsService, changeNotification, detailsService, editService, filterService, pdfService, responsiveService, renderer, excelService, ngZone, scrollSyncService, domEvents, columnResizingService, changeDetectorRef, columnReorderService, columnInfoService, navigationService, sortService, scrollRequestService, localization, ctx, sizingService, adaptiveGridService, rowReorderService, dataMappingService, aiRequestResponseService, idService) {
31689
32424
  this.supportService = supportService;
31690
32425
  this.selectionService = selectionService;
31691
32426
  this.cellSelectionService = cellSelectionService;
@@ -31716,6 +32451,8 @@ class GridComponent {
31716
32451
  this.adaptiveGridService = adaptiveGridService;
31717
32452
  this.rowReorderService = rowReorderService;
31718
32453
  this.dataMappingService = dataMappingService;
32454
+ this.aiRequestResponseService = aiRequestResponseService;
32455
+ this.idService = idService;
31719
32456
  const isValid = validatePackage(packageMetadata);
31720
32457
  this.licenseMessage = getLicenseMessage(packageMetadata);
31721
32458
  this.showLicenseWatermark = shouldShowValidationUI(isValid);
@@ -31812,6 +32549,48 @@ class GridComponent {
31812
32549
  resetGroupsState() {
31813
32550
  this.groupsService.reset();
31814
32551
  }
32552
+ /**
32553
+ * Builds the request body for the AI service based on the provided prompt message.
32554
+ * Allows developers to construct their own AI service requests.
32555
+ *
32556
+ * @param promptMessage - The prompt message to send to the AI service.
32557
+ * @returns The request body object ready to be sent to the AI service.
32558
+ *
32559
+ * @example
32560
+ * ```ts
32561
+ * const requestBody = this.grid.getAIRequest('Sort by Product Name ascending');
32562
+ *
32563
+ * // Send to your AI service
32564
+ * this.http.post('https://your-ai-service.com/api', requestBody).subscribe(response => {
32565
+ * this.grid.handleAIResponse(response);
32566
+ * });
32567
+ * ```
32568
+ */
32569
+ getAIRequest(promptMessage) {
32570
+ return this.aiRequestResponseService.buildRequestBody(promptMessage);
32571
+ }
32572
+ /**
32573
+ * Processes an AI service response and applies the commands to the Grid.
32574
+ * Allows developers to handle their own AI service responses manually.
32575
+ *
32576
+ * @param response - The AI service response containing optional message and commands array.
32577
+ *
32578
+ * @example
32579
+ * ```ts
32580
+ * const response = {
32581
+ * message: 'Applying sorting',
32582
+ * commands: [
32583
+ * { type: 'GridSort', sort: { field: 'ProductName', dir: 'asc' }, message: 'Sorted by Product Name' }
32584
+ * ]
32585
+ * };
32586
+ * this.grid.handleAIResponse(response);
32587
+ * ```
32588
+ */
32589
+ handleAIResponse(response) {
32590
+ const columns = this.columnInfoService.leafNamedColumns?.map((col) => ({ field: col.field })) || [];
32591
+ const leafColumns = this.columnInfoService.leafNamedColumns || [];
32592
+ this.aiRequestResponseService.processCommands(response.commands || [], columns, leafColumns);
32593
+ }
31815
32594
  /**
31816
32595
  * @hidden
31817
32596
  */
@@ -32585,7 +33364,7 @@ class GridComponent {
32585
33364
  autoGenerateColumns() {
32586
33365
  if (this.shouldGenerateColumns && !this.columns.length && this.view.length) {
32587
33366
  this.columns.reset(Object.keys(this.view.at(0)).map(field => {
32588
- const column = new ColumnComponent();
33367
+ const column = new ColumnComponent(undefined, this.idService);
32589
33368
  column.field = field;
32590
33369
  return column;
32591
33370
  }));
@@ -32976,7 +33755,7 @@ class GridComponent {
32976
33755
  this.dragTargetContainer?.notify();
32977
33756
  this.dropTargetContainer?.notify();
32978
33757
  }
32979
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridComponent, deps: [{ token: BrowserSupportService }, { token: SelectionService }, { token: CellSelectionService }, { token: i0.ElementRef }, { token: GroupInfoService }, { token: GroupsService }, { token: ChangeNotificationService }, { token: DetailsService }, { token: EditService }, { token: FilterService }, { token: PDFService }, { token: ResponsiveService }, { token: i0.Renderer2 }, { token: ExcelService }, { token: i0.NgZone }, { token: ScrollSyncService }, { token: DomEventsService }, { token: ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: ColumnReorderService }, { token: ColumnInfoService }, { token: NavigationService }, { token: SortService }, { token: ScrollRequestService }, { token: i1$2.LocalizationService }, { token: ContextService }, { token: SizingOptionsService }, { token: AdaptiveGridService }, { token: RowReorderService }, { token: DataMappingService }], target: i0.ɵɵFactoryTarget.Component });
33758
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridComponent, deps: [{ token: BrowserSupportService }, { token: SelectionService }, { token: CellSelectionService }, { token: i0.ElementRef }, { token: GroupInfoService }, { token: GroupsService }, { token: ChangeNotificationService }, { token: DetailsService }, { token: EditService }, { token: FilterService }, { token: PDFService }, { token: ResponsiveService }, { token: i0.Renderer2 }, { token: ExcelService }, { token: i0.NgZone }, { token: ScrollSyncService }, { token: DomEventsService }, { token: ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: ColumnReorderService }, { token: ColumnInfoService }, { token: NavigationService }, { token: SortService }, { token: ScrollRequestService }, { token: i1$2.LocalizationService }, { token: ContextService }, { token: SizingOptionsService }, { token: AdaptiveGridService }, { token: RowReorderService }, { token: DataMappingService }, { token: GridAIRequestResponseService }, { token: IdService }], target: i0.ɵɵFactoryTarget.Component });
32980
33759
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: GridComponent, isStandalone: true, selector: "kendo-grid", inputs: { data: "data", pageSize: "pageSize", height: "height", rowHeight: "rowHeight", adaptiveMode: "adaptiveMode", detailRowHeight: "detailRowHeight", skip: "skip", scrollable: "scrollable", selectable: "selectable", sort: "sort", size: "size", trackBy: "trackBy", filter: "filter", group: "group", virtualColumns: "virtualColumns", filterable: "filterable", sortable: "sortable", pageable: "pageable", groupable: "groupable", gridResizable: "gridResizable", rowReorderable: "rowReorderable", navigable: "navigable", autoSize: "autoSize", rowClass: "rowClass", rowSticky: "rowSticky", rowSelected: "rowSelected", isRowSelectable: "isRowSelectable", cellSelected: "cellSelected", resizable: "resizable", reorderable: "reorderable", loading: "loading", columnMenu: "columnMenu", hideHeader: "hideHeader", showInactiveTools: "showInactiveTools", isDetailExpanded: "isDetailExpanded", isGroupExpanded: "isGroupExpanded", dataLayoutMode: "dataLayoutMode" }, outputs: { filterChange: "filterChange", pageChange: "pageChange", groupChange: "groupChange", sortChange: "sortChange", selectionChange: "selectionChange", rowReorder: "rowReorder", dataStateChange: "dataStateChange", gridStateChange: "gridStateChange", groupExpand: "groupExpand", groupCollapse: "groupCollapse", detailExpand: "detailExpand", detailCollapse: "detailCollapse", edit: "edit", cancel: "cancel", save: "save", remove: "remove", add: "add", cellClose: "cellClose", cellClick: "cellClick", pdfExport: "pdfExport", excelExport: "excelExport", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", columnStickyChange: "columnStickyChange", scrollBottom: "scrollBottom", contentScroll: "contentScroll" }, host: { properties: { "attr.dir": "this.dir", "class.k-grid": "this.hostClass", "class.k-grid-sm": "this.sizeSmallClass", "class.k-grid-md": "this.sizeMediumClass", "class.k-grid-stack": "this.stackedClass", "class.k-grid-lockedcolumns": "this.lockedClasses", "class.k-grid-virtual": "this.virtualClasses", "class.k-grid-no-scrollbar": "this.noScrollbarClass", "class.k-grid-resizable": "this.isResizable", "style.minWidth": "this.minWidth", "style.maxWidth": "this.maxWidth", "style.minHeight": "this.minHeight", "style.maxHeight": "this.maxHeight" } }, providers: [
32981
33760
  BrowserSupportService,
32982
33761
  LocalizationService,
@@ -33023,6 +33802,7 @@ class GridComponent {
33023
33802
  SizingOptionsService,
33024
33803
  RowReorderService,
33025
33804
  ClipboardService,
33805
+ GridAIRequestResponseService,
33026
33806
  RowspanService,
33027
33807
  AdaptiveGridService,
33028
33808
  ColumnMenuService,
@@ -33032,394 +33812,394 @@ class GridComponent {
33032
33812
  <ng-container kendoGridLocalizedMessages
33033
33813
  i18n-groupPanelEmpty="kendo.grid.groupPanelEmpty|The label visible in the Grid group panel when it is empty"
33034
33814
  groupPanelEmpty="Drag a column header and drop it here to group by that column"
33035
-
33815
+
33036
33816
  i18n-noRecords="kendo.grid.noRecords|The label visible in the Grid when there are no records"
33037
33817
  noRecords="No records available."
33038
-
33818
+
33039
33819
  i18n-pagerLabel="kendo.grid.pagerLabel|The label for the Grid pager"
33040
33820
  pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
33041
-
33821
+
33042
33822
  i18n-pagerFirstPage="kendo.grid.pagerFirstPage|The label for the first page button in Grid pager"
33043
33823
  pagerFirstPage="Go to the first page"
33044
-
33824
+
33045
33825
  i18n-pagerPreviousPage="kendo.grid.pagerPreviousPage|The label for the previous page button in Grid pager"
33046
33826
  pagerPreviousPage="Go to the previous page"
33047
-
33827
+
33048
33828
  i18n-pagerNextPage="kendo.grid.pagerNextPage|The label for the next page button in Grid pager"
33049
33829
  pagerNextPage="Go to the next page"
33050
-
33830
+
33051
33831
  i18n-pagerLastPage="kendo.grid.pagerLastPage|The label for the last page button in Grid pager"
33052
33832
  pagerLastPage="Go to the last page"
33053
-
33833
+
33054
33834
  i18n-pagerPage="kendo.grid.pagerPage|The label before the current page number in the Grid pager"
33055
33835
  pagerPage="Page"
33056
-
33836
+
33057
33837
  i18n-pagerOf="kendo.grid.pagerOf|The label before the total pages number in the Grid pager"
33058
33838
  pagerOf="of"
33059
-
33839
+
33060
33840
  i18n-pagerItems="kendo.grid.pagerItems|The label after the total pages number in the Grid pager"
33061
33841
  pagerItems="items"
33062
-
33842
+
33063
33843
  i18n-pagerPageNumberInputTitle="kendo.grid.pagerPageNumberInputTitle|The label for the pager input in the Grid pager"
33064
33844
  pagerPageNumberInputTitle="Page Number"
33065
-
33845
+
33066
33846
  i18n-pagerItemsPerPage="kendo.grid.pagerItemsPerPage|The label for the page size chooser in the Grid pager"
33067
33847
  pagerItemsPerPage="items per page"
33068
-
33848
+
33069
33849
  i18n-pagerInputLabel="kendo.grid.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number"
33070
33850
  pagerInputLabel="Type a page number"
33071
-
33851
+
33072
33852
  i18n-filter="kendo.grid.filter|The label of the filter cell or icon"
33073
33853
  filter="Filter"
33074
-
33854
+
33075
33855
  i18n-filterInputLabel="kendo.grid.filterInputLabel|The label of the filter row and menu inputs"
33076
33856
  filterInputLabel="{{ '{columnName} Filter' }}"
33077
-
33857
+
33078
33858
  i18n-filterMenuTitle="kendo.grid.filterMenuTitle|The title of the filter menu icon"
33079
33859
  filterMenuTitle="{{ '{columnName} Filter Menu' }}"
33080
-
33860
+
33081
33861
  i18n-filterMenuOperatorsDropDownLabel="kendo.grid.filterMenuOperatorsDropDownLabel|The label of the filter menu operators dropdown"
33082
33862
  filterMenuOperatorsDropDownLabel="{{ '{columnName} Filter Operators' }}"
33083
-
33863
+
33084
33864
  i18n-filterCellOperatorLabel="kendo.grid.filterCellOperatorLabel|The label of the filter cell operators dropdown"
33085
33865
  filterCellOperatorLabel="{{ 'Filter cell operators for {columnName}' }}"
33086
-
33866
+
33087
33867
  i18n-booleanFilterCellLabel="kendo.grid.booleanFilterCellLabel|The label of the boolean filter cell dropdown"
33088
33868
  booleanFilterCellLabel="{{ 'Boolean filter cell for {columnName}' }}"
33089
-
33869
+
33090
33870
  i18n-filterMenuLogicDropDownLabel="kendo.grid.filterMenuLogicDropDownLabel|The label of the filter menu logic dropdown"
33091
33871
  filterMenuLogicDropDownLabel="{{ '{columnName} Filter Logic' }}"
33092
-
33872
+
33093
33873
  i18n-filterEqOperator="kendo.grid.filterEqOperator|The text of the equal filter operator"
33094
33874
  filterEqOperator="Is equal to"
33095
-
33875
+
33096
33876
  i18n-filterNotEqOperator="kendo.grid.filterNotEqOperator|The text of the not equal filter operator"
33097
33877
  filterNotEqOperator="Is not equal to"
33098
-
33878
+
33099
33879
  i18n-filterIsNullOperator="kendo.grid.filterIsNullOperator|The text of the is null filter operator"
33100
33880
  filterIsNullOperator="Is null"
33101
-
33881
+
33102
33882
  i18n-filterIsNotNullOperator="kendo.grid.filterIsNotNullOperator|The text of the is not null filter operator"
33103
33883
  filterIsNotNullOperator="Is not null"
33104
-
33884
+
33105
33885
  i18n-filterIsEmptyOperator="kendo.grid.filterIsEmptyOperator|The text of the is empty filter operator"
33106
33886
  filterIsEmptyOperator="Is empty"
33107
-
33887
+
33108
33888
  i18n-filterIsNotEmptyOperator="kendo.grid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
33109
33889
  filterIsNotEmptyOperator="Is not empty"
33110
-
33890
+
33111
33891
  i18n-filterStartsWithOperator="kendo.grid.filterStartsWithOperator|The text of the starts with filter operator"
33112
33892
  filterStartsWithOperator="Starts with"
33113
-
33893
+
33114
33894
  i18n-filterContainsOperator="kendo.grid.filterContainsOperator|The text of the contains filter operator"
33115
33895
  filterContainsOperator="Contains"
33116
-
33896
+
33117
33897
  i18n-filterNotContainsOperator="kendo.grid.filterNotContainsOperator|The text of the does not contain filter operator"
33118
33898
  filterNotContainsOperator="Does not contain"
33119
-
33899
+
33120
33900
  i18n-filterEndsWithOperator="kendo.grid.filterEndsWithOperator|The text of the ends with filter operator"
33121
33901
  filterEndsWithOperator="Ends with"
33122
-
33902
+
33123
33903
  i18n-filterGteOperator="kendo.grid.filterGteOperator|The text of the greater than or equal filter operator"
33124
33904
  filterGteOperator="Is greater than or equal to"
33125
-
33905
+
33126
33906
  i18n-filterGtOperator="kendo.grid.filterGtOperator|The text of the greater than filter operator"
33127
33907
  filterGtOperator="Is greater than"
33128
-
33908
+
33129
33909
  i18n-filterLteOperator="kendo.grid.filterLteOperator|The text of the less than or equal filter operator"
33130
33910
  filterLteOperator="Is less than or equal to"
33131
-
33911
+
33132
33912
  i18n-filterLtOperator="kendo.grid.filterLtOperator|The text of the less than filter operator"
33133
33913
  filterLtOperator="Is less than"
33134
-
33914
+
33135
33915
  i18n-filterIsTrue="kendo.grid.filterIsTrue|The text of the IsTrue boolean filter option"
33136
33916
  filterIsTrue="Is True"
33137
-
33917
+
33138
33918
  i18n-filterIsFalse="kendo.grid.filterIsFalse|The text of the IsFalse boolean filter option"
33139
33919
  filterIsFalse="Is False"
33140
-
33920
+
33141
33921
  i18n-filterBooleanAll="kendo.grid.filterBooleanAll|The text of the (All) boolean filter option"
33142
33922
  filterBooleanAll="(All)"
33143
-
33923
+
33144
33924
  i18n-filterAfterOrEqualOperator="kendo.grid.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
33145
33925
  filterAfterOrEqualOperator="Is after or equal to"
33146
-
33926
+
33147
33927
  i18n-filterAfterOperator="kendo.grid.filterAfterOperator|The text of the after date filter operator"
33148
33928
  filterAfterOperator="Is after"
33149
-
33929
+
33150
33930
  i18n-filterBeforeOperator="kendo.grid.filterBeforeOperator|The text of the before date filter operator"
33151
33931
  filterBeforeOperator="Is before"
33152
-
33932
+
33153
33933
  i18n-filterBeforeOrEqualOperator="kendo.grid.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
33154
33934
  filterBeforeOrEqualOperator="Is before or equal to"
33155
-
33935
+
33156
33936
  i18n-filterFilterButton="kendo.grid.filterFilterButton|The text of the filter button"
33157
33937
  filterFilterButton="Filter"
33158
-
33938
+
33159
33939
  i18n-filterClearButton="kendo.grid.filterClearButton|The text of the clear filter button"
33160
33940
  filterClearButton="Clear"
33161
-
33941
+
33162
33942
  i18n-sortClearButton="kendo.grid.sortClearButton|The text of the clear sort button located in the Sort Toolbar Tool and adaptive Sort Toolbar Tool"
33163
33943
  sortClearButton="Clear sorting"
33164
-
33944
+
33165
33945
  i18n-adaptiveCloseButtonTitle="kendo.grid.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
33166
33946
  adaptiveCloseButtonTitle="Close"
33167
-
33947
+
33168
33948
  i18n-adaptiveBackButtonTitle="kendo.grid.adaptiveBackButtonTitle|The title of the Back button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
33169
33949
  adaptiveBackButtonTitle="Back"
33170
-
33950
+
33171
33951
  i18n-filterClearAllButton="kendo.grid.filterClearAllButton|The text of the clear all filters button located in the Filter Toolbar Tool and adaptive Filter Toolbar Tool"
33172
33952
  filterClearAllButton="Clear all filters"
33173
-
33953
+
33174
33954
  i18n-groupClearButton="kendo.grid.groupClearButton|The text of the clear grouping button in the Group Toolbar Tool and adaptive Group Toolbar Tool"
33175
33955
  groupClearButton="Clear grouping"
33176
-
33956
+
33177
33957
  i18n-sortDoneButton="kendo.grid.sortDoneButton|The text of the done sort button"
33178
33958
  sortDoneButton="Done"
33179
-
33959
+
33180
33960
  i18n-groupDoneButton="kendo.grid.groupDoneButton|The text of the done group button in the adaptive Group Toolbar Tool"
33181
33961
  groupDoneButton="Done"
33182
-
33962
+
33183
33963
  i18n-filterAndLogic="kendo.grid.filterAndLogic|The text of the And filter logic"
33184
33964
  filterAndLogic="And"
33185
-
33965
+
33186
33966
  i18n-filterOrLogic="kendo.grid.filterOrLogic|The text of the Or filter logic"
33187
33967
  filterOrLogic="Or"
33188
-
33968
+
33189
33969
  i18n-filterToolbarToolText="kendo.grid.filterToolbarToolText|The button text of the Filter toolbar tool"
33190
33970
  filterToolbarToolText="Filter"
33191
-
33971
+
33192
33972
  i18n-loading="kendo.grid.loading|The loading text"
33193
33973
  loading="Loading"
33194
-
33974
+
33195
33975
  i18n-gridLabel="kendo.grid.gridLabel|The Grid aria-label"
33196
33976
  gridLabel="Data table"
33197
-
33977
+
33198
33978
  i18n-columnMenu="kendo.grid.columnMenu|The title of the column menu icon"
33199
33979
  columnMenu="{{ '{columnName} Column Menu' }}"
33200
-
33980
+
33201
33981
  i18n-columns="kendo.grid.columns|The text for the Grid Column Chooser and Column Chooser toolbar tool"
33202
33982
  columns="Columns"
33203
-
33983
+
33204
33984
  i18n-columnsSubtitle="kendo.grid.columnsSubtitle|The subtitle for the adaptive Grid Column Chooser and Column Chooser toolbar tool"
33205
33985
  columnsSubtitle="Selected fields are visible"
33206
-
33986
+
33207
33987
  i18n-adaptiveFilterTitle="kendo.grid.adaptiveFilterTitle|The title that is displayed in the adaptive Filter Toolbar Tool and Filter Menu"
33208
33988
  adaptiveFilterTitle="Filter by"
33209
-
33989
+
33210
33990
  i18n-adaptiveFilterOperatorsTitle="kendo.grid.adaptiveFilterOperatorsTitle|The title that is displayed in the Operators Action Sheet"
33211
33991
  adaptiveFilterOperatorsTitle="Operators"
33212
-
33992
+
33213
33993
  i18n-adaptiveSortTitle="kendo.grid.adaptiveSortTitle|The title that is displayed in the adaptive Sort Toolbar Tool"
33214
33994
  adaptiveSortTitle="Sort by"
33215
-
33995
+
33216
33996
  i18n-adaptiveGroupTitle="kendo.grid.adaptiveGroupTitle|The title that is displayed in the adaptive Group Toolbar Tool."
33217
33997
  adaptiveGroupTitle="Group by"
33218
-
33998
+
33219
33999
  i18n-lock="kendo.grid.lock|The text shown in the column menu for the lock item"
33220
34000
  lock="Lock"
33221
-
34001
+
33222
34002
  i18n-unlock="kendo.grid.unlock|The text shown in the column menu for the unlock item"
33223
34003
  unlock="Unlock"
33224
-
34004
+
33225
34005
  i18n-setColumnPosition="kendo.grid.setColumnPosition|The text shown in the column menu for the set column position item"
33226
34006
  setColumnPosition="Set Column Position"
33227
-
34007
+
33228
34008
  i18n-stick="kendo.grid.stick|The text shown in the column menu for the stick item"
33229
34009
  stick="Stick"
33230
-
34010
+
33231
34011
  i18n-unstick="kendo.grid.unstick|The text shown in the column menu for the unstick item"
33232
34012
  unstick="Unstick"
33233
-
34013
+
33234
34014
  i18n-sortable="kendo.grid.sortable|The label of the sort icon"
33235
34015
  sortable="Sortable"
33236
-
34016
+
33237
34017
  i18n-sortAscending="kendo.grid.sortAscending|The text shown in the column menu for the sort ascending item"
33238
34018
  sortAscending="Sort Ascending"
33239
-
34019
+
33240
34020
  i18n-sortDescending="kendo.grid.sortDescending|The text shown in the column menu for the sort descending item"
33241
34021
  sortDescending="Sort Descending"
33242
-
34022
+
33243
34023
  i18n-autosizeAllColumns="kendo.grid.autosizeAllColumns|The text shown in the column menu for the autosize all columns item"
33244
34024
  autosizeAllColumns="Autosize All Columns"
33245
-
34025
+
33246
34026
  i18n-autosizeThisColumn="kendo.grid.autosizeThisColumn|The text shown in the column menu for the autosize this column item"
33247
34027
  autosizeThisColumn="Autosize This Column"
33248
-
34028
+
33249
34029
  i18n-sortedDefault="kendo.grid.sortedDefault|The status announcement when a column is no longer sorted"
33250
34030
  sortedDefault="Not Sorted"
33251
-
34031
+
33252
34032
  i18n-sortedAscending="kendo.grid.sortedAscending|The title of the Group Chip indicating the ascending sorting order of the groups"
33253
34033
  sortedAscending="Sorted Ascending"
33254
-
34034
+
33255
34035
  i18n-sortedDescending="kendo.grid.sortedDescending|The title of the Group Chip indicating the descending sorting order of the groups"
33256
34036
  sortedDescending="Sorted Descending"
33257
-
34037
+
33258
34038
  i18n-columnsApply="kendo.grid.columnsApply|The text shown in the column menu or column chooser for the columns apply button"
33259
34039
  columnsApply="Apply"
33260
-
34040
+
33261
34041
  i18n-columnsReset="kendo.grid.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
33262
34042
  columnsReset="Reset"
33263
-
34043
+
33264
34044
  i18n-detailExpand="kendo.grid.detailExpand|The title of the expand icon of detail rows. Applies also to the expand button text in stacked mode."
33265
34045
  detailExpand="Expand Details"
33266
-
34046
+
33267
34047
  i18n-detailCollapse="kendo.grid.detailCollapse|The title of the collapse icon of detail rows. Applies also to the collapse button text in stacked mode."
33268
34048
  detailCollapse="Collapse Details"
33269
-
34049
+
33270
34050
  i18n-filterDateToday="kendo.grid.filterDateToday|The text of the Today button of the Date filter."
33271
34051
  filterDateToday="TODAY"
33272
-
34052
+
33273
34053
  i18n-filterDateToggle="kendo.grid.filterDateToggle|The title of the Toggle button of the Date filter."
33274
34054
  filterDateToggle="Toggle Calendar"
33275
-
34055
+
33276
34056
  i18n-filterNumericDecrement="kendo.grid.filterNumericDecrement|The title of the Decrement button of the Numeric filter."
33277
34057
  filterNumericDecrement="Decrement"
33278
-
34058
+
33279
34059
  i18n-filterNumericIncrement="kendo.grid.filterNumericIncrement|The title of the Increment button of the Numeric filter."
33280
34060
  filterNumericIncrement="Increment"
33281
-
34061
+
33282
34062
  i18n-selectionCheckboxLabel="kendo.grid.selectionCheckboxLabel|The labels of the checkbox column checkboxes."
33283
34063
  selectionCheckboxLabel="Select Row"
33284
-
34064
+
33285
34065
  i18n-selectAllCheckboxLabel="kendo.grid.selectAllCheckboxLabel|The label of the checkbox column select all checkbox."
33286
34066
  selectAllCheckboxLabel="Select All Rows"
33287
-
34067
+
33288
34068
  i18n-sortToolbarToolText="kendo.grid.sortToolbarToolText|The button text of the Sort toolbar tool."
33289
34069
  sortToolbarToolText="Sort"
33290
-
34070
+
33291
34071
  i18n-groupCollapse="kendo.grid.groupCollapse|The text of the title and aria-label attributes applied to the collapse icon of group rows."
33292
34072
  groupCollapse="Collapse Group"
33293
-
34073
+
33294
34074
  i18n-groupExpand="kendo.grid.groupExpand|The text of the title and aria-label attributes applied to the expand icon of group rows."
33295
34075
  groupExpand="Expand Group"
33296
-
34076
+
33297
34077
  i18n-pagerSelectPage="kendo.grid.pagerSelectPage|The text of the title and aria-label attributes applied to the page chooser in the Grid Pager"
33298
34078
  pagerSelectPage="Select page"
33299
-
34079
+
33300
34080
  i18n-topToolbarLabel="kendo.grid.topToolbarLabel|The label for the Grid top toolbar"
33301
34081
  topToolbarLabel="Top toolbar"
33302
-
34082
+
33303
34083
  i18n-bottomToolbarLabel="kendo.grid.bottomToolbarLabel|The label for the Grid bottom toolbar"
33304
34084
  bottomToolbarLabel="Bottom toolbar"
33305
-
34085
+
33306
34086
  i18n-editToolbarToolText="kendo.grid.editToolbarToolText|The text for the Grid Edit toolbar tool"
33307
34087
  editToolbarToolText="Edit"
33308
-
34088
+
33309
34089
  i18n-saveToolbarToolText="kendo.grid.saveToolbarToolText|The text for the Grid Save toolbar tool"
33310
34090
  saveToolbarToolText="Save"
33311
-
34091
+
33312
34092
  i18n-addToolbarToolText="kendo.grid.addToolbarToolText|The text for the Grid Add toolbar tool"
33313
34093
  addToolbarToolText="Add"
33314
-
34094
+
33315
34095
  i18n-cancelToolbarToolText="kendo.grid.cancelToolbarToolText|The text for the Grid Cancel toolbar tool"
33316
34096
  cancelToolbarToolText="Cancel"
33317
-
34097
+
33318
34098
  i18n-removeToolbarToolText="kendo.grid.removeToolbarToolText|The text for the Grid Remove toolbar tool"
33319
34099
  removeToolbarToolText="Delete"
33320
-
34100
+
33321
34101
  i18n-excelExportToolbarToolText="kendo.grid.excelExportToolbarToolText|The text for the Grid Excel export toolbar tool"
33322
34102
  excelExportToolbarToolText="Excel Export"
33323
-
34103
+
33324
34104
  i18n-pdfExportToolbarToolText="kendo.grid.pdfExportToolbarToolText|The text for the Grid PDF export toolbar tool"
33325
34105
  pdfExportToolbarToolText="PDF Export"
33326
-
34106
+
33327
34107
  i18n-groupPanelLabel="kendo.grid.groupPanelLabel|The label for the Grid group panel toolbar"
33328
34108
  groupPanelLabel="Group panel"
33329
-
34109
+
33330
34110
  i18n-dragRowHandleLabel="kendo.grid.dragRowHandleLabel|The label for the Grid drag row handle"
33331
34111
  dragRowHandleLabel="Drag row"
33332
-
34112
+
33333
34113
  i18n-columnMenuFilterTabTitle="kendo.grid.columnMenuFilterTabTitle|The title for the column menu Filter tab"
33334
34114
  columnMenuFilterTabTitle="Filter"
33335
-
34115
+
33336
34116
  i18n-columnMenuGeneralTabTitle="kendo.grid.columnMenuGeneralTabTitle|The title for the column menu General tab"
33337
34117
  columnMenuGeneralTabTitle="General"
33338
-
34118
+
33339
34119
  i18n-columnMenuColumnsTabTitle="kendo.grid.columnMenuColumnsTabTitle|The title for the column menu Columns tab"
33340
34120
  columnMenuColumnsTabTitle="Columns"
33341
-
34121
+
33342
34122
  i18n-groupChipMenuPrevious="kendo.grid.groupChipMenuPrevious|The text for the Group pane Chip Menu Move as previous item"
33343
34123
  groupChipMenuPrevious="Move as previous"
33344
-
34124
+
33345
34125
  i18n-groupChipMenuNext="kendo.grid.groupChipMenuNext|The text for the Group pane Chip Menu Move as next item"
33346
34126
  groupChipMenuNext="Move as next"
33347
-
34127
+
33348
34128
  i18n-groupToolbarToolText="kendo.grid.groupToolbarToolText|The button text of the Group toolbar tool"
33349
34129
  groupToolbarToolText="Group"
33350
-
34130
+
33351
34131
  i18n-formValidationErrorText="kendo.grid.formValidationErrorText|The default text of a form validation error when using external editing."
33352
34132
  formValidationErrorText="{{ 'The {fieldName} field has {errorName} validation error' }}"
33353
-
34133
+
33354
34134
  i18n-removeConfirmationDialogTitle="kendo.grid.removeConfirmationDialogTitle|The title of the built-in remove item confirmation Dialog"
33355
34135
  removeConfirmationDialogTitle="Please confirm"
33356
-
34136
+
33357
34137
  i18n-removeConfirmationDialogContent="kendo.grid.removeConfirmationDialogContent|The content of the built-in remove item confirmation Dialog"
33358
34138
  removeConfirmationDialogContent="Are you sure you want to delete this item?"
33359
-
34139
+
33360
34140
  i18n-removeConfirmationDialogConfirmText="kendo.grid.removeConfirmationDialogConfirmText|The text of the built-in remove item confirmation Dialog confirm action button"
33361
34141
  removeConfirmationDialogConfirmText="Yes"
33362
-
34142
+
33363
34143
  i18n-removeConfirmationDialogRejectText="kendo.grid.removeConfirmationDialogRejectText|The text of the built-in remove item confirmation Dialog reject action button"
33364
34144
  removeConfirmationDialogRejectText="No"
33365
-
34145
+
33366
34146
  i18n-externalEditingTitle="kendo.grid.externalEditingTitle|The title of the built-in external editing form container when editing an item"
33367
34147
  externalEditingTitle="Edit"
33368
-
34148
+
33369
34149
  i18n-externalEditingAddTitle="kendo.grid.externalEditingAddTitle|The title of the built-in external editing form container when adding a new item"
33370
34150
  externalEditingAddTitle="Add"
33371
-
34151
+
33372
34152
  i18n-externalEditingSaveText="kendo.grid.externalEditingSaveText|The text of the external editing form Save button"
33373
34153
  externalEditingSaveText="Save"
33374
-
34154
+
33375
34155
  i18n-externalEditingCancelText="kendo.grid.externalEditingCancelText|The text of the external editing form Cancel button"
33376
34156
  externalEditingCancelText="Cancel"
33377
-
34157
+
33378
34158
  i18n-aiAssistantToolbarToolText="kendo.grid.aiAssistantToolbarToolText|The text of the AI Assistant toolbar tool"
33379
34159
  aiAssistantToolbarToolText="AI Assistant"
33380
-
34160
+
33381
34161
  i18n-aiAssistantWindowTitle="kendo.grid.aiAssistantWindowTitle|The text of the AI Assistant Window title"
33382
34162
  aiAssistantWindowTitle="AI Assistant"
33383
-
34163
+
33384
34164
  i18n-aiAssistantApplyButtonText="kendo.grid.aiAssistantApplyButtonText|The text of the AI Assistant Apply button"
33385
34165
  aiAssistantApplyButtonText="Apply"
33386
-
34166
+
33387
34167
  i18n-aiAssistantWindowCloseTitle="kendo.grid.aiAssistantWindowCloseTitle|The title of the AI Assistant Window close button"
33388
34168
  aiAssistantWindowCloseTitle="Close"
33389
-
34169
+
33390
34170
  i18n-aiAssistantWindowMaximizeTitle="kendo.grid.aiAssistantWindowMaximizeTitle|The title of the AI Assistant Window maximize button"
33391
34171
  aiAssistantWindowMaximizeTitle="Maximize"
33392
-
34172
+
33393
34173
  i18n-aiAssistantWindowMinimizeTitle="kendo.grid.aiAssistantWindowMinimizeTitle|The title of the AI Assistant Window minimize button"
33394
34174
  aiAssistantWindowMinimizeTitle="Minimize"
33395
-
34175
+
33396
34176
  i18n-aiAssistantWindowRestoreTitle="kendo.grid.aiAssistantWindowRestoreTitle|The title of the AI Assistant Window restore button"
33397
34177
  aiAssistantWindowRestoreTitle="Restore"
33398
-
34178
+
33399
34179
  i18n-aiAssistantOutputCardTitle="kendo.grid.aiAssistantOutputCardTitle|The title of the AI Assistant Prompt Output Card"
33400
34180
  aiAssistantOutputCardTitle="Generated with AI"
33401
-
34181
+
33402
34182
  i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
33403
34183
  aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
33404
-
34184
+
33405
34185
  i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
33406
34186
  aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
33407
-
34187
+
33408
34188
  i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
33409
34189
  aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
33410
-
34190
+
33411
34191
  i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
33412
34192
  aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
33413
-
34193
+
33414
34194
  i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
33415
34195
  columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
33416
-
34196
+
33417
34197
  i18n-multiCheckboxFilterSearchPlaceholder="kendo.grid.multiCheckboxFilterSearchPlaceholder|The placeholder text for the multi-checkbox filter search input"
33418
34198
  multiCheckboxFilterSearchPlaceholder="Search..."
33419
-
34199
+
33420
34200
  i18n-multiCheckboxFilterSelectAllLabel="kendo.grid.multiCheckboxFilterSelectAllLabel|The label for the multi-checkbox filter select all option"
33421
34201
  multiCheckboxFilterSelectAllLabel="Select all"
33422
-
34202
+
33423
34203
  i18n-multiCheckboxFilterSelectedItemsCount="kendo.grid.multiCheckboxFilterSelectedItemsCount|The text for the multi-checkbox filter selected items count"
33424
34204
  multiCheckboxFilterSelectedItemsCount="{{ '{selectedItemsCount} selected items' }}"
33425
34205
  >
@@ -33832,7 +34612,7 @@ class GridComponent {
33832
34612
  position="bottom">
33833
34613
  </kendo-grid-toolbar>
33834
34614
  }
33835
-
34615
+
33836
34616
  <ng-template #defaultHint>
33837
34617
  <kendo-icon-wrapper
33838
34618
  [name]="getHintSettings('hintIcon')"
@@ -33841,7 +34621,7 @@ class GridComponent {
33841
34621
  </kendo-icon-wrapper>
33842
34622
  {{hintText}}
33843
34623
  </ng-template>
33844
-
34624
+
33845
34625
  <ng-template #defaultPager>
33846
34626
  <div class="k-pager-numbers-wrap">
33847
34627
  @if (normalizedPageableSettings.previousNext) {
@@ -33874,14 +34654,14 @@ class GridComponent {
33874
34654
  </ng-template>
33875
34655
  <div #dialogContainer></div>
33876
34656
  <div #windowContainer></div>
33877
-
34657
+
33878
34658
  @if (isAdaptiveModeEnabled) {
33879
34659
  <kendo-grid-adaptive-renderer></kendo-grid-adaptive-renderer>
33880
34660
  }
33881
34661
  @if (isVirtual) {
33882
34662
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
33883
34663
  }
33884
-
34664
+
33885
34665
  @if (showLicenseWatermark) {
33886
34666
  <div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
33887
34667
  }
@@ -33938,6 +34718,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
33938
34718
  SizingOptionsService,
33939
34719
  RowReorderService,
33940
34720
  ClipboardService,
34721
+ GridAIRequestResponseService,
33941
34722
  RowspanService,
33942
34723
  AdaptiveGridService,
33943
34724
  ColumnMenuService,
@@ -33949,394 +34730,394 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
33949
34730
  <ng-container kendoGridLocalizedMessages
33950
34731
  i18n-groupPanelEmpty="kendo.grid.groupPanelEmpty|The label visible in the Grid group panel when it is empty"
33951
34732
  groupPanelEmpty="Drag a column header and drop it here to group by that column"
33952
-
34733
+
33953
34734
  i18n-noRecords="kendo.grid.noRecords|The label visible in the Grid when there are no records"
33954
34735
  noRecords="No records available."
33955
-
34736
+
33956
34737
  i18n-pagerLabel="kendo.grid.pagerLabel|The label for the Grid pager"
33957
34738
  pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
33958
-
34739
+
33959
34740
  i18n-pagerFirstPage="kendo.grid.pagerFirstPage|The label for the first page button in Grid pager"
33960
34741
  pagerFirstPage="Go to the first page"
33961
-
34742
+
33962
34743
  i18n-pagerPreviousPage="kendo.grid.pagerPreviousPage|The label for the previous page button in Grid pager"
33963
34744
  pagerPreviousPage="Go to the previous page"
33964
-
34745
+
33965
34746
  i18n-pagerNextPage="kendo.grid.pagerNextPage|The label for the next page button in Grid pager"
33966
34747
  pagerNextPage="Go to the next page"
33967
-
34748
+
33968
34749
  i18n-pagerLastPage="kendo.grid.pagerLastPage|The label for the last page button in Grid pager"
33969
34750
  pagerLastPage="Go to the last page"
33970
-
34751
+
33971
34752
  i18n-pagerPage="kendo.grid.pagerPage|The label before the current page number in the Grid pager"
33972
34753
  pagerPage="Page"
33973
-
34754
+
33974
34755
  i18n-pagerOf="kendo.grid.pagerOf|The label before the total pages number in the Grid pager"
33975
34756
  pagerOf="of"
33976
-
34757
+
33977
34758
  i18n-pagerItems="kendo.grid.pagerItems|The label after the total pages number in the Grid pager"
33978
34759
  pagerItems="items"
33979
-
34760
+
33980
34761
  i18n-pagerPageNumberInputTitle="kendo.grid.pagerPageNumberInputTitle|The label for the pager input in the Grid pager"
33981
34762
  pagerPageNumberInputTitle="Page Number"
33982
-
34763
+
33983
34764
  i18n-pagerItemsPerPage="kendo.grid.pagerItemsPerPage|The label for the page size chooser in the Grid pager"
33984
34765
  pagerItemsPerPage="items per page"
33985
-
34766
+
33986
34767
  i18n-pagerInputLabel="kendo.grid.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number"
33987
34768
  pagerInputLabel="Type a page number"
33988
-
34769
+
33989
34770
  i18n-filter="kendo.grid.filter|The label of the filter cell or icon"
33990
34771
  filter="Filter"
33991
-
34772
+
33992
34773
  i18n-filterInputLabel="kendo.grid.filterInputLabel|The label of the filter row and menu inputs"
33993
34774
  filterInputLabel="{{ '{columnName} Filter' }}"
33994
-
34775
+
33995
34776
  i18n-filterMenuTitle="kendo.grid.filterMenuTitle|The title of the filter menu icon"
33996
34777
  filterMenuTitle="{{ '{columnName} Filter Menu' }}"
33997
-
34778
+
33998
34779
  i18n-filterMenuOperatorsDropDownLabel="kendo.grid.filterMenuOperatorsDropDownLabel|The label of the filter menu operators dropdown"
33999
34780
  filterMenuOperatorsDropDownLabel="{{ '{columnName} Filter Operators' }}"
34000
-
34781
+
34001
34782
  i18n-filterCellOperatorLabel="kendo.grid.filterCellOperatorLabel|The label of the filter cell operators dropdown"
34002
34783
  filterCellOperatorLabel="{{ 'Filter cell operators for {columnName}' }}"
34003
-
34784
+
34004
34785
  i18n-booleanFilterCellLabel="kendo.grid.booleanFilterCellLabel|The label of the boolean filter cell dropdown"
34005
34786
  booleanFilterCellLabel="{{ 'Boolean filter cell for {columnName}' }}"
34006
-
34787
+
34007
34788
  i18n-filterMenuLogicDropDownLabel="kendo.grid.filterMenuLogicDropDownLabel|The label of the filter menu logic dropdown"
34008
34789
  filterMenuLogicDropDownLabel="{{ '{columnName} Filter Logic' }}"
34009
-
34790
+
34010
34791
  i18n-filterEqOperator="kendo.grid.filterEqOperator|The text of the equal filter operator"
34011
34792
  filterEqOperator="Is equal to"
34012
-
34793
+
34013
34794
  i18n-filterNotEqOperator="kendo.grid.filterNotEqOperator|The text of the not equal filter operator"
34014
34795
  filterNotEqOperator="Is not equal to"
34015
-
34796
+
34016
34797
  i18n-filterIsNullOperator="kendo.grid.filterIsNullOperator|The text of the is null filter operator"
34017
34798
  filterIsNullOperator="Is null"
34018
-
34799
+
34019
34800
  i18n-filterIsNotNullOperator="kendo.grid.filterIsNotNullOperator|The text of the is not null filter operator"
34020
34801
  filterIsNotNullOperator="Is not null"
34021
-
34802
+
34022
34803
  i18n-filterIsEmptyOperator="kendo.grid.filterIsEmptyOperator|The text of the is empty filter operator"
34023
34804
  filterIsEmptyOperator="Is empty"
34024
-
34805
+
34025
34806
  i18n-filterIsNotEmptyOperator="kendo.grid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
34026
34807
  filterIsNotEmptyOperator="Is not empty"
34027
-
34808
+
34028
34809
  i18n-filterStartsWithOperator="kendo.grid.filterStartsWithOperator|The text of the starts with filter operator"
34029
34810
  filterStartsWithOperator="Starts with"
34030
-
34811
+
34031
34812
  i18n-filterContainsOperator="kendo.grid.filterContainsOperator|The text of the contains filter operator"
34032
34813
  filterContainsOperator="Contains"
34033
-
34814
+
34034
34815
  i18n-filterNotContainsOperator="kendo.grid.filterNotContainsOperator|The text of the does not contain filter operator"
34035
34816
  filterNotContainsOperator="Does not contain"
34036
-
34817
+
34037
34818
  i18n-filterEndsWithOperator="kendo.grid.filterEndsWithOperator|The text of the ends with filter operator"
34038
34819
  filterEndsWithOperator="Ends with"
34039
-
34820
+
34040
34821
  i18n-filterGteOperator="kendo.grid.filterGteOperator|The text of the greater than or equal filter operator"
34041
34822
  filterGteOperator="Is greater than or equal to"
34042
-
34823
+
34043
34824
  i18n-filterGtOperator="kendo.grid.filterGtOperator|The text of the greater than filter operator"
34044
34825
  filterGtOperator="Is greater than"
34045
-
34826
+
34046
34827
  i18n-filterLteOperator="kendo.grid.filterLteOperator|The text of the less than or equal filter operator"
34047
34828
  filterLteOperator="Is less than or equal to"
34048
-
34829
+
34049
34830
  i18n-filterLtOperator="kendo.grid.filterLtOperator|The text of the less than filter operator"
34050
34831
  filterLtOperator="Is less than"
34051
-
34832
+
34052
34833
  i18n-filterIsTrue="kendo.grid.filterIsTrue|The text of the IsTrue boolean filter option"
34053
34834
  filterIsTrue="Is True"
34054
-
34835
+
34055
34836
  i18n-filterIsFalse="kendo.grid.filterIsFalse|The text of the IsFalse boolean filter option"
34056
34837
  filterIsFalse="Is False"
34057
-
34838
+
34058
34839
  i18n-filterBooleanAll="kendo.grid.filterBooleanAll|The text of the (All) boolean filter option"
34059
34840
  filterBooleanAll="(All)"
34060
-
34841
+
34061
34842
  i18n-filterAfterOrEqualOperator="kendo.grid.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
34062
34843
  filterAfterOrEqualOperator="Is after or equal to"
34063
-
34844
+
34064
34845
  i18n-filterAfterOperator="kendo.grid.filterAfterOperator|The text of the after date filter operator"
34065
34846
  filterAfterOperator="Is after"
34066
-
34847
+
34067
34848
  i18n-filterBeforeOperator="kendo.grid.filterBeforeOperator|The text of the before date filter operator"
34068
34849
  filterBeforeOperator="Is before"
34069
-
34850
+
34070
34851
  i18n-filterBeforeOrEqualOperator="kendo.grid.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
34071
34852
  filterBeforeOrEqualOperator="Is before or equal to"
34072
-
34853
+
34073
34854
  i18n-filterFilterButton="kendo.grid.filterFilterButton|The text of the filter button"
34074
34855
  filterFilterButton="Filter"
34075
-
34856
+
34076
34857
  i18n-filterClearButton="kendo.grid.filterClearButton|The text of the clear filter button"
34077
34858
  filterClearButton="Clear"
34078
-
34859
+
34079
34860
  i18n-sortClearButton="kendo.grid.sortClearButton|The text of the clear sort button located in the Sort Toolbar Tool and adaptive Sort Toolbar Tool"
34080
34861
  sortClearButton="Clear sorting"
34081
-
34862
+
34082
34863
  i18n-adaptiveCloseButtonTitle="kendo.grid.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
34083
34864
  adaptiveCloseButtonTitle="Close"
34084
-
34865
+
34085
34866
  i18n-adaptiveBackButtonTitle="kendo.grid.adaptiveBackButtonTitle|The title of the Back button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
34086
34867
  adaptiveBackButtonTitle="Back"
34087
-
34868
+
34088
34869
  i18n-filterClearAllButton="kendo.grid.filterClearAllButton|The text of the clear all filters button located in the Filter Toolbar Tool and adaptive Filter Toolbar Tool"
34089
34870
  filterClearAllButton="Clear all filters"
34090
-
34871
+
34091
34872
  i18n-groupClearButton="kendo.grid.groupClearButton|The text of the clear grouping button in the Group Toolbar Tool and adaptive Group Toolbar Tool"
34092
34873
  groupClearButton="Clear grouping"
34093
-
34874
+
34094
34875
  i18n-sortDoneButton="kendo.grid.sortDoneButton|The text of the done sort button"
34095
34876
  sortDoneButton="Done"
34096
-
34877
+
34097
34878
  i18n-groupDoneButton="kendo.grid.groupDoneButton|The text of the done group button in the adaptive Group Toolbar Tool"
34098
34879
  groupDoneButton="Done"
34099
-
34880
+
34100
34881
  i18n-filterAndLogic="kendo.grid.filterAndLogic|The text of the And filter logic"
34101
34882
  filterAndLogic="And"
34102
-
34883
+
34103
34884
  i18n-filterOrLogic="kendo.grid.filterOrLogic|The text of the Or filter logic"
34104
34885
  filterOrLogic="Or"
34105
-
34886
+
34106
34887
  i18n-filterToolbarToolText="kendo.grid.filterToolbarToolText|The button text of the Filter toolbar tool"
34107
34888
  filterToolbarToolText="Filter"
34108
-
34889
+
34109
34890
  i18n-loading="kendo.grid.loading|The loading text"
34110
34891
  loading="Loading"
34111
-
34892
+
34112
34893
  i18n-gridLabel="kendo.grid.gridLabel|The Grid aria-label"
34113
34894
  gridLabel="Data table"
34114
-
34895
+
34115
34896
  i18n-columnMenu="kendo.grid.columnMenu|The title of the column menu icon"
34116
34897
  columnMenu="{{ '{columnName} Column Menu' }}"
34117
-
34898
+
34118
34899
  i18n-columns="kendo.grid.columns|The text for the Grid Column Chooser and Column Chooser toolbar tool"
34119
34900
  columns="Columns"
34120
-
34901
+
34121
34902
  i18n-columnsSubtitle="kendo.grid.columnsSubtitle|The subtitle for the adaptive Grid Column Chooser and Column Chooser toolbar tool"
34122
34903
  columnsSubtitle="Selected fields are visible"
34123
-
34904
+
34124
34905
  i18n-adaptiveFilterTitle="kendo.grid.adaptiveFilterTitle|The title that is displayed in the adaptive Filter Toolbar Tool and Filter Menu"
34125
34906
  adaptiveFilterTitle="Filter by"
34126
-
34907
+
34127
34908
  i18n-adaptiveFilterOperatorsTitle="kendo.grid.adaptiveFilterOperatorsTitle|The title that is displayed in the Operators Action Sheet"
34128
34909
  adaptiveFilterOperatorsTitle="Operators"
34129
-
34910
+
34130
34911
  i18n-adaptiveSortTitle="kendo.grid.adaptiveSortTitle|The title that is displayed in the adaptive Sort Toolbar Tool"
34131
34912
  adaptiveSortTitle="Sort by"
34132
-
34913
+
34133
34914
  i18n-adaptiveGroupTitle="kendo.grid.adaptiveGroupTitle|The title that is displayed in the adaptive Group Toolbar Tool."
34134
34915
  adaptiveGroupTitle="Group by"
34135
-
34916
+
34136
34917
  i18n-lock="kendo.grid.lock|The text shown in the column menu for the lock item"
34137
34918
  lock="Lock"
34138
-
34919
+
34139
34920
  i18n-unlock="kendo.grid.unlock|The text shown in the column menu for the unlock item"
34140
34921
  unlock="Unlock"
34141
-
34922
+
34142
34923
  i18n-setColumnPosition="kendo.grid.setColumnPosition|The text shown in the column menu for the set column position item"
34143
34924
  setColumnPosition="Set Column Position"
34144
-
34925
+
34145
34926
  i18n-stick="kendo.grid.stick|The text shown in the column menu for the stick item"
34146
34927
  stick="Stick"
34147
-
34928
+
34148
34929
  i18n-unstick="kendo.grid.unstick|The text shown in the column menu for the unstick item"
34149
34930
  unstick="Unstick"
34150
-
34931
+
34151
34932
  i18n-sortable="kendo.grid.sortable|The label of the sort icon"
34152
34933
  sortable="Sortable"
34153
-
34934
+
34154
34935
  i18n-sortAscending="kendo.grid.sortAscending|The text shown in the column menu for the sort ascending item"
34155
34936
  sortAscending="Sort Ascending"
34156
-
34937
+
34157
34938
  i18n-sortDescending="kendo.grid.sortDescending|The text shown in the column menu for the sort descending item"
34158
34939
  sortDescending="Sort Descending"
34159
-
34940
+
34160
34941
  i18n-autosizeAllColumns="kendo.grid.autosizeAllColumns|The text shown in the column menu for the autosize all columns item"
34161
34942
  autosizeAllColumns="Autosize All Columns"
34162
-
34943
+
34163
34944
  i18n-autosizeThisColumn="kendo.grid.autosizeThisColumn|The text shown in the column menu for the autosize this column item"
34164
34945
  autosizeThisColumn="Autosize This Column"
34165
-
34946
+
34166
34947
  i18n-sortedDefault="kendo.grid.sortedDefault|The status announcement when a column is no longer sorted"
34167
34948
  sortedDefault="Not Sorted"
34168
-
34949
+
34169
34950
  i18n-sortedAscending="kendo.grid.sortedAscending|The title of the Group Chip indicating the ascending sorting order of the groups"
34170
34951
  sortedAscending="Sorted Ascending"
34171
-
34952
+
34172
34953
  i18n-sortedDescending="kendo.grid.sortedDescending|The title of the Group Chip indicating the descending sorting order of the groups"
34173
34954
  sortedDescending="Sorted Descending"
34174
-
34955
+
34175
34956
  i18n-columnsApply="kendo.grid.columnsApply|The text shown in the column menu or column chooser for the columns apply button"
34176
34957
  columnsApply="Apply"
34177
-
34958
+
34178
34959
  i18n-columnsReset="kendo.grid.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
34179
34960
  columnsReset="Reset"
34180
-
34961
+
34181
34962
  i18n-detailExpand="kendo.grid.detailExpand|The title of the expand icon of detail rows. Applies also to the expand button text in stacked mode."
34182
34963
  detailExpand="Expand Details"
34183
-
34964
+
34184
34965
  i18n-detailCollapse="kendo.grid.detailCollapse|The title of the collapse icon of detail rows. Applies also to the collapse button text in stacked mode."
34185
34966
  detailCollapse="Collapse Details"
34186
-
34967
+
34187
34968
  i18n-filterDateToday="kendo.grid.filterDateToday|The text of the Today button of the Date filter."
34188
34969
  filterDateToday="TODAY"
34189
-
34970
+
34190
34971
  i18n-filterDateToggle="kendo.grid.filterDateToggle|The title of the Toggle button of the Date filter."
34191
34972
  filterDateToggle="Toggle Calendar"
34192
-
34973
+
34193
34974
  i18n-filterNumericDecrement="kendo.grid.filterNumericDecrement|The title of the Decrement button of the Numeric filter."
34194
34975
  filterNumericDecrement="Decrement"
34195
-
34976
+
34196
34977
  i18n-filterNumericIncrement="kendo.grid.filterNumericIncrement|The title of the Increment button of the Numeric filter."
34197
34978
  filterNumericIncrement="Increment"
34198
-
34979
+
34199
34980
  i18n-selectionCheckboxLabel="kendo.grid.selectionCheckboxLabel|The labels of the checkbox column checkboxes."
34200
34981
  selectionCheckboxLabel="Select Row"
34201
-
34982
+
34202
34983
  i18n-selectAllCheckboxLabel="kendo.grid.selectAllCheckboxLabel|The label of the checkbox column select all checkbox."
34203
34984
  selectAllCheckboxLabel="Select All Rows"
34204
-
34985
+
34205
34986
  i18n-sortToolbarToolText="kendo.grid.sortToolbarToolText|The button text of the Sort toolbar tool."
34206
34987
  sortToolbarToolText="Sort"
34207
-
34988
+
34208
34989
  i18n-groupCollapse="kendo.grid.groupCollapse|The text of the title and aria-label attributes applied to the collapse icon of group rows."
34209
34990
  groupCollapse="Collapse Group"
34210
-
34991
+
34211
34992
  i18n-groupExpand="kendo.grid.groupExpand|The text of the title and aria-label attributes applied to the expand icon of group rows."
34212
34993
  groupExpand="Expand Group"
34213
-
34994
+
34214
34995
  i18n-pagerSelectPage="kendo.grid.pagerSelectPage|The text of the title and aria-label attributes applied to the page chooser in the Grid Pager"
34215
34996
  pagerSelectPage="Select page"
34216
-
34997
+
34217
34998
  i18n-topToolbarLabel="kendo.grid.topToolbarLabel|The label for the Grid top toolbar"
34218
34999
  topToolbarLabel="Top toolbar"
34219
-
35000
+
34220
35001
  i18n-bottomToolbarLabel="kendo.grid.bottomToolbarLabel|The label for the Grid bottom toolbar"
34221
35002
  bottomToolbarLabel="Bottom toolbar"
34222
-
35003
+
34223
35004
  i18n-editToolbarToolText="kendo.grid.editToolbarToolText|The text for the Grid Edit toolbar tool"
34224
35005
  editToolbarToolText="Edit"
34225
-
35006
+
34226
35007
  i18n-saveToolbarToolText="kendo.grid.saveToolbarToolText|The text for the Grid Save toolbar tool"
34227
35008
  saveToolbarToolText="Save"
34228
-
35009
+
34229
35010
  i18n-addToolbarToolText="kendo.grid.addToolbarToolText|The text for the Grid Add toolbar tool"
34230
35011
  addToolbarToolText="Add"
34231
-
35012
+
34232
35013
  i18n-cancelToolbarToolText="kendo.grid.cancelToolbarToolText|The text for the Grid Cancel toolbar tool"
34233
35014
  cancelToolbarToolText="Cancel"
34234
-
35015
+
34235
35016
  i18n-removeToolbarToolText="kendo.grid.removeToolbarToolText|The text for the Grid Remove toolbar tool"
34236
35017
  removeToolbarToolText="Delete"
34237
-
35018
+
34238
35019
  i18n-excelExportToolbarToolText="kendo.grid.excelExportToolbarToolText|The text for the Grid Excel export toolbar tool"
34239
35020
  excelExportToolbarToolText="Excel Export"
34240
-
35021
+
34241
35022
  i18n-pdfExportToolbarToolText="kendo.grid.pdfExportToolbarToolText|The text for the Grid PDF export toolbar tool"
34242
35023
  pdfExportToolbarToolText="PDF Export"
34243
-
35024
+
34244
35025
  i18n-groupPanelLabel="kendo.grid.groupPanelLabel|The label for the Grid group panel toolbar"
34245
35026
  groupPanelLabel="Group panel"
34246
-
35027
+
34247
35028
  i18n-dragRowHandleLabel="kendo.grid.dragRowHandleLabel|The label for the Grid drag row handle"
34248
35029
  dragRowHandleLabel="Drag row"
34249
-
35030
+
34250
35031
  i18n-columnMenuFilterTabTitle="kendo.grid.columnMenuFilterTabTitle|The title for the column menu Filter tab"
34251
35032
  columnMenuFilterTabTitle="Filter"
34252
-
35033
+
34253
35034
  i18n-columnMenuGeneralTabTitle="kendo.grid.columnMenuGeneralTabTitle|The title for the column menu General tab"
34254
35035
  columnMenuGeneralTabTitle="General"
34255
-
35036
+
34256
35037
  i18n-columnMenuColumnsTabTitle="kendo.grid.columnMenuColumnsTabTitle|The title for the column menu Columns tab"
34257
35038
  columnMenuColumnsTabTitle="Columns"
34258
-
35039
+
34259
35040
  i18n-groupChipMenuPrevious="kendo.grid.groupChipMenuPrevious|The text for the Group pane Chip Menu Move as previous item"
34260
35041
  groupChipMenuPrevious="Move as previous"
34261
-
35042
+
34262
35043
  i18n-groupChipMenuNext="kendo.grid.groupChipMenuNext|The text for the Group pane Chip Menu Move as next item"
34263
35044
  groupChipMenuNext="Move as next"
34264
-
35045
+
34265
35046
  i18n-groupToolbarToolText="kendo.grid.groupToolbarToolText|The button text of the Group toolbar tool"
34266
35047
  groupToolbarToolText="Group"
34267
-
35048
+
34268
35049
  i18n-formValidationErrorText="kendo.grid.formValidationErrorText|The default text of a form validation error when using external editing."
34269
35050
  formValidationErrorText="{{ 'The {fieldName} field has {errorName} validation error' }}"
34270
-
35051
+
34271
35052
  i18n-removeConfirmationDialogTitle="kendo.grid.removeConfirmationDialogTitle|The title of the built-in remove item confirmation Dialog"
34272
35053
  removeConfirmationDialogTitle="Please confirm"
34273
-
35054
+
34274
35055
  i18n-removeConfirmationDialogContent="kendo.grid.removeConfirmationDialogContent|The content of the built-in remove item confirmation Dialog"
34275
35056
  removeConfirmationDialogContent="Are you sure you want to delete this item?"
34276
-
35057
+
34277
35058
  i18n-removeConfirmationDialogConfirmText="kendo.grid.removeConfirmationDialogConfirmText|The text of the built-in remove item confirmation Dialog confirm action button"
34278
35059
  removeConfirmationDialogConfirmText="Yes"
34279
-
35060
+
34280
35061
  i18n-removeConfirmationDialogRejectText="kendo.grid.removeConfirmationDialogRejectText|The text of the built-in remove item confirmation Dialog reject action button"
34281
35062
  removeConfirmationDialogRejectText="No"
34282
-
35063
+
34283
35064
  i18n-externalEditingTitle="kendo.grid.externalEditingTitle|The title of the built-in external editing form container when editing an item"
34284
35065
  externalEditingTitle="Edit"
34285
-
35066
+
34286
35067
  i18n-externalEditingAddTitle="kendo.grid.externalEditingAddTitle|The title of the built-in external editing form container when adding a new item"
34287
35068
  externalEditingAddTitle="Add"
34288
-
35069
+
34289
35070
  i18n-externalEditingSaveText="kendo.grid.externalEditingSaveText|The text of the external editing form Save button"
34290
35071
  externalEditingSaveText="Save"
34291
-
35072
+
34292
35073
  i18n-externalEditingCancelText="kendo.grid.externalEditingCancelText|The text of the external editing form Cancel button"
34293
35074
  externalEditingCancelText="Cancel"
34294
-
35075
+
34295
35076
  i18n-aiAssistantToolbarToolText="kendo.grid.aiAssistantToolbarToolText|The text of the AI Assistant toolbar tool"
34296
35077
  aiAssistantToolbarToolText="AI Assistant"
34297
-
35078
+
34298
35079
  i18n-aiAssistantWindowTitle="kendo.grid.aiAssistantWindowTitle|The text of the AI Assistant Window title"
34299
35080
  aiAssistantWindowTitle="AI Assistant"
34300
-
35081
+
34301
35082
  i18n-aiAssistantApplyButtonText="kendo.grid.aiAssistantApplyButtonText|The text of the AI Assistant Apply button"
34302
35083
  aiAssistantApplyButtonText="Apply"
34303
-
35084
+
34304
35085
  i18n-aiAssistantWindowCloseTitle="kendo.grid.aiAssistantWindowCloseTitle|The title of the AI Assistant Window close button"
34305
35086
  aiAssistantWindowCloseTitle="Close"
34306
-
35087
+
34307
35088
  i18n-aiAssistantWindowMaximizeTitle="kendo.grid.aiAssistantWindowMaximizeTitle|The title of the AI Assistant Window maximize button"
34308
35089
  aiAssistantWindowMaximizeTitle="Maximize"
34309
-
35090
+
34310
35091
  i18n-aiAssistantWindowMinimizeTitle="kendo.grid.aiAssistantWindowMinimizeTitle|The title of the AI Assistant Window minimize button"
34311
35092
  aiAssistantWindowMinimizeTitle="Minimize"
34312
-
35093
+
34313
35094
  i18n-aiAssistantWindowRestoreTitle="kendo.grid.aiAssistantWindowRestoreTitle|The title of the AI Assistant Window restore button"
34314
35095
  aiAssistantWindowRestoreTitle="Restore"
34315
-
35096
+
34316
35097
  i18n-aiAssistantOutputCardTitle="kendo.grid.aiAssistantOutputCardTitle|The title of the AI Assistant Prompt Output Card"
34317
35098
  aiAssistantOutputCardTitle="Generated with AI"
34318
-
35099
+
34319
35100
  i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
34320
35101
  aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
34321
-
35102
+
34322
35103
  i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
34323
35104
  aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
34324
-
35105
+
34325
35106
  i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
34326
35107
  aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
34327
-
35108
+
34328
35109
  i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
34329
35110
  aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
34330
-
35111
+
34331
35112
  i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
34332
35113
  columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
34333
-
35114
+
34334
35115
  i18n-multiCheckboxFilterSearchPlaceholder="kendo.grid.multiCheckboxFilterSearchPlaceholder|The placeholder text for the multi-checkbox filter search input"
34335
35116
  multiCheckboxFilterSearchPlaceholder="Search..."
34336
-
35117
+
34337
35118
  i18n-multiCheckboxFilterSelectAllLabel="kendo.grid.multiCheckboxFilterSelectAllLabel|The label for the multi-checkbox filter select all option"
34338
35119
  multiCheckboxFilterSelectAllLabel="Select all"
34339
-
35120
+
34340
35121
  i18n-multiCheckboxFilterSelectedItemsCount="kendo.grid.multiCheckboxFilterSelectedItemsCount|The text for the multi-checkbox filter selected items count"
34341
35122
  multiCheckboxFilterSelectedItemsCount="{{ '{selectedItemsCount} selected items' }}"
34342
35123
  >
@@ -34749,7 +35530,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34749
35530
  position="bottom">
34750
35531
  </kendo-grid-toolbar>
34751
35532
  }
34752
-
35533
+
34753
35534
  <ng-template #defaultHint>
34754
35535
  <kendo-icon-wrapper
34755
35536
  [name]="getHintSettings('hintIcon')"
@@ -34758,7 +35539,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34758
35539
  </kendo-icon-wrapper>
34759
35540
  {{hintText}}
34760
35541
  </ng-template>
34761
-
35542
+
34762
35543
  <ng-template #defaultPager>
34763
35544
  <div class="k-pager-numbers-wrap">
34764
35545
  @if (normalizedPageableSettings.previousNext) {
@@ -34791,14 +35572,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34791
35572
  </ng-template>
34792
35573
  <div #dialogContainer></div>
34793
35574
  <div #windowContainer></div>
34794
-
35575
+
34795
35576
  @if (isAdaptiveModeEnabled) {
34796
35577
  <kendo-grid-adaptive-renderer></kendo-grid-adaptive-renderer>
34797
35578
  }
34798
35579
  @if (isVirtual) {
34799
35580
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
34800
35581
  }
34801
-
35582
+
34802
35583
  @if (showLicenseWatermark) {
34803
35584
  <div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
34804
35585
  }
@@ -34830,7 +35611,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34830
35611
  ResizeSensorComponent
34831
35612
  ]
34832
35613
  }]
34833
- }], ctorParameters: () => [{ type: BrowserSupportService }, { type: SelectionService }, { type: CellSelectionService }, { type: i0.ElementRef }, { type: GroupInfoService }, { type: GroupsService }, { type: ChangeNotificationService }, { type: DetailsService }, { type: EditService }, { type: FilterService }, { type: PDFService }, { type: ResponsiveService }, { type: i0.Renderer2 }, { type: ExcelService }, { type: i0.NgZone }, { type: ScrollSyncService }, { type: DomEventsService }, { type: ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: ColumnReorderService }, { type: ColumnInfoService }, { type: NavigationService }, { type: SortService }, { type: ScrollRequestService }, { type: i1$2.LocalizationService }, { type: ContextService }, { type: SizingOptionsService }, { type: AdaptiveGridService }, { type: RowReorderService }, { type: DataMappingService }], propDecorators: { data: [{
35614
+ }], ctorParameters: () => [{ type: BrowserSupportService }, { type: SelectionService }, { type: CellSelectionService }, { type: i0.ElementRef }, { type: GroupInfoService }, { type: GroupsService }, { type: ChangeNotificationService }, { type: DetailsService }, { type: EditService }, { type: FilterService }, { type: PDFService }, { type: ResponsiveService }, { type: i0.Renderer2 }, { type: ExcelService }, { type: i0.NgZone }, { type: ScrollSyncService }, { type: DomEventsService }, { type: ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: ColumnReorderService }, { type: ColumnInfoService }, { type: NavigationService }, { type: SortService }, { type: ScrollRequestService }, { type: i1$2.LocalizationService }, { type: ContextService }, { type: SizingOptionsService }, { type: AdaptiveGridService }, { type: RowReorderService }, { type: DataMappingService }, { type: GridAIRequestResponseService }, { type: IdService }], propDecorators: { data: [{
34834
35615
  type: Input
34835
35616
  }], pageSize: [{
34836
35617
  type: Input
@@ -38463,93 +39244,6 @@ class GridAIAssistantResponseErrorEvent extends PreventableEvent$1 {
38463
39244
  }
38464
39245
  }
38465
39246
 
38466
- /**
38467
- * @hidden
38468
- * Converts date strings in a filter to Date objects.
38469
- */
38470
- const convertDateStringsInFilter = (filter) => {
38471
- if (!filter) {
38472
- return filter;
38473
- }
38474
- if (filter.filters && Array.isArray(filter.filters)) {
38475
- return {
38476
- ...filter,
38477
- filters: filter.filters.map(f => convertDateStringsInFilter(f))
38478
- };
38479
- }
38480
- if (filter.field && filter.value !== undefined) {
38481
- if (typeof filter.value === 'string' && isDateOperator(filter.operator)) {
38482
- const date = parseDate(filter.value);
38483
- return {
38484
- ...filter,
38485
- value: date || filter.value
38486
- };
38487
- }
38488
- }
38489
- return filter;
38490
- };
38491
- /**
38492
- * @hidden
38493
- */
38494
- const isDateOperator = (operator) => {
38495
- const dateOperators = [
38496
- 'eq', 'neq', 'lt', 'lte', 'gt', 'gte'
38497
- ];
38498
- return dateOperators.includes(operator);
38499
- };
38500
- /**
38501
- * @hidden
38502
- * Processes cell highlights for a specific filter and item.
38503
- */
38504
- const processCellHighlights = (filter, rowIndex, columns, highlightItems) => {
38505
- Object.keys(filter.cells).forEach((columnField) => {
38506
- const actualColumnIndex = Array.from(columns).findIndex((col) => col.field === columnField);
38507
- if (actualColumnIndex !== -1) {
38508
- highlightItems.push({
38509
- itemKey: rowIndex,
38510
- columnKey: actualColumnIndex,
38511
- });
38512
- }
38513
- });
38514
- };
38515
- /**
38516
- * @hidden
38517
- * Processes filtered results and adds highlight items.
38518
- */
38519
- const processFilteredResults = (filteredResults, data, filter, columns, highlightItems) => {
38520
- filteredResults?.forEach((item) => {
38521
- const rowIndex = data.findIndex((dataItem) => dataItem === item);
38522
- if (filter.cells && Object.keys(filter.cells).length > 0) {
38523
- processCellHighlights(filter, rowIndex, columns, highlightItems);
38524
- }
38525
- else {
38526
- highlightItems.push({
38527
- itemKey: rowIndex,
38528
- });
38529
- }
38530
- });
38531
- };
38532
- /**
38533
- * @hidden
38534
- * Highlights items in a grid based on the provided filters and columns.
38535
- * @param data - The data to be highlighted.
38536
- * @param filters - The composite highlight descriptors containing the filters and logic.
38537
- * @param columns - The columns of the grid.
38538
- * @returns An array of HighlightItem objects representing the highlighted items.
38539
- */
38540
- const highlightBy = (data, filters, columns) => {
38541
- const highlightItems = [];
38542
- filters.forEach((filter) => {
38543
- const processedFilters = filter.filters.map((filter) => convertDateStringsInFilter(filter));
38544
- const filteredResults = filterBy(data, {
38545
- logic: filter.logic || "and",
38546
- filters: processedFilters,
38547
- });
38548
- processFilteredResults(filteredResults, data, filter, columns, highlightItems);
38549
- });
38550
- return highlightItems;
38551
- };
38552
-
38553
39247
  /**
38554
39248
  * @hidden
38555
39249
  */
@@ -38558,6 +39252,7 @@ class AiAssistantComponent {
38558
39252
  ctx;
38559
39253
  columnInfoService;
38560
39254
  zone;
39255
+ aiRequestResponseService;
38561
39256
  aiPrompt;
38562
39257
  activeView = 0;
38563
39258
  requestUrl;
@@ -38574,42 +39269,15 @@ class AiAssistantComponent {
38574
39269
  // flat columns used for highlight utilities (expects { field })
38575
39270
  columns = [];
38576
39271
  leafColumns = [];
38577
- // nested tree representing the actual Grid column components sent to the AI service
38578
- columnsTree = [];
38579
39272
  idCounter = 0;
38580
- constructor(http, ctx, columnInfoService, zone) {
39273
+ constructor(http, ctx, columnInfoService, zone, aiRequestResponseService) {
38581
39274
  this.http = http;
38582
39275
  this.ctx = ctx;
38583
39276
  this.columnInfoService = columnInfoService;
38584
39277
  this.zone = zone;
39278
+ this.aiRequestResponseService = aiRequestResponseService;
38585
39279
  }
38586
39280
  ngAfterViewInit() {
38587
- // Build a nested GridColumnDescriptor tree based on the actual Grid columns structure.
38588
- // This includes root columns and their nested children (for ColumnGroup and SpanColumn).
38589
- const rootColumns = this.ctx?.grid?.columnList?.rootColumns() || [];
38590
- const buildDescriptor = (col) => {
38591
- const hasChildren = Boolean(col.hasChildren && col.childrenArray?.length);
38592
- const descriptor = {
38593
- id: col.id,
38594
- field: col.field
38595
- };
38596
- if (hasChildren) {
38597
- descriptor.header = col.displayTitle;
38598
- descriptor.columns = col.childrenArray.map((c) => buildDescriptor(c));
38599
- }
38600
- // For special columns that don't have a field, emit an optional type token
38601
- // so the AI service knows how to treat them (checkbox/command/reorder)
38602
- if (!col.field) {
38603
- if (isCheckboxColumn(col)) {
38604
- descriptor.type = 'checkbox';
38605
- }
38606
- else if (col instanceof CommandColumnComponent) {
38607
- descriptor.type = 'command';
38608
- }
38609
- }
38610
- return descriptor;
38611
- };
38612
- this.columnsTree = rootColumns.map((col) => buildDescriptor(col));
38613
39281
  // Preserve a flat columns array (fields) for highlight utilities.
38614
39282
  // Use leafNamedColumns as the canonical list of leaf columns with display titles.
38615
39283
  this.leafColumns = this.columnInfoService.leafNamedColumns || [];
@@ -38637,8 +39305,7 @@ class AiAssistantComponent {
38637
39305
  this.lastMessage = ev.prompt;
38638
39306
  }
38639
39307
  this.requestData = {
38640
- // send nested tree to AI service
38641
- columns: this.columnsTree,
39308
+ columns: [], // Will be populated by service
38642
39309
  promptMessage: ev.prompt,
38643
39310
  url: this.requestUrl,
38644
39311
  requestOptions: {
@@ -38646,16 +39313,7 @@ class AiAssistantComponent {
38646
39313
  }
38647
39314
  };
38648
39315
  if (!this.requestOptions.body) {
38649
- const requestBody = {
38650
- role: this.requestData.requestOptions.role,
38651
- contents: [
38652
- {
38653
- text: this.requestData.promptMessage
38654
- }
38655
- ],
38656
- columns: this.requestData.columns
38657
- };
38658
- this.requestData.requestOptions.body = requestBody;
39316
+ this.requestData.requestOptions.body = this.aiRequestResponseService.buildRequestBody(this.requestData.promptMessage, this.requestData.requestOptions.role);
38659
39317
  }
38660
39318
  this.aiToolDirective.promptRequest.emit({ requestData: this.requestData, isRetry: ev.isRetry });
38661
39319
  if (!this.requestUrl) {
@@ -38690,12 +39348,11 @@ class AiAssistantComponent {
38690
39348
  return;
38691
39349
  }
38692
39350
  const messages = [];
38693
- // Include optional top-level message from the response
38694
39351
  if (responseBody.message) {
38695
39352
  messages.push(responseBody.message);
38696
39353
  }
38697
- // Execute received commands sequentially and collect messages.
38698
- this.processCommands(responseBody.commands || [], messages);
39354
+ const commandMessages = this.aiRequestResponseService.processCommands(responseBody.commands || [], this.columns, this.leafColumns);
39355
+ messages.push(...commandMessages);
38699
39356
  const responseContentStart = [`${this.ctx.localization.get('aiAssistantOutputCardBodyContent')} \n`];
38700
39357
  const responseContentBody = messages
38701
39358
  .map((output, idx) => `${idx + 1} ${output}`)
@@ -38735,545 +39392,7 @@ class AiAssistantComponent {
38735
39392
  this.currentRequestSubscription = null;
38736
39393
  }
38737
39394
  }
38738
- processArrayResponse(newItems, currentItems, getField, updateGrid) {
38739
- if (newItems?.length === 0) {
38740
- updateGrid([]);
38741
- }
38742
- else if (newItems?.length) {
38743
- let mergedArray = [...newItems];
38744
- const newFields = newItems.map(getField);
38745
- const existingItemsToKeep = currentItems.filter(item => !newFields.includes(getField(item)));
38746
- mergedArray = [...mergedArray, ...existingItemsToKeep];
38747
- updateGrid(mergedArray);
38748
- }
38749
- }
38750
- processCommands(commands, messages) {
38751
- if (!commands?.length) {
38752
- return;
38753
- }
38754
- const isFilterable = Boolean(this.ctx.grid.filterable);
38755
- const isSortable = Boolean(this.ctx.grid.sortable);
38756
- const isGroupable = Boolean(this.ctx.grid.groupable);
38757
- const findColumnById = (id) => this.ctx.grid.columnList.toArray().find((c) => c.id === id);
38758
- const updateColumnHierarchy = (column, updater) => {
38759
- const changed = [];
38760
- const queue = [column];
38761
- while (queue.length) {
38762
- const current = queue.shift();
38763
- if (!current) {
38764
- continue;
38765
- }
38766
- const didChange = updater(current);
38767
- if (didChange) {
38768
- changed.push(current);
38769
- }
38770
- if (current.hasChildren && current.childrenArray?.length) {
38771
- queue.push(...current.childrenArray);
38772
- }
38773
- }
38774
- return changed;
38775
- };
38776
- commands.forEach((cmd) => {
38777
- let displayMessage = cmd.message || '';
38778
- if (this.isColumnCommand(cmd.type)) {
38779
- if (cmd.id) {
38780
- const column = findColumnById(cmd.id);
38781
- const replacement = this.getColumnReplacement(column);
38782
- displayMessage = this.replaceQuotedColumnId(displayMessage, replacement);
38783
- }
38784
- }
38785
- messages.push(displayMessage);
38786
- switch (cmd.type) {
38787
- case 'GridSort':
38788
- if (!isSortable) {
38789
- break;
38790
- }
38791
- // cmd.sort is a SortDescriptor - replace or merge with existing sort
38792
- this.processArrayResponse([cmd.sort], this.ctx.grid.currentState.sort || [], (item) => item.field, (mergedArray) => this.ctx.grid.sortChange.next(mergedArray));
38793
- break;
38794
- case 'GridClearSort':
38795
- if (!isSortable) {
38796
- break;
38797
- }
38798
- this.ctx.grid.sortChange.next([]);
38799
- break;
38800
- case 'GridFilter':
38801
- if (!isFilterable) {
38802
- break;
38803
- }
38804
- this.processFilterResponse(cmd.filter);
38805
- break;
38806
- case 'GridClearFilter':
38807
- if (!isFilterable) {
38808
- break;
38809
- }
38810
- this.ctx.grid.filterChange.next(undefined);
38811
- break;
38812
- case 'GridGroup':
38813
- if (!isGroupable) {
38814
- break;
38815
- }
38816
- this.processArrayResponse([cmd.group], this.ctx.grid.currentState.group || [], (item) => item.field, (mergedArray) => this.ctx.grid.groupChange.next(mergedArray));
38817
- break;
38818
- case 'GridClearGroup':
38819
- if (!isGroupable) {
38820
- break;
38821
- }
38822
- this.ctx.grid.groupChange.next([]);
38823
- break;
38824
- case 'GridHighlight':
38825
- if (!this.ctx.highlightDirective) {
38826
- break;
38827
- }
38828
- this.processHighlightResponse([cmd.highlight]);
38829
- break;
38830
- case 'GridClearHighlight':
38831
- if (!this.ctx.highlightDirective) {
38832
- break;
38833
- }
38834
- this.ctx.highlightDirective['setState']([]);
38835
- break;
38836
- case 'GridSelect': {
38837
- this.processSelectionResponse([cmd.select], messages);
38838
- break;
38839
- }
38840
- case 'GridClearSelect': {
38841
- const selectionInstance = this.getSelectionInstance();
38842
- if (!selectionInstance) {
38843
- this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
38844
- break;
38845
- }
38846
- this.applySelectionState(selectionInstance, []);
38847
- break;
38848
- }
38849
- case 'GridColumnResize': {
38850
- const col = findColumnById(cmd.id);
38851
- if (!col) {
38852
- break;
38853
- }
38854
- // parse size (accept numeric or strings like '200px')
38855
- let newWidth;
38856
- if (typeof cmd.size === 'number') {
38857
- newWidth = cmd.size;
38858
- }
38859
- else if (typeof cmd.size === 'string') {
38860
- const numericPart = parseFloat(cmd.size);
38861
- if (!isNaN(numericPart)) {
38862
- newWidth = numericPart;
38863
- }
38864
- }
38865
- if (typeof newWidth === 'number') {
38866
- const oldWidth = col.width;
38867
- // set the column width (ColumnBase.width setter handles string -> number)
38868
- col.width = newWidth;
38869
- // emit columnResize event with ColumnResizeArgs[]
38870
- const args = [{ column: col, oldWidth: oldWidth, newWidth: newWidth }];
38871
- this.ctx.grid.columnResize.emit(args);
38872
- }
38873
- break;
38874
- }
38875
- case 'GridColumnReorder': {
38876
- const col = findColumnById(cmd.id);
38877
- if (!col) {
38878
- break;
38879
- }
38880
- const newPosition = Number(cmd.position);
38881
- if (!isNaN(newPosition) && newPosition >= 0) {
38882
- this.changeColumnPosition(col, newPosition);
38883
- }
38884
- break;
38885
- }
38886
- case 'GridColumnShow':
38887
- case 'GridColumnHide': {
38888
- const col = findColumnById(cmd.id);
38889
- if (!col) {
38890
- break;
38891
- }
38892
- const targetHidden = cmd.type === 'GridColumnHide';
38893
- const changed = updateColumnHierarchy(col, (current) => {
38894
- if (current.hidden === targetHidden) {
38895
- return false;
38896
- }
38897
- current.hidden = targetHidden;
38898
- return true;
38899
- });
38900
- if (changed.length) {
38901
- this.columnInfoService.changeVisibility(changed);
38902
- }
38903
- break;
38904
- }
38905
- case 'GridColumnLock':
38906
- case 'GridColumnUnlock': {
38907
- const col = findColumnById(cmd.id);
38908
- if (!col) {
38909
- break;
38910
- }
38911
- const targetLocked = cmd.type === 'GridColumnLock';
38912
- const changed = updateColumnHierarchy(col, (current) => {
38913
- if (current.locked === targetLocked) {
38914
- return false;
38915
- }
38916
- current.locked = targetLocked;
38917
- return true;
38918
- });
38919
- if (changed.length) {
38920
- this.columnInfoService.changeLocked(changed);
38921
- }
38922
- break;
38923
- }
38924
- case 'GridPage': {
38925
- this.processPageCommand(cmd);
38926
- break;
38927
- }
38928
- case 'GridPageSize': {
38929
- this.processPageSizeCommand(cmd);
38930
- break;
38931
- }
38932
- case 'GridExportExcel': {
38933
- this.runExportWithFileName(this.ctx.excelComponent, cmd.fileName, () => this.ctx.grid.saveAsExcel());
38934
- break;
38935
- }
38936
- case 'GridExportPDF': {
38937
- this.runExportWithFileName(this.ctx.pdfComponent, cmd.fileName, () => this.ctx.grid.emitPDFExportEvent());
38938
- break;
38939
- }
38940
- default:
38941
- // Unknown command - ignore
38942
- break;
38943
- }
38944
- });
38945
- }
38946
- runExportWithFileName(component, fileName, action) {
38947
- if (!component || !fileName) {
38948
- action();
38949
- return;
38950
- }
38951
- const previousFileName = component.fileName;
38952
- component.fileName = fileName;
38953
- action();
38954
- const isExcel = component === this.ctx.excelComponent;
38955
- if (isExcel) {
38956
- this.zone.runOutsideAngular(() => {
38957
- this.ctx.excelComponent.fileCreated.subscribe(() => {
38958
- component.fileName = previousFileName;
38959
- });
38960
- });
38961
- }
38962
- else {
38963
- component.fileName = previousFileName;
38964
- }
38965
- }
38966
- processPageCommand(command) {
38967
- const pageSize = this.getCurrentPageSizeValue();
38968
- if (!isPresent$1(pageSize) || pageSize <= 0) {
38969
- return;
38970
- }
38971
- const total = this.getTotalItemsCount();
38972
- const requestedPage = Number(command.page);
38973
- let targetPage = Number.isFinite(requestedPage) ? Math.floor(requestedPage) : 1;
38974
- if (targetPage < 1) {
38975
- targetPage = 1;
38976
- }
38977
- if (isPresent$1(total) && pageSize > 0) {
38978
- const maxPage = Math.max(1, Math.ceil(total / pageSize));
38979
- targetPage = Math.min(targetPage, maxPage);
38980
- }
38981
- const skip = (targetPage - 1) * pageSize;
38982
- this.emitGridPageChange(skip, pageSize);
38983
- }
38984
- processPageSizeCommand(command) {
38985
- const rawPageSize = Number(command.pageSize);
38986
- if (!Number.isFinite(rawPageSize)) {
38987
- return;
38988
- }
38989
- const newPageSize = Math.max(1, Math.floor(rawPageSize));
38990
- const skip = Math.max(0, this.ctx.grid?.skip ?? 0);
38991
- this.ensurePageSizeOption(newPageSize);
38992
- this.emitGridPageChange(skip, newPageSize);
38993
- }
38994
- emitGridPageChange(skip, take) {
38995
- const grid = this.ctx.grid;
38996
- const normalizedSkip = Math.max(0, Math.floor(skip));
38997
- const normalizedTake = Math.max(1, Math.floor(take));
38998
- grid.skip = normalizedSkip;
38999
- grid.pageSize = normalizedTake;
39000
- grid.pageChange.emit({ skip: normalizedSkip, take: normalizedTake });
39001
- }
39002
- ensurePageSizeOption(pageSize) {
39003
- const grid = this.ctx.grid;
39004
- if (!grid) {
39005
- return;
39006
- }
39007
- const pageable = grid.pageable;
39008
- if (!pageable || typeof pageable === 'boolean') {
39009
- return;
39010
- }
39011
- const pageSizes = pageable.pageSizes;
39012
- if (!Array.isArray(pageSizes) || pageSizes.length === 0) {
39013
- return;
39014
- }
39015
- if (pageSizes.includes(pageSize)) {
39016
- return;
39017
- }
39018
- const uniqueSizes = [pageSize, ...pageSizes.filter(size => size !== pageSize)];
39019
- grid.pageable = {
39020
- ...pageable,
39021
- pageSizes: uniqueSizes
39022
- };
39023
- const changeDetector = grid?.changeDetectorRef;
39024
- if (changeDetector && typeof changeDetector.markForCheck === 'function') {
39025
- changeDetector.markForCheck();
39026
- }
39027
- }
39028
- getCurrentPageSizeValue() {
39029
- const grid = this.ctx.grid;
39030
- if (!grid) {
39031
- return null;
39032
- }
39033
- const candidates = [grid.pageSize, grid.currentState?.take, this.ctx.dataBindingDirective?.['state']?.take];
39034
- for (const candidate of candidates) {
39035
- if (typeof candidate === 'number' && candidate > 0) {
39036
- return candidate;
39037
- }
39038
- }
39039
- const pageable = grid.pageable;
39040
- if (pageable && typeof pageable === 'object' && Array.isArray(pageable.pageSizes)) {
39041
- const numericSize = pageable.pageSizes.find(size => typeof size === 'number' && size > 0);
39042
- if (numericSize) {
39043
- return numericSize;
39044
- }
39045
- }
39046
- const originalData = this.ctx.dataBindingDirective?.['originalData'];
39047
- if (Array.isArray(originalData) && originalData.length > 0) {
39048
- return originalData.length;
39049
- }
39050
- return null;
39051
- }
39052
- getTotalItemsCount() {
39053
- const grid = this.ctx.grid;
39054
- if (!grid) {
39055
- return null;
39056
- }
39057
- const gridData = grid.data;
39058
- if (gridData && typeof gridData.total === 'number') {
39059
- return gridData.total;
39060
- }
39061
- const view = grid.view;
39062
- if (view && typeof view.total === 'number') {
39063
- return view.total;
39064
- }
39065
- const originalData = this.ctx.dataBindingDirective?.['originalData'];
39066
- if (Array.isArray(originalData)) {
39067
- return originalData.length;
39068
- }
39069
- return null;
39070
- }
39071
- getSelectionInstance() {
39072
- const selectionDirective = this.ctx.grid?.selectionDirective;
39073
- if (selectionDirective && typeof selectionDirective === 'object') {
39074
- return selectionDirective;
39075
- }
39076
- const defaultSelection = this.ctx.grid?.defaultSelection;
39077
- if (defaultSelection && typeof defaultSelection === 'object') {
39078
- return defaultSelection;
39079
- }
39080
- return null;
39081
- }
39082
- updateLastMessage(messages, newMessage) {
39083
- if (!messages.length) {
39084
- return;
39085
- }
39086
- messages[messages.length - 1] = newMessage;
39087
- }
39088
- getHighlightItems(descriptors) {
39089
- if (!descriptors?.length) {
39090
- return [];
39091
- }
39092
- const data = this.ctx.dataBindingDirective?.['originalData'] || [];
39093
- return highlightBy(data, descriptors, this.columns);
39094
- }
39095
- processSelectionResponse(selection, messages) {
39096
- const selectionInstance = this.getSelectionInstance();
39097
- if (!selectionInstance) {
39098
- this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
39099
- return;
39100
- }
39101
- const descriptors = (selection || []).filter((descriptor) => Boolean(descriptor));
39102
- if (descriptors.length === 0) {
39103
- this.applySelectionState(selectionInstance, []);
39104
- return;
39105
- }
39106
- const highlightItems = this.getHighlightItems(descriptors);
39107
- if (!highlightItems.length) {
39108
- this.applySelectionState(selectionInstance, []);
39109
- return;
39110
- }
39111
- const hasCellSelections = highlightItems.some(item => isPresent$1(item.columnKey));
39112
- const hasRowSelections = highlightItems.some(item => !isPresent$1(item.columnKey));
39113
- const isCellMode = selectionInstance.isCellSelectionMode;
39114
- if ((!isCellMode && hasCellSelections) || (isCellMode && hasRowSelections)) {
39115
- const key = isCellMode ? 'aiAssistantSelectionRowModeRequired' : 'aiAssistantSelectionCellModeRequired';
39116
- this.updateLastMessage(messages, this.ctx.localization?.get(key));
39117
- return;
39118
- }
39119
- const selectionState = this.mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode);
39120
- this.applySelectionState(selectionInstance, selectionState);
39121
- }
39122
- mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode) {
39123
- const data = this.ctx.dataBindingDirective?.['originalData'] || [];
39124
- if (isCellMode) {
39125
- const mapped = highlightItems
39126
- .filter(item => isPresent$1(item.itemKey) && isPresent$1(item.columnKey))
39127
- .map(item => {
39128
- const rowIndex = item.itemKey;
39129
- const columnIndex = item.columnKey;
39130
- const dataItem = data[rowIndex];
39131
- if (!isPresent$1(dataItem)) {
39132
- return null;
39133
- }
39134
- if (typeof selectionInstance['getSelectionItem'] === 'function') {
39135
- const columnComponent = this.leafColumns[columnIndex];
39136
- const selectionItem = selectionInstance['getSelectionItem']({ dataItem, index: rowIndex }, columnComponent, columnIndex);
39137
- if (selectionItem && isPresent$1(selectionItem.itemKey) && isPresent$1(selectionItem.columnKey)) {
39138
- return selectionItem;
39139
- }
39140
- return null;
39141
- }
39142
- const itemKey = typeof selectionInstance.getItemKey === 'function'
39143
- ? selectionInstance.getItemKey({ dataItem, index: rowIndex })
39144
- : rowIndex;
39145
- return isPresent$1(itemKey) ? { itemKey, columnKey: columnIndex } : null;
39146
- })
39147
- .filter((item) => isPresent$1(item));
39148
- return mapped.filter((item, index, self) => self.findIndex(other => other.itemKey === item.itemKey && other.columnKey === item.columnKey) === index);
39149
- }
39150
- const rowKeys = highlightItems
39151
- .filter(item => isPresent$1(item.itemKey))
39152
- .map(item => {
39153
- const rowIndex = item.itemKey;
39154
- const dataItem = data[rowIndex];
39155
- if (!isPresent$1(dataItem)) {
39156
- return null;
39157
- }
39158
- if (typeof selectionInstance.getItemKey === 'function') {
39159
- return selectionInstance.getItemKey({ dataItem, index: rowIndex });
39160
- }
39161
- return rowIndex;
39162
- })
39163
- .filter(isPresent$1);
39164
- return Array.from(new Set(rowKeys));
39165
- }
39166
- applySelectionState(selectionInstance, selectionState) {
39167
- selectionInstance.selectedKeys = selectionState;
39168
- if (typeof selectionInstance['setState'] === 'function') {
39169
- selectionInstance['setState'](selectionState);
39170
- }
39171
- const changeDetector = selectionInstance['cd'];
39172
- if (changeDetector && typeof changeDetector.markForCheck === 'function') {
39173
- changeDetector.markForCheck();
39174
- }
39175
- if (typeof selectionInstance['notifyChange'] === 'function') {
39176
- selectionInstance['notifyChange']();
39177
- }
39178
- }
39179
- replaceQuotedColumnId(message, replacement) {
39180
- if (!replacement) {
39181
- const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")\s*/g;
39182
- return message.replace(columnIdPattern, '').replace(/\s{2,}/g, ' ').trim();
39183
- }
39184
- const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")/g;
39185
- return message.replace(columnIdPattern, (match) => {
39186
- const isEncoded = match.startsWith('&quot;');
39187
- return isEncoded ? `&quot;${replacement}&quot;` : `"${replacement}"`;
39188
- });
39189
- }
39190
- isColumnCommand(type) {
39191
- return type === 'GridColumnResize' ||
39192
- type === 'GridColumnReorder' ||
39193
- type === 'GridColumnShow' ||
39194
- type === 'GridColumnHide' ||
39195
- type === 'GridColumnLock' ||
39196
- type === 'GridColumnUnlock';
39197
- }
39198
- getColumnReplacement(column) {
39199
- if (!column) {
39200
- return '';
39201
- }
39202
- if (column.title && String(column.title).trim()) {
39203
- return String(column.title).trim();
39204
- }
39205
- if (column.field && String(column.field).trim()) {
39206
- return String(column.field).trim();
39207
- }
39208
- return '';
39209
- }
39210
- processHighlightResponse(highlight) {
39211
- const highlightedItems = this.getHighlightItems(highlight);
39212
- this.ctx.highlightDirective['setState'](highlightedItems);
39213
- }
39214
- processFilterResponse(filter) {
39215
- const processedFilter = convertDateStringsInFilter(filter);
39216
- const clearFilter = Object.keys(processedFilter).length === 0;
39217
- if (clearFilter) {
39218
- this.ctx.grid.filterChange.next(undefined);
39219
- }
39220
- else if (processedFilter?.filters.length) {
39221
- const currentFilter = this.ctx.grid.currentState.filter;
39222
- let mergedFilter = processedFilter;
39223
- if (currentFilter && currentFilter.filters?.length > 0) {
39224
- mergedFilter = {
39225
- logic: 'and',
39226
- filters: [
39227
- currentFilter,
39228
- processedFilter
39229
- ]
39230
- };
39231
- }
39232
- this.ctx.grid.filterChange.next(mergedFilter);
39233
- }
39234
- }
39235
- changeColumnPosition(column, newPosition) {
39236
- const grid = this.ctx.grid;
39237
- if (!grid?.columns) {
39238
- return;
39239
- }
39240
- const currentColumns = grid.columns.toArray();
39241
- const currentIndex = currentColumns.findIndex(col => col === column);
39242
- if (currentIndex === -1) {
39243
- return;
39244
- }
39245
- if (newPosition < 0 || newPosition >= currentColumns.length) {
39246
- return;
39247
- }
39248
- const sortedColumns = currentColumns
39249
- .map((col, idx) => ({ col, physicalIndex: idx, visualOrder: col.orderIndex ?? idx }))
39250
- .sort((a, b) => a.visualOrder - b.visualOrder);
39251
- const currentVisualPos = sortedColumns.findIndex(item => item.physicalIndex === currentIndex);
39252
- if (currentVisualPos === newPosition) {
39253
- return;
39254
- }
39255
- currentColumns.forEach((col, idx) => {
39256
- const sortedIndex = sortedColumns.findIndex(item => item.physicalIndex === idx);
39257
- if (idx === currentIndex) {
39258
- col.orderIndex = newPosition;
39259
- }
39260
- else if (currentVisualPos < newPosition) {
39261
- col.orderIndex = (sortedIndex > currentVisualPos && sortedIndex <= newPosition)
39262
- ? sortedIndex - 1 : sortedIndex;
39263
- }
39264
- else {
39265
- col.orderIndex = (sortedIndex >= newPosition && sortedIndex < currentVisualPos)
39266
- ? sortedIndex + 1 : sortedIndex;
39267
- }
39268
- col.isReordered = true;
39269
- });
39270
- grid.columnReorder.emit({
39271
- column: column,
39272
- oldIndex: currentVisualPos,
39273
- newIndex: newPosition
39274
- });
39275
- }
39276
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AiAssistantComponent, deps: [{ token: i1$8.HttpClient }, { token: ContextService }, { token: ColumnInfoService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
39395
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AiAssistantComponent, deps: [{ token: i1$8.HttpClient }, { token: ContextService }, { token: ColumnInfoService }, { token: i0.NgZone }, { token: GridAIRequestResponseService }], target: i0.ɵɵFactoryTarget.Component });
39277
39396
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AiAssistantComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "aiPrompt", first: true, predicate: AIPromptComponent, descendants: true }], ngImport: i0, template: `
39278
39397
  <kendo-aiprompt
39279
39398
  #aiPrompt
@@ -39377,7 +39496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
39377
39496
  </kendo-aiprompt>
39378
39497
  `
39379
39498
  }]
39380
- }], ctorParameters: () => [{ type: i1$8.HttpClient }, { type: ContextService }, { type: ColumnInfoService }, { type: i0.NgZone }], propDecorators: { aiPrompt: [{
39499
+ }], ctorParameters: () => [{ type: i1$8.HttpClient }, { type: ContextService }, { type: ColumnInfoService }, { type: i0.NgZone }, { type: GridAIRequestResponseService }], propDecorators: { aiPrompt: [{
39381
39500
  type: ViewChild,
39382
39501
  args: [AIPromptComponent]
39383
39502
  }] } });