monkey-front-core 0.0.426 → 0.0.428
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/core/interfaces/index.mjs +2 -1
- package/esm2020/lib/core/interfaces/monkeyecx-resolver.mjs +2 -0
- package/esm2020/lib/core/services/commons/index.mjs +2 -1
- package/esm2020/lib/core/services/commons/monkeyecx-commons-resolve.service.mjs +123 -0
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +2 -1
- package/fesm2015/monkey-front-core.mjs +124 -3
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +120 -3
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/interfaces/index.d.ts +1 -0
- package/lib/core/interfaces/monkeyecx-resolver.d.ts +39 -0
- package/lib/core/services/commons/index.d.ts +1 -0
- package/lib/core/services/commons/monkeyecx-commons-resolve.service.d.ts +56 -0
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +1 -0
- package/monkey-front-core-0.0.428.tgz +0 -0
- package/package.json +3 -3
- package/monkey-front-core-0.0.426.tgz +0 -0
|
@@ -17,6 +17,7 @@ export * from './monkeyecx-program';
|
|
|
17
17
|
export * from './monkeyecx-releases';
|
|
18
18
|
export * from './monkeyecx-request-in-progress';
|
|
19
19
|
export * from './monkeyecx-request-paged';
|
|
20
|
+
export * from './monkeyecx-resolver';
|
|
20
21
|
export * from './monkeyecx-response-links';
|
|
21
22
|
export * from './monkeyecx-response-paged';
|
|
22
23
|
export * from './monkeyecx-saved-state';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { MonkeyEcxPaginationService, MonkeyEcxTranslateOptions } from '..';
|
|
3
|
+
import { MonkeyEcxFeatureToggleService } from '../services';
|
|
4
|
+
import { MonkeyEcxConfig } from './monkeyecx-config';
|
|
5
|
+
import { MonkeyEcxCountrySecurity } from './monkeyecx-country-security';
|
|
6
|
+
export interface MonkeyEcxCommonsSearch {
|
|
7
|
+
buildParams(): string;
|
|
8
|
+
}
|
|
9
|
+
export interface MonkeyEcxInitialResolverConfig {
|
|
10
|
+
route: string;
|
|
11
|
+
searchClass?: new (data: any) => MonkeyEcxCommonsSearch;
|
|
12
|
+
}
|
|
13
|
+
export interface MonkeyEcxCommonsConfig {
|
|
14
|
+
companyType?: string;
|
|
15
|
+
callbackMain: Function;
|
|
16
|
+
router?: Router;
|
|
17
|
+
callbackPagination?: Function;
|
|
18
|
+
translateOptions?: MonkeyEcxTranslateOptions;
|
|
19
|
+
feature?: {
|
|
20
|
+
service: MonkeyEcxFeatureToggleService;
|
|
21
|
+
flag: string;
|
|
22
|
+
};
|
|
23
|
+
featureByProgram?: {
|
|
24
|
+
config: MonkeyEcxConfig;
|
|
25
|
+
feature: string;
|
|
26
|
+
};
|
|
27
|
+
countrySecurity?: MonkeyEcxCountrySecurity;
|
|
28
|
+
pendency?: {
|
|
29
|
+
service: {
|
|
30
|
+
hasPendencies: Function;
|
|
31
|
+
};
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
paginationOptions?: {
|
|
35
|
+
service: MonkeyEcxPaginationService;
|
|
36
|
+
callback: Function;
|
|
37
|
+
name?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
|
2
|
+
import { Action, Store } from '@ngrx/store';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
+
import { MonkeyEcxCommonsService } from '.';
|
|
5
|
+
import { MonkeyEcxDiscoveryParamsService, MonkeyEcxPaginationService, MonkeyEcxTokenStorageService } from '../..';
|
|
6
|
+
import { MonkeyEcxCommonsConfig, MonkeyEcxInitialResolverConfig } from '../../interfaces';
|
|
7
|
+
import { MonkeyEcxService } from '../monkeyecx-service.service';
|
|
8
|
+
export declare abstract class MonkeyEcxCommonsResolveService extends MonkeyEcxCommonsService {
|
|
9
|
+
private action;
|
|
10
|
+
private actionPagination;
|
|
11
|
+
private selector;
|
|
12
|
+
private route;
|
|
13
|
+
private currentRoute;
|
|
14
|
+
protected paginationService: MonkeyEcxPaginationService;
|
|
15
|
+
protected translateService: TranslateService;
|
|
16
|
+
protected router: Router;
|
|
17
|
+
protected store: Store<any>;
|
|
18
|
+
protected monkeyDiscovery: MonkeyEcxDiscoveryParamsService;
|
|
19
|
+
constructor(monkeyecxService: MonkeyEcxService, tokenStorage: MonkeyEcxTokenStorageService, config: {
|
|
20
|
+
actions: {
|
|
21
|
+
load: Action;
|
|
22
|
+
};
|
|
23
|
+
selectors: {
|
|
24
|
+
selectByIdentifier: Function;
|
|
25
|
+
selectControl: Function;
|
|
26
|
+
selectLinks?: Function;
|
|
27
|
+
selectPage?: Function;
|
|
28
|
+
};
|
|
29
|
+
actionsPagination?: {
|
|
30
|
+
load: Action;
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
protected getData(): Promise<void>;
|
|
34
|
+
protected loadPage(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* @description Inicializar a class genérica
|
|
37
|
+
* @param (args: MonkeyEcxInitialResolverConfig)
|
|
38
|
+
* => route é obrigátorio pois ele quem inicializa a store.
|
|
39
|
+
* A searchClass só se faz necessaria quando for usar filtros
|
|
40
|
+
*/
|
|
41
|
+
protected init(args: MonkeyEcxInitialResolverConfig): void;
|
|
42
|
+
resolve(route: ActivatedRouteSnapshot | null, state: RouterStateSnapshot | null, otherArgs?: MonkeyEcxCommonsConfig): void;
|
|
43
|
+
/**
|
|
44
|
+
* @description Atualizar os filtros da tela
|
|
45
|
+
* @param (search: T, route?: string)
|
|
46
|
+
* => route é opcional, passar ele apenas se a rota for diferente do padrão
|
|
47
|
+
*/
|
|
48
|
+
setSearch<T>(search: T, route?: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* @description Navegação para details.
|
|
51
|
+
* Por padrão sera redirecionado para '${currentRoute}/details'
|
|
52
|
+
* @param (detailsData: T, route?: string)
|
|
53
|
+
* => route é opcional, passar ele apenas se a rota for diferente do padrão
|
|
54
|
+
*/
|
|
55
|
+
navigateToDetails<T>(detailsData: T, route?: string): void;
|
|
56
|
+
}
|
|
@@ -28,6 +28,7 @@ export declare class MonkeyEcxCommonsService {
|
|
|
28
28
|
__data$: Observable<any> | null;
|
|
29
29
|
__pagination$: Observable<any> | null;
|
|
30
30
|
__control$: Observable<any> | null;
|
|
31
|
+
__page$: Observable<any> | null;
|
|
31
32
|
__data: any | any[];
|
|
32
33
|
__savedState: MonkeyEcxSavedState | null;
|
|
33
34
|
__params: any | any[];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monkey-front-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.428",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": "^13.1.1",
|
|
6
6
|
"@angular/common": "^13.1.1",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"@ngx-translate/http-loader": "^6.0.0",
|
|
19
19
|
"launchdarkly-js-client-sdk": "3.0.0",
|
|
20
20
|
"moment": "^2.29.4",
|
|
21
|
-
"monkey-style-guide": "^2.0.
|
|
21
|
+
"monkey-style-guide": "^2.0.185",
|
|
22
22
|
"ngx-cookie-service": "^13.1.1",
|
|
23
23
|
"ngx-mask": "^12.0.0",
|
|
24
24
|
"rxjs": "^6.6.3"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"monkey-style-guide": "^2.0.
|
|
27
|
+
"monkey-style-guide": "^2.0.185",
|
|
28
28
|
"tslib": "^2.3.0"
|
|
29
29
|
},
|
|
30
30
|
"module": "fesm2015/monkey-front-core.mjs",
|
|
Binary file
|