mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 02:25:17 +00:00
TD-319: Angular update to 14 (#102)
This commit is contained in:
parent
56f932c1e6
commit
617bcd9fee
@ -148,7 +148,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "control-center",
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
|
14809
package-lock.json
generated
14809
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
58
package.json
58
package.json
@ -17,20 +17,20 @@
|
||||
"fix": "npm run lint-fix; npm run prettier:fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "13.1.2",
|
||||
"@angular/cdk": "13.1.2",
|
||||
"@angular/common": "13.1.2",
|
||||
"@angular/compiler": "13.1.2",
|
||||
"@angular/core": "13.1.2",
|
||||
"@angular/flex-layout": "13.0.0-beta.36",
|
||||
"@angular/forms": "13.1.2",
|
||||
"@angular/material": "13.1.2",
|
||||
"@angular/material-moment-adapter": "13.1.2",
|
||||
"@angular/platform-browser": "13.1.2",
|
||||
"@angular/platform-browser-dynamic": "13.1.2",
|
||||
"@angular/platform-server": "13.1.2",
|
||||
"@angular/router": "13.1.2",
|
||||
"@ngneat/reactive-forms": "2.0.0",
|
||||
"@angular/animations": "14.0.4",
|
||||
"@angular/cdk": "14.0.4",
|
||||
"@angular/common": "14.0.4",
|
||||
"@angular/compiler": "14.0.4",
|
||||
"@angular/core": "14.0.4",
|
||||
"@angular/flex-layout": "14.0.0-beta.40",
|
||||
"@angular/forms": "14.0.4",
|
||||
"@angular/material": "14.0.4",
|
||||
"@angular/material-moment-adapter": "14.0.4",
|
||||
"@angular/platform-browser": "14.0.4",
|
||||
"@angular/platform-browser-dynamic": "14.0.4",
|
||||
"@angular/platform-server": "14.0.4",
|
||||
"@angular/router": "14.0.4",
|
||||
"@ngneat/reactive-forms": "5.0.0",
|
||||
"@ngneat/until-destroy": "9.0.0",
|
||||
"@s-libs/js-core": "13.1.0",
|
||||
"@s-libs/micro-dash": "13.1.0",
|
||||
@ -58,7 +58,7 @@
|
||||
"lodash-es": "4.17.15",
|
||||
"moment": "2.22.2",
|
||||
"monaco-editor": "0.21.2",
|
||||
"ngx-mat-select-search": "4.0.0",
|
||||
"ngx-mat-select-search": "4.2.0",
|
||||
"rxjs": "7.5.4",
|
||||
"short-uuid": "4.1.0",
|
||||
"transliteration": "2.1.8",
|
||||
@ -68,14 +68,14 @@
|
||||
"zone.js": "0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "13.1.3",
|
||||
"@angular-eslint/builder": "13.0.1",
|
||||
"@angular-eslint/eslint-plugin": "13.0.1",
|
||||
"@angular-eslint/eslint-plugin-template": "13.0.1",
|
||||
"@angular-eslint/schematics": "13.0.1",
|
||||
"@angular-eslint/template-parser": "13.0.1",
|
||||
"@angular/cli": "13.1.3",
|
||||
"@angular/compiler-cli": "13.1.2",
|
||||
"@angular-devkit/build-angular": "14.0.5",
|
||||
"@angular-eslint/builder": "14.0.0",
|
||||
"@angular-eslint/eslint-plugin": "14.0.0",
|
||||
"@angular-eslint/eslint-plugin-template": "14.0.0",
|
||||
"@angular-eslint/schematics": "14.0.0",
|
||||
"@angular-eslint/template-parser": "14.0.0",
|
||||
"@angular/cli": "14.0.5",
|
||||
"@angular/compiler-cli": "14.0.4",
|
||||
"@types/del": "4.0.0",
|
||||
"@types/humanize-duration": "3.18.0",
|
||||
"@types/jasmine": "3.6.2",
|
||||
@ -83,11 +83,11 @@
|
||||
"@types/lodash-es": "4.17.3",
|
||||
"@types/node": "16.4.12",
|
||||
"@types/uuid": "3.4.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.9.1",
|
||||
"@typescript-eslint/parser": "5.8.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"del": "5.1.0",
|
||||
"dotenv": "16.0.0",
|
||||
"eslint": "8.7.0",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.25.4",
|
||||
"eslint-plugin-jasmine": "4.1.3",
|
||||
@ -103,10 +103,10 @@
|
||||
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||
"karma-jasmine": "4.0.1",
|
||||
"karma-jasmine-html-reporter": "1.5.3",
|
||||
"ngx-build-plus": "13.0.1",
|
||||
"ngx-build-plus": "14.0.0",
|
||||
"prettier": "2.6.1",
|
||||
"ts-mockito": "2.6.1",
|
||||
"ts-node": "8.8.2",
|
||||
"typescript": "4.5.5"
|
||||
"typescript": "4.7.4"
|
||||
}
|
||||
}
|
||||
}
|
@ -25,7 +25,6 @@ import { ResetConfirmDialogComponent } from './reset-confirm-dialog/reset-confir
|
||||
MonacoEditorModule,
|
||||
MatDialogModule,
|
||||
],
|
||||
entryComponents: [ResetConfirmDialogComponent],
|
||||
exports: [DomainObjModificationComponent],
|
||||
})
|
||||
export class DomainObjModificationModule {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-add-ids-input',
|
||||
@ -11,7 +11,7 @@ export class AddIdsInputComponent {
|
||||
@Output()
|
||||
add = new EventEmitter();
|
||||
|
||||
idsControl = new FormControl('');
|
||||
idsControl = new UntypedFormControl('');
|
||||
|
||||
emitAdd() {
|
||||
this.add.emit(this.execIdsFromStr(this.idsControl.value));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
@ -26,11 +26,11 @@ export interface DialogData {
|
||||
export class RepairWithScenarioSettingsComponent {
|
||||
scenarios = Object.values(Scenario);
|
||||
codes: string[] = ['authorization_failed'];
|
||||
formGroup: FormGroup;
|
||||
formGroup: UntypedFormGroup;
|
||||
autocompleteCodes$: Observable<string[]>;
|
||||
|
||||
constructor(
|
||||
fb: FormBuilder,
|
||||
fb: UntypedFormBuilder,
|
||||
public dialogRef: MatDialogRef<RepairWithScenarioSettingsComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: DialogData
|
||||
) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
@ -23,11 +23,11 @@ export interface DialogData {
|
||||
export class RepairSettingsComponent {
|
||||
scenarios = Object.values(Scenario);
|
||||
codes: string[] = ['unknown'];
|
||||
formGroup: FormGroup;
|
||||
formGroup: UntypedFormGroup;
|
||||
autocompleteCodes$: Observable<string[]>;
|
||||
|
||||
constructor(
|
||||
fb: FormBuilder,
|
||||
fb: UntypedFormBuilder,
|
||||
public dialogRef: MatDialogRef<RepairSettingsComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: DialogData
|
||||
) {
|
||||
|
@ -68,7 +68,6 @@ import { SimpleRepairComponent } from './simple-repair/simple-repair.component';
|
||||
AddIdsInputComponent,
|
||||
RepairingStatusComponent,
|
||||
],
|
||||
entryComponents: [RepairWithScenarioSettingsComponent, RepairSettingsComponent],
|
||||
providers: [RepairingService],
|
||||
})
|
||||
export class RepairingModule {}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
import { Component } from '@angular/core';
|
||||
import { FormBuilder, FormControl } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
||||
import { Machine } from '@vality/machinegun-proto';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@ -41,10 +41,10 @@ export class SimpleRepairComponent {
|
||||
dataSource: Element[] = [];
|
||||
selection = new SelectionModel<Element>(true, []);
|
||||
namespaces = Object.values(Namespace);
|
||||
nsControl: FormControl;
|
||||
nsControl: UntypedFormControl;
|
||||
isLoading$: Observable<boolean>;
|
||||
|
||||
constructor(fb: FormBuilder, private repairingService: RepairingService) {
|
||||
constructor(fb: UntypedFormBuilder, private repairingService: RepairingService) {
|
||||
this.isLoading$ = repairingService.isLoading$;
|
||||
this.nsControl = fb.control(Namespace.Invoice);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { Component, Injector } from '@angular/core';
|
||||
import { Validators } from '@angular/forms';
|
||||
import { FormBuilder } from '@ngneat/reactive-forms';
|
||||
import { Validators, FormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { Claim, ClaimStatus } from '@vality/domain-proto/lib/claim_management';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
@ -20,13 +19,11 @@ export class ChangeStatusDialogComponent extends BaseDialogSuperclass<
|
||||
ChangeStatusDialogComponent,
|
||||
{ partyID: string; claim: Claim }
|
||||
> {
|
||||
form = this.fb.group<{ status: keyof ClaimStatus; revokeReason?: string; denyReason?: string }>(
|
||||
{
|
||||
status: [null, Validators.required],
|
||||
revokeReason: null,
|
||||
denyReason: null,
|
||||
}
|
||||
);
|
||||
form = this.fb.group({
|
||||
status: [null as keyof ClaimStatus, Validators.required],
|
||||
revokeReason: null as string,
|
||||
denyReason: null as string,
|
||||
});
|
||||
statuses = this.allowedClaimStatusesService.getAllowedStatuses(
|
||||
getUnionKey(this.dialogData.claim.status)
|
||||
);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, Inject, OnInit } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
|
||||
@ -13,7 +13,7 @@ import { CreateRevertDialogConfig } from './types/create-revert-dialog-config';
|
||||
providers: [CreateRevertService],
|
||||
})
|
||||
export class CreateRevertDialogComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
revertCreated$ = this.createRevertService.revertCreated$;
|
||||
isLoading$ = this.createRevertService.isLoading$;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { RevertParams } from '@vality/fistful-proto/lib/deposit_revert';
|
||||
import { EMPTY, merge, ReplaySubject, Subject } from 'rxjs';
|
||||
import { catchError, map, shareReplay, switchMap, withLatestFrom } from 'rxjs/operators';
|
||||
@ -41,10 +41,10 @@ export class CreateRevertService {
|
||||
error$ = this.errorSubject$.asObservable();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/member-ordering
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private idGenerator: UserInfoBasedIdGeneratorService,
|
||||
private depositManagementService: ManagementService
|
||||
) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
@ -17,7 +17,7 @@ import { CreateDepositService } from './services/create-deposit/create-deposit.s
|
||||
providers: [CreateDepositService],
|
||||
})
|
||||
export class CreateDepositDialogComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
currencies = this.configService.config.constants.currencies;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { DepositParams } from '@vality/fistful-proto/lib/fistful_admin';
|
||||
import { StatDeposit } from '@vality/fistful-proto/lib/fistful_stat';
|
||||
import Int64 from '@vality/thrift-ts/lib/int64';
|
||||
@ -79,7 +79,7 @@ export class CreateDepositService {
|
||||
private fistfulAdminService: FistfulAdminService,
|
||||
private fistfulStatisticsService: FistfulStatisticsService,
|
||||
private keycloakService: KeycloakService,
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private idGenerator: UserInfoBasedIdGeneratorService,
|
||||
private configService: ConfigService
|
||||
) {}
|
||||
@ -88,7 +88,7 @@ export class CreateDepositService {
|
||||
this.create$.next();
|
||||
}
|
||||
|
||||
private initForm(): FormGroup {
|
||||
private initForm(): UntypedFormGroup {
|
||||
return this.fb.group({
|
||||
destination: ['', Validators.required],
|
||||
amount: ['', [Validators.required, Validators.pattern(/^\d+([,.]\d{1,2})?$/)]],
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import * as moment from 'moment';
|
||||
import { debounceTime, filter, map, shareReplay } from 'rxjs/operators';
|
||||
|
||||
@ -28,7 +28,7 @@ export class SearchFiltersService {
|
||||
shareReplay(1)
|
||||
);
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
init(params: SearchParams) {
|
||||
this.form.patchValue(searchParamsToFormParams(params));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { combineLatest, Subject } from 'rxjs';
|
||||
import { map, shareReplay, startWith } from 'rxjs/operators';
|
||||
|
||||
@ -32,7 +32,7 @@ export class ChangesetsFilterService {
|
||||
shareReplay(1)
|
||||
);
|
||||
|
||||
constructor(private fb: FormBuilder) {
|
||||
constructor(private fb: UntypedFormBuilder) {
|
||||
this.filteredChangesetInfos$.subscribe();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { PartyModification } from '@vality/domain-proto/lib/claim_management';
|
||||
|
||||
@ -17,12 +17,12 @@ type ModificationType =
|
||||
})
|
||||
export class EditUnsavedModificationComponent {
|
||||
mod = this.data;
|
||||
form: FormGroup = this.fb.group({});
|
||||
form: UntypedFormGroup = this.fb.group({});
|
||||
modType: ModificationType = getUnionKey<PartyModification>(this.data);
|
||||
|
||||
constructor(
|
||||
private dialogRef: MatDialogRef<EditUnsavedModificationComponent>,
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
@Inject(MAT_DIALOG_DATA) private data: PartyModification
|
||||
) {}
|
||||
|
||||
|
@ -10,7 +10,6 @@ import { EditUnsavedModificationComponent } from './edit-unsaved-modification.co
|
||||
|
||||
@NgModule({
|
||||
declarations: [EditUnsavedModificationComponent],
|
||||
entryComponents: [EditUnsavedModificationComponent],
|
||||
imports: [
|
||||
MatDialogModule,
|
||||
CommonModule,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { UntypedFormGroup } from '@angular/forms';
|
||||
|
||||
import { SendCommentService } from './send-comment.service';
|
||||
|
||||
@ -14,7 +14,7 @@ export class SendCommentComponent {
|
||||
@Input()
|
||||
disabled?: boolean;
|
||||
|
||||
form: FormGroup = this.sendCommentService.form;
|
||||
form: UntypedFormGroup = this.sendCommentService.form;
|
||||
inProgress$ = this.sendCommentService.inProgress$;
|
||||
|
||||
constructor(private sendCommentService: SendCommentService) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { Modification } from '@vality/domain-proto/lib/claim_management';
|
||||
import { ConversationId, User } from '@vality/messages-proto';
|
||||
@ -60,7 +60,7 @@ export class SendCommentService {
|
||||
inProgress$ = progress(this.sendComment$, merge(this.comment$, this.hasError$));
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private messagesService: MessagesService,
|
||||
private keycloakTokenInfoService: KeycloakTokenInfoService,
|
||||
private snackBar: MatSnackBar,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import Int64 from '@vality/thrift-ts/lib/int64';
|
||||
import { merge, of, Subject } from 'rxjs';
|
||||
@ -79,7 +79,7 @@ export class StatusChangerDialogService {
|
||||
inProgress$ = progress(this.updateClaim$, merge(this.statusChanged$, this.hasError$));
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private claimManagementService: ClaimManagementService,
|
||||
private snackBar: MatSnackBar
|
||||
) {
|
||||
|
@ -30,7 +30,6 @@ import { StatusChangerService } from './status-changer.service';
|
||||
ApiModelPipesModule,
|
||||
],
|
||||
declarations: [StatusChangerDialogComponent],
|
||||
entryComponents: [StatusChangerDialogComponent],
|
||||
providers: [StatusChangerService],
|
||||
})
|
||||
export class StatusChangerModule {}
|
||||
|
@ -1,5 +1,10 @@
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
UntypedFormGroup,
|
||||
Validators,
|
||||
} from '@angular/forms';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
@ -37,7 +42,7 @@ import { ExecutorService } from './executor.service';
|
||||
],
|
||||
})
|
||||
export class CreateAndCaptureComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
isLoading: boolean;
|
||||
|
||||
@ -86,7 +91,7 @@ export class CreateAndCaptureComponent implements OnInit {
|
||||
@Inject(MAT_DIALOG_DATA) data: StatPayment[],
|
||||
private snackBar: MatSnackBar,
|
||||
private keycloakService: KeycloakService,
|
||||
private fb: FormBuilder
|
||||
private fb: UntypedFormBuilder
|
||||
) {
|
||||
this.payments = data;
|
||||
}
|
||||
@ -112,7 +117,7 @@ export class CreateAndCaptureComponent implements OnInit {
|
||||
.pipe(distinctUntilChanged(isEqual), untilDestroyed(this))
|
||||
.subscribe((formValue) => {
|
||||
if (formValue?.status_change === 'failed')
|
||||
this.form.addControl('failure_code', new FormControl(''));
|
||||
this.form.addControl('failure_code', new UntypedFormControl(''));
|
||||
else this.form.removeControl('failure_code');
|
||||
});
|
||||
}
|
||||
@ -122,11 +127,11 @@ export class CreateAndCaptureComponent implements OnInit {
|
||||
switch (value) {
|
||||
case 'cash_flow':
|
||||
this.form.removeControl('status_change');
|
||||
this.form.addControl('cash_flow', new FormControl(''));
|
||||
this.form.addControl('cash_flow', new UntypedFormControl(''));
|
||||
break;
|
||||
case 'status_change':
|
||||
this.form.removeControl('cash_flow');
|
||||
this.form.addControl('status_change', new FormControl(''));
|
||||
this.form.addControl('status_change', new UntypedFormControl(''));
|
||||
break;
|
||||
}
|
||||
this.form.updateValueAndValidity();
|
||||
|
@ -77,6 +77,5 @@ import { TableComponent } from './table/table.component';
|
||||
CancelActionsComponent,
|
||||
CaptureActionsComponent,
|
||||
],
|
||||
entryComponents: [CreateAndCaptureComponent],
|
||||
})
|
||||
export class PaymentAdjustmentModule {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import * as moment from 'moment';
|
||||
import { map } from 'rxjs/operators';
|
||||
@ -20,13 +20,13 @@ export class SearchFormComponent implements OnInit {
|
||||
@Output()
|
||||
statusChanges: EventEmitter<string> = new EventEmitter();
|
||||
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
statuses: string[] = ['pending', 'processed', 'captured', 'cancelled', 'refunded', 'failed'];
|
||||
|
||||
constructor(
|
||||
private paymentAdjustmentService: PaymentAdjustmentService,
|
||||
private fb: FormBuilder
|
||||
private fb: UntypedFormBuilder
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Component, Injector } from '@angular/core';
|
||||
import { Validators } from '@angular/forms';
|
||||
import { FormBuilder } from '@ngneat/reactive-forms';
|
||||
import { Validators, FormBuilder } from '@angular/forms';
|
||||
import { PartyID, ShopID } from '@vality/domain-proto';
|
||||
import { PayoutStatusType, PayoutToolType } from '@vality/magista-proto';
|
||||
import { Party, Shop } from '@vality/magista-proto/lib/domain';
|
||||
import { Moment } from 'moment';
|
||||
@ -25,14 +25,14 @@ export interface PayoutsSearchForm {
|
||||
providers: createControlProviders(PayoutsSearchFormComponent),
|
||||
})
|
||||
export class PayoutsSearchFormComponent extends ValidatedControlSuperclass<PayoutsSearchForm> {
|
||||
control = this.fb.group<PayoutsSearchForm>({
|
||||
payoutId: null,
|
||||
partyId: null,
|
||||
control = this.fb.group({
|
||||
payoutId: null as string,
|
||||
partyId: null as PartyID,
|
||||
fromTime: [moment().subtract(1, 'year').startOf('d'), Validators.required],
|
||||
toTime: [moment().endOf('d'), Validators.required],
|
||||
shops: null,
|
||||
payoutStatusTypes: null,
|
||||
payoutToolType: null,
|
||||
shops: null as ShopID[],
|
||||
payoutStatusTypes: null as PayoutStatusType[],
|
||||
payoutToolType: null as PayoutToolType,
|
||||
});
|
||||
|
||||
statusType = PayoutStatusType;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@ -29,7 +29,7 @@ export class ChangeDelegateRulesetDialogComponent
|
||||
|
||||
constructor(
|
||||
injector: Injector,
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private routingRulesService: RoutingRulesService
|
||||
) {
|
||||
super(injector);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
@ -31,7 +31,7 @@ export class AttachNewRulesetDialogComponent extends BaseDialogSuperclass<
|
||||
|
||||
constructor(
|
||||
injector: Injector,
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private routingRulesService: RoutingRulesService,
|
||||
private errorService: ErrorService
|
||||
) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Injector } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
|
||||
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
@ -24,7 +24,7 @@ export class InitializeRoutingRulesDialogComponent extends BaseDialogSuperclass<
|
||||
|
||||
constructor(
|
||||
injector: Injector,
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private routingRulesService: RoutingRulesService,
|
||||
private errorService: ErrorService
|
||||
) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormArray, FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormArray, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { Predicate } from '@vality/domain-proto/lib/domain';
|
||||
import { of } from 'rxjs';
|
||||
@ -32,11 +32,11 @@ export class AddRoutingRuleDialogService {
|
||||
});
|
||||
|
||||
get newTerminalOptionsForm() {
|
||||
return this.form.get('newTerminal').get('options') as FormArray;
|
||||
return this.form.get('newTerminal').get('options') as UntypedFormArray;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private dialogRef: MatDialogRef<AddRoutingRuleDialogComponent>,
|
||||
private routingRulesService: RoutingRulesService,
|
||||
private terminalService: TerminalService
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
OnChanges,
|
||||
Output,
|
||||
} from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { PaymentInstitutionObject } from '@vality/domain-proto';
|
||||
import sortBy from 'lodash-es/sortBy';
|
||||
@ -55,7 +55,7 @@ export class TargetRulesetFormComponent implements OnChanges {
|
||||
}
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private domainStoreService: DomainStoreService,
|
||||
private routingRulesService: RoutingRulesService
|
||||
) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { debounceTime, filter, shareReplay } from 'rxjs/operators';
|
||||
|
||||
import { PartiesSearchFiltersParams } from './parties-search-filters-params';
|
||||
@ -16,7 +16,7 @@ export class PartiesSearchFiltersService {
|
||||
shareReplay(1)
|
||||
);
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
init(params: PartiesSearchFiltersParams) {
|
||||
this.form.patchValue(params);
|
||||
|
@ -16,7 +16,6 @@ import { SelectProviderComponent, TerminalsTableComponent } from './components';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AddTerminalDialogComponent, SelectProviderComponent, TerminalsTableComponent],
|
||||
entryComponents: [AddTerminalDialogComponent],
|
||||
imports: [
|
||||
MatDialogModule,
|
||||
MatButtonModule,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { PartyID, ProviderObject, ShopID } from '@vality/domain-proto/lib/domain';
|
||||
import { merge, Observable, Subject } from 'rxjs';
|
||||
import { map, shareReplay, switchMap } from 'rxjs/operators';
|
||||
@ -47,7 +47,7 @@ export class AddTerminalDecisionService {
|
||||
constructor(
|
||||
private domainStoreService: DomainStoreService,
|
||||
private providerService: ProviderService,
|
||||
private fb: FormBuilder
|
||||
private fb: UntypedFormBuilder
|
||||
) {
|
||||
this.terminalAdded$.subscribe();
|
||||
}
|
||||
@ -63,7 +63,7 @@ export class AddTerminalDecisionService {
|
||||
);
|
||||
}
|
||||
|
||||
private prepareForm(): FormGroup {
|
||||
private prepareForm(): UntypedFormGroup {
|
||||
return this.fb.group({
|
||||
id: ['', Validators.required],
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
||||
import { FormControl, Validators } from '@angular/forms';
|
||||
import { UntypedFormControl, Validators } from '@angular/forms';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { PartyID, ShopID } from '@vality/domain-proto';
|
||||
import { TerminalID } from '@vality/fistful-proto';
|
||||
@ -13,7 +13,7 @@ import { EditTerminalDialogResponse, TerminalActionTypes } from '../../types';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class EditTerminalDialogComponent {
|
||||
editValueControl = new FormControl('', [Validators.required]);
|
||||
editValueControl = new UntypedFormControl('', [Validators.required]);
|
||||
terminalActionTypes = TerminalActionTypes;
|
||||
inProgress$ = this.editTerminalDecisionPropertyForShopService.inProgress$;
|
||||
|
||||
|
@ -32,7 +32,6 @@ import { ShopProvidersComponent } from './shop-providers.component';
|
||||
ReactiveFormsModule,
|
||||
AddTerminalDialogModule,
|
||||
],
|
||||
entryComponents: [EditTerminalDialogComponent],
|
||||
exports: [ShopProvidersComponent],
|
||||
})
|
||||
export class ShopProvidersModule {}
|
||||
|
@ -24,6 +24,13 @@
|
||||
></mat-progress-bar>
|
||||
</div>
|
||||
<cc-base-dialog-actions>
|
||||
<button mat-button color="primary" [disabled]="statusControl.invalid">CREATE</button>
|
||||
<button
|
||||
mat-button
|
||||
color="primary"
|
||||
[disabled]="statusControl.invalid"
|
||||
(click)="createAdjustment()"
|
||||
>
|
||||
CREATE
|
||||
</button>
|
||||
</cc-base-dialog-actions>
|
||||
</cc-base-dialog>
|
||||
|
@ -50,7 +50,7 @@ export class CreateAdjustmentDialogComponent extends BaseDialogSuperclass<
|
||||
super(injector);
|
||||
}
|
||||
|
||||
adjustment() {
|
||||
createAdjustment() {
|
||||
this.progress = 0;
|
||||
combineLatest(
|
||||
this.dialogData.withdrawals.map((w) =>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { DateRange } from '@angular/material/datepicker';
|
||||
import { FormBuilder } from '@ngneat/reactive-forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { PartyID } from '@vality/domain-proto';
|
||||
import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat';
|
||||
@ -79,7 +79,9 @@ export class WithdrawalsComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.filters.valueChanges.pipe(untilDestroyed(this)).subscribe((v) => this.qp.set(v));
|
||||
this.filters.valueChanges
|
||||
.pipe(untilDestroyed(this))
|
||||
.subscribe((v) => this.qp.set(v as WithdrawalsForm));
|
||||
this.qp.params$
|
||||
.pipe(untilDestroyed(this))
|
||||
.subscribe(({ dateRange, merchant, status, amountFrom, amountTo, withdrawalId }) =>
|
||||
|
@ -2,7 +2,7 @@ import { FocusMonitor } from '@angular/cdk/a11y';
|
||||
import { Platform } from '@angular/cdk/platform';
|
||||
import { AutofillMonitor } from '@angular/cdk/text-field';
|
||||
import { Component, ElementRef, OnInit, Optional, Self } from '@angular/core';
|
||||
import { FormControl, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
||||
import { UntypedFormControl, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
||||
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
||||
import { ErrorStateMatcher } from '@angular/material/core';
|
||||
import { debounceTime, take } from 'rxjs/operators';
|
||||
@ -18,7 +18,7 @@ import { FetchPartiesService } from '../../services';
|
||||
providers: [FetchPartiesService],
|
||||
})
|
||||
export class MerchantSearcherComponent extends CustomFormControl implements OnInit {
|
||||
searchControl = new FormControl();
|
||||
searchControl = new UntypedFormControl();
|
||||
parties$ = this.fetchMarchantsService.parties$;
|
||||
|
||||
constructor(
|
||||
|
@ -24,7 +24,7 @@ export class StructFormComponent<T extends { [N in string]: unknown }>
|
||||
{
|
||||
@Input() data: MetadataFormData<string, Field[]>;
|
||||
|
||||
control = this.fb.group<T>({} as T);
|
||||
control = this.fb.group<T>({} as any);
|
||||
labelControl = this.fb.control(false);
|
||||
|
||||
get hasLabel() {
|
||||
|
@ -44,9 +44,7 @@ export class UnionFieldComponent<T extends { [N in string]: unknown }>
|
||||
}
|
||||
|
||||
validate(): ValidationErrors | null {
|
||||
return (
|
||||
(this.fieldControl.errors as ValidationErrors) || getErrorsTree(this.internalControl)
|
||||
);
|
||||
return this.fieldControl.errors || getErrorsTree(this.internalControl);
|
||||
}
|
||||
|
||||
handleIncomingValue(value: T) {
|
||||
|
@ -21,7 +21,6 @@ import { CreateModificationDialogComponent } from './create-modification-dialog.
|
||||
ModificationNameModule,
|
||||
],
|
||||
declarations: [CreateModificationDialogComponent],
|
||||
entryComponents: [CreateModificationDialogComponent],
|
||||
providers: [PartyModificationEmitter],
|
||||
})
|
||||
export class CreateModificationDialogModule {}
|
||||
|
@ -7,7 +7,12 @@ import {
|
||||
Output,
|
||||
SimpleChanges,
|
||||
} from '@angular/core';
|
||||
import { FormBuilder, FormControlStatus, FormGroup, Validators } from '@angular/forms';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
FormControlStatus,
|
||||
UntypedFormGroup,
|
||||
Validators,
|
||||
} from '@angular/forms';
|
||||
import { ContractorModification } from '@vality/domain-proto/lib/claim_management';
|
||||
import {
|
||||
ContractModification,
|
||||
@ -53,9 +58,9 @@ export class PartyModificationCreationComponent implements OnInit, OnChanges {
|
||||
contractModificationNames = ContractModificationName;
|
||||
contractorModificationNames = ContractorModificationName;
|
||||
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form = this.fb.group({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import * as uuid from 'uuid/v4';
|
||||
|
||||
@Component({
|
||||
@ -13,9 +13,9 @@ export class FillInUnitIdComponent implements OnInit {
|
||||
@Output()
|
||||
valueChanges: EventEmitter<string> = new EventEmitter();
|
||||
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form = this.fb.group({
|
||||
|
@ -16,6 +16,5 @@ import { UnitActionsNavListComponent } from './unit-actions-nav-list.component';
|
||||
ModificationNameModule,
|
||||
],
|
||||
declarations: [UnitActionsNavListComponent],
|
||||
entryComponents: [UnitActionsNavListComponent],
|
||||
})
|
||||
export class UnitActionsNavListModule {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { BusinessScheduleRef } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class BusinessScheduleRefComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: BusinessScheduleRef;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const id = get(this, 'initialValue.id', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ContractAdjustmentModificationUnit } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
import * as uuid from 'uuid/v4';
|
||||
@ -10,12 +10,12 @@ import * as uuid from 'uuid/v4';
|
||||
})
|
||||
export class AdjustmentModificationUnitComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractAdjustmentModificationUnit;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const adjustmentId = get(this, 'initialValue.adjustment_id', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ContractAdjustmentModification } from '@vality/domain-proto/lib/payment_processing';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { ContractAdjustmentModification } from '@vality/domain-proto/lib/payment
|
||||
})
|
||||
export class AdjustmentModificationComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractAdjustmentModification;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl('creation', this.fb.group({}));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ContractAdjustmentParams } from '@vality/domain-proto/lib/payment_processing';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { ContractAdjustmentParams } from '@vality/domain-proto/lib/payment_proce
|
||||
})
|
||||
export class AdjustmentParamsComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractAdjustmentParams;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl('template', this.fb.group({}));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ContractParams } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,7 +9,7 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ContractParamsLegacyComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractParams;
|
||||
@ -18,7 +18,7 @@ export class ContractParamsLegacyComponent implements OnInit {
|
||||
|
||||
showPaymentInstitution = false;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl('contractor', this.fb.group({}));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ContractParams } from '@vality/domain-proto/lib/payment_processing';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { ContractParams } from '@vality/domain-proto/lib/payment_processing';
|
||||
})
|
||||
export class ContractParamsComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractParams;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.form.registerControl('payment_institution', this.fb.group({}));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { ContractTemplateRef } from '@vality/domain-proto/lib/domain';
|
||||
import { ContractTemplate } from '@vality/dominant-cache-proto';
|
||||
@ -15,7 +15,7 @@ import { DominantCacheService } from '@cc/app/api/dominant-cache';
|
||||
templateUrl: 'contract-template-ref.component.html',
|
||||
})
|
||||
export class ContractTemplateRefComponent implements OnInit {
|
||||
@Input() form: FormGroup;
|
||||
@Input() form: UntypedFormGroup;
|
||||
@Input() required: boolean;
|
||||
@Input() initialValue: ContractTemplateRef;
|
||||
|
||||
@ -23,7 +23,7 @@ export class ContractTemplateRefComponent implements OnInit {
|
||||
isLoading = true;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private dominantCacheService: DominantCacheService,
|
||||
private snackBar: MatSnackBar
|
||||
) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ContractorID } from '@vality/domain-proto';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { ContractorID } from '@vality/domain-proto';
|
||||
})
|
||||
export class ContractorIdComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractorID;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl(
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { Contractor } from '@vality/domain-proto/lib/domain';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { Contractor } from '@vality/domain-proto/lib/domain';
|
||||
})
|
||||
export class ContractorComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: Contractor;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl('legal_entity', this.fb.group({}));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { LegalAgreement } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class LegalAgreementBindingComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: LegalAgreement;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const legalAgreementId = get(this, 'initialValue.legal_agreement_id', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { InternationalLegalEntity } from '@vality/domain-proto/lib/domain';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { InternationalLegalEntity } from '@vality/domain-proto/lib/domain';
|
||||
})
|
||||
export class InternationalLegalEntityComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: InternationalLegalEntity;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.form.registerControl('legal_name', this.fb.control(null, Validators.required));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { LegalEntity } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -14,7 +14,7 @@ enum Type {
|
||||
})
|
||||
export class LegalEntityComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: LegalEntity;
|
||||
@ -25,7 +25,7 @@ export class LegalEntityComponent implements OnInit {
|
||||
|
||||
t = Type;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
const russianLegalEntity = get(this, 'initialValue.russian_legal_entity', null);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { RussianLegalEntity } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class RussianLegalEntityComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: RussianLegalEntity;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const control = (value) => this.fb.control(value, Validators.required);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ContractorID } from '@vality/domain-proto';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { ContractorID } from '@vality/domain-proto';
|
||||
})
|
||||
export class PaymentInstitutionIdComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractorID;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.form.registerControl('payment_institution', this.fb.group({}));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { PaymentInstitutionObject, PaymentInstitutionRef } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
@ -15,7 +15,7 @@ import { DomainStoreService } from '../../../../../thrift-services/damsel/domain
|
||||
})
|
||||
export class PaymentInstitutionRefComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
required: boolean;
|
||||
@ -28,7 +28,7 @@ export class PaymentInstitutionRefComponent implements OnInit {
|
||||
paymentInstitutions$: Observable<PaymentInstitutionObject[]>;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private domainStoreService: DomainStoreService,
|
||||
private snackBar: MatSnackBar
|
||||
) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { InternationalBankAccount } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,7 +9,7 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class InternationalBankAccountComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: InternationalBankAccount;
|
||||
@ -18,7 +18,7 @@ export class InternationalBankAccountComponent implements OnInit {
|
||||
|
||||
isCorrespondentAccount = false;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const num = get(this, 'initialValue.number', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { InternationalBankDetails } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class InternationalBankDetailsComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: InternationalBankDetails;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const control = (data = '') => this.fb.control(data);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { PayoutToolInfo } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -16,7 +16,7 @@ enum Type {
|
||||
})
|
||||
export class PayoutToolInfoComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: PayoutToolInfo;
|
||||
@ -32,7 +32,7 @@ export class PayoutToolInfoComponent implements OnInit {
|
||||
|
||||
t = Type;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
const russianBankAccount = get(this, 'initialValue.russian_bank_account', null);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { RussianBankAccount } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class RussianBankAccountComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: RussianBankAccount;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const control = (value) => this.fb.control(value, Validators.required);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-wallet-info',
|
||||
@ -7,9 +7,9 @@ import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
})
|
||||
export class WalletInfoComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl('wallet_id', this.fb.control(''));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { PayoutToolModificationUnit } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
import * as uuid from 'uuid/v4';
|
||||
@ -10,12 +10,12 @@ import * as uuid from 'uuid/v4';
|
||||
})
|
||||
export class PayoutToolModificationUnitComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: PayoutToolModificationUnit;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const payoutToolId = get(this, 'initialValue.payout_tool_id', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { PayoutToolModification } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -14,7 +14,7 @@ enum Type {
|
||||
})
|
||||
export class PayoutToolModificationComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: PayoutToolModification;
|
||||
@ -25,7 +25,7 @@ export class PayoutToolModificationComponent implements OnInit {
|
||||
|
||||
t = Type;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const creation = get(this, 'initialValue.creation', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { PayoutToolInfo } from '@vality/domain-proto/lib/domain';
|
||||
|
||||
@Component({
|
||||
@ -8,12 +8,12 @@ import { PayoutToolInfo } from '@vality/domain-proto/lib/domain';
|
||||
})
|
||||
export class PayoutToolParamsComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: PayoutToolInfo;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl('currency', this.fb.group({}));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ReportPreferences } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,14 +9,14 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ReportPreferencesComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ReportPreferences;
|
||||
|
||||
showPreferences = false;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.togglePreferences();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { RepresentativeDocument } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -14,7 +14,7 @@ enum Type {
|
||||
})
|
||||
export class RepresentativeDocumentComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: RepresentativeDocument;
|
||||
@ -25,7 +25,7 @@ export class RepresentativeDocumentComponent implements OnInit {
|
||||
|
||||
t = Type;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const articlesOfAssociation = get(this, 'initialValue.articles_of_association', null);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { Representative } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class RepresentativeComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: Representative;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const position = get(this, 'initialValue.position', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ContractTermination } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class TerminationComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ContractTermination;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const reason = get(this, 'initialValue.reason', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-currency-ref',
|
||||
@ -7,9 +7,9 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
})
|
||||
export class CurrencyRefComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form.registerControl('symbolic_code', this.fb.control('RUB', Validators.required));
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { CategoryRef } from '@vality/domain-proto/lib/domain';
|
||||
import { Category } from '@vality/dominant-cache-proto';
|
||||
@ -15,7 +15,7 @@ import { DominantCacheService } from '@cc/app/api/dominant-cache';
|
||||
templateUrl: 'category-ref.component.html',
|
||||
})
|
||||
export class CategoryRefComponent implements OnInit {
|
||||
@Input() form: FormGroup;
|
||||
@Input() form: UntypedFormGroup;
|
||||
@Input() required: boolean;
|
||||
@Input() initialValue: CategoryRef;
|
||||
|
||||
@ -24,7 +24,7 @@ export class CategoryRefComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
private dominantCacheService: DominantCacheService,
|
||||
private fb: FormBuilder,
|
||||
private fb: UntypedFormBuilder,
|
||||
private snackBar: MatSnackBar
|
||||
) {}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ShopContractModification } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ContractModificationComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ShopContractModification;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const contractId = get(this, 'initialValue.contract_id', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ShopLocation } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ShopLocationComponent implements OnChanges {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ShopLocation;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnChanges() {
|
||||
const url = get(this.initialValue, 'url', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { PayoutToolID } from '@vality/domain-proto';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class PayoutToolModificationComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: PayoutToolID;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const payoutToolId = get(this, 'initialValue.modification', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ShopAccountParams } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ShopAccountCreationComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ShopAccountParams;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const currency = get(this, 'initialValue.currency', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ShopDetails } from '@vality/domain-proto/lib/domain';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,12 +9,12 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ShopDetailsComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ShopDetails;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const name = get(this.initialValue, 'name', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ShopParams } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,14 +9,14 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ShopParamsComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ShopParams;
|
||||
|
||||
showCategory = false;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
const contractId = get(this, 'initialValue.contract_id', '');
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ScheduleModification } from '@vality/domain-proto/lib/payment_processing';
|
||||
import get from 'lodash-es/get';
|
||||
|
||||
@ -9,14 +9,14 @@ import get from 'lodash-es/get';
|
||||
})
|
||||
export class ShopPayoutScheduleModificationComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
form: UntypedFormGroup;
|
||||
|
||||
@Input()
|
||||
initialValue: ScheduleModification;
|
||||
|
||||
showSchedule = false;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
constructor(private fb: UntypedFormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
setTimeout(() => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { PartyID } from '@vality/domain-proto';
|
||||
import * as moment from 'moment';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
@ -44,7 +44,7 @@ export class PaymentsMainSearchFiltersService {
|
||||
|
||||
constructor(
|
||||
private partyManagementWithUserService: PartyManagementWithUserService,
|
||||
private fb: FormBuilder
|
||||
private fb: UntypedFormBuilder
|
||||
) {}
|
||||
|
||||
getShops(partyID: PartyID) {
|
||||
|
@ -34,6 +34,5 @@ import { OtherFiltersDialogService } from './other-filters-dialog.service';
|
||||
declarations: [OtherFiltersDialogComponent],
|
||||
exports: [OtherFiltersDialogComponent],
|
||||
providers: [OtherFiltersDialogService],
|
||||
entryComponents: [OtherFiltersDialogComponent],
|
||||
})
|
||||
export class OtherFiltersDialogModule {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
|
||||
import { DomainService } from '../../../../../domain';
|
||||
|
||||
@ -21,5 +21,5 @@ export class OtherFiltersDialogService {
|
||||
paymentSystemIs: null,
|
||||
});
|
||||
|
||||
constructor(private fb: FormBuilder, private domainService: DomainService) {}
|
||||
constructor(private fb: UntypedFormBuilder, private domainService: DomainService) {}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
SimpleChanges,
|
||||
ViewEncapsulation,
|
||||
} from '@angular/core';
|
||||
import { FormControl, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
||||
import { UntypedFormControl, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
||||
import { ErrorStateMatcher } from '@angular/material/core';
|
||||
|
||||
import { CustomFormControl, RadioButtonObject } from '../utils';
|
||||
@ -23,12 +23,12 @@ import { CustomFormControl, RadioButtonObject } from '../utils';
|
||||
encapsulation: ViewEncapsulation.Emulated,
|
||||
})
|
||||
export class ExpandableRadioGroupComponent extends CustomFormControl implements OnChanges {
|
||||
form = new FormControl();
|
||||
form = new UntypedFormControl();
|
||||
|
||||
@Input()
|
||||
values: RadioButtonObject[];
|
||||
|
||||
control = new FormControl();
|
||||
control = new UntypedFormControl();
|
||||
|
||||
visibleValues: RadioButtonObject[];
|
||||
|
||||
|
@ -17,7 +17,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import {
|
||||
ControlValueAccessor,
|
||||
FormControl,
|
||||
UntypedFormControl,
|
||||
FormGroupDirective,
|
||||
NgControl,
|
||||
NgForm,
|
||||
@ -50,10 +50,9 @@ export class CustomFormControl<I = any, P = I>
|
||||
@Input()
|
||||
placeholder: string;
|
||||
|
||||
readonly stateChanges: Subject<void> = new Subject<void>();
|
||||
controlType = 'text';
|
||||
autofilled = false;
|
||||
formControl = new FormControl();
|
||||
formControl = new UntypedFormControl();
|
||||
autocompleteOrigin: MatAutocompleteOrigin;
|
||||
monitorsRegistered = false;
|
||||
|
||||
@ -148,7 +147,7 @@ export class CustomFormControl<I = any, P = I>
|
||||
@Optional() parentForm: NgForm,
|
||||
@Optional() parentFormGroup: FormGroupDirective
|
||||
) {
|
||||
super(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl);
|
||||
super(defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl, new Subject());
|
||||
if (this.ngControl !== null) {
|
||||
// Set the value accessor directly
|
||||
// (instead of providing NG_VALUE_ACCESSOR)
|
||||
|
@ -1,12 +1,14 @@
|
||||
import { FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
||||
import { ErrorStateMatcher, mixinErrorState } from '@angular/material/core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
export class InputBase {
|
||||
constructor(
|
||||
public _defaultErrorStateMatcher: ErrorStateMatcher,
|
||||
public _parentForm: NgForm,
|
||||
public _parentFormGroup: FormGroupDirective,
|
||||
public ngControl: NgControl
|
||||
public ngControl: NgControl,
|
||||
public stateChanges: Subject<void>
|
||||
) {}
|
||||
}
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
import { AbstractControl } from '@ngneat/reactive-forms';
|
||||
import { Observable } from 'rxjs';
|
||||
import { distinctUntilChanged, map, startWith } from 'rxjs/operators';
|
||||
|
||||
export function getFormValidationChanges<T>(form: AbstractControl<T>): Observable<boolean> {
|
||||
return form.statusChanges.pipe(
|
||||
startWith(form.status),
|
||||
map(() => form.valid),
|
||||
distinctUntilChanged()
|
||||
);
|
||||
}
|
@ -1,14 +1,10 @@
|
||||
import { AbstractControl as NgAbstractControl } from '@angular/forms';
|
||||
import { AbstractControl } from '@ngneat/reactive-forms';
|
||||
import { AbstractControl } from '@angular/forms';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, startWith } from 'rxjs/operators';
|
||||
|
||||
import { getValue } from './get-value';
|
||||
|
||||
export function getFormValueChanges<T>(
|
||||
form: AbstractControl<T> | NgAbstractControl,
|
||||
hasStart = false
|
||||
): Observable<T> {
|
||||
export function getFormValueChanges<T>(form: AbstractControl<T>, hasStart = false): Observable<T> {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return form.valueChanges.pipe(
|
||||
...((hasStart ? [startWith(form.value)] : []) as []),
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { AbstractControl } from '@angular/forms';
|
||||
import { ControlsValue } from '@ngneat/reactive-forms/lib/types';
|
||||
|
||||
import { hasControls } from './has-controls';
|
||||
|
||||
@ -8,15 +7,15 @@ export function getValue<T extends AbstractControl>(control: T): T['value'] {
|
||||
return control.value as never;
|
||||
}
|
||||
if (Array.isArray(control.controls)) {
|
||||
const result: ControlsValue<T>[] = [];
|
||||
const result: T[] = [];
|
||||
for (const v of control.controls) {
|
||||
result.push(getValue(v) as ControlsValue<T>);
|
||||
result.push(getValue(v) as T);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
const result: Partial<ControlsValue<T>> = {};
|
||||
const result: Partial<T> = {};
|
||||
for (const [k, v] of Object.entries(control.controls)) {
|
||||
result[k] = getValue(v as AbstractControl) as ControlsValue<T>;
|
||||
result[k] = getValue(v as AbstractControl) as T;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
export * from './set-form-array-value';
|
||||
export * from './get-form-value-changes';
|
||||
export * from './get-form-validation-changes';
|
||||
export * from './validated-control-superclass';
|
||||
export * from './switch-control';
|
||||
|
@ -1,16 +0,0 @@
|
||||
import { FormArray } from '@ngneat/reactive-forms';
|
||||
import { AbstractControlOf } from '@ngneat/reactive-forms/lib/types';
|
||||
|
||||
export function replaceFormArrayValue<T, C extends AbstractControlOf<T>>(
|
||||
formArray: FormArray<C>,
|
||||
value: T[],
|
||||
createControl: (v: T) => C
|
||||
): FormArray<C> {
|
||||
formArray.clear();
|
||||
if (Array.isArray(value)) {
|
||||
for (const item of value) {
|
||||
formArray.push(createControl(item) as any);
|
||||
}
|
||||
}
|
||||
return formArray;
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"target": "es2020",
|
||||
"typeRoots": ["./node_modules/@types"],
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"allowSyntheticDefaultImports": true,
|
||||
|
Loading…
Reference in New Issue
Block a user