@firestitch/text-editor 12.3.1 → 12.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter, OnInit, ElementRef, OnDestroy } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
- import { EditorComponent } from 'ngx-monaco-editor';
4
3
  import { FsTextEditorConfig } from '../../interfaces/config.interface';
4
+ import { EditorComponent } from '../../modules/ngx-monaco-editor/editor.component';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class FsTextEditorComponent implements OnInit, OnDestroy, ControlValueAccessor {
7
7
  private _element;
@@ -1,9 +1,9 @@
1
1
  import { ModuleWithProviders } from '@angular/core';
2
- import { NgxMonacoEditorConfig } from 'ngx-monaco-editor';
2
+ import { NgxMonacoEditorConfig } from './modules/ngx-monaco-editor/config';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "./components/text-editor/text-editor.component";
5
5
  import * as i2 from "@angular/common";
6
- import * as i3 from "ngx-monaco-editor";
6
+ import * as i3 from "./modules/ngx-monaco-editor/editor.module";
7
7
  import * as i4 from "@angular/forms";
8
8
  export declare class FsTextEditorModule {
9
9
  static forRoot(config?: NgxMonacoEditorConfig): ModuleWithProviders<FsTextEditorModule>;
@@ -0,0 +1,18 @@
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { NgxMonacoEditorConfig } from './config';
4
+ import * as i0 from "@angular/core";
5
+ export declare abstract class BaseEditor implements AfterViewInit, OnDestroy {
6
+ protected config: NgxMonacoEditorConfig;
7
+ _editorContainer: ElementRef;
8
+ onInit: EventEmitter<any>;
9
+ protected _editor: any;
10
+ protected _options: any;
11
+ protected _windowResizeSubscription: Subscription;
12
+ constructor(config: NgxMonacoEditorConfig);
13
+ ngAfterViewInit(): void;
14
+ protected abstract initMonaco(options: any): void;
15
+ ngOnDestroy(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseEditor, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseEditor, "ng-component", never, {}, { "onInit": "onInit"; }, never, never>;
18
+ }
@@ -0,0 +1,9 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const NGX_MONACO_EDITOR_CONFIG: InjectionToken<unknown>;
3
+ export interface NgxMonacoEditorConfig {
4
+ baseUrl?: string;
5
+ defaultOptions?: {
6
+ [key: string]: any;
7
+ };
8
+ onMonacoLoad?: Function;
9
+ }
@@ -0,0 +1,17 @@
1
+ import { BaseEditor } from './base-editor';
2
+ import { NgxMonacoEditorConfig } from './config';
3
+ import { DiffEditorModel } from './types';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DiffEditorComponent extends BaseEditor {
6
+ private editorConfig;
7
+ _originalModel: DiffEditorModel;
8
+ _modifiedModel: DiffEditorModel;
9
+ set options(options: any);
10
+ get options(): any;
11
+ set originalModel(model: DiffEditorModel);
12
+ set modifiedModel(model: DiffEditorModel);
13
+ constructor(editorConfig: NgxMonacoEditorConfig);
14
+ protected initMonaco(options: any): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<DiffEditorComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<DiffEditorComponent, "ngx-monaco-diff-editor", never, { "options": "options"; "originalModel": "originalModel"; "modifiedModel": "modifiedModel"; }, {}, never, never>;
17
+ }
@@ -0,0 +1,23 @@
1
+ import { NgZone } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { BaseEditor } from './base-editor';
4
+ import { NgxMonacoEditorConfig } from './config';
5
+ import { NgxEditorModel } from './types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class EditorComponent extends BaseEditor implements ControlValueAccessor {
8
+ private zone;
9
+ private editorConfig;
10
+ private _value;
11
+ propagateChange: (_: any) => void;
12
+ onTouched: () => void;
13
+ set options(options: any);
14
+ get options(): any;
15
+ set model(model: NgxEditorModel);
16
+ constructor(zone: NgZone, editorConfig: NgxMonacoEditorConfig);
17
+ writeValue(value: any): void;
18
+ registerOnChange(fn: any): void;
19
+ registerOnTouched(fn: any): void;
20
+ protected initMonaco(options: any): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "ngx-monaco-editor", never, { "options": "options"; "model": "model"; }, {}, never, never>;
23
+ }
@@ -0,0 +1,12 @@
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { NgxMonacoEditorConfig } from './config';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./editor.component";
5
+ import * as i2 from "./diff-editor.component";
6
+ import * as i3 from "@angular/common";
7
+ export declare class MonacoEditorModule {
8
+ static forRoot(config?: NgxMonacoEditorConfig): ModuleWithProviders<MonacoEditorModule>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<MonacoEditorModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MonacoEditorModule, [typeof i1.EditorComponent, typeof i2.DiffEditorComponent], [typeof i3.CommonModule], [typeof i1.EditorComponent, typeof i2.DiffEditorComponent]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<MonacoEditorModule>;
12
+ }
@@ -0,0 +1,9 @@
1
+ export interface DiffEditorModel {
2
+ code: string;
3
+ language: string;
4
+ }
5
+ export interface NgxEditorModel {
6
+ value: string;
7
+ language?: string;
8
+ uri?: any;
9
+ }