diff --git a/demo-shell-ng2/config/webpack.common.js b/demo-shell-ng2/config/webpack.common.js index 03cfd6fd61..823be9bd44 100644 --- a/demo-shell-ng2/config/webpack.common.js +++ b/demo-shell-ng2/config/webpack.common.js @@ -113,7 +113,7 @@ module.exports = { // Workaround for angular/angular#11580 new webpack.ContextReplacementPlugin( // The (\\|\/) piece accounts for path separators in *nix and Windows - /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, + /angular(\\|\/)core(\\|\/)@angular/, helpers.root('./app'), // location of your src {} // a map of your routes ), diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index c1f7effc54..9ed42bc018 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -49,20 +49,22 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/compiler-cli": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/animations": "~4.0.0", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/compiler-cli": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "core-js": "2.4.1", "reflect-metadata": "0.1.9", "rxjs": "5.1.0", - "zone.js": "0.7.6", + "zone.js": "0.8.4", "dialog-polyfill": "^0.4.7", "material-design-icons": "2.2.3", diff --git a/ng2-components/ng2-activiti-analytics/package.json b/ng2-components/ng2-activiti-analytics/package.json index 5280d011ab..1602b740e2 100644 --- a/ng2-components/ng2-activiti-analytics/package.json +++ b/ng2-components/ng2-activiti-analytics/package.json @@ -33,15 +33,16 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "chart.js": "2.5.0", "core-js": "2.4.1", @@ -56,7 +57,7 @@ "reflect-metadata": "0.1.10", "rxjs": "5.1.0", "systemjs": "0.19.27", - "zone.js": "0.7.6" + "zone.js": "0.8.4" }, "devDependencies": { "@types/hammerjs": "^2.0.34", diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts index 64405ad4e8..3b6deed822 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts @@ -108,7 +108,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -128,7 +128,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -155,7 +155,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -216,7 +216,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -241,7 +241,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -266,7 +266,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -304,7 +304,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); }); @@ -338,7 +338,7 @@ describe('AnalyticsReportParametersComponent', () => { component.appId = appId; component.reportId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); component.ngOnChanges({ 'appId': change }); }); @@ -351,7 +351,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -401,7 +401,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); }); @@ -413,7 +413,7 @@ describe('AnalyticsReportParametersComponent', () => { }); let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -459,7 +459,7 @@ describe('AnalyticsReportParametersComponent', () => { beforeEach(async(() => { let reportId = 1; - let change = new SimpleChange(null, reportId); + let change = new SimpleChange(null, reportId, true); component.ngOnChanges({ 'reportId': change }); fixture.detectChanges(); jasmine.Ajax.requests.mostRecent().respondWith({ diff --git a/ng2-components/ng2-activiti-diagrams/package.json b/ng2-components/ng2-activiti-diagrams/package.json index ca1ff45c3b..2e3fa1eaf7 100644 --- a/ng2-components/ng2-activiti-diagrams/package.json +++ b/ng2-components/ng2-activiti-diagrams/package.json @@ -29,15 +29,16 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", @@ -47,7 +48,7 @@ "reflect-metadata": "0.1.10", "rxjs": "5.1.0", "systemjs": "0.19.27", - "zone.js": "0.7.6" + "zone.js": "0.8.4" }, "devDependencies": { "@types/hammerjs": "^2.0.34", diff --git a/ng2-components/ng2-activiti-form/package.json b/ng2-components/ng2-activiti-form/package.json index f2391890cc..6238621ad6 100644 --- a/ng2-components/ng2-activiti-form/package.json +++ b/ng2-components/ng2-activiti-form/package.json @@ -36,15 +36,16 @@ "activiti" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", @@ -55,7 +56,7 @@ "reflect-metadata": "0.1.10", "rxjs": "5.1.0", "systemjs": "0.19.27", - "zone.js": "0.7.6" + "zone.js": "0.8.4" }, "devDependencies": { "@types/hammerjs": "^2.0.34", diff --git a/ng2-components/ng2-activiti-form/src/components/activiti-content.component.spec.ts b/ng2-components/ng2-activiti-form/src/components/activiti-content.component.spec.ts index eacf17f8ef..d21a744747 100644 --- a/ng2-components/ng2-activiti-form/src/components/activiti-content.component.spec.ts +++ b/ng2-components/ng2-activiti-form/src/components/activiti-content.component.spec.ts @@ -137,7 +137,7 @@ describe('ActivitiContent', () => { }); let contentId = 1; - let change = new SimpleChange(null, contentId); + let change = new SimpleChange(null, contentId, true); component.ngOnChanges({ 'id': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -180,7 +180,7 @@ describe('ActivitiContent', () => { }); let contentId = 1; - let change = new SimpleChange(null, contentId); + let change = new SimpleChange(null, contentId, true); component.ngOnChanges({'id': change}); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -208,7 +208,7 @@ describe('ActivitiContent', () => { it('should show unsupported preview with unsupported file', (done) => { let contentId = 1; - let change = new SimpleChange(null, contentId); + let change = new SimpleChange(null, contentId, true); component.ngOnChanges({'id': change}); component.contentLoaded.subscribe((res) => { diff --git a/ng2-components/ng2-activiti-form/src/components/activiti-form.component.spec.ts b/ng2-components/ng2-activiti-form/src/components/activiti-form.component.spec.ts index 7108d15d30..31f008e29f 100644 --- a/ng2-components/ng2-activiti-form/src/components/activiti-form.component.spec.ts +++ b/ng2-components/ng2-activiti-form/src/components/activiti-form.component.spec.ts @@ -258,7 +258,7 @@ describe('ActivitiForm', () => { spyOn(formComponent, 'getFormByTaskId').and.stub(); const taskId = ''; - let change = new SimpleChange(null, taskId); + let change = new SimpleChange(null, taskId, true); formComponent.ngOnChanges({'taskId': change}); expect(formComponent.getFormByTaskId).toHaveBeenCalledWith(taskId); @@ -268,7 +268,7 @@ describe('ActivitiForm', () => { spyOn(formComponent, 'getFormDefinitionByFormId').and.stub(); const formId = '123'; - let change = new SimpleChange(null, formId); + let change = new SimpleChange(null, formId, true); formComponent.ngOnChanges({'formId': change}); expect(formComponent.getFormDefinitionByFormId).toHaveBeenCalledWith(formId); @@ -278,7 +278,7 @@ describe('ActivitiForm', () => { spyOn(formComponent, 'getFormDefinitionByFormName').and.stub(); const formName = '
'; - let change = new SimpleChange(null, formName); + let change = new SimpleChange(null, formName, true); formComponent.ngOnChanges({'formName': change}); expect(formComponent.getFormDefinitionByFormName).toHaveBeenCalledWith(formName); @@ -304,7 +304,7 @@ describe('ActivitiForm', () => { spyOn(formComponent, 'getFormDefinitionByFormId').and.stub(); spyOn(formComponent, 'getFormDefinitionByFormName').and.stub(); - formComponent.ngOnChanges({'tag': new SimpleChange(null, 'hello world')}); + formComponent.ngOnChanges({'tag': new SimpleChange(null, 'hello world', true)}); expect(formComponent.getFormByTaskId).not.toHaveBeenCalled(); expect(formComponent.getFormDefinitionByFormId).not.toHaveBeenCalled(); diff --git a/ng2-components/ng2-activiti-form/src/components/activiti-start-form.component.spec.ts b/ng2-components/ng2-activiti-form/src/components/activiti-start-form.component.spec.ts index 0b1f6ad44b..7036dcd298 100644 --- a/ng2-components/ng2-activiti-form/src/components/activiti-start-form.component.spec.ts +++ b/ng2-components/ng2-activiti-form/src/components/activiti-start-form.component.spec.ts @@ -77,19 +77,19 @@ describe('ActivitiStartForm', () => { it('should load start form on change if processDefinitionId defined', () => { component.processDefinitionId = exampleId1; - component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2) }); + component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2, true) }); expect(formService.getStartFormDefinition).toHaveBeenCalled(); }); it('should load start form when processDefinitionId changed', () => { component.processDefinitionId = exampleId1; - component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2) }); + component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2, true) }); expect(formService.getStartFormDefinition).toHaveBeenCalled(); }); it('should not load start form when changes notified but no change to processDefinitionId', () => { component.processDefinitionId = exampleId1; - component.ngOnChanges({ otherProp: new SimpleChange(exampleId1, exampleId2) }); + component.ngOnChanges({ otherProp: new SimpleChange(exampleId1, exampleId2, true) }); expect(formService.getStartFormDefinition).not.toHaveBeenCalled(); }); @@ -110,7 +110,7 @@ describe('ActivitiStartForm', () => { })); component.processDefinitionId = exampleId1; component.ngOnInit(); - component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2) }); + component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2, true) }); fixture.detectChanges(); expect(component.outcomesContainer).toBeTruthy(); }); @@ -126,7 +126,7 @@ describe('ActivitiStartForm', () => { })); component.processDefinitionId = exampleId1; component.showOutcomeButtons = true; - component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2) }); + component.ngOnChanges({ processDefinitionId: new SimpleChange(exampleId1, exampleId2, true) }); fixture.detectChanges(); expect(component.outcomesContainer).toBeTruthy(); }); diff --git a/ng2-components/ng2-activiti-processlist/package.json b/ng2-components/ng2-activiti-processlist/package.json index 0c2ebcb793..ffe4c2cc59 100644 --- a/ng2-components/ng2-activiti-processlist/package.json +++ b/ng2-components/ng2-activiti-processlist/package.json @@ -35,15 +35,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-filters.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-filters.component.spec.ts index 6b58843749..8a63ebb574 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/activiti-filters.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-filters.component.spec.ts @@ -53,7 +53,7 @@ describe('ActivitiFilters', () => { it('should return the filter task list', (done) => { spyOn(activitiService, 'getProcessFilters').and.returnValue(Observable.fromPromise(fakeGlobalFilterPromise)); const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); filterList.onSuccess.subscribe((res) => { @@ -77,7 +77,7 @@ describe('ActivitiFilters', () => { spyOn(activitiService, 'getDeployedApplications').and.returnValue(Observable.fromPromise(fakeDeployedApplicationsPromise)); spyOn(activitiService, 'getProcessFilters').and.returnValue(Observable.fromPromise(fakeGlobalFilterPromise)); - let change = new SimpleChange(null, 'test'); + let change = new SimpleChange(null, 'test', true); filterList.ngOnChanges({ 'appName': change }); filterList.onSuccess.subscribe((res) => { @@ -94,7 +94,7 @@ describe('ActivitiFilters', () => { spyOn(activitiService, 'getProcessFilters').and.returnValue(Observable.fromPromise(fakeErrorFilterPromise)); const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); filterList.onError.subscribe((err) => { @@ -109,7 +109,7 @@ describe('ActivitiFilters', () => { spyOn(activitiService, 'getDeployedApplications').and.returnValue(Observable.fromPromise(fakeErrorFilterPromise)); const appId = 'fake-app'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appName': change }); filterList.onError.subscribe((err) => { @@ -137,7 +137,7 @@ describe('ActivitiFilters', () => { spyOn(filterList, 'getFiltersByAppId').and.stub(); const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); expect(filterList.getFiltersByAppId).toHaveBeenCalledWith(appId); @@ -147,7 +147,7 @@ describe('ActivitiFilters', () => { spyOn(filterList, 'getFiltersByAppId').and.stub(); const appId = null; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); expect(filterList.getFiltersByAppId).toHaveBeenCalledWith(appId); @@ -157,7 +157,7 @@ describe('ActivitiFilters', () => { spyOn(filterList, 'getFiltersByAppName').and.stub(); const appName = 'fake-app-name'; - let change = new SimpleChange(null, appName); + let change = new SimpleChange(null, appName, true); filterList.ngOnChanges({ 'appName': change }); expect(filterList.getFiltersByAppName).toHaveBeenCalledWith(appName); diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-comments.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-comments.component.spec.ts index c1bd2a1b35..e046f149ae 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-comments.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-comments.component.spec.ts @@ -75,7 +75,7 @@ describe('ActivitiProcessInstanceComments', () => { }); it('should load comments when processInstanceId specified', () => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'processInstanceId': change }); expect(getCommentsSpy).toHaveBeenCalled(); }); @@ -83,7 +83,7 @@ describe('ActivitiProcessInstanceComments', () => { it('should emit an error when an error occurs loading comments', () => { let emitSpy = spyOn(component.error, 'emit'); getCommentsSpy.and.returnValue(Observable.throw({})); - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'processInstanceId': change }); expect(emitSpy).toHaveBeenCalled(); }); @@ -94,7 +94,7 @@ describe('ActivitiProcessInstanceComments', () => { }); it('should display comments when the process has comments', async(() => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'processInstanceId': change }); fixture.whenStable().then(() => { @@ -115,8 +115,8 @@ describe('ActivitiProcessInstanceComments', () => { describe('change detection', () => { - let change = new SimpleChange('123', '456'); - let nullChange = new SimpleChange('123', null); + let change = new SimpleChange('123', '456', true); + let nullChange = new SimpleChange('123', null, true); beforeEach(async(() => { component.processInstanceId = '123'; diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-details.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-details.component.spec.ts index f7e3016d46..095a029ac8 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-details.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-details.component.spec.ts @@ -85,7 +85,7 @@ describe('ActivitiProcessInstanceDetails', () => { it('should display a header when the processInstanceId is provided', async(() => { fixture.detectChanges(); - component.ngOnChanges({ 'processInstanceId': new SimpleChange(null, '123') }); + component.ngOnChanges({ 'processInstanceId': new SimpleChange(null, '123', true) }); fixture.whenStable().then(() => { fixture.detectChanges(); let headerEl: DebugElement = fixture.debugElement.query(By.css('h2')); @@ -97,7 +97,7 @@ describe('ActivitiProcessInstanceDetails', () => { it('should display default details when the process instance has no name', async(() => { getProcessSpy = getProcessSpy.and.returnValue(Observable.of(exampleProcessNoName)); fixture.detectChanges(); - component.ngOnChanges({ 'processInstanceId': new SimpleChange(null, '123') }); + component.ngOnChanges({ 'processInstanceId': new SimpleChange(null, '123', true) }); fixture.whenStable().then(() => { fixture.detectChanges(); let headerEl: DebugElement = fixture.debugElement.query(By.css('h2')); @@ -108,8 +108,8 @@ describe('ActivitiProcessInstanceDetails', () => { describe('change detection', () => { - let change = new SimpleChange('123', '456'); - let nullChange = new SimpleChange('123', null); + let change = new SimpleChange('123', '456', true); + let nullChange = new SimpleChange('123', null, true); beforeEach(async(() => { component.processInstanceId = '123'; diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-tasks.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-tasks.component.spec.ts index 8b1109340d..6616612d67 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-tasks.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-tasks.component.spec.ts @@ -104,7 +104,7 @@ describe('ActivitiProcessInstanceTasks', () => { }); it('should display active tasks', () => { - let change = new SimpleChange(null, exampleProcessInstance); + let change = new SimpleChange(null, exampleProcessInstance, true); fixture.detectChanges(); component.ngOnChanges({ 'processInstanceDetails': change }); fixture.whenStable().then(() => { @@ -117,7 +117,7 @@ describe('ActivitiProcessInstanceTasks', () => { }); it('should display completed tasks', () => { - let change = new SimpleChange(null, exampleProcessInstance); + let change = new SimpleChange(null, exampleProcessInstance, true); fixture.detectChanges(); component.ngOnChanges({ 'processInstanceDetails': change }); fixture.whenStable().then(() => { diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-variables.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-variables.component.spec.ts index f41d16a74d..9f1d6a6471 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-variables.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-process-instance-variables.component.spec.ts @@ -145,8 +145,8 @@ describe('ActivitiProcessInstanceVariables', () => { describe('change detection', () => { - let change = new SimpleChange('123', '456'); - let nullChange = new SimpleChange('123', null); + let change = new SimpleChange('123', '456', true); + let nullChange = new SimpleChange('123', null, true); beforeEach(async(() => { component.processInstanceId = '123'; diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-processlist.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-processlist.component.spec.ts index 5510b66320..5876a6c41b 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/activiti-processlist.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-processlist.component.spec.ts @@ -295,7 +295,7 @@ describe('ActivitiProcessInstanceListComponent', () => { it('should reload the list when the appId parameter changes', (done) => { const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -311,7 +311,7 @@ describe('ActivitiProcessInstanceListComponent', () => { it('should reload the list when the processDefinitionKey parameter changes', (done) => { const processDefinitionKey = 'fakeprocess'; - let change = new SimpleChange(null, processDefinitionKey); + let change = new SimpleChange(null, processDefinitionKey, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -327,7 +327,7 @@ describe('ActivitiProcessInstanceListComponent', () => { it('should reload the list when the state parameter changes', (done) => { const state = 'open'; - let change = new SimpleChange(null, state); + let change = new SimpleChange(null, state, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -343,7 +343,7 @@ describe('ActivitiProcessInstanceListComponent', () => { it('should reload the list when the sort parameter changes', (done) => { const sort = 'created-desc'; - let change = new SimpleChange(null, sort); + let change = new SimpleChange(null, sort, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -359,7 +359,7 @@ describe('ActivitiProcessInstanceListComponent', () => { it('should sort the list when the sort parameter changes', (done) => { const sort = 'created-asc'; - let change = new SimpleChange(null, sort); + let change = new SimpleChange(null, sort, true); let sortSpy = spyOn(component.data, 'setSorting'); component.onSuccess.subscribe((res) => { @@ -374,7 +374,7 @@ describe('ActivitiProcessInstanceListComponent', () => { it('should reload the process list when the name parameter changes', (done) => { const name = 'FakeTaskName'; - let change = new SimpleChange(null, name); + let change = new SimpleChange(null, name, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); diff --git a/ng2-components/ng2-activiti-processlist/src/components/activiti-start-process.component.spec.ts b/ng2-components/ng2-activiti-processlist/src/components/activiti-start-process.component.spec.ts index c9a8558bc5..a91546cca7 100644 --- a/ng2-components/ng2-activiti-processlist/src/components/activiti-start-process.component.spec.ts +++ b/ng2-components/ng2-activiti-processlist/src/components/activiti-start-process.component.spec.ts @@ -78,7 +78,7 @@ describe('ActivitiStartProcessInstance', () => { describe('process definitions list', () => { it('should call service to fetch process definitions', () => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); fixture.detectChanges(); @@ -86,7 +86,7 @@ describe('ActivitiStartProcessInstance', () => { }); it('should call service to fetch process definitions with appId when provided', () => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); fixture.detectChanges(); @@ -94,7 +94,7 @@ describe('ActivitiStartProcessInstance', () => { }); it('should display the correct number of processes in the select list', () => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); fixture.detectChanges(); @@ -103,7 +103,7 @@ describe('ActivitiStartProcessInstance', () => { }); it('should display the correct process def details', async(() => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); fixture.detectChanges(); @@ -116,7 +116,7 @@ describe('ActivitiStartProcessInstance', () => { it('should indicate an error to the user if process defs cannot be loaded', async(() => { getDefinitionsSpy = getDefinitionsSpy.and.returnValue(Observable.throw({})); - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); fixture.detectChanges(); @@ -129,7 +129,7 @@ describe('ActivitiStartProcessInstance', () => { it('should show no process available message when no process definition is loaded', async(() => { getDefinitionsSpy = getDefinitionsSpy.and.returnValue(Observable.of([])); - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); fixture.detectChanges(); @@ -144,8 +144,8 @@ describe('ActivitiStartProcessInstance', () => { describe('input changes', () => { - let change = new SimpleChange('123', '456'); - let nullChange = new SimpleChange('123', null); + let change = new SimpleChange('123', '456', true); + let nullChange = new SimpleChange('123', null, true); beforeEach(async(() => { component.appId = '123'; @@ -177,7 +177,7 @@ describe('ActivitiStartProcessInstance', () => { beforeEach(() => { component.name = 'My new process'; - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); }); @@ -247,7 +247,7 @@ describe('ActivitiStartProcessInstance', () => { beforeEach(async(() => { component.name = 'My new process'; - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); fixture.detectChanges(); component.onProcessDefChange('my:process1'); @@ -279,7 +279,7 @@ describe('ActivitiStartProcessInstance', () => { beforeEach(() => { getDefinitionsSpy.and.returnValue(Observable.of(fakeProcessDefWithForm)); - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'appId': change }); component.onProcessDefChange('my:process1'); fixture.detectChanges(); diff --git a/ng2-components/ng2-activiti-tasklist/package.json b/ng2-components/ng2-activiti-tasklist/package.json index e84b13e3ab..f723e8f4db 100644 --- a/ng2-components/ng2-activiti-tasklist/package.json +++ b/ng2-components/ng2-activiti-tasklist/package.json @@ -40,15 +40,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.spec.ts index a1b4d5f9d6..619b22b092 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-checklist.component.spec.ts @@ -180,7 +180,7 @@ describe('ActivitiChecklist', () => { checklistComponent.taskId = 'new-fake-task-id'; checklistComponent.checklist.push(fakeTaskDetail); fixture.detectChanges(); - let change = new SimpleChange(null, 'new-fake-task-id'); + let change = new SimpleChange(null, 'new-fake-task-id', true); checklistComponent.ngOnChanges({ taskId: change }); @@ -201,7 +201,7 @@ describe('ActivitiChecklist', () => { checklistComponent.checklist.push(fakeTaskDetail); fixture.detectChanges(); checklistComponent.taskId = null; - let change = new SimpleChange(null, 'new-fake-task-id'); + let change = new SimpleChange(null, 'new-fake-task-id', true); checklistComponent.ngOnChanges({ taskId: change }); diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.spec.ts index 18fe3371a2..bbbc8cd908 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-comments.component.spec.ts @@ -74,7 +74,7 @@ describe('ActivitiComments', () => { }); it('should load comments when taskId specified', () => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'taskId': change }); expect(getCommentsSpy).toHaveBeenCalled(); @@ -84,7 +84,7 @@ describe('ActivitiComments', () => { let emitSpy = spyOn(component.error, 'emit'); getCommentsSpy.and.returnValue(Observable.throw({})); - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'taskId': change }); expect(emitSpy).toHaveBeenCalled(); @@ -96,7 +96,7 @@ describe('ActivitiComments', () => { }); it('should display comments when the task has comments', async(() => { - let change = new SimpleChange(null, '123'); + let change = new SimpleChange(null, '123', true); component.ngOnChanges({ 'taskId': change }); fixture.whenStable().then(() => { @@ -117,8 +117,8 @@ describe('ActivitiComments', () => { describe('change detection', () => { - let change = new SimpleChange('123', '456'); - let nullChange = new SimpleChange('123', null); + let change = new SimpleChange('123', '456', true); + let nullChange = new SimpleChange('123', null, true); beforeEach(async(() => { component.taskId = '123'; diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-filters.component.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-filters.component.spec.ts index b7cc0f7c4a..34090ae886 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-filters.component.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-filters.component.spec.ts @@ -64,7 +64,7 @@ describe('ActivitiFilters', () => { it('should return the filter task list', (done) => { spyOn(activitiService, 'getTaskListFilters').and.returnValue(Observable.fromPromise(fakeGlobalFilterPromise)); const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); filterList.onSuccess.subscribe((res) => { @@ -88,7 +88,7 @@ describe('ActivitiFilters', () => { spyOn(activitiService, 'getDeployedApplications').and.returnValue(Observable.fromPromise(fakeDeployedApplicationsPromise)); spyOn(activitiService, 'getTaskListFilters').and.returnValue(Observable.fromPromise(fakeGlobalFilterPromise)); - let change = new SimpleChange(null, 'test'); + let change = new SimpleChange(null, 'test', true); filterList.ngOnChanges({ 'appName': change }); filterList.onSuccess.subscribe((res) => { @@ -105,7 +105,7 @@ describe('ActivitiFilters', () => { spyOn(activitiService, 'getTaskListFilters').and.returnValue(Observable.fromPromise(fakeErrorFilterPromise)); const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); filterList.onError.subscribe((err) => { @@ -120,7 +120,7 @@ describe('ActivitiFilters', () => { spyOn(activitiService, 'getDeployedApplications').and.returnValue(Observable.fromPromise(fakeErrorFilterPromise)); const appId = 'fake-app'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appName': change }); filterList.onError.subscribe((err) => { @@ -148,7 +148,7 @@ describe('ActivitiFilters', () => { spyOn(filterList, 'getFiltersByAppId').and.stub(); const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); expect(filterList.getFiltersByAppId).toHaveBeenCalledWith(appId); @@ -158,7 +158,7 @@ describe('ActivitiFilters', () => { spyOn(filterList, 'getFiltersByAppId').and.stub(); const appId = null; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); filterList.ngOnChanges({ 'appId': change }); expect(filterList.getFiltersByAppId).toHaveBeenCalledWith(appId); @@ -168,7 +168,7 @@ describe('ActivitiFilters', () => { spyOn(filterList, 'getFiltersByAppName').and.stub(); const appName = 'fake-app-name'; - let change = new SimpleChange(null, appName); + let change = new SimpleChange(null, appName, true); filterList.ngOnChanges({ 'appName': change }); expect(filterList.getFiltersByAppName).toHaveBeenCalledWith(appName); @@ -187,7 +187,7 @@ describe('ActivitiFilters', () => { it('should load Default list when no appid or taskid are provided', () => { spyOn(filterList, 'getFiltersByAppId').and.stub(); - let change = new SimpleChange(null, null); + let change = new SimpleChange(null, null, true); filterList.ngOnChanges({ 'appName': change }); expect(filterList.getFiltersByAppId).toHaveBeenCalled(); diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.spec.ts index 3b039cd52a..0f1f85d8b0 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.spec.ts @@ -120,8 +120,8 @@ describe('ActivitiTaskDetails', () => { describe('change detection', () => { - let change = new SimpleChange('123', '456'); - let nullChange = new SimpleChange('123', null); + let change = new SimpleChange('123', '456', true); + let nullChange = new SimpleChange('123', null, true); beforeEach(async(() => { component.taskId = '123'; diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-tasklist.component.spec.ts b/ng2-components/ng2-activiti-tasklist/src/components/activiti-tasklist.component.spec.ts index f708eeb65c..f8e9227407 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-tasklist.component.spec.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-tasklist.component.spec.ts @@ -145,9 +145,9 @@ describe('ActivitiTaskList', () => { spyOn(taskListService, 'getTotalTasks').and.returnValue(Observable.of(fakeGlobalTotalTasks)); spyOn(taskListService, 'getTasks').and.returnValue(Observable.of(fakeGlobalTask)); - let state = new SimpleChange(null, 'open'); - let processDefinitionKey = new SimpleChange(null, null); - let assignment = new SimpleChange(null, 'fake-assignee'); + let state = new SimpleChange(null, 'open', true); + let processDefinitionKey = new SimpleChange(null, null, true); + let assignment = new SimpleChange(null, 'fake-assignee', true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -186,9 +186,9 @@ describe('ActivitiTaskList', () => { spyOn(taskListService, 'getTotalTasks').and.returnValue(Observable.of(fakeGlobalTotalTasks)); spyOn(taskListService, 'getTasks').and.returnValue(Observable.of(fakeGlobalTask)); - let state = new SimpleChange(null, 'open'); - let processDefinitionKey = new SimpleChange(null, 'fakeprocess'); - let assignment = new SimpleChange(null, 'fake-assignee'); + let state = new SimpleChange(null, 'open', true); + let processDefinitionKey = new SimpleChange(null, 'fakeprocess', true); + let assignment = new SimpleChange(null, 'fake-assignee', true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -212,8 +212,8 @@ describe('ActivitiTaskList', () => { it('should throw an exception when the response is wrong', (done) => { spyOn(taskListService, 'getTotalTasks').and.returnValue(Observable.throw(fakeErrorTaskList)); - let state = new SimpleChange(null, 'open'); - let assignment = new SimpleChange(null, 'fake-assignee'); + let state = new SimpleChange(null, 'open', true); + let assignment = new SimpleChange(null, 'fake-assignee', true); component.onError.subscribe((err) => { expect(err).toBeDefined(); @@ -328,7 +328,7 @@ describe('ActivitiTaskList', () => { it('should reload the list when the appId parameter changes', (done) => { const appId = '1'; - let change = new SimpleChange(null, appId); + let change = new SimpleChange(null, appId, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -344,7 +344,7 @@ describe('ActivitiTaskList', () => { it('should reload the list when the processDefinitionKey parameter changes', (done) => { const processDefinitionKey = 'fakeprocess'; - let change = new SimpleChange(null, processDefinitionKey); + let change = new SimpleChange(null, processDefinitionKey, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -360,7 +360,7 @@ describe('ActivitiTaskList', () => { it('should reload the list when the state parameter changes', (done) => { const state = 'open'; - let change = new SimpleChange(null, state); + let change = new SimpleChange(null, state, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -376,7 +376,7 @@ describe('ActivitiTaskList', () => { it('should reload the list when the sort parameter changes', (done) => { const sort = 'desc'; - let change = new SimpleChange(null, sort); + let change = new SimpleChange(null, sort, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -392,7 +392,7 @@ describe('ActivitiTaskList', () => { it('should reload the process list when the name parameter changes', (done) => { const name = 'FakeTaskName'; - let change = new SimpleChange(null, name); + let change = new SimpleChange(null, name, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); @@ -408,7 +408,7 @@ describe('ActivitiTaskList', () => { it('should reload the list when the assignment parameter changes', (done) => { const assignment = 'assignee'; - let change = new SimpleChange(null, assignment); + let change = new SimpleChange(null, assignment, true); component.onSuccess.subscribe((res) => { expect(res).toBeDefined(); diff --git a/ng2-components/ng2-alfresco-core/index.ts b/ng2-components/ng2-alfresco-core/index.ts index c0d423dedd..7390836d3b 100644 --- a/ng2-components/ng2-alfresco-core/index.ts +++ b/ng2-components/ng2-alfresco-core/index.ts @@ -16,6 +16,7 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HttpModule, Http } from '@angular/http'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -86,6 +87,7 @@ export function createTranslateLoader(http: Http, logService: LogService) { FormsModule, ReactiveFormsModule, HttpModule, + BrowserAnimationsModule, MaterialModule.forRoot(), TranslateModule.forRoot({ provide: TranslateLoader, @@ -105,6 +107,7 @@ export function createTranslateLoader(http: Http, logService: LogService) { ...ALFRESCO_CORE_PROVIDERS ], exports: [ + BrowserAnimationsModule, CommonModule, FormsModule, MaterialModule, diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index 660ed4d635..390c092c63 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -44,17 +44,18 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/compiler-cli": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/animations": "~4.0.0", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/compiler-cli": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", - "@angular/upgrade": "2.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "dialog-polyfill": "0.4.7", diff --git a/ng2-components/ng2-alfresco-core/src/services/alfresco-translate-loader.spec.ts b/ng2-components/ng2-alfresco-core/src/services/alfresco-translate-loader.spec.ts index 893970a224..9c5908bccf 100644 --- a/ng2-components/ng2-alfresco-core/src/services/alfresco-translate-loader.spec.ts +++ b/ng2-components/ng2-alfresco-core/src/services/alfresco-translate-loader.spec.ts @@ -33,7 +33,7 @@ const mockBackendResponse = (connection: MockConnection, response: string) => { describe('TranslateLoader', () => { let injector: Injector; - let backend: MockBackend; + let backend: any; let alfrescoTranslationService: AlfrescoTranslationService; let connection: MockConnection; // this will be set when a new connection is emitted from the backend. let customLoader; diff --git a/ng2-components/ng2-alfresco-core/src/services/alfresco-translation.service.spec.ts b/ng2-components/ng2-alfresco-core/src/services/alfresco-translation.service.spec.ts index 3217849255..859ee2e950 100644 --- a/ng2-components/ng2-alfresco-core/src/services/alfresco-translation.service.spec.ts +++ b/ng2-components/ng2-alfresco-core/src/services/alfresco-translation.service.spec.ts @@ -31,7 +31,7 @@ const mockBackendResponse = (connection: MockConnection, response: string) => { describe('AlfrescoTranslationService', () => { let injector: Injector; - let backend: MockBackend; + let backend: any; let alfrescoTranslationService: AlfrescoTranslationService; let connection: MockConnection; // this will be set when a new connection is emitted from the backend. diff --git a/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts b/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts index cad3b093a9..98eb8178e6 100644 --- a/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts +++ b/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts @@ -15,6 +15,7 @@ * limitations under the License. */ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { Component } from '@angular/core'; import { NotificationService } from './notification.service'; import { MdSnackBarModule } from '@angular/material'; @@ -24,7 +25,10 @@ describe('NotificationService', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - imports: [MdSnackBarModule.forRoot()], + imports: [ + BrowserAnimationsModule, + MdSnackBarModule.forRoot() + ], declarations: [ComponentThatProvidesNotificationService], providers: [ NotificationService diff --git a/ng2-components/ng2-alfresco-datatable/package.json b/ng2-components/ng2-alfresco-datatable/package.json index e23f93d849..90f17f4484 100644 --- a/ng2-components/ng2-alfresco-datatable/package.json +++ b/ng2-components/ng2-alfresco-datatable/package.json @@ -36,15 +36,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.spec.ts b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.spec.ts index ed5ef52bb7..39265bf5f7 100644 --- a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.spec.ts +++ b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.spec.ts @@ -103,7 +103,7 @@ describe('DataTable', () => { let data = new ObjectDataTableAdapter([], []); expect(table.data).toBeUndefined(); - table.ngOnChanges({'data': new SimpleChange('123', data)}); + table.ngOnChanges({'data': new SimpleChange('123', data, true)}); expect(table.data).toEqual(data); }); diff --git a/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.spec.ts b/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.spec.ts index e69a226dcd..b774c76b99 100644 --- a/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.spec.ts +++ b/ng2-components/ng2-alfresco-datatable/src/components/pagination/pagination.component.spec.ts @@ -101,7 +101,7 @@ describe('PaginationComponent', () => { it('should update the summary on input pagination parameter change', () => { spyOn(paginationComponent, 'updateSummary'); - paginationComponent.ngOnChanges({pagination: new SimpleChange(null, new PaginationData(0, 0, 0, 20, true))}); + paginationComponent.ngOnChanges({pagination: new SimpleChange(null, new PaginationData(0, 0, 0, 20, true), true)}); expect(paginationComponent.updateSummary).toHaveBeenCalled(); }); diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index 67f040d9fb..e4152094da 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -44,15 +44,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts index aa8c89ddaa..1506e14dc5 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.spec.ts @@ -460,7 +460,7 @@ describe('DocumentList', () => { }); documentList.currentFolderId = 'wrong-id'; - documentList.ngOnChanges({currentFolderId: new SimpleChange(null, documentList.currentFolderId)}); + documentList.ngOnChanges({currentFolderId: new SimpleChange(null, documentList.currentFolderId, true)}); }); it('should require dataTable to check empty template', () => { @@ -526,7 +526,7 @@ describe('DocumentList', () => { it('should load folder by ID on init', () => { documentList.currentFolderId = '1d26e465-dea3-42f3-b415-faa8364b9692'; spyOn(documentList, 'loadFolderNodesByFolderNodeId').and.returnValue(Promise.resolve()); - documentList.ngOnChanges({folderNode: new SimpleChange(null, documentList.currentFolderId)}); + documentList.ngOnChanges({folderNode: new SimpleChange(null, documentList.currentFolderId, true)}); expect(documentList.loadFolderNodesByFolderNodeId).toHaveBeenCalled(); }); }); diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-menu-action.component.spec.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-menu-action.component.spec.ts index af4575649a..f2ced05574 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-menu-action.component.spec.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-menu-action.component.spec.ts @@ -176,7 +176,7 @@ describe('Document menu action', () => { describe('Check Permissions', () => { it('should get the folder permission when folderId is changed', async(() => { - let change = new SimpleChange('folder-id', 'new-folder-id'); + let change = new SimpleChange('folder-id', 'new-folder-id', true); component.ngOnChanges({ 'folderId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -196,7 +196,7 @@ describe('Document menu action', () => { })); it('should disable the create button if folder does not have any allowable operations', async(() => { - let change = new SimpleChange('folder-id', 'new-folder-id'); + let change = new SimpleChange('folder-id', 'new-folder-id', true); component.ngOnChanges({ 'folderId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -214,7 +214,7 @@ describe('Document menu action', () => { })); it('should disable the create button if folder does not have create permission', async(() => { - let change = new SimpleChange('folder-id', 'new-folder-id'); + let change = new SimpleChange('folder-id', 'new-folder-id', true); component.ngOnChanges({ 'folderId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -233,7 +233,7 @@ describe('Document menu action', () => { it('should not disable the option when disableWithNoPermission is false', async(() => { component.disableWithNoPermission = false; - let change = new SimpleChange('folder-id', 'new-folder-id'); + let change = new SimpleChange('folder-id', 'new-folder-id', true); component.ngOnChanges({ 'folderId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ @@ -251,7 +251,7 @@ describe('Document menu action', () => { })); it('should emit permission event error when user does not have create permission', async(() => { - let change = new SimpleChange('folder-id', 'new-folder-id'); + let change = new SimpleChange('folder-id', 'new-folder-id', true); component.ngOnChanges({ 'folderId': change }); jasmine.Ajax.requests.mostRecent().respondWith({ diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index 315c91b373..bd57a3d986 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -48,15 +48,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "hammerjs": "2.0.8", "ng2-alfresco-core": "1.4.0", diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index f04b79b90f..65c7856605 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -44,15 +44,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts index f1cbc0845a..28674bccb5 100644 --- a/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts +++ b/ng2-components/ng2-alfresco-search/src/components/alfresco-search.component.spec.ts @@ -255,7 +255,7 @@ describe('AlfrescoSearchComponent', () => { done(); }); - component.ngOnChanges({searchTerm: new SimpleChange('', 'searchTerm2')}); + component.ngOnChanges({searchTerm: new SimpleChange('', 'searchTerm2', true)}); }); }); diff --git a/ng2-components/ng2-alfresco-social/package.json b/ng2-components/ng2-alfresco-social/package.json index 4e1107e646..7a480c3150 100644 --- a/ng2-components/ng2-alfresco-social/package.json +++ b/ng2-components/ng2-alfresco-social/package.json @@ -23,15 +23,16 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@angular/common": "2.2.2", - "@angular/compiler": "2.2.2", - "@angular/core": "2.2.2", - "@angular/forms": "2.2.2", - "@angular/http": "2.2.2", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.2.2", - "@angular/platform-browser-dynamic": "2.2.2", - "@angular/router": "3.2.2", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-tag/package.json b/ng2-components/ng2-alfresco-tag/package.json index 0627f12ab9..11767674e8 100644 --- a/ng2-components/ng2-alfresco-tag/package.json +++ b/ng2-components/ng2-alfresco-tag/package.json @@ -23,15 +23,16 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-upload/package.json b/ng2-components/ng2-alfresco-upload/package.json index 54e5acd17d..02172f7440 100644 --- a/ng2-components/ng2-alfresco-upload/package.json +++ b/ng2-components/ng2-alfresco-upload/package.json @@ -45,15 +45,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.spec.ts b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.spec.ts index 717eab5a3a..4d8dd1fa00 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.spec.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.spec.ts @@ -175,7 +175,7 @@ describe('UploadButtonComponent', () => { spyOn(uploadService, 'getFolderNode').and.returnValue(Observable.of(fakeFolderNodeWithPermission)); - component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId) }); + component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) }); component.onFilesAdded(fakeEvent); let compiled = fixture.debugElement.nativeElement; fixture.detectChanges(); @@ -189,7 +189,7 @@ describe('UploadButtonComponent', () => { spyOn(uploadService, 'getFolderNode').and.returnValue(Observable.of(fakeFolderNodeWithPermission)); - component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId) }); + component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) }); component.onFilesAdded(fakeEvent); let compiled = fixture.debugElement.nativeElement; fixture.detectChanges(); @@ -204,7 +204,7 @@ describe('UploadButtonComponent', () => { spyOn(uploadService, 'getFolderNode').and.returnValue(Observable.of(fakeFolderNodeWithPermission)); - component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId) }); + component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) }); uploadService.uploadFilesInTheQueue = jasmine.createSpy('uploadFilesInTheQueue'); fixture.detectChanges(); @@ -219,7 +219,7 @@ describe('UploadButtonComponent', () => { component.onSuccess = null; spyOn(uploadService, 'getFolderNode').and.returnValue(Observable.of(fakeFolderNodeWithPermission)); - component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId) }); + component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) }); uploadService.uploadFilesInTheQueue = jasmine.createSpy('uploadFilesInTheQueue'); @@ -236,7 +236,7 @@ describe('UploadButtonComponent', () => { spyOn(uploadService, 'getFolderNode').and.returnValue(Observable.of(fakeFolderNodeWithPermission)); spyOn(uploadService, 'callApiCreateFolder').and.returnValue(fakeResolvePromise); - component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId) }); + component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) }); fixture.detectChanges(); component.onSuccess.subscribe(e => { expect(e.value).toEqual('File uploaded'); @@ -257,7 +257,7 @@ describe('UploadButtonComponent', () => { spyOn(uploadService, 'getFolderNode').and.returnValue(Observable.of(fakeFolderNodeWithPermission)); spyOn(uploadService, 'callApiCreateFolder').and.returnValue(fakeRejectPromise); - component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId) }); + component.ngOnChanges({ rootFolderId: new SimpleChange(null, component.rootFolderId, true) }); component.onError.subscribe(e => { expect(e.value).toEqual('FILE_UPLOAD.MESSAGES.FOLDER_ALREADY_EXIST'); diff --git a/ng2-components/ng2-alfresco-userinfo/package.json b/ng2-components/ng2-alfresco-userinfo/package.json index 1c60eac71b..b1e499cd0c 100644 --- a/ng2-components/ng2-alfresco-userinfo/package.json +++ b/ng2-components/ng2-alfresco-userinfo/package.json @@ -23,15 +23,16 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-viewer/package.json b/ng2-components/ng2-alfresco-viewer/package.json index 0be29b82a6..7c65f2ef8a 100644 --- a/ng2-components/ng2-alfresco-viewer/package.json +++ b/ng2-components/ng2-alfresco-viewer/package.json @@ -38,15 +38,16 @@ "alfresco" ], "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-viewer/src/components/imgViewer.component.spec.ts b/ng2-components/ng2-alfresco-viewer/src/components/imgViewer.component.spec.ts index 3458199c2f..a01c5e6c22 100644 --- a/ng2-components/ng2-alfresco-viewer/src/components/imgViewer.component.spec.ts +++ b/ng2-components/ng2-alfresco-viewer/src/components/imgViewer.component.spec.ts @@ -64,7 +64,7 @@ describe('Test ng2-alfresco-viewer Img viewer component ', () => { }); it('If no url or blob are passed should thrown an error', () => { - let change = new SimpleChange(null, null); + let change = new SimpleChange(null, null, true); expect(() => { component.ngOnChanges({ 'blobFile': change }); }).toThrow(new Error('Attribute urlFile or blobFile is required')); @@ -87,7 +87,7 @@ describe('Test ng2-alfresco-viewer Img viewer component ', () => { let blob = createFakeBlob(); spyOn(service, 'createTrustedUrl').and.returnValue('fake-blob-url'); - let change = new SimpleChange(null, blob); + let change = new SimpleChange(null, blob, true); expect(() => { component.ngOnChanges({ 'blobFile': change }); }).not.toThrow(new Error('Attribute urlFile or blobFile is required')); diff --git a/ng2-components/ng2-alfresco-viewer/src/components/mediaPlayer.component.spec.ts b/ng2-components/ng2-alfresco-viewer/src/components/mediaPlayer.component.spec.ts index 097721afbb..a263a443d3 100644 --- a/ng2-components/ng2-alfresco-viewer/src/components/mediaPlayer.component.spec.ts +++ b/ng2-components/ng2-alfresco-viewer/src/components/mediaPlayer.component.spec.ts @@ -65,7 +65,7 @@ describe('Test ng2-alfresco-viewer Media player component ', () => { }); it('If no url or no blob are passed should thrown an error', () => { - let change = new SimpleChange(null, null); + let change = new SimpleChange(null, null, true); expect(() => { component.ngOnChanges({ 'blobFile': change }); }).toThrow(new Error('Attribute urlFile or blobFile is required')); @@ -89,7 +89,7 @@ describe('Test ng2-alfresco-viewer Media player component ', () => { let blob = createFakeBlob(); spyOn(service, 'createTrustedUrl').and.returnValue('fake-blob-url'); - let change = new SimpleChange(null, blob); + let change = new SimpleChange(null, blob, true); expect(() => { component.ngOnChanges({ 'blobFile': change }); }).not.toThrow(new Error('Attribute urlFile or blobFile is required')); diff --git a/ng2-components/ng2-alfresco-viewer/src/directives/extension-viewer.directive.spec.ts b/ng2-components/ng2-alfresco-viewer/src/directives/extension-viewer.directive.spec.ts index 16435e3e6d..1db1f375c7 100644 --- a/ng2-components/ng2-alfresco-viewer/src/directives/extension-viewer.directive.spec.ts +++ b/ng2-components/ng2-alfresco-viewer/src/directives/extension-viewer.directive.spec.ts @@ -23,7 +23,9 @@ import { getTestBed, TestBed, async } from '@angular/core/testing'; import { Injector } from '@angular/core'; export class MockElementRef extends ElementRef { - + constructor() { + super(null); + } } describe('ExtensionViewerComponent', () => { diff --git a/ng2-components/ng2-alfresco-webscript/package.json b/ng2-components/ng2-alfresco-webscript/package.json index 151de41440..a64b4dacac 100644 --- a/ng2-components/ng2-alfresco-webscript/package.json +++ b/ng2-components/ng2-alfresco-webscript/package.json @@ -23,15 +23,16 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/package.json b/ng2-components/package.json index 3cc78df23e..45359eaf9c 100644 --- a/ng2-components/package.json +++ b/ng2-components/package.json @@ -54,17 +54,17 @@ "6": "bpm" }, "dependencies": { - "@angular/common": "2.2.2", - "@angular/compiler": "2.2.2", - "@angular/compiler-cli": "2.4.7", - "@angular/core": "2.2.2", - "@angular/forms": "2.2.2", - "@angular/http": "2.2.2", + "@angular/animations": "~4.0.0", + "@angular/common": "~4.0.0", + "@angular/compiler": "~4.0.0", + "@angular/core": "~4.0.0", + "@angular/forms": "~4.0.0", + "@angular/http": "~4.0.0", + "@angular/platform-browser": "~4.0.0", + "@angular/platform-browser-dynamic": "~4.0.0", + "@angular/router": "~4.0.0", + "@angular/compiler-cli": "~4.0.0", "@angular/material": "2.0.0-beta.1", - "@angular/platform-browser": "2.2.2", - "@angular/platform-browser-dynamic": "2.2.2", - "@angular/router": "3.2.2", - "@angular/upgrade": "2.4.7", "alfresco-js-api": "~1.4.0", "core-js": "2.4.1", "dialog-polyfill": "0.4.7",