Select shared library (#119)

This commit is contained in:
Rinat Arsaev 2022-08-01 19:21:48 +03:00 committed by GitHub
parent 3b7eb37f1c
commit 8fa78ebef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
80 changed files with 1282 additions and 138 deletions

View File

@ -43,7 +43,7 @@ module.exports = {
{ {
...baseTsRules, ...baseTsRules,
// TODO: add fixed directories // TODO: add fixed directories
files: ['**/src/app/core/**/*.ts'], files: ['**/src/app/core/**/*.ts', '**/projects/**/*.ts'],
}, },
{ {
...baseTsRules, ...baseTsRules,

View File

@ -9,6 +9,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: ./.github/actions/init - uses: ./.github/actions/init
- name: Building libraries
run: npm run build-libs
- name: Cache all - name: Cache all
uses: actions/cache@v3 uses: actions/cache@v3
id: cache id: cache
@ -16,7 +18,7 @@ jobs:
path: ./* path: ./*
key: ${{ github.sha }} key: ${{ github.sha }}
eslint: eslint:
name: ESLint name: ESLint App
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [init] needs: [init]
steps: steps:
@ -27,7 +29,20 @@ jobs:
path: ./* path: ./*
key: ${{ github.sha }} key: ${{ github.sha }}
- name: Check - name: Check
run: npm run lint-cmd run: npm run lint
eslint-libs:
name: ESLint Libs
runs-on: ubuntu-latest
needs: [init]
steps:
- name: Cache all
uses: actions/cache@v3
id: cache
with:
path: ./*
key: ${{ github.sha }}
- name: Check
run: npm run lint-libs
prettier: prettier:
name: Prettier name: Prettier
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -53,4 +68,4 @@ jobs:
path: ./* path: ./*
key: ${{ github.sha }} key: ${{ github.sha }}
- name: Build - name: Build
run: npm run build run: npm run build-app

View File

@ -1,3 +1,3 @@
FROM nginx:1.21 FROM nginx:1.21
COPY dist /usr/share/nginx/html COPY dist/control-center /usr/share/nginx/html
COPY nginx.conf /etc/nginx/vhosts.d/control-center.conf COPY nginx.conf /etc/nginx/vhosts.d/control-center.conf

View File

@ -40,3 +40,10 @@
npm start npm start
``` ```
2. Open [localhost:4200](http://localhost:4200/) 2. Open [localhost:4200](http://localhost:4200/)
If you want to develop a library, then it's better to start building library separately:
```sh
npm run dev
npm run dev-libs
```

View File

@ -37,9 +37,10 @@
"@vality/payout-manager-proto", "@vality/payout-manager-proto",
"@vality/repairer-proto", "@vality/repairer-proto",
"@vality/fistful-proto", "@vality/fistful-proto",
"@vality/file-storage-proto" "@vality/file-storage-proto",
"@vality/thrift-ts"
], ],
"outputPath": "dist", "outputPath": "dist/control-center",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
@ -143,6 +144,37 @@
} }
} }
} }
},
"ng-core": {
"projectType": "library",
"root": "projects/ng-core",
"sourceRoot": "projects/ng-core/src",
"prefix": "v",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/ng-core/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ng-core/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/ng-core/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ng-core/src/test.ts",
"tsConfig": "projects/ng-core/tsconfig.spec.json",
"karmaConfig": "projects/ng-core/karma.conf.js"
}
}
}
} }
}, },
"cli": { "cli": {

937
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,17 +4,22 @@
"private": true, "private": true,
"scripts": { "scripts": {
"postinstall": "ngcc", "postinstall": "ngcc",
"start": "ng serve --proxy-config proxy.conf.js --port 4200", "start": "concurrently -n LIB,APP -c magenta,cyan npm:dev-libs \"sleep 0.5 && npm run dev\"",
"build": "ng build --extra-webpack-config webpack.extra.js", "dev": "ng serve --proxy-config proxy.conf.js --port 4200",
"dev-libs": "ng build ng-core --watch",
"build-app": "ng build --extra-webpack-config webpack.extra.js",
"build-libs": "ng build ng-core",
"build": "npm run build-libs && npm run build-app",
"test": "ng test", "test": "ng test",
"lint-cmd": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1115", "lint": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1115",
"lint": "npm run lint-cmd -- --cache",
"lint-fix": "npm run lint -- --fix", "lint-fix": "npm run lint -- --fix",
"lint-errors": "npm run lint -- --quiet", "lint-errors": "npm run lint -- --quiet",
"lint-libs": "eslint \"projects/**/*.{ts,js,html}\" --max-warnings 0",
"lint-libs-fix": "npm run lint -- --fix",
"prettier-preset": "prettier \"**/*.{html,js,ts,css,scss,md,json,prettierrc,svg,huskyrc,yml,yaml}\"", "prettier-preset": "prettier \"**/*.{html,js,ts,css,scss,md,json,prettierrc,svg,huskyrc,yml,yaml}\"",
"prettier": "npm run prettier-preset -- --list-different", "prettier": "npm run prettier-preset -- --list-different",
"prettier:fix": "npm run prettier-preset -- --write", "prettier-fix": "npm run prettier-preset -- --write",
"fix": "npm run lint-fix; npm run prettier:fix" "fix": "concurrently -n LIB,APP -c magenta,cyan npm:lint-libs-fix npm:lint-fix && npm run prettier-fix"
}, },
"dependencies": { "dependencies": {
"@angular/animations": "14.0.4", "@angular/animations": "14.0.4",
@ -86,6 +91,7 @@
"@types/uuid": "3.4.3", "@types/uuid": "3.4.3",
"@typescript-eslint/eslint-plugin": "^5.29.0", "@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0", "@typescript-eslint/parser": "^5.29.0",
"concurrently": "7.3.0",
"dotenv": "16.0.0", "dotenv": "16.0.0",
"eslint": "8.20.0", "eslint": "8.20.0",
"eslint-config-prettier": "8.5.0", "eslint-config-prettier": "8.5.0",
@ -103,6 +109,7 @@
"karma-coverage-istanbul-reporter": "3.0.3", "karma-coverage-istanbul-reporter": "3.0.3",
"karma-jasmine": "5.1.0", "karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.0.0", "karma-jasmine-html-reporter": "2.0.0",
"ng-packagr": "14.1.0",
"ngx-build-plus": "14.0.0", "ngx-build-plus": "14.0.0",
"prettier": "2.7.1", "prettier": "2.7.1",
"prettier-plugin-organize-attributes": "0.0.5", "prettier-plugin-organize-attributes": "0.0.5",

View File

@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR

View File

@ -0,0 +1 @@
package.json

View File

@ -0,0 +1,25 @@
# NgCore
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.0.
## Code scaffolding
Run `ng generate component component-name --project ng-core` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ng-core`.
> Note: Don't forget to add `--project ng-core` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build ng-core` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build ng-core`, go to the dist folder `cd dist/ng-core` and run `npm publish`.
## Running unit tests
Run `ng test ng-core` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@ -0,0 +1,41 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/ng-core'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
});
};

View File

@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/ng-core",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@ -0,0 +1,11 @@
{
"name": "@vality/ng-core",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^14.0.0",
"@angular/core": "^14.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
}
}

View File

@ -0,0 +1,2 @@
export * from './actions.module';
export * from './actions.component';

View File

@ -9,7 +9,7 @@ import { BaseDialogResponseStatus } from './types/base-dialog-response-status';
styleUrls: ['base-dialog.component.scss'], styleUrls: ['base-dialog.component.scss'],
}) })
export class BaseDialogComponent { export class BaseDialogComponent {
@Input() title: string; @Input() title!: string;
@coerceBoolean @Input() disabled = false; @coerceBoolean @Input() disabled = false;
@coerceBoolean @Input() inProgress = false; @coerceBoolean @Input() inProgress = false;

View File

@ -7,8 +7,7 @@ import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule } from '@angular/material/icon'; import { MatIconModule } from '@angular/material/icon';
import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatProgressBarModule } from '@angular/material/progress-bar';
import { ActionsModule } from '@cc/components/actions'; import { ActionsModule } from '../actions';
import { BaseDialogComponent } from './base-dialog.component'; import { BaseDialogComponent } from './base-dialog.component';
import { BaseDialogActionsComponent } from './components/base-dialog-actions/base-dialog-actions.component'; import { BaseDialogActionsComponent } from './components/base-dialog-actions/base-dialog-actions.component';
@ -21,7 +20,6 @@ const SHARED_DECLARATIONS = [BaseDialogComponent, BaseDialogActionsComponent];
MatDividerModule, MatDividerModule,
MatButtonModule, MatButtonModule,
ActionsModule, ActionsModule,
ActionsModule,
MatIconModule, MatIconModule,
MatProgressBarModule, MatProgressBarModule,
MatDialogModule, MatDialogModule,

View File

@ -0,0 +1,8 @@
export * from './base-dialog.module';
export * from './types/base-dialog-response-status';
export * from './types/base-dialog-response';
export * from './utils/base-dialog-superclass';
export * from './tokens';
export * from './base-dialog.component';
export * from './components/base-dialog-actions/base-dialog-actions.component';
export * from './services/base-dialog.service';

View File

@ -1,9 +1,10 @@
import { ComponentType } from '@angular/cdk/overlay'; import { ComponentType } from '@angular/cdk/overlay';
import { Inject, Injectable } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog'; import { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
import { DIALOG_CONFIG, DialogConfig } from '@cc/app/tokens'; import { DEFAULT_DIALOG_CONFIG, DIALOG_CONFIG, DialogConfig } from '../tokens';
import { BaseDialogResponse, BaseDialogSuperclass } from '@cc/components/base-dialog'; import { BaseDialogResponse } from '../types/base-dialog-response';
import { BaseDialogSuperclass } from '../utils/base-dialog-superclass';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',
@ -11,8 +12,12 @@ import { BaseDialogResponse, BaseDialogSuperclass } from '@cc/components/base-di
export class BaseDialogService { export class BaseDialogService {
constructor( constructor(
private dialog: MatDialog, private dialog: MatDialog,
@Inject(DIALOG_CONFIG) private dialogConfig: DialogConfig @Optional()
) {} @Inject(DIALOG_CONFIG)
private dialogConfig: DialogConfig
) {
if (!dialogConfig) this.dialogConfig = DEFAULT_DIALOG_CONFIG;
}
open<C, D, R, S>( open<C, D, R, S>(
dialogComponent: ComponentType<BaseDialogSuperclass<C, D, R, S>>, dialogComponent: ComponentType<BaseDialogSuperclass<C, D, R, S>>,
@ -25,12 +30,16 @@ export class BaseDialogService {
? [] ? []
: [data: D, configOrConfigName?: Omit<MatDialogConfig<D>, 'data'> | keyof DialogConfig] : [data: D, configOrConfigName?: Omit<MatDialogConfig<D>, 'data'> | keyof DialogConfig]
): MatDialogRef<C, BaseDialogResponse<R, S>> { ): MatDialogRef<C, BaseDialogResponse<R, S>> {
let config: Partial<MatDialogConfig<D>>;
if (!configOrConfigName) config = this.dialogConfig.medium;
else if (typeof configOrConfigName === 'string')
config = this.dialogConfig[configOrConfigName];
else config = configOrConfigName;
return this.dialog.open(dialogComponent as never, { return this.dialog.open(dialogComponent as never, {
data, data,
...(dialogComponent as typeof BaseDialogSuperclass).defaultDialogConfig, ...(dialogComponent as typeof BaseDialogSuperclass).defaultDialogConfig,
...(typeof configOrConfigName === 'string' ...config,
? this.dialogConfig[configOrConfigName]
: configOrConfigName),
}); });
} }
} }

View File

@ -0,0 +1,20 @@
import { InjectionToken } from '@angular/core';
import { MatDialogConfig } from '@angular/material/dialog';
import { ValuesType } from 'utility-types';
export type DialogConfig = Record<'small' | 'medium' | 'large', MatDialogConfig<undefined>>;
export const DIALOG_CONFIG = new InjectionToken<DialogConfig>('dialogConfig');
export const BASE_CONFIG: ValuesType<DialogConfig> = {
maxHeight: '90vh',
disableClose: true,
autoFocus: false,
width: '552px',
};
export const DEFAULT_DIALOG_CONFIG: DialogConfig = {
small: { ...BASE_CONFIG, width: '360px' },
medium: BASE_CONFIG,
large: { ...BASE_CONFIG, width: '648px' },
};

View File

@ -1,4 +1,4 @@
import { BaseDialogResponseStatus } from '@cc/components/base-dialog'; import { BaseDialogResponseStatus } from './base-dialog-response-status';
export interface BaseDialogResponse<T = void, S = void> { export interface BaseDialogResponse<T = void, S = void> {
status: S | BaseDialogResponseStatus; status: S | BaseDialogResponseStatus;

View File

@ -1,8 +1,7 @@
import { Directive, Injector } from '@angular/core'; import { Directive, Injector } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { DEFAULT_DIALOG_CONFIG } from '@cc/app/tokens'; import { DEFAULT_DIALOG_CONFIG } from '../tokens';
import { BaseDialogResponse } from '../types/base-dialog-response'; import { BaseDialogResponse } from '../types/base-dialog-response';
@Directive() @Directive()

View File

@ -0,0 +1,2 @@
export * from './actions';
export * from './base-dialog';

View File

@ -0,0 +1 @@
export * from './components';

View File

@ -0,0 +1,5 @@
/*
* Public API Surface of ng-core
*/
export * from './lib';

View File

@ -0,0 +1,29 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
// eslint-disable-next-line @typescript-eslint/naming-convention
declare const require: {
context(
path: string,
deep?: boolean,
filter?: RegExp
): {
<T>(id: string): T;
keys(): string[];
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().forEach(context);

View File

@ -0,0 +1,16 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitAny": true
},
"exclude": ["src/test.ts", "**/*.spec.ts"]
}

View File

@ -0,0 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"compilationMode": "partial"
}
}

View File

@ -0,0 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": ["jasmine"]
},
"files": ["src/test.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}

View File

@ -36,12 +36,10 @@ import { SearchPartiesModule } from './sections/search-parties/search-parties.mo
import { SectionsModule } from './sections/sections.module'; import { SectionsModule } from './sections/sections.module';
import { ThemeManager, ThemeManagerModule, ThemeName } from './theme-manager'; import { ThemeManager, ThemeManagerModule, ThemeName } from './theme-manager';
import { import {
DEFAULT_DIALOG_CONFIG,
DEFAULT_MAT_DATE_FORMATS, DEFAULT_MAT_DATE_FORMATS,
DEFAULT_QUERY_PARAMS_SERIALIZERS, DEFAULT_QUERY_PARAMS_SERIALIZERS,
DEFAULT_SEARCH_LIMIT, DEFAULT_SEARCH_LIMIT,
DEFAULT_SMALL_SEARCH_LIMIT, DEFAULT_SMALL_SEARCH_LIMIT,
DIALOG_CONFIG,
SEARCH_LIMIT, SEARCH_LIMIT,
SMALL_SEARCH_LIMIT, SMALL_SEARCH_LIMIT,
} from './tokens'; } from './tokens';
@ -87,7 +85,6 @@ moment.locale('en');
{ provide: LOCALE_ID, useValue: 'en' }, { provide: LOCALE_ID, useValue: 'en' },
{ provide: SEARCH_LIMIT, useValue: DEFAULT_SEARCH_LIMIT }, { provide: SEARCH_LIMIT, useValue: DEFAULT_SEARCH_LIMIT },
{ provide: SMALL_SEARCH_LIMIT, useValue: DEFAULT_SMALL_SEARCH_LIMIT }, { provide: SMALL_SEARCH_LIMIT, useValue: DEFAULT_SMALL_SEARCH_LIMIT },
{ provide: DIALOG_CONFIG, useValue: DEFAULT_DIALOG_CONFIG },
{ provide: QUERY_PARAMS_SERIALIZERS, useValue: DEFAULT_QUERY_PARAMS_SERIALIZERS }, { provide: QUERY_PARAMS_SERIALIZERS, useValue: DEFAULT_QUERY_PARAMS_SERIALIZERS },
], ],
bootstrap: [AppComponent], bootstrap: [AppComponent],

View File

@ -1,6 +1,7 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { import {
BehaviorSubject, BehaviorSubject,
combineLatest, combineLatest,
@ -19,8 +20,6 @@ import { ChangeStatusDialogComponent } from '@cc/app/sections/claim/components/c
import { AllowedClaimStatusesService } from '@cc/app/sections/claim/services/allowed-claim-statuses.service'; import { AllowedClaimStatusesService } from '@cc/app/sections/claim/services/allowed-claim-statuses.service';
import { UploadFileService } from '@cc/app/sections/claim/services/upload-file.service'; import { UploadFileService } from '@cc/app/sections/claim/services/upload-file.service';
import { NotificationService } from '@cc/app/shared/services/notification'; import { NotificationService } from '@cc/app/shared/services/notification';
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { getUnionKey, inProgressFrom, progressTo } from '@cc/utils'; import { getUnionKey, inProgressFrom, progressTo } from '@cc/utils';
import { AddModificationDialogComponent } from './components/add-modification-dialog/add-modification-dialog.component'; import { AddModificationDialogComponent } from './components/add-modification-dialog/add-modification-dialog.component';

View File

@ -15,13 +15,12 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { ActionsModule, BaseDialogModule } from '@vality/ng-core';
import { ngfModule } from 'angular-file'; import { ngfModule } from 'angular-file';
import { MetadataFormModule, StatusModule } from '@cc/app/shared/components'; import { MetadataFormModule, StatusModule } from '@cc/app/shared/components';
import { JsonViewerModule } from '@cc/app/shared/components/json-viewer/json-viewer.module'; import { JsonViewerModule } from '@cc/app/shared/components/json-viewer/json-viewer.module';
import { ThriftPipesModule } from '@cc/app/shared/pipes'; import { ThriftPipesModule } from '@cc/app/shared/pipes';
import { ActionsModule } from '@cc/components/actions';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { TimelineModule } from '@cc/components/timeline'; import { TimelineModule } from '@cc/components/timeline';
import { TimelineComponentsModule } from '../party-claim/changeset/timeline-components'; import { TimelineComponentsModule } from '../party-claim/changeset/timeline-components';

View File

@ -9,12 +9,15 @@ import {
PartyModificationChange, PartyModificationChange,
} from '@vality/domain-proto/lib/claim_management'; } from '@vality/domain-proto/lib/claim_management';
import { Party } from '@vality/domain-proto/lib/domain'; import { Party } from '@vality/domain-proto/lib/domain';
import {
BaseDialogResponseStatus,
BaseDialogSuperclass,
DEFAULT_DIALOG_CONFIG,
} from '@vality/ng-core';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { ClaimManagementService } from '@cc/app/api/claim-management'; import { ClaimManagementService } from '@cc/app/api/claim-management';
import { NotificationService } from '@cc/app/shared/services/notification'; import { NotificationService } from '@cc/app/shared/services/notification';
import { DEFAULT_DIALOG_CONFIG } from '@cc/app/tokens';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog';
import { inProgressFrom, progressTo } from '@cc/utils'; import { inProgressFrom, progressTo } from '@cc/utils';
@UntilDestroy() @UntilDestroy()

View File

@ -2,12 +2,12 @@ import { Component, Injector } from '@angular/core';
import { Validators, FormBuilder } from '@angular/forms'; import { Validators, FormBuilder } from '@angular/forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Claim, ClaimStatus } from '@vality/domain-proto/lib/claim_management'; import { Claim, ClaimStatus } from '@vality/domain-proto/lib/claim_management';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { ClaimManagementService } from '@cc/app/api/claim-management'; import { ClaimManagementService } from '@cc/app/api/claim-management';
import { AllowedClaimStatusesService } from '@cc/app/sections/claim/services/allowed-claim-statuses.service'; import { AllowedClaimStatusesService } from '@cc/app/sections/claim/services/allowed-claim-statuses.service';
import { NotificationService } from '@cc/app/shared/services/notification'; import { NotificationService } from '@cc/app/shared/services/notification';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog';
import { getUnionKey, inProgressFrom, progressTo } from '@cc/utils'; import { getUnionKey, inProgressFrom, progressTo } from '@cc/utils';
@UntilDestroy() @UntilDestroy()

View File

@ -1,6 +1,7 @@
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, Output } from '@angular/core';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Claim, ModificationUnit } from '@vality/domain-proto/lib/claim_management'; import { Claim, ModificationUnit } from '@vality/domain-proto/lib/claim_management';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { coerceBoolean } from 'coerce-property'; import { coerceBoolean } from 'coerce-property';
import isEmpty from 'lodash-es/isEmpty'; import isEmpty from 'lodash-es/isEmpty';
import { BehaviorSubject, switchMap } from 'rxjs'; import { BehaviorSubject, switchMap } from 'rxjs';
@ -12,8 +13,6 @@ import { getModificationName } from '@cc/app/sections/claim/utils/get-modificati
import { Patch } from '@cc/app/shared/components/json-viewer'; import { Patch } from '@cc/app/shared/components/json-viewer';
import { NotificationService } from '@cc/app/shared/services/notification'; import { NotificationService } from '@cc/app/shared/services/notification';
import { Color, StatusColor } from '@cc/app/styles'; import { Color, StatusColor } from '@cc/app/styles';
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog'; import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog';
import { inProgressFrom, progressTo } from '@cc/utils'; import { inProgressFrom, progressTo } from '@cc/utils';
import { getUnionValue } from '@cc/utils/get-union-key'; import { getUnionValue } from '@cc/utils/get-union-key';

View File

@ -1,5 +1,6 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import moment from 'moment'; import moment from 'moment';
import { switchMap } from 'rxjs'; import { switchMap } from 'rxjs';
import { filter, map } from 'rxjs/operators'; import { filter, map } from 'rxjs/operators';
@ -7,8 +8,6 @@ import { filter, map } from 'rxjs/operators';
import { ClaimManagementService } from '@cc/app/api/claim-management'; import { ClaimManagementService } from '@cc/app/api/claim-management';
import { FileStorageService } from '@cc/app/api/file-storage'; import { FileStorageService } from '@cc/app/api/file-storage';
import { NotificationService } from '@cc/app/shared/services/notification'; import { NotificationService } from '@cc/app/shared/services/notification';
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog'; import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog';
@Injectable() @Injectable()

View File

@ -1,10 +1,9 @@
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { filter } from 'rxjs/operators'; import { filter } from 'rxjs/operators';
import { ClaimSearchForm } from '@cc/app/shared/components'; import { ClaimSearchForm } from '@cc/app/shared/components';
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog'; import { ConfirmActionDialogComponent } from '@cc/components/confirm-action-dialog';
import { CreateClaimService } from './create-claim.service'; import { CreateClaimService } from './create-claim.service';

View File

@ -6,6 +6,7 @@ import { MatCardModule } from '@angular/material/card';
import { MatDividerModule } from '@angular/material/divider'; import { MatDividerModule } from '@angular/material/divider';
import { MatPaginatorModule } from '@angular/material/paginator'; import { MatPaginatorModule } from '@angular/material/paginator';
import { MatTableModule } from '@angular/material/table'; import { MatTableModule } from '@angular/material/table';
import { ActionsModule } from '@vality/ng-core';
import { ShopDetailsModule } from '@cc/app/shared/components'; import { ShopDetailsModule } from '@cc/app/shared/components';
import { PayoutToolDetailsModule } from '@cc/app/shared/components/payout-tool-details/payout-tool-details.module'; import { PayoutToolDetailsModule } from '@cc/app/shared/components/payout-tool-details/payout-tool-details.module';
@ -14,7 +15,6 @@ import { DetailsItemModule } from '@cc/components/details-item';
import { EmptySearchResultModule } from '@cc/components/empty-search-result'; import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { HeadlineModule } from '@cc/components/headline'; import { HeadlineModule } from '@cc/components/headline';
import { ActionsModule } from '../../../../components/actions';
import { PayoutDetailsRoutingModule } from './payout-details-routing.module'; import { PayoutDetailsRoutingModule } from './payout-details-routing.module';
import { PayoutDetailsComponent } from './payout-details.component'; import { PayoutDetailsComponent } from './payout-details.component';

View File

@ -1,6 +1,7 @@
import { Component, Injector } from '@angular/core'; import { Component, Injector } from '@angular/core';
import { FormControl } from '@ngneat/reactive-forms'; import { FormControl } from '@ngneat/reactive-forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
import { PayoutID } from '@vality/payout-manager-proto'; import { PayoutID } from '@vality/payout-manager-proto';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
@ -8,11 +9,6 @@ import { PayoutManagementService } from '@cc/app/api/payout-manager';
import { NotificationService } from '@cc/app/shared/services/notification'; import { NotificationService } from '@cc/app/shared/services/notification';
import { progressTo } from '@cc/utils/operators'; import { progressTo } from '@cc/utils/operators';
import {
BaseDialogResponseStatus,
BaseDialogSuperclass,
} from '../../../../../../components/base-dialog';
@UntilDestroy() @UntilDestroy()
@Component({ @Component({
selector: 'cc-cancel-payout-dialog', selector: 'cc-cancel-payout-dialog',

View File

@ -1,6 +1,7 @@
import { ChangeDetectionStrategy, Component, Injector } from '@angular/core'; import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
import { FormBuilder } from '@ngneat/reactive-forms'; import { FormBuilder } from '@ngneat/reactive-forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
import { PayoutParams } from '@vality/payout-manager-proto'; import { PayoutParams } from '@vality/payout-manager-proto';
import isNil from 'lodash-es/isNil'; import isNil from 'lodash-es/isNil';
import omitBy from 'lodash-es/omitBy'; import omitBy from 'lodash-es/omitBy';
@ -11,11 +12,6 @@ import { NotificationService } from '@cc/app/shared/services/notification';
import { progressTo } from '@cc/utils/operators'; import { progressTo } from '@cc/utils/operators';
import { toMinor } from '@cc/utils/to-minor'; import { toMinor } from '@cc/utils/to-minor';
import {
BaseDialogResponseStatus,
BaseDialogSuperclass,
} from '../../../../../../components/base-dialog';
interface CreatePayoutDialogForm { interface CreatePayoutDialogForm {
partyId: string; partyId: string;
shopId: string; shopId: string;

View File

@ -1,13 +1,12 @@
import { Component, Inject, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormControl } from '@ngneat/reactive-forms'; import { FormControl } from '@ngneat/reactive-forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogService } from '@vality/ng-core';
import omitBy from 'lodash-es/omitBy'; import omitBy from 'lodash-es/omitBy';
import { QueryParamsService } from '@cc/app/shared/services'; import { QueryParamsService } from '@cc/app/shared/services';
import { isNilOrEmptyString } from '@cc/utils/is-nil-or-empty-string'; import { isNilOrEmptyString } from '@cc/utils/is-nil-or-empty-string';
import { BaseDialogService } from '../../../../components/base-dialog/services/base-dialog.service';
import { DIALOG_CONFIG, DialogConfig } from '../../../tokens';
import { PayoutActionsService } from '../services/payout-actions.service'; import { PayoutActionsService } from '../services/payout-actions.service';
import { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component'; import { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component';
import { PayoutsSearchForm } from './components/payouts-search-form/payouts-search-form.component'; import { PayoutsSearchForm } from './components/payouts-search-form/payouts-search-form.component';
@ -29,8 +28,7 @@ export class PayoutsComponent implements OnInit {
constructor( constructor(
private fetchPayoutsService: FetchPayoutsService, private fetchPayoutsService: FetchPayoutsService,
private qp: QueryParamsService<Partial<PayoutsSearchForm>>, private qp: QueryParamsService<Partial<PayoutsSearchForm>>,
private baseDialogService: BaseDialogService, private baseDialogService: BaseDialogService
@Inject(DIALOG_CONFIG) private dialogConfig: DialogConfig
) {} ) {}
ngOnInit() { ngOnInit() {

View File

@ -13,13 +13,13 @@ import { MatMenuModule } from '@angular/material/menu';
import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { MatTableModule } from '@angular/material/table'; import { MatTableModule } from '@angular/material/table';
import { BaseDialogModule } from '@vality/ng-core';
import { PayoutToolFieldModule, ShopFieldModule, StatusModule } from '@cc/app/shared/components'; import { PayoutToolFieldModule, ShopFieldModule, StatusModule } from '@cc/app/shared/components';
import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field'; import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field';
import { ApiModelPipesModule, CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes'; import { ApiModelPipesModule, CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes';
import { EmptySearchResultModule } from '@cc/components/empty-search-result'; import { EmptySearchResultModule } from '@cc/components/empty-search-result';
import { BaseDialogModule } from '../../../../components/base-dialog';
import { CancelPayoutDialogComponent } from './components/cancel-payout-dialog/cancel-payout-dialog.component'; import { CancelPayoutDialogComponent } from './components/cancel-payout-dialog/cancel-payout-dialog.component';
import { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component'; import { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component';
import { PayoutsSearchFormComponent } from './components/payouts-search-form/payouts-search-form.component'; import { PayoutsSearchFormComponent } from './components/payouts-search-form/payouts-search-form.component';

View File

@ -1,11 +1,10 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { PayoutID, PayoutStatus } from '@vality/magista-proto'; import { PayoutID, PayoutStatus } from '@vality/magista-proto';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { switchMap } from 'rxjs'; import { switchMap } from 'rxjs';
import { filter } from 'rxjs/operators'; import { filter } from 'rxjs/operators';
import { BaseDialogResponseStatus } from '../../../../components/base-dialog';
import { BaseDialogService } from '../../../../components/base-dialog/services/base-dialog.service';
import { ConfirmActionDialogComponent } from '../../../../components/confirm-action-dialog'; import { ConfirmActionDialogComponent } from '../../../../components/confirm-action-dialog';
import { PayoutManagementService } from '../../../api/payout-manager'; import { PayoutManagementService } from '../../../api/payout-manager';
import { NotificationService } from '../../../shared/services/notification'; import { NotificationService } from '../../../shared/services/notification';

View File

@ -2,13 +2,10 @@ import { Component, Injector } from '@angular/core';
import { Validators } from '@angular/forms'; import { Validators } from '@angular/forms';
import { FormControl } from '@ngneat/reactive-forms'; import { FormControl } from '@ngneat/reactive-forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
import { RepairInvoicesRequest, RepairWithdrawalsRequest } from '@vality/repairer-proto'; import { RepairInvoicesRequest, RepairWithdrawalsRequest } from '@vality/repairer-proto';
import { BehaviorSubject, from } from 'rxjs'; import { BehaviorSubject, from } from 'rxjs';
import {
BaseDialogResponseStatus,
BaseDialogSuperclass,
} from '../../../../../components/base-dialog';
import { progressTo } from '../../../../../utils'; import { progressTo } from '../../../../../utils';
import { RepairManagementService } from '../../../../api/repairer'; import { RepairManagementService } from '../../../../api/repairer';
import { ErrorService } from '../../../../shared/services/error'; import { ErrorService } from '../../../../shared/services/error';

View File

@ -3,6 +3,7 @@ import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms'; import { FormBuilder } from '@angular/forms';
import { DateRange } from '@angular/material/datepicker'; import { DateRange } from '@angular/material/datepicker';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { Machine, Namespace, ProviderID, RepairStatus } from '@vality/repairer-proto'; import { Machine, Namespace, ProviderID, RepairStatus } from '@vality/repairer-proto';
import isEmpty from 'lodash-es/isEmpty'; import isEmpty from 'lodash-es/isEmpty';
import isNil from 'lodash-es/isNil'; import isNil from 'lodash-es/isNil';
@ -10,8 +11,6 @@ import omitBy from 'lodash-es/omitBy';
import { Moment } from 'moment'; import { Moment } from 'moment';
import { filter, map, switchMap } from 'rxjs/operators'; import { filter, map, switchMap } from 'rxjs/operators';
import { BaseDialogResponseStatus } from '../../../components/base-dialog';
import { BaseDialogService } from '../../../components/base-dialog/services/base-dialog.service';
import { ConfirmActionDialogComponent } from '../../../components/confirm-action-dialog'; import { ConfirmActionDialogComponent } from '../../../components/confirm-action-dialog';
import { getEnumKeys } from '../../../utils'; import { getEnumKeys } from '../../../utils';
import { RepairManagementService } from '../../api/repairer'; import { RepairManagementService } from '../../api/repairer';

View File

@ -12,9 +12,8 @@ import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { MatTableModule } from '@angular/material/table'; import { MatTableModule } from '@angular/material/table';
import { MatTooltipModule } from '@angular/material/tooltip'; import { MatTooltipModule } from '@angular/material/tooltip';
import { ActionsModule, BaseDialogModule } from '@vality/ng-core';
import { ActionsModule } from '../../../components/actions';
import { BaseDialogModule } from '../../../components/base-dialog';
import { EmptySearchResultModule } from '../../../components/empty-search-result'; import { EmptySearchResultModule } from '../../../components/empty-search-result';
import { TableModule } from '../../../components/table'; import { TableModule } from '../../../components/table';
import { MetadataFormModule } from '../../shared'; import { MetadataFormModule } from '../../shared';

View File

@ -1,10 +1,9 @@
import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core';
import { UntypedFormBuilder } from '@angular/forms'; import { UntypedFormBuilder } from '@angular/forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogSuperclass } from '@vality/ng-core';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
import { RoutingRulesService } from '../../../thrift-services'; import { RoutingRulesService } from '../../../thrift-services';
@UntilDestroy() @UntilDestroy()

View File

@ -5,8 +5,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button'; import { MatButtonModule } from '@angular/material/button';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { BaseDialogModule } from '@vality/ng-core';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { ChangeDelegateRulesetDialogComponent } from './change-delegate-ruleset-dialog.component'; import { ChangeDelegateRulesetDialogComponent } from './change-delegate-ruleset-dialog.component';

View File

@ -1,9 +1,9 @@
import { ChangeDetectionStrategy, Component, Injector } from '@angular/core'; import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogSuperclass } from '@vality/ng-core';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type';
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
import { ErrorService } from '../../../shared/services/error'; import { ErrorService } from '../../../shared/services/error';
import { RoutingRulesService } from '../../../thrift-services'; import { RoutingRulesService } from '../../../thrift-services';

View File

@ -3,8 +3,7 @@ import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button'; import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog'; import { MatDialogModule } from '@angular/material/dialog';
import { BaseDialogModule } from '@vality/ng-core';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { TargetRulesetFormModule } from '../target-ruleset-form'; import { TargetRulesetFormModule } from '../target-ruleset-form';
import { ChangeTargetDialogComponent } from './change-target-dialog.component'; import { ChangeTargetDialogComponent } from './change-target-dialog.component';

View File

@ -1,10 +1,10 @@
import { ChangeDetectionStrategy, Component, Injector } from '@angular/core'; import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
import { UntypedFormBuilder } from '@angular/forms'; import { UntypedFormBuilder } from '@angular/forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogSuperclass } from '@vality/ng-core';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type';
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
import { ErrorService } from '../../../../shared/services/error'; import { ErrorService } from '../../../../shared/services/error';
import { RoutingRulesService } from '../../../../thrift-services'; import { RoutingRulesService } from '../../../../thrift-services';

View File

@ -1,10 +1,10 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogService } from '@vality/ng-core';
import { first, map } from 'rxjs/operators'; import { first, map } from 'rxjs/operators';
import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { handleError } from '../../../../utils/operators/handle-error'; import { handleError } from '../../../../utils/operators/handle-error';
import { ErrorService } from '../../../shared/services/error'; import { ErrorService } from '../../../shared/services/error';

View File

@ -14,8 +14,8 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatRadioModule } from '@angular/material/radio'; import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { BaseDialogModule } from '@vality/ng-core';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { DetailsItemModule } from '@cc/components/details-item'; import { DetailsItemModule } from '@cc/components/details-item';
import { ChangeTargetDialogModule } from '../change-target-dialog'; import { ChangeTargetDialogModule } from '../change-target-dialog';

View File

@ -3,8 +3,7 @@ import { FormBuilder } from '@ngneat/reactive-forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Shop } from '@vality/domain-proto/lib/domain'; import { Shop } from '@vality/domain-proto/lib/domain';
import { StatWallet } from '@vality/fistful-proto/lib/fistful_stat'; import { StatWallet } from '@vality/fistful-proto/lib/fistful_stat';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog';
import { ErrorService } from '../../../../shared/services/error'; import { ErrorService } from '../../../../shared/services/error';
import { RoutingRulesService } from '../../../../thrift-services'; import { RoutingRulesService } from '../../../../thrift-services';

View File

@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { MatRadioModule } from '@angular/material/radio'; import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { BaseDialogModule } from '@vality/ng-core';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog.component'; import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog.component';

View File

@ -1,8 +1,7 @@
import { Component, Injector } from '@angular/core'; import { Component, Injector } from '@angular/core';
import { UntypedFormBuilder } from '@angular/forms'; import { UntypedFormBuilder } from '@angular/forms';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogSuperclass } from '@vality/ng-core';
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
import { ErrorService } from '../../../../shared/services/error'; import { ErrorService } from '../../../../shared/services/error';
import { RoutingRulesService } from '../../../../thrift-services'; import { RoutingRulesService } from '../../../../thrift-services';

View File

@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { MatRadioModule } from '@angular/material/radio'; import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { BaseDialogModule } from '@vality/ng-core';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { InitializeRoutingRulesDialogComponent } from './initialize-routing-rules-dialog.component'; import { InitializeRoutingRulesDialogComponent } from './initialize-routing-rules-dialog.component';

View File

@ -1,12 +1,10 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogService, BaseDialogResponseStatus } from '@vality/ng-core';
import { combineLatest, Observable } from 'rxjs'; import { combineLatest, Observable } from 'rxjs';
import { filter, map, pluck, shareReplay, startWith, switchMap, take } from 'rxjs/operators'; import { filter, map, pluck, shareReplay, startWith, switchMap, take } from 'rxjs/operators';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { BaseDialogResponseStatus } from '../../../../components/base-dialog';
import { DomainStoreService } from '../../../thrift-services/damsel/domain-store.service'; import { DomainStoreService } from '../../../thrift-services/damsel/domain-store.service';
import { RoutingRulesType } from '../types/routing-rules-type'; import { RoutingRulesType } from '../types/routing-rules-type';
import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog'; import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog';

View File

@ -10,12 +10,10 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from '@angular/material/table';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { combineLatest, defer, ReplaySubject } from 'rxjs'; import { combineLatest, defer, ReplaySubject } from 'rxjs';
import { filter, map, shareReplay, startWith, switchMap } from 'rxjs/operators'; import { filter, map, shareReplay, startWith, switchMap } from 'rxjs/operators';
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { ConfirmActionDialogComponent } from '../../../../components/confirm-action-dialog'; import { ConfirmActionDialogComponent } from '../../../../components/confirm-action-dialog';
import { handleError } from '../../../../utils/operators/handle-error'; import { handleError } from '../../../../utils/operators/handle-error';
import { ErrorService } from '../../../shared/services/error'; import { ErrorService } from '../../../shared/services/error';

View File

@ -3,8 +3,7 @@ import { Validators } from '@angular/forms';
import { FormBuilder } from '@ngneat/reactive-forms'; import { FormBuilder } from '@ngneat/reactive-forms';
import { UntilDestroy } from '@ngneat/until-destroy'; import { UntilDestroy } from '@ngneat/until-destroy';
import { Predicate, RiskScore } from '@vality/domain-proto/lib/domain'; import { Predicate, RiskScore } from '@vality/domain-proto/lib/domain';
import { BaseDialogSuperclass } from '@vality/ng-core';
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
import { DomainStoreService } from '../../../../thrift-services/damsel/domain-store.service'; import { DomainStoreService } from '../../../../thrift-services/damsel/domain-store.service';
import { AddRoutingRuleDialogService, TerminalType } from './add-routing-rule-dialog.service'; import { AddRoutingRuleDialogService, TerminalType } from './add-routing-rule-dialog.service';

View File

@ -11,9 +11,9 @@ import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from '@angular/material/input';
import { MatRadioModule } from '@angular/material/radio'; import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { BaseDialogModule } from '@vality/ng-core';
import { MetadataFormModule } from '@cc/app/shared'; import { MetadataFormModule } from '@cc/app/shared';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component'; import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component';
import { ExpanderComponent } from './expander'; import { ExpanderComponent } from './expander';

View File

@ -2,11 +2,10 @@ import { Injectable } from '@angular/core';
import { UntypedFormArray, UntypedFormBuilder, Validators } from '@angular/forms'; import { UntypedFormArray, UntypedFormBuilder, Validators } from '@angular/forms';
import { MatDialogRef } from '@angular/material/dialog'; import { MatDialogRef } from '@angular/material/dialog';
import { Predicate } from '@vality/domain-proto/lib/domain'; import { Predicate } from '@vality/domain-proto/lib/domain';
import { BaseDialogResponseStatus } from '@vality/ng-core';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { startWith, switchMap, take } from 'rxjs/operators'; import { startWith, switchMap, take } from 'rxjs/operators';
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
import { RoutingRulesService } from '../../../../thrift-services'; import { RoutingRulesService } from '../../../../thrift-services';
import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component'; import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component';

View File

@ -2,14 +2,13 @@ import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Predicate, TerminalObject } from '@vality/domain-proto/lib/domain'; import { Predicate, TerminalObject } from '@vality/domain-proto/lib/domain';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { first, map, pluck, shareReplay, switchMap } from 'rxjs/operators'; import { first, map, pluck, shareReplay, switchMap } from 'rxjs/operators';
import { objectToJSON } from '@cc/app/api/utils'; import { objectToJSON } from '@cc/app/api/utils';
import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type'; import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type';
import { NotificationService } from '@cc/app/shared/services/notification'; import { NotificationService } from '@cc/app/shared/services/notification';
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
import { BaseDialogService } from '@cc/components/base-dialog/services/base-dialog.service';
import { ErrorService } from '../../../shared/services/error'; import { ErrorService } from '../../../shared/services/error';
import { damselInstanceToObject } from '../../../thrift-services'; import { damselInstanceToObject } from '../../../thrift-services';

View File

@ -5,14 +5,11 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { ExternalID } from '@vality/fistful-proto/lib/base'; import { ExternalID } from '@vality/fistful-proto/lib/base';
import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat'; import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat';
import { Status } from '@vality/fistful-proto/lib/withdrawal'; import { Status } from '@vality/fistful-proto/lib/withdrawal';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
import { combineLatest, from, of } from 'rxjs'; import { combineLatest, from, of } from 'rxjs';
import { catchError, finalize } from 'rxjs/operators'; import { catchError, finalize } from 'rxjs/operators';
import * as short from 'short-uuid'; import * as short from 'short-uuid';
import {
BaseDialogResponseStatus,
BaseDialogSuperclass,
} from '../../../../../components/base-dialog';
import { ManagementService } from '../../../../api/withdrawal'; import { ManagementService } from '../../../../api/withdrawal';
import { MetadataFormExtension } from '../../../../shared'; import { MetadataFormExtension } from '../../../../shared';
import { ErrorService } from '../../../../shared/services/error'; import { ErrorService } from '../../../../shared/services/error';

View File

@ -6,11 +6,10 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { omitBy } from '@s-libs/micro-dash'; import { omitBy } from '@s-libs/micro-dash';
import { PartyID } from '@vality/domain-proto'; import { PartyID } from '@vality/domain-proto';
import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat'; import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat';
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
import { Moment } from 'moment'; import { Moment } from 'moment';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { BaseDialogResponseStatus } from '../../../components/base-dialog';
import { BaseDialogService } from '../../../components/base-dialog/services/base-dialog.service';
import { SELECT_COLUMN_NAME } from '../../../components/table'; import { SELECT_COLUMN_NAME } from '../../../components/table';
import { isNilOrEmptyString } from '../../../utils'; import { isNilOrEmptyString } from '../../../utils';
import { WithdrawalParams } from '../../query-dsl'; import { WithdrawalParams } from '../../query-dsl';

View File

@ -12,8 +12,8 @@ import { MatRadioModule } from '@angular/material/radio';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { MatSortModule } from '@angular/material/sort'; import { MatSortModule } from '@angular/material/sort';
import { MatTableModule } from '@angular/material/table'; import { MatTableModule } from '@angular/material/table';
import { BaseDialogModule } from '@vality/ng-core';
import { BaseDialogModule } from '../../../components/base-dialog';
import { EmptySearchResultModule } from '../../../components/empty-search-result'; import { EmptySearchResultModule } from '../../../components/empty-search-result';
import { TableModule } from '../../../components/table'; import { TableModule } from '../../../components/table';
import { MetadataFormModule, ThriftPipesModule } from '../../shared'; import { MetadataFormModule, ThriftPipesModule } from '../../shared';

View File

@ -1,7 +1,6 @@
import { InjectionToken } from '@angular/core'; import { InjectionToken } from '@angular/core';
import { MatDateFormats } from '@angular/material/core'; import { MatDateFormats } from '@angular/material/core';
import { DateRange } from '@angular/material/datepicker'; import { DateRange } from '@angular/material/datepicker';
import { MatDialogConfig } from '@angular/material/dialog';
import { Moment } from 'moment'; import { Moment } from 'moment';
import * as moment from 'moment'; import * as moment from 'moment';
@ -13,23 +12,6 @@ export const DEFAULT_SEARCH_LIMIT = 10;
export const SMALL_SEARCH_LIMIT = new InjectionToken<number>('smallSearchLimit'); export const SMALL_SEARCH_LIMIT = new InjectionToken<number>('smallSearchLimit');
export const DEFAULT_SMALL_SEARCH_LIMIT = 5; export const DEFAULT_SMALL_SEARCH_LIMIT = 5;
export type DialogConfig = {
small: MatDialogConfig;
medium: MatDialogConfig;
large: MatDialogConfig;
};
export const DIALOG_CONFIG = new InjectionToken<DialogConfig>('dialogConfig');
const BASE_CONFIG: MatDialogConfig = {
maxHeight: '90vh',
disableClose: true,
autoFocus: false,
};
export const DEFAULT_DIALOG_CONFIG: DialogConfig = {
small: { ...BASE_CONFIG, width: '360px' },
medium: { ...BASE_CONFIG, width: '552px' },
large: { ...BASE_CONFIG, width: '648px' },
};
export const DEFAULT_QUERY_PARAMS_SERIALIZERS: Serializer[] = [ export const DEFAULT_QUERY_PARAMS_SERIALIZERS: Serializer[] = [
{ {
id: 'moment', id: 'moment',

View File

@ -1 +0,0 @@
export * from './actions.module';

View File

@ -1,4 +0,0 @@
export * from './base-dialog.module';
export * from './types/base-dialog-response-status';
export * from './types/base-dialog-response';
export * from './utils/base-dialog-superclass';

View File

@ -1,6 +1,5 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog';
@Component({ @Component({
selector: 'cc-confirm-action-dialog', selector: 'cc-confirm-action-dialog',

View File

@ -2,8 +2,7 @@ import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule } from '@angular/material/button'; import { MatButtonModule } from '@angular/material/button';
import { MatDialogModule } from '@angular/material/dialog'; import { MatDialogModule } from '@angular/material/dialog';
import { BaseDialogModule } from '@vality/ng-core';
import { BaseDialogModule } from '@cc/components/base-dialog';
import { ConfirmActionDialogComponent } from './confirm-action-dialog.component'; import { ConfirmActionDialogComponent } from './confirm-action-dialog.component';

View File

@ -19,8 +19,8 @@
"skipLibCheck": false, "skipLibCheck": false,
"paths": { "paths": {
"@cc/*": ["src/*"], "@cc/*": ["src/*"],
"thrift": ["node_modules/@vality/woody/dist/thrift"], "@vality/ng-core": ["dist/ng-core"],
"node-int64": ["node_modules/@vality/thrift-ts/lib/int64"] "thrift": ["node_modules/@vality/woody/dist/thrift"]
} }
}, },
"angularCompilerOptions": { "angularCompilerOptions": {