👽 Angular 14 rebase 👽 (#7769)

* fix after rebase

* new release strategy for ng next

Signed-off-by: eromano <eugenioromano16@gmail.com>

* peer dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

* Angular 14

fix unit test and storybook

Signed-off-by: eromano <eugenioromano16@gmail.com>

fix after rebase

Signed-off-by: eromano <eugenioromano16@gmail.com>

update pkg.json

Signed-off-by: eromano <eugenioromano16@gmail.com>

missing dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

Fix mistake and missing code

Dream....build only affected libs

Add utility run commands

* Use nx command to run affected tests

* Fix nx test core

fix content tests

Run unit with watch false

core test fixes

reduce test warnings

Fix process cloud unit

Fix adf unit test

Fix lint process cloud

Disable lint next line

Use right core path

Fix insights unit

fix linting insights

Fix process-services unit

fix the extensions test report

fix test warnings

Fix content unit

Fix bunch of content unit

* Produce an adf alpha of 14

* hopefully fixing the content

* Push back the npm publish

* Remove flaky unit

* Fix linting

* Make the branch as root

* Get rid of angualar13

* Remove the travis depth

* Fixing version for npm

* Enabling cache for unit and build

* Fix scss for core and paths

Copy i18 and asset by using ng-packager

Export the theming alias and fix path

Use ng-package to copy assets process-services-cloud

Use ng-package to copy assets process-services

Use ng-package to copy assets content-services

Use ng-package to copy assets insights

* feat: fix api secondary entry point

* fix storybook rebase

* Move dist under dist/libs from lib/dist

* Fix the webstyle

* Use only necessary nrwl deps and improve lint

* Fix unit for libs

* Convert lint.sh to targets - improve performance

* Use latest of angular

* Align alfresco-js-api

Signed-off-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: Mikolaj Serwicki <mikolaj.serwicki@hyland.com>
Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
This commit is contained in:
Maurizio Vitale
2022-08-25 10:50:30 +01:00
committed by GitHub
parent 53bc5aab2c
commit 1fa81962a0
1351 changed files with 26853 additions and 11958 deletions

View File

@@ -16,7 +16,7 @@
*/
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { AnalyticsService } from '../services/analytics.service';
@Component({
@@ -39,13 +39,13 @@ export class AnalyticsReportHeatMapComponent implements OnInit {
field: any = {};
metricForm: FormGroup;
metricForm: UntypedFormGroup;
currentMetric: string;
currentMetricColors: any;
metricType: string;
constructor(private analyticsService: AnalyticsService,
private formBuilder: FormBuilder) {
private formBuilder: UntypedFormBuilder) {
}
ngOnInit() {
@@ -79,8 +79,8 @@ export class AnalyticsReportHeatMapComponent implements OnInit {
initForm() {
this.metricForm = this.formBuilder.group({
metricGroup: new FormGroup({
metric: new FormControl()
metricGroup: new UntypedFormGroup({
metric: new UntypedFormControl()
})
});
}
@@ -91,8 +91,8 @@ export class AnalyticsReportHeatMapComponent implements OnInit {
this.report.avgTimePercentages);
}
get metricGroup(): FormGroup {
return this.metricForm.controls.metricGroup as FormGroup;
get metricGroup(): UntypedFormGroup {
return this.metricForm.controls.metricGroup as UntypedFormGroup;
}
}

View File

@@ -73,7 +73,7 @@ describe('AnalyticsReportListComponent', () => {
expect(component.isReportsEmpty()).toBeTruthy();
});
it('should return the default reports when the report list is empty', (done) => {
it('should return the default reports when the report list is empty', async () => {
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/reports').andReturn({
status: 200,
contentType: 'json',
@@ -94,7 +94,7 @@ describe('AnalyticsReportListComponent', () => {
responseText: reportList
});
component.success.subscribe(() => {
await component.success.subscribe(() => {
fixture.detectChanges();
expect(element.querySelector('#report-list-0 .adf-activiti-filters__entry-icon').innerHTML).toBe('assignment');
expect(element.querySelector('#report-list-0 > span').innerHTML).toBe('Fake Test Process definition heat map');
@@ -103,14 +103,13 @@ describe('AnalyticsReportListComponent', () => {
expect(element.querySelector('#report-list-3 > span').innerHTML).toBe('Fake Test Task overview');
expect(element.querySelector('#report-list-4 > span').innerHTML).toBe('Fake Test Task service level agreement');
expect(component.isReportsEmpty()).toBeFalsy();
done();
});
});
it('Report render the report list relative to a single app', (done) => {
it('Report render the report list relative to a single app', async () => {
fixture.detectChanges();
component.success.subscribe(() => {
await component.success.subscribe(() => {
fixture.detectChanges();
expect(element.querySelector('#report-list-0 .adf-activiti-filters__entry-icon').innerHTML).toBe('assignment');
expect(element.querySelector('#report-list-0 > span').innerHTML).toBe('Fake Test Process definition heat map');
@@ -119,7 +118,6 @@ describe('AnalyticsReportListComponent', () => {
expect(element.querySelector('#report-list-3 > span').innerHTML).toBe('Fake Test Task overview');
expect(element.querySelector('#report-list-4 > span').innerHTML).toBe('Fake Test Task service level agreement');
expect(component.isReportsEmpty()).toBeFalsy();
done();
});
jasmine.Ajax.requests.mostRecent().respondWith({
@@ -129,12 +127,11 @@ describe('AnalyticsReportListComponent', () => {
});
});
it('Report emit an error with a empty response', (done) => {
it('Report emit an error with a empty response', async () => {
fixture.detectChanges();
component.error.subscribe((err) => {
await component.error.subscribe((err) => {
expect(err).toBeDefined();
done();
});
jasmine.Ajax.requests.mostRecent().respondWith({
@@ -163,16 +160,15 @@ describe('AnalyticsReportListComponent', () => {
expect(component.isSelected(anotherReport)).toBe(false);
});
it('Should reload the report list', (done) => {
it('Should reload the report list', async () => {
component.initObserver();
const report = new ReportParametersModel({ id: 2002, name: 'Fake Test Process definition heat map' });
component.reports = [report];
expect(component.reports.length).toEqual(1);
component.reload();
component.success.subscribe(() => {
await component.success.subscribe(() => {
expect(component.reports.length).toEqual(5);
done();
});
jasmine.Ajax.requests.mostRecent().respondWith({
@@ -182,18 +178,17 @@ describe('AnalyticsReportListComponent', () => {
});
});
it('Should reload the report list and select the report with the given id', (done) => {
it('Should reload the report list and select the report with the given id', async () => {
component.initObserver();
expect(component.reports.length).toEqual(0);
component.reload(2002);
component.success.subscribe(() => {
await component.success.subscribe(() => {
expect(component.reports.length).toEqual(5);
expect(component.currentReport).toBeDefined();
expect(component.currentReport).not.toBeNull();
expect(component.currentReport.id).toEqual(2002);
done();
});
jasmine.Ajax.requests.mostRecent().respondWith({

View File

@@ -61,19 +61,18 @@ describe('AnalyticsReportParametersComponent', () => {
jasmine.Ajax.uninstall();
});
it('Should initialize the Report form with a Form Group ', (done) => {
it('Should initialize the Report form with a Form Group ', async () => {
const fakeReportParam = new ReportParametersModel(analyticParamsMock.reportDefParamTask);
component.successReportParams.subscribe(() => {
await component.successReportParams.subscribe(() => {
fixture.detectChanges();
expect(component.reportForm.get('taskGroup')).toBeDefined();
expect(component.reportForm.get('taskGroup').get('taskName')).toBeDefined();
done();
});
component.successReportParams.emit(fakeReportParam);
});
it('Should render a dropdown with all the status when the definition parameter type is \'status\' ', (done) => {
component.successReportParams.subscribe(() => {
it('Should render a dropdown with all the status when the definition parameter type is \'status\' ', async () => {
await component.successReportParams.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-status');
expect(element.querySelector('h4').textContent.trim()).toEqual('Fake Task overview status');
@@ -83,7 +82,6 @@ describe('AnalyticsReportParametersComponent', () => {
expect(dropDown[1].innerHTML).toEqual('All');
expect(dropDown[2].innerHTML).toEqual('Active');
expect(dropDown[3].innerHTML).toEqual('Complete');
done();
});
const reportId = 1;
@@ -97,13 +95,11 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a number with the default value when the definition parameter type is \'integer\' ', (done) => {
component.successReportParams.subscribe(() => {
it('Should render a number with the default value when the definition parameter type is \'integer\' ', async () => {
await component.successReportParams.subscribe(() => {
fixture.detectChanges();
const numberElement: any = element.querySelector('#slowProcessInstanceInteger');
expect(numberElement.value).toEqual('10');
done();
});
const reportId = 1;
@@ -117,8 +113,8 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a duration component when the definition parameter type is "duration"', (done) => {
component.successReportParams.subscribe(() => {
it('Should render a duration component when the definition parameter type is "duration"', async () => {
await component.successReportParams.subscribe(() => {
fixture.detectChanges();
fixture.whenStable().then(() => {
const numberElement: any = element.querySelector('#duration');
@@ -131,7 +127,6 @@ describe('AnalyticsReportParametersComponent', () => {
expect(dropDown[1].innerHTML).toEqual('Minutes');
expect(dropDown[2].innerHTML).toEqual('Hours');
expect(dropDown[3].innerHTML).toEqual('Days');
done();
});
});
@@ -189,12 +184,11 @@ describe('AnalyticsReportParametersComponent', () => {
component.submit(values);
});
it('Should render a checkbox with the value true when the definition parameter type is \'boolean\' ', (done) => {
component.successReportParams.subscribe(() => {
it('Should render a checkbox with the value true when the definition parameter type is \'boolean\' ', async () => {
await component.successReportParams.subscribe(() => {
fixture.detectChanges();
const checkElement: any = element.querySelector('#typeFiltering-input');
expect(checkElement.checked).toBeTruthy();
done();
});
const reportId = 1;
@@ -208,11 +202,10 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a date range components when the definition parameter type is \'dateRange\' ', (done) => {
component.successReportParams.subscribe(() => {
it('Should render a date range components when the definition parameter type is \'dateRange\' ', async () => {
await component.successReportParams.subscribe(() => {
const dateElement: any = element.querySelector('adf-date-range-widget');
expect(dateElement).toBeDefined();
done();
});
const reportId = 1;
@@ -227,8 +220,8 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a dropdown with all the RangeInterval when the definition parameter type is \'dateRangeInterval\' ', (done) => {
component.successReportParams.subscribe(() => {
it('Should render a dropdown with all the RangeInterval when the definition parameter type is \'dateRangeInterval\' ', async () => {
await component.successReportParams.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-dateRangeInterval');
expect(dropDown).toBeDefined();
@@ -238,7 +231,6 @@ describe('AnalyticsReportParametersComponent', () => {
expect(dropDown[2].innerHTML).toEqual('By week');
expect(dropDown[3].innerHTML).toEqual('By month');
expect(dropDown[4].innerHTML).toEqual('By year');
done();
});
const reportId = 1;
@@ -253,8 +245,8 @@ describe('AnalyticsReportParametersComponent', () => {
});
it('Should render a dropdown with all the process definition when the definition parameter type is \'processDefinition\' and the' +
' reportId change', (done) => {
component.successParamOpt.subscribe(() => {
' reportId change', async () => {
await component.successParamOpt.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-processDefinitionId');
expect(dropDown).toBeDefined();
@@ -264,7 +256,6 @@ describe('AnalyticsReportParametersComponent', () => {
expect(dropDown[2].innerHTML).toEqual('Fake Process Test 1 Name (v 2) ');
expect(dropDown[3].innerHTML).toEqual('Fake Process Test 2 Name (v 1) ');
expect(dropDown[4].innerHTML).toEqual('Fake Process Test 3 Name (v 1) ');
done();
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/report-params/1').andReturn({
@@ -286,8 +277,8 @@ describe('AnalyticsReportParametersComponent', () => {
});
it('Should render a dropdown with all the process definition when the definition parameter type is \'processDefinition\' and the' +
' appId change', (done) => {
component.successParamOpt.subscribe(() => {
' appId change', async () => {
await component.successParamOpt.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-processDefinitionId');
expect(dropDown).toBeDefined();
@@ -295,7 +286,6 @@ describe('AnalyticsReportParametersComponent', () => {
expect(dropDown[0].innerHTML).toEqual('Choose One');
expect(dropDown[1].innerHTML).toEqual('Fake Process Test 1 Name (v 1) ');
expect(dropDown[2].innerHTML).toEqual('Fake Process Test 1 Name (v 2) ');
done();
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/report-params/1').andReturn({
@@ -358,10 +348,9 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should emit an error with a 404 response when the options response is not found', (done) => {
component.error.subscribe((err) => {
it('Should emit an error with a 404 response when the options response is not found', async () => {
await component.error.subscribe((err) => {
expect(err).toBeDefined();
done();
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/report-params/1').andReturn({
@@ -382,10 +371,9 @@ describe('AnalyticsReportParametersComponent', () => {
});
it('Should emit an error with a 404 response when the report parameters response is not found', (done) => {
component.error.subscribe((err) => {
it('Should emit an error with a 404 response when the report parameters response is not found', async () => {
await component.error.subscribe((err) => {
expect(err).toBeDefined();
done();
});
const reportId = 1;
@@ -423,7 +411,7 @@ describe('AnalyticsReportParametersComponent', () => {
fixture.detectChanges();
});
it('Should be able to change the report title', (done) => {
it('Should be able to change the report title', async () => {
spyOn(service, 'updateReport').and.returnValue(of(analyticParamsMock.reportDefParamStatus));
const title = element.querySelector<HTMLElement>('h4');
@@ -439,12 +427,9 @@ describe('AnalyticsReportParametersComponent', () => {
reportName.dispatchEvent(new Event('blur'));
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
const titleChanged = element.querySelector<HTMLElement>('h4');
expect(titleChanged.textContent.trim()).toEqual('FAKE_TEST_NAME');
done();
});
await fixture.whenStable();
const titleChanged = element.querySelector<HTMLElement>('h4');
expect(titleChanged.textContent.trim()).toEqual('FAKE_TEST_NAME');
});
it('should render adf-buttons-menu component', async () => {

View File

@@ -29,7 +29,7 @@ import {
ViewChild,
ViewEncapsulation
} from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import moment from 'moment';
import { ParameterValueModel } from '../../diagram/models/report/parameter-value.model';
@@ -93,7 +93,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
successParamOpt = new EventEmitter();
reportParameters: ReportParametersModel;
reportForm: FormGroup;
reportForm: UntypedFormGroup;
action: string;
isEditable: boolean = false;
reportName: string;
@@ -104,7 +104,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
private onDestroy$ = new Subject<boolean>();
constructor(private analyticsService: AnalyticsService,
private formBuilder: FormBuilder,
private formBuilder: UntypedFormBuilder,
private logService: LogService,
private contentService: ContentService,
private dialog: MatDialog) {
@@ -330,36 +330,36 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
return this.reportForm && this.reportForm.dirty && this.reportForm.valid;
}
get taskGroup(): FormGroup {
return this.reportForm.controls.taskGroup as FormGroup;
get taskGroup(): UntypedFormGroup {
return this.reportForm.controls.taskGroup as UntypedFormGroup;
}
get processDefGroup(): FormGroup {
return this.reportForm.controls.processDefGroup as FormGroup;
get processDefGroup(): UntypedFormGroup {
return this.reportForm.controls.processDefGroup as UntypedFormGroup;
}
get dateIntervalGroup(): FormGroup {
return this.reportForm.controls.dateIntervalGroup as FormGroup;
get dateIntervalGroup(): UntypedFormGroup {
return this.reportForm.controls.dateIntervalGroup as UntypedFormGroup;
}
get dateRange(): FormGroup {
return this.reportForm.controls.dateRange as FormGroup;
get dateRange(): UntypedFormGroup {
return this.reportForm.controls.dateRange as UntypedFormGroup;
}
get statusGroup(): FormGroup {
return this.reportForm.controls.statusGroup as FormGroup;
get statusGroup(): UntypedFormGroup {
return this.reportForm.controls.statusGroup as UntypedFormGroup;
}
get typeFilteringGroup(): FormGroup {
return this.reportForm.controls.typeFilteringGroup as FormGroup;
get typeFilteringGroup(): UntypedFormGroup {
return this.reportForm.controls.typeFilteringGroup as UntypedFormGroup;
}
get durationGroup(): FormGroup {
return this.reportForm.controls.durationGroup as FormGroup;
get durationGroup(): UntypedFormGroup {
return this.reportForm.controls.durationGroup as UntypedFormGroup;
}
get processInstanceGroup(): FormGroup {
return this.reportForm.controls.processInstanceGroup as FormGroup;
get processInstanceGroup(): UntypedFormGroup {
return this.reportForm.controls.processInstanceGroup as UntypedFormGroup;
}
private generateFormGroupFromParameter(parameters: ReportParameterDetailsModel[]) {
@@ -367,41 +367,41 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
parameters.forEach((param: ReportParameterDetailsModel) => {
switch (param.type) {
case 'dateRange':
formBuilderGroup.dateRange = new FormGroup({}, Validators.required);
formBuilderGroup.dateRange = new UntypedFormGroup({}, Validators.required);
break;
case 'processDefinition':
formBuilderGroup.processDefGroup = new FormGroup({
processDefinitionId: new FormControl(null, Validators.required, null)
formBuilderGroup.processDefGroup = new UntypedFormGroup({
processDefinitionId: new UntypedFormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'duration':
formBuilderGroup.durationGroup = new FormGroup({
duration: new FormControl(null, Validators.required, null)
formBuilderGroup.durationGroup = new UntypedFormGroup({
duration: new UntypedFormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'dateInterval':
formBuilderGroup.dateIntervalGroup = new FormGroup({
dateRangeInterval: new FormControl(null, Validators.required, null)
formBuilderGroup.dateIntervalGroup = new UntypedFormGroup({
dateRangeInterval: new UntypedFormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'boolean':
formBuilderGroup.typeFilteringGroup = new FormGroup({
typeFiltering: new FormControl(null, Validators.required, null)
formBuilderGroup.typeFilteringGroup = new UntypedFormGroup({
typeFiltering: new UntypedFormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'task':
formBuilderGroup.taskGroup = new FormGroup({
taskName: new FormControl(null, Validators.required, null)
formBuilderGroup.taskGroup = new UntypedFormGroup({
taskName: new UntypedFormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'integer':
formBuilderGroup.processInstanceGroup = new FormGroup({
slowProcessInstanceInteger: new FormControl(null, Validators.required, null)
formBuilderGroup.processInstanceGroup = new UntypedFormGroup({
slowProcessInstanceInteger: new UntypedFormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'status':
formBuilderGroup.statusGroup = new FormGroup({
status: new FormControl(null, Validators.required, null)
formBuilderGroup.statusGroup = new UntypedFormGroup({
status: new UntypedFormControl(null, Validators.required, null)
}, Validators.required);
break;
default:

View File

@@ -18,7 +18,7 @@
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
import { Component, ElementRef, Input, ViewEncapsulation } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { WidgetComponent } from './../widget.component';
@Component({
@@ -32,7 +32,7 @@ export class CheckboxWidgetAnalyticsComponent extends WidgetComponent {
field: any;
@Input('group')
public formGroup: FormGroup;
public formGroup: UntypedFormGroup;
@Input('controllerName')
public controllerName: string;

View File

@@ -19,7 +19,7 @@
import { MOMENT_DATE_FORMATS, MomentDateAdapter, UserPreferencesService, UserPreferenceValues } from '@alfresco/adf-core';
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation, OnDestroy } from '@angular/core';
import { AbstractControl, FormControl, FormGroup, Validators } from '@angular/forms';
import { AbstractControl, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
import moment, { Moment } from 'moment';
import { Subject } from 'rxjs';
@@ -39,7 +39,7 @@ const SHOW_FORMAT = 'DD/MM/YYYY';
})
export class DateRangeWidgetComponent implements OnInit, OnDestroy {
@Input('group')
dateRange: FormGroup;
dateRange: UntypedFormGroup;
@Input()
field: any;
@@ -78,11 +78,11 @@ export class DateRangeWidgetComponent implements OnInit, OnDestroy {
}
}
const startDateControl = new FormControl(this.startDatePicker);
const startDateControl = new UntypedFormControl(this.startDatePicker);
startDateControl.setValidators(Validators.required);
this.dateRange.addControl('startDate', startDateControl);
const endDateControl = new FormControl(this.endDatePicker);
const endDateControl = new UntypedFormControl(this.endDatePicker);
endDateControl.setValidators(Validators.required);
this.dateRange.addControl('endDate', endDateControl);

View File

@@ -18,7 +18,7 @@
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { WidgetComponent } from './../widget.component';
@Component({
@@ -33,7 +33,7 @@ export class DropdownWidgetAnalyticsComponent extends WidgetComponent implements
field: any;
@Input('group')
public formGroup: FormGroup;
public formGroup: UntypedFormGroup;
@Input('controllerName')
public controllerName: string;
@@ -60,7 +60,7 @@ export class DropdownWidgetAnalyticsComponent extends WidgetComponent implements
}
}
validateDropDown(controller: FormControl) {
validateDropDown(controller: UntypedFormControl) {
return controller.value !== 'null' ? null : { controllerName: false };
}

View File

@@ -18,7 +18,7 @@
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
import { Component, ElementRef, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ParameterValueModel } from '../../../../diagram/models/report/parameter-value.model';
import { ReportParameterDetailsModel } from '../../../../diagram/models/report/report-parameter-details.model';
import { NumberWidgetAnalyticsComponent } from './../number/number.widget';
@@ -35,7 +35,7 @@ export class DurationWidgetComponent extends NumberWidgetAnalyticsComponent impl
field: any;
@Input('group')
public formGroup: FormGroup;
public formGroup: UntypedFormGroup;
@Input('controllerName')
public controllerName: string;
@@ -46,14 +46,14 @@ export class DurationWidgetComponent extends NumberWidgetAnalyticsComponent impl
duration: ReportParameterDetailsModel;
currentValue: number;
public selectionGroup: FormGroup;
public selectionGroup: UntypedFormGroup;
constructor(public elementRef: ElementRef) {
super(elementRef);
}
ngOnInit() {
const timeType = new FormControl();
const timeType = new UntypedFormControl();
this.formGroup.addControl('timeType', timeType);
if (this.required) {

View File

@@ -18,7 +18,7 @@
/* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */
import { Component, ElementRef, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { FormGroup, Validators } from '@angular/forms';
import { UntypedFormGroup, Validators } from '@angular/forms';
import { WidgetComponent } from './../widget.component';
@Component({
@@ -33,7 +33,7 @@ export class NumberWidgetAnalyticsComponent extends WidgetComponent implements O
field: any;
@Input('group')
public formGroup: FormGroup;
public formGroup: UntypedFormGroup;
@Input('controllerName')
public controllerName: string;