{"version":3,"file":"materia-ui-ngx-monaco-editor.mjs","sources":["../../../src/ngx-monaco-editor/src/lib/interfaces/index.ts","../../../src/ngx-monaco-editor/src/lib/services/monaco-editor-loader.service.ts","../../../src/ngx-monaco-editor/src/lib/directives/monaco-editor-loader.directive.ts","../../../src/ngx-monaco-editor/src/lib/components/monaco-editor/monaco-editor.component.ts","../../../src/ngx-monaco-editor/src/lib/components/monaco-diff-editor/monaco-diff-editor.component.ts","../../../src/ngx-monaco-editor/src/lib/monaco-editor.module.ts","../../../src/ngx-monaco-editor/src/public_api.ts","../../../src/ngx-monaco-editor/src/materia-ui-ngx-monaco-editor.ts"],"sourcesContent":["/// <reference path=\"monaco.ts\" />\nexport const MONACO_PATH = 'MONACO_PATH';\nexport type MonacoEditorConstructionOptions = monaco.editor.IStandaloneEditorConstructionOptions;\nexport type MonacoDiffEditorConstructionOptions = monaco.editor.IStandaloneDiffEditorConstructionOptions;\nexport type MonacoEditorUri = monaco.Uri;\nexport type MonacoStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\nexport type MonacoStandaloneDiffEditor = monaco.editor.IStandaloneDiffEditor;\n","import { Injectable, NgZone, Optional, Inject } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { MONACO_PATH } from '../interfaces';\n\n@Injectable({ providedIn: 'root' })\nexport class MonacoEditorLoaderService {\n    nodeRequire: any;\n    isMonacoLoaded$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n    private _monacoPath = 'assets/monaco-editor/min/vs';\n\n    set monacoPath(value: string) {\n        if (value) {\n            this._monacoPath = value;\n        }\n    }\n\n    constructor(private ngZone: NgZone, @Optional() @Inject(MONACO_PATH) public monacoPathConfig: string) {\n      if ((<any>window).monacoEditorAlreadyInitialized) {\n        ngZone.run(() => this.isMonacoLoaded$.next(true));\n        return;\n      }\n\n      (<any>window).monacoEditorAlreadyInitialized = true;\n\n      if (this.monacoPathConfig) {\n        this.monacoPath = this.monacoPathConfig;\n      }\n\n      this.loadMonaco();\n    }\n\n    loadMonaco() {\n      const onGotAmdLoader = () => {\n\n        let vsPath = this._monacoPath;\n        (<any>window).amdRequire = (<any>window).require;\n\n        const isElectron = !!this.nodeRequire;\n        const isPathUrl = vsPath.includes('http');\n\n        if (isElectron) {\n          // Restore node require in window\n          (<any>window).require = this.nodeRequire;\n\n          if (!isPathUrl) {\n            const path = (<any>window).require('path');\n            vsPath = path.resolve((<any>window).__dirname, this._monacoPath);\n          }\n        }\n\n        (<any>window).amdRequire.config({ paths: { vs: vsPath } });\n\n        // Load monaco\n        (<any>window).amdRequire(['vs/editor/editor.main'], () => {\n            this.ngZone.run(() => this.isMonacoLoaded$.next(true));\n        }, (error) => console.error('Error loading monaco-editor: ', error));\n      };\n\n      // Check if AMD loader already available\n      const isAmdLoaderAvailable = !!(<any>window).amdRequire;\n      if (isAmdLoaderAvailable) {\n        return onGotAmdLoader();\n      }\n\n      const isElectron = !!(<any>window).require;\n\n      if (isElectron) {\n        this.addElectronFixScripts();\n        this.nodeRequire = (<any>window).require;\n      }\n\n      const loaderScript: HTMLScriptElement = document.createElement('script');\n      loaderScript.type = 'text/javascript';\n      loaderScript.src = `${this._monacoPath}/loader.js`;\n      loaderScript.addEventListener('load', onGotAmdLoader);\n      document.body.appendChild(loaderScript);\n    }\n\n    addElectronFixScripts() {\n        const electronFixScript = document.createElement('script');\n        // workaround monaco-css not understanding the environment\n        const inlineScript = document.createTextNode('self.module = undefined;');\n        // workaround monaco-typescript not understanding the environment\n        const inlineScript2 = document.createTextNode('self.process.browser = true;');\n        electronFixScript.appendChild(inlineScript);\n        electronFixScript.appendChild(inlineScript2);\n        document.body.appendChild(electronFixScript);\n    }\n}\n","import { Directive, TemplateRef, ViewContainerRef, OnDestroy, OnInit } from '@angular/core';\nimport { MonacoEditorLoaderService } from '../services/monaco-editor-loader.service';\nimport { takeUntil } from 'rxjs/operators';\nimport { Subject } from 'rxjs';\n\n@Directive({ selector: '[ngxLoadMonacoEditor]' })\nexport class MonacoEditorLoaderDirective implements OnInit, OnDestroy {\n  isMonacoLoaded$ = this.monacoEditorLoaderService.isMonacoLoaded$.asObservable();\n  destroyed$ = new Subject<void>();\n\n  constructor(\n    private templateRef: TemplateRef<any>,\n    private viewContainer: ViewContainerRef,\n    private monacoEditorLoaderService: MonacoEditorLoaderService\n  ) {}\n\n  ngOnInit() {\n    this.isMonacoLoaded$.pipe(takeUntil(this.destroyed$)).subscribe((loaded) => {\n      if (!loaded) {\n        return this.viewContainer.clear();\n      }\n      this.viewContainer.createEmbeddedView(this.templateRef);\n    });\n  }\n\n  ngOnDestroy() {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n}\n","import {\n    Component,\n    ViewChild,\n    ElementRef,\n    EventEmitter,\n    OnInit,\n    OnChanges,\n    OnDestroy,\n    Input,\n    ChangeDetectionStrategy,\n    forwardRef,\n    SimpleChanges,\n    Output\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, Validator, NG_VALIDATORS, ValidationErrors } from '@angular/forms';\nimport { filter, take } from 'rxjs/operators';\n\nimport { MonacoEditorLoaderService } from '../../services/monaco-editor-loader.service';\nimport { MonacoEditorConstructionOptions, MonacoEditorUri, MonacoStandaloneCodeEditor } from '../../interfaces';\n\n@Component({\n    selector: 'ngx-monaco-editor',\n    template: `<div #container class=\"editor-container\" fxFlex>\n\t\t<div\n\t\t\t#editor\n\t\t\tclass=\"monaco-editor\"\n\t\t></div>\n</div>`,\n    styles: [\n        `\n.monaco-editor {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n\n}\n.editor-container {\n\toverflow: hidden;\n\tposition: relative;\n\tdisplay: table;\n\twidth: 100%;\n  height: 100%;\n  min-width: 0;\n}`\n    ],\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    providers: [\n        {\n            provide: NG_VALUE_ACCESSOR,\n            useExisting: forwardRef(() => MonacoEditorComponent),\n            multi: true\n        },\n        {\n            provide: NG_VALIDATORS,\n            useExisting: forwardRef(() => MonacoEditorComponent),\n            multi: true,\n        }\n    ]\n})\nexport class MonacoEditorComponent implements OnInit, OnChanges, OnDestroy, ControlValueAccessor, Validator {\n    @Input() options: MonacoEditorConstructionOptions;\n    @Input() uri?: MonacoEditorUri;\n    @Output() init: EventEmitter<MonacoStandaloneCodeEditor> = new EventEmitter();\n    @ViewChild('editor', { static: true }) editorContent: ElementRef;\n\n    editor: MonacoStandaloneCodeEditor;\n    modelUriInstance: monaco.editor.ITextModel;\n    value: string;\n    parsedError: string;\n\n    private onTouched: () => void = () => {};\n    private onErrorStatusChange: () => void = () => {};\n    private propagateChange: (_: any) => any = () => {};\n\n    get model() {\n      return this.editor && this.editor.getModel();\n    }\n\n    get modelMarkers() {\n      return this.model && monaco.editor.getModelMarkers({\n        resource: this.model.uri\n      });\n    }\n\n    constructor(private monacoLoader: MonacoEditorLoaderService) { }\n\n    ngOnInit() {\n        this.monacoLoader.isMonacoLoaded$.pipe(\n            filter(isLoaded => isLoaded),\n            take(1)\n        ).subscribe(() => {\n            this.initEditor();\n        });\n    }\n\n    ngOnChanges(changes: SimpleChanges) {\n        if (this.editor && changes.options && !changes.options.firstChange) {\n          const { language: toLanguage, theme: toTheme, ...options } = changes.options.currentValue;\n          const { language: fromLanguage, theme: fromTheme } = changes.options.previousValue;\n\n          if (fromLanguage !== toLanguage) {\n              monaco.editor.setModelLanguage(\n                  this.editor.getModel(),\n                  this.options && this.options.language ? this.options.language : 'text'\n              );\n          }\n\n          if (fromTheme !== toTheme) {\n              monaco.editor.setTheme(toTheme);\n          }\n\n          this.editor.updateOptions(options);\n        }\n\n        if (this.editor && changes.uri) {\n          const toUri = changes.uri.currentValue;\n          const fromUri = changes.uri.previousValue;\n\n          if (fromUri && !toUri || !fromUri && toUri || toUri && fromUri && toUri.path !== fromUri.path) {\n            const value = this.editor.getValue();\n\n            if (this.modelUriInstance) {\n              this.modelUriInstance.dispose();\n            }\n\n            let existingModel;\n\n            if (toUri) {\n              existingModel = monaco.editor.getModels().find((model) => model.uri.path === toUri.path);\n            }\n\n            this.modelUriInstance = existingModel ? existingModel : monaco.editor.createModel(value, this.options.language || 'text', this.uri);\n            this.editor.setModel(this.modelUriInstance);\n          }\n        }\n    }\n\n    writeValue(value: string): void {\n        this.value = value;\n        if (this.editor && value) {\n            this.editor.setValue(value);\n        } else if (this.editor) {\n            this.editor.setValue('');\n        }\n    }\n\n    registerOnChange(fn: any): void {\n        this.propagateChange = fn;\n    }\n\n    registerOnTouched(fn: any): void {\n        this.onTouched = fn;\n    }\n\n    validate(): ValidationErrors {\n        return !this.parsedError ? null : {\n            monaco: {\n                value: this.parsedError.split('|'),\n            }\n        };\n    }\n\n    registerOnValidatorChange?(fn: () => void): void {\n        this.onErrorStatusChange = fn;\n    }\n\n    private initEditor() {\n        const options: MonacoEditorConstructionOptions = {\n            value: [this.value].join('\\n'),\n            language: 'text',\n            automaticLayout: true,\n            scrollBeyondLastLine: false,\n            theme: 'vc'\n        };\n\n        this.editor = monaco.editor.create(\n          this.editorContent.nativeElement,\n          this.options ? { ...options, ...this.options } : options\n        );\n\n        this.registerEditorListeners();\n        this.init.emit(this.editor);\n    }\n\n    registerEditorListeners() {\n      this.editor.onDidChangeModelContent(() => {\n        this.propagateChange(this.editor.getValue());\n      });\n\n      this.editor.onDidChangeModelDecorations(() => {\n          const currentParsedError = this.modelMarkers.map(({ message }) => message).join('|');\n          const hasValidationStatusChanged = this.parsedError !== currentParsedError;\n\n          if (hasValidationStatusChanged) {\n              this.parsedError = currentParsedError;\n              this.onErrorStatusChange();\n          }\n      });\n\n      this.editor.onDidBlurEditorText(() => {\n          this.onTouched();\n      });\n    }\n\n    ngOnDestroy() {\n        if (this.editor) {\n            this.editor.dispose();\n        }\n    }\n}\n","import {\n    Component,\n    ViewChild,\n    ElementRef,\n    EventEmitter,\n    OnInit,\n    OnChanges,\n    OnDestroy,\n    Output,\n    Input,\n    ChangeDetectionStrategy,\n    SimpleChanges\n} from '@angular/core';\nimport { filter, take } from 'rxjs/operators';\n\nimport { MonacoEditorLoaderService } from '../../services/monaco-editor-loader.service';\nimport { MonacoDiffEditorConstructionOptions, MonacoStandaloneDiffEditor } from '../../interfaces';\n\n@Component({\n    selector: 'ngx-monaco-diff-editor',\n    template: `<div #container class=\"editor-container\" fxFlex>\n\t\t<div\n\t\t\t#diffEditor\n\t\t\tclass=\"monaco-editor\"\n\t\t></div>\n</div>`,\n    styles: [\n        `\n.monaco-editor {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n\n}\n.editor-container {\n\toverflow: hidden;\n\tposition: relative;\n\tdisplay: table;\n\twidth: 100%;\n  height: 100%;\n  min-width: 0;\n}`\n    ],\n    changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonacoDiffEditorComponent implements OnInit, OnChanges, OnDestroy {\n    container: HTMLDivElement;\n    editor: MonacoStandaloneDiffEditor;\n\n    @Input() original: string;\n    @Input() modified: string;\n    @Input() options: MonacoDiffEditorConstructionOptions;\n    @Output() init: EventEmitter< MonacoStandaloneDiffEditor> = new EventEmitter();\n\n    @ViewChild('diffEditor', {static: true}) editorContent: ElementRef;\n\n    constructor(private monacoLoader: MonacoEditorLoaderService) { }\n\n    ngOnInit() {\n        this.container = this.editorContent.nativeElement;\n        this.monacoLoader.isMonacoLoaded$.pipe(\n            filter(isLoaded => isLoaded),\n            take(1),\n        ).subscribe(() => {\n            this.initMonaco();\n        });\n    }\n\n    ngOnChanges(changes: SimpleChanges) {\n        if (this.editor && ((changes.code && !changes.code.firstChange) || (changes.modified && !changes.modified.firstChange))) {\n            const modified = monaco.editor.createModel(this.modified);\n            const original = monaco.editor.createModel(this.original);\n            this.editor.setModel({\n                original,\n                modified\n            });\n        }\n        if (\n            this.editor &&\n            changes.options &&\n            !changes.options.firstChange\n        ) {\n            if (changes.options.previousValue.theme !== changes.options.currentValue.theme) {\n                monaco.editor.setTheme(changes.options.currentValue.theme);\n            }\n\n            this.editor.updateOptions(changes.options.currentValue);\n        }\n    }\n\n    private initMonaco() {\n        let opts: MonacoDiffEditorConstructionOptions = {\n            readOnly: true,\n            automaticLayout: true,\n            theme: 'vc'\n        };\n        if (this.options) {\n            opts = Object.assign({}, opts, this.options);\n        }\n        this.editor = monaco.editor.createDiffEditor(this.container, opts);\n\n        const original = monaco.editor.createModel(this.original);\n        const modified = monaco.editor.createModel(this.modified);\n\n        this.editor.setModel({\n            original,\n            modified\n        });\n        this.editor.layout();\n        this.init.emit(this.editor);\n    }\n\n    ngOnDestroy() {\n        if (this.editor) {\n            this.editor.dispose();\n        }\n    }\n}\n","import { NgModule } from '@angular/core';\nimport { MonacoEditorLoaderDirective } from './directives/monaco-editor-loader.directive';\nimport { MonacoEditorComponent } from './components/monaco-editor/monaco-editor.component';\nimport { MonacoDiffEditorComponent } from './components/monaco-diff-editor/monaco-diff-editor.component';\n\n@NgModule({\n    imports: [],\n    declarations: [\n        MonacoEditorLoaderDirective,\n        MonacoEditorComponent,\n        MonacoDiffEditorComponent\n    ],\n    exports: [\n        MonacoEditorLoaderDirective,\n        MonacoEditorComponent,\n        MonacoDiffEditorComponent\n    ]\n})\nexport class MonacoEditorModule { }\n","/*\n * Public API Surface of materia-monaco-editor-lib\n */\nexport * from './lib/directives/monaco-editor-loader.directive';\nexport * from './lib/services/monaco-editor-loader.service';\nexport * from './lib/interfaces';\nexport * from './lib/components/monaco-editor/monaco-editor.component';\nexport * from './lib/components/monaco-diff-editor/monaco-diff-editor.component';\nexport * from './lib/monaco-editor.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAA;MACa,WAAW,GAAG;;MCId,yBAAyB;IAWlC,YAAoB,MAAc,EAA0C,gBAAwB;QAAhF,WAAM,GAAN,MAAM,CAAQ;QAA0C,qBAAgB,GAAhB,gBAAgB,CAAQ;QATpG,oBAAe,GAA6B,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;QACxE,gBAAW,GAAG,6BAA6B,CAAC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