@firestitch/text-editor 12.0.0 → 12.1.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.
- package/app/components/text-editor/text-editor.component.d.ts +3 -0
- package/app/fs-text-editor.module.d.ts +8 -0
- package/bundles/firestitch-text-editor.umd.js +82 -42
- package/bundles/firestitch-text-editor.umd.js.map +1 -1
- package/esm2015/app/components/text-editor/text-editor.component.js +34 -23
- package/esm2015/app/fs-text-editor.module.js +28 -17
- package/fesm2015/firestitch-text-editor.js +60 -39
- package/fesm2015/firestitch-text-editor.js.map +1 -1
- package/firestitch-text-editor.d.ts +1 -0
- package/package.json +1 -2
- package/firestitch-text-editor.metadata.json +0 -1
|
@@ -2,6 +2,7 @@ import { EventEmitter, OnInit, ElementRef } from '@angular/core';
|
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { EditorComponent } from 'ngx-monaco-editor';
|
|
4
4
|
import { FsTextEditorConfig } from '../../interfaces/config.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class FsTextEditorComponent implements OnInit, ControlValueAccessor {
|
|
6
7
|
private _element;
|
|
7
8
|
config: FsTextEditorConfig;
|
|
@@ -28,4 +29,6 @@ export declare class FsTextEditorComponent implements OnInit, ControlValueAccess
|
|
|
28
29
|
private _updateEditorHeight;
|
|
29
30
|
updateLayout(): void;
|
|
30
31
|
private _disableScroll;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsTextEditorComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsTextEditorComponent, "fs-text-editor", never, { "config": "config"; "scrollable": "scrollable"; }, { "init": "init"; "blur": "blur"; }, never, never>;
|
|
31
34
|
}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./components/text-editor/text-editor.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "ngx-monaco-editor";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
1
6
|
export declare class FsTextEditorModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsTextEditorModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsTextEditorModule, [typeof i1.FsTextEditorComponent], [typeof i2.CommonModule, typeof i3.MonacoEditorModule, typeof i4.FormsModule], [typeof i1.FsTextEditorComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FsTextEditorModule>;
|
|
2
10
|
}
|
|
@@ -1,16 +1,38 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('ngx-monaco-editor')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@firestitch/text-editor', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'ngx-monaco-editor'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["text-editor"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.
|
|
5
|
-
})(this, (function (exports,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["text-editor"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1));
|
|
5
|
+
})(this, (function (exports, i0, common, i2, i1) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
27
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
6
28
|
|
|
7
29
|
var FsTextEditorComponent = /** @class */ (function () {
|
|
8
30
|
function FsTextEditorComponent(_element) {
|
|
9
31
|
this._element = _element;
|
|
10
32
|
this.config = {};
|
|
11
33
|
this.scrollable = false;
|
|
12
|
-
this.init = new
|
|
13
|
-
this.blur = new
|
|
34
|
+
this.init = new i0.EventEmitter();
|
|
35
|
+
this.blur = new i0.EventEmitter();
|
|
14
36
|
this.defaultConfig = {
|
|
15
37
|
minimap: {
|
|
16
38
|
enabled: false
|
|
@@ -118,50 +140,68 @@
|
|
|
118
140
|
};
|
|
119
141
|
return FsTextEditorComponent;
|
|
120
142
|
}());
|
|
121
|
-
FsTextEditorComponent
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
FsTextEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorComponent, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
144
|
+
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: [{
|
|
145
|
+
provide: i2.NG_VALUE_ACCESSOR,
|
|
146
|
+
useExisting: i0.forwardRef(function () { return FsTextEditorComponent; }),
|
|
147
|
+
multi: true
|
|
148
|
+
}], 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"] }] });
|
|
149
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorComponent, decorators: [{
|
|
150
|
+
type: i0.Component,
|
|
151
|
+
args: [{
|
|
152
|
+
selector: 'fs-text-editor',
|
|
153
|
+
templateUrl: 'text-editor.component.html',
|
|
154
|
+
styleUrls: ['text-editor.component.scss'],
|
|
155
|
+
providers: [{
|
|
156
|
+
provide: i2.NG_VALUE_ACCESSOR,
|
|
157
|
+
useExisting: i0.forwardRef(function () { return FsTextEditorComponent; }),
|
|
158
|
+
multi: true
|
|
159
|
+
}]
|
|
160
|
+
}]
|
|
161
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { config: [{
|
|
162
|
+
type: i0.Input
|
|
163
|
+
}], scrollable: [{
|
|
164
|
+
type: i0.Input
|
|
165
|
+
}], init: [{
|
|
166
|
+
type: i0.Output
|
|
167
|
+
}], blur: [{
|
|
168
|
+
type: i0.Output
|
|
169
|
+
}], _editorContainer: [{
|
|
170
|
+
type: i0.ViewChild,
|
|
171
|
+
args: [i1.EditorComponent, { static: true }]
|
|
172
|
+
}] } });
|
|
143
173
|
|
|
144
174
|
var FsTextEditorModule = /** @class */ (function () {
|
|
145
175
|
function FsTextEditorModule() {
|
|
146
176
|
}
|
|
147
177
|
return FsTextEditorModule;
|
|
148
178
|
}());
|
|
149
|
-
FsTextEditorModule
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
179
|
+
FsTextEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
180
|
+
FsTextEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, declarations: [FsTextEditorComponent], imports: [common.CommonModule,
|
|
181
|
+
i1.MonacoEditorModule,
|
|
182
|
+
i2.FormsModule], exports: [FsTextEditorComponent] });
|
|
183
|
+
FsTextEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, imports: [[
|
|
184
|
+
common.CommonModule,
|
|
185
|
+
i1.MonacoEditorModule,
|
|
186
|
+
i2.FormsModule,
|
|
187
|
+
]] });
|
|
188
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsTextEditorModule, decorators: [{
|
|
189
|
+
type: i0.NgModule,
|
|
190
|
+
args: [{
|
|
191
|
+
imports: [
|
|
192
|
+
common.CommonModule,
|
|
193
|
+
i1.MonacoEditorModule,
|
|
194
|
+
i2.FormsModule,
|
|
195
|
+
],
|
|
196
|
+
exports: [
|
|
197
|
+
FsTextEditorComponent,
|
|
198
|
+
],
|
|
199
|
+
entryComponents: [],
|
|
200
|
+
declarations: [
|
|
201
|
+
FsTextEditorComponent,
|
|
202
|
+
]
|
|
203
|
+
}]
|
|
204
|
+
}] });
|
|
165
205
|
|
|
166
206
|
/*
|
|
167
207
|
* Public API Surface of fs-menu
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestitch-text-editor.umd.js","sources":["../../src/app/components/text-editor/text-editor.component.ts","../../src/app/fs-text-editor.module.ts","../../src/public_api.ts","../../src/firestitch-text-editor.ts"],"sourcesContent":["import { Component, EventEmitter, forwardRef, Input, OnInit, Output, ViewChild, ElementRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorComponent } from 'ngx-monaco-editor';\n\nimport ICodeEditor = monaco.editor.ICodeEditor;\n\nimport { FsTextEditorConfig } from '../../interfaces/config.interface';\n\n\n@Component({\n selector: 'fs-text-editor',\n templateUrl: 'text-editor.component.html',\n styleUrls: [ 'text-editor.component.scss' ],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FsTextEditorComponent),\n multi: true\n }]\n})\nexport class FsTextEditorComponent implements OnInit, ControlValueAccessor {\n\n @Input() public config: FsTextEditorConfig = {};\n @Input() public scrollable = false;\n\n @Output() public init = new EventEmitter();\n @Output() public blur = new EventEmitter();\n @ViewChild(EditorComponent, { static: true }) _editorContainer: EditorComponent;\n\n public defaultConfig: FsTextEditorConfig = {\n minimap: {\n enabled: false\n },\n theme: 'vs-dark',\n automaticLayout: false,\n scrollBeyondLastLine: false,\n autoHeight: true,\n scrollbar: {\n vertical: 'hidden'\n },\n hideCursorInOverviewRuler: true\n };\n\n public onChange = (_: any) => {};\n public onTouched = () => {};\n\n public get monaco() {\n return (<any>window).monaco;\n };\n\n constructor(private _element: ElementRef) {};\n\n public readonly LINE_HEIGHT = 18;\n\n private _editorRef: ICodeEditor;\n private _value = '';\n\n public ngOnInit() {\n\n if (this.config) {\n this.config = Object.assign({}, this.defaultConfig, this.config);\n }\n }\n\n get value() {\n return this._value;\n }\n\n public onEditorInit(event) {\n // Timeout allows the content to fully load to and calculate height\n setTimeout(() => {\n this._editorRef = event;\n this._initEditor();\n this.init.next(event);\n\n if (!this.scrollable) {\n this._disableScroll();\n }\n });\n }\n\n public writeValue(value: any): void {\n this._value = value || '';\n }\n\n public changed(e) {\n if (this._value !== e) {\n this._value = e;\n this.onChange(e);\n }\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n private _initEditor() {\n if (this._editorRef && this.config.autoHeight) {\n this._updateEditorHeight();\n\n this._editorRef.onDidChangeModelContent((e) => {\n this._updateEditorHeight();\n });\n\n this._editorRef.onDidBlurEditorText(() => {\n this.blur.next();\n });\n }\n }\n\n private _updateEditorHeight() {\n\n const editorDomNode = this._editorRef.getDomNode();\n\n if (!editorDomNode) {\n return;\n }\n\n const container = editorDomNode.getElementsByClassName('view-lines')[0] as HTMLElement;\n const lineHeight = container.firstChild\n ? (container.firstChild as HTMLElement).offsetHeight\n : this.LINE_HEIGHT;\n\n const editorModel = this._editorRef.getModel();\n\n if (!editorModel) {\n return;\n }\n\n const nextHeight = this._editorRef.getModel().getLineCount() * lineHeight;\n\n // set the height and redo layout\n editorDomNode.style.height = nextHeight + 'px';\n this.updateLayout();\n }\n\n public updateLayout(): void {\n this._editorRef.layout();\n }\n\n private _disableScroll() {\n const node = this._editorRef.getDomNode();\n\n node.addEventListener('wheel', (e) => {\n e.stopPropagation();\n }, true);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MonacoEditorModule } from 'ngx-monaco-editor';\nimport { FsTextEditorComponent } from './components/text-editor/text-editor.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MonacoEditorModule,\n FormsModule,\n ],\n exports: [\n FsTextEditorComponent,\n ],\n entryComponents: [\n ],\n declarations: [\n FsTextEditorComponent,\n ]\n})\nexport class FsTextEditorModule {\n\n}\n","/*\n * Public API Surface of fs-menu\n */\n\nimport { from } from 'rxjs';\n\nexport { FsTextEditorModule } from './app/fs-text-editor.module';\n\nexport { FsTextEditorConfig } from './app/interfaces/config.interface';\n\n\nexport { FsTextEditorComponent } from './app/components/text-editor/text-editor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["EventEmitter","
|
|
1
|
+
{"version":3,"file":"firestitch-text-editor.umd.js","sources":["../../src/app/components/text-editor/text-editor.component.ts","../../src/app/components/text-editor/text-editor.component.html","../../src/app/fs-text-editor.module.ts","../../src/public_api.ts","../../src/firestitch-text-editor.ts"],"sourcesContent":["import { Component, EventEmitter, forwardRef, Input, OnInit, Output, ViewChild, ElementRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorComponent } from 'ngx-monaco-editor';\n\nimport ICodeEditor = monaco.editor.ICodeEditor;\n\nimport { FsTextEditorConfig } from '../../interfaces/config.interface';\n\n\n@Component({\n selector: 'fs-text-editor',\n templateUrl: 'text-editor.component.html',\n styleUrls: [ 'text-editor.component.scss' ],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FsTextEditorComponent),\n multi: true\n }]\n})\nexport class FsTextEditorComponent implements OnInit, ControlValueAccessor {\n\n @Input() public config: FsTextEditorConfig = {};\n @Input() public scrollable = false;\n\n @Output() public init = new EventEmitter();\n @Output() public blur = new EventEmitter();\n @ViewChild(EditorComponent, { static: true }) _editorContainer: EditorComponent;\n\n public defaultConfig: FsTextEditorConfig = {\n minimap: {\n enabled: false\n },\n theme: 'vs-dark',\n automaticLayout: false,\n scrollBeyondLastLine: false,\n autoHeight: true,\n scrollbar: {\n vertical: 'hidden'\n },\n hideCursorInOverviewRuler: true\n };\n\n public onChange = (_: any) => {};\n public onTouched = () => {};\n\n public get monaco() {\n return (<any>window).monaco;\n };\n\n constructor(private _element: ElementRef) {};\n\n public readonly LINE_HEIGHT = 18;\n\n private _editorRef: ICodeEditor;\n private _value = '';\n\n public ngOnInit() {\n\n if (this.config) {\n this.config = Object.assign({}, this.defaultConfig, this.config);\n }\n }\n\n get value() {\n return this._value;\n }\n\n public onEditorInit(event) {\n // Timeout allows the content to fully load to and calculate height\n setTimeout(() => {\n this._editorRef = event;\n this._initEditor();\n this.init.next(event);\n\n if (!this.scrollable) {\n this._disableScroll();\n }\n });\n }\n\n public writeValue(value: any): void {\n this._value = value || '';\n }\n\n public changed(e) {\n if (this._value !== e) {\n this._value = e;\n this.onChange(e);\n }\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n private _initEditor() {\n if (this._editorRef && this.config.autoHeight) {\n this._updateEditorHeight();\n\n this._editorRef.onDidChangeModelContent((e) => {\n this._updateEditorHeight();\n });\n\n this._editorRef.onDidBlurEditorText(() => {\n this.blur.next();\n });\n }\n }\n\n private _updateEditorHeight() {\n\n const editorDomNode = this._editorRef.getDomNode();\n\n if (!editorDomNode) {\n return;\n }\n\n const container = editorDomNode.getElementsByClassName('view-lines')[0] as HTMLElement;\n const lineHeight = container.firstChild\n ? (container.firstChild as HTMLElement).offsetHeight\n : this.LINE_HEIGHT;\n\n const editorModel = this._editorRef.getModel();\n\n if (!editorModel) {\n return;\n }\n\n const nextHeight = this._editorRef.getModel().getLineCount() * lineHeight;\n\n // set the height and redo layout\n editorDomNode.style.height = nextHeight + 'px';\n this.updateLayout();\n }\n\n public updateLayout(): void {\n this._editorRef.layout();\n }\n\n private _disableScroll() {\n const node = this._editorRef.getDomNode();\n\n node.addEventListener('wheel', (e) => {\n e.stopPropagation();\n }, true);\n }\n}\n","<ngx-monaco-editor\n [ngModel]=\"value\"\n (ngModelChange)=\"changed($event)\"\n [options]=\"config\"\n (onInit)=\"onEditorInit($event)\">\n</ngx-monaco-editor>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MonacoEditorModule } from 'ngx-monaco-editor';\nimport { FsTextEditorComponent } from './components/text-editor/text-editor.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MonacoEditorModule,\n FormsModule,\n ],\n exports: [\n FsTextEditorComponent,\n ],\n entryComponents: [\n ],\n declarations: [\n FsTextEditorComponent,\n ]\n})\nexport class FsTextEditorModule {\n\n}\n","/*\n * Public API Surface of fs-menu\n */\n\nimport { from } from 'rxjs';\n\nexport { FsTextEditorModule } from './app/fs-text-editor.module';\n\nexport { FsTextEditorConfig } from './app/interfaces/config.interface';\n\n\nexport { FsTextEditorComponent } from './app/components/text-editor/text-editor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["EventEmitter","NG_VALUE_ACCESSOR","forwardRef","EditorComponent","Component","Input","Output","ViewChild","CommonModule","MonacoEditorModule","FormsModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiDE,+BAAoB,QAAoB;YAApB,aAAQ,GAAR,QAAQ,CAAY;YA5BxB,WAAM,GAAuB,EAAE,CAAC;YAChC,eAAU,GAAG,KAAK,CAAC;YAElB,SAAI,GAAG,IAAIA,eAAY,EAAE,CAAC;YAC1B,SAAI,GAAG,IAAIA,eAAY,EAAE,CAAC;YAGpC,kBAAa,GAAuB;gBACzC,OAAO,EAAE;oBACP,OAAO,EAAE,KAAK;iBACf;gBACD,KAAK,EAAE,SAAS;gBAChB,eAAe,EAA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AAQ;uBAAC;wBACR,OAAO,EAAE;4BACPH,mBAAY;4BACZC,qBAAkB;4BAClBC,cAAW;yBACZ;wBACD,OAAO,EAAE;4BACP,qBAAqB;yBACtB;wBACD,eAAe,EAAE,EAChB;wBACD,YAAY,EAAE;4BACZ,qBAAqB;yBACtB;qBACF;;;ICrBD;;;;ICAA;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Component, EventEmitter, forwardRef, Input, Output, ViewChild, ElementRef } from '@angular/core';
|
|
2
2
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
3
|
import { EditorComponent } from 'ngx-monaco-editor';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "ngx-monaco-editor";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
4
7
|
export class FsTextEditorComponent {
|
|
5
8
|
constructor(_element) {
|
|
6
9
|
this._element = _element;
|
|
@@ -104,26 +107,34 @@ export class FsTextEditorComponent {
|
|
|
104
107
|
}, true);
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
|
-
FsTextEditorComponent
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
]
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
110
|
+
FsTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
+
FsTextEditorComponent.ɵcmp = i0.ɵɵ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: [{
|
|
112
|
+
provide: NG_VALUE_ACCESSOR,
|
|
113
|
+
useExisting: forwardRef(() => FsTextEditorComponent),
|
|
114
|
+
multi: true
|
|
115
|
+
}], viewQueries: [{ propertyName: "_editorContainer", first: true, predicate: EditorComponent, descendants: true, static: true }], ngImport: i0, 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.EditorComponent, selector: "ngx-monaco-editor", inputs: ["options", "model"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorComponent, decorators: [{
|
|
117
|
+
type: Component,
|
|
118
|
+
args: [{
|
|
119
|
+
selector: 'fs-text-editor',
|
|
120
|
+
templateUrl: 'text-editor.component.html',
|
|
121
|
+
styleUrls: ['text-editor.component.scss'],
|
|
122
|
+
providers: [{
|
|
123
|
+
provide: NG_VALUE_ACCESSOR,
|
|
124
|
+
useExisting: forwardRef(() => FsTextEditorComponent),
|
|
125
|
+
multi: true
|
|
126
|
+
}]
|
|
127
|
+
}]
|
|
128
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { config: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], scrollable: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], init: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}], blur: [{
|
|
135
|
+
type: Output
|
|
136
|
+
}], _editorContainer: [{
|
|
137
|
+
type: ViewChild,
|
|
138
|
+
args: [EditorComponent, { static: true }]
|
|
139
|
+
}] } });
|
|
140
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1lZGl0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL3RleHQtZWRpdG9yL3RleHQtZWRpdG9yLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90ZXh0LWVkaXRvci90ZXh0LWVkaXRvci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2xILE9BQU8sRUFBd0IsaUJBQWlCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUN6RSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7Ozs7QUFpQnBELE1BQU0sT0FBTyxxQkFBcUI7SUE4QmhDLFlBQW9CLFFBQW9CO1FBQXBCLGFBQVEsR0FBUixRQUFRLENBQVk7UUE1QnhCLFdBQU0sR0FBdUIsRUFBRSxDQUFDO1FBQ2hDLGVBQVUsR0FBRyxLQUFLLENBQUM7UUFFbEIsU0FBSSxHQUFHLElBQUksWUFBWSxFQUFFLENBQUM7UUFDMUIsU0FBSSxHQUFHLElBQUksWUFBWSxFQUFFLENBQUM7UUFHcEMsa0JBQWEsR0FBdUI7WUFDekMsT0FBTyxFQUFFO2dCQUNQLE9BQU8sRUFBRSxLQ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5kIHJlZG8gbGF5b3V0XG4gICAgZWRpdG9yRG9tTm9kZS5zdHlsZS5oZWlnaHQgPSBuZXh0SGVpZ2h0ICsgJ3B4JztcbiAgICB0aGlzLnVwZGF0ZUxheW91dCgpO1xuICB9XG5cbiAgcHVibGljIHVwZGF0ZUxheW91dCgpOiB2b2lkIHtcbiAgICB0aGlzLl9lZGl0b3JSZWYubGF5b3V0KCk7XG4gIH1cblxuICBwcml2YXRlIF9kaXNhYmxlU2Nyb2xsKCkge1xuICAgIGNvbnN0IG5vZGUgPSB0aGlzLl9lZGl0b3JSZWYuZ2V0RG9tTm9kZSgpO1xuXG4gICAgbm9kZS5hZGRFdmVudExpc3RlbmVyKCd3aGVlbCcsIChlKSA9PiB7XG4gICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xuICAgIH0sIHRydWUpO1xuICB9XG59XG4iLCI8bmd4LW1vbmFjby1lZGl0b3JcbiAgW25nTW9kZWxdPVwidmFsdWVcIlxuICAobmdNb2RlbENoYW5nZSk9XCJjaGFuZ2VkKCRldmVudClcIlxuICBbb3B0aW9uc109XCJjb25maWdcIlxuICAob25Jbml0KT1cIm9uRWRpdG9ySW5pdCgkZXZlbnQpXCI+XG48L25neC1tb25hY28tZWRpdG9yPlxuIl19
|
|
@@ -3,22 +3,33 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
4
|
import { MonacoEditorModule } from 'ngx-monaco-editor';
|
|
5
5
|
import { FsTextEditorComponent } from './components/text-editor/text-editor.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
export class FsTextEditorModule {
|
|
7
8
|
}
|
|
8
|
-
FsTextEditorModule
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
FsTextEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
|
+
FsTextEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, declarations: [FsTextEditorComponent], imports: [CommonModule,
|
|
11
|
+
MonacoEditorModule,
|
|
12
|
+
FormsModule], exports: [FsTextEditorComponent] });
|
|
13
|
+
FsTextEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, imports: [[
|
|
14
|
+
CommonModule,
|
|
15
|
+
MonacoEditorModule,
|
|
16
|
+
FormsModule,
|
|
17
|
+
]] });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, decorators: [{
|
|
19
|
+
type: NgModule,
|
|
20
|
+
args: [{
|
|
21
|
+
imports: [
|
|
22
|
+
CommonModule,
|
|
23
|
+
MonacoEditorModule,
|
|
24
|
+
FormsModule,
|
|
25
|
+
],
|
|
26
|
+
exports: [
|
|
27
|
+
FsTextEditorComponent,
|
|
28
|
+
],
|
|
29
|
+
entryComponents: [],
|
|
30
|
+
declarations: [
|
|
31
|
+
FsTextEditorComponent,
|
|
32
|
+
]
|
|
33
|
+
}]
|
|
34
|
+
}] });
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnMtdGV4dC1lZGl0b3IubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9mcy10ZXh0LWVkaXRvci5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFF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IHsgRnNUZXh0RWRpdG9yQ29tcG9uZW50IH0gZnJvbSAnLi9jb21wb25lbnRzL3RleHQtZWRpdG9yL3RleHQtZWRpdG9yLmNvbXBvbmVudCc7XG5cbkBOZ01vZHVsZSh7XG4gIGltcG9ydHM6IFtcbiAgICBDb21tb25Nb2R1bGUsXG4gICAgTW9uYWNvRWRpdG9yTW9kdWxlLFxuICAgIEZvcm1zTW9kdWxlLFxuICBdLFxuICBleHBvcnRzOiBbXG4gICAgRnNUZXh0RWRpdG9yQ29tcG9uZW50LFxuICBdLFxuICBlbnRyeUNvbXBvbmVudHM6IFtcbiAgXSxcbiAgZGVjbGFyYXRpb25zOiBbXG4gICAgRnNUZXh0RWRpdG9yQ29tcG9uZW50LFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIEZzVGV4dEVkaXRvck1vZHVsZSB7XG5cbn1cbiJdfQ==
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, forwardRef, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
2
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i2 from '@angular/forms';
|
|
3
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
6
|
+
import * as i1 from 'ngx-monaco-editor';
|
|
4
7
|
import { EditorComponent, MonacoEditorModule } from 'ngx-monaco-editor';
|
|
5
8
|
|
|
6
9
|
class FsTextEditorComponent {
|
|
@@ -106,47 +109,65 @@ class FsTextEditorComponent {
|
|
|
106
109
|
}, true);
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
|
-
FsTextEditorComponent
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
]
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
112
|
+
FsTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
FsTextEditorComponent.ɵcmp = i0.ɵɵ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: [{
|
|
114
|
+
provide: NG_VALUE_ACCESSOR,
|
|
115
|
+
useExisting: forwardRef(() => FsTextEditorComponent),
|
|
116
|
+
multi: true
|
|
117
|
+
}], viewQueries: [{ propertyName: "_editorContainer", first: true, predicate: EditorComponent, descendants: true, static: true }], ngImport: i0, 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.EditorComponent, selector: "ngx-monaco-editor", inputs: ["options", "model"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorComponent, decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{
|
|
121
|
+
selector: 'fs-text-editor',
|
|
122
|
+
templateUrl: 'text-editor.component.html',
|
|
123
|
+
styleUrls: ['text-editor.component.scss'],
|
|
124
|
+
providers: [{
|
|
125
|
+
provide: NG_VALUE_ACCESSOR,
|
|
126
|
+
useExisting: forwardRef(() => FsTextEditorComponent),
|
|
127
|
+
multi: true
|
|
128
|
+
}]
|
|
129
|
+
}]
|
|
130
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { config: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], scrollable: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}], init: [{
|
|
135
|
+
type: Output
|
|
136
|
+
}], blur: [{
|
|
137
|
+
type: Output
|
|
138
|
+
}], _editorContainer: [{
|
|
139
|
+
type: ViewChild,
|
|
140
|
+
args: [EditorComponent, { static: true }]
|
|
141
|
+
}] } });
|
|
131
142
|
|
|
132
143
|
class FsTextEditorModule {
|
|
133
144
|
}
|
|
134
|
-
FsTextEditorModule
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
FsTextEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
146
|
+
FsTextEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, declarations: [FsTextEditorComponent], imports: [CommonModule,
|
|
147
|
+
MonacoEditorModule,
|
|
148
|
+
FormsModule], exports: [FsTextEditorComponent] });
|
|
149
|
+
FsTextEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, imports: [[
|
|
150
|
+
CommonModule,
|
|
151
|
+
MonacoEditorModule,
|
|
152
|
+
FormsModule,
|
|
153
|
+
]] });
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsTextEditorModule, decorators: [{
|
|
155
|
+
type: NgModule,
|
|
156
|
+
args: [{
|
|
157
|
+
imports: [
|
|
158
|
+
CommonModule,
|
|
159
|
+
MonacoEditorModule,
|
|
160
|
+
FormsModule,
|
|
161
|
+
],
|
|
162
|
+
exports: [
|
|
163
|
+
FsTextEditorComponent,
|
|
164
|
+
],
|
|
165
|
+
entryComponents: [],
|
|
166
|
+
declarations: [
|
|
167
|
+
FsTextEditorComponent,
|
|
168
|
+
]
|
|
169
|
+
}]
|
|
170
|
+
}] });
|
|
150
171
|
|
|
151
172
|
/*
|
|
152
173
|
* Public API Surface of fs-menu
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestitch-text-editor.js","sources":["../../src/app/components/text-editor/text-editor.component.ts","../../src/app/fs-text-editor.module.ts","../../src/public_api.ts","../../src/firestitch-text-editor.ts"],"sourcesContent":["import { Component, EventEmitter, forwardRef, Input, OnInit, Output, ViewChild, ElementRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorComponent } from 'ngx-monaco-editor';\n\nimport ICodeEditor = monaco.editor.ICodeEditor;\n\nimport { FsTextEditorConfig } from '../../interfaces/config.interface';\n\n\n@Component({\n selector: 'fs-text-editor',\n templateUrl: 'text-editor.component.html',\n styleUrls: [ 'text-editor.component.scss' ],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FsTextEditorComponent),\n multi: true\n }]\n})\nexport class FsTextEditorComponent implements OnInit, ControlValueAccessor {\n\n @Input() public config: FsTextEditorConfig = {};\n @Input() public scrollable = false;\n\n @Output() public init = new EventEmitter();\n @Output() public blur = new EventEmitter();\n @ViewChild(EditorComponent, { static: true }) _editorContainer: EditorComponent;\n\n public defaultConfig: FsTextEditorConfig = {\n minimap: {\n enabled: false\n },\n theme: 'vs-dark',\n automaticLayout: false,\n scrollBeyondLastLine: false,\n autoHeight: true,\n scrollbar: {\n vertical: 'hidden'\n },\n hideCursorInOverviewRuler: true\n };\n\n public onChange = (_: any) => {};\n public onTouched = () => {};\n\n public get monaco() {\n return (<any>window).monaco;\n };\n\n constructor(private _element: ElementRef) {};\n\n public readonly LINE_HEIGHT = 18;\n\n private _editorRef: ICodeEditor;\n private _value = '';\n\n public ngOnInit() {\n\n if (this.config) {\n this.config = Object.assign({}, this.defaultConfig, this.config);\n }\n }\n\n get value() {\n return this._value;\n }\n\n public onEditorInit(event) {\n // Timeout allows the content to fully load to and calculate height\n setTimeout(() => {\n this._editorRef = event;\n this._initEditor();\n this.init.next(event);\n\n if (!this.scrollable) {\n this._disableScroll();\n }\n });\n }\n\n public writeValue(value: any): void {\n this._value = value || '';\n }\n\n public changed(e) {\n if (this._value !== e) {\n this._value = e;\n this.onChange(e);\n }\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n private _initEditor() {\n if (this._editorRef && this.config.autoHeight) {\n this._updateEditorHeight();\n\n this._editorRef.onDidChangeModelContent((e) => {\n this._updateEditorHeight();\n });\n\n this._editorRef.onDidBlurEditorText(() => {\n this.blur.next();\n });\n }\n }\n\n private _updateEditorHeight() {\n\n const editorDomNode = this._editorRef.getDomNode();\n\n if (!editorDomNode) {\n return;\n }\n\n const container = editorDomNode.getElementsByClassName('view-lines')[0] as HTMLElement;\n const lineHeight = container.firstChild\n ? (container.firstChild as HTMLElement).offsetHeight\n : this.LINE_HEIGHT;\n\n const editorModel = this._editorRef.getModel();\n\n if (!editorModel) {\n return;\n }\n\n const nextHeight = this._editorRef.getModel().getLineCount() * lineHeight;\n\n // set the height and redo layout\n editorDomNode.style.height = nextHeight + 'px';\n this.updateLayout();\n }\n\n public updateLayout(): void {\n this._editorRef.layout();\n }\n\n private _disableScroll() {\n const node = this._editorRef.getDomNode();\n\n node.addEventListener('wheel', (e) => {\n e.stopPropagation();\n }, true);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MonacoEditorModule } from 'ngx-monaco-editor';\nimport { FsTextEditorComponent } from './components/text-editor/text-editor.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MonacoEditorModule,\n FormsModule,\n ],\n exports: [\n FsTextEditorComponent,\n ],\n entryComponents: [\n ],\n declarations: [\n FsTextEditorComponent,\n ]\n})\nexport class FsTextEditorModule {\n\n}\n","/*\n * Public API Surface of fs-menu\n */\n\nimport { from } from 'rxjs';\n\nexport { FsTextEditorModule } from './app/fs-text-editor.module';\n\nexport { FsTextEditorConfig } from './app/interfaces/config.interface';\n\n\nexport { FsTextEditorComponent } from './app/components/text-editor/text-editor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"firestitch-text-editor.js","sources":["../../src/app/components/text-editor/text-editor.component.ts","../../src/app/components/text-editor/text-editor.component.html","../../src/app/fs-text-editor.module.ts","../../src/public_api.ts","../../src/firestitch-text-editor.ts"],"sourcesContent":["import { Component, EventEmitter, forwardRef, Input, OnInit, Output, ViewChild, ElementRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { EditorComponent } from 'ngx-monaco-editor';\n\nimport ICodeEditor = monaco.editor.ICodeEditor;\n\nimport { FsTextEditorConfig } from '../../interfaces/config.interface';\n\n\n@Component({\n selector: 'fs-text-editor',\n templateUrl: 'text-editor.component.html',\n styleUrls: [ 'text-editor.component.scss' ],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FsTextEditorComponent),\n multi: true\n }]\n})\nexport class FsTextEditorComponent implements OnInit, ControlValueAccessor {\n\n @Input() public config: FsTextEditorConfig = {};\n @Input() public scrollable = false;\n\n @Output() public init = new EventEmitter();\n @Output() public blur = new EventEmitter();\n @ViewChild(EditorComponent, { static: true }) _editorContainer: EditorComponent;\n\n public defaultConfig: FsTextEditorConfig = {\n minimap: {\n enabled: false\n },\n theme: 'vs-dark',\n automaticLayout: false,\n scrollBeyondLastLine: false,\n autoHeight: true,\n scrollbar: {\n vertical: 'hidden'\n },\n hideCursorInOverviewRuler: true\n };\n\n public onChange = (_: any) => {};\n public onTouched = () => {};\n\n public get monaco() {\n return (<any>window).monaco;\n };\n\n constructor(private _element: ElementRef) {};\n\n public readonly LINE_HEIGHT = 18;\n\n private _editorRef: ICodeEditor;\n private _value = '';\n\n public ngOnInit() {\n\n if (this.config) {\n this.config = Object.assign({}, this.defaultConfig, this.config);\n }\n }\n\n get value() {\n return this._value;\n }\n\n public onEditorInit(event) {\n // Timeout allows the content to fully load to and calculate height\n setTimeout(() => {\n this._editorRef = event;\n this._initEditor();\n this.init.next(event);\n\n if (!this.scrollable) {\n this._disableScroll();\n }\n });\n }\n\n public writeValue(value: any): void {\n this._value = value || '';\n }\n\n public changed(e) {\n if (this._value !== e) {\n this._value = e;\n this.onChange(e);\n }\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n private _initEditor() {\n if (this._editorRef && this.config.autoHeight) {\n this._updateEditorHeight();\n\n this._editorRef.onDidChangeModelContent((e) => {\n this._updateEditorHeight();\n });\n\n this._editorRef.onDidBlurEditorText(() => {\n this.blur.next();\n });\n }\n }\n\n private _updateEditorHeight() {\n\n const editorDomNode = this._editorRef.getDomNode();\n\n if (!editorDomNode) {\n return;\n }\n\n const container = editorDomNode.getElementsByClassName('view-lines')[0] as HTMLElement;\n const lineHeight = container.firstChild\n ? (container.firstChild as HTMLElement).offsetHeight\n : this.LINE_HEIGHT;\n\n const editorModel = this._editorRef.getModel();\n\n if (!editorModel) {\n return;\n }\n\n const nextHeight = this._editorRef.getModel().getLineCount() * lineHeight;\n\n // set the height and redo layout\n editorDomNode.style.height = nextHeight + 'px';\n this.updateLayout();\n }\n\n public updateLayout(): void {\n this._editorRef.layout();\n }\n\n private _disableScroll() {\n const node = this._editorRef.getDomNode();\n\n node.addEventListener('wheel', (e) => {\n e.stopPropagation();\n }, true);\n }\n}\n","<ngx-monaco-editor\n [ngModel]=\"value\"\n (ngModelChange)=\"changed($event)\"\n [options]=\"config\"\n (onInit)=\"onEditorInit($event)\">\n</ngx-monaco-editor>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MonacoEditorModule } from 'ngx-monaco-editor';\nimport { FsTextEditorComponent } from './components/text-editor/text-editor.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MonacoEditorModule,\n FormsModule,\n ],\n exports: [\n FsTextEditorComponent,\n ],\n entryComponents: [\n ],\n declarations: [\n FsTextEditorComponent,\n ]\n})\nexport class FsTextEditorModule {\n\n}\n","/*\n * Public API Surface of fs-menu\n */\n\nimport { from } from 'rxjs';\n\nexport { FsTextEditorModule } from './app/fs-text-editor.module';\n\nexport { FsTextEditorConfig } from './app/interfaces/config.interface';\n\n\nexport { FsTextEditorComponent } from './app/components/text-editor/text-editor.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAmBa,qBAAqB;IA8BhC,YAAoB,QAAoB;QAApB,aAAQ,GAAR,QAAQ,CAAY;QA5BxB,WAAM,GAAuB,EAAE,CAAC;QAChC,eAAU,GAAG,KAAK,CAAC;QAElB,SAAI,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1B,SAAI,GAAG,IAAI,YAAY,EAAE,CAAC;QAGpC,kBAAa,GAAuB;YACzC,OAAO,EAAE;gBACP,OAAO,EAAE,KAAK;aACf;YACD,KAAK,EAAE,SAAS;YAChB,eAAe,EAAE,KAAK;YACtB,oBAAoB,EAAE,KAAK;YAC3B,UAAU,EAAE,IAAI;YAChB,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|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Firestitch/ngx-text-editor"
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"esm2015": "esm2015/firestitch-text-editor.js",
|
|
27
27
|
"fesm2015": "fesm2015/firestitch-text-editor.js",
|
|
28
28
|
"typings": "firestitch-text-editor.d.ts",
|
|
29
|
-
"metadata": "firestitch-text-editor.metadata.json",
|
|
30
29
|
"dependencies": {
|
|
31
30
|
"tslib": "^2.2.0"
|
|
32
31
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"FsTextEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":9,"character":4},{"__symbolic":"reference","module":"ngx-monaco-editor","name":"MonacoEditorModule","line":10,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":11,"character":4}],"exports":[{"__symbolic":"reference","name":"FsTextEditorComponent"}],"entryComponents":[],"declarations":[{"__symbolic":"reference","name":"FsTextEditorComponent"}]}]}],"members":{}},"FsTextEditorConfig":{"__symbolic":"interface"},"FsTextEditorComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"fs-text-editor","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":14,"character":13},"useExisting":{"__symbolic":"reference","name":"FsTextEditorComponent"},"multi":true}],"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"]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"scrollable":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}}]}],"init":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":24,"character":3}}]}],"blur":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":25,"character":3}}]}],"_editorContainer":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":26,"character":3},"arguments":[{"__symbolic":"reference","module":"ngx-monaco-editor","name":"EditorComponent","line":26,"character":13},{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":49,"character":32}]}],"ngOnInit":[{"__symbolic":"method"}],"onEditorInit":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"changed":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"_initEditor":[{"__symbolic":"method"}],"_updateEditorHeight":[{"__symbolic":"method"}],"updateLayout":[{"__symbolic":"method"}],"_disableScroll":[{"__symbolic":"method"}]}}},"origins":{"FsTextEditorModule":"./app/fs-text-editor.module","FsTextEditorConfig":"./app/interfaces/config.interface","FsTextEditorComponent":"./app/components/text-editor/text-editor.component"},"importAs":"@firestitch/text-editor"}
|