monkey-front-core 0.0.469 → 0.0.470

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.
@@ -1,2 +1,3 @@
1
+ export * from './monkeyecx-commons-resolve-base.service';
1
2
  export * from './monkeyecx-commons-resolve.service';
2
3
  export * from './monkeyecx-commons.service';
@@ -0,0 +1,46 @@
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 MonkeyEcxCommonsResolveBaseService extends MonkeyEcxCommonsService {
9
+ private action;
10
+ protected route: string | null;
11
+ protected currentRoute: string | null;
12
+ protected paginationService: MonkeyEcxPaginationService;
13
+ protected translateService: TranslateService;
14
+ protected router: Router;
15
+ protected store: Store<any>;
16
+ protected monkeyDiscovery: MonkeyEcxDiscoveryParamsService;
17
+ constructor(monkeyecxService: MonkeyEcxService, tokenStorage: MonkeyEcxTokenStorageService, config: {
18
+ actions: {
19
+ load: Action;
20
+ loadPagination?: Action;
21
+ };
22
+ });
23
+ protected getData(): Promise<void>;
24
+ protected loadPage(actionType: string): Promise<void>;
25
+ /**
26
+ * @description Inicializar a class genérica
27
+ * @param (args: MonkeyEcxInitialResolverConfig)
28
+ * => route é obrigátorio pois ele quem inicializa a store.
29
+ * A searchClass só se faz necessaria quando for usar filtros
30
+ */
31
+ protected init(args: MonkeyEcxInitialResolverConfig): void;
32
+ resolve(route: ActivatedRouteSnapshot | null, state: RouterStateSnapshot | null, otherArgs?: MonkeyEcxCommonsConfig): void;
33
+ /**
34
+ * @description Atualizar os filtros da tela
35
+ * @param (search: T, route?: string)
36
+ * => route é opcional, passar ele apenas se a rota for diferente do padrão
37
+ */
38
+ setSearch<T>(search: T, route?: string): void;
39
+ /**
40
+ * @description Navegação para details.
41
+ * Por padrão sera redirecionado para '${currentRoute}/details'
42
+ * @param (detailsData: T, route?: string)
43
+ * => route é opcional, passar ele apenas se a rota for diferente do padrão
44
+ */
45
+ navigateToDetails<T>(detailsData: T, route?: string): void;
46
+ }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monkey-front-core",
3
- "version": "0.0.469",
3
+ "version": "0.0.470",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^13.1.1",
6
6
  "@angular/common": "^13.1.1",
Binary file