@progress/kendo-angular-grid 20.0.0-develop.2 → 20.0.0-develop.3
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/index.mjs +1 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +15 -6
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-tool.directive.mjs +1 -1
- package/esm2022/rendering/toolbar/tools/ai-assistant/models.mjs +43 -0
- package/esm2022/rendering/toolbar/tools/ai-assistant/utils.mjs +61 -43
- package/fesm2022/progress-kendo-angular-grid.mjs +104 -39
- package/index.d.ts +1 -1
- package/package.json +21 -21
- package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +2 -1
- package/rendering/toolbar/tools/ai-assistant/ai-tool.directive.d.ts +1 -1
- package/rendering/toolbar/tools/ai-assistant/models.d.ts +171 -0
- package/rendering/toolbar/tools/ai-assistant/utils.d.ts +15 -119
- package/schematics/ngAdd/index.js +4 -4
package/esm2022/index.mjs
CHANGED
|
@@ -215,4 +215,4 @@ export { SizingOptionsService } from './layout/sizing-options.service';
|
|
|
215
215
|
export { GridTableDirective } from './rendering/grid-table.directive';
|
|
216
216
|
// Needed as it is an optional injection of the FilterService
|
|
217
217
|
export { MenuTabbingService } from './filtering/menu/menu-tabbing.service';
|
|
218
|
-
export * from './rendering/toolbar/tools/ai-assistant/
|
|
218
|
+
export * from './rendering/toolbar/tools/ai-assistant/models';
|
|
@@ -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: '20.0.0-develop.
|
|
13
|
+
publishDate: 1755793184,
|
|
14
|
+
version: '20.0.0-develop.3',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -7,8 +7,9 @@ import { AIPromptComponent, OutputViewComponent, PromptViewComponent, AIPromptCu
|
|
|
7
7
|
import { HttpClient, HttpRequest } from '@angular/common/http';
|
|
8
8
|
import { ContextService } from './../../../../common/provider.service';
|
|
9
9
|
import { ColumnInfoService } from './../../../../common/column-info.service';
|
|
10
|
-
import {
|
|
10
|
+
import { GridToolbarAIResponseSuccessEvent, GridToolbarAIResponseErrorEvent } from './models';
|
|
11
11
|
import { NgIf } from '@angular/common';
|
|
12
|
+
import { convertDateStringsInFilter, highlightBy } from './utils';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
import * as i1 from "@angular/common/http";
|
|
14
15
|
import * as i2 from "./../../../../common/provider.service";
|
|
@@ -41,10 +42,7 @@ export class AiAssistantComponent {
|
|
|
41
42
|
this.columnInfoService = columnInfoService;
|
|
42
43
|
}
|
|
43
44
|
ngAfterViewInit() {
|
|
44
|
-
this.columns = this.columnInfoService.leafNamedColumns.map((col) => ({
|
|
45
|
-
field: col.field,
|
|
46
|
-
title: col.title || col.field
|
|
47
|
-
}));
|
|
45
|
+
this.columns = this.columnInfoService.leafNamedColumns.map((col) => ({ field: col.field }));
|
|
48
46
|
}
|
|
49
47
|
ngOnDestroy() {
|
|
50
48
|
this.unsubscribeCurrentRequest();
|
|
@@ -131,6 +129,9 @@ export class AiAssistantComponent {
|
|
|
131
129
|
if (isGroupable && responseBody.group) {
|
|
132
130
|
this.processArrayResponse(responseBody.group, this.ctx.grid.currentState.group || [], (item) => item.field, (mergedArray) => this.ctx.grid.groupChange.next(mergedArray));
|
|
133
131
|
}
|
|
132
|
+
if (this.ctx.highlightDirective && responseBody.highlight) {
|
|
133
|
+
this.processHighlightResponse(responseBody.highlight);
|
|
134
|
+
}
|
|
134
135
|
const responseContentStart = [`${this.ctx.localization.get('aiAssistantOutputCardBodyContent')} \n`];
|
|
135
136
|
const responseContentBody = responseBody.messages
|
|
136
137
|
.map((output, idx) => `${idx + 1} ${output}`)
|
|
@@ -182,8 +183,16 @@ export class AiAssistantComponent {
|
|
|
182
183
|
updateGrid(mergedArray);
|
|
183
184
|
}
|
|
184
185
|
}
|
|
186
|
+
processHighlightResponse(highlight) {
|
|
187
|
+
if (highlight.length === 0) {
|
|
188
|
+
this.ctx.highlightDirective['setState']([]);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
const highlightedItems = highlightBy(this.ctx.dataBindingDirective['originalData'], highlight, this.columns);
|
|
192
|
+
this.ctx.highlightDirective['setState'](highlightedItems);
|
|
193
|
+
}
|
|
185
194
|
processFilterResponse(filter) {
|
|
186
|
-
const processedFilter = convertDateStringsInFilter(filter
|
|
195
|
+
const processedFilter = convertDateStringsInFilter(filter);
|
|
187
196
|
const clearFilter = Object.keys(processedFilter).length === 0;
|
|
188
197
|
if (clearFilter) {
|
|
189
198
|
this.ctx.grid.filterChange.next(undefined);
|
|
@@ -13,7 +13,7 @@ import { ToolbarToolBase } from '../../../../common/toolbar-tool-base.directive'
|
|
|
13
13
|
import { ToolbarToolName } from '../../../../navigation/toolbar-tool-name';
|
|
14
14
|
import { WindowService } from '@progress/kendo-angular-dialog';
|
|
15
15
|
import { AiAssistantComponent } from './ai-assistant.component';
|
|
16
|
-
import { DEFAULT_AI_REQUEST_OPTIONS } from './
|
|
16
|
+
import { DEFAULT_AI_REQUEST_OPTIONS } from './models';
|
|
17
17
|
import * as i0 from "@angular/core";
|
|
18
18
|
import * as i1 from "@progress/kendo-angular-dialog";
|
|
19
19
|
import * as i2 from "@progress/kendo-angular-toolbar";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { HttpHeaders } from "@angular/common/http";
|
|
6
|
+
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export const DEFAULT_AI_REQUEST_OPTIONS = {
|
|
11
|
+
headers: new HttpHeaders({
|
|
12
|
+
'Content-Type': 'application/json'
|
|
13
|
+
}),
|
|
14
|
+
role: 'user',
|
|
15
|
+
method: 'POST',
|
|
16
|
+
responseType: 'json'
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Represents the event data when the AI Assistant request completes successfully.
|
|
20
|
+
*/
|
|
21
|
+
export class GridToolbarAIResponseSuccessEvent extends PreventableEvent {
|
|
22
|
+
/**
|
|
23
|
+
* The HTTP response from the AI service.
|
|
24
|
+
*/
|
|
25
|
+
response;
|
|
26
|
+
constructor(response) {
|
|
27
|
+
super();
|
|
28
|
+
this.response = response;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents the event data when the AI Assistant request completes with an error.
|
|
33
|
+
*/
|
|
34
|
+
export class GridToolbarAIResponseErrorEvent extends PreventableEvent {
|
|
35
|
+
/**
|
|
36
|
+
* The HTTP error response from the AI service.
|
|
37
|
+
*/
|
|
38
|
+
error;
|
|
39
|
+
constructor(error) {
|
|
40
|
+
super();
|
|
41
|
+
this.error = error;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -2,38 +2,28 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { filterBy } from "@progress/kendo-data-query";
|
|
6
|
+
import { parseDate } from "@progress/kendo-angular-intl";
|
|
7
7
|
/**
|
|
8
8
|
* @hidden
|
|
9
|
+
* Converts date strings in a filter to Date objects.
|
|
9
10
|
*/
|
|
10
|
-
export const
|
|
11
|
-
headers: new HttpHeaders({
|
|
12
|
-
'Content-Type': 'application/json'
|
|
13
|
-
}),
|
|
14
|
-
role: 'user',
|
|
15
|
-
method: 'POST',
|
|
16
|
-
responseType: 'json'
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
export const convertDateStringsInFilter = (filter, columns) => {
|
|
11
|
+
export const convertDateStringsInFilter = (filter) => {
|
|
22
12
|
if (!filter) {
|
|
23
13
|
return filter;
|
|
24
14
|
}
|
|
25
15
|
if (filter.filters && Array.isArray(filter.filters)) {
|
|
26
16
|
return {
|
|
27
17
|
...filter,
|
|
28
|
-
filters: filter.filters.map(f => convertDateStringsInFilter(f
|
|
18
|
+
filters: filter.filters.map(f => convertDateStringsInFilter(f))
|
|
29
19
|
};
|
|
30
20
|
}
|
|
31
21
|
if (filter.field && filter.value !== undefined) {
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
if (typeof filter.value === 'string' && isDateOperator(filter.operator)) {
|
|
23
|
+
const date = parseDate(filter.value);
|
|
34
24
|
return {
|
|
35
25
|
...filter,
|
|
36
|
-
value:
|
|
26
|
+
value: date || filter.value
|
|
37
27
|
};
|
|
38
28
|
}
|
|
39
29
|
}
|
|
@@ -42,33 +32,61 @@ export const convertDateStringsInFilter = (filter, columns) => {
|
|
|
42
32
|
/**
|
|
43
33
|
* @hidden
|
|
44
34
|
*/
|
|
45
|
-
export const
|
|
46
|
-
const
|
|
47
|
-
|
|
35
|
+
export const isDateOperator = (operator) => {
|
|
36
|
+
const dateOperators = [
|
|
37
|
+
'eq', 'neq', 'lt', 'lte', 'gt', 'gte'
|
|
38
|
+
];
|
|
39
|
+
return dateOperators.includes(operator);
|
|
48
40
|
};
|
|
49
41
|
/**
|
|
50
|
-
*
|
|
42
|
+
* @hidden
|
|
43
|
+
* Processes cell highlights for a specific filter and item.
|
|
51
44
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
45
|
+
const processCellHighlights = (filter, rowIndex, columns, highlightItems) => {
|
|
46
|
+
Object.keys(filter.cells).forEach((columnField) => {
|
|
47
|
+
const actualColumnIndex = Array.from(columns).findIndex((col) => col.field === columnField);
|
|
48
|
+
if (actualColumnIndex !== -1) {
|
|
49
|
+
highlightItems.push({
|
|
50
|
+
itemKey: rowIndex,
|
|
51
|
+
columnKey: actualColumnIndex,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
};
|
|
62
56
|
/**
|
|
63
|
-
*
|
|
57
|
+
* @hidden
|
|
58
|
+
* Processes filtered results and adds highlight items.
|
|
64
59
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
60
|
+
const processFilteredResults = (filteredResults, data, filter, columns, highlightItems) => {
|
|
61
|
+
filteredResults?.forEach((item) => {
|
|
62
|
+
const rowIndex = data.findIndex((dataItem) => dataItem === item);
|
|
63
|
+
if (filter.cells && Object.keys(filter.cells).length > 0) {
|
|
64
|
+
processCellHighlights(filter, rowIndex, columns, highlightItems);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
highlightItems.push({
|
|
68
|
+
itemKey: rowIndex,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @hidden
|
|
75
|
+
* Highlights items in a grid based on the provided filters and columns.
|
|
76
|
+
* @param data - The data to be highlighted.
|
|
77
|
+
* @param filters - The composite highlight descriptors containing the filters and logic.
|
|
78
|
+
* @param columns - The columns of the grid.
|
|
79
|
+
* @returns An array of HighlightItem objects representing the highlighted items.
|
|
80
|
+
*/
|
|
81
|
+
export const highlightBy = (data, filters, columns) => {
|
|
82
|
+
const highlightItems = [];
|
|
83
|
+
filters.forEach((filter) => {
|
|
84
|
+
const processedFilters = filter.filters.map((filter) => convertDateStringsInFilter(filter));
|
|
85
|
+
const filteredResults = filterBy(data, {
|
|
86
|
+
logic: filter.logic || "and",
|
|
87
|
+
filters: processedFilters,
|
|
88
|
+
});
|
|
89
|
+
processFilteredResults(filteredResults, data, filter, columns, highlightItems);
|
|
90
|
+
});
|
|
91
|
+
return highlightItems;
|
|
92
|
+
};
|
|
@@ -16,10 +16,11 @@ import * as i1$2 from '@progress/kendo-angular-l10n';
|
|
|
16
16
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
17
17
|
import * as i53 from '@progress/kendo-angular-pager';
|
|
18
18
|
import { PagerContextService, PagerNavigationService, PagerTemplateDirective, KENDO_PAGER } from '@progress/kendo-angular-pager';
|
|
19
|
-
import { orderBy, isCompositeFilterDescriptor, groupBy, process } from '@progress/kendo-data-query';
|
|
19
|
+
import { orderBy, isCompositeFilterDescriptor, groupBy, filterBy, process } from '@progress/kendo-data-query';
|
|
20
20
|
import { NgFor, NgIf, NgTemplateOutlet, NgSwitch, NgSwitchCase, NgClass, NgStyle, NgSwitchDefault, KeyValuePipe } from '@angular/common';
|
|
21
21
|
import { getter } from '@progress/kendo-common';
|
|
22
22
|
import * as i1$4 from '@progress/kendo-angular-intl';
|
|
23
|
+
import { parseDate } from '@progress/kendo-angular-intl';
|
|
23
24
|
import * as i2 from '@progress/kendo-angular-popup';
|
|
24
25
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
25
26
|
import * as i1$6 from '@progress/kendo-angular-buttons';
|
|
@@ -22056,8 +22057,8 @@ const packageMetadata = {
|
|
|
22056
22057
|
productName: 'Kendo UI for Angular',
|
|
22057
22058
|
productCode: 'KENDOUIANGULAR',
|
|
22058
22059
|
productCodes: ['KENDOUIANGULAR'],
|
|
22059
|
-
publishDate:
|
|
22060
|
-
version: '20.0.0-develop.
|
|
22060
|
+
publishDate: 1755793184,
|
|
22061
|
+
version: '20.0.0-develop.3',
|
|
22061
22062
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
22062
22063
|
};
|
|
22063
22064
|
|
|
@@ -28841,25 +28842,53 @@ const DEFAULT_AI_REQUEST_OPTIONS = {
|
|
|
28841
28842
|
method: 'POST',
|
|
28842
28843
|
responseType: 'json'
|
|
28843
28844
|
};
|
|
28845
|
+
/**
|
|
28846
|
+
* Represents the event data when the AI Assistant request completes successfully.
|
|
28847
|
+
*/
|
|
28848
|
+
class GridToolbarAIResponseSuccessEvent extends PreventableEvent$1 {
|
|
28849
|
+
/**
|
|
28850
|
+
* The HTTP response from the AI service.
|
|
28851
|
+
*/
|
|
28852
|
+
response;
|
|
28853
|
+
constructor(response) {
|
|
28854
|
+
super();
|
|
28855
|
+
this.response = response;
|
|
28856
|
+
}
|
|
28857
|
+
}
|
|
28858
|
+
/**
|
|
28859
|
+
* Represents the event data when the AI Assistant request completes with an error.
|
|
28860
|
+
*/
|
|
28861
|
+
class GridToolbarAIResponseErrorEvent extends PreventableEvent$1 {
|
|
28862
|
+
/**
|
|
28863
|
+
* The HTTP error response from the AI service.
|
|
28864
|
+
*/
|
|
28865
|
+
error;
|
|
28866
|
+
constructor(error) {
|
|
28867
|
+
super();
|
|
28868
|
+
this.error = error;
|
|
28869
|
+
}
|
|
28870
|
+
}
|
|
28871
|
+
|
|
28844
28872
|
/**
|
|
28845
28873
|
* @hidden
|
|
28874
|
+
* Converts date strings in a filter to Date objects.
|
|
28846
28875
|
*/
|
|
28847
|
-
const convertDateStringsInFilter = (filter
|
|
28876
|
+
const convertDateStringsInFilter = (filter) => {
|
|
28848
28877
|
if (!filter) {
|
|
28849
28878
|
return filter;
|
|
28850
28879
|
}
|
|
28851
28880
|
if (filter.filters && Array.isArray(filter.filters)) {
|
|
28852
28881
|
return {
|
|
28853
28882
|
...filter,
|
|
28854
|
-
filters: filter.filters.map(f => convertDateStringsInFilter(f
|
|
28883
|
+
filters: filter.filters.map(f => convertDateStringsInFilter(f))
|
|
28855
28884
|
};
|
|
28856
28885
|
}
|
|
28857
28886
|
if (filter.field && filter.value !== undefined) {
|
|
28858
|
-
|
|
28859
|
-
|
|
28887
|
+
if (typeof filter.value === 'string' && isDateOperator(filter.operator)) {
|
|
28888
|
+
const date = parseDate(filter.value);
|
|
28860
28889
|
return {
|
|
28861
28890
|
...filter,
|
|
28862
|
-
value:
|
|
28891
|
+
value: date || filter.value
|
|
28863
28892
|
};
|
|
28864
28893
|
}
|
|
28865
28894
|
}
|
|
@@ -28868,36 +28897,64 @@ const convertDateStringsInFilter = (filter, columns) => {
|
|
|
28868
28897
|
/**
|
|
28869
28898
|
* @hidden
|
|
28870
28899
|
*/
|
|
28871
|
-
const
|
|
28872
|
-
const
|
|
28873
|
-
|
|
28900
|
+
const isDateOperator = (operator) => {
|
|
28901
|
+
const dateOperators = [
|
|
28902
|
+
'eq', 'neq', 'lt', 'lte', 'gt', 'gte'
|
|
28903
|
+
];
|
|
28904
|
+
return dateOperators.includes(operator);
|
|
28874
28905
|
};
|
|
28875
28906
|
/**
|
|
28876
|
-
*
|
|
28907
|
+
* @hidden
|
|
28908
|
+
* Processes cell highlights for a specific filter and item.
|
|
28877
28909
|
*/
|
|
28878
|
-
|
|
28879
|
-
|
|
28880
|
-
|
|
28881
|
-
|
|
28882
|
-
|
|
28883
|
-
|
|
28884
|
-
|
|
28885
|
-
|
|
28886
|
-
|
|
28887
|
-
}
|
|
28910
|
+
const processCellHighlights = (filter, rowIndex, columns, highlightItems) => {
|
|
28911
|
+
Object.keys(filter.cells).forEach((columnField) => {
|
|
28912
|
+
const actualColumnIndex = Array.from(columns).findIndex((col) => col.field === columnField);
|
|
28913
|
+
if (actualColumnIndex !== -1) {
|
|
28914
|
+
highlightItems.push({
|
|
28915
|
+
itemKey: rowIndex,
|
|
28916
|
+
columnKey: actualColumnIndex,
|
|
28917
|
+
});
|
|
28918
|
+
}
|
|
28919
|
+
});
|
|
28920
|
+
};
|
|
28888
28921
|
/**
|
|
28889
|
-
*
|
|
28922
|
+
* @hidden
|
|
28923
|
+
* Processes filtered results and adds highlight items.
|
|
28890
28924
|
*/
|
|
28891
|
-
|
|
28892
|
-
|
|
28893
|
-
|
|
28894
|
-
|
|
28895
|
-
|
|
28896
|
-
|
|
28897
|
-
|
|
28898
|
-
|
|
28899
|
-
|
|
28900
|
-
}
|
|
28925
|
+
const processFilteredResults = (filteredResults, data, filter, columns, highlightItems) => {
|
|
28926
|
+
filteredResults?.forEach((item) => {
|
|
28927
|
+
const rowIndex = data.findIndex((dataItem) => dataItem === item);
|
|
28928
|
+
if (filter.cells && Object.keys(filter.cells).length > 0) {
|
|
28929
|
+
processCellHighlights(filter, rowIndex, columns, highlightItems);
|
|
28930
|
+
}
|
|
28931
|
+
else {
|
|
28932
|
+
highlightItems.push({
|
|
28933
|
+
itemKey: rowIndex,
|
|
28934
|
+
});
|
|
28935
|
+
}
|
|
28936
|
+
});
|
|
28937
|
+
};
|
|
28938
|
+
/**
|
|
28939
|
+
* @hidden
|
|
28940
|
+
* Highlights items in a grid based on the provided filters and columns.
|
|
28941
|
+
* @param data - The data to be highlighted.
|
|
28942
|
+
* @param filters - The composite highlight descriptors containing the filters and logic.
|
|
28943
|
+
* @param columns - The columns of the grid.
|
|
28944
|
+
* @returns An array of HighlightItem objects representing the highlighted items.
|
|
28945
|
+
*/
|
|
28946
|
+
const highlightBy = (data, filters, columns) => {
|
|
28947
|
+
const highlightItems = [];
|
|
28948
|
+
filters.forEach((filter) => {
|
|
28949
|
+
const processedFilters = filter.filters.map((filter) => convertDateStringsInFilter(filter));
|
|
28950
|
+
const filteredResults = filterBy(data, {
|
|
28951
|
+
logic: filter.logic || "and",
|
|
28952
|
+
filters: processedFilters,
|
|
28953
|
+
});
|
|
28954
|
+
processFilteredResults(filteredResults, data, filter, columns, highlightItems);
|
|
28955
|
+
});
|
|
28956
|
+
return highlightItems;
|
|
28957
|
+
};
|
|
28901
28958
|
|
|
28902
28959
|
/**
|
|
28903
28960
|
* @hidden
|
|
@@ -28927,10 +28984,7 @@ class AiAssistantComponent {
|
|
|
28927
28984
|
this.columnInfoService = columnInfoService;
|
|
28928
28985
|
}
|
|
28929
28986
|
ngAfterViewInit() {
|
|
28930
|
-
this.columns = this.columnInfoService.leafNamedColumns.map((col) => ({
|
|
28931
|
-
field: col.field,
|
|
28932
|
-
title: col.title || col.field
|
|
28933
|
-
}));
|
|
28987
|
+
this.columns = this.columnInfoService.leafNamedColumns.map((col) => ({ field: col.field }));
|
|
28934
28988
|
}
|
|
28935
28989
|
ngOnDestroy() {
|
|
28936
28990
|
this.unsubscribeCurrentRequest();
|
|
@@ -29017,6 +29071,9 @@ class AiAssistantComponent {
|
|
|
29017
29071
|
if (isGroupable && responseBody.group) {
|
|
29018
29072
|
this.processArrayResponse(responseBody.group, this.ctx.grid.currentState.group || [], (item) => item.field, (mergedArray) => this.ctx.grid.groupChange.next(mergedArray));
|
|
29019
29073
|
}
|
|
29074
|
+
if (this.ctx.highlightDirective && responseBody.highlight) {
|
|
29075
|
+
this.processHighlightResponse(responseBody.highlight);
|
|
29076
|
+
}
|
|
29020
29077
|
const responseContentStart = [`${this.ctx.localization.get('aiAssistantOutputCardBodyContent')} \n`];
|
|
29021
29078
|
const responseContentBody = responseBody.messages
|
|
29022
29079
|
.map((output, idx) => `${idx + 1} ${output}`)
|
|
@@ -29068,8 +29125,16 @@ class AiAssistantComponent {
|
|
|
29068
29125
|
updateGrid(mergedArray);
|
|
29069
29126
|
}
|
|
29070
29127
|
}
|
|
29128
|
+
processHighlightResponse(highlight) {
|
|
29129
|
+
if (highlight.length === 0) {
|
|
29130
|
+
this.ctx.highlightDirective['setState']([]);
|
|
29131
|
+
return;
|
|
29132
|
+
}
|
|
29133
|
+
const highlightedItems = highlightBy(this.ctx.dataBindingDirective['originalData'], highlight, this.columns);
|
|
29134
|
+
this.ctx.highlightDirective['setState'](highlightedItems);
|
|
29135
|
+
}
|
|
29071
29136
|
processFilterResponse(filter) {
|
|
29072
|
-
const processedFilter = convertDateStringsInFilter(filter
|
|
29137
|
+
const processedFilter = convertDateStringsInFilter(filter);
|
|
29073
29138
|
const clearFilter = Object.keys(processedFilter).length === 0;
|
|
29074
29139
|
if (clearFilter) {
|
|
29075
29140
|
this.ctx.grid.filterChange.next(undefined);
|
|
@@ -37642,5 +37707,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
37642
37707
|
* Generated bundle index. Do not edit.
|
|
37643
37708
|
*/
|
|
37644
37709
|
|
|
37645
|
-
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, 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,
|
|
37710
|
+
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, 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 };
|
|
37646
37711
|
|
package/index.d.ts
CHANGED
|
@@ -257,4 +257,4 @@ export { GroupPanelComponent } from './grouping/group-panel.component';
|
|
|
257
257
|
export { SizingOptionsService } from './layout/sizing-options.service';
|
|
258
258
|
export { GridTableDirective } from './rendering/grid-table.directive';
|
|
259
259
|
export { MenuTabbingService } from './filtering/menu/menu-tabbing.service';
|
|
260
|
-
export * from './rendering/toolbar/tools/ai-assistant/
|
|
260
|
+
export * from './rendering/toolbar/tools/ai-assistant/models';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "20.0.0-develop.
|
|
3
|
+
"version": "20.0.0-develop.3",
|
|
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",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"package": {
|
|
42
42
|
"productName": "Kendo UI for Angular",
|
|
43
43
|
"productCode": "KENDOUIANGULAR",
|
|
44
|
-
"publishDate":
|
|
44
|
+
"publishDate": 1755793184,
|
|
45
45
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
46
46
|
}
|
|
47
47
|
},
|
|
@@ -54,29 +54,29 @@
|
|
|
54
54
|
"@progress/kendo-data-query": "^1.0.0",
|
|
55
55
|
"@progress/kendo-drawing": "^1.21.0",
|
|
56
56
|
"@progress/kendo-licensing": "^1.7.0",
|
|
57
|
-
"@progress/kendo-angular-buttons": "20.0.0-develop.
|
|
58
|
-
"@progress/kendo-angular-common": "20.0.0-develop.
|
|
59
|
-
"@progress/kendo-angular-dateinputs": "20.0.0-develop.
|
|
60
|
-
"@progress/kendo-angular-layout": "20.0.0-develop.
|
|
61
|
-
"@progress/kendo-angular-navigation": "20.0.0-develop.
|
|
62
|
-
"@progress/kendo-angular-dropdowns": "20.0.0-develop.
|
|
63
|
-
"@progress/kendo-angular-excel-export": "20.0.0-develop.
|
|
64
|
-
"@progress/kendo-angular-icons": "20.0.0-develop.
|
|
65
|
-
"@progress/kendo-angular-inputs": "20.0.0-develop.
|
|
66
|
-
"@progress/kendo-angular-conversational-ui": "20.0.0-develop.
|
|
67
|
-
"@progress/kendo-angular-intl": "20.0.0-develop.
|
|
68
|
-
"@progress/kendo-angular-l10n": "20.0.0-develop.
|
|
69
|
-
"@progress/kendo-angular-label": "20.0.0-develop.
|
|
70
|
-
"@progress/kendo-angular-pager": "20.0.0-develop.
|
|
71
|
-
"@progress/kendo-angular-pdf-export": "20.0.0-develop.
|
|
72
|
-
"@progress/kendo-angular-popup": "20.0.0-develop.
|
|
73
|
-
"@progress/kendo-angular-toolbar": "20.0.0-develop.
|
|
74
|
-
"@progress/kendo-angular-utils": "20.0.0-develop.
|
|
57
|
+
"@progress/kendo-angular-buttons": "20.0.0-develop.3",
|
|
58
|
+
"@progress/kendo-angular-common": "20.0.0-develop.3",
|
|
59
|
+
"@progress/kendo-angular-dateinputs": "20.0.0-develop.3",
|
|
60
|
+
"@progress/kendo-angular-layout": "20.0.0-develop.3",
|
|
61
|
+
"@progress/kendo-angular-navigation": "20.0.0-develop.3",
|
|
62
|
+
"@progress/kendo-angular-dropdowns": "20.0.0-develop.3",
|
|
63
|
+
"@progress/kendo-angular-excel-export": "20.0.0-develop.3",
|
|
64
|
+
"@progress/kendo-angular-icons": "20.0.0-develop.3",
|
|
65
|
+
"@progress/kendo-angular-inputs": "20.0.0-develop.3",
|
|
66
|
+
"@progress/kendo-angular-conversational-ui": "20.0.0-develop.3",
|
|
67
|
+
"@progress/kendo-angular-intl": "20.0.0-develop.3",
|
|
68
|
+
"@progress/kendo-angular-l10n": "20.0.0-develop.3",
|
|
69
|
+
"@progress/kendo-angular-label": "20.0.0-develop.3",
|
|
70
|
+
"@progress/kendo-angular-pager": "20.0.0-develop.3",
|
|
71
|
+
"@progress/kendo-angular-pdf-export": "20.0.0-develop.3",
|
|
72
|
+
"@progress/kendo-angular-popup": "20.0.0-develop.3",
|
|
73
|
+
"@progress/kendo-angular-toolbar": "20.0.0-develop.3",
|
|
74
|
+
"@progress/kendo-angular-utils": "20.0.0-develop.3",
|
|
75
75
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"tslib": "^2.3.1",
|
|
79
|
-
"@progress/kendo-angular-schematics": "20.0.0-develop.
|
|
79
|
+
"@progress/kendo-angular-schematics": "20.0.0-develop.3",
|
|
80
80
|
"@progress/kendo-common": "^1.0.1",
|
|
81
81
|
"@progress/kendo-file-saver": "^1.0.0"
|
|
82
82
|
},
|
|
@@ -8,7 +8,7 @@ import { HttpClient } from '@angular/common/http';
|
|
|
8
8
|
import { ContextService } from './../../../../common/provider.service';
|
|
9
9
|
import { ColumnInfoService } from './../../../../common/column-info.service';
|
|
10
10
|
import { AIAssistantToolbarDirective } from './ai-tool.directive';
|
|
11
|
-
import { GridToolbarAIPromptSettings, GridToolbarAIRequestOptions } from './
|
|
11
|
+
import { GridToolbarAIPromptSettings, GridToolbarAIRequestOptions } from './models';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
/**
|
|
14
14
|
* @hidden
|
|
@@ -43,6 +43,7 @@ export declare class AiAssistantComponent implements OnDestroy, AfterViewInit {
|
|
|
43
43
|
private deleteLoadingOutput;
|
|
44
44
|
private unsubscribeCurrentRequest;
|
|
45
45
|
private processArrayResponse;
|
|
46
|
+
private processHighlightResponse;
|
|
46
47
|
private processFilterResponse;
|
|
47
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<AiAssistantComponent, never>;
|
|
48
49
|
static ɵcmp: i0.ɵɵComponentDeclaration<AiAssistantComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
@@ -8,7 +8,7 @@ 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 { GridToolbarAIPromptSettings, GridToolbarAIWindowSettings, GridToolbarAIRequestOptions, GridToolbarAIResponseSuccessEvent, GridToolbarAIResponseErrorEvent, GridToolbarAIPromptRequestEvent, GridToolbarAIOpenEvent } from './
|
|
11
|
+
import { GridToolbarAIPromptSettings, GridToolbarAIWindowSettings, GridToolbarAIRequestOptions, GridToolbarAIResponseSuccessEvent, GridToolbarAIResponseErrorEvent, GridToolbarAIPromptRequestEvent, GridToolbarAIOpenEvent } from './models';
|
|
12
12
|
import { PromptOutput } from '@progress/kendo-angular-conversational-ui';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
/**
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { HttpHeaders, HttpResponse, HttpErrorResponse } from "@angular/common/http";
|
|
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, FilterDescriptor, GroupDescriptor, SortDescriptor } from "@progress/kendo-data-query";
|
|
10
|
+
/**
|
|
11
|
+
* Interface representing all configuration options of the AI Assistant Window.
|
|
12
|
+
*/
|
|
13
|
+
export interface GridToolbarAIWindowSettings extends Omit<WindowSettings, 'content'> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Interface representing all configuration options of the AI Assistant Prompt.
|
|
17
|
+
*/
|
|
18
|
+
export interface GridToolbarAIPromptSettings extends Omit<AIPromptSettings, 'promptCommands'> {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents the data sent in the AI request from the Grid Toolbar AI Assistant.
|
|
22
|
+
*/
|
|
23
|
+
export interface GridToolbarAIRequestData {
|
|
24
|
+
/**
|
|
25
|
+
* The columns of the grid, each represented by its field.
|
|
26
|
+
*/
|
|
27
|
+
columns: Array<{
|
|
28
|
+
field: string;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* The prompt message to be sent to the AI service.
|
|
32
|
+
*/
|
|
33
|
+
promptMessage: string;
|
|
34
|
+
/**
|
|
35
|
+
* The URL of the AI service endpoint.
|
|
36
|
+
*/
|
|
37
|
+
url?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The request options for the AI service, including headers, method, and other configurations.
|
|
40
|
+
*/
|
|
41
|
+
requestOptions: {
|
|
42
|
+
role?: string;
|
|
43
|
+
headers?: HttpHeaders;
|
|
44
|
+
method?: string;
|
|
45
|
+
withCredentials?: boolean;
|
|
46
|
+
body?: any;
|
|
47
|
+
responseType?: 'json' | 'arraybuffer' | 'blob' | 'text';
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Represents a composite highlight descriptor for a grid.
|
|
53
|
+
* It contains a map of cell identifiers to their highlight status,
|
|
54
|
+
* an array of filter descriptors, and the logical operator used to combine the filters.
|
|
55
|
+
*/
|
|
56
|
+
export interface CompositeHighlightDescriptor {
|
|
57
|
+
/**
|
|
58
|
+
* A map of cell identifiers to a boolean indicating whether the cell should be highlighted.
|
|
59
|
+
*/
|
|
60
|
+
cells: {
|
|
61
|
+
[key: string]: boolean;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* An array of filter descriptors representing the filters applied to the grid.
|
|
65
|
+
*/
|
|
66
|
+
filters: FilterDescriptor[];
|
|
67
|
+
/**
|
|
68
|
+
* The logical operator ('and' | 'or') used to combine the filters.
|
|
69
|
+
*/
|
|
70
|
+
logic: 'and' | 'or';
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Represents the response from the AI request in the Grid Toolbar AI Assistant.
|
|
74
|
+
*/
|
|
75
|
+
export interface GridToolbarAIRequestResponse {
|
|
76
|
+
/**
|
|
77
|
+
* The prompt outputs from the AI service.
|
|
78
|
+
*/
|
|
79
|
+
messages: string[];
|
|
80
|
+
/**
|
|
81
|
+
* The sort descriptors applied to the grid.
|
|
82
|
+
*/
|
|
83
|
+
sort?: SortDescriptor[];
|
|
84
|
+
/**
|
|
85
|
+
* The filter descriptors applied to the grid.
|
|
86
|
+
*/
|
|
87
|
+
filter?: CompositeFilterDescriptor;
|
|
88
|
+
/**
|
|
89
|
+
* The group descriptors applied to the grid.
|
|
90
|
+
*/
|
|
91
|
+
group?: GroupDescriptor[];
|
|
92
|
+
/**
|
|
93
|
+
* The highlight descriptors to be applied to the grid.
|
|
94
|
+
*/
|
|
95
|
+
highlight?: CompositeHighlightDescriptor[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Configuration options for the HTTP request.
|
|
99
|
+
*/
|
|
100
|
+
export interface GridToolbarAIRequestOptions {
|
|
101
|
+
/**
|
|
102
|
+
* HTTP headers to include with the request.
|
|
103
|
+
*/
|
|
104
|
+
headers?: HttpHeaders;
|
|
105
|
+
/**
|
|
106
|
+
* The role of the user making the request, e.g., 'user', 'assistant'.
|
|
107
|
+
* @default 'user'
|
|
108
|
+
*/
|
|
109
|
+
role?: string;
|
|
110
|
+
/**
|
|
111
|
+
* HTTP method to use for the request.
|
|
112
|
+
* @default 'POST'
|
|
113
|
+
*/
|
|
114
|
+
method?: string;
|
|
115
|
+
/**
|
|
116
|
+
* Whether to include credentials (cookies, authorization headers) with the request.
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
withCredentials?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* The expected response type.
|
|
122
|
+
* @default 'json'
|
|
123
|
+
*/
|
|
124
|
+
responseType?: 'json' | 'arraybuffer' | 'blob' | 'text';
|
|
125
|
+
/**
|
|
126
|
+
* The body of the request.
|
|
127
|
+
*/
|
|
128
|
+
body?: any;
|
|
129
|
+
/**
|
|
130
|
+
* Additional custom options that will be spread into the request configuration.
|
|
131
|
+
*/
|
|
132
|
+
[key: string]: any;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* @hidden
|
|
136
|
+
*/
|
|
137
|
+
export declare const DEFAULT_AI_REQUEST_OPTIONS: GridToolbarAIRequestOptions;
|
|
138
|
+
/**
|
|
139
|
+
* Represents the event data when the AI Assistant request completes successfully.
|
|
140
|
+
*/
|
|
141
|
+
export declare class GridToolbarAIResponseSuccessEvent extends PreventableEvent {
|
|
142
|
+
/**
|
|
143
|
+
* The HTTP response from the AI service.
|
|
144
|
+
*/
|
|
145
|
+
response: HttpResponse<GridToolbarAIRequestResponse>;
|
|
146
|
+
constructor(response: HttpResponse<GridToolbarAIRequestResponse>);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Represents the event data when the AI Assistant request completes with an error.
|
|
150
|
+
*/
|
|
151
|
+
export declare class GridToolbarAIResponseErrorEvent extends PreventableEvent {
|
|
152
|
+
/**
|
|
153
|
+
* The HTTP error response from the AI service.
|
|
154
|
+
*/
|
|
155
|
+
error: HttpErrorResponse;
|
|
156
|
+
constructor(error: HttpErrorResponse);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Represents the event data when the AI Assistant request is initiated.
|
|
160
|
+
*/
|
|
161
|
+
export interface GridToolbarAIPromptRequestEvent {
|
|
162
|
+
requestData: GridToolbarAIRequestData;
|
|
163
|
+
isRetry: boolean;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Represents the event data when the AI Assistant window is opened.
|
|
167
|
+
*/
|
|
168
|
+
export interface GridToolbarAIOpenEvent {
|
|
169
|
+
aiWindow: WindowComponent;
|
|
170
|
+
aiPrompt: AIPromptComponent;
|
|
171
|
+
}
|
|
@@ -2,130 +2,26 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { WindowComponent, WindowSettings } from "@progress/kendo-angular-dialog";
|
|
9
|
-
import { CompositeFilterDescriptor, FilterDescriptor, GroupDescriptor, SortDescriptor } from "@progress/kendo-data-query";
|
|
10
|
-
/**
|
|
11
|
-
* Interface representing all configuration options of the AI Assistant Window.
|
|
12
|
-
*/
|
|
13
|
-
export interface GridToolbarAIWindowSettings extends Omit<WindowSettings, 'content'> {
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Interface representing all configuration options of the AI Assistant Prompt.
|
|
17
|
-
*/
|
|
18
|
-
export interface GridToolbarAIPromptSettings extends Omit<AIPromptSettings, 'promptCommands'> {
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Represents the data sent in the AI request from the Grid Toolbar AI Assistant.
|
|
22
|
-
*/
|
|
23
|
-
export interface GridToolbarAIRequestData {
|
|
24
|
-
columns: Array<{
|
|
25
|
-
field: string;
|
|
26
|
-
title: string;
|
|
27
|
-
}>;
|
|
28
|
-
promptMessage: string;
|
|
29
|
-
url?: string;
|
|
30
|
-
requestOptions: {
|
|
31
|
-
role?: string;
|
|
32
|
-
headers?: HttpHeaders;
|
|
33
|
-
method?: string;
|
|
34
|
-
withCredentials?: boolean;
|
|
35
|
-
body?: any;
|
|
36
|
-
responseType?: 'json' | 'arraybuffer' | 'blob' | 'text';
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Represents the response from the AI request in the Grid Toolbar AI Assistant.
|
|
42
|
-
*/
|
|
43
|
-
export interface GridToolbarAIRequestResponse {
|
|
44
|
-
messages: string[];
|
|
45
|
-
sort?: SortDescriptor[];
|
|
46
|
-
filter?: CompositeFilterDescriptor;
|
|
47
|
-
group?: GroupDescriptor[];
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Configuration options for the HTTP request.
|
|
51
|
-
*/
|
|
52
|
-
export interface GridToolbarAIRequestOptions {
|
|
53
|
-
/**
|
|
54
|
-
* HTTP headers to include with the request.
|
|
55
|
-
*/
|
|
56
|
-
headers?: HttpHeaders;
|
|
57
|
-
/**
|
|
58
|
-
* The role of the user making the request, e.g., 'user', 'assistant'.
|
|
59
|
-
* @default 'user'
|
|
60
|
-
*/
|
|
61
|
-
role?: string;
|
|
62
|
-
/**
|
|
63
|
-
* HTTP method to use for the request.
|
|
64
|
-
* @default 'POST'
|
|
65
|
-
*/
|
|
66
|
-
method?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Whether to include credentials (cookies, authorization headers) with the request.
|
|
69
|
-
* @default false
|
|
70
|
-
*/
|
|
71
|
-
withCredentials?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* The expected response type.
|
|
74
|
-
* @default 'json'
|
|
75
|
-
*/
|
|
76
|
-
responseType?: 'json' | 'arraybuffer' | 'blob' | 'text';
|
|
77
|
-
/**
|
|
78
|
-
* The body of the request.
|
|
79
|
-
*/
|
|
80
|
-
body?: any;
|
|
81
|
-
/**
|
|
82
|
-
* Additional custom options that will be spread into the request configuration.
|
|
83
|
-
*/
|
|
84
|
-
[key: string]: any;
|
|
85
|
-
}
|
|
5
|
+
import { CompositeFilterDescriptor, FilterDescriptor } from "@progress/kendo-data-query";
|
|
6
|
+
import { HighlightItem } from "../../../../highlight/highlight-item";
|
|
7
|
+
import { CompositeHighlightDescriptor } from "./models";
|
|
86
8
|
/**
|
|
87
9
|
* @hidden
|
|
10
|
+
* Converts date strings in a filter to Date objects.
|
|
88
11
|
*/
|
|
89
|
-
export declare const
|
|
12
|
+
export declare const convertDateStringsInFilter: (filter: CompositeFilterDescriptor | FilterDescriptor) => any;
|
|
90
13
|
/**
|
|
91
14
|
* @hidden
|
|
92
15
|
*/
|
|
93
|
-
export declare const
|
|
16
|
+
export declare const isDateOperator: (operator: string) => boolean;
|
|
94
17
|
/**
|
|
95
18
|
* @hidden
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
*
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
response: HttpResponse<GridToolbarAIRequestResponse>;
|
|
106
|
-
constructor(response: HttpResponse<GridToolbarAIRequestResponse>);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Represents the event data when the AI Assistant request completes with an error.
|
|
110
|
-
*/
|
|
111
|
-
export declare class GridToolbarAIResponseErrorEvent extends PreventableEvent {
|
|
112
|
-
/**
|
|
113
|
-
* The HTTP error response from the AI service.
|
|
114
|
-
*/
|
|
115
|
-
error: HttpErrorResponse;
|
|
116
|
-
constructor(error: HttpErrorResponse);
|
|
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
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Represents the event data when the AI Assistant window is opened.
|
|
127
|
-
*/
|
|
128
|
-
export interface GridToolbarAIOpenEvent {
|
|
129
|
-
aiWindow: WindowComponent;
|
|
130
|
-
aiPrompt: AIPromptComponent;
|
|
131
|
-
}
|
|
19
|
+
* Highlights items in a grid based on the provided filters and columns.
|
|
20
|
+
* @param data - The data to be highlighted.
|
|
21
|
+
* @param filters - The composite highlight descriptors containing the filters and logic.
|
|
22
|
+
* @param columns - The columns of the grid.
|
|
23
|
+
* @returns An array of HighlightItem objects representing the highlighted items.
|
|
24
|
+
*/
|
|
25
|
+
export declare const highlightBy: (data: any[], filters: CompositeHighlightDescriptor[], columns: {
|
|
26
|
+
field: string;
|
|
27
|
+
}[]) => HighlightItem[];
|
|
@@ -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': '20.0.0-develop.
|
|
8
|
-
'@progress/kendo-angular-navigation': '20.0.0-develop.
|
|
7
|
+
'@progress/kendo-angular-treeview': '20.0.0-develop.3',
|
|
8
|
+
'@progress/kendo-angular-navigation': '20.0.0-develop.3',
|
|
9
9
|
// peer dependency of kendo-angular-inputs
|
|
10
|
-
'@progress/kendo-angular-dialog': '20.0.0-develop.
|
|
10
|
+
'@progress/kendo-angular-dialog': '20.0.0-develop.3',
|
|
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': '20.0.0-develop.
|
|
14
|
+
'@progress/kendo-angular-progressbar': '20.0.0-develop.3'
|
|
15
15
|
} });
|
|
16
16
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
17
17
|
}
|