status === DialogResponseStatus.Success),
diff --git a/src/app/sections/routing-rules/routing-ruleset-header/routing-ruleset-header.component.html b/src/app/sections/routing-rules/routing-ruleset-header/routing-ruleset-header.component.html
index e45e65de..23f9f287 100644
--- a/src/app/sections/routing-rules/routing-ruleset-header/routing-ruleset-header.component.html
+++ b/src/app/sections/routing-rules/routing-ruleset-header/routing-ruleset-header.component.html
@@ -4,7 +4,7 @@
arrow_back
-
+
{{ description }}
diff --git a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.html b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.html
index a8ab6f8e..a19ce74c 100644
--- a/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.html
+++ b/src/app/sections/routing-rules/routing-ruleset/add-routing-rule-dialog/add-routing-rule-dialog.component.html
@@ -117,7 +117,7 @@
mat-button
(click)="add()"
>
- ADD
+ Add
diff --git a/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.html b/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.html
index ad53bd23..7c6c4fa4 100644
--- a/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.html
+++ b/src/app/sections/routing-rules/routing-ruleset/routing-ruleset.component.html
@@ -61,7 +61,7 @@
-
+
diff --git a/src/app/sections/routing-rules/target-ruleset-form/target-ruleset-form.component.html b/src/app/sections/routing-rules/target-ruleset-form/target-ruleset-form.component.html
index 988ede92..746dd7ca 100644
--- a/src/app/sections/routing-rules/target-ruleset-form/target-ruleset-form.component.html
+++ b/src/app/sections/routing-rules/target-ruleset-form/target-ruleset-form.component.html
@@ -47,7 +47,7 @@
diff --git a/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.html b/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.html
index 44d0650a..29c71eaa 100644
--- a/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.html
+++ b/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.html
@@ -7,7 +7,7 @@
mat-raised-button
(click)="create()"
>
- CREATE
+ Create
diff --git a/src/app/sections/search-claims/search-claims.component.html b/src/app/sections/search-claims/search-claims.component.html
index 5ff5cfe7..62bda8d8 100644
--- a/src/app/sections/search-claims/search-claims.component.html
+++ b/src/app/sections/search-claims/search-claims.component.html
@@ -2,7 +2,7 @@
Claims
-
+
diff --git a/src/app/sections/search-parties/parties-search-filters/parties-search-filters.component.html b/src/app/sections/search-parties/parties-search-filters/parties-search-filters.component.html
index 50f05d91..e3a6b84d 100644
--- a/src/app/sections/search-parties/parties-search-filters/parties-search-filters.component.html
+++ b/src/app/sections/search-parties/parties-search-filters/parties-search-filters.component.html
@@ -8,7 +8,7 @@
type="string"
/>
- Email, ID, INN, Registred name, Legal name, Trading name, Russian bank account
+ Email, ID, INN, Registered name, Legal name, Trading name, Russian bank account
diff --git a/src/app/sections/search-parties/parties-table/party-actions.pipe.ts b/src/app/sections/search-parties/parties-table/party-actions.pipe.ts
index 0f66e0fa..6d0a83d2 100644
--- a/src/app/sections/search-parties/parties-table/party-actions.pipe.ts
+++ b/src/app/sections/search-parties/parties-table/party-actions.pipe.ts
@@ -3,7 +3,7 @@ import { Pipe, PipeTransform } from '@angular/core';
import { PartyActions } from './party-actions';
const PARTY_ACTION_NAMES: { [N in PartyActions]: string } = {
- [PartyActions.NavigateToParty]: 'Merchant Details',
+ [PartyActions.NavigateToParty]: 'Merchant details',
};
@Pipe({
diff --git a/src/app/sections/shop-details/shop-details.component.html b/src/app/sections/shop-details/shop-details.component.html
index 6e0c0efc..99db238b 100644
--- a/src/app/sections/shop-details/shop-details.component.html
+++ b/src/app/sections/shop-details/shop-details.component.html
@@ -33,10 +33,10 @@
diff --git a/src/app/sections/shop-details/shop-details.component.ts b/src/app/sections/shop-details/shop-details.component.ts
index e7de1ec1..76f85924 100644
--- a/src/app/sections/shop-details/shop-details.component.ts
+++ b/src/app/sections/shop-details/shop-details.component.ts
@@ -1,14 +1,13 @@
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { UntilDestroy } from '@ngneat/until-destroy';
-import { DialogService, DialogResponseStatus } from '@vality/ng-core';
+import { DialogService, DialogResponseStatus, ConfirmDialogComponent } from '@vality/ng-core';
import { combineLatest, switchMap, from } from 'rxjs';
import { pluck, filter, withLatestFrom, first, map } from 'rxjs/operators';
import { DomainMetadataViewExtensionsService } from '@cc/app/shared/services/domain-metadata-view-extensions';
import { NotificationErrorService } from '@cc/app/shared/services/notification-error';
-import { ConfirmActionDialogComponent } from '../../../components/confirm-action-dialog';
import { getUnionKey } from '../../../utils';
import { PartyManagementService } from '../../api/payment-processing';
import { NotificationService } from '../../shared/services/notification';
@@ -49,7 +48,7 @@ export class ShopDetailsComponent {
first(),
switchMap((shop) =>
this.dialogService
- .open(ConfirmActionDialogComponent, {
+ .open(ConfirmDialogComponent, {
title:
getUnionKey(shop.blocking) === 'unblocked'
? 'Block shop'
@@ -83,7 +82,7 @@ export class ShopDetailsComponent {
first(),
switchMap((shop) =>
this.dialogService
- .open(ConfirmActionDialogComponent, {
+ .open(ConfirmDialogComponent, {
title:
getUnionKey(shop.suspension) === 'active'
? 'Suspend shop'
diff --git a/src/app/sections/sources/create-source/create-source.component.html b/src/app/sections/sources/create-source/create-source.component.html
index bf56a60a..c7b59f1b 100644
--- a/src/app/sections/sources/create-source/create-source.component.html
+++ b/src/app/sections/sources/create-source/create-source.component.html
@@ -7,7 +7,7 @@
>
diff --git a/src/app/sections/sources/sources.component.html b/src/app/sections/sources/sources.component.html
index e6ffef6a..a77f94d6 100644
--- a/src/app/sections/sources/sources.component.html
+++ b/src/app/sections/sources/sources.component.html
@@ -2,13 +2,12 @@
Sources
-
+
-
+ [progress]="!!(progress$ | async)"
+ >
diff --git a/src/app/sections/sources/sources.component.ts b/src/app/sections/sources/sources.component.ts
index 93e04c92..1321401e 100644
--- a/src/app/sections/sources/sources.component.ts
+++ b/src/app/sections/sources/sources.component.ts
@@ -1,11 +1,10 @@
import { Component } from '@angular/core';
-import { DialogService } from '@vality/ng-core';
-
import {
+ DialogService,
createGridColumns,
- createDescriptionFormattedColumn,
- createDatetimeFormattedColumn,
-} from '@cc/components/simple-table';
+ createDescriptionFormatterColumn,
+ createDatetimeFormatterColumn,
+} from '@vality/ng-core';
import { CreateSourceComponent } from './create-source/create-source.component';
import { FetchSourcesService } from './fetch-sources.service';
@@ -25,10 +24,10 @@ export class SourcesComponent {
sources$ = this.fetchSourcesService.sources$;
progress$ = this.fetchSourcesService.progress$;
columns = createGridColumns([
- createDescriptionFormattedColumn('name', 'id'),
+ createDescriptionFormatterColumn('name', 'id'),
'identity',
'currency_symbolic_code',
- createDatetimeFormattedColumn('created_at'),
+ createDatetimeFormatterColumn('created_at'),
]);
constructor(
diff --git a/src/app/sections/sources/sources.module.ts b/src/app/sections/sources/sources.module.ts
index c26508f1..985cb1e3 100644
--- a/src/app/sections/sources/sources.module.ts
+++ b/src/app/sections/sources/sources.module.ts
@@ -6,12 +6,9 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatTableModule } from '@angular/material/table';
-import { ActionsModule, DialogModule } from '@vality/ng-core';
-
-import { SimpleTableModule } from '@cc/components/simple-table';
+import { ActionsModule, DialogModule, TableModule } from '@vality/ng-core';
import { EmptySearchResultModule } from '../../../components/empty-search-result';
-import { TableModule } from '../../../components/table';
import { MetadataFormModule } from '../../shared/components/metadata-form';
import { CreateSourceComponent } from './create-source/create-source.component';
import { SourcesRoutingModule } from './sources-routing.module';
@@ -32,7 +29,6 @@ import { SourcesComponent } from './sources.component';
DialogModule,
MetadataFormModule,
ReactiveFormsModule,
- SimpleTableModule,
],
declarations: [SourcesComponent, CreateSourceComponent],
})
diff --git a/src/app/sections/wallets/wallets.component.html b/src/app/sections/wallets/wallets.component.html
index 00a96df5..48960d2a 100644
--- a/src/app/sections/wallets/wallets.component.html
+++ b/src/app/sections/wallets/wallets.component.html
@@ -20,14 +20,14 @@
-
@@ -50,5 +50,5 @@
-
+
diff --git a/src/app/sections/wallets/wallets.component.ts b/src/app/sections/wallets/wallets.component.ts
index 2ebcd332..29d73cda 100644
--- a/src/app/sections/wallets/wallets.component.ts
+++ b/src/app/sections/wallets/wallets.component.ts
@@ -2,7 +2,13 @@ import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
import { StatWallet } from '@vality/fistful-proto/internal/fistful_stat';
-import { clean, splitIds } from '@vality/ng-core';
+import {
+ clean,
+ splitBySeparators,
+ Column,
+ createDatetimeFormatterColumn,
+ createDescriptionFormatterColumn,
+} from '@vality/ng-core';
import { of } from 'rxjs';
import { startWith, map, shareReplay, catchError } from 'rxjs/operators';
import { Memoize } from 'typescript-memoize';
@@ -12,11 +18,6 @@ import { WalletParams } from '@cc/app/api/fistful-stat/query-dsl/types/wallet';
import { ManagementService } from '@cc/app/api/wallet';
import { QueryParamsService } from '@cc/app/shared/services';
import { NotificationErrorService } from '@cc/app/shared/services/notification-error';
-import {
- createDatetimeFormattedColumn,
- createDescriptionFormattedColumn,
- createGridColumns,
-} from '@cc/components/simple-table';
import { FetchWalletsService } from './fetch-wallets.service';
@@ -31,13 +32,13 @@ export class WalletsComponent implements OnInit {
wallets$ = this.fetchWalletsService.searchResult$;
inProgress$ = this.fetchWalletsService.doAction$;
hasMore$ = this.fetchWalletsService.hasMore$;
- columns = createGridColumns([
- createDescriptionFormattedColumn('name', 'id'),
+ columns: Column[] = [
+ createDescriptionFormatterColumn('name', 'id'),
'currency_symbolic_code',
'identity_id',
- createDatetimeFormattedColumn('created_at'),
+ createDatetimeFormatterColumn('created_at'),
'balance',
- ]);
+ ];
filters = this.fb.group({
party_id: null,
identity_id: null,
@@ -46,8 +47,6 @@ export class WalletsComponent implements OnInit {
...this.qp.params,
});
- test$ = this.getBalance('294');
-
constructor(
private fetchWalletsService: FetchWalletsService,
private qp: QueryParamsService,
@@ -61,7 +60,7 @@ export class WalletsComponent implements OnInit {
this.filters.valueChanges
.pipe(
startWith(this.filters.value),
- map((v) => ({ ...v, wallet_id: splitIds(v.wallet_id) })),
+ map((v) => ({ ...v, wallet_id: splitBySeparators(v.wallet_id) })),
map((v) => clean(v)),
untilDestroyed(this)
)
@@ -73,7 +72,10 @@ export class WalletsComponent implements OnInit {
search(size?: number) {
const { wallet_id, ...v } = this.filters.value;
- this.fetchWalletsService.search(clean({ ...v, wallet_id: splitIds(wallet_id) }), size);
+ this.fetchWalletsService.search(
+ clean({ ...v, wallet_id: splitBySeparators(wallet_id) }),
+ size
+ );
}
fetchMore() {
diff --git a/src/app/sections/wallets/wallets.module.ts b/src/app/sections/wallets/wallets.module.ts
index a7ba5904..6626e810 100644
--- a/src/app/sections/wallets/wallets.module.ts
+++ b/src/app/sections/wallets/wallets.module.ts
@@ -9,13 +9,12 @@ import { MatInputModule } from '@angular/material/input';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatTableModule } from '@angular/material/table';
import { MtxButtonModule } from '@ng-matero/extensions/button';
+import { TableModule } from '@vality/ng-core';
import { AmountCurrencyPipe } from '@cc/app/shared';
import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field';
import { MetadataFormModule } from '@cc/app/shared/components/metadata-form';
import { EmptySearchResultModule } from '@cc/components/empty-search-result';
-import { SimpleTableModule } from '@cc/components/simple-table';
-import { TableModule } from '@cc/components/table';
import { WalletsRoutingModule } from './wallets-routing.module';
import { WalletsComponent } from './wallets.component';
@@ -35,7 +34,6 @@ import { WalletsComponent } from './wallets.component';
MatInputModule,
MerchantFieldModule,
GridModule,
- SimpleTableModule,
MatButtonModule,
MatIconModule,
MtxButtonModule,
diff --git a/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.html b/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.html
index 0d7b064b..7d6e58aa 100644
--- a/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.html
+++ b/src/app/sections/withdrawals/components/create-adjustment-dialog/create-adjustment-dialog.component.html
@@ -30,7 +30,7 @@
mat-button
(click)="createAdjustment()"
>
- CREATE
+ Create
diff --git a/src/app/sections/withdrawals/withdrawals.component.html b/src/app/sections/withdrawals/withdrawals.component.html
index 0db61bed..41cb6d53 100644
--- a/src/app/sections/withdrawals/withdrawals.component.html
+++ b/src/app/sections/withdrawals/withdrawals.component.html
@@ -44,7 +44,7 @@
mat-button
(click)="adjustment()"
>
- CREATE ADJUSTMENT
+ Create adjustment
diff --git a/src/app/shared/components/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html b/src/app/shared/components/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html
index d9c63d76..f5d6cf33 100644
--- a/src/app/shared/components/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html
+++ b/src/app/shared/components/change-chargeback-status-dialog/change-chargeback-status-dialog.component.html
@@ -25,7 +25,7 @@
mat-raised-button
(click)="confirm()"
>
- {{ (actionControl.value | enumKey : typeEnum) || 'CHANGE' | uppercase }}
+ {{ (actionControl.value | enumKey : typeEnum) || 'Change' }}
diff --git a/src/app/shared/components/metadata-form/components/complex-form/complex-form.component.html b/src/app/shared/components/metadata-form/components/complex-form/complex-form.component.html
index bed7314d..6ea762be 100644
--- a/src/app/shared/components/metadata-form/components/complex-form/complex-form.component.html
+++ b/src/app/shared/components/metadata-form/components/complex-form/complex-form.component.html
@@ -70,7 +70,5 @@
-
+
diff --git a/src/app/shared/components/party-modification-creator/create-modification-dialog/create-modification-dialog.component.html b/src/app/shared/components/party-modification-creator/create-modification-dialog/create-modification-dialog.component.html
index 0a1e719c..9edda6e9 100644
--- a/src/app/shared/components/party-modification-creator/create-modification-dialog/create-modification-dialog.component.html
+++ b/src/app/shared/components/party-modification-creator/create-modification-dialog/create-modification-dialog.component.html
@@ -32,7 +32,7 @@
-
+
diff --git a/src/app/shared/components/party-modification-creator/party-modification-target/fill-in-unit-id/fill-in-unit-id.component.html b/src/app/shared/components/party-modification-creator/party-modification-target/fill-in-unit-id/fill-in-unit-id.component.html
index 518ba362..8c6e6aed 100644
--- a/src/app/shared/components/party-modification-creator/party-modification-target/fill-in-unit-id/fill-in-unit-id.component.html
+++ b/src/app/shared/components/party-modification-creator/party-modification-target/fill-in-unit-id/fill-in-unit-id.component.html
@@ -2,5 +2,5 @@
-
+
diff --git a/src/app/shared/components/party-modification-creator/party-modification-target/target-table/target-table.service.ts b/src/app/shared/components/party-modification-creator/party-modification-target/target-table/target-table.service.ts
index 1c0de060..99add9d0 100644
--- a/src/app/shared/components/party-modification-creator/party-modification-target/target-table/target-table.service.ts
+++ b/src/app/shared/components/party-modification-creator/party-modification-target/target-table/target-table.service.ts
@@ -36,7 +36,7 @@ export class TargetTableService {
return result;
}),
catchError(() => {
- this.snackBar.open('An error occured while fetching party', 'OK');
+ this.snackBar.open('An error occurred while fetching party', 'OK');
this.hasError$.next(true);
return of('error');
}),
diff --git a/src/app/shared/components/party-modification-forms/contract/adjustment-modification-unit/adjustment-modification-unit.component.html b/src/app/shared/components/party-modification-forms/contract/adjustment-modification-unit/adjustment-modification-unit.component.html
index 91145e80..e19c347d 100644
--- a/src/app/shared/components/party-modification-forms/contract/adjustment-modification-unit/adjustment-modification-unit.component.html
+++ b/src/app/shared/components/party-modification-forms/contract/adjustment-modification-unit/adjustment-modification-unit.component.html
@@ -2,7 +2,7 @@
-
+
-
+
-
+
diff --git a/src/app/shared/components/payments-search-filters/payments-other-search-filters/payments-other-search-filters.component.html b/src/app/shared/components/payments-search-filters/payments-other-search-filters/payments-other-search-filters.component.html
index e0f455c3..7cf25346 100644
--- a/src/app/shared/components/payments-search-filters/payments-other-search-filters/payments-other-search-filters.component.html
+++ b/src/app/shared/components/payments-search-filters/payments-other-search-filters/payments-other-search-filters.component.html
@@ -6,5 +6,5 @@
matBadgePosition="after"
(click)="openOtherFiltersDialog()"
>
- OTHER FILTERS
+ Other filters
diff --git a/src/app/shared/components/payments-searcher/create-payment-adjustment/create-payment-adjustment.component.html b/src/app/shared/components/payments-searcher/create-payment-adjustment/create-payment-adjustment.component.html
index 50abccac..b66d6e31 100644
--- a/src/app/shared/components/payments-searcher/create-payment-adjustment/create-payment-adjustment.component.html
+++ b/src/app/shared/components/payments-searcher/create-payment-adjustment/create-payment-adjustment.component.html
@@ -16,7 +16,7 @@
mat-raised-button
(click)="closeAndSelectWithAnError()"
>
- CLOSE AND SELECT WITH AN ERROR
+ Close and select with an error
diff --git a/src/app/shared/components/payments-searcher/fetch-payments.service.ts b/src/app/shared/components/payments-searcher/fetch-payments.service.ts
index 6fd15086..2ea39bb7 100644
--- a/src/app/shared/components/payments-searcher/fetch-payments.service.ts
+++ b/src/app/shared/components/payments-searcher/fetch-payments.service.ts
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { StatPayment } from '@vality/magista-proto/magista';
-import { cleanPrimitiveProps, clean, splitIds } from '@vality/ng-core';
+import { cleanPrimitiveProps, clean, splitBySeparators } from '@vality/ng-core';
import * as moment from 'moment';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
@@ -54,7 +54,7 @@ export class FetchPaymentsService extends PartialFetcher
-
+
- CREATE PAYMENT ADJUSTMENT{{
+ Create payment adjustment{{
selectedPayments?.length ? ' (' + selectedPayments?.length + ')' : ''
}}
@@ -45,7 +45,7 @@
mat-button
(click)="fetchMore()"
>
- {{ (doAction$ | async) ? 'LOADING...' : 'SHOW MORE' }}
+ {{ (doAction$ | async) ? 'Loading...' : 'Show more' }}
diff --git a/src/app/shared/components/select/select.component.html b/src/app/shared/components/select/select.component.html
index f61590f8..1d61fa20 100644
--- a/src/app/shared/components/select/select.component.html
+++ b/src/app/shared/components/select/select.component.html
@@ -6,10 +6,10 @@
(valueChange)="change($event)"
>
- {{ isAllSelected ? 'ALL SELECTED' : currentLabel }}
+ {{ isAllSelected ? 'All selected' : currentLabel }}
- {{ isAllSelected ? 'DESELECT ALL' : 'SELECT ALL' }}
+ {{ isAllSelected ? 'Deselect all' : 'Select all' }}
{{ option.label }}
diff --git a/src/app/shared/components/thrift-editor/thrift-editor.component.ts b/src/app/shared/components/thrift-editor/thrift-editor.component.ts
index 5f1795de..c9c983bc 100644
--- a/src/app/shared/components/thrift-editor/thrift-editor.component.ts
+++ b/src/app/shared/components/thrift-editor/thrift-editor.component.ts
@@ -1,12 +1,11 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { ValidationErrors } from '@angular/forms';
import { ThriftAstMetadata } from '@vality/domain-proto';
-import { DialogService, DialogResponseStatus } from '@vality/ng-core';
+import { DialogService, DialogResponseStatus, ConfirmDialogComponent } from '@vality/ng-core';
import { merge, defer, of, Subject } from 'rxjs';
import { map, filter, shareReplay } from 'rxjs/operators';
import { toMonacoFile } from '@cc/app/sections/domain/utils';
-import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog';
import { MonacoFile, CodeLensProvider, CompletionProvider } from '@cc/components/monaco-editor';
import { ValidatedFormControlSuperclass, createControlProviders } from '@cc/utils';
import { objectToJSON } from '@cc/utils/thrift-instance';
@@ -90,7 +89,7 @@ export class ThriftEditorComponent extends ValidatedFormControlSuperclass
reset() {
this.dialogService
- .open(ConfirmActionDialogComponent, { title: 'Reset changes' })
+ .open(ConfirmDialogComponent, { title: 'Reset changes' })
.afterClosed()
.pipe(filter(({ status }) => status === DialogResponseStatus.Success))
.subscribe(() => {
diff --git a/src/app/shared/services/user-info-based-id-generator/user-info-based-id-generator.service.ts b/src/app/shared/services/user-info-based-id-generator/user-info-based-id-generator.service.ts
index 5be532db..3e5d52c6 100644
--- a/src/app/shared/services/user-info-based-id-generator/user-info-based-id-generator.service.ts
+++ b/src/app/shared/services/user-info-based-id-generator/user-info-based-id-generator.service.ts
@@ -7,7 +7,7 @@ export class UserInfoBasedIdGeneratorService {
constructor(private keycloakService: KeycloakService) {}
getUsernameBasedId(): string {
- // TODO: replace it by @rbkmoney/id-generator after fix
+ // TODO: replace it by id-generator after fix
return `${this.getUsernameForId()}-${short().new()}`;
}
diff --git a/src/components/confirm-action-dialog/confirm-action-dialog.component.html b/src/components/confirm-action-dialog/confirm-action-dialog.component.html
deleted file mode 100644
index 3107288f..00000000
--- a/src/components/confirm-action-dialog/confirm-action-dialog.component.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- Reason
-
-
-
-
-
-
-
diff --git a/src/components/confirm-action-dialog/confirm-action-dialog.component.ts b/src/components/confirm-action-dialog/confirm-action-dialog.component.ts
deleted file mode 100644
index a2f37016..00000000
--- a/src/components/confirm-action-dialog/confirm-action-dialog.component.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { ChangeDetectionStrategy, Component } from '@angular/core';
-import { FormControl } from '@angular/forms';
-import { DialogResponseStatus, DialogSuperclass } from '@vality/ng-core';
-
-@Component({
- selector: 'cc-confirm-action-dialog',
- templateUrl: 'confirm-action-dialog.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
-})
-export class ConfirmActionDialogComponent extends DialogSuperclass<
- ConfirmActionDialogComponent,
- { title?: string; confirmLabel?: string; hasReason?: boolean } | void,
- { reason?: string }
-> {
- control = new FormControl('');
-
- cancel() {
- this.dialogRef.close({ status: DialogResponseStatus.Cancelled });
- }
-
- confirm() {
- this.dialogRef.close({
- status: DialogResponseStatus.Success,
- data:
- this.dialogData && this.dialogData.hasReason
- ? { reason: this.control.value }
- : null,
- });
- }
-}
diff --git a/src/components/confirm-action-dialog/confirm-action-dialog.module.ts b/src/components/confirm-action-dialog/confirm-action-dialog.module.ts
deleted file mode 100644
index 79765758..00000000
--- a/src/components/confirm-action-dialog/confirm-action-dialog.module.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { NgModule } from '@angular/core';
-import { FlexLayoutModule } from '@angular/flex-layout';
-import { ReactiveFormsModule } from '@angular/forms';
-import { MatButtonModule } from '@angular/material/button';
-import { MatDialogModule } from '@angular/material/dialog';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatInputModule } from '@angular/material/input';
-import { DialogModule } from '@vality/ng-core';
-
-import { ConfirmActionDialogComponent } from './confirm-action-dialog.component';
-
-@NgModule({
- imports: [
- MatDialogModule,
- MatButtonModule,
- FlexLayoutModule,
- DialogModule,
- MatFormFieldModule,
- CommonModule,
- MatInputModule,
- ReactiveFormsModule,
- ],
- declarations: [ConfirmActionDialogComponent],
- exports: [ConfirmActionDialogComponent],
-})
-export class ConfirmActionDialogModule {}
diff --git a/src/components/confirm-action-dialog/index.ts b/src/components/confirm-action-dialog/index.ts
deleted file mode 100644
index b49c578d..00000000
--- a/src/components/confirm-action-dialog/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './confirm-action-dialog.module';
-export * from './confirm-action-dialog.component';
diff --git a/src/components/monaco-editor/abstarct-monaco.directive.ts b/src/components/monaco-editor/abstract-monaco.directive.ts
similarity index 92%
rename from src/components/monaco-editor/abstarct-monaco.directive.ts
rename to src/components/monaco-editor/abstract-monaco.directive.ts
index 6b50aeb8..d3e74f09 100644
--- a/src/components/monaco-editor/abstarct-monaco.directive.ts
+++ b/src/components/monaco-editor/abstract-monaco.directive.ts
@@ -61,10 +61,10 @@ export abstract class AbstractMonacoDirective implements OnInit, OnChanges, OnDe
this.monacoEditorService.fileChange.subscribe((file) => this.fileChange.emit(file));
this.monacoEditorService
.codeLensProviderRegistered()
- .subscribe((disposible) => this.codeLensProviderRegistered.emit(disposible));
+ .subscribe((disposable) => this.codeLensProviderRegistered.emit(disposable));
this.monacoEditorService
.completionProviderRegistered()
- .subscribe((disposible) => this.completionProviderRegistered.emit(disposible));
+ .subscribe((disposable) => this.completionProviderRegistered.emit(disposable));
}
ngOnDestroy() {
diff --git a/src/components/monaco-editor/monaco-diff-editor.directive.ts b/src/components/monaco-editor/monaco-diff-editor.directive.ts
index dbbfb257..df452213 100644
--- a/src/components/monaco-editor/monaco-diff-editor.directive.ts
+++ b/src/components/monaco-editor/monaco-diff-editor.directive.ts
@@ -1,6 +1,6 @@
import { Directive, ElementRef, Input, SimpleChanges } from '@angular/core';
-import { AbstractMonacoDirective } from './abstarct-monaco.directive';
+import { AbstractMonacoDirective } from './abstract-monaco.directive';
import { MonacoFile } from './model';
import { MonacoDiffEditorService } from './monaco-diff-editor.service';
diff --git a/src/components/monaco-editor/monaco-editor.directive.ts b/src/components/monaco-editor/monaco-editor.directive.ts
index 5ca98613..619c016e 100644
--- a/src/components/monaco-editor/monaco-editor.directive.ts
+++ b/src/components/monaco-editor/monaco-editor.directive.ts
@@ -1,7 +1,7 @@
import { Directive, ElementRef, Input } from '@angular/core';
import { ComponentChanges } from '../../app/shared';
-import { AbstractMonacoDirective } from './abstarct-monaco.directive';
+import { AbstractMonacoDirective } from './abstract-monaco.directive';
import { MonacoFile } from './model';
import { MonacoEditorService } from './monaco-editor.service';
diff --git a/src/components/simple-table/components/simple-table-actions.component.ts b/src/components/simple-table/components/simple-table-actions.component.ts
deleted file mode 100644
index aa60b800..00000000
--- a/src/components/simple-table/components/simple-table-actions.component.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Component } from '@angular/core';
-
-@Component({
- selector: 'cc-simple-table-actions',
- template: `
-
-
-
- `,
-})
-export class SimpleTableActionsComponent {}
diff --git a/src/components/simple-table/components/simple-table-tooltip-cell-template.component.ts b/src/components/simple-table/components/simple-table-tooltip-cell-template.component.ts
deleted file mode 100644
index e8f57b2b..00000000
--- a/src/components/simple-table/components/simple-table-tooltip-cell-template.component.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Component, ViewChild, TemplateRef, Output, EventEmitter } from '@angular/core';
-
-import { createGridColumn, GridColumn } from '@cc/components/simple-table';
-
-@Component({
- selector: 'cc-simple-table-tooltip-cell-template',
- template: `
-
-
- {{ val }}
-
-
- `,
- styles: [
- `
- .dashed {
- text-decoration: underline;
- cursor: default;
- text-decoration-style: dotted;
- }
- `,
- ],
-})
-export class SimpleTableTooltipCellTemplateComponent {
- @Output() template = new EventEmitter>();
-
- @ViewChild('tpl', { static: true }) set tpl(tpl: TemplateRef) {
- this.template.emit(tpl);
- }
-}
-
-export function createTooltipTemplateGridColumn(col: GridColumn, tooltip: (data: T) => any) {
- return { ...createGridColumn(col), _data: { tooltip } };
-}
diff --git a/src/components/simple-table/index.ts b/src/components/simple-table/index.ts
deleted file mode 100644
index d1bd5ed7..00000000
--- a/src/components/simple-table/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './simple-table.component';
-export * from './simple-table.module';
-export * from './utils/create-grid-columns';
diff --git a/src/components/simple-table/simple-table.component.html b/src/components/simple-table/simple-table.component.html
deleted file mode 100644
index cc77f111..00000000
--- a/src/components/simple-table/simple-table.component.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/simple-table/simple-table.component.scss b/src/components/simple-table/simple-table.component.scss
deleted file mode 100644
index 2d439a2a..00000000
--- a/src/components/simple-table/simple-table.component.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-.table-card {
- width: 100%;
- overflow: hidden;
-
- & > * {
- border: none;
- }
-}
-
-.show-more {
- padding: 16px;
-}
diff --git a/src/components/simple-table/simple-table.component.ts b/src/components/simple-table/simple-table.component.ts
deleted file mode 100644
index ca353634..00000000
--- a/src/components/simple-table/simple-table.component.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Component, Input, Output, EventEmitter, OnInit, ContentChild } from '@angular/core';
-import { MtxGridColumn } from '@ng-matero/extensions/grid';
-import { MtxGrid } from '@ng-matero/extensions/grid/grid';
-import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
-import { coerceBoolean } from 'coerce-property';
-import { BehaviorSubject } from 'rxjs';
-
-import { SimpleTableActionsComponent } from './components/simple-table-actions.component';
-
-@UntilDestroy()
-@Component({
- selector: 'cc-simple-table',
- templateUrl: './simple-table.component.html',
- styleUrls: ['./simple-table.component.scss'],
-})
-export class SimpleTableComponent implements OnInit {
- @Input() data: T[];
- @Input() columns: MtxGridColumn[];
- @Input() cellTemplate?: MtxGrid['cellTemplate'];
- @Input() trackBy?: MtxGrid['trackBy'];
- @Input() @coerceBoolean loading = false;
-
- @Input() @coerceBoolean rowSelectable = false;
- @Output() rowSelectionChange = new EventEmitter();
-
- @Input() @coerceBoolean hasMore = false;
- @Input() @coerceBoolean noUpdate = false;
- @Output() size = new EventEmitter();
- @Output() update = new EventEmitter<{ size?: number }>();
- @Output() fetchMore = new EventEmitter<{ size?: number }>();
-
- @ContentChild(SimpleTableActionsComponent) actions: SimpleTableActionsComponent;
-
- size$ = new BehaviorSubject(25);
-
- ngOnInit() {
- this.size$.pipe(untilDestroyed(this)).subscribe((v) => this.size.emit(v));
- }
-}
diff --git a/src/components/simple-table/simple-table.module.ts b/src/components/simple-table/simple-table.module.ts
deleted file mode 100644
index 3aeaa993..00000000
--- a/src/components/simple-table/simple-table.module.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { NgModule } from '@angular/core';
-import { FlexModule } from '@angular/flex-layout';
-import { MatButtonModule } from '@angular/material/button';
-import { MatCardModule } from '@angular/material/card';
-import { MatIconModule } from '@angular/material/icon';
-import { MatInputModule } from '@angular/material/input';
-import { MatMenuModule } from '@angular/material/menu';
-import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
-import { MatSelectModule } from '@angular/material/select';
-import { MatTableModule } from '@angular/material/table';
-import { MatTooltipModule } from '@angular/material/tooltip';
-import { MtxGridModule } from '@ng-matero/extensions/grid';
-import { ActionsModule } from '@vality/ng-core';
-
-import { TableModule } from '@cc/components/table';
-
-import { EmptySearchResultModule } from '../empty-search-result';
-import { SimpleTableActionsComponent } from './components/simple-table-actions.component';
-import { SimpleTableTooltipCellTemplateComponent } from './components/simple-table-tooltip-cell-template.component';
-import { SimpleTableComponent } from './simple-table.component';
-
-@NgModule({
- imports: [
- CommonModule,
- MatTableModule,
- MatCardModule,
- TableModule,
- EmptySearchResultModule,
- MatProgressSpinnerModule,
- FlexModule,
- MatInputModule,
- MatSelectModule,
- MatIconModule,
- MatMenuModule,
- MatButtonModule,
- ActionsModule,
- MatTooltipModule,
- MtxGridModule,
- ],
- declarations: [
- SimpleTableComponent,
- SimpleTableActionsComponent,
- SimpleTableTooltipCellTemplateComponent,
- ],
- exports: [
- SimpleTableComponent,
- SimpleTableActionsComponent,
- SimpleTableTooltipCellTemplateComponent,
- ],
-})
-export class SimpleTableModule {}
diff --git a/src/components/simple-table/utils/create-grid-columns.ts b/src/components/simple-table/utils/create-grid-columns.ts
deleted file mode 100644
index 9cefa193..00000000
--- a/src/components/simple-table/utils/create-grid-columns.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import { formatDate } from '@angular/common';
-import { MtxGridColumn } from '@ng-matero/extensions/grid';
-import isObject from 'lodash-es/isObject';
-import startCase from 'lodash-es/startCase';
-import { Overwrite } from 'utility-types';
-
-export type GridColumn =
- | (Overwrite<
- MtxGridColumn,
- {
- formatter?: (rowData: T, colDef?: MtxGridColumn) => string;
- }
- > & {
- _data?: any;
- })
- | keyof T
- | string;
-
-export function createGridColumn(col: GridColumn) {
- if (!isObject(col))
- col = {
- field: col as string,
- };
- if (!col.header) col.header = startCase(String(col.field).toLowerCase());
- return {
- ...col,
- };
-}
-
-export function createGridColumns(columns: GridColumn[]): MtxGridColumn[] {
- return columns.map((col) => createGridColumn(col));
-}
-
-export function createDescriptionFormattedColumn(
- field: string,
- getDescriptionOrDescriptionField: ((data: T) => string) | string,
- getValue?: (data: T) => string
-): MtxGridColumn {
- return {
- field,
- formatter: (data: T) => {
- const desc =
- typeof getDescriptionOrDescriptionField === 'function'
- ? getDescriptionOrDescriptionField(data)
- : String(data[getDescriptionOrDescriptionField]);
- const value = getValue ? getValue(data) : String(data[field]);
- return value + (desc ? `${desc}
` : '');
- },
- };
-}
-
-export function createDatetimeFormattedColumn(field: string): MtxGridColumn {
- return {
- field,
- formatter: (data: T) => formatDate(data[field], 'dd.MM.yyyy HH:mm:ss', 'en'),
- };
-}
diff --git a/src/components/table/show-more-button/show-more-button.component.html b/src/components/table/show-more-button/show-more-button.component.html
index 29860d66..34d73d09 100644
--- a/src/components/table/show-more-button/show-more-button.component.html
+++ b/src/components/table/show-more-button/show-more-button.component.html
@@ -1,3 +1,3 @@