mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-859] add codelyzer in core and datatable (#2056)
* add codelyzer in core and datatable * add codelyzer in the main build * order imports * fix import in test * fix import test * import reorder form * tasklist and processlist import reorder
This commit is contained in:
@@ -15,13 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { AdfEmptyList } from './adf-empty-list.component';
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { AdfEmptyListComponent } from './adf-empty-list.component';
|
||||
|
||||
describe('AdfEmptyListComponent', () => {
|
||||
let component: AdfEmptyList;
|
||||
let fixture: ComponentFixture<AdfEmptyList>;
|
||||
describe('AdfEmptyListComponentComponent', () => {
|
||||
let component: AdfEmptyListComponent;
|
||||
let fixture: ComponentFixture<AdfEmptyListComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -29,11 +29,11 @@ describe('AdfEmptyListComponent', () => {
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
AdfEmptyList
|
||||
AdfEmptyListComponent
|
||||
]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AdfEmptyList);
|
||||
fixture = TestBed.createComponent(AdfEmptyListComponent);
|
||||
component = fixture.componentInstance;
|
||||
}));
|
||||
|
||||
|
@@ -22,7 +22,7 @@ import { Component, Input } from '@angular/core';
|
||||
styleUrls: ['./adf-empty-list.component.css'],
|
||||
templateUrl: './adf-empty-list.component.html'
|
||||
})
|
||||
export class AdfEmptyList {
|
||||
export class AdfEmptyListComponent {
|
||||
|
||||
@Input()
|
||||
emptyListImageUrl: string = require('../../assets/images/empty_doc_lib.svg');
|
||||
|
@@ -15,15 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { DataTableAdapter, DataColumn, DataRow } from '../../data/datatable-adapter';
|
||||
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
|
||||
import { DataColumn, DataRow, DataTableAdapter } from '../../data/datatable-adapter';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable-cell, alfresco-datatable-cell',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: '<ng-container>{{value}}</ng-container>'
|
||||
})
|
||||
export class DataTableCellComponent {
|
||||
export class DataTableCellComponent implements OnInit {
|
||||
|
||||
@Input()
|
||||
data: DataTableAdapter;
|
||||
|
@@ -40,7 +40,7 @@
|
||||
<!-- Actions (left) -->
|
||||
<td *ngIf="actions && actionsPosition === 'left'" class="alfresco-datatable__actions-cell">
|
||||
<button [id]="'action_menu_' + idx" alfresco-mdl-button class="mdl-button--icon"
|
||||
[attr.data-automation-id]="actions_menu">
|
||||
[attr.data-automation-id]="'action_menu_' + idx">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
<ul alfresco-mdl-menu class="mdl-menu--bottom-left"
|
||||
@@ -103,7 +103,7 @@
|
||||
<!-- Actions (right) -->
|
||||
<td *ngIf="actions && actionsPosition === 'right'" class="alfresco-datatable__actions-cell">
|
||||
<button [id]="'action_menu_' + idx" alfresco-mdl-button class="mdl-button--icon"
|
||||
[attr.data-automation-id]="actions_menu">
|
||||
[attr.data-automation-id]="'action_menu_' + idx">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
<ul alfresco-mdl-menu class="mdl-menu--bottom-right"
|
||||
|
@@ -16,18 +16,18 @@
|
||||
*/
|
||||
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MdCheckboxChange, MdCheckboxModule } from '@angular/material';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { MdCheckboxModule, MdCheckboxChange } from '@angular/material';
|
||||
import { DataTableComponent } from './datatable.component';
|
||||
import { DataTableCellComponent } from './datatable-cell.component';
|
||||
import {
|
||||
DataRow,
|
||||
DataColumn,
|
||||
DataRow,
|
||||
DataSorting,
|
||||
ObjectDataTableAdapter,
|
||||
ObjectDataColumn
|
||||
ObjectDataColumn,
|
||||
ObjectDataTableAdapter
|
||||
} from './../../data/index';
|
||||
import { DataTableCellComponent } from './datatable-cell.component';
|
||||
import { DataTableComponent } from './datatable.component';
|
||||
|
||||
describe('DataTable', () => {
|
||||
|
||||
|
@@ -16,16 +16,16 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
Component, OnChanges, DoCheck, IterableDiffers, SimpleChange, SimpleChanges, Input,
|
||||
Output, EventEmitter, ElementRef, TemplateRef, AfterContentInit, ContentChild, Optional
|
||||
AfterContentInit, AfterViewInit, Component, ContentChild, DoCheck, ElementRef, EventEmitter, Input,
|
||||
IterableDiffers, OnChanges, Optional, Output, SimpleChange, SimpleChanges, TemplateRef
|
||||
} from '@angular/core';
|
||||
import { DataTableAdapter, DataRow, DataColumn, DataSorting, DataRowEvent } from '../../data/datatable-adapter';
|
||||
import { ObjectDataTableAdapter, ObjectDataRow } from '../../data/object-datatable-adapter';
|
||||
import { MdCheckboxChange } from '@angular/material';
|
||||
import { DataColumnListComponent } from 'ng2-alfresco-core';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
import { DataColumn, DataRow, DataRowEvent, DataSorting, DataTableAdapter } from '../../data/datatable-adapter';
|
||||
import { ObjectDataRow, ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
import { DataCellEvent } from './data-cell.event';
|
||||
import { DataRowActionEvent } from './data-row-action.event';
|
||||
import { DataColumnListComponent } from 'ng2-alfresco-core';
|
||||
import { MdCheckboxChange } from '@angular/material';
|
||||
import { Observable, Observer } from 'rxjs/Rx';
|
||||
|
||||
declare var componentHandler;
|
||||
|
||||
@@ -34,7 +34,7 @@ declare var componentHandler;
|
||||
styleUrls: ['./datatable.component.css'],
|
||||
templateUrl: './datatable.component.html'
|
||||
})
|
||||
export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck {
|
||||
export class DataTableComponent implements AfterContentInit, AfterViewInit, OnChanges, DoCheck {
|
||||
|
||||
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
||||
|
||||
|
Reference in New Issue
Block a user