@sapphire-ion/framework 1.2.60 → 1.2.62
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/esm2022/lib/components/default/default-view/header-view/header-view.component.mjs +10 -17
- package/esm2022/lib/components/default/default-view/view.mjs +8 -13
- package/esm2022/lib/index.mjs +2 -1
- package/esm2022/lib/services/navigation-context.service.mjs +112 -0
- package/esm2022/lib/services/web/http.service.mjs +9 -3
- package/fesm2022/sapphire-ion-framework.mjs +129 -31
- package/fesm2022/sapphire-ion-framework.mjs.map +1 -1
- package/lib/components/default/default-view/header-view/header-view.component.d.ts +3 -1
- package/lib/components/default/default-view/view.d.ts +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/services/navigation-context.service.d.ts +14 -0
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { IonBackButton, NavController } from '@ionic/angular';
|
|
3
3
|
import { ActivatedRoute, UrlTree } from '@angular/router';
|
|
4
|
+
import { NavigationContextService } from '../../../../services/navigation-context.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class HeaderViewComponent implements OnInit {
|
|
6
7
|
private navController;
|
|
7
8
|
private activatedRoute;
|
|
9
|
+
private navContext;
|
|
8
10
|
novo: boolean;
|
|
9
11
|
loading: boolean;
|
|
10
12
|
progress: number | null;
|
|
@@ -21,7 +23,7 @@ export declare class HeaderViewComponent implements OnInit {
|
|
|
21
23
|
* Rota para voltar, caso não seja definida, o componente irá tentar usar rota do ionic
|
|
22
24
|
*/
|
|
23
25
|
backRouterLink: string | any[] | UrlTree | undefined;
|
|
24
|
-
constructor(navController: NavController, activatedRoute: ActivatedRoute);
|
|
26
|
+
constructor(navController: NavController, activatedRoute: ActivatedRoute, navContext: NavigationContextService);
|
|
25
27
|
ngOnInit(): void;
|
|
26
28
|
protected get DefaultBackRoute(): string;
|
|
27
29
|
IonBackButtonElement: IonBackButton;
|
|
@@ -8,6 +8,7 @@ import { NavController } from "@ionic/angular";
|
|
|
8
8
|
import { HeaderViewComponent } from "./header-view/header-view.component";
|
|
9
9
|
import { TableField } from "../../../classes/inputs/table-field";
|
|
10
10
|
import { CustomInput } from "../../inputs/custom-input";
|
|
11
|
+
import { NavigationContextService } from '../../../services/navigation-context.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
export declare abstract class View<T extends HttpService | HttpServiceAtivo> implements OnInit {
|
|
13
14
|
/** Id do dado a ser carregado */
|
|
@@ -28,6 +29,7 @@ export declare abstract class View<T extends HttpService | HttpServiceAtivo> imp
|
|
|
28
29
|
protected activatedRoute: ActivatedRoute;
|
|
29
30
|
protected elementRef: ElementRef;
|
|
30
31
|
protected fb: FormBuilder;
|
|
32
|
+
protected navContext: NavigationContextService;
|
|
31
33
|
protected nested: boolean;
|
|
32
34
|
constructor();
|
|
33
35
|
/** Lista de TableFields a serem invocados de acordo com sua configuração.
|
package/lib/index.d.ts
CHANGED
|
@@ -114,4 +114,5 @@ export * from '../lib/services/environment.service';
|
|
|
114
114
|
export * from './services/generic.service';
|
|
115
115
|
export * from '../lib/services/usuario.service';
|
|
116
116
|
export * from '../lib/services/utils.service';
|
|
117
|
+
export * from '../lib/services/navigation-context.service';
|
|
117
118
|
export * from '../lib/core.module';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NavigationContextService {
|
|
4
|
+
private router;
|
|
5
|
+
private previousUrl;
|
|
6
|
+
private currentUrl;
|
|
7
|
+
constructor(router: Router);
|
|
8
|
+
private getBaseRoute;
|
|
9
|
+
private getListRoute;
|
|
10
|
+
private getParentRoute;
|
|
11
|
+
getBackRoute(): string | null;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationContextService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationContextService>;
|
|
14
|
+
}
|