@progress/kendo-angular-grid 21.2.0 → 21.3.0-develop.2

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.
@@ -2109,6 +2109,7 @@ let sequence = 0;
2109
2109
  */
2110
2110
  class IdService {
2111
2111
  prefix;
2112
+ columnCounter = 0;
2112
2113
  constructor() {
2113
2114
  this.prefix = `k-grid${sequence++}`;
2114
2115
  }
@@ -2127,6 +2128,9 @@ class IdService {
2127
2128
  columnId(colIndex) {
2128
2129
  return `${this.prefix}-col${colIndex}`;
2129
2130
  }
2131
+ nextColumnId() {
2132
+ return `${this.prefix}-col${this.columnCounter++}`;
2133
+ }
2130
2134
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2131
2135
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService });
2132
2136
  }
@@ -2208,7 +2212,6 @@ const isCheckboxColumn = column => column?.isCheckboxColumn;
2208
2212
  */
2209
2213
  const isRowReorderColumn = column => column?.isRowReorderColumn;
2210
2214
  const isColumnContainer = column => column?.isColumnGroup || isSpanColumn(column);
2211
- let columnId = 0;
2212
2215
  /**
2213
2216
  * The base class for the column components of the Grid.
2214
2217
  *
@@ -2539,7 +2542,7 @@ class ColumnBase {
2539
2542
  if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
2540
2543
  throw new Error(ColumnConfigurationErrorMessages.columnNested);
2541
2544
  }
2542
- this._id = this.idService?.columnId(columnId++);
2545
+ this._id = this.idService?.nextColumnId();
2543
2546
  }
2544
2547
  ngAfterViewInit() {
2545
2548
  this.initialMinResizableWidth = this.minResizableWidth || 10;
@@ -14957,7 +14960,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
14957
14960
  </kendo-grid-columnmenu-item>
14958
14961
  `,
14959
14962
  standalone: true,
14960
- imports: [ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnListComponent, ColumnChooserContentComponent]
14963
+ imports: [ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnChooserContentComponent]
14961
14964
  }]
14962
14965
  }], ctorParameters: () => [{ type: ContextService }, { type: ColumnInfoService }, { type: i0.ElementRef }], propDecorators: { expand: [{
14963
14966
  type: Output
@@ -16230,7 +16233,7 @@ class ColumnMenuComponent {
16230
16233
  >
16231
16234
  </kendo-grid-columnmenu-autosize-column>
16232
16235
  }
16233
-
16236
+
16234
16237
  @if (hasAutoSizeAllColumns) {
16235
16238
  <kendo-grid-columnmenu-autosize-all-columns
16236
16239
  #autoSizeAllColumnsItem
@@ -16358,7 +16361,7 @@ class ColumnMenuComponent {
16358
16361
  }
16359
16362
  </kendo-tabstrip>
16360
16363
  </ng-template>
16361
-
16364
+
16362
16365
  `, 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
16366
  }
16364
16367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuComponent, decorators: [{
@@ -16441,7 +16444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
16441
16444
  >
16442
16445
  </kendo-grid-columnmenu-autosize-column>
16443
16446
  }
16444
-
16447
+
16445
16448
  @if (hasAutoSizeAllColumns) {
16446
16449
  <kendo-grid-columnmenu-autosize-all-columns
16447
16450
  #autoSizeAllColumnsItem
@@ -16569,7 +16572,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
16569
16572
  }
16570
16573
  </kendo-tabstrip>
16571
16574
  </ng-template>
16572
-
16575
+
16573
16576
  `,
16574
16577
  standalone: true,
16575
16578
  imports: [
@@ -16591,7 +16594,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
16591
16594
  TabTitleDirective,
16592
16595
  TabContentDirective,
16593
16596
  FilterMenuContainerComponent,
16594
- ColumnListComponent,
16595
16597
  ColumnChooserContentComponent
16596
16598
  ]
16597
16599
  }]
@@ -19727,7 +19729,7 @@ class HeaderComponent {
19727
19729
  }
19728
19730
  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
19731
  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) {
19732
+ @for (i of columnLevels; track $index; let levelIndex = $index) {
19731
19733
  <tr
19732
19734
  kendoGridLogicalRow
19733
19735
  [logicalRowIndex]="levelIndex"
@@ -19748,7 +19750,7 @@ class HeaderComponent {
19748
19750
  >
19749
19751
  </th>
19750
19752
  }
19751
- @for (column of columnsForLevel(levelIndex); track column; let columnIndex = $index; let last = $last) {
19753
+ @for (column of columnsForLevel(levelIndex); track column.id; let columnIndex = $index; let last = $last) {
19752
19754
  @if (!isColumnGroupComponent(column)) {
19753
19755
  <th
19754
19756
  kendoGridLogicalCell
@@ -19975,7 +19977,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
19975
19977
  args: [{
19976
19978
  selector: '[kendoGridHeader]',
19977
19979
  template: `
19978
- @for (i of columnLevels; track i; let levelIndex = $index) {
19980
+ @for (i of columnLevels; track $index; let levelIndex = $index) {
19979
19981
  <tr
19980
19982
  kendoGridLogicalRow
19981
19983
  [logicalRowIndex]="levelIndex"
@@ -19996,7 +19998,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
19996
19998
  >
19997
19999
  </th>
19998
20000
  }
19999
- @for (column of columnsForLevel(levelIndex); track column; let columnIndex = $index; let last = $last) {
20001
+ @for (column of columnsForLevel(levelIndex); track column.id; let columnIndex = $index; let last = $last) {
20000
20002
  @if (!isColumnGroupComponent(column)) {
20001
20003
  <th
20002
20004
  kendoGridLogicalCell
@@ -23575,466 +23577,1164 @@ const packageMetadata = {
23575
23577
  productName: 'Kendo UI for Angular',
23576
23578
  productCode: 'KENDOUIANGULAR',
23577
23579
  productCodes: ['KENDOUIANGULAR'],
23578
- publishDate: 1764751621,
23579
- version: '21.2.0',
23580
+ publishDate: 1764927764,
23581
+ version: '21.3.0-develop.2',
23580
23582
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
23581
23583
  };
23582
23584
 
23583
23585
  /**
23584
23586
  * @hidden
23587
+ * Converts date strings in a filter to Date objects.
23585
23588
  */
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);
23589
+ const convertDateStringsInFilter = (filter) => {
23590
+ if (!filter) {
23591
+ return filter;
23637
23592
  }
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
- });
23593
+ if (filter.filters && Array.isArray(filter.filters)) {
23594
+ return {
23595
+ ...filter,
23596
+ filters: filter.filters.map(f => convertDateStringsInFilter(f))
23597
+ };
23666
23598
  }
23667
- ngOnDestroy() {
23668
- if (this.subscriptions) {
23669
- this.subscriptions.unsubscribe();
23670
- this.subscriptions = null;
23599
+ if (filter.field && filter.value !== undefined) {
23600
+ if (typeof filter.value === 'string' && isDateOperator(filter.operator)) {
23601
+ const date = parseDate(filter.value);
23602
+ return {
23603
+ ...filter,
23604
+ value: date || filter.value
23605
+ };
23671
23606
  }
23672
23607
  }
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];
23608
+ return filter;
23705
23609
  };
23706
23610
  /**
23707
23611
  * @hidden
23708
23612
  */
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);
23613
+ const isDateOperator = (operator) => {
23614
+ const dateOperators = [
23615
+ 'eq', 'neq', 'lt', 'lte', 'gt', 'gte'
23616
+ ];
23617
+ return dateOperators.includes(operator);
23715
23618
  };
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
23619
  /**
23755
23620
  * @hidden
23621
+ * Processes cell highlights for a specific filter and item.
23756
23622
  */
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}`;
23623
+ const processCellHighlights = (filter, rowIndex, columns, highlightItems) => {
23624
+ Object.keys(filter.cells).forEach((columnField) => {
23625
+ const actualColumnIndex = Array.from(columns).findIndex((col) => col.field === columnField);
23626
+ if (actualColumnIndex !== -1) {
23627
+ highlightItems.push({
23628
+ itemKey: rowIndex,
23629
+ columnKey: actualColumnIndex,
23630
+ });
23631
+ }
23632
+ });
23782
23633
  };
23783
23634
  /**
23784
23635
  * @hidden
23636
+ * Processes filtered results and adds highlight items.
23785
23637
  */
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
- };
23638
+ const processFilteredResults = (filteredResults, data, filter, columns, highlightItems) => {
23639
+ filteredResults?.forEach((item) => {
23640
+ const rowIndex = data.findIndex((dataItem) => dataItem === item);
23641
+ if (filter.cells && Object.keys(filter.cells).length > 0) {
23642
+ processCellHighlights(filter, rowIndex, columns, highlightItems);
23853
23643
  }
23854
23644
  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
- }
23645
+ highlightItems.push({
23646
+ itemKey: rowIndex,
23873
23647
  });
23874
23648
  }
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
-
23649
+ });
23650
+ };
23902
23651
  /**
23903
23652
  * @hidden
23653
+ * Highlights items in a grid based on the provided filters and columns.
23654
+ * @param data - The data to be highlighted.
23655
+ * @param filters - The composite highlight descriptors containing the filters and logic.
23656
+ * @param columns - The columns of the grid.
23657
+ * @returns An array of HighlightItem objects representing the highlighted items.
23904
23658
  */
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
23659
+ const highlightBy = (data, filters, columns) => {
23660
+ const highlightItems = [];
23661
+ filters.forEach((filter) => {
23662
+ const processedFilters = filter.filters.map((filter) => convertDateStringsInFilter(filter));
23663
+ const filteredResults = filterBy(data, {
23664
+ logic: filter.logic || "and",
23665
+ filters: processedFilters,
23946
23666
  });
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
- }
23667
+ processFilteredResults(filteredResults, data, filter, columns, highlightItems);
23668
+ });
23669
+ return highlightItems;
23670
+ };
23983
23671
 
23984
23672
  /**
23985
23673
  * @hidden
23986
23674
  *
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).
23675
+ * Service that builds AI requests and processes AI responses for the Grid.
23676
+ * Used internally by both the Grid component and the AI Assistant tool.
23990
23677
  */
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;
23678
+ class GridAIRequestResponseService {
23679
+ ctx;
23680
+ columnInfoService;
23681
+ zone;
23682
+ constructor(ctx, columnInfoService, zone) {
23683
+ this.ctx = ctx;
23684
+ this.columnInfoService = columnInfoService;
23685
+ this.zone = zone;
24001
23686
  }
24002
23687
  /**
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'}
23688
+ * Builds the request body for the AI service based on the Grid's column structure.
23689
+ * Returns a column descriptor tree that includes column metadata for the AI service.
24009
23690
  */
24010
- keysX = new Map();
23691
+ buildRequestBody(promptMessage, role) {
23692
+ const columnsTree = this.buildColumnDescriptors();
23693
+ return {
23694
+ role: role || 'user',
23695
+ contents: [
23696
+ {
23697
+ text: promptMessage
23698
+ }
23699
+ ],
23700
+ columns: columnsTree
23701
+ };
23702
+ }
24011
23703
  /**
24012
- * Count each added or deleted key manually to avoid iterating over all items when calling `this.size`.
23704
+ * Builds a nested column descriptor tree based on the Grid's column structure.
23705
+ * Includes root columns and their nested children (for ColumnGroup and SpanColumn).
24013
23706
  */
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]);
23707
+ buildColumnDescriptors() {
23708
+ const rootColumns = this.ctx?.grid?.columnList?.rootColumns() || [];
23709
+ const buildDescriptor = (col) => {
23710
+ const hasChildren = Boolean(col.hasChildren && col.childrenArray?.length);
23711
+ const descriptor = {
23712
+ id: col.id,
23713
+ field: col.field,
23714
+ header: col.title
23715
+ };
23716
+ if (hasChildren) {
23717
+ descriptor.columns = col.childrenArray.map((c) => buildDescriptor(c));
23718
+ }
23719
+ // For special columns that don't have a field, emit an optional type token
23720
+ // so the AI service knows how to treat them (checkbox/command/reorder)
23721
+ if (!col.field) {
23722
+ if (isCheckboxColumn(col)) {
23723
+ descriptor.type = 'checkbox';
24020
23724
  }
24021
- else {
24022
- this.addSingle(item[keyXField]);
23725
+ else if (col instanceof CommandColumnComponent) {
23726
+ descriptor.type = 'command';
24023
23727
  }
24024
- });
24025
- }
23728
+ }
23729
+ return descriptor;
23730
+ };
23731
+ return rootColumns.map((col) => buildDescriptor(col));
24026
23732
  }
24027
23733
  /**
24028
- * Adds a single key entry.
23734
+ * Processes AI response commands and applies them to the Grid.
23735
+ * Returns an array of display messages for each command.
24029
23736
  */
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
- }
23737
+ processCommands(commands, columns, leafColumns) {
23738
+ const messages = [];
23739
+ this.executeCommands(commands || [], columns, leafColumns, messages);
23740
+ return messages;
23741
+ }
23742
+ executeCommands(commands, columns, leafColumns, messages) {
23743
+ if (!commands?.length) {
23744
+ return;
23745
+ }
23746
+ const grid = this.ctx.grid;
23747
+ const isFilterable = Boolean(grid.filterable);
23748
+ const isSortable = Boolean(grid.sortable);
23749
+ const isGroupable = Boolean(grid.groupable);
23750
+ const findColumnById = (id) => grid.columnList.toArray().find((c) => c.id === id);
23751
+ const updateColumnHierarchy = (column, updater) => {
23752
+ const changed = [];
23753
+ const queue = [column];
23754
+ while (queue.length) {
23755
+ const current = queue.shift();
23756
+ if (!current) {
23757
+ continue;
23758
+ }
23759
+ const didChange = updater(current);
23760
+ if (didChange) {
23761
+ changed.push(current);
23762
+ }
23763
+ if (current.hasChildren && current.childrenArray?.length) {
23764
+ queue.push(...current.childrenArray);
23765
+ }
23766
+ }
23767
+ return changed;
23768
+ };
23769
+ commands.forEach((cmd) => {
23770
+ let displayMessage = cmd.message || '';
23771
+ if (this.isColumnCommand(cmd.type)) {
23772
+ if (cmd.id) {
23773
+ const column = findColumnById(cmd.id);
23774
+ const replacement = this.getColumnReplacement(column);
23775
+ displayMessage = this.replaceQuotedColumnId(displayMessage, replacement);
23776
+ }
23777
+ }
23778
+ messages.push(displayMessage);
23779
+ switch (cmd.type) {
23780
+ case 'GridSort':
23781
+ if (!isSortable) {
23782
+ break;
23783
+ }
23784
+ this.processArrayResponse([cmd.sort], grid.currentState.sort || [], (item) => item.field, (mergedArray) => grid.sortChange.next(mergedArray));
23785
+ break;
23786
+ case 'GridClearSort':
23787
+ if (!isSortable) {
23788
+ break;
23789
+ }
23790
+ grid.sortChange.next([]);
23791
+ break;
23792
+ case 'GridFilter':
23793
+ if (!isFilterable) {
23794
+ break;
23795
+ }
23796
+ this.processFilterResponse(cmd.filter);
23797
+ break;
23798
+ case 'GridClearFilter':
23799
+ if (!isFilterable) {
23800
+ break;
23801
+ }
23802
+ grid.filterChange.next(undefined);
23803
+ break;
23804
+ case 'GridGroup':
23805
+ if (!isGroupable) {
23806
+ break;
23807
+ }
23808
+ this.processArrayResponse([cmd.group], grid.currentState.group || [], (item) => item.field, (mergedArray) => grid.groupChange.next(mergedArray));
23809
+ break;
23810
+ case 'GridClearGroup':
23811
+ if (!isGroupable) {
23812
+ break;
23813
+ }
23814
+ grid.groupChange.next([]);
23815
+ break;
23816
+ case 'GridHighlight':
23817
+ if (!this.ctx.highlightDirective) {
23818
+ break;
23819
+ }
23820
+ this.processHighlightResponse([cmd.highlight], columns);
23821
+ break;
23822
+ case 'GridClearHighlight':
23823
+ if (!this.ctx.highlightDirective) {
23824
+ break;
23825
+ }
23826
+ this.ctx.highlightDirective['setState']([]);
23827
+ break;
23828
+ case 'GridSelect': {
23829
+ this.processSelectionResponse([cmd.select], columns, leafColumns, messages);
23830
+ break;
23831
+ }
23832
+ case 'GridClearSelect': {
23833
+ const selectionInstance = this.getSelectionInstance();
23834
+ if (!selectionInstance) {
23835
+ this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
23836
+ break;
23837
+ }
23838
+ this.applySelectionState(selectionInstance, []);
23839
+ break;
23840
+ }
23841
+ case 'GridColumnResize': {
23842
+ const col = findColumnById(cmd.id);
23843
+ if (!col) {
23844
+ break;
23845
+ }
23846
+ let newWidth;
23847
+ if (typeof cmd.size === 'number') {
23848
+ newWidth = cmd.size;
23849
+ }
23850
+ else if (typeof cmd.size === 'string') {
23851
+ const numericPart = parseFloat(cmd.size);
23852
+ if (!isNaN(numericPart)) {
23853
+ newWidth = numericPart;
23854
+ }
23855
+ }
23856
+ if (typeof newWidth === 'number') {
23857
+ const oldWidth = col.width;
23858
+ col.width = newWidth;
23859
+ const args = [{ column: col, oldWidth: oldWidth, newWidth: newWidth }];
23860
+ grid.columnResize.emit(args);
23861
+ }
23862
+ break;
23863
+ }
23864
+ case 'GridColumnReorder': {
23865
+ const col = findColumnById(cmd.id);
23866
+ if (!col) {
23867
+ break;
23868
+ }
23869
+ const newPosition = Number(cmd.position);
23870
+ if (!isNaN(newPosition) && newPosition >= 0) {
23871
+ this.changeColumnPosition(col, newPosition);
23872
+ }
23873
+ break;
23874
+ }
23875
+ case 'GridColumnShow':
23876
+ case 'GridColumnHide': {
23877
+ const col = findColumnById(cmd.id);
23878
+ if (!col) {
23879
+ break;
23880
+ }
23881
+ const targetHidden = cmd.type === 'GridColumnHide';
23882
+ const changed = updateColumnHierarchy(col, (current) => {
23883
+ if (current.hidden === targetHidden) {
23884
+ return false;
23885
+ }
23886
+ current.hidden = targetHidden;
23887
+ return true;
23888
+ });
23889
+ if (changed.length) {
23890
+ this.columnInfoService.changeVisibility(changed);
23891
+ }
23892
+ break;
23893
+ }
23894
+ case 'GridColumnLock':
23895
+ case 'GridColumnUnlock': {
23896
+ const col = findColumnById(cmd.id);
23897
+ if (!col) {
23898
+ break;
23899
+ }
23900
+ const targetLocked = cmd.type === 'GridColumnLock';
23901
+ const changed = updateColumnHierarchy(col, (current) => {
23902
+ if (current.locked === targetLocked) {
23903
+ return false;
23904
+ }
23905
+ current.locked = targetLocked;
23906
+ return true;
23907
+ });
23908
+ if (changed.length) {
23909
+ this.columnInfoService.changeLocked(changed);
23910
+ }
23911
+ break;
23912
+ }
23913
+ case 'GridPage': {
23914
+ this.processPageCommand(cmd);
23915
+ break;
23916
+ }
23917
+ case 'GridPageSize': {
23918
+ this.processPageSizeCommand(cmd);
23919
+ break;
23920
+ }
23921
+ case 'GridExportExcel': {
23922
+ this.runExportWithFileName(this.ctx.excelComponent, cmd.fileName, () => grid.saveAsExcel());
23923
+ break;
23924
+ }
23925
+ case 'GridExportPDF': {
23926
+ this.runExportWithFileName(this.ctx.pdfComponent, cmd.fileName, () => grid.emitPDFExportEvent());
23927
+ break;
23928
+ }
23929
+ default:
23930
+ break;
23931
+ }
23932
+ });
23933
+ }
23934
+ processArrayResponse(newItems, currentItems, getField, updateGrid) {
23935
+ if (newItems?.length === 0) {
23936
+ updateGrid([]);
23937
+ }
23938
+ else if (newItems?.length) {
23939
+ let mergedArray = [...newItems];
23940
+ const newFields = newItems.map(getField);
23941
+ const existingItemsToKeep = currentItems.filter(item => !newFields.includes(getField(item)));
23942
+ mergedArray = [...mergedArray, ...existingItemsToKeep];
23943
+ updateGrid(mergedArray);
23944
+ }
23945
+ }
23946
+ runExportWithFileName(component, fileName, action) {
23947
+ if (!component || !fileName) {
23948
+ action();
23949
+ return;
23950
+ }
23951
+ const previousFileName = component.fileName;
23952
+ component.fileName = fileName;
23953
+ action();
23954
+ const isExcel = component === this.ctx.excelComponent;
23955
+ if (isExcel) {
23956
+ this.zone.runOutsideAngular(() => {
23957
+ this.ctx.excelComponent.fileCreated.subscribe(() => {
23958
+ component.fileName = previousFileName;
23959
+ });
23960
+ });
23961
+ }
23962
+ else {
23963
+ component.fileName = previousFileName;
23964
+ }
23965
+ }
23966
+ processPageCommand(command) {
23967
+ const pageSize = this.getCurrentPageSizeValue();
23968
+ if (!isPresent$1(pageSize) || pageSize <= 0) {
23969
+ return;
23970
+ }
23971
+ const total = this.getTotalItemsCount();
23972
+ const requestedPage = Number(command.page);
23973
+ let targetPage = Number.isFinite(requestedPage) ? Math.floor(requestedPage) : 1;
23974
+ if (targetPage < 1) {
23975
+ targetPage = 1;
23976
+ }
23977
+ if (isPresent$1(total) && pageSize > 0) {
23978
+ const maxPage = Math.max(1, Math.ceil(total / pageSize));
23979
+ targetPage = Math.min(targetPage, maxPage);
23980
+ }
23981
+ const skip = (targetPage - 1) * pageSize;
23982
+ this.emitGridPageChange(skip, pageSize);
23983
+ }
23984
+ processPageSizeCommand(command) {
23985
+ const rawPageSize = Number(command.pageSize);
23986
+ if (!Number.isFinite(rawPageSize)) {
23987
+ return;
23988
+ }
23989
+ const newPageSize = Math.max(1, Math.floor(rawPageSize));
23990
+ const skip = Math.max(0, this.ctx.grid?.skip ?? 0);
23991
+ this.ensurePageSizeOption(newPageSize);
23992
+ this.emitGridPageChange(skip, newPageSize);
23993
+ }
23994
+ emitGridPageChange(skip, take) {
23995
+ const grid = this.ctx.grid;
23996
+ const normalizedSkip = Math.max(0, Math.floor(skip));
23997
+ const normalizedTake = Math.max(1, Math.floor(take));
23998
+ grid.skip = normalizedSkip;
23999
+ grid.pageSize = normalizedTake;
24000
+ grid.pageChange.emit({ skip: normalizedSkip, take: normalizedTake });
24001
+ }
24002
+ ensurePageSizeOption(pageSize) {
24003
+ const grid = this.ctx.grid;
24004
+ if (!grid) {
24005
+ return;
24006
+ }
24007
+ const pageable = grid.pageable;
24008
+ if (!pageable || typeof pageable === 'boolean') {
24009
+ return;
24010
+ }
24011
+ const pageSizes = pageable.pageSizes;
24012
+ if (!Array.isArray(pageSizes) || pageSizes.length === 0) {
24013
+ return;
24014
+ }
24015
+ if (pageSizes.includes(pageSize)) {
24016
+ return;
24017
+ }
24018
+ const uniqueSizes = [pageSize, ...pageSizes.filter(size => size !== pageSize)];
24019
+ grid.pageable = {
24020
+ ...pageable,
24021
+ pageSizes: uniqueSizes
24022
+ };
24023
+ const changeDetector = grid?.changeDetectorRef;
24024
+ if (changeDetector && typeof changeDetector.markForCheck === 'function') {
24025
+ changeDetector.markForCheck();
24026
+ }
24027
+ }
24028
+ getCurrentPageSizeValue() {
24029
+ const grid = this.ctx.grid;
24030
+ if (!grid) {
24031
+ return null;
24032
+ }
24033
+ const candidates = [grid.pageSize, grid.currentState?.take, this.ctx.dataBindingDirective?.['state']?.take];
24034
+ for (const candidate of candidates) {
24035
+ if (typeof candidate === 'number' && candidate > 0) {
24036
+ return candidate;
24037
+ }
24038
+ }
24039
+ const pageable = grid.pageable;
24040
+ if (pageable && typeof pageable === 'object' && Array.isArray(pageable.pageSizes)) {
24041
+ const numericSize = pageable.pageSizes.find(size => typeof size === 'number' && size > 0);
24042
+ if (numericSize) {
24043
+ return numericSize;
24044
+ }
24045
+ }
24046
+ const originalData = this.ctx.dataBindingDirective?.['originalData'];
24047
+ if (Array.isArray(originalData) && originalData.length > 0) {
24048
+ return originalData.length;
24049
+ }
24050
+ return null;
24051
+ }
24052
+ getTotalItemsCount() {
24053
+ const grid = this.ctx.grid;
24054
+ if (!grid) {
24055
+ return null;
24056
+ }
24057
+ const gridData = grid.data;
24058
+ if (gridData && typeof gridData.total === 'number') {
24059
+ return gridData.total;
24060
+ }
24061
+ const view = grid.view;
24062
+ if (view && typeof view.total === 'number') {
24063
+ return view.total;
24064
+ }
24065
+ const originalData = this.ctx.dataBindingDirective?.['originalData'];
24066
+ if (Array.isArray(originalData)) {
24067
+ return originalData.length;
24068
+ }
24069
+ return null;
24070
+ }
24071
+ getSelectionInstance() {
24072
+ const selectionDirective = this.ctx.grid?.selectionDirective;
24073
+ if (selectionDirective && typeof selectionDirective === 'object') {
24074
+ return selectionDirective;
24075
+ }
24076
+ const defaultSelection = this.ctx.grid?.defaultSelection;
24077
+ if (defaultSelection && typeof defaultSelection === 'object') {
24078
+ return defaultSelection;
24079
+ }
24080
+ return null;
24081
+ }
24082
+ updateLastMessage(messages, newMessage) {
24083
+ if (!messages.length) {
24084
+ return;
24085
+ }
24086
+ messages[messages.length - 1] = newMessage;
24087
+ }
24088
+ isColumnCommand(type) {
24089
+ return type === 'GridColumnResize' ||
24090
+ type === 'GridColumnReorder' ||
24091
+ type === 'GridColumnShow' ||
24092
+ type === 'GridColumnHide' ||
24093
+ type === 'GridColumnLock' ||
24094
+ type === 'GridColumnUnlock';
24095
+ }
24096
+ getColumnReplacement(column) {
24097
+ if (!column) {
24098
+ return '';
24099
+ }
24100
+ if (column.title && String(column.title).trim()) {
24101
+ return String(column.title).trim();
24102
+ }
24103
+ if (column.field && String(column.field).trim()) {
24104
+ return String(column.field).trim();
24105
+ }
24106
+ return '';
24107
+ }
24108
+ replaceQuotedColumnId(message, replacement) {
24109
+ if (!replacement) {
24110
+ const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")\s*/g;
24111
+ return message.replace(columnIdPattern, '').replace(/\s{2,}/g, ' ').trim();
24112
+ }
24113
+ const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")/g;
24114
+ return message.replace(columnIdPattern, (match) => {
24115
+ const isEncoded = match.startsWith('&quot;');
24116
+ return isEncoded ? `&quot;${replacement}&quot;` : `"${replacement}"`;
24117
+ });
24118
+ }
24119
+ getHighlightItems(descriptors, columns) {
24120
+ if (!descriptors?.length) {
24121
+ return [];
24122
+ }
24123
+ const data = this.ctx.dataBindingDirective?.['originalData'] || [];
24124
+ return highlightBy(data, descriptors, columns);
24125
+ }
24126
+ processSelectionResponse(selection, columns, leafColumns, messages) {
24127
+ const selectionInstance = this.getSelectionInstance();
24128
+ if (!selectionInstance) {
24129
+ this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
24130
+ return;
24131
+ }
24132
+ const descriptors = (selection || []).filter((descriptor) => Boolean(descriptor));
24133
+ if (descriptors.length === 0) {
24134
+ this.applySelectionState(selectionInstance, []);
24135
+ return;
24136
+ }
24137
+ const highlightItems = this.getHighlightItems(descriptors, columns);
24138
+ if (!highlightItems.length) {
24139
+ this.applySelectionState(selectionInstance, []);
24140
+ return;
24141
+ }
24142
+ const hasCellSelections = highlightItems.some(item => isPresent$1(item.columnKey));
24143
+ const hasRowSelections = highlightItems.some(item => !isPresent$1(item.columnKey));
24144
+ const isCellMode = selectionInstance.isCellSelectionMode;
24145
+ if ((!isCellMode && hasCellSelections) || (isCellMode && hasRowSelections)) {
24146
+ const key = isCellMode ? 'aiAssistantSelectionRowModeRequired' : 'aiAssistantSelectionCellModeRequired';
24147
+ this.updateLastMessage(messages, this.ctx.localization?.get(key));
24148
+ return;
24149
+ }
24150
+ const selectionState = this.mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode, leafColumns);
24151
+ this.applySelectionState(selectionInstance, selectionState);
24152
+ }
24153
+ mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode, leafColumns) {
24154
+ const data = this.ctx.dataBindingDirective?.['originalData'] || [];
24155
+ if (isCellMode) {
24156
+ const mapped = highlightItems
24157
+ .filter(item => isPresent$1(item.itemKey) && isPresent$1(item.columnKey))
24158
+ .map(item => {
24159
+ const rowIndex = item.itemKey;
24160
+ const columnIndex = item.columnKey;
24161
+ const dataItem = data[rowIndex];
24162
+ if (!isPresent$1(dataItem)) {
24163
+ return null;
24164
+ }
24165
+ if (typeof selectionInstance['getSelectionItem'] === 'function') {
24166
+ const columnComponent = leafColumns[columnIndex];
24167
+ const selectionItem = selectionInstance['getSelectionItem']({ dataItem, index: rowIndex }, columnComponent, columnIndex);
24168
+ if (selectionItem && isPresent$1(selectionItem.itemKey) && isPresent$1(selectionItem.columnKey)) {
24169
+ return selectionItem;
24170
+ }
24171
+ return null;
24172
+ }
24173
+ const itemKey = typeof selectionInstance.getItemKey === 'function'
24174
+ ? selectionInstance.getItemKey({ dataItem, index: rowIndex })
24175
+ : rowIndex;
24176
+ return isPresent$1(itemKey) ? { itemKey, columnKey: columnIndex } : null;
24177
+ })
24178
+ .filter((item) => isPresent$1(item));
24179
+ return mapped.filter((item, index, self) => self.findIndex(other => other.itemKey === item.itemKey && other.columnKey === item.columnKey) === index);
24180
+ }
24181
+ const rowKeys = highlightItems
24182
+ .filter(item => isPresent$1(item.itemKey))
24183
+ .map(item => {
24184
+ const rowIndex = item.itemKey;
24185
+ const dataItem = data[rowIndex];
24186
+ if (!isPresent$1(dataItem)) {
24187
+ return null;
24188
+ }
24189
+ if (typeof selectionInstance.getItemKey === 'function') {
24190
+ return selectionInstance.getItemKey({ dataItem, index: rowIndex });
24191
+ }
24192
+ return rowIndex;
24193
+ })
24194
+ .filter(isPresent$1);
24195
+ return Array.from(new Set(rowKeys));
24196
+ }
24197
+ applySelectionState(selectionInstance, selectionState) {
24198
+ selectionInstance.selectedKeys = selectionState;
24199
+ if (typeof selectionInstance['setState'] === 'function') {
24200
+ selectionInstance['setState'](selectionState);
24201
+ }
24202
+ const changeDetector = selectionInstance['cd'];
24203
+ if (changeDetector && typeof changeDetector.markForCheck === 'function') {
24204
+ changeDetector.markForCheck();
24205
+ }
24206
+ if (typeof selectionInstance['notifyChange'] === 'function') {
24207
+ selectionInstance['notifyChange']();
24208
+ }
24209
+ }
24210
+ processHighlightResponse(highlight, columns) {
24211
+ const highlightedItems = this.getHighlightItems(highlight, columns);
24212
+ this.ctx.highlightDirective['setState'](highlightedItems);
24213
+ }
24214
+ processFilterResponse(filter) {
24215
+ const processedFilter = convertDateStringsInFilter(filter);
24216
+ const clearFilter = Object.keys(processedFilter).length === 0;
24217
+ if (clearFilter) {
24218
+ this.ctx.grid.filterChange.next(undefined);
24219
+ }
24220
+ else if (processedFilter?.filters.length) {
24221
+ const currentFilter = this.ctx.grid.currentState.filter;
24222
+ let mergedFilter = processedFilter;
24223
+ if (currentFilter && currentFilter.filters?.length > 0) {
24224
+ mergedFilter = {
24225
+ logic: 'and',
24226
+ filters: [
24227
+ currentFilter,
24228
+ processedFilter
24229
+ ]
24230
+ };
24231
+ }
24232
+ this.ctx.grid.filterChange.next(mergedFilter);
24233
+ }
24234
+ }
24235
+ changeColumnPosition(column, newPosition) {
24236
+ const grid = this.ctx.grid;
24237
+ if (!grid?.columns) {
24238
+ return;
24239
+ }
24240
+ const currentColumns = grid.columns.toArray();
24241
+ const currentIndex = currentColumns.findIndex(col => col === column);
24242
+ if (currentIndex === -1) {
24243
+ return;
24244
+ }
24245
+ if (newPosition < 0 || newPosition >= currentColumns.length) {
24246
+ return;
24247
+ }
24248
+ const sortedColumns = currentColumns
24249
+ .map((col, idx) => ({ col, physicalIndex: idx, visualOrder: col.orderIndex ?? idx }))
24250
+ .sort((a, b) => a.visualOrder - b.visualOrder);
24251
+ const currentVisualPos = sortedColumns.findIndex(item => item.physicalIndex === currentIndex);
24252
+ if (currentVisualPos === newPosition) {
24253
+ return;
24254
+ }
24255
+ currentColumns.forEach((col, idx) => {
24256
+ const sortedIndex = sortedColumns.findIndex(item => item.physicalIndex === idx);
24257
+ if (idx === currentIndex) {
24258
+ col.orderIndex = newPosition;
24259
+ }
24260
+ else if (currentVisualPos < newPosition) {
24261
+ col.orderIndex = (sortedIndex > currentVisualPos && sortedIndex <= newPosition)
24262
+ ? sortedIndex - 1 : sortedIndex;
24263
+ }
24264
+ else {
24265
+ col.orderIndex = (sortedIndex >= newPosition && sortedIndex < currentVisualPos)
24266
+ ? sortedIndex + 1 : sortedIndex;
24267
+ }
24268
+ col.isReordered = true;
24269
+ });
24270
+ grid.columnReorder.emit({
24271
+ column: column,
24272
+ oldIndex: currentVisualPos,
24273
+ newIndex: newPosition
24274
+ });
24275
+ }
24276
+ 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 });
24277
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridAIRequestResponseService });
24278
+ }
24279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridAIRequestResponseService, decorators: [{
24280
+ type: Injectable
24281
+ }], ctorParameters: () => [{ type: ContextService }, { type: ColumnInfoService }, { type: i0.NgZone }] });
24282
+
24283
+ /**
24284
+ * @hidden
24285
+ */
24286
+ const normalizeSettings = ({ buttonCount = 10, info = true, type = 'numeric', pageSizes = false, previousNext = true, responsive = true, position = 'bottom' }) => ({
24287
+ buttonCount,
24288
+ info,
24289
+ pageSizes,
24290
+ previousNext,
24291
+ type,
24292
+ responsive,
24293
+ position
24294
+ });
24295
+ /**
24296
+ * @hidden
24297
+ */
24298
+ const normalize = (settings) => normalizeSettings(settings === true ? {} : settings);
24299
+
24300
+ const canCreateElement = () => isDocumentAvailable() && document.createElement;
24301
+ let cachedScrollbarWidth = null;
24302
+ let cachedPixelRatio;
24303
+ let cachedRtlScrollLeft = null;
24304
+ function scrollbarWidth() {
24305
+ if (cachedScrollbarWidth === null && canCreateElement()) {
24306
+ cachedPixelRatio = window.devicePixelRatio || 1;
24307
+ const div = document.createElement("div");
24308
+ div.style.cssText = "overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block";
24309
+ div.innerHTML = "&nbsp;";
24310
+ document.body.appendChild(div);
24311
+ cachedScrollbarWidth = div.offsetWidth - div.scrollWidth;
24312
+ document.body.removeChild(div);
24313
+ }
24314
+ return cachedScrollbarWidth;
24315
+ }
24316
+ function rtlScrollLeft() {
24317
+ if (cachedRtlScrollLeft === null && canCreateElement()) {
24318
+ const outer = document.createElement('div');
24319
+ outer.style.direction = 'rtl';
24320
+ outer.style.display = 'block';
24321
+ outer.style.clear = 'both';
24322
+ outer.style.width = '100px';
24323
+ outer.style.visibility = 'hidden';
24324
+ outer.style.position = 'absolute';
24325
+ outer.style.left = '-10000px';
24326
+ outer.style.overflow = 'scroll';
24327
+ outer.style.zoom = '1';
24328
+ const inner = document.createElement('div');
24329
+ inner.style.width = '200px';
24330
+ inner.style.height = '1px';
24331
+ outer.append(inner);
24332
+ document.body.appendChild(outer);
24333
+ const initial = outer.scrollLeft;
24334
+ outer.scrollLeft = -1;
24335
+ cachedRtlScrollLeft = outer.scrollLeft < 0 ? outer.scrollLeft : initial;
24336
+ document.body.removeChild(outer);
24337
+ }
24338
+ return cachedRtlScrollLeft;
24339
+ }
24340
+ /**
24341
+ * @hidden
24342
+ * move to kendo-common
24343
+ */
24344
+ class BrowserSupportService {
24345
+ zone;
24346
+ changeDetector;
24347
+ changes = new EventEmitter();
24348
+ subscriptions;
24349
+ constructor(zone, changeDetector) {
24350
+ this.zone = zone;
24351
+ this.changeDetector = changeDetector;
24352
+ if (typeof window === 'undefined') {
24353
+ return;
24354
+ }
24355
+ this.zone.runOutsideAngular(() => {
24356
+ this.subscriptions = fromEvent(window, 'resize').pipe(auditTime(100)).subscribe(() => {
24357
+ if (cachedPixelRatio !== window.devicePixelRatio) {
24358
+ zone.run(() => {
24359
+ cachedScrollbarWidth = null;
24360
+ this.changes.emit();
24361
+ this.changeDetector.markForCheck();
24362
+ });
24363
+ }
24364
+ });
24365
+ });
24366
+ }
24367
+ ngOnDestroy() {
24368
+ if (this.subscriptions) {
24369
+ this.subscriptions.unsubscribe();
24370
+ this.subscriptions = null;
24371
+ }
24372
+ }
24373
+ get scrollbarWidth() {
24374
+ return scrollbarWidth();
24375
+ }
24376
+ get rtlScrollLeft() {
24377
+ return rtlScrollLeft();
24378
+ }
24379
+ 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 });
24380
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService });
24381
+ }
24382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BrowserSupportService, decorators: [{
24383
+ type: Injectable
24384
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }] });
24385
+
24386
+ const isGroupItem = (source) => {
24387
+ return source.items !== undefined &&
24388
+ source.field !== undefined;
24389
+ };
24390
+ const flattenGroups = (groups) => (groups.reduce((acc, curr) => {
24391
+ if (isGroupItem(curr)) {
24392
+ return acc.concat(flattenGroups(curr.items));
24393
+ }
24394
+ return acc.concat([curr]);
24395
+ }, []));
24396
+ /**
24397
+ * @hidden
24398
+ */
24399
+ const itemAt = (data, index) => {
24400
+ const first = data[0];
24401
+ if (isPresent(first) && isGroupItem(first)) {
24402
+ return flattenGroups(data)[index];
24403
+ }
24404
+ return data[index];
24405
+ };
24406
+ /**
24407
+ * @hidden
24408
+ */
24409
+ const getIterator = (data, { footers, level, dataIndex, parentGroupIndex, groupIndex, parentGroup }) => {
24410
+ const first = data[0];
24411
+ if (isPresent(first) && isGroupItem(first)) {
24412
+ return new GroupIterator(data, footers, level, dataIndex, parentGroupIndex, groupIndex, parentGroup);
24413
+ }
24414
+ return new ItemIterator(data, dataIndex, parentGroupIndex, parentGroup);
24415
+ };
24416
+ class ArrayIterator {
24417
+ arr;
24418
+ idx;
24419
+ constructor(arr, idx = 0) {
24420
+ this.arr = arr;
24421
+ this.idx = idx;
24422
+ this.arr = arr || [];
24423
+ }
24424
+ [iterator]() {
24425
+ return this;
24426
+ }
24427
+ next() {
24428
+ return this.idx < this.arr.length ? {
24429
+ done: false,
24430
+ value: this.arr[this.idx++]
24431
+ } : { done: true, value: undefined };
24432
+ }
24433
+ }
24434
+ /**
24435
+ * @hidden
24436
+ */
24437
+ class Iterator {
24438
+ dataIndex;
24439
+ resultMap;
24440
+ _innerIterator;
24441
+ constructor(arr, dataIndex = 0, resultMap = (x) => x) {
24442
+ this.dataIndex = dataIndex;
24443
+ this.resultMap = resultMap;
24444
+ const iter = arr[iterator];
24445
+ this._innerIterator = iter ? arr[iterator]() : new ArrayIterator(arr);
24446
+ }
24447
+ [iterator]() {
24448
+ return this;
24449
+ }
24450
+ next() {
24451
+ return this.resultMap(this._innerIterator.next(), this.dataIndex++);
24452
+ }
24453
+ }
24454
+ /**
24455
+ * @hidden
24456
+ */
24457
+ class ItemIterator extends Iterator {
24458
+ constructor(arr, dataIndex, groupIndex, group) {
24459
+ super(arr, dataIndex, (x, idx) => ({
24460
+ done: x.done,
24461
+ value: {
24462
+ data: x.value,
24463
+ groupIndex: groupIndex,
24464
+ index: idx,
24465
+ type: 'data',
24466
+ group
24467
+ }
24468
+ }));
24469
+ }
24470
+ /**
24471
+ * The index of the next record.
24472
+ * @readonly
24473
+ * @type {number}
24474
+ */
24475
+ get index() {
24476
+ return this.dataIndex;
24477
+ }
24478
+ }
24479
+ const prefix = (s, n) => {
24480
+ const p = s ? s + "_" : s;
24481
+ return `${p}${n}`;
24482
+ };
24483
+ /**
24484
+ * @hidden
24485
+ */
24486
+ class GroupIterator {
24487
+ arr;
24488
+ outputFooters;
24489
+ level;
24490
+ dataIndex;
24491
+ parentIndex;
24492
+ groupIndex;
24493
+ parentGroup;
24494
+ current;
24495
+ _innerIterator;
24496
+ _iterator;
24497
+ currentGroupIndex = "";
24498
+ constructor(arr, outputFooters = false, level = 0, dataIndex = 0, parentIndex = '', groupIndex = 0, parentGroup = undefined) {
24499
+ this.arr = arr;
24500
+ this.outputFooters = outputFooters;
24501
+ this.level = level;
24502
+ this.dataIndex = dataIndex;
24503
+ this.parentIndex = parentIndex;
24504
+ this.groupIndex = groupIndex;
24505
+ this.parentGroup = parentGroup;
24506
+ this.arr = arr || [];
24507
+ this._iterator = new Iterator(this.arr, this.dataIndex);
24508
+ }
24509
+ [iterator]() {
24510
+ return this;
24511
+ }
24512
+ nextGroupItem() {
24513
+ this.current = this._iterator.next().value;
24514
+ this._innerIterator = null;
24515
+ if (this.current) {
24516
+ this.currentGroupIndex = prefix(this.parentIndex, this.groupIndex++);
24517
+ return {
24518
+ done: false,
24519
+ value: {
24520
+ data: this.current,
24521
+ index: this.currentGroupIndex,
24522
+ level: this.level,
24523
+ type: 'group',
24524
+ parentGroup: this.parentGroup
24525
+ }
24526
+ };
24527
+ }
24528
+ else {
24529
+ this.current = null;
24530
+ return { done: true, value: undefined };
24531
+ }
24532
+ }
24533
+ footerItem() {
24534
+ if (this.current) {
24535
+ const group = this.current;
24536
+ this.current = null;
24537
+ return {
24538
+ done: false,
24539
+ value: {
24540
+ data: group,
24541
+ groupIndex: this.currentGroupIndex,
24542
+ level: this.level,
24543
+ type: 'footer',
24544
+ group: {
24545
+ data: group,
24546
+ index: this.currentGroupIndex,
24547
+ level: this.level,
24548
+ type: 'group',
24549
+ parentGroup: this.parentGroup
24550
+ }
24551
+ }
24552
+ };
24553
+ }
24554
+ else {
24555
+ this.current = null;
24556
+ return { done: true, value: undefined };
24557
+ }
24558
+ }
24559
+ innerIterator(group) {
24560
+ if (!this._innerIterator) {
24561
+ this._innerIterator = getIterator(group.items, {
24562
+ dataIndex: this.dataIndex,
24563
+ footers: this.outputFooters,
24564
+ level: this.level + 1,
24565
+ parentGroupIndex: this.currentGroupIndex,
24566
+ parentGroup: {
24567
+ data: this.current,
24568
+ index: this.currentGroupIndex,
24569
+ level: this.level,
24570
+ type: 'group',
24571
+ parentGroup: this.parentGroup
24572
+ }
24573
+ });
24574
+ }
24575
+ return this._innerIterator;
24576
+ }
24577
+ nextDataItem(group) {
24578
+ const iterator = this.innerIterator(group);
24579
+ const result = iterator.next();
24580
+ if (isPresent(result.value) && !result.done && result.value.type === "data") {
24581
+ this.dataIndex = result.value.index + 1;
24582
+ }
24583
+ return !result.done ? result : undefined;
24584
+ }
24585
+ next() {
24586
+ if (!isPresent(this.current)) {
24587
+ return this.nextGroupItem();
24588
+ }
24589
+ const item = this.nextDataItem(this.current);
24590
+ return item ? item : (this.outputFooters ? this.footerItem() : this.nextGroupItem());
24591
+ }
24592
+ /**
24593
+ * The index of the last iterated data record.
24594
+ * @readonly
24595
+ * @type {number}
24596
+ */
24597
+ get index() {
24598
+ return this.dataIndex + 1;
24599
+ }
24600
+ }
24601
+
24602
+ /**
24603
+ * @hidden
24604
+ */
24605
+ class DataResultIterator {
24606
+ source;
24607
+ skip;
24608
+ groupFooters;
24609
+ isObject;
24610
+ constructor(source, skip = 0, groupFooters = false) {
24611
+ this.source = source;
24612
+ this.skip = skip;
24613
+ this.groupFooters = groupFooters;
24614
+ this.source = this.source ? this.source : [];
24615
+ this.isObject = this.isGridDataResult(this.source);
24616
+ }
24617
+ isGridDataResult(source) {
24618
+ return source.total !== undefined && source.data !== undefined;
24619
+ }
24620
+ get total() {
24621
+ return this.isObject ? this.source.total : this.source.length;
24622
+ }
24623
+ get data() {
24624
+ return this.isObject ? this.source.data : this.source;
24625
+ }
24626
+ map(fn) {
24627
+ return this.data.map(fn);
24628
+ }
24629
+ filter(fn) {
24630
+ return this.data.filter(fn);
24631
+ }
24632
+ reduce(fn, init) {
24633
+ return this.data.reduce(fn, init);
24634
+ }
24635
+ forEach(fn) {
24636
+ this.data.forEach(fn);
24637
+ }
24638
+ some(fn) {
24639
+ return this.data.some(fn);
24640
+ }
24641
+ [iterator]() {
24642
+ return getIterator(this.data, {
24643
+ dataIndex: this.skip,
24644
+ footers: this.groupFooters,
24645
+ groupIndex: this.skip
24646
+ });
24647
+ }
24648
+ toString() { return this.data.toString(); }
24649
+ }
24650
+ /**
24651
+ * @hidden
24652
+ */
24653
+ class DataCollection {
24654
+ accessor;
24655
+ constructor(accessor) {
24656
+ this.accessor = accessor;
24657
+ }
24658
+ get total() { return this.accessor().total; }
24659
+ get length() { return this.accessor().data.length; }
24660
+ get first() { return this.accessor().data[0]; }
24661
+ get last() { return this.accessor().data[this.length - 1]; }
24662
+ at(index) {
24663
+ return itemAt(this.accessor().data, index);
24664
+ }
24665
+ map(fn) { return this.accessor().map(fn); }
24666
+ filter(fn) {
24667
+ return this.accessor().filter(fn);
24668
+ }
24669
+ reduce(fn, init) {
24670
+ return this.accessor().reduce(fn, init);
24671
+ }
24672
+ forEach(fn) {
24673
+ this.accessor().forEach(fn);
24674
+ }
24675
+ some(fn) {
24676
+ return this.accessor().some(fn);
24677
+ }
24678
+ [iterator]() {
24679
+ return this.accessor()[iterator]();
24680
+ }
24681
+ toString() { return this.accessor().toString(); }
24682
+ }
24683
+
24684
+ /**
24685
+ * @hidden
24686
+ *
24687
+ * Quick look-up structure for combinations of keys or single keys.
24688
+ * Similar to the native JS Set, however, working with single keys or a couple of keys.
24689
+ * Supports both primitive keys and object keys (compared by reference).
24690
+ */
24691
+ class PairSet {
24692
+ /**
24693
+ * Symbol used internally to represent "no Y key" when storing single X keys.
24694
+ */
24695
+ static SINGLE_KEY_SYMBOL = Symbol('SINGLE_KEY');
24696
+ /**
24697
+ * Gets the total number of key entries (both single keys and key pairs).
24698
+ */
24699
+ get size() {
24700
+ return this.totalKeysCount;
24701
+ }
24702
+ /**
24703
+ * Holds a set of Y keys for each defined X key.
24704
+ * Each X key creates a map which holds a set of Y keys.
24705
+ * For single keys, the Y value is the SINGLE_KEY_SYMBOL.
24706
+ *
24707
+ * Map { 'foo' => Set { Symbol(SINGLE_KEY) } } // single key: {x: 'foo'}
24708
+ * Map { 'foo2' => Set { 'bar', 'baz' } } // pairs: {x: 'foo2', y: 'bar'}, {x: 'foo2', y: 'baz'}
24709
+ */
24710
+ keysX = new Map();
24711
+ /**
24712
+ * Count each added or deleted key manually to avoid iterating over all items when calling `this.size`.
24713
+ */
24714
+ totalKeysCount = 0;
24715
+ constructor(items, keyXField, keyYField) {
24716
+ if (items && keyXField) {
24717
+ items.forEach(item => {
24718
+ if (keyYField && item[keyYField] !== undefined) {
24719
+ this.add(item[keyXField], item[keyYField]);
24720
+ }
24721
+ else {
24722
+ this.addSingle(item[keyXField]);
24723
+ }
24724
+ });
24725
+ }
24726
+ }
24727
+ /**
24728
+ * Adds a single key entry.
24729
+ */
24730
+ addSingle(keyX) {
24731
+ if (!this.keysX.has(keyX)) {
24732
+ this.keysX.set(keyX, new Set());
24733
+ }
24734
+ if (!this.hasSingle(keyX)) {
24735
+ this.keysX.get(keyX).add(PairSet.SINGLE_KEY_SYMBOL);
24736
+ this.totalKeysCount += 1;
24737
+ }
24038
24738
  }
24039
24739
  /**
24040
24740
  * Adds a couple of items identified as a combination.
@@ -30728,6 +31428,8 @@ class GridComponent {
30728
31428
  adaptiveGridService;
30729
31429
  rowReorderService;
30730
31430
  dataMappingService;
31431
+ aiRequestResponseService;
31432
+ idService;
30731
31433
  /**
30732
31434
  * Sets the data of the Grid. If you provide an array, the Grid gets the total count automatically.
30733
31435
  * ([more information and example]({% slug binding_grid %})).
@@ -31685,7 +32387,7 @@ class GridComponent {
31685
32387
  rowReorderSubscription;
31686
32388
  rtl = false;
31687
32389
  _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) {
32390
+ 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
32391
  this.supportService = supportService;
31690
32392
  this.selectionService = selectionService;
31691
32393
  this.cellSelectionService = cellSelectionService;
@@ -31716,6 +32418,8 @@ class GridComponent {
31716
32418
  this.adaptiveGridService = adaptiveGridService;
31717
32419
  this.rowReorderService = rowReorderService;
31718
32420
  this.dataMappingService = dataMappingService;
32421
+ this.aiRequestResponseService = aiRequestResponseService;
32422
+ this.idService = idService;
31719
32423
  const isValid = validatePackage(packageMetadata);
31720
32424
  this.licenseMessage = getLicenseMessage(packageMetadata);
31721
32425
  this.showLicenseWatermark = shouldShowValidationUI(isValid);
@@ -31812,6 +32516,48 @@ class GridComponent {
31812
32516
  resetGroupsState() {
31813
32517
  this.groupsService.reset();
31814
32518
  }
32519
+ /**
32520
+ * Builds the request body for the AI service based on the provided prompt message.
32521
+ * Allows developers to construct their own AI service requests.
32522
+ *
32523
+ * @param promptMessage - The prompt message to send to the AI service.
32524
+ * @returns The request body object ready to be sent to the AI service.
32525
+ *
32526
+ * @example
32527
+ * ```ts
32528
+ * const requestBody = this.grid.getAIRequest('Sort by Product Name ascending');
32529
+ *
32530
+ * // Send to your AI service
32531
+ * this.http.post('https://your-ai-service.com/api', requestBody).subscribe(response => {
32532
+ * this.grid.handleAIResponse(response);
32533
+ * });
32534
+ * ```
32535
+ */
32536
+ getAIRequest(promptMessage) {
32537
+ return this.aiRequestResponseService.buildRequestBody(promptMessage);
32538
+ }
32539
+ /**
32540
+ * Processes an AI service response and applies the commands to the Grid.
32541
+ * Allows developers to handle their own AI service responses manually.
32542
+ *
32543
+ * @param response - The AI service response containing optional message and commands array.
32544
+ *
32545
+ * @example
32546
+ * ```ts
32547
+ * const response = {
32548
+ * message: 'Applying sorting',
32549
+ * commands: [
32550
+ * { type: 'GridSort', sort: { field: 'ProductName', dir: 'asc' }, message: 'Sorted by Product Name' }
32551
+ * ]
32552
+ * };
32553
+ * this.grid.handleAIResponse(response);
32554
+ * ```
32555
+ */
32556
+ handleAIResponse(response) {
32557
+ const columns = this.columnInfoService.leafNamedColumns?.map((col) => ({ field: col.field })) || [];
32558
+ const leafColumns = this.columnInfoService.leafNamedColumns || [];
32559
+ this.aiRequestResponseService.processCommands(response.commands || [], columns, leafColumns);
32560
+ }
31815
32561
  /**
31816
32562
  * @hidden
31817
32563
  */
@@ -32585,7 +33331,7 @@ class GridComponent {
32585
33331
  autoGenerateColumns() {
32586
33332
  if (this.shouldGenerateColumns && !this.columns.length && this.view.length) {
32587
33333
  this.columns.reset(Object.keys(this.view.at(0)).map(field => {
32588
- const column = new ColumnComponent();
33334
+ const column = new ColumnComponent(undefined, this.idService);
32589
33335
  column.field = field;
32590
33336
  return column;
32591
33337
  }));
@@ -32976,7 +33722,7 @@ class GridComponent {
32976
33722
  this.dragTargetContainer?.notify();
32977
33723
  this.dropTargetContainer?.notify();
32978
33724
  }
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 });
33725
+ 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
33726
  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
33727
  BrowserSupportService,
32982
33728
  LocalizationService,
@@ -33023,6 +33769,7 @@ class GridComponent {
33023
33769
  SizingOptionsService,
33024
33770
  RowReorderService,
33025
33771
  ClipboardService,
33772
+ GridAIRequestResponseService,
33026
33773
  RowspanService,
33027
33774
  AdaptiveGridService,
33028
33775
  ColumnMenuService,
@@ -33032,394 +33779,394 @@ class GridComponent {
33032
33779
  <ng-container kendoGridLocalizedMessages
33033
33780
  i18n-groupPanelEmpty="kendo.grid.groupPanelEmpty|The label visible in the Grid group panel when it is empty"
33034
33781
  groupPanelEmpty="Drag a column header and drop it here to group by that column"
33035
-
33782
+
33036
33783
  i18n-noRecords="kendo.grid.noRecords|The label visible in the Grid when there are no records"
33037
33784
  noRecords="No records available."
33038
-
33785
+
33039
33786
  i18n-pagerLabel="kendo.grid.pagerLabel|The label for the Grid pager"
33040
33787
  pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
33041
-
33788
+
33042
33789
  i18n-pagerFirstPage="kendo.grid.pagerFirstPage|The label for the first page button in Grid pager"
33043
33790
  pagerFirstPage="Go to the first page"
33044
-
33791
+
33045
33792
  i18n-pagerPreviousPage="kendo.grid.pagerPreviousPage|The label for the previous page button in Grid pager"
33046
33793
  pagerPreviousPage="Go to the previous page"
33047
-
33794
+
33048
33795
  i18n-pagerNextPage="kendo.grid.pagerNextPage|The label for the next page button in Grid pager"
33049
33796
  pagerNextPage="Go to the next page"
33050
-
33797
+
33051
33798
  i18n-pagerLastPage="kendo.grid.pagerLastPage|The label for the last page button in Grid pager"
33052
33799
  pagerLastPage="Go to the last page"
33053
-
33800
+
33054
33801
  i18n-pagerPage="kendo.grid.pagerPage|The label before the current page number in the Grid pager"
33055
33802
  pagerPage="Page"
33056
-
33803
+
33057
33804
  i18n-pagerOf="kendo.grid.pagerOf|The label before the total pages number in the Grid pager"
33058
33805
  pagerOf="of"
33059
-
33806
+
33060
33807
  i18n-pagerItems="kendo.grid.pagerItems|The label after the total pages number in the Grid pager"
33061
33808
  pagerItems="items"
33062
-
33809
+
33063
33810
  i18n-pagerPageNumberInputTitle="kendo.grid.pagerPageNumberInputTitle|The label for the pager input in the Grid pager"
33064
33811
  pagerPageNumberInputTitle="Page Number"
33065
-
33812
+
33066
33813
  i18n-pagerItemsPerPage="kendo.grid.pagerItemsPerPage|The label for the page size chooser in the Grid pager"
33067
33814
  pagerItemsPerPage="items per page"
33068
-
33815
+
33069
33816
  i18n-pagerInputLabel="kendo.grid.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number"
33070
33817
  pagerInputLabel="Type a page number"
33071
-
33818
+
33072
33819
  i18n-filter="kendo.grid.filter|The label of the filter cell or icon"
33073
33820
  filter="Filter"
33074
-
33821
+
33075
33822
  i18n-filterInputLabel="kendo.grid.filterInputLabel|The label of the filter row and menu inputs"
33076
33823
  filterInputLabel="{{ '{columnName} Filter' }}"
33077
-
33824
+
33078
33825
  i18n-filterMenuTitle="kendo.grid.filterMenuTitle|The title of the filter menu icon"
33079
33826
  filterMenuTitle="{{ '{columnName} Filter Menu' }}"
33080
-
33827
+
33081
33828
  i18n-filterMenuOperatorsDropDownLabel="kendo.grid.filterMenuOperatorsDropDownLabel|The label of the filter menu operators dropdown"
33082
33829
  filterMenuOperatorsDropDownLabel="{{ '{columnName} Filter Operators' }}"
33083
-
33830
+
33084
33831
  i18n-filterCellOperatorLabel="kendo.grid.filterCellOperatorLabel|The label of the filter cell operators dropdown"
33085
33832
  filterCellOperatorLabel="{{ 'Filter cell operators for {columnName}' }}"
33086
-
33833
+
33087
33834
  i18n-booleanFilterCellLabel="kendo.grid.booleanFilterCellLabel|The label of the boolean filter cell dropdown"
33088
33835
  booleanFilterCellLabel="{{ 'Boolean filter cell for {columnName}' }}"
33089
-
33836
+
33090
33837
  i18n-filterMenuLogicDropDownLabel="kendo.grid.filterMenuLogicDropDownLabel|The label of the filter menu logic dropdown"
33091
33838
  filterMenuLogicDropDownLabel="{{ '{columnName} Filter Logic' }}"
33092
-
33839
+
33093
33840
  i18n-filterEqOperator="kendo.grid.filterEqOperator|The text of the equal filter operator"
33094
33841
  filterEqOperator="Is equal to"
33095
-
33842
+
33096
33843
  i18n-filterNotEqOperator="kendo.grid.filterNotEqOperator|The text of the not equal filter operator"
33097
33844
  filterNotEqOperator="Is not equal to"
33098
-
33845
+
33099
33846
  i18n-filterIsNullOperator="kendo.grid.filterIsNullOperator|The text of the is null filter operator"
33100
33847
  filterIsNullOperator="Is null"
33101
-
33848
+
33102
33849
  i18n-filterIsNotNullOperator="kendo.grid.filterIsNotNullOperator|The text of the is not null filter operator"
33103
33850
  filterIsNotNullOperator="Is not null"
33104
-
33851
+
33105
33852
  i18n-filterIsEmptyOperator="kendo.grid.filterIsEmptyOperator|The text of the is empty filter operator"
33106
33853
  filterIsEmptyOperator="Is empty"
33107
-
33854
+
33108
33855
  i18n-filterIsNotEmptyOperator="kendo.grid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
33109
33856
  filterIsNotEmptyOperator="Is not empty"
33110
-
33857
+
33111
33858
  i18n-filterStartsWithOperator="kendo.grid.filterStartsWithOperator|The text of the starts with filter operator"
33112
33859
  filterStartsWithOperator="Starts with"
33113
-
33860
+
33114
33861
  i18n-filterContainsOperator="kendo.grid.filterContainsOperator|The text of the contains filter operator"
33115
33862
  filterContainsOperator="Contains"
33116
-
33863
+
33117
33864
  i18n-filterNotContainsOperator="kendo.grid.filterNotContainsOperator|The text of the does not contain filter operator"
33118
33865
  filterNotContainsOperator="Does not contain"
33119
-
33866
+
33120
33867
  i18n-filterEndsWithOperator="kendo.grid.filterEndsWithOperator|The text of the ends with filter operator"
33121
33868
  filterEndsWithOperator="Ends with"
33122
-
33869
+
33123
33870
  i18n-filterGteOperator="kendo.grid.filterGteOperator|The text of the greater than or equal filter operator"
33124
33871
  filterGteOperator="Is greater than or equal to"
33125
-
33872
+
33126
33873
  i18n-filterGtOperator="kendo.grid.filterGtOperator|The text of the greater than filter operator"
33127
33874
  filterGtOperator="Is greater than"
33128
-
33875
+
33129
33876
  i18n-filterLteOperator="kendo.grid.filterLteOperator|The text of the less than or equal filter operator"
33130
33877
  filterLteOperator="Is less than or equal to"
33131
-
33878
+
33132
33879
  i18n-filterLtOperator="kendo.grid.filterLtOperator|The text of the less than filter operator"
33133
33880
  filterLtOperator="Is less than"
33134
-
33881
+
33135
33882
  i18n-filterIsTrue="kendo.grid.filterIsTrue|The text of the IsTrue boolean filter option"
33136
33883
  filterIsTrue="Is True"
33137
-
33884
+
33138
33885
  i18n-filterIsFalse="kendo.grid.filterIsFalse|The text of the IsFalse boolean filter option"
33139
33886
  filterIsFalse="Is False"
33140
-
33887
+
33141
33888
  i18n-filterBooleanAll="kendo.grid.filterBooleanAll|The text of the (All) boolean filter option"
33142
33889
  filterBooleanAll="(All)"
33143
-
33890
+
33144
33891
  i18n-filterAfterOrEqualOperator="kendo.grid.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
33145
33892
  filterAfterOrEqualOperator="Is after or equal to"
33146
-
33893
+
33147
33894
  i18n-filterAfterOperator="kendo.grid.filterAfterOperator|The text of the after date filter operator"
33148
33895
  filterAfterOperator="Is after"
33149
-
33896
+
33150
33897
  i18n-filterBeforeOperator="kendo.grid.filterBeforeOperator|The text of the before date filter operator"
33151
33898
  filterBeforeOperator="Is before"
33152
-
33899
+
33153
33900
  i18n-filterBeforeOrEqualOperator="kendo.grid.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
33154
33901
  filterBeforeOrEqualOperator="Is before or equal to"
33155
-
33902
+
33156
33903
  i18n-filterFilterButton="kendo.grid.filterFilterButton|The text of the filter button"
33157
33904
  filterFilterButton="Filter"
33158
-
33905
+
33159
33906
  i18n-filterClearButton="kendo.grid.filterClearButton|The text of the clear filter button"
33160
33907
  filterClearButton="Clear"
33161
-
33908
+
33162
33909
  i18n-sortClearButton="kendo.grid.sortClearButton|The text of the clear sort button located in the Sort Toolbar Tool and adaptive Sort Toolbar Tool"
33163
33910
  sortClearButton="Clear sorting"
33164
-
33911
+
33165
33912
  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
33913
  adaptiveCloseButtonTitle="Close"
33167
-
33914
+
33168
33915
  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
33916
  adaptiveBackButtonTitle="Back"
33170
-
33917
+
33171
33918
  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
33919
  filterClearAllButton="Clear all filters"
33173
-
33920
+
33174
33921
  i18n-groupClearButton="kendo.grid.groupClearButton|The text of the clear grouping button in the Group Toolbar Tool and adaptive Group Toolbar Tool"
33175
33922
  groupClearButton="Clear grouping"
33176
-
33923
+
33177
33924
  i18n-sortDoneButton="kendo.grid.sortDoneButton|The text of the done sort button"
33178
33925
  sortDoneButton="Done"
33179
-
33926
+
33180
33927
  i18n-groupDoneButton="kendo.grid.groupDoneButton|The text of the done group button in the adaptive Group Toolbar Tool"
33181
33928
  groupDoneButton="Done"
33182
-
33929
+
33183
33930
  i18n-filterAndLogic="kendo.grid.filterAndLogic|The text of the And filter logic"
33184
33931
  filterAndLogic="And"
33185
-
33932
+
33186
33933
  i18n-filterOrLogic="kendo.grid.filterOrLogic|The text of the Or filter logic"
33187
33934
  filterOrLogic="Or"
33188
-
33935
+
33189
33936
  i18n-filterToolbarToolText="kendo.grid.filterToolbarToolText|The button text of the Filter toolbar tool"
33190
33937
  filterToolbarToolText="Filter"
33191
-
33938
+
33192
33939
  i18n-loading="kendo.grid.loading|The loading text"
33193
33940
  loading="Loading"
33194
-
33941
+
33195
33942
  i18n-gridLabel="kendo.grid.gridLabel|The Grid aria-label"
33196
33943
  gridLabel="Data table"
33197
-
33944
+
33198
33945
  i18n-columnMenu="kendo.grid.columnMenu|The title of the column menu icon"
33199
33946
  columnMenu="{{ '{columnName} Column Menu' }}"
33200
-
33947
+
33201
33948
  i18n-columns="kendo.grid.columns|The text for the Grid Column Chooser and Column Chooser toolbar tool"
33202
33949
  columns="Columns"
33203
-
33950
+
33204
33951
  i18n-columnsSubtitle="kendo.grid.columnsSubtitle|The subtitle for the adaptive Grid Column Chooser and Column Chooser toolbar tool"
33205
33952
  columnsSubtitle="Selected fields are visible"
33206
-
33953
+
33207
33954
  i18n-adaptiveFilterTitle="kendo.grid.adaptiveFilterTitle|The title that is displayed in the adaptive Filter Toolbar Tool and Filter Menu"
33208
33955
  adaptiveFilterTitle="Filter by"
33209
-
33956
+
33210
33957
  i18n-adaptiveFilterOperatorsTitle="kendo.grid.adaptiveFilterOperatorsTitle|The title that is displayed in the Operators Action Sheet"
33211
33958
  adaptiveFilterOperatorsTitle="Operators"
33212
-
33959
+
33213
33960
  i18n-adaptiveSortTitle="kendo.grid.adaptiveSortTitle|The title that is displayed in the adaptive Sort Toolbar Tool"
33214
33961
  adaptiveSortTitle="Sort by"
33215
-
33962
+
33216
33963
  i18n-adaptiveGroupTitle="kendo.grid.adaptiveGroupTitle|The title that is displayed in the adaptive Group Toolbar Tool."
33217
33964
  adaptiveGroupTitle="Group by"
33218
-
33965
+
33219
33966
  i18n-lock="kendo.grid.lock|The text shown in the column menu for the lock item"
33220
33967
  lock="Lock"
33221
-
33968
+
33222
33969
  i18n-unlock="kendo.grid.unlock|The text shown in the column menu for the unlock item"
33223
33970
  unlock="Unlock"
33224
-
33971
+
33225
33972
  i18n-setColumnPosition="kendo.grid.setColumnPosition|The text shown in the column menu for the set column position item"
33226
33973
  setColumnPosition="Set Column Position"
33227
-
33974
+
33228
33975
  i18n-stick="kendo.grid.stick|The text shown in the column menu for the stick item"
33229
33976
  stick="Stick"
33230
-
33977
+
33231
33978
  i18n-unstick="kendo.grid.unstick|The text shown in the column menu for the unstick item"
33232
33979
  unstick="Unstick"
33233
-
33980
+
33234
33981
  i18n-sortable="kendo.grid.sortable|The label of the sort icon"
33235
33982
  sortable="Sortable"
33236
-
33983
+
33237
33984
  i18n-sortAscending="kendo.grid.sortAscending|The text shown in the column menu for the sort ascending item"
33238
33985
  sortAscending="Sort Ascending"
33239
-
33986
+
33240
33987
  i18n-sortDescending="kendo.grid.sortDescending|The text shown in the column menu for the sort descending item"
33241
33988
  sortDescending="Sort Descending"
33242
-
33989
+
33243
33990
  i18n-autosizeAllColumns="kendo.grid.autosizeAllColumns|The text shown in the column menu for the autosize all columns item"
33244
33991
  autosizeAllColumns="Autosize All Columns"
33245
-
33992
+
33246
33993
  i18n-autosizeThisColumn="kendo.grid.autosizeThisColumn|The text shown in the column menu for the autosize this column item"
33247
33994
  autosizeThisColumn="Autosize This Column"
33248
-
33995
+
33249
33996
  i18n-sortedDefault="kendo.grid.sortedDefault|The status announcement when a column is no longer sorted"
33250
33997
  sortedDefault="Not Sorted"
33251
-
33998
+
33252
33999
  i18n-sortedAscending="kendo.grid.sortedAscending|The title of the Group Chip indicating the ascending sorting order of the groups"
33253
34000
  sortedAscending="Sorted Ascending"
33254
-
34001
+
33255
34002
  i18n-sortedDescending="kendo.grid.sortedDescending|The title of the Group Chip indicating the descending sorting order of the groups"
33256
34003
  sortedDescending="Sorted Descending"
33257
-
34004
+
33258
34005
  i18n-columnsApply="kendo.grid.columnsApply|The text shown in the column menu or column chooser for the columns apply button"
33259
34006
  columnsApply="Apply"
33260
-
34007
+
33261
34008
  i18n-columnsReset="kendo.grid.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
33262
34009
  columnsReset="Reset"
33263
-
34010
+
33264
34011
  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
34012
  detailExpand="Expand Details"
33266
-
34013
+
33267
34014
  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
34015
  detailCollapse="Collapse Details"
33269
-
34016
+
33270
34017
  i18n-filterDateToday="kendo.grid.filterDateToday|The text of the Today button of the Date filter."
33271
34018
  filterDateToday="TODAY"
33272
-
34019
+
33273
34020
  i18n-filterDateToggle="kendo.grid.filterDateToggle|The title of the Toggle button of the Date filter."
33274
34021
  filterDateToggle="Toggle Calendar"
33275
-
34022
+
33276
34023
  i18n-filterNumericDecrement="kendo.grid.filterNumericDecrement|The title of the Decrement button of the Numeric filter."
33277
34024
  filterNumericDecrement="Decrement"
33278
-
34025
+
33279
34026
  i18n-filterNumericIncrement="kendo.grid.filterNumericIncrement|The title of the Increment button of the Numeric filter."
33280
34027
  filterNumericIncrement="Increment"
33281
-
34028
+
33282
34029
  i18n-selectionCheckboxLabel="kendo.grid.selectionCheckboxLabel|The labels of the checkbox column checkboxes."
33283
34030
  selectionCheckboxLabel="Select Row"
33284
-
34031
+
33285
34032
  i18n-selectAllCheckboxLabel="kendo.grid.selectAllCheckboxLabel|The label of the checkbox column select all checkbox."
33286
34033
  selectAllCheckboxLabel="Select All Rows"
33287
-
34034
+
33288
34035
  i18n-sortToolbarToolText="kendo.grid.sortToolbarToolText|The button text of the Sort toolbar tool."
33289
34036
  sortToolbarToolText="Sort"
33290
-
34037
+
33291
34038
  i18n-groupCollapse="kendo.grid.groupCollapse|The text of the title and aria-label attributes applied to the collapse icon of group rows."
33292
34039
  groupCollapse="Collapse Group"
33293
-
34040
+
33294
34041
  i18n-groupExpand="kendo.grid.groupExpand|The text of the title and aria-label attributes applied to the expand icon of group rows."
33295
34042
  groupExpand="Expand Group"
33296
-
34043
+
33297
34044
  i18n-pagerSelectPage="kendo.grid.pagerSelectPage|The text of the title and aria-label attributes applied to the page chooser in the Grid Pager"
33298
34045
  pagerSelectPage="Select page"
33299
-
34046
+
33300
34047
  i18n-topToolbarLabel="kendo.grid.topToolbarLabel|The label for the Grid top toolbar"
33301
34048
  topToolbarLabel="Top toolbar"
33302
-
34049
+
33303
34050
  i18n-bottomToolbarLabel="kendo.grid.bottomToolbarLabel|The label for the Grid bottom toolbar"
33304
34051
  bottomToolbarLabel="Bottom toolbar"
33305
-
34052
+
33306
34053
  i18n-editToolbarToolText="kendo.grid.editToolbarToolText|The text for the Grid Edit toolbar tool"
33307
34054
  editToolbarToolText="Edit"
33308
-
34055
+
33309
34056
  i18n-saveToolbarToolText="kendo.grid.saveToolbarToolText|The text for the Grid Save toolbar tool"
33310
34057
  saveToolbarToolText="Save"
33311
-
34058
+
33312
34059
  i18n-addToolbarToolText="kendo.grid.addToolbarToolText|The text for the Grid Add toolbar tool"
33313
34060
  addToolbarToolText="Add"
33314
-
34061
+
33315
34062
  i18n-cancelToolbarToolText="kendo.grid.cancelToolbarToolText|The text for the Grid Cancel toolbar tool"
33316
34063
  cancelToolbarToolText="Cancel"
33317
-
34064
+
33318
34065
  i18n-removeToolbarToolText="kendo.grid.removeToolbarToolText|The text for the Grid Remove toolbar tool"
33319
34066
  removeToolbarToolText="Delete"
33320
-
34067
+
33321
34068
  i18n-excelExportToolbarToolText="kendo.grid.excelExportToolbarToolText|The text for the Grid Excel export toolbar tool"
33322
34069
  excelExportToolbarToolText="Excel Export"
33323
-
34070
+
33324
34071
  i18n-pdfExportToolbarToolText="kendo.grid.pdfExportToolbarToolText|The text for the Grid PDF export toolbar tool"
33325
34072
  pdfExportToolbarToolText="PDF Export"
33326
-
34073
+
33327
34074
  i18n-groupPanelLabel="kendo.grid.groupPanelLabel|The label for the Grid group panel toolbar"
33328
34075
  groupPanelLabel="Group panel"
33329
-
34076
+
33330
34077
  i18n-dragRowHandleLabel="kendo.grid.dragRowHandleLabel|The label for the Grid drag row handle"
33331
34078
  dragRowHandleLabel="Drag row"
33332
-
34079
+
33333
34080
  i18n-columnMenuFilterTabTitle="kendo.grid.columnMenuFilterTabTitle|The title for the column menu Filter tab"
33334
34081
  columnMenuFilterTabTitle="Filter"
33335
-
34082
+
33336
34083
  i18n-columnMenuGeneralTabTitle="kendo.grid.columnMenuGeneralTabTitle|The title for the column menu General tab"
33337
34084
  columnMenuGeneralTabTitle="General"
33338
-
34085
+
33339
34086
  i18n-columnMenuColumnsTabTitle="kendo.grid.columnMenuColumnsTabTitle|The title for the column menu Columns tab"
33340
34087
  columnMenuColumnsTabTitle="Columns"
33341
-
34088
+
33342
34089
  i18n-groupChipMenuPrevious="kendo.grid.groupChipMenuPrevious|The text for the Group pane Chip Menu Move as previous item"
33343
34090
  groupChipMenuPrevious="Move as previous"
33344
-
34091
+
33345
34092
  i18n-groupChipMenuNext="kendo.grid.groupChipMenuNext|The text for the Group pane Chip Menu Move as next item"
33346
34093
  groupChipMenuNext="Move as next"
33347
-
34094
+
33348
34095
  i18n-groupToolbarToolText="kendo.grid.groupToolbarToolText|The button text of the Group toolbar tool"
33349
34096
  groupToolbarToolText="Group"
33350
-
34097
+
33351
34098
  i18n-formValidationErrorText="kendo.grid.formValidationErrorText|The default text of a form validation error when using external editing."
33352
34099
  formValidationErrorText="{{ 'The {fieldName} field has {errorName} validation error' }}"
33353
-
34100
+
33354
34101
  i18n-removeConfirmationDialogTitle="kendo.grid.removeConfirmationDialogTitle|The title of the built-in remove item confirmation Dialog"
33355
34102
  removeConfirmationDialogTitle="Please confirm"
33356
-
34103
+
33357
34104
  i18n-removeConfirmationDialogContent="kendo.grid.removeConfirmationDialogContent|The content of the built-in remove item confirmation Dialog"
33358
34105
  removeConfirmationDialogContent="Are you sure you want to delete this item?"
33359
-
34106
+
33360
34107
  i18n-removeConfirmationDialogConfirmText="kendo.grid.removeConfirmationDialogConfirmText|The text of the built-in remove item confirmation Dialog confirm action button"
33361
34108
  removeConfirmationDialogConfirmText="Yes"
33362
-
34109
+
33363
34110
  i18n-removeConfirmationDialogRejectText="kendo.grid.removeConfirmationDialogRejectText|The text of the built-in remove item confirmation Dialog reject action button"
33364
34111
  removeConfirmationDialogRejectText="No"
33365
-
34112
+
33366
34113
  i18n-externalEditingTitle="kendo.grid.externalEditingTitle|The title of the built-in external editing form container when editing an item"
33367
34114
  externalEditingTitle="Edit"
33368
-
34115
+
33369
34116
  i18n-externalEditingAddTitle="kendo.grid.externalEditingAddTitle|The title of the built-in external editing form container when adding a new item"
33370
34117
  externalEditingAddTitle="Add"
33371
-
34118
+
33372
34119
  i18n-externalEditingSaveText="kendo.grid.externalEditingSaveText|The text of the external editing form Save button"
33373
34120
  externalEditingSaveText="Save"
33374
-
34121
+
33375
34122
  i18n-externalEditingCancelText="kendo.grid.externalEditingCancelText|The text of the external editing form Cancel button"
33376
34123
  externalEditingCancelText="Cancel"
33377
-
34124
+
33378
34125
  i18n-aiAssistantToolbarToolText="kendo.grid.aiAssistantToolbarToolText|The text of the AI Assistant toolbar tool"
33379
34126
  aiAssistantToolbarToolText="AI Assistant"
33380
-
34127
+
33381
34128
  i18n-aiAssistantWindowTitle="kendo.grid.aiAssistantWindowTitle|The text of the AI Assistant Window title"
33382
34129
  aiAssistantWindowTitle="AI Assistant"
33383
-
34130
+
33384
34131
  i18n-aiAssistantApplyButtonText="kendo.grid.aiAssistantApplyButtonText|The text of the AI Assistant Apply button"
33385
34132
  aiAssistantApplyButtonText="Apply"
33386
-
34133
+
33387
34134
  i18n-aiAssistantWindowCloseTitle="kendo.grid.aiAssistantWindowCloseTitle|The title of the AI Assistant Window close button"
33388
34135
  aiAssistantWindowCloseTitle="Close"
33389
-
34136
+
33390
34137
  i18n-aiAssistantWindowMaximizeTitle="kendo.grid.aiAssistantWindowMaximizeTitle|The title of the AI Assistant Window maximize button"
33391
34138
  aiAssistantWindowMaximizeTitle="Maximize"
33392
-
34139
+
33393
34140
  i18n-aiAssistantWindowMinimizeTitle="kendo.grid.aiAssistantWindowMinimizeTitle|The title of the AI Assistant Window minimize button"
33394
34141
  aiAssistantWindowMinimizeTitle="Minimize"
33395
-
34142
+
33396
34143
  i18n-aiAssistantWindowRestoreTitle="kendo.grid.aiAssistantWindowRestoreTitle|The title of the AI Assistant Window restore button"
33397
34144
  aiAssistantWindowRestoreTitle="Restore"
33398
-
34145
+
33399
34146
  i18n-aiAssistantOutputCardTitle="kendo.grid.aiAssistantOutputCardTitle|The title of the AI Assistant Prompt Output Card"
33400
34147
  aiAssistantOutputCardTitle="Generated with AI"
33401
-
34148
+
33402
34149
  i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
33403
34150
  aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
33404
-
34151
+
33405
34152
  i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
33406
34153
  aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
33407
-
34154
+
33408
34155
  i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
33409
34156
  aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
33410
-
34157
+
33411
34158
  i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
33412
34159
  aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
33413
-
34160
+
33414
34161
  i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
33415
34162
  columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
33416
-
34163
+
33417
34164
  i18n-multiCheckboxFilterSearchPlaceholder="kendo.grid.multiCheckboxFilterSearchPlaceholder|The placeholder text for the multi-checkbox filter search input"
33418
34165
  multiCheckboxFilterSearchPlaceholder="Search..."
33419
-
34166
+
33420
34167
  i18n-multiCheckboxFilterSelectAllLabel="kendo.grid.multiCheckboxFilterSelectAllLabel|The label for the multi-checkbox filter select all option"
33421
34168
  multiCheckboxFilterSelectAllLabel="Select all"
33422
-
34169
+
33423
34170
  i18n-multiCheckboxFilterSelectedItemsCount="kendo.grid.multiCheckboxFilterSelectedItemsCount|The text for the multi-checkbox filter selected items count"
33424
34171
  multiCheckboxFilterSelectedItemsCount="{{ '{selectedItemsCount} selected items' }}"
33425
34172
  >
@@ -33832,7 +34579,7 @@ class GridComponent {
33832
34579
  position="bottom">
33833
34580
  </kendo-grid-toolbar>
33834
34581
  }
33835
-
34582
+
33836
34583
  <ng-template #defaultHint>
33837
34584
  <kendo-icon-wrapper
33838
34585
  [name]="getHintSettings('hintIcon')"
@@ -33841,7 +34588,7 @@ class GridComponent {
33841
34588
  </kendo-icon-wrapper>
33842
34589
  {{hintText}}
33843
34590
  </ng-template>
33844
-
34591
+
33845
34592
  <ng-template #defaultPager>
33846
34593
  <div class="k-pager-numbers-wrap">
33847
34594
  @if (normalizedPageableSettings.previousNext) {
@@ -33874,14 +34621,14 @@ class GridComponent {
33874
34621
  </ng-template>
33875
34622
  <div #dialogContainer></div>
33876
34623
  <div #windowContainer></div>
33877
-
34624
+
33878
34625
  @if (isAdaptiveModeEnabled) {
33879
34626
  <kendo-grid-adaptive-renderer></kendo-grid-adaptive-renderer>
33880
34627
  }
33881
34628
  @if (isVirtual) {
33882
34629
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
33883
34630
  }
33884
-
34631
+
33885
34632
  @if (showLicenseWatermark) {
33886
34633
  <div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
33887
34634
  }
@@ -33938,6 +34685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
33938
34685
  SizingOptionsService,
33939
34686
  RowReorderService,
33940
34687
  ClipboardService,
34688
+ GridAIRequestResponseService,
33941
34689
  RowspanService,
33942
34690
  AdaptiveGridService,
33943
34691
  ColumnMenuService,
@@ -33949,394 +34697,394 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
33949
34697
  <ng-container kendoGridLocalizedMessages
33950
34698
  i18n-groupPanelEmpty="kendo.grid.groupPanelEmpty|The label visible in the Grid group panel when it is empty"
33951
34699
  groupPanelEmpty="Drag a column header and drop it here to group by that column"
33952
-
34700
+
33953
34701
  i18n-noRecords="kendo.grid.noRecords|The label visible in the Grid when there are no records"
33954
34702
  noRecords="No records available."
33955
-
34703
+
33956
34704
  i18n-pagerLabel="kendo.grid.pagerLabel|The label for the Grid pager"
33957
34705
  pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
33958
-
34706
+
33959
34707
  i18n-pagerFirstPage="kendo.grid.pagerFirstPage|The label for the first page button in Grid pager"
33960
34708
  pagerFirstPage="Go to the first page"
33961
-
34709
+
33962
34710
  i18n-pagerPreviousPage="kendo.grid.pagerPreviousPage|The label for the previous page button in Grid pager"
33963
34711
  pagerPreviousPage="Go to the previous page"
33964
-
34712
+
33965
34713
  i18n-pagerNextPage="kendo.grid.pagerNextPage|The label for the next page button in Grid pager"
33966
34714
  pagerNextPage="Go to the next page"
33967
-
34715
+
33968
34716
  i18n-pagerLastPage="kendo.grid.pagerLastPage|The label for the last page button in Grid pager"
33969
34717
  pagerLastPage="Go to the last page"
33970
-
34718
+
33971
34719
  i18n-pagerPage="kendo.grid.pagerPage|The label before the current page number in the Grid pager"
33972
34720
  pagerPage="Page"
33973
-
34721
+
33974
34722
  i18n-pagerOf="kendo.grid.pagerOf|The label before the total pages number in the Grid pager"
33975
34723
  pagerOf="of"
33976
-
34724
+
33977
34725
  i18n-pagerItems="kendo.grid.pagerItems|The label after the total pages number in the Grid pager"
33978
34726
  pagerItems="items"
33979
-
34727
+
33980
34728
  i18n-pagerPageNumberInputTitle="kendo.grid.pagerPageNumberInputTitle|The label for the pager input in the Grid pager"
33981
34729
  pagerPageNumberInputTitle="Page Number"
33982
-
34730
+
33983
34731
  i18n-pagerItemsPerPage="kendo.grid.pagerItemsPerPage|The label for the page size chooser in the Grid pager"
33984
34732
  pagerItemsPerPage="items per page"
33985
-
34733
+
33986
34734
  i18n-pagerInputLabel="kendo.grid.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number"
33987
34735
  pagerInputLabel="Type a page number"
33988
-
34736
+
33989
34737
  i18n-filter="kendo.grid.filter|The label of the filter cell or icon"
33990
34738
  filter="Filter"
33991
-
34739
+
33992
34740
  i18n-filterInputLabel="kendo.grid.filterInputLabel|The label of the filter row and menu inputs"
33993
34741
  filterInputLabel="{{ '{columnName} Filter' }}"
33994
-
34742
+
33995
34743
  i18n-filterMenuTitle="kendo.grid.filterMenuTitle|The title of the filter menu icon"
33996
34744
  filterMenuTitle="{{ '{columnName} Filter Menu' }}"
33997
-
34745
+
33998
34746
  i18n-filterMenuOperatorsDropDownLabel="kendo.grid.filterMenuOperatorsDropDownLabel|The label of the filter menu operators dropdown"
33999
34747
  filterMenuOperatorsDropDownLabel="{{ '{columnName} Filter Operators' }}"
34000
-
34748
+
34001
34749
  i18n-filterCellOperatorLabel="kendo.grid.filterCellOperatorLabel|The label of the filter cell operators dropdown"
34002
34750
  filterCellOperatorLabel="{{ 'Filter cell operators for {columnName}' }}"
34003
-
34751
+
34004
34752
  i18n-booleanFilterCellLabel="kendo.grid.booleanFilterCellLabel|The label of the boolean filter cell dropdown"
34005
34753
  booleanFilterCellLabel="{{ 'Boolean filter cell for {columnName}' }}"
34006
-
34754
+
34007
34755
  i18n-filterMenuLogicDropDownLabel="kendo.grid.filterMenuLogicDropDownLabel|The label of the filter menu logic dropdown"
34008
34756
  filterMenuLogicDropDownLabel="{{ '{columnName} Filter Logic' }}"
34009
-
34757
+
34010
34758
  i18n-filterEqOperator="kendo.grid.filterEqOperator|The text of the equal filter operator"
34011
34759
  filterEqOperator="Is equal to"
34012
-
34760
+
34013
34761
  i18n-filterNotEqOperator="kendo.grid.filterNotEqOperator|The text of the not equal filter operator"
34014
34762
  filterNotEqOperator="Is not equal to"
34015
-
34763
+
34016
34764
  i18n-filterIsNullOperator="kendo.grid.filterIsNullOperator|The text of the is null filter operator"
34017
34765
  filterIsNullOperator="Is null"
34018
-
34766
+
34019
34767
  i18n-filterIsNotNullOperator="kendo.grid.filterIsNotNullOperator|The text of the is not null filter operator"
34020
34768
  filterIsNotNullOperator="Is not null"
34021
-
34769
+
34022
34770
  i18n-filterIsEmptyOperator="kendo.grid.filterIsEmptyOperator|The text of the is empty filter operator"
34023
34771
  filterIsEmptyOperator="Is empty"
34024
-
34772
+
34025
34773
  i18n-filterIsNotEmptyOperator="kendo.grid.filterIsNotEmptyOperator|The text of the is not empty filter operator"
34026
34774
  filterIsNotEmptyOperator="Is not empty"
34027
-
34775
+
34028
34776
  i18n-filterStartsWithOperator="kendo.grid.filterStartsWithOperator|The text of the starts with filter operator"
34029
34777
  filterStartsWithOperator="Starts with"
34030
-
34778
+
34031
34779
  i18n-filterContainsOperator="kendo.grid.filterContainsOperator|The text of the contains filter operator"
34032
34780
  filterContainsOperator="Contains"
34033
-
34781
+
34034
34782
  i18n-filterNotContainsOperator="kendo.grid.filterNotContainsOperator|The text of the does not contain filter operator"
34035
34783
  filterNotContainsOperator="Does not contain"
34036
-
34784
+
34037
34785
  i18n-filterEndsWithOperator="kendo.grid.filterEndsWithOperator|The text of the ends with filter operator"
34038
34786
  filterEndsWithOperator="Ends with"
34039
-
34787
+
34040
34788
  i18n-filterGteOperator="kendo.grid.filterGteOperator|The text of the greater than or equal filter operator"
34041
34789
  filterGteOperator="Is greater than or equal to"
34042
-
34790
+
34043
34791
  i18n-filterGtOperator="kendo.grid.filterGtOperator|The text of the greater than filter operator"
34044
34792
  filterGtOperator="Is greater than"
34045
-
34793
+
34046
34794
  i18n-filterLteOperator="kendo.grid.filterLteOperator|The text of the less than or equal filter operator"
34047
34795
  filterLteOperator="Is less than or equal to"
34048
-
34796
+
34049
34797
  i18n-filterLtOperator="kendo.grid.filterLtOperator|The text of the less than filter operator"
34050
34798
  filterLtOperator="Is less than"
34051
-
34799
+
34052
34800
  i18n-filterIsTrue="kendo.grid.filterIsTrue|The text of the IsTrue boolean filter option"
34053
34801
  filterIsTrue="Is True"
34054
-
34802
+
34055
34803
  i18n-filterIsFalse="kendo.grid.filterIsFalse|The text of the IsFalse boolean filter option"
34056
34804
  filterIsFalse="Is False"
34057
-
34805
+
34058
34806
  i18n-filterBooleanAll="kendo.grid.filterBooleanAll|The text of the (All) boolean filter option"
34059
34807
  filterBooleanAll="(All)"
34060
-
34808
+
34061
34809
  i18n-filterAfterOrEqualOperator="kendo.grid.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
34062
34810
  filterAfterOrEqualOperator="Is after or equal to"
34063
-
34811
+
34064
34812
  i18n-filterAfterOperator="kendo.grid.filterAfterOperator|The text of the after date filter operator"
34065
34813
  filterAfterOperator="Is after"
34066
-
34814
+
34067
34815
  i18n-filterBeforeOperator="kendo.grid.filterBeforeOperator|The text of the before date filter operator"
34068
34816
  filterBeforeOperator="Is before"
34069
-
34817
+
34070
34818
  i18n-filterBeforeOrEqualOperator="kendo.grid.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
34071
34819
  filterBeforeOrEqualOperator="Is before or equal to"
34072
-
34820
+
34073
34821
  i18n-filterFilterButton="kendo.grid.filterFilterButton|The text of the filter button"
34074
34822
  filterFilterButton="Filter"
34075
-
34823
+
34076
34824
  i18n-filterClearButton="kendo.grid.filterClearButton|The text of the clear filter button"
34077
34825
  filterClearButton="Clear"
34078
-
34826
+
34079
34827
  i18n-sortClearButton="kendo.grid.sortClearButton|The text of the clear sort button located in the Sort Toolbar Tool and adaptive Sort Toolbar Tool"
34080
34828
  sortClearButton="Clear sorting"
34081
-
34829
+
34082
34830
  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
34831
  adaptiveCloseButtonTitle="Close"
34084
-
34832
+
34085
34833
  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
34834
  adaptiveBackButtonTitle="Back"
34087
-
34835
+
34088
34836
  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
34837
  filterClearAllButton="Clear all filters"
34090
-
34838
+
34091
34839
  i18n-groupClearButton="kendo.grid.groupClearButton|The text of the clear grouping button in the Group Toolbar Tool and adaptive Group Toolbar Tool"
34092
34840
  groupClearButton="Clear grouping"
34093
-
34841
+
34094
34842
  i18n-sortDoneButton="kendo.grid.sortDoneButton|The text of the done sort button"
34095
34843
  sortDoneButton="Done"
34096
-
34844
+
34097
34845
  i18n-groupDoneButton="kendo.grid.groupDoneButton|The text of the done group button in the adaptive Group Toolbar Tool"
34098
34846
  groupDoneButton="Done"
34099
-
34847
+
34100
34848
  i18n-filterAndLogic="kendo.grid.filterAndLogic|The text of the And filter logic"
34101
34849
  filterAndLogic="And"
34102
-
34850
+
34103
34851
  i18n-filterOrLogic="kendo.grid.filterOrLogic|The text of the Or filter logic"
34104
34852
  filterOrLogic="Or"
34105
-
34853
+
34106
34854
  i18n-filterToolbarToolText="kendo.grid.filterToolbarToolText|The button text of the Filter toolbar tool"
34107
34855
  filterToolbarToolText="Filter"
34108
-
34856
+
34109
34857
  i18n-loading="kendo.grid.loading|The loading text"
34110
34858
  loading="Loading"
34111
-
34859
+
34112
34860
  i18n-gridLabel="kendo.grid.gridLabel|The Grid aria-label"
34113
34861
  gridLabel="Data table"
34114
-
34862
+
34115
34863
  i18n-columnMenu="kendo.grid.columnMenu|The title of the column menu icon"
34116
34864
  columnMenu="{{ '{columnName} Column Menu' }}"
34117
-
34865
+
34118
34866
  i18n-columns="kendo.grid.columns|The text for the Grid Column Chooser and Column Chooser toolbar tool"
34119
34867
  columns="Columns"
34120
-
34868
+
34121
34869
  i18n-columnsSubtitle="kendo.grid.columnsSubtitle|The subtitle for the adaptive Grid Column Chooser and Column Chooser toolbar tool"
34122
34870
  columnsSubtitle="Selected fields are visible"
34123
-
34871
+
34124
34872
  i18n-adaptiveFilterTitle="kendo.grid.adaptiveFilterTitle|The title that is displayed in the adaptive Filter Toolbar Tool and Filter Menu"
34125
34873
  adaptiveFilterTitle="Filter by"
34126
-
34874
+
34127
34875
  i18n-adaptiveFilterOperatorsTitle="kendo.grid.adaptiveFilterOperatorsTitle|The title that is displayed in the Operators Action Sheet"
34128
34876
  adaptiveFilterOperatorsTitle="Operators"
34129
-
34877
+
34130
34878
  i18n-adaptiveSortTitle="kendo.grid.adaptiveSortTitle|The title that is displayed in the adaptive Sort Toolbar Tool"
34131
34879
  adaptiveSortTitle="Sort by"
34132
-
34880
+
34133
34881
  i18n-adaptiveGroupTitle="kendo.grid.adaptiveGroupTitle|The title that is displayed in the adaptive Group Toolbar Tool."
34134
34882
  adaptiveGroupTitle="Group by"
34135
-
34883
+
34136
34884
  i18n-lock="kendo.grid.lock|The text shown in the column menu for the lock item"
34137
34885
  lock="Lock"
34138
-
34886
+
34139
34887
  i18n-unlock="kendo.grid.unlock|The text shown in the column menu for the unlock item"
34140
34888
  unlock="Unlock"
34141
-
34889
+
34142
34890
  i18n-setColumnPosition="kendo.grid.setColumnPosition|The text shown in the column menu for the set column position item"
34143
34891
  setColumnPosition="Set Column Position"
34144
-
34892
+
34145
34893
  i18n-stick="kendo.grid.stick|The text shown in the column menu for the stick item"
34146
34894
  stick="Stick"
34147
-
34895
+
34148
34896
  i18n-unstick="kendo.grid.unstick|The text shown in the column menu for the unstick item"
34149
34897
  unstick="Unstick"
34150
-
34898
+
34151
34899
  i18n-sortable="kendo.grid.sortable|The label of the sort icon"
34152
34900
  sortable="Sortable"
34153
-
34901
+
34154
34902
  i18n-sortAscending="kendo.grid.sortAscending|The text shown in the column menu for the sort ascending item"
34155
34903
  sortAscending="Sort Ascending"
34156
-
34904
+
34157
34905
  i18n-sortDescending="kendo.grid.sortDescending|The text shown in the column menu for the sort descending item"
34158
34906
  sortDescending="Sort Descending"
34159
-
34907
+
34160
34908
  i18n-autosizeAllColumns="kendo.grid.autosizeAllColumns|The text shown in the column menu for the autosize all columns item"
34161
34909
  autosizeAllColumns="Autosize All Columns"
34162
-
34910
+
34163
34911
  i18n-autosizeThisColumn="kendo.grid.autosizeThisColumn|The text shown in the column menu for the autosize this column item"
34164
34912
  autosizeThisColumn="Autosize This Column"
34165
-
34913
+
34166
34914
  i18n-sortedDefault="kendo.grid.sortedDefault|The status announcement when a column is no longer sorted"
34167
34915
  sortedDefault="Not Sorted"
34168
-
34916
+
34169
34917
  i18n-sortedAscending="kendo.grid.sortedAscending|The title of the Group Chip indicating the ascending sorting order of the groups"
34170
34918
  sortedAscending="Sorted Ascending"
34171
-
34919
+
34172
34920
  i18n-sortedDescending="kendo.grid.sortedDescending|The title of the Group Chip indicating the descending sorting order of the groups"
34173
34921
  sortedDescending="Sorted Descending"
34174
-
34922
+
34175
34923
  i18n-columnsApply="kendo.grid.columnsApply|The text shown in the column menu or column chooser for the columns apply button"
34176
34924
  columnsApply="Apply"
34177
-
34925
+
34178
34926
  i18n-columnsReset="kendo.grid.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
34179
34927
  columnsReset="Reset"
34180
-
34928
+
34181
34929
  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
34930
  detailExpand="Expand Details"
34183
-
34931
+
34184
34932
  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
34933
  detailCollapse="Collapse Details"
34186
-
34934
+
34187
34935
  i18n-filterDateToday="kendo.grid.filterDateToday|The text of the Today button of the Date filter."
34188
34936
  filterDateToday="TODAY"
34189
-
34937
+
34190
34938
  i18n-filterDateToggle="kendo.grid.filterDateToggle|The title of the Toggle button of the Date filter."
34191
34939
  filterDateToggle="Toggle Calendar"
34192
-
34940
+
34193
34941
  i18n-filterNumericDecrement="kendo.grid.filterNumericDecrement|The title of the Decrement button of the Numeric filter."
34194
34942
  filterNumericDecrement="Decrement"
34195
-
34943
+
34196
34944
  i18n-filterNumericIncrement="kendo.grid.filterNumericIncrement|The title of the Increment button of the Numeric filter."
34197
34945
  filterNumericIncrement="Increment"
34198
-
34946
+
34199
34947
  i18n-selectionCheckboxLabel="kendo.grid.selectionCheckboxLabel|The labels of the checkbox column checkboxes."
34200
34948
  selectionCheckboxLabel="Select Row"
34201
-
34949
+
34202
34950
  i18n-selectAllCheckboxLabel="kendo.grid.selectAllCheckboxLabel|The label of the checkbox column select all checkbox."
34203
34951
  selectAllCheckboxLabel="Select All Rows"
34204
-
34952
+
34205
34953
  i18n-sortToolbarToolText="kendo.grid.sortToolbarToolText|The button text of the Sort toolbar tool."
34206
34954
  sortToolbarToolText="Sort"
34207
-
34955
+
34208
34956
  i18n-groupCollapse="kendo.grid.groupCollapse|The text of the title and aria-label attributes applied to the collapse icon of group rows."
34209
34957
  groupCollapse="Collapse Group"
34210
-
34958
+
34211
34959
  i18n-groupExpand="kendo.grid.groupExpand|The text of the title and aria-label attributes applied to the expand icon of group rows."
34212
34960
  groupExpand="Expand Group"
34213
-
34961
+
34214
34962
  i18n-pagerSelectPage="kendo.grid.pagerSelectPage|The text of the title and aria-label attributes applied to the page chooser in the Grid Pager"
34215
34963
  pagerSelectPage="Select page"
34216
-
34964
+
34217
34965
  i18n-topToolbarLabel="kendo.grid.topToolbarLabel|The label for the Grid top toolbar"
34218
34966
  topToolbarLabel="Top toolbar"
34219
-
34967
+
34220
34968
  i18n-bottomToolbarLabel="kendo.grid.bottomToolbarLabel|The label for the Grid bottom toolbar"
34221
34969
  bottomToolbarLabel="Bottom toolbar"
34222
-
34970
+
34223
34971
  i18n-editToolbarToolText="kendo.grid.editToolbarToolText|The text for the Grid Edit toolbar tool"
34224
34972
  editToolbarToolText="Edit"
34225
-
34973
+
34226
34974
  i18n-saveToolbarToolText="kendo.grid.saveToolbarToolText|The text for the Grid Save toolbar tool"
34227
34975
  saveToolbarToolText="Save"
34228
-
34976
+
34229
34977
  i18n-addToolbarToolText="kendo.grid.addToolbarToolText|The text for the Grid Add toolbar tool"
34230
34978
  addToolbarToolText="Add"
34231
-
34979
+
34232
34980
  i18n-cancelToolbarToolText="kendo.grid.cancelToolbarToolText|The text for the Grid Cancel toolbar tool"
34233
34981
  cancelToolbarToolText="Cancel"
34234
-
34982
+
34235
34983
  i18n-removeToolbarToolText="kendo.grid.removeToolbarToolText|The text for the Grid Remove toolbar tool"
34236
34984
  removeToolbarToolText="Delete"
34237
-
34985
+
34238
34986
  i18n-excelExportToolbarToolText="kendo.grid.excelExportToolbarToolText|The text for the Grid Excel export toolbar tool"
34239
34987
  excelExportToolbarToolText="Excel Export"
34240
-
34988
+
34241
34989
  i18n-pdfExportToolbarToolText="kendo.grid.pdfExportToolbarToolText|The text for the Grid PDF export toolbar tool"
34242
34990
  pdfExportToolbarToolText="PDF Export"
34243
-
34991
+
34244
34992
  i18n-groupPanelLabel="kendo.grid.groupPanelLabel|The label for the Grid group panel toolbar"
34245
34993
  groupPanelLabel="Group panel"
34246
-
34994
+
34247
34995
  i18n-dragRowHandleLabel="kendo.grid.dragRowHandleLabel|The label for the Grid drag row handle"
34248
34996
  dragRowHandleLabel="Drag row"
34249
-
34997
+
34250
34998
  i18n-columnMenuFilterTabTitle="kendo.grid.columnMenuFilterTabTitle|The title for the column menu Filter tab"
34251
34999
  columnMenuFilterTabTitle="Filter"
34252
-
35000
+
34253
35001
  i18n-columnMenuGeneralTabTitle="kendo.grid.columnMenuGeneralTabTitle|The title for the column menu General tab"
34254
35002
  columnMenuGeneralTabTitle="General"
34255
-
35003
+
34256
35004
  i18n-columnMenuColumnsTabTitle="kendo.grid.columnMenuColumnsTabTitle|The title for the column menu Columns tab"
34257
35005
  columnMenuColumnsTabTitle="Columns"
34258
-
35006
+
34259
35007
  i18n-groupChipMenuPrevious="kendo.grid.groupChipMenuPrevious|The text for the Group pane Chip Menu Move as previous item"
34260
35008
  groupChipMenuPrevious="Move as previous"
34261
-
35009
+
34262
35010
  i18n-groupChipMenuNext="kendo.grid.groupChipMenuNext|The text for the Group pane Chip Menu Move as next item"
34263
35011
  groupChipMenuNext="Move as next"
34264
-
35012
+
34265
35013
  i18n-groupToolbarToolText="kendo.grid.groupToolbarToolText|The button text of the Group toolbar tool"
34266
35014
  groupToolbarToolText="Group"
34267
-
35015
+
34268
35016
  i18n-formValidationErrorText="kendo.grid.formValidationErrorText|The default text of a form validation error when using external editing."
34269
35017
  formValidationErrorText="{{ 'The {fieldName} field has {errorName} validation error' }}"
34270
-
35018
+
34271
35019
  i18n-removeConfirmationDialogTitle="kendo.grid.removeConfirmationDialogTitle|The title of the built-in remove item confirmation Dialog"
34272
35020
  removeConfirmationDialogTitle="Please confirm"
34273
-
35021
+
34274
35022
  i18n-removeConfirmationDialogContent="kendo.grid.removeConfirmationDialogContent|The content of the built-in remove item confirmation Dialog"
34275
35023
  removeConfirmationDialogContent="Are you sure you want to delete this item?"
34276
-
35024
+
34277
35025
  i18n-removeConfirmationDialogConfirmText="kendo.grid.removeConfirmationDialogConfirmText|The text of the built-in remove item confirmation Dialog confirm action button"
34278
35026
  removeConfirmationDialogConfirmText="Yes"
34279
-
35027
+
34280
35028
  i18n-removeConfirmationDialogRejectText="kendo.grid.removeConfirmationDialogRejectText|The text of the built-in remove item confirmation Dialog reject action button"
34281
35029
  removeConfirmationDialogRejectText="No"
34282
-
35030
+
34283
35031
  i18n-externalEditingTitle="kendo.grid.externalEditingTitle|The title of the built-in external editing form container when editing an item"
34284
35032
  externalEditingTitle="Edit"
34285
-
35033
+
34286
35034
  i18n-externalEditingAddTitle="kendo.grid.externalEditingAddTitle|The title of the built-in external editing form container when adding a new item"
34287
35035
  externalEditingAddTitle="Add"
34288
-
35036
+
34289
35037
  i18n-externalEditingSaveText="kendo.grid.externalEditingSaveText|The text of the external editing form Save button"
34290
35038
  externalEditingSaveText="Save"
34291
-
35039
+
34292
35040
  i18n-externalEditingCancelText="kendo.grid.externalEditingCancelText|The text of the external editing form Cancel button"
34293
35041
  externalEditingCancelText="Cancel"
34294
-
35042
+
34295
35043
  i18n-aiAssistantToolbarToolText="kendo.grid.aiAssistantToolbarToolText|The text of the AI Assistant toolbar tool"
34296
35044
  aiAssistantToolbarToolText="AI Assistant"
34297
-
35045
+
34298
35046
  i18n-aiAssistantWindowTitle="kendo.grid.aiAssistantWindowTitle|The text of the AI Assistant Window title"
34299
35047
  aiAssistantWindowTitle="AI Assistant"
34300
-
35048
+
34301
35049
  i18n-aiAssistantApplyButtonText="kendo.grid.aiAssistantApplyButtonText|The text of the AI Assistant Apply button"
34302
35050
  aiAssistantApplyButtonText="Apply"
34303
-
35051
+
34304
35052
  i18n-aiAssistantWindowCloseTitle="kendo.grid.aiAssistantWindowCloseTitle|The title of the AI Assistant Window close button"
34305
35053
  aiAssistantWindowCloseTitle="Close"
34306
-
35054
+
34307
35055
  i18n-aiAssistantWindowMaximizeTitle="kendo.grid.aiAssistantWindowMaximizeTitle|The title of the AI Assistant Window maximize button"
34308
35056
  aiAssistantWindowMaximizeTitle="Maximize"
34309
-
35057
+
34310
35058
  i18n-aiAssistantWindowMinimizeTitle="kendo.grid.aiAssistantWindowMinimizeTitle|The title of the AI Assistant Window minimize button"
34311
35059
  aiAssistantWindowMinimizeTitle="Minimize"
34312
-
35060
+
34313
35061
  i18n-aiAssistantWindowRestoreTitle="kendo.grid.aiAssistantWindowRestoreTitle|The title of the AI Assistant Window restore button"
34314
35062
  aiAssistantWindowRestoreTitle="Restore"
34315
-
35063
+
34316
35064
  i18n-aiAssistantOutputCardTitle="kendo.grid.aiAssistantOutputCardTitle|The title of the AI Assistant Prompt Output Card"
34317
35065
  aiAssistantOutputCardTitle="Generated with AI"
34318
-
35066
+
34319
35067
  i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
34320
35068
  aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
34321
-
35069
+
34322
35070
  i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
34323
35071
  aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
34324
-
35072
+
34325
35073
  i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
34326
35074
  aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
34327
-
35075
+
34328
35076
  i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
34329
35077
  aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
34330
-
35078
+
34331
35079
  i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
34332
35080
  columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
34333
-
35081
+
34334
35082
  i18n-multiCheckboxFilterSearchPlaceholder="kendo.grid.multiCheckboxFilterSearchPlaceholder|The placeholder text for the multi-checkbox filter search input"
34335
35083
  multiCheckboxFilterSearchPlaceholder="Search..."
34336
-
35084
+
34337
35085
  i18n-multiCheckboxFilterSelectAllLabel="kendo.grid.multiCheckboxFilterSelectAllLabel|The label for the multi-checkbox filter select all option"
34338
35086
  multiCheckboxFilterSelectAllLabel="Select all"
34339
-
35087
+
34340
35088
  i18n-multiCheckboxFilterSelectedItemsCount="kendo.grid.multiCheckboxFilterSelectedItemsCount|The text for the multi-checkbox filter selected items count"
34341
35089
  multiCheckboxFilterSelectedItemsCount="{{ '{selectedItemsCount} selected items' }}"
34342
35090
  >
@@ -34749,7 +35497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34749
35497
  position="bottom">
34750
35498
  </kendo-grid-toolbar>
34751
35499
  }
34752
-
35500
+
34753
35501
  <ng-template #defaultHint>
34754
35502
  <kendo-icon-wrapper
34755
35503
  [name]="getHintSettings('hintIcon')"
@@ -34758,7 +35506,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34758
35506
  </kendo-icon-wrapper>
34759
35507
  {{hintText}}
34760
35508
  </ng-template>
34761
-
35509
+
34762
35510
  <ng-template #defaultPager>
34763
35511
  <div class="k-pager-numbers-wrap">
34764
35512
  @if (normalizedPageableSettings.previousNext) {
@@ -34791,14 +35539,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34791
35539
  </ng-template>
34792
35540
  <div #dialogContainer></div>
34793
35541
  <div #windowContainer></div>
34794
-
35542
+
34795
35543
  @if (isAdaptiveModeEnabled) {
34796
35544
  <kendo-grid-adaptive-renderer></kendo-grid-adaptive-renderer>
34797
35545
  }
34798
35546
  @if (isVirtual) {
34799
35547
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
34800
35548
  }
34801
-
35549
+
34802
35550
  @if (showLicenseWatermark) {
34803
35551
  <div kendoWatermarkOverlay [licenseMessage]="licenseMessage"></div>
34804
35552
  }
@@ -34830,7 +35578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
34830
35578
  ResizeSensorComponent
34831
35579
  ]
34832
35580
  }]
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: [{
35581
+ }], 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
35582
  type: Input
34835
35583
  }], pageSize: [{
34836
35584
  type: Input
@@ -38463,93 +39211,6 @@ class GridAIAssistantResponseErrorEvent extends PreventableEvent$1 {
38463
39211
  }
38464
39212
  }
38465
39213
 
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
39214
  /**
38554
39215
  * @hidden
38555
39216
  */
@@ -38558,6 +39219,7 @@ class AiAssistantComponent {
38558
39219
  ctx;
38559
39220
  columnInfoService;
38560
39221
  zone;
39222
+ aiRequestResponseService;
38561
39223
  aiPrompt;
38562
39224
  activeView = 0;
38563
39225
  requestUrl;
@@ -38574,42 +39236,15 @@ class AiAssistantComponent {
38574
39236
  // flat columns used for highlight utilities (expects { field })
38575
39237
  columns = [];
38576
39238
  leafColumns = [];
38577
- // nested tree representing the actual Grid column components sent to the AI service
38578
- columnsTree = [];
38579
39239
  idCounter = 0;
38580
- constructor(http, ctx, columnInfoService, zone) {
39240
+ constructor(http, ctx, columnInfoService, zone, aiRequestResponseService) {
38581
39241
  this.http = http;
38582
39242
  this.ctx = ctx;
38583
39243
  this.columnInfoService = columnInfoService;
38584
39244
  this.zone = zone;
39245
+ this.aiRequestResponseService = aiRequestResponseService;
38585
39246
  }
38586
39247
  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
39248
  // Preserve a flat columns array (fields) for highlight utilities.
38614
39249
  // Use leafNamedColumns as the canonical list of leaf columns with display titles.
38615
39250
  this.leafColumns = this.columnInfoService.leafNamedColumns || [];
@@ -38637,8 +39272,7 @@ class AiAssistantComponent {
38637
39272
  this.lastMessage = ev.prompt;
38638
39273
  }
38639
39274
  this.requestData = {
38640
- // send nested tree to AI service
38641
- columns: this.columnsTree,
39275
+ columns: [], // Will be populated by service
38642
39276
  promptMessage: ev.prompt,
38643
39277
  url: this.requestUrl,
38644
39278
  requestOptions: {
@@ -38646,16 +39280,7 @@ class AiAssistantComponent {
38646
39280
  }
38647
39281
  };
38648
39282
  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;
39283
+ this.requestData.requestOptions.body = this.aiRequestResponseService.buildRequestBody(this.requestData.promptMessage, this.requestData.requestOptions.role);
38659
39284
  }
38660
39285
  this.aiToolDirective.promptRequest.emit({ requestData: this.requestData, isRetry: ev.isRetry });
38661
39286
  if (!this.requestUrl) {
@@ -38690,12 +39315,11 @@ class AiAssistantComponent {
38690
39315
  return;
38691
39316
  }
38692
39317
  const messages = [];
38693
- // Include optional top-level message from the response
38694
39318
  if (responseBody.message) {
38695
39319
  messages.push(responseBody.message);
38696
39320
  }
38697
- // Execute received commands sequentially and collect messages.
38698
- this.processCommands(responseBody.commands || [], messages);
39321
+ const commandMessages = this.aiRequestResponseService.processCommands(responseBody.commands || [], this.columns, this.leafColumns);
39322
+ messages.push(...commandMessages);
38699
39323
  const responseContentStart = [`${this.ctx.localization.get('aiAssistantOutputCardBodyContent')} \n`];
38700
39324
  const responseContentBody = messages
38701
39325
  .map((output, idx) => `${idx + 1} ${output}`)
@@ -38735,545 +39359,7 @@ class AiAssistantComponent {
38735
39359
  this.currentRequestSubscription = null;
38736
39360
  }
38737
39361
  }
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 });
39362
+ 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
39363
  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
39364
  <kendo-aiprompt
39279
39365
  #aiPrompt
@@ -39377,7 +39463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
39377
39463
  </kendo-aiprompt>
39378
39464
  `
39379
39465
  }]
39380
- }], ctorParameters: () => [{ type: i1$8.HttpClient }, { type: ContextService }, { type: ColumnInfoService }, { type: i0.NgZone }], propDecorators: { aiPrompt: [{
39466
+ }], ctorParameters: () => [{ type: i1$8.HttpClient }, { type: ContextService }, { type: ColumnInfoService }, { type: i0.NgZone }, { type: GridAIRequestResponseService }], propDecorators: { aiPrompt: [{
39381
39467
  type: ViewChild,
39382
39468
  args: [AIPromptComponent]
39383
39469
  }] } });