Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • anis/anis-next
1 result
Show changes
Commits on Source (7)
Showing
with 145 additions and 143 deletions
...@@ -54,7 +54,7 @@ sonar_scanner: ...@@ -54,7 +54,7 @@ sonar_scanner:
-Dsonar.host.url=$SONARQUBE_URL -Dsonar.host.url=$SONARQUBE_URL
-Dsonar.login=$SONAR_TOKEN_CLIENT -Dsonar.login=$SONAR_TOKEN_CLIENT
-Dsonar.exclusions=**.spec.ts,**/assets/** -Dsonar.exclusions=**.spec.ts,**/assets/**
-Dsonar.typescript.lcov.reportPaths=./coverage/anis-client/lcov.info -Dsonar.javascript.lcov.reportPaths=./coverage/anis-client/lcov.info
build: build:
image: node:16-slim image: node:16-slim
......
...@@ -97,5 +97,7 @@ ...@@ -97,5 +97,7 @@
} }
} }
}, },
"defaultProject": "client" "cli": {
"analytics": false
}
} }
import 'jest-preset-angular/setup-jest';
Object.defineProperty(window, 'CSS', { value: null }); Object.defineProperty(window, 'CSS', { value: null });
Object.defineProperty(document, 'doctype', {
value: '<!DOCTYPE html>',
});
Object.defineProperty(window, 'getComputedStyle', { Object.defineProperty(window, 'getComputedStyle', {
value: () => { value: () => {
return { return {
...@@ -9,10 +10,10 @@ Object.defineProperty(window, 'getComputedStyle', { ...@@ -9,10 +10,10 @@ Object.defineProperty(window, 'getComputedStyle', {
}; };
}, },
}); });
/**
Object.defineProperty(document, 'doctype', { * ISSUE: https://github.com/angular/material2/issues/7101
value: '<!DOCTYPE html>', * Workaround for JSDOM missing transform property
}); */
Object.defineProperty(document.body.style, 'transform', { Object.defineProperty(document.body.style, 'transform', {
value: () => { value: () => {
return { return {
......
const { pathsToModuleNameMapper } = require('ts-jest/utils'); // jest.config.js
const { compilerOptions } = require('./tsconfig');
module.exports = { module.exports = {
preset: 'jest-preset-angular', preset: 'jest-preset-angular',
testMatch: ['**/+(*.)+(spec).+(ts|js)'], setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
setupFilesAfterEnv: ['<rootDir>/src/test.ts'], globalSetup: 'jest-preset-angular/global-setup',
moduleDirectories: ['node_modules', '<rootDir>'],
collectCoverage: false,
collectCoverageFrom: ['src/**/*.ts'],
coverageReporters: ['html'], coverageReporters: ['html'],
coverageDirectory: 'coverage/anis-client', coverageDirectory: 'coverage/anis-client'
moduleDirectories: ["node_modules", "./"],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths || {}, {
prefix: '<rootDir>/',
}),
}; };
...@@ -9,48 +9,48 @@ ...@@ -9,48 +9,48 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~13.2.2", "@angular/animations": "^14.2.0",
"@angular/common": "~13.2.2", "@angular/common": "^14.2.0",
"@angular/compiler": "~13.2.2", "@angular/compiler": "^14.2.0",
"@angular/core": "~13.2.2", "@angular/core": "^14.2.0",
"@angular/forms": "~13.2.2", "@angular/forms": "^14.2.0",
"@angular/platform-browser": "~13.2.2", "@angular/platform-browser": "^14.2.0",
"@angular/platform-browser-dynamic": "~13.2.2", "@angular/platform-browser-dynamic": "^14.2.0",
"@angular/router": "~13.2.2", "@angular/router": "^14.2.0",
"@fortawesome/fontawesome-free": "^6.0.0", "@fortawesome/fontawesome-free": "^6.2.0",
"@ng-select/ng-select": "^8.1.1", "@ng-select/ng-select": "^9.0.2",
"@ngrx/effects": "13.0.2", "@ngrx/effects": "14.3.0",
"@ngrx/entity": "13.0.2", "@ngrx/entity": "14.3.0",
"@ngrx/router-store": "13.0.2", "@ngrx/router-store": "14.3.0",
"@ngrx/store": "13.0.2", "@ngrx/store": "14.3.0",
"@ngrx/store-devtools": "13.0.2", "@ngrx/store-devtools": "14.3.0",
"bootstrap": "4.6.1", "bootstrap": "4.6.2",
"d3": "^5.15.1", "d3": "^5.15.1",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"keycloak-angular": "^9.1.0", "keycloak-angular": "^12.1.0",
"keycloak-js": "^16.1.1", "keycloak-js": "^19.0.1",
"ngx-bootstrap": "^8.0.0", "ngx-bootstrap": "^9.0.0",
"ngx-dynamic-hooks": "^2.0.3", "ngx-dynamic-hooks": "^2.0.3",
"ngx-json-viewer": "^3.0.2", "ngx-json-viewer": "^3.1.0",
"ngx-toastr": "^14.2.1", "ngx-toastr": "^15.0.0",
"prismjs": "^1.28.0", "prismjs": "^1.29.0",
"rxjs": "~7.5.0", "rxjs": "~7.5.0",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"zone.js": "~0.11.4" "zone.js": "~0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~13.2.3", "@angular-devkit/build-angular": "^14.2.1",
"@angular/cli": "~13.2.3", "@angular/cli": "^14.2.1",
"@angular/compiler-cli": "~13.2.2", "@angular/compiler-cli": "^14.2.0",
"@types/d3": "^5.7.2", "@types/d3": "^5.7.2",
"@types/file-saver": "^2.0.5", "@types/file-saver": "^2.0.5",
"@types/jasmine": "~3.10.0", "@types/jasmine": "~4.0.0",
"@types/jest": "^27.4.0",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"jasmine-core": "~4.0.0", "@types/jest": "^29.0.0",
"jasmine-core": "~4.3.0",
"jasmine-marbles": "^0.9.1", "jasmine-marbles": "^0.9.1",
"jest": "^27.5.1", "jest": "^28.1.0",
"jest-preset-angular": "^11.1.0", "jest-preset-angular": "^12.2.2",
"typescript": "~4.5.5" "typescript": "~4.8.2"
} }
} }
\ No newline at end of file
import 'jest-preset-angular/setup-jest';
import './jest-global-mocks';
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, TemplateRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core'; import { Component, Input, Output, TemplateRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { BsModalService } from 'ngx-bootstrap/modal'; import { BsModalService } from 'ngx-bootstrap/modal';
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
...@@ -20,7 +20,7 @@ import { FileInfo } from 'src/app/admin/store/models'; ...@@ -20,7 +20,7 @@ import { FileInfo } from 'src/app/admin/store/models';
templateUrl: 'path-select-form-control.component.html' templateUrl: 'path-select-form-control.component.html'
}) })
export class PathSelectFormControlComponent implements OnChanges { export class PathSelectFormControlComponent implements OnChanges {
@Input() form: FormGroup; @Input() form: UntypedFormGroup;
@Input() disabled: boolean = false; @Input() disabled: boolean = false;
@Input() controlName: string; @Input() controlName: string;
@Input() controlLabel: string; @Input() controlLabel: string;
......
import { AfterViewChecked, AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core'; import { AfterViewChecked, AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { fromEvent, Subscription } from 'rxjs'; import { fromEvent, Subscription } from 'rxjs';
...@@ -11,7 +11,7 @@ import { PrismService } from '../services/prism.service'; ...@@ -11,7 +11,7 @@ import { PrismService } from '../services/prism.service';
styleUrls: ['webpage-form-content.component.scss'] styleUrls: ['webpage-form-content.component.scss']
}) })
export class WebpageFormContentComponent implements OnInit, AfterViewChecked, AfterViewInit, OnDestroy { export class WebpageFormContentComponent implements OnInit, AfterViewChecked, AfterViewInit, OnDestroy {
@Input() form: FormGroup; @Input() form: UntypedFormGroup;
@Input() controlName: string; @Input() controlName: string;
@Input() controlLabel: string; @Input() controlLabel: string;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms'; import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { Database } from 'src/app/metamodel/models'; import { Database } from 'src/app/metamodel/models';
...@@ -20,14 +20,14 @@ export class DatabaseFormComponent implements OnInit { ...@@ -20,14 +20,14 @@ export class DatabaseFormComponent implements OnInit {
@Input() database: Database; @Input() database: Database;
@Output() onSubmit: EventEmitter<Database> = new EventEmitter(); @Output() onSubmit: EventEmitter<Database> = new EventEmitter();
public form = new FormGroup({ public form = new UntypedFormGroup({
label: new FormControl('', [Validators.required]), label: new UntypedFormControl('', [Validators.required]),
dbname: new FormControl('', [Validators.required]), dbname: new UntypedFormControl('', [Validators.required]),
dbtype: new FormControl('', [Validators.required]), dbtype: new UntypedFormControl('', [Validators.required]),
dbhost: new FormControl('', [Validators.required]), dbhost: new UntypedFormControl('', [Validators.required]),
dbport: new FormControl('', [Validators.required]), dbport: new UntypedFormControl('', [Validators.required]),
dblogin: new FormControl('', [Validators.required]), dblogin: new UntypedFormControl('', [Validators.required]),
dbpassword: new FormControl('', [Validators.required]) dbpassword: new UntypedFormControl('', [Validators.required])
}); });
ngOnInit() { ngOnInit() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms'; import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { Instance } from 'src/app/metamodel/models'; import { Instance } from 'src/app/metamodel/models';
import { FileInfo } from 'src/app/admin/store/models'; import { FileInfo } from 'src/app/admin/store/models';
...@@ -25,31 +25,31 @@ export class InstanceFormComponent implements OnInit { ...@@ -25,31 +25,31 @@ export class InstanceFormComponent implements OnInit {
@Output() loadRootDirectory: EventEmitter<string> = new EventEmitter(); @Output() loadRootDirectory: EventEmitter<string> = new EventEmitter();
@Output() onSubmit: EventEmitter<Instance> = new EventEmitter(); @Output() onSubmit: EventEmitter<Instance> = new EventEmitter();
public form = new FormGroup({ public form = new UntypedFormGroup({
name: new FormControl('', [Validators.required]), name: new UntypedFormControl('', [Validators.required]),
label: new FormControl('', [Validators.required]), label: new UntypedFormControl('', [Validators.required]),
description: new FormControl('', [Validators.required]), description: new UntypedFormControl('', [Validators.required]),
scientific_manager: new FormControl('', [Validators.required]), scientific_manager: new UntypedFormControl('', [Validators.required]),
instrument: new FormControl('', [Validators.required]), instrument: new UntypedFormControl('', [Validators.required]),
wavelength_domain: new FormControl('', [Validators.required]), wavelength_domain: new UntypedFormControl('', [Validators.required]),
display: new FormControl('', [Validators.required]), display: new UntypedFormControl('', [Validators.required]),
data_path: new FormControl(''), data_path: new UntypedFormControl(''),
files_path: new FormControl(''), files_path: new UntypedFormControl(''),
public: new FormControl(true, [Validators.required]), public: new UntypedFormControl(true, [Validators.required]),
portal_logo: new FormControl(''), portal_logo: new UntypedFormControl(''),
design_color: new FormControl('#7AC29A', [Validators.required]), design_color: new UntypedFormControl('#7AC29A', [Validators.required]),
design_background_color: new FormControl('#FFFFFF', [Validators.required]), design_background_color: new UntypedFormControl('#FFFFFF', [Validators.required]),
design_logo: new FormControl(''), design_logo: new UntypedFormControl(''),
design_favicon: new FormControl(''), design_favicon: new UntypedFormControl(''),
samp_enabled: new FormControl(true), samp_enabled: new UntypedFormControl(true),
back_to_portal: new FormControl(true), back_to_portal: new UntypedFormControl(true),
search_by_criteria_allowed: new FormControl(true), search_by_criteria_allowed: new UntypedFormControl(true),
search_by_criteria_label: new FormControl({value: 'Search', disabled: false}), search_by_criteria_label: new UntypedFormControl({value: 'Search', disabled: false}),
search_multiple_allowed: new FormControl(false), search_multiple_allowed: new UntypedFormControl(false),
search_multiple_label: new FormControl({value: 'Search multiple', disabled: true}), search_multiple_label: new UntypedFormControl({value: 'Search multiple', disabled: true}),
search_multiple_all_datasets_selected: new FormControl({value: false, disabled: true}), search_multiple_all_datasets_selected: new UntypedFormControl({value: false, disabled: true}),
documentation_allowed: new FormControl(false), documentation_allowed: new UntypedFormControl(false),
documentation_label: new FormControl({value: 'Documentation', disabled: true}) documentation_label: new UntypedFormControl({value: 'Documentation', disabled: true})
}); });
ngOnInit() { ngOnInit() {
...@@ -86,7 +86,7 @@ export class InstanceFormComponent implements OnInit { ...@@ -86,7 +86,7 @@ export class InstanceFormComponent implements OnInit {
} }
getHomeConfigFormGroup() { getHomeConfigFormGroup() {
return this.form.controls.home_component_config as FormGroup; return this.form.controls.home_component_config as UntypedFormGroup;
} }
checkDisableSearchByCriteriaAllowed() { checkDisableSearchByCriteriaAllowed() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms'; import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { InstanceGroup, Instance } from 'src/app/metamodel/models'; import { InstanceGroup, Instance } from 'src/app/metamodel/models';
...@@ -22,8 +22,8 @@ export class InstanceGroupFormComponent implements OnInit { ...@@ -22,8 +22,8 @@ export class InstanceGroupFormComponent implements OnInit {
@Output() onSubmit: EventEmitter<InstanceGroup> = new EventEmitter(); @Output() onSubmit: EventEmitter<InstanceGroup> = new EventEmitter();
public instanceGroupInstances = []; public instanceGroupInstances = [];
public form = new FormGroup({ public form = new UntypedFormGroup({
role: new FormControl('', [Validators.required]) role: new UntypedFormControl('', [Validators.required])
}); });
ngOnInit() { ngOnInit() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms'; import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { DatasetGroup, Dataset } from 'src/app/metamodel/models'; import { DatasetGroup, Dataset } from 'src/app/metamodel/models';
...@@ -22,8 +22,8 @@ export class DatasetGroupFormComponent implements OnInit { ...@@ -22,8 +22,8 @@ export class DatasetGroupFormComponent implements OnInit {
@Output() onSubmit: EventEmitter<DatasetGroup> = new EventEmitter(); @Output() onSubmit: EventEmitter<DatasetGroup> = new EventEmitter();
public groupDatasets = []; public groupDatasets = [];
public form = new FormGroup({ public form = new UntypedFormGroup({
role: new FormControl('', [Validators.required]) role: new UntypedFormControl('', [Validators.required])
}); });
ngOnInit() { ngOnInit() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'app-option-form', selector: 'app-option-form',
...@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms'; ...@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms';
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class OptionFormComponent { export class OptionFormComponent {
@Input() form: FormGroup; @Input() form: UntypedFormGroup;
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core'; import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';
import { FormArray, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormArray, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { Option } from 'src/app/metamodel/models'; import { Option } from 'src/app/metamodel/models';
...@@ -17,14 +17,14 @@ import { Option } from 'src/app/metamodel/models'; ...@@ -17,14 +17,14 @@ import { Option } from 'src/app/metamodel/models';
templateUrl: 'option-list.component.html' templateUrl: 'option-list.component.html'
}) })
export class OptionListComponent implements OnInit { export class OptionListComponent implements OnInit {
@Input() form: FormArray; @Input() form: UntypedFormArray;
@Input() optionList: Option[]; @Input() optionList: Option[];
@Input() attributeDistinctList: string[]; @Input() attributeDistinctList: string[];
@Input() attributeDistinctListIsLoading: boolean; @Input() attributeDistinctListIsLoading: boolean;
@Input() attributeDistinctListIsLoaded: boolean; @Input() attributeDistinctListIsLoaded: boolean;
@Output() loadAttributeDistinctList: EventEmitter<{}> = new EventEmitter(); @Output() loadAttributeDistinctList: EventEmitter<{}> = new EventEmitter();
newOptionFormGroup: FormGroup; newOptionFormGroup: UntypedFormGroup;
ngOnInit() { ngOnInit() {
if (this.optionList && this.optionList.length > 0) { if (this.optionList && this.optionList.length > 0) {
...@@ -38,15 +38,15 @@ export class OptionListComponent implements OnInit { ...@@ -38,15 +38,15 @@ export class OptionListComponent implements OnInit {
} }
buildFormGroup() { buildFormGroup() {
return new FormGroup({ return new UntypedFormGroup({
label: new FormControl('', [Validators.required]), label: new UntypedFormControl('', [Validators.required]),
value: new FormControl('', [Validators.required]), value: new UntypedFormControl('', [Validators.required]),
display: new FormControl('', [Validators.required]), display: new UntypedFormControl('', [Validators.required]),
}); });
} }
getOptionFormGroup(option) { getOptionFormGroup(option) {
return option as FormGroup; return option as UntypedFormGroup;
} }
addOption() { addOption() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { FormArray, FormControl, FormGroup } from '@angular/forms'; import { UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { Attribute, CriteriaFamily } from 'src/app/metamodel/models'; import { Attribute, CriteriaFamily } from 'src/app/metamodel/models';
import { searchTypeOperators } from 'src/app/shared/utils'; import { searchTypeOperators } from 'src/app/shared/utils';
...@@ -31,22 +31,22 @@ export class TrCriteriaComponent implements OnInit { ...@@ -31,22 +31,22 @@ export class TrCriteriaComponent implements OnInit {
searchTypeList = searchTypeList; searchTypeList = searchTypeList;
optionsFormArray = new FormArray([]); optionsFormArray = new UntypedFormArray([]);
operatorList = searchTypeOperators; operatorList = searchTypeOperators;
public form = new FormGroup({ public form = new UntypedFormGroup({
name: new FormControl({ value: '', disabled: true }), name: new UntypedFormControl({ value: '', disabled: true }),
type: new FormControl({ value: '', disabled: true }), type: new UntypedFormControl({ value: '', disabled: true }),
id_criteria_family: new FormControl(), id_criteria_family: new UntypedFormControl(),
search_type: new FormControl(), search_type: new UntypedFormControl(),
operator: new FormControl(), operator: new UntypedFormControl(),
dynamic_operator: new FormControl(), dynamic_operator: new UntypedFormControl(),
min: new FormControl(), min: new UntypedFormControl(),
max: new FormControl(), max: new UntypedFormControl(),
options: this.optionsFormArray, options: this.optionsFormArray,
placeholder_min: new FormControl(), placeholder_min: new UntypedFormControl(),
placeholder_max: new FormControl(), placeholder_max: new UntypedFormControl(),
criteria_display: new FormControl() criteria_display: new UntypedFormControl()
}); });
ngOnInit() { ngOnInit() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { Attribute, OutputCategory } from 'src/app/metamodel/models'; import { Attribute, OutputCategory } from 'src/app/metamodel/models';
...@@ -23,10 +23,10 @@ export class TrDetailComponent implements OnInit { ...@@ -23,10 +23,10 @@ export class TrDetailComponent implements OnInit {
@Input() outputCategoryList: OutputCategory[]; @Input() outputCategoryList: OutputCategory[];
@Output() save: EventEmitter<Attribute> = new EventEmitter(); @Output() save: EventEmitter<Attribute> = new EventEmitter();
public form = new FormGroup({ public form = new UntypedFormGroup({
name: new FormControl({ value: '', disabled: true }), name: new UntypedFormControl({ value: '', disabled: true }),
id_detail_output_category: new FormControl(), id_detail_output_category: new UntypedFormControl(),
detail_display: new FormControl() detail_display: new UntypedFormControl()
}); });
ngOnInit() { ngOnInit() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { Attribute } from 'src/app/metamodel/models'; import { Attribute } from 'src/app/metamodel/models';
...@@ -23,13 +23,13 @@ export class TrGeneralComponent implements OnInit { ...@@ -23,13 +23,13 @@ export class TrGeneralComponent implements OnInit {
@Output() save: EventEmitter<Attribute> = new EventEmitter(); @Output() save: EventEmitter<Attribute> = new EventEmitter();
@Output() delete: EventEmitter<Attribute> = new EventEmitter(); @Output() delete: EventEmitter<Attribute> = new EventEmitter();
public form = new FormGroup({ public form = new UntypedFormGroup({
id: new FormControl({value: '', disabled: true}), id: new UntypedFormControl({value: '', disabled: true}),
name: new FormControl('', [Validators.required]), name: new UntypedFormControl('', [Validators.required]),
label: new FormControl('', [Validators.required]), label: new UntypedFormControl('', [Validators.required]),
form_label: new FormControl('', [Validators.required]), form_label: new UntypedFormControl('', [Validators.required]),
description: new FormControl(), description: new UntypedFormControl(),
primary_key: new FormControl() primary_key: new UntypedFormControl()
}); });
ngOnInit() { ngOnInit() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { Attribute, OutputCategory } from 'src/app/metamodel/models'; import { Attribute, OutputCategory } from 'src/app/metamodel/models';
...@@ -23,11 +23,11 @@ export class TrOutputComponent implements OnInit { ...@@ -23,11 +23,11 @@ export class TrOutputComponent implements OnInit {
@Input() outputCategoryList: OutputCategory[]; @Input() outputCategoryList: OutputCategory[];
@Output() save: EventEmitter<Attribute> = new EventEmitter(); @Output() save: EventEmitter<Attribute> = new EventEmitter();
public form = new FormGroup({ public form = new UntypedFormGroup({
name: new FormControl({ value: '', disabled: true }), name: new UntypedFormControl({ value: '', disabled: true }),
output_display: new FormControl(), output_display: new UntypedFormControl(),
id_output_category: new FormControl(), id_output_category: new UntypedFormControl(),
selected: new FormControl() selected: new UntypedFormControl()
}); });
ngOnInit() { ngOnInit() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'app-detail-link-renderer', selector: 'app-detail-link-renderer',
...@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms'; ...@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms';
}) })
export class DetailLinkRendererComponent { export class DetailLinkRendererComponent {
@Input() id: number; @Input() id: number;
@Input() form: FormGroup; @Input() form: UntypedFormGroup;
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'app-download-renderer', selector: 'app-download-renderer',
...@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms'; ...@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms';
}) })
export class DownloadRendererComponent { export class DownloadRendererComponent {
@Input() id: number; @Input() id: number;
@Input() form: FormGroup; @Input() form: UntypedFormGroup;
} }