mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 02:25:17 +00:00
Select shared library (#119)
This commit is contained in:
parent
3b7eb37f1c
commit
8fa78ebef3
@ -43,7 +43,7 @@ module.exports = {
|
||||
{
|
||||
...baseTsRules,
|
||||
// TODO: add fixed directories
|
||||
files: ['**/src/app/core/**/*.ts'],
|
||||
files: ['**/src/app/core/**/*.ts', '**/projects/**/*.ts'],
|
||||
},
|
||||
{
|
||||
...baseTsRules,
|
||||
|
21
.github/workflows/pr.yaml
vendored
21
.github/workflows/pr.yaml
vendored
@ -9,6 +9,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/init
|
||||
- name: Building libraries
|
||||
run: npm run build-libs
|
||||
- name: Cache all
|
||||
uses: actions/cache@v3
|
||||
id: cache
|
||||
@ -16,7 +18,7 @@ jobs:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
eslint:
|
||||
name: ESLint
|
||||
name: ESLint App
|
||||
runs-on: ubuntu-latest
|
||||
needs: [init]
|
||||
steps:
|
||||
@ -27,7 +29,20 @@ jobs:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
- 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:
|
||||
name: Prettier
|
||||
runs-on: ubuntu-latest
|
||||
@ -53,4 +68,4 @@ jobs:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}
|
||||
- name: Build
|
||||
run: npm run build
|
||||
run: npm run build-app
|
||||
|
@ -1,3 +1,3 @@
|
||||
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
|
@ -40,3 +40,10 @@
|
||||
npm start
|
||||
```
|
||||
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
|
||||
```
|
||||
|
36
angular.json
36
angular.json
@ -37,9 +37,10 @@
|
||||
"@vality/payout-manager-proto",
|
||||
"@vality/repairer-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",
|
||||
"main": "src/main.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": {
|
||||
|
937
package-lock.json
generated
937
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@ -4,17 +4,22 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "ngcc",
|
||||
"start": "ng serve --proxy-config proxy.conf.js --port 4200",
|
||||
"build": "ng build --extra-webpack-config webpack.extra.js",
|
||||
"start": "concurrently -n LIB,APP -c magenta,cyan npm:dev-libs \"sleep 0.5 && npm run dev\"",
|
||||
"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",
|
||||
"lint-cmd": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1115",
|
||||
"lint": "npm run lint-cmd -- --cache",
|
||||
"lint": "eslint \"src/**/*.{ts,js,html}\" --max-warnings 1115",
|
||||
"lint-fix": "npm run lint -- --fix",
|
||||
"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": "npm run prettier-preset -- --list-different",
|
||||
"prettier:fix": "npm run prettier-preset -- --write",
|
||||
"fix": "npm run lint-fix; npm run prettier:fix"
|
||||
"prettier-fix": "npm run prettier-preset -- --write",
|
||||
"fix": "concurrently -n LIB,APP -c magenta,cyan npm:lint-libs-fix npm:lint-fix && npm run prettier-fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "14.0.4",
|
||||
@ -86,6 +91,7 @@
|
||||
"@types/uuid": "3.4.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"concurrently": "7.3.0",
|
||||
"dotenv": "16.0.0",
|
||||
"eslint": "8.20.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
@ -103,6 +109,7 @@
|
||||
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||
"karma-jasmine": "5.1.0",
|
||||
"karma-jasmine-html-reporter": "2.0.0",
|
||||
"ng-packagr": "14.1.0",
|
||||
"ngx-build-plus": "14.0.0",
|
||||
"prettier": "2.7.1",
|
||||
"prettier-plugin-organize-attributes": "0.0.5",
|
||||
|
16
projects/ng-core/.browserslistrc
Normal file
16
projects/ng-core/.browserslistrc
Normal 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
|
1
projects/ng-core/.prettierignore
Normal file
1
projects/ng-core/.prettierignore
Normal file
@ -0,0 +1 @@
|
||||
package.json
|
25
projects/ng-core/README.md
Normal file
25
projects/ng-core/README.md
Normal 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.
|
41
projects/ng-core/karma.conf.js
Normal file
41
projects/ng-core/karma.conf.js
Normal 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,
|
||||
});
|
||||
};
|
7
projects/ng-core/ng-package.json
Normal file
7
projects/ng-core/ng-package.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/ng-core",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
11
projects/ng-core/package.json
Normal file
11
projects/ng-core/package.json
Normal 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"
|
||||
}
|
||||
}
|
2
projects/ng-core/src/lib/components/actions/index.ts
Normal file
2
projects/ng-core/src/lib/components/actions/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './actions.module';
|
||||
export * from './actions.component';
|
@ -9,7 +9,7 @@ import { BaseDialogResponseStatus } from './types/base-dialog-response-status';
|
||||
styleUrls: ['base-dialog.component.scss'],
|
||||
})
|
||||
export class BaseDialogComponent {
|
||||
@Input() title: string;
|
||||
@Input() title!: string;
|
||||
|
||||
@coerceBoolean @Input() disabled = false;
|
||||
@coerceBoolean @Input() inProgress = false;
|
@ -7,8 +7,7 @@ import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
|
||||
import { ActionsModule } from '@cc/components/actions';
|
||||
|
||||
import { ActionsModule } from '../actions';
|
||||
import { BaseDialogComponent } from './base-dialog.component';
|
||||
import { BaseDialogActionsComponent } from './components/base-dialog-actions/base-dialog-actions.component';
|
||||
|
||||
@ -21,7 +20,6 @@ const SHARED_DECLARATIONS = [BaseDialogComponent, BaseDialogActionsComponent];
|
||||
MatDividerModule,
|
||||
MatButtonModule,
|
||||
ActionsModule,
|
||||
ActionsModule,
|
||||
MatIconModule,
|
||||
MatProgressBarModule,
|
||||
MatDialogModule,
|
8
projects/ng-core/src/lib/components/base-dialog/index.ts
Normal file
8
projects/ng-core/src/lib/components/base-dialog/index.ts
Normal 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';
|
@ -1,9 +1,10 @@
|
||||
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 { DIALOG_CONFIG, DialogConfig } from '@cc/app/tokens';
|
||||
import { BaseDialogResponse, BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
import { DEFAULT_DIALOG_CONFIG, DIALOG_CONFIG, DialogConfig } from '../tokens';
|
||||
import { BaseDialogResponse } from '../types/base-dialog-response';
|
||||
import { BaseDialogSuperclass } from '../utils/base-dialog-superclass';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@ -11,8 +12,12 @@ import { BaseDialogResponse, BaseDialogSuperclass } from '@cc/components/base-di
|
||||
export class BaseDialogService {
|
||||
constructor(
|
||||
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>(
|
||||
dialogComponent: ComponentType<BaseDialogSuperclass<C, D, R, S>>,
|
||||
@ -25,12 +30,16 @@ export class BaseDialogService {
|
||||
? []
|
||||
: [data: D, configOrConfigName?: Omit<MatDialogConfig<D>, 'data'> | keyof DialogConfig]
|
||||
): 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, {
|
||||
data,
|
||||
...(dialogComponent as typeof BaseDialogSuperclass).defaultDialogConfig,
|
||||
...(typeof configOrConfigName === 'string'
|
||||
? this.dialogConfig[configOrConfigName]
|
||||
: configOrConfigName),
|
||||
...config,
|
||||
});
|
||||
}
|
||||
}
|
20
projects/ng-core/src/lib/components/base-dialog/tokens.ts
Normal file
20
projects/ng-core/src/lib/components/base-dialog/tokens.ts
Normal 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' },
|
||||
};
|
@ -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> {
|
||||
status: S | BaseDialogResponseStatus;
|
@ -1,8 +1,7 @@
|
||||
import { Directive, Injector } from '@angular/core';
|
||||
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';
|
||||
|
||||
@Directive()
|
2
projects/ng-core/src/lib/components/index.ts
Normal file
2
projects/ng-core/src/lib/components/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './actions';
|
||||
export * from './base-dialog';
|
1
projects/ng-core/src/lib/index.ts
Normal file
1
projects/ng-core/src/lib/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './components';
|
5
projects/ng-core/src/public-api.ts
Normal file
5
projects/ng-core/src/public-api.ts
Normal file
@ -0,0 +1,5 @@
|
||||
/*
|
||||
* Public API Surface of ng-core
|
||||
*/
|
||||
|
||||
export * from './lib';
|
29
projects/ng-core/src/test.ts
Normal file
29
projects/ng-core/src/test.ts
Normal 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);
|
16
projects/ng-core/tsconfig.lib.json
Normal file
16
projects/ng-core/tsconfig.lib.json
Normal 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"]
|
||||
}
|
10
projects/ng-core/tsconfig.lib.prod.json
Normal file
10
projects/ng-core/tsconfig.lib.prod.json
Normal 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"
|
||||
}
|
||||
}
|
10
projects/ng-core/tsconfig.spec.json
Normal file
10
projects/ng-core/tsconfig.spec.json
Normal 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"]
|
||||
}
|
@ -36,12 +36,10 @@ import { SearchPartiesModule } from './sections/search-parties/search-parties.mo
|
||||
import { SectionsModule } from './sections/sections.module';
|
||||
import { ThemeManager, ThemeManagerModule, ThemeName } from './theme-manager';
|
||||
import {
|
||||
DEFAULT_DIALOG_CONFIG,
|
||||
DEFAULT_MAT_DATE_FORMATS,
|
||||
DEFAULT_QUERY_PARAMS_SERIALIZERS,
|
||||
DEFAULT_SEARCH_LIMIT,
|
||||
DEFAULT_SMALL_SEARCH_LIMIT,
|
||||
DIALOG_CONFIG,
|
||||
SEARCH_LIMIT,
|
||||
SMALL_SEARCH_LIMIT,
|
||||
} from './tokens';
|
||||
@ -87,7 +85,6 @@ moment.locale('en');
|
||||
{ provide: LOCALE_ID, useValue: 'en' },
|
||||
{ provide: SEARCH_LIMIT, useValue: DEFAULT_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 },
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import {
|
||||
BehaviorSubject,
|
||||
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 { UploadFileService } from '@cc/app/sections/claim/services/upload-file.service';
|
||||
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 { AddModificationDialogComponent } from './components/add-modification-dialog/add-modification-dialog.component';
|
||||
|
@ -15,13 +15,12 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { ActionsModule, BaseDialogModule } from '@vality/ng-core';
|
||||
import { ngfModule } from 'angular-file';
|
||||
|
||||
import { MetadataFormModule, StatusModule } from '@cc/app/shared/components';
|
||||
import { JsonViewerModule } from '@cc/app/shared/components/json-viewer/json-viewer.module';
|
||||
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 { TimelineComponentsModule } from '../party-claim/changeset/timeline-components';
|
||||
|
@ -9,12 +9,15 @@ import {
|
||||
PartyModificationChange,
|
||||
} from '@vality/domain-proto/lib/claim_management';
|
||||
import { Party } from '@vality/domain-proto/lib/domain';
|
||||
import {
|
||||
BaseDialogResponseStatus,
|
||||
BaseDialogSuperclass,
|
||||
DEFAULT_DIALOG_CONFIG,
|
||||
} from '@vality/ng-core';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
import { ClaimManagementService } from '@cc/app/api/claim-management';
|
||||
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';
|
||||
|
||||
@UntilDestroy()
|
||||
|
@ -2,12 +2,12 @@ import { Component, Injector } from '@angular/core';
|
||||
import { Validators, FormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { Claim, ClaimStatus } from '@vality/domain-proto/lib/claim_management';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
|
||||
import { ClaimManagementService } from '@cc/app/api/claim-management';
|
||||
import { AllowedClaimStatusesService } from '@cc/app/sections/claim/services/allowed-claim-statuses.service';
|
||||
import { NotificationService } from '@cc/app/shared/services/notification';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
import { getUnionKey, inProgressFrom, progressTo } from '@cc/utils';
|
||||
|
||||
@UntilDestroy()
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { Claim, ModificationUnit } from '@vality/domain-proto/lib/claim_management';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import { coerceBoolean } from 'coerce-property';
|
||||
import isEmpty from 'lodash-es/isEmpty';
|
||||
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 { NotificationService } from '@cc/app/shared/services/notification';
|
||||
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 { inProgressFrom, progressTo } from '@cc/utils';
|
||||
import { getUnionValue } from '@cc/utils/get-union-key';
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import moment from 'moment';
|
||||
import { switchMap } from 'rxjs';
|
||||
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 { FileStorageService } from '@cc/app/api/file-storage';
|
||||
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';
|
||||
|
||||
@Injectable()
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import { filter } from 'rxjs/operators';
|
||||
|
||||
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 { CreateClaimService } from './create-claim.service';
|
||||
|
@ -6,6 +6,7 @@ import { MatCardModule } from '@angular/material/card';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { ActionsModule } from '@vality/ng-core';
|
||||
|
||||
import { ShopDetailsModule } from '@cc/app/shared/components';
|
||||
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 { HeadlineModule } from '@cc/components/headline';
|
||||
|
||||
import { ActionsModule } from '../../../../components/actions';
|
||||
import { PayoutDetailsRoutingModule } from './payout-details-routing.module';
|
||||
import { PayoutDetailsComponent } from './payout-details.component';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Component, Injector } from '@angular/core';
|
||||
import { FormControl } from '@ngneat/reactive-forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { PayoutID } from '@vality/payout-manager-proto';
|
||||
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 { progressTo } from '@cc/utils/operators';
|
||||
|
||||
import {
|
||||
BaseDialogResponseStatus,
|
||||
BaseDialogSuperclass,
|
||||
} from '../../../../../../components/base-dialog';
|
||||
|
||||
@UntilDestroy()
|
||||
@Component({
|
||||
selector: 'cc-cancel-payout-dialog',
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
|
||||
import { FormBuilder } from '@ngneat/reactive-forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { PayoutParams } from '@vality/payout-manager-proto';
|
||||
import isNil from 'lodash-es/isNil';
|
||||
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 { toMinor } from '@cc/utils/to-minor';
|
||||
|
||||
import {
|
||||
BaseDialogResponseStatus,
|
||||
BaseDialogSuperclass,
|
||||
} from '../../../../../../components/base-dialog';
|
||||
|
||||
interface CreatePayoutDialogForm {
|
||||
partyId: string;
|
||||
shopId: string;
|
||||
|
@ -1,13 +1,12 @@
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormControl } from '@ngneat/reactive-forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogService } from '@vality/ng-core';
|
||||
import omitBy from 'lodash-es/omitBy';
|
||||
|
||||
import { QueryParamsService } from '@cc/app/shared/services';
|
||||
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 { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component';
|
||||
import { PayoutsSearchForm } from './components/payouts-search-form/payouts-search-form.component';
|
||||
@ -29,8 +28,7 @@ export class PayoutsComponent implements OnInit {
|
||||
constructor(
|
||||
private fetchPayoutsService: FetchPayoutsService,
|
||||
private qp: QueryParamsService<Partial<PayoutsSearchForm>>,
|
||||
private baseDialogService: BaseDialogService,
|
||||
@Inject(DIALOG_CONFIG) private dialogConfig: DialogConfig
|
||||
private baseDialogService: BaseDialogService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -13,13 +13,13 @@ import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { BaseDialogModule } from '@vality/ng-core';
|
||||
|
||||
import { PayoutToolFieldModule, ShopFieldModule, StatusModule } from '@cc/app/shared/components';
|
||||
import { MerchantFieldModule } from '@cc/app/shared/components/merchant-field';
|
||||
import { ApiModelPipesModule, CommonPipesModule, ThriftPipesModule } from '@cc/app/shared/pipes';
|
||||
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 { CreatePayoutDialogComponent } from './components/create-payout-dialog/create-payout-dialog.component';
|
||||
import { PayoutsSearchFormComponent } from './components/payouts-search-form/payouts-search-form.component';
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { PayoutID, PayoutStatus } from '@vality/magista-proto';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import { switchMap } from 'rxjs';
|
||||
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 { PayoutManagementService } from '../../../api/payout-manager';
|
||||
import { NotificationService } from '../../../shared/services/notification';
|
||||
|
@ -2,13 +2,10 @@ import { Component, Injector } from '@angular/core';
|
||||
import { Validators } from '@angular/forms';
|
||||
import { FormControl } from '@ngneat/reactive-forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { RepairInvoicesRequest, RepairWithdrawalsRequest } from '@vality/repairer-proto';
|
||||
import { BehaviorSubject, from } from 'rxjs';
|
||||
|
||||
import {
|
||||
BaseDialogResponseStatus,
|
||||
BaseDialogSuperclass,
|
||||
} from '../../../../../components/base-dialog';
|
||||
import { progressTo } from '../../../../../utils';
|
||||
import { RepairManagementService } from '../../../../api/repairer';
|
||||
import { ErrorService } from '../../../../shared/services/error';
|
||||
|
@ -3,6 +3,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { DateRange } from '@angular/material/datepicker';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import { Machine, Namespace, ProviderID, RepairStatus } from '@vality/repairer-proto';
|
||||
import isEmpty from 'lodash-es/isEmpty';
|
||||
import isNil from 'lodash-es/isNil';
|
||||
@ -10,8 +11,6 @@ import omitBy from 'lodash-es/omitBy';
|
||||
import { Moment } from 'moment';
|
||||
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 { getEnumKeys } from '../../../utils';
|
||||
import { RepairManagementService } from '../../api/repairer';
|
||||
|
@ -12,9 +12,8 @@ import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
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 { TableModule } from '../../../components/table';
|
||||
import { MetadataFormModule } from '../../shared';
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
|
||||
import { RoutingRulesService } from '../../../thrift-services';
|
||||
|
||||
@UntilDestroy()
|
||||
|
@ -5,8 +5,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
|
||||
import { BaseDialogModule } from '@cc/components/base-dialog';
|
||||
import { BaseDialogModule } from '@vality/ng-core';
|
||||
|
||||
import { ChangeDelegateRulesetDialogComponent } from './change-delegate-ruleset-dialog.component';
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
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 { RoutingRulesService } from '../../../thrift-services';
|
||||
|
@ -3,8 +3,7 @@ import { NgModule } from '@angular/core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
|
||||
import { BaseDialogModule } from '@cc/components/base-dialog';
|
||||
import { BaseDialogModule } from '@vality/ng-core';
|
||||
|
||||
import { TargetRulesetFormModule } from '../target-ruleset-form';
|
||||
import { ChangeTargetDialogComponent } from './change-target-dialog.component';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { ChangeDetectionStrategy, Component, Injector } from '@angular/core';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
||||
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 { RoutingRulesService } from '../../../../thrift-services';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogService } from '@vality/ng-core';
|
||||
import { first, map } from 'rxjs/operators';
|
||||
|
||||
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 { ErrorService } from '../../../shared/services/error';
|
||||
|
@ -14,8 +14,8 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
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 { ChangeTargetDialogModule } from '../change-target-dialog';
|
||||
|
@ -3,8 +3,7 @@ import { FormBuilder } from '@ngneat/reactive-forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { Shop } from '@vality/domain-proto/lib/domain';
|
||||
import { StatWallet } from '@vality/fistful-proto/lib/fistful_stat';
|
||||
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
|
||||
|
||||
import { ErrorService } from '../../../../shared/services/error';
|
||||
import { RoutingRulesService } from '../../../../thrift-services';
|
||||
|
@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
|
||||
import { BaseDialogModule } from '@cc/components/base-dialog';
|
||||
import { BaseDialogModule } from '@vality/ng-core';
|
||||
|
||||
import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog.component';
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { Component, Injector } from '@angular/core';
|
||||
import { UntypedFormBuilder } from '@angular/forms';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
|
||||
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
import { BaseDialogSuperclass } from '@vality/ng-core';
|
||||
|
||||
import { ErrorService } from '../../../../shared/services/error';
|
||||
import { RoutingRulesService } from '../../../../thrift-services';
|
||||
|
@ -11,8 +11,7 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
|
||||
import { BaseDialogModule } from '@cc/components/base-dialog';
|
||||
import { BaseDialogModule } from '@vality/ng-core';
|
||||
|
||||
import { InitializeRoutingRulesDialogComponent } from './initialize-routing-rules-dialog.component';
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogService, BaseDialogResponseStatus } from '@vality/ng-core';
|
||||
import { combineLatest, Observable } from 'rxjs';
|
||||
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 { RoutingRulesType } from '../types/routing-rules-type';
|
||||
import { AddPartyRoutingRuleDialogComponent } from './add-party-routing-rule-dialog';
|
||||
|
@ -10,12 +10,10 @@ import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import { combineLatest, defer, ReplaySubject } from 'rxjs';
|
||||
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 { handleError } from '../../../../utils/operators/handle-error';
|
||||
import { ErrorService } from '../../../shared/services/error';
|
||||
|
@ -3,8 +3,7 @@ import { Validators } from '@angular/forms';
|
||||
import { FormBuilder } from '@ngneat/reactive-forms';
|
||||
import { UntilDestroy } from '@ngneat/until-destroy';
|
||||
import { Predicate, RiskScore } from '@vality/domain-proto/lib/domain';
|
||||
|
||||
import { BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
import { BaseDialogSuperclass } from '@vality/ng-core';
|
||||
|
||||
import { DomainStoreService } from '../../../../thrift-services/damsel/domain-store.service';
|
||||
import { AddRoutingRuleDialogService, TerminalType } from './add-routing-rule-dialog.service';
|
||||
|
@ -11,9 +11,9 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { BaseDialogModule } from '@vality/ng-core';
|
||||
|
||||
import { MetadataFormModule } from '@cc/app/shared';
|
||||
import { BaseDialogModule } from '@cc/components/base-dialog';
|
||||
|
||||
import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component';
|
||||
import { ExpanderComponent } from './expander';
|
||||
|
@ -2,11 +2,10 @@ import { Injectable } from '@angular/core';
|
||||
import { UntypedFormArray, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { Predicate } from '@vality/domain-proto/lib/domain';
|
||||
import { BaseDialogResponseStatus } from '@vality/ng-core';
|
||||
import { of } from 'rxjs';
|
||||
import { startWith, switchMap, take } from 'rxjs/operators';
|
||||
|
||||
import { BaseDialogResponseStatus } from '@cc/components/base-dialog';
|
||||
|
||||
import { RoutingRulesService } from '../../../../thrift-services';
|
||||
import { AddRoutingRuleDialogComponent } from './add-routing-rule-dialog.component';
|
||||
|
||||
|
@ -2,14 +2,13 @@ import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { Predicate, TerminalObject } from '@vality/domain-proto/lib/domain';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { first, map, pluck, shareReplay, switchMap } from 'rxjs/operators';
|
||||
|
||||
import { objectToJSON } from '@cc/app/api/utils';
|
||||
import { RoutingRulesType } from '@cc/app/sections/routing-rules/types/routing-rules-type';
|
||||
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 { damselInstanceToObject } from '../../../thrift-services';
|
||||
|
@ -5,14 +5,11 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { ExternalID } from '@vality/fistful-proto/lib/base';
|
||||
import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat';
|
||||
import { Status } from '@vality/fistful-proto/lib/withdrawal';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
|
||||
import { combineLatest, from, of } from 'rxjs';
|
||||
import { catchError, finalize } from 'rxjs/operators';
|
||||
import * as short from 'short-uuid';
|
||||
|
||||
import {
|
||||
BaseDialogResponseStatus,
|
||||
BaseDialogSuperclass,
|
||||
} from '../../../../../components/base-dialog';
|
||||
import { ManagementService } from '../../../../api/withdrawal';
|
||||
import { MetadataFormExtension } from '../../../../shared';
|
||||
import { ErrorService } from '../../../../shared/services/error';
|
||||
|
@ -6,11 +6,10 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
import { omitBy } from '@s-libs/micro-dash';
|
||||
import { PartyID } from '@vality/domain-proto';
|
||||
import { StatWithdrawal } from '@vality/fistful-proto/lib/fistful_stat';
|
||||
import { BaseDialogResponseStatus, BaseDialogService } from '@vality/ng-core';
|
||||
import { Moment } from 'moment';
|
||||
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 { isNilOrEmptyString } from '../../../utils';
|
||||
import { WithdrawalParams } from '../../query-dsl';
|
||||
|
@ -12,8 +12,8 @@ import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatSortModule } from '@angular/material/sort';
|
||||
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 { TableModule } from '../../../components/table';
|
||||
import { MetadataFormModule, ThriftPipesModule } from '../../shared';
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { InjectionToken } from '@angular/core';
|
||||
import { MatDateFormats } from '@angular/material/core';
|
||||
import { DateRange } from '@angular/material/datepicker';
|
||||
import { MatDialogConfig } from '@angular/material/dialog';
|
||||
import { 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 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[] = [
|
||||
{
|
||||
id: 'moment',
|
||||
|
@ -1 +0,0 @@
|
||||
export * from './actions.module';
|
@ -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';
|
@ -1,6 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@cc/components/base-dialog';
|
||||
import { BaseDialogResponseStatus, BaseDialogSuperclass } from '@vality/ng-core';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-confirm-action-dialog',
|
||||
|
@ -2,8 +2,7 @@ import { NgModule } from '@angular/core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
|
||||
import { BaseDialogModule } from '@cc/components/base-dialog';
|
||||
import { BaseDialogModule } from '@vality/ng-core';
|
||||
|
||||
import { ConfirmActionDialogComponent } from './confirm-action-dialog.component';
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
"skipLibCheck": false,
|
||||
"paths": {
|
||||
"@cc/*": ["src/*"],
|
||||
"thrift": ["node_modules/@vality/woody/dist/thrift"],
|
||||
"node-int64": ["node_modules/@vality/thrift-ts/lib/int64"]
|
||||
"@vality/ng-core": ["dist/ng-core"],
|
||||
"thrift": ["node_modules/@vality/woody/dist/thrift"]
|
||||
}
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
|
Loading…
Reference in New Issue
Block a user