import { editor } from "monaco-editor"; import * as i0 from "@angular/core"; import { AfterViewInit, EventEmitter, TemplateRef } from "@angular/core"; import { ControlValueAccessor } from "@angular/forms"; import { NzSafeAny, OnChangeType, OnTouchedType } from "ng-zorro-antd/core/types"; import { BehaviorSubject, Observable } from "rxjs"; import IStandAloneEditorConstructionOptions = editor.IStandaloneEditorConstructionOptions; import IDiffEditorConstructionOptions = editor.IDiffEditorConstructionOptions; export type EditorOptions = IStandAloneEditorConstructionOptions; export type DiffEditorOptions = IDiffEditorConstructionOptions; export type JoinedEditorOptions = EditorOptions | DiffEditorOptions; export type NzEditorMode = 'normal' | 'diff'; export declare const NzCodeEditorLoadingStatus: { readonly UNLOAD: "unload"; readonly LOADING: "loading"; readonly LOADED: "LOADED"; }; export type NzCodeEditorLoadingStatus = (typeof NzCodeEditorLoadingStatus)[keyof typeof NzCodeEditorLoadingStatus]; declare namespace code_editor_component_d_exports { export { NzCodeEditorComponent }; } export declare class NzCodeEditorComponent implements AfterViewInit, ControlValueAccessor { private nzCodeEditorService; private ngZone; private platform; private destroyRef; nzEditorMode: NzEditorMode; nzOriginalText: string; nzLoading: boolean; nzFullControl: boolean; nzToolkit?: TemplateRef; set nzEditorOption(value: JoinedEditorOptions); readonly nzEditorInitialized: EventEmitter; editorOptionCached: JoinedEditorOptions; private readonly el; private resize$; private editorOption$; private editorInstance; private value; private modelSet; private onDidChangeContentDisposable; constructor(); /** * Initialize a monaco editor instance. */ ngAfterViewInit(): void; writeValue(value: string): void; registerOnChange(fn: OnChangeType): NzSafeAny; registerOnTouched(fn: OnTouchedType): void; onChange: OnChangeType; onTouch: OnTouchedType; layout(): void; private setup; private registerOptionChanges; private initMonacoEditorInstance; private registerResizeChange; private setValue; /** * {@link editor.ICodeEditor}#setValue resets the cursor position to the start of the document. * This helper memorizes the cursor position and selections and restores them after the given * function has been called. */ private preservePositionAndSelections; private setValueEmitter; private emitValue; private updateOptionToMonaco; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_nzLoading: unknown; static ngAcceptInputType_nzFullControl: unknown; } export declare class NzCodeEditorModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export declare class NzCodeEditorService { private readonly nzConfigService; private document; private firstEditorInitialized; private option; private config; option$: BehaviorSubject; constructor(); private _updateDefaultOption; requestToInit(): Observable; private loadMonacoScript; private onLoad; private onInit; private getLatestOption; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }