@firestitch/text-editor 12.3.0 → 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.
Files changed (27) hide show
  1. package/app/components/text-editor/text-editor.component.d.ts +37 -37
  2. package/app/fs-text-editor.module.d.ts +13 -13
  3. package/app/interfaces/config.interface.d.ts +4 -4
  4. package/app/modules/ngx-monaco-editor/base-editor.d.ts +18 -0
  5. package/app/modules/ngx-monaco-editor/config.d.ts +9 -0
  6. package/app/modules/ngx-monaco-editor/diff-editor.component.d.ts +17 -0
  7. package/app/modules/ngx-monaco-editor/editor.component.d.ts +23 -0
  8. package/app/modules/ngx-monaco-editor/editor.module.d.ts +12 -0
  9. package/app/modules/ngx-monaco-editor/types.d.ts +9 -0
  10. package/bundles/firestitch-text-editor.umd.js +1020 -225
  11. package/bundles/firestitch-text-editor.umd.js.map +1 -1
  12. package/esm2015/app/components/text-editor/text-editor.component.js +150 -150
  13. package/esm2015/app/fs-text-editor.module.js +43 -43
  14. package/esm2015/app/interfaces/config.interface.js +1 -1
  15. package/esm2015/app/modules/ngx-monaco-editor/base-editor.js +77 -0
  16. package/esm2015/app/modules/ngx-monaco-editor/config.js +3 -0
  17. package/esm2015/app/modules/ngx-monaco-editor/diff-editor.component.js +91 -0
  18. package/esm2015/app/modules/ngx-monaco-editor/editor.component.js +121 -0
  19. package/esm2015/app/modules/ngx-monaco-editor/editor.module.js +40 -0
  20. package/esm2015/app/modules/ngx-monaco-editor/types.js +2 -0
  21. package/esm2015/firestitch-text-editor.js +4 -4
  22. package/esm2015/public_api.js +5 -5
  23. package/fesm2015/firestitch-text-editor.js +491 -181
  24. package/fesm2015/firestitch-text-editor.js.map +1 -1
  25. package/firestitch-text-editor.d.ts +5 -5
  26. package/package.json +2 -11
  27. package/public_api.d.ts +3 -3
@@ -1,37 +1,37 @@
1
- import { EventEmitter, OnInit, ElementRef, OnDestroy } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import { EditorComponent } from 'ngx-monaco-editor';
4
- import { FsTextEditorConfig } from '../../interfaces/config.interface';
5
- import * as i0 from "@angular/core";
6
- export declare class FsTextEditorComponent implements OnInit, OnDestroy, ControlValueAccessor {
7
- private _element;
8
- private _document;
9
- config: FsTextEditorConfig;
10
- scrollable: boolean;
11
- init: EventEmitter<any>;
12
- blur: EventEmitter<any>;
13
- _editorContainer: EditorComponent;
14
- defaultConfig: FsTextEditorConfig;
15
- onChange: (_: any) => void;
16
- onTouched: () => void;
17
- private _window;
18
- get monaco(): any;
19
- constructor(_element: ElementRef, _document: Document);
20
- readonly LINE_HEIGHT = 18;
21
- private _editorRef;
22
- private _value;
23
- ngOnInit(): void;
24
- ngOnDestroy(): void;
25
- get value(): string;
26
- onEditorInit(event: any): void;
27
- writeValue(value: any): void;
28
- changed(e: any): void;
29
- registerOnChange(fn: any): void;
30
- registerOnTouched(fn: any): void;
31
- private _initEditor;
32
- private _updateEditorHeight;
33
- updateLayout(): void;
34
- private _disableScroll;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<FsTextEditorComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<FsTextEditorComponent, "fs-text-editor", never, { "config": "config"; "scrollable": "scrollable"; }, { "init": "init"; "blur": "blur"; }, never, never>;
37
- }
1
+ import { EventEmitter, OnInit, ElementRef, OnDestroy } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { FsTextEditorConfig } from '../../interfaces/config.interface';
4
+ import { EditorComponent } from '../../modules/ngx-monaco-editor/editor.component';
5
+ import * as i0 from "@angular/core";
6
+ export declare class FsTextEditorComponent implements OnInit, OnDestroy, ControlValueAccessor {
7
+ private _element;
8
+ private _document;
9
+ config: FsTextEditorConfig;
10
+ scrollable: boolean;
11
+ init: EventEmitter<any>;
12
+ blur: EventEmitter<any>;
13
+ _editorContainer: EditorComponent;
14
+ defaultConfig: FsTextEditorConfig;
15
+ onChange: (_: any) => void;
16
+ onTouched: () => void;
17
+ private _window;
18
+ get monaco(): any;
19
+ constructor(_element: ElementRef, _document: Document);
20
+ readonly LINE_HEIGHT = 18;
21
+ private _editorRef;
22
+ private _value;
23
+ ngOnInit(): void;
24
+ ngOnDestroy(): void;
25
+ get value(): string;
26
+ onEditorInit(event: any): void;
27
+ writeValue(value: any): void;
28
+ changed(e: any): void;
29
+ registerOnChange(fn: any): void;
30
+ registerOnTouched(fn: any): void;
31
+ private _initEditor;
32
+ private _updateEditorHeight;
33
+ updateLayout(): void;
34
+ private _disableScroll;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsTextEditorComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<FsTextEditorComponent, "fs-text-editor", never, { "config": "config"; "scrollable": "scrollable"; }, { "init": "init"; "blur": "blur"; }, never, never>;
37
+ }
@@ -1,13 +1,13 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { NgxMonacoEditorConfig } from 'ngx-monaco-editor';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./components/text-editor/text-editor.component";
5
- import * as i2 from "@angular/common";
6
- import * as i3 from "ngx-monaco-editor";
7
- import * as i4 from "@angular/forms";
8
- export declare class FsTextEditorModule {
9
- static forRoot(config?: NgxMonacoEditorConfig): ModuleWithProviders<FsTextEditorModule>;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<FsTextEditorModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<FsTextEditorModule, [typeof i1.FsTextEditorComponent], [typeof i2.CommonModule, typeof i3.MonacoEditorModule, typeof i4.FormsModule], [typeof i1.FsTextEditorComponent]>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<FsTextEditorModule>;
13
- }
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { NgxMonacoEditorConfig } from './modules/ngx-monaco-editor/config';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./components/text-editor/text-editor.component";
5
+ import * as i2 from "@angular/common";
6
+ import * as i3 from "./modules/ngx-monaco-editor/editor.module";
7
+ import * as i4 from "@angular/forms";
8
+ export declare class FsTextEditorModule {
9
+ static forRoot(config?: NgxMonacoEditorConfig): ModuleWithProviders<FsTextEditorModule>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsTextEditorModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FsTextEditorModule, [typeof i1.FsTextEditorComponent], [typeof i2.CommonModule, typeof i3.MonacoEditorModule, typeof i4.FormsModule], [typeof i1.FsTextEditorComponent]>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<FsTextEditorModule>;
13
+ }
@@ -1,4 +1,4 @@
1
- import { editor } from 'monaco-editor';
2
- export interface FsTextEditorConfig extends editor.IStandaloneEditorConstructionOptions {
3
- autoHeight?: boolean;
4
- }
1
+ import { editor } from 'monaco-editor';
2
+ export interface FsTextEditorConfig extends editor.IStandaloneEditorConstructionOptions {
3
+ autoHeight?: boolean;
4
+ }
@@ -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
+ }