monkey-front-core 0.0.427 → 0.0.429

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.
@@ -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
+ }
@@ -1 +1,2 @@
1
+ export * from './monkeyecx-commons-resolve.service';
1
2
  export * from './monkeyecx-commons.service';
@@ -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[];
@@ -1,6 +1,6 @@
1
1
  export * from './alerts';
2
2
  export * from './auth';
3
- export * from './commons/monkeyecx-commons.service';
3
+ export * from './commons';
4
4
  export * from './config/monkeyecx-config.module';
5
5
  export * from './config/monkeyecx-config.service';
6
6
  export * from './config/monkeyecx-currency-config.service';
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monkey-front-core",
3
- "version": "0.0.427",
3
+ "version": "0.0.429",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^13.1.1",
6
6
  "@angular/common": "^13.1.1",
Binary file