Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,5 @@
}
}
}
},
"defaultProject": "querido-diario"
}
}
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
"npm": "7.24.0"
},
"dependencies": {
"@angular/animations": "~13.4.0",
"@angular/cdk": "^13.3.9",
"@angular/common": "~13.4.0",
"@angular/compiler": "~13.4.0",
"@angular/core": "~13.4.0",
"@angular/animations": "^14.3.0",
"@angular/cdk": "^14.2.7",
"@angular/common": "^14.3.0",
"@angular/compiler": "^14.3.0",
"@angular/core": "^14.3.0",
"@angular/flex-layout": "12.0.0-beta.34",
"@angular/forms": "~13.4.0",
"@angular/material": "^13.3.9",
"@angular/material-moment-adapter": "^13.3.9",
"@angular/platform-browser": "~13.4.0",
"@angular/platform-browser-dynamic": "~13.4.0",
"@angular/router": "~13.4.0",
"@angular/forms": "^14.3.0",
"@angular/material": "^14.2.7",
"@angular/material-moment-adapter": "^14.2.7",
"@angular/platform-browser": "^14.3.0",
"@angular/platform-browser-dynamic": "^14.3.0",
"@angular/router": "^14.3.0",
"@datorama/akita": "^7.1.1",
"angular-responsive-carousel": "^2.0.2",
"express": "^4.17.1",
Expand All @@ -43,9 +43,9 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.11",
"@angular/cli": "~13.3.11",
"@angular/compiler-cli": "~13.4.0",
"@angular-devkit/build-angular": "^14.2.13",
"@angular/cli": "^14.2.13",
"@angular/compiler-cli": "^14.3.0",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"autoprefixer": "^10.4.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import {
MAT_MOMENT_DATE_ADAPTER_OPTIONS,
MomentDateAdapter,
Expand Down Expand Up @@ -44,7 +44,7 @@ export class DatePickerRangeComponent implements OnInit {
start: Moment;
end: Moment;
}>();
range: FormGroup = new FormGroup({});
range: UntypedFormGroup = new UntypedFormGroup({});
maxDate: Date = new Date();
subscriptions: Subscription[] = [];

Expand All @@ -53,9 +53,9 @@ export class DatePickerRangeComponent implements OnInit {
ngOnInit(): void {
this.subscriptions.push(
this.route.queryParams.subscribe((params) => {
this.range = new FormGroup({
start: new FormControl(params.since),
end: new FormControl(params.until),
this.range = new UntypedFormGroup({
start: new UntypedFormControl(params.since),
end: new UntypedFormControl(params.until),
});
})
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import {
MAT_MOMENT_DATE_ADAPTER_OPTIONS,
MomentDateAdapter,
Expand Down Expand Up @@ -37,14 +37,14 @@ export class PeriodPickerComponent implements OnInit {
to: '',
};
@Output() rangeSelected: EventEmitter<PeriodRange> = new EventEmitter();
range: FormGroup = new FormGroup({});
range: UntypedFormGroup = new UntypedFormGroup({});

constructor() {}

ngOnInit(): void {
this.range = new FormGroup({
start: new FormControl(new Date(this.initialValue.from) || ''),
end: new FormControl(new Date(this.initialValue.to) || ''),
this.range = new UntypedFormGroup({
start: new UntypedFormControl(new Date(this.initialValue.from) || ''),
end: new UntypedFormControl(new Date(this.initialValue.to) || ''),
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { Meta, Title } from '@angular/platform-browser';
import { FormControl } from '@angular/forms';
import { UntypedFormControl } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { Moment } from 'moment';
import { Observable, Subscription } from 'rxjs';
Expand All @@ -17,7 +17,7 @@ import { DownloadCSVService } from './../../../services/download-csv/download-cs
styleUrls: ['./search-form.component.sass'],
})
export class SearchFormComponent implements OnInit {
termControl = new FormControl();
termControl = new UntypedFormControl();

@Input()
form: any;
Expand All @@ -34,7 +34,7 @@ export class SearchFormComponent implements OnInit {

filteredOptions: Observable<string[]> = new Observable();

cityControl = new FormControl();
cityControl = new UntypedFormControl();
territories: Territory[] = [];
selectedCities: Territory[] = [];
territory: string[] = [];
Expand Down
6 changes: 3 additions & 3 deletions src/app/modules/components/select/select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
OnInit,
Output,
} from '@angular/core';
import { FormControl } from '@angular/forms';
import { UntypedFormControl } from '@angular/forms';
import { Option } from 'src/app/interfaces/option';

@Component({
Expand All @@ -28,7 +28,7 @@ export class SelectComponent implements OnInit {
@Input()
selected: any;

selectControl = new FormControl({});
selectControl = new UntypedFormControl({});

constructor() {}

Expand All @@ -42,7 +42,7 @@ export class SelectComponent implements OnInit {

ngOnInit(): void {
if (this.selected) {
this.selectControl = new FormControl(this.selected);
this.selectControl = new UntypedFormControl(this.selected);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { LoginService } from 'src/app/services/login/login.service';
import { UserService } from 'src/app/stores/user/user.service';
Expand All @@ -16,7 +16,7 @@ export class LoginFormComponent implements OnInit {
@Output() onShowResetForm: EventEmitter<boolean> = new EventEmitter();
@Output() onLoggedIn: EventEmitter<boolean> = new EventEmitter();
@Output() onSetEmail: EventEmitter<string> = new EventEmitter();
formGroup: FormGroup = {} as FormGroup;
formGroup: UntypedFormGroup = {} as UntypedFormGroup;
loading = false;
showPass = false;
errorMessage = '';
Expand All @@ -28,9 +28,9 @@ export class LoginFormComponent implements OnInit {
) { }

ngOnInit(): void {
this.formGroup = new FormGroup({
password: new FormControl(null, [Validators.required]),
email: new FormControl(null, [Validators.required, Validators.maxLength(100), Validators.email]),
this.formGroup = new UntypedFormGroup({
password: new UntypedFormControl(null, [Validators.required]),
email: new UntypedFormControl(null, [Validators.required, Validators.maxLength(100), Validators.email]),
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { LoginService } from 'src/app/services/login/login.service';

@Component({
Expand All @@ -11,7 +11,7 @@ export class ResetPassModalComponent implements OnInit, OnChanges {
@Input() showForm = false;
@Input() email = '';
@Output() onHideForm: EventEmitter<boolean> = new EventEmitter();
formGroup: FormGroup = {} as FormGroup;
formGroup: UntypedFormGroup = {} as UntypedFormGroup;
loading = false;
errorMessage = '';

Expand All @@ -20,8 +20,8 @@ export class ResetPassModalComponent implements OnInit, OnChanges {
) { }

ngOnInit(): void {
this.formGroup = new FormGroup({
email: new FormControl(null, [Validators.required, Validators.maxLength(100), Validators.email]),
this.formGroup = new UntypedFormGroup({
email: new UntypedFormControl(null, [Validators.required, Validators.maxLength(100), Validators.email]),
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { LoginService } from 'src/app/services/login/login.service';

Expand All @@ -9,7 +9,7 @@ import { LoginService } from 'src/app/services/login/login.service';
styleUrls: ['./pass-reset.component.sass']
})
export class PassResetComponent implements OnInit {
formGroup: FormGroup = {} as FormGroup;
formGroup: UntypedFormGroup = {} as UntypedFormGroup;
errorMessage = '';
loading = false;
isSent = false;
Expand All @@ -30,8 +30,8 @@ export class PassResetComponent implements OnInit {
) { }

ngOnInit(): void {
this.formGroup = new FormGroup({
password: new FormControl(null, [Validators.required, Validators.minLength(8)]),
this.formGroup = new UntypedFormGroup({
password: new UntypedFormControl(null, [Validators.required, Validators.minLength(8)]),
});

this.route.queryParams
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar';
import { City } from 'src/app/interfaces/city';
Expand All @@ -15,7 +15,7 @@ import { EducationQuotationService } from 'src/app/services/educationQuotation/e
styleUrls: ['./request-analysis-form.component.sass'],
})
export class RequestAnalysisFormComponent implements OnInit {
form: FormGroup = this.formBuilder.group({});
form: UntypedFormGroup = this.formBuilder.group({});
cities: City[] = [];
themes: string[] = [];
locations: string[] = [];
Expand All @@ -26,7 +26,7 @@ export class RequestAnalysisFormComponent implements OnInit {
loading = false;

constructor(
private formBuilder: FormBuilder,
private formBuilder: UntypedFormBuilder,
private citiesService: CitiesService,
private searchService: EducationGazettesService,
private educationQuotationService: EducationQuotationService,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter } from '@angular/material-moment-adapter';
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { Moment } from 'moment';
Expand Down Expand Up @@ -30,7 +30,7 @@ export class PeriodFilterComponent implements OnInit {
@Output() changeDates: EventEmitter<GazetteFilters> = new EventEmitter();
activeTab = 0;
period: number = 1;
range: FormGroup = new FormGroup({});
range: UntypedFormGroup = new UntypedFormGroup({});

constructor() { }

Expand All @@ -44,9 +44,9 @@ export class PeriodFilterComponent implements OnInit {
this.setPeriod(1);
}

this.range = new FormGroup({
start: new FormControl(new Date(this.initialValue.published_since) || ''),
end: new FormControl(new Date(this.initialValue.until) || ''),
this.range = new UntypedFormGroup({
start: new UntypedFormControl(new Date(this.initialValue.published_since) || ''),
end: new UntypedFormControl(new Date(this.initialValue.until) || ''),
});
}

Expand Down
18 changes: 9 additions & 9 deletions src/app/modules/pages/area-education/signup/signup.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { City } from 'src/app/interfaces/city';
import { Territory } from 'src/app/interfaces/territory';
Expand All @@ -23,7 +23,7 @@ interface ErrorsModel {
})
export class SignupComponent implements OnInit {
showPass = false;
formGroup: FormGroup = {} as FormGroup;
formGroup: UntypedFormGroup = {} as UntypedFormGroup;
loading = false;
emailLoading = false;
emailExists = false;
Expand All @@ -50,13 +50,13 @@ export class SignupComponent implements OnInit {
) { }

ngOnInit(): void {
this.formGroup = new FormGroup({
name: new FormControl(null, [Validators.required, Validators.minLength(8)]),
password: new FormControl(null, [Validators.required]),
email: new FormControl(null, [Validators.required, Validators.maxLength(100), Validators.email]),
city: new FormControl(null, [Validators.required, Validators.minLength(8)]),
area: new FormControl(null, [Validators.required]),
state: new FormControl(null, []),
this.formGroup = new UntypedFormGroup({
name: new UntypedFormControl(null, [Validators.required, Validators.minLength(8)]),
password: new UntypedFormControl(null, [Validators.required]),
email: new UntypedFormControl(null, [Validators.required, Validators.maxLength(100), Validators.email]),
city: new UntypedFormControl(null, [Validators.required, Validators.minLength(8)]),
area: new UntypedFormControl(null, [Validators.required]),
state: new UntypedFormControl(null, []),
});

this.formGroup.controls.email.valueChanges.subscribe(value => {
Expand Down
10 changes: 5 additions & 5 deletions src/app/modules/pages/suggestion/suggestion.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog';
import { SuggestionService } from 'src/app/services/suggestion/suggestion.service';
import { FormSentComponent } from '../../components/form-sent/form-sent.component';
Expand All @@ -10,13 +10,13 @@ import { FormSentComponent } from '../../components/form-sent/form-sent.componen
styleUrls: ['./suggestion.component.sass'],
})
export class SuggestionComponent implements OnInit {
suggestionForm = new FormGroup({
name: new FormControl(null, Validators.required),
email_address: new FormControl(null, [
suggestionForm = new UntypedFormGroup({
name: new UntypedFormControl(null, Validators.required),
email_address: new UntypedFormControl(null, [
Validators.required,
Validators.email,
]),
content: new FormControl(null, Validators.required),
content: new UntypedFormControl(null, Validators.required),
});

error: string | null = null;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"target": "es2020",
"module": "es2020",
"lib": [
"es2018",
Expand Down
Loading