diff --git a/README.md b/README.md index 40977b6f..539333af 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ SPDX-License-Identifier: EPL-2.0 Copyright Contributors to the Zowe Project. # ZLUX Editor +This is a Monaco-powered editor of remote files and datasets that are accessible on a system with a Zowe instance, and this program is an App which lives within that Zowe instance. + +**To request features or report bugs, please use the issues page at the [zlux repo](https://github.com/zowe/zlux/issues) with the editor or app tags** + ## Install There is an Angular module in "webClient" folder. Go to this folder and run ```npm install```. diff --git a/node_modules/@zlux/file-explorer b/node_modules/@zlux/file-explorer new file mode 160000 index 00000000..c898962d --- /dev/null +++ b/node_modules/@zlux/file-explorer @@ -0,0 +1 @@ +Subproject commit c898962d44c0253df48a5873170a5f52e826d5b9 diff --git a/pluginDefinition.json b/pluginDefinition.json index be438389..a2b35a52 100644 --- a/pluginDefinition.json +++ b/pluginDefinition.json @@ -17,5 +17,26 @@ "width": 1200, "height": 600 } + }, + "configurationData": { + "resources": { + + "ui": { + + "aggregationPolicy": "override", + + "subResources": { + + "history": { + + "aggregationPolicy": "override" + + } + + } + + } + + } } -} +} \ No newline at end of file diff --git a/webClient/package-lock.json b/webClient/package-lock.json index 2f9bd312..9aff9e97 100644 --- a/webClient/package-lock.json +++ b/webClient/package-lock.json @@ -558,9 +558,9 @@ } }, "@types/lodash": { - "version": "4.14.136", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.136.tgz", - "integrity": "sha512-0GJhzBdvsW2RUccNHOBkabI8HZVdOXmXbXhuKlDEd5Vv12P7oAVGfomGp3Ne21o5D/qu1WmthlNKFaoZJJeErA==" + "version": "4.14.138", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.138.tgz", + "integrity": "sha512-A4uJgHz4hakwNBdHNPdxOTkYmXNgmUAKLbXZ7PKGslgeV0Mb8P3BlbYfPovExek1qnod4pDfRbxuzcVs3dlFLg==" }, "@types/node": { "version": "6.14.7", @@ -972,7 +972,7 @@ "dev": true }, "@zlux/file-explorer": { - "version": "git+ssh://git@github.com/zowe/zlux-file-explorer.git#e8e67d947690d26c7eb8e17477bb77210ee8e04c", + "version": "git+ssh://git@github.com/zowe/zlux-file-explorer.git#55df87454e6b2a1e1e5eddb2304bef3e7a3df3c3", "from": "git+ssh://git@github.com/zowe/zlux-file-explorer.git#rc", "dev": true, "requires": { @@ -1553,9 +1553,9 @@ } }, "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", "dev": true }, "batch": { @@ -1926,9 +1926,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000988", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000988.tgz", - "integrity": "sha512-lPj3T8poYrRc/bniW5SQPND3GRtSrQdUM/R4mCYTbZxyi3jQiggLvZH4+BYUuX0t4TXjU+vMM7KFDQg+rSzZUQ==", + "version": "1.0.30000989", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz", + "integrity": "sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw==", "dev": true }, "carbon-components": { @@ -2336,9 +2336,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -2734,9 +2734,9 @@ } }, "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", "dev": true }, "dashdash": { @@ -2776,10 +2776,18 @@ "dev": true }, "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", + "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } }, "deep-is": { "version": "0.1.3", @@ -2994,13 +3002,21 @@ } }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.1.tgz", + "integrity": "sha512-sK3ujri04WyjwQXVoK4PU3y8ula1stq10GJZpqHIUgoGZdsGzAGu65BnU3d08aTVSvO7mGPZUc0wTEDL+qGE0Q==", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + } } }, "domain-browser": { @@ -3063,21 +3079,21 @@ "dev": true }, "ejs": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz", - "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.1.tgz", + "integrity": "sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ==", "dev": true }, "electron-to-chromium": { - "version": "1.3.210", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.210.tgz", - "integrity": "sha512-m1i/F+gw9jkauxDx0mOr7Sj6vp6se1mfkQNYqZb1yL5VGTp0AC1NZH5CGI6YMSO7WaScILmkKDZFG9/hlR9axQ==", + "version": "1.3.253", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.253.tgz", + "integrity": "sha512-LAwFRWViiiCSxQ2Lj3mnyEP8atkpAoHSPUnkFoy4mNabbnPHxtfseWvPCGGhewjHQI+ky/V4LdlTyyI0d3YPXA==", "dev": true }, "elliptic": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", - "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz", + "integrity": "sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -3131,9 +3147,9 @@ } }, "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", "dev": true }, "err-code": { @@ -3161,17 +3177,21 @@ } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.14.2.tgz", + "integrity": "sha512-DgoQmbpFNOofkjJtKwr87Ma5EW4Dc8fWhD0R+ndq7Oc456ivUfGOOP6oAZTTKl5/CcNMP+EN+e3/iUzgE0veZg==", "dev": true, "requires": { "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", "has": "^1.0.3", + "has-symbols": "^1.0.0", "is-callable": "^1.1.4", "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.0.0", + "string.prototype.trimright": "^2.0.0" } }, "es-to-primitive": { @@ -3258,9 +3278,9 @@ }, "dependencies": { "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true } } @@ -3281,9 +3301,9 @@ }, "dependencies": { "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true } } @@ -3771,12 +3791,12 @@ } }, "follow-redirects": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", - "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", + "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", "dev": true, "requires": { - "debug": "^3.2.6" + "debug": "^3.0.0" }, "dependencies": { "debug": { @@ -3906,7 +3926,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4321,7 +4342,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4377,6 +4399,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4420,12 +4443,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4625,9 +4650,9 @@ } }, "graceful-fs": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", - "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", + "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==", "dev": true }, "handle-thing": { @@ -4637,9 +4662,9 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.0.tgz", + "integrity": "sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -4822,9 +4847,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz", + "integrity": "sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ==", "dev": true }, "hpack.js": { @@ -4916,6 +4941,12 @@ "readable-stream": "^3.1.1" }, "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, "readable-stream": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", @@ -5108,9 +5139,9 @@ "dev": true }, "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.2.tgz", + "integrity": "sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw==", "dev": true, "requires": { "minimatch": "^3.0.4" @@ -5181,9 +5212,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -5259,9 +5290,9 @@ "dev": true }, "inquirer": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", - "integrity": "sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "dev": true, "requires": { "ansi-escapes": "^3.2.0", @@ -5292,9 +5323,9 @@ "dev": true }, "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -5409,6 +5440,12 @@ } } }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5871,9 +5908,9 @@ "dev": true }, "jsonc-parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.1.0.tgz", - "integrity": "sha512-n9GrT8rrr2fhvBbANa1g+xFmgGK5X91KFeDwlKQ3+SJfmH5+tKv/M/kahx/TXOMflfWHKGKqKyfHQaLKTNzJ6w==" + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.1.1.tgz", + "integrity": "sha512-VC0CjnWJylKB1iov4u76/W/5Ef0ydDkjtYWxoZ9t3HdWlSnZQwZL5MgFikaB/EtQ4RmMEw3tmQzuYnZA2/Ja1g==" }, "jsonparse": { "version": "1.3.1", @@ -6069,9 +6106,9 @@ "dev": true }, "loglevel": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.3.tgz", - "integrity": "sha512-LoEDv5pgpvWgPF4kNYuIp0qqSJVWak/dML0RY74xlzMZiT9w77teNAwKYKWBTYjlokMirg+o3jBwp+vlLrcfAA==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.4.tgz", + "integrity": "sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g==", "dev": true }, "long": { @@ -6467,9 +6504,9 @@ "dev": true }, "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.5.0.tgz", + "integrity": "sha512-9FwMVYhn6ERvMR8XFdOavRz4QK/VJV8elU1x50vYexf9lslDcWe/f4HBRxCPd185ekRSjU6CfYyJCECa/CQy7Q==", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -6710,9 +6747,9 @@ } }, "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.8.2.tgz", + "integrity": "sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg==", "dev": true }, "node-gyp": { @@ -7058,6 +7095,18 @@ } } }, + "object-inspect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", + "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==", + "dev": true + }, + "object-is": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.1.tgz", + "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=", + "dev": true + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -7453,12 +7502,12 @@ "dev": true }, "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", "dev": true, "requires": { - "cyclist": "~0.2.2", + "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" } @@ -7891,9 +7940,9 @@ "dev": true }, "psl": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", - "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.1.tgz", + "integrity": "sha512-2KLd5fKOdAfShtY2d/8XDWVRnmp3zp40Qt6ge2zBPFARLXOGUf2fHD5eg+TV/5oxBtQKVhjUaKFsAaE4HnwfSA==", "dev": true }, "public-encrypt": { @@ -8213,6 +8262,15 @@ "safe-regex": "^1.1.0" } }, + "regexp.prototype.flags": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", + "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2" + } + }, "regexpu-core": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", @@ -8394,9 +8452,9 @@ "dev": true }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { "glob": "^7.1.3" @@ -8536,12 +8594,12 @@ "dev": true }, "selfsigned": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", - "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", + "version": "1.10.6", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.6.tgz", + "integrity": "sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w==", "dev": true, "requires": { - "node-forge": "0.7.5" + "node-forge": "0.8.2" } }, "semver": { @@ -8598,9 +8656,9 @@ } }, "serialize-javascript": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", - "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", "dev": true }, "serve-index": { @@ -9263,6 +9321,26 @@ "strip-ansi": "^3.0.0" } }, + "string.prototype.trimleft": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.0.0.tgz", + "integrity": "sha1-aLaqjhYsaoDnbjqKDC50cYbicf8=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.0.2" + } + }, + "string.prototype.trimright": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.0.0.tgz", + "integrity": "sha1-q0pW2AKgH75yk+EehPJNyBZGYd0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.0.2" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -9426,9 +9504,9 @@ "dev": true }, "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", "dev": true, "requires": { "setimmediate": "^1.0.4" @@ -9877,9 +9955,9 @@ } }, "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", "dev": true }, "upper-case": { @@ -10002,15 +10080,15 @@ "dev": true }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", "dev": true }, "v8-compile-cache": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", - "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, "v8flags": { @@ -10464,9 +10542,9 @@ } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "ms": { @@ -10926,9 +11004,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" diff --git a/webClient/src/app/app.component.html b/webClient/src/app/app.component.html index ad9d1a78..9d7e66ab 100644 --- a/webClient/src/app/app.component.html +++ b/webClient/src/app/app.component.html @@ -8,11 +8,11 @@ Copyright Contributors to the Zowe Project. --> -
+
-
+
diff --git a/webClient/src/app/app.component.scss b/webClient/src/app/app.component.scss index 4972f82b..5d036b21 100644 --- a/webClient/src/app/app.component.scss +++ b/webClient/src/app/app.component.scss @@ -565,87 +565,6 @@ input.mat-input-element { transform: scale(0); } -.cdk-visually-hidden { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; - outline: 0; - -webkit-appearance: none; - -moz-appearance: none; -} - -.cdk-global-overlay-wrapper { - pointer-events: none; - top: 0; - left: 0; - height: 100%; - width: 100%; -} - -.cdk-overlay-container { - pointer-events: none; - top: 0; - left: 0; - height: 100%; - width: 100%; - position: fixed; - z-index: 1000; - &:empty { - display: none; - } -} - -.cdk-global-overlay-wrapper { - display: flex; - position: absolute; - z-index: 1000; -} - -.cdk-overlay-pane { - position: absolute; - pointer-events: auto; - box-sizing: border-box; - z-index: 1000; -} - -.cdk-overlay-backdrop { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 1000; - pointer-events: auto; - -webkit-tap-highlight-color: transparent; - transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); - opacity: 0; - &.cdk-overlay-backdrop-showing { - opacity: 1; - } -} - -.cdk-overlay-dark-backdrop { - background: rgba(0, 0, 0, 0.288); -} - -.cdk-overlay-transparent-backdrop { - opacity: 0; - &.cdk-overlay-backdrop-showing { - opacity: 0; - } -} - -.cdk-global-scrollblock { - position: fixed; - width: 100%; - overflow-y: scroll; -} - .mat-ripple-element { background-color: rgba(0, 0, 0, 0.1); } @@ -1964,7 +1883,7 @@ input.mat-input-element { background: #323232; color: #fff; } - + .mat-simple-snackbar-action { color: #ff4081; button { @@ -1976,7 +1895,6 @@ input.mat-input-element { - // component style :host { display: block; diff --git a/webClient/src/app/app.component.ts b/webClient/src/app/app.component.ts index dec88cb0..567b8741 100644 --- a/webClient/src/app/app.component.ts +++ b/webClient/src/app/app.component.ts @@ -8,12 +8,13 @@ Copyright Contributors to the Zowe Project. */ -import { Component, Inject } from '@angular/core'; +import { Component, Inject, OnDestroy, ElementRef, ViewChild } from '@angular/core'; import { Angular2InjectionTokens } from 'pluginlib/inject-resources'; import { EditorControlService } from './shared/editor-control/editor-control.service'; import { HttpService } from './shared/http/http.service'; import { DataAdapterService } from './shared/http/http.data.adapter.service'; import { UtilsService } from './shared/utils.service'; +import { EditorKeybindingService } from './shared/editor-keybinding.service'; @Component({ selector: 'app-root', @@ -25,13 +26,17 @@ import { UtilsService } from './shared/utils.service'; }) export class AppComponent { title = 'app'; + + @ViewChild('editorheader') + editorheaderElementRef: ElementRef; constructor(@Inject(Angular2InjectionTokens.LOGGER) private log: ZLUX.ComponentLogger, @Inject(Angular2InjectionTokens.LAUNCH_METADATA) private launchMetadata: any, private dataAdapter: DataAdapterService, private httpService: HttpService, private utils: UtilsService, - private editorControl: EditorControlService) { + private editorControl: EditorControlService, + private appKeyboard: EditorKeybindingService) { this.log.debug(`Monaco object=`,(window).monaco); } @@ -39,6 +44,9 @@ export class AppComponent { if (this.launchMetadata && this.launchMetadata.data && this.launchMetadata.data.type) { this.handleLaunchOrMessageObject(this.launchMetadata.data); } + + const editorheaderElement = this.editorheaderElementRef.nativeElement; + this.appKeyboard.registerKeyUpEvent(editorheaderElement); } handleLaunchOrMessageObject(data: any) { @@ -55,13 +63,15 @@ export class AppComponent { this.log.warn(`Ignoring opening invalid file or dataset name=${data.name}`); return; } - let parenIsLast = data.name.lastIndexOf(")") == data.name.length-1; - let openParen = data.name.indexOf("("); - let hasSlash = lastSlash != -1; let isDataset = false; - if (hasSlash && parenIsLast && openParen != -1 && firstSlash > openParen) { + if (data.name.startsWith("//'") && data.name.charAt(data.name.length-1) == "'") { isDataset = true; - } + data.name = data.name.substring(3,data.name.length-1); + } +// let parenIsLast = data.name.lastIndexOf(")") == data.name.length-1; +// let openParen = data.name.indexOf("("); +// let hasSlash = lastSlash != -1; +// if (hasSlash && parenIsLast && openParen != -1 && firstSlash > openParen) { let nodeData; if (!isDataset) { let uri = ZoweZLUX.uriBroker.unixFileUri('contents', data.name.substring(0,lastSlash)); @@ -82,6 +92,17 @@ export class AppComponent { let error = e.json().error; // this.snackBarService.open(`Directory ${dirName} does not exist!`, 'Close', { duration: 2000, panelClass: 'center' }); }); + } else { + this.log.info(`Opening dataset=${data.name}`); + this.editorControl.openDataset.next(data.name); + } + break; + case 'openDataset': + if (data.name) { + this.log.info(`Opening dataset=${data.name}`); + this.editorControl.openDataset.next(data.name); + } else { + this.log.warn(`Dataset name missing. Skipping operation`); } break; case 'openDir': diff --git a/webClient/src/app/core/menu-bar/menu-bar.component.html b/webClient/src/app/core/menu-bar/menu-bar.component.html index 1ebc6e71..a6d73dfc 100644 --- a/webClient/src/app/core/menu-bar/menu-bar.component.html +++ b/webClient/src/app/core/menu-bar/menu-bar.component.html @@ -9,13 +9,16 @@ Copyright Contributors to the Zowe Project. -->
-
    -
  • +
      +
- - + +
- +
-
- - - -
- - {{nodeIcon(node)}} -
- -
-
-
-
-
-
diff --git a/webClient/src/app/editor/project-tree/project-tree.component.ts b/webClient/src/app/editor/project-tree/project-tree.component.ts index 1c1a51c1..38c4a32c 100644 --- a/webClient/src/app/editor/project-tree/project-tree.component.ts +++ b/webClient/src/app/editor/project-tree/project-tree.component.ts @@ -8,7 +8,7 @@ Copyright Contributors to the Zowe Project. */ -import { Component, OnInit, ViewChild, Inject } from '@angular/core'; +import { Component, ViewChild, Inject } from '@angular/core'; import { Response } from '@angular/http'; import { MatDialog } from '@angular/material'; import { TreeNode, TREE_ACTIONS, TreeComponent } from 'angular-tree-component'; @@ -16,7 +16,7 @@ import { OpenProjectComponent } from '../../shared/dialog/open-project/open-proj import { OpenFolderComponent } from '../../shared/dialog/open-folder/open-folder.component'; import { HttpService } from '../../shared/http/http.service'; import { ENDPOINTS } from '../../../environments/environment'; -import { ProjectStructure } from '../../shared/model/editor-project'; +import { ProjectStructure, DatasetAttributes } from '../../shared/model/editor-project'; import { ProjectContext } from '../../shared/model/project-context'; import { EditorControlService } from '../../shared/editor-control/editor-control.service'; import { EditorService } from '../editor.service'; @@ -29,12 +29,22 @@ import { ZluxFileExplorerComponent } from '@zlux/file-explorer/src/app/component import { OpenDatasetComponent } from '../../shared/dialog/open-dataset/open-dataset.component'; import { B64Decoder } from '../../shared/b64-decoder'; +function getDatasetName(dirName) { + let lParenIndex = dirName.indexOf('('); + let rParenIndex = dirName.lastIndexOf(')'); + if (lParenIndex > 0 && lParenIndex < 46 && rParenIndex == dirName.length-1) { + return dirName.substring(0,lParenIndex); + } else { + return dirName; + } +} + @Component({ selector: 'app-project-tree', templateUrl: './project-tree.component.html', styleUrls: ['./project-tree.component.scss', '../../../styles.scss'] }) -export class ProjectTreeComponent implements OnInit { +export class ProjectTreeComponent { @ViewChild(TreeComponent) private tree: TreeComponent; @@ -42,8 +52,6 @@ export class ProjectTreeComponent implements OnInit { @ViewChild(ZluxFileExplorerComponent) private fileExplorer: ZluxFileExplorerComponent; - private showDatasets: Boolean; - nodes: ProjectStructure[]; options = { animateExpand: false, @@ -104,7 +112,6 @@ export class ProjectTreeComponent implements OnInit { this.nodes = nodes; }); - this.showDatasets = false; this.editorControl.openProject.subscribe(projectName => { if (projectName != null) { @@ -128,34 +135,43 @@ export class ProjectTreeComponent implements OnInit { }); this.editorControl.openDirectory.subscribe(dirName => { - //Note: This temporary hack is used to hide datasets using the original slower Editor structure. - // Will be removed when Dataset functionality for Explorer gets better. - this.onUssSelect(); + if (dirName.startsWith('/')) { this.fileExplorer.updateDirectory(dirName); + } else { + let dsName = getDatasetName(dirName); + this.fileExplorer.updateDSList(dsName); + } }); this.editorControl.openDataset.subscribe(dirName => { if (dirName != null && dirName !== '') { - if (dirName[0] == '/') { - //Note: This temporary hack is used to hide datasets using the original slower Editor structure. - // Will be removed when Dataset functionality for Explorer gets better. - this.onUssSelect(); - this.fileExplorer.updateDirectory(dirName); - } else { //Datasets - //Note: This temporary hack is used to show datasets using the original slower Editor structure. - // Will be removed when Dataset functionality for Explorer gets better. - + if (dirName[0] != '/') { + dirName = dirName.toUpperCase(); + let isMember = false; + let dsName = getDatasetName(dirName); + if (dirName == dsName) { + let periodPos = dirName.lastIndexOf('.'); + if (periodPos) { + this.fileExplorer.updateDSList(dirName.substring(0,periodPos+1)+'**'); + } else { + this.fileExplorer.updateDSList(dirName); + } + } else { + isMember = true; + this.fileExplorer.updateDSList(dsName); + } let requestUrl = ZoweZLUX.uriBroker.datasetMetadataUri(dirName.toUpperCase(), 'true'); this.httpService.get(requestUrl) .subscribe((response: any) => { - this.fileExplorer.showDatasets(); - this.onDatasetSelect(); - this.nodes = this.dataAdapter.convertDatasetList(response); + this.nodes = isMember ? this.dataAdapter.convertDatasetMemberList(response) : this.dataAdapter.convertDatasetList(response); this.editorControl.setProjectNode(this.nodes); - this.editorControl.initProjectContext(dirName, this.nodes); + this.editorControl.openFile('',this.nodes[0]).subscribe(x=> {this.log.debug('Dataset opened')}); }, e => { // TODO }); + + } else { + this.fileExplorer.updateDirectory(dirName); } } }); @@ -165,27 +181,11 @@ export class ProjectTreeComponent implements OnInit { }); } - ngOnInit() { - } onCopyClick($event: any){ // Todo: Create right click menu functionality. } - onDatasetSelect() { - this.fileExplorer.hideExplorers(); - this.showDatasets = true; - // This is a pseudo-hacky way of styling the explorer that hides the unfinished dataset - // browser to use the original Editor one. This can be removed once Explorer datasets are used. - let myElement = document.getElementsByClassName("file-explorer-container")[0]; - myElement.setAttribute("style", "height: 75px;"); - // Uncomment the following code to test Dataset viewer of FE (Disables default Dataset viewer of Editor) - // this.fileExplorer.showDatasets(); - // this.showDatasets = false; - // let myElement = document.getElementsByClassName("file-explorer-container")[0]; - // myElement.setAttribute("style", "height: 100%;"); - } - onDeleteClick($event: any){ // Todo: Create right click menu functionality. } @@ -214,7 +214,14 @@ export class ProjectTreeComponent implements OnInit { this.editorControl.openFile('', nodeData).subscribe(x => { this.log.debug(`File loaded through File Explorer.`); }); - } else { } + } else if($event.data.isDataset){ + let data: ProjectStructure = ($event.data as ProjectStructure); + if($event.type == 'file'){ + this.editorControl.openFile('', (data)).subscribe(x => { + this.log.debug(`Dataset loaded through File Explorer.`); + }); + } + } } onPathChanged($event: any) { @@ -222,7 +229,6 @@ export class ProjectTreeComponent implements OnInit { // it within a dataset context. This will probably be removed along with other hacks for temporarily // keeping the original dataset viewer. this.fileExplorer.hideExplorers(); - this.showDatasets = true; this.editorControl.projectName = $event; this.editorControl.openDataset.next($event); } @@ -231,14 +237,6 @@ export class ProjectTreeComponent implements OnInit { // Todo: Create right click menu functionality. } - onUssSelect() { - this.fileExplorer.showUss(); - this.showDatasets = false; - // This is a pseudo-hacky way of styling that pops back the Explorer. - let myElement = document.getElementsByClassName("file-explorer-container")[0]; - myElement.setAttribute("style", "height: 100%;"); - } - openProject() { let openProjectRef = this.dialog.open(OpenProjectComponent, { width: '500px' @@ -259,7 +257,6 @@ export class ProjectTreeComponent implements OnInit { openDirectoryRef.afterClosed().subscribe(result => { if (result) { - this.showDatasets = false; this.fileExplorer.showUss(); this.editorControl.projectName = result; this.editorControl.openDirectory.next(result); @@ -278,16 +275,6 @@ export class ProjectTreeComponent implements OnInit { } } - nodeClickHandler(node: TreeNode, $event: any) { - node.mouseAction('click', $event); - if (node.hasChildren) { - TREE_ACTIONS.TOGGLE_EXPANDED(node.treeModel, node, $event); - // TREE_ACTIONS.TOGGLE_ACTIVE(tree, node, $event); - // TREE_ACTIONS.TOGGLE_SELECTED(tree, node, $event); - // TREE_ACTIONS.FOCUS(tree, node, $event); - } - } - treeUpdate($event: any) { this.editorControl.setProjectNode($event.treeModel.nodes); this.editorControl.initProjectContext('', $event.treeModel.nodes); diff --git a/webClient/src/app/shared/editor-control/editor-control.service.ts b/webClient/src/app/shared/editor-control/editor-control.service.ts index 2e508d98..fe7c00cf 100644 --- a/webClient/src/app/shared/editor-control/editor-control.service.ts +++ b/webClient/src/app/shared/editor-control/editor-control.service.ts @@ -143,9 +143,17 @@ export class EditorControlService implements ZLUX.IEditor, ZLUX.IEditorMultiBuff public initProjectContext(name: string, project: ProjectStructure[]): ProjectContext { // const mockProject = JSON.parse(JSON.stringify(project)); const mockProject = project; - let projectName = name ? - name : - (this.rootContext.getValue() && this.rootContext.getValue().name) ? this.rootContext.getValue().name : ''; + let projectName; + let isDataset = !name.startsWith('/'); + let lParen = name.indexOf('('); + + if (isDataset) { + projectName = lParen ? name.substring(lParen+1, name.length-1) : name; + } else { + projectName = name ? + name : + (this.rootContext.getValue() && this.rootContext.getValue().name) ? this.rootContext.getValue().name : ''; + } let root: ProjectContext = { id: '-1', name: projectName, @@ -153,7 +161,8 @@ export class EditorControlService implements ZLUX.IEditor, ZLUX.IEditorMultiBuff id: '-1', name: projectName, hasChildren: true, - isDataset: false + isDataset: isDataset, + path: name }, opened: false, active: false, @@ -269,6 +278,12 @@ export class EditorControlService implements ZLUX.IEditor, ZLUX.IEditorMultiBuff return activeFile; } + public fetchAdjToActiveFile(): ProjectContext { + let openFileListVal = this._openFileList.getValue(); + let adjIdx = (openFileListVal.indexOf(this.fetchActiveFile())+1)%openFileListVal.length; + return openFileListVal[adjIdx]; + } + public generateProjectContext( project: ProjectStructure | ProjectStructure[], parent?: ProjectContext @@ -608,7 +623,17 @@ export class EditorControlService implements ZLUX.IEditor, ZLUX.IEditorMultiBuff } } - createFile(name: string): ProjectContext { + getFocus(): void { + // get focus of editor + this.editor.getValue().focus(); + } + + createFile(name?: string): ProjectContext { + + if(name===undefined) { + name = this.getNewFileName(); + } + let rootContext = this.rootContext.getValue(); let fileStructure: ProjectStructure = { id: _.uniqueId(), @@ -631,13 +656,32 @@ export class EditorControlService implements ZLUX.IEditor, ZLUX.IEditorMultiBuff this.createFileEmitter.next(name); // let new file open in editor this.openFile(null, fileStructure); + // get focus of editor + setTimeout(()=> { + this.editor.getValue().focus(); + }); + //trigger initializedFile + this.initializedFile.next(fileContext); // return file context return fileContext; // return new Observable((observer) => { // observer.next(fileContext); // }); } - + + getNewFileName() { + let name:string='new'; + let num:number= 1; + let fileName = `${name}${num}`; + let openFiles = this._openFileList.getValue().map((file)=>file.model.name); + + while(openFiles.indexOf(fileName)>=0) { + fileName = `${name}${++num}`; + } + + return fileName; + } + /* ============= ZLUX code editor implement ============= */ /* ============= Class IEditor ============= */ /** @@ -697,6 +741,7 @@ export class EditorControlService implements ZLUX.IEditor, ZLUX.IEditorMultiBuff resultObserver.next(null); } } + fileOpenSub.unsubscribe(); }); diff --git a/webClient/src/app/shared/editor-keybinding.service.ts b/webClient/src/app/shared/editor-keybinding.service.ts new file mode 100644 index 00000000..12fa0f09 --- /dev/null +++ b/webClient/src/app/shared/editor-keybinding.service.ts @@ -0,0 +1,44 @@ + + +/* + This program and the accompanying materials are + made available under the terms of the Eclipse Public License v2.0 which accompanies + this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html + + SPDX-License-Identifier: EPL-2.0 + + Copyright Contributors to the Zowe Project. +*/ + +import { Injectable } from '@angular/core'; + +import { Subject, Observable } from 'rxjs/Rx'; + +@Injectable() +export class EditorKeybindingService { + public keyupEvent: Subject; + + constructor() { + this.keyupEvent = new Subject(); + } + + registerKeyUpEvent(appChild:Element) { + let elm = appChild.closest('app-root'); + const observable = Observable.fromEvent(elm, 'keyup' ) as Observable; + observable + .filter(value => value.altKey) + .subscribe(this.keyupEvent); + } +} + + +/* + This program and the accompanying materials are + made available under the terms of the Eclipse Public License v2.0 which accompanies + this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html + + SPDX-License-Identifier: EPL-2.0 + + Copyright Contributors to the Zowe Project. +*/ + diff --git a/webClient/src/app/shared/http/http.data.adapter.service.ts b/webClient/src/app/shared/http/http.data.adapter.service.ts index 7f6fdd28..23fb623a 100644 --- a/webClient/src/app/shared/http/http.data.adapter.service.ts +++ b/webClient/src/app/shared/http/http.data.adapter.service.ts @@ -58,7 +58,13 @@ export class DataAdapterService { hasChildren: pds, path: entry.name.trim(), fileName: entry.name.trim(), - isDataset: true + isDataset: true, + datasetAttrs: { + csiEntryType: entry.csiEntryType, + dsorg: entry.dsorg, + recfm: entry.recfm, + volser: entry.volser + } }; }); } @@ -66,6 +72,7 @@ export class DataAdapterService { convertDatasetMemberList(responseData: any): ProjectStructure[] { let entries = responseData.datasets; let path = entries[0].name; + let parent = entries[0]; return entries[0].members.map((entry: any) => { return { id: _.uniqueId(), @@ -73,7 +80,13 @@ export class DataAdapterService { hasChildren: false, path: path.trim() + "(" + entry.name.trim() + ")", fileName: path.trim() + "(" + entry.name.trim() + ")", - isDataset: true + isDataset: true, + datasetAttrs: { + csiEntryType: parent.csiEntryType, + dsorg: parent.dsorg, + recfm: parent.recfm, + volser: parent.volser + } }; }); } diff --git a/webClient/src/app/shared/keycode-enum.ts b/webClient/src/app/shared/keycode-enum.ts new file mode 100644 index 00000000..bcade0b9 --- /dev/null +++ b/webClient/src/app/shared/keycode-enum.ts @@ -0,0 +1,111 @@ +/* + This program and the accompanying materials are + made available under the terms of the Eclipse Public License v2.0 which accompanies + this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html + + SPDX-License-Identifier: EPL-2.0 + + Copyright Contributors to the Zowe Project. +*/ + +export enum KeyCode { + BACKSPACE= 8, + TAB= 9, + ENTER= 13, + SHIFT= 16, + CTRL= 17, + ALT= 18, + PAUSE= 19, + CAPS_LOCK= 20, + ESCAPE= 27, + SPACE= 32, + PAGE_UP= 33, + PAGE_DOWN= 34, + END= 35, + HOME= 36, + LEFT_ARROW= 37, + UP_ARROW= 38, + RIGHT_ARROW= 39, + DOWN_ARROW= 40, + INSERT= 45, + DELETE= 46, + KEY_0= 48, + KEY_1= 49, + KEY_2= 50, + KEY_3= 51, + KEY_4= 52, + KEY_5= 53, + KEY_6= 54, + KEY_7= 55, + KEY_8= 56, + KEY_9= 57, + KEY_A= 65, + KEY_B= 66, + KEY_C= 67, + KEY_D= 68, + KEY_E= 69, + KEY_F= 70, + KEY_G= 71, + KEY_H= 72, + KEY_I= 73, + KEY_J= 74, + KEY_K= 75, + KEY_L= 76, + KEY_M= 77, + KEY_N= 78, + KEY_O= 79, + KEY_P= 80, + KEY_Q= 81, + KEY_R= 82, + KEY_S= 83, + KEY_T= 84, + KEY_U= 85, + KEY_V= 86, + KEY_W= 87, + KEY_X= 88, + KEY_Y= 89, + KEY_Z= 90, + LEFT_META= 91, + RIGHT_META= 92, + SELECT= 93, + NUMPAD_0= 96, + NUMPAD_1= 97, + NUMPAD_2= 98, + NUMPAD_3= 99, + NUMPAD_4= 100, + NUMPAD_5= 101, + NUMPAD_6= 102, + NUMPAD_7= 103, + NUMPAD_8= 104, + NUMPAD_9= 105, + MULTIPLY= 106, + ADD= 107, + SUBTRACT= 109, + DECIMAL= 110, + DIVIDE= 111, + F1= 112, + F2= 113, + F3= 114, + F4= 115, + F5= 116, + F6= 117, + F7= 118, + F8= 119, + F9= 120, + F10= 121, + F11= 122, + F12= 123, + NUM_LOCK= 144, + SCROLL_LOCK= 145, + SEMICOLON= 186, + EQUALS= 187, + COMMA= 188, + DASH= 189, + PERIOD= 190, + FORWARD_SLASH= 191, + GRAVE_ACCENT= 192, + OPEN_BRACKET= 219, + BACK_SLASH= 220, + CLOSE_BRACKET= 221, + SINGLE_QUOTE= 222 + } \ No newline at end of file diff --git a/webClient/src/app/shared/model/editor-project.ts b/webClient/src/app/shared/model/editor-project.ts index 6919d953..2c7e142d 100644 --- a/webClient/src/app/shared/model/editor-project.ts +++ b/webClient/src/app/shared/model/editor-project.ts @@ -22,6 +22,28 @@ export interface ProjectStructure { fileName?: string; isDataset: boolean; encoding?: number; + datasetAttrs?: DatasetAttributes; +} + +export interface DatasetAttributes { + csiEntryType: string, + name: string, + dsorg?: DatasetOrganization, + members?: Array, + recfm?: RecordFormat, + volser?: string +} + +export interface RecordFormat { + carriageControl: string; + isBlocked: boolean; + recordLength: string; +} + +export interface DatasetOrganization { + maxRecordLen: number; + organization: string; + totalBlockSize: number; } /* diff --git a/webClient/src/app/shared/shared.module.ts b/webClient/src/app/shared/shared.module.ts index 2f13dcb5..d4590ced 100644 --- a/webClient/src/app/shared/shared.module.ts +++ b/webClient/src/app/shared/shared.module.ts @@ -19,6 +19,7 @@ import { ConfigService } from './config.service'; import { EditorControlService } from './editor-control/editor-control.service'; import { SnackBarService } from './snack-bar.service'; import { LanguageServerService } from './language-server/language-server.service'; +import { EditorKeybindingService } from './editor-keybinding.service'; @NgModule({ imports: [ @@ -27,7 +28,7 @@ import { LanguageServerService } from './language-server/language-server.service MatSnackBarModule, ], declarations: [], - providers: [HttpService, DataAdapterService, UtilsService, ConfigService, EditorControlService, SnackBarService, LanguageServerService], + providers: [HttpService, DataAdapterService, UtilsService, ConfigService, EditorControlService, SnackBarService, LanguageServerService, EditorKeybindingService], }) export class SharedModule { } diff --git a/webClient/src/styles/global.css b/webClient/src/styles/global.css index 2185c73c..0b1c735d 100644 --- a/webClient/src/styles/global.css +++ b/webClient/src/styles/global.css @@ -687,7 +687,7 @@ input.mat-input-element { } .cdk-global-overlay-wrapper { - display: flex; + /* display: flex; removed since this was messing up the snackbar from the notification manager */ position: absolute; z-index: 1000 } @@ -2127,18 +2127,19 @@ input.mat-input-element { } .mat-snack-bar-container { - background: #323232; - color: #fff + background: #323232; + color: #fff } .mat-simple-snackbar-action { color: #ff4081 } + /* over write mat style */ .mat-simple-snackbar-action button { - color: #3f51b5; + color: #3f51b5; } /*