@firestitch/text-editor 12.3.0 → 12.3.1
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.
- package/app/components/text-editor/text-editor.component.d.ts +37 -37
- package/app/fs-text-editor.module.d.ts +13 -13
- package/app/interfaces/config.interface.d.ts +4 -4
- package/bundles/firestitch-text-editor.umd.js +196 -196
- package/esm2015/app/components/text-editor/text-editor.component.js +149 -149
- package/esm2015/app/fs-text-editor.module.js +42 -42
- package/esm2015/app/interfaces/config.interface.js +1 -1
- package/esm2015/firestitch-text-editor.js +4 -4
- package/esm2015/public_api.js +5 -5
- package/fesm2015/firestitch-text-editor.js +180 -180
- package/firestitch-text-editor.d.ts +5 -5
- package/package.json +1 -4
- 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 { 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,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 '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,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
|
+
}
|
|
@@ -26,208 +26,208 @@
|
|
|
26
26
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
27
27
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
28
|
|
|
29
|
-
var FsTextEditorComponent = /** @class */ (function () {
|
|
30
|
-
function FsTextEditorComponent(_element, _document) {
|
|
31
|
-
this._element = _element;
|
|
32
|
-
this._document = _document;
|
|
33
|
-
this.config = {};
|
|
34
|
-
this.scrollable = false;
|
|
35
|
-
this.init = new i0.EventEmitter();
|
|
36
|
-
this.blur = new i0.EventEmitter();
|
|
37
|
-
this.defaultConfig = {
|
|
38
|
-
minimap: {
|
|
39
|
-
enabled: false
|
|
40
|
-
},
|
|
41
|
-
theme: 'vs-dark',
|
|
42
|
-
automaticLayout: false,
|
|
43
|
-
scrollBeyondLastLine: false,
|
|
44
|
-
autoHeight: true,
|
|
45
|
-
scrollbar: {
|
|
46
|
-
vertical: 'hidden'
|
|
47
|
-
},
|
|
48
|
-
hideCursorInOverviewRuler: true
|
|
49
|
-
};
|
|
50
|
-
this.onChange = function (_) { };
|
|
51
|
-
this.onTouched = function () { };
|
|
52
|
-
this._window = this._document.defaultView;
|
|
53
|
-
this.LINE_HEIGHT = 18;
|
|
54
|
-
this._value = '';
|
|
55
|
-
}
|
|
56
|
-
Object.defineProperty(FsTextEditorComponent.prototype, "monaco", {
|
|
57
|
-
get: function () {
|
|
58
|
-
return this._window.monaco;
|
|
59
|
-
},
|
|
60
|
-
enumerable: false,
|
|
61
|
-
configurable: true
|
|
62
|
-
});
|
|
63
|
-
;
|
|
64
|
-
;
|
|
65
|
-
FsTextEditorComponent.prototype.ngOnInit = function () {
|
|
66
|
-
if (this.config) {
|
|
67
|
-
this.config = Object.assign({}, this.defaultConfig, this.config);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
FsTextEditorComponent.prototype.ngOnDestroy = function () {
|
|
71
|
-
// must be there to cleanup https://github.com/microsoft/monaco-editor/issues/827
|
|
72
|
-
this._window.define = null;
|
|
73
|
-
};
|
|
74
|
-
Object.defineProperty(FsTextEditorComponent.prototype, "value", {
|
|
75
|
-
get: function () {
|
|
76
|
-
return this._value;
|
|
77
|
-
},
|
|
78
|
-
enumerable: false,
|
|
79
|
-
configurable: true
|
|
80
|
-
});
|
|
81
|
-
FsTextEditorComponent.prototype.onEditorInit = function (event) {
|
|
82
|
-
var _this = this;
|
|
83
|
-
// Timeout allows the content to fully load to and calculate height
|
|
84
|
-
setTimeout(function () {
|
|
85
|
-
_this._editorRef = event;
|
|
86
|
-
_this._initEditor();
|
|
87
|
-
_this.init.next(event);
|
|
88
|
-
if (!_this.scrollable) {
|
|
89
|
-
_this._disableScroll();
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
FsTextEditorComponent.prototype.writeValue = function (value) {
|
|
94
|
-
this._value = value || '';
|
|
95
|
-
};
|
|
96
|
-
FsTextEditorComponent.prototype.changed = function (e) {
|
|
97
|
-
if (this._value !== e) {
|
|
98
|
-
this._value = e;
|
|
99
|
-
this.onChange(e);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
FsTextEditorComponent.prototype.registerOnChange = function (fn) {
|
|
103
|
-
this.onChange = fn;
|
|
104
|
-
};
|
|
105
|
-
FsTextEditorComponent.prototype.registerOnTouched = function (fn) {
|
|
106
|
-
this.onTouched = fn;
|
|
107
|
-
};
|
|
108
|
-
FsTextEditorComponent.prototype._initEditor = function () {
|
|
109
|
-
var _this = this;
|
|
110
|
-
if (this._editorRef && this.config.autoHeight) {
|
|
111
|
-
this._updateEditorHeight();
|
|
112
|
-
this._editorRef.onDidChangeModelContent(function (e) {
|
|
113
|
-
_this._updateEditorHeight();
|
|
114
|
-
});
|
|
115
|
-
this._editorRef.onDidBlurEditorText(function () {
|
|
116
|
-
_this.blur.next();
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
FsTextEditorComponent.prototype._updateEditorHeight = function () {
|
|
121
|
-
var editorDomNode = this._editorRef.getDomNode();
|
|
122
|
-
if (!editorDomNode) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
var container = editorDomNode.getElementsByClassName('view-lines')[0];
|
|
126
|
-
var lineHeight = container.firstChild
|
|
127
|
-
? container.firstChild.offsetHeight
|
|
128
|
-
: this.LINE_HEIGHT;
|
|
129
|
-
var editorModel = this._editorRef.getModel();
|
|
130
|
-
if (!editorModel) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
var nextHeight = this._editorRef.getModel().getLineCount() * lineHeight;
|
|
134
|
-
// set the height and redo layout
|
|
135
|
-
editorDomNode.style.height = nextHeight + 'px';
|
|
136
|
-
this.updateLayout();
|
|
137
|
-
};
|
|
138
|
-
FsTextEditorComponent.prototype.updateLayout = function () {
|
|
139
|
-
this._editorRef.layout();
|
|
140
|
-
};
|
|
141
|
-
FsTextEditorComponent.prototype._disableScroll = function () {
|
|
142
|
-
var node = this._editorRef.getDomNode();
|
|
143
|
-
node.addEventListener('wheel', function (e) {
|
|
144
|
-
e.stopPropagation();
|
|
145
|
-
}, true);
|
|
146
|
-
};
|
|
147
|
-
return FsTextEditorComponent;
|
|
148
|
-
}());
|
|
149
|
-
FsTextEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorComponent, deps: [{ token: i0__namespace.ElementRef }, { token: common.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
150
|
-
FsTextEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsTextEditorComponent, selector: "fs-text-editor", inputs: { config: "config", scrollable: "scrollable" }, outputs: { init: "init", blur: "blur" }, providers: [{
|
|
151
|
-
provide: i2.NG_VALUE_ACCESSOR,
|
|
152
|
-
useExisting: i0.forwardRef(function () { return FsTextEditorComponent; }),
|
|
153
|
-
multi: true
|
|
154
|
-
}], viewQueries: [{ propertyName: "_editorContainer", first: true, predicate: i1.EditorComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<ngx-monaco-editor\n [ngModel]=\"value\"\n (ngModelChange)=\"changed($event)\"\n [options]=\"config\"\n (onInit)=\"onEditorInit($event)\">\n</ngx-monaco-editor>\n", styles: [":host ngx-monaco-editor{height:100%!important}:host ::ng-deep .decorationsOverviewRuler{display:none}:host ::ng-deep .margin,:host ::ng-deep .monaco-editor-background{top:0px!important}\n"], components: [{ type: i1__namespace.EditorComponent, selector: "ngx-monaco-editor", inputs: ["options", "model"] }], directives: [{ type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
155
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorComponent, decorators: [{
|
|
156
|
-
type: i0.Component,
|
|
157
|
-
args: [{
|
|
158
|
-
selector: 'fs-text-editor',
|
|
159
|
-
templateUrl: 'text-editor.component.html',
|
|
160
|
-
styleUrls: ['text-editor.component.scss'],
|
|
161
|
-
providers: [{
|
|
162
|
-
provide: i2.NG_VALUE_ACCESSOR,
|
|
163
|
-
useExisting: i0.forwardRef(function () { return FsTextEditorComponent; }),
|
|
164
|
-
multi: true
|
|
165
|
-
}]
|
|
166
|
-
}]
|
|
167
|
-
}], ctorParameters: function () {
|
|
168
|
-
return [{ type: i0__namespace.ElementRef }, { type: Document, decorators: [{
|
|
169
|
-
type: i0.Inject,
|
|
170
|
-
args: [common.DOCUMENT]
|
|
171
|
-
}] }];
|
|
172
|
-
}, propDecorators: { config: [{
|
|
173
|
-
type: i0.Input
|
|
174
|
-
}], scrollable: [{
|
|
175
|
-
type: i0.Input
|
|
176
|
-
}], init: [{
|
|
177
|
-
type: i0.Output
|
|
178
|
-
}], blur: [{
|
|
179
|
-
type: i0.Output
|
|
180
|
-
}], _editorContainer: [{
|
|
181
|
-
type: i0.ViewChild,
|
|
182
|
-
args: [i1.EditorComponent, { static: true }]
|
|
29
|
+
var FsTextEditorComponent = /** @class */ (function () {
|
|
30
|
+
function FsTextEditorComponent(_element, _document) {
|
|
31
|
+
this._element = _element;
|
|
32
|
+
this._document = _document;
|
|
33
|
+
this.config = {};
|
|
34
|
+
this.scrollable = false;
|
|
35
|
+
this.init = new i0.EventEmitter();
|
|
36
|
+
this.blur = new i0.EventEmitter();
|
|
37
|
+
this.defaultConfig = {
|
|
38
|
+
minimap: {
|
|
39
|
+
enabled: false
|
|
40
|
+
},
|
|
41
|
+
theme: 'vs-dark',
|
|
42
|
+
automaticLayout: false,
|
|
43
|
+
scrollBeyondLastLine: false,
|
|
44
|
+
autoHeight: true,
|
|
45
|
+
scrollbar: {
|
|
46
|
+
vertical: 'hidden'
|
|
47
|
+
},
|
|
48
|
+
hideCursorInOverviewRuler: true
|
|
49
|
+
};
|
|
50
|
+
this.onChange = function (_) { };
|
|
51
|
+
this.onTouched = function () { };
|
|
52
|
+
this._window = this._document.defaultView;
|
|
53
|
+
this.LINE_HEIGHT = 18;
|
|
54
|
+
this._value = '';
|
|
55
|
+
}
|
|
56
|
+
Object.defineProperty(FsTextEditorComponent.prototype, "monaco", {
|
|
57
|
+
get: function () {
|
|
58
|
+
return this._window.monaco;
|
|
59
|
+
},
|
|
60
|
+
enumerable: false,
|
|
61
|
+
configurable: true
|
|
62
|
+
});
|
|
63
|
+
;
|
|
64
|
+
;
|
|
65
|
+
FsTextEditorComponent.prototype.ngOnInit = function () {
|
|
66
|
+
if (this.config) {
|
|
67
|
+
this.config = Object.assign({}, this.defaultConfig, this.config);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
FsTextEditorComponent.prototype.ngOnDestroy = function () {
|
|
71
|
+
// must be there to cleanup https://github.com/microsoft/monaco-editor/issues/827
|
|
72
|
+
this._window.define = null;
|
|
73
|
+
};
|
|
74
|
+
Object.defineProperty(FsTextEditorComponent.prototype, "value", {
|
|
75
|
+
get: function () {
|
|
76
|
+
return this._value;
|
|
77
|
+
},
|
|
78
|
+
enumerable: false,
|
|
79
|
+
configurable: true
|
|
80
|
+
});
|
|
81
|
+
FsTextEditorComponent.prototype.onEditorInit = function (event) {
|
|
82
|
+
var _this = this;
|
|
83
|
+
// Timeout allows the content to fully load to and calculate height
|
|
84
|
+
setTimeout(function () {
|
|
85
|
+
_this._editorRef = event;
|
|
86
|
+
_this._initEditor();
|
|
87
|
+
_this.init.next(event);
|
|
88
|
+
if (!_this.scrollable) {
|
|
89
|
+
_this._disableScroll();
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
FsTextEditorComponent.prototype.writeValue = function (value) {
|
|
94
|
+
this._value = value || '';
|
|
95
|
+
};
|
|
96
|
+
FsTextEditorComponent.prototype.changed = function (e) {
|
|
97
|
+
if (this._value !== e) {
|
|
98
|
+
this._value = e;
|
|
99
|
+
this.onChange(e);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
FsTextEditorComponent.prototype.registerOnChange = function (fn) {
|
|
103
|
+
this.onChange = fn;
|
|
104
|
+
};
|
|
105
|
+
FsTextEditorComponent.prototype.registerOnTouched = function (fn) {
|
|
106
|
+
this.onTouched = fn;
|
|
107
|
+
};
|
|
108
|
+
FsTextEditorComponent.prototype._initEditor = function () {
|
|
109
|
+
var _this = this;
|
|
110
|
+
if (this._editorRef && this.config.autoHeight) {
|
|
111
|
+
this._updateEditorHeight();
|
|
112
|
+
this._editorRef.onDidChangeModelContent(function (e) {
|
|
113
|
+
_this._updateEditorHeight();
|
|
114
|
+
});
|
|
115
|
+
this._editorRef.onDidBlurEditorText(function () {
|
|
116
|
+
_this.blur.next();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
FsTextEditorComponent.prototype._updateEditorHeight = function () {
|
|
121
|
+
var editorDomNode = this._editorRef.getDomNode();
|
|
122
|
+
if (!editorDomNode) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
var container = editorDomNode.getElementsByClassName('view-lines')[0];
|
|
126
|
+
var lineHeight = container.firstChild
|
|
127
|
+
? container.firstChild.offsetHeight
|
|
128
|
+
: this.LINE_HEIGHT;
|
|
129
|
+
var editorModel = this._editorRef.getModel();
|
|
130
|
+
if (!editorModel) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
var nextHeight = this._editorRef.getModel().getLineCount() * lineHeight;
|
|
134
|
+
// set the height and redo layout
|
|
135
|
+
editorDomNode.style.height = nextHeight + 'px';
|
|
136
|
+
this.updateLayout();
|
|
137
|
+
};
|
|
138
|
+
FsTextEditorComponent.prototype.updateLayout = function () {
|
|
139
|
+
this._editorRef.layout();
|
|
140
|
+
};
|
|
141
|
+
FsTextEditorComponent.prototype._disableScroll = function () {
|
|
142
|
+
var node = this._editorRef.getDomNode();
|
|
143
|
+
node.addEventListener('wheel', function (e) {
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
}, true);
|
|
146
|
+
};
|
|
147
|
+
return FsTextEditorComponent;
|
|
148
|
+
}());
|
|
149
|
+
FsTextEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorComponent, deps: [{ token: i0__namespace.ElementRef }, { token: common.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
150
|
+
FsTextEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsTextEditorComponent, selector: "fs-text-editor", inputs: { config: "config", scrollable: "scrollable" }, outputs: { init: "init", blur: "blur" }, providers: [{
|
|
151
|
+
provide: i2.NG_VALUE_ACCESSOR,
|
|
152
|
+
useExisting: i0.forwardRef(function () { return FsTextEditorComponent; }),
|
|
153
|
+
multi: true
|
|
154
|
+
}], viewQueries: [{ propertyName: "_editorContainer", first: true, predicate: i1.EditorComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<ngx-monaco-editor\n [ngModel]=\"value\"\n (ngModelChange)=\"changed($event)\"\n [options]=\"config\"\n (onInit)=\"onEditorInit($event)\">\n</ngx-monaco-editor>\n", styles: [":host ngx-monaco-editor{height:100%!important}:host ::ng-deep .decorationsOverviewRuler{display:none}:host ::ng-deep .margin,:host ::ng-deep .monaco-editor-background{top:0px!important}\n"], components: [{ type: i1__namespace.EditorComponent, selector: "ngx-monaco-editor", inputs: ["options", "model"] }], directives: [{ type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
155
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorComponent, decorators: [{
|
|
156
|
+
type: i0.Component,
|
|
157
|
+
args: [{
|
|
158
|
+
selector: 'fs-text-editor',
|
|
159
|
+
templateUrl: 'text-editor.component.html',
|
|
160
|
+
styleUrls: ['text-editor.component.scss'],
|
|
161
|
+
providers: [{
|
|
162
|
+
provide: i2.NG_VALUE_ACCESSOR,
|
|
163
|
+
useExisting: i0.forwardRef(function () { return FsTextEditorComponent; }),
|
|
164
|
+
multi: true
|
|
165
|
+
}]
|
|
166
|
+
}]
|
|
167
|
+
}], ctorParameters: function () {
|
|
168
|
+
return [{ type: i0__namespace.ElementRef }, { type: Document, decorators: [{
|
|
169
|
+
type: i0.Inject,
|
|
170
|
+
args: [common.DOCUMENT]
|
|
171
|
+
}] }];
|
|
172
|
+
}, propDecorators: { config: [{
|
|
173
|
+
type: i0.Input
|
|
174
|
+
}], scrollable: [{
|
|
175
|
+
type: i0.Input
|
|
176
|
+
}], init: [{
|
|
177
|
+
type: i0.Output
|
|
178
|
+
}], blur: [{
|
|
179
|
+
type: i0.Output
|
|
180
|
+
}], _editorContainer: [{
|
|
181
|
+
type: i0.ViewChild,
|
|
182
|
+
args: [i1.EditorComponent, { static: true }]
|
|
183
183
|
}] } });
|
|
184
184
|
|
|
185
|
-
var FsTextEditorModule = /** @class */ (function () {
|
|
186
|
-
function FsTextEditorModule() {
|
|
187
|
-
}
|
|
188
|
-
FsTextEditorModule.forRoot = function (config) {
|
|
189
|
-
return {
|
|
190
|
-
ngModule: FsTextEditorModule,
|
|
191
|
-
providers: [
|
|
192
|
-
i1.MonacoEditorModule.forRoot(config).providers,
|
|
193
|
-
],
|
|
194
|
-
};
|
|
195
|
-
};
|
|
196
|
-
return FsTextEditorModule;
|
|
197
|
-
}());
|
|
198
|
-
FsTextEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
199
|
-
FsTextEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, declarations: [FsTextEditorComponent], imports: [common.CommonModule,
|
|
200
|
-
i1.MonacoEditorModule,
|
|
201
|
-
i2.FormsModule], exports: [FsTextEditorComponent] });
|
|
202
|
-
FsTextEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, imports: [[
|
|
203
|
-
common.CommonModule,
|
|
204
|
-
i1.MonacoEditorModule,
|
|
205
|
-
i2.FormsModule,
|
|
206
|
-
]] });
|
|
207
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, decorators: [{
|
|
208
|
-
type: i0.NgModule,
|
|
209
|
-
args: [{
|
|
210
|
-
imports: [
|
|
211
|
-
common.CommonModule,
|
|
212
|
-
i1.MonacoEditorModule,
|
|
213
|
-
i2.FormsModule,
|
|
214
|
-
],
|
|
215
|
-
exports: [
|
|
216
|
-
FsTextEditorComponent,
|
|
217
|
-
],
|
|
218
|
-
entryComponents: [],
|
|
219
|
-
declarations: [
|
|
220
|
-
FsTextEditorComponent,
|
|
221
|
-
]
|
|
222
|
-
}]
|
|
185
|
+
var FsTextEditorModule = /** @class */ (function () {
|
|
186
|
+
function FsTextEditorModule() {
|
|
187
|
+
}
|
|
188
|
+
FsTextEditorModule.forRoot = function (config) {
|
|
189
|
+
return {
|
|
190
|
+
ngModule: FsTextEditorModule,
|
|
191
|
+
providers: [
|
|
192
|
+
i1.MonacoEditorModule.forRoot(config).providers,
|
|
193
|
+
],
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
return FsTextEditorModule;
|
|
197
|
+
}());
|
|
198
|
+
FsTextEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
199
|
+
FsTextEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, declarations: [FsTextEditorComponent], imports: [common.CommonModule,
|
|
200
|
+
i1.MonacoEditorModule,
|
|
201
|
+
i2.FormsModule], exports: [FsTextEditorComponent] });
|
|
202
|
+
FsTextEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, imports: [[
|
|
203
|
+
common.CommonModule,
|
|
204
|
+
i1.MonacoEditorModule,
|
|
205
|
+
i2.FormsModule,
|
|
206
|
+
]] });
|
|
207
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, decorators: [{
|
|
208
|
+
type: i0.NgModule,
|
|
209
|
+
args: [{
|
|
210
|
+
imports: [
|
|
211
|
+
common.CommonModule,
|
|
212
|
+
i1.MonacoEditorModule,
|
|
213
|
+
i2.FormsModule,
|
|
214
|
+
],
|
|
215
|
+
exports: [
|
|
216
|
+
FsTextEditorComponent,
|
|
217
|
+
],
|
|
218
|
+
entryComponents: [],
|
|
219
|
+
declarations: [
|
|
220
|
+
FsTextEditorComponent,
|
|
221
|
+
]
|
|
222
|
+
}]
|
|
223
223
|
}] });
|
|
224
224
|
|
|
225
|
-
/*
|
|
226
|
-
* Public API Surface of fs-menu
|
|
225
|
+
/*
|
|
226
|
+
* Public API Surface of fs-menu
|
|
227
227
|
*/
|
|
228
228
|
|
|
229
|
-
/**
|
|
230
|
-
* Generated bundle index. Do not edit.
|
|
229
|
+
/**
|
|
230
|
+
* Generated bundle index. Do not edit.
|
|
231
231
|
*/
|
|
232
232
|
|
|
233
233
|
exports.FsTextEditorComponent = FsTextEditorComponent;
|