mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fixed linting for packages
This commit is contained in:
@@ -15,11 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, ConfirmDialogComponent } from '@alfresco/adf-core';
|
||||||
import { Component, Input, OnChanges, ViewEncapsulation, EventEmitter, Output, OnInit, OnDestroy, ViewChild } from '@angular/core';
|
import { Component, Input, OnChanges, ViewEncapsulation, EventEmitter, Output, OnInit, OnDestroy, ViewChild } from '@angular/core';
|
||||||
import { VersionsApi, Node, VersionEntry, NodesApi, NodeEntry, ContentApi, ContentPagingQuery } from '@alfresco/js-api';
|
import { VersionsApi, Node, VersionEntry, NodesApi, NodeEntry, ContentApi, ContentPagingQuery } from '@alfresco/js-api';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ConfirmDialogComponent } from '@alfresco/adf-core';
|
|
||||||
import { ContentVersionService } from './content-version.service';
|
import { ContentVersionService } from './content-version.service';
|
||||||
import { ContentService } from '../common';
|
import { ContentService } from '../common';
|
||||||
import { InfiniteScrollDatasource } from '../infinite-scroll-datasource';
|
import { InfiniteScrollDatasource } from '../infinite-scroll-datasource';
|
||||||
|
@@ -41,7 +41,8 @@ describe('CardViewTextItemComponent', () => {
|
|||||||
|
|
||||||
const expectedErrorMessages = [{ message: 'Something went wrong' } as CardViewItemValidator];
|
const expectedErrorMessages = [{ message: 'Something went wrong' } as CardViewItemValidator];
|
||||||
|
|
||||||
const getTextField = (key: string): HTMLInputElement => fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`)).nativeElement;
|
const getTextField = (key: string): HTMLInputElement =>
|
||||||
|
fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`)).nativeElement;
|
||||||
|
|
||||||
const updateTextField = (key: string, value) => {
|
const updateTextField = (key: string, value) => {
|
||||||
const editInput = getTextField(key);
|
const editInput = getTextField(key);
|
||||||
@@ -56,9 +57,8 @@ describe('CardViewTextItemComponent', () => {
|
|||||||
return textItemInput.value;
|
return textItemInput.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getErrorElements = (key: string, includeItems = false): DebugElement[] => {
|
const getErrorElements = (key: string, includeItems = false): DebugElement[] =>
|
||||||
return fixture.debugElement.queryAll(By.css(`[data-automation-id="card-textitem-error-${key}"]${includeItems ? ' li' : ''}`));
|
fixture.debugElement.queryAll(By.css(`[data-automation-id="card-textitem-error-${key}"]${includeItems ? ' li' : ''}`));
|
||||||
};
|
|
||||||
|
|
||||||
const getTextFieldError = (key: string): string => {
|
const getTextFieldError = (key: string): string => {
|
||||||
const textItemInputErrors = getErrorElements(key, true);
|
const textItemInputErrors = getErrorElements(key, true);
|
||||||
@@ -327,7 +327,7 @@ describe('CardViewTextItemComponent', () => {
|
|||||||
multivalued: true
|
multivalued: true
|
||||||
};
|
};
|
||||||
|
|
||||||
component.editable =true;
|
component.editable = true;
|
||||||
component.property = new CardViewTextItemModel(cardViewTextItemObject);
|
component.property = new CardViewTextItemModel(cardViewTextItemObject);
|
||||||
component.displayLabelForChips = false;
|
component.displayLabelForChips = false;
|
||||||
component.ngOnChanges({ property: new SimpleChange(null, null, true) });
|
component.ngOnChanges({ property: new SimpleChange(null, null, true) });
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
* @license
|
* @license
|
||||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -24,14 +24,7 @@ import { MatDialogModule } from '@angular/material/dialog';
|
|||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [ConfirmDialogComponent],
|
declarations: [ConfirmDialogComponent],
|
||||||
imports: [
|
imports: [CommonModule, FormsModule, ReactiveFormsModule, TranslateModule, MatDialogModule, MatButtonModule],
|
||||||
CommonModule,
|
|
||||||
FormsModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
TranslateModule,
|
|
||||||
MatDialogModule,
|
|
||||||
MatButtonModule
|
|
||||||
],
|
|
||||||
exports: [ConfirmDialogComponent]
|
exports: [ConfirmDialogComponent]
|
||||||
})
|
})
|
||||||
export class ConfirmDialogModule {}
|
export class ConfirmDialogModule {}
|
||||||
|
@@ -32,7 +32,7 @@ describe('LayoutContainerComponent', () => {
|
|||||||
|
|
||||||
const checkContentAnimationState = (value: string, marginProperty: string, marginValue: number) => {
|
const checkContentAnimationState = (value: string, marginProperty: string, marginValue: number) => {
|
||||||
expect(layoutContainerComponent.contentAnimationState).toEqual({
|
expect(layoutContainerComponent.contentAnimationState).toEqual({
|
||||||
value: value,
|
value,
|
||||||
params: { [marginProperty]: marginValue }
|
params: { [marginProperty]: marginValue }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@@ -19,7 +19,7 @@ import { DateTimePipe } from './date-time.pipe';
|
|||||||
import { addMinutes, isValid } from 'date-fns';
|
import { addMinutes, isValid } from 'date-fns';
|
||||||
|
|
||||||
describe('DateTimePipe', () => {
|
describe('DateTimePipe', () => {
|
||||||
let pipe = new DateTimePipe();
|
const pipe = new DateTimePipe();
|
||||||
|
|
||||||
it('should transform string input to date format', () => {
|
it('should transform string input to date format', () => {
|
||||||
const value = '2023-08-24 12:00:00';
|
const value = '2023-08-24 12:00:00';
|
||||||
|
@@ -31,13 +31,13 @@ import {
|
|||||||
FormModel,
|
FormModel,
|
||||||
ContentLinkModel,
|
ContentLinkModel,
|
||||||
UploadWidgetContentLinkModel,
|
UploadWidgetContentLinkModel,
|
||||||
FormEvent
|
FormEvent,
|
||||||
|
ConfirmDialogComponent
|
||||||
} from '@alfresco/adf-core';
|
} from '@alfresco/adf-core';
|
||||||
import { FormCloudService } from '../services/form-cloud.service';
|
import { FormCloudService } from '../services/form-cloud.service';
|
||||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||||
import { TaskDetailsCloudModel } from '../../task/start-task/models/task-details-cloud.model';
|
import { TaskDetailsCloudModel } from '../../task/start-task/models/task-details-cloud.model';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ConfirmDialogComponent } from '@alfresco/adf-core';
|
|
||||||
import { v4 as uuidGeneration } from 'uuid';
|
import { v4 as uuidGeneration } from 'uuid';
|
||||||
import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces';
|
import { FormCloudDisplayMode, FormCloudDisplayModeConfiguration } from '../../services/form-fields.interfaces';
|
||||||
import { DisplayModeService } from '../public-api';
|
import { DisplayModeService } from '../public-api';
|
||||||
|
Reference in New Issue
Block a user