import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core'; import { ControlValueAccessor, FormControl } from '@angular/forms'; import { Subscription } from 'rxjs'; import { DialogRef, DialogService } from '../dialog/public-api'; import { CodeEditorIntl } from './code-editor-intl.service'; import { MonacoProviderService } from './monaco-provider.service'; export interface CodeEditorActionsConfig { diffMode?: boolean; recover?: boolean; clear?: boolean; find?: boolean; copy?: boolean; theme?: boolean; fullscreen?: boolean; export?: boolean; import?: boolean; } /** * Code editor. */ export declare class CodeEditorComponent implements ControlValueAccessor, OnDestroy { monacoProvider: MonacoProviderService; cdr: ChangeDetectorRef; codeEditorIntl: CodeEditorIntl; dialog: DialogService; source: CodeEditorComponent; private editor; protected _options: {}; protected _actionsConfig: CodeEditorActionsConfig; protected _originalValue: string; protected _diffMode: boolean; protected _modelUri: string; protected _monacoEditorChanged: EventEmitter; protected _controlSubscription: Subscription; protected _valueControl: FormControl; /** * Raw Monaco editor options */ options: import('monaco-editor').editor.IEditorConstructionOptions; /** * Value input. Optinally, you could access the model via ControlValueAccessor * like ngModel. */ value: string; /** * The original value to recover */ originalValue: string; /** * Configure action buttons display. All actions are enabled by default. */ actionsConfig: CodeEditorActionsConfig; /** * Should show as diff mode or not */ diffMode: boolean; /** * The URI which will be assigned to monaco-editor's model. */ modelUri: string; /** * The FormControl object is shared between this form and its source. */ readonly valueControl: FormControl; /** * Events emitted when monaco editor changed. * User may want to use this to have advanced tunnings on the editor. */ readonly monacoEditorChanged: EventEmitter; /** * The fullscreen dialog. */ fullscreenDialog: DialogRef; fileUploadInputElementRef: ElementRef; readonly modeId: string; constructor(monacoProvider: MonacoProviderService, cdr: ChangeDetectorRef, codeEditorIntl: CodeEditorIntl, dialog: DialogService, source: CodeEditorComponent); onThemeChange(event: Event): void; onMonacoEditorChanged(editor: import('monaco-editor').editor.IStandaloneCodeEditor): void; onClearClicked(): void; onExportClicked(): void; onImportFileChanged(_event: Event): void; onRecoverClicked(): void; onFindClicked(): import('monaco-editor').Promise; canFullscreen(): boolean; onFoldAllClicked(): import('monaco-editor').Promise; getLanguageExtensions(): string[]; getInputFileAccepts(): string; private checkActionAndRun; private getEditorAction; onCopyClicked(): void; onChange: (_: string) => void; onTouched: () => void; writeValue(value: string): void; registerOnChange(fn: (val: string) => void): void; registerOnTouched(fn: () => void): void; toggleFullscreen(): void; ngOnDestroy(): void; /** * Handles user input events: */ private onValueChange; }