Skip to content

Commit 8e7108f

Browse files
r-farkhutdinovRuslan Farkhutdinov
andauthored
AIIntegration: Update module export to match types (T1324402) (#32976)
Co-authored-by: Ruslan Farkhutdinov <ruslan.farkhutdinov@devexpress.com>
1 parent 41f6aa5 commit 8e7108f

9 files changed

Lines changed: 34 additions & 33 deletions

File tree

apps/demos/Demos/DataGrid/AIColumns/jQuery/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $(() => {
4646
});
4747
}
4848

49-
const aiIntegration = new DevExpress.aiIntegration({
49+
const aiIntegration = new DevExpress.aiIntegration.AIIntegration({
5050
sendRequest({ prompt }) {
5151
const isValidRequest = JSON.stringify(prompt.user).length < 5000;
5252
if (!isValidRequest) {

apps/demos/Demos/Form/SmartPaste/jQuery/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $(() => {
2121
return result;
2222
}
2323

24-
const aiIntegration = new DevExpress.aiIntegration({
24+
const aiIntegration = new DevExpress.aiIntegration.AIIntegration({
2525
sendRequest({ prompt }) {
2626
const controller = new AbortController();
2727
const signal = controller.signal;

apps/demos/Demos/HtmlEditor/AITextEditing/jQuery/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $(() => {
2121
return result;
2222
}
2323

24-
const aiIntegration = new DevExpress.aiIntegration({
24+
const aiIntegration = new DevExpress.aiIntegration.AIIntegration({
2525
sendRequest({ prompt }) {
2626
const controller = new AbortController();
2727
const signal = controller.signal;

apps/demos/Demos/TreeList/AIColumns/jQuery/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $(() => {
4646
});
4747
}
4848

49-
const aiIntegration = new DevExpress.aiIntegration({
49+
const aiIntegration = new DevExpress.aiIntegration.AIIntegration({
5050
sendRequest({ prompt }) {
5151
const isValidRequest = JSON.stringify(prompt.user).length < 5000;
5252
if (!isValidRequest) {

e2e/testcafe-devextreme/tests/common/treeList/aiColumn/functional.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ test('Get result from AI and display it in the AI column', async (t) => {
4444
name: 'AI Column',
4545
ai: {
4646
prompt: 'first AI column',
47-
// eslint-disable-next-line new-cap
48-
aiIntegration: new (window as any).DevExpress.aiIntegration({
47+
48+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
4949
sendRequest(prompt) {
5050
return {
5151
promise: new Promise<string>((resolve) => {
@@ -102,8 +102,8 @@ test('Get result from AI and display it in two AI columns', async (t) => {
102102
name: 'AI Column',
103103
ai: {
104104
prompt: 'first AI column',
105-
// eslint-disable-next-line new-cap
106-
aiIntegration: new (window as any).DevExpress.aiIntegration({
105+
106+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
107107
sendRequest(prompt) {
108108
return {
109109
promise: new Promise<string>((resolve) => {
@@ -127,8 +127,8 @@ test('Get result from AI and display it in two AI columns', async (t) => {
127127
name: 'AI Column2',
128128
ai: {
129129
prompt: 'second AI column',
130-
// eslint-disable-next-line new-cap
131-
aiIntegration: new (window as any).DevExpress.aiIntegration({
130+
131+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
132132
sendRequest(prompt) {
133133
return {
134134
promise: new Promise<string>((resolve) => {
@@ -195,8 +195,8 @@ test('Regenerate the AI request from DropDownButton menu', async (t) => {
195195
ai: {
196196
mode: 'manual',
197197
prompt: 'first AI column',
198-
// eslint-disable-next-line new-cap
199-
aiIntegration: new (window as any).DevExpress.aiIntegration({
198+
199+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
200200
sendRequest(prompt) {
201201
return {
202202
promise: new Promise<string>((resolve) => {
@@ -266,8 +266,8 @@ test('Regenerate the AI request from Prompt Editor', async (t) => {
266266
ai: {
267267
mode: 'manual',
268268
prompt: 'first AI column',
269-
// eslint-disable-next-line new-cap
270-
aiIntegration: new (window as any).DevExpress.aiIntegration({
269+
270+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
271271
sendRequest(prompt) {
272272
return {
273273
promise: new Promise<string>((resolve) => {
@@ -334,8 +334,8 @@ test('Clear Data from AI column by DropDownButton menu', async (t) => {
334334
name: 'AI Column',
335335
ai: {
336336
prompt: 'first AI column',
337-
// eslint-disable-next-line new-cap
338-
aiIntegration: new (window as any).DevExpress.aiIntegration({
337+
338+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
339339
sendRequest(prompt) {
340340
return {
341341
promise: new Promise<string>((resolve) => {
@@ -408,8 +408,8 @@ test('Abort the AI request from Prompt Editor', async (t) => {
408408
ai: {
409409
prompt: 'first AI column',
410410
mode: 'manual',
411-
// eslint-disable-next-line new-cap
412-
aiIntegration: new (window as any).DevExpress.aiIntegration({
411+
412+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
413413
sendRequest(prompt) {
414414
return {
415415
promise: new Promise<string>((resolve) => {
@@ -482,8 +482,8 @@ test('Change the prompt in the AI Prompt Editor', async (t) => {
482482
name: 'AI Column',
483483
ai: {
484484
prompt: 'first AI column',
485-
// eslint-disable-next-line new-cap
486-
aiIntegration: new (window as any).DevExpress.aiIntegration({
485+
486+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
487487
sendRequest(prompt) {
488488
return {
489489
promise: new Promise<string>((resolve) => {

e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/adaptivity.functional.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ test('The AI column should have value in the adaptive detail row', async (t) =>
199199
ai: {
200200
prompt: 'Send me nothing',
201201
// eslint-disable-next-line new-cap
202-
aiIntegration: new (window as any).DevExpress.aiIntegration({
202+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
203203
sendRequest({ data }) {
204204
return {
205205
promise: new Promise<string>((resolve) => {

e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/functional.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ test('Get result from AI and display it in the AI column', async (t) => {
9393
ai: {
9494
prompt: 'first AI column',
9595
// eslint-disable-next-line new-cap
96-
aiIntegration: new (window as any).DevExpress.aiIntegration({
96+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
9797
sendRequest(prompt) {
9898
return {
9999
promise: new Promise<string>((resolve) => {
@@ -143,7 +143,7 @@ test('Get result from AI and display it in two AI columns', async (t) => {
143143
ai: {
144144
prompt: 'first AI column',
145145
// eslint-disable-next-line new-cap
146-
aiIntegration: new (window as any).DevExpress.aiIntegration({
146+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
147147
sendRequest(prompt) {
148148
return {
149149
promise: new Promise<string>((resolve) => {
@@ -168,7 +168,7 @@ test('Get result from AI and display it in two AI columns', async (t) => {
168168
ai: {
169169
prompt: 'second AI column',
170170
// eslint-disable-next-line new-cap
171-
aiIntegration: new (window as any).DevExpress.aiIntegration({
171+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
172172
sendRequest(prompt) {
173173
return {
174174
promise: new Promise<string>((resolve) => {
@@ -228,7 +228,7 @@ test('Regenerate the AI request from DropDownButton menu', async (t) => {
228228
mode: 'manual',
229229
prompt: 'first AI column',
230230
// eslint-disable-next-line new-cap
231-
aiIntegration: new (window as any).DevExpress.aiIntegration({
231+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
232232
sendRequest(prompt) {
233233
return {
234234
promise: new Promise<string>((resolve) => {
@@ -291,7 +291,7 @@ test('Regenerate the AI request from Prompt Editor', async (t) => {
291291
mode: 'manual',
292292
prompt: 'first AI column',
293293
// eslint-disable-next-line new-cap
294-
aiIntegration: new (window as any).DevExpress.aiIntegration({
294+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
295295
sendRequest(prompt) {
296296
return {
297297
promise: new Promise<string>((resolve) => {
@@ -351,7 +351,7 @@ test('Clear Data from AI column by DropDownButton menu', async (t) => {
351351
ai: {
352352
prompt: 'first AI column',
353353
// eslint-disable-next-line new-cap
354-
aiIntegration: new (window as any).DevExpress.aiIntegration({
354+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
355355
sendRequest(prompt) {
356356
return {
357357
promise: new Promise<string>((resolve) => {
@@ -417,7 +417,7 @@ test('Abort the AI request from Prompt Editor', async (t) => {
417417
prompt: 'first AI column',
418418
mode: 'manual',
419419
// eslint-disable-next-line new-cap
420-
aiIntegration: new (window as any).DevExpress.aiIntegration({
420+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
421421
sendRequest(prompt) {
422422
return {
423423
promise: new Promise<string>((resolve) => {
@@ -483,7 +483,7 @@ test('Change the prompt in the AI Prompt Editor', async (t) => {
483483
ai: {
484484
prompt: 'first AI column',
485485
// eslint-disable-next-line new-cap
486-
aiIntegration: new (window as any).DevExpress.aiIntegration({
486+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
487487
sendRequest(prompt) {
488488
return {
489489
promise: new Promise<string>((resolve) => {
@@ -536,7 +536,7 @@ test('The scroll position should not reset when the ai.prompt changes at runtime
536536
name: 'aiColumn',
537537
ai: {
538538
// eslint-disable-next-line new-cap
539-
aiIntegration: new (window as any).DevExpress.aiIntegration({
539+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
540540
sendRequest() {
541541
return {
542542
promise: new Promise<string>((resolve) => {

e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho
119119
ai: {
120120
prompt: 'Initial prompt',
121121
// eslint-disable-next-line new-cap
122-
aiIntegration: new (window as any).DevExpress.aiIntegration({
122+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
123123
sendRequest(prompt) {
124124
return {
125125
promise: new Promise<string>((resolve) => {
@@ -222,7 +222,7 @@ test('DataGrid should send an AI request for rendered rows after scrolling with
222222
ai: {
223223
prompt: 'Initial prompt',
224224
// eslint-disable-next-line new-cap
225-
aiIntegration: new (window as any).DevExpress.aiIntegration({
225+
aiIntegration: new (window as any).DevExpress.aiIntegration.AIIntegration({
226226
sendRequest(prompt) {
227227
return {
228228
promise: new Promise<string>((resolve) => {

packages/devextreme/build/bundle-templates/dx.ai-integration.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
/* eslint-disable import/no-commonjs */
33
import { AIIntegration } from '../common/ai-integration';
44

5-
module.exports = DevExpress.aiIntegration = AIIntegration;
5+
DevExpress.aiIntegration = {};
6+
module.exports = DevExpress.aiIntegration.AIIntegration = AIIntegration;

0 commit comments

Comments
 (0)