@progress/kendo-angular-grid 19.3.0-develop.40 → 19.3.0-develop.42

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.
@@ -233,7 +233,10 @@ export class NavigationService {
233
233
  this.subs.add(this.domEvents.cellClick
234
234
  .subscribe(() => {
235
235
  if (this.isStackedMode) {
236
- const stackedCells = this.activeCell.focusGroup.focusableChildren;
236
+ const stackedCells = this.activeCell?.focusGroup?.focusableChildren;
237
+ if (!isPresent(stackedCells) || stackedCells.length === 0) {
238
+ return;
239
+ }
237
240
  const currFocusedIndex = stackedCells.findIndex(el => el.hasFocus() || el.hostElement?.nativeElement === document.activeElement);
238
241
  currFocusedIndex > -1 && (this.stackedFocusedCellIndex = currFocusedIndex);
239
242
  }
@@ -908,7 +911,10 @@ export class NavigationService {
908
911
  if (this.stackedFocusedCellIndex === -1) {
909
912
  return;
910
913
  }
911
- const stackedCells = this.activeCell.focusGroup.focusableChildren;
914
+ const stackedCells = this.activeCell?.focusGroup?.focusableChildren;
915
+ if (!isPresent(stackedCells) || stackedCells.length === 0) {
916
+ return;
917
+ }
912
918
  const currFocusedIndex = stackedCells.findIndex(el => el.hasFocus() || el.hostElement?.nativeElement === document.activeElement);
913
919
  if (args.shiftKey) {
914
920
  if (currFocusedIndex === 0) {
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1754990845,
14
- version: '19.3.0-develop.40',
13
+ publishDate: 1755009377,
14
+ version: '19.3.0-develop.42',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -22,7 +22,6 @@ export class AiAssistantComponent {
22
22
  columnInfoService;
23
23
  aiPrompt;
24
24
  activeView = 0;
25
- promptOutputs = [];
26
25
  requestUrl;
27
26
  requestOptions;
28
27
  aiPromptSettings;
@@ -59,8 +58,8 @@ export class AiAssistantComponent {
59
58
  this.streaming = false;
60
59
  }
61
60
  onPromptRequest(ev) {
62
- if (this.promptOutputs.length === 0) {
63
- this.promptOutputs.push(this.loadingOutput);
61
+ if (this.aiToolDirective.promptOutputs.length === 0) {
62
+ this.aiToolDirective.promptOutputs.push(this.loadingOutput);
64
63
  }
65
64
  this.unsubscribeCurrentRequest();
66
65
  this.streaming = true;
@@ -109,6 +108,10 @@ export class AiAssistantComponent {
109
108
  return this.http.request(request);
110
109
  }
111
110
  processResponse(response) {
111
+ if (this.aiToolDirective.autoClose) {
112
+ this.aiToolDirective.emitOpenClose = true;
113
+ this.aiToolDirective.toggleWindow();
114
+ }
112
115
  const responseBody = response.body;
113
116
  const responseSuccessEvent = new GridToolbarAIResponseSuccessEvent(response);
114
117
  this.aiToolDirective.responseSuccess.emit(responseSuccessEvent);
@@ -139,7 +142,7 @@ export class AiAssistantComponent {
139
142
  output: responseContentStart.concat(responseContentBody).join(''),
140
143
  };
141
144
  this.deleteLoadingOutput();
142
- this.promptOutputs.unshift(output);
145
+ this.aiToolDirective.promptOutputs.unshift(output);
143
146
  }
144
147
  handleError(error) {
145
148
  const responseErrorEvent = new GridToolbarAIResponseErrorEvent(error);
@@ -154,11 +157,11 @@ export class AiAssistantComponent {
154
157
  output: error.message
155
158
  };
156
159
  this.deleteLoadingOutput();
157
- this.promptOutputs.unshift(output);
160
+ this.aiToolDirective.promptOutputs.unshift(output);
158
161
  }
159
162
  deleteLoadingOutput() {
160
- if (this.promptOutputs[0].id === this.loadingOutput.id) {
161
- this.promptOutputs.splice(0, 1);
163
+ if (this.aiToolDirective.promptOutputs[0]?.id === this.loadingOutput.id) {
164
+ this.aiToolDirective.promptOutputs.splice(0, 1);
162
165
  }
163
166
  }
164
167
  unsubscribeCurrentRequest() {
@@ -212,7 +215,8 @@ export class AiAssistantComponent {
212
215
  [generateButtonSVGIcon]="aiPromptSettings?.generateButtonSVGIcon"
213
216
  [generateButtonIcon]="aiPromptSettings?.generateButtonIcon"
214
217
  [disabledGenerateButton]="disabledGenerateButton || promptView.textAreaValue?.length === 0"
215
- [promptOutputs]="aiPromptSettings?.promptOutputs || promptOutputs"
218
+ [promptOutputs]="aiPromptSettings?.promptOutputs"
219
+ [textAreaSettings]="aiPromptSettings?.textAreaSettings"
216
220
  (promptRequest)="onPromptRequest($event)"
217
221
  (promptRequestCancel)="cancelRequest()"
218
222
  >
@@ -261,7 +265,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
261
265
  [generateButtonSVGIcon]="aiPromptSettings?.generateButtonSVGIcon"
262
266
  [generateButtonIcon]="aiPromptSettings?.generateButtonIcon"
263
267
  [disabledGenerateButton]="disabledGenerateButton || promptView.textAreaValue?.length === 0"
264
- [promptOutputs]="aiPromptSettings?.promptOutputs || promptOutputs"
268
+ [promptOutputs]="aiPromptSettings?.promptOutputs"
269
+ [textAreaSettings]="aiPromptSettings?.textAreaSettings"
265
270
  (promptRequest)="onPromptRequest($event)"
266
271
  (promptRequestCancel)="cancelRequest()"
267
272
  >
@@ -52,13 +52,23 @@ export class AIAssistantToolbarDirective extends ToolbarToolBase {
52
52
  */
53
53
  requestOptions;
54
54
  /**
55
- * Configures the settings for the AI Assistant Window.
55
+ * Configures the initial settings for the AI Assistant Window when opened.
56
56
  */
57
57
  aiWindowSettings;
58
58
  /**
59
- * Configures the settings for the AI prompt component that the AI Assistant Window component uses.
59
+ * Configures the initial settings for the AI Prompt component that the AI Assistant Window component uses when opened.
60
60
  */
61
61
  aiPromptSettings;
62
+ /**
63
+ * Determines whether to close the AI Assistant Window automatically after a successful request.
64
+ * @default true
65
+ */
66
+ autoClose = true;
67
+ /**
68
+ * Determines whether to keep the AI Prompt's outputs after closing the AI Assistant Window.
69
+ * @default false
70
+ */
71
+ keepOutputHistory = false;
62
72
  /**
63
73
  * Emits an event before the AI Assistant tool sends the AI request.
64
74
  * - When you provide a `requestUrl`, you can handle the event to modify the request options.
@@ -85,14 +95,13 @@ export class AIAssistantToolbarDirective extends ToolbarToolBase {
85
95
  close = new EventEmitter();
86
96
  /**
87
97
  * Emits an event when the AI Assistant tool opens.
88
- * The event contains the window instance and the AI prompt instance.
89
98
  */
90
99
  open = new EventEmitter();
91
100
  tableWizardIcon = tableWizardIcon;
101
+ emitOpenClose = false;
102
+ promptOutputs = [];
92
103
  windowRef;
93
104
  subs = new Subscription();
94
- actionSheetCloseSub;
95
- emitOpenClose = false;
96
105
  defaultAiPromptSettings = {
97
106
  speechToTextButton: true,
98
107
  generateButtonSVGIcon: this.tableWizardIcon,
@@ -142,10 +151,7 @@ export class AIAssistantToolbarDirective extends ToolbarToolBase {
142
151
  ngOnDestroy() {
143
152
  super.ngOnDestroy();
144
153
  this.subs.unsubscribe();
145
- if (this.actionSheetCloseSub) {
146
- this.actionSheetCloseSub.unsubscribe();
147
- this.actionSheetCloseSub = null;
148
- }
154
+ this.promptOutputs = [];
149
155
  }
150
156
  /**
151
157
  * @hidden
@@ -166,6 +172,9 @@ export class AIAssistantToolbarDirective extends ToolbarToolBase {
166
172
  }
167
173
  }
168
174
  openWindow() {
175
+ if (!this.keepOutputHistory) {
176
+ this.promptOutputs = [];
177
+ }
169
178
  const defaultWindowWidth = 437;
170
179
  const rtl = this.ctx.localization.rtl;
171
180
  const defaultWindowSettings = {
@@ -197,13 +206,12 @@ export class AIAssistantToolbarDirective extends ToolbarToolBase {
197
206
  aiPrompt.streaming = this.aiPromptSettings?.streaming || false;
198
207
  aiPrompt.activeView = this.aiPromptSettings?.activeView || 0;
199
208
  aiPrompt.aiPromptSettings = { ...this.defaultAiPromptSettings, ...this.aiPromptSettings };
209
+ if (!aiPrompt.aiPromptSettings.promptOutputs) {
210
+ aiPrompt.aiPromptSettings.promptOutputs = this.promptOutputs;
211
+ }
200
212
  if (this.emitOpenClose) {
201
213
  this.zone.onStable.pipe(take(1)).subscribe(() => {
202
- const event = {
203
- aiWindow: this.windowRef.window.instance,
204
- aiPrompt: this.windowRef.content.instance.aiPrompt
205
- };
206
- this.open.emit(event);
214
+ this.open.emit();
207
215
  this.emitOpenClose = false;
208
216
  });
209
217
  }
@@ -226,7 +234,7 @@ export class AIAssistantToolbarDirective extends ToolbarToolBase {
226
234
  focusAnchor && this.buttonElement?.focus();
227
235
  }
228
236
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIAssistantToolbarDirective, deps: [{ token: i1.WindowService }, { token: i2.ToolBarButtonComponent }, { token: i3.ContextService }, { token: i0.NgZone }, { token: i2.RefreshService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
229
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIAssistantToolbarDirective, isStandalone: true, selector: "[kendoGridAIAssistantTool]", inputs: { requestUrl: "requestUrl", requestOptions: "requestOptions", aiWindowSettings: "aiWindowSettings", aiPromptSettings: "aiPromptSettings" }, outputs: { promptRequest: "promptRequest", cancelRequest: "cancelRequest", responseSuccess: "responseSuccess", responseError: "responseError", close: "close", open: "open" }, usesInheritance: true, ngImport: i0 });
237
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIAssistantToolbarDirective, isStandalone: true, selector: "[kendoGridAIAssistantTool]", inputs: { requestUrl: "requestUrl", requestOptions: "requestOptions", aiWindowSettings: "aiWindowSettings", aiPromptSettings: "aiPromptSettings", autoClose: "autoClose", keepOutputHistory: "keepOutputHistory" }, outputs: { promptRequest: "promptRequest", cancelRequest: "cancelRequest", responseSuccess: "responseSuccess", responseError: "responseError", close: "close", open: "open" }, usesInheritance: true, ngImport: i0 });
230
238
  }
231
239
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIAssistantToolbarDirective, decorators: [{
232
240
  type: Directive,
@@ -242,6 +250,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
242
250
  type: Input
243
251
  }], aiPromptSettings: [{
244
252
  type: Input
253
+ }], autoClose: [{
254
+ type: Input
255
+ }], keepOutputHistory: [{
256
+ type: Input
245
257
  }], promptRequest: [{
246
258
  type: Output
247
259
  }], cancelRequest: [{
@@ -44,7 +44,7 @@ export const convertDateStringsInFilter = (filter, columns) => {
44
44
  */
45
45
  export const isDateField = (fieldName, columns) => {
46
46
  const column = columns.find((col) => col.field === fieldName);
47
- return column?.filter === 'date' || column?.editor === 'date';
47
+ return column?.filter === 'date';
48
48
  };
49
49
  /**
50
50
  * Represents the event data when the AI Assistant request completes successfully.
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
6
6
  import { EventEmitter, Injectable, SecurityContext, InjectionToken, Optional, Inject, Directive, SkipSelf, Input, isDevMode, QueryList, Component, ContentChildren, ContentChild, forwardRef, Host, Output, HostBinding, Pipe, TemplateRef, ChangeDetectionStrategy, ViewChildren, ViewChild, Self, NgZone, HostListener, ElementRef, ViewContainerRef, ViewEncapsulation, inject, Injector, NgModule } from '@angular/core';
7
7
  import { merge, of, Subject, zip as zip$1, from, Subscription, interval, fromEvent, Observable, BehaviorSubject } from 'rxjs';
8
8
  import * as i1$3 from '@progress/kendo-angular-common';
9
- import { isDocumentAvailable, Keys, hasClasses as hasClasses$1, normalizeNumpadKeys, isPresent as isPresent$1, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, replaceMessagePlaceholder, isChanged as isChanged$1, KendoInput, guid, closest as closest$1, hasObservers, ResizeSensorComponent, closestInScope as closestInScope$1, isFocusable as isFocusable$1, PreventableEvent as PreventableEvent$1, getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
9
+ import { isDocumentAvailable, Keys, hasClasses as hasClasses$1, isPresent as isPresent$1, normalizeNumpadKeys, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, replaceMessagePlaceholder, isChanged as isChanged$1, KendoInput, guid, closest as closest$1, hasObservers, ResizeSensorComponent, closestInScope as closestInScope$1, isFocusable as isFocusable$1, PreventableEvent as PreventableEvent$1, getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent, ResizeBatchService } from '@progress/kendo-angular-common';
10
10
  import * as i1 from '@angular/platform-browser';
11
11
  import * as i1$1 from '@progress/kendo-angular-icons';
12
12
  import { IconWrapperComponent, IconsService, KENDO_ICONS } from '@progress/kendo-angular-icons';
@@ -3581,7 +3581,10 @@ class NavigationService {
3581
3581
  this.subs.add(this.domEvents.cellClick
3582
3582
  .subscribe(() => {
3583
3583
  if (this.isStackedMode) {
3584
- const stackedCells = this.activeCell.focusGroup.focusableChildren;
3584
+ const stackedCells = this.activeCell?.focusGroup?.focusableChildren;
3585
+ if (!isPresent$1(stackedCells) || stackedCells.length === 0) {
3586
+ return;
3587
+ }
3585
3588
  const currFocusedIndex = stackedCells.findIndex(el => el.hasFocus() || el.hostElement?.nativeElement === document.activeElement);
3586
3589
  currFocusedIndex > -1 && (this.stackedFocusedCellIndex = currFocusedIndex);
3587
3590
  }
@@ -4256,7 +4259,10 @@ class NavigationService {
4256
4259
  if (this.stackedFocusedCellIndex === -1) {
4257
4260
  return;
4258
4261
  }
4259
- const stackedCells = this.activeCell.focusGroup.focusableChildren;
4262
+ const stackedCells = this.activeCell?.focusGroup?.focusableChildren;
4263
+ if (!isPresent$1(stackedCells) || stackedCells.length === 0) {
4264
+ return;
4265
+ }
4260
4266
  const currFocusedIndex = stackedCells.findIndex(el => el.hasFocus() || el.hostElement?.nativeElement === document.activeElement);
4261
4267
  if (args.shiftKey) {
4262
4268
  if (currFocusedIndex === 0) {
@@ -22009,8 +22015,8 @@ const packageMetadata = {
22009
22015
  productName: 'Kendo UI for Angular',
22010
22016
  productCode: 'KENDOUIANGULAR',
22011
22017
  productCodes: ['KENDOUIANGULAR'],
22012
- publishDate: 1754990845,
22013
- version: '19.3.0-develop.40',
22018
+ publishDate: 1755009377,
22019
+ version: '19.3.0-develop.42',
22014
22020
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
22015
22021
  };
22016
22022
 
@@ -28634,7 +28640,7 @@ const convertDateStringsInFilter = (filter, columns) => {
28634
28640
  */
28635
28641
  const isDateField = (fieldName, columns) => {
28636
28642
  const column = columns.find((col) => col.field === fieldName);
28637
- return column?.filter === 'date' || column?.editor === 'date';
28643
+ return column?.filter === 'date';
28638
28644
  };
28639
28645
  /**
28640
28646
  * Represents the event data when the AI Assistant request completes successfully.
@@ -28672,7 +28678,6 @@ class AiAssistantComponent {
28672
28678
  columnInfoService;
28673
28679
  aiPrompt;
28674
28680
  activeView = 0;
28675
- promptOutputs = [];
28676
28681
  requestUrl;
28677
28682
  requestOptions;
28678
28683
  aiPromptSettings;
@@ -28709,8 +28714,8 @@ class AiAssistantComponent {
28709
28714
  this.streaming = false;
28710
28715
  }
28711
28716
  onPromptRequest(ev) {
28712
- if (this.promptOutputs.length === 0) {
28713
- this.promptOutputs.push(this.loadingOutput);
28717
+ if (this.aiToolDirective.promptOutputs.length === 0) {
28718
+ this.aiToolDirective.promptOutputs.push(this.loadingOutput);
28714
28719
  }
28715
28720
  this.unsubscribeCurrentRequest();
28716
28721
  this.streaming = true;
@@ -28759,6 +28764,10 @@ class AiAssistantComponent {
28759
28764
  return this.http.request(request);
28760
28765
  }
28761
28766
  processResponse(response) {
28767
+ if (this.aiToolDirective.autoClose) {
28768
+ this.aiToolDirective.emitOpenClose = true;
28769
+ this.aiToolDirective.toggleWindow();
28770
+ }
28762
28771
  const responseBody = response.body;
28763
28772
  const responseSuccessEvent = new GridToolbarAIResponseSuccessEvent(response);
28764
28773
  this.aiToolDirective.responseSuccess.emit(responseSuccessEvent);
@@ -28789,7 +28798,7 @@ class AiAssistantComponent {
28789
28798
  output: responseContentStart.concat(responseContentBody).join(''),
28790
28799
  };
28791
28800
  this.deleteLoadingOutput();
28792
- this.promptOutputs.unshift(output);
28801
+ this.aiToolDirective.promptOutputs.unshift(output);
28793
28802
  }
28794
28803
  handleError(error) {
28795
28804
  const responseErrorEvent = new GridToolbarAIResponseErrorEvent(error);
@@ -28804,11 +28813,11 @@ class AiAssistantComponent {
28804
28813
  output: error.message
28805
28814
  };
28806
28815
  this.deleteLoadingOutput();
28807
- this.promptOutputs.unshift(output);
28816
+ this.aiToolDirective.promptOutputs.unshift(output);
28808
28817
  }
28809
28818
  deleteLoadingOutput() {
28810
- if (this.promptOutputs[0].id === this.loadingOutput.id) {
28811
- this.promptOutputs.splice(0, 1);
28819
+ if (this.aiToolDirective.promptOutputs[0]?.id === this.loadingOutput.id) {
28820
+ this.aiToolDirective.promptOutputs.splice(0, 1);
28812
28821
  }
28813
28822
  }
28814
28823
  unsubscribeCurrentRequest() {
@@ -28862,7 +28871,8 @@ class AiAssistantComponent {
28862
28871
  [generateButtonSVGIcon]="aiPromptSettings?.generateButtonSVGIcon"
28863
28872
  [generateButtonIcon]="aiPromptSettings?.generateButtonIcon"
28864
28873
  [disabledGenerateButton]="disabledGenerateButton || promptView.textAreaValue?.length === 0"
28865
- [promptOutputs]="aiPromptSettings?.promptOutputs || promptOutputs"
28874
+ [promptOutputs]="aiPromptSettings?.promptOutputs"
28875
+ [textAreaSettings]="aiPromptSettings?.textAreaSettings"
28866
28876
  (promptRequest)="onPromptRequest($event)"
28867
28877
  (promptRequestCancel)="cancelRequest()"
28868
28878
  >
@@ -28911,7 +28921,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
28911
28921
  [generateButtonSVGIcon]="aiPromptSettings?.generateButtonSVGIcon"
28912
28922
  [generateButtonIcon]="aiPromptSettings?.generateButtonIcon"
28913
28923
  [disabledGenerateButton]="disabledGenerateButton || promptView.textAreaValue?.length === 0"
28914
- [promptOutputs]="aiPromptSettings?.promptOutputs || promptOutputs"
28924
+ [promptOutputs]="aiPromptSettings?.promptOutputs"
28925
+ [textAreaSettings]="aiPromptSettings?.textAreaSettings"
28915
28926
  (promptRequest)="onPromptRequest($event)"
28916
28927
  (promptRequestCancel)="cancelRequest()"
28917
28928
  >
@@ -28983,13 +28994,23 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
28983
28994
  */
28984
28995
  requestOptions;
28985
28996
  /**
28986
- * Configures the settings for the AI Assistant Window.
28997
+ * Configures the initial settings for the AI Assistant Window when opened.
28987
28998
  */
28988
28999
  aiWindowSettings;
28989
29000
  /**
28990
- * Configures the settings for the AI prompt component that the AI Assistant Window component uses.
29001
+ * Configures the initial settings for the AI Prompt component that the AI Assistant Window component uses when opened.
28991
29002
  */
28992
29003
  aiPromptSettings;
29004
+ /**
29005
+ * Determines whether to close the AI Assistant Window automatically after a successful request.
29006
+ * @default true
29007
+ */
29008
+ autoClose = true;
29009
+ /**
29010
+ * Determines whether to keep the AI Prompt's outputs after closing the AI Assistant Window.
29011
+ * @default false
29012
+ */
29013
+ keepOutputHistory = false;
28993
29014
  /**
28994
29015
  * Emits an event before the AI Assistant tool sends the AI request.
28995
29016
  * - When you provide a `requestUrl`, you can handle the event to modify the request options.
@@ -29016,14 +29037,13 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
29016
29037
  close = new EventEmitter();
29017
29038
  /**
29018
29039
  * Emits an event when the AI Assistant tool opens.
29019
- * The event contains the window instance and the AI prompt instance.
29020
29040
  */
29021
29041
  open = new EventEmitter();
29022
29042
  tableWizardIcon = tableWizardIcon;
29043
+ emitOpenClose = false;
29044
+ promptOutputs = [];
29023
29045
  windowRef;
29024
29046
  subs = new Subscription();
29025
- actionSheetCloseSub;
29026
- emitOpenClose = false;
29027
29047
  defaultAiPromptSettings = {
29028
29048
  speechToTextButton: true,
29029
29049
  generateButtonSVGIcon: this.tableWizardIcon,
@@ -29073,10 +29093,7 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
29073
29093
  ngOnDestroy() {
29074
29094
  super.ngOnDestroy();
29075
29095
  this.subs.unsubscribe();
29076
- if (this.actionSheetCloseSub) {
29077
- this.actionSheetCloseSub.unsubscribe();
29078
- this.actionSheetCloseSub = null;
29079
- }
29096
+ this.promptOutputs = [];
29080
29097
  }
29081
29098
  /**
29082
29099
  * @hidden
@@ -29097,6 +29114,9 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
29097
29114
  }
29098
29115
  }
29099
29116
  openWindow() {
29117
+ if (!this.keepOutputHistory) {
29118
+ this.promptOutputs = [];
29119
+ }
29100
29120
  const defaultWindowWidth = 437;
29101
29121
  const rtl = this.ctx.localization.rtl;
29102
29122
  const defaultWindowSettings = {
@@ -29128,13 +29148,12 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
29128
29148
  aiPrompt.streaming = this.aiPromptSettings?.streaming || false;
29129
29149
  aiPrompt.activeView = this.aiPromptSettings?.activeView || 0;
29130
29150
  aiPrompt.aiPromptSettings = { ...this.defaultAiPromptSettings, ...this.aiPromptSettings };
29151
+ if (!aiPrompt.aiPromptSettings.promptOutputs) {
29152
+ aiPrompt.aiPromptSettings.promptOutputs = this.promptOutputs;
29153
+ }
29131
29154
  if (this.emitOpenClose) {
29132
29155
  this.zone.onStable.pipe(take(1)).subscribe(() => {
29133
- const event = {
29134
- aiWindow: this.windowRef.window.instance,
29135
- aiPrompt: this.windowRef.content.instance.aiPrompt
29136
- };
29137
- this.open.emit(event);
29156
+ this.open.emit();
29138
29157
  this.emitOpenClose = false;
29139
29158
  });
29140
29159
  }
@@ -29157,7 +29176,7 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
29157
29176
  focusAnchor && this.buttonElement?.focus();
29158
29177
  }
29159
29178
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIAssistantToolbarDirective, deps: [{ token: i1$7.WindowService }, { token: i54.ToolBarButtonComponent }, { token: ContextService }, { token: i0.NgZone }, { token: i54.RefreshService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
29160
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIAssistantToolbarDirective, isStandalone: true, selector: "[kendoGridAIAssistantTool]", inputs: { requestUrl: "requestUrl", requestOptions: "requestOptions", aiWindowSettings: "aiWindowSettings", aiPromptSettings: "aiPromptSettings" }, outputs: { promptRequest: "promptRequest", cancelRequest: "cancelRequest", responseSuccess: "responseSuccess", responseError: "responseError", close: "close", open: "open" }, usesInheritance: true, ngImport: i0 });
29179
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIAssistantToolbarDirective, isStandalone: true, selector: "[kendoGridAIAssistantTool]", inputs: { requestUrl: "requestUrl", requestOptions: "requestOptions", aiWindowSettings: "aiWindowSettings", aiPromptSettings: "aiPromptSettings", autoClose: "autoClose", keepOutputHistory: "keepOutputHistory" }, outputs: { promptRequest: "promptRequest", cancelRequest: "cancelRequest", responseSuccess: "responseSuccess", responseError: "responseError", close: "close", open: "open" }, usesInheritance: true, ngImport: i0 });
29161
29180
  }
29162
29181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIAssistantToolbarDirective, decorators: [{
29163
29182
  type: Directive,
@@ -29173,6 +29192,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
29173
29192
  type: Input
29174
29193
  }], aiPromptSettings: [{
29175
29194
  type: Input
29195
+ }], autoClose: [{
29196
+ type: Input
29197
+ }], keepOutputHistory: [{
29198
+ type: Input
29176
29199
  }], promptRequest: [{
29177
29200
  type: Output
29178
29201
  }], cancelRequest: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "19.3.0-develop.40",
3
+ "version": "19.3.0-develop.42",
4
4
  "description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -26,7 +26,7 @@
26
26
  "package": {
27
27
  "productName": "Kendo UI for Angular",
28
28
  "productCode": "KENDOUIANGULAR",
29
- "publishDate": 1754990845,
29
+ "publishDate": 1755009377,
30
30
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
31
31
  }
32
32
  },
@@ -39,29 +39,29 @@
39
39
  "@progress/kendo-data-query": "^1.0.0",
40
40
  "@progress/kendo-drawing": "^1.21.0",
41
41
  "@progress/kendo-licensing": "^1.7.0",
42
- "@progress/kendo-angular-buttons": "19.3.0-develop.40",
43
- "@progress/kendo-angular-common": "19.3.0-develop.40",
44
- "@progress/kendo-angular-dateinputs": "19.3.0-develop.40",
45
- "@progress/kendo-angular-layout": "19.3.0-develop.40",
46
- "@progress/kendo-angular-navigation": "19.3.0-develop.40",
47
- "@progress/kendo-angular-dropdowns": "19.3.0-develop.40",
48
- "@progress/kendo-angular-excel-export": "19.3.0-develop.40",
49
- "@progress/kendo-angular-icons": "19.3.0-develop.40",
50
- "@progress/kendo-angular-inputs": "19.3.0-develop.40",
51
- "@progress/kendo-angular-conversational-ui": "19.3.0-develop.40",
52
- "@progress/kendo-angular-intl": "19.3.0-develop.40",
53
- "@progress/kendo-angular-l10n": "19.3.0-develop.40",
54
- "@progress/kendo-angular-label": "19.3.0-develop.40",
55
- "@progress/kendo-angular-pager": "19.3.0-develop.40",
56
- "@progress/kendo-angular-pdf-export": "19.3.0-develop.40",
57
- "@progress/kendo-angular-popup": "19.3.0-develop.40",
58
- "@progress/kendo-angular-toolbar": "19.3.0-develop.40",
59
- "@progress/kendo-angular-utils": "19.3.0-develop.40",
42
+ "@progress/kendo-angular-buttons": "19.3.0-develop.42",
43
+ "@progress/kendo-angular-common": "19.3.0-develop.42",
44
+ "@progress/kendo-angular-dateinputs": "19.3.0-develop.42",
45
+ "@progress/kendo-angular-layout": "19.3.0-develop.42",
46
+ "@progress/kendo-angular-navigation": "19.3.0-develop.42",
47
+ "@progress/kendo-angular-dropdowns": "19.3.0-develop.42",
48
+ "@progress/kendo-angular-excel-export": "19.3.0-develop.42",
49
+ "@progress/kendo-angular-icons": "19.3.0-develop.42",
50
+ "@progress/kendo-angular-inputs": "19.3.0-develop.42",
51
+ "@progress/kendo-angular-conversational-ui": "19.3.0-develop.42",
52
+ "@progress/kendo-angular-intl": "19.3.0-develop.42",
53
+ "@progress/kendo-angular-l10n": "19.3.0-develop.42",
54
+ "@progress/kendo-angular-label": "19.3.0-develop.42",
55
+ "@progress/kendo-angular-pager": "19.3.0-develop.42",
56
+ "@progress/kendo-angular-pdf-export": "19.3.0-develop.42",
57
+ "@progress/kendo-angular-popup": "19.3.0-develop.42",
58
+ "@progress/kendo-angular-toolbar": "19.3.0-develop.42",
59
+ "@progress/kendo-angular-utils": "19.3.0-develop.42",
60
60
  "rxjs": "^6.5.3 || ^7.0.0"
61
61
  },
62
62
  "dependencies": {
63
63
  "tslib": "^2.3.1",
64
- "@progress/kendo-angular-schematics": "19.3.0-develop.40",
64
+ "@progress/kendo-angular-schematics": "19.3.0-develop.42",
65
65
  "@progress/kendo-common": "^1.0.1",
66
66
  "@progress/kendo-file-saver": "^1.0.0"
67
67
  },
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { OnDestroy, AfterViewInit } from '@angular/core';
6
- import { AIPromptComponent, PromptOutput, PromptRequestEvent } from '@progress/kendo-angular-conversational-ui';
6
+ import { AIPromptComponent, PromptRequestEvent } from '@progress/kendo-angular-conversational-ui';
7
7
  import { HttpClient } from '@angular/common/http';
8
8
  import { ContextService } from './../../../../common/provider.service';
9
9
  import { ColumnInfoService } from './../../../../common/column-info.service';
@@ -19,7 +19,6 @@ export declare class AiAssistantComponent implements OnDestroy, AfterViewInit {
19
19
  private columnInfoService;
20
20
  aiPrompt: AIPromptComponent;
21
21
  activeView: number;
22
- promptOutputs: Array<PromptOutput>;
23
22
  requestUrl: string;
24
23
  requestOptions: GridToolbarAIRequestOptions;
25
24
  aiPromptSettings: GridToolbarAIPromptSettings;
@@ -8,7 +8,8 @@ import { SVGIcon } from '@progress/kendo-svg-icons';
8
8
  import { ContextService } from '../../../../common/provider.service';
9
9
  import { ToolbarToolBase } from '../../../../common/toolbar-tool-base.directive';
10
10
  import { WindowService } from '@progress/kendo-angular-dialog';
11
- import { GridToolbarAIOpenEvent, GridToolbarAIPromptSettings, GridToolbarAIWindowSettings, GridToolbarAIRequestData, GridToolbarAIRequestOptions, GridToolbarAIResponseSuccessEvent, GridToolbarAIResponseErrorEvent } from './utils';
11
+ import { GridToolbarAIPromptSettings, GridToolbarAIWindowSettings, GridToolbarAIRequestOptions, GridToolbarAIResponseSuccessEvent, GridToolbarAIResponseErrorEvent, GridToolbarAIPromptRequestEvent } from './utils';
12
+ import { PromptOutput } from '@progress/kendo-angular-conversational-ui';
12
13
  import * as i0 from "@angular/core";
13
14
  /**
14
15
  * Represents an AI Assistant tool of the Grid.
@@ -44,22 +45,29 @@ export declare class AIAssistantToolbarDirective extends ToolbarToolBase impleme
44
45
  */
45
46
  requestOptions?: GridToolbarAIRequestOptions;
46
47
  /**
47
- * Configures the settings for the AI Assistant Window.
48
+ * Configures the initial settings for the AI Assistant Window when opened.
48
49
  */
49
50
  aiWindowSettings: GridToolbarAIWindowSettings;
50
51
  /**
51
- * Configures the settings for the AI prompt component that the AI Assistant Window component uses.
52
+ * Configures the initial settings for the AI Prompt component that the AI Assistant Window component uses when opened.
52
53
  */
53
54
  aiPromptSettings: GridToolbarAIPromptSettings;
55
+ /**
56
+ * Determines whether to close the AI Assistant Window automatically after a successful request.
57
+ * @default true
58
+ */
59
+ autoClose: boolean;
60
+ /**
61
+ * Determines whether to keep the AI Prompt's outputs after closing the AI Assistant Window.
62
+ * @default false
63
+ */
64
+ keepOutputHistory: boolean;
54
65
  /**
55
66
  * Emits an event before the AI Assistant tool sends the AI request.
56
67
  * - When you provide a `requestUrl`, you can handle the event to modify the request options.
57
68
  * - When you do not provide a `requestUrl`, you can handle the event to perform an entirely custom request.
58
69
  */
59
- promptRequest: EventEmitter<{
60
- requestData: GridToolbarAIRequestData;
61
- isRetry: boolean;
62
- }>;
70
+ promptRequest: EventEmitter<GridToolbarAIPromptRequestEvent>;
63
71
  /**
64
72
  * Emits an event when the user clicks the cancel button.
65
73
  */
@@ -80,14 +88,13 @@ export declare class AIAssistantToolbarDirective extends ToolbarToolBase impleme
80
88
  close: EventEmitter<undefined>;
81
89
  /**
82
90
  * Emits an event when the AI Assistant tool opens.
83
- * The event contains the window instance and the AI prompt instance.
84
91
  */
85
- open: EventEmitter<GridToolbarAIOpenEvent>;
92
+ open: EventEmitter<undefined>;
86
93
  tableWizardIcon: SVGIcon;
94
+ emitOpenClose: boolean;
95
+ promptOutputs: PromptOutput[];
87
96
  private windowRef;
88
97
  private subs;
89
- private actionSheetCloseSub;
90
- private emitOpenClose;
91
98
  private defaultAiPromptSettings;
92
99
  constructor(windowService: WindowService, host: ToolBarButtonComponent, ctx: ContextService, zone: NgZone, refresh: RefreshService, cdr: ChangeDetectorRef);
93
100
  ngOnInit(): void;
@@ -104,5 +111,5 @@ export declare class AIAssistantToolbarDirective extends ToolbarToolBase impleme
104
111
  private openWindow;
105
112
  private closeWindow;
106
113
  static ɵfac: i0.ɵɵFactoryDeclaration<AIAssistantToolbarDirective, never>;
107
- static ɵdir: i0.ɵɵDirectiveDeclaration<AIAssistantToolbarDirective, "[kendoGridAIAssistantTool]", never, { "requestUrl": { "alias": "requestUrl"; "required": false; }; "requestOptions": { "alias": "requestOptions"; "required": false; }; "aiWindowSettings": { "alias": "aiWindowSettings"; "required": false; }; "aiPromptSettings": { "alias": "aiPromptSettings"; "required": false; }; }, { "promptRequest": "promptRequest"; "cancelRequest": "cancelRequest"; "responseSuccess": "responseSuccess"; "responseError": "responseError"; "close": "close"; "open": "open"; }, never, never, true, never>;
114
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AIAssistantToolbarDirective, "[kendoGridAIAssistantTool]", never, { "requestUrl": { "alias": "requestUrl"; "required": false; }; "requestOptions": { "alias": "requestOptions"; "required": false; }; "aiWindowSettings": { "alias": "aiWindowSettings"; "required": false; }; "aiPromptSettings": { "alias": "aiPromptSettings"; "required": false; }; "autoClose": { "alias": "autoClose"; "required": false; }; "keepOutputHistory": { "alias": "keepOutputHistory"; "required": false; }; }, { "promptRequest": "promptRequest"; "cancelRequest": "cancelRequest"; "responseSuccess": "responseSuccess"; "responseError": "responseError"; "close": "close"; "open": "open"; }, never, never, true, never>;
108
115
  }
@@ -4,26 +4,19 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { HttpHeaders, HttpResponse, HttpErrorResponse } from "@angular/common/http";
6
6
  import { PreventableEvent } from "@progress/kendo-angular-common";
7
- import { AIPromptComponent, AIPromptSettings } from "@progress/kendo-angular-conversational-ui";
8
- import { WindowComponent, WindowSettings } from "@progress/kendo-angular-dialog";
9
- import { CompositeFilterDescriptor, GroupDescriptor, SortDescriptor } from "@progress/kendo-data-query";
7
+ import { AIPromptSettings } from "@progress/kendo-angular-conversational-ui";
8
+ import { WindowSettings } from "@progress/kendo-angular-dialog";
9
+ import { CompositeFilterDescriptor, FilterDescriptor, GroupDescriptor, SortDescriptor } from "@progress/kendo-data-query";
10
10
  /**
11
- * Interface representing all configuration options of the Ai Assistant Window.
11
+ * Interface representing all configuration options of the AI Assistant Window.
12
12
  */
13
13
  export interface GridToolbarAIWindowSettings extends Omit<WindowSettings, 'content'> {
14
14
  }
15
15
  /**
16
- * Interface representing all configuration options of the Ai Assistant Prompt.
16
+ * Interface representing all configuration options of the AI Assistant Prompt.
17
17
  */
18
18
  export interface GridToolbarAIPromptSettings extends Omit<AIPromptSettings, 'promptCommands'> {
19
19
  }
20
- /**
21
- * Represents the event data when the AI Assistant window is opened.
22
- */
23
- export interface GridToolbarAIOpenEvent {
24
- aiWindow: WindowComponent;
25
- aiPrompt: AIPromptComponent;
26
- }
27
20
  /**
28
21
  * Represents the data sent in the AI request from the Grid Toolbar AI Assistant.
29
22
  */
@@ -97,7 +90,7 @@ export declare const DEFAULT_AI_REQUEST_OPTIONS: GridToolbarAIRequestOptions;
97
90
  /**
98
91
  * @hidden
99
92
  */
100
- export declare const convertDateStringsInFilter: (filter: any, columns: any[]) => any;
93
+ export declare const convertDateStringsInFilter: (filter: CompositeFilterDescriptor | FilterDescriptor, columns: any[]) => any;
101
94
  /**
102
95
  * @hidden
103
96
  */
@@ -122,3 +115,10 @@ export declare class GridToolbarAIResponseErrorEvent extends PreventableEvent {
122
115
  error: HttpErrorResponse;
123
116
  constructor(error: HttpErrorResponse);
124
117
  }
118
+ /**
119
+ * Represents the event data when the AI Assistant request is initiated.
120
+ */
121
+ export interface GridToolbarAIPromptRequestEvent {
122
+ requestData: GridToolbarAIRequestData;
123
+ isRetry: boolean;
124
+ }
@@ -4,14 +4,14 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
6
6
  // peer deps of the dropdowns
7
- '@progress/kendo-angular-treeview': '19.3.0-develop.40',
8
- '@progress/kendo-angular-navigation': '19.3.0-develop.40',
7
+ '@progress/kendo-angular-treeview': '19.3.0-develop.42',
8
+ '@progress/kendo-angular-navigation': '19.3.0-develop.42',
9
9
  // peer dependency of kendo-angular-inputs
10
- '@progress/kendo-angular-dialog': '19.3.0-develop.40',
10
+ '@progress/kendo-angular-dialog': '19.3.0-develop.42',
11
11
  // peer dependency of kendo-angular-icons
12
12
  '@progress/kendo-svg-icons': '^4.0.0',
13
13
  // peer dependency of kendo-angular-layout
14
- '@progress/kendo-angular-progressbar': '19.3.0-develop.40'
14
+ '@progress/kendo-angular-progressbar': '19.3.0-develop.42'
15
15
  } });
16
16
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
17
17
  }