diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7ed4a..974f19a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ See also [the changelog of monaco-editor](https://github.com/Microsoft/monaco-editor/blob/master/CHANGELOG.md). +# 0.17.1 + +- update to monaco editor 0.17.1 +- add transparent `getValue` / `setValue` to the widget API +- The widget is now a `PrimeFaces.widget.DeferredWidget` so that it works better with + tabs etc. + # 0.17.0 - update to PrimeFaces 7.0 (no guarantees it will work with PrimeFaces 6) diff --git a/README.md b/README.md index 3f8f0c1..6069500 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,8 @@ repository. Now just specify the `extender` option on the editor component: # Javascript API See the [official API docs for the Monaco Editor](https://microsoft.github.io/monaco-editor/api/index.html). -You can access the editor instance via the widget method `PrimeFaces.widget.ExtMonacoEditor.prototype.getMonaco`. + +You can access the monaco editor instance via the widget method `PrimeFaces.widget.ExtMonacoEditor.prototype.getMonaco`. This method returns an instance of [IStandaloneCodeEditor](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandalonecodeeditor.html). For example, when the widget variable `editor`: @@ -248,6 +249,9 @@ standaloneCodeEditor.getModel().setValue("console.log('foobar');"); standaloneCodeEditor.focus(); ``` +There are a few more widget methods available, see the [JSDocs on the type definitions +for further details](https://github.com/blutorange/primefaces-monaco/blob/master/src/npm/primefaces-monaco.d.ts#L225). + # Events Most events are forwarded from the Monaco Editor Javascript API so that they are available to JSF. @@ -398,7 +402,11 @@ is for this project. # Demo -There's a demo project with the editor under `/demo`. To run it, first build the editor via `mvn clean install`, then +There's a demo project with the editor under `/demo`. It contains several linked pages that +demonstrate one editor feature each. They also include a short description of what +is supposed to happen and thus can be used for integration testing as well. + +To run it, first build the editor via `mvn clean install`, then ```bash cd demo diff --git a/demo/pom.xml b/demo/pom.xml index 51586ad..921d501 100644 --- a/demo/pom.xml +++ b/demo/pom.xml @@ -6,7 +6,7 @@ monacotest monacotest - 0.17.0 + 0.17.1 war diff --git a/demo/src/main/java/TestBean.java b/demo/src/main/java/TestBean.java index db716f5..683e985 100644 --- a/demo/src/main/java/TestBean.java +++ b/demo/src/main/java/TestBean.java @@ -17,6 +17,7 @@ public class TestBean implements Serializable { private String code; private String uiLanguage; + private boolean rendered; private TheEnum theEnum; private EditorOptions editorOptions; @@ -80,4 +81,16 @@ public EditorOptions getEditorOptions() { public void setEditorOptions(EditorOptions editorOptions) { this.editorOptions = editorOptions; } + + public void setRendered(boolean rendered) { + this.rendered = rendered; + } + + public boolean getRendered() { + return rendered; + } + + public void toggleRendered() { + rendered = !rendered; + } } diff --git a/demo/src/main/webapp/template.xhtml b/demo/src/main/webapp/template.xhtml new file mode 100644 index 0000000..d6c475d --- /dev/null +++ b/demo/src/main/webapp/template.xhtml @@ -0,0 +1,105 @@ + + + + + + My First JSF Application + + + + .ui-layout-center { + overflow: hidden !important; + } + #log pre { + margin: 0.5em 0; + white-space: normal; + } + #log { + counter-reset: line 0; + } + .line { + counter-increment: line; + display: flex; + flex-direction: row; + } + .line::before { + content: counter(line) ">"; + margin-right: 0.5em; + font-weight: bold; + } + #tests { + display: flex; + flex-direction: row; + flex-wrap: wrap; + list-style-type: none; + } + h1 { + margin: 0; + } + #tests li { + margin: 0 0.25em; + } + + + + + +
+ + + + + +
+ +
+
+ + + + +

Log

+
+
+
+ + +
+ diff --git a/demo/src/main/webapp/test.xhtml b/demo/src/main/webapp/test.xhtml index 67f3ea6..5d4d2bd 100644 --- a/demo/src/main/webapp/test.xhtml +++ b/demo/src/main/webapp/test.xhtml @@ -1,55 +1,38 @@ - - - + - - My First JSF Application - - - - .ui-layout-center { - overflow: hidden !important; - } - - - - - -
- - - - - - -
- - - -
-
- - This is the east. - -
- -
- + + + + + + + + + + + + +
\ No newline at end of file diff --git a/demo/src/main/webapp/test2.xhtml b/demo/src/main/webapp/test2.xhtml new file mode 100644 index 0000000..6419a94 --- /dev/null +++ b/demo/src/main/webapp/test2.xhtml @@ -0,0 +1,44 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/demo/src/main/webapp/test3.xhtml b/demo/src/main/webapp/test3.xhtml new file mode 100644 index 0000000..4f5bffc --- /dev/null +++ b/demo/src/main/webapp/test3.xhtml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo/src/main/webapp/test4.xhtml b/demo/src/main/webapp/test4.xhtml new file mode 100644 index 0000000..5bce74b --- /dev/null +++ b/demo/src/main/webapp/test4.xhtml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo/src/main/webapp/tests.xhtml b/demo/src/main/webapp/tests.xhtml new file mode 100644 index 0000000..1dc92ae --- /dev/null +++ b/demo/src/main/webapp/tests.xhtml @@ -0,0 +1,17 @@ + + +

Examples

+ + +
\ No newline at end of file diff --git a/pom.xml b/pom.xml index eb9f75a..b7b5fa6 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.github.blutorange primefaces.monaco - 0.17.0 + 0.17.1 3.1.0 @@ -227,7 +227,7 @@ widget.js ECMASCRIPT_2018 - ECMASCRIPT_2015 + ECMASCRIPT3 (function(){%output%}).call(window); true widget.js diff --git a/src/main/java/com/github/blutorange/primefaces/component/monacoeditor/MonacoEditorRenderer.java b/src/main/java/com/github/blutorange/primefaces/component/monacoeditor/MonacoEditorRenderer.java index 3a3e79f..39e54a0 100644 --- a/src/main/java/com/github/blutorange/primefaces/component/monacoeditor/MonacoEditorRenderer.java +++ b/src/main/java/com/github/blutorange/primefaces/component/monacoeditor/MonacoEditorRenderer.java @@ -72,7 +72,7 @@ protected void encodeMarkup(final FacesContext context, final MonacoEditor monac style = style.concat("height:" + monacoEditor.getHeight() + ";"); } final StringBuilder styleClass = new StringBuilder(); - styleClass.append("ui-monaco-editor "); + styleClass.append("ui-monaco-editor ui-hidden-container "); if (monacoEditor.isDisabled() || monacoEditor.isReadonly()) { styleClass.append("ui-state-disabled "); } @@ -152,6 +152,8 @@ protected void encodeScript(final FacesContext context, final MonacoEditor monac wb.attr(MonacoEditor.PropertyKeys.READONLY.toString(), monacoEditor.isReadonly(), MonacoEditor.DEFAULT_READONLY); wb.attr(MonacoEditor.PropertyKeys.UI_LANGUAGE.toString(), monacoEditor.getUiLanguage(), MonacoEditor.DEFAULT_UI_LANGUAGE); wb.attr(MonacoEditor.PropertyKeys.UI_LANGUAGE_URI.toString(), monacoEditor.getUiLanguageUri(), MonacoEditor.DEFAULT_UI_LANGUAGE_URI); + wb.attr(MonacoEditor.PropertyKeys.HEIGHT.toString(), monacoEditor.getHeight(), MonacoEditor.DEFAULT_HEIGHT); + wb.attr(MonacoEditor.PropertyKeys.WIDTH.toString(), monacoEditor.getWidth(), MonacoEditor.DEFAULT_WIDTH); expression(wb, MonacoEditor.PropertyKeys.EXTENDER.toString(), monacoEditor.getExtender(), MonacoEditor.DEFAULT_EXTENDER); diff --git a/src/main/js/widget.js b/src/main/js/widget.js index 78e8a0a..d606948 100644 --- a/src/main/js/widget.js +++ b/src/main/js/widget.js @@ -55,7 +55,7 @@ function loadExtender(options) { const extenderString = options.extender; // No extender given - if (typeof extenderString === "undefined") { + if (typeof extenderString === "undefined" || extenderString === "") { return {}; } @@ -150,7 +150,7 @@ async function createEditorConstructionOptions(widget, extender, wasLibLoaded) { JSON.parse(widget.options.editorOptions) : {}; - const model = createModel(widget.options, widget.id, widget.getInput().val()); + const model = createModel(widget.options, widget.id, widget._editorValue); const options = jQuery.extend({ readOnly: widget.options.readonly || widget.options.disabled, model: model, @@ -240,17 +240,19 @@ const EditorDefaults = { editorOptions: {}, extender: "", extension: "", + height: "", language: "plaintext", readonly: false, uiLanguage: "", uiLanguageUri: "", version: "1.0", + width: "", }; // Make sure the monaco environment is set. const MonacoEnvironment = window.MonacoEnvironment = window.MonacoEnvironment || {}; -class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { +class ExtMonacoEditor extends PrimeFaces.widget.DeferredWidget { /** * @param {...any[]} args Arguments as passed by PrimeFaces. */ @@ -284,6 +286,9 @@ class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { // Remove any existing editor. this.destroy(); + // Default to the given value + this._editorValue = this.getInput().val(); + // English is the default. if (this.options.uiLanguage === "en") { this.options.uiLanguage = ""; @@ -304,6 +309,7 @@ class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { this._setup().then(() => { this._fireEvent("initialized"); this.jq.data("initialized", true); + this.setValue(this._editorValue); for (const {resolve} of this._onDone) { resolve(this); } @@ -324,23 +330,6 @@ class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { return this._editor; } - destroy() { - const extender = this._extenderInstance; - const monaco = this.getMonaco(); - if (extender && typeof extender.beforeDestroy === "function") { - extender.beforeDestroy(this); - } - if (this._resizeObserver !== undefined) { - this._resizeObserver.disconnect(this.jq.get(0)); - } - if (monaco !== undefined) { - monaco.dispose(); - } - if (extender && typeof extender.afterDestroy === "function") { - extender.afterDestroy(this); - } - } - /** * @returns {jQuery} The hidden textarea holding the value. */ @@ -359,7 +348,7 @@ class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { * @return {Promise} A promise that is resolved once the editor has finished loading. */ whenReady() { - if (this.jq.data("initialized")) { + if (this.isReady()) { return Promise.resolve(this); } return new Promise((resolve, reject) => { @@ -367,6 +356,58 @@ class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { }); } + /** + * Gets the value of this editor. May be called as soon as this widget is accessible, + * even when the monaco editor was not loaded or initialized yet. + * @return {string} The current value of this editor. + */ + getValue() { + if (this.isReady()) { + return this.getMonaco().getValue(); + } + else { + return this._editorValue; + } + } + + /** + * Sets the value of this editor. May be called as soon as this widget is accessible, + * even when the monaco editor was not loaded or initialized yet. + * @param {string} value The new value to set. + */ + setValue(value) { + if (this.isReady()) { + this.getMonaco().setValue(value); + } + else { + this._editorValue = value; + } + } + + destroy() { + const extender = this._extenderInstance; + const monaco = this.getMonaco(); + if (extender && typeof extender.beforeDestroy === "function") { + extender.beforeDestroy(this); + } + if (this._resizeObserver !== undefined) { + this._resizeObserver.disconnect(this.jq.get(0)); + } + if (monaco !== undefined) { + monaco.dispose(); + } + if (extender && typeof extender.afterDestroy === "function") { + extender.afterDestroy(this); + } + } + + /** + * @return {boolean} `true` if the monaco editor is fully initialized yet, `false` otherwise. + */ + isReady() { + return this.jq.data("initialized"); + } + async _setup() { const extender = loadExtender(this.options); this._extenderInstance = extender; @@ -374,18 +415,43 @@ class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { this._resolvedUiLanguageUri = uiLanguageUri; const wasLibLoaded = await loadEditorLib(this.options, forceLibReload); this.getEditorContainer().empty(); - const editorConstructionOptions = await createEditorConstructionOptions(this, extender, wasLibLoaded); - this._render(editorConstructionOptions, extender, wasLibLoaded); + const options = await createEditorConstructionOptions(this, extender, wasLibLoaded); + await this._renderDeferredAsync({extender, options, wasLibLoaded}); return; } /** - * - * @param {monaco.editor.IEditorConstructionOptions} options - * @param {MonacoExtender} extender - * @param {boolean} wasLibLoaded + * @param {{extender: MonacoExtender, options: monaco.editor.IEditorConstructionOptions, wasLibLoaded: boolean}} args Options to be passed on to the render method + * @return {Promise} A promise that resolves when the render method was called. */ - _render(options, extender, wasLibLoaded) { + _renderDeferredAsync(args) { + if (this.jq.closest(".ui-hidden-container").length === 0) { + return Promise.reject("No hidden container found"); + } + return new Promise((resolve, reject) => { + this._renderArgs = { args, reject, resolve }; + this.renderDeferred(); + }); + } + + _render() { + const { args, reject, resolve } = this._renderArgs; + try { + this._doRender(args); + resolve(); + } + catch (e) { + reject(e); + } + } + + /** + * Creates a new monaco editor. + * @param {{extender: MonacoExtender, options: monaco.editor.IEditorConstructionOptions, wasLibLoaded: boolean}} args Options to be passed on to the render method + */ + _doRender(args) { + const { extender, options, wasLibLoaded } = args; + // Create a new editor instance. this._editor = monaco.editor.create(this.getEditorContainer().get(0), options); @@ -405,6 +471,21 @@ class ExtMonacoEditor extends PrimeFaces.widget.BaseWidget { } } + if (typeof extender.afterCreate === "function") { + extender.afterCreate(this, wasLibLoaded); + } + + // Resize + if (this.options.autoResize) { + if (typeof ResizeObserver === "function") { + this._resizeObserver = new ResizeObserver(this._onResize.bind(this)); + this._resizeObserver.observe(this.jq.get(0)); + } + else { + console.warn("Browser environment does not support autoresize. window.ResizeObserver is not defined."); + } + } + // Change event. // Set the value of the editor on the hidden textarea. this._editor.onDidChangeModelContent(changes => { diff --git a/src/npm/package-lock.json b/src/npm/package-lock.json index d0ab779..d0c0341 100644 --- a/src/npm/package-lock.json +++ b/src/npm/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@types/jquery": { - "version": "3.3.29", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.29.tgz", - "integrity": "sha512-FhJvBninYD36v3k6c+bVk1DSZwh7B5Dpb/Pyk3HKVsiohn0nhbefZZ+3JXbWQhFyt0MxSl2jRDdGQPHeOHFXrQ==", + "version": "3.3.30", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.3.30.tgz", + "integrity": "sha512-chB+QbLulamShZAFcTJtl8opZwHFBpDOP6nRLrPGkhC6N1aKWrDXg2Nc71tEg6ny6E8SQpRwbWSi9GdstH5VJA==", "dev": true, "requires": { "@types/sizzle": "*" @@ -507,9 +507,9 @@ } }, "bluebird": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", - "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==" + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", + "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==" }, "bn.js": { "version": "4.11.8", @@ -656,21 +656,21 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", + "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", "requires": { - "bluebird": "^3.5.3", + "bluebird": "^3.5.5", "chownr": "^1.1.1", "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", + "glob": "^7.1.4", "graceful-fs": "^4.1.15", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", + "rimraf": "^2.6.3", "ssri": "^6.0.1", "unique-filename": "^1.1.1", "y18n": "^4.0.0" @@ -733,9 +733,9 @@ } }, "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.1", @@ -757,9 +757,9 @@ "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==" }, "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", + "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", "requires": { "tslib": "^1.9.0" } @@ -1536,24 +1536,14 @@ } }, "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", "requires": { "detect-file": "^1.0.0", - "is-glob": "^3.1.0", + "is-glob": "^4.0.0", "micromatch": "^3.0.4", "resolve-dir": "^1.0.1" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } } }, "flush-write-stream": { @@ -1666,13 +1656,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1685,18 +1673,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -1799,8 +1784,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -1810,7 +1794,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1823,7 +1806,6 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1861,9 +1843,9 @@ "optional": true }, "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "optional": true }, "needle": { @@ -1929,8 +1911,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -1940,7 +1921,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2046,7 +2026,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2181,9 +2160,9 @@ } }, "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-stream": { "version": "4.1.0", @@ -2255,13 +2234,23 @@ } }, "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" + "global-prefix": "^3.0.0" + }, + "dependencies": { + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + } } }, "global-prefix": { @@ -2499,11 +2488,6 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2663,6 +2647,11 @@ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=" + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -3010,9 +2999,9 @@ } }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -3037,9 +3026,9 @@ } }, "monaco-editor": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.17.0.tgz", - "integrity": "sha512-8BQQHCFxy3DF0GYFOy5BmcCWlwm/XaTMPbPbN4gwItFGctZErSfX82uQSBpojJSlPNyudB5Q5qnukoorD3/UuA==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.17.1.tgz", + "integrity": "sha512-JAc0mtW7NeO+0SwPRcdkfDbWLgkqL9WfP1NbpP9wNASsW6oWqgZqNIWt4teymGjZIXTElx3dnQmUYHmVrJ7HxA==", "dev": true }, "move-concurrently": { @@ -3090,9 +3079,9 @@ "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" }, "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, "nice-try": { "version": "1.0.5", @@ -3128,9 +3117,9 @@ } }, "node-libs-browser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", - "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", "requires": { "assert": "^1.1.1", "browserify-zlib": "^0.2.0", @@ -3142,7 +3131,7 @@ "events": "^3.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", + "path-browserify": "0.0.1", "process": "^0.11.10", "punycode": "^1.2.4", "querystring-es3": "^0.2.0", @@ -3154,7 +3143,7 @@ "tty-browserify": "0.0.0", "url": "^0.11.0", "util": "^0.11.0", - "vm-browserify": "0.0.4" + "vm-browserify": "^1.0.1" }, "dependencies": { "punycode": { @@ -3427,9 +3416,9 @@ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" }, "path-dirname": { "version": "1.0.2", @@ -3886,9 +3875,9 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "resolve-cwd": { "version": "2.0.0", @@ -3905,6 +3894,18 @@ "requires": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" + }, + "dependencies": { + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + } } }, "resolve-from": { @@ -4006,9 +4007,9 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -4425,9 +4426,9 @@ } }, "terser": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", - "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.0.0.tgz", + "integrity": "sha512-dOapGTU0hETFl1tCo4t56FN+2jffoKyER9qBGoUFyZ6y7WLoKT0bF+lAYi6B6YsILcGF3q1C2FBh8QcKSCgkgA==", "requires": { "commander": "^2.19.0", "source-map": "~0.6.1", @@ -4442,20 +4443,50 @@ } }, "terser-webpack-plugin": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz", - "integrity": "sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz", + "integrity": "sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg==", "requires": { - "cacache": "^11.0.2", + "cacache": "^11.3.2", "find-cache-dir": "^2.0.0", + "is-wsl": "^1.1.0", + "loader-utils": "^1.2.3", "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", + "serialize-javascript": "^1.7.0", "source-map": "^0.6.1", - "terser": "^3.16.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" + "terser": "^4.0.0", + "webpack-sources": "^1.3.0", + "worker-farm": "^1.7.0" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4539,9 +4570,9 @@ } }, "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "tty-browserify": { "version": "0.0.0", @@ -4574,35 +4605,14 @@ "optional": true }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "unique-filename": { @@ -4614,9 +4624,9 @@ } }, "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "requires": { "imurmurhash": "^0.1.4" } @@ -4737,12 +4747,9 @@ } }, "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", + "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==" }, "watchpack": { "version": "1.6.0", @@ -4755,9 +4762,9 @@ } }, "webpack": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.31.0.tgz", - "integrity": "sha512-n6RVO3X0LbbipoE62akME9K/JI7qYrwwufs20VvgNNpqUoH4860KkaxJTbGq5bgkVZF9FqyyTG/0WPLH3PVNJA==", + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.35.0.tgz", + "integrity": "sha512-M5hL3qpVvtr8d4YaJANbAQBc4uT01G33eDpl/psRTBCfjxFTihdhin1NtAKB1ruDwzeVdcsHHV3NX+QsAgOosw==", "requires": { "@webassemblyjs/ast": "1.8.5", "@webassemblyjs/helper-module-context": "1.8.5", @@ -4786,27 +4793,75 @@ } }, "webpack-cli": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.2.tgz", - "integrity": "sha512-FLkobnaJJ+03j5eplxlI0TUxhGCOdfewspIGuvDVtpOlrAuKMFC57K42Ukxqs1tn8947/PM6tP95gQc0DCzRYA==", - "requires": { - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "enhanced-resolve": "^4.1.0", - "findup-sync": "^2.0.0", - "global-modules": "^1.0.0", - "import-local": "^2.0.0", - "interpret": "^1.1.0", - "loader-utils": "^1.1.0", - "supports-color": "^5.5.0", - "v8-compile-cache": "^2.0.2", - "yargs": "^12.0.5" + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.5.tgz", + "integrity": "sha512-w0j/s42c5UhchwTmV/45MLQnTVwRoaUTu9fM5LuyOd/8lFoCNCELDogFoecx5NzRUndO0yD/gF2b02XKMnmAWQ==", + "requires": { + "chalk": "2.4.2", + "cross-spawn": "6.0.5", + "enhanced-resolve": "4.1.0", + "findup-sync": "3.0.0", + "global-modules": "2.0.0", + "import-local": "2.0.0", + "interpret": "1.2.0", + "loader-utils": "1.2.3", + "supports-color": "6.1.0", + "v8-compile-cache": "2.0.3", + "yargs": "13.2.4" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "requires": { "has-flag": "^3.0.0" } @@ -4921,28 +4976,72 @@ "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==" }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "version": "13.2.4", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", + "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + } } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" diff --git a/src/npm/package.json b/src/npm/package.json index 4644890..24532d3 100644 --- a/src/npm/package.json +++ b/src/npm/package.json @@ -23,11 +23,11 @@ "replace-in-file": "^3.4.4", "rimraf": "^2.6.3", "style-loader": "^0.23.1", - "webpack": "^4.31.0", - "webpack-cli": "^3.3.2" + "webpack": "^4.35.0", + "webpack-cli": "^3.3.5" }, "devDependencies": { - "@types/jquery": "^3.3.29", - "monaco-editor": "^0.17.0" + "@types/jquery": "^3.3.30", + "monaco-editor": "^0.17.1" } } diff --git a/src/npm/primefaces-monaco.d.ts b/src/npm/primefaces-monaco.d.ts index 7677d5d..87c3639 100644 --- a/src/npm/primefaces-monaco.d.ts +++ b/src/npm/primefaces-monaco.d.ts @@ -234,15 +234,32 @@ declare namespace PrimeFaces { */ getMonaco(): monaco.editor.IStandaloneCodeEditor; /** - * @returns The HTML container element holding the editor. It exists even + * @return The HTML container element holding the editor. It exists even * if the editor was not created yet. */ getEditorContainer(): JQuery; /** - * @returns The hidden textarea holding the value (eg. what the value sent when + * @return The hidden textarea holding the value (eg. what the value sent when * the form is submitted). */ getInput(): JQuery; + /** + * Gets the value of this editor. May be called as soon as this widget is accessible, + * even when the monaco editor was not loaded or initialized yet. + * @return {string} The current value of this editor. + */ + getValue(): string; + /** + * @return `true` when the editor was already loaded and initialized and can be interacted + * with via `#getMonaco()`, `false` otherwise. + */ + isReady(): boolean; + /** + * Sets the value of this editor. May be called as soon as this widget is accessible, + * even when the monaco editor was not loaded or initialized yet. + * @param {string} newValue The new value to set. + */ + setValue(newValue: string): void; /** * @return A promise that is resolved once the editor has finished loading. */