diff --git a/Dockerfile b/Dockerfile index 3ce9f8c7b..e208aff42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,5 +5,5 @@ LABEL maintainer="Denys Vuika " COPY nginx.conf /etc/nginx/nginx.conf WORKDIR /usr/share/nginx/html -COPY dist/ . +COPY dist/app/ . diff --git a/angular.json b/angular.json index da8a80c16..3db4488a1 100644 --- a/angular.json +++ b/angular.json @@ -11,7 +11,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "outputPath": "dist", + "outputPath": "dist/app", "index": "src/index.html", "main": "src/main.ts", "tsConfig": "src/tsconfig.app.json", @@ -45,6 +45,16 @@ "glob": "pdf.worker.js", "input": "node_modules/pdfjs-dist/build", "output": "/" + }, + { + "glob": "**/*", + "input": "node_modules/monaco-editor/min", + "output": "./assets/monaco" + }, + { + "glob": "**/*.js", + "input": "node_modules/@ngstack/code-editor/workers", + "output": "./assets/workers" } ], "styles": [ @@ -106,9 +116,9 @@ "karmaConfig": "./karma.conf.js", "polyfills": "src/polyfills.ts", "stylePreprocessorOptions": { - "includePaths": [ - "src/app/ui" - ] + "includePaths": [ + "src/app/ui" + ] }, "tsConfig": "src/tsconfig.spec.json", "scripts": [ @@ -188,6 +198,46 @@ } } } + }, + "aca-dev-tools": { + "root": "projects/aca-dev-tools", + "sourceRoot": "projects/aca-dev-tools/src", + "projectType": "library", + "prefix": "lib", + "architect": { + "build": { + "builder": "@angular-devkit/build-ng-packagr:build", + "options": { + "tsConfig": "projects/aca-dev-tools/tsconfig.lib.json", + "project": "projects/aca-dev-tools/ng-package.json" + }, + "configurations": { + "production": { + "project": "projects/aca-dev-tools/ng-package.prod.json" + } + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "projects/aca-dev-tools/src/test.ts", + "tsConfig": "projects/aca-dev-tools/tsconfig.spec.json", + "karmaConfig": "projects/aca-dev-tools/karma.conf.js" + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "projects/aca-dev-tools/tsconfig.lib.json", + "projects/aca-dev-tools/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + } + } } }, "defaultProject": "alfresco-content-app", diff --git a/extension.schema.json b/extension.schema.json index d536a3ee1..7c19fd391 100644 --- a/extension.schema.json +++ b/extension.schema.json @@ -228,6 +228,46 @@ "type": "boolean" } } + }, + "sidebarTabRef": { + "type": "object", + "required": ["id", "component"], + "properties": { + "id": { + "description": "Unique identifier for the navigation group", + "type": "string" + }, + "title": { + "description": "Element title", + "type": "string" + }, + "component": { + "description": "Component id", + "type": "string" + }, + "icon": { + "description": "Material icon name", + "type": "string" + }, + "disabled": { + "description": "Toggles disabled state", + "type": "boolean" + }, + "order": { + "description": "Element order", + "type": "number" + }, + "rules": { + "description": "Element rules", + "type": "object", + "properties": { + "visible": { + "description": "Rule to evaluate the visibility state", + "type": "string" + } + } + } + } } }, @@ -306,6 +346,12 @@ "items": { "$ref": "#/definitions/navBarGroupRef" }, "minItems": 1 }, + "sidebar": { + "description": "Sidebar extensions", + "type": "array", + "items": { "$ref": "#/definitions/sidebarTabRef" }, + "minItems": 1 + }, "content": { "description": "Main application content extensions", "type": "object", diff --git a/package-lock.json b/package-lock.json index 35b9beec3..b4b32ea55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -156,6 +156,424 @@ } } }, + "@angular-devkit/build-ng-packagr": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-ng-packagr/-/build-ng-packagr-0.7.3.tgz", + "integrity": "sha512-H8AM1MTc3Vu5Kor7ubqi+taIskjyhydaQp9NsplI6OOuiEoh+Dt1K+Q+UxrLUal1h9/0941S/msi/4fjRFGkGw==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.7.3", + "@angular-devkit/core": "0.7.3", + "rxjs": "^6.0.0" + }, + "dependencies": { + "@angular-devkit/architect": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.7.3.tgz", + "integrity": "sha512-PaHGTohIeXzabpTEbXqjthwJ+PPMHqCi4OyqovHHsDgF82thkS4cYXXmW1zvcgC6yfJVpoo3vGZ3R7HcZ/+/Yw==", + "dev": true, + "requires": { + "@angular-devkit/core": "0.7.3", + "rxjs": "^6.0.0" + } + }, + "@angular-devkit/core": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.7.3.tgz", + "integrity": "sha512-2fKNmv4sJ6EEONp6QJ2VcHlR0O2TAXWm6jQsWxJjfVvROhAY7eJkzhqi0pUoWhUiamxCk5ssl8p9KkhtOiTa4Q==", + "dev": true, + "requires": { + "ajv": "~6.4.0", + "chokidar": "^2.0.3", + "rxjs": "^6.0.0", + "source-map": "^0.5.6" + } + }, + "ajv": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", + "dev": true, + "requires": { + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^3.0.2" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + } + } + }, "@angular-devkit/build-optimizer": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.7.2.tgz", @@ -1603,6 +2021,20 @@ "resolved": "https://registry.npmjs.org/@ngrx/store-devtools/-/store-devtools-6.1.0.tgz", "integrity": "sha512-Uc0g/NCbJIbzvIMuCy3skiZVD5hoIrOAAvaninXkVHt7bXpbsSAdvJlmnozuGQqTbC0UQhYRwAR7InRSrzIbMQ==" }, + "@ngstack/code-editor": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@ngstack/code-editor/-/code-editor-0.4.3.tgz", + "integrity": "sha512-uH1f/GUKi6r2f2WTQ2dEAgPbkMEkMbzn9hqHHetrNTssP0i4Vosob8Y0Ff21J7xU6a5xq2vp+XqZzVOEsb3hlA==", + "requires": { + "tslib": "^1.9.0" + } + }, + "@ngtools/json-schema": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", + "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=", + "dev": true + }, "@ngtools/webpack": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-6.1.2.tgz", @@ -2453,6 +2885,12 @@ } } }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, "@types/jasmine": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.8.tgz", @@ -2841,6 +3279,48 @@ } } }, + "ansi-align": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", + "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "dev": true, + "requires": { + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", @@ -3102,8 +3582,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz", "integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=", - "dev": true, - "optional": true + "dev": true }, "async-limiter": { "version": "1.0.0", @@ -3506,7 +3985,6 @@ "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, - "optional": true, "requires": { "inherits": "~2.0.0" } @@ -3610,6 +4088,54 @@ "hoek": "2.x.x" } }, + "boxen": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "dev": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -3915,6 +4441,12 @@ "integrity": "sha512-29nr1EPiHwrJTAHHsEmTt2h+55L8j2GNFdAcYPlRy2NX6iFz7ZZiepVI7kP/QqlnHLq3KvfWpbmGa0d063U09w==", "dev": true }, + "capture-stack-trace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -3972,6 +4504,12 @@ "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", "dev": true }, + "ci-info": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.2.0.tgz", + "integrity": "sha512-U4aoLsSz44FhOyZ2E7bCufaBr2IUzNYujBd+b9vHiFH7SUzIhKcD94PQP5QSFn7ngPof6OF2yPk4/hygqwMJhA==", + "dev": true + }, "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", @@ -4040,12 +4578,17 @@ } } }, + "cli-boxes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", + "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", + "dev": true + }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, - "optional": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1", @@ -4596,6 +5139,15 @@ "elliptic": "^6.0.0" } }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, "create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", @@ -4628,7 +5180,6 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", "dev": true, - "optional": true, "requires": { "lru-cache": "^4.0.1", "which": "^1.2.9" @@ -4991,6 +5542,12 @@ "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", "dev": true }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -5335,6 +5892,12 @@ "dev": true, "optional": true }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, "duplexify": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", @@ -5660,6 +6223,12 @@ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", "dev": true }, + "estree-walker": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz", + "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -6030,6 +6599,12 @@ "pkg-dir": "^2.0.0" } }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "dev": true + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -6784,7 +7359,6 @@ "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", "dev": true, - "optional": true, "requires": { "globule": "^1.0.0" } @@ -6913,6 +7487,15 @@ "is-glob": "^2.0.0" } }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "dev": true, + "requires": { + "ini": "^1.3.4" + } + }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", @@ -6938,13 +7521,31 @@ "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", "dev": true, - "optional": true, "requires": { "glob": "~7.1.1", "lodash": "~4.17.10", "minimatch": "~3.0.2" } }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", @@ -7864,6 +8465,12 @@ "resolve-from": "^3.0.0" } }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "import-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", @@ -7884,8 +8491,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", - "dev": true, - "optional": true + "dev": true }, "indent-string": { "version": "2.1.0", @@ -7930,6 +8536,12 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, + "injection-js": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/injection-js/-/injection-js-2.2.1.tgz", + "integrity": "sha512-zHI+E+dM0PXix5FFTO1Y4/UOyAzE7zG1l/QwAn4jchTThOoBq+UYRFK4AVG7lQgFL+go62SbrzSsjXy9DFEZUg==", + "dev": true + }, "internal-ip": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", @@ -8011,6 +8623,15 @@ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, + "is-ci": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", + "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", + "dev": true, + "requires": { + "ci-info": "^1.0.0" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -8105,6 +8726,22 @@ "is-extglob": "^1.0.0" } }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "dev": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, "is-my-ip-valid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", @@ -8126,6 +8763,12 @@ "xtend": "^4.0.0" } }, + "is-npm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", + "dev": true + }, "is-number": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", @@ -8201,6 +8844,12 @@ "dev": true, "optional": true }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -8210,6 +8859,12 @@ "has": "^1.0.1" } }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -8661,8 +9316,7 @@ "version": "2.4.8", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.8.tgz", "integrity": "sha512-hm2nYpDrwoO/OzBhdcqs/XGT6XjSuSSCVEpia+Kl2J6x4CYt5hISlVL/AYU1khoDXv0AQVgxtdJySb9gjAn56Q==", - "dev": true, - "optional": true + "dev": true }, "js-tokens": { "version": "3.0.2", @@ -9336,6 +9990,15 @@ "graceful-fs": "^4.1.9" } }, + "latest-version": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", + "dev": true, + "requires": { + "package-json": "^4.0.0" + } + }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", @@ -9623,8 +10286,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true, - "optional": true + "dev": true }, "lodash.clonedeep": { "version": "4.5.0", @@ -9642,8 +10304,7 @@ "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", - "dev": true, - "optional": true + "dev": true }, "lodash.tail": { "version": "4.1.1", @@ -9865,6 +10526,12 @@ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", "dev": true }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", @@ -9875,6 +10542,15 @@ "yallist": "^2.1.2" } }, + "magic-string": { + "version": "0.22.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", + "dev": true, + "requires": { + "vlq": "^0.2.2" + } + }, "mailcomposer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", @@ -10198,6 +10874,11 @@ "moment": "*" } }, + "monaco-editor": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.14.2.tgz", + "integrity": "sha512-SgWGZtoUcb+34gK/aEoqRpJ8/zKp19j1zqP2rZlT75pGHQoM3EIGZH7Qrlp6n5RWDySGVNdxlvsoecs5SghJ3A==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -10237,8 +10918,7 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", - "dev": true, - "optional": true + "dev": true }, "nanomatch": { "version": "1.2.13", @@ -10303,6 +10983,101 @@ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, + "ng-packagr": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-3.0.6.tgz", + "integrity": "sha512-gVhJdrf0RNygxBLk6Qfby7l+y6pIjpVikyS95wuKPwzihvW14cz/KNKQOwNPbKCeVwPhVxflpH2atW5vxsq9cQ==", + "dev": true, + "requires": { + "@ngtools/json-schema": "^1.1.0", + "autoprefixer": "^8.0.0", + "browserslist": "^3.0.0", + "chalk": "^2.3.1", + "commander": "^2.12.0", + "fs-extra": "^6.0.0", + "glob": "^7.1.2", + "injection-js": "^2.2.1", + "less": "^3.0.0", + "node-sass": "^4.5.3", + "node-sass-tilde-importer": "^1.0.0", + "postcss": "^6.0.2", + "postcss-clean": "^1.1.0", + "postcss-url": "^7.3.0", + "read-pkg-up": "^3.0.0", + "rimraf": "^2.6.1", + "rollup": "^0.59.0", + "rollup-plugin-commonjs": "^9.1.3", + "rollup-plugin-node-resolve": "^3.0.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rxjs": "^6.0.0", + "strip-bom": "^3.0.0", + "stylus": "^0.54.5", + "uglify-js": "^3.0.7", + "update-notifier": "^2.3.0" + }, + "dependencies": { + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, "no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", @@ -10328,7 +11103,6 @@ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz", "integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==", "dev": true, - "optional": true, "requires": { "fstream": "^1.0.0", "glob": "^7.0.3", @@ -10348,8 +11122,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true, - "optional": true + "dev": true } } }, @@ -10397,7 +11170,6 @@ "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.2.tgz", "integrity": "sha512-LdxoJLZutx0aQXHtWIYwJKMj+9pTjneTcLWJgzf2XbGu0q5pRNqW5QvFCEdm3mc5rJOdru/mzln5d0EZLacf6g==", "dev": true, - "optional": true, "requires": { "async-foreach": "^0.1.3", "chalk": "^1.1.1", @@ -10425,7 +11197,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, - "optional": true, "requires": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", @@ -10437,29 +11208,25 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true, - "optional": true + "dev": true }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true, - "optional": true + "dev": true }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true, - "optional": true + "dev": true }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, - "optional": true, "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", @@ -10472,22 +11239,19 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true, - "optional": true + "dev": true }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true, - "optional": true + "dev": true }, "har-validator": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "dev": true, - "optional": true, "requires": { "ajv": "^5.1.0", "har-schema": "^2.0.0" @@ -10498,7 +11262,6 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, - "optional": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -10509,22 +11272,19 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true, - "optional": true + "dev": true }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true, - "optional": true + "dev": true }, "request": { "version": "2.87.0", "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "dev": true, - "optional": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.6.0", @@ -10552,11 +11312,19 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true, - "optional": true + "dev": true } } }, + "node-sass-tilde-importer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", + "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", + "dev": true, + "requires": { + "find-parent-dir": "^0.3.0" + } + }, "nodemailer": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", @@ -10973,7 +11741,6 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, - "optional": true, "requires": { "lcid": "^1.0.0" } @@ -11074,6 +11841,18 @@ "thunkify": "^2.1.2" } }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + } + }, "pako": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", @@ -11363,6 +12142,16 @@ } } }, + "postcss-clean": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-clean/-/postcss-clean-1.1.0.tgz", + "integrity": "sha512-83g3GqMbCM5NL6MlbbPLJ/m2NrUepBF44MoDk4Gt04QGXeXKh9+ilQa0DzLnYnvqYHQCw83nckuEzBFr2muwbg==", + "dev": true, + "requires": { + "clean-css": "^4.x", + "postcss": "^6.x" + } + }, "postcss-import": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz", @@ -11422,6 +12211,12 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -11947,6 +12742,26 @@ "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", "dev": true }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -12135,6 +12950,25 @@ "regjsparser": "^0.1.4" } }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, "regjsgen": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", @@ -12390,6 +13224,67 @@ "inherits": "^2.0.1" } }, + "rollup": { + "version": "0.59.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.59.4.tgz", + "integrity": "sha512-ISiMqq/aJa+57QxX2MRcvLESHdJ7wSavmr6U1euMr+6UgFe6KM+3QANrYy8LQofwhTC1I7BcAdlLnDiaODs1BA==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "@types/node": "*" + } + }, + "rollup-plugin-commonjs": { + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.5.tgz", + "integrity": "sha512-Hy7KbvsSMNu6aCO2xabp8gBcWrTiS+EzfHkzWwZwMjrcAYuYfCLU7fP1nM4xM0FMye/13r8mzTkfb9AmDaZ1hQ==", + "dev": true, + "requires": { + "estree-walker": "^0.5.1", + "magic-string": "^0.22.4", + "resolve": "^1.5.0", + "rollup-pluginutils": "^2.0.1" + } + }, + "rollup-plugin-node-resolve": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", + "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", + "dev": true, + "requires": { + "builtin-modules": "^2.0.0", + "is-module": "^1.0.0", + "resolve": "^1.1.6" + }, + "dependencies": { + "builtin-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", + "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", + "dev": true + } + } + }, + "rollup-plugin-sourcemaps": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz", + "integrity": "sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.0.1", + "source-map-resolve": "^0.5.0" + } + }, + "rollup-pluginutils": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz", + "integrity": "sha512-JZS8aJMHEHhqmY2QVPMXwKP6lsD1ShkrcGYjhAIvqKKdXQyPHw/9NF0tl3On/xOJ4ACkxfeG7AF+chfCN1NpBg==", + "dev": true, + "requires": { + "estree-walker": "^0.5.2", + "micromatch": "^2.3.11" + } + }, "run-queue": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", @@ -12444,7 +13339,6 @@ "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", "dev": true, - "optional": true, "requires": { "glob": "^7.0.0", "lodash": "^4.0.0", @@ -12494,7 +13388,6 @@ "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", "integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=", "dev": true, - "optional": true, "requires": { "js-base64": "^2.1.8", "source-map": "^0.4.2" @@ -12505,7 +13398,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, - "optional": true, "requires": { "amdefine": ">=0.0.4" } @@ -12556,6 +13448,15 @@ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, + "semver-diff": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", + "dev": true, + "requires": { + "semver": "^5.0.3" + } + }, "semver-dsl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", @@ -13330,7 +14231,6 @@ "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", "dev": true, - "optional": true, "requires": { "readable-stream": "^2.0.1" } @@ -13567,13 +14467,21 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, - "optional": true, "requires": { "block-stream": "*", "fstream": "^1.0.2", "inherits": "2" } }, + "term-size": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", + "dev": true, + "requires": { + "execa": "^0.7.0" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -13609,6 +14517,12 @@ "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=", "dev": true }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", @@ -13757,7 +14671,6 @@ "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", "dev": true, - "optional": true, "requires": { "glob": "^6.0.4" }, @@ -13767,7 +14680,6 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "dev": true, - "optional": true, "requires": { "inflight": "^1.0.4", "inherits": "2", @@ -14168,12 +15080,36 @@ } } }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", "dev": true }, + "update-notifier": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "dev": true, + "requires": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + } + }, "upper-case": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", @@ -14247,6 +15183,15 @@ "requires-port": "^1.0.0" } }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -14373,6 +15318,12 @@ } } }, + "vlq": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", + "dev": true + }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", @@ -15844,8 +16795,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true, - "optional": true + "dev": true }, "wide-align": { "version": "1.1.3", @@ -15856,6 +16806,48 @@ "string-width": "^1.0.2 || 2" } }, + "widest-line": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", + "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", + "dev": true, + "requires": { + "string-width": "^2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", @@ -16012,7 +17004,6 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "dev": true, - "optional": true, "requires": { "camelcase": "^3.0.0", "cliui": "^3.2.0", @@ -16039,15 +17030,13 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true, - "optional": true + "dev": true }, "yargs-parser": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", "dev": true, - "optional": true, "requires": { "camelcase": "^3.0.0" } diff --git a/package.json b/package.json index 764eff7ae..06dbebe95 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,12 @@ "license": "LGPL-3.0", "scripts": { "ng": "ng", - "start": "npm run server-versions && ng serve --open", + "start": "npm run server-versions && ng build aca-dev-tools && ng serve --open", "start:prod": "npm run server-versions && ng serve --prod --open", - "build": "npm run server-versions && ng build --prod", - "build:prod": "npm run server-versions && ng build --prod", - "build:dev": "npm run server-versions && ng build", - "build:tomcat": "npm run server-versions && ng build --base-href ./", - "build:electron": "npm run server-versions && ng build --output-path www --base-href ./", - "test": "ng test --code-coverage", - "test:ci": "ng test --code-coverage --watch=false && cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage && rm -rf ./coverage", + "build": "npm run server-versions && ng build aca-dev-tools --prod && ng build --prod", + "build:dev": "npm run server-versions && ng build aca-dev-tools && ng build", + "test": "ng test alfresco-content-app --code-coverage", + "test:ci": "ng test alfresco-content-app --code-coverage --watch=false && cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage && rm -rf ./coverage", "lint": "ng lint", "server-versions": "rimraf ./src/versions.json && npm list --depth=0 --json=true --prod=true > ./src/versions.json || exit 0", "_e2e": "ng e2e", @@ -21,7 +18,7 @@ "start:docker": "docker-compose up -d --build && wait-on http://localhost:8080 && wait-on http://localhost:4000", "stop:docker": "docker-compose stop", "e2e:docker": "npm run start:docker && npm run e2e && npm run stop:docker", - "spellcheck": "cspell 'src/**/*.ts' 'e2e/**/*.ts'" + "spellcheck": "cspell 'src/**/*.ts' 'e2e/**/*.ts' 'projects/**/*.ts'" }, "private": true, "dependencies": { @@ -46,6 +43,7 @@ "@ngrx/router-store": "^6.1.0", "@ngrx/store": "^6.1.0", "@ngrx/store-devtools": "^6.1.0", + "@ngstack/code-editor": "^0.4.3", "@ngx-translate/core": "^10.0.2", "alfresco-js-api": "2.5.0", "core-js": "^2.5.7", @@ -53,6 +51,7 @@ "minimatch-browser": "^1.0.0", "moment": "^2.22.2", "moment-es6": "1.0.0", + "monaco-editor": "^0.14.2", "pdfjs-dist": "2.0.303", "rxjs": "^6.2.2", "web-animations-js": "2.3.1", @@ -60,6 +59,7 @@ }, "devDependencies": { "@angular-devkit/build-angular": "~0.7.0", + "@angular-devkit/build-ng-packagr": "~0.7.0", "@angular/cli": "^6.1.3", "@angular/compiler-cli": "6.1.2", "@angular/language-service": "6.1.2", @@ -82,10 +82,13 @@ "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", + "ng-packagr": "^3.0.0", "protractor": "5.3.2", "rimraf": "2.6.2", "selenium-webdriver": "4.0.0-alpha.1", "ts-node": "~4.1.0", + "tsickle": ">=0.29.0", + "tslib": "^1.9.0", "tslint": "~5.11.0", "typescript": "^2.9.2", "wait-on": "2.1.0" diff --git a/projects/aca-dev-tools/karma.conf.js b/projects/aca-dev-tools/karma.conf.js new file mode 100644 index 000000000..4c5f8d03f --- /dev/null +++ b/projects/aca-dev-tools/karma.conf.js @@ -0,0 +1,31 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../../coverage'), + reports: ['html', 'lcovonly'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/projects/aca-dev-tools/ng-package.json b/projects/aca-dev-tools/ng-package.json new file mode 100644 index 000000000..1cfd30d9c --- /dev/null +++ b/projects/aca-dev-tools/ng-package.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/aca-dev-tools", + "deleteDestPath": false, + "lib": { + "entryFile": "src/public_api.ts" + } +} \ No newline at end of file diff --git a/projects/aca-dev-tools/ng-package.prod.json b/projects/aca-dev-tools/ng-package.prod.json new file mode 100644 index 000000000..7a9f7d515 --- /dev/null +++ b/projects/aca-dev-tools/ng-package.prod.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/aca-dev-tools", + "lib": { + "entryFile": "src/public_api.ts" + } +} \ No newline at end of file diff --git a/projects/aca-dev-tools/package.json b/projects/aca-dev-tools/package.json new file mode 100644 index 000000000..a7518fce6 --- /dev/null +++ b/projects/aca-dev-tools/package.json @@ -0,0 +1,9 @@ +{ + "name": "aca-dev-tools", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^6.0.0", + "@angular/core": "^6.0.0", + "@ngstack/code-editor": "^0.4.1" + } +} diff --git a/projects/aca-dev-tools/src/lib/aca-dev-tools.component.html b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.html new file mode 100644 index 000000000..dd95ee7dc --- /dev/null +++ b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.html @@ -0,0 +1,39 @@ +
+
+ + + + + +
+
+
+ +
+
+
+ + + + +
+
+
+ +
+
+
diff --git a/projects/aca-dev-tools/src/lib/aca-dev-tools.component.scss b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.scss new file mode 100644 index 000000000..6da4015d2 --- /dev/null +++ b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.scss @@ -0,0 +1,23 @@ +.lib-aca-dev-tools { + display: flex; + flex-direction: column; + flex: 1; + height: 100%; + overflow: hidden; + min-height: 0; +} + +.ngs-code-editor { + display: flex; + flex-direction: column; + flex: 1; + height: 100%; + max-height: 100%; + overflow: hidden; + min-height: 0; + + .editor { + // border: 1px solid grey; + // min-height: 400px; + } +} diff --git a/projects/aca-dev-tools/src/lib/aca-dev-tools.component.spec.ts b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.spec.ts new file mode 100644 index 000000000..e177ada50 --- /dev/null +++ b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AcaDevToolsComponent } from './aca-dev-tools.component'; + +describe('AcaDevToolsComponent', () => { + let component: AcaDevToolsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AcaDevToolsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AcaDevToolsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/aca-dev-tools/src/lib/aca-dev-tools.component.ts b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.ts new file mode 100644 index 000000000..30ce64255 --- /dev/null +++ b/projects/aca-dev-tools/src/lib/aca-dev-tools.component.ts @@ -0,0 +1,72 @@ +import { Component, OnInit, ViewEncapsulation } from '@angular/core'; +import { CodeModel } from '@ngstack/code-editor'; +import { ActivatedRoute } from '@angular/router'; +import { HttpClient } from '@angular/common/http'; +import { forkJoin } from 'rxjs'; + +@Component({ + selector: 'lib-aca-dev-tools', + encapsulation: ViewEncapsulation.None, + host: { class: 'lib-aca-dev-tools' }, + templateUrl: './aca-dev-tools.component.html', + styleUrls: ['./aca-dev-tools.component.scss'] +}) +export class AcaDevToolsComponent implements OnInit { + model: CodeModel = null; + + private code: string; + + constructor(private route: ActivatedRoute, private http: HttpClient) {} + + ngOnInit() { + const routeData = this.route.snapshot.data; + if (!routeData) { + return; + } + + const schemaUri = routeData.schemaUri; + const getSchema = this.http.get(routeData.schemaPath); + const getConfig = this.http.get(routeData.configPath, { responseType: 'text' }); + + forkJoin([getSchema, getConfig]).subscribe( + ([schema, config]) => { + let code = config; + + const override = sessionStorage.getItem('aca.extension.config'); + if (override) { + code = override; + } + + this.model = { + language: 'json', + uri: 'app.extensions.json', + value: code, + schemas: [ + { + uri: schemaUri, + schema + } + ] + }; + this.code = code; + }, + err => { + console.log(err); + } + ); + } + + onCodeChanged(value: string) { + this.code = value; + } + + saveChanges() { + sessionStorage.setItem('aca.extension.config', this.code); + // window.location.reload(true); + } + + revertChanges() { + sessionStorage.removeItem('aca.extension.config'); + window.location.reload(true); + } +} diff --git a/projects/aca-dev-tools/src/lib/aca-dev-tools.module.ts b/projects/aca-dev-tools/src/lib/aca-dev-tools.module.ts new file mode 100644 index 000000000..7b7fa24bd --- /dev/null +++ b/projects/aca-dev-tools/src/lib/aca-dev-tools.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from '@angular/core'; +import { CodeEditorModule } from '@ngstack/code-editor'; +import { FlexLayoutModule } from '@angular/flex-layout'; +import { AcaDevToolsComponent } from './aca-dev-tools.component'; +import { CoreModule } from '@alfresco/adf-core'; +import { ContentModule } from '@alfresco/adf-content-services'; + +@NgModule({ + imports: [ + FlexLayoutModule, + CodeEditorModule.forChild(), + CoreModule.forChild(), + ContentModule.forChild() + ], + declarations: [AcaDevToolsComponent], + exports: [AcaDevToolsComponent], + entryComponents: [AcaDevToolsComponent] +}) +export class AcaDevToolsModule {} diff --git a/projects/aca-dev-tools/src/lib/aca-dev-tools.service.spec.ts b/projects/aca-dev-tools/src/lib/aca-dev-tools.service.spec.ts new file mode 100644 index 000000000..d7d21133e --- /dev/null +++ b/projects/aca-dev-tools/src/lib/aca-dev-tools.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { AcaDevToolsService } from './aca-dev-tools.service'; + +describe('AcaDevToolsService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [AcaDevToolsService] + }); + }); + + it('should be created', inject([AcaDevToolsService], (service: AcaDevToolsService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/projects/aca-dev-tools/src/lib/aca-dev-tools.service.ts b/projects/aca-dev-tools/src/lib/aca-dev-tools.service.ts new file mode 100644 index 000000000..554cb7e42 --- /dev/null +++ b/projects/aca-dev-tools/src/lib/aca-dev-tools.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class AcaDevToolsService { + + constructor() { } +} diff --git a/projects/aca-dev-tools/src/public_api.ts b/projects/aca-dev-tools/src/public_api.ts new file mode 100644 index 000000000..c822e59db --- /dev/null +++ b/projects/aca-dev-tools/src/public_api.ts @@ -0,0 +1,7 @@ +/* + * Public API Surface of aca-dev-tools + */ + +export * from './lib/aca-dev-tools.service'; +export * from './lib/aca-dev-tools.component'; +export * from './lib/aca-dev-tools.module'; diff --git a/projects/aca-dev-tools/src/test.ts b/projects/aca-dev-tools/src/test.ts new file mode 100644 index 000000000..e11ff1c97 --- /dev/null +++ b/projects/aca-dev-tools/src/test.ts @@ -0,0 +1,22 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'core-js/es7/reflect'; +import 'zone.js/dist/zone'; +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/projects/aca-dev-tools/tsconfig.lib.json b/projects/aca-dev-tools/tsconfig.lib.json new file mode 100644 index 000000000..3a2b0b989 --- /dev/null +++ b/projects/aca-dev-tools/tsconfig.lib.json @@ -0,0 +1,33 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/lib", + "target": "es2015", + "module": "es2015", + "moduleResolution": "node", + "declaration": true, + "sourceMap": true, + "inlineSources": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "importHelpers": true, + "types": [], + "lib": [ + "dom", + "es2015" + ] + }, + "angularCompilerOptions": { + "annotateForClosureCompiler": true, + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true, + "flatModuleId": "AUTOGENERATED", + "flatModuleOutFile": "AUTOGENERATED" + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/projects/aca-dev-tools/tsconfig.spec.json b/projects/aca-dev-tools/tsconfig.spec.json new file mode 100644 index 000000000..16da33db0 --- /dev/null +++ b/projects/aca-dev-tools/tsconfig.spec.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "src/test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/projects/aca-dev-tools/tslint.json b/projects/aca-dev-tools/tslint.json new file mode 100644 index 000000000..73f120b7e --- /dev/null +++ b/projects/aca-dev-tools/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "lib", + "camelCase" + ], + "component-selector": [ + true, + "element", + "lib", + "kebab-case" + ] + } +} diff --git a/src/app.config.json b/src/app.config.json index 16e7b51ad..efcbc4a14 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -13,7 +13,8 @@ "cardview": false, "permissions": false, "share": false, - "extensions": false + "extensions": false, + "external-plugins": false }, "headerColor": "#2196F3", "languagePicker": false, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1752d2fc5..3b18c643d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -88,7 +88,7 @@ import { ContextMenuModule } from './components/context-menu/context-menu.module }), MaterialModule, CoreModule.forRoot(), - ContentModule, + ContentModule.forRoot(), AppStoreModule, CoreExtensionsModule.forRoot(), ExtensionsModule, diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 35e5be8d7..64ab1553c 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -90,7 +90,7 @@ export const APP_ROUTES: Routes = [ }, { path: 'preview/:nodeId', - loadChildren: 'app/components/preview/preview.module#PreviewModule', + loadChildren: 'src/app/components/preview/preview.module#PreviewModule', data: { title: 'APP.PREVIEW.TITLE', navigateMultiple: true, @@ -120,7 +120,7 @@ export const APP_ROUTES: Routes = [ }, { path: ':folderId/preview/:nodeId', - loadChildren: 'app/components/preview/preview.module#PreviewModule', + loadChildren: 'src/app/components/preview/preview.module#PreviewModule', data: { title: 'APP.PREVIEW.TITLE', navigateMultiple: true, @@ -152,7 +152,7 @@ export const APP_ROUTES: Routes = [ }, { path: 'preview/:nodeId', - loadChildren: 'app/components/preview/preview.module#PreviewModule', + loadChildren: 'src/app/components/preview/preview.module#PreviewModule', data: { title: 'APP.PREVIEW.TITLE', navigateMultiple: true, @@ -161,7 +161,7 @@ export const APP_ROUTES: Routes = [ }, { path: ':folderId/preview/:nodeId', - loadChildren: 'app/components/preview/preview.module#PreviewModule', + loadChildren: 'src/app/components/preview/preview.module#PreviewModule', data: { title: 'APP.PREVIEW.TITLE', navigateMultiple: true, @@ -185,7 +185,7 @@ export const APP_ROUTES: Routes = [ }, { path: 'preview/:nodeId', - loadChildren: 'app/components/preview/preview.module#PreviewModule', + loadChildren: 'src/app/components/preview/preview.module#PreviewModule', data: { title: 'APP.PREVIEW.TITLE', navigateMultiple: true, @@ -209,7 +209,7 @@ export const APP_ROUTES: Routes = [ }, { path: 'preview/:nodeId', - loadChildren: 'app/components/preview/preview.module#PreviewModule', + loadChildren: 'src/app/components/preview/preview.module#PreviewModule', data: { title: 'APP.PREVIEW.TITLE', navigateMultiple: true, @@ -228,7 +228,7 @@ export const APP_ROUTES: Routes = [ }, { path: 'about', - loadChildren: 'app/components/about/about.module#AboutModule', + loadChildren: 'src/app/components/about/about.module#AboutModule', data: { title: 'APP.BROWSE.ABOUT.TITLE' } @@ -246,7 +246,7 @@ export const APP_ROUTES: Routes = [ }, { path: 'preview/:nodeId', - loadChildren: 'app/components/preview/preview.module#PreviewModule', + loadChildren: 'src/app/components/preview/preview.module#PreviewModule', data: { title: 'APP.PREVIEW.TITLE', navigateMultiple: true, diff --git a/src/app/components/info-drawer/comments-tab/comments-tab.component.ts b/src/app/components/info-drawer/comments-tab/comments-tab.component.ts new file mode 100644 index 000000000..427730868 --- /dev/null +++ b/src/app/components/info-drawer/comments-tab/comments-tab.component.ts @@ -0,0 +1,38 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { Component, Input } from '@angular/core'; +import { MinimalNodeEntryEntity } from 'alfresco-js-api'; + +@Component({ + selector: 'app-comments-tab', + template: ` + + ` +}) +export class CommentsTabComponent { + @Input() + node: MinimalNodeEntryEntity; +} diff --git a/src/app/components/info-drawer/dynamic-tab/dynamic-tab.component.ts b/src/app/components/info-drawer/dynamic-tab/dynamic-tab.component.ts new file mode 100644 index 000000000..2f9ed52ad --- /dev/null +++ b/src/app/components/info-drawer/dynamic-tab/dynamic-tab.component.ts @@ -0,0 +1,94 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { + Component, + Input, + OnInit, + OnDestroy, + ViewChild, + ViewContainerRef, + ComponentRef, + ComponentFactoryResolver, + OnChanges, + SimpleChanges +} from '@angular/core'; +import { MinimalNodeEntryEntity } from 'alfresco-js-api'; +import { ExtensionService } from '../../../extensions/extension.service'; + +@Component({ + selector: 'app-dynamic-tab', + template: `
` +}) +export class DynamicTabComponent implements OnInit, OnChanges, OnDestroy { + @ViewChild('content', { read: ViewContainerRef }) + content: ViewContainerRef; + + @Input() + id: string; + + @Input() + node: MinimalNodeEntryEntity; + + private componentRef: ComponentRef; + + constructor( + private extensions: ExtensionService, + private componentFactoryResolver: ComponentFactoryResolver + ) {} + + ngOnInit() { + const componentType = this.extensions.getComponentById(this.id); + if (componentType) { + const factory = this.componentFactoryResolver.resolveComponentFactory( + componentType + ); + if (factory) { + this.content.clear(); + this.componentRef = this.content.createComponent(factory, 0); + this.updateInstance(); + } + } + } + + ngOnChanges(changes: SimpleChanges) { + if (changes.node) { + this.updateInstance(); + } + } + + ngOnDestroy() { + if (this.componentRef) { + this.componentRef.destroy(); + this.componentRef = null; + } + } + + private updateInstance() { + if (this.componentRef && this.componentRef.instance) { + this.componentRef.instance.node = this.node; + } + } +} diff --git a/src/app/components/info-drawer/info-drawer.component.html b/src/app/components/info-drawer/info-drawer.component.html index d420afc07..fcf4ce7af 100644 --- a/src/app/components/info-drawer/info-drawer.component.html +++ b/src/app/components/info-drawer/info-drawer.component.html @@ -3,38 +3,12 @@ - - - + + + - - - - - - - - - - - - - - - -
- face - {{ 'VERSION.SELECTION.EMPTY' | translate }} -
-
-
-
diff --git a/src/app/components/info-drawer/info-drawer.component.ts b/src/app/components/info-drawer/info-drawer.component.ts index 4f50919e7..fd4484e03 100644 --- a/src/app/components/info-drawer/info-drawer.component.ts +++ b/src/app/components/info-drawer/info-drawer.component.ts @@ -23,41 +23,34 @@ * along with Alfresco. If not, see . */ -import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; +import { Component, Input, OnChanges, OnInit } from '@angular/core'; import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api'; -import { NodePermissionService } from '../../services/node-permission.service'; import { ContentApiService } from '../../services/content-api.service'; +import { ExtensionService } from '../../extensions/extension.service'; +import { SidebarTabRef } from '../../extensions/sidebar.extensions'; @Component({ selector: 'aca-info-drawer', templateUrl: './info-drawer.component.html' }) -export class InfoDrawerComponent implements OnChanges { +export class InfoDrawerComponent implements OnChanges, OnInit { @Input() nodeId: string; @Input() node: MinimalNodeEntity; isLoading = false; displayNode: MinimalNodeEntryEntity; - canUpdateNode = false; - - get isFileSelected(): boolean { - if (this.node && this.node.entry) { - // workaround for shared files type. - if (this.node.entry.nodeId) { - return true; - } else { - return this.node.entry.isFile; - } - } - return false; - } + tabs: Array = []; constructor( - public permission: NodePermissionService, - private contentApi: ContentApiService + private contentApi: ContentApiService, + private extensions: ExtensionService ) {} - ngOnChanges(changes: SimpleChanges) { + ngOnInit() { + this.tabs = this.extensions.getSidebarTabs(); + } + + ngOnChanges() { if (this.node) { const entry = this.node.entry; if (entry.nodeId) { @@ -103,6 +96,5 @@ export class InfoDrawerComponent implements OnChanges { private setDisplayNode(node: MinimalNodeEntryEntity) { this.displayNode = node; - this.canUpdateNode = node && this.permission.check(node, ['update']); } } diff --git a/src/app/components/info-drawer/info.drawer.module.ts b/src/app/components/info-drawer/info.drawer.module.ts index 3bcaf465c..bc8cc0c24 100644 --- a/src/app/components/info-drawer/info.drawer.module.ts +++ b/src/app/components/info-drawer/info.drawer.module.ts @@ -30,6 +30,20 @@ import { ContentMetadataModule, VersionManagerModule } from '@alfresco/adf-conte import { InfoDrawerComponent } from './info-drawer.component'; import { DirectivesModule } from '../../directives/directives.module'; import { MaterialModule } from '../../material.module'; +import { MetadataTabComponent } from './metadata-tab/metadata-tab.component'; +import { CommentsTabComponent } from './comments-tab/comments-tab.component'; +import { VersionsTabComponent } from './versions-tab/versions-tab.component'; +import { DynamicTabComponent } from './dynamic-tab/dynamic-tab.component'; + +export function components() { + return [ + InfoDrawerComponent, + MetadataTabComponent, + CommentsTabComponent, + VersionsTabComponent, + DynamicTabComponent + ]; +} @NgModule({ imports: [ @@ -41,10 +55,13 @@ import { MaterialModule } from '../../material.module'; DirectivesModule ], declarations: [ - InfoDrawerComponent + ...components() ], exports: [ - InfoDrawerComponent + ...components() + ], + entryComponents: [ + ...components() ] }) export class AppInfoDrawerModule {} diff --git a/src/app/components/info-drawer/metadata-tab/metadata-tab.component.ts b/src/app/components/info-drawer/metadata-tab/metadata-tab.component.ts new file mode 100644 index 000000000..8794cd608 --- /dev/null +++ b/src/app/components/info-drawer/metadata-tab/metadata-tab.component.ts @@ -0,0 +1,55 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { Component, Input, OnChanges, ViewEncapsulation } from '@angular/core'; +import { MinimalNodeEntryEntity } from 'alfresco-js-api'; +import { NodePermissionService } from '../../../services/node-permission.service'; + +@Component({ + selector: 'app-metadata-tab', + template: ` + + + `, + encapsulation: ViewEncapsulation.None, + host: { 'class': 'app-metadata-tab' } +}) +export class MetadataTabComponent implements OnChanges { + @Input() + node: MinimalNodeEntryEntity; + + canUpdateNode = false; + + constructor(public permission: NodePermissionService) {} + + ngOnChanges() { + this.canUpdateNode = + this.node && this.permission.check(this.node, ['update']); + } +} diff --git a/src/app/components/info-drawer/versions-tab/versions-tab.component.ts b/src/app/components/info-drawer/versions-tab/versions-tab.component.ts new file mode 100644 index 000000000..2bfe0751c --- /dev/null +++ b/src/app/components/info-drawer/versions-tab/versions-tab.component.ts @@ -0,0 +1,70 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { Component, Input, OnChanges, OnInit } from '@angular/core'; +import { MinimalNodeEntryEntity } from 'alfresco-js-api'; + +@Component({ + selector: 'app-versions-tab', + template: ` + + + + + + +
+ face + {{ 'VERSION.SELECTION.EMPTY' | translate }} +
+
+ ` +}) +export class VersionsTabComponent implements OnInit, OnChanges { + @Input() + node: MinimalNodeEntryEntity; + + isFileSelected = false; + + ngOnInit() { + this.updateState(); + } + + ngOnChanges() { + this.updateState(); + } + + private updateState() { + if (this.node && this.node.nodeId) { + // workaround for shared files type. + this.isFileSelected = true; + } else { + this.isFileSelected = this.node.isFile; + } + } +} diff --git a/src/app/extensions.module.ts b/src/app/extensions.module.ts index c8579ab0c..325dd3854 100644 --- a/src/app/extensions.module.ts +++ b/src/app/extensions.module.ts @@ -1,8 +1,26 @@ import { NgModule } from '@angular/core'; +import { AcaDevToolsModule, AcaDevToolsComponent } from 'aca-dev-tools'; +import { ExtensionService } from './extensions/extension.service'; +import { CodeEditorModule } from '@ngstack/code-editor'; // Main entry point for external extensions only. // For any application-specific code use CoreExtensionsModule instead. + @NgModule({ - imports: [] + imports: [ + CodeEditorModule.forRoot({ + // use local Monaco installation + baseUrl: 'assets/monaco', + // use local Typings Worker + typingsWorkerUrl: 'assets/workers/typings-worker.js' + }), + AcaDevToolsModule + ] }) -export class ExtensionsModule {} +export class ExtensionsModule { + constructor(extensions: ExtensionService) { + extensions.setComponents({ + 'app.dev.tools.component': AcaDevToolsComponent + }); + } +} diff --git a/src/app/extensions/core.extensions.module.ts b/src/app/extensions/core.extensions.module.ts index db935fca7..9cc7bebfe 100644 --- a/src/app/extensions/core.extensions.module.ts +++ b/src/app/extensions/core.extensions.module.ts @@ -36,11 +36,17 @@ import { CustomExtensionComponent } from './components/custom-component/custom.c import { ToggleInfoDrawerComponent } from '../components/toolbar/toggle-info-drawer/toggle-info-drawer.component'; import { ToggleFavoriteComponent } from '../components/toolbar/toggle-favorite/toggle-favorite.component'; import { ToolbarButtonComponent } from './components/toolbar/toolbar-button.component'; +import { MetadataTabComponent } from '../components/info-drawer/metadata-tab/metadata-tab.component'; +import { CommentsTabComponent } from '../components/info-drawer/comments-tab/comments-tab.component'; +import { VersionsTabComponent } from '../components/info-drawer/versions-tab/versions-tab.component'; export function setupExtensions(extensions: ExtensionService): Function { extensions.setComponents({ 'app.layout.main': LayoutComponent, 'app.components.trashcan': TrashcanComponent, + 'app.components.tabs.metadata': MetadataTabComponent, + 'app.components.tabs.comments': CommentsTabComponent, + 'app.components.tabs.versions': VersionsTabComponent, 'app.toolbar.toggleInfoDrawer': ToggleInfoDrawerComponent, 'app.toolbar.toggleFavorite': ToggleFavoriteComponent }); diff --git a/src/app/extensions/extension.config.ts b/src/app/extensions/extension.config.ts index 54b7b0399..3bc67a0b1 100644 --- a/src/app/extensions/extension.config.ts +++ b/src/app/extensions/extension.config.ts @@ -27,6 +27,7 @@ import { NavBarGroupRef } from './navbar.extensions'; import { RouteRef } from './routing.extensions'; import { RuleRef } from './rule.extensions'; import { ActionRef, ContentActionRef } from './action.extensions'; +import { SidebarTabRef } from './sidebar.extensions'; export interface ExtensionConfig { $name: string; @@ -44,6 +45,7 @@ export interface ExtensionConfig { actions?: Array; }; navbar?: Array; + sidebar?: Array; content?: { actions?: Array; contextActions?: Array diff --git a/src/app/extensions/extension.service.ts b/src/app/extensions/extension.service.ts index cc5f13cf4..6419fda0d 100644 --- a/src/app/extensions/extension.service.ts +++ b/src/app/extensions/extension.service.ts @@ -37,6 +37,7 @@ import { RuleContext, RuleRef, RuleEvaluator, RuleParameter } from './rule.exten import { ActionRef, ContentActionRef, ContentActionType } from './action.extensions'; import * as core from './evaluators/core.evaluators'; import { NodePermissionService } from '../services/node-permission.service'; +import { SidebarTabRef } from './sidebar.extensions'; @Injectable() export class ExtensionService implements RuleContext { @@ -58,6 +59,7 @@ export class ExtensionService implements RuleContext { openWithActions: Array = []; createActions: Array = []; navbar: Array = []; + sidebar: Array = []; authGuards: { [key: string]: Type<{}> } = {}; components: { [key: string]: Type<{}> } = {}; @@ -88,7 +90,15 @@ export class ExtensionService implements RuleContext { this.loadConfig(this.configPath, 0).then(result => { let config = result.config; - if (config.$references && config.$references.length > 0) { + const override = sessionStorage.getItem('aca.extension.config'); + if (override) { + console.log('overriding extension config'); + config = JSON.parse(override); + } + + const externalPlugins = localStorage.getItem('experimental.external-plugins') === 'true'; + + if (externalPlugins && config.$references && config.$references.length > 0) { const plugins = config.$references.map( (name, idx) => this.loadConfig(`${this.pluginsPath}/${name}`, idx) ); @@ -129,6 +139,7 @@ export class ExtensionService implements RuleContext { this.openWithActions = this.loadViewerOpenWith(config); this.createActions = this.loadCreateActions(config); this.navbar = this.loadNavBar(config); + this.sidebar = this.loadSidebar(config); } protected loadConfig(url: string, order: number): Promise<{ order: number, config: ExtensionConfig }> { @@ -166,7 +177,7 @@ export class ExtensionService implements RuleContext { return []; } - protected loadViewerActions(config: ExtensionConfig) { + protected loadViewerActions(config: ExtensionConfig): Array { if (config && config.features && config.features.viewer) { return (config.features.viewer.actions || []) .sort(this.sortByOrder) @@ -184,7 +195,7 @@ export class ExtensionService implements RuleContext { return []; } - protected loadNavBar(config: ExtensionConfig): any { + protected loadNavBar(config: ExtensionConfig): Array { if (config && config.features) { return (config.features.navbar || []) .filter(entry => !entry.disabled) @@ -206,7 +217,16 @@ export class ExtensionService implements RuleContext { }; }); } - return {}; + return []; + } + + protected loadSidebar(config: ExtensionConfig): Array { + if (config && config.features) { + return (config.features.sidebar || []) + .filter(entry => !entry.disabled) + .sort(this.sortByOrder); + } + return []; } protected loadViewerOpenWith(config: ExtensionConfig): Array { @@ -271,6 +291,10 @@ export class ExtensionService implements RuleContext { return this.navbar; } + getSidebarTabs(): Array { + return this.sidebar; + } + getComponentById(id: string): Type<{}> { return this.components[id]; } diff --git a/src/app/extensions/sidebar.extensions.ts b/src/app/extensions/sidebar.extensions.ts new file mode 100644 index 000000000..a64807d68 --- /dev/null +++ b/src/app/extensions/sidebar.extensions.ts @@ -0,0 +1,38 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2018 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +export class SidebarTabRef { + id: string; + title: string; + component: string; + + icon?: string; + disabled?: boolean; + order?: number; + rules?: { + visible?: string; + [key: string]: string; + }; +} diff --git a/src/assets/app.extensions.json b/src/assets/app.extensions.json index 16c12a94d..88862003a 100644 --- a/src/assets/app.extensions.json +++ b/src/assets/app.extensions.json @@ -4,7 +4,8 @@ "$version": "1.0.0", "$references": [ "plugin1.json", - "plugin2.json" + "plugin2.json", + "dev.tools.json" ], "rules": [ @@ -727,6 +728,27 @@ } } ] - } + }, + "sidebar": [ + { + "id": "app.sidebar.properties", + "order": 100, + "title": "APP.INFO_DRAWER.TABS.PROPERTIES", + "component": "app.components.tabs.metadata" + }, + { + "id": "app.sidebar.comments", + "order": 200, + "title": "APP.INFO_DRAWER.TABS.COMMENTS", + "component": "app.components.tabs.comments" + }, + { + "id": "app.sidebar.versions", + "order": 300, + "disabled": true, + "title": "APP.INFO_DRAWER.TABS.VERSIONS", + "component": "app.components.tabs.versions" + } + ] } } diff --git a/src/assets/extension.schema.json b/src/assets/extension.schema.json new file mode 100644 index 000000000..7c19fd391 --- /dev/null +++ b/src/assets/extension.schema.json @@ -0,0 +1,376 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://github.com/Alfresco/alfresco-content-app/blob/development/extension.schema.json", + "title": "ACA Extension Schema", + "description": "Provides a validation schema for ACA extensions", + + "definitions": { + "ruleRef": { + "type": "object", + "required": ["id", "type"], + "properties": { + "id": { + "description": "Unique rule definition id", + "type": "string" + }, + "type": { + "description": "Rule evaluator type", + "type": "string" + }, + "parameters": { + "description": "Rule evaluator parameters", + "type": "array", + "items": { "$ref": "#/definitions/ruleParameter" }, + "minItems": 1 + } + } + }, + "ruleParameter": { + "type": "object", + "required": ["type", "value"], + "properties": { + "type": { + "description": "Rule parameter type", + "type": "string" + }, + "value": { + "description": "Rule parameter value", + "type": "string" + }, + "parameters": { + "description": "Parameters", + "type": "array", + "items": { "$ref": "#/definitions/ruleParameter" }, + "minItems": 1 + } + } + }, + "routeRef": { + "type": "object", + "required": ["id", "path", "component"], + "properties": { + "id": { + "description": "Unique route reference identifier.", + "type": "string" + }, + "path": { + "description": "Route path to register.", + "type": "string" + }, + "component": { + "description": "Unique identifier for the Component to use with the route.", + "type": "string" + }, + "layout": { + "description": "Unique identifier for the custom layout component to use.", + "type": "string" + }, + "auth": { + "description": "List of the authentication guards to use with the route.", + "type": "array", + "items": { + "type": "string" + }, + "minLength": 1, + "uniqueItems": true + }, + "data": { + "description": "Custom data to pass to the activated route so that your components can access it", + "type": "object" + } + } + }, + "actionRef": { + "type": "object", + "required": ["id", "type"], + "properties": { + "id": { + "description": "Unique action identifier", + "type": "string" + }, + "type": { + "description": "Action type", + "type": "string" + }, + "payload": { + "description": "Action payload value (string or expression)", + "type": "string" + } + } + }, + "contentActionRef": { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "description": "Unique action identifier.", + "type": "string" + }, + "type": { + "description": "Element type", + "type": "string", + "enum": ["default", "button", "separator", "menu", "custom"] + }, + "title": { + "description": "Element title", + "type": "string" + }, + "description": { + "description": "Element description, used for the tooltips.", + "type": "string" + }, + "description-disabled": { + "description": "Description to use when element is in the disabled state.", + "type": "string" + }, + "order": { + "description": "Element order", + "type": "number" + }, + "icon": { + "description": "Element icon", + "type": "string" + }, + "disabled": { + "description": "Toggles disabled state", + "type": "boolean" + }, + "component": { + "description": "Custom component id (requires type to be 'custom')", + "type": "string" + }, + "children": { + "description": "Child entries for the container types.", + "type": "array", + "items": { "$ref": "#/definitions/contentActionRef" }, + "minItems": 1 + }, + "actions": { + "description": "Element actions", + "type": "object", + "properties": { + "click": { + "description": "Action reference for the click handler", + "type": "string" + } + } + }, + "rules": { + "description": "Element rules", + "type": "object", + "properties": { + "enabled": { + "description": "Rule to evaluate the enabled state", + "type": "string" + }, + "visible": { + "description": "Rule to evaluate the visibility state", + "type": "string" + } + } + } + } + }, + "navBarLinkRef": { + "type": "object", + "required": ["id", "icon", "title", "route"], + "properties": { + "id": { + "description": "Unique identifier", + "type": "string" + }, + "icon": { + "description": "Element icon", + "type": "string" + }, + "title": { + "description": "Element title", + "type": "string" + }, + "route": { + "description": "Route reference identifier", + "type": "string" + }, + "description": { + "description": "Element description or tooltip", + "type": "string" + }, + "order": { + "description": "Element order", + "type": "number" + }, + "disabled": { + "description": "Toggles the disabled state", + "type": "boolean" + } + } + }, + "navBarGroupRef": { + "type": "object", + "required": ["id", "items"], + "properties": { + "id": { + "description": "Unique identifier for the navigation group", + "type": "string" + }, + "items": { + "description": "Navigation group items", + "type": "array", + "items": { "$ref": "#/definitions/navBarLinkRef" }, + "minItems": 1 + }, + "order": { + "description": "Group order", + "type": "number" + }, + "disabled": { + "description": "Toggles the disabled state", + "type": "boolean" + } + } + }, + "sidebarTabRef": { + "type": "object", + "required": ["id", "component"], + "properties": { + "id": { + "description": "Unique identifier for the navigation group", + "type": "string" + }, + "title": { + "description": "Element title", + "type": "string" + }, + "component": { + "description": "Component id", + "type": "string" + }, + "icon": { + "description": "Material icon name", + "type": "string" + }, + "disabled": { + "description": "Toggles disabled state", + "type": "boolean" + }, + "order": { + "description": "Element order", + "type": "number" + }, + "rules": { + "description": "Element rules", + "type": "object", + "properties": { + "visible": { + "description": "Rule to evaluate the visibility state", + "type": "string" + } + } + } + } + } + }, + + "type": "object", + "required": ["$name", "$version"], + "properties": { + "$name": { + "description": "Extension name", + "type": "string" + }, + "$version": { + "description": "Extension version", + "type": "string" + }, + "$description": { + "description": "Brief description on what the extension does" + }, + "$references": { + "description": "References to external files", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "rules": { + "description": "List of rule definitions", + "type": "array", + "items": { "$ref": "#/definitions/ruleRef" }, + "minItems": 1 + }, + "routes": { + "description": "List of custom application routes", + "type": "array", + "items": { "$ref": "#/definitions/routeRef" }, + "minItems": 1 + }, + "actions": { + "description": "List of action definitions", + "type": "array", + "items": { "$ref": "#/definitions/actionRef" }, + "minItems": 1 + }, + "features": { + "description": "Application-specific features and extensions", + "type": "object", + "properties": { + "create": { + "description": "The [New] menu component extensions", + "type": "array", + "items": { "$ref": "#/definitions/contentActionRef" }, + "minItems": 1 + }, + "viewer": { + "description": "Viewer component extensions", + "type": "object", + "properties": { + "openWith": { + "description": "The [Open With] menu extensions", + "type": "array", + "items": { "$ref": "#/definitions/contentActionRef" }, + "minItems": 1 + }, + "actions": { + "description": "Content actions (toolbar, context menus, etc.)", + "type": "array", + "items": { "$ref": "#/definitions/contentActionRef" }, + "minItems": 1 + } + } + }, + "navbar": { + "description": "Navigation bar extensions", + "type": "array", + "items": { "$ref": "#/definitions/navBarGroupRef" }, + "minItems": 1 + }, + "sidebar": { + "description": "Sidebar extensions", + "type": "array", + "items": { "$ref": "#/definitions/sidebarTabRef" }, + "minItems": 1 + }, + "content": { + "description": "Main application content extensions", + "type": "object", + "properties": { + "actions": { + "description": "Content actions (toolbar, context menus, etc.)", + "type": "array", + "items": { "$ref": "#/definitions/contentActionRef" }, + "minItems": 1 + }, + "contextActions": { + "description": "Content actions (toolbar, context menus, etc.)", + "type": "array", + "items": { "$ref": "#/definitions/contentActionRef" }, + "minItems": 1 + } + } + } + } + } + } +} diff --git a/src/assets/plugins/dev.tools.json b/src/assets/plugins/dev.tools.json new file mode 100644 index 000000000..c20fef6c7 --- /dev/null +++ b/src/assets/plugins/dev.tools.json @@ -0,0 +1,36 @@ +{ + "$schema": "../../../extension.schema.json", + "$version": "1.0.0", + "$name": "dev.tools", + "$description": "ACA dev tools", + + "routes": [ + { + "id": "app.dev.tools", + "component": "app.dev.tools.component", + "path": "dev-tools", + "data": { + "configPath": "assets/app.extensions.json", + "pluginsPath": "assets/plugins", + "schemaUri": "../../extension.schema.json", + "schemaPath": "assets/extension.schema.json" + } + } + ], + + "features": { + "navbar": [ + { + "id": "app.navbar.dev.tools", + "items": [ + { + "id": "app.navbar.dev.tools.main", + "icon": "build", + "title": "dev tools", + "route": "app.dev.tools" + } + ] + } + ] + } +} diff --git a/src/polyfills.ts b/src/polyfills.ts index 4a6fabf72..f3d18b9f6 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -95,3 +95,38 @@ import 'zone.js/dist/zone'; // Included with Angular CLI. * Need to import at least one locale-data with intl. */ // import 'intl/locale-data/jsonp/en'; + +// workaround for https://github.com/Microsoft/monaco-editor/issues/790 + +Promise.all = function(values: any): Promise { + let resolve: (v: any) => void; + let reject: (v: any) => void; + const promise = new this((res, rej) => { + resolve = res; + reject = rej; + }); + let count = 0; + let index = 0; + const resolvedValues: any[] = []; + for (let value of values) { + if (!(value && value.then)) { + value = this.resolve(value); + } + value.then( + (idx => (val: any) => { + resolvedValues[idx] = val; + count--; + if (!count) { + resolve(resolvedValues); + } + })(index), + reject + ); + count++; + index++; + } + if (!count) { + resolve(resolvedValues); + } + return promise; +}; diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index 0a01e9c6c..65d32a367 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json @@ -2,9 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", - "baseUrl": "./", - "module": "es2015", "types": [] }, - "exclude": ["node_modules", "test.ts", "**/*.spec.ts"] + "exclude": ["test.ts", "**/*.spec.ts"] } diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json index 09523c045..446a1c763 100644 --- a/src/tsconfig.spec.json +++ b/src/tsconfig.spec.json @@ -2,9 +2,6 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/spec", - "baseUrl": "./", - "module": "commonjs", - "target": "es5", "types": ["jasmine", "node"] }, "files": ["test.ts", "polyfills.ts"], diff --git a/tsconfig.json b/tsconfig.json index a3e0686cd..9b3f4770d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,15 @@ "dom" ], "module": "es2015", - "baseUrl": "./" + "baseUrl": "./", + "paths": { + "aca-dev-tools": [ + "dist/aca-dev-tools" + ], + "aca-dev-tools/*": [ + "dist/aca-dev-tools/*" + ] + } }, "exclude": [ "node_modules"