mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Upgrade core, documentList, dataTable
This commit is contained in:
@@ -15,13 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
it,
|
||||
describe,
|
||||
expect,
|
||||
beforeEach
|
||||
} from '@angular/core/testing';
|
||||
|
||||
import { DataTableComponent } from './datatable.component';
|
||||
import {
|
||||
DataRow,
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import {
|
||||
Component,
|
||||
// NgZone,
|
||||
OnInit,
|
||||
Input,
|
||||
Output,
|
||||
@@ -26,11 +25,6 @@ import {
|
||||
TemplateRef
|
||||
} from '@angular/core';
|
||||
|
||||
import {
|
||||
MATERIAL_DESIGN_DIRECTIVES,
|
||||
CONTEXT_MENU_DIRECTIVES
|
||||
} from 'ng2-alfresco-core';
|
||||
|
||||
import {
|
||||
DataTableAdapter,
|
||||
DataRow,
|
||||
@@ -47,8 +41,7 @@ declare let __moduleName: string;
|
||||
moduleId: __moduleName,
|
||||
selector: 'alfresco-datatable',
|
||||
styleUrls: ['./datatable.component.css'],
|
||||
templateUrl: './datatable.component.html',
|
||||
directives: [MATERIAL_DESIGN_DIRECTIVES, CONTEXT_MENU_DIRECTIVES]
|
||||
templateUrl: './datatable.component.html'
|
||||
})
|
||||
export class DataTableComponent implements OnInit, AfterViewChecked {
|
||||
|
||||
@@ -83,10 +76,6 @@ export class DataTableComponent implements OnInit, AfterViewChecked {
|
||||
@Output()
|
||||
executeRowAction: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
// TODO: left for reference, will be removed during future revisions
|
||||
constructor(/*private _ngZone?: NgZone*/) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (!this.data) {
|
||||
this.data = new ObjectDataTableAdapter([], []);
|
||||
|
@@ -15,13 +15,5 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DataTableComponent } from './datatable.component';
|
||||
import { NoContentTemplateComponent } from './no-content-template.component';
|
||||
|
||||
export * from './datatable.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 { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
||||
import { PaginationProvider } from './pagination-provider';
|
||||
|
||||
declare let __moduleName: string;
|
||||
@@ -26,8 +25,7 @@ declare let __moduleName: string;
|
||||
moduleId: __moduleName,
|
||||
selector: 'alfresco-pagination',
|
||||
templateUrl: './pagination.component.html',
|
||||
styleUrls: ['./pagination.component.css'],
|
||||
directives: [MATERIAL_DESIGN_DIRECTIVES]
|
||||
styleUrls: ['./pagination.component.css']
|
||||
})
|
||||
export class PaginationComponent {
|
||||
|
||||
|
@@ -15,22 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
it,
|
||||
describe,
|
||||
expect
|
||||
} from '@angular/core/testing';
|
||||
|
||||
import {
|
||||
DataColumn,
|
||||
DataRow, DataSorting
|
||||
} from './datatable-adapter';
|
||||
|
||||
import {
|
||||
ObjectDataTableAdapter,
|
||||
ObjectDataRow,
|
||||
ObjectDataColumn
|
||||
} from './object-datatable-adapter';
|
||||
import { DataColumn, DataRow, DataSorting } from './datatable-adapter';
|
||||
import { ObjectDataTableAdapter, ObjectDataRow, ObjectDataColumn } from './object-datatable-adapter';
|
||||
|
||||
describe('ObjectDataTableAdapter', () => {
|
||||
|
||||
|
@@ -108,7 +108,7 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
let value = row.getValue(col.key);
|
||||
|
||||
if (col.type === 'date') {
|
||||
let datePipe = new DatePipe();
|
||||
let datePipe = new DatePipe('en-US');
|
||||
let format = col.format || 'medium';
|
||||
try {
|
||||
return datePipe.transform(value, format);
|
||||
|
Reference in New Issue
Block a user