feat: Use V2 API's in Console (#9312)

# Which Problems Are Solved
Solves #8976

# Additional Changes
I have done some intensive refactorings and we are using the new
@zitadel/client package for GRPC access.

# Additional Context
- Closes #8976

---------

Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
Ramon
2025-02-17 19:25:46 +01:00
committed by GitHub
co-authored by Max Peintner
parent ad225836d5
commit 3042bbb993
90 changed files with 3679 additions and 2315 deletions
@@ -1,5 +1,5 @@
import { Component, Inject, OnInit } from '@angular/core';
import { FormGroup, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { FormGroup, UntypedFormControl, UntypedFormGroup, ValidatorFn } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { debounceTime } from 'rxjs';
import { requiredValidator } from 'src/app/modules/form-field/validators/validators';
@@ -11,6 +11,24 @@ export enum EditDialogType {
EMAIL = 2,
}
export type EditDialogData = {
confirmKey: 'ACTIONS.SAVE' | 'ACTIONS.CHANGE';
cancelKey: 'ACTIONS.CANCEL';
labelKey: 'ACTIONS.NEWVALUE';
titleKey: 'USER.LOGINMETHODS.EMAIL.EDITTITLE';
descriptionKey: 'USER.LOGINMETHODS.EMAIL.EDITDESC';
isVerifiedTextKey?: 'USER.LOGINMETHODS.EMAIL.ISVERIFIED';
isVerifiedTextDescKey?: 'USER.LOGINMETHODS.EMAIL.ISVERIFIEDDESC';
value: string | undefined;
type: EditDialogType;
validator?: ValidatorFn;
};
export type EditDialogResult = {
value?: string;
isVerified: boolean;
};
@Component({
selector: 'cnsl-edit-dialog',
templateUrl: './edit-dialog.component.html',
@@ -31,7 +49,7 @@ export class EditDialogComponent implements OnInit {
public countryPhoneCodes: CountryPhoneCode[] = [];
constructor(
public dialogRef: MatDialogRef<EditDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
@Inject(MAT_DIALOG_DATA) public data: EditDialogData,
private countryCallingCodesService: CountryCallingCodesService,
) {
if (data.type === EditDialogType.PHONE) {