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
Showing
with 140 additions and 140 deletions
......@@ -8,7 +8,7 @@
*/
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-image-renderer',
......@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms';
})
export class ImageRendererComponent {
@Input() id: number;
@Input() form: FormGroup;
@Input() form: UntypedFormGroup;
}
......@@ -8,7 +8,7 @@
*/
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
@Component({
selector: 'app-link-renderer',
......@@ -17,5 +17,5 @@ import { FormGroup } from '@angular/forms';
})
export class LinkRendererComponent {
@Input() id: number;
@Input() form: FormGroup;
@Input() form: UntypedFormGroup;
}
......@@ -7,35 +7,35 @@
* file that was distributed with this source code.
*/
import { FormControl } from "@angular/forms";
import { UntypedFormControl } from "@angular/forms";
export abstract class RendererFormFactory {
static create(renderer: string) {
switch (renderer) {
case 'detail-link':
return {
display: new FormControl('text')
display: new UntypedFormControl('text')
};
case 'link':
return {
href: new FormControl('$value'),
display: new FormControl('text'),
text: new FormControl('$value'),
icon: new FormControl('fas fa-link'),
blank: new FormControl(true)
href: new UntypedFormControl('$value'),
display: new UntypedFormControl('text'),
text: new UntypedFormControl('$value'),
icon: new UntypedFormControl('fas fa-link'),
blank: new UntypedFormControl(true)
};
case 'download':
return {
display: new FormControl('icon-button'),
text: new FormControl('DOWNLOAD'),
icon: new FormControl('fas fa-download')
display: new UntypedFormControl('icon-button'),
text: new UntypedFormControl('DOWNLOAD'),
icon: new UntypedFormControl('fas fa-download')
};
case 'image':
return {
type: new FormControl('fits'),
display: new FormControl('modal'),
width: new FormControl(''),
height: new FormControl('')
type: new UntypedFormControl('fits'),
display: new UntypedFormControl('modal'),
width: new UntypedFormControl(''),
height: new UntypedFormControl('')
};
default:
return {};
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { Attribute } from 'src/app/metamodel/models';
import { RendererFormFactory, rendererList } from './renderers';
......@@ -26,31 +26,31 @@ export class TrResultComponent implements OnInit {
rendererList = rendererList;
public form = new FormGroup({
name: new FormControl({ value: '', disabled: true }),
renderer: new FormControl(),
order_by: new FormControl(),
archive: new FormControl()
public form = new UntypedFormGroup({
name: new UntypedFormControl({ value: '', disabled: true }),
renderer: new UntypedFormControl(),
order_by: new UntypedFormControl(),
archive: new UntypedFormControl()
});
ngOnInit() {
if (this.attribute) {
const rendererConfigForm = RendererFormFactory.create(this.attribute.renderer);
this.form.addControl('renderer_config', new FormGroup(rendererConfigForm));
this.form.addControl('renderer_config', new UntypedFormGroup(rendererConfigForm));
this.form.patchValue(this.attribute);
}
}
getRendererConfigForm() {
return this.form.controls['renderer_config'] as FormGroup;
return this.form.controls['renderer_config'] as UntypedFormGroup;
}
rendererOnChange() {
if (this.form.controls.renderer.value === '') {
this.form.controls.renderer.setValue(null);
this.form.setControl('renderer_config', new FormGroup({}));
this.form.setControl('renderer_config', new UntypedFormGroup({}));
} else {
this.form.setControl('renderer_config', new FormGroup(RendererFormFactory.create(this.form.controls.renderer.value)));
this.form.setControl('renderer_config', new UntypedFormGroup(RendererFormFactory.create(this.form.controls.renderer.value)));
}
}
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { Attribute } from 'src/app/metamodel/models';
......@@ -22,14 +22,14 @@ export class TrVoComponent implements OnInit {
@Input() attribute: Attribute
@Output() save: EventEmitter<Attribute> = new EventEmitter();
public form = new FormGroup({
name: new FormControl({ value: '', disabled: true }),
vo_utype: new FormControl(),
vo_ucd: new FormControl(),
vo_unit: new FormControl(),
vo_description: new FormControl(),
vo_datatype: new FormControl(),
vo_size: new FormControl()
public form = new UntypedFormGroup({
name: new UntypedFormControl({ value: '', disabled: true }),
vo_utype: new UntypedFormControl(),
vo_ucd: new UntypedFormControl(),
vo_unit: new UntypedFormControl(),
vo_description: new UntypedFormControl(),
vo_datatype: new UntypedFormControl(),
vo_size: new UntypedFormControl()
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, OnInit, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl } from '@angular/forms';
import { Attribute, ConeSearchConfig } from 'src/app/metamodel/models';
......@@ -22,12 +22,12 @@ export class ConeSearchConfigFormComponent implements OnInit {
@Input() attributeList: Attribute[];
@Output() onSubmit: EventEmitter<ConeSearchConfig> = new EventEmitter();
public form = new FormGroup({
enabled: new FormControl(false),
opened: new FormControl({value: false, disabled: true}),
column_ra: new FormControl({value: false, disabled: true}),
column_dec: new FormControl({value: false, disabled: true}),
plot_enabled: new FormControl(false),
public form = new UntypedFormGroup({
enabled: new UntypedFormControl(false),
opened: new UntypedFormControl({value: false, disabled: true}),
column_ra: new UntypedFormControl({value: false, disabled: true}),
column_dec: new UntypedFormControl({value: false, disabled: true}),
plot_enabled: new UntypedFormControl(false),
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { CriteriaFamily } from 'src/app/metamodel/models';
......@@ -20,10 +20,10 @@ export class CriteriaFamilyFormComponent {
@Input() criteriaFamily: CriteriaFamily;
@Output() onSubmit: EventEmitter<CriteriaFamily> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
display: new FormControl('', [Validators.required]),
opened: new FormControl(true)
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
display: new UntypedFormControl('', [Validators.required]),
opened: new UntypedFormControl(true)
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { DatasetFamily } from 'src/app/metamodel/models';
......@@ -20,10 +20,10 @@ export class DatasetFamilyFormComponent implements OnInit {
@Input() datasetFamily: DatasetFamily;
@Output() onSubmit: EventEmitter<DatasetFamily> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
display: new FormControl('', [Validators.required]),
opened: new FormControl(true)
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
display: new UntypedFormControl('', [Validators.required]),
opened: new UntypedFormControl(true)
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { Instance, Dataset, DatasetFamily, Database } from 'src/app/metamodel/models';
import { FileInfo } from 'src/app/admin/store/models';
......@@ -35,23 +35,23 @@ export class DatasetFormComponent implements OnInit, OnChanges {
public isNewDataset = true;
public form = new FormGroup({
name: new FormControl('', [Validators.required]),
table_ref: new FormControl('', [Validators.required]),
label: new FormControl('', [Validators.required]),
description: new FormControl('', [Validators.required]),
display: new FormControl('', [Validators.required]),
data_path: new FormControl(''),
public: new FormControl('', [Validators.required]),
id_database: new FormControl('', [Validators.required]),
id_dataset_family: new FormControl('', [Validators.required]),
download_json: new FormControl(true),
download_csv: new FormControl(true),
download_ascii: new FormControl(true),
download_vo: new FormControl(false),
server_link_enabled: new FormControl(false),
datatable_enabled: new FormControl(true),
datatable_selectable_rows: new FormControl(false)
public form = new UntypedFormGroup({
name: new UntypedFormControl('', [Validators.required]),
table_ref: new UntypedFormControl('', [Validators.required]),
label: new UntypedFormControl('', [Validators.required]),
description: new UntypedFormControl('', [Validators.required]),
display: new UntypedFormControl('', [Validators.required]),
data_path: new UntypedFormControl(''),
public: new UntypedFormControl('', [Validators.required]),
id_database: new UntypedFormControl('', [Validators.required]),
id_dataset_family: new UntypedFormControl('', [Validators.required]),
download_json: new UntypedFormControl(true),
download_csv: new UntypedFormControl(true),
download_ascii: new UntypedFormControl(true),
download_vo: new UntypedFormControl(false),
server_link_enabled: new UntypedFormControl(false),
datatable_enabled: new UntypedFormControl(true),
datatable_selectable_rows: new UntypedFormControl(false)
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, OnInit, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl } from '@angular/forms';
import { Attribute, DetailConfig } from 'src/app/metamodel/models';
......@@ -21,9 +21,9 @@ export class DetailConfigFormComponent implements OnInit {
@Input() detailConfig: DetailConfig;
@Output() onSubmit: EventEmitter<DetailConfig> = new EventEmitter();
public form = new FormGroup({
enabled: new FormControl(false),
content: new FormControl()
public form = new UntypedFormGroup({
enabled: new UntypedFormControl(false),
content: new UntypedFormControl()
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, OnInit, EventEmitter } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { File, Dataset, Instance } from 'src/app/metamodel/models';
import { FileInfo } from 'src/app/admin/store/models';
......@@ -27,11 +27,11 @@ export class FileFormComponent implements OnInit {
@Output() loadRootDirectory: EventEmitter<string> = new EventEmitter();
@Output() onSubmit: EventEmitter<File> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
file_path: new FormControl('', [Validators.required]),
file_size: new FormControl('', [Validators.required]),
type: new FormControl('', [Validators.required])
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
file_path: new UntypedFormControl('', [Validators.required]),
file_size: new UntypedFormControl('', [Validators.required]),
type: new UntypedFormControl('', [Validators.required])
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, OnInit, OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { Image, Dataset, Instance } from 'src/app/metamodel/models';
import { FileInfo, FitsImageLimits } from 'src/app/admin/store/models';
......@@ -31,17 +31,17 @@ export class ImageFormComponent implements OnInit, OnChanges {
@Output() retrieveFitsImageLimits: EventEmitter<string> = new EventEmitter();
@Output() onSubmit: EventEmitter<Image> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
file_path: new FormControl('', [Validators.required]),
file_size: new FormControl('', [Validators.required]),
ra_min: new FormControl('', [Validators.required]),
ra_max: new FormControl('', [Validators.required]),
dec_min: new FormControl('', [Validators.required]),
dec_max: new FormControl('', [Validators.required]),
stretch: new FormControl('linear', [Validators.required]),
pmin: new FormControl(0.25, [Validators.required]),
pmax: new FormControl(99.75, [Validators.required])
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
file_path: new UntypedFormControl('', [Validators.required]),
file_size: new UntypedFormControl('', [Validators.required]),
ra_min: new UntypedFormControl('', [Validators.required]),
ra_max: new UntypedFormControl('', [Validators.required]),
dec_min: new UntypedFormControl('', [Validators.required]),
dec_max: new UntypedFormControl('', [Validators.required]),
stretch: new UntypedFormControl('linear', [Validators.required]),
pmin: new UntypedFormControl(0.25, [Validators.required]),
pmax: new UntypedFormControl(99.75, [Validators.required])
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { OutputCategory, OutputFamily } from 'src/app/metamodel/models';
......@@ -21,10 +21,10 @@ export class OutputCategoryFormComponent {
@Input() outputFamilyList: OutputFamily[];
@Output() onSubmit: EventEmitter<OutputCategory> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
display: new FormControl('', [Validators.required]),
id_output_family: new FormControl('', [Validators.required])
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
display: new UntypedFormControl('', [Validators.required]),
id_output_family: new UntypedFormControl('', [Validators.required])
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { OutputFamily } from 'src/app/metamodel/models';
......@@ -20,10 +20,10 @@ export class OutputFamilyFormComponent {
@Input() outputFamily: OutputFamily;
@Output() onSubmit: EventEmitter<OutputFamily> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
display: new FormControl('', [Validators.required]),
opened: new FormControl(true)
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
display: new UntypedFormControl('', [Validators.required]),
opened: new UntypedFormControl(true)
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { WebpageFamily } from 'src/app/metamodel/models';
......@@ -20,10 +20,10 @@ export class WebpageFamilyFormComponent implements OnInit {
@Input() webpageFamily: WebpageFamily;
@Output() onSubmit: EventEmitter<WebpageFamily> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
icon: new FormControl(null),
display: new FormControl('', [Validators.required])
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
icon: new UntypedFormControl(null),
display: new UntypedFormControl('', [Validators.required])
});
ngOnInit() {
......
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { Webpage, WebpageFamily } from 'src/app/metamodel/models';
......@@ -13,13 +13,13 @@ export class WebpageFormComponent implements OnInit {
@Input() idWebpageFamily: number;
@Output() onSubmit: EventEmitter<Webpage> = new EventEmitter();
public form = new FormGroup({
label: new FormControl('', [Validators.required]),
icon: new FormControl(null),
display: new FormControl('', [Validators.required]),
title: new FormControl('', [Validators.required]),
content: new FormControl('', [Validators.required]),
id_webpage_family: new FormControl('', [Validators.required])
public form = new UntypedFormGroup({
label: new UntypedFormControl('', [Validators.required]),
icon: new UntypedFormControl(null),
display: new UntypedFormControl('', [Validators.required]),
title: new UntypedFormControl('', [Validators.required]),
content: new UntypedFormControl('', [Validators.required]),
id_webpage_family: new UntypedFormControl('', [Validators.required])
});
ngOnInit() {
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { UntypedFormGroup, UntypedFormControl, Validators } from '@angular/forms';
import { ConeSearch, Resolver } from 'src/app/instance/store/models';
import { nanValidator, rangeValidator } from '../validators';
......@@ -30,20 +30,20 @@ export class ConeSearchComponent implements OnChanges {
@Input() resolverIsLoaded: boolean;
@Output() retrieveCoordinates: EventEmitter<string> = new EventEmitter();
public form = new FormGroup({
ra: new FormControl('', [Validators.required, nanValidator, rangeValidator(0, 360, 'RA')]),
ra_hms: new FormGroup({
h: new FormControl('', [Validators.required, nanValidator, rangeValidator(0, 24, 'Hours')]),
m: new FormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Minutes')]),
s: new FormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Seconds')])
public form = new UntypedFormGroup({
ra: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(0, 360, 'RA')]),
ra_hms: new UntypedFormGroup({
h: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(0, 24, 'Hours')]),
m: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Minutes')]),
s: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Seconds')])
}),
dec: new FormControl('', [Validators.required, nanValidator, rangeValidator(-90, 90, 'DEC')]),
dec_dms: new FormGroup({
d: new FormControl('', [Validators.required, nanValidator, rangeValidator(-90, 90, 'Degree')]),
m: new FormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Minutes')]),
s: new FormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Seconds')])
dec: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(-90, 90, 'DEC')]),
dec_dms: new UntypedFormGroup({
d: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(-90, 90, 'Degree')]),
m: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Minutes')]),
s: new UntypedFormControl('', [Validators.required, nanValidator, rangeValidator(0, 60, 'Seconds')])
}),
radius: new FormControl(2, [Validators.required, rangeValidator(0, 150, 'Radius')])
radius: new UntypedFormControl(2, [Validators.required, rangeValidator(0, 150, 'Radius')])
});
public unit = 'degree';
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, ChangeDetectionStrategy, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { Subscription } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
......@@ -30,7 +30,7 @@ import { Resolver } from 'src/app/instance/store/models';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DecComponent implements OnInit, OnDestroy, OnChanges {
@Input() form: FormGroup;
@Input() form: UntypedFormGroup;
@Input() unit: string;
@Input() resolver: Resolver;
......@@ -71,8 +71,8 @@ export class DecComponent implements OnInit, OnDestroy, OnChanges {
*
* @return FormGroup
*/
getDecDmsForm(): FormGroup {
return this.form.controls.dec_dms as FormGroup;
getDecDmsForm(): UntypedFormGroup {
return this.form.controls.dec_dms as UntypedFormGroup;
}
/**
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, ChangeDetectionStrategy, OnDestroy, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
import { Subscription } from 'rxjs';
import { debounceTime } from 'rxjs/operators';
......@@ -30,7 +30,7 @@ import { Resolver } from 'src/app/instance/store/models';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class RaComponent implements OnInit, OnDestroy, OnChanges {
@Input() form: FormGroup;
@Input() form: UntypedFormGroup;
@Input() unit: string;
@Input() resolver: Resolver;
......@@ -71,8 +71,8 @@ export class RaComponent implements OnInit, OnDestroy, OnChanges {
*
* @return FormGroup
*/
getRaHmsForm(): FormGroup {
return this.form.controls.ra_hms as FormGroup;
getRaHmsForm(): UntypedFormGroup {
return this.form.controls.ra_hms as UntypedFormGroup;
}
/**
......
......@@ -8,7 +8,7 @@
*/
import { Component, Input, ChangeDetectionStrategy } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { UntypedFormGroup } from '@angular/forms';
/**
* @class
......@@ -21,5 +21,5 @@ import { FormGroup } from '@angular/forms';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class RadiusComponent {
@Input() form: FormGroup;
@Input() form: UntypedFormGroup;
}