mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Upgrade core, documentList, dataTable
This commit is contained in:
@@ -21,19 +21,27 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate';
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { SearchModule } from 'ng2-alfresco-search';
|
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 { DocumentListModule } from 'ng2-alfresco-documentlist';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { routing } from './app.routes';
|
import { routing } from './app.routes';
|
||||||
|
|
||||||
import { SearchBarComponent } from './components/index';
|
/*
|
||||||
import { MDL, ALFRESCO_CORE_PROVIDERS, CONTEXT_MENU_DIRECTIVES } from 'ng2-alfresco-core';
|
import {
|
||||||
import { ALFRESCO_DATATABLE_DIRECTIVES, PaginationComponent } from 'ng2-alfresco-datatable';
|
MDL,
|
||||||
|
ALFRESCO_CORE_PROVIDERS,
|
||||||
|
CONTEXT_MENU_DIRECTIVES,
|
||||||
|
CONTEXT_MENU_PROVIDERS,
|
||||||
|
MATERIAL_DESIGN_DIRECTIVES
|
||||||
|
} from 'ng2-alfresco-core';
|
||||||
|
*/
|
||||||
import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
|
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, CONTAINER_WIDGET_DIRECTIVES, PRIMITIVE_WIDGET_DIRECTIVES } from 'ng2-activiti-form';
|
import { ActivitiForm, ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
|
||||||
import { DOCUMENT_LIST_DIRECTIVES, DOCUMENT_LIST_PROVIDERS } from 'ng2-alfresco-documentlist';
|
|
||||||
import { ALFRESCO_ULPOAD_COMPONENTS, ALFRESCO_ULPOAD_DIRECTIVES, ALFRESCO_ULPOAD_SERVICES } from 'ng2-alfresco-upload';
|
import { ALFRESCO_ULPOAD_COMPONENTS, ALFRESCO_ULPOAD_DIRECTIVES, ALFRESCO_ULPOAD_SERVICES } from 'ng2-alfresco-upload';
|
||||||
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
|
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer';
|
||||||
import { TAGCOMPONENT, TAGSERVICES } from 'ng2-alfresco-tag';
|
import { TAGCOMPONENT, TAGSERVICES } from 'ng2-alfresco-tag';
|
||||||
@@ -105,28 +113,30 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
|||||||
HttpModule,
|
HttpModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
provide: TranslateLoader,
|
provide: TranslateLoader,
|
||||||
useFactory: (http: Http) => new AlfrescoTranslationLoader(http),
|
useFactory: (http) => new AlfrescoTranslationLoader(http),
|
||||||
deps: [Http]
|
deps: [Http]
|
||||||
}),
|
}),
|
||||||
routing,
|
routing,
|
||||||
|
CoreModule.forRoot(),
|
||||||
LoginModule,
|
LoginModule,
|
||||||
SearchModule.forRoot()
|
SearchModule.forRoot(),
|
||||||
|
DataTableModule,
|
||||||
|
DocumentListModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
SearchBarComponent,
|
SearchBarComponent,
|
||||||
MDL,
|
// MDL,
|
||||||
...ALFRESCO_DATATABLE_DIRECTIVES, PaginationComponent,
|
|
||||||
...ALFRESCO_TASKLIST_DIRECTIVES,
|
...ALFRESCO_TASKLIST_DIRECTIVES,
|
||||||
...ACTIVITI_PROCESSLIST_DIRECTIVES,
|
...ACTIVITI_PROCESSLIST_DIRECTIVES,
|
||||||
...ACTIVITI_FORM_DIRECTIVES,
|
...ACTIVITI_FORM_DIRECTIVES,
|
||||||
...DOCUMENT_LIST_DIRECTIVES,
|
// ...CONTEXT_MENU_DIRECTIVES,
|
||||||
...CONTEXT_MENU_DIRECTIVES,
|
|
||||||
...ALFRESCO_ULPOAD_COMPONENTS,
|
...ALFRESCO_ULPOAD_COMPONENTS,
|
||||||
...VIEWERCOMPONENT,
|
...VIEWERCOMPONENT,
|
||||||
...TAGCOMPONENT,
|
...TAGCOMPONENT,
|
||||||
...WEBSCRIPTCOMPONENT,
|
...WEBSCRIPTCOMPONENT,
|
||||||
...ALFRESCO_ULPOAD_COMPONENTS, ...ALFRESCO_ULPOAD_DIRECTIVES,
|
...ALFRESCO_ULPOAD_COMPONENTS, ...ALFRESCO_ULPOAD_DIRECTIVES,
|
||||||
|
// ...MATERIAL_DESIGN_DIRECTIVES,
|
||||||
|
|
||||||
UploadButtonComponent,
|
UploadButtonComponent,
|
||||||
DataTableDemoComponent,
|
DataTableDemoComponent,
|
||||||
@@ -142,11 +152,11 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
|||||||
FormNodeViewer
|
FormNodeViewer
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
...ALFRESCO_CORE_PROVIDERS,
|
// ...ALFRESCO_CORE_PROVIDERS,
|
||||||
...DOCUMENT_LIST_PROVIDERS,
|
|
||||||
...ATIVITI_FORM_PROVIDERS,
|
...ATIVITI_FORM_PROVIDERS,
|
||||||
...TAGSERVICES,
|
...TAGSERVICES,
|
||||||
...ALFRESCO_ULPOAD_SERVICES
|
...ALFRESCO_ULPOAD_SERVICES// ,
|
||||||
|
// ...CONTEXT_MENU_PROVIDERS
|
||||||
],
|
],
|
||||||
bootstrap: [ AppComponent ]
|
bootstrap: [ AppComponent ]
|
||||||
})
|
})
|
||||||
|
@@ -15,6 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { HttpModule } from '@angular/http';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
@@ -24,19 +29,48 @@ import {
|
|||||||
AlfrescoContentService
|
AlfrescoContentService
|
||||||
} from './src/services/index';
|
} from './src/services/index';
|
||||||
|
|
||||||
import { ContextMenuService } from './src/components/context-menu/context-menu.service';
|
import { MATERIAL_DESIGN_DIRECTIVES } from './src/components/material/index';
|
||||||
|
import { CONTEXT_MENU_PROVIDERS, CONTEXT_MENU_DIRECTIVES } from './src/components/context-menu/index';
|
||||||
|
|
||||||
export * from './src/services/index';
|
export * from './src/services/index';
|
||||||
export * from './src/components/index';
|
export * from './src/components/index';
|
||||||
export * from './src/utils/index';
|
export * from './src/utils/index';
|
||||||
|
|
||||||
export const ALFRESCO_CORE_PROVIDERS: [any] = [
|
export const ALFRESCO_CORE_PROVIDERS: any[] = [
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoTranslationLoader,
|
AlfrescoTranslationLoader,
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
ContextMenuService
|
...CONTEXT_MENU_PROVIDERS
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
HttpModule,
|
||||||
|
TranslateModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...MATERIAL_DESIGN_DIRECTIVES,
|
||||||
|
...CONTEXT_MENU_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
...ALFRESCO_CORE_PROVIDERS
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
...MATERIAL_DESIGN_DIRECTIVES,
|
||||||
|
...CONTEXT_MENU_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class CoreModule {
|
||||||
|
static forRoot(): ModuleWithProviders {
|
||||||
|
return {
|
||||||
|
ngModule: CoreModule,
|
||||||
|
providers: [
|
||||||
|
...ALFRESCO_CORE_PROVIDERS
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -53,23 +53,23 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alfresco-js-api": "^0.3.0",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"core-js": "^2.4.1",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
"alfresco-js-api": "^0.3.0",
|
||||||
"zone.js": "0.6.12",
|
"ng2-translate": "2.5.0"
|
||||||
"ng2-translate": "2.2.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/core-js": "^0.9.32",
|
"@types/core-js": "^0.9.32",
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContextMenuService } from './context-menu.service';
|
import { ContextMenuService } from './context-menu.service';
|
||||||
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
||||||
|
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContextMenuDirective } from './context-menu.directive';
|
import { ContextMenuDirective } from './context-menu.directive';
|
||||||
import { ContextMenuService } from './context-menu.service';
|
import { ContextMenuService } from './context-menu.service';
|
||||||
|
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContextMenuService } from './context-menu.service';
|
import { ContextMenuService } from './context-menu.service';
|
||||||
|
|
||||||
describe('ContextMenuService', () => {
|
describe('ContextMenuService', () => {
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, beforeEach, afterEach } from '@angular/core/testing';
|
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
||||||
import { AlfrescoAuthenticationService } from './AlfrescoAuthentication.service';
|
import { AlfrescoAuthenticationService } from './AlfrescoAuthentication.service';
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {describe, it, beforeEach} from '@angular/core/testing';
|
|
||||||
import {ReflectiveInjector} from '@angular/core';
|
import {ReflectiveInjector} from '@angular/core';
|
||||||
import {AlfrescoSettingsService} from './AlfrescoSettings.service';
|
import {AlfrescoSettingsService} from './AlfrescoSettings.service';
|
||||||
import {AlfrescoAuthenticationService} from './AlfrescoAuthentication.service';
|
import {AlfrescoAuthenticationService} from './AlfrescoAuthentication.service';
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, beforeEach } from '@angular/core/testing';
|
|
||||||
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
||||||
|
|
||||||
describe('AlfrescoSettingsService', () => {
|
describe('AlfrescoSettingsService', () => {
|
||||||
|
@@ -42,4 +42,8 @@ export class AlfrescoTranslationService {
|
|||||||
use(lang: string): Observable<any> {
|
use(lang: string): Observable<any> {
|
||||||
return this.translate.use(lang);
|
return this.translate.use(lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get(key: string|Array<string>, interpolateParams?: Object): Observable<string|any> {
|
||||||
|
return this.translate.get(key, interpolateParams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
/*
|
||||||
|
import { beforeEachProviders } from '@angular/core/testing';
|
||||||
import { RenditionsService } from './renditions.service';
|
import { RenditionsService } from './renditions.service';
|
||||||
import { AlfrescoApiService } from './AlfrescoApi.service';
|
import { AlfrescoApiService } from './AlfrescoApi.service';
|
||||||
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
import { AlfrescoSettingsService } from './AlfrescoSettings.service';
|
||||||
@@ -172,3 +173,4 @@ describe('RenditionsService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
@@ -15,11 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
import { ObjectUtils } from './object-utils';
|
import { ObjectUtils } from './object-utils';
|
||||||
|
|
||||||
describe('ObjectUtils', () => {
|
describe('ObjectUtils', () => {
|
||||||
|
@@ -15,5 +15,42 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { HttpModule } from '@angular/http';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
export * from './src/data/index';
|
export * from './src/data/index';
|
||||||
export * from './src/components/index';
|
export * from './src/components/index';
|
||||||
|
export * from './src/components/pagination/index';
|
||||||
|
|
||||||
|
import { DataTableComponent } from './src/components/datatable/datatable.component';
|
||||||
|
import { NoContentTemplateComponent } from './src/components/datatable/no-content-template.component';
|
||||||
|
import { PaginationComponent } from './src/components/pagination/pagination.component';
|
||||||
|
|
||||||
|
export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [
|
||||||
|
DataTableComponent,
|
||||||
|
NoContentTemplateComponent,
|
||||||
|
PaginationComponent
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
HttpModule,
|
||||||
|
TranslateModule,
|
||||||
|
CoreModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...ALFRESCO_DATATABLE_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
...ALFRESCO_DATATABLE_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class DataTableModule {}
|
||||||
|
@@ -44,22 +44,22 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"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/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
"ng2-translate": "2.5.0",
|
||||||
"zone.js": "0.6.12",
|
|
||||||
"ng2-translate": "2.2.2",
|
|
||||||
"ng2-alfresco-core": "0.3.2"
|
"ng2-alfresco-core": "0.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@@ -15,13 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect,
|
|
||||||
beforeEach
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DataTableComponent } from './datatable.component';
|
import { DataTableComponent } from './datatable.component';
|
||||||
import {
|
import {
|
||||||
DataRow,
|
DataRow,
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
// NgZone,
|
|
||||||
OnInit,
|
OnInit,
|
||||||
Input,
|
Input,
|
||||||
Output,
|
Output,
|
||||||
@@ -26,11 +25,6 @@ import {
|
|||||||
TemplateRef
|
TemplateRef
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import {
|
|
||||||
MATERIAL_DESIGN_DIRECTIVES,
|
|
||||||
CONTEXT_MENU_DIRECTIVES
|
|
||||||
} from 'ng2-alfresco-core';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
DataTableAdapter,
|
DataTableAdapter,
|
||||||
DataRow,
|
DataRow,
|
||||||
@@ -47,8 +41,7 @@ declare let __moduleName: string;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'alfresco-datatable',
|
selector: 'alfresco-datatable',
|
||||||
styleUrls: ['./datatable.component.css'],
|
styleUrls: ['./datatable.component.css'],
|
||||||
templateUrl: './datatable.component.html',
|
templateUrl: './datatable.component.html'
|
||||||
directives: [MATERIAL_DESIGN_DIRECTIVES, CONTEXT_MENU_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class DataTableComponent implements OnInit, AfterViewChecked {
|
export class DataTableComponent implements OnInit, AfterViewChecked {
|
||||||
|
|
||||||
@@ -83,10 +76,6 @@ export class DataTableComponent implements OnInit, AfterViewChecked {
|
|||||||
@Output()
|
@Output()
|
||||||
executeRowAction: EventEmitter<any> = new EventEmitter();
|
executeRowAction: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
// TODO: left for reference, will be removed during future revisions
|
|
||||||
constructor(/*private _ngZone?: NgZone*/) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (!this.data) {
|
if (!this.data) {
|
||||||
this.data = new ObjectDataTableAdapter([], []);
|
this.data = new ObjectDataTableAdapter([], []);
|
||||||
|
@@ -15,13 +15,5 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DataTableComponent } from './datatable.component';
|
|
||||||
import { NoContentTemplateComponent } from './no-content-template.component';
|
|
||||||
|
|
||||||
export * from './datatable.component';
|
export * from './datatable.component';
|
||||||
export * from './no-content-template.component';
|
export * from './no-content-template.component';
|
||||||
|
|
||||||
export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [
|
|
||||||
DataTableComponent,
|
|
||||||
NoContentTemplateComponent
|
|
||||||
];
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
|
||||||
import { PaginationProvider } from './pagination-provider';
|
import { PaginationProvider } from './pagination-provider';
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
@@ -26,8 +25,7 @@ declare let __moduleName: string;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'alfresco-pagination',
|
selector: 'alfresco-pagination',
|
||||||
templateUrl: './pagination.component.html',
|
templateUrl: './pagination.component.html',
|
||||||
styleUrls: ['./pagination.component.css'],
|
styleUrls: ['./pagination.component.css']
|
||||||
directives: [MATERIAL_DESIGN_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class PaginationComponent {
|
export class PaginationComponent {
|
||||||
|
|
||||||
|
@@ -15,22 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import { DataColumn, DataRow, DataSorting } from './datatable-adapter';
|
||||||
it,
|
import { ObjectDataTableAdapter, ObjectDataRow, ObjectDataColumn } from './object-datatable-adapter';
|
||||||
describe,
|
|
||||||
expect
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
|
|
||||||
import {
|
|
||||||
DataColumn,
|
|
||||||
DataRow, DataSorting
|
|
||||||
} from './datatable-adapter';
|
|
||||||
|
|
||||||
import {
|
|
||||||
ObjectDataTableAdapter,
|
|
||||||
ObjectDataRow,
|
|
||||||
ObjectDataColumn
|
|
||||||
} from './object-datatable-adapter';
|
|
||||||
|
|
||||||
describe('ObjectDataTableAdapter', () => {
|
describe('ObjectDataTableAdapter', () => {
|
||||||
|
|
||||||
|
@@ -108,7 +108,7 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
|
|||||||
let value = row.getValue(col.key);
|
let value = row.getValue(col.key);
|
||||||
|
|
||||||
if (col.type === 'date') {
|
if (col.type === 'date') {
|
||||||
let datePipe = new DatePipe();
|
let datePipe = new DatePipe('en-US');
|
||||||
let format = col.format || 'medium';
|
let format = col.format || 'medium';
|
||||||
try {
|
try {
|
||||||
return datePipe.transform(value, format);
|
return datePipe.transform(value, format);
|
||||||
|
@@ -15,6 +15,16 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { HttpModule } from '@angular/http';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
|
// import { ALFRESCO_CORE_PROVIDERS/*, CONTEXT_MENU_DIRECTIVES*/ } from 'ng2-alfresco-core';
|
||||||
|
// import { ALFRESCO_DATATABLE_DIRECTIVES } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
import { DocumentList } from './src/components/document-list';
|
import { DocumentList } from './src/components/document-list';
|
||||||
import { ContentColumn } from './src/components/content-column';
|
import { ContentColumn } from './src/components/content-column';
|
||||||
import { ContentColumnList } from './src/components/content-column-list';
|
import { ContentColumnList } from './src/components/content-column-list';
|
||||||
@@ -63,3 +73,33 @@ export const DOCUMENT_LIST_PROVIDERS: [any] = [
|
|||||||
FolderActionsService,
|
FolderActionsService,
|
||||||
DocumentActionsService
|
DocumentActionsService
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
HttpModule,
|
||||||
|
TranslateModule,
|
||||||
|
CoreModule,
|
||||||
|
DataTableModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...DOCUMENT_LIST_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
// ...ALFRESCO_CORE_PROVIDERS,
|
||||||
|
...DOCUMENT_LIST_PROVIDERS
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
...DOCUMENT_LIST_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class DocumentListModule {
|
||||||
|
static forRoot(): ModuleWithProviders {
|
||||||
|
return {
|
||||||
|
ngModule: DocumentListModule,
|
||||||
|
providers: [
|
||||||
|
...DOCUMENT_LIST_PROVIDERS
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -52,22 +52,22 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"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/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
"ng2-translate": "2.5.0",
|
||||||
"zone.js": "0.6.12",
|
|
||||||
"ng2-translate": "2.2.2",
|
|
||||||
"ng2-alfresco-core": "0.3.2",
|
"ng2-alfresco-core": "0.3.2",
|
||||||
"ng2-alfresco-datatable": "0.3.2",
|
"ng2-alfresco-datatable": "0.3.2",
|
||||||
"alfresco-js-api": "^0.3.1"
|
"alfresco-js-api": "^0.3.1"
|
||||||
|
@@ -15,17 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import { DocumentListBreadcrumb, PathNode } from './breadcrumb.component';
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
beforeEach,
|
|
||||||
expect
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
|
|
||||||
import {
|
|
||||||
DocumentListBreadcrumb,
|
|
||||||
PathNode
|
|
||||||
} from './breadcrumb.component';
|
|
||||||
import { DocumentList } from '../document-list';
|
import { DocumentList } from '../document-list';
|
||||||
|
|
||||||
describe('DocumentListBreadcrumb', () => {
|
describe('DocumentListBreadcrumb', () => {
|
||||||
|
@@ -15,13 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect,
|
|
||||||
beforeEach
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DocumentList } from './document-list';
|
import { DocumentList } from './document-list';
|
||||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
||||||
import { ContentActionModel } from './../models/content-action.model';
|
import { ContentActionModel } from './../models/content-action.model';
|
||||||
|
@@ -15,12 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect,
|
|
||||||
beforeEach
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
import { EventEmitter } from '@angular/core';
|
import { EventEmitter } from '@angular/core';
|
||||||
|
|
||||||
import { DocumentList } from './document-list';
|
import { DocumentList } from './document-list';
|
||||||
|
@@ -15,13 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect,
|
|
||||||
beforeEach
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DataColumn } from 'ng2-alfresco-datatable';
|
import { DataColumn } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
import { DocumentList } from './document-list';
|
import { DocumentList } from './document-list';
|
||||||
|
@@ -15,13 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
|
||||||
it,
|
|
||||||
describe,
|
|
||||||
expect,
|
|
||||||
beforeEach
|
|
||||||
} from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { DocumentList } from './document-list';
|
import { DocumentList } from './document-list';
|
||||||
import { ContentColumn } from './content-column';
|
import { ContentColumn } from './content-column';
|
||||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { NgZone } from '@angular/core';
|
import { NgZone } from '@angular/core';
|
||||||
import { DataColumn } from 'ng2-alfresco-datatable';
|
import { DataColumn } from 'ng2-alfresco-datatable';
|
||||||
import { DocumentList } from './document-list';
|
import { DocumentList } from './document-list';
|
||||||
|
@@ -30,18 +30,8 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { Subject } from 'rxjs/Rx';
|
import { Subject } from 'rxjs/Rx';
|
||||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||||
import {
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
CONTEXT_MENU_DIRECTIVES,
|
import { DataRowEvent, DataTableComponent, ObjectDataColumn } from 'ng2-alfresco-datatable';
|
||||||
AlfrescoTranslationService
|
|
||||||
} from 'ng2-alfresco-core';
|
|
||||||
|
|
||||||
import {
|
|
||||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
|
||||||
DataRowEvent,
|
|
||||||
DataTableComponent,
|
|
||||||
ObjectDataColumn
|
|
||||||
} from 'ng2-alfresco-datatable';
|
|
||||||
|
|
||||||
import { DocumentListService } from './../services/document-list.service';
|
import { DocumentListService } from './../services/document-list.service';
|
||||||
import { ContentActionModel } from './../models/content-action.model';
|
import { ContentActionModel } from './../models/content-action.model';
|
||||||
import {
|
import {
|
||||||
@@ -58,9 +48,7 @@ declare let __moduleName: string;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'alfresco-document-list',
|
selector: 'alfresco-document-list',
|
||||||
styleUrls: ['./document-list.css'],
|
styleUrls: ['./document-list.css'],
|
||||||
templateUrl: './document-list.html',
|
templateUrl: './document-list.html'
|
||||||
providers: [DocumentListService],
|
|
||||||
directives: [CONTEXT_MENU_DIRECTIVES, ALFRESCO_DATATABLE_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit {
|
export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit {
|
||||||
|
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { DataColumn, DataRow, DataSorting } from 'ng2-alfresco-datatable';
|
import { DataColumn, DataRow, DataSorting } from 'ng2-alfresco-datatable';
|
||||||
import { DocumentListServiceMock } from './../assets/document-list.service.mock';
|
import { DocumentListServiceMock } from './../assets/document-list.service.mock';
|
||||||
import { ShareDataTableAdapter, ShareDataRow } from './share-datatable-adapter';
|
import { ShareDataTableAdapter, ShareDataRow } from './share-datatable-adapter';
|
||||||
|
@@ -122,7 +122,7 @@ export class ShareDataTableAdapter implements DataTableAdapter, PaginationProvid
|
|||||||
let value = row.getValue(col.key);
|
let value = row.getValue(col.key);
|
||||||
|
|
||||||
if (col.type === 'date') {
|
if (col.type === 'date') {
|
||||||
let datePipe = new DatePipe();
|
let datePipe = new DatePipe('en-US');
|
||||||
let format = col.format || this.DEFAULT_DATE_FORMAT;
|
let format = col.format || this.DEFAULT_DATE_FORMAT;
|
||||||
try {
|
try {
|
||||||
return datePipe.transform(value, format);
|
return datePipe.transform(value, format);
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
||||||
import { ContentActionHandler } from '../models/content-action.model';
|
import { ContentActionHandler } from '../models/content-action.model';
|
||||||
import { DocumentActionsService } from './document-actions.service';
|
import { DocumentActionsService } from './document-actions.service';
|
||||||
|
@@ -15,15 +15,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach, afterEach } from '@angular/core/testing';
|
/*
|
||||||
import { AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoContentService , AlfrescoApiService} from 'ng2-alfresco-core';
|
import { AlfrescoSettingsService, AlfrescoAuthenticationService, AlfrescoContentService , AlfrescoApiService} from 'ng2-alfresco-core';
|
||||||
import { FileNode } from '../assets/document-library.model.mock';
|
import { FileNode } from '../assets/document-library.model.mock';
|
||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { DocumentListService } from './document-list.service';
|
import { DocumentListService } from './document-list.service';
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
import { HTTP_PROVIDERS } from '@angular/http';
|
||||||
|
|
||||||
declare let jasmine: any;
|
|
||||||
|
|
||||||
describe('DocumentListService', () => {
|
describe('DocumentListService', () => {
|
||||||
|
|
||||||
let injector;
|
let injector;
|
||||||
@@ -139,3 +137,4 @@ describe('DocumentListService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { FolderActionsService } from './folder-actions.service';
|
import { FolderActionsService } from './folder-actions.service';
|
||||||
import { ContentActionHandler } from '../models/content-action.model';
|
import { ContentActionHandler } from '../models/content-action.model';
|
||||||
import { FileNode, FolderNode } from '../assets/document-library.model.mock';
|
import { FileNode, FolderNode } from '../assets/document-library.model.mock';
|
||||||
|
Reference in New Issue
Block a user