mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-863] codelyzer documentlist (#2059)
* codelyzer documentlist * tslint error after codelizer * fix import * fix tag test
This commit is contained in:
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
NodePaging,
|
||||
NodeMinimalEntry,
|
||||
NodeMinimal,
|
||||
PathInfoEntity,
|
||||
ContentInfo,
|
||||
NodePagingList
|
||||
NodeMinimal,
|
||||
NodeMinimalEntry,
|
||||
NodePaging,
|
||||
NodePagingList,
|
||||
PathInfoEntity
|
||||
} from '../models/document-library.model';
|
||||
|
||||
export class PageNode extends NodePaging {
|
||||
|
@@ -15,18 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { NodePaging } from './../models/document-library.model';
|
||||
import { PageNode } from './document-library.model.mock';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoContentService,
|
||||
AlfrescoApiService,
|
||||
AlfrescoSettingsService,
|
||||
LogService
|
||||
ThumbnailService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { NodePaging } from './../models/document-library.model';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import { PageNode } from './document-library.model.mock';
|
||||
|
||||
export class DocumentListServiceMock extends DocumentListService {
|
||||
|
||||
|
@@ -15,13 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { PathElementEntity } from 'alfresco-js-api';
|
||||
import { BreadcrumbComponent } from './breadcrumb.component';
|
||||
import { DocumentListComponent } from '../document-list.component';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { fakeNodeWithCreatePermission } from '../../assets/document-list.component.mock';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PathElementEntity } from 'alfresco-js-api';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { fakeNodeWithCreatePermission } from '../../assets/document-list.component.mock';
|
||||
import { DocumentListComponent } from '../document-list.component';
|
||||
import { BreadcrumbComponent } from './breadcrumb.component';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
|
@@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||
import { ContentActionModel } from './../../models/content-action.model';
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { ContentActionListComponent } from './content-action-list.component';
|
||||
|
||||
describe('ContentColumnList', () => {
|
||||
|
@@ -17,14 +17,14 @@
|
||||
|
||||
import { EventEmitter } from '@angular/core';
|
||||
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { FileNode } from './../../assets/document-library.model.mock';
|
||||
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||
import { ContentActionListComponent } from './content-action-list.component';
|
||||
import { ContentActionComponent } from './content-action.component';
|
||||
import { ContentActionHandler } from './../../models/content-action.model';
|
||||
import { DocumentActionsService } from './../../services/document-actions.service';
|
||||
import { FolderActionsService } from './../../services/folder-actions.service';
|
||||
import { ContentActionHandler } from './../../models/content-action.model';
|
||||
import { FileNode } from './../../assets/document-library.model.mock';
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { ContentActionListComponent } from './content-action-list.component';
|
||||
import { ContentActionComponent } from './content-action.component';
|
||||
|
||||
describe('ContentAction', () => {
|
||||
|
||||
|
@@ -17,8 +17,8 @@
|
||||
|
||||
import { DataColumn } from 'ng2-alfresco-datatable';
|
||||
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { ContentColumnListComponent } from './content-column-list.component';
|
||||
|
||||
describe('ContentColumnList', () => {
|
||||
|
@@ -15,10 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { ContentColumnComponent } from './content-column.component';
|
||||
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { ContentColumnListComponent } from './content-column-list.component';
|
||||
import { ContentColumnComponent } from './content-column.component';
|
||||
|
||||
describe('ContentColumn', () => {
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
[actions]="contentActions"
|
||||
[actionsPosition]="contentActionsPosition"
|
||||
[multiselect]="multiselect"
|
||||
[fallbackThumbnail]="fallbackThumbnail"
|
||||
[allowDropFiles]="allowDropFiles"
|
||||
[contextMenu]="contextMenuActions"
|
||||
[rowStyle]="rowStyle"
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { NgZone, SimpleChange, TemplateRef } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { DataColumn, DataRowEvent, DataTableComponent } from 'ng2-alfresco-datatable';
|
||||
import { Observable, Subject } from 'rxjs/Rx';
|
||||
@@ -35,6 +34,7 @@ import { ImageResolver, RowFilter, ShareDataRow } from './../data/share-datatabl
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import { DocumentListComponent } from './document-list.component';
|
||||
import { DocumentMenuActionComponent } from './document-menu-action.component';
|
||||
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
|
@@ -15,19 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MdButtonModule, MdIconModule, MdMenuModule } from '@angular/material';
|
||||
import {
|
||||
AlfrescoApiService,
|
||||
AlfrescoAuthenticationService,
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoTranslationService,
|
||||
AlfrescoApiService,
|
||||
CoreModule,
|
||||
LogService
|
||||
} from 'ng2-alfresco-core';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import { DocumentMenuActionComponent } from './document-menu-action.component';
|
||||
import { MdMenuModule, MdButtonModule, MdIconModule } from '@angular/material';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
|
@@ -17,20 +17,20 @@
|
||||
|
||||
import { DataTableComponent } from 'ng2-alfresco-datatable';
|
||||
|
||||
import { EmptyFolderContentComponent } from './empty-folder-content.component';
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||
import { DocumentListComponent } from './../document-list.component';
|
||||
import { EmptyFolderContentDirective } from './empty-folder-content.directive';
|
||||
|
||||
describe('EmptyFolderContent', () => {
|
||||
|
||||
let emptyFolderContent: EmptyFolderContentComponent;
|
||||
let emptyFolderContent: EmptyFolderContentDirective;
|
||||
let documentList: DocumentListComponent;
|
||||
|
||||
beforeEach(() => {
|
||||
let documentListService = new DocumentListServiceMock();
|
||||
documentList = new DocumentListComponent(documentListService, null, null, null);
|
||||
documentList.dataTable = new DataTableComponent(null, null);
|
||||
emptyFolderContent = new EmptyFolderContentComponent(documentList);
|
||||
emptyFolderContent = new EmptyFolderContentDirective(documentList);
|
||||
});
|
||||
|
||||
it('is defined', () => {
|
@@ -21,7 +21,7 @@ import { DocumentListComponent } from './../document-list.component';
|
||||
@Directive({
|
||||
selector: 'empty-folder-content'
|
||||
})
|
||||
export class EmptyFolderContentComponent implements AfterContentInit {
|
||||
export class EmptyFolderContentDirective implements AfterContentInit {
|
||||
|
||||
@ContentChild(TemplateRef)
|
||||
template: any;
|
@@ -15,12 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { DataColumn, DataRow, DataSorting } from 'ng2-alfresco-datatable';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import { ShareDataTableAdapter, ShareDataRow } from './share-datatable-adapter';
|
||||
import { FileNode, FolderNode } from './../assets/document-library.model.mock';
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DataColumn, DataRow, DataSorting } from 'ng2-alfresco-datatable';
|
||||
import { FileNode, FolderNode } from './../assets/document-library.model.mock';
|
||||
import { DocumentListService } from './../services/document-list.service';
|
||||
import { ShareDataRow, ShareDataTableAdapter } from './share-datatable-adapter';
|
||||
|
||||
describe('ShareDataTableAdapter', () => {
|
||||
|
||||
|
@@ -280,10 +280,6 @@ export class ShareDataRow implements DataRow {
|
||||
}
|
||||
}
|
||||
|
||||
export interface RowFilter {
|
||||
(value: ShareDataRow, index: number, array: ShareDataRow[]): any;
|
||||
}
|
||||
export type RowFilter = (value: ShareDataRow, index: number, array: ShareDataRow[]) => any;
|
||||
|
||||
export interface ImageResolver {
|
||||
(row: DataRow, column: DataColumn): string;
|
||||
}
|
||||
export type ImageResolver = (row: DataRow, column: DataColumn) => string;
|
||||
|
@@ -39,9 +39,7 @@ export class ContentActionModel {
|
||||
}
|
||||
}
|
||||
|
||||
export interface ContentActionHandler {
|
||||
(obj: any, target?: any, permission?: string): any;
|
||||
}
|
||||
export type ContentActionHandler = (obj: any, target?: any, permission?: string) => any;
|
||||
|
||||
export class DocumentActionModel extends ContentActionModel {
|
||||
constructor(json?: any) {
|
||||
|
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
||||
import { FileNode, FolderNode } from '../assets/document-library.model.mock';
|
||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { DocumentActionsService } from './document-actions.service';
|
||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { FileNode, FolderNode } from '../assets/document-library.model.mock';
|
||||
|
||||
describe('DocumentActionsService', () => {
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Subject } from 'rxjs/Rx';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { PermissionModel } from '../models/permissions.model';
|
||||
|
@@ -15,10 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import {
|
||||
CoreModule,
|
||||
CookieService,
|
||||
CoreModule,
|
||||
LogService,
|
||||
LogServiceMock
|
||||
} from 'ng2-alfresco-core';
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FolderActionsService } from './folder-actions.service';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { FileNode, FolderNode } from '../assets/document-library.model.mock';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { FolderActionsService } from './folder-actions.service';
|
||||
|
||||
describe('FolderActionsService', () => {
|
||||
|
||||
|
Reference in New Issue
Block a user