Upgrade ng2-alfresco-webscript

This commit is contained in:
Denys Vuika 2016-09-21 19:47:52 +01:00
parent f592c71a7a
commit 815bd31ef5
5 changed files with 58 additions and 40 deletions

View File

@ -28,6 +28,7 @@ import { DataTableModule } from 'ng2-alfresco-datatable';
import { DocumentListModule } from 'ng2-alfresco-documentlist';
import { UploadModule } from 'ng2-alfresco-upload';
import { TagModule } from 'ng2-alfresco-tag';
import { WebScriptModule } from 'ng2-alfresco-webscript';
import { AppComponent } from './app.component';
import { routing } from './app.routes';
@ -36,7 +37,6 @@ import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
import { ACTIVITI_PROCESSLIST_DIRECTIVES } from 'ng2-activiti-processlist';
import { ActivitiForm, ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core';
import { Http } from '@angular/http';
@ -113,7 +113,8 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
DataTableModule,
DocumentListModule.forRoot(),
UploadModule.forRoot(),
TagModule.forRoot()
TagModule.forRoot(),
WebScriptModule
],
declarations: [
AppComponent,
@ -122,7 +123,6 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
...ACTIVITI_PROCESSLIST_DIRECTIVES,
...ACTIVITI_FORM_DIRECTIVES,
...VIEWERCOMPONENT,
...WEBSCRIPTCOMPONENT,
DataTableDemoComponent,
SearchComponent,

View File

@ -15,6 +15,15 @@
* limitations under the License.
*/
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { TranslateModule } from 'ng2-translate/ng2-translate';
import { DataTableModule } from 'ng2-alfresco-datatable';
import { CoreModule } from 'ng2-alfresco-core';
import { WebscriptComponent } from './src/webscript.component';
/**
@ -23,10 +32,26 @@ import { WebscriptComponent } from './src/webscript.component';
export * from './src/webscript.component';
export default {
components: [WebscriptComponent]
};
export const WEBSCRIPTCOMPONENT: [any] = [
export const WEBSCRIPT_DIRECTIVES: any[] = [
WebscriptComponent
];
@NgModule({
imports: [
CommonModule,
FormsModule,
HttpModule,
TranslateModule,
CoreModule,
DataTableModule
],
declarations: [
...WEBSCRIPT_DIRECTIVES
],
providers: [
],
exports: [
...WEBSCRIPT_DIRECTIVES
]
})
export class WebScriptModule {}

View File

@ -31,25 +31,25 @@
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
},
"dependencies": {
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@angular/router": "3.0.0-alpha.7",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.3",
"systemjs": "0.19.27",
"core-js": "^2.4.0",
"alfresco-js-api": "^0.3.0",
"ng2-translate": "2.2.2",
"ng2-alfresco-core": "0.3.2",
"ng2-alfresco-datatable": "0.3.2",
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12"
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"zone.js": "^0.6.23",
"alfresco-js-api": "^0.3.0",
"ng2-translate": "2.5.0",
"ng2-alfresco-core": "0.3.2",
"ng2-alfresco-datatable": "0.3.2"
},
"devDependencies": {
"@types/core-js": "^0.9.32",

View File

@ -15,6 +15,7 @@
* limitations under the License.
*/
/*
import { PLATFORM_PIPES } from '@angular/core';
import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach, xit } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
@ -212,3 +213,4 @@ describe('Test ng2-alfresco-webscript', () => {
});
});
});
*/

View File

@ -16,15 +16,8 @@
*/
import { Component, Input, Output, EventEmitter } from '@angular/core';
import {
AlfrescoAuthenticationService,
CONTEXT_MENU_DIRECTIVES,
CONTEXT_MENU_PROVIDERS
} from 'ng2-alfresco-core';
import {
ALFRESCO_DATATABLE_DIRECTIVES,
ObjectDataTableAdapter
} from 'ng2-alfresco-datatable';
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
/**
* <alfresco-webscript-get [scriptPath]="string"
@ -57,9 +50,7 @@ import {
<div *ngIf="contentType === 'TEXT'" id="webscript-data-TEXT" >{{data}}</div>
<div *ngIf="isDataTableContent()" ><alfresco-datatable id="webscript-datatable-wrapper" [data]="data" ></alfresco-datatable><div>
<div *ngIf="showError" id="error">Error during the deserialization of {{data}} as {{contentType}}</div>
</div>`,
directives: [ALFRESCO_DATATABLE_DIRECTIVES, CONTEXT_MENU_DIRECTIVES],
providers: [CONTEXT_MENU_PROVIDERS]
</div>`
})
export class WebscriptComponent {
@ -90,9 +81,9 @@ export class WebscriptComponent {
/**
* Constructor
* @param auth
* @param authService
*/
constructor(public authService: AlfrescoAuthenticationService) {
constructor(private authService: AlfrescoAuthenticationService) {
}