Skip to content

Commit f51b614

Browse files
authored
HtmlEditor: Add aiIntegration option in .d.ts
1 parent b88b186 commit f51b614

File tree

5 files changed

+36
-1
lines changed

5 files changed

+36
-1
lines changed

packages/devextreme-angular/src/ui/html-editor/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,19 @@ export class DxHtmlEditorComponent extends DxComponent implements OnDestroy, Con
126126
}
127127

128128

129+
/**
130+
* [descr:dxHtmlEditorOptions.aiIntegration]
131+
132+
*/
133+
@Input()
134+
get aiIntegration(): Record<string, any> {
135+
return this._getOption('aiIntegration');
136+
}
137+
set aiIntegration(value: Record<string, any>) {
138+
this._setOption('aiIntegration', value);
139+
}
140+
141+
129142
/**
130143
* [descr:dxHtmlEditorOptions.allowSoftLineBreak]
131144
@@ -611,6 +624,13 @@ export class DxHtmlEditorComponent extends DxComponent implements OnDestroy, Con
611624
*/
612625
@Output() activeStateEnabledChange: EventEmitter<boolean>;
613626

627+
/**
628+
629+
* This member supports the internal infrastructure and is not intended to be used directly from your code.
630+
631+
*/
632+
@Output() aiIntegrationChange: EventEmitter<Record<string, any>>;
633+
614634
/**
615635
616636
* This member supports the internal infrastructure and is not intended to be used directly from your code.
@@ -887,6 +907,7 @@ export class DxHtmlEditorComponent extends DxComponent implements OnDestroy, Con
887907
{ subscribe: 'valueChanged', emit: 'onValueChanged' },
888908
{ emit: 'accessKeyChange' },
889909
{ emit: 'activeStateEnabledChange' },
910+
{ emit: 'aiIntegrationChange' },
890911
{ emit: 'allowSoftLineBreakChange' },
891912
{ emit: 'converterChange' },
892913
{ emit: 'customizeModulesChange' },

packages/devextreme-vue/src/html-editor.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import { prepareConfigurationComponentConfig } from "./core/index";
7070
type AccessibleOptions = Pick<Properties,
7171
"accessKey" |
7272
"activeStateEnabled" |
73+
"aiIntegration" |
7374
"allowSoftLineBreak" |
7475
"converter" |
7576
"customizeModules" |
@@ -119,6 +120,7 @@ const componentConfig = {
119120
props: {
120121
accessKey: String,
121122
activeStateEnabled: Boolean,
123+
aiIntegration: Object as PropType<Record<string, any>>,
122124
allowSoftLineBreak: Boolean,
123125
converter: Object as PropType<Converter | Record<string, any>>,
124126
customizeModules: Function as PropType<((config: any) => void)>,
@@ -164,6 +166,7 @@ const componentConfig = {
164166
"update:hoveredElement": null,
165167
"update:accessKey": null,
166168
"update:activeStateEnabled": null,
169+
"update:aiIntegration": null,
167170
"update:allowSoftLineBreak": null,
168171
"update:converter": null,
169172
"update:customizeModules": null,

packages/devextreme/js/__internal/ui/html_editor/m_html_editor.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ class HtmlEditor extends Editor<Properties> {
558558
}
559559

560560
_renderAIDialog(): void {
561-
// @ts-expect-error ts-error
562561
const { aiIntegration } = this.option();
563562

564563
if (!aiIntegration) {

packages/devextreme/js/ui/html_editor.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { AIIntegration } from '../common/ai-integration';
12
import { DataSourceLike } from '../data/data_source';
23
import {
34
UserDefinedElement,
@@ -278,6 +279,13 @@ export type Converter = {
278279
* @docid
279280
*/
280281
export interface dxHtmlEditorOptions extends EditorOptions<dxHtmlEditor> {
282+
/**
283+
* @docid
284+
* @default undefined
285+
* @public
286+
* @type object
287+
*/
288+
aiIntegration?: AIIntegration | undefined;
281289
/**
282290
* @docid
283291
* @default false

packages/devextreme/ts/dx.all.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20067,6 +20067,10 @@ declare module DevExpress.ui {
2006720067
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
2006820068
*/
2006920069
export interface dxHtmlEditorOptions extends EditorOptions<dxHtmlEditor> {
20070+
/**
20071+
* [descr:dxHtmlEditorOptions.aiIntegration]
20072+
*/
20073+
aiIntegration?: DevExpress.aiIntegration.AIIntegration | undefined;
2007020074
/**
2007120075
* [descr:dxHtmlEditorOptions.allowSoftLineBreak]
2007220076
*/

0 commit comments

Comments
 (0)