Upgrade ng2-alfresco-tag

This commit is contained in:
Denys Vuika
2016-09-21 18:51:28 +01:00
parent 9e0534ff90
commit f592c71a7a
9 changed files with 72 additions and 50 deletions

View File

@@ -26,7 +26,8 @@ import { SearchModule } from 'ng2-alfresco-search';
import { LoginModule } from 'ng2-alfresco-login'; import { LoginModule } from 'ng2-alfresco-login';
import { DataTableModule } from 'ng2-alfresco-datatable'; import { DataTableModule } from 'ng2-alfresco-datatable';
import { DocumentListModule } from 'ng2-alfresco-documentlist'; import { DocumentListModule } from 'ng2-alfresco-documentlist';
import { UploadModule } from 'ng2-alfresco-upload' import { UploadModule } from 'ng2-alfresco-upload';
import { TagModule } from 'ng2-alfresco-tag';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { routing } from './app.routes'; import { routing } from './app.routes';
@@ -35,7 +36,6 @@ import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
import { ACTIVITI_PROCESSLIST_DIRECTIVES } from 'ng2-activiti-processlist'; import { ACTIVITI_PROCESSLIST_DIRECTIVES } from 'ng2-activiti-processlist';
import { ActivitiForm, ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form'; import { ActivitiForm, ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer'; import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
import { TAGCOMPONENT, TAGSERVICES } from 'ng2-alfresco-tag';
import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript'; import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core'; import { AlfrescoTranslationLoader } from 'ng2-alfresco-core';
@@ -112,7 +112,8 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
SearchModule.forRoot(), SearchModule.forRoot(),
DataTableModule, DataTableModule,
DocumentListModule.forRoot(), DocumentListModule.forRoot(),
UploadModule.forRoot() UploadModule.forRoot(),
TagModule.forRoot()
], ],
declarations: [ declarations: [
AppComponent, AppComponent,
@@ -121,7 +122,6 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
...ACTIVITI_PROCESSLIST_DIRECTIVES, ...ACTIVITI_PROCESSLIST_DIRECTIVES,
...ACTIVITI_FORM_DIRECTIVES, ...ACTIVITI_FORM_DIRECTIVES,
...VIEWERCOMPONENT, ...VIEWERCOMPONENT,
...TAGCOMPONENT,
...WEBSCRIPTCOMPONENT, ...WEBSCRIPTCOMPONENT,
DataTableDemoComponent, DataTableDemoComponent,
@@ -137,8 +137,7 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
FormNodeViewer FormNodeViewer
], ],
providers: [ providers: [
...ATIVITI_FORM_PROVIDERS, ...ATIVITI_FORM_PROVIDERS
...TAGSERVICES
], ],
bootstrap: [ AppComponent ] bootstrap: [ AppComponent ]
}) })

View File

@@ -20,7 +20,7 @@ import { HttpModule } from '@angular/http';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TranslateModule } from 'ng2-translate/ng2-translate'; import { TranslateModule } from 'ng2-translate/ng2-translate';
import { ALFRESCO_CORE_PROVIDERS } from 'ng2-alfresco-core'; import { CoreModule } from 'ng2-alfresco-core';
import { AlfrescoSearchService } from './src/services/alfresco-search.service'; import { AlfrescoSearchService } from './src/services/alfresco-search.service';
import { AlfrescoThumbnailService } from './src/services/alfresco-thumbnail.service'; import { AlfrescoThumbnailService } from './src/services/alfresco-thumbnail.service';
@@ -51,13 +51,13 @@ export const ALFRESCO_SEARCH_PROVIDERS: [any] = [
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
HttpModule, HttpModule,
TranslateModule TranslateModule,
CoreModule
], ],
declarations: [ declarations: [
...ALFRESCO_SEARCH_DIRECTIVES ...ALFRESCO_SEARCH_DIRECTIVES
], ],
providers: [ providers: [
...ALFRESCO_CORE_PROVIDERS,
...ALFRESCO_SEARCH_PROVIDERS ...ALFRESCO_SEARCH_PROVIDERS
], ],
exports: [ exports: [

View File

@@ -15,6 +15,13 @@
* limitations under the License. * limitations under the License.
*/ */
import { NgModule, ModuleWithProviders } 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 { CoreModule } from 'ng2-alfresco-core';
import { TagActionsComponent } from './src/components/tag-actions.component'; import { TagActionsComponent } from './src/components/tag-actions.component';
import { TagList } from './src/components/tag-list.component'; import { TagList } from './src/components/tag-list.component';
import { TagNodeList } from './src/components/tag-node-list.component'; import { TagNodeList } from './src/components/tag-node-list.component';
@@ -25,17 +32,42 @@ export * from './src/components/tag-list.component';
export * from './src/components/tag-node-list.component'; export * from './src/components/tag-node-list.component';
export * from './src/services/tag.service'; export * from './src/services/tag.service';
export default { export const TAG_DIRECTIVES: any[] = [
components: [TagActionsComponent, TagList, TagNodeList]
};
export const TAGCOMPONENT: [any] = [
TagActionsComponent, TagActionsComponent,
TagList, TagList,
TagNodeList TagNodeList
]; ];
export const TAGSERVICES: [any] = [ export const TAG_PROVIDERS: any[] = [
TagService TagService
]; ];
@NgModule({
imports: [
CommonModule,
FormsModule,
HttpModule,
TranslateModule,
CoreModule
],
declarations: [
...TAG_DIRECTIVES
],
providers: [
...TAG_PROVIDERS
],
exports: [
...TAG_DIRECTIVES
]
})
export class TagModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: TagModule,
providers: [
...TAG_DIRECTIVES
]
};
}
}

View File

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

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
/*
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing'; import { TestComponentBuilder } from '@angular/compiler/testing';
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
@@ -141,3 +141,4 @@ describe('Tag actions list', () => {
}); });
}); });
}); });
*/

View File

@@ -16,6 +16,7 @@
*/ */
/*
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing'; import { TestComponentBuilder } from '@angular/compiler/testing';
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
@@ -96,3 +97,4 @@ describe('Tag list All ECM', () => {
}); });
}); });
}); });
*/

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
/*
import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; import { it, describe, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing'; import { TestComponentBuilder } from '@angular/compiler/testing';
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
@@ -122,3 +122,4 @@ describe('Tag relative node list', () => {
}); });
}); });
}); });
*/

View File

@@ -15,6 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
/*
import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing'; import { describe, expect, it, inject, beforeEachProviders, beforeEach, afterEach } from '@angular/core/testing';
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core'; import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
import { TagService } from './tag.service'; import { TagService } from './tag.service';
@@ -113,3 +114,4 @@ describe('Tag service', () => {
}); });
}); });
}); });
*/

View File

@@ -14,21 +14,6 @@
<a href='https://www.npmjs.com/package/ng2-alfresco-webscript'> <a href='https://www.npmjs.com/package/ng2-alfresco-webscript'>
<img src='https://img.shields.io/npm/dt/ng2-alfresco-webscript.svg' alt='npm downloads' /> <img src='https://img.shields.io/npm/dt/ng2-alfresco-webscript.svg' alt='npm downloads' />
</a> </a>
<a href='https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE'>
<img src='https://img.shields.io/hexpm/l/plug.svg' alt='license' />
</a>
<a href='https://www.alfresco.com/'>
<img src='https://img.shields.io/badge/style-component-green.svg?label=alfresco' alt='alfresco component' />
</a>
<a href='https://angular.io/'>
<img src='https://img.shields.io/badge/style-2-red.svg?label=angular' alt='angular 2' />
</a>
<a href='https://www.typescriptlang.org/docs/tutorial.html'>
<img src='https://img.shields.io/badge/style-lang-blue.svg?label=typescript' alt='typescript' />
</a>
<a href='https://www.alfresco.com/'>
<img src='https://img.shields.io/badge/style-%3E5.0.0-blue.svg?label=node%20version' alt='node version' />
</a>
</p> </p>
### Node ### Node
@@ -56,7 +41,7 @@ The following component needs to be added to your systemjs.config:
- ng2-translate - ng2-translate
- ng2-alfresco-core - ng2-alfresco-core
- ng2-alfresco-dataœtable - ng2-alfresco-datatable
Please refer to the following example to have an idea of how your systemjs.config should look like : Please refer to the following example to have an idea of how your systemjs.config should look like :