extends BaseQueryParams<
const NS_PARAM_PREFIX = '__';
@Injectable({ providedIn: 'root' })
-export class QueryParamsService>
- implements BaseQueryParams
-{
+export class QueryParamsService<
+ P extends object = NonNullable,
+> implements BaseQueryParams {
private router = inject(Router);
private route = inject(ActivatedRoute);
private readonly serializers =
diff --git a/projects/matez/src/lib/utils/async/async-transform.ts b/projects/matez/src/lib/utils/async/async-transform.ts
index d3b5869c0..95cbf33fe 100644
--- a/projects/matez/src/lib/utils/async/async-transform.ts
+++ b/projects/matez/src/lib/utils/async/async-transform.ts
@@ -17,8 +17,7 @@ export abstract class AsyncTransform<
TValue = unknown,
TParams extends unknown[] = [],
TResult = string | null,
-> implements OnDestroy
-{
+> implements OnDestroy {
protected abstract result$: Observable;
protected params$: Observable<[TValue, ...TParams]> = defer(() => this.args$).pipe(
diff --git a/projects/matez/src/lib/utils/component/component-changes.ts b/projects/matez/src/lib/utils/component/component-changes.ts
index 220e6065f..0ba8fed2f 100644
--- a/projects/matez/src/lib/utils/component/component-changes.ts
+++ b/projects/matez/src/lib/utils/component/component-changes.ts
@@ -1,7 +1,9 @@
import { SimpleChange } from '@angular/core';
-export interface ComponentChange
- extends Omit {
+export interface ComponentChange extends Omit<
+ SimpleChange,
+ 'previousValue' | 'currentValue'
+> {
previousValue: T[P];
currentValue: T[P];
}
diff --git a/projects/ng-thrift/package.json b/projects/ng-thrift/package.json
index 5c4f7d104..795c1c56d 100644
--- a/projects/ng-thrift/package.json
+++ b/projects/ng-thrift/package.json
@@ -1,6 +1,6 @@
{
"name": "@vality/ng-thrift",
- "version": "20.1.0",
+ "version": "21.0.0",
"publishConfig": {
"access": "public"
},
@@ -9,17 +9,17 @@
"yaml": "^2.8.1"
},
"peerDependencies": {
- "@angular/common": "^20.1.0",
- "@angular/core": "^20.1.0",
- "@angular/forms": "^20.1.0",
- "@angular/material": "^20.1.0",
- "@angular/router": "^20.1.0",
+ "@angular/common": "^21.2.0",
+ "@angular/core": "^21.2.5",
+ "@angular/forms": "^21.2.0",
+ "@angular/material": "^21.2.0",
+ "@angular/router": "^21.2.0",
"@vality/matez": "*",
- "@vality/ng-monaco-editor": "^20.0.0",
"@vality/thrift-ts": "*",
- "lodash-es": "^4.0.0",
- "monaco-editor": "^0.52.0",
- "rxjs": "^7.0.0",
- "utility-types": "^3.0.0"
+ "lodash-es": "^4.17.23",
+ "monaco-editor": "^0.55.1",
+ "ngx-monaco-editor-v2": "^21.1.0",
+ "rxjs": "^7.8.0",
+ "utility-types": "^3.11.0"
}
}
diff --git a/projects/ng-thrift/src/lib/components/thrift-editor/components/thrift-form/thrift-form.component.html b/projects/ng-thrift/src/lib/components/thrift-editor/components/thrift-form/thrift-form.component.html
index c5b8ca378..c490f498f 100644
--- a/projects/ng-thrift/src/lib/components/thrift-editor/components/thrift-form/thrift-form.component.html
+++ b/projects/ng-thrift/src/lib/components/thrift-editor/components/thrift-form/thrift-form.component.html
@@ -1,50 +1,59 @@
-
-
-
-
-
-
-
+ @if ((extensionResult$ | async)?.type || (extensionResult$ | async)?.template) {
+
-
-
-
-
-
-
+ >
+ } @else {
+ @switch (data?.typeGroup) {
+ @case ('primitive') {
+
+ }
+ @case ('complex') {
+
+ }
+ @case ('object') {
+ @switch (data.objectType) {
+ @case ('struct') {
+
+ }
+ @case ('union') {
+
+ }
+ @case ('enum') {
+
+ }
+ @case ('typedef') {
+
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/projects/ng-thrift/src/lib/components/thrift-editor/thrift-editor.module.ts b/projects/ng-thrift/src/lib/components/thrift-editor/thrift-editor.module.ts
index 6de0a9c43..fe5743ed9 100644
--- a/projects/ng-thrift/src/lib/components/thrift-editor/thrift-editor.module.ts
+++ b/projects/ng-thrift/src/lib/components/thrift-editor/thrift-editor.module.ts
@@ -1,3 +1,5 @@
+import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
+
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -7,7 +9,6 @@ import { MatIconModule } from '@angular/material/icon';
import { MatTooltipModule } from '@angular/material/tooltip';
import { PipesModule } from '@vality/matez';
-import { MonacoEditorModule } from '@vality/ng-monaco-editor';
import { ThriftMonacoComponent } from '../thrift-monaco/thrift-monaco.component';
diff --git a/projects/ng-thrift/src/lib/components/thrift-monaco/thrift-monaco.component.ts b/projects/ng-thrift/src/lib/components/thrift-monaco/thrift-monaco.component.ts
index d4a00a5bb..fa17534dc 100644
--- a/projects/ng-thrift/src/lib/components/thrift-monaco/thrift-monaco.component.ts
+++ b/projects/ng-thrift/src/lib/components/thrift-monaco/thrift-monaco.component.ts
@@ -1,8 +1,9 @@
+import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
+
import { Component, booleanAttribute, computed, inject, input, model, output } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { ThemeService } from '@vality/matez';
-import { MonacoEditorModule } from '@vality/ng-monaco-editor';
import { toJson } from '../../utils';
diff --git a/projects/ng-thrift/src/lib/components/thrift-viewer/thrift-viewer.module.ts b/projects/ng-thrift/src/lib/components/thrift-viewer/thrift-viewer.module.ts
index 7806c5217..b5c3e3c91 100644
--- a/projects/ng-thrift/src/lib/components/thrift-viewer/thrift-viewer.module.ts
+++ b/projects/ng-thrift/src/lib/components/thrift-viewer/thrift-viewer.module.ts
@@ -1,3 +1,5 @@
+import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
+
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -6,7 +8,6 @@ import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatIconModule } from '@angular/material/icon';
import { ContentLoadingComponent } from '@vality/matez';
-import { MonacoEditorModule } from '@vality/ng-monaco-editor';
import { ThriftMonacoComponent } from '../thrift-monaco';
diff --git a/src/app/app.config.ts b/src/app/app.config.ts
index edcb1b9cb..24bf9a6bd 100644
--- a/src/app/app.config.ts
+++ b/src/app/app.config.ts
@@ -1,5 +1,7 @@
import { provideKeycloak } from 'keycloak-angular';
+import { provideMonacoEditor } from 'ngx-monaco-editor-v2';
+import { OVERLAY_DEFAULT_CONFIG } from '@angular/cdk/overlay';
import { registerLocaleData } from '@angular/common';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import localeRu from '@angular/common/locales/ru';
@@ -12,14 +14,12 @@ import {
provideBrowserGlobalErrorListeners,
provideZoneChangeDetection,
} from '@angular/core';
-import { MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER } from '@angular/material/autocomplete';
import { MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
import { MatIconRegistry } from '@angular/material/icon';
import { provideRouter, withRouterConfig } from '@angular/router';
import { ERROR_PARSER, LogError, QUERY_PARAMS_SERIALIZERS } from '@vality/matez';
-import { provideMonacoEditor } from '@vality/ng-monaco-editor';
import { provideThriftServices } from '~/api/services';
import { CandidateCardComponent } from '~/components/candidate-card/candidate-card.component';
@@ -75,7 +75,7 @@ export const appConfig: ApplicationConfig = {
},
},
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } },
- MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER,
+ { provide: OVERLAY_DEFAULT_CONFIG, useValue: { usePopover: false } },
provideThriftServices(),
provideMonacoEditor(),
provideAppInitializer(() => {
diff --git a/src/app/chargebacks/components/create-chargebacks-by-file-dialog/utils/get-create-chargeback-args.ts b/src/app/chargebacks/components/create-chargebacks-by-file-dialog/utils/get-create-chargeback-args.ts
index 2d7bcbeb6..9444c19a8 100644
--- a/src/app/chargebacks/components/create-chargebacks-by-file-dialog/utils/get-create-chargeback-args.ts
+++ b/src/app/chargebacks/components/create-chargebacks-by-file-dialog/utils/get-create-chargeback-args.ts
@@ -1,5 +1,5 @@
import isNil from 'lodash-es/isNil';
-import short from 'short-uuid';
+import { generate } from 'short-uuid';
import { Invoicing } from '@vality/domain-proto/payment_processing';
import { clean } from '@vality/matez';
@@ -14,7 +14,7 @@ export function getCreateChargebackArgs(
c.payment_id,
clean(
{
- id: short().generate(),
+ id: generate(),
reason: {
code: c['reason.code'],
category: { [c['reason.category']]: {} },
diff --git a/src/app/domain-config/domain-objects-table/domain-objects-table.component.ts b/src/app/domain-config/domain-objects-table/domain-objects-table.component.ts
index 1e472e02a..4a9dd2123 100644
--- a/src/app/domain-config/domain-objects-table/domain-objects-table.component.ts
+++ b/src/app/domain-config/domain-objects-table/domain-objects-table.component.ts
@@ -1,6 +1,5 @@
import startCase from 'lodash-es/startCase';
-import { CommonModule } from '@angular/common';
import {
Component,
Injector,
@@ -42,7 +41,6 @@ import {
selector: 'cc-domain-objects-table',
templateUrl: './domain-objects-table.component.html',
imports: [
- CommonModule,
SelectFieldModule,
ReactiveFormsModule,
ActionsModule,
diff --git a/src/app/parties/party/party-routing.module.ts b/src/app/parties/party/party-routing.module.ts
index 524ca963e..a133a7e26 100644
--- a/src/app/parties/party/party-routing.module.ts
+++ b/src/app/parties/party/party-routing.module.ts
@@ -62,9 +62,9 @@ import { ROUTING_CONFIG as WEBHOOKS_ROUTING_CONFIG } from './webhooks/routing-co
{
path: 'wallet-webhooks/:webhookID',
loadComponent: () =>
- import(
- './wallet-webhooks/wallet-webhook/wallet-webhook.component'
- ).then((m) => m.WalletWebhookComponent),
+ import('./wallet-webhooks/wallet-webhook/wallet-webhook.component').then(
+ (m) => m.WalletWebhookComponent,
+ ),
canActivate: [canActivateAuthRole],
data: WALLET_WEBHOOKS_ROUTING_CONFIG,
},
diff --git a/src/app/payments/components/payments-table/payments-table.component.ts b/src/app/payments/components/payments-table/payments-table.component.ts
index 637e94b46..d26b6a133 100644
--- a/src/app/payments/components/payments-table/payments-table.component.ts
+++ b/src/app/payments/components/payments-table/payments-table.component.ts
@@ -1,6 +1,5 @@
import startCase from 'lodash-es/startCase';
-import { CommonModule } from '@angular/common';
import { Component, EventEmitter, Input, Output, inject } from '@angular/core';
import { Router } from '@angular/router';
@@ -19,7 +18,7 @@ import {
@Component({
selector: 'cc-payments-table',
templateUrl: './payments-table.component.html',
- imports: [TableModule, CommonModule],
+ imports: [TableModule],
})
export class PaymentsTableComponent {
private router = inject(Router);
diff --git a/src/app/payments/payment/create-chargeback-dialog/create-chargeback-dialog.component.ts b/src/app/payments/payment/create-chargeback-dialog/create-chargeback-dialog.component.ts
index edfe8b9d8..b7063b98a 100644
--- a/src/app/payments/payment/create-chargeback-dialog/create-chargeback-dialog.component.ts
+++ b/src/app/payments/payment/create-chargeback-dialog/create-chargeback-dialog.component.ts
@@ -1,4 +1,4 @@
-import short from 'short-uuid';
+import { generate } from 'short-uuid';
import { Component, DestroyRef, inject } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -26,7 +26,7 @@ export class CreateChargebackDialogComponent extends DialogSuperclass<
private domainMetadataFormExtensionsService = inject(DomainMetadataFormExtensionsService);
private log = inject(NotifyLogService);
private destroyRef = inject(DestroyRef);
- form = new FormControl>({ id: short().generate() });
+ form = new FormControl>({ id: generate() });
metadata$ = metadata$;
extensions$ = this.domainMetadataFormExtensionsService.extensions$;
diff --git a/src/app/payments/payment/payment-routing.module.ts b/src/app/payments/payment/payment-routing.module.ts
index 1c3073689..7a0106646 100644
--- a/src/app/payments/payment/payment-routing.module.ts
+++ b/src/app/payments/payment/payment-routing.module.ts
@@ -25,9 +25,9 @@ import { ROUTING_CONFIG } from './routing-config';
{
path: 'chargebacks',
loadComponent: () =>
- import(
- './components/payment-chargebacks/payment-chargebacks.component'
- ).then((m) => m.PaymentChargebacksComponent),
+ import('./components/payment-chargebacks/payment-chargebacks.component').then(
+ (m) => m.PaymentChargebacksComponent,
+ ),
},
{
path: 'refunds',
diff --git a/src/app/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts b/src/app/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts
index b5270c41b..57fd89b6e 100644
--- a/src/app/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts
+++ b/src/app/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.ts
@@ -1,5 +1,5 @@
import { BehaviorSubject, of } from 'rxjs';
-import short from 'short-uuid';
+import { v4 } from 'uuid';
import { Component, DestroyRef, inject } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -47,7 +47,7 @@ export class CreateAdjustmentDialogComponent extends DialogSuperclass<
this.dialogData.withdrawals.map((w) =>
this.withdrawalManagementService.CreateAdjustment(w.id, {
...this.control.value,
- id: short().uuid(),
+ id: v4(),
} as AdjustmentParams),
),
this.progress$,
diff --git a/src/components/fistful-thrift-form/fistful-thrift-form.component.ts b/src/components/fistful-thrift-form/fistful-thrift-form.component.ts
index 8dc6980ad..46dd597d4 100644
--- a/src/components/fistful-thrift-form/fistful-thrift-form.component.ts
+++ b/src/components/fistful-thrift-form/fistful-thrift-form.component.ts
@@ -1,5 +1,5 @@
import { map, of } from 'rxjs';
-import short from 'short-uuid';
+import { v4 } from 'uuid';
import { CommonModule } from '@angular/common';
import { Component, inject } from '@angular/core';
@@ -29,7 +29,7 @@ export class FistfulThriftFormComponent extends BaseThriftFormSuperclass {
override internalExtensions$ = of([
{
determinant: (data) => of(isTypeWithAliases(data, 'SourceID', 'fistful')),
- extension: () => of({ generate: () => of(short().uuid()), isIdentifier: true }),
+ extension: () => of({ generate: () => of(v4()), isIdentifier: true }),
},
{
determinant: (data) =>
diff --git a/src/components/page-layout/components/sub-page-layout/sub-page-layout.component.ts b/src/components/page-layout/components/sub-page-layout/sub-page-layout.component.ts
index 56c7b0e05..88f90bd88 100644
--- a/src/components/page-layout/components/sub-page-layout/sub-page-layout.component.ts
+++ b/src/components/page-layout/components/sub-page-layout/sub-page-layout.component.ts
@@ -1,4 +1,3 @@
-import { CommonModule } from '@angular/common';
import { Component, inject, input } from '@angular/core';
import { MatToolbar } from '@angular/material/toolbar';
@@ -8,7 +7,7 @@ import { SidenavInfoService } from '../../../sidenav-info';
@Component({
selector: 'cc-sub-page-layout',
- imports: [CommonModule, MatToolbar, TagModule, ActionsModule],
+ imports: [MatToolbar, TagModule, ActionsModule],
templateUrl: './sub-page-layout.component.html',
styles: ``,
})
diff --git a/src/components/system-accounts-field/system-accounts-field.component.ts b/src/components/system-accounts-field/system-accounts-field.component.ts
index e1a5fea42..d4516d973 100644
--- a/src/components/system-accounts-field/system-accounts-field.component.ts
+++ b/src/components/system-accounts-field/system-accounts-field.component.ts
@@ -1,4 +1,3 @@
-import { CommonModule } from '@angular/common';
import { Component, DestroyRef, inject, input } from '@angular/core';
import { FormArray, FormControl, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
@@ -15,7 +14,6 @@ import { AccountFieldComponent, CurrencyAccount } from '../account-field';
@Component({
selector: 'cc-system-accounts-field',
imports: [
- CommonModule,
ReactiveFormsModule,
AutocompleteFieldModule,
MatButtonModule,
diff --git a/src/components/thrift-api-crud/domain/services/domain-metadata-form-extensions/domain-metadata-form-extensions.service.ts b/src/components/thrift-api-crud/domain/services/domain-metadata-form-extensions/domain-metadata-form-extensions.service.ts
index 14f6ccd35..80464b311 100644
--- a/src/components/thrift-api-crud/domain/services/domain-metadata-form-extensions/domain-metadata-form-extensions.service.ts
+++ b/src/components/thrift-api-crud/domain/services/domain-metadata-form-extensions/domain-metadata-form-extensions.service.ts
@@ -1,6 +1,7 @@
import { Observable, combineLatest, of } from 'rxjs';
import { map, shareReplay } from 'rxjs/operators';
-import short from 'short-uuid';
+import { generate } from 'short-uuid';
+import { v4 } from 'uuid';
import { Injectable, inject } from '@angular/core';
@@ -49,7 +50,7 @@ export class DomainMetadataFormExtensionsService {
},
{
determinant: (data) => of(isTypeWithAliases(data, 'ID', 'base')),
- extension: () => of({ generate: () => of(short().generate()), isIdentifier: true }),
+ extension: () => of({ generate: () => of(generate()), isIdentifier: true }),
},
{
determinant: (data) =>
@@ -58,7 +59,7 @@ export class DomainMetadataFormExtensionsService {
isTypeWithAliases(data, 'WalletConfigID', 'domain') ||
isTypeWithAliases(data, 'ShopConfigID', 'domain'),
),
- extension: () => of({ generate: () => of(short().uuid()), isIdentifier: true }),
+ extension: () => of({ generate: () => of(v4()), isIdentifier: true }),
},
{
determinant: (data) => of(isTypeWithAliases(data, 'Timestamp', 'base')),
diff --git a/src/components/upload-csv/upload-csv.component.ts b/src/components/upload-csv/upload-csv.component.ts
index df432125e..01675a3be 100644
--- a/src/components/upload-csv/upload-csv.component.ts
+++ b/src/components/upload-csv/upload-csv.component.ts
@@ -72,9 +72,10 @@ function getCsvObjectErrors(
],
templateUrl: './upload-csv.component.html',
})
-export class UploadCsvComponent
- implements OnInit
-{
+export class UploadCsvComponent<
+ R extends string = string,
+ O extends string = string,
+> implements OnInit {
private log = inject(NotifyLogService);
private dr = inject(DestroyRef);
private injector = inject(Injector);
diff --git a/src/services/user-info-based-id-generator/user-info-based-id-generator.service.ts b/src/services/user-info-based-id-generator/user-info-based-id-generator.service.ts
index 37c9b2d71..8dc74e016 100644
--- a/src/services/user-info-based-id-generator/user-info-based-id-generator.service.ts
+++ b/src/services/user-info-based-id-generator/user-info-based-id-generator.service.ts
@@ -1,5 +1,5 @@
import Keycloak from 'keycloak-js';
-import short from 'short-uuid';
+import { generate } from 'short-uuid';
import { Injectable, inject } from '@angular/core';
@@ -8,7 +8,7 @@ export class UserInfoBasedIdGeneratorService {
private keycloakService = inject(Keycloak);
getUsernameBasedId(): string {
- return `${this.getUsernameForId()}-${short().new()}`;
+ return `${this.getUsernameForId()}-${generate()}`;
}
private getUsernameForId(): string {