[AAE-7100] ESLint support for ADF Core and DemoShell projects (#7481)

* remove tsconfig.base as per eslint schematics

* add schematics

* upgrade demoshell to eslint

* fix eslint issues for demoshell

* integrate eslint for ADF core and fix some issues

* turn into warn

* fix code

* workaround for Chrome clipboard issue

* exclude e2e tests

* exclude e2e
This commit is contained in:
Denys Vuika
2022-02-02 18:01:47 +00:00
committed by GitHub
parent 6ef4838688
commit b8bb234410
192 changed files with 2553 additions and 483 deletions

View File

@@ -25,7 +25,7 @@ import { ThemePalette } from '@angular/material/core';
@Component({
templateUrl: './app-layout.component.html',
styleUrls: ['./app-layout.component.scss'],
host: { 'class': 'app-layout' },
host: { class: 'app-layout' },
encapsulation: ViewEncapsulation.None
})
export class AppLayoutComponent implements OnInit, OnDestroy {

View File

@@ -72,7 +72,7 @@ export class FormCloudDemoComponent implements OnInit, OnDestroy {
'custom-something': () => CustomWidgetComponent,
'custom-boolean': () => CustomWidgetComponent,
'custom-date': () => CustomWidgetComponent,
'custom': () => CustomWidgetComponent
custom: () => CustomWidgetComponent
});
}
@@ -122,7 +122,7 @@ export class FormCloudDemoComponent implements OnInit, OnDestroy {
const fileReader = new FileReader();
fileReader.onload = () => {
this.formConfig = <string> fileReader.result;
this.formConfig = fileReader.result as string;
};
fileReader.readAsText(file);

View File

@@ -231,6 +231,7 @@ export class CardViewComponent implements OnInit, OnDestroy {
value: of([
{ icon: 'directions_bike', value: 'Zlatan' },
{ icon: 'directions_bike', value: 'Lionel Messi' },
// eslint-disable-next-line @typescript-eslint/naming-convention
{ value: 'Mohamed', directions_bike: 'save' },
{ value: 'Ronaldo' }
]),

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, ViewEncapsulation } from '@angular/core';
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { CloudLayoutService } from '../services/cloud-layout.service';
@@ -31,7 +31,7 @@ import { CloudLayoutService } from '../services/cloud-layout.service';
`],
encapsulation: ViewEncapsulation.None
})
export class CommunityCloudComponent {
export class CommunityCloudComponent implements OnInit {
constructor(
private router: Router,

View File

@@ -31,13 +31,13 @@ import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { Pagination } from '@alfresco/js-api';
const PROCESS_FILTER_PROPERTY_KEYS = 'adf-edit-process-filter';
const ACTION_SAVE_AS = 'saveAs';
@Component({
templateUrl: './community-processes-cloud.component.html'
})
export class CommunityProcessesCloudDemoComponent implements OnInit, OnDestroy {
public static ACTION_SAVE_AS = 'saveAs';
static PROCESS_FILTER_PROPERTY_KEYS = 'adf-edit-process-filter';
@ViewChild('processCloud')
processCloud: ProcessListCloudComponent;
@@ -66,7 +66,7 @@ export class CommunityProcessesCloudDemoComponent implements OnInit, OnDestroy {
private processFilterCloudService: ProcessFilterCloudService,
private appConfig: AppConfigService) {
const properties = this.appConfig.get<Array<any>>(
CommunityProcessesCloudDemoComponent.PROCESS_FILTER_PROPERTY_KEYS
PROCESS_FILTER_PROPERTY_KEYS
);
if (properties) {
@@ -138,7 +138,7 @@ export class CommunityProcessesCloudDemoComponent implements OnInit, OnDestroy {
onProcessFilterAction(filterAction: any) {
this.cloudLayoutService.setCurrentProcessFilterParam({ id: filterAction.filter.id });
if (filterAction.actionType === CommunityProcessesCloudDemoComponent.ACTION_SAVE_AS) {
if (filterAction.actionType === ACTION_SAVE_AS) {
this.router.navigate([`/cloud/community/processes/`], { queryParams: filterAction.filter });
}
}

View File

@@ -24,17 +24,14 @@ import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { Pagination } from '@alfresco/js-api';
const ACTION_SAVE_AS = 'saveAs';
const TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
@Component({
templateUrl: './community-task-cloud.component.html',
styles: [`.adf-cloud-layout-tab-body .mat-tab-body-wrapper {
height: 100%;
}
`]
styles: [`.adf-cloud-layout-tab-body .mat-tab-body-wrapper { height: 100%; }`]
})
export class CommunityTasksCloudDemoComponent implements OnInit, OnDestroy {
public static ACTION_SAVE_AS = 'saveAs';
static TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
@ViewChild('taskCloud')
taskCloud: TaskListCloudComponent;
@@ -63,7 +60,7 @@ export class CommunityTasksCloudDemoComponent implements OnInit, OnDestroy {
private userPreference: UserPreferencesService,
private appConfig: AppConfigService) {
const properties = this.appConfig.get<Array<any>>(CommunityTasksCloudDemoComponent.TASK_FILTER_PROPERTY_KEYS);
const properties = this.appConfig.get<Array<any>>(TASK_FILTER_PROPERTY_KEYS);
if (properties) {
this.taskFilterProperties = properties;
}
@@ -137,7 +134,7 @@ export class CommunityTasksCloudDemoComponent implements OnInit, OnDestroy {
onTaskFilterAction(filterAction: any) {
this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
if (filterAction.actionType === CommunityTasksCloudDemoComponent.ACTION_SAVE_AS) {
if (filterAction.actionType === ACTION_SAVE_AS) {
this.router.navigate([`/cloud/community/tasks/`], { queryParams: filterAction.filter });
}
}

View File

@@ -17,7 +17,7 @@
import { Component, OnInit } from '@angular/core';
import { FormService, WidgetComponent } from '@alfresco/adf-core';
// tslint:disable:component-selector
/* eslint-disable @angular-eslint/component-selector */
@Component({
selector: 'custom-editor-widget',

View File

@@ -27,7 +27,7 @@
<input matInput (input)="setPeopleAppName($any($event).target?.value)" data-automation-id="app-people-app-input" />
</mat-form-field>
<mat-form-field class="app-preselect-value-full">
<mat-label>{{ 'PEOPLE_GROUPS_CLOUD.PRESELECTED_VALUE' | translate }} {{ DEFAULT_PEOPLE_PLACEHOLDER }}</mat-label>
<mat-label>{{ 'PEOPLE_GROUPS_CLOUD.PRESELECTED_VALUE' | translate }} {{ defaultPeoplePlaceholder }}</mat-label>
<input matInput (input)="setPeoplePreselectValue($any($event).target?.value)" data-automation-id="app-people-preselect-input" />
</mat-form-field>
<mat-checkbox class="app-preselect-value" (change)="onChangePeopleValidation($event)">{{
@@ -102,7 +102,7 @@
data-automation-id="app-group-app-input"/>
</mat-form-field>
<mat-form-field class="app-preselect-value-full">
<mat-label>Preselect: {{ DEFAULT_GROUP_PLACEHOLDER }}</mat-label>
<mat-label>Preselect: {{ defaultGroupPlaceholder }}</mat-label>
<input matInput
(input)="setGroupsPreselectValue($any($event).target?.value)"
data-automation-id="app-group-preselect-input" />

View File

@@ -29,16 +29,16 @@ import { IdentityGroupModel, IdentityUserModel } from '@alfresco/adf-core';
})
export class PeopleGroupCloudDemoComponent {
DEFAULT_FILTER_MODE: string = 'appName';
DEFAULT_GROUP_PLACEHOLDER: string = `[{"id": "1", "name":"activitiUserGroup"}]`;
DEFAULT_PEOPLE_PLACEHOLDER: string = `[{"id": "1", email": "user@user.com", "firstName":"user", "lastName": "lastName", "username": "user"}]`;
defaultFilterMode: string = 'appName';
defaultGroupPlaceholder: string = `[{"id": "1", "name":"activitiUserGroup"}]`;
defaultPeoplePlaceholder: string = `[{"id": "1", email": "user@user.com", "firstName":"user", "lastName": "lastName", "username": "user"}]`;
peopleMode: ComponentSelectionMode = 'single';
preSelectUsers: IdentityUserModel[] = [];
invalidUsers: IdentityUserModel[] = [];
peopleRoles: string[] = [];
peopleAppName: string;
peopleFilterMode: string = this.DEFAULT_FILTER_MODE;
peopleFilterMode: string = this.defaultFilterMode;
peoplePreselectValidation = false;
groupPreselectValidation = false;
peopleReadonly = false;
@@ -49,7 +49,7 @@ export class PeopleGroupCloudDemoComponent {
invalidGroups: IdentityGroupModel[] = [];
groupRoles: string[];
groupAppName: string;
groupFilterMode: string = this.DEFAULT_FILTER_MODE;
groupFilterMode: string = this.defaultFilterMode;
setPeoplePreselectValue(value: string): void {
this.preSelectUsers = this.getArrayFromString(value);

View File

@@ -39,7 +39,7 @@ export class ProcessCloudLayoutComponent {
'custom-something': () => CustomWidgetComponent,
'custom-boolean': () => CustomWidgetComponent,
'custom-date': () => CustomWidgetComponent,
'custom': () => CustomWidgetComponent
custom: () => CustomWidgetComponent
});
}
}

View File

@@ -41,8 +41,8 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
actionMenu: boolean;
contextMenu: boolean;
actions: any[] = [];
selectedAction: { id: number, name: string, actionType: string};
selectedContextAction: { id: number, name: string, actionType: string};
selectedAction: { id: number; name: string; actionType: string};
selectedContextAction: { id: number; name: string; actionType: string};
filterProperties: string[];
filterSortProperties: string[];
@@ -145,14 +145,12 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
}
onShowRowContextMenu(event: DataCellEvent) {
event.value.actions = this.actions.map((action) => {
return {
event.value.actions = this.actions.map((action) => ({
data: event.value.row['obj'],
model: action,
subject: this.performAction$
};
});
}));
}
onExecuteRowAction(row: any) {

View File

@@ -22,15 +22,12 @@ import { CloudLayoutService, CloudServiceSettings } from './services/cloud-layou
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
const TASK_FILTER_PROPERTY_KEYS = 'adf-edit-service-task-filter';
@Component({
templateUrl: './service-task-list-cloud-demo.component.html'
})
export class ServiceTaskListCloudDemoComponent implements OnInit, OnDestroy {
public static ACTION_SAVE_AS = 'saveAs';
public static ACTION_DELETE = 'delete';
static TASK_FILTER_PROPERTY_KEYS = 'adf-edit-service-task-filter';
@ViewChild('taskCloud')
taskCloud: ServiceTaskListCloudComponent;
@@ -49,8 +46,8 @@ export class ServiceTaskListCloudDemoComponent implements OnInit, OnDestroy {
actionMenu: boolean;
contextMenu: boolean;
actions: any[] = [];
selectedAction: { id: number, name: string, actionType: string};
selectedContextAction: { id: number, name: string, actionType: string};
selectedAction: { id: number; name: string; actionType: string};
selectedContextAction: { id: number; name: string; actionType: string};
selectionMode: string;
filterId: string;
@@ -61,7 +58,7 @@ export class ServiceTaskListCloudDemoComponent implements OnInit, OnDestroy {
private userPreference: UserPreferencesService,
private appConfig: AppConfigService) {
const properties = this.appConfig.get<Array<any>>(ServiceTaskListCloudDemoComponent.TASK_FILTER_PROPERTY_KEYS);
const properties = this.appConfig.get<Array<any>>(TASK_FILTER_PROPERTY_KEYS);
if (properties === this.taskFilterProperties) {
this.taskFilterProperties = properties;
}

View File

@@ -45,11 +45,11 @@ export class CloudProcessFiltersService {
);
}
readQueryParams(obj: Object): ProcessFilterCloudModel {
readQueryParams(obj: any): ProcessFilterCloudModel {
return this.processFilterCloudService.readQueryParams(obj);
}
writeQueryParams(value: Object, appName?: string, id?: string): Object {
writeQueryParams(value: any, appName?: string, id?: string): any {
return this.processFilterCloudService.writeQueryParams(value, this.filterProperties, appName, id);
}
}

View File

@@ -114,7 +114,7 @@ export class CloudSettingsComponent implements OnInit, OnDestroy {
}
addAction() {
this.actions.push(<ActionMenuModel> this.actionMenuForm.value);
this.actions.push(this.actionMenuForm.value);
this.actionMenuForm.get('key').reset();
this.actionMenuForm.get('title').reset();
this.actionMenuForm.get('icon').reset();

View File

@@ -23,15 +23,14 @@ import { CloudLayoutService } from './services/cloud-layout.service';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
const ACTION_SAVE_AS = 'saveAs';
const ACTION_DELETE = 'delete';
const TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
@Component({
templateUrl: './tasks-cloud-demo.component.html'
})
export class TasksCloudDemoComponent implements OnInit, OnDestroy {
public static ACTION_SAVE_AS = 'saveAs';
public static ACTION_DELETE = 'delete';
static TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
@ViewChild('taskCloud')
taskCloud: TaskListCloudComponent;
@@ -51,8 +50,8 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
actionMenu: boolean;
contextMenu: boolean;
actions: any[] = [];
selectedAction: { id: number, name: string, actionType: string};
selectedContextAction: { id: number, name: string, actionType: string};
selectedAction: { id: number; name: string; actionType: string};
selectedContextAction: { id: number; name: string; actionType: string};
testingMode: boolean;
selectionMode: string;
taskDetailsRedirection: boolean;
@@ -67,7 +66,7 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
private userPreference: UserPreferencesService,
private appConfig: AppConfigService) {
const properties = this.appConfig.get<Array<any>>(TasksCloudDemoComponent.TASK_FILTER_PROPERTY_KEYS);
const properties = this.appConfig.get<Array<any>>(TASK_FILTER_PROPERTY_KEYS);
if (properties) {
this.taskFilterProperties = properties;
}
@@ -134,13 +133,13 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
onTaskFilterAction(filterAction: any) {
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_DELETE) {
if (filterAction.actionType === ACTION_DELETE) {
this.cloudLayoutService.setCurrentTaskFilterParam({ index: 0 });
} else {
this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
}
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_SAVE_AS) {
if (filterAction.actionType === ACTION_SAVE_AS) {
this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: filterAction.filter });
}
}
@@ -150,14 +149,12 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
}
onShowRowContextMenu(event: DataCellEvent) {
event.value.actions = this.actions.map((action) => {
return {
event.value.actions = this.actions.map((action) => ({
data: event.value.row['obj'],
model: action,
subject: this.performAction$
};
});
}));
}
onExecuteRowAction(row: any) {

View File

@@ -53,7 +53,7 @@ export class ConfirmDialogExampleComponent {
const dialog = this.dialog.open(ConfirmDialogComponent, {
data: {
title: 'Upload',
thirdOptionLabel: thirdOptionLabel,
thirdOptionLabel,
message: `This is the default message`
},
minWidth: '250px'

View File

@@ -73,8 +73,8 @@ export class DataTableComponent {
{ value: 'multiple', viewValue: 'Multiple' }
];
private _imageUrl = 'http://placehold.it/140x100';
private _createdBy: any = {
private imageUrl = 'http://placehold.it/140x100';
private createdBy: any = {
name: 'Administrator',
email: 'admin@alfresco.com'
};
@@ -91,7 +91,7 @@ export class DataTableComponent {
if (col.key === 'status') {
const users = row.getValue('users');
return (value || []).map((status, index) => ({ 'name': `${users[index].firstName} ${users[index].lastName}`, status }));
return (value || []).map((status, index) => ({ name: `${users[index].firstName} ${users[index].lastName}`, status }));
}
return value;
@@ -110,7 +110,7 @@ export class DataTableComponent {
Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum.`,
createdOn: new Date(2016, 6, 2, 15, 8, 1),
createdBy: this._createdBy,
createdBy: this.createdBy,
icon: 'material-icons://folder_open',
json: null,
users: [
@@ -132,7 +132,7 @@ export class DataTableComponent {
id: 2,
name: 'Name 2',
createdOn: new Date(2016, 6, 2, 15, 8, 2),
createdBy: this._createdBy,
createdBy: this.createdBy,
icon: 'material-icons://accessibility',
json: null,
users: [
@@ -154,7 +154,7 @@ export class DataTableComponent {
id: 3,
name: 'Name 3',
createdOn: new Date(2016, 6, 2, 15, 8, 3),
createdBy: this._createdBy,
createdBy: this.createdBy,
icon: 'material-icons://alarm',
json: null,
users: [
@@ -176,7 +176,7 @@ export class DataTableComponent {
id: 4,
name: 'Image 8',
createdOn: new Date(2016, 6, 2, 15, 8, 4),
createdBy: this._createdBy,
createdBy: this.createdBy,
icon: 'material-icons://alarm',
json: {
id: 4,
@@ -207,7 +207,7 @@ export class DataTableComponent {
id: 5,
name: 'I am using custom resolver',
createdOn: new Date(2016, 6, 2, 15, 8, 4),
createdBy: this._createdBy,
createdBy: this.createdBy,
icon: 'material-icons://person_outline',
users: [
{
@@ -244,11 +244,11 @@ export class DataTableComponent {
addRow() {
const id = this.data.getRows().length + 1;
const row = new ObjectDataRow({
id: id,
id,
name: 'Name ' + id,
createdOn: new Date(),
icon: 'material-icons://extension',
createdBy: this._createdBy
createdBy: this.createdBy
});
this.data.getRows().push(row);
this.data.sort();
@@ -259,30 +259,30 @@ export class DataTableComponent {
{
id: 10,
name: 'Name 10',
createdBy: this._createdBy,
createdBy: this.createdBy,
createdOn: new Date(2016, 6, 2, 15, 8, 5),
icon: 'material-icons://face'
},
{
id: 11,
name: 'Name 11',
createdBy: this._createdBy,
createdBy: this.createdBy,
createdOn: new Date(2016, 6, 2, 15, 8, 6),
icon: 'material-icons://language'
},
{
id: 12,
name: 'Name 12',
createdBy: this._createdBy,
createdBy: this.createdBy,
createdOn: new Date(2016, 6, 2, 15, 8, 7),
icon: 'material-icons://pets'
},
{
id: 13,
name: 'Image 13',
createdBy: this._createdBy,
createdBy: this.createdBy,
createdOn: new Date(2016, 6, 2, 15, 8, 8),
icon: this._imageUrl
icon: this.imageUrl
}
];
const rows = objects.map((obj) => new ObjectDataRow(obj));

View File

@@ -262,10 +262,10 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit() {
if (!this.pagination) {
this.pagination = <Pagination> {
this.pagination = {
maxItems: this.preference.paginationSize,
skipCount: 0
};
} as Pagination;
}
if (this.route) {
@@ -345,7 +345,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
ngOnChanges(changes: SimpleChanges) {
if (changes.nodeResult && changes.nodeResult.currentValue) {
this.nodeResult = <NodePaging> changes.nodeResult.currentValue;
this.nodeResult = changes.nodeResult.currentValue;
this.pagination = this.nodeResult.list.pagination;
}
if (!this.pagination) {
@@ -354,12 +354,12 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
}
giveDefaultPaginationWhenNotDefined() {
this.pagination = <Pagination> {
this.pagination = {
maxItems: this.preference.paginationSize,
skipCount: 0,
totalItems: 0,
hasMoreItems: false
};
} as Pagination;
}
getCurrentDocumentListNode(): MinimalNodeEntity[] {
@@ -650,8 +650,11 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
if (this.contentService.hasAllowableOperations(contentEntry, 'update')) {
this.dialog.open(VersionManagerDialogAdapterComponent, {
data: {
contentEntry: contentEntry, showComments: showComments, allowDownload: allowDownload,
newFileVersion: newFileVersion, showComparison: true
contentEntry,
showComments,
allowDownload,
newFileVersion,
showComparison: true
},
panelClass: 'adf-version-manager-dialog',
width: '630px'

View File

@@ -106,7 +106,7 @@ export class FormComponent implements OnInit, OnDestroy {
const fileReader = new FileReader();
fileReader.onload = () => {
this.formConfig = <string> fileReader.result;
this.formConfig = fileReader.result as string;
};
fileReader.readAsText(file);

View File

@@ -21,7 +21,7 @@ import { ThemePalette } from '@angular/material/core';
@Injectable({
providedIn: 'root'
})
// tslint:disable-next-line: directive-class-suffix
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export class HeaderDataService {
show = true;

View File

@@ -72,7 +72,7 @@
</mat-expansion-panel-header>
<mat-form-field class="app-input-field">
<input matInput placeholder="Number" [(ngModel)]="number">
<input matInput placeholder="Number" [(ngModel)]="numberValue">
</mat-form-field>
<mat-form-field class="app-input-field">
<input matInput placeholder="Min Integer Digits" [(ngModel)]="decimalValues.minIntegerDigits">
@@ -93,16 +93,16 @@
</mat-form-field>
<h3>AdfDecimalNumber Pipe - Default</h3>
<div>{{ number | adfDecimalNumber }} </div>
<div>{{ numberValue | adfDecimalNumber }} </div>
<br>
<h3>AdfDecimalNumber Pipe - Custom digits config</h3>
<div>{{ number | adfDecimalNumber : decimalValues }} </div>
<div>{{ numberValue | adfDecimalNumber : decimalValues }} </div>
<br>
<h3>AdfDecimalNumber Pipe - Custom locale</h3>
<div>{{ number | adfDecimalNumber : null : locale }} </div>
<div>{{ numberValue | adfDecimalNumber : null : locale }} </div>
<br>
<h3>AdfDecimalNumber Pipe - Custom digits config and locale</h3>
<div>{{ number | adfDecimalNumber : decimalValues : locale }} </div>
<div>{{ numberValue | adfDecimalNumber : decimalValues : locale }} </div>
<br>
</mat-expansion-panel>

View File

@@ -28,7 +28,7 @@ export class PipesComponent {
today = new Date();
locale: string;
format: string;
number = 12345.56;
numberValue = 12345.56;
decimalValues = {
minIntegerDigits: undefined,
minFractionDigits: undefined,

View File

@@ -21,25 +21,22 @@ import { ActivatedRoute, Params } from '@angular/router';
import { debounceTime, takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
const DEFAULT_SIZE = 20;
@Component({
templateUrl: './process-list-demo.component.html',
styleUrls: [`./process-list-demo.component.scss`]
})
export class ProcessListDemoComponent implements OnInit, OnDestroy {
DEFAULT_SIZE = 20;
minValue = 0;
processListForm: FormGroup;
appId: number;
processDefId: string;
processInsId: string;
state: string;
sort: string;
size: number = this.DEFAULT_SIZE;
size: number = DEFAULT_SIZE;
page: number = 0;
presetColumn = 'default';
@@ -140,7 +137,7 @@ export class ProcessListDemoComponent implements OnInit, OnDestroy {
this.processDefId = null;
this.state = this.stateOptions[0].value;
this.sort = null;
this.size = this.DEFAULT_SIZE;
this.size = DEFAULT_SIZE;
this.page = null;
}

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
/* tslint:disable */
/* eslint-disable */
import { Component, NgModule } from '@angular/core';
import { WidgetComponent } from '@alfresco/adf-core';

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
// tslint:disable-next-line:adf-file-name
// eslint-disable-next-line
import {
AfterViewInit,
Component,

View File

@@ -30,10 +30,10 @@ export class TestSearchConfigurationService implements SearchConfigurationInterf
include: ['path', 'allowableOperations'],
paging: {
maxItems: maxResults,
skipCount: skipCount
skipCount
},
filterQueries: [
/*tslint:disable-next-line */
/* eslint-disable-next-line */
{ query: "TYPE:'cm:folder'" },
{ query: 'NOT cm:creator:System' }]
};

View File

@@ -23,7 +23,7 @@ import { ActivatedRoute, Router } from '@angular/router';
templateUrl: './shared-link-view.component.html',
styleUrls: [ './shared-link-view.component.scss' ],
encapsulation: ViewEncapsulation.None,
// tslint:disable-next-line:use-host-property-decorator
// eslint-disable-next-line
host: { 'class': 'app-shared-link-view' }
})
export class SharedLinkViewComponent implements OnInit {

View File

@@ -22,6 +22,8 @@ import { debounceTime, takeUntil } from 'rxjs/operators';
import moment from 'moment-es6';
import { Subject } from 'rxjs';
const DEFAULT_SIZE = 20;
@Component({
selector: 'app-task-list-demo',
templateUrl: './task-list-demo.component.html',
@@ -29,8 +31,6 @@ import { Subject } from 'rxjs';
})
export class TaskListDemoComponent implements OnInit, OnDestroy {
DEFAULT_SIZE = 20;
taskListForm: FormGroup;
errorMessage: string;
@@ -46,7 +46,7 @@ export class TaskListDemoComponent implements OnInit, OnDestroy {
name: string;
sort: string;
start: number;
size: number = this.DEFAULT_SIZE;
size: number = DEFAULT_SIZE;
page: number = 0;
dueAfter: string;
dueBefore: string;
@@ -184,7 +184,7 @@ export class TaskListDemoComponent implements OnInit, OnDestroy {
this.state = null;
this.sort = null;
this.start = null;
this.size = this.DEFAULT_SIZE;
this.size = DEFAULT_SIZE;
this.page = null;
this.dueAfter = null;
this.dueBefore = null;

View File

@@ -112,7 +112,7 @@ export class ThemePickerComponent {
];
constructor(public styleManager: StyleManager,
private _themeStorage: ThemeStorage) {
private themeStorage: ThemeStorage) {
}
@@ -120,17 +120,17 @@ export class ThemePickerComponent {
if (theme.isDefault === true) {
this.styleManager.setStyle('theme', ``);
} else {
this.currentTheme = this._getCurrentThemeFromHref(theme.href);
this.currentTheme = this.getCurrentThemeFromHref(theme.href);
this.styleManager.setStyle('theme', theme.href);
if (this.currentTheme) {
this._themeStorage.storeTheme(this.currentTheme);
this.themeStorage.storeTheme(this.currentTheme);
}
}
}
private _getCurrentThemeFromHref(href: string): DocsSiteTheme {
private getCurrentThemeFromHref(href: string): DocsSiteTheme {
return this.themes.find((theme) => theme.href === href);
}
}

View File

@@ -24,14 +24,14 @@ import { Observable, Subject } from 'rxjs';
interface ProcessServiceData {
rest: {
fields: Array<{
processId?: string,
taskId?: string,
fieldId?: string,
processId?: string;
taskId?: string;
fieldId?: string;
values?: Array<{
id: string,
name: string
}>
}>
id: string;
name: string;
}>;
}>;
};
}
//
@@ -84,7 +84,7 @@ export class InMemoryFormService extends FormService {
const form = new FormModel(flattenForm, formValues, readOnly, this, prefixedSpace);
if (!json.fields) {
form.outcomes = [
new FormOutcomeModel(<any> form, {
new FormOutcomeModel(form, {
id: '$save',
name: FormOutcomeModel.SAVE_ACTION,
isSystem: true

View File

@@ -1,5 +1,5 @@
/* SystemJS module definition */
declare var module: NodeModule;
declare const module: NodeModule;
interface NodeModule {
id: string;
}