@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
43 lines (42 loc) • 1.82 kB
TypeScript
/**
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
/**
* @module ai/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview
*/
import { View } from '@ckeditor/ckeditor5-ui';
import { type AISuggestionActionName } from '../../../aichat/ui/feed/aichatfeedsuggestionitemactionsview.js';
import { type AISuggestionContentPartDefinition } from '../../utils/getsuggestionpartsfromreply.js';
import { type Locale } from '@ckeditor/ckeditor5-utils';
import { AISuggestionContentPartToolbarView } from './aisuggestioncontentparttoolbarview.js';
import { type AIReplyChangeGroupState } from '../../model/aireply.js';
/**
* A view that displays the header of a single part in the suggestion content.
*
* Includes:
* * The toolbar,
* * The title label,
* * The state view.
*/
export declare class AISuggestionContentPartHeaderView extends View<HTMLDivElement> {
/**
* The state of the content part (pending, accepted, rejected, etc.). It is reflected in the {@link #stateView} view.
*/
state: AIReplyChangeGroupState;
/**
* Controls whether the content part is enabled, which means that it can be interacted with. It affects the interactivity
* of the {@link #toolbarView} buttons.
*/
isEnabled: boolean;
/**
* The view that displays the toolbar for the content part ("Apply", "Suggest", "Reject").
*/
toolbarView: AISuggestionContentPartToolbarView;
constructor(locale: Locale, { part, uiIndex, availableActions, areActionsDisabled }: {
part: AISuggestionContentPartDefinition;
uiIndex: number;
availableActions: Array<AISuggestionActionName>;
areActionsDisabled?: boolean;
});
}