mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix "ng lint" command (#5012)
* update to latest js-api * fix the "ng lint" command * fix linting issues * fix lint issues * lint fixes * code fixes * fix html * fix html * update tests * test fixes * update tests * fix tests and api * fix code
This commit is contained in:
committed by
Eugenio Romano
parent
140c64b79f
commit
edc0945f39
@@ -18,7 +18,7 @@
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { SitePaging, SiteEntry, MinimalNodeEntryEntity } from '@alfresco/js-api';
|
||||
import { ContentNodeDialogService, ShareDataRow, RowFilter } from '@alfresco/adf-content-services';
|
||||
import { DataRow, DataColumn, ThumbnailService } from '@alfresco/adf-core';
|
||||
import { ThumbnailService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
templateUrl: './content-node-selector.component.html',
|
||||
@@ -95,7 +95,7 @@ export class ContentNodeSelectorComponent {
|
||||
return showNode;
|
||||
}
|
||||
|
||||
customImageResolverExample(row: DataRow, col: DataColumn) {
|
||||
customImageResolverExample() {
|
||||
return this.thumbnailService.getMimeTypeIcon('video/quicktime');
|
||||
}
|
||||
|
||||
|
@@ -55,7 +55,7 @@ export class ExtensionPresetsComponent implements OnInit, OnDestroy {
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
trackById(index: number, obj: { id: string }) {
|
||||
trackById(_: number, obj: { id: string }) {
|
||||
return obj.id;
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, Site
|
||||
import {
|
||||
AlfrescoApiService, AuthenticationService, AppConfigService, AppConfigValues, ContentService, TranslationService,
|
||||
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
|
||||
UploadService, DataColumn, DataRow, UserPreferencesService,
|
||||
UploadService, DataRow, UserPreferencesService,
|
||||
PaginationComponent, FormValues, DisplayMode, InfinitePaginationComponent, HighlightDirective,
|
||||
SharedLinksApiService
|
||||
} from '@alfresco/adf-core';
|
||||
@@ -474,7 +474,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
return this.contentService.hasAllowableOperations(selection[0].entry, 'update');
|
||||
}
|
||||
|
||||
getNodeNameTooltip(row: DataRow, col: DataColumn): string {
|
||||
getNodeNameTooltip(row: DataRow): string {
|
||||
if (row) {
|
||||
return row.getValue('name');
|
||||
}
|
||||
|
@@ -18,35 +18,43 @@
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
AppConfigService, AlfrescoApiService, EcmModelService, LogService, FormService, FormOutcomeEvent
|
||||
AlfrescoApiService,
|
||||
EcmModelService,
|
||||
LogService,
|
||||
FormService,
|
||||
FormOutcomeEvent
|
||||
} from '@alfresco/adf-core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Injectable()
|
||||
export class FakeFormService extends FormService {
|
||||
|
||||
executeOutcome = new Subject<FormOutcomeEvent>();
|
||||
|
||||
constructor(appConfig: AppConfigService,
|
||||
ecmModelService: EcmModelService,
|
||||
apiService: AlfrescoApiService,
|
||||
protected logService: LogService) {
|
||||
constructor(
|
||||
ecmModelService: EcmModelService,
|
||||
apiService: AlfrescoApiService,
|
||||
protected logService: LogService
|
||||
) {
|
||||
super(ecmModelService, apiService, logService);
|
||||
}
|
||||
|
||||
public getRestFieldValues(taskId: string, fieldId: string): Observable<any> {
|
||||
public getRestFieldValues(
|
||||
taskId: string,
|
||||
fieldId: string
|
||||
): Observable<any> {
|
||||
if (fieldId === 'typeaheadField') {
|
||||
return of([
|
||||
{ 'id': '1', 'name': 'Leanne Graham' },
|
||||
{ 'id': '2', 'name': 'Ervin Howell' },
|
||||
{ 'id': '3', 'name': 'Clementine Bauch' },
|
||||
{ 'id': '4', 'name': 'Patricia Lebsack' },
|
||||
{ 'id': '5', 'name': 'Chelsey Dietrich' },
|
||||
{ 'id': '6', 'name': 'Mrs. Dennis Schulist' },
|
||||
{ 'id': '7', 'name': 'Kurtis Weissnat' },
|
||||
{ 'id': '8', 'name': 'Nicholas Runolfsdottir V' },
|
||||
{ 'id': '9', 'name': 'Glenna Reichert' },
|
||||
{ 'id': '10', 'name': 'Clementina DuBuque' }]);
|
||||
{ id: '1', name: 'Leanne Graham' },
|
||||
{ id: '2', name: 'Ervin Howell' },
|
||||
{ id: '3', name: 'Clementine Bauch' },
|
||||
{ id: '4', name: 'Patricia Lebsack' },
|
||||
{ id: '5', name: 'Chelsey Dietrich' },
|
||||
{ id: '6', name: 'Mrs. Dennis Schulist' },
|
||||
{ id: '7', name: 'Kurtis Weissnat' },
|
||||
{ id: '8', name: 'Nicholas Runolfsdottir V' },
|
||||
{ id: '9', name: 'Glenna Reichert' },
|
||||
{ id: '10', name: 'Clementina DuBuque' }
|
||||
]);
|
||||
} else {
|
||||
return super.getRestFieldValues(taskId, fieldId);
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CoreModule, TranslationService } from '@alfresco/adf-core';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
|
||||
import { LazyLoadingRoutes } from './lazy-loading.routes';
|
||||
import { LazyLoadingComponent } from './lazy-loading.component';
|
||||
@@ -30,7 +30,4 @@ import { LazyLoadingComponent } from './lazy-loading.component';
|
||||
LazyLoadingComponent
|
||||
]
|
||||
})
|
||||
export class LazyLoadingModule {
|
||||
constructor(translation: TranslationService) {
|
||||
}
|
||||
}
|
||||
export class LazyLoadingModule {}
|
||||
|
@@ -85,7 +85,7 @@
|
||||
[showRememberMe]="showFooter && showRememberMe"
|
||||
(executeSubmit)="checkForm($event)"
|
||||
copyrightText="{{ 'application.copyright' | adfAppConfig }}"
|
||||
(success)="onLogin($event)"
|
||||
(success)="onLogin()"
|
||||
(error)="onError($event)">
|
||||
<div class="adf-mobile-settings">
|
||||
<p>
|
||||
|
@@ -55,7 +55,7 @@ export class LoginComponent implements OnInit {
|
||||
this.alfrescoLogin.addCustomValidationError('password', 'required', 'LOGIN.MESSAGES.PASSWORD-REQUIRED');
|
||||
}
|
||||
|
||||
onLogin($event) {
|
||||
onLogin() {
|
||||
this.router.navigate(['/home']);
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
(error)="showErrorMessage($event)"
|
||||
(updated)="onUpdatedPermissions($event)">
|
||||
{{ (toggleStatus?'DEMO_PERMISSION.INHERITED_PERMISSIONS_BUTTON':'DEMO_PERMISSION.INHERIT_PERMISSION_BUTTON') | translate}}</button>
|
||||
<button mat-button color="primary" (click)="openAddPermissionDialog($event)" data-automation-id="adf-add-permission-button">Add User or Group</button>
|
||||
<button mat-button color="primary" (click)="openAddPermissionDialog()" data-automation-id="adf-add-permission-button">Add User or Group</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@@ -64,7 +64,7 @@ export class DemoPermissionComponent implements OnInit {
|
||||
this.displayPermissionComponent.reload();
|
||||
}
|
||||
|
||||
openAddPermissionDialog(event: Event) {
|
||||
openAddPermissionDialog() {
|
||||
this.nodePermissionDialogService
|
||||
.updateNodePermissionByDialog(this.nodeId)
|
||||
.subscribe(
|
||||
|
@@ -28,7 +28,7 @@
|
||||
[appId]="appId"
|
||||
[showIcon]="showTaskFilterIcon"
|
||||
(filterClick)="onTaskFilterClick($event)"
|
||||
(success)="onSuccessTaskFilterList($event)" #activitiFilter>
|
||||
(success)="onSuccessTaskFilterList()" #activitiFilter>
|
||||
</adf-task-filters>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
@@ -48,7 +48,7 @@
|
||||
[sort]="taskFilter?.filter?.sort"
|
||||
[landingTaskId]="currentTaskId"
|
||||
(rowClick)="onTaskRowClick($event)"
|
||||
(success)="onSuccessTaskList($event)"
|
||||
(success)="onSuccessTaskList()"
|
||||
(row-click)="onRowClick($event)"
|
||||
(row-dblclick)="onTaskRowDblClick($event)"
|
||||
[multiselect]="multiSelectTask"
|
||||
@@ -76,11 +76,11 @@
|
||||
[taskId]="currentTaskId"
|
||||
[fieldValidators]="fieldValidators"
|
||||
[showHeaderContent]="showHeaderContent"
|
||||
(formCompleted)="onFormCompleted($event)"
|
||||
(formCompleted)="onFormCompleted()"
|
||||
(formContentClicked)="onContentClick($event)"
|
||||
(taskCreated)="onTaskCreated($event)"
|
||||
(assignTask)="onAssignTask()"
|
||||
(taskDeleted)="onTaskDeleted($event)">
|
||||
(taskDeleted)="onTaskDeleted()">
|
||||
</adf-task-details>
|
||||
<mat-divider></mat-divider>
|
||||
<div *ngIf="currentTaskId">
|
||||
@@ -144,7 +144,7 @@
|
||||
[showIcon]="showProcessFilterIcon"
|
||||
(filterClick)="onProcessFilterChange($event)"
|
||||
(filterSelected)="onProcessFilterChange($event)"
|
||||
(success)="onSuccessProcessFilterList($event)">
|
||||
(success)="onSuccessProcessFilterList()">
|
||||
</adf-process-instance-filters>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
@@ -164,7 +164,7 @@
|
||||
(rowClick)="onProcessRowClick($event)"
|
||||
(row-dblclick)="onProcessRowDblClick($event)"
|
||||
[multiselect]="multiSelectProcess"
|
||||
(success)="onSuccessProcessList($event)">
|
||||
(success)="onSuccessProcessList()">
|
||||
<!-- Custom column definition demo -->
|
||||
|
||||
<!-- <data-columns>
|
||||
@@ -242,7 +242,7 @@
|
||||
[appId]="appId"
|
||||
[reportId]="report.id"
|
||||
[hideParameters]="false"
|
||||
(editReport)="onEditReport($event)"
|
||||
(editReport)="onEditReport()"
|
||||
(reportSaved)="onReportSaved($event)"
|
||||
(reportDeleted)="onReportDeleted()">
|
||||
</adf-analytics>
|
||||
|
@@ -30,7 +30,6 @@ import {
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import {
|
||||
ProcessInstanceFilterRepresentation,
|
||||
Pagination,
|
||||
UserProcessInstanceFilterRepresentation
|
||||
} from '@alfresco/js-api';
|
||||
@@ -306,7 +305,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.report = event;
|
||||
}
|
||||
|
||||
onSuccessTaskFilterList(event: any): void {
|
||||
onSuccessTaskFilterList(): void {
|
||||
this.applyTaskFilter(this.activitiFilter.getCurrentFilter());
|
||||
}
|
||||
|
||||
@@ -329,7 +328,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.reloadTaskFilters();
|
||||
}
|
||||
|
||||
onSuccessTaskList(event: FilterRepresentationModel) {
|
||||
onSuccessTaskList() {
|
||||
this.currentTaskId = this.taskList.getCurrentId();
|
||||
}
|
||||
|
||||
@@ -343,15 +342,15 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.processPage = 0;
|
||||
}
|
||||
|
||||
onSuccessProcessFilterList(event: ProcessInstanceFilterRepresentation[]): void {
|
||||
onSuccessProcessFilterList(): void {
|
||||
this.processFilter = this.activitiProcessFilter.getCurrentFilter();
|
||||
}
|
||||
|
||||
onSuccessProcessList(event: any): void {
|
||||
onSuccessProcessList(): void {
|
||||
this.currentProcessInstanceId = this.processList.getCurrentId();
|
||||
}
|
||||
|
||||
onTaskRowClick(taskId): void {
|
||||
onTaskRowClick(taskId: string): void {
|
||||
this.currentTaskId = taskId;
|
||||
}
|
||||
|
||||
@@ -365,15 +364,15 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.currentProcessInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
onProcessRowClick(processInstanceId): void {
|
||||
onProcessRowClick(processInstanceId: string): void {
|
||||
this.currentProcessInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
onEditReport(name: string): void {
|
||||
onEditReport(): void {
|
||||
this.analyticsReportList.reload();
|
||||
}
|
||||
|
||||
onReportSaved(reportId): void {
|
||||
onReportSaved(reportId: number): void {
|
||||
this.analyticsReportList.reload(reportId);
|
||||
}
|
||||
|
||||
@@ -409,12 +408,12 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
return this.currentTaskId === currentTaskIdNew;
|
||||
}
|
||||
|
||||
processCancelled(data: any): void {
|
||||
processCancelled(): void {
|
||||
this.currentProcessInstanceId = null;
|
||||
this.processList.reload();
|
||||
}
|
||||
|
||||
onFormCompleted(form): void {
|
||||
onFormCompleted(): void {
|
||||
this.currentTaskId = null;
|
||||
if (this.taskListPagination) {
|
||||
this.taskPage = this.taskListPagination.current - 1;
|
||||
@@ -468,7 +467,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.taskList.reload();
|
||||
}
|
||||
|
||||
onTaskDeleted(data: any): void {
|
||||
onTaskDeleted(): void {
|
||||
this.taskList.reload();
|
||||
}
|
||||
|
||||
|
@@ -11,6 +11,7 @@
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"target": "es5",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"typeRoots": [
|
||||
|
Reference in New Issue
Block a user