@progress/kendo-angular-grid 19.3.0-develop.40 → 19.3.0-develop.41
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.
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +14 -9
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-tool.directive.mjs +27 -15
- package/esm2022/rendering/toolbar/tools/ai-assistant/utils.mjs +1 -1
- package/fesm2022/progress-kendo-angular-grid.mjs +44 -27
- package/package.json +21 -21
- package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +1 -2
- package/rendering/toolbar/tools/ai-assistant/ai-tool.directive.d.ts +19 -12
- package/rendering/toolbar/tools/ai-assistant/utils.d.ts +13 -13
- package/schematics/ngAdd/index.js +4 -4
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '19.3.0-develop.
|
|
13
|
+
publishDate: 1754998719,
|
|
14
|
+
version: '19.3.0-develop.41',
|
|
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]
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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'
|
|
47
|
+
return column?.filter === 'date';
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* Represents the event data when the AI Assistant request completes successfully.
|
|
@@ -22009,8 +22009,8 @@ const packageMetadata = {
|
|
|
22009
22009
|
productName: 'Kendo UI for Angular',
|
|
22010
22010
|
productCode: 'KENDOUIANGULAR',
|
|
22011
22011
|
productCodes: ['KENDOUIANGULAR'],
|
|
22012
|
-
publishDate:
|
|
22013
|
-
version: '19.3.0-develop.
|
|
22012
|
+
publishDate: 1754998719,
|
|
22013
|
+
version: '19.3.0-develop.41',
|
|
22014
22014
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
22015
22015
|
};
|
|
22016
22016
|
|
|
@@ -28634,7 +28634,7 @@ const convertDateStringsInFilter = (filter, columns) => {
|
|
|
28634
28634
|
*/
|
|
28635
28635
|
const isDateField = (fieldName, columns) => {
|
|
28636
28636
|
const column = columns.find((col) => col.field === fieldName);
|
|
28637
|
-
return column?.filter === 'date'
|
|
28637
|
+
return column?.filter === 'date';
|
|
28638
28638
|
};
|
|
28639
28639
|
/**
|
|
28640
28640
|
* Represents the event data when the AI Assistant request completes successfully.
|
|
@@ -28672,7 +28672,6 @@ class AiAssistantComponent {
|
|
|
28672
28672
|
columnInfoService;
|
|
28673
28673
|
aiPrompt;
|
|
28674
28674
|
activeView = 0;
|
|
28675
|
-
promptOutputs = [];
|
|
28676
28675
|
requestUrl;
|
|
28677
28676
|
requestOptions;
|
|
28678
28677
|
aiPromptSettings;
|
|
@@ -28709,8 +28708,8 @@ class AiAssistantComponent {
|
|
|
28709
28708
|
this.streaming = false;
|
|
28710
28709
|
}
|
|
28711
28710
|
onPromptRequest(ev) {
|
|
28712
|
-
if (this.promptOutputs.length === 0) {
|
|
28713
|
-
this.promptOutputs.push(this.loadingOutput);
|
|
28711
|
+
if (this.aiToolDirective.promptOutputs.length === 0) {
|
|
28712
|
+
this.aiToolDirective.promptOutputs.push(this.loadingOutput);
|
|
28714
28713
|
}
|
|
28715
28714
|
this.unsubscribeCurrentRequest();
|
|
28716
28715
|
this.streaming = true;
|
|
@@ -28759,6 +28758,10 @@ class AiAssistantComponent {
|
|
|
28759
28758
|
return this.http.request(request);
|
|
28760
28759
|
}
|
|
28761
28760
|
processResponse(response) {
|
|
28761
|
+
if (this.aiToolDirective.autoClose) {
|
|
28762
|
+
this.aiToolDirective.emitOpenClose = true;
|
|
28763
|
+
this.aiToolDirective.toggleWindow();
|
|
28764
|
+
}
|
|
28762
28765
|
const responseBody = response.body;
|
|
28763
28766
|
const responseSuccessEvent = new GridToolbarAIResponseSuccessEvent(response);
|
|
28764
28767
|
this.aiToolDirective.responseSuccess.emit(responseSuccessEvent);
|
|
@@ -28789,7 +28792,7 @@ class AiAssistantComponent {
|
|
|
28789
28792
|
output: responseContentStart.concat(responseContentBody).join(''),
|
|
28790
28793
|
};
|
|
28791
28794
|
this.deleteLoadingOutput();
|
|
28792
|
-
this.promptOutputs.unshift(output);
|
|
28795
|
+
this.aiToolDirective.promptOutputs.unshift(output);
|
|
28793
28796
|
}
|
|
28794
28797
|
handleError(error) {
|
|
28795
28798
|
const responseErrorEvent = new GridToolbarAIResponseErrorEvent(error);
|
|
@@ -28804,11 +28807,11 @@ class AiAssistantComponent {
|
|
|
28804
28807
|
output: error.message
|
|
28805
28808
|
};
|
|
28806
28809
|
this.deleteLoadingOutput();
|
|
28807
|
-
this.promptOutputs.unshift(output);
|
|
28810
|
+
this.aiToolDirective.promptOutputs.unshift(output);
|
|
28808
28811
|
}
|
|
28809
28812
|
deleteLoadingOutput() {
|
|
28810
|
-
if (this.promptOutputs[0]
|
|
28811
|
-
this.promptOutputs.splice(0, 1);
|
|
28813
|
+
if (this.aiToolDirective.promptOutputs[0]?.id === this.loadingOutput.id) {
|
|
28814
|
+
this.aiToolDirective.promptOutputs.splice(0, 1);
|
|
28812
28815
|
}
|
|
28813
28816
|
}
|
|
28814
28817
|
unsubscribeCurrentRequest() {
|
|
@@ -28862,7 +28865,8 @@ class AiAssistantComponent {
|
|
|
28862
28865
|
[generateButtonSVGIcon]="aiPromptSettings?.generateButtonSVGIcon"
|
|
28863
28866
|
[generateButtonIcon]="aiPromptSettings?.generateButtonIcon"
|
|
28864
28867
|
[disabledGenerateButton]="disabledGenerateButton || promptView.textAreaValue?.length === 0"
|
|
28865
|
-
[promptOutputs]="aiPromptSettings?.promptOutputs
|
|
28868
|
+
[promptOutputs]="aiPromptSettings?.promptOutputs"
|
|
28869
|
+
[textAreaSettings]="aiPromptSettings?.textAreaSettings"
|
|
28866
28870
|
(promptRequest)="onPromptRequest($event)"
|
|
28867
28871
|
(promptRequestCancel)="cancelRequest()"
|
|
28868
28872
|
>
|
|
@@ -28911,7 +28915,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
28911
28915
|
[generateButtonSVGIcon]="aiPromptSettings?.generateButtonSVGIcon"
|
|
28912
28916
|
[generateButtonIcon]="aiPromptSettings?.generateButtonIcon"
|
|
28913
28917
|
[disabledGenerateButton]="disabledGenerateButton || promptView.textAreaValue?.length === 0"
|
|
28914
|
-
[promptOutputs]="aiPromptSettings?.promptOutputs
|
|
28918
|
+
[promptOutputs]="aiPromptSettings?.promptOutputs"
|
|
28919
|
+
[textAreaSettings]="aiPromptSettings?.textAreaSettings"
|
|
28915
28920
|
(promptRequest)="onPromptRequest($event)"
|
|
28916
28921
|
(promptRequestCancel)="cancelRequest()"
|
|
28917
28922
|
>
|
|
@@ -28983,13 +28988,23 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
|
|
|
28983
28988
|
*/
|
|
28984
28989
|
requestOptions;
|
|
28985
28990
|
/**
|
|
28986
|
-
* Configures the settings for the AI Assistant Window.
|
|
28991
|
+
* Configures the initial settings for the AI Assistant Window when opened.
|
|
28987
28992
|
*/
|
|
28988
28993
|
aiWindowSettings;
|
|
28989
28994
|
/**
|
|
28990
|
-
* Configures the settings for the AI
|
|
28995
|
+
* Configures the initial settings for the AI Prompt component that the AI Assistant Window component uses when opened.
|
|
28991
28996
|
*/
|
|
28992
28997
|
aiPromptSettings;
|
|
28998
|
+
/**
|
|
28999
|
+
* Determines whether to close the AI Assistant Window automatically after a successful request.
|
|
29000
|
+
* @default true
|
|
29001
|
+
*/
|
|
29002
|
+
autoClose = true;
|
|
29003
|
+
/**
|
|
29004
|
+
* Determines whether to keep the AI Prompt's outputs after closing the AI Assistant Window.
|
|
29005
|
+
* @default false
|
|
29006
|
+
*/
|
|
29007
|
+
keepOutputHistory = false;
|
|
28993
29008
|
/**
|
|
28994
29009
|
* Emits an event before the AI Assistant tool sends the AI request.
|
|
28995
29010
|
* - When you provide a `requestUrl`, you can handle the event to modify the request options.
|
|
@@ -29016,14 +29031,13 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
|
|
|
29016
29031
|
close = new EventEmitter();
|
|
29017
29032
|
/**
|
|
29018
29033
|
* Emits an event when the AI Assistant tool opens.
|
|
29019
|
-
* The event contains the window instance and the AI prompt instance.
|
|
29020
29034
|
*/
|
|
29021
29035
|
open = new EventEmitter();
|
|
29022
29036
|
tableWizardIcon = tableWizardIcon;
|
|
29037
|
+
emitOpenClose = false;
|
|
29038
|
+
promptOutputs = [];
|
|
29023
29039
|
windowRef;
|
|
29024
29040
|
subs = new Subscription();
|
|
29025
|
-
actionSheetCloseSub;
|
|
29026
|
-
emitOpenClose = false;
|
|
29027
29041
|
defaultAiPromptSettings = {
|
|
29028
29042
|
speechToTextButton: true,
|
|
29029
29043
|
generateButtonSVGIcon: this.tableWizardIcon,
|
|
@@ -29073,10 +29087,7 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
|
|
|
29073
29087
|
ngOnDestroy() {
|
|
29074
29088
|
super.ngOnDestroy();
|
|
29075
29089
|
this.subs.unsubscribe();
|
|
29076
|
-
|
|
29077
|
-
this.actionSheetCloseSub.unsubscribe();
|
|
29078
|
-
this.actionSheetCloseSub = null;
|
|
29079
|
-
}
|
|
29090
|
+
this.promptOutputs = [];
|
|
29080
29091
|
}
|
|
29081
29092
|
/**
|
|
29082
29093
|
* @hidden
|
|
@@ -29097,6 +29108,9 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
|
|
|
29097
29108
|
}
|
|
29098
29109
|
}
|
|
29099
29110
|
openWindow() {
|
|
29111
|
+
if (!this.keepOutputHistory) {
|
|
29112
|
+
this.promptOutputs = [];
|
|
29113
|
+
}
|
|
29100
29114
|
const defaultWindowWidth = 437;
|
|
29101
29115
|
const rtl = this.ctx.localization.rtl;
|
|
29102
29116
|
const defaultWindowSettings = {
|
|
@@ -29128,13 +29142,12 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
|
|
|
29128
29142
|
aiPrompt.streaming = this.aiPromptSettings?.streaming || false;
|
|
29129
29143
|
aiPrompt.activeView = this.aiPromptSettings?.activeView || 0;
|
|
29130
29144
|
aiPrompt.aiPromptSettings = { ...this.defaultAiPromptSettings, ...this.aiPromptSettings };
|
|
29145
|
+
if (!aiPrompt.aiPromptSettings.promptOutputs) {
|
|
29146
|
+
aiPrompt.aiPromptSettings.promptOutputs = this.promptOutputs;
|
|
29147
|
+
}
|
|
29131
29148
|
if (this.emitOpenClose) {
|
|
29132
29149
|
this.zone.onStable.pipe(take(1)).subscribe(() => {
|
|
29133
|
-
|
|
29134
|
-
aiWindow: this.windowRef.window.instance,
|
|
29135
|
-
aiPrompt: this.windowRef.content.instance.aiPrompt
|
|
29136
|
-
};
|
|
29137
|
-
this.open.emit(event);
|
|
29150
|
+
this.open.emit();
|
|
29138
29151
|
this.emitOpenClose = false;
|
|
29139
29152
|
});
|
|
29140
29153
|
}
|
|
@@ -29157,7 +29170,7 @@ class AIAssistantToolbarDirective extends ToolbarToolBase {
|
|
|
29157
29170
|
focusAnchor && this.buttonElement?.focus();
|
|
29158
29171
|
}
|
|
29159
29172
|
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 });
|
|
29173
|
+
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
29174
|
}
|
|
29162
29175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIAssistantToolbarDirective, decorators: [{
|
|
29163
29176
|
type: Directive,
|
|
@@ -29173,6 +29186,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
29173
29186
|
type: Input
|
|
29174
29187
|
}], aiPromptSettings: [{
|
|
29175
29188
|
type: Input
|
|
29189
|
+
}], autoClose: [{
|
|
29190
|
+
type: Input
|
|
29191
|
+
}], keepOutputHistory: [{
|
|
29192
|
+
type: Input
|
|
29176
29193
|
}], promptRequest: [{
|
|
29177
29194
|
type: Output
|
|
29178
29195
|
}], cancelRequest: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "19.3.0-develop.
|
|
3
|
+
"version": "19.3.0-develop.41",
|
|
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":
|
|
29
|
+
"publishDate": 1754998719,
|
|
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.
|
|
43
|
-
"@progress/kendo-angular-common": "19.3.0-develop.
|
|
44
|
-
"@progress/kendo-angular-dateinputs": "19.3.0-develop.
|
|
45
|
-
"@progress/kendo-angular-layout": "19.3.0-develop.
|
|
46
|
-
"@progress/kendo-angular-navigation": "19.3.0-develop.
|
|
47
|
-
"@progress/kendo-angular-dropdowns": "19.3.0-develop.
|
|
48
|
-
"@progress/kendo-angular-excel-export": "19.3.0-develop.
|
|
49
|
-
"@progress/kendo-angular-icons": "19.3.0-develop.
|
|
50
|
-
"@progress/kendo-angular-inputs": "19.3.0-develop.
|
|
51
|
-
"@progress/kendo-angular-conversational-ui": "19.3.0-develop.
|
|
52
|
-
"@progress/kendo-angular-intl": "19.3.0-develop.
|
|
53
|
-
"@progress/kendo-angular-l10n": "19.3.0-develop.
|
|
54
|
-
"@progress/kendo-angular-label": "19.3.0-develop.
|
|
55
|
-
"@progress/kendo-angular-pager": "19.3.0-develop.
|
|
56
|
-
"@progress/kendo-angular-pdf-export": "19.3.0-develop.
|
|
57
|
-
"@progress/kendo-angular-popup": "19.3.0-develop.
|
|
58
|
-
"@progress/kendo-angular-toolbar": "19.3.0-develop.
|
|
59
|
-
"@progress/kendo-angular-utils": "19.3.0-develop.
|
|
42
|
+
"@progress/kendo-angular-buttons": "19.3.0-develop.41",
|
|
43
|
+
"@progress/kendo-angular-common": "19.3.0-develop.41",
|
|
44
|
+
"@progress/kendo-angular-dateinputs": "19.3.0-develop.41",
|
|
45
|
+
"@progress/kendo-angular-layout": "19.3.0-develop.41",
|
|
46
|
+
"@progress/kendo-angular-navigation": "19.3.0-develop.41",
|
|
47
|
+
"@progress/kendo-angular-dropdowns": "19.3.0-develop.41",
|
|
48
|
+
"@progress/kendo-angular-excel-export": "19.3.0-develop.41",
|
|
49
|
+
"@progress/kendo-angular-icons": "19.3.0-develop.41",
|
|
50
|
+
"@progress/kendo-angular-inputs": "19.3.0-develop.41",
|
|
51
|
+
"@progress/kendo-angular-conversational-ui": "19.3.0-develop.41",
|
|
52
|
+
"@progress/kendo-angular-intl": "19.3.0-develop.41",
|
|
53
|
+
"@progress/kendo-angular-l10n": "19.3.0-develop.41",
|
|
54
|
+
"@progress/kendo-angular-label": "19.3.0-develop.41",
|
|
55
|
+
"@progress/kendo-angular-pager": "19.3.0-develop.41",
|
|
56
|
+
"@progress/kendo-angular-pdf-export": "19.3.0-develop.41",
|
|
57
|
+
"@progress/kendo-angular-popup": "19.3.0-develop.41",
|
|
58
|
+
"@progress/kendo-angular-toolbar": "19.3.0-develop.41",
|
|
59
|
+
"@progress/kendo-angular-utils": "19.3.0-develop.41",
|
|
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.
|
|
64
|
+
"@progress/kendo-angular-schematics": "19.3.0-develop.41",
|
|
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,
|
|
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 {
|
|
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
|
|
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<
|
|
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 {
|
|
8
|
-
import {
|
|
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
|
|
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
|
|
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:
|
|
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.
|
|
8
|
-
'@progress/kendo-angular-navigation': '19.3.0-develop.
|
|
7
|
+
'@progress/kendo-angular-treeview': '19.3.0-develop.41',
|
|
8
|
+
'@progress/kendo-angular-navigation': '19.3.0-develop.41',
|
|
9
9
|
// peer dependency of kendo-angular-inputs
|
|
10
|
-
'@progress/kendo-angular-dialog': '19.3.0-develop.
|
|
10
|
+
'@progress/kendo-angular-dialog': '19.3.0-develop.41',
|
|
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.
|
|
14
|
+
'@progress/kendo-angular-progressbar': '19.3.0-develop.41'
|
|
15
15
|
} });
|
|
16
16
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
17
17
|
}
|