mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -20,7 +20,7 @@ import { EventEmitter, Input, Output, Directive } from '@angular/core';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
|
||||
@Directive()
|
||||
// tslint:disable-next-line: directive-class-suffix
|
||||
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
||||
export abstract class FormBaseComponent {
|
||||
|
||||
static SAVE_OUTCOME_ID: string = '$save';
|
||||
|
@@ -35,7 +35,7 @@ import { WidgetVisibilityService } from './../../services/widget-visibility.serv
|
||||
import { FormFieldModel } from './../widgets/core/form-field.model';
|
||||
import { WidgetComponent } from './../widgets/widget.component';
|
||||
|
||||
declare var adf: any;
|
||||
declare const adf: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-form-field',
|
||||
@@ -63,7 +63,7 @@ export class FormFieldComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
field: FormFieldModel = null;
|
||||
|
||||
componentRef: ComponentRef<{}>;
|
||||
componentRef: ComponentRef<any>;
|
||||
|
||||
focus: boolean = false;
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation, InjectionToken, Inject, Optional } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector no-input-rename */
|
||||
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
|
||||
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { ContainerColumnModel } from './../core/container-column.model';
|
||||
import { ContainerModel } from './../core/container.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { AfterViewInit, Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export class ContainerColumnModel {
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { FormFieldModel } from './form-field.model';
|
||||
import { FormWidgetModel } from './form-widget.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { RelatedContentRepresentation } from '@alfresco/js-api';
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export interface DisplayableCMProperties {
|
||||
name?: string;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export class ErrorMessageModel {
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export interface ExternalContentLink {
|
||||
contentAvailable: boolean;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export interface ExternalContent {
|
||||
folder: boolean;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { FormFieldSelectedFolder } from './form-field-selected-folder';
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { DisplayableCMProperties } from './displayable-cm-properties.model';
|
||||
import { FormFieldFileSource } from './form-field-file-source';
|
||||
@@ -31,10 +31,10 @@ export interface FormFieldMetadata {
|
||||
};
|
||||
responseVariable?: boolean;
|
||||
menuOptions?: {
|
||||
show?: boolean,
|
||||
download?: boolean,
|
||||
retrieveMetadata?: boolean,
|
||||
remove?: boolean
|
||||
show?: boolean;
|
||||
download?: boolean;
|
||||
retrieveMetadata?: boolean;
|
||||
remove?: boolean;
|
||||
};
|
||||
displayableCMProperties?: DisplayableCMProperties[];
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export interface FormFieldOption {
|
||||
id: string;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export interface FormFieldSelectedFolder {
|
||||
accountId: string;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export interface FormFieldTemplates {
|
||||
[key: string]: string;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export class FormFieldTypes {
|
||||
static CONTAINER: string = 'container';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import moment from 'moment-es6';
|
||||
import { FormFieldTypes } from './form-field-types';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
import moment from 'moment-es6';
|
||||
import { WidgetVisibilityModel } from '../../../models/widget-visibility.model';
|
||||
import { ContainerColumnModel } from './container-column.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { FormOutcomeModel } from './form-outcome.model';
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { FormWidgetModel } from './form-widget.model';
|
||||
import { WidgetVisibilityModel } from './../../../models/widget-visibility.model';
|
||||
|
@@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import { FormFieldMetadata } from './form-field-metadata';
|
||||
|
||||
export interface FormValues extends FormFieldMetadata {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export abstract class FormWidgetModel {
|
||||
|
||||
|
@@ -43,7 +43,7 @@ export interface FormRepresentationModel {
|
||||
taskName?: string;
|
||||
processDefinitionId?: string;
|
||||
customFieldTemplates?: {
|
||||
[key: string]: string
|
||||
[key: string]: string;
|
||||
};
|
||||
selectedOutcome?: string;
|
||||
fields?: any[];
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export * from './form-field-metadata';
|
||||
export * from './form-values';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { WidgetVisibilityModel } from '../../../models/widget-visibility.model';
|
||||
import { FormWidgetModel } from './form-widget.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { UserPreferencesService, UserPreferenceValues } from '../../../../services/user-preferences.service';
|
||||
import { MomentDateAdapter } from '../../../../utils/moment-date-adapter';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { DynamicTableColumn } from './dynamic-table-column.model';
|
||||
import { DynamicTableRow } from './dynamic-table-row.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import moment from 'moment-es6';
|
||||
import { CellValidator } from './cell-validator.model';
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ErrorMessageModel } from '../core/error-message.model';
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export class DynamicRowValidationSummary extends ErrorMessageModel {
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
// maps to: com.activiti.model.editor.form.OptionRepresentation
|
||||
export interface DynamicTableColumnOption {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { DynamicTableColumnOption } from './dynamic-table-column-option.model';
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
export interface DynamicTableRow {
|
||||
isNew: boolean;
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import moment from 'moment-es6';
|
||||
import { ValidateDynamicTableRowEvent } from '../../../events/validate-dynamic-table-row.event';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { ChangeDetectorRef, Component, ElementRef, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { DynamicTableColumn } from './../../dynamic-table-column.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { DynamicTableColumn } from './../../dynamic-table-column.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { UserPreferencesService, UserPreferenceValues } from '../../../../../../services/user-preferences.service';
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { UserPreferencesService, UserPreferenceValues } from '../../../../../../services/user-preferences.service';
|
||||
import { MomentDateAdapter } from '../../../../../../utils/moment-date-adapter';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { LogService } from '../../../../../../services/log.service';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { DynamicRowValidationSummary } from './../dynamic-row-validation-summary.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { DynamicTableColumn } from './../../dynamic-table-column.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { CellValidator } from './cell-validator.model';
|
||||
import { DynamicRowValidationSummary } from './dynamic-row-validation-summary.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { CellValidator } from './cell-validator.model';
|
||||
import { DynamicRowValidationSummary } from './dynamic-row-validation-summary.model';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { animate, state, style, transition, trigger } from '@angular/animations';
|
||||
import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core';
|
||||
|
@@ -19,7 +19,7 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
import { WidgetComponent } from './../widget.component';
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
@Component({
|
||||
selector: 'file-viewer-widget',
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, ElementRef, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from '../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector no-input-rename */
|
||||
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
|
||||
|
||||
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { PeopleProcessService } from '../../../../services/people-process.service';
|
||||
import { UserProcessModel } from '../../../../models';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { AfterContentChecked, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
|
||||
import { FormFieldModel, TabModel } from './../core/index';
|
||||
@@ -44,9 +44,7 @@ export class TabsWidgetComponent implements AfterContentChecked {
|
||||
}
|
||||
|
||||
filterVisibleTabs() {
|
||||
this.visibleTabs = this.tabs.filter((tab) => {
|
||||
return tab.isVisible;
|
||||
});
|
||||
this.visibleTabs = this.tabs.filter((tab) => tab.isVisible);
|
||||
}
|
||||
|
||||
tabChanged(field: FormFieldModel) {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable: component-selector no-use-before-declare no-input-rename */
|
||||
/* eslint-disable @angular-eslint/component-selector, @typescript-eslint/no-use-before-define, @angular-eslint/no-input-rename */
|
||||
|
||||
import {
|
||||
Directive,
|
||||
@@ -46,8 +46,8 @@ export class InputMaskDirective implements OnChanges, ControlValueAccessor {
|
||||
|
||||
/** Object defining mask and "reversed" status. */
|
||||
@Input('textMask') inputMask: {
|
||||
mask: string,
|
||||
isReversed: boolean
|
||||
mask: string;
|
||||
isReversed: boolean;
|
||||
};
|
||||
|
||||
private translationMask = {
|
||||
@@ -66,10 +66,10 @@ export class InputMaskDirective implements OnChanges, ControlValueAccessor {
|
||||
}
|
||||
|
||||
_onChange = (_: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
_onTouched = () => {
|
||||
}
|
||||
};
|
||||
|
||||
@HostListener('input', ['$event'])
|
||||
@HostListener('keyup', ['$event']) onTextInput(event: KeyboardEvent) {
|
||||
@@ -158,9 +158,9 @@ export class InputMaskDirective implements OnChanges, ControlValueAccessor {
|
||||
}
|
||||
check = this.isToCheck(isReversed, maskIndex, maskLen, valueIndex, valueLength);
|
||||
while (check) {
|
||||
const maskDigit = mask.charAt(maskIndex),
|
||||
valDigit = value.charAt(valueIndex),
|
||||
translation = this.translationMask[maskDigit];
|
||||
const maskDigit = mask.charAt(maskIndex);
|
||||
const valDigit = value.charAt(valueIndex);
|
||||
const translation = this.translationMask[maskDigit];
|
||||
|
||||
if (translation) {
|
||||
if (valDigit.match(translation.pattern)) {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -47,8 +47,12 @@ describe('TypeaheadWidgetComponent', () => {
|
||||
beforeEach(() => {
|
||||
alfrescoApiService = TestBed.inject(AlfrescoApiService);
|
||||
translationService = TestBed.inject(TranslateService);
|
||||
spyOn(translationService, 'instant').and.callFake((key) => { return key; });
|
||||
spyOn(translationService, 'get').and.callFake((key) => { return of(key); });
|
||||
spyOn(translationService, 'instant').and.callFake((key) => {
|
||||
return key;
|
||||
});
|
||||
spyOn(translationService, 'get').and.callFake((key) => {
|
||||
return of(key);
|
||||
});
|
||||
|
||||
formService = new FormService(null, alfrescoApiService, null);
|
||||
widget = new TypeaheadWidgetComponent(formService, null);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { ENTER, ESCAPE } from '@angular/cdk/keycodes';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { ThumbnailService } from '../../../../services/thumbnail.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { LogService } from '../../../../services/log.service';
|
||||
import { ThumbnailService } from '../../../../services/thumbnail.service';
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* tslint:disable:component-selector */
|
||||
/* eslint-disable @angular-eslint/component-selector */
|
||||
|
||||
import { AfterViewInit, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../../services/form.service';
|
||||
|
@@ -24,7 +24,7 @@ import * as widgets from './../components/widgets/index';
|
||||
})
|
||||
export class FormRenderingService extends DynamicComponentMapper {
|
||||
|
||||
protected defaultValue: Type<{}> = widgets.UnknownWidgetComponent;
|
||||
protected defaultValue: Type<any> = widgets.UnknownWidgetComponent;
|
||||
protected types: { [key: string]: DynamicComponentResolveFunction } = {
|
||||
'text': DynamicComponentResolver.fromType(widgets.TextWidgetComponent),
|
||||
'string': DynamicComponentResolver.fromType(widgets.TextWidgetComponent),
|
||||
|
@@ -157,7 +157,7 @@ export class WidgetVisibilityService {
|
||||
|
||||
getFormValue(form: FormModel, fieldId: string): any {
|
||||
const formField = this.getFormFieldById(form, fieldId);
|
||||
let value = undefined;
|
||||
let value;
|
||||
|
||||
if (this.isFormFieldValid(formField)) {
|
||||
value = this.getFieldValue(form.values, fieldId);
|
||||
@@ -174,7 +174,8 @@ export class WidgetVisibilityService {
|
||||
}
|
||||
|
||||
getFieldValue(valueList: any, fieldId: string): any {
|
||||
let labelFilterByName, valueFound;
|
||||
let labelFilterByName;
|
||||
let valueFound;
|
||||
if (fieldId && fieldId.indexOf('_LABEL') > 0) {
|
||||
labelFilterByName = fieldId.substring(0, fieldId.length - 6);
|
||||
if (valueList[labelFilterByName]) {
|
||||
|
Reference in New Issue
Block a user