@progress/kendo-react-grid 14.5.0-develop.1 → 14.5.0-develop.11
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/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +288 -283
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +271 -260
- package/cells/groupcell/GridGroupCellToggle.js +1 -1
- package/cells/groupcell/GridGroupCellToggle.mjs +23 -23
- package/cells/pincell/GridPinDropdownButton.js +1 -1
- package/cells/pincell/GridPinDropdownButton.mjs +14 -14
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +43 -38
- package/contextMenu/GridContextMenu.js +1 -1
- package/contextMenu/GridContextMenu.mjs +44 -44
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/filterCommon.js +1 -1
- package/filterCommon.mjs +40 -40
- package/hooks/useGridAIRequest.d.ts +76 -10
- package/hooks/useGridAIRequest.js +1 -1
- package/hooks/useGridAIRequest.mjs +126 -62
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/index.mjs +45 -44
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +24 -20
- package/toolbar-tools/GridToolbarAIAssistant.d.ts +27 -5
- package/toolbar-tools/GridToolbarAIAssistant.js +2 -2
- package/toolbar-tools/GridToolbarAIAssistant.mjs +11 -10
- package/toolbar-tools/smartbox/SmartBox.js +1 -1
- package/toolbar-tools/smartbox/SmartBox.mjs +91 -90
- package/toolbar-tools/smartbox/hooks/useSmartBoxListData.js +1 -1
- package/toolbar-tools/smartbox/hooks/useSmartBoxListData.mjs +7 -7
- package/toolbar-tools/smartbox/interfaces/SmartBoxTypes.d.ts +12 -4
- package/toolbar-tools/smartbox/listItemRenders.js +1 -1
- package/toolbar-tools/smartbox/listItemRenders.mjs +1 -1
- package/utils/handleAIResponse.d.ts +2 -2
package/filterCommon.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./messages/index.js"),O=require("@progress/kendo-react-intl"),m=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],y={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},a=
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./messages/index.js"),O=require("@progress/kendo-react-intl"),m=[{text:"grid.filterAndLogic",operator:"and"},{text:"grid.filterOrLogic",operator:"or"}],y={text:[{text:"grid.filterContainsOperator",operator:"contains"},{text:"grid.filterNotContainsOperator",operator:"doesnotcontain"},{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterStartsWithOperator",operator:"startswith"},{text:"grid.filterEndsWithOperator",operator:"endswith"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"},{text:"grid.filterIsEmptyOperator",operator:"isempty"},{text:"grid.filterIsNotEmptyOperator",operator:"isnotempty"}],numeric:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterGteOperator",operator:"gte"},{text:"grid.filterGtOperator",operator:"gt"},{text:"grid.filterLteOperator",operator:"lte"},{text:"grid.filterLtOperator",operator:"lt"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],date:[{text:"grid.filterEqOperator",operator:"eq"},{text:"grid.filterNotEqOperator",operator:"neq"},{text:"grid.filterAfterOrEqualOperator",operator:"gte"},{text:"grid.filterAfterOperator",operator:"gt"},{text:"grid.filterBeforeOperator",operator:"lt"},{text:"grid.filterBeforeOrEqualOperator",operator:"lte"},{text:"grid.filterIsNullOperator",operator:"isnull"},{text:"grid.filterIsNotNullOperator",operator:"isnotnull"}],boolean:[{text:"grid.filterEqOperator",operator:"eq"}]},a=e=>e==="isnull"||e==="isnotnull"||e==="isempty"||e==="isnotempty",h=(e,i)=>e.map(t=>({text:i.toLanguageString(t.text,x.messages[t.text]),operator:t.operator})),d="eq",q=[{text:"grid.filterBooleanAll",operator:""},{text:"grid.filterIsTrue",operator:!0},{text:"grid.filterIsFalse",operator:!1}],I={text:!1,numeric:!1,date:!1,boolean:!0},E=(e,i,t)=>{const o=g(t.operators);let r=t.operator;switch(t.filterType){case"numeric":(!r||a(r))&&(r=o);break;case"date":(!r||a(r))&&(r=o);break;case"text":(!r||a(r))&&(r=o);break;default:return}t.onChange({value:e,operator:r,syntheticEvent:i})},g=(e,i)=>i?e[i][0].operator:e[0].operator,v=e=>e||"text",N=(e,i)=>{const t=e.target.value;i({value:t.operator,operator:t.operator===""?"":d,syntheticEvent:e.syntheticEvent})},F=(e,i,t)=>{let o=i;const r=e.target.value;e.target.state.opened&&(a(r.operator)&&(o=null),i===null&&!a(r.operator)&&(o=void 0),t({value:o,operator:r.operator,syntheticEvent:e.syntheticEvent}))},n=(e,i)=>{const t=i||new O.IntlService("en-US");if(e.value){const o=t.parseDate(e.value);o&&(e.value=o)}e.filters&&(e.filters=e.filters.map(o=>{if(o.value){const r=t.parseDate(o.value);r&&(o.value=r)}return o}))},b=(e,i)=>{var o;let t=e;if(t&&Object.keys(t).length===0&&(t=null),t!=null&&t.filters&&Array.isArray(t.filters)){const r=i||{filters:[],logic:"and"},u=r.filters.map(l=>l.field||l.filters[0].field),p=t.filters.every(l=>l.field===(t==null?void 0:t.filters[0]).field),s=p?[{filters:t.filters.map(l=>(n(l),l)),logic:t.logic}]:t.filters.map(l=>{const c=l.filters?l:{logic:e.logic,filters:[l]};return n(c),c}),f=p&&u.includes(s[0].filters[0].field);if(f){const l=r.filters[0];l.filters&&((o=l.filters)==null||o.push(...s[0].filters),l.logic=e.logic)}t={...r,filters:f?r.filters:[...r.filters,...s]}}return t};exports.IsUnaryFilter=a;exports.booleanFilterValues=q;exports.cellBoolDropdownChange=N;exports.cellInputChange=E;exports.cellOperatorChange=F;exports.combineSmartFilters=b;exports.defaultBooleanOperator=d;exports.defaultHideSecondFilter=I;exports.filterLogicList=m;exports.getDefaultOperator=g;exports.getFilterType=v;exports.operatorMap=h;exports.operators=y;exports.parseFilterDates=n;
|
package/filterCommon.mjs
CHANGED
|
@@ -44,97 +44,97 @@ const q = [
|
|
|
44
44
|
{ text: "grid.filterIsNotNullOperator", operator: "isnotnull" }
|
|
45
45
|
],
|
|
46
46
|
boolean: [{ text: "grid.filterEqOperator", operator: "eq" }]
|
|
47
|
-
}, a = (
|
|
48
|
-
text: i.toLanguageString(
|
|
49
|
-
operator:
|
|
47
|
+
}, a = (e) => e === "isnull" || e === "isnotnull" || e === "isempty" || e === "isnotempty", h = (e, i) => e.map((t) => ({
|
|
48
|
+
text: i.toLanguageString(t.text, g[t.text]),
|
|
49
|
+
operator: t.operator
|
|
50
50
|
})), x = "eq", N = [
|
|
51
51
|
{ text: "grid.filterBooleanAll", operator: "" },
|
|
52
52
|
{ text: "grid.filterIsTrue", operator: !0 },
|
|
53
53
|
{ text: "grid.filterIsFalse", operator: !1 }
|
|
54
|
-
],
|
|
54
|
+
], v = {
|
|
55
55
|
text: !1,
|
|
56
56
|
numeric: !1,
|
|
57
57
|
date: !1,
|
|
58
58
|
boolean: !0
|
|
59
|
-
},
|
|
60
|
-
const o = O(
|
|
61
|
-
let r =
|
|
62
|
-
switch (
|
|
59
|
+
}, I = (e, i, t) => {
|
|
60
|
+
const o = O(t.operators);
|
|
61
|
+
let r = t.operator;
|
|
62
|
+
switch (t.filterType) {
|
|
63
63
|
case "numeric":
|
|
64
|
-
(!r || a(r)) && (r = o)
|
|
64
|
+
(!r || a(r)) && (r = o);
|
|
65
65
|
break;
|
|
66
66
|
case "date":
|
|
67
|
-
(!r || a(r)) && (r = o)
|
|
67
|
+
(!r || a(r)) && (r = o);
|
|
68
68
|
break;
|
|
69
69
|
case "text":
|
|
70
|
-
(!r || a(r)) && (r = o)
|
|
70
|
+
(!r || a(r)) && (r = o);
|
|
71
71
|
break;
|
|
72
72
|
default:
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
}, O = (
|
|
77
|
-
const
|
|
75
|
+
t.onChange({ value: e, operator: r, syntheticEvent: i });
|
|
76
|
+
}, O = (e, i) => i ? e[i][0].operator : e[0].operator, F = (e) => e || "text", b = (e, i) => {
|
|
77
|
+
const t = e.target.value;
|
|
78
78
|
i({
|
|
79
|
-
value:
|
|
80
|
-
operator:
|
|
81
|
-
syntheticEvent:
|
|
79
|
+
value: t.operator,
|
|
80
|
+
operator: t.operator === "" ? "" : x,
|
|
81
|
+
syntheticEvent: e.syntheticEvent
|
|
82
82
|
});
|
|
83
|
-
}, A = (
|
|
83
|
+
}, A = (e, i, t) => {
|
|
84
84
|
let o = i;
|
|
85
|
-
const r =
|
|
86
|
-
|
|
87
|
-
}, d = (
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
const o =
|
|
91
|
-
o && (
|
|
85
|
+
const r = e.target.value;
|
|
86
|
+
e.target.state.opened && (a(r.operator) && (o = null), i === null && !a(r.operator) && (o = void 0), t({ value: o, operator: r.operator, syntheticEvent: e.syntheticEvent }));
|
|
87
|
+
}, d = (e, i) => {
|
|
88
|
+
const t = i || new u("en-US");
|
|
89
|
+
if (e.value) {
|
|
90
|
+
const o = t.parseDate(e.value);
|
|
91
|
+
o && (e.value = o);
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
e.filters && (e.filters = e.filters.map(
|
|
94
94
|
(o) => {
|
|
95
95
|
if (o.value) {
|
|
96
|
-
const r =
|
|
96
|
+
const r = t.parseDate(o.value);
|
|
97
97
|
r && (o.value = r);
|
|
98
98
|
}
|
|
99
99
|
return o;
|
|
100
100
|
}
|
|
101
101
|
));
|
|
102
|
-
}, C = (
|
|
102
|
+
}, C = (e, i) => {
|
|
103
103
|
var o;
|
|
104
|
-
let
|
|
105
|
-
if (
|
|
106
|
-
const r = i || { filters: [], logic: "and" }, c = r.filters.map((l) => l.field || l.filters[0].field), n =
|
|
104
|
+
let t = e;
|
|
105
|
+
if (t && Object.keys(t).length === 0 && (t = null), t != null && t.filters && Array.isArray(t.filters)) {
|
|
106
|
+
const r = i || { filters: [], logic: "and" }, c = r.filters.map((l) => l.field || l.filters[0].field), n = t.filters.every((l) => l.field === (t == null ? void 0 : t.filters[0]).field), s = n ? [
|
|
107
107
|
{
|
|
108
|
-
filters:
|
|
109
|
-
logic:
|
|
108
|
+
filters: t.filters.map((l) => (d(l), l)),
|
|
109
|
+
logic: t.logic
|
|
110
110
|
}
|
|
111
|
-
] :
|
|
111
|
+
] : t.filters.map((l) => {
|
|
112
112
|
const f = l.filters ? l : {
|
|
113
|
-
logic:
|
|
113
|
+
logic: e.logic,
|
|
114
114
|
filters: [l]
|
|
115
115
|
};
|
|
116
116
|
return d(f), f;
|
|
117
117
|
}), p = n && c.includes(s[0].filters[0].field);
|
|
118
118
|
if (p) {
|
|
119
119
|
const l = r.filters[0];
|
|
120
|
-
l.filters && ((o = l.filters) == null || o.push(...s[0].filters), l.logic =
|
|
120
|
+
l.filters && ((o = l.filters) == null || o.push(...s[0].filters), l.logic = e.logic);
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
t = {
|
|
123
123
|
...r,
|
|
124
124
|
filters: p ? r.filters : [...r.filters, ...s]
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
return
|
|
127
|
+
return t;
|
|
128
128
|
};
|
|
129
129
|
export {
|
|
130
130
|
a as IsUnaryFilter,
|
|
131
131
|
N as booleanFilterValues,
|
|
132
132
|
b as cellBoolDropdownChange,
|
|
133
|
-
|
|
133
|
+
I as cellInputChange,
|
|
134
134
|
A as cellOperatorChange,
|
|
135
135
|
C as combineSmartFilters,
|
|
136
136
|
x as defaultBooleanOperator,
|
|
137
|
-
|
|
137
|
+
v as defaultHideSecondFilter,
|
|
138
138
|
q as filterLogicList,
|
|
139
139
|
O as getDefaultOperator,
|
|
140
140
|
F as getFilterType,
|
|
@@ -5,9 +5,73 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { AxiosResponse, AxiosRequestConfig } from 'axios';
|
|
9
8
|
import { GridAIState } from '../utils/handleAIResponse.js';
|
|
10
9
|
import { GridHandle } from '../interfaces/index.js';
|
|
10
|
+
interface AxiosLikeResponse<T = unknown> {
|
|
11
|
+
data: T;
|
|
12
|
+
status: number;
|
|
13
|
+
statusText: string;
|
|
14
|
+
headers: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
type AxiosLikeInstance = (url: string, config: GridAIRequestConfig) => Promise<AxiosLikeResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Configuration for an HTTP request made by the Grid AI Assistant.
|
|
19
|
+
* Replaces direct usage of AxiosRequestConfig.
|
|
20
|
+
*/
|
|
21
|
+
export interface GridAIRequestConfig {
|
|
22
|
+
/** HTTP method. */
|
|
23
|
+
method?: string;
|
|
24
|
+
/** Request headers. */
|
|
25
|
+
headers?: Record<string, string>;
|
|
26
|
+
/** Whether to include credentials (cookies) in cross-origin requests. */
|
|
27
|
+
withCredentials?: boolean;
|
|
28
|
+
/** Expected response type. */
|
|
29
|
+
responseType?: 'json' | 'text';
|
|
30
|
+
/** AbortSignal for request cancellation. */
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
/** Additional options passed to the underlying HTTP client. */
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Normalized HTTP response returned by the Grid AI Assistant.
|
|
37
|
+
* Replaces direct usage of AxiosResponse.
|
|
38
|
+
*/
|
|
39
|
+
export interface GridAIResponse<T = unknown> {
|
|
40
|
+
/** Parsed response body. */
|
|
41
|
+
data: T;
|
|
42
|
+
/** HTTP status code. */
|
|
43
|
+
status: number;
|
|
44
|
+
/** HTTP status text. */
|
|
45
|
+
statusText: string;
|
|
46
|
+
/** Response headers. */
|
|
47
|
+
headers: Record<string, string>;
|
|
48
|
+
/** Request configuration. Included for backward compatibility with AxiosResponse. */
|
|
49
|
+
config?: unknown;
|
|
50
|
+
/** The underlying request object. Included for backward compatibility with AxiosResponse. */
|
|
51
|
+
request?: unknown;
|
|
52
|
+
/** Allow additional properties for backward compatibility with AxiosResponse. */
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Optional custom HTTP client that customers can provide
|
|
57
|
+
* to override the default fetch-based transport.
|
|
58
|
+
*/
|
|
59
|
+
export interface GridAIHttpClient {
|
|
60
|
+
/** Execute an HTTP request. */
|
|
61
|
+
request(url: string, config: GridAIRequestConfig): Promise<GridAIResponse>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Creates a GridAIHttpClient backed by a customer-provided axios instance.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* import axios from 'axios';
|
|
69
|
+
* import { createAxiosAIClient } from '@progress/kendo-react-grid';
|
|
70
|
+
*
|
|
71
|
+
* <GridToolbarAIAssistant httpClient={createAxiosAIClient(axios)} />
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function createAxiosAIClient(axiosInstance: AxiosLikeInstance): GridAIHttpClient;
|
|
11
75
|
/**
|
|
12
76
|
* Represents the request data structure for the Grid AI request.
|
|
13
77
|
*/
|
|
@@ -35,13 +99,9 @@ export interface GridAIRequestData {
|
|
|
35
99
|
/**
|
|
36
100
|
* The request configuration options for the HTTP request.
|
|
37
101
|
*/
|
|
38
|
-
requestOptions: {
|
|
102
|
+
requestOptions: GridAIRequestConfig & {
|
|
39
103
|
url?: string;
|
|
40
|
-
|
|
41
|
-
withCredentials?: boolean;
|
|
42
|
-
responseType?: string;
|
|
43
|
-
cancelToken?: any;
|
|
44
|
-
[key: string]: any;
|
|
104
|
+
cancelToken?: unknown;
|
|
45
105
|
};
|
|
46
106
|
}
|
|
47
107
|
/**
|
|
@@ -53,9 +113,14 @@ export interface UseGridAIRequestOptions {
|
|
|
53
113
|
*/
|
|
54
114
|
requestUrl?: string;
|
|
55
115
|
/**
|
|
56
|
-
* Additional
|
|
116
|
+
* Additional HTTP request options.
|
|
117
|
+
*/
|
|
118
|
+
requestOptions?: GridAIRequestConfig;
|
|
119
|
+
/**
|
|
120
|
+
* Optional custom HTTP client.
|
|
121
|
+
* When provided, overrides the built-in fetch-based transport.
|
|
57
122
|
*/
|
|
58
|
-
|
|
123
|
+
httpClient?: GridAIHttpClient;
|
|
59
124
|
/**
|
|
60
125
|
* The role for the AI request. Defaults to 'user'.
|
|
61
126
|
*/
|
|
@@ -83,7 +148,7 @@ export interface UseGridAIRequestOptions {
|
|
|
83
148
|
/**
|
|
84
149
|
* Callback fired when the response is received successfully.
|
|
85
150
|
*/
|
|
86
|
-
onResponseSuccess?: (response:
|
|
151
|
+
onResponseSuccess?: (response: GridAIResponse<any>, promptMessage?: string, isRetry?: boolean) => void;
|
|
87
152
|
/**
|
|
88
153
|
* Callback fired when the response returns an error.
|
|
89
154
|
*/
|
|
@@ -148,3 +213,4 @@ export interface UseGridAIRequestReturn {
|
|
|
148
213
|
* ```
|
|
149
214
|
*/
|
|
150
215
|
export declare function useGridAIRequest(options: UseGridAIRequestOptions): UseGridAIRequestReturn;
|
|
216
|
+
export {};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),U=require("../utils/handleAIResponse.js");function _(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=_(L),N=e=>{e!==void 0&&typeof console!="undefined"&&typeof console.warn=="function"&&console.warn("Grid AI Assistant requestOptions.cancelToken is not supported by the default fetch transport. Use requestOptions.signal or provide a custom httpClient.")},z=(e,t)=>{if(!t||t===e)return e;const o=new AbortController,s=i=>{const d=i.reason;o.signal.aborted||o.abort(d)};return e.aborted&&s(e),t.aborted&&s(t),o.signal.aborted||(e.addEventListener("abort",()=>s(e),{once:!0}),t.addEventListener("abort",()=>s(t),{once:!0})),o.signal},B=e=>{const t={};return e.forEach((o,s)=>{t[s]=o}),t};function F(e){return{request:async(t,o)=>{const s=await e(t,o);return{data:s.data,status:s.status,statusText:s.statusText,headers:s.headers}}}}function J(e){const{requestUrl:t,requestOptions:o,httpClient:s,role:i="user",columns:d=[],gridState:h,gridRef:g,onPromptRequest:b,onResponseSuccess:m,onResponseError:q,onStateChange:C,onMessages:T,onExportPdf:O}=e,[x,f]=a.useState(!1),[S,p]=a.useState(!1),R=a.useRef(null),A=a.useCallback((c,u,l)=>{if(p(!1),f(!1),h&&g){const n=U.handleAIResponse(c,h,g);C&&C(n.state),n.shouldExportPdf&&O&&O(),n.messages.length>0&&T&&T(n.messages,u,l)}m&&m(c,u,l)},[h,g,C,O,T,m]),y=a.useCallback(c=>{p(!1),f(!1),q&&q(c)},[q]),M=a.useCallback((c,u)=>{const l=new AbortController,n={role:i||"user",columns:d||[],headers:{Accept:"*/*","Content-Type":"application/json"},promptMessage:c,requestOptions:{url:t,method:"POST",withCredentials:!1,responseType:"json",signal:l.signal,...o}};if(b&&b(n,u),n.requestOptions.url!==void 0){p(!0),f(!0);const{url:w,cancelToken:I,signal:D,headers:G,...k}=n.requestOptions,j=z(l.signal,D),v={...G,...n.headers};if(w){const E={columns:n.columns,contents:[{text:n.promptMessage}]};s?s.request(w,{...k,cancelToken:I,headers:v,signal:j,data:E}).then(r=>A(r,n.promptMessage,u)).catch(y):(N(I),fetch(w,{method:k.method||"POST",headers:v,credentials:k.withCredentials?"include":"same-origin",body:JSON.stringify(E),signal:j}).then(async r=>{if(!r.ok){const P=new Error(r.statusText);throw P.response={status:r.status,statusText:r.statusText},P}return{data:await r.json(),status:r.status,statusText:r.statusText,headers:B(r.headers)}}).then(r=>A(r,n.promptMessage,u)).catch(y)),R.current=l}}},[i,d,t,o,s,b,A,y]),H=a.useCallback(()=>{R.current&&R.current.abort("Request cancelled by user."),p(!1),f(!1)},[]);return{loading:x,streaming:S,sendRequest:M,cancelRequest:H}}exports.createAxiosAIClient=F;exports.useGridAIRequest=J;
|
|
@@ -5,89 +5,153 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
function
|
|
8
|
+
import * as a from "react";
|
|
9
|
+
import { handleAIResponse as S } from "../utils/handleAIResponse.mjs";
|
|
10
|
+
const B = (t) => {
|
|
11
|
+
t !== void 0 && typeof console != "undefined" && typeof console.warn == "function" && console.warn(
|
|
12
|
+
"Grid AI Assistant requestOptions.cancelToken is not supported by the default fetch transport. Use requestOptions.signal or provide a custom httpClient."
|
|
13
|
+
);
|
|
14
|
+
}, D = (t, s) => {
|
|
15
|
+
if (!s || s === t)
|
|
16
|
+
return t;
|
|
17
|
+
const r = new AbortController(), e = (l) => {
|
|
18
|
+
const i = l.reason;
|
|
19
|
+
r.signal.aborted || r.abort(i);
|
|
20
|
+
};
|
|
21
|
+
return t.aborted && e(t), s.aborted && e(s), r.signal.aborted || (t.addEventListener("abort", () => e(t), { once: !0 }), s.addEventListener("abort", () => e(s), { once: !0 })), r.signal;
|
|
22
|
+
}, F = (t) => {
|
|
23
|
+
const s = {};
|
|
24
|
+
return t.forEach((r, e) => {
|
|
25
|
+
s[e] = r;
|
|
26
|
+
}), s;
|
|
27
|
+
};
|
|
28
|
+
function z(t) {
|
|
29
|
+
return {
|
|
30
|
+
request: async (s, r) => {
|
|
31
|
+
const e = await t(s, r);
|
|
32
|
+
return {
|
|
33
|
+
data: e.data,
|
|
34
|
+
status: e.status,
|
|
35
|
+
statusText: e.statusText,
|
|
36
|
+
headers: e.headers
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function K(t) {
|
|
12
42
|
const {
|
|
13
|
-
requestUrl:
|
|
14
|
-
requestOptions:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
requestUrl: s,
|
|
44
|
+
requestOptions: r,
|
|
45
|
+
httpClient: e,
|
|
46
|
+
role: l = "user",
|
|
47
|
+
columns: i = [],
|
|
48
|
+
gridState: h,
|
|
49
|
+
gridRef: m,
|
|
50
|
+
onPromptRequest: g,
|
|
51
|
+
onResponseSuccess: b,
|
|
52
|
+
onResponseError: q,
|
|
53
|
+
onStateChange: C,
|
|
54
|
+
onMessages: T,
|
|
55
|
+
onExportPdf: R
|
|
56
|
+
} = t, [H, f] = a.useState(!1), [j, p] = a.useState(!1), w = a.useRef(null), A = a.useCallback(
|
|
57
|
+
(c, u, d) => {
|
|
58
|
+
if (p(!1), f(!1), h && m) {
|
|
59
|
+
const o = S(c, h, m);
|
|
60
|
+
C && C(o.state), o.shouldExportPdf && R && R(), o.messages.length > 0 && T && T(o.messages, u, d);
|
|
30
61
|
}
|
|
31
|
-
|
|
62
|
+
b && b(c, u, d);
|
|
32
63
|
},
|
|
33
|
-
[
|
|
34
|
-
),
|
|
35
|
-
(
|
|
36
|
-
|
|
64
|
+
[h, m, C, R, T, b]
|
|
65
|
+
), O = a.useCallback(
|
|
66
|
+
(c) => {
|
|
67
|
+
p(!1), f(!1), q && q(c);
|
|
37
68
|
},
|
|
38
|
-
[
|
|
39
|
-
),
|
|
40
|
-
(
|
|
41
|
-
const
|
|
42
|
-
role:
|
|
43
|
-
columns:
|
|
69
|
+
[q]
|
|
70
|
+
), L = a.useCallback(
|
|
71
|
+
(c, u) => {
|
|
72
|
+
const d = new AbortController(), o = {
|
|
73
|
+
role: l || "user",
|
|
74
|
+
columns: i || [],
|
|
44
75
|
headers: {
|
|
45
76
|
Accept: "*/*",
|
|
46
77
|
"Content-Type": "application/json"
|
|
47
78
|
},
|
|
48
|
-
promptMessage:
|
|
79
|
+
promptMessage: c,
|
|
49
80
|
requestOptions: {
|
|
50
|
-
url:
|
|
81
|
+
url: s,
|
|
51
82
|
method: "POST",
|
|
52
83
|
withCredentials: !1,
|
|
53
84
|
responseType: "json",
|
|
54
|
-
|
|
55
|
-
...
|
|
85
|
+
signal: d.signal,
|
|
86
|
+
...r
|
|
56
87
|
}
|
|
57
88
|
};
|
|
58
|
-
if (
|
|
59
|
-
|
|
60
|
-
const { url:
|
|
61
|
-
|
|
62
|
-
...
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
if (g && g(o, u), o.requestOptions.url !== void 0) {
|
|
90
|
+
p(!0), f(!0);
|
|
91
|
+
const { url: k, cancelToken: E, signal: U, headers: G, ...y } = o.requestOptions, x = D(d.signal, U), v = {
|
|
92
|
+
...G,
|
|
93
|
+
...o.headers
|
|
94
|
+
};
|
|
95
|
+
if (k) {
|
|
96
|
+
const I = {
|
|
97
|
+
columns: o.columns,
|
|
98
|
+
contents: [{ text: o.promptMessage }]
|
|
99
|
+
};
|
|
100
|
+
e ? e.request(k, {
|
|
101
|
+
...y,
|
|
102
|
+
cancelToken: E,
|
|
103
|
+
headers: v,
|
|
104
|
+
signal: x,
|
|
105
|
+
data: I
|
|
106
|
+
}).then(
|
|
107
|
+
(n) => A(n, o.promptMessage, u)
|
|
108
|
+
).catch(O) : (B(E), fetch(k, {
|
|
109
|
+
method: y.method || "POST",
|
|
110
|
+
headers: v,
|
|
111
|
+
credentials: y.withCredentials ? "include" : "same-origin",
|
|
112
|
+
body: JSON.stringify(I),
|
|
113
|
+
signal: x
|
|
114
|
+
}).then(async (n) => {
|
|
115
|
+
if (!n.ok) {
|
|
116
|
+
const P = new Error(n.statusText);
|
|
117
|
+
throw P.response = {
|
|
118
|
+
status: n.status,
|
|
119
|
+
statusText: n.statusText
|
|
120
|
+
}, P;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
data: await n.json(),
|
|
124
|
+
status: n.status,
|
|
125
|
+
statusText: n.statusText,
|
|
126
|
+
headers: F(n.headers)
|
|
127
|
+
};
|
|
128
|
+
}).then(
|
|
129
|
+
(n) => A(n, o.promptMessage, u)
|
|
130
|
+
).catch(O)), w.current = d;
|
|
131
|
+
}
|
|
70
132
|
}
|
|
71
133
|
},
|
|
72
134
|
[
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
135
|
+
l,
|
|
136
|
+
i,
|
|
137
|
+
s,
|
|
138
|
+
r,
|
|
139
|
+
e,
|
|
140
|
+
g,
|
|
141
|
+
A,
|
|
142
|
+
O
|
|
80
143
|
]
|
|
81
|
-
),
|
|
82
|
-
|
|
144
|
+
), M = a.useCallback(() => {
|
|
145
|
+
w.current && w.current.abort("Request cancelled by user."), p(!1), f(!1);
|
|
83
146
|
}, []);
|
|
84
147
|
return {
|
|
85
|
-
loading:
|
|
86
|
-
streaming:
|
|
87
|
-
sendRequest:
|
|
88
|
-
cancelRequest:
|
|
148
|
+
loading: H,
|
|
149
|
+
streaming: j,
|
|
150
|
+
sendRequest: L,
|
|
151
|
+
cancelRequest: M
|
|
89
152
|
};
|
|
90
153
|
}
|
|
91
154
|
export {
|
|
92
|
-
|
|
155
|
+
z as createAxiosAIClient,
|
|
156
|
+
K as useGridAIRequest
|
|
93
157
|
};
|
package/index.d.mts
CHANGED
|
@@ -78,7 +78,7 @@ import { GridColumnState } from './interfaces/GridColumnState';
|
|
|
78
78
|
import { CompositeHighlightDescriptor } from './interfaces/CompositeHighlightDescriptor';
|
|
79
79
|
import { GridHighlightDescriptor } from './interfaces/GridHighlightDescriptor';
|
|
80
80
|
import { handleAIResponse, GridAIState, GridAIResponseResult } from './utils/handleAIResponse.js';
|
|
81
|
-
import { useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn } from './hooks/useGridAIRequest.js';
|
|
81
|
+
import { useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient } from './hooks/useGridAIRequest.js';
|
|
82
82
|
import { GridAIAssistantCommand } from './interfaces/GridAIAssistantCommand';
|
|
83
83
|
import { GridAICommands } from './interfaces/GridAICommands.js';
|
|
84
84
|
export * from './interfaces/events';
|
|
@@ -92,6 +92,6 @@ export * from './GridSearchBox.js';
|
|
|
92
92
|
export * from './GridPdfExportButton.js';
|
|
93
93
|
export * from './GridCsvExportButton.js';
|
|
94
94
|
export * from './toolbar-tools/smartbox/index.js';
|
|
95
|
-
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent };
|
|
95
|
+
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient, GridRowPinChangeEvent };
|
|
96
96
|
export { GridPinCell, GridHeaderPinCell };
|
|
97
97
|
export * from './interfaces/GridStackedLayoutSettings';
|
package/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ import { GridColumnState } from './interfaces/GridColumnState';
|
|
|
78
78
|
import { CompositeHighlightDescriptor } from './interfaces/CompositeHighlightDescriptor';
|
|
79
79
|
import { GridHighlightDescriptor } from './interfaces/GridHighlightDescriptor';
|
|
80
80
|
import { handleAIResponse, GridAIState, GridAIResponseResult } from './utils/handleAIResponse.js';
|
|
81
|
-
import { useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn } from './hooks/useGridAIRequest.js';
|
|
81
|
+
import { useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient } from './hooks/useGridAIRequest.js';
|
|
82
82
|
import { GridAIAssistantCommand } from './interfaces/GridAIAssistantCommand';
|
|
83
83
|
import { GridAICommands } from './interfaces/GridAICommands.js';
|
|
84
84
|
export * from './interfaces/events';
|
|
@@ -92,6 +92,6 @@ export * from './GridSearchBox.js';
|
|
|
92
92
|
export * from './GridPdfExportButton.js';
|
|
93
93
|
export * from './GridCsvExportButton.js';
|
|
94
94
|
export * from './toolbar-tools/smartbox/index.js';
|
|
95
|
-
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridRowPinChangeEvent };
|
|
95
|
+
export { CompositeHighlightDescriptor, Grid, GridHandle, GridHighlightDescriptor, GridProps, GridColumn, GridColumnProps, GridColSpanProps, GridEditDialogProps, GridColumnChildrenProps, GridCellProps, GridColumnType, GridRowReorderEvent, GridDataType, GridRowReorderSettings, GridCell, GridEditCell, GridGroupCell, GridHierarchyCell, GridDetailRow, GridDetailRowProps, GridRow, GridRowProps, GridFilterCell, GridFilterCellProps, GridHeaderCell, GridHeaderCellProps, GridSelectionCell, GridColumnMenuProps, GridReorderDropPosition, GridColumnMenuSort, GridColumnMenuFilter, GridColumnMenuGroup, GridColumnMenuItem, GridColumnMenuItemContent, GridColumnMenuItemGroup, GridColumnMenuFilterUI, GridColumnMenuFilterUIProps, GridColumnMenuFilterCell, GridColumnMenuFilterCellProps, GridColumnMenuCheckboxFilter, GridColumnMenuCheckboxFilterProps, GridColumnMenuColumnsList, GridColumnMenuColumnsListProps, GridColumnMenuColumnsChooser, GridColumnMenuColumnsChooserProps, GridColumnMenuColumnProps, GridColumnState, GridRowType, GridToolbar, GridToolbarProps, GridToolbarAIAssistant, GridToolbarAIAssistantHandle, GridToolbarAIAssistantProps, GridToolbarAIAssistantRequestData, GridAIAssistantCommand, GridAICommands, GridAIPrompt, GridAIPromptProps, GridToolbarSpacer, GridToolbarSpacerProps, GridToolbarSeparator, GridToolbarSeparatorProps, GridToolbarCheckboxFilter, GridToolbarCheckboxFilterProps, GridToolbarColumnsChooser, GridToolbarColumnsChooserProps, GridToolbarFilter, GridToolbarFilterProps, GridToolbarSort, GridToolbarSortProps, GridToolbarGroup, GridToolbarGroupProps, GridNoRecords, GridNoRecordsProps, GridSortSettings, GridPagerSettings, GridGroupableSettings, GridFooterCellProps, GridSelectableMode, GridSelectableSettings, GridFilterOperators, GridFilterOperator, GridColumnMenuWrapper, GridColumnMenuWrapperProps, getSelectedState, setSelectedState, getSelectedStateFromKeyDown, GRID_COL_INDEX_ATTRIBUTE, GRID_ROW_INDEX_ATTRIBUTE, GRID_PREVENT_SELECTION_ELEMENT, GridCommonDragLogic, rootFilterOrDefault, filterGroupByField, isColumnMenuSortActive, isColumnMenuFilterActive, GridColumnMenuFilterProps, cellBoolDropdownChange, cellInputChange, cellOperatorChange, booleanFilterValues, operators, combineSmartFilters, parseFilterDates, GridRowSpannableSettings, handleAIResponse, GridAIState, GridAIResponseResult, GridCSVExportOptions, useGridAIRequest, GridAIRequestData, UseGridAIRequestOptions, UseGridAIRequestReturn, GridAIRequestConfig, GridAIResponse, GridAIHttpClient, createAxiosAIClient, GridRowPinChangeEvent };
|
|
96
96
|
export { GridPinCell, GridHeaderPinCell };
|
|
97
97
|
export * from './interfaces/GridStackedLayoutSettings';
|
package/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("./Grid.js"),s=require("./GridColumn.js"),C=require("./columnMenu/GridColumnMenuWrapper.js"),c=require("./columnMenu/GridColumnMenuGroup.js"),l=require("./columnMenu/GridColumnMenuSort.js"),o=require("./columnMenu/GridColumnMenuFilter.js"),m=require("./columnMenu/GridColumnMenuFilterUI.js"),p=require("./columnMenu/GridColumnMenuFilterCell.js"),I=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),M=require("./columnMenu/GridColumnMenuColumnsList.js"),q=require("./columnMenu/GridColumnMenuColumnsChooser.js"),g=require("./cells/datacell/GridCell.js"),T=require("./cells/editcell/GridEditCell.js"),S=require("./cells/groupcell/GridGroupCell.js"),b=require("./cells/hierarchycell/GridHierarchyCell.js"),F=require("./cells/GridFilterCell.js"),P=require("./header/GridHeaderCell.js"),x=require("./cells/selectioncell/GridSelectionCell.js"),A=require("./cells/pincell/GridPinCell.js"),E=require("./header/client/GridHeaderPinCell.js"),R=require("./rows/GridDetailRow.js"),h=require("./rows/GridRow.js"),D=require("./GridToolbar.js"),B=require("./toolbar-tools/GridToolbarSpacer.js"),_=require("./toolbar-tools/GridToolbarSeparator.js"),N=require("./toolbar-tools/GridToolbarCheckboxFilter.js"),f=require("./toolbar-tools/GridToolbarColumnsChooser.js"),L=require("./toolbar-tools/GridToolbarFilter.js"),O=require("./toolbar-tools/GridToolbarSort.js"),y=require("./toolbar-tools/GridToolbarGroup.js"),v=require("./toolbar-tools/GridToolbarAIAssistant.js"),w=require("./toolbar-tools/ai-tool/GridAIPrompt.js"),H=require("./components/noRecords/GridNoRecords.js"),k=require("./columnMenu/GridColumnMenuItem.js"),U=require("./columnMenu/GridColumnMenuItemContent.js"),W=require("./columnMenu/GridColumnMenuItemGroup.js"),i=require("./constants/index.js"),t=require("@progress/kendo-react-data-tools"),j=require("./drag/CommonDragLogic.js"),e=require("./filterCommon.js"),V=require("./utils/handleAIResponse.js"),u=require("./hooks/useGridAIRequest.js"),X=require("./interfaces/GridAICommands.js"),r=require("./messages/index.js"),n=require("./StatusBar.js"),d=require("./contextMenu/GridContextMenu.js"),a=require("./contextMenu/enums.js"),K=require("./GridSearchBox.js"),$=require("./GridPdfExportButton.js"),z=require("./GridCsvExportButton.js"),J=require("./toolbar-tools/smartbox/SmartBox.js");exports.Grid=G.Grid;exports.GridColumn=s.GridColumn;exports.GridColumnMenuWrapper=C.GridColumnMenuWrapper;exports.GridColumnMenuGroup=c.GridColumnMenuGroup;exports.GridColumnMenuSort=l.GridColumnMenuSort;exports.isColumnMenuSortActive=l.isColumnMenuSortActive;exports.GridColumnMenuFilter=o.GridColumnMenuFilter;exports.filterGroupByField=o.filterGroupByField;exports.isColumnMenuFilterActive=o.isColumnMenuFilterActive;exports.rootFilterOrDefault=o.rootFilterOrDefault;exports.GridColumnMenuFilterUI=m.GridColumnMenuFilterUI;exports.GridColumnMenuFilterCell=p.GridColumnMenuFilterCell;exports.GridColumnMenuCheckboxFilter=I.GridColumnMenuCheckboxFilter;exports.GridColumnMenuColumnsList=M.GridColumnMenuColumnsList;exports.GridColumnMenuColumnsChooser=q.GridColumnMenuColumnsChooser;exports.GridCell=g.GridCell;exports.GridEditCell=T.GridEditCell;exports.GridGroupCell=S.GridGroupCell;exports.GridHierarchyCell=b.GridHierarchyCell;exports.GridFilterCell=F.GridFilterCell;exports.GridHeaderCell=P.GridHeaderCell;exports.GridSelectionCell=x.GridSelectionCell;exports.GridPinCell=A.GridPinCell;exports.GridHeaderPinCell=E.GridHeaderPinCell;exports.GridDetailRow=R.GridDetailRow;exports.GridRow=h.GridRow;exports.GridToolbar=D.GridToolbar;exports.GridToolbarSpacer=B.GridToolbarSpacer;exports.GridToolbarSeparator=_.GridToolbarSeparator;exports.GridToolbarCheckboxFilter=N.GridToolbarCheckboxFilter;exports.GridToolbarColumnsChooser=f.GridToolbarColumnsChooser;exports.GridToolbarFilter=L.GridToolbarFilter;exports.GridToolbarSort=O.GridToolbarSort;exports.GridToolbarGroup=y.GridToolbarGroup;exports.GridToolbarAIAssistant=v.GridToolbarAIAssistant;exports.GridAIPrompt=w.GridAIPrompt;exports.GridNoRecords=H.GridNoRecords;exports.GridColumnMenuItem=k.GridColumnMenuItem;exports.GridColumnMenuItemContent=U.GridColumnMenuItemContent;exports.GridColumnMenuItemGroup=W.GridColumnMenuItemGroup;exports.GRID_COL_INDEX_ATTRIBUTE=i.GRID_COL_INDEX_ATTRIBUTE;exports.GRID_PREVENT_SELECTION_ELEMENT=i.GRID_PREVENT_SELECTION_ELEMENT;exports.GRID_ROW_INDEX_ATTRIBUTE=i.GRID_ROW_INDEX_ATTRIBUTE;Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>t.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>t.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>t.setSelectedState});exports.GridCommonDragLogic=j.CommonDragLogic;exports.booleanFilterValues=e.booleanFilterValues;exports.cellBoolDropdownChange=e.cellBoolDropdownChange;exports.cellInputChange=e.cellInputChange;exports.cellOperatorChange=e.cellOperatorChange;exports.combineSmartFilters=e.combineSmartFilters;exports.operators=e.operators;exports.parseFilterDates=e.parseFilterDates;exports.handleAIResponse=V.handleAIResponse;exports.createAxiosAIClient=u.createAxiosAIClient;exports.useGridAIRequest=u.useGridAIRequest;exports.GridAICommands=X.GridAICommands;exports.gridMessages=r.messages;exports.pagerFirstPage=r.pagerFirstPage;exports.pagerInfo=r.pagerInfo;exports.pagerItemPerPage=r.pagerItemPerPage;exports.pagerLastPage=r.pagerLastPage;exports.pagerNextPage=r.pagerNextPage;exports.pagerPreviousPage=r.pagerPreviousPage;exports.StatusBar=n.StatusBar;exports.getStatusData=n.getStatusData;exports.leafColumns=n.leafColumns;exports.GridContextMenu=d.GridContextMenu;exports.contextMenuItemsMap=d.contextMenuItemsMap;exports.GridContextMenuAnchorPart=a.GridContextMenuAnchorPart;exports.GridContextMenuItemNames=a.GridContextMenuItemNames;exports.GridSearchBox=K.GridSearchBox;exports.GridPdfExportButton=$.GridPdfExportButton;exports.GridCsvExportButton=z.GridCsvExportButton;exports.SmartBox=J.SmartBox;
|