mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-863] codelyzer documentlist (#2059)
* codelyzer documentlist * tslint error after codelizer * fix import * fix tag test
This commit is contained in:
@@ -32,8 +32,8 @@ import { EcmModelService } from './src/services/ecm-model.service';
|
|||||||
import { FormRenderingService } from './src/services/form-rendering.service';
|
import { FormRenderingService } from './src/services/form-rendering.service';
|
||||||
import { FormService } from './src/services/form.service';
|
import { FormService } from './src/services/form.service';
|
||||||
import { NodeService } from './src/services/node.service';
|
import { NodeService } from './src/services/node.service';
|
||||||
import { WidgetVisibilityService } from './src/services/widget-visibility.service';
|
|
||||||
import { ProcessUploadService } from './src/services/process-upload.service';
|
import { ProcessUploadService } from './src/services/process-upload.service';
|
||||||
|
import { WidgetVisibilityService } from './src/services/widget-visibility.service';
|
||||||
|
|
||||||
export * from './src/components/activiti-form.component';
|
export * from './src/components/activiti-form.component';
|
||||||
export * from './src/components/adf-form-list.component';
|
export * from './src/components/adf-form-list.component';
|
||||||
|
@@ -73,7 +73,7 @@ export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
|
|||||||
DataTableModule,
|
DataTableModule,
|
||||||
ActivitiFormModule,
|
ActivitiFormModule,
|
||||||
MdIconModule,
|
MdIconModule,
|
||||||
MdButtonModule,
|
MdButtonModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...ACTIVITI_TASKLIST_DIRECTIVES
|
...ACTIVITI_TASKLIST_DIRECTIVES
|
||||||
|
@@ -213,7 +213,7 @@ export class DataTableComponent implements AfterContentInit, AfterViewInit, OnCh
|
|||||||
}
|
}
|
||||||
|
|
||||||
private unsubscribeClickStream() {
|
private unsubscribeClickStream() {
|
||||||
if(this.singleClickStreamSub) {
|
if (this.singleClickStreamSub) {
|
||||||
this.singleClickStreamSub.unsubscribe();
|
this.singleClickStreamSub.unsubscribe();
|
||||||
}
|
}
|
||||||
if (this.multiClickStreamSub) {
|
if (this.multiClickStreamSub) {
|
||||||
|
@@ -43,7 +43,8 @@ module.exports = {
|
|||||||
loader: 'tslint-loader',
|
loader: 'tslint-loader',
|
||||||
options: {
|
options: {
|
||||||
emitErrors: true,
|
emitErrors: true,
|
||||||
failOnHint: true
|
failOnHint: true,
|
||||||
|
fix: true
|
||||||
},
|
},
|
||||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||||
},
|
},
|
||||||
|
@@ -26,7 +26,7 @@ import { ContentColumnListComponent } from './src/components/content-column/cont
|
|||||||
import { ContentColumnComponent } from './src/components/content-column/content-column.component';
|
import { ContentColumnComponent } from './src/components/content-column/content-column.component';
|
||||||
import { DocumentListComponent } from './src/components/document-list.component';
|
import { DocumentListComponent } from './src/components/document-list.component';
|
||||||
import { DocumentMenuActionComponent } from './src/components/document-menu-action.component';
|
import { DocumentMenuActionComponent } from './src/components/document-menu-action.component';
|
||||||
import { EmptyFolderContentComponent } from './src/components/empty-folder/empty-folder-content.component';
|
import { EmptyFolderContentDirective } from './src/components/empty-folder/empty-folder-content.directive';
|
||||||
import { MaterialModule } from './src/material.module';
|
import { MaterialModule } from './src/material.module';
|
||||||
|
|
||||||
import { DocumentActionsService } from './src/services/document-actions.service';
|
import { DocumentActionsService } from './src/services/document-actions.service';
|
||||||
@@ -40,7 +40,7 @@ export * from './src/components/content-column/content-column.component';
|
|||||||
export * from './src/components/content-column/content-column-list.component';
|
export * from './src/components/content-column/content-column-list.component';
|
||||||
export * from './src/components/content-action/content-action.component';
|
export * from './src/components/content-action/content-action.component';
|
||||||
export * from './src/components/content-action/content-action-list.component';
|
export * from './src/components/content-action/content-action-list.component';
|
||||||
export * from './src/components/empty-folder/empty-folder-content.component';
|
export * from './src/components/empty-folder/empty-folder-content.directive';
|
||||||
export * from './src/components/breadcrumb/breadcrumb.component';
|
export * from './src/components/breadcrumb/breadcrumb.component';
|
||||||
|
|
||||||
// data
|
// data
|
||||||
@@ -63,7 +63,7 @@ export const DOCUMENT_LIST_DIRECTIVES: any[] = [
|
|||||||
ContentColumnListComponent,
|
ContentColumnListComponent,
|
||||||
ContentActionComponent,
|
ContentActionComponent,
|
||||||
ContentActionListComponent,
|
ContentActionListComponent,
|
||||||
EmptyFolderContentComponent,
|
EmptyFolderContentDirective,
|
||||||
BreadcrumbComponent
|
BreadcrumbComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -16,12 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
NodePaging,
|
|
||||||
NodeMinimalEntry,
|
|
||||||
NodeMinimal,
|
|
||||||
PathInfoEntity,
|
|
||||||
ContentInfo,
|
ContentInfo,
|
||||||
NodePagingList
|
NodeMinimal,
|
||||||
|
NodeMinimalEntry,
|
||||||
|
NodePaging,
|
||||||
|
NodePagingList,
|
||||||
|
PathInfoEntity
|
||||||
} from '../models/document-library.model';
|
} from '../models/document-library.model';
|
||||||
|
|
||||||
export class PageNode extends NodePaging {
|
export class PageNode extends NodePaging {
|
||||||
|
@@ -15,18 +15,18 @@
|
|||||||
* limitations under the License.
|
* 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 {
|
import {
|
||||||
AlfrescoSettingsService,
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoApiService,
|
AlfrescoSettingsService,
|
||||||
LogService
|
LogService
|
||||||
ThumbnailService
|
ThumbnailService
|
||||||
} from 'ng2-alfresco-core';
|
} 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 {
|
export class DocumentListServiceMock extends DocumentListService {
|
||||||
|
|
||||||
|
@@ -15,13 +15,13 @@
|
|||||||
* limitations under the License.
|
* 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 { 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;
|
declare let jasmine: any;
|
||||||
|
|
||||||
|
@@ -15,9 +15,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DocumentListComponent } from './../document-list.component';
|
|
||||||
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';
|
||||||
|
import { DocumentListComponent } from './../document-list.component';
|
||||||
import { ContentActionListComponent } from './content-action-list.component';
|
import { ContentActionListComponent } from './content-action-list.component';
|
||||||
|
|
||||||
describe('ContentColumnList', () => {
|
describe('ContentColumnList', () => {
|
||||||
|
@@ -17,14 +17,14 @@
|
|||||||
|
|
||||||
import { EventEmitter } from '@angular/core';
|
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 { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||||
import { ContentActionListComponent } from './content-action-list.component';
|
import { ContentActionHandler } from './../../models/content-action.model';
|
||||||
import { ContentActionComponent } from './content-action.component';
|
|
||||||
import { DocumentActionsService } from './../../services/document-actions.service';
|
import { DocumentActionsService } from './../../services/document-actions.service';
|
||||||
import { FolderActionsService } from './../../services/folder-actions.service';
|
import { FolderActionsService } from './../../services/folder-actions.service';
|
||||||
import { ContentActionHandler } from './../../models/content-action.model';
|
import { DocumentListComponent } from './../document-list.component';
|
||||||
import { FileNode } from './../../assets/document-library.model.mock';
|
import { ContentActionListComponent } from './content-action-list.component';
|
||||||
|
import { ContentActionComponent } from './content-action.component';
|
||||||
|
|
||||||
describe('ContentAction', () => {
|
describe('ContentAction', () => {
|
||||||
|
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
import { DataColumn } from 'ng2-alfresco-datatable';
|
import { DataColumn } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
import { DocumentListComponent } from './../document-list.component';
|
|
||||||
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
import { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||||
|
import { DocumentListComponent } from './../document-list.component';
|
||||||
import { ContentColumnListComponent } from './content-column-list.component';
|
import { ContentColumnListComponent } from './content-column-list.component';
|
||||||
|
|
||||||
describe('ContentColumnList', () => {
|
describe('ContentColumnList', () => {
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
* limitations under the License.
|
* 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 { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||||
|
import { DocumentListComponent } from './../document-list.component';
|
||||||
import { ContentColumnListComponent } from './content-column-list.component';
|
import { ContentColumnListComponent } from './content-column-list.component';
|
||||||
|
import { ContentColumnComponent } from './content-column.component';
|
||||||
|
|
||||||
describe('ContentColumn', () => {
|
describe('ContentColumn', () => {
|
||||||
|
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
[actions]="contentActions"
|
[actions]="contentActions"
|
||||||
[actionsPosition]="contentActionsPosition"
|
[actionsPosition]="contentActionsPosition"
|
||||||
[multiselect]="multiselect"
|
[multiselect]="multiselect"
|
||||||
[fallbackThumbnail]="fallbackThumbnail"
|
|
||||||
[allowDropFiles]="allowDropFiles"
|
[allowDropFiles]="allowDropFiles"
|
||||||
[contextMenu]="contextMenuActions"
|
[contextMenu]="contextMenuActions"
|
||||||
[rowStyle]="rowStyle"
|
[rowStyle]="rowStyle"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import { NgZone, SimpleChange, TemplateRef } from '@angular/core';
|
import { NgZone, SimpleChange, TemplateRef } from '@angular/core';
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
|
||||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||||
import { DataColumn, DataRowEvent, DataTableComponent } from 'ng2-alfresco-datatable';
|
import { DataColumn, DataRowEvent, DataTableComponent } from 'ng2-alfresco-datatable';
|
||||||
import { Observable, Subject } from 'rxjs/Rx';
|
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 { DocumentListService } from './../services/document-list.service';
|
||||||
import { DocumentListComponent } from './document-list.component';
|
import { DocumentListComponent } from './document-list.component';
|
||||||
import { DocumentMenuActionComponent } from './document-menu-action.component';
|
import { DocumentMenuActionComponent } from './document-menu-action.component';
|
||||||
|
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
|
@@ -15,19 +15,19 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
import { SimpleChange } from '@angular/core';
|
import { SimpleChange } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
import { MdButtonModule, MdIconModule, MdMenuModule } from '@angular/material';
|
||||||
import {
|
import {
|
||||||
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
AlfrescoApiService,
|
|
||||||
CoreModule,
|
CoreModule,
|
||||||
LogService
|
LogService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
import { DocumentListService } from './../services/document-list.service';
|
import { DocumentListService } from './../services/document-list.service';
|
||||||
import { DocumentMenuActionComponent } from './document-menu-action.component';
|
import { DocumentMenuActionComponent } from './document-menu-action.component';
|
||||||
import { MdMenuModule, MdButtonModule, MdIconModule } from '@angular/material';
|
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
|
@@ -17,20 +17,20 @@
|
|||||||
|
|
||||||
import { DataTableComponent } from 'ng2-alfresco-datatable';
|
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 { DocumentListServiceMock } from './../../assets/document-list.service.mock';
|
||||||
|
import { DocumentListComponent } from './../document-list.component';
|
||||||
|
import { EmptyFolderContentDirective } from './empty-folder-content.directive';
|
||||||
|
|
||||||
describe('EmptyFolderContent', () => {
|
describe('EmptyFolderContent', () => {
|
||||||
|
|
||||||
let emptyFolderContent: EmptyFolderContentComponent;
|
let emptyFolderContent: EmptyFolderContentDirective;
|
||||||
let documentList: DocumentListComponent;
|
let documentList: DocumentListComponent;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
let documentListService = new DocumentListServiceMock();
|
let documentListService = new DocumentListServiceMock();
|
||||||
documentList = new DocumentListComponent(documentListService, null, null, null);
|
documentList = new DocumentListComponent(documentListService, null, null, null);
|
||||||
documentList.dataTable = new DataTableComponent(null, null);
|
documentList.dataTable = new DataTableComponent(null, null);
|
||||||
emptyFolderContent = new EmptyFolderContentComponent(documentList);
|
emptyFolderContent = new EmptyFolderContentDirective(documentList);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('is defined', () => {
|
it('is defined', () => {
|
@@ -21,7 +21,7 @@ import { DocumentListComponent } from './../document-list.component';
|
|||||||
@Directive({
|
@Directive({
|
||||||
selector: 'empty-folder-content'
|
selector: 'empty-folder-content'
|
||||||
})
|
})
|
||||||
export class EmptyFolderContentComponent implements AfterContentInit {
|
export class EmptyFolderContentDirective implements AfterContentInit {
|
||||||
|
|
||||||
@ContentChild(TemplateRef)
|
@ContentChild(TemplateRef)
|
||||||
template: any;
|
template: any;
|
@@ -15,12 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, async } from '@angular/core/testing';
|
import { async, TestBed } 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 { CoreModule } from 'ng2-alfresco-core';
|
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', () => {
|
describe('ShareDataTableAdapter', () => {
|
||||||
|
|
||||||
|
@@ -280,10 +280,6 @@ export class ShareDataRow implements DataRow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RowFilter {
|
export type RowFilter = (value: ShareDataRow, index: number, array: ShareDataRow[]) => any;
|
||||||
(value: ShareDataRow, index: number, array: ShareDataRow[]): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ImageResolver {
|
export type ImageResolver = (row: DataRow, column: DataColumn) => string;
|
||||||
(row: DataRow, column: DataColumn): string;
|
|
||||||
}
|
|
||||||
|
@@ -39,9 +39,7 @@ export class ContentActionModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ContentActionHandler {
|
export type ContentActionHandler = (obj: any, target?: any, permission?: string) => any;
|
||||||
(obj: any, target?: any, permission?: string): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class DocumentActionModel extends ContentActionModel {
|
export class DocumentActionModel extends ContentActionModel {
|
||||||
constructor(json?: any) {
|
constructor(json?: any) {
|
||||||
|
@@ -16,11 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
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 { ContentActionHandler } from '../models/content-action.model';
|
||||||
import { DocumentActionsService } from './document-actions.service';
|
import { DocumentActionsService } from './document-actions.service';
|
||||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
|
||||||
import { DocumentListService } from './document-list.service';
|
import { DocumentListService } from './document-list.service';
|
||||||
import { FileNode, FolderNode } from '../assets/document-library.model.mock';
|
|
||||||
|
|
||||||
describe('DocumentActionsService', () => {
|
describe('DocumentActionsService', () => {
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
import { AlfrescoContentService } from 'ng2-alfresco-core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import { Subject } from 'rxjs/Rx';
|
import { Subject } from 'rxjs/Rx';
|
||||||
import { ContentActionHandler } from '../models/content-action.model';
|
import { ContentActionHandler } from '../models/content-action.model';
|
||||||
import { PermissionModel } from '../models/permissions.model';
|
import { PermissionModel } from '../models/permissions.model';
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, async } from '@angular/core/testing';
|
import { async, TestBed } from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
CoreModule,
|
|
||||||
CookieService,
|
CookieService,
|
||||||
|
CoreModule,
|
||||||
LogService,
|
LogService,
|
||||||
LogServiceMock
|
LogServiceMock
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
@@ -15,11 +15,11 @@
|
|||||||
* limitations under the License.
|
* 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 { FileNode, FolderNode } from '../assets/document-library.model.mock';
|
||||||
import { DocumentListService } from './document-list.service';
|
|
||||||
import { DocumentListServiceMock } from '../assets/document-list.service.mock';
|
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', () => {
|
describe('FolderActionsService', () => {
|
||||||
|
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"rulesDirectory": [
|
||||||
|
"node_modules/codelyzer"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"align": [
|
"align": [
|
||||||
true,
|
true,
|
||||||
@@ -105,14 +108,50 @@
|
|||||||
"allow-leading-underscore",
|
"allow-leading-underscore",
|
||||||
"ban-keywords"
|
"ban-keywords"
|
||||||
],
|
],
|
||||||
|
"callable-types": true,
|
||||||
|
"import-blacklist": [
|
||||||
|
true,
|
||||||
|
"rxjs"
|
||||||
|
],
|
||||||
|
"import-spacing": true,
|
||||||
|
"interface-over-type-literal": true,
|
||||||
|
"member-access": false,
|
||||||
|
"no-empty-interface": true,
|
||||||
|
"no-string-literal": false,
|
||||||
|
"no-string-throw": true,
|
||||||
|
"prefer-const": false,
|
||||||
|
"typeof-compare": true,
|
||||||
|
"unified-signatures": true,
|
||||||
"whitespace": [
|
"whitespace": [
|
||||||
true,
|
true,
|
||||||
"check-branch",
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-module",
|
],
|
||||||
"check-decl"
|
"directive-selector": [
|
||||||
]
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
],
|
||||||
|
"ordered-imports": true,
|
||||||
|
"use-input-property-decorator": true,
|
||||||
|
"use-output-property-decorator": true,
|
||||||
|
"use-host-property-decorator": true,
|
||||||
|
"use-life-cycle-interface": true,
|
||||||
|
"use-pipe-transform-interface": true,
|
||||||
|
"component-class-suffix": true,
|
||||||
|
"directive-class-suffix": true,
|
||||||
|
"no-access-missing-member": true,
|
||||||
|
"templates-use-public": true,
|
||||||
|
"invoke-injectable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,8 @@ module.exports = {
|
|||||||
loader: 'tslint-loader',
|
loader: 'tslint-loader',
|
||||||
options: {
|
options: {
|
||||||
emitErrors: true,
|
emitErrors: true,
|
||||||
failOnHint: true
|
failOnHint: true,
|
||||||
|
fix: true
|
||||||
},
|
},
|
||||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||||
},
|
},
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
|
||||||
import { EventEmitter } from '@angular/core';
|
import { EventEmitter } from '@angular/core';
|
||||||
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
export interface LangChangeEvent {
|
export interface LangChangeEvent {
|
||||||
lang: string;
|
lang: string;
|
||||||
|
@@ -15,14 +15,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
import { MdCheckboxModule, MdInputModule } from '@angular/material';
|
||||||
import { AlfrescoAuthenticationService, CoreModule } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { AlfrescoLoginComponent } from './alfresco-login.component';
|
|
||||||
import { AuthenticationMock } from './../assets/authentication.service.mock';
|
import { AuthenticationMock } from './../assets/authentication.service.mock';
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
import { MdInputModule, MdCheckboxModule } from '@angular/material';
|
import { AlfrescoLoginComponent } from './alfresco-login.component';
|
||||||
|
|
||||||
describe('AlfrescoLogin', () => {
|
describe('AlfrescoLogin', () => {
|
||||||
let component: AlfrescoLoginComponent;
|
let component: AlfrescoLoginComponent;
|
||||||
|
@@ -92,6 +92,7 @@ export class AlfrescoLoginComponent implements OnInit {
|
|||||||
minLength: number = 2;
|
minLength: number = 2;
|
||||||
footerTemplate: TemplateRef<any>;
|
footerTemplate: TemplateRef<any>;
|
||||||
headerTemplate: TemplateRef<any>;
|
headerTemplate: TemplateRef<any>;
|
||||||
|
data: any;
|
||||||
|
|
||||||
private _message: { [id: string]: { [id: string]: string } };
|
private _message: { [id: string]: { [id: string]: string } };
|
||||||
|
|
||||||
|
@@ -15,11 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { LoginFooterDirective } from './login-footer.directive';
|
|
||||||
import { Injector } from '@angular/core';
|
import { Injector } from '@angular/core';
|
||||||
import { getTestBed, TestBed } from '@angular/core/testing';
|
import { getTestBed, TestBed } from '@angular/core/testing';
|
||||||
import { AlfrescoLoginComponent } from '../components/alfresco-login.component';
|
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
import { AlfrescoLoginComponent } from '../components/alfresco-login.component';
|
||||||
|
import { LoginFooterDirective } from './login-footer.directive';
|
||||||
|
|
||||||
describe('LoginFooterDirective', () => {
|
describe('LoginFooterDirective', () => {
|
||||||
let injector: Injector;
|
let injector: Injector;
|
||||||
|
@@ -15,11 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { LoginHeaderDirective } from './login-header.directive';
|
|
||||||
import { Injector } from '@angular/core';
|
import { Injector } from '@angular/core';
|
||||||
import { getTestBed, TestBed } from '@angular/core/testing';
|
import { getTestBed, TestBed } from '@angular/core/testing';
|
||||||
import { AlfrescoLoginComponent } from '../components/alfresco-login.component';
|
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
import { AlfrescoLoginComponent } from '../components/alfresco-login.component';
|
||||||
|
import { LoginHeaderDirective } from './login-header.directive';
|
||||||
|
|
||||||
describe('LoginHeaderDirective', () => {
|
describe('LoginHeaderDirective', () => {
|
||||||
let injector: Injector;
|
let injector: Injector;
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"rulesDirectory": [
|
||||||
|
"node_modules/codelyzer"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"align": [
|
"align": [
|
||||||
true,
|
true,
|
||||||
@@ -105,14 +108,50 @@
|
|||||||
"allow-leading-underscore",
|
"allow-leading-underscore",
|
||||||
"ban-keywords"
|
"ban-keywords"
|
||||||
],
|
],
|
||||||
|
"callable-types": true,
|
||||||
|
"import-blacklist": [
|
||||||
|
true,
|
||||||
|
"rxjs"
|
||||||
|
],
|
||||||
|
"import-spacing": true,
|
||||||
|
"interface-over-type-literal": true,
|
||||||
|
"member-access": false,
|
||||||
|
"no-empty-interface": true,
|
||||||
|
"no-string-literal": false,
|
||||||
|
"no-string-throw": true,
|
||||||
|
"prefer-const": false,
|
||||||
|
"typeof-compare": true,
|
||||||
|
"unified-signatures": true,
|
||||||
"whitespace": [
|
"whitespace": [
|
||||||
true,
|
true,
|
||||||
"check-branch",
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-module",
|
],
|
||||||
"check-decl"
|
"directive-selector": [
|
||||||
]
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
],
|
||||||
|
"ordered-imports": true,
|
||||||
|
"use-input-property-decorator": true,
|
||||||
|
"use-output-property-decorator": true,
|
||||||
|
"use-host-property-decorator": true,
|
||||||
|
"use-life-cycle-interface": true,
|
||||||
|
"use-pipe-transform-interface": true,
|
||||||
|
"component-class-suffix": true,
|
||||||
|
"directive-class-suffix": true,
|
||||||
|
"no-access-missing-member": true,
|
||||||
|
"templates-use-public": true,
|
||||||
|
"invoke-injectable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,8 @@ module.exports = {
|
|||||||
loader: 'tslint-loader',
|
loader: 'tslint-loader',
|
||||||
options: {
|
options: {
|
||||||
emitErrors: true,
|
emitErrors: true,
|
||||||
failOnHint: true
|
failOnHint: true,
|
||||||
|
fix: true
|
||||||
},
|
},
|
||||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||||
},
|
},
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { DocumentListModule } from 'ng2-alfresco-documentlist';
|
import { DocumentListModule } from 'ng2-alfresco-documentlist';
|
||||||
import { AlfrescoSearchAutocompleteComponent } from './src/components/alfresco-search-autocomplete.component';
|
import { AlfrescoSearchAutocompleteComponent } from './src/components/alfresco-search-autocomplete.component';
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
|
||||||
import { EventEmitter } from '@angular/core';
|
import { EventEmitter } from '@angular/core';
|
||||||
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
export interface LangChangeEvent {
|
export interface LangChangeEvent {
|
||||||
lang: string;
|
lang: string;
|
||||||
|
@@ -15,20 +15,20 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
|
||||||
import { ThumbnailService } from 'ng2-alfresco-core';
|
import { ThumbnailService } from 'ng2-alfresco-core';
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
|
||||||
import { result, results, folderResult, noResult, errorJson } from './../assets/alfresco-search.component.mock';
|
|
||||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
|
||||||
import {
|
import {
|
||||||
AlfrescoApiService,
|
AlfrescoApiService,
|
||||||
AlfrescoSettingsService,
|
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
|
AlfrescoSettingsService,
|
||||||
AlfrescoTranslationService,
|
AlfrescoTranslationService,
|
||||||
CoreModule
|
CoreModule
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||||
|
import { errorJson, folderResult, noResult, result, results } from './../assets/alfresco-search.component.mock';
|
||||||
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
|
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
||||||
|
|
||||||
describe('AlfrescoSearchAutocompleteComponent', () => {
|
describe('AlfrescoSearchAutocompleteComponent', () => {
|
||||||
|
|
||||||
|
@@ -15,14 +15,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { AlfrescoSearchControlComponent } from './alfresco-search-control.component';
|
|
||||||
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
|
||||||
import { ThumbnailService } from 'ng2-alfresco-core';
|
import { ThumbnailService } from 'ng2-alfresco-core';
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
import { AlfrescoTranslationService, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { result } from './../assets/alfresco-search.component.mock';
|
|
||||||
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
|
||||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||||
|
import { result } from './../assets/alfresco-search.component.mock';
|
||||||
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
|
import { AlfrescoSearchAutocompleteComponent } from './alfresco-search-autocomplete.component';
|
||||||
|
import { AlfrescoSearchControlComponent } from './alfresco-search-control.component';
|
||||||
|
|
||||||
describe('AlfrescoSearchControlComponent', () => {
|
describe('AlfrescoSearchControlComponent', () => {
|
||||||
|
|
||||||
|
@@ -9,8 +9,6 @@
|
|||||||
[contentActions]="true"
|
[contentActions]="true"
|
||||||
[navigationMode]="navigationMode"
|
[navigationMode]="navigationMode"
|
||||||
[enablePagination]="false"
|
[enablePagination]="false"
|
||||||
(error)="onNavigationError($event)"
|
|
||||||
(success)="resetError()"
|
|
||||||
(preview)="onPreviewFile($event)">
|
(preview)="onPreviewFile($event)">
|
||||||
<empty-folder-content>
|
<empty-folder-content>
|
||||||
<ng-template>
|
<ng-template>
|
||||||
|
@@ -16,15 +16,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { DebugElement, ReflectiveInjector, SimpleChange } from '@angular/core';
|
import { DebugElement, ReflectiveInjector, SimpleChange } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { Observable } from 'rxjs/Rx';
|
|
||||||
import { AlfrescoSearchComponent } from './alfresco-search.component';
|
|
||||||
import { TranslationMock } from './../assets/translation.service.mock';
|
|
||||||
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
|
||||||
import { AlfrescoTranslationService, CoreModule, NotificationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService, CoreModule, NotificationService } from 'ng2-alfresco-core';
|
||||||
import { DocumentListModule } from 'ng2-alfresco-documentlist';
|
import { DocumentListModule } from 'ng2-alfresco-documentlist';
|
||||||
import { PermissionModel } from 'ng2-alfresco-documentlist';
|
import { PermissionModel } from 'ng2-alfresco-documentlist';
|
||||||
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
import { AlfrescoSearchService } from '../services/alfresco-search.service';
|
||||||
|
import { TranslationMock } from './../assets/translation.service.mock';
|
||||||
|
import { AlfrescoSearchComponent } from './alfresco-search.component';
|
||||||
|
|
||||||
describe('AlfrescoSearchComponent', () => {
|
describe('AlfrescoSearchComponent', () => {
|
||||||
|
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, async } from '@angular/core/testing';
|
import { async, TestBed } from '@angular/core/testing';
|
||||||
|
import { AlfrescoApiService, CoreModule } from 'ng2-alfresco-core';
|
||||||
|
import { fakeApi, fakeError, fakeSearch } from '../assets/alfresco-search.service.mock';
|
||||||
import { AlfrescoSearchService } from './alfresco-search.service';
|
import { AlfrescoSearchService } from './alfresco-search.service';
|
||||||
import { CoreModule, AlfrescoApiService } from 'ng2-alfresco-core';
|
|
||||||
import { fakeApi, fakeSearch, fakeError } from '../assets/alfresco-search.service.mock';
|
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"rulesDirectory": [
|
||||||
|
"node_modules/codelyzer"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"align": [
|
"align": [
|
||||||
true,
|
true,
|
||||||
@@ -105,14 +108,50 @@
|
|||||||
"allow-leading-underscore",
|
"allow-leading-underscore",
|
||||||
"ban-keywords"
|
"ban-keywords"
|
||||||
],
|
],
|
||||||
|
"callable-types": true,
|
||||||
|
"import-blacklist": [
|
||||||
|
true,
|
||||||
|
"rxjs"
|
||||||
|
],
|
||||||
|
"import-spacing": true,
|
||||||
|
"interface-over-type-literal": true,
|
||||||
|
"member-access": false,
|
||||||
|
"no-empty-interface": true,
|
||||||
|
"no-string-literal": false,
|
||||||
|
"no-string-throw": true,
|
||||||
|
"prefer-const": false,
|
||||||
|
"typeof-compare": true,
|
||||||
|
"unified-signatures": true,
|
||||||
"whitespace": [
|
"whitespace": [
|
||||||
true,
|
true,
|
||||||
"check-branch",
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-module",
|
],
|
||||||
"check-decl"
|
"directive-selector": [
|
||||||
]
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
],
|
||||||
|
"ordered-imports": true,
|
||||||
|
"use-input-property-decorator": true,
|
||||||
|
"use-output-property-decorator": true,
|
||||||
|
"use-host-property-decorator": true,
|
||||||
|
"use-life-cycle-interface": true,
|
||||||
|
"use-pipe-transform-interface": true,
|
||||||
|
"component-class-suffix": true,
|
||||||
|
"directive-class-suffix": true,
|
||||||
|
"no-access-missing-member": true,
|
||||||
|
"templates-use-public": true,
|
||||||
|
"invoke-injectable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -20,8 +20,8 @@ import { MdButtonModule, MdInputModule } from '@angular/material';
|
|||||||
import { CoreModule } from 'ng2-alfresco-core';
|
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 { TagListComponent } from './src/components/tag-list.component';
|
||||||
import { TagNodeList } from './src/components/tag-node-list.component';
|
import { TagNodeListComponent } from './src/components/tag-node-list.component';
|
||||||
import { TagService } from './src/services/tag.service';
|
import { TagService } from './src/services/tag.service';
|
||||||
|
|
||||||
export * from './src/components/tag-actions.component';
|
export * from './src/components/tag-actions.component';
|
||||||
@@ -31,8 +31,8 @@ export * from './src/services/tag.service';
|
|||||||
|
|
||||||
export const TAG_DIRECTIVES: any[] = [
|
export const TAG_DIRECTIVES: any[] = [
|
||||||
TagActionsComponent,
|
TagActionsComponent,
|
||||||
TagList,
|
TagListComponent,
|
||||||
TagNodeList
|
TagNodeListComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
export const TAG_PROVIDERS: any[] = [
|
export const TAG_PROVIDERS: any[] = [
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { MdInputModule } from '@angular/material';
|
import { MdInputModule } from '@angular/material';
|
||||||
import { AppConfigModule, CoreModule } from 'ng2-alfresco-core';
|
import { AppConfigModule, CoreModule } from 'ng2-alfresco-core';
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
||||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||||
import { TagService } from './../services/tag.service';
|
import { TagService } from './../services/tag.service';
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ import { TagService } from './../services/tag.service';
|
|||||||
templateUrl: './tag-actions.component.html',
|
templateUrl: './tag-actions.component.html',
|
||||||
styleUrls: ['./tag-actions.component.css']
|
styleUrls: ['./tag-actions.component.css']
|
||||||
})
|
})
|
||||||
export class TagActionsComponent {
|
export class TagActionsComponent implements OnChanges {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
@@ -75,7 +75,7 @@ export class TagActionsComponent {
|
|||||||
this.tagsEntries = data.list.entries;
|
this.tagsEntries = data.list.entries;
|
||||||
this.disableAddTag = false;
|
this.disableAddTag = false;
|
||||||
this.result.emit(this.tagsEntries);
|
this.result.emit(this.tagsEntries);
|
||||||
}, () => {
|
}, () => {
|
||||||
this.tagsEntries = null;
|
this.tagsEntries = null;
|
||||||
this.disableAddTag = true;
|
this.disableAddTag = true;
|
||||||
this.result.emit(this.tagsEntries);
|
this.result.emit(this.tagsEntries);
|
||||||
@@ -88,7 +88,7 @@ export class TagActionsComponent {
|
|||||||
this.errorMsg = error;
|
this.errorMsg = error;
|
||||||
});
|
});
|
||||||
this.error.emit(this.errorMsg);
|
this.error.emit(this.errorMsg);
|
||||||
}else {
|
} else {
|
||||||
this.tagService.addTag(this.nodeId, this.newTagName).subscribe(() => {
|
this.tagService.addTag(this.nodeId, this.newTagName).subscribe(() => {
|
||||||
this.newTagName = '';
|
this.newTagName = '';
|
||||||
this.successAdd.emit(this.nodeId);
|
this.successAdd.emit(this.nodeId);
|
||||||
|
@@ -20,7 +20,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { MdInputModule } from '@angular/material';
|
import { MdInputModule } from '@angular/material';
|
||||||
import { AppConfigModule, CoreModule } from 'ng2-alfresco-core';
|
import { AppConfigModule, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { TagService } from '../services/tag.service';
|
import { TagService } from '../services/tag.service';
|
||||||
import { TagList } from './../components/tag-list.component';
|
import { TagListComponent } from './../components/tag-list.component';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@@ -38,12 +38,13 @@ describe('TagList', () => {
|
|||||||
'entries': [{
|
'entries': [{
|
||||||
'entry': {'tag': 'test1', 'id': '0ee933fa-57fc-4587-8a77-b787e814f1d2'}
|
'entry': {'tag': 'test1', 'id': '0ee933fa-57fc-4587-8a77-b787e814f1d2'}
|
||||||
}, {'entry': {'tag': 'test2', 'id': 'fcb92659-1f10-41b4-9b17-851b72a3b597'}}, {
|
}, {'entry': {'tag': 'test2', 'id': 'fcb92659-1f10-41b4-9b17-851b72a3b597'}}, {
|
||||||
'entry': {'tag': 'test3', 'id': 'fb4213c0-729d-466c-9a6c-ee2e937273bf'}}]
|
'entry': {'tag': 'test3', 'id': 'fb4213c0-729d-466c-9a6c-ee2e937273bf'}
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let component: any;
|
let component: any;
|
||||||
let fixture: ComponentFixture<TagList>;
|
let fixture: ComponentFixture<TagListComponent>;
|
||||||
let debug: DebugElement;
|
let debug: DebugElement;
|
||||||
let element: HTMLElement;
|
let element: HTMLElement;
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ describe('TagList', () => {
|
|||||||
})
|
})
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
TagList
|
TagListComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
TagService
|
TagService
|
||||||
@@ -66,7 +67,7 @@ describe('TagList', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(TagList);
|
fixture = TestBed.createComponent(TagListComponent);
|
||||||
|
|
||||||
debug = fixture.debugElement;
|
debug = fixture.debugElement;
|
||||||
element = fixture.nativeElement;
|
element = fixture.nativeElement;
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Output } from '@angular/core';
|
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||||
import { TagService } from '../services/tag.service';
|
import { TagService } from '../services/tag.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,7 +29,7 @@ import { TagService } from '../services/tag.service';
|
|||||||
selector: 'adf-tag-list, alfresco-tag-list',
|
selector: 'adf-tag-list, alfresco-tag-list',
|
||||||
templateUrl: './tag-list.component.html'
|
templateUrl: './tag-list.component.html'
|
||||||
})
|
})
|
||||||
export class TagList {
|
export class TagListComponent implements OnInit {
|
||||||
|
|
||||||
tagsEntries: any;
|
tagsEntries: any;
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ import { DebugElement } from '@angular/core';
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { MdInputModule } from '@angular/material';
|
import { MdInputModule } from '@angular/material';
|
||||||
import { AppConfigModule, CoreModule } from 'ng2-alfresco-core';
|
import { AppConfigModule, CoreModule } from 'ng2-alfresco-core';
|
||||||
import { TagNodeList } from '../components/tag-node-list.component';
|
import { TagNodeListComponent } from '../components/tag-node-list.component';
|
||||||
import { TagService } from '../services/tag.service';
|
import { TagService } from '../services/tag.service';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
@@ -38,12 +38,13 @@ describe('TagNodeList', () => {
|
|||||||
'entries': [{
|
'entries': [{
|
||||||
'entry': {'tag': 'test1', 'id': '0ee933fa-57fc-4587-8a77-b787e814f1d2'}
|
'entry': {'tag': 'test1', 'id': '0ee933fa-57fc-4587-8a77-b787e814f1d2'}
|
||||||
}, {'entry': {'tag': 'test2', 'id': 'fcb92659-1f10-41b4-9b17-851b72a3b597'}}, {
|
}, {'entry': {'tag': 'test2', 'id': 'fcb92659-1f10-41b4-9b17-851b72a3b597'}}, {
|
||||||
'entry': {'tag': 'test3', 'id': 'fb4213c0-729d-466c-9a6c-ee2e937273bf'}}]
|
'entry': {'tag': 'test3', 'id': 'fb4213c0-729d-466c-9a6c-ee2e937273bf'}
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let component: any;
|
let component: any;
|
||||||
let fixture: ComponentFixture<TagNodeList>;
|
let fixture: ComponentFixture<TagNodeListComponent>;
|
||||||
let debug: DebugElement;
|
let debug: DebugElement;
|
||||||
let element: HTMLElement;
|
let element: HTMLElement;
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ describe('TagNodeList', () => {
|
|||||||
})
|
})
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
TagNodeList
|
TagNodeListComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
TagService
|
TagService
|
||||||
@@ -66,7 +67,7 @@ describe('TagNodeList', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(TagNodeList);
|
fixture = TestBed.createComponent(TagNodeListComponent);
|
||||||
|
|
||||||
debug = fixture.debugElement;
|
debug = fixture.debugElement;
|
||||||
element = fixture.nativeElement;
|
element = fixture.nativeElement;
|
||||||
@@ -120,7 +121,7 @@ describe('TagNodeList', () => {
|
|||||||
deleteButton.click();
|
deleteButton.click();
|
||||||
|
|
||||||
expect(jasmine.Ajax.requests.mostRecent().url).
|
expect(jasmine.Ajax.requests.mostRecent().url).
|
||||||
toBe('http://localhost:9876/ecm/alfresco/api/-default-/public/alfresco/versions/1/nodes/fake-node-id/tags/0ee933fa-57fc-4587-8a77-b787e814f1d2');
|
toContain('0ee933fa-57fc-4587-8a77-b787e814f1d2');
|
||||||
expect(jasmine.Ajax.requests.mostRecent().method).toBe('DELETE');
|
expect(jasmine.Ajax.requests.mostRecent().method).toBe('DELETE');
|
||||||
|
|
||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
||||||
import { TagService } from '../services/tag.service';
|
import { TagService } from '../services/tag.service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,7 +30,7 @@ import { TagService } from '../services/tag.service';
|
|||||||
templateUrl: './tag-node-list.component.html',
|
templateUrl: './tag-node-list.component.html',
|
||||||
styleUrls: ['./tag-node-list.component.css']
|
styleUrls: ['./tag-node-list.component.css']
|
||||||
})
|
})
|
||||||
export class TagNodeList {
|
export class TagNodeListComponent implements OnChanges {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
|
@@ -108,15 +108,50 @@
|
|||||||
"allow-leading-underscore",
|
"allow-leading-underscore",
|
||||||
"ban-keywords"
|
"ban-keywords"
|
||||||
],
|
],
|
||||||
|
"callable-types": true,
|
||||||
|
"import-blacklist": [
|
||||||
|
true,
|
||||||
|
"rxjs"
|
||||||
|
],
|
||||||
|
"import-spacing": true,
|
||||||
|
"interface-over-type-literal": true,
|
||||||
|
"member-access": false,
|
||||||
|
"no-empty-interface": true,
|
||||||
|
"no-string-literal": false,
|
||||||
|
"no-string-throw": true,
|
||||||
|
"prefer-const": false,
|
||||||
|
"typeof-compare": true,
|
||||||
|
"unified-signatures": true,
|
||||||
"whitespace": [
|
"whitespace": [
|
||||||
true,
|
true,
|
||||||
"check-branch",
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-module",
|
|
||||||
"check-decl"
|
|
||||||
],
|
],
|
||||||
"ordered-imports": true
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
],
|
||||||
|
"ordered-imports": true,
|
||||||
|
"use-input-property-decorator": true,
|
||||||
|
"use-output-property-decorator": true,
|
||||||
|
"use-host-property-decorator": true,
|
||||||
|
"use-life-cycle-interface": true,
|
||||||
|
"use-pipe-transform-interface": true,
|
||||||
|
"component-class-suffix": true,
|
||||||
|
"directive-class-suffix": true,
|
||||||
|
"no-access-missing-member": true,
|
||||||
|
"templates-use-public": true,
|
||||||
|
"invoke-injectable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,8 @@ module.exports = {
|
|||||||
loader: 'tslint-loader',
|
loader: 'tslint-loader',
|
||||||
options: {
|
options: {
|
||||||
emitErrors: true,
|
emitErrors: true,
|
||||||
failOnHint: true
|
failOnHint: true,
|
||||||
|
fix: true
|
||||||
},
|
},
|
||||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||||
},
|
},
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
|
||||||
import { EventEmitter } from '@angular/core';
|
import { EventEmitter } from '@angular/core';
|
||||||
|
import { Observable } from 'rxjs/Rx';
|
||||||
|
|
||||||
export interface LangChangeEvent {
|
export interface LangChangeEvent {
|
||||||
lang: string;
|
lang: string;
|
||||||
|
@@ -15,20 +15,20 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { UserInfoComponent } from './user-info.component';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { EcmUserService } from '../services/ecm-user.service';
|
|
||||||
import { BpmUserService } from '../services/bpm-user.service';
|
|
||||||
import { fakeBpmUser } from '../assets/fake-bpm-user.service.mock';
|
|
||||||
import { TranslationMock } from '../assets/translation.service.mock';
|
|
||||||
import {
|
import {
|
||||||
CoreModule,
|
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
AlfrescoContentService,
|
||||||
AlfrescoTranslationService
|
AlfrescoTranslationService,
|
||||||
|
CoreModule
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { fakeBpmUser } from '../assets/fake-bpm-user.service.mock';
|
||||||
|
import { fakeEcmEditedUser, fakeEcmUser, fakeEcmUserNoImage } from '../assets/fake-ecm-user.service.mock';
|
||||||
|
import { TranslationMock } from '../assets/translation.service.mock';
|
||||||
|
import { BpmUserService } from '../services/bpm-user.service';
|
||||||
|
import { EcmUserService } from '../services/ecm-user.service';
|
||||||
import { BpmUserModel } from './../models/bpm-user.model';
|
import { BpmUserModel } from './../models/bpm-user.model';
|
||||||
import { fakeEcmUser, fakeEcmEditedUser, fakeEcmUserNoImage } from '../assets/fake-ecm-user.service.mock';
|
import { UserInfoComponent } from './user-info.component';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, async } from '@angular/core/testing';
|
import { async, TestBed } from '@angular/core/testing';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import { BpmUserService } from '../services/bpm-user.service';
|
|
||||||
import { BpmUserModel } from '../models/bpm-user.model';
|
import { BpmUserModel } from '../models/bpm-user.model';
|
||||||
|
import { BpmUserService } from '../services/bpm-user.service';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, async } from '@angular/core/testing';
|
import { async, TestBed } from '@angular/core/testing';
|
||||||
import { EcmUserService } from '../services/ecm-user.service';
|
import { AlfrescoAuthenticationService, AlfrescoContentService, CoreModule} from 'ng2-alfresco-core';
|
||||||
import { fakeEcmUser } from '../assets/fake-ecm-user.service.mock';
|
import { fakeEcmUser } from '../assets/fake-ecm-user.service.mock';
|
||||||
import { CoreModule, AlfrescoAuthenticationService, AlfrescoContentService} from 'ng2-alfresco-core';
|
import { EcmUserService } from '../services/ecm-user.service';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"rulesDirectory": [
|
||||||
|
"node_modules/codelyzer"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"align": [
|
"align": [
|
||||||
true,
|
true,
|
||||||
@@ -105,14 +108,50 @@
|
|||||||
"allow-leading-underscore",
|
"allow-leading-underscore",
|
||||||
"ban-keywords"
|
"ban-keywords"
|
||||||
],
|
],
|
||||||
|
"callable-types": true,
|
||||||
|
"import-blacklist": [
|
||||||
|
true,
|
||||||
|
"rxjs"
|
||||||
|
],
|
||||||
|
"import-spacing": true,
|
||||||
|
"interface-over-type-literal": true,
|
||||||
|
"member-access": false,
|
||||||
|
"no-empty-interface": true,
|
||||||
|
"no-string-literal": false,
|
||||||
|
"no-string-throw": true,
|
||||||
|
"prefer-const": false,
|
||||||
|
"typeof-compare": true,
|
||||||
|
"unified-signatures": true,
|
||||||
"whitespace": [
|
"whitespace": [
|
||||||
true,
|
true,
|
||||||
"check-branch",
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-module",
|
],
|
||||||
"check-decl"
|
"directive-selector": [
|
||||||
]
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
],
|
||||||
|
"ordered-imports": true,
|
||||||
|
"use-input-property-decorator": true,
|
||||||
|
"use-output-property-decorator": true,
|
||||||
|
"use-host-property-decorator": true,
|
||||||
|
"use-life-cycle-interface": true,
|
||||||
|
"use-pipe-transform-interface": true,
|
||||||
|
"component-class-suffix": true,
|
||||||
|
"directive-class-suffix": true,
|
||||||
|
"no-access-missing-member": true,
|
||||||
|
"templates-use-public": true,
|
||||||
|
"invoke-injectable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,8 @@ module.exports = {
|
|||||||
loader: 'tslint-loader',
|
loader: 'tslint-loader',
|
||||||
options: {
|
options: {
|
||||||
emitErrors: true,
|
emitErrors: true,
|
||||||
failOnHint: true
|
failOnHint: true,
|
||||||
|
fix: true
|
||||||
},
|
},
|
||||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||||
},
|
},
|
||||||
|
@@ -30,7 +30,7 @@ import { CoreModule } from 'ng2-alfresco-core';
|
|||||||
import { MdButtonModule, MdIconModule, MdProgressSpinnerModule } from '@angular/material';
|
import { MdButtonModule, MdIconModule, MdProgressSpinnerModule } from '@angular/material';
|
||||||
import { ImgViewerComponent } from './src/components/imgViewer.component';
|
import { ImgViewerComponent } from './src/components/imgViewer.component';
|
||||||
import { MediaPlayerComponent } from './src/components/mediaPlayer.component';
|
import { MediaPlayerComponent } from './src/components/mediaPlayer.component';
|
||||||
import { NotSupportedFormat } from './src/components/notSupportedFormat.component';
|
import { NotSupportedFormatComponent } from './src/components/notSupportedFormat.component';
|
||||||
import { PdfViewerComponent } from './src/components/pdfViewer.component';
|
import { PdfViewerComponent } from './src/components/pdfViewer.component';
|
||||||
import { TxtViewerComponent } from './src/components/txtViewer.component';
|
import { TxtViewerComponent } from './src/components/txtViewer.component';
|
||||||
import { ViewerComponent } from './src/components/viewer.component';
|
import { ViewerComponent } from './src/components/viewer.component';
|
||||||
@@ -50,7 +50,7 @@ export const VIEWER_DIRECTIVES: any[] = [
|
|||||||
ImgViewerComponent,
|
ImgViewerComponent,
|
||||||
TxtViewerComponent,
|
TxtViewerComponent,
|
||||||
MediaPlayerComponent,
|
MediaPlayerComponent,
|
||||||
NotSupportedFormat,
|
NotSupportedFormatComponent,
|
||||||
PdfViewerComponent,
|
PdfViewerComponent,
|
||||||
ExtensionViewerDirective
|
ExtensionViewerDirective
|
||||||
];
|
];
|
||||||
|
@@ -15,16 +15,16 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { DebugElement, SimpleChange } from '@angular/core';
|
||||||
import { ImgViewerComponent } from './imgViewer.component';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { DebugElement, SimpleChange } from '@angular/core';
|
|
||||||
import {
|
import {
|
||||||
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
ContentService,
|
||||||
CoreModule,
|
CoreModule
|
||||||
ContentService
|
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
import { ImgViewerComponent } from './imgViewer.component';
|
||||||
|
|
||||||
describe('Test ng2-alfresco-viewer Img viewer component ', () => {
|
describe('Test ng2-alfresco-viewer Img viewer component ', () => {
|
||||||
|
|
||||||
|
@@ -15,15 +15,15 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { DebugElement, SimpleChange } from '@angular/core';
|
||||||
import { MediaPlayerComponent } from './mediaPlayer.component';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { DebugElement, SimpleChange } from '@angular/core';
|
|
||||||
import { ContentService } from 'ng2-alfresco-core';
|
import { ContentService } from 'ng2-alfresco-core';
|
||||||
|
import { MediaPlayerComponent } from './mediaPlayer.component';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
|
||||||
CoreModule
|
CoreModule
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
|
||||||
|
@@ -15,35 +15,35 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { DebugElement } from '@angular/core';
|
||||||
import { NotSupportedFormat } from './notSupportedFormat.component';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { PdfViewerComponent } from './pdfViewer.component';
|
import { MdButtonModule, MdIconModule, MdProgressSpinnerModule } from '@angular/material';
|
||||||
import { DebugElement } from '@angular/core';
|
|
||||||
import { MdIconModule, MdButtonModule, MdProgressSpinnerModule } from '@angular/material';
|
|
||||||
import { Subject } from 'rxjs';
|
|
||||||
import {
|
import {
|
||||||
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
CoreModule,
|
|
||||||
ContentService,
|
ContentService,
|
||||||
AlfrescoApiService,
|
CoreModule,
|
||||||
LogService,
|
LogService,
|
||||||
RenditionsService
|
RenditionsService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
import { Subject } from 'rxjs/Subject';
|
||||||
|
import { NotSupportedFormatComponent } from './notSupportedFormat.component';
|
||||||
|
import { PdfViewerComponent } from './pdfViewer.component';
|
||||||
|
|
||||||
type RenditionResponse = {
|
interface RenditionResponse {
|
||||||
entry: {
|
entry: {
|
||||||
status: string
|
status: string
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('Test ng2-alfresco-viewer Not Supported Format View component', () => {
|
describe('Test ng2-alfresco-viewer Not Supported Format View component', () => {
|
||||||
|
|
||||||
const nodeId = 'not-supported-node-id';
|
const nodeId = 'not-supported-node-id';
|
||||||
|
|
||||||
let component: NotSupportedFormat;
|
let component: NotSupportedFormatComponent;
|
||||||
let service: ContentService;
|
let service: ContentService;
|
||||||
let fixture: ComponentFixture<NotSupportedFormat>;
|
let fixture: ComponentFixture<NotSupportedFormatComponent>;
|
||||||
let debug: DebugElement;
|
let debug: DebugElement;
|
||||||
let element: HTMLElement;
|
let element: HTMLElement;
|
||||||
let renditionsService: RenditionsService;
|
let renditionsService: RenditionsService;
|
||||||
@@ -60,7 +60,7 @@ describe('Test ng2-alfresco-viewer Not Supported Format View component', () => {
|
|||||||
MdProgressSpinnerModule
|
MdProgressSpinnerModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
NotSupportedFormat,
|
NotSupportedFormatComponent,
|
||||||
PdfViewerComponent
|
PdfViewerComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
@@ -75,7 +75,7 @@ describe('Test ng2-alfresco-viewer Not Supported Format View component', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(NotSupportedFormat);
|
fixture = TestBed.createComponent(NotSupportedFormatComponent);
|
||||||
service = fixture.debugElement.injector.get(ContentService);
|
service = fixture.debugElement.injector.get(ContentService);
|
||||||
debug = fixture.debugElement;
|
debug = fixture.debugElement;
|
||||||
element = fixture.nativeElement;
|
element = fixture.nativeElement;
|
||||||
|
@@ -26,7 +26,7 @@ const DEFAULT_CONVERSION_ENCODING = 'pdf';
|
|||||||
templateUrl: './notSupportedFormat.component.html',
|
templateUrl: './notSupportedFormat.component.html',
|
||||||
styleUrls: ['./notSupportedFormat.component.css']
|
styleUrls: ['./notSupportedFormat.component.css']
|
||||||
})
|
})
|
||||||
export class NotSupportedFormat implements OnInit {
|
export class NotSupportedFormatComponent implements OnInit {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
nameFile: string;
|
nameFile: string;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<!-- Start Pdf Canvas -->
|
<!-- Start Pdf Canvas -->
|
||||||
<div id="viewer-pdf-container" class="viewer-pdf-container" (keypress)=eventHandler() (window:resize)="onResize($event)">
|
<div id="viewer-pdf-container" class="viewer-pdf-container" (window:resize)="onResize($event)">
|
||||||
<div id="viewer-viewerPdf" class="pdfViewer">
|
<div id="viewer-viewerPdf" class="pdfViewer">
|
||||||
<div id="loader-container" class="loader-container">
|
<div id="loader-container" class="loader-container">
|
||||||
<div class="loader-item">
|
<div class="loader-item">
|
||||||
|
@@ -15,17 +15,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { DebugElement } from '@angular/core';
|
||||||
import { RenderingQueueServices } from '../services/rendering-queue.services';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { PdfViewerComponent } from './pdfViewer.component';
|
|
||||||
import { EventMock } from '../assets/event.mock';
|
|
||||||
import { DebugElement } from '@angular/core';
|
|
||||||
import {
|
import {
|
||||||
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
|
||||||
CoreModule
|
CoreModule
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
import { EventMock } from '../assets/event.mock';
|
||||||
|
import { RenderingQueueServices } from '../services/rendering-queue.services';
|
||||||
|
import { PdfViewerComponent } from './pdfViewer.component';
|
||||||
|
|
||||||
describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, HostListener, Input } from '@angular/core';
|
import { Component, HostListener, Input, OnChanges } from '@angular/core';
|
||||||
import { LogService } from 'ng2-alfresco-core';
|
import { LogService } from 'ng2-alfresco-core';
|
||||||
import { RenderingQueueServices } from '../services/rendering-queue.services';
|
import { RenderingQueueServices } from '../services/rendering-queue.services';
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ declare let PDFJS: any;
|
|||||||
styleUrls: ['./pdfViewer.component.css', './pdfViewerHost.component.css'],
|
styleUrls: ['./pdfViewer.component.css', './pdfViewerHost.component.css'],
|
||||||
providers: [RenderingQueueServices]
|
providers: [RenderingQueueServices]
|
||||||
})
|
})
|
||||||
export class PdfViewerComponent {
|
export class PdfViewerComponent implements OnChanges {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
urlFile: string;
|
urlFile: string;
|
||||||
@@ -97,11 +97,11 @@ export class PdfViewerComponent {
|
|||||||
this.currentPdfDocument.getPage(1).then(() => {
|
this.currentPdfDocument.getPage(1).then(() => {
|
||||||
this.scalePage('auto');
|
this.scalePage('auto');
|
||||||
resolve();
|
resolve();
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ export class PdfViewerComponent {
|
|||||||
|
|
||||||
window.document.addEventListener('scroll', (event) => {
|
window.document.addEventListener('scroll', (event) => {
|
||||||
this.watchScroll(event.target);
|
this.watchScroll(event.target);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
this.pdfViewer = new PDFJS.PDFViewer({
|
this.pdfViewer = new PDFJS.PDFViewer({
|
||||||
container: documentContainer,
|
container: documentContainer,
|
||||||
|
@@ -15,15 +15,15 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { DebugElement, SimpleChange } from '@angular/core';
|
||||||
import { TxtViewerComponent } from './txtViewer.component';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { DebugElement, SimpleChange } from '@angular/core';
|
|
||||||
import {
|
import {
|
||||||
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
|
||||||
CoreModule
|
CoreModule
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
import { TxtViewerComponent } from './txtViewer.component';
|
||||||
|
|
||||||
describe('Test ng2-alfresco-viewer Text View component', () => {
|
describe('Test ng2-alfresco-viewer Text View component', () => {
|
||||||
|
|
||||||
|
@@ -15,9 +15,9 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input, OnChanges } from '@angular/core';
|
||||||
import { SimpleChanges } from '@angular/core';
|
import { SimpleChanges } from '@angular/core';
|
||||||
import { Http, RequestOptions, Response, ResponseContentType } from '@angular/http';
|
import { Http, RequestOptions, Response, ResponseContentType } from '@angular/http';
|
||||||
import 'rxjs/add/operator/toPromise';
|
import 'rxjs/add/operator/toPromise';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -25,7 +25,7 @@ import 'rxjs/add/operator/toPromise';
|
|||||||
templateUrl: './txtViewer.component.html',
|
templateUrl: './txtViewer.component.html',
|
||||||
styleUrls: ['./txtViewer.component.css']
|
styleUrls: ['./txtViewer.component.css']
|
||||||
})
|
})
|
||||||
export class TxtViewerComponent {
|
export class TxtViewerComponent implements OnChanges {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
urlFile: any;
|
urlFile: any;
|
||||||
|
@@ -15,23 +15,23 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
import { DebugElement } from '@angular/core';
|
||||||
import { PdfViewerComponent } from './pdfViewer.component';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { TxtViewerComponent } from './txtViewer.component';
|
|
||||||
import { NotSupportedFormat } from './notSupportedFormat.component';
|
|
||||||
import { MediaPlayerComponent } from './mediaPlayer.component';
|
|
||||||
import { ImgViewerComponent } from './imgViewer.component';
|
|
||||||
import { RenderingQueueServices } from '../services/rendering-queue.services';
|
|
||||||
import { ViewerComponent } from './viewer.component';
|
|
||||||
import { EventMock } from '../assets/event.mock';
|
|
||||||
import { DebugElement } from '@angular/core';
|
|
||||||
import {
|
import {
|
||||||
|
AlfrescoApiService,
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoSettingsService,
|
AlfrescoSettingsService,
|
||||||
AlfrescoApiService,
|
|
||||||
CoreModule,
|
CoreModule,
|
||||||
RenditionsService
|
RenditionsService
|
||||||
} from 'ng2-alfresco-core';
|
} from 'ng2-alfresco-core';
|
||||||
|
import { EventMock } from '../assets/event.mock';
|
||||||
|
import { RenderingQueueServices } from '../services/rendering-queue.services';
|
||||||
|
import { ImgViewerComponent } from './imgViewer.component';
|
||||||
|
import { MediaPlayerComponent } from './mediaPlayer.component';
|
||||||
|
import { NotSupportedFormatComponent } from './notSupportedFormat.component';
|
||||||
|
import { PdfViewerComponent } from './pdfViewer.component';
|
||||||
|
import { TxtViewerComponent } from './txtViewer.component';
|
||||||
|
import { ViewerComponent } from './viewer.component';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ describe('Test ng2-alfresco-viewer ViewerComponent', () => {
|
|||||||
ViewerComponent,
|
ViewerComponent,
|
||||||
PdfViewerComponent,
|
PdfViewerComponent,
|
||||||
TxtViewerComponent,
|
TxtViewerComponent,
|
||||||
NotSupportedFormat,
|
NotSupportedFormatComponent,
|
||||||
MediaPlayerComponent,
|
MediaPlayerComponent,
|
||||||
ImgViewerComponent
|
ImgViewerComponent
|
||||||
],
|
],
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ElementRef, EventEmitter, HostListener, Inject, Input, Output, TemplateRef } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, HostListener, Inject, Input, OnChanges, OnDestroy, Output, TemplateRef } from '@angular/core';
|
||||||
import { DOCUMENT } from '@angular/platform-browser';
|
import { DOCUMENT } from '@angular/platform-browser';
|
||||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||||
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||||
@@ -25,7 +25,7 @@ import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
|||||||
templateUrl: './viewer.component.html',
|
templateUrl: './viewer.component.html',
|
||||||
styleUrls: ['./viewer.component.css']
|
styleUrls: ['./viewer.component.css']
|
||||||
})
|
})
|
||||||
export class ViewerComponent {
|
export class ViewerComponent implements OnDestroy, OnChanges {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
urlFile: string = '';
|
urlFile: string = '';
|
||||||
@@ -169,7 +169,7 @@ export class ViewerComponent {
|
|||||||
*
|
*
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
private isImage(): boolean {
|
public isImage(): boolean {
|
||||||
return this.isImageExtension() || this.isImageMimeType();
|
return this.isImageExtension() || this.isImageMimeType();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ export class ViewerComponent {
|
|||||||
*
|
*
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
private isMedia(): boolean {
|
public isMedia(): boolean {
|
||||||
return this.isMediaExtension(this.extension) || this.isMediaMimeType();
|
return this.isMediaExtension(this.extension) || this.isMediaMimeType();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ export class ViewerComponent {
|
|||||||
*
|
*
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
private isPdf(): boolean {
|
public isPdf(): boolean {
|
||||||
return this.extension === 'pdf' || this.mimeType === 'application/pdf';
|
return this.extension === 'pdf' || this.mimeType === 'application/pdf';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ export class ViewerComponent {
|
|||||||
*
|
*
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
private isText(): boolean {
|
public isText(): boolean {
|
||||||
return this.extension === 'txt' || this.mimeType === 'text/txt' || this.mimeType === 'text/plain';
|
return this.extension === 'txt' || this.mimeType === 'text/txt' || this.mimeType === 'text/plain';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,11 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ElementRef } from '@angular/core';
|
import { ElementRef } from '@angular/core';
|
||||||
import { CoreModule } from 'ng2-alfresco-core';
|
|
||||||
import { ExtensionViewerDirective } from './extension-viewer.directive';
|
|
||||||
import { ViewerComponent } from '../components/viewer.component';
|
|
||||||
import { getTestBed, TestBed, async } from '@angular/core/testing';
|
|
||||||
import { Injector } from '@angular/core';
|
import { Injector } from '@angular/core';
|
||||||
|
import { async, getTestBed, TestBed } from '@angular/core/testing';
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
import { ViewerComponent } from '../components/viewer.component';
|
||||||
|
import { ExtensionViewerDirective } from './extension-viewer.directive';
|
||||||
|
|
||||||
export class MockElementRef extends ElementRef {
|
export class MockElementRef extends ElementRef {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"rulesDirectory": [
|
||||||
|
"node_modules/codelyzer"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"align": [
|
"align": [
|
||||||
true,
|
true,
|
||||||
@@ -105,14 +108,50 @@
|
|||||||
"allow-leading-underscore",
|
"allow-leading-underscore",
|
||||||
"ban-keywords"
|
"ban-keywords"
|
||||||
],
|
],
|
||||||
|
"callable-types": true,
|
||||||
|
"import-blacklist": [
|
||||||
|
true,
|
||||||
|
"rxjs"
|
||||||
|
],
|
||||||
|
"import-spacing": true,
|
||||||
|
"interface-over-type-literal": true,
|
||||||
|
"member-access": false,
|
||||||
|
"no-empty-interface": true,
|
||||||
|
"no-string-literal": false,
|
||||||
|
"no-string-throw": true,
|
||||||
|
"prefer-const": false,
|
||||||
|
"typeof-compare": true,
|
||||||
|
"unified-signatures": true,
|
||||||
"whitespace": [
|
"whitespace": [
|
||||||
true,
|
true,
|
||||||
"check-branch",
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-module",
|
],
|
||||||
"check-decl"
|
"directive-selector": [
|
||||||
]
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
],
|
||||||
|
"ordered-imports": true,
|
||||||
|
"use-input-property-decorator": true,
|
||||||
|
"use-output-property-decorator": true,
|
||||||
|
"use-host-property-decorator": true,
|
||||||
|
"use-life-cycle-interface": true,
|
||||||
|
"use-pipe-transform-interface": true,
|
||||||
|
"component-class-suffix": true,
|
||||||
|
"directive-class-suffix": true,
|
||||||
|
"no-access-missing-member": true,
|
||||||
|
"templates-use-public": true,
|
||||||
|
"invoke-injectable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
||||||
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||||
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
|
|||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class WebscriptComponent {
|
export class WebscriptComponent implements OnChanges {
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
scriptPath: string;
|
scriptPath: string;
|
||||||
@@ -101,7 +101,7 @@ export class WebscriptComponent {
|
|||||||
this.onSuccess.emit(this.data);
|
this.onSuccess.emit(this.data);
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
this.logService.log('Error' + error);
|
this.logService.log('Error' + error);
|
||||||
reject();
|
reject();
|
||||||
});
|
});
|
||||||
|
@@ -108,15 +108,50 @@
|
|||||||
"allow-leading-underscore",
|
"allow-leading-underscore",
|
||||||
"ban-keywords"
|
"ban-keywords"
|
||||||
],
|
],
|
||||||
|
"callable-types": true,
|
||||||
|
"import-blacklist": [
|
||||||
|
true,
|
||||||
|
"rxjs"
|
||||||
|
],
|
||||||
|
"import-spacing": true,
|
||||||
|
"interface-over-type-literal": true,
|
||||||
|
"member-access": false,
|
||||||
|
"no-empty-interface": true,
|
||||||
|
"no-string-literal": false,
|
||||||
|
"no-string-throw": true,
|
||||||
|
"prefer-const": false,
|
||||||
|
"typeof-compare": true,
|
||||||
|
"unified-signatures": true,
|
||||||
"whitespace": [
|
"whitespace": [
|
||||||
true,
|
true,
|
||||||
"check-branch",
|
"check-branch",
|
||||||
|
"check-decl",
|
||||||
"check-operator",
|
"check-operator",
|
||||||
"check-separator",
|
"check-separator",
|
||||||
"check-type",
|
"check-type"
|
||||||
"check-module",
|
|
||||||
"check-decl"
|
|
||||||
],
|
],
|
||||||
"ordered-imports": true
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
],
|
||||||
|
"ordered-imports": true,
|
||||||
|
"use-input-property-decorator": true,
|
||||||
|
"use-output-property-decorator": true,
|
||||||
|
"use-host-property-decorator": true,
|
||||||
|
"use-life-cycle-interface": true,
|
||||||
|
"use-pipe-transform-interface": true,
|
||||||
|
"component-class-suffix": true,
|
||||||
|
"directive-class-suffix": true,
|
||||||
|
"no-access-missing-member": true,
|
||||||
|
"templates-use-public": true,
|
||||||
|
"invoke-injectable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user