angular-monaco-editor
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -6,3 +6,4 @@ /** | ||
export { AngularMonacoEditorComponent as ɵb, CODE_EDITOR_INPUT_VALUE_ACCESSOR as ɵa } from './lib/editor/angular-monaco-editor/angular-monaco-editor.component'; | ||
export { BaseMonacoEditor as ɵc } from './lib/editor/base-monaco-editor'; | ||
export { CodeEditorEventService as ɵd } from './lib/editor/services/code-editor.event.service'; | ||
export { BaseMonacoEditor as ɵc } from './lib/editor/model/base-monaco-editor'; | ||
export { AngularMonacoEditorService as ɵe } from './lib/editor/service/angular-monaco-editor.service'; | ||
export { CodeEditorEventService as ɵd } from './lib/editor/service/code-editor.event.service'; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"AngularMonacoEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":4}],"declarations":[{"__symbolic":"reference","name":"ɵb"}],"exports":[{"__symbolic":"reference","name":"ɵb"}],"providers":[]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"AngularMonacoEditorModule"},"providers":[{"provide":{"__symbolic":"reference","name":"ANGULAR_MONACO_EDITOR_CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"ANGULAR_MONACO_EDITOR_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":48},"arguments":["ANGULAR_MONACO_EDITOR_CONFIG"]},"AngularMonacoEditorConfig":{"__symbolic":"interface"},"AngularEditorModel":{"__symbolic":"interface"},"ɵa":{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":16,"character":11},"useExisting":{"__symbolic":"reference","name":"ɵb"},"multi":true},"ɵb":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵc"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":21,"character":1},"arguments":[{"selector":"angular-monaco-editor","template":"<div class=\"editor\" #codeEditor></div>","styles":[":host{display:block;min-height:200px}.editor{width:100%;height:100%}"],"providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵd"}]}]}],"members":{"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3},"arguments":["model"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":89},"arguments":[{"__symbolic":"reference","name":"ANGULAR_MONACO_EDITOR_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":49,"character":28},{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"AngularMonacoEditorConfig"}]}],"initMonaco":[{"__symbolic":"method"}],"acitveModelMarkers":[{"__symbolic":"method"}],"refreshLayoutWhenWindowResize":[{"__symbolic":"method"}],"onChangeModelContentHandler":[{"__symbolic":"method"}],"onBlurEditorTextHandler":[{"__symbolic":"method"}],"onLayoutChangeHandler":[{"__symbolic":"method"}],"localEditor":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","members":{"_editorComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":24,"character":3},"arguments":["codeEditor"]}]}],"onInit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":27,"character":3}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3},"arguments":["options"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"AngularMonacoEditorConfig"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initMonaco":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"addEvent":[{"__symbolic":"method"}],"fireEvent":[{"__symbolic":"method"}]}}},"origins":{"AngularMonacoEditorModule":"./lib/editor/editor.module","ANGULAR_MONACO_EDITOR_CONFIG":"./lib/editor/config","AngularMonacoEditorConfig":"./lib/editor/config","AngularEditorModel":"./lib/editor/types","ɵa":"./lib/editor/angular-monaco-editor/angular-monaco-editor.component","ɵb":"./lib/editor/angular-monaco-editor/angular-monaco-editor.component","ɵc":"./lib/editor/base-monaco-editor","ɵd":"./lib/editor/services/code-editor.event.service"},"importAs":"angular-monaco-editor"} | ||
{"__symbolic":"module","version":4,"metadata":{"AngularMonacoEditorModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":4}],"declarations":[{"__symbolic":"reference","name":"ɵb"}],"exports":[{"__symbolic":"reference","name":"ɵb"}],"providers":[]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"defaults":[{}],"value":{"ngModule":{"__symbolic":"reference","name":"AngularMonacoEditorModule"},"providers":[{"provide":{"__symbolic":"reference","name":"ANGULAR_MONACO_EDITOR_CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}}]}}}},"ANGULAR_MONACO_EDITOR_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":4,"character":48},"arguments":["ANGULAR_MONACO_EDITOR_CONFIG"]},"AngularMonacoEditorConfig":{"__symbolic":"interface"},"AngularEditorModel":{"__symbolic":"interface"},"ɵa":{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":18,"character":11},"useExisting":{"__symbolic":"reference","name":"ɵb"},"multi":true},"ɵb":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"ɵc"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"angular-monaco-editor","template":"<div class=\"editor\" #codeEditor></div>","styles":[":host{display:block;min-height:200px}.editor{width:100%;height:100%}"],"providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵd"}]}]}],"members":{"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3},"arguments":["model"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":55,"character":5},"arguments":[{"__symbolic":"reference","name":"ANGULAR_MONACO_EDITOR_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","name":"ɵe"},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":53,"character":18},{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"AngularMonacoEditorConfig"}]}],"initMonaco":[{"__symbolic":"method"}],"refreshLayoutWhenWindowResize":[{"__symbolic":"method"}],"onChangeModelContentHandler":[{"__symbolic":"method"}],"onBlurEditorTextHandler":[{"__symbolic":"method"}],"onLayoutChangeHandler":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","members":{"_editorComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":17,"character":3},"arguments":["codeEditor"]}]}],"onInit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":20,"character":3}}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3},"arguments":["options"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵd"},{"__symbolic":"reference","name":"AngularMonacoEditorConfig"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initMonaco":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"addEvent":[{"__symbolic":"method"}],"fireEvent":[{"__symbolic":"method"}]}},"ɵe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"handleModelMarkers":[{"__symbolic":"method"}]}}},"origins":{"AngularMonacoEditorModule":"./lib/editor/editor.module","ANGULAR_MONACO_EDITOR_CONFIG":"./lib/editor/model/config","AngularMonacoEditorConfig":"./lib/editor/model/config","AngularEditorModel":"./lib/editor/model/types","ɵa":"./lib/editor/angular-monaco-editor/angular-monaco-editor.component","ɵb":"./lib/editor/angular-monaco-editor/angular-monaco-editor.component","ɵc":"./lib/editor/model/base-monaco-editor","ɵd":"./lib/editor/service/code-editor.event.service","ɵe":"./lib/editor/service/angular-monaco-editor.service"},"importAs":"angular-monaco-editor"} |
@@ -119,17 +119,2 @@ (function (global, factory) { | ||
} | ||
Object.defineProperty(BaseMonacoEditor.prototype, "editor", { | ||
get: /** | ||
* @return {?} | ||
*/ function () { | ||
return this._editor; | ||
}, | ||
set: /** | ||
* @param {?} value | ||
* @return {?} | ||
*/ function (value) { | ||
this._editor = value; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(BaseMonacoEditor.prototype, "options", { | ||
@@ -145,3 +130,3 @@ get: /** | ||
*/ function (options) { | ||
// default options(this.config.defaultOptions) + custom options(options) | ||
// 默认options(this.config.defaultOptions) + 自定义options(options) | ||
this._options = Object.assign({}, this.config.defaultOptions, options); | ||
@@ -230,2 +215,45 @@ if (this._editor) { | ||
*/ | ||
var AngularMonacoEditorService = (function () { | ||
function AngularMonacoEditorService() { | ||
this._existError = false; | ||
} | ||
Object.defineProperty(AngularMonacoEditorService.prototype, "existError", { | ||
get: /** | ||
* @return {?} | ||
*/ function () { | ||
return this._existError; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorService.prototype.handleModelMarkers = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
var /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) ; | ||
else { | ||
// there are errors | ||
self._existError = true; | ||
} | ||
}; | ||
}; | ||
AngularMonacoEditorService.decorators = [ | ||
{ type: core.Injectable }, | ||
]; | ||
return AngularMonacoEditorService; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
// 自定义输入控件:1.封装ControlValueAccessor | ||
// https://code-examples.net/zh-CN/q/2154761 | ||
@@ -241,4 +269,5 @@ var /** @type {?} */ CODE_EDITOR_INPUT_VALUE_ACCESSOR = { | ||
// tslint:disable-next-line:max-line-length | ||
function AngularMonacoEditorComponent(zone, editorEventService, angularEditorconfig) { | ||
function AngularMonacoEditorComponent(angularMonacoEditorService, zone, editorEventService, angularEditorconfig) { | ||
var _this = _super.call(this, editorEventService, angularEditorconfig) || this; | ||
_this.angularMonacoEditorService = angularMonacoEditorService; | ||
_this.zone = zone; | ||
@@ -248,3 +277,2 @@ _this.editorEventService = editorEventService; | ||
_this._value = ''; | ||
_this._errorInModelMarker = false; | ||
// ControlValueAccessor提供的事件回调 | ||
@@ -264,4 +292,4 @@ _this.onControlValueChange = function (_) { | ||
this.options.model = model; | ||
if (this.editor) { | ||
this.editor.dispose(); | ||
if (this._editor) { | ||
this._editor.dispose(); | ||
this.initMonaco(this.options); | ||
@@ -273,11 +301,2 @@ } | ||
}); | ||
Object.defineProperty(AngularMonacoEditorComponent.prototype, "errorInModelMarker", { | ||
get: /** | ||
* @return {?} | ||
*/ function () { | ||
return this._errorInModelMarker; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -294,14 +313,13 @@ * @param {?} options | ||
var /** @type {?} */ hasModel = !!options.model; | ||
var /** @type {?} */ acitveMarkers = !!options.acitveMarkers; //自定义option | ||
if (hasModel) { | ||
options.model = monaco.editor.createModel(options.model.value, options.model.language, options.model.uri); | ||
} | ||
this.editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
this._editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
if (!hasModel) { | ||
this.editor.setValue(this._value); | ||
this._editor.setValue(this._value); | ||
} | ||
// monaco editor -> outside component | ||
this.editor.onDidChangeModelContent(function (e) { return _this.onChangeModelContentHandler(e); }); | ||
this.editor.onDidBlurEditorText(function (e) { return _this.onBlurEditorTextHandler(e); }); | ||
this.editor.onDidLayoutChange(function (e) { return _this.onLayoutChangeHandler(e); }); | ||
this._editor.onDidChangeModelContent(function (e) { return _this.onChangeModelContentHandler(e); }); | ||
this._editor.onDidBlurEditorText(function (e) { return _this.onBlurEditorTextHandler(e); }); | ||
this._editor.onDidLayoutChange(function (e) { return _this.onLayoutChangeHandler(e); }); | ||
// refresh layout on resize event. | ||
@@ -312,34 +330,9 @@ this.refreshLayoutWhenWindowResize(); | ||
target: this, | ||
editor: this.editor | ||
editor: this._editor | ||
}); | ||
// active model markers | ||
if (hasModel && acitveMarkers) { | ||
this.acitveModelMarkers(); | ||
if (hasModel) { | ||
this.angularMonacoEditorService.handleModelMarkers(); | ||
} | ||
}; | ||
/** | ||
* Acitve Model markers to get markers' results | ||
*/ | ||
/** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorComponent.prototype.acitveModelMarkers = /** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
function () { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
var /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) ; | ||
else { | ||
// there are errors | ||
self._errorInModelMarker = true; | ||
} | ||
}; | ||
}; | ||
/** | ||
* refresh layout when resized the window | ||
@@ -362,3 +355,3 @@ */ | ||
// https://www.jianshu.com/p/46894deb870a | ||
this._windowResizeSubscription = fromEvent.fromEvent(window, 'resize').subscribe(function () { return _this.editor.layout(); }); | ||
this._windowResizeSubscription = fromEvent.fromEvent(window, 'resize').subscribe(function () { return _this._editor.layout(); }); | ||
}; | ||
@@ -375,3 +368,3 @@ /** | ||
var _this = this; | ||
var /** @type {?} */ _value = this.editor.getValue(); | ||
var /** @type {?} */ _value = this._editor.getValue(); | ||
// monaco editor -> outside component | ||
@@ -424,12 +417,3 @@ // https://github.com/JTangming/tm/issues/4 ngZone详解 | ||
}); | ||
/** | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorComponent.prototype.localEditor = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
// Demo: outside component -> monaco editor | ||
this.writeValue('test'); | ||
}; | ||
// 自定义输入控件:3.2 implements ControlValueAccesso | ||
// outside component -> monaco editor | ||
@@ -448,6 +432,6 @@ // From ControlValueAccessor interface | ||
self.value = value || ''; | ||
// Fix for value change while dispose in process | ||
// Fix for value change while dispose in process. | ||
setTimeout(function () { | ||
if (self.editor /*&& !this.options.model*/) { | ||
self.editor.setValue(self._value); | ||
if (self._editor /*&& !this.options.model*/) { | ||
self._editor.setValue(self._value); | ||
} | ||
@@ -486,3 +470,7 @@ }); | ||
styles: [":host{display:block;min-height:200px}.editor{width:100%;height:100%}"], | ||
providers: [CODE_EDITOR_INPUT_VALUE_ACCESSOR, CodeEditorEventService] | ||
// 自定义输入控件:2.引入依赖服务ControlValueAccessor | ||
providers: [ | ||
CODE_EDITOR_INPUT_VALUE_ACCESSOR, | ||
CodeEditorEventService | ||
] | ||
},] }, | ||
@@ -493,2 +481,3 @@ ]; | ||
return [ | ||
{ type: AngularMonacoEditorService, }, | ||
{ type: core.NgZone, }, | ||
@@ -563,2 +552,3 @@ { type: CodeEditorEventService, }, | ||
exports.ɵc = BaseMonacoEditor; | ||
exports.ɵe = AngularMonacoEditorService; | ||
exports.ɵd = CodeEditorEventService; | ||
@@ -570,2 +560,2 @@ | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1tb25hY28tZWRpdG9yLnVtZC5qcy5tYXAiLCJzb3VyY2VzIjpbIm5nOi8vYW5ndWxhci1tb25hY28tZWRpdG9yL2xpYi9lZGl0b3IvY29uZmlnLnRzIixudWxsLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL2NvbnN0YW50cy9ldmVudHMudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL3NlcnZpY2VzL2NvZGUtZWRpdG9yLmV2ZW50LnNlcnZpY2UudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL2Jhc2UtbW9uYWNvLWVkaXRvci50cyIsIm5nOi8vYW5ndWxhci1tb25hY28tZWRpdG9yL2xpYi9lZGl0b3IvYW5ndWxhci1tb25hY28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sxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWY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RBbWRMb2FkZXI6IGFueSA9ICgpID0+IHtcbiAgICAgICAgICAvLyBMb2FkIG1vbmFjb1xuICAgICAgICAgICg8YW55PndpbmRvdykucmVxdWlyZS5jb25maWcoeyBwYXRoczogeyAndnMnOiBgJHtiYXNlVXJsfS9tb25hY28vdnNgIH0gfSk7XG4gICAgICAgICAgKDxhbnk+d2luZG93KS5yZXF1aXJlKFsndnMvZWRpdG9yL2VkaXRvci5tYWluJ10sICgpID0+IHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpcy5jb25maWcub25Nb25hY29Mb2FkID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgIHRoaXMuY29uZmlnLm9uTW9uYWNvTG9hZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5pbml0TW9uYWNvKHRoaXMub3B0aW9ucyk7XG4gICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gTG9hZCBBTUQgbG9hZGVyIGlmIG5lY2Vzc2FyeVxuICAgICAgICBpZiAoISg8YW55PndpbmRvdykucmVxdWlyZSkge1xuICAgICAgICAgIGNvbnN0IGxvYWRlclNjcmlwdDogSFRNTFNjcmlwdEVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzY3JpcHQnKTtcbiAgICAgICAgICBsb2FkZXJTY3JpcHQudHlwZSA9ICd0ZXh0L2phdmFzY3JpcHQnO1xuICAgICAgICAgIGxvYWRlclNjcmlwdC5zcmMgPSBgJHtiYXNlVXJsfS9tb25hY28vdnMvbG9hZGVyLmpzYDtcbiAgICAgICAgICBsb2FkZXJTY3JpcHQuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsIG9uR290QW1kTG9hZGVyKTtcbiAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKGxvYWRlclNjcmlwdCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICA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gIGhhbmRsZU1vZGVsTWFya2VycygpIHtcclxuICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL01pY3Jvc29mdC9tb25hY28tZWRpdG9yL2lzc3Vlcy8zMFxyXG4gICAgICAgIGNvbnN0IHNldE1vZGVsTWFya2VycyA9IG1vbmFjby5lZGl0b3Iuc2V0TW9kZWxNYXJrZXJzO1xyXG4gICAgICAgIG1vbmFjby5lZGl0b3Iuc2V0TW9kZWxNYXJrZXJzID0gZnVuY3Rpb24gKG1vZGVsLCBvd25lciwgbWFya2Vycykge1xyXG4gICAgICAgICAgICBzZXRNb2RlbE1hcmtlcnMuY2FsbChtb25hY28uZWRpdG9yLCBtb2RlbCwgb3duZXIsIG1hcmtlcnMpO1xyXG4gICAgICAgICAgICBpZiAobWFya2Vycy5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgICAgIC8vIHRoZXJlIGFyZSBubyBlcnJvcnMoc3lueCBlcnJvciBhbmQgdmFsaWRhdGUgZXJyb3IpXHJcbiAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZygnY29udGludWUnKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIC8vIHRoZXJlIGFyZSBlcnJvcnNcclxuICAgICAgICAgICAgICAgIHNlbGYuX2V4aXN0RXJyb3IgPSB0cnVlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgIH1cclxufVxyXG4iLCJpbXBvcnQgeyBDb21wb25lbnQsIElucHV0LCBPdXRwdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IGZvcndhcmRSZWYsIEluamVjdCwgTmdab25lIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBDb250cm9sVmFsdWVBY2Nlc3NvciwgTkdfVkFMVUVfQUNDRVNTT1IgfSBmcm9tICdAYW5ndWxhci9mb3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QUFNO3dCQUsxQixzQkFBc0I7d0RBaUQxQkMsV0FBTSxTQUFDLDRCQUE0Qjs7Ozs4QkFmckNQLFVBQUssU0FBQyxPQUFPOzsyQ0F4Q2hCO01Bc0NrRCxnQkFBZ0I7Ozs7OztBQ3RDbEU7Ozs7Ozs7UUFxQmdCLGlDQUFPOzs7O3NCQUFDLE1BQXNDO2dCQUF0Qyx1QkFBQTtvQkFBQSxXQUFzQzs7Z0JBQzFELE9BQU87b0JBQ0wsUUFBUSxFQUFFLHlCQUF5QjtvQkFDbkMsU0FBUyxFQUFFO3dCQUNULEVBQUUsT0FBTyxFQUFFLDRCQUE0QixFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUU7cUJBQzVEO2lCQUNGLENBQUM7OztvQkFyQkxRLGFBQVEsU0FBQzt3QkFDUixPQUFPLEVBQUU7NEJBQ1BDLG1CQUFZO3lCQUNiO3dCQUNELFlBQVksRUFBRTs0QkFDWiw0QkFBNEI7eUJBQzdCO3dCQUNELE9BQU8sRUFBRTs0QkFDUCw0QkFBNEI7eUJBQzdCO3dCQUNELFNBQVMsRUFBRSxFQUNWO3FCQUNGOzt3Q0FsQkQ7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9 |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("lodash"),require("@angular/forms"),require("rxjs/observable/fromEvent"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-monaco-editor",["exports","@angular/core","lodash","@angular/forms","rxjs/observable/fromEvent","@angular/common"],t):t(e["angular-monaco-editor"]={},e.ng.core,null,e.ng.forms,e.rxjs["observable/fromEvent"],e.ng.common)}(this,function(e,i,r,t,o,n){"use strict";var s=new i.InjectionToken("ANGULAR_MONACO_EDITOR_CONFIG"),a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};var u,c={onInit:"onInit"},d=function(){function e(){this.eventNames=Object.keys(c),this._events={}}return e.prototype.addEvent=function(e){r.assign(this._events,e)},e.prototype.fireEvent=function(e){this._events[e.eventName].emit(e)},e.decorators=[{type:i.Injectable}],e}(),l=!1,p=function(){function e(o,e){this.codeEditorEventService=o,this.config=e;var n=this;o.eventNames.forEach(function(e){n[e]=new i.EventEmitter;var t=r.pick(n,e);o.addEvent(t)})}return Object.defineProperty(e.prototype,"editor",{get:function(){return this._editor},set:function(e){this._editor=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=Object.assign({},this.config.defaultOptions,e),this._editor&&(this._editor.dispose(),this.initMonaco(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var r=this;l?u.then(function(){r.initMonaco(r.options)}):(l=!0,u=new Promise(function(e){var t=r.config.baseUrl||"/assets",o=function(){window.require.config({paths:{vs:t+"/monaco/vs"}}),window.require(["vs/editor/editor.main"],function(){"function"==typeof r.config.onMonacoLoad&&r.config.onMonacoLoad(),r.initMonaco(r.options),e()})};if(window.require)o();else{var n=document.createElement("script");n.type="text/javascript",n.src=t+"/monaco/vs/loader.js",n.addEventListener("load",o),document.body.appendChild(n)}}))},e.prototype.ngOnDestroy=function(){this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._editor&&(this._editor.dispose(),this._editor=undefined)},e.propDecorators={_editorComponent:[{type:i.ViewChild,args:["codeEditor"]}],onInit:[{type:i.Output}],options:[{type:i.Input,args:["options"]}]},e}(),f={provide:t.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return h}),multi:!0},h=function(r){function e(e,t,o){var n=r.call(this,t,o)||this;return n.zone=e,n.editorEventService=t,n.angularEditorconfig=o,n._value="",n._errorInModelMarker=!1,n.onControlValueChange=function(e){},n.onControlTouched=function(){},n}return function n(e,t){function o(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(e,r),Object.defineProperty(e.prototype,"model",{set:function(e){this.options.model=e,this.editor&&(this.editor.dispose(),this.initMonaco(this.options))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errorInModelMarker",{get:function(){return this._errorInModelMarker},enumerable:!0,configurable:!0}),e.prototype.initMonaco=function(e){var t=this,o=!!e.model,n=!!e.acitveMarkers;o&&(e.model=monaco.editor.createModel(e.model.value,e.model.language,e.model.uri)),this.editor=monaco.editor.create(this._editorComponent.nativeElement,e),o||this.editor.setValue(this._value),this.editor.onDidChangeModelContent(function(e){return t.onChangeModelContentHandler(e)}),this.editor.onDidBlurEditorText(function(e){return t.onBlurEditorTextHandler(e)}),this.editor.onDidLayoutChange(function(e){return t.onLayoutChangeHandler(e)}),this.refreshLayoutWhenWindowResize(),this.editorEventService.fireEvent({eventName:c.onInit,target:this,editor:this.editor}),o&&n&&this.acitveModelMarkers()},e.prototype.acitveModelMarkers=function(){var n=this,r=monaco.editor.setModelMarkers;monaco.editor.setModelMarkers=function(e,t,o){r.call(monaco.editor,e,t,o),0===o.length||(n._errorInModelMarker=!0)}},e.prototype.refreshLayoutWhenWindowResize=function(){var e=this;this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._windowResizeSubscription=o.fromEvent(window,"resize").subscribe(function(){return e.editor.layout()})},e.prototype.onChangeModelContentHandler=function(e){var t=this,o=this.editor.getValue();this.zone.run(function(){return t.value=o})},e.prototype.onBlurEditorTextHandler=function(e){this.onControlTouched()},e.prototype.onLayoutChangeHandler=function(e){console.log("Layout changed:\n"+e)},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){e!==this.value&&(this._value=e),this.onControlValueChange(this.value)},enumerable:!0,configurable:!0}),e.prototype.localEditor=function(){this.writeValue("test")},e.prototype.writeValue=function(e){var t=this;t.value=e||"",setTimeout(function(){t.editor&&t.editor.setValue(t._value)})},e.prototype.registerOnChange=function(e){this.onControlValueChange=e},e.prototype.registerOnTouched=function(e){this.onControlTouched=e},e.decorators=[{type:i.Component,args:[{selector:"angular-monaco-editor",template:'<div class="editor" #codeEditor></div>',styles:[":host{display:block;min-height:200px}.editor{width:100%;height:100%}"],providers:[f,d]}]}],e.ctorParameters=function(){return[{type:i.NgZone},{type:d},{type:undefined,decorators:[{type:i.Inject,args:[s]}]}]},e.propDecorators={model:[{type:i.Input,args:["model"]}]},e}(p),v=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:s,useValue:e}]}},t.decorators=[{type:i.NgModule,args:[{imports:[n.CommonModule],declarations:[h],exports:[h],providers:[]}]}],t}();e.AngularMonacoEditorModule=v,e.ANGULAR_MONACO_EDITOR_CONFIG=s,e.ɵb=h,e.ɵa=f,e.ɵc=p,e.ɵd=d,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("lodash"),require("@angular/forms"),require("rxjs/observable/fromEvent"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-monaco-editor",["exports","@angular/core","lodash","@angular/forms","rxjs/observable/fromEvent","@angular/common"],t):t(e["angular-monaco-editor"]={},e.ng.core,null,e.ng.forms,e.rxjs["observable/fromEvent"],e.ng.common)}(this,function(e,r,i,t,o,n){"use strict";var s=new r.InjectionToken("ANGULAR_MONACO_EDITOR_CONFIG"),a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};var u,c={onInit:"onInit"},d=function(){function e(){this.eventNames=Object.keys(c),this._events={}}return e.prototype.addEvent=function(e){i.assign(this._events,e)},e.prototype.fireEvent=function(e){this._events[e.eventName].emit(e)},e.decorators=[{type:r.Injectable}],e}(),l=!1,p=function(){function e(o,e){this.codeEditorEventService=o,this.config=e;var n=this;o.eventNames.forEach(function(e){n[e]=new r.EventEmitter;var t=i.pick(n,e);o.addEvent(t)})}return Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(e){this._options=Object.assign({},this.config.defaultOptions,e),this._editor&&(this._editor.dispose(),this.initMonaco(e))},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var r=this;l?u.then(function(){r.initMonaco(r.options)}):(l=!0,u=new Promise(function(e){var t=r.config.baseUrl||"/assets",o=function(){window.require.config({paths:{vs:t+"/monaco/vs"}}),window.require(["vs/editor/editor.main"],function(){"function"==typeof r.config.onMonacoLoad&&r.config.onMonacoLoad(),r.initMonaco(r.options),e()})};if(window.require)o();else{var n=document.createElement("script");n.type="text/javascript",n.src=t+"/monaco/vs/loader.js",n.addEventListener("load",o),document.body.appendChild(n)}}))},e.prototype.ngOnDestroy=function(){this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._editor&&(this._editor.dispose(),this._editor=undefined)},e.propDecorators={_editorComponent:[{type:r.ViewChild,args:["codeEditor"]}],onInit:[{type:r.Output}],options:[{type:r.Input,args:["options"]}]},e}(),f=function(){function e(){this._existError=!1}return Object.defineProperty(e.prototype,"existError",{get:function(){return this._existError},enumerable:!0,configurable:!0}),e.prototype.handleModelMarkers=function(){var n=this,r=monaco.editor.setModelMarkers;monaco.editor.setModelMarkers=function(e,t,o){r.call(monaco.editor,e,t,o),0===o.length||(n._existError=!0)}},e.decorators=[{type:r.Injectable}],e}(),h={provide:t.NG_VALUE_ACCESSOR,useExisting:r.forwardRef(function(){return v}),multi:!0},v=function(i){function e(e,t,o,n){var r=i.call(this,o,n)||this;return r.angularMonacoEditorService=e,r.zone=t,r.editorEventService=o,r.angularEditorconfig=n,r._value="",r.onControlValueChange=function(e){},r.onControlTouched=function(){},r}return function n(e,t){function o(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(e,i),Object.defineProperty(e.prototype,"model",{set:function(e){this.options.model=e,this._editor&&(this._editor.dispose(),this.initMonaco(this.options))},enumerable:!0,configurable:!0}),e.prototype.initMonaco=function(e){var t=this,o=!!e.model;o&&(e.model=monaco.editor.createModel(e.model.value,e.model.language,e.model.uri)),this._editor=monaco.editor.create(this._editorComponent.nativeElement,e),o||this._editor.setValue(this._value),this._editor.onDidChangeModelContent(function(e){return t.onChangeModelContentHandler(e)}),this._editor.onDidBlurEditorText(function(e){return t.onBlurEditorTextHandler(e)}),this._editor.onDidLayoutChange(function(e){return t.onLayoutChangeHandler(e)}),this.refreshLayoutWhenWindowResize(),this.editorEventService.fireEvent({eventName:c.onInit,target:this,editor:this._editor}),o&&this.angularMonacoEditorService.handleModelMarkers()},e.prototype.refreshLayoutWhenWindowResize=function(){var e=this;this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._windowResizeSubscription=o.fromEvent(window,"resize").subscribe(function(){return e._editor.layout()})},e.prototype.onChangeModelContentHandler=function(e){var t=this,o=this._editor.getValue();this.zone.run(function(){return t.value=o})},e.prototype.onBlurEditorTextHandler=function(e){this.onControlTouched()},e.prototype.onLayoutChangeHandler=function(e){console.log("Layout changed:\n"+e)},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){e!==this.value&&(this._value=e),this.onControlValueChange(this.value)},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){var t=this;t.value=e||"",setTimeout(function(){t._editor&&t._editor.setValue(t._value)})},e.prototype.registerOnChange=function(e){this.onControlValueChange=e},e.prototype.registerOnTouched=function(e){this.onControlTouched=e},e.decorators=[{type:r.Component,args:[{selector:"angular-monaco-editor",template:'<div class="editor" #codeEditor></div>',styles:[":host{display:block;min-height:200px}.editor{width:100%;height:100%}"],providers:[h,d]}]}],e.ctorParameters=function(){return[{type:f},{type:r.NgZone},{type:d},{type:undefined,decorators:[{type:r.Inject,args:[s]}]}]},e.propDecorators={model:[{type:r.Input,args:["model"]}]},e}(p),g=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={}),{ngModule:t,providers:[{provide:s,useValue:e}]}},t.decorators=[{type:r.NgModule,args:[{imports:[n.CommonModule],declarations:[v],exports:[v],providers:[]}]}],t}();e.AngularMonacoEditorModule=g,e.ANGULAR_MONACO_EDITOR_CONFIG=s,e.ɵb=v,e.ɵa=h,e.ɵc=p,e.ɵe=f,e.ɵd=d,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=angular-monaco-editor.umd.min.js.map |
@@ -10,5 +10,6 @@ /** | ||
export { AngularMonacoEditorComponent as ɵb, CODE_EDITOR_INPUT_VALUE_ACCESSOR as ɵa } from './lib/editor/angular-monaco-editor/angular-monaco-editor.component'; | ||
export { BaseMonacoEditor as ɵc } from './lib/editor/base-monaco-editor'; | ||
export { CodeEditorEventService as ɵd } from './lib/editor/services/code-editor.event.service'; | ||
export { BaseMonacoEditor as ɵc } from './lib/editor/model/base-monaco-editor'; | ||
export { AngularMonacoEditorService as ɵe } from './lib/editor/service/angular-monaco-editor.service'; | ||
export { CodeEditorEventService as ɵd } from './lib/editor/service/code-editor.event.service'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1tb25hY28tZWRpdG9yLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci1tb25hY28tZWRpdG9yLyIsInNvdXJjZXMiOlsiYW5ndWxhci1tb25hY28tZWRpdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSx3RUFBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLDRCQUE0QixJQUFJLEVBQUUsRUFBQyxnQ0FBZ0MsSUFBSSxFQUFFLEVBQUMsTUFBTSxvRUFBb0UsQ0FBQztBQUM3SixPQUFPLEVBQUMsZ0JBQWdCLElBQUksRUFBRSxFQUFDLE1BQU0saUNBQWlDLENBQUM7QUFDdkUsT0FBTyxFQUFDLHNCQUFzQixJQUFJLEVBQUUsRUFBQyxNQUFNLGlEQUFpRCxDQUFDIiwic291cmNlc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yxNQUFNLG9EQUFvRCxDQUFDO0FBQ3BHLE9BQU8sRUFBQyxzQkFBc0IsSUFBSSxFQUFFLEVBQUMsTUFBTSxnREFBZ0QsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcblxuZXhwb3J0IHtBbmd1bGFyTW9uYWNvRWRpdG9yQ29tcG9uZW50IGFzIMm1YixDT0RFX0VESVRPUl9JTlBVVF9WQUxVRV9BQ0NFU1NPUiBhcyDJtWF9IGZyb20gJy4vbGliL2VkaXRvci9hbmd1bGFyLW1vbmFjby1lZGl0b3IvYW5ndWxhci1tb25hY28tZWRpdG9yLmNvbXBvbmVudCc7XG5leHBvcnQge0Jhc2VNb25hY29FZGl0b3IgYXMgybVjfSBmcm9tICcuL2xpYi9lZGl0b3IvbW9kZWwvYmFzZS1tb25hY28tZWRpdG9yJztcbmV4cG9ydCB7QW5ndWxhck1vbmFjb0VkaXRvclNlcnZpY2UgYXMgybVlfSBmcm9tICcuL2xpYi9lZGl0b3Ivc2VydmljZS9hbmd1bGFyLW1vbmFjby1lZGl0b3Iuc2VydmljZSc7XG5leHBvcnQge0NvZGVFZGl0b3JFdmVudFNlcnZpY2UgYXMgybVkfSBmcm9tICcuL2xpYi9lZGl0b3Ivc2VydmljZS9jb2RlLWVkaXRvci5ldmVudC5zZXJ2aWNlJzsiXX0= |
@@ -9,6 +9,8 @@ /** | ||
import { fromEvent } from 'rxjs/observable/fromEvent'; | ||
import { ANGULAR_MONACO_EDITOR_CONFIG } from '../config'; | ||
import { CodeEditorEventService } from '../services/code-editor.event.service'; | ||
import { CODE_EDITOR_EVENTS } from '../constants/events'; | ||
import { BaseMonacoEditor } from '../base-monaco-editor'; | ||
import { ANGULAR_MONACO_EDITOR_CONFIG } from '../model/config'; | ||
import { CodeEditorEventService } from '../service/code-editor.event.service'; | ||
import { CODE_EDITOR_EVENTS } from '../constant/events'; | ||
import { BaseMonacoEditor } from '../model/base-monaco-editor'; | ||
import { AngularMonacoEditorService } from '../service/angular-monaco-editor.service'; | ||
// 自定义输入控件:1.封装ControlValueAccessor | ||
// https://code-examples.net/zh-CN/q/2154761 | ||
@@ -21,4 +23,7 @@ export const /** @type {?} */ CODE_EDITOR_INPUT_VALUE_ACCESSOR = { | ||
}; | ||
// 自定义输入控件 <-> Monaco Edtor | ||
// 自定义输入控件:3.1 implements ControlValueAccessor | ||
export class AngularMonacoEditorComponent extends BaseMonacoEditor { | ||
/** | ||
* @param {?} angularMonacoEditorService | ||
* @param {?} zone | ||
@@ -28,4 +33,5 @@ * @param {?} editorEventService | ||
*/ | ||
constructor(zone, editorEventService, angularEditorconfig) { | ||
constructor(angularMonacoEditorService, zone, editorEventService, angularEditorconfig) { | ||
super(editorEventService, angularEditorconfig); | ||
this.angularMonacoEditorService = angularMonacoEditorService; | ||
this.zone = zone; | ||
@@ -35,3 +41,2 @@ this.editorEventService = editorEventService; | ||
this._value = ''; | ||
this._errorInModelMarker = false; | ||
// ControlValueAccessor提供的事件回调 | ||
@@ -50,4 +55,4 @@ this.onControlValueChange = (_) => { | ||
this.options.model = model; | ||
if (this.editor) { | ||
this.editor.dispose(); | ||
if (this._editor) { | ||
this._editor.dispose(); | ||
this.initMonaco(this.options); | ||
@@ -57,8 +62,2 @@ } | ||
/** | ||
* @return {?} | ||
*/ | ||
get errorInModelMarker() { | ||
return this._errorInModelMarker; | ||
} | ||
/** | ||
* @param {?} options | ||
@@ -69,14 +68,13 @@ * @return {?} | ||
const /** @type {?} */ hasModel = !!options.model; | ||
const /** @type {?} */ acitveMarkers = !!options.acitveMarkers; //自定义option | ||
if (hasModel) { | ||
options.model = monaco.editor.createModel(options.model.value, options.model.language, options.model.uri); | ||
} | ||
this.editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
this._editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
if (!hasModel) { | ||
this.editor.setValue(this._value); | ||
this._editor.setValue(this._value); | ||
} | ||
// monaco editor -> outside component | ||
this.editor.onDidChangeModelContent((e) => this.onChangeModelContentHandler(e)); | ||
this.editor.onDidBlurEditorText((e) => this.onBlurEditorTextHandler(e)); | ||
this.editor.onDidLayoutChange((e) => this.onLayoutChangeHandler(e)); | ||
this._editor.onDidChangeModelContent((e) => this.onChangeModelContentHandler(e)); | ||
this._editor.onDidBlurEditorText((e) => this.onBlurEditorTextHandler(e)); | ||
this._editor.onDidLayoutChange((e) => this.onLayoutChangeHandler(e)); | ||
// refresh layout on resize event. | ||
@@ -87,30 +85,9 @@ this.refreshLayoutWhenWindowResize(); | ||
target: this, | ||
editor: this.editor | ||
editor: this._editor | ||
}); | ||
// active model markers | ||
if (hasModel && acitveMarkers) { | ||
this.acitveModelMarkers(); | ||
if (hasModel) { | ||
this.angularMonacoEditorService.handleModelMarkers(); | ||
} | ||
} | ||
/** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
acitveModelMarkers() { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
const /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) { | ||
// there are no errors(synx error and validate error) | ||
// console.log('continue'); | ||
} | ||
else { | ||
// there are errors | ||
self._errorInModelMarker = true; | ||
} | ||
}; | ||
} | ||
/** | ||
* refresh layout when resized the window | ||
@@ -125,3 +102,3 @@ * @return {?} | ||
// https://www.jianshu.com/p/46894deb870a | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(() => this.editor.layout()); | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(() => this._editor.layout()); | ||
} | ||
@@ -133,3 +110,3 @@ /** | ||
onChangeModelContentHandler(e) { | ||
const /** @type {?} */ _value = this.editor.getValue(); | ||
const /** @type {?} */ _value = this._editor.getValue(); | ||
// monaco editor -> outside component | ||
@@ -171,9 +148,2 @@ // https://github.com/JTangming/tm/issues/4 ngZone详解 | ||
/** | ||
* @return {?} | ||
*/ | ||
localEditor() { | ||
// Demo: outside component -> monaco editor | ||
this.writeValue('test'); | ||
} | ||
/** | ||
* @param {?} value | ||
@@ -185,6 +155,6 @@ * @return {?} | ||
self.value = value || ''; | ||
// Fix for value change while dispose in process | ||
// Fix for value change while dispose in process. | ||
setTimeout(() => { | ||
if (self.editor /*&& !this.options.model*/) { | ||
self.editor.setValue(self._value); | ||
if (self._editor /*&& !this.options.model*/) { | ||
self._editor.setValue(self._value); | ||
} | ||
@@ -214,3 +184,7 @@ }); | ||
styles: [`:host{display:block;min-height:200px}.editor{width:100%;height:100%}`], | ||
providers: [CODE_EDITOR_INPUT_VALUE_ACCESSOR, CodeEditorEventService] | ||
// 自定义输入控件:2.引入依赖服务ControlValueAccessor | ||
providers: [ | ||
CODE_EDITOR_INPUT_VALUE_ACCESSOR, | ||
CodeEditorEventService | ||
] | ||
},] }, | ||
@@ -220,2 +194,3 @@ ]; | ||
AngularMonacoEditorComponent.ctorParameters = () => [ | ||
{ type: AngularMonacoEditorService, }, | ||
{ type: NgZone, }, | ||
@@ -241,4 +216,2 @@ { type: CodeEditorEventService, }, | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype._errorInModelMarker; | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype.onControlValueChange; | ||
@@ -248,2 +221,4 @@ /** @type {?} */ | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype.angularMonacoEditorService; | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype.zone; | ||
@@ -256,2 +231,2 @@ /** @type {?} */ | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1tb25hY28tZWRpdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3Q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HJlZ2lzdGVyT25DaGFuZ2UoZm46IGFueSkge1xuICAgIHRoaXMub25Db250cm9sVmFsdWVDaGFuZ2UgPSBmbjtcbiAgfVxuXG4gIC8vIEZyb20gQ29udHJvbFZhbHVlQWNjZXNzb3IgaW50ZXJmYWNlXG4gIHJlZ2lzdGVyT25Ub3VjaGVkKGZuOiBhbnkpIHtcbiAgICB0aGlzLm9uQ29udHJvbFRvdWNoZWQgPSBmbjtcbiAgfVxuXG4gIC8vIENvbnRyb2xWYWx1ZUFjY2Vzc29y5o+Q5L6b55qE5LqL5Lu25Zue6LCDXG4gIG9uQ29udHJvbFZhbHVlQ2hhbmdlID0gKF86IGFueSkgPT4ge1xuICB9XG5cbiAgLy8gQ29udHJvbFZhbHVlQWNjZXNzb3Lmj5DkvpvnmoTkuovku7blm57osINcbiAgb25Db250cm9sVG91Y2hlZCA9ICgpID0+IHtcbiAgfVxuXG59XG4iXX0= |
@@ -7,3 +7,3 @@ /** | ||
import { NgModule } from '@angular/core'; | ||
import { ANGULAR_MONACO_EDITOR_CONFIG } from './config'; | ||
import { ANGULAR_MONACO_EDITOR_CONFIG } from './model/config'; | ||
import { AngularMonacoEditorComponent } from './angular-monaco-editor/angular-monaco-editor.component'; | ||
@@ -48,2 +48,2 @@ export class AngularMonacoEditorModule { | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci8iLCJzb3VyY2VzIjpbImxpYi9lZGl0b3IvZWRpdG9yLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRS9DLE9BQU8sRUFBdUIsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzlELE9BQU8sRUFBRSw0QkFBN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BdXG59KVxuXG5leHBvcnQgY2xhc3MgQW5ndWxhck1vbmFjb0VkaXRvck1vZHVsZSB7XG4gIHB1YmxpYyBzdGF0aWMgZm9yUm9vdChjb25maWc6IEFuZ3VsYXJNb25hY29FZGl0b3JDb25maWcgPSB7fSk6IE1vZHVsZVdpdGhQcm92aWRlcnMge1xuICAgIHJldHVybiB7XG4gICAgICBuZ01vZHVsZTogQW5ndWxhck1vbmFjb0VkaXRvck1vZHVsZSxcbiAgICAgIHByb3ZpZGVyczogW1xuICAgICAgICB7IHByb3ZpZGU6IEFOR1VMQVJfTU9OQUNPX0VESVRPUl9DT05GSUcsIHVzZVZhbHVlOiBjb25maWcgfVxuICAgICAgXVxuICAgIH07XG4gIH1cbn1cbiJdfQ== |
@@ -6,4 +6,4 @@ /** | ||
export { AngularMonacoEditorModule } from './lib/editor/editor.module'; | ||
export { ANGULAR_MONACO_EDITOR_CONFIG } from './lib/editor/config'; | ||
export { ANGULAR_MONACO_EDITOR_CONFIG } from './lib/editor/model/config'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLDBDQUFjLDRCQUE0QixDQUFDO0FBQzNDLDZDQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL2VkaXRvci5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL2NvbmZpZyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lZGl0b3IvdHlwZXMnOyJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLDBDQUFjLDRCQUE0QixDQUFDO0FBQzNDLDZDQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL2VkaXRvci5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL21vZGVsL2NvbmZpZyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lZGl0b3IvbW9kZWwvdHlwZXMnOyJdfQ== |
@@ -10,5 +10,6 @@ /** | ||
export { AngularMonacoEditorComponent as ɵb, CODE_EDITOR_INPUT_VALUE_ACCESSOR as ɵa } from './lib/editor/angular-monaco-editor/angular-monaco-editor.component'; | ||
export { BaseMonacoEditor as ɵc } from './lib/editor/base-monaco-editor'; | ||
export { CodeEditorEventService as ɵd } from './lib/editor/services/code-editor.event.service'; | ||
export { BaseMonacoEditor as ɵc } from './lib/editor/model/base-monaco-editor'; | ||
export { AngularMonacoEditorService as ɵe } from './lib/editor/service/angular-monaco-editor.service'; | ||
export { CodeEditorEventService as ɵd } from './lib/editor/service/code-editor.event.service'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1tb25hY28tZWRpdG9yLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci1tb25hY28tZWRpdG9yLyIsInNvdXJjZXMiOlsiYW5ndWxhci1tb25hY28tZWRpdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSx3RUFBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLDRCQUE0QixJQUFJLEVBQUUsRUFBQyxnQ0FBZ0MsSUFBSSxF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||
import { ANGULAR_MONACO_EDITOR_CONFIG } from '../config'; | ||
import { CodeEditorEventService } from '../services/code-editor.event.service'; | ||
import { CODE_EDITOR_EVENTS } from '../constants/events'; | ||
import { BaseMonacoEditor } from '../base-monaco-editor'; | ||
import { ANGULAR_MONACO_EDITOR_CONFIG } from '../model/config'; | ||
import { CodeEditorEventService } from '../service/code-editor.event.service'; | ||
import { CODE_EDITOR_EVENTS } from '../constant/events'; | ||
import { BaseMonacoEditor } from '../model/base-monaco-editor'; | ||
import { AngularMonacoEditorService } from '../service/angular-monaco-editor.service'; | ||
// 自定义输入控件:1.封装ControlValueAccessor | ||
// https://code-examples.net/zh-CN/q/2154761 | ||
@@ -25,4 +27,5 @@ export var /** @type {?} */ CODE_EDITOR_INPUT_VALUE_ACCESSOR = { | ||
// tslint:disable-next-line:max-line-length | ||
function AngularMonacoEditorComponent(zone, editorEventService, angularEditorconfig) { | ||
function AngularMonacoEditorComponent(angularMonacoEditorService, zone, editorEventService, angularEditorconfig) { | ||
var _this = _super.call(this, editorEventService, angularEditorconfig) || this; | ||
_this.angularMonacoEditorService = angularMonacoEditorService; | ||
_this.zone = zone; | ||
@@ -32,3 +35,2 @@ _this.editorEventService = editorEventService; | ||
_this._value = ''; | ||
_this._errorInModelMarker = false; | ||
// ControlValueAccessor提供的事件回调 | ||
@@ -49,4 +51,4 @@ _this.onControlValueChange = function (_) { | ||
this.options.model = model; | ||
if (this.editor) { | ||
this.editor.dispose(); | ||
if (this._editor) { | ||
this._editor.dispose(); | ||
this.initMonaco(this.options); | ||
@@ -58,12 +60,2 @@ } | ||
}); | ||
Object.defineProperty(AngularMonacoEditorComponent.prototype, "errorInModelMarker", { | ||
get: /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
return this._errorInModelMarker; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -80,14 +72,13 @@ * @param {?} options | ||
var /** @type {?} */ hasModel = !!options.model; | ||
var /** @type {?} */ acitveMarkers = !!options.acitveMarkers; //自定义option | ||
if (hasModel) { | ||
options.model = monaco.editor.createModel(options.model.value, options.model.language, options.model.uri); | ||
} | ||
this.editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
this._editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
if (!hasModel) { | ||
this.editor.setValue(this._value); | ||
this._editor.setValue(this._value); | ||
} | ||
// monaco editor -> outside component | ||
this.editor.onDidChangeModelContent(function (e) { return _this.onChangeModelContentHandler(e); }); | ||
this.editor.onDidBlurEditorText(function (e) { return _this.onBlurEditorTextHandler(e); }); | ||
this.editor.onDidLayoutChange(function (e) { return _this.onLayoutChangeHandler(e); }); | ||
this._editor.onDidChangeModelContent(function (e) { return _this.onChangeModelContentHandler(e); }); | ||
this._editor.onDidBlurEditorText(function (e) { return _this.onBlurEditorTextHandler(e); }); | ||
this._editor.onDidLayoutChange(function (e) { return _this.onLayoutChangeHandler(e); }); | ||
// refresh layout on resize event. | ||
@@ -98,37 +89,9 @@ this.refreshLayoutWhenWindowResize(); | ||
target: this, | ||
editor: this.editor | ||
editor: this._editor | ||
}); | ||
// active model markers | ||
if (hasModel && acitveMarkers) { | ||
this.acitveModelMarkers(); | ||
if (hasModel) { | ||
this.angularMonacoEditorService.handleModelMarkers(); | ||
} | ||
}; | ||
/** | ||
* Acitve Model markers to get markers' results | ||
*/ | ||
/** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorComponent.prototype.acitveModelMarkers = /** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
function () { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
var /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) { | ||
// there are no errors(synx error and validate error) | ||
// console.log('continue'); | ||
} | ||
else { | ||
// there are errors | ||
self._errorInModelMarker = true; | ||
} | ||
}; | ||
}; | ||
/** | ||
* refresh layout when resized the window | ||
@@ -151,3 +114,3 @@ */ | ||
// https://www.jianshu.com/p/46894deb870a | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(function () { return _this.editor.layout(); }); | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(function () { return _this._editor.layout(); }); | ||
}; | ||
@@ -164,3 +127,3 @@ /** | ||
var _this = this; | ||
var /** @type {?} */ _value = this.editor.getValue(); | ||
var /** @type {?} */ _value = this._editor.getValue(); | ||
// monaco editor -> outside component | ||
@@ -215,12 +178,3 @@ // https://github.com/JTangming/tm/issues/4 ngZone详解 | ||
}); | ||
/** | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorComponent.prototype.localEditor = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
// Demo: outside component -> monaco editor | ||
this.writeValue('test'); | ||
}; | ||
// 自定义输入控件:3.2 implements ControlValueAccesso | ||
// outside component -> monaco editor | ||
@@ -239,6 +193,6 @@ // From ControlValueAccessor interface | ||
self.value = value || ''; | ||
// Fix for value change while dispose in process | ||
// Fix for value change while dispose in process. | ||
setTimeout(function () { | ||
if (self.editor /*&& !this.options.model*/) { | ||
self.editor.setValue(self._value); | ||
if (self._editor /*&& !this.options.model*/) { | ||
self._editor.setValue(self._value); | ||
} | ||
@@ -277,3 +231,7 @@ }); | ||
styles: [":host{display:block;min-height:200px}.editor{width:100%;height:100%}"], | ||
providers: [CODE_EDITOR_INPUT_VALUE_ACCESSOR, CodeEditorEventService] | ||
// 自定义输入控件:2.引入依赖服务ControlValueAccessor | ||
providers: [ | ||
CODE_EDITOR_INPUT_VALUE_ACCESSOR, | ||
CodeEditorEventService | ||
] | ||
},] }, | ||
@@ -283,2 +241,3 @@ ]; | ||
AngularMonacoEditorComponent.ctorParameters = function () { return [ | ||
{ type: AngularMonacoEditorService, }, | ||
{ type: NgZone, }, | ||
@@ -307,4 +266,2 @@ { type: CodeEditorEventService, }, | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype._errorInModelMarker; | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype.onControlValueChange; | ||
@@ -314,2 +271,4 @@ /** @type {?} */ | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype.angularMonacoEditorService; | ||
/** @type {?} */ | ||
AngularMonacoEditorComponent.prototype.zone; | ||
@@ -322,2 +281,2 @@ /** @type {?} */ | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1tb25hY28tZWRpdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci8iLCJzb3VyY2VzIjpbImxpYi9lZGl0b3IvYW5ndWxhci1tb25hY28tZWRpdG9yL2FuZ3VsYXItbW9uYWNvLWVkaXRvci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNqRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0QsT0FBTyxFQUF3QixpQkFBaUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3pFLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUV0RCxPQUFPLEVBQUUsNEJBQTRCLEVBQTZCLE1BQU0sV0FBVyxDQUFDO0FBQ3BGLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBQy9FLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRXpELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHVCQUF1QixDQUF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G5cbiAgLy8gRnJvbSBDb250cm9sVmFsdWVBY2Nlc3NvciBpbnRlcmZhY2VcbiAgcmVnaXN0ZXJPbkNoYW5nZShmbjogYW55KSB7XG4gICAgdGhpcy5vbkNvbnRyb2xWYWx1ZUNoYW5nZSA9IGZuO1xuICB9XG5cbiAgLy8gRnJvbSBDb250cm9sVmFsdWVBY2Nlc3NvciBpbnRlcmZhY2VcbiAgcmVnaXN0ZXJPblRvdWNoZWQoZm46IGFueSkge1xuICAgIHRoaXMub25Db250cm9sVG91Y2hlZCA9IGZuO1xuICB9XG5cbiAgLy8gQ29udHJvbFZhbHVlQWNjZXNzb3Lmj5DkvpvnmoTkuovku7blm57osINcbiAgb25Db250cm9sVmFsdWVDaGFuZ2UgPSAoXzogYW55KSA9PiB7XG4gIH1cblxuICAvLyBDb250cm9sVmFsdWVBY2Nlc3NvcuaPkOS+m+eahOS6i+S7tuWbnuiwg1xuICBvbkNvbnRyb2xUb3VjaGVkID0gKCkgPT4ge1xuICB9XG5cbn1cbiJdfQ== |
@@ -7,3 +7,3 @@ /** | ||
import { NgModule } from '@angular/core'; | ||
import { ANGULAR_MONACO_EDITOR_CONFIG } from './config'; | ||
import { ANGULAR_MONACO_EDITOR_CONFIG } from './model/config'; | ||
import { AngularMonacoEditorComponent } from './angular-monaco-editor/angular-monaco-editor.component'; | ||
@@ -57,2 +57,2 @@ var AngularMonacoEditorModule = /** @class */ (function () { | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci8iLCJzb3VyY2VzIjpbImxpYi9lZGl0b3IvZWRpdG9yLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRS9DLE9BQU8sRUFB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bGFyYXRpb25zOiBbXG4gICAgQW5ndWxhck1vbmFjb0VkaXRvckNvbXBvbmVudFxuICBdLFxuICBleHBvcnRzOiBbXG4gICAgQW5ndWxhck1vbmFjb0VkaXRvckNvbXBvbmVudFxuICBdLFxuICBwcm92aWRlcnM6IFtcbiAgXVxufSlcblxuZXhwb3J0IGNsYXNzIEFuZ3VsYXJNb25hY29FZGl0b3JNb2R1bGUge1xuICBwdWJsaWMgc3RhdGljIGZvclJvb3QoY29uZmlnOiBBbmd1bGFyTW9uYWNvRWRpdG9yQ29uZmlnID0ge30pOiBNb2R1bGVXaXRoUHJvdmlkZXJzIHtcbiAgICByZXR1cm4ge1xuICAgICAgbmdNb2R1bGU6IEFuZ3VsYXJNb25hY29FZGl0b3JNb2R1bGUsXG4gICAgICBwcm92aWRlcnM6IFtcbiAgICAgICAgeyBwcm92aWRlOiBBTkdVTEFSX01PTkFDT19FRElUT1JfQ09ORklHLCB1c2VWYWx1ZTogY29uZmlnIH1cbiAgICAgIF1cbiAgICB9O1xuICB9XG59XG4iXX0= |
@@ -6,4 +6,4 @@ /** | ||
export { AngularMonacoEditorModule } from './lib/editor/editor.module'; | ||
export { ANGULAR_MONACO_EDITOR_CONFIG } from './lib/editor/config'; | ||
export { ANGULAR_MONACO_EDITOR_CONFIG } from './lib/editor/model/config'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLDBDQUFjLDRCQUE0QixDQUFDO0FBQzNDLDZDQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL2VkaXRvci5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL2NvbmZpZyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lZGl0b3IvdHlwZXMnOyJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLDBDQUFjLDRCQUE0QixDQUFDO0FBQzNDLDZDQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL2VkaXRvci5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZWRpdG9yL21vZGVsL2NvbmZpZyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lZGl0b3IvbW9kZWwvdHlwZXMnOyJdfQ== |
@@ -81,15 +81,2 @@ import { InjectionToken, Injectable, Input, Output, ViewChild, EventEmitter, Component, forwardRef, Inject, NgZone, NgModule } from '@angular/core'; | ||
/** | ||
* @return {?} | ||
*/ | ||
get editor() { | ||
return this._editor; | ||
} | ||
/** | ||
* @param {?} value | ||
* @return {?} | ||
*/ | ||
set editor(value) { | ||
this._editor = value; | ||
} | ||
/** | ||
* @param {?} options | ||
@@ -99,3 +86,3 @@ * @return {?} | ||
set options(options) { | ||
// default options(this.config.defaultOptions) + custom options(options) | ||
// 默认options(this.config.defaultOptions) + 自定义options(options) | ||
this._options = Object.assign({}, this.config.defaultOptions, options); | ||
@@ -179,2 +166,38 @@ if (this._editor) { | ||
*/ | ||
class AngularMonacoEditorService { | ||
constructor() { | ||
this._existError = false; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
get existError() { | ||
return this._existError; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
handleModelMarkers() { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
const /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) ; | ||
else { | ||
// there are errors | ||
self._existError = true; | ||
} | ||
}; | ||
} | ||
} | ||
AngularMonacoEditorService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
// 自定义输入控件:1.封装ControlValueAccessor | ||
// https://code-examples.net/zh-CN/q/2154761 | ||
@@ -187,4 +210,7 @@ const /** @type {?} */ CODE_EDITOR_INPUT_VALUE_ACCESSOR = { | ||
}; | ||
// 自定义输入控件 <-> Monaco Edtor | ||
// 自定义输入控件:3.1 implements ControlValueAccessor | ||
class AngularMonacoEditorComponent extends BaseMonacoEditor { | ||
/** | ||
* @param {?} angularMonacoEditorService | ||
* @param {?} zone | ||
@@ -194,4 +220,5 @@ * @param {?} editorEventService | ||
*/ | ||
constructor(zone, editorEventService, angularEditorconfig) { | ||
constructor(angularMonacoEditorService, zone, editorEventService, angularEditorconfig) { | ||
super(editorEventService, angularEditorconfig); | ||
this.angularMonacoEditorService = angularMonacoEditorService; | ||
this.zone = zone; | ||
@@ -201,3 +228,2 @@ this.editorEventService = editorEventService; | ||
this._value = ''; | ||
this._errorInModelMarker = false; | ||
// ControlValueAccessor提供的事件回调 | ||
@@ -216,4 +242,4 @@ this.onControlValueChange = (_) => { | ||
this.options.model = model; | ||
if (this.editor) { | ||
this.editor.dispose(); | ||
if (this._editor) { | ||
this._editor.dispose(); | ||
this.initMonaco(this.options); | ||
@@ -223,8 +249,2 @@ } | ||
/** | ||
* @return {?} | ||
*/ | ||
get errorInModelMarker() { | ||
return this._errorInModelMarker; | ||
} | ||
/** | ||
* @param {?} options | ||
@@ -235,14 +255,13 @@ * @return {?} | ||
const /** @type {?} */ hasModel = !!options.model; | ||
const /** @type {?} */ acitveMarkers = !!options.acitveMarkers; //自定义option | ||
if (hasModel) { | ||
options.model = monaco.editor.createModel(options.model.value, options.model.language, options.model.uri); | ||
} | ||
this.editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
this._editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
if (!hasModel) { | ||
this.editor.setValue(this._value); | ||
this._editor.setValue(this._value); | ||
} | ||
// monaco editor -> outside component | ||
this.editor.onDidChangeModelContent((e) => this.onChangeModelContentHandler(e)); | ||
this.editor.onDidBlurEditorText((e) => this.onBlurEditorTextHandler(e)); | ||
this.editor.onDidLayoutChange((e) => this.onLayoutChangeHandler(e)); | ||
this._editor.onDidChangeModelContent((e) => this.onChangeModelContentHandler(e)); | ||
this._editor.onDidBlurEditorText((e) => this.onBlurEditorTextHandler(e)); | ||
this._editor.onDidLayoutChange((e) => this.onLayoutChangeHandler(e)); | ||
// refresh layout on resize event. | ||
@@ -253,27 +272,9 @@ this.refreshLayoutWhenWindowResize(); | ||
target: this, | ||
editor: this.editor | ||
editor: this._editor | ||
}); | ||
// active model markers | ||
if (hasModel && acitveMarkers) { | ||
this.acitveModelMarkers(); | ||
if (hasModel) { | ||
this.angularMonacoEditorService.handleModelMarkers(); | ||
} | ||
} | ||
/** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
acitveModelMarkers() { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
const /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) ; | ||
else { | ||
// there are errors | ||
self._errorInModelMarker = true; | ||
} | ||
}; | ||
} | ||
/** | ||
* refresh layout when resized the window | ||
@@ -288,3 +289,3 @@ * @return {?} | ||
// https://www.jianshu.com/p/46894deb870a | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(() => this.editor.layout()); | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(() => this._editor.layout()); | ||
} | ||
@@ -296,3 +297,3 @@ /** | ||
onChangeModelContentHandler(e) { | ||
const /** @type {?} */ _value = this.editor.getValue(); | ||
const /** @type {?} */ _value = this._editor.getValue(); | ||
// monaco editor -> outside component | ||
@@ -334,9 +335,2 @@ // https://github.com/JTangming/tm/issues/4 ngZone详解 | ||
/** | ||
* @return {?} | ||
*/ | ||
localEditor() { | ||
// Demo: outside component -> monaco editor | ||
this.writeValue('test'); | ||
} | ||
/** | ||
* @param {?} value | ||
@@ -348,6 +342,6 @@ * @return {?} | ||
self.value = value || ''; | ||
// Fix for value change while dispose in process | ||
// Fix for value change while dispose in process. | ||
setTimeout(() => { | ||
if (self.editor /*&& !this.options.model*/) { | ||
self.editor.setValue(self._value); | ||
if (self._editor /*&& !this.options.model*/) { | ||
self._editor.setValue(self._value); | ||
} | ||
@@ -377,3 +371,7 @@ }); | ||
styles: [`:host{display:block;min-height:200px}.editor{width:100%;height:100%}`], | ||
providers: [CODE_EDITOR_INPUT_VALUE_ACCESSOR, CodeEditorEventService] | ||
// 自定义输入控件:2.引入依赖服务ControlValueAccessor | ||
providers: [ | ||
CODE_EDITOR_INPUT_VALUE_ACCESSOR, | ||
CodeEditorEventService | ||
] | ||
},] }, | ||
@@ -383,2 +381,3 @@ ]; | ||
AngularMonacoEditorComponent.ctorParameters = () => [ | ||
{ type: AngularMonacoEditorService, }, | ||
{ type: NgZone, }, | ||
@@ -435,4 +434,4 @@ { type: CodeEditorEventService, }, | ||
export { AngularMonacoEditorModule, ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorComponent as ɵb, CODE_EDITOR_INPUT_VALUE_ACCESSOR as ɵa, BaseMonacoEditor as ɵc, CodeEditorEventService as ɵd }; | ||
export { AngularMonacoEditorModule, ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorComponent as ɵb, CODE_EDITOR_INPUT_VALUE_ACCESSOR as ɵa, BaseMonacoEditor as ɵc, AngularMonacoEditorService as ɵe, CodeEditorEventService as ɵd }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1tb25hY28tZWRpdG9yLmpzLm1hcCIsInNvdXJjZXMiOlsibmc6Ly9hbmd1bGFyLW1vbmFjby1lZGl0b3IvbGliL2VkaXRvci9jb25maWcudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL2NvbnN0YW50cy9ldmVudHMudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL3NlcnZpY2VzL2NvZGUtZWRpdG9yLmV2ZW50LnNlcnZpY2UudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL2Jhc2UtbW9uYWNvLWVkaXRvci50cyIsIm5nOi8vYW5ndWxhci1tb25hY28tZWRpdG9yL2xpYi9lZGl0b3IvYW5ndWxhci1tb25hY28tZWRpdG9yL2FuZ3VsYXItbW9uYWNvLWVkaXRvci5jb21wb25lbnQudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL2VkaXRvci5tb2R1bGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0aW9uVG9rZW4gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuLy8gaW5qZWN0aW9uVG9rZW7DpMK9wpzDp8KUwqjDqMKvwrTDpsKYwo5cbi8vIGh0dHBzOi8vc2VnbWVudGZhdWx0LmNvbS9hLzExOTAwMDAwMDg2MjYzNDhcbmV4cG9ydCBjb25zdCBBTkdVTEFSX01PTkFDT19FRElUT1JfQ09ORklHID0gbmV3IEluamVjdGlvblRva2VuKCdBTkdVTEFSX01PTkFDT19FRElUT1JfQ09ORklHJyk7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kFFaEYsU0FBUyxFQUFFO29CQUNULGdDQUFnQztvQkFDaEMsc0JBQXNCO2lCQUN2QjthQUNGOzs7O1lBdkJRLDBCQUEwQjtZQVROLE1BQU07WUFLMUIsc0JBQXNCOzRDQWlEMUIsTUFBTSxTQUFDLDRCQUE0Qjs7O3NCQWZyQyxLQUFLLFNBQUMsT0FBTzs7Ozs7OztBQ3hDaEI7Ozs7O0lBcUJTLE9BQU8sT0FBTyxDQUFDLFNBQW9DLEVBQUU7UUFDMUQsT0FBTztZQUNMLFFBQVEsRUFBRSx5QkFBeUI7WUFDbkMsU0FBUyxFQUFFO2dCQUNULEVBQUUsT0FBTyxFQUFFLDRCQUE0QixFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUU7YUFDNUQ7U0FDRixDQUFDOzs7O1lBckJMLFFBQVEsU0FBQztnQkFDUixPQUFPLEVBQUU7b0JBQ1AsWUFBWTtpQkFDYjtnQkFDRCxZQUFZLEVBQUU7b0JBQ1osNEJBQTRCO2lCQUM3QjtnQkFDRCxPQUFPLEVBQUU7b0JBQ1AsNEJBQTRCO2lCQUM3QjtnQkFDRCxTQUFTLEVBQUUsRUFDVjthQUNGOzs7Ozs7Ozs7Ozs7Ozs7In0= |
@@ -91,19 +91,2 @@ import { InjectionToken, Injectable, Input, Output, ViewChild, EventEmitter, Component, forwardRef, Inject, NgZone, NgModule } from '@angular/core'; | ||
} | ||
Object.defineProperty(BaseMonacoEditor.prototype, "editor", { | ||
get: /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
return this._editor; | ||
}, | ||
set: /** | ||
* @param {?} value | ||
* @return {?} | ||
*/ | ||
function (value) { | ||
this._editor = value; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(BaseMonacoEditor.prototype, "options", { | ||
@@ -121,3 +104,3 @@ get: /** | ||
function (options) { | ||
// default options(this.config.defaultOptions) + custom options(options) | ||
// 默认options(this.config.defaultOptions) + 自定义options(options) | ||
this._options = Object.assign({}, this.config.defaultOptions, options); | ||
@@ -206,2 +189,46 @@ if (this._editor) { | ||
*/ | ||
var AngularMonacoEditorService = /** @class */ (function () { | ||
function AngularMonacoEditorService() { | ||
this._existError = false; | ||
} | ||
Object.defineProperty(AngularMonacoEditorService.prototype, "existError", { | ||
get: /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
return this._existError; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorService.prototype.handleModelMarkers = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
var /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) ; | ||
else { | ||
// there are errors | ||
self._existError = true; | ||
} | ||
}; | ||
}; | ||
AngularMonacoEditorService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
return AngularMonacoEditorService; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
// 自定义输入控件:1.封装ControlValueAccessor | ||
// https://code-examples.net/zh-CN/q/2154761 | ||
@@ -217,4 +244,5 @@ var /** @type {?} */ CODE_EDITOR_INPUT_VALUE_ACCESSOR = { | ||
// tslint:disable-next-line:max-line-length | ||
function AngularMonacoEditorComponent(zone, editorEventService, angularEditorconfig) { | ||
function AngularMonacoEditorComponent(angularMonacoEditorService, zone, editorEventService, angularEditorconfig) { | ||
var _this = _super.call(this, editorEventService, angularEditorconfig) || this; | ||
_this.angularMonacoEditorService = angularMonacoEditorService; | ||
_this.zone = zone; | ||
@@ -224,3 +252,2 @@ _this.editorEventService = editorEventService; | ||
_this._value = ''; | ||
_this._errorInModelMarker = false; | ||
// ControlValueAccessor提供的事件回调 | ||
@@ -241,4 +268,4 @@ _this.onControlValueChange = function (_) { | ||
this.options.model = model; | ||
if (this.editor) { | ||
this.editor.dispose(); | ||
if (this._editor) { | ||
this._editor.dispose(); | ||
this.initMonaco(this.options); | ||
@@ -250,12 +277,2 @@ } | ||
}); | ||
Object.defineProperty(AngularMonacoEditorComponent.prototype, "errorInModelMarker", { | ||
get: /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
return this._errorInModelMarker; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
/** | ||
@@ -272,14 +289,13 @@ * @param {?} options | ||
var /** @type {?} */ hasModel = !!options.model; | ||
var /** @type {?} */ acitveMarkers = !!options.acitveMarkers; //自定义option | ||
if (hasModel) { | ||
options.model = monaco.editor.createModel(options.model.value, options.model.language, options.model.uri); | ||
} | ||
this.editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
this._editor = monaco.editor.create(this._editorComponent.nativeElement, options); | ||
if (!hasModel) { | ||
this.editor.setValue(this._value); | ||
this._editor.setValue(this._value); | ||
} | ||
// monaco editor -> outside component | ||
this.editor.onDidChangeModelContent(function (e) { return _this.onChangeModelContentHandler(e); }); | ||
this.editor.onDidBlurEditorText(function (e) { return _this.onBlurEditorTextHandler(e); }); | ||
this.editor.onDidLayoutChange(function (e) { return _this.onLayoutChangeHandler(e); }); | ||
this._editor.onDidChangeModelContent(function (e) { return _this.onChangeModelContentHandler(e); }); | ||
this._editor.onDidBlurEditorText(function (e) { return _this.onBlurEditorTextHandler(e); }); | ||
this._editor.onDidLayoutChange(function (e) { return _this.onLayoutChangeHandler(e); }); | ||
// refresh layout on resize event. | ||
@@ -290,34 +306,9 @@ this.refreshLayoutWhenWindowResize(); | ||
target: this, | ||
editor: this.editor | ||
editor: this._editor | ||
}); | ||
// active model markers | ||
if (hasModel && acitveMarkers) { | ||
this.acitveModelMarkers(); | ||
if (hasModel) { | ||
this.angularMonacoEditorService.handleModelMarkers(); | ||
} | ||
}; | ||
/** | ||
* Acitve Model markers to get markers' results | ||
*/ | ||
/** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorComponent.prototype.acitveModelMarkers = /** | ||
* Acitve Model markers to get markers' results | ||
* @return {?} | ||
*/ | ||
function () { | ||
var /** @type {?} */ self = this; | ||
// https://github.com/Microsoft/monaco-editor/issues/30 | ||
var /** @type {?} */ setModelMarkers = monaco.editor.setModelMarkers; | ||
monaco.editor.setModelMarkers = function (model, owner, markers) { | ||
setModelMarkers.call(monaco.editor, model, owner, markers); | ||
if (markers.length === 0) ; | ||
else { | ||
// there are errors | ||
self._errorInModelMarker = true; | ||
} | ||
}; | ||
}; | ||
/** | ||
* refresh layout when resized the window | ||
@@ -340,3 +331,3 @@ */ | ||
// https://www.jianshu.com/p/46894deb870a | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(function () { return _this.editor.layout(); }); | ||
this._windowResizeSubscription = fromEvent(window, 'resize').subscribe(function () { return _this._editor.layout(); }); | ||
}; | ||
@@ -353,3 +344,3 @@ /** | ||
var _this = this; | ||
var /** @type {?} */ _value = this.editor.getValue(); | ||
var /** @type {?} */ _value = this._editor.getValue(); | ||
// monaco editor -> outside component | ||
@@ -404,12 +395,3 @@ // https://github.com/JTangming/tm/issues/4 ngZone详解 | ||
}); | ||
/** | ||
* @return {?} | ||
*/ | ||
AngularMonacoEditorComponent.prototype.localEditor = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
// Demo: outside component -> monaco editor | ||
this.writeValue('test'); | ||
}; | ||
// 自定义输入控件:3.2 implements ControlValueAccesso | ||
// outside component -> monaco editor | ||
@@ -428,6 +410,6 @@ // From ControlValueAccessor interface | ||
self.value = value || ''; | ||
// Fix for value change while dispose in process | ||
// Fix for value change while dispose in process. | ||
setTimeout(function () { | ||
if (self.editor /*&& !this.options.model*/) { | ||
self.editor.setValue(self._value); | ||
if (self._editor /*&& !this.options.model*/) { | ||
self._editor.setValue(self._value); | ||
} | ||
@@ -466,3 +448,7 @@ }); | ||
styles: [":host{display:block;min-height:200px}.editor{width:100%;height:100%}"], | ||
providers: [CODE_EDITOR_INPUT_VALUE_ACCESSOR, CodeEditorEventService] | ||
// 自定义输入控件:2.引入依赖服务ControlValueAccessor | ||
providers: [ | ||
CODE_EDITOR_INPUT_VALUE_ACCESSOR, | ||
CodeEditorEventService | ||
] | ||
},] }, | ||
@@ -472,2 +458,3 @@ ]; | ||
AngularMonacoEditorComponent.ctorParameters = function () { return [ | ||
{ type: AngularMonacoEditorService, }, | ||
{ type: NgZone, }, | ||
@@ -534,4 +521,4 @@ { type: CodeEditorEventService, }, | ||
export { AngularMonacoEditorModule, ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorComponent as ɵb, CODE_EDITOR_INPUT_VALUE_ACCESSOR as ɵa, BaseMonacoEditor as ɵc, CodeEditorEventService as ɵd }; | ||
export { AngularMonacoEditorModule, ANGULAR_MONACO_EDITOR_CONFIG, AngularMonacoEditorComponent as ɵb, CODE_EDITOR_INPUT_VALUE_ACCESSOR as ɵa, BaseMonacoEditor as ɵc, AngularMonacoEditorService as ɵe, CodeEditorEventService as ɵd }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci1tb25hY28tZWRpdG9yLmpzLm1hcCIsInNvdXJjZXMiOlsibmc6Ly9hbmd1bGFyLW1vbmFjby1lZGl0b3IvbGliL2VkaXRvci9jb25maWcudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL2NvbnN0YW50cy9ldmVudHMudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL3NlcnZpY2VzL2NvZGUtZWRpdG9yLmV2ZW50LnNlcnZpY2UudHMiLCJuZzovL2FuZ3VsYXItbW9uYWNvLWVkaXRvci9saWIvZWRpdG9yL2Jhc2UtbW9uYWNvLWVkaXRvci50cyIsIm5nOi8vYW5ndWxhci1tb25hY28tZWRpdG9yL2xpY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vID0gdHJ1ZTtcbiAgICAgIGxvYWRQcm9taXNlID0gbmV3IFByb21pc2U8dm9pZD4oKHJlc29sdmU6IGFueSkgPT4ge1xuICAgICAgICBjb25zdCBiYXNlVXJsID0gdGhpcy5jb25maWcuYmFzZVVybCB8fCAnL2Fzc2V0cyc7XG4gICAgICAgIC8vIGlmICh0eXBlb2YoKDxhbnk+d2luZG93KS5tb25hY28pID09PSAnb2JqZWN0Jykge1xuICAgICAgICAvLyAgIHJlc29sdmUoKTtcbiAgICAgICAgLy8gICByZXR1cm47XG4gICAgICAgIC8vIH1cbiAgICAgICAgY29uc3Qgb25Hb3RBbWRMb2FkZXI6IGFueSA9ICgpID0+IHtcbiAgICAgICAgICAvLyBMb2FkIG1vbmFjb1xuICAgICAgICAgICg8YW55PndpbmRvdykucmVxdWlyZS5jb25maWcoeyBwYXRoczogeyAndnMnOiBgJHtiYXNlVXJsfS9tb25hY28vdnNgIH0gfSk7XG4gICAgICAgICAgKDxhbnk+d2luZG93KS5yZXF1aXJlKFsndnMvZWRpdG9yL2VkaXRvci5tYWluJ10sICgpID0+IHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdGhpcy5jb25maWcub25Nb25hY29Mb2FkID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgIHRoaXMuY29uZmlnLm9uTW9uYWNvTG9hZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5pbml0TW9uYWNvKHRoaXMub3B0aW9ucyk7XG4gICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gTG9hZCBBTUQgbG9hZGVyIGlmIG5lY2Vzc2FyeVxuICAgICAgICBpZiAoISg8YW55PndpbmRvdykucmVxdWlyZSkge1xuICAgICAgICAgIGNvbnN0IGxvYWRlclNjcmlwdDogSFRNTFNjcmlwdEVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzY3JpcH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'@angular/forms'; | ||
import { AngularMonacoEditorConfig } from '../config'; | ||
import { CodeEditorEventService } from '../services/code-editor.event.service'; | ||
import { AngularEditorModel } from '../types'; | ||
import { BaseMonacoEditor } from '../base-monaco-editor'; | ||
import { AngularMonacoEditorConfig } from '../model/config'; | ||
import { CodeEditorEventService } from '../service/code-editor.event.service'; | ||
import { AngularEditorModel } from '../model/types'; | ||
import { BaseMonacoEditor } from '../model/base-monaco-editor'; | ||
import { AngularMonacoEditorService } from '../service/angular-monaco-editor.service'; | ||
export declare const CODE_EDITOR_INPUT_VALUE_ACCESSOR: any; | ||
export declare class AngularMonacoEditorComponent extends BaseMonacoEditor implements ControlValueAccessor { | ||
private angularMonacoEditorService; | ||
private zone; | ||
@@ -14,11 +16,5 @@ private editorEventService; | ||
private _value; | ||
private _errorInModelMarker; | ||
readonly errorInModelMarker: boolean; | ||
constructor(zone: NgZone, editorEventService: CodeEditorEventService, angularEditorconfig: AngularMonacoEditorConfig); | ||
constructor(angularMonacoEditorService: AngularMonacoEditorService, zone: NgZone, editorEventService: CodeEditorEventService, angularEditorconfig: AngularMonacoEditorConfig); | ||
protected initMonaco(options: any): void; | ||
/** | ||
* Acitve Model markers to get markers' results | ||
*/ | ||
acitveModelMarkers(): void; | ||
/** | ||
* refresh layout when resized the window | ||
@@ -31,3 +27,2 @@ */ | ||
value: any; | ||
localEditor(): void; | ||
writeValue(value: any): void; | ||
@@ -34,0 +29,0 @@ registerOnChange(fn: any): void; |
import { ModuleWithProviders } from '@angular/core'; | ||
import { AngularMonacoEditorConfig } from './config'; | ||
import { AngularMonacoEditorConfig } from './model/config'; | ||
export declare class AngularMonacoEditorModule { | ||
static forRoot(config?: AngularMonacoEditorConfig): ModuleWithProviders; | ||
} |
{ | ||
"name": "angular-monaco-editor", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "To utilize the Monaco Code Editor as an Angular Component.", | ||
@@ -5,0 +5,0 @@ "author": "courage007 <wang_xufa@163.com>", |
export * from './lib/editor/editor.module'; | ||
export * from './lib/editor/config'; | ||
export * from './lib/editor/types'; | ||
export * from './lib/editor/model/config'; | ||
export * from './lib/editor/model/types'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
367083
43
2744
1