@progress/kendo-angular-grid 21.0.0-develop.13 → 21.0.0-develop.15

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.
@@ -872,6 +872,8 @@ class ContextService {
872
872
  scroller;
873
873
  dataBindingDirective;
874
874
  highlightDirective;
875
+ excelComponent;
876
+ pdfComponent;
875
877
  constructor(renderer, localization) {
876
878
  this.renderer = renderer;
877
879
  this.localization = localization;
@@ -2118,6 +2120,9 @@ class IdService {
2118
2120
  selectAllCheckboxId() {
2119
2121
  return `${this.prefix}-select-all`;
2120
2122
  }
2123
+ columnId(colIndex) {
2124
+ return `${this.prefix}-col${colIndex}`;
2125
+ }
2121
2126
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2122
2127
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IdService });
2123
2128
  }
@@ -2530,7 +2535,7 @@ class ColumnBase {
2530
2535
  if (parent && idService && parent.idService.gridId() === idService.gridId() && !isColumnContainer(parent)) {
2531
2536
  throw new Error(ColumnConfigurationErrorMessages.columnNested);
2532
2537
  }
2533
- this._id = `k-grid-column-${columnId++}`;
2538
+ this._id = this.idService?.columnId(columnId++);
2534
2539
  }
2535
2540
  ngAfterViewInit() {
2536
2541
  this.initialMinResizableWidth = this.minResizableWidth || 10;
@@ -13429,7 +13434,6 @@ class ColumnChooserComponent {
13429
13434
  */
13430
13435
  allowHideAll = true;
13431
13436
  anchor;
13432
- columnList;
13433
13437
  get columns() {
13434
13438
  return this.columnInfoService.leafNamedColumns;
13435
13439
  }
@@ -13524,7 +13528,7 @@ class ColumnChooserComponent {
13524
13528
  }
13525
13529
  }
13526
13530
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnChooserComponent, deps: [{ token: ContextService }, { token: ColumnInfoService }, { token: i2.PopupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
13527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ColumnChooserComponent, isStandalone: true, selector: "kendo-grid-column-chooser", inputs: { autoSync: "autoSync", filterable: "filterable", showSelectAll: "showSelectAll", allowHideAll: "allowHideAll" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }, { propertyName: "columnList", first: true, predicate: ["columnList"], descendants: true }], ngImport: i0, template: `
13531
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ColumnChooserComponent, isStandalone: true, selector: "kendo-grid-column-chooser", inputs: { autoSync: "autoSync", filterable: "filterable", showSelectAll: "showSelectAll", allowHideAll: "allowHideAll" }, viewQueries: [{ propertyName: "anchor", first: true, predicate: ["anchor"], descendants: true }], ngImport: i0, template: `
13528
13532
  <button #anchor
13529
13533
  kendoButton
13530
13534
  type="button"
@@ -13582,7 +13586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
13582
13586
  </ng-template>
13583
13587
  `,
13584
13588
  standalone: true,
13585
- imports: [ButtonComponent, ColumnListComponent, ColumnChooserContentComponent]
13589
+ imports: [ButtonComponent, ColumnChooserContentComponent]
13586
13590
  }]
13587
13591
  }], ctorParameters: () => [{ type: ContextService }, { type: ColumnInfoService }, { type: i2.PopupService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { autoSync: [{
13588
13592
  type: Input
@@ -13595,9 +13599,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
13595
13599
  }], anchor: [{
13596
13600
  type: ViewChild,
13597
13601
  args: ['anchor']
13598
- }], columnList: [{
13599
- type: ViewChild,
13600
- args: ['columnList']
13601
13602
  }] } });
13602
13603
 
13603
13604
  /**
@@ -16418,12 +16419,16 @@ class ExcelComponent {
16418
16419
  this.ctx = ctx;
16419
16420
  this.zone = zone;
16420
16421
  this.saveSubscription = excelService.saveToExcel.subscribe(this.save.bind(this));
16422
+ this.ctx.excelComponent = this;
16421
16423
  }
16422
16424
  ngOnDestroy() {
16423
16425
  this.saveSubscription.unsubscribe();
16424
16426
  if (this.dataSubscription) {
16425
16427
  this.dataSubscription.unsubscribe();
16426
16428
  }
16429
+ if (this.ctx.excelComponent === this) {
16430
+ this.ctx.excelComponent = undefined;
16431
+ }
16427
16432
  }
16428
16433
  save(component) {
16429
16434
  const data = (this.fetchData || fetchComponentData)(component);
@@ -16938,11 +16943,17 @@ class PDFComponent extends PDFExportComponent {
16938
16943
  this.drawSubscription = pdfService.drawPDF.subscribe(this.drawPDF.bind(this));
16939
16944
  this.reset = this.reset.bind(this);
16940
16945
  this.draw = this.draw.bind(this);
16946
+ if (this.ctx) {
16947
+ this.ctx.pdfComponent = this;
16948
+ }
16941
16949
  }
16942
16950
  ngOnDestroy() {
16943
16951
  this.saveSubscription.unsubscribe();
16944
16952
  this.drawSubscription.unsubscribe();
16945
16953
  this.reset();
16954
+ if (this.ctx?.pdfComponent === this) {
16955
+ this.ctx.pdfComponent = undefined;
16956
+ }
16946
16957
  }
16947
16958
  /**
16948
16959
  * @hidden
@@ -22942,8 +22953,8 @@ const packageMetadata = {
22942
22953
  productName: 'Kendo UI for Angular',
22943
22954
  productCode: 'KENDOUIANGULAR',
22944
22955
  productCodes: ['KENDOUIANGULAR'],
22945
- publishDate: 1761925681,
22946
- version: '21.0.0-develop.13',
22956
+ publishDate: 1762157139,
22957
+ version: '21.0.0-develop.15',
22947
22958
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
22948
22959
  };
22949
22960
 
@@ -26703,6 +26714,18 @@ class GridMessages extends ComponentMessages {
26703
26714
  * The success message dispayed in the AI Assistant Prompt Output Card's body.
26704
26715
  */
26705
26716
  aiAssistantOutputCardBodyContent;
26717
+ /**
26718
+ * The message shown when AI selection requires the Grid selectable option.
26719
+ */
26720
+ aiAssistantSelectionNotEnabled;
26721
+ /**
26722
+ * The message shown when AI selection requires row selection mode.
26723
+ */
26724
+ aiAssistantSelectionRowModeRequired;
26725
+ /**
26726
+ * The message shown when AI selection requires cell selection mode.
26727
+ */
26728
+ aiAssistantSelectionCellModeRequired;
26706
26729
  /**
26707
26730
  * The title of the AI Assistant Window maximize button.
26708
26731
  */
@@ -27141,7 +27164,7 @@ class GridMessages extends ComponentMessages {
27141
27164
  */
27142
27165
  multiCheckboxFilterSelectedItemsCount;
27143
27166
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
27144
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GridMessages, selector: "kendo-grid-messages-base", inputs: { groupPanelEmpty: "groupPanelEmpty", noRecords: "noRecords", pagerLabel: "pagerLabel", pagerFirstPage: "pagerFirstPage", pagerLastPage: "pagerLastPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerPage: "pagerPage", pagerItemsPerPage: "pagerItemsPerPage", pagerOf: "pagerOf", pagerItems: "pagerItems", pagerPageNumberInputTitle: "pagerPageNumberInputTitle", pagerInputLabel: "pagerInputLabel", pagerSelectPage: "pagerSelectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterCellOperatorLabel: "filterCellOperatorLabel", booleanFilterCellLabel: "booleanFilterCellLabel", aiAssistantApplyButtonText: "aiAssistantApplyButtonText", aiAssistantToolbarToolText: "aiAssistantToolbarToolText", aiAssistantWindowTitle: "aiAssistantWindowTitle", aiAssistantWindowCloseTitle: "aiAssistantWindowCloseTitle", aiAssistantOutputCardTitle: "aiAssistantOutputCardTitle", aiAssistantOutputCardBodyContent: "aiAssistantOutputCardBodyContent", aiAssistantWindowMaximizeTitle: "aiAssistantWindowMaximizeTitle", aiAssistantWindowMinimizeTitle: "aiAssistantWindowMinimizeTitle", aiAssistantWindowRestoreTitle: "aiAssistantWindowRestoreTitle", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", adaptiveFilterOperatorsTitle: "adaptiveFilterOperatorsTitle", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", adaptiveCloseButtonTitle: "adaptiveCloseButtonTitle", adaptiveBackButtonTitle: "adaptiveBackButtonTitle", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", filterToolbarToolText: "filterToolbarToolText", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", columnChooserSelectedColumnsCount: "columnChooserSelectedColumnsCount", columnsSubtitle: "columnsSubtitle", adaptiveFilterTitle: "adaptiveFilterTitle", adaptiveSortTitle: "adaptiveSortTitle", adaptiveGroupTitle: "adaptiveGroupTitle", filterClearAllButton: "filterClearAllButton", groupClearButton: "groupClearButton", sortClearButton: "sortClearButton", sortDoneButton: "sortDoneButton", groupDoneButton: "groupDoneButton", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", sortToolbarToolText: "sortToolbarToolText", columnsApply: "columnsApply", columnsReset: "columnsReset", detailExpand: "detailExpand", detailCollapse: "detailCollapse", filterDateToday: "filterDateToday", filterDateToggle: "filterDateToggle", filterNumericDecrement: "filterNumericDecrement", filterNumericIncrement: "filterNumericIncrement", selectionCheckboxLabel: "selectionCheckboxLabel", selectAllCheckboxLabel: "selectAllCheckboxLabel", groupCollapse: "groupCollapse", groupExpand: "groupExpand", topToolbarLabel: "topToolbarLabel", bottomToolbarLabel: "bottomToolbarLabel", editToolbarToolText: "editToolbarToolText", saveToolbarToolText: "saveToolbarToolText", addToolbarToolText: "addToolbarToolText", cancelToolbarToolText: "cancelToolbarToolText", removeToolbarToolText: "removeToolbarToolText", excelExportToolbarToolText: "excelExportToolbarToolText", pdfExportToolbarToolText: "pdfExportToolbarToolText", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle", groupChipMenuPrevious: "groupChipMenuPrevious", groupChipMenuNext: "groupChipMenuNext", groupToolbarToolText: "groupToolbarToolText", formValidationErrorText: "formValidationErrorText", removeConfirmationDialogTitle: "removeConfirmationDialogTitle", removeConfirmationDialogContent: "removeConfirmationDialogContent", removeConfirmationDialogConfirmText: "removeConfirmationDialogConfirmText", removeConfirmationDialogRejectText: "removeConfirmationDialogRejectText", externalEditingTitle: "externalEditingTitle", externalEditingAddTitle: "externalEditingAddTitle", externalEditingSaveText: "externalEditingSaveText", externalEditingCancelText: "externalEditingCancelText", multiCheckboxFilterSearchPlaceholder: "multiCheckboxFilterSearchPlaceholder", multiCheckboxFilterSelectAllLabel: "multiCheckboxFilterSelectAllLabel", multiCheckboxFilterSelectedItemsCount: "multiCheckboxFilterSelectedItemsCount" }, usesInheritance: true, ngImport: i0 });
27167
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GridMessages, selector: "kendo-grid-messages-base", inputs: { groupPanelEmpty: "groupPanelEmpty", noRecords: "noRecords", pagerLabel: "pagerLabel", pagerFirstPage: "pagerFirstPage", pagerLastPage: "pagerLastPage", pagerPreviousPage: "pagerPreviousPage", pagerNextPage: "pagerNextPage", pagerPage: "pagerPage", pagerItemsPerPage: "pagerItemsPerPage", pagerOf: "pagerOf", pagerItems: "pagerItems", pagerPageNumberInputTitle: "pagerPageNumberInputTitle", pagerInputLabel: "pagerInputLabel", pagerSelectPage: "pagerSelectPage", filter: "filter", filterInputLabel: "filterInputLabel", filterMenuTitle: "filterMenuTitle", filterMenuOperatorsDropDownLabel: "filterMenuOperatorsDropDownLabel", filterMenuLogicDropDownLabel: "filterMenuLogicDropDownLabel", filterCellOperatorLabel: "filterCellOperatorLabel", booleanFilterCellLabel: "booleanFilterCellLabel", aiAssistantApplyButtonText: "aiAssistantApplyButtonText", aiAssistantToolbarToolText: "aiAssistantToolbarToolText", aiAssistantWindowTitle: "aiAssistantWindowTitle", aiAssistantWindowCloseTitle: "aiAssistantWindowCloseTitle", aiAssistantOutputCardTitle: "aiAssistantOutputCardTitle", aiAssistantOutputCardBodyContent: "aiAssistantOutputCardBodyContent", aiAssistantSelectionNotEnabled: "aiAssistantSelectionNotEnabled", aiAssistantSelectionRowModeRequired: "aiAssistantSelectionRowModeRequired", aiAssistantSelectionCellModeRequired: "aiAssistantSelectionCellModeRequired", aiAssistantWindowMaximizeTitle: "aiAssistantWindowMaximizeTitle", aiAssistantWindowMinimizeTitle: "aiAssistantWindowMinimizeTitle", aiAssistantWindowRestoreTitle: "aiAssistantWindowRestoreTitle", filterEqOperator: "filterEqOperator", filterNotEqOperator: "filterNotEqOperator", filterIsNullOperator: "filterIsNullOperator", filterIsNotNullOperator: "filterIsNotNullOperator", filterIsEmptyOperator: "filterIsEmptyOperator", filterIsNotEmptyOperator: "filterIsNotEmptyOperator", filterStartsWithOperator: "filterStartsWithOperator", filterContainsOperator: "filterContainsOperator", filterNotContainsOperator: "filterNotContainsOperator", filterEndsWithOperator: "filterEndsWithOperator", filterGteOperator: "filterGteOperator", filterGtOperator: "filterGtOperator", filterLteOperator: "filterLteOperator", filterLtOperator: "filterLtOperator", filterIsTrue: "filterIsTrue", filterIsFalse: "filterIsFalse", filterBooleanAll: "filterBooleanAll", adaptiveFilterOperatorsTitle: "adaptiveFilterOperatorsTitle", filterAfterOrEqualOperator: "filterAfterOrEqualOperator", filterAfterOperator: "filterAfterOperator", filterBeforeOperator: "filterBeforeOperator", filterBeforeOrEqualOperator: "filterBeforeOrEqualOperator", filterFilterButton: "filterFilterButton", filterClearButton: "filterClearButton", adaptiveCloseButtonTitle: "adaptiveCloseButtonTitle", adaptiveBackButtonTitle: "adaptiveBackButtonTitle", filterAndLogic: "filterAndLogic", filterOrLogic: "filterOrLogic", filterToolbarToolText: "filterToolbarToolText", loading: "loading", gridLabel: "gridLabel", columnMenu: "columnMenu", setColumnPosition: "setColumnPosition", columns: "columns", columnChooserSelectedColumnsCount: "columnChooserSelectedColumnsCount", columnsSubtitle: "columnsSubtitle", adaptiveFilterTitle: "adaptiveFilterTitle", adaptiveSortTitle: "adaptiveSortTitle", adaptiveGroupTitle: "adaptiveGroupTitle", filterClearAllButton: "filterClearAllButton", groupClearButton: "groupClearButton", sortClearButton: "sortClearButton", sortDoneButton: "sortDoneButton", groupDoneButton: "groupDoneButton", lock: "lock", unlock: "unlock", stick: "stick", unstick: "unstick", sortable: "sortable", sortAscending: "sortAscending", sortDescending: "sortDescending", autosizeThisColumn: "autosizeThisColumn", autosizeAllColumns: "autosizeAllColumns", sortedAscending: "sortedAscending", sortedDescending: "sortedDescending", sortedDefault: "sortedDefault", sortToolbarToolText: "sortToolbarToolText", columnsApply: "columnsApply", columnsReset: "columnsReset", detailExpand: "detailExpand", detailCollapse: "detailCollapse", filterDateToday: "filterDateToday", filterDateToggle: "filterDateToggle", filterNumericDecrement: "filterNumericDecrement", filterNumericIncrement: "filterNumericIncrement", selectionCheckboxLabel: "selectionCheckboxLabel", selectAllCheckboxLabel: "selectAllCheckboxLabel", groupCollapse: "groupCollapse", groupExpand: "groupExpand", topToolbarLabel: "topToolbarLabel", bottomToolbarLabel: "bottomToolbarLabel", editToolbarToolText: "editToolbarToolText", saveToolbarToolText: "saveToolbarToolText", addToolbarToolText: "addToolbarToolText", cancelToolbarToolText: "cancelToolbarToolText", removeToolbarToolText: "removeToolbarToolText", excelExportToolbarToolText: "excelExportToolbarToolText", pdfExportToolbarToolText: "pdfExportToolbarToolText", groupPanelLabel: "groupPanelLabel", dragRowHandleLabel: "dragRowHandleLabel", columnMenuFilterTabTitle: "columnMenuFilterTabTitle", columnMenuGeneralTabTitle: "columnMenuGeneralTabTitle", columnMenuColumnsTabTitle: "columnMenuColumnsTabTitle", groupChipMenuPrevious: "groupChipMenuPrevious", groupChipMenuNext: "groupChipMenuNext", groupToolbarToolText: "groupToolbarToolText", formValidationErrorText: "formValidationErrorText", removeConfirmationDialogTitle: "removeConfirmationDialogTitle", removeConfirmationDialogContent: "removeConfirmationDialogContent", removeConfirmationDialogConfirmText: "removeConfirmationDialogConfirmText", removeConfirmationDialogRejectText: "removeConfirmationDialogRejectText", externalEditingTitle: "externalEditingTitle", externalEditingAddTitle: "externalEditingAddTitle", externalEditingSaveText: "externalEditingSaveText", externalEditingCancelText: "externalEditingCancelText", multiCheckboxFilterSearchPlaceholder: "multiCheckboxFilterSearchPlaceholder", multiCheckboxFilterSelectAllLabel: "multiCheckboxFilterSelectAllLabel", multiCheckboxFilterSelectedItemsCount: "multiCheckboxFilterSelectedItemsCount" }, usesInheritance: true, ngImport: i0 });
27145
27168
  }
27146
27169
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridMessages, decorators: [{
27147
27170
  type: Directive,
@@ -27203,6 +27226,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
27203
27226
  type: Input
27204
27227
  }], aiAssistantOutputCardBodyContent: [{
27205
27228
  type: Input
27229
+ }], aiAssistantSelectionNotEnabled: [{
27230
+ type: Input
27231
+ }], aiAssistantSelectionRowModeRequired: [{
27232
+ type: Input
27233
+ }], aiAssistantSelectionCellModeRequired: [{
27234
+ type: Input
27206
27235
  }], aiAssistantWindowMaximizeTitle: [{
27207
27236
  type: Input
27208
27237
  }], aiAssistantWindowMinimizeTitle: [{
@@ -32539,6 +32568,15 @@ class GridComponent {
32539
32568
  i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
32540
32569
  aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
32541
32570
 
32571
+ i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
32572
+ aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
32573
+
32574
+ i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
32575
+ aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
32576
+
32577
+ i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
32578
+ aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
32579
+
32542
32580
  i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
32543
32581
  columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
32544
32582
 
@@ -33408,6 +33446,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
33408
33446
  i18n-aiAssistantOutputCardBodyContent="kendo.grid.aiAssistantOutputCardBodyContent|The success message dispayed in the AI Assistant Prompt Output Card's body"
33409
33447
  aiAssistantOutputCardBodyContent="Operation is successful. Data is:"
33410
33448
 
33449
+ i18n-aiAssistantSelectionNotEnabled="kendo.grid.aiAssistantSelectionNotEnabled|The message shown when AI selection requires the Grid selectable option"
33450
+ aiAssistantSelectionNotEnabled="Selection can be applied only when the Grid selectable option is enabled."
33451
+
33452
+ i18n-aiAssistantSelectionRowModeRequired="kendo.grid.aiAssistantSelectionRowModeRequired|The message shown when AI selection requires row selection mode"
33453
+ aiAssistantSelectionRowModeRequired="Selection can be applied only when row selection mode is enabled."
33454
+
33455
+ i18n-aiAssistantSelectionCellModeRequired="kendo.grid.aiAssistantSelectionCellModeRequired|The message shown when AI selection requires cell selection mode"
33456
+ aiAssistantSelectionCellModeRequired="Selection can be applied only when cell selection mode is enabled."
33457
+
33411
33458
  i18n-columnChooserSelectedColumnsCount="kendo.grid.columnChooserSelectedColumnsCount|The text displayed in the Column Chooser for the number of selected columns"
33412
33459
  columnChooserSelectedColumnsCount="{{ '{selectedColumnsCount} Selected items' }}"
33413
33460
 
@@ -37461,7 +37508,7 @@ const DEFAULT_AI_REQUEST_OPTIONS = {
37461
37508
  /**
37462
37509
  * Represents the event data when the AI Assistant request completes successfully.
37463
37510
  */
37464
- class GridToolbarAIResponseSuccessEvent extends PreventableEvent$1 {
37511
+ class GridAIAssistantResponseSuccessEvent extends PreventableEvent$1 {
37465
37512
  /**
37466
37513
  * The HTTP response from the AI service.
37467
37514
  */
@@ -37474,7 +37521,7 @@ class GridToolbarAIResponseSuccessEvent extends PreventableEvent$1 {
37474
37521
  /**
37475
37522
  * Represents the event data when the AI Assistant request completes with an error.
37476
37523
  */
37477
- class GridToolbarAIResponseErrorEvent extends PreventableEvent$1 {
37524
+ class GridAIAssistantResponseErrorEvent extends PreventableEvent$1 {
37478
37525
  /**
37479
37526
  * The HTTP error response from the AI service.
37480
37527
  */
@@ -37592,7 +37639,11 @@ class AiAssistantComponent {
37592
37639
  currentRequestSubscription = null;
37593
37640
  //Remove this when the AI Assistant has a built-in loading indicator
37594
37641
  loadingOutput = { id: 'k-loading-item', output: '', prompt: '' };
37642
+ // flat columns used for highlight utilities (expects { field })
37595
37643
  columns = [];
37644
+ leafColumns = [];
37645
+ // nested tree representing the actual Grid column components sent to the AI service
37646
+ columnsTree = [];
37596
37647
  idCounter = 0;
37597
37648
  constructor(http, ctx, columnInfoService) {
37598
37649
  this.http = http;
@@ -37600,7 +37651,36 @@ class AiAssistantComponent {
37600
37651
  this.columnInfoService = columnInfoService;
37601
37652
  }
37602
37653
  ngAfterViewInit() {
37603
- this.columns = this.columnInfoService.leafNamedColumns.map((col) => ({ field: col.field }));
37654
+ // Build a nested GridColumnDescriptor tree based on the actual Grid columns structure.
37655
+ // This includes root columns and their nested children (for ColumnGroup and SpanColumn).
37656
+ const rootColumns = this.ctx?.grid?.columnList?.rootColumns() || [];
37657
+ const buildDescriptor = (col) => {
37658
+ const hasChildren = Boolean(col.hasChildren && col.childrenArray?.length);
37659
+ const descriptor = {
37660
+ id: col.id,
37661
+ field: col.field
37662
+ };
37663
+ if (hasChildren) {
37664
+ descriptor.header = col.displayTitle;
37665
+ descriptor.columns = col.childrenArray.map((c) => buildDescriptor(c));
37666
+ }
37667
+ // For special columns that don't have a field, emit an optional type token
37668
+ // so the AI service knows how to treat them (checkbox/command/reorder)
37669
+ if (!col.field) {
37670
+ if (isCheckboxColumn(col)) {
37671
+ descriptor.type = 'checkbox';
37672
+ }
37673
+ else if (col instanceof CommandColumnComponent) {
37674
+ descriptor.type = 'command';
37675
+ }
37676
+ }
37677
+ return descriptor;
37678
+ };
37679
+ this.columnsTree = rootColumns.map((col) => buildDescriptor(col));
37680
+ // Preserve a flat columns array (fields) for highlight utilities.
37681
+ // Use leafNamedColumns as the canonical list of leaf columns with display titles.
37682
+ this.leafColumns = this.columnInfoService.leafNamedColumns || [];
37683
+ this.columns = this.leafColumns.map((col) => ({ field: col.field }));
37604
37684
  }
37605
37685
  ngOnDestroy() {
37606
37686
  this.unsubscribeCurrentRequest();
@@ -37624,7 +37704,8 @@ class AiAssistantComponent {
37624
37704
  this.lastMessage = ev.prompt;
37625
37705
  }
37626
37706
  this.requestData = {
37627
- columns: this.columns,
37707
+ // send nested tree to AI service
37708
+ columns: this.columnsTree,
37628
37709
  promptMessage: ev.prompt,
37629
37710
  url: this.requestUrl,
37630
37711
  requestOptions: {
@@ -37668,30 +37749,22 @@ class AiAssistantComponent {
37668
37749
  this.aiToolDirective.emitOpenClose = true;
37669
37750
  this.aiToolDirective.toggleWindow();
37670
37751
  }
37671
- const responseBody = response.body;
37672
- const responseSuccessEvent = new GridToolbarAIResponseSuccessEvent(response);
37752
+ const responseBody = response.body || { commands: [] };
37753
+ const responseSuccessEvent = new GridAIAssistantResponseSuccessEvent(response);
37673
37754
  this.aiToolDirective.responseSuccess.emit(responseSuccessEvent);
37674
37755
  if (responseSuccessEvent.isDefaultPrevented()) {
37675
37756
  this.deleteLoadingOutput();
37676
37757
  return;
37677
37758
  }
37678
- const isFilterable = Boolean(this.ctx.grid.filterable);
37679
- const isSortable = Boolean(this.ctx.grid.sortable);
37680
- const isGroupable = Boolean(this.ctx.grid.groupable);
37681
- if (isFilterable && responseBody.filter) {
37682
- this.processFilterResponse(responseBody.filter);
37683
- }
37684
- if (isSortable && responseBody.sort) {
37685
- this.processArrayResponse(responseBody.sort, this.ctx.grid.currentState.sort || [], (item) => item.field, (mergedArray) => this.ctx.grid.sortChange.next(mergedArray));
37686
- }
37687
- if (isGroupable && responseBody.group) {
37688
- this.processArrayResponse(responseBody.group, this.ctx.grid.currentState.group || [], (item) => item.field, (mergedArray) => this.ctx.grid.groupChange.next(mergedArray));
37689
- }
37690
- if (this.ctx.highlightDirective && responseBody.highlight) {
37691
- this.processHighlightResponse(responseBody.highlight);
37759
+ const messages = [];
37760
+ // Include optional top-level message from the response
37761
+ if (responseBody.message) {
37762
+ messages.push(responseBody.message);
37692
37763
  }
37764
+ // Execute received commands sequentially and collect messages.
37765
+ this.processCommands(responseBody.commands || [], messages);
37693
37766
  const responseContentStart = [`${this.ctx.localization.get('aiAssistantOutputCardBodyContent')} \n`];
37694
- const responseContentBody = responseBody.messages
37767
+ const responseContentBody = messages
37695
37768
  .map((output, idx) => `${idx + 1} ${output}`)
37696
37769
  .join('\n');
37697
37770
  const output = {
@@ -37704,7 +37777,7 @@ class AiAssistantComponent {
37704
37777
  this.aiToolDirective.promptOutputs.unshift(output);
37705
37778
  }
37706
37779
  handleError(error) {
37707
- const responseErrorEvent = new GridToolbarAIResponseErrorEvent(error);
37780
+ const responseErrorEvent = new GridAIAssistantResponseErrorEvent(error);
37708
37781
  this.aiToolDirective.responseError.emit(responseErrorEvent);
37709
37782
  if (responseErrorEvent.isDefaultPrevented()) {
37710
37783
  this.deleteLoadingOutput();
@@ -37741,12 +37814,468 @@ class AiAssistantComponent {
37741
37814
  updateGrid(mergedArray);
37742
37815
  }
37743
37816
  }
37744
- processHighlightResponse(highlight) {
37745
- if (highlight.length === 0) {
37746
- this.ctx.highlightDirective['setState']([]);
37817
+ processCommands(commands, messages) {
37818
+ if (!commands?.length) {
37747
37819
  return;
37748
37820
  }
37749
- const highlightedItems = highlightBy(this.ctx.dataBindingDirective['originalData'], highlight, this.columns);
37821
+ const isFilterable = Boolean(this.ctx.grid.filterable);
37822
+ const isSortable = Boolean(this.ctx.grid.sortable);
37823
+ const isGroupable = Boolean(this.ctx.grid.groupable);
37824
+ const findColumnById = (id) => this.ctx.grid.columnList.toArray().find((c) => c.id === id);
37825
+ const updateColumnHierarchy = (column, updater) => {
37826
+ const changed = [];
37827
+ const queue = [column];
37828
+ while (queue.length) {
37829
+ const current = queue.shift();
37830
+ if (!current) {
37831
+ continue;
37832
+ }
37833
+ const didChange = updater(current);
37834
+ if (didChange) {
37835
+ changed.push(current);
37836
+ }
37837
+ if (current.hasChildren && current.childrenArray?.length) {
37838
+ queue.push(...current.childrenArray);
37839
+ }
37840
+ }
37841
+ return changed;
37842
+ };
37843
+ commands.forEach((cmd) => {
37844
+ let displayMessage = cmd.message || '';
37845
+ if (this.isColumnCommand(cmd.type)) {
37846
+ if (cmd.id) {
37847
+ const column = findColumnById(cmd.id);
37848
+ const replacement = this.getColumnReplacement(column);
37849
+ displayMessage = this.replaceQuotedColumnId(displayMessage, replacement);
37850
+ }
37851
+ }
37852
+ messages.push(displayMessage);
37853
+ switch (cmd.type) {
37854
+ case 'GridSort':
37855
+ if (!isSortable) {
37856
+ break;
37857
+ }
37858
+ // cmd.sort is a SortDescriptor - replace or merge with existing sort
37859
+ this.processArrayResponse([cmd.sort], this.ctx.grid.currentState.sort || [], (item) => item.field, (mergedArray) => this.ctx.grid.sortChange.next(mergedArray));
37860
+ break;
37861
+ case 'GridClearSort':
37862
+ if (!isSortable) {
37863
+ break;
37864
+ }
37865
+ this.ctx.grid.sortChange.next([]);
37866
+ break;
37867
+ case 'GridFilter':
37868
+ if (!isFilterable) {
37869
+ break;
37870
+ }
37871
+ this.processFilterResponse(cmd.filter);
37872
+ break;
37873
+ case 'GridClearFilter':
37874
+ if (!isFilterable) {
37875
+ break;
37876
+ }
37877
+ this.ctx.grid.filterChange.next(undefined);
37878
+ break;
37879
+ case 'GridGroup':
37880
+ if (!isGroupable) {
37881
+ break;
37882
+ }
37883
+ this.processArrayResponse([cmd.group], this.ctx.grid.currentState.group || [], (item) => item.field, (mergedArray) => this.ctx.grid.groupChange.next(mergedArray));
37884
+ break;
37885
+ case 'GridClearGroup':
37886
+ if (!isGroupable) {
37887
+ break;
37888
+ }
37889
+ this.ctx.grid.groupChange.next([]);
37890
+ break;
37891
+ case 'GridHighlight':
37892
+ if (!this.ctx.highlightDirective) {
37893
+ break;
37894
+ }
37895
+ this.processHighlightResponse([cmd.highlight]);
37896
+ break;
37897
+ case 'GridClearHighlight':
37898
+ if (!this.ctx.highlightDirective) {
37899
+ break;
37900
+ }
37901
+ this.ctx.highlightDirective['setState']([]);
37902
+ break;
37903
+ case 'GridSelect': {
37904
+ this.processSelectionResponse([cmd.select], messages);
37905
+ break;
37906
+ }
37907
+ case 'GridClearSelect': {
37908
+ const selectionInstance = this.getSelectionInstance();
37909
+ if (!selectionInstance) {
37910
+ this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
37911
+ break;
37912
+ }
37913
+ this.applySelectionState(selectionInstance, []);
37914
+ break;
37915
+ }
37916
+ case 'GridColumnResize': {
37917
+ const col = findColumnById(cmd.id);
37918
+ if (!col) {
37919
+ break;
37920
+ }
37921
+ // parse size (accept numeric or strings like '200px')
37922
+ let newWidth;
37923
+ if (typeof cmd.size === 'number') {
37924
+ newWidth = cmd.size;
37925
+ }
37926
+ else if (typeof cmd.size === 'string') {
37927
+ const numericPart = parseFloat(cmd.size);
37928
+ if (!isNaN(numericPart)) {
37929
+ newWidth = numericPart;
37930
+ }
37931
+ }
37932
+ if (typeof newWidth === 'number') {
37933
+ const oldWidth = col.width;
37934
+ // set the column width (ColumnBase.width setter handles string -> number)
37935
+ col.width = newWidth;
37936
+ // emit columnResize event with ColumnResizeArgs[]
37937
+ const args = [{ column: col, oldWidth: oldWidth, newWidth: newWidth }];
37938
+ this.ctx.grid.columnResize.emit(args);
37939
+ }
37940
+ break;
37941
+ }
37942
+ case 'GridColumnReorder': {
37943
+ const col = findColumnById(cmd.id);
37944
+ if (!col) {
37945
+ break;
37946
+ }
37947
+ const newIndex = Number(cmd.position);
37948
+ if (!isNaN(newIndex)) {
37949
+ // call grid API to reorder the column - this will trigger columnReorder event internally
37950
+ this.ctx.grid.reorderColumn(col, newIndex, { before: true });
37951
+ }
37952
+ break;
37953
+ }
37954
+ case 'GridColumnShow':
37955
+ case 'GridColumnHide': {
37956
+ const col = findColumnById(cmd.id);
37957
+ if (!col) {
37958
+ break;
37959
+ }
37960
+ const targetHidden = cmd.type === 'GridColumnHide';
37961
+ const changed = updateColumnHierarchy(col, (current) => {
37962
+ if (current.hidden === targetHidden) {
37963
+ return false;
37964
+ }
37965
+ current.hidden = targetHidden;
37966
+ return true;
37967
+ });
37968
+ if (changed.length) {
37969
+ this.columnInfoService.changeVisibility(changed);
37970
+ }
37971
+ break;
37972
+ }
37973
+ case 'GridColumnLock':
37974
+ case 'GridColumnUnlock': {
37975
+ const col = findColumnById(cmd.id);
37976
+ if (!col) {
37977
+ break;
37978
+ }
37979
+ const targetLocked = cmd.type === 'GridColumnLock';
37980
+ const changed = updateColumnHierarchy(col, (current) => {
37981
+ if (current.locked === targetLocked) {
37982
+ return false;
37983
+ }
37984
+ current.locked = targetLocked;
37985
+ return true;
37986
+ });
37987
+ if (changed.length) {
37988
+ this.columnInfoService.changeLocked(changed);
37989
+ }
37990
+ break;
37991
+ }
37992
+ case 'GridPage': {
37993
+ this.processPageCommand(cmd);
37994
+ break;
37995
+ }
37996
+ case 'GridPageSize': {
37997
+ this.processPageSizeCommand(cmd);
37998
+ break;
37999
+ }
38000
+ case 'GridExportExcel': {
38001
+ this.runExportWithFileName(this.ctx.excelComponent, cmd.fileName, () => this.ctx.grid.saveAsExcel());
38002
+ break;
38003
+ }
38004
+ case 'GridExportPDF': {
38005
+ this.runExportWithFileName(this.ctx.pdfComponent, cmd.fileName, () => this.ctx.grid.saveAsPDF());
38006
+ break;
38007
+ }
38008
+ default:
38009
+ // Unknown command - ignore
38010
+ break;
38011
+ }
38012
+ });
38013
+ }
38014
+ runExportWithFileName(component, fileName, action) {
38015
+ if (!component) {
38016
+ action();
38017
+ return;
38018
+ }
38019
+ const hasComponentFileName = isPresent$1(component.fileName) && component.fileName !== '';
38020
+ if (hasComponentFileName || !fileName) {
38021
+ action();
38022
+ return;
38023
+ }
38024
+ const previousFileName = component.fileName;
38025
+ component.fileName = fileName;
38026
+ try {
38027
+ action();
38028
+ }
38029
+ finally {
38030
+ component.fileName = previousFileName;
38031
+ }
38032
+ }
38033
+ processPageCommand(command) {
38034
+ const pageSize = this.getCurrentPageSizeValue();
38035
+ if (!isPresent$1(pageSize) || pageSize <= 0) {
38036
+ return;
38037
+ }
38038
+ const total = this.getTotalItemsCount();
38039
+ const requestedPage = Number(command.page);
38040
+ let targetPage = Number.isFinite(requestedPage) ? Math.floor(requestedPage) : 1;
38041
+ if (targetPage < 1) {
38042
+ targetPage = 1;
38043
+ }
38044
+ if (isPresent$1(total) && pageSize > 0) {
38045
+ const maxPage = Math.max(1, Math.ceil(total / pageSize));
38046
+ targetPage = Math.min(targetPage, maxPage);
38047
+ }
38048
+ const skip = (targetPage - 1) * pageSize;
38049
+ this.emitGridPageChange(skip, pageSize);
38050
+ }
38051
+ processPageSizeCommand(command) {
38052
+ const rawPageSize = Number(command.pageSize);
38053
+ if (!Number.isFinite(rawPageSize)) {
38054
+ return;
38055
+ }
38056
+ const newPageSize = Math.max(1, Math.floor(rawPageSize));
38057
+ const skip = Math.max(0, this.ctx.grid?.skip ?? 0);
38058
+ this.ensurePageSizeOption(newPageSize);
38059
+ this.emitGridPageChange(skip, newPageSize);
38060
+ }
38061
+ emitGridPageChange(skip, take) {
38062
+ const grid = this.ctx.grid;
38063
+ const normalizedSkip = Math.max(0, Math.floor(skip));
38064
+ const normalizedTake = Math.max(1, Math.floor(take));
38065
+ grid.skip = normalizedSkip;
38066
+ grid.pageSize = normalizedTake;
38067
+ grid.pageChange.emit({ skip: normalizedSkip, take: normalizedTake });
38068
+ }
38069
+ ensurePageSizeOption(pageSize) {
38070
+ const grid = this.ctx.grid;
38071
+ if (!grid) {
38072
+ return;
38073
+ }
38074
+ const pageable = grid.pageable;
38075
+ if (!pageable || typeof pageable === 'boolean') {
38076
+ return;
38077
+ }
38078
+ const pageSizes = pageable.pageSizes;
38079
+ if (!Array.isArray(pageSizes) || pageSizes.length === 0) {
38080
+ return;
38081
+ }
38082
+ if (pageSizes.includes(pageSize)) {
38083
+ return;
38084
+ }
38085
+ const uniqueSizes = [pageSize, ...pageSizes.filter(size => size !== pageSize)];
38086
+ grid.pageable = {
38087
+ ...pageable,
38088
+ pageSizes: uniqueSizes
38089
+ };
38090
+ const changeDetector = grid?.changeDetectorRef;
38091
+ if (changeDetector && typeof changeDetector.markForCheck === 'function') {
38092
+ changeDetector.markForCheck();
38093
+ }
38094
+ }
38095
+ getCurrentPageSizeValue() {
38096
+ const grid = this.ctx.grid;
38097
+ if (!grid) {
38098
+ return null;
38099
+ }
38100
+ const candidates = [grid.pageSize, grid.currentState?.take, this.ctx.dataBindingDirective?.['state']?.take];
38101
+ for (const candidate of candidates) {
38102
+ if (typeof candidate === 'number' && candidate > 0) {
38103
+ return candidate;
38104
+ }
38105
+ }
38106
+ const pageable = grid.pageable;
38107
+ if (pageable && typeof pageable === 'object' && Array.isArray(pageable.pageSizes)) {
38108
+ const numericSize = pageable.pageSizes.find(size => typeof size === 'number' && size > 0);
38109
+ if (numericSize) {
38110
+ return numericSize;
38111
+ }
38112
+ }
38113
+ const originalData = this.ctx.dataBindingDirective?.['originalData'];
38114
+ if (Array.isArray(originalData) && originalData.length > 0) {
38115
+ return originalData.length;
38116
+ }
38117
+ return null;
38118
+ }
38119
+ getTotalItemsCount() {
38120
+ const grid = this.ctx.grid;
38121
+ if (!grid) {
38122
+ return null;
38123
+ }
38124
+ const gridData = grid.data;
38125
+ if (gridData && typeof gridData.total === 'number') {
38126
+ return gridData.total;
38127
+ }
38128
+ const view = grid.view;
38129
+ if (view && typeof view.total === 'number') {
38130
+ return view.total;
38131
+ }
38132
+ const originalData = this.ctx.dataBindingDirective?.['originalData'];
38133
+ if (Array.isArray(originalData)) {
38134
+ return originalData.length;
38135
+ }
38136
+ return null;
38137
+ }
38138
+ getSelectionInstance() {
38139
+ const selectionDirective = this.ctx.grid?.selectionDirective;
38140
+ if (selectionDirective && typeof selectionDirective === 'object') {
38141
+ return selectionDirective;
38142
+ }
38143
+ const defaultSelection = this.ctx.grid?.defaultSelection;
38144
+ if (defaultSelection && typeof defaultSelection === 'object') {
38145
+ return defaultSelection;
38146
+ }
38147
+ return null;
38148
+ }
38149
+ updateLastMessage(messages, newMessage) {
38150
+ if (!messages.length) {
38151
+ return;
38152
+ }
38153
+ messages[messages.length - 1] = newMessage;
38154
+ }
38155
+ getHighlightItems(descriptors) {
38156
+ if (!descriptors?.length) {
38157
+ return [];
38158
+ }
38159
+ const data = this.ctx.dataBindingDirective?.['originalData'] || [];
38160
+ return highlightBy(data, descriptors, this.columns);
38161
+ }
38162
+ processSelectionResponse(selection, messages) {
38163
+ const selectionInstance = this.getSelectionInstance();
38164
+ if (!selectionInstance) {
38165
+ this.updateLastMessage(messages, this.ctx.localization?.get('aiAssistantSelectionNotEnabled'));
38166
+ return;
38167
+ }
38168
+ const descriptors = (selection || []).filter((descriptor) => Boolean(descriptor));
38169
+ if (descriptors.length === 0) {
38170
+ this.applySelectionState(selectionInstance, []);
38171
+ return;
38172
+ }
38173
+ const highlightItems = this.getHighlightItems(descriptors);
38174
+ if (!highlightItems.length) {
38175
+ this.applySelectionState(selectionInstance, []);
38176
+ return;
38177
+ }
38178
+ const hasCellSelections = highlightItems.some(item => isPresent$1(item.columnKey));
38179
+ const hasRowSelections = highlightItems.some(item => !isPresent$1(item.columnKey));
38180
+ const isCellMode = selectionInstance.isCellSelectionMode;
38181
+ if ((!isCellMode && hasCellSelections) || (isCellMode && hasRowSelections)) {
38182
+ const key = isCellMode ? 'aiAssistantSelectionCellModeRequired' : 'aiAssistantSelectionRowModeRequired';
38183
+ this.updateLastMessage(messages, this.ctx.localization?.get(key));
38184
+ return;
38185
+ }
38186
+ const selectionState = this.mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode);
38187
+ this.applySelectionState(selectionInstance, selectionState);
38188
+ }
38189
+ mapHighlightItemsToSelection(selectionInstance, highlightItems, isCellMode) {
38190
+ const data = this.ctx.dataBindingDirective?.['originalData'] || [];
38191
+ if (isCellMode) {
38192
+ const mapped = highlightItems
38193
+ .filter(item => isPresent$1(item.itemKey) && isPresent$1(item.columnKey))
38194
+ .map(item => {
38195
+ const rowIndex = item.itemKey;
38196
+ const columnIndex = item.columnKey;
38197
+ const dataItem = data[rowIndex];
38198
+ if (!isPresent$1(dataItem)) {
38199
+ return null;
38200
+ }
38201
+ if (typeof selectionInstance['getSelectionItem'] === 'function') {
38202
+ const columnComponent = this.leafColumns[columnIndex];
38203
+ const selectionItem = selectionInstance['getSelectionItem']({ dataItem, index: rowIndex }, columnComponent, columnIndex);
38204
+ if (selectionItem && isPresent$1(selectionItem.itemKey) && isPresent$1(selectionItem.columnKey)) {
38205
+ return selectionItem;
38206
+ }
38207
+ return null;
38208
+ }
38209
+ const itemKey = typeof selectionInstance.getItemKey === 'function'
38210
+ ? selectionInstance.getItemKey({ dataItem, index: rowIndex })
38211
+ : rowIndex;
38212
+ return isPresent$1(itemKey) ? { itemKey, columnKey: columnIndex } : null;
38213
+ })
38214
+ .filter((item) => isPresent$1(item));
38215
+ return mapped.filter((item, index, self) => self.findIndex(other => other.itemKey === item.itemKey && other.columnKey === item.columnKey) === index);
38216
+ }
38217
+ const rowKeys = highlightItems
38218
+ .filter(item => isPresent$1(item.itemKey))
38219
+ .map(item => {
38220
+ const rowIndex = item.itemKey;
38221
+ const dataItem = data[rowIndex];
38222
+ if (!isPresent$1(dataItem)) {
38223
+ return null;
38224
+ }
38225
+ if (typeof selectionInstance.getItemKey === 'function') {
38226
+ return selectionInstance.getItemKey({ dataItem, index: rowIndex });
38227
+ }
38228
+ return rowIndex;
38229
+ })
38230
+ .filter(isPresent$1);
38231
+ return Array.from(new Set(rowKeys));
38232
+ }
38233
+ applySelectionState(selectionInstance, selectionState) {
38234
+ selectionInstance.selectedKeys = selectionState;
38235
+ if (typeof selectionInstance['setState'] === 'function') {
38236
+ selectionInstance['setState'](selectionState);
38237
+ }
38238
+ const changeDetector = selectionInstance['cd'];
38239
+ if (changeDetector && typeof changeDetector.markForCheck === 'function') {
38240
+ changeDetector.markForCheck();
38241
+ }
38242
+ if (typeof selectionInstance['notifyChange'] === 'function') {
38243
+ selectionInstance['notifyChange']();
38244
+ }
38245
+ }
38246
+ replaceQuotedColumnId(message, replacement) {
38247
+ if (!replacement) {
38248
+ const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")\s*/g;
38249
+ return message.replace(columnIdPattern, '').replace(/\s{2,}/g, ' ').trim();
38250
+ }
38251
+ const columnIdPattern = /(?:&quot;|")(k-grid\d+-col\d+)(?:&quot;|")/g;
38252
+ return message.replace(columnIdPattern, (match) => {
38253
+ const isEncoded = match.startsWith('&quot;');
38254
+ return isEncoded ? `&quot;${replacement}&quot;` : `"${replacement}"`;
38255
+ });
38256
+ }
38257
+ isColumnCommand(type) {
38258
+ return type === 'GridColumnResize' ||
38259
+ type === 'GridColumnReorder' ||
38260
+ type === 'GridColumnShow' ||
38261
+ type === 'GridColumnHide' ||
38262
+ type === 'GridColumnLock' ||
38263
+ type === 'GridColumnUnlock';
38264
+ }
38265
+ getColumnReplacement(column) {
38266
+ if (!column) {
38267
+ return '';
38268
+ }
38269
+ if (column.title && String(column.title).trim()) {
38270
+ return String(column.title).trim();
38271
+ }
38272
+ if (column.field && String(column.field).trim()) {
38273
+ return String(column.field).trim();
38274
+ }
38275
+ return '';
38276
+ }
38277
+ processHighlightResponse(highlight) {
38278
+ const highlightedItems = this.getHighlightItems(highlight);
37750
38279
  this.ctx.highlightDirective['setState'](highlightedItems);
37751
38280
  }
37752
38281
  processFilterResponse(filter) {
@@ -38703,5 +39232,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
38703
39232
  * Generated bundle index. Do not edit.
38704
39233
  */
38705
39234
 
38706
- export { AIAssistantToolbarDirective, AddCommandDirective, AddCommandToolbarDirective, AfterEqFilterOperatorComponent, AfterFilterOperatorComponent, AutoCompleteFilterCellComponent, BaseFilterCellComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, BooleanFilterCellComponent, BooleanFilterComponent, BooleanFilterMenuComponent, BooleanFilterRadioButtonDirective, BrowserSupportService, CELL_CONTEXT, CancelCommandDirective, CancelCommandToolbarDirective, CellCloseEvent, CellComponent, CellLoadingTemplateDirective, CellSelectionAggregateService, CellSelectionService, CellTemplateDirective, ChangeNotificationService, CheckboxColumnComponent, ColGroupComponent, ColumnBase, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnComponent, ColumnGroupComponent, ColumnHandleDirective, ColumnInfoService, ColumnListComponent, ColumnLockedChangeEvent, ColumnMenuAutoSizeAllColumnsComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuChooserComponent, ColumnMenuComponent, ColumnMenuContainerComponent, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuItemDirective, ColumnMenuLockComponent, ColumnMenuPositionComponent, ColumnMenuService, ColumnMenuSortComponent, ColumnMenuStickComponent, ColumnMenuTemplateDirective, ColumnReorderEvent, ColumnReorderService, ColumnResizingService, ColumnStickyChangeEvent, ColumnVisibilityChangeEvent, ColumnsContainer, CommandColumnComponent, ContainsFilterOperatorComponent, ContextService, CustomMessagesComponent, DEFAULT_AI_REQUEST_OPTIONS, DEFAULT_SCROLLER_FACTORY, DataBindingDirective, DateFilterCellComponent, DateFilterComponent, DateFilterMenuComponent, DateFilterMenuInputComponent, DetailCollapseEvent, DetailExpandEvent, DetailTemplateDirective, DetailsService, DoesNotContainFilterOperatorComponent, DomEventsService, DragAndDropService, DragHintService, DropCueService, EditCommandDirective, EditCommandToolbarDirective, EditService as EditServiceClass, EditTemplateDirective, EditingDirectiveBase, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, ExcelCommandDirective, ExcelCommandToolbarDirective, ExcelComponent, ExcelExportEvent, ExcelModule, ExcelService, ExpandDetailsDirective, ExpandGroupDirective, ExternalEditingDirective, FieldAccessorPipe, FilterCellComponent, FilterCellHostDirective, FilterCellOperatorsComponent, FilterCellTemplateDirective, FilterCellWrapperComponent, FilterCommandToolbarDirective, FilterInputDirective, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuDropDownListDirective, FilterMenuHostDirective, FilterMenuInputWrapperComponent, FilterMenuTemplateDirective, FilterRowComponent, FilterService, FocusRoot, FocusableDirective, FooterComponent, FooterTemplateDirective, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, GridClipboardDirective, GridComponent, GridModule, GridSpacerComponent, GridTableDirective, GridToolbarAIResponseErrorEvent, GridToolbarAIResponseSuccessEvent, GridToolbarFocusableDirective, GridToolbarNavigationService, GroupCommandToolbarDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderComponent, GroupHeaderTemplateDirective, GroupInfoService, GroupPanelComponent, GroupsService, HeaderComponent, HeaderTemplateDirective, HighlightDirective, IdService, InCellEditingDirective, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, KENDO_GRID, KENDO_GRID_BODY_EXPORTS, KENDO_GRID_COLUMN_DRAGANDDROP, KENDO_GRID_COLUMN_MENU_DECLARATIONS, KENDO_GRID_COLUMN_MENU_EXPORTS, KENDO_GRID_DECLARATIONS, KENDO_GRID_EXCEL_EXPORT, KENDO_GRID_EXPORTS, KENDO_GRID_FILTER_MENU, KENDO_GRID_FILTER_MENU_EXPORTS, KENDO_GRID_FILTER_OPERATORS, KENDO_GRID_FILTER_ROW, KENDO_GRID_FILTER_ROW_EXPORTS, KENDO_GRID_FILTER_SHARED, KENDO_GRID_FOOTER_EXPORTS, KENDO_GRID_GROUP_EXPORTS, KENDO_GRID_HEADER_EXPORTS, KENDO_GRID_PDF_EXPORT, KENDO_GRID_SHARED, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, ListComponent, LoadingComponent, LoadingTemplateDirective, LocalDataChangesService, LogicalCellDirective, LogicalRowDirective, MenuTabbingService, MultiCheckboxFilterComponent, NavigationService, NoRecordsTemplateDirective, NotEqualFilterOperatorComponent, NumericFilterCellComponent, NumericFilterComponent, NumericFilterMenuComponent, NumericFilterMenuInputComponent, PDFCommandDirective, PDFCommandToolbarDirective, PDFComponent, PDFMarginComponent, PDFModule, PDFService, PDFTemplateDirective, PopupCloseEvent, ReactiveEditingDirective, RedoCommandToolbarDirective, RemoveCommandDirective, RemoveCommandToolbarDirective, ResizableContainerDirective, ResizeService, ResponsiveService, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, RowEditingDirectiveBase, RowReorderColumnComponent, RowReorderService, SaveCommandDirective, SaveCommandToolbarDirective, ScrollRequestService, ScrollSyncService, SelectAllCheckboxDirective, SelectAllToolbarToolComponent, SelectionCheckboxDirective, SelectionDirective, SelectionService, SinglePopupService, SizingOptionsService, Skip, SortCommandToolbarDirective, SortService, SpanColumnComponent, StartsWithFilterOperatorComponent, StatusBarTemplateDirective, StringFilterCellComponent, StringFilterComponent, StringFilterMenuComponent, StringFilterMenuInputComponent, SuspendService, TableBodyComponent, TableDirective, TemplateEditingDirective, ToolbarComponent, ToolbarTemplateDirective, UndoCommandToolbarDirective, UndoRedoDirective, UndoRedoEvent, defaultTrackBy, hasFilterMenu, hasFilterRow, isFilterable };
39235
+ export { AIAssistantToolbarDirective, AddCommandDirective, AddCommandToolbarDirective, AfterEqFilterOperatorComponent, AfterFilterOperatorComponent, AutoCompleteFilterCellComponent, BaseFilterCellComponent, BeforeEqFilterOperatorComponent, BeforeFilterOperatorComponent, BooleanFilterCellComponent, BooleanFilterComponent, BooleanFilterMenuComponent, BooleanFilterRadioButtonDirective, BrowserSupportService, CELL_CONTEXT, CancelCommandDirective, CancelCommandToolbarDirective, CellCloseEvent, CellComponent, CellLoadingTemplateDirective, CellSelectionAggregateService, CellSelectionService, CellTemplateDirective, ChangeNotificationService, CheckboxColumnComponent, ColGroupComponent, ColumnBase, ColumnChooserComponent, ColumnChooserToolbarDirective, ColumnComponent, ColumnGroupComponent, ColumnHandleDirective, ColumnInfoService, ColumnListComponent, ColumnLockedChangeEvent, ColumnMenuAutoSizeAllColumnsComponent, ColumnMenuAutoSizeColumnComponent, ColumnMenuChooserComponent, ColumnMenuComponent, ColumnMenuContainerComponent, ColumnMenuFilterComponent, ColumnMenuItemComponent, ColumnMenuItemContentTemplateDirective, ColumnMenuItemDirective, ColumnMenuLockComponent, ColumnMenuPositionComponent, ColumnMenuService, ColumnMenuSortComponent, ColumnMenuStickComponent, ColumnMenuTemplateDirective, ColumnReorderEvent, ColumnReorderService, ColumnResizingService, ColumnStickyChangeEvent, ColumnVisibilityChangeEvent, ColumnsContainer, CommandColumnComponent, ContainsFilterOperatorComponent, ContextService, CustomMessagesComponent, DEFAULT_AI_REQUEST_OPTIONS, DEFAULT_SCROLLER_FACTORY, DataBindingDirective, DateFilterCellComponent, DateFilterComponent, DateFilterMenuComponent, DateFilterMenuInputComponent, DetailCollapseEvent, DetailExpandEvent, DetailTemplateDirective, DetailsService, DoesNotContainFilterOperatorComponent, DomEventsService, DragAndDropService, DragHintService, DropCueService, EditCommandDirective, EditCommandToolbarDirective, EditService as EditServiceClass, EditTemplateDirective, EditingDirectiveBase, EndsWithFilterOperatorComponent, EqualFilterOperatorComponent, ExcelCommandDirective, ExcelCommandToolbarDirective, ExcelComponent, ExcelExportEvent, ExcelModule, ExcelService, ExpandDetailsDirective, ExpandGroupDirective, ExternalEditingDirective, FieldAccessorPipe, FilterCellComponent, FilterCellHostDirective, FilterCellOperatorsComponent, FilterCellTemplateDirective, FilterCellWrapperComponent, FilterCommandToolbarDirective, FilterInputDirective, FilterMenuComponent, FilterMenuContainerComponent, FilterMenuDropDownListDirective, FilterMenuHostDirective, FilterMenuInputWrapperComponent, FilterMenuTemplateDirective, FilterRowComponent, FilterService, FocusRoot, FocusableDirective, FooterComponent, FooterTemplateDirective, GreaterFilterOperatorComponent, GreaterOrEqualToFilterOperatorComponent, GridAIAssistantResponseErrorEvent, GridAIAssistantResponseSuccessEvent, GridClipboardDirective, GridComponent, GridModule, GridSpacerComponent, GridTableDirective, GridToolbarFocusableDirective, GridToolbarNavigationService, GroupCommandToolbarDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderComponent, GroupHeaderTemplateDirective, GroupInfoService, GroupPanelComponent, GroupsService, HeaderComponent, HeaderTemplateDirective, HighlightDirective, IdService, InCellEditingDirective, IsEmptyFilterOperatorComponent, IsNotEmptyFilterOperatorComponent, IsNotNullFilterOperatorComponent, IsNullFilterOperatorComponent, KENDO_GRID, KENDO_GRID_BODY_EXPORTS, KENDO_GRID_COLUMN_DRAGANDDROP, KENDO_GRID_COLUMN_MENU_DECLARATIONS, KENDO_GRID_COLUMN_MENU_EXPORTS, KENDO_GRID_DECLARATIONS, KENDO_GRID_EXCEL_EXPORT, KENDO_GRID_EXPORTS, KENDO_GRID_FILTER_MENU, KENDO_GRID_FILTER_MENU_EXPORTS, KENDO_GRID_FILTER_OPERATORS, KENDO_GRID_FILTER_ROW, KENDO_GRID_FILTER_ROW_EXPORTS, KENDO_GRID_FILTER_SHARED, KENDO_GRID_FOOTER_EXPORTS, KENDO_GRID_GROUP_EXPORTS, KENDO_GRID_HEADER_EXPORTS, KENDO_GRID_PDF_EXPORT, KENDO_GRID_SHARED, LessFilterOperatorComponent, LessOrEqualToFilterOperatorComponent, ListComponent, LoadingComponent, LoadingTemplateDirective, LocalDataChangesService, LogicalCellDirective, LogicalRowDirective, MenuTabbingService, MultiCheckboxFilterComponent, NavigationService, NoRecordsTemplateDirective, NotEqualFilterOperatorComponent, NumericFilterCellComponent, NumericFilterComponent, NumericFilterMenuComponent, NumericFilterMenuInputComponent, PDFCommandDirective, PDFCommandToolbarDirective, PDFComponent, PDFMarginComponent, PDFModule, PDFService, PDFTemplateDirective, PopupCloseEvent, ReactiveEditingDirective, RedoCommandToolbarDirective, RemoveCommandDirective, RemoveCommandToolbarDirective, ResizableContainerDirective, ResizeService, ResponsiveService, RowDragHandleTemplateDirective, RowDragHintTemplateDirective, RowEditingDirectiveBase, RowReorderColumnComponent, RowReorderService, SaveCommandDirective, SaveCommandToolbarDirective, ScrollRequestService, ScrollSyncService, SelectAllCheckboxDirective, SelectAllToolbarToolComponent, SelectionCheckboxDirective, SelectionDirective, SelectionService, SinglePopupService, SizingOptionsService, Skip, SortCommandToolbarDirective, SortService, SpanColumnComponent, StartsWithFilterOperatorComponent, StatusBarTemplateDirective, StringFilterCellComponent, StringFilterComponent, StringFilterMenuComponent, StringFilterMenuInputComponent, SuspendService, TableBodyComponent, TableDirective, TemplateEditingDirective, ToolbarComponent, ToolbarTemplateDirective, UndoCommandToolbarDirective, UndoRedoDirective, UndoRedoEvent, defaultTrackBy, hasFilterMenu, hasFilterRow, isFilterable };
38707
39236