diff --git a/package-lock.json b/package-lock.json index d8e0016bf..70e61d9e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,11 +5,11 @@ "requires": true, "dependencies": { "@alfresco/adf-content-services": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-2.1.0.tgz", - "integrity": "sha512-KKx9zG/8EzQgrBGKZf7v48DQafFEUYmw9xWGLgo1/4tnfxo1fD1oILKYtkbURTqMeBoIPPuQ8j135ETYLc5idw==", + "version": "2.2.0-beta1", + "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-2.2.0-beta1.tgz", + "integrity": "sha512-6x0FK+S/aPyd7q+jwbuYAoAt/nOgKk6TtbOfa402DaLN1ZWSw0LqqSqSAPdWXQSz4nFgsyjVKMGu1e68qev5qQ==", "requires": { - "@alfresco/adf-core": "2.1.0", + "@alfresco/adf-core": "2.2.0-beta1", "@angular/animations": "5.1.1", "@angular/cdk": "5.0.1", "@angular/common": "5.1.1", @@ -24,7 +24,7 @@ "@angular/platform-browser-dynamic": "5.1.1", "@angular/router": "5.1.1", "@ngx-translate/core": "8.0.0", - "alfresco-js-api": "2.1.0", + "alfresco-js-api": "2.2.0-beta1", "chart.js": "2.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", @@ -60,9 +60,9 @@ } }, "@alfresco/adf-core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-2.1.0.tgz", - "integrity": "sha512-69eR3p77oTiEOVFVVAQYqsuuacLJXnUkr7yiBVHbXnRXk3Q1rf38hf+5nrwRijlixtusecs8IFobJ5mtHseOUg==", + "version": "2.2.0-beta1", + "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-2.2.0-beta1.tgz", + "integrity": "sha512-+0F9iNuzT1a1zboVtuPcZ1Br3sHGCn2lonFly2UfSMZSgtvUYMvrJ/eQin/4LJa43NLBZqZ5HpEr3k8/ZvMPMA==", "requires": { "@angular/animations": "5.1.1", "@angular/cdk": "5.0.1", @@ -78,7 +78,7 @@ "@angular/platform-browser-dynamic": "5.1.1", "@angular/router": "5.1.1", "@ngx-translate/core": "8.0.0", - "alfresco-js-api": "2.1.0", + "alfresco-js-api": "2.2.0-beta1", "chart.js": "2.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", @@ -248,7 +248,7 @@ "opn": "5.1.0", "portfinder": "1.0.13", "postcss-import": "11.0.0", - "postcss-loader": "2.0.10", + "postcss-loader": "2.1.0", "postcss-url": "7.3.0", "raw-loader": "0.5.1", "resolve": "1.5.0", @@ -528,9 +528,9 @@ } }, "acorn": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz", - "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", + "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==", "dev": true }, "acorn-dynamic-import": { @@ -605,9 +605,9 @@ "dev": true }, "alfresco-js-api": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.1.0.tgz", - "integrity": "sha512-ijiP0NEDHjvp5ZLwAhz8D9tLhx/ZxvRnSpqNPyXi1xAMEplCFGDbf300MVz5RmhEHzt0352I5kD3W7JmrTmgdg==", + "version": "2.2.0-beta1", + "resolved": "https://registry.npmjs.org/alfresco-js-api/-/alfresco-js-api-2.2.0-beta1.tgz", + "integrity": "sha512-Jay71zhgBL2I8LO3D3e3zJqlAQFEl8go983I8rKM7QH0eiabQsbXDuvu4+4dlCwrpxLstmBKZFTOIsyfufrISw==", "requires": { "event-emitter": "0.3.4", "superagent": "3.8.2" @@ -979,7 +979,7 @@ "caniuse-lite": "1.0.30000792", "normalize-range": "0.1.2", "num2fraction": "1.2.2", - "postcss": "6.0.16", + "postcss": "6.0.17", "postcss-value-parser": "3.3.0" } }, @@ -1629,7 +1629,7 @@ "dev": true, "requires": { "caniuse-lite": "1.0.30000792", - "electron-to-chromium": "1.3.31" + "electron-to-chromium": "1.3.32" } }, "buffer": { @@ -1786,7 +1786,7 @@ "dev": true, "requires": { "browserslist": "1.7.7", - "caniuse-db": "1.0.30000799", + "caniuse-db": "1.0.30000800", "lodash.memoize": "4.1.2", "lodash.uniq": "4.5.0" }, @@ -1797,16 +1797,16 @@ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", "dev": true, "requires": { - "caniuse-db": "1.0.30000799", - "electron-to-chromium": "1.3.31" + "caniuse-db": "1.0.30000800", + "electron-to-chromium": "1.3.32" } } } }, "caniuse-db": { - "version": "1.0.30000799", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000799.tgz", - "integrity": "sha1-CQSVPek/P0kmR+WMGhvaenOgyws=", + "version": "1.0.30000800", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000800.tgz", + "integrity": "sha1-qG5rwjvZpwfV30LzPmTQSVz9ohg=", "dev": true }, "caniuse-lite": { @@ -7238,7 +7238,7 @@ "dev": true, "requires": { "browserslist": "1.7.7", - "caniuse-db": "1.0.30000799", + "caniuse-db": "1.0.30000800", "normalize-range": "0.1.2", "num2fraction": "1.2.2", "postcss": "5.2.18", @@ -7251,8 +7251,8 @@ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", "dev": true, "requires": { - "caniuse-db": "1.0.30000799", - "electron-to-chromium": "1.3.31" + "caniuse-db": "1.0.30000800", + "electron-to-chromium": "1.3.32" } }, "chalk": { @@ -7583,7 +7583,7 @@ "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", "dev": true, "requires": { - "acorn": "5.3.0", + "acorn": "5.4.1", "defined": "1.0.0" } }, @@ -7774,9 +7774,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.31", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz", - "integrity": "sha512-XE4CLbswkZgZFn34cKFy1xaX+F5LHxeDLjY1+rsK9asDzknhbrd9g/n/01/acbU25KTsUSiLKwvlLyA+6XLUOA==", + "version": "1.3.32", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.32.tgz", + "integrity": "sha1-EdBoTAhA4APEvoko+KxfNdvCtOY=", "dev": true }, "elliptic": { @@ -10457,7 +10457,7 @@ "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", "dev": true, "requires": { - "postcss": "6.0.16" + "postcss": "6.0.17" } }, "ieee754": { @@ -12067,7 +12067,7 @@ "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "dev": true, "requires": { - "mimic-fn": "1.1.0" + "mimic-fn": "1.2.0" } }, "memory-fs": { @@ -12167,9 +12167,9 @@ } }, "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, "minimalistic-assert": { @@ -13512,9 +13512,9 @@ "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.17.tgz", + "integrity": "sha512-Bl1nybsSzWYbP8O4gAVD8JIjZIul9hLNOPTGBIlVmZNUnNAGL+W0cpYWzVwfImZOwumct4c1SDvSbncVWKtXUw==", "dev": true, "requires": { "chalk": "2.3.0", @@ -14159,7 +14159,7 @@ "integrity": "sha1-qWLi34LTvFptpqOGhBdHIE9B71s=", "dev": true, "requires": { - "postcss": "6.0.16", + "postcss": "6.0.17", "postcss-value-parser": "3.3.0", "read-cache": "1.0.0", "resolve": "1.5.0" @@ -14198,15 +14198,27 @@ } }, "postcss-loader": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.0.10.tgz", - "integrity": "sha512-xQaDcEgJ/2JqFY18zpFkik8vyYs7oS5ZRbrjvDqkP97k2wYWfPT4+qA0m4o3pTSCsz0u26PNqs8ZO9FRUWAqrA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.0.tgz", + "integrity": "sha512-S/dKzpDwGFmP9g8eyCu9sUIV+/+3UooeTpYlsKf23qKDdrhHuA4pTSfytVu0rEJ0iDqUavXrgtOPq5KhNyNMOw==", "dev": true, "requires": { "loader-utils": "1.1.0", - "postcss": "6.0.16", + "postcss": "6.0.17", "postcss-load-config": "1.2.0", - "schema-utils": "0.3.0" + "schema-utils": "0.4.3" + }, + "dependencies": { + "schema-utils": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.3.tgz", + "integrity": "sha512-sgv/iF/T4/SewJkaVpldKC4WjSkz0JsOh2eKtxCPpCO1oR05+7MOF+H476HVRbLArkgA7j5TRJJ4p2jdFkUGQQ==", + "dev": true, + "requires": { + "ajv": "5.5.2", + "ajv-keywords": "2.1.1" + } + } } }, "postcss-merge-idents": { @@ -14366,8 +14378,8 @@ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", "dev": true, "requires": { - "caniuse-db": "1.0.30000799", - "electron-to-chromium": "1.3.31" + "caniuse-db": "1.0.30000800", + "electron-to-chromium": "1.3.32" } }, "chalk": { @@ -14701,7 +14713,7 @@ "integrity": "sha1-ZhQOzs447wa/DT41XWm/WdFB6oU=", "dev": true, "requires": { - "postcss": "6.0.16" + "postcss": "6.0.17" } }, "postcss-modules-local-by-default": { @@ -14711,7 +14723,7 @@ "dev": true, "requires": { "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.16" + "postcss": "6.0.17" } }, "postcss-modules-scope": { @@ -14721,7 +14733,7 @@ "dev": true, "requires": { "css-selector-tokenizer": "0.7.0", - "postcss": "6.0.16" + "postcss": "6.0.17" } }, "postcss-modules-values": { @@ -14731,7 +14743,7 @@ "dev": true, "requires": { "icss-replace-symbols": "1.1.0", - "postcss": "6.0.16" + "postcss": "6.0.17" } }, "postcss-normalize-charset": { @@ -15286,7 +15298,7 @@ "mime": "1.6.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", - "postcss": "6.0.16", + "postcss": "6.0.17", "xxhashjs": "0.2.2" } }, @@ -17925,7 +17937,7 @@ "resolve": "1.5.0", "semver": "5.5.0", "tslib": "1.9.0", - "tsutils": "2.19.1" + "tsutils": "2.21.0" }, "dependencies": { "chalk": { @@ -17949,9 +17961,9 @@ "optional": true }, "tsutils": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.19.1.tgz", - "integrity": "sha512-1B3z4H4HddgzWptqLzwrJloDEsyBt8DvZhnFO14k7A4RsQL/UhEfQjD4hpcY5NpF3veBkjJhQJ8Bl7Xp96cN+A==", + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.21.0.tgz", + "integrity": "sha512-zlOHTYtTwvTiKxUyAU8wiKzPpAgwZrGjb7AY18VUlxuCgBiTMVorIl5HjrCT8V64Hm34RI1BZITJMVQpBLMxVg==", "dev": true, "requires": { "tslib": "1.9.0" @@ -18613,7 +18625,7 @@ "integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==", "dev": true, "requires": { - "acorn": "5.3.0", + "acorn": "5.4.1", "acorn-dynamic-import": "2.0.2", "ajv": "5.5.2", "ajv-keywords": "2.1.1", diff --git a/package.json b/package.json index d89f727be..87e7310c4 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ }, "private": true, "dependencies": { - "@alfresco/adf-content-services": "2.1.0", - "@alfresco/adf-core": "2.1.0", + "@alfresco/adf-content-services": "2.2.0-beta1", + "@alfresco/adf-core": "2.2.0-beta1", "@angular/animations": "5.1.1", "@angular/cdk": "5.0.1", "@angular/common": "5.1.1", @@ -34,7 +34,7 @@ "@mat-datetimepicker/core": "1.0.1", "@mat-datetimepicker/moment": "1.0.1", "@ngx-translate/core": "8.0.0", - "alfresco-js-api": "2.1.0", + "alfresco-js-api": "2.2.0-beta1", "core-js": "2.5.3", "hammerjs": "2.0.8", "moment-es6": "1.0.0", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 4773c8632..847d75faa 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -41,7 +41,7 @@ export class AppComponent implements OnInit { } ngOnInit() { - const { router, pageTitle, route, translateService } = this; + const { router, pageTitle, route } = this; router .events diff --git a/src/app/common/common.module.ts b/src/app/common/common.module.ts index 40cbbb33b..1625705af 100644 --- a/src/app/common/common.module.ts +++ b/src/app/common/common.module.ts @@ -27,6 +27,7 @@ import { NgModule } from '@angular/core'; import { DatePipe } from '@angular/common'; import { RouterModule } from '@angular/router'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { AdfModule } from '../adf.module'; import { MaterialModule } from './material.module'; @@ -45,6 +46,7 @@ import { NodeActionsService } from './services/node-actions.service'; export function modules() { return [ + BrowserAnimationsModule, FormsModule, ReactiveFormsModule, MaterialModule, @@ -61,7 +63,7 @@ export function declarations() { DownloadFileDirective, NodeRestoreDirective, NodePermanentDeleteDirective, - NodeUnshareDirective  + NodeUnshareDirective ]; } diff --git a/src/app/common/directives/node-copy.directive.spec.ts b/src/app/common/directives/node-copy.directive.spec.ts index 734527a33..f56990b65 100644 --- a/src/app/common/directives/node-copy.directive.spec.ts +++ b/src/app/common/directives/node-copy.directive.spec.ts @@ -29,11 +29,10 @@ import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; -import { DocumentListModule } from '@alfresco/adf-content-services'; +import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; +import { CommonModule } from '../common.module'; import { NodeActionsService } from '../services/node-actions.service'; -import { ContentManagementService } from '../services/content-management.service'; import { NodeCopyDirective } from './node-copy.directive'; @Component({ @@ -55,16 +54,10 @@ describe('NodeCopyDirective', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ - CoreModule, - DocumentListModule + CommonModule ], declarations: [ - TestComponent, - NodeCopyDirective - ], - providers: [ - ContentManagementService, - NodeActionsService + TestComponent ] }); diff --git a/src/app/common/directives/node-delete.directive.spec.ts b/src/app/common/directives/node-delete.directive.spec.ts index e681cd699..323bc281e 100644 --- a/src/app/common/directives/node-delete.directive.spec.ts +++ b/src/app/common/directives/node-delete.directive.spec.ts @@ -23,12 +23,13 @@ * along with Alfresco. If not, see . */ -import { TestBed, ComponentFixture, fakeAsync } from '@angular/core/testing'; +import { TestBed, ComponentFixture } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { CoreModule, TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; +import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; import { Component, DebugElement } from '@angular/core'; import { Observable } from 'rxjs/Rx'; +import { CommonModule } from '../common.module'; import { NodeDeleteDirective } from './node-delete.directive'; import { ContentManagementService } from '../services/content-management.service'; @@ -52,14 +53,10 @@ describe('NodeDeleteDirective', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ - CoreModule + CommonModule ], declarations: [ - TestComponent, - NodeDeleteDirective - ], - providers: [ - ContentManagementService + TestComponent ] }); @@ -96,7 +93,7 @@ describe('NodeDeleteDirective', () => { ); }); - it('notifies faild file deletion', () => { + it('notifies failed file deletion', () => { spyOn(nodeApiService, 'deleteNode').and.returnValue(Observable.throw(null)); component.selection = [{ entry: { id: '1', name: 'name1' } }]; @@ -125,7 +122,7 @@ describe('NodeDeleteDirective', () => { ); }); - it('notifies faild files deletion', () => { + it('notifies failed files deletion', () => { spyOn(nodeApiService, 'deleteNode').and.returnValue(Observable.throw(null)); component.selection = [ @@ -202,7 +199,7 @@ describe('NodeDeleteDirective', () => { }); }); - it('notifies faild file on on restore', () => { + it('notifies failed file on on restore', () => { spyOn(nodeApiService, 'restoreNode').and.returnValue(Observable.throw(null)); component.selection = [ @@ -216,7 +213,7 @@ describe('NodeDeleteDirective', () => { .toEqual((['APP.MESSAGES.ERRORS.NODE_RESTORE', '', 3000])); }); - it('notifies faild files on on restore', () => { + it('notifies failed files on on restore', () => { spyOn(nodeApiService, 'restoreNode').and.returnValue(Observable.throw(null)); component.selection = [ diff --git a/src/app/common/directives/node-download.directive.spec.ts b/src/app/common/directives/node-download.directive.spec.ts index 82aba7dfe..cc7018b3b 100644 --- a/src/app/common/directives/node-download.directive.spec.ts +++ b/src/app/common/directives/node-download.directive.spec.ts @@ -25,9 +25,11 @@ import { TestBed, ComponentFixture } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { CoreModule, AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-core'; import { MatDialog } from '@angular/material'; import { Component, DebugElement } from '@angular/core'; + +import { CommonModule } from '../common.module'; import { DownloadFileDirective } from './node-download.directive'; @Component({ @@ -49,14 +51,10 @@ describe('DownloadFileDirective', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ - CoreModule + CommonModule ], declarations: [ - TestComponent, - DownloadFileDirective - ], - providers: [ - AlfrescoApiService + TestComponent ] }); diff --git a/src/app/common/directives/node-move.directive.spec.ts b/src/app/common/directives/node-move.directive.spec.ts index 8c57e73df..37ad8b9b2 100644 --- a/src/app/common/directives/node-move.directive.spec.ts +++ b/src/app/common/directives/node-move.directive.spec.ts @@ -26,14 +26,12 @@ import { Component, DebugElement } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; - import { Observable } from 'rxjs/Rx'; -import { CoreModule, TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; -import { DocumentListModule } from '@alfresco/adf-content-services'; +import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; +import { CommonModule } from '../common.module'; import { NodeActionsService } from '../services/node-actions.service'; -import { ContentManagementService } from '../services/content-management.service'; import { NodeMoveDirective } from './node-move.directive'; @Component({ @@ -55,16 +53,10 @@ describe('NodeMoveDirective', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ - CoreModule, - DocumentListModule + CommonModule ], declarations: [ - TestComponent, - NodeMoveDirective - ], - providers: [ - ContentManagementService, - NodeActionsService + TestComponent ] }); diff --git a/src/app/common/directives/node-permanent-delete.directive.spec.ts b/src/app/common/directives/node-permanent-delete.directive.spec.ts index c16659601..eac0bd309 100644 --- a/src/app/common/directives/node-permanent-delete.directive.spec.ts +++ b/src/app/common/directives/node-permanent-delete.directive.spec.ts @@ -27,8 +27,9 @@ import { Component, DebugElement } from '@angular/core'; import { TestBed, ComponentFixture, async, fakeAsync, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, AlfrescoApiService, TranslationService, NotificationService } from '@alfresco/adf-core'; +import { AlfrescoApiService, TranslationService, NotificationService } from '@alfresco/adf-core'; +import { CommonModule } from '../common.module'; import { NodePermanentDeleteDirective } from './node-permanent-delete.directive'; @Component({ @@ -51,11 +52,10 @@ describe('NodePermanentDeleteDirective', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ - CoreModule + CommonModule ], declarations: [ - TestComponent, - NodePermanentDeleteDirective + TestComponent ] }) .compileComponents() diff --git a/src/app/common/directives/node-permanent-delete.directive.ts b/src/app/common/directives/node-permanent-delete.directive.ts index 72417fabf..6e9be55a7 100644 --- a/src/app/common/directives/node-permanent-delete.directive.ts +++ b/src/app/common/directives/node-permanent-delete.directive.ts @@ -27,7 +27,7 @@ import { Directive, ElementRef, HostListener, Input } from '@angular/core'; import { Observable } from 'rxjs/Rx'; import { TranslationService, AlfrescoApiService, NotificationService } from '@alfresco/adf-core'; -import { MinimalNodeEntity, DeletedNodeEntry, PathInfoEntity } from 'alfresco-js-api'; +import { MinimalNodeEntity } from 'alfresco-js-api'; @Directive({ selector: '[app-permanent-delete-node]' diff --git a/src/app/common/directives/node-restore.directive.spec.ts b/src/app/common/directives/node-restore.directive.spec.ts index 314f2ade7..23fe3319f 100644 --- a/src/app/common/directives/node-restore.directive.spec.ts +++ b/src/app/common/directives/node-restore.directive.spec.ts @@ -29,7 +29,9 @@ import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, ComponentFixture, async, fakeAsync, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, AlfrescoApiService, TranslationService, NotificationService } from '@alfresco/adf-core'; + +import { CommonModule } from '../common.module'; +import { AlfrescoApiService, TranslationService, NotificationService } from '@alfresco/adf-core'; import { NodeRestoreDirective } from './node-restore.directive'; @@ -55,12 +57,11 @@ describe('NodeRestoreDirective', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ - CoreModule, + CommonModule, RouterTestingModule ], declarations: [ - TestComponent, - NodeRestoreDirective + TestComponent ] }) .compileComponents() diff --git a/src/app/common/directives/node-restore.directive.ts b/src/app/common/directives/node-restore.directive.ts index a0a5109b6..c2822e493 100644 --- a/src/app/common/directives/node-restore.directive.ts +++ b/src/app/common/directives/node-restore.directive.ts @@ -28,7 +28,7 @@ import { Router } from '@angular/router'; import { Observable } from 'rxjs/Rx'; import { TranslationService, AlfrescoApiService, NotificationService } from '@alfresco/adf-core'; -import { MinimalNodeEntity, DeletedNodeEntry, PathInfoEntity, DeletedNodesPaging } from 'alfresco-js-api'; +import { MinimalNodeEntity, PathInfoEntity, DeletedNodesPaging } from 'alfresco-js-api'; @Directive({ selector: '[app-restore-node]' diff --git a/src/app/common/services/node-actions.service.spec.ts b/src/app/common/services/node-actions.service.spec.ts index b804051a3..94d7c813e 100644 --- a/src/app/common/services/node-actions.service.spec.ts +++ b/src/app/common/services/node-actions.service.spec.ts @@ -27,8 +27,10 @@ import { TestBed, async } from '@angular/core/testing'; import { MatDialog } from '@angular/material'; import { OverlayModule } from '@angular/cdk/overlay'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, AlfrescoApiService, NodesApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService, NodesApiService } from '@alfresco/adf-core'; import { DocumentListService } from '@alfresco/adf-content-services'; + +import { CommonModule } from '../common.module'; import { NodeActionsService } from './node-actions.service'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; @@ -102,15 +104,9 @@ describe('NodeActionsService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ - CoreModule, + CommonModule, OverlayModule - ], - providers: [ - MatDialog, - DocumentListService, - AlfrescoApiService, - NodesApiService, - NodeActionsService] + ] }); service = TestBed.get(NodeActionsService); @@ -700,9 +696,7 @@ describe('NodeActionsService', () => { }); it('should call the documentListService moveNode directly for moving a file that has permission to be moved', () => { - const spyOnDestinationPicker = - spyOn(service, 'getContentNodeSelection') - .and.returnValue(Observable.of([destinationFolder.entry])); + spyOn(service, 'getContentNodeSelection').and.returnValue(Observable.of([destinationFolder.entry])); fileToMove.entry['allowableOperations'] = [permissionToMove]; spyOnDocumentListServiceAction = spyOn(documentListService, 'moveNode').and.returnValue(Observable.of([fileToMove])); spyOn(service, 'moveNodeAction'); diff --git a/src/app/common/services/node-actions.service.ts b/src/app/common/services/node-actions.service.ts index 80d6d9d72..5e05c78e2 100644 --- a/src/app/common/services/node-actions.service.ts +++ b/src/app/common/services/node-actions.service.ts @@ -211,7 +211,7 @@ export class NodeActionsService { select: new Subject() }; - const matDialogRef = this.dialog.open(ContentNodeSelectorComponent, { + /*const matDialogRef =*/ this.dialog.open(ContentNodeSelectorComponent, { data, panelClass: 'adf-content-node-selector-dialog', width: '630px' diff --git a/src/app/components/files/files.component.spec.ts b/src/app/components/files/files.component.spec.ts index 70c7e4f75..1cf5d10bf 100644 --- a/src/app/components/files/files.component.spec.ts +++ b/src/app/components/files/files.component.spec.ts @@ -27,8 +27,7 @@ import { Observable } from 'rxjs/Rx'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, async } from '@angular/core/testing'; -import { UploadService, NodesApiService, FileUploadCompleteEvent, - FileUploadDeleteEvent, FileModel, ContentService } from '@alfresco/adf-core'; +import { UploadService, NodesApiService, ContentService } from '@alfresco/adf-core'; import { CommonModule } from '../../common/common.module'; import { ContentManagementService } from '../../common/services/content-management.service'; diff --git a/src/app/components/location-link/location-link.component.ts b/src/app/components/location-link/location-link.component.ts index 5e4355cf9..d360294fe 100644 --- a/src/app/components/location-link/location-link.component.ts +++ b/src/app/components/location-link/location-link.component.ts @@ -25,7 +25,7 @@ import { Component, Input, ChangeDetectionStrategy, OnInit, ViewEncapsulation } from '@angular/core'; import { AlfrescoApiService, DataColumn, DataRow, DataTableAdapter } from '@alfresco/adf-core'; -import { PathInfoEntity, AlfrescoApi } from 'alfresco-js-api'; +import { PathInfoEntity } from 'alfresco-js-api'; import { Observable } from 'rxjs/Rx'; @Component({ diff --git a/src/app/components/login/login.component.spec.ts b/src/app/components/login/login.component.spec.ts index f7b4ab8bc..b0b923c82 100644 --- a/src/app/components/login/login.component.spec.ts +++ b/src/app/components/login/login.component.spec.ts @@ -27,8 +27,9 @@ import { RouterTestingModule } from '@angular/router/testing'; import { Router } from '@angular/router'; import { Location } from '@angular/common'; import { TestBed, async } from '@angular/core/testing'; -import { CoreModule, AuthenticationService, UserPreferencesService } from '@alfresco/adf-core'; +import { AuthenticationService, UserPreferencesService } from '@alfresco/adf-core'; +import { CommonModule } from '../../common/common.module'; import { LoginComponent } from './login.component'; describe('LoginComponent', () => { @@ -43,7 +44,7 @@ describe('LoginComponent', () => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, - CoreModule + CommonModule ], declarations: [ LoginComponent diff --git a/src/app/components/page.component.spec.ts b/src/app/components/page.component.spec.ts index a13c0ce5a..1ba1e3052 100644 --- a/src/app/components/page.component.spec.ts +++ b/src/app/components/page.component.spec.ts @@ -23,8 +23,6 @@ * along with Alfresco. If not, see . */ -import { TestBed } from '@angular/core/testing'; - import { PageComponent } from './page.component'; class TestClass extends PageComponent { diff --git a/src/app/components/recent-files/recent-files.component.spec.ts b/src/app/components/recent-files/recent-files.component.spec.ts index 7291b60b8..5310cefec 100644 --- a/src/app/components/recent-files/recent-files.component.spec.ts +++ b/src/app/components/recent-files/recent-files.component.spec.ts @@ -26,7 +26,6 @@ import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, async } from '@angular/core/testing'; -import { Observable } from 'rxjs/Rx'; import { CoreModule, AlfrescoApiService } from '@alfresco/adf-core'; diff --git a/src/app/components/search/search.component.spec.ts b/src/app/components/search/search.component.spec.ts index 910e25cb0..7cc3dc903 100644 --- a/src/app/components/search/search.component.spec.ts +++ b/src/app/components/search/search.component.spec.ts @@ -24,7 +24,7 @@ */ import { TestBed, async } from '@angular/core/testing'; -import { CoreModule, AppConfigService } from '@alfresco/adf-core'; +import { CoreModule } from '@alfresco/adf-core'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; diff --git a/tsconfig.json b/tsconfig.json index bf0a18c3d..49aef904a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, + "noUnusedLocals": true, "target": "es5", "typeRoots": [ "node_modules/@types" @@ -14,8 +15,6 @@ "lib": [ "es2017", "dom" - ], - - "skipLibCheck": true + ] } } diff --git a/yarn.lock b/yarn.lock index 6b5fce766..947d786de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,11 +2,11 @@ # yarn lockfile v1 -"@alfresco/adf-content-services@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@alfresco/adf-content-services/-/adf-content-services-2.1.0.tgz#eb5d65dd585415b17dce5bc712ec349cfb6e4f30" +"@alfresco/adf-content-services@2.2.0-beta1": + version "2.2.0-beta1" + resolved "https://registry.yarnpkg.com/@alfresco/adf-content-services/-/adf-content-services-2.2.0-beta1.tgz#d578df1294cd6f9d9df34857b799838307dd905f" dependencies: - "@alfresco/adf-core" "2.1.0" + "@alfresco/adf-core" "2.2.0-beta1" "@angular/animations" "5.1.1" "@angular/cdk" "5.0.1" "@angular/common" "5.1.1" @@ -21,7 +21,7 @@ "@angular/platform-browser-dynamic" "5.1.1" "@angular/router" "5.1.1" "@ngx-translate/core" "8.0.0" - alfresco-js-api "2.1.0" + alfresco-js-api "2.2.0-beta1" chart.js "2.5.0" core-js "2.4.1" hammerjs "2.0.8" @@ -35,9 +35,9 @@ systemjs "0.19.27" zone.js "0.8.14" -"@alfresco/adf-core@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@alfresco/adf-core/-/adf-core-2.1.0.tgz#3311d3e3f34af8763dd157820418e7fdadf54be4" +"@alfresco/adf-core@2.2.0-beta1": + version "2.2.0-beta1" + resolved "https://registry.yarnpkg.com/@alfresco/adf-core/-/adf-core-2.2.0-beta1.tgz#e79ded6bee985146ff325c9256e8a70968ea2eb8" dependencies: "@angular/animations" "5.1.1" "@angular/cdk" "5.0.1" @@ -53,7 +53,7 @@ "@angular/platform-browser-dynamic" "5.1.1" "@angular/router" "5.1.1" "@ngx-translate/core" "8.0.0" - alfresco-js-api "2.1.0" + alfresco-js-api "2.2.0-beta1" chart.js "2.5.0" core-js "2.4.1" hammerjs "2.0.8" @@ -352,8 +352,8 @@ acorn@^4.0.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" acorn@^5.0.0, acorn@^5.2.1: - version "5.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" + version "5.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" addressparser@1.0.1: version "1.0.1" @@ -398,9 +398,9 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@~5.5.1: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -alfresco-js-api@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/alfresco-js-api/-/alfresco-js-api-2.1.0.tgz#1754c332de254bc58dbaa98b63a85f1c880edfaf" +alfresco-js-api@2.2.0-beta1: + version "2.2.0-beta1" + resolved "https://registry.yarnpkg.com/alfresco-js-api/-/alfresco-js-api-2.2.0-beta1.tgz#3a380fcc437f51276b96d0a6dd1bf439622d68a6" dependencies: event-emitter "0.3.4" superagent "3.8.2" @@ -1219,8 +1219,8 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000799" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000799.tgz#0904953de93f3f492647e58c1a1bda7a73a0cb0b" + version "1.0.30000800" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000800.tgz#a86e6bc23bd9a707d5df42f33e64d0495cfda218" caniuse-lite@^1.0.30000791, caniuse-lite@^1.0.30000792: version "1.0.30000792" @@ -2210,8 +2210,8 @@ ejs@^2.5.7: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a" electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30: - version "1.3.31" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz#00d832cba9fe2358652b0c48a8816c8e3a037e9f" + version "1.3.32" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.32.tgz#11d0684c0840e003c4be8928f8ac5f35dbc2b4e6" elliptic@^6.0.0: version "6.4.0" @@ -4552,8 +4552,8 @@ mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.5.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" mimic-fn@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" minimalistic-assert@^1.0.0: version "1.0.0" @@ -5441,13 +5441,13 @@ postcss-load-plugins@^2.3.0: object-assign "^4.1.0" postcss-loader@^2.0.10: - version "2.0.10" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.10.tgz#090db0540140bd56a7a7f717c41bc29aeef4c674" + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.1.0.tgz#038c2d6d59753fef4667827fd3ae03f5dc5e6a7a" dependencies: loader-utils "^1.1.0" postcss "^6.0.0" postcss-load-config "^1.2.0" - schema-utils "^0.3.0" + schema-utils "^0.4.0" postcss-merge-idents@^2.1.5: version "2.1.7" @@ -5637,8 +5637,8 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 supports-color "^3.2.3" postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.16: - version "6.0.16" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.16.tgz#112e2fe2a6d2109be0957687243170ea5589e146" + version "6.0.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.17.tgz#e259a051ca513f81e9afd0c21f7f82eda50c65c5" dependencies: chalk "^2.3.0" source-map "^0.6.1" @@ -5864,8 +5864,8 @@ raw-loader@^0.5.1: resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" rc@^1.1.7: - version "1.2.4" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.4.tgz#a0f606caae2a3b862bbd0ef85482c0125b315fa3" + version "1.2.5" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd" dependencies: deep-extend "~0.4.0" ini "~1.3.0" @@ -6330,7 +6330,7 @@ schema-utils@^0.3.0: dependencies: ajv "^5.0.0" -schema-utils@^0.4.2: +schema-utils@^0.4.0, schema-utils@^0.4.2: version "0.4.3" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.3.tgz#e2a594d3395834d5e15da22b48be13517859458e" dependencies: @@ -7257,8 +7257,8 @@ tsscmp@~1.0.0: resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.5.tgz#7dc4a33af71581ab4337da91d85ca5427ebd9a97" tsutils@^2.12.1: - version "2.19.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.19.1.tgz#76d7ebdea9d7a7bf4a05f50ead3701b0168708d7" + version "2.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.21.0.tgz#43466a2283a0abce64e2209bc732ad72f8a04fab" dependencies: tslib "^1.8.1"