valtech-components 2.0.674 → 2.0.676
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/atoms/button/button.component.mjs +2 -2
- package/esm2022/lib/components/molecules/action-card/action-card.component.mjs +2 -2
- package/esm2022/lib/components/molecules/footer-links/footer-links.component.mjs +2 -2
- package/esm2022/lib/components/molecules/glow-card/glow-card.component.mjs +2 -2
- package/esm2022/lib/components/molecules/link/link.component.mjs +2 -2
- package/esm2022/lib/components/organisms/bottom-nav/bottom-nav.component.mjs +2 -2
- package/esm2022/lib/components/templates/page-content/page-content.component.mjs +2 -2
- package/esm2022/lib/components/templates/page-wrapper/page-wrapper.component.mjs +2 -2
- package/esm2022/lib/services/navigation/index.mjs +3 -0
- package/esm2022/lib/services/navigation/navigation.service.mjs +216 -0
- package/esm2022/lib/services/navigation/types.mjs +16 -0
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/valtech-components.mjs +377 -215
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/button/button.component.d.ts +1 -1
- package/lib/components/molecules/link/link.component.d.ts +1 -1
- package/lib/components/templates/page-content/page-content.component.d.ts +1 -1
- package/lib/services/navigation/index.d.ts +2 -0
- package/lib/services/navigation/navigation.service.d.ts +134 -0
- package/lib/services/navigation/types.d.ts +67 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2022/lib/services/navigation.service.mjs +0 -68
- package/lib/services/navigation.service.d.ts +0 -45
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DownloadService } from '../../../services/download.service';
|
|
3
3
|
import { IconService } from '../../../services/icons.service';
|
|
4
|
-
import { NavigationService } from '../../../services/navigation
|
|
4
|
+
import { NavigationService } from '../../../services/navigation';
|
|
5
5
|
import { ButtonMetadata } from '../../types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class ButtonComponent implements OnInit, OnChanges {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { NavigationService } from '../../../services/navigation
|
|
2
|
+
import { NavigationService } from '../../../services/navigation';
|
|
3
3
|
import { LinkMetadata } from './types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class LinkComponent implements OnInit {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { ThemeService } from '../../../services/theme.service';
|
|
3
|
-
import { NavigationService } from '../../../services/navigation
|
|
3
|
+
import { NavigationService } from '../../../services/navigation';
|
|
4
4
|
import { PageContentMetadata } from './types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { Location } from '@angular/common';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { InAppBrowserService } from '../in-app-browser.service';
|
|
4
|
+
import { HeaderConfig, HomeHeaderConfig, CustomHeaderConfig } from './types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* NavigationService
|
|
8
|
+
*
|
|
9
|
+
* Servicio centralizado para navegacion y configuracion de headers.
|
|
10
|
+
* Permite a las paginas declarar su tipo de header de forma simple.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // En una pagina con header de tipo "back"
|
|
14
|
+
* export class ProfilePage {
|
|
15
|
+
* private nav = inject(NavigationService);
|
|
16
|
+
*
|
|
17
|
+
* constructor() {
|
|
18
|
+
* this.nav.setBackHeader('pageTitle', 'Settings.Profile');
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // En el layout principal (tabs.page.ts)
|
|
24
|
+
* export class TabsPage {
|
|
25
|
+
* private nav = inject(NavigationService);
|
|
26
|
+
*
|
|
27
|
+
* headerConfig = this.nav.headerConfig;
|
|
28
|
+
* headerTitle = this.nav.headerTitle;
|
|
29
|
+
* }
|
|
30
|
+
*/
|
|
31
|
+
export declare class NavigationService {
|
|
32
|
+
router: Router;
|
|
33
|
+
location: Location;
|
|
34
|
+
inAppBrowser: InAppBrowserService;
|
|
35
|
+
private i18n;
|
|
36
|
+
private readonly _headerConfig;
|
|
37
|
+
/**
|
|
38
|
+
* Configuracion actual del header (readonly signal)
|
|
39
|
+
*/
|
|
40
|
+
readonly headerConfig: import("@angular/core").Signal<HeaderConfig>;
|
|
41
|
+
/**
|
|
42
|
+
* Titulo del header traducido y reactivo al cambio de idioma.
|
|
43
|
+
* Solo aplica para headers tipo 'back' o 'custom' con titleKey.
|
|
44
|
+
*/
|
|
45
|
+
readonly headerTitle: import("@angular/core").Signal<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Indica si el header actual tiene boton volver
|
|
48
|
+
*/
|
|
49
|
+
readonly hasBackButton: import("@angular/core").Signal<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Arbitrary data to be transferred during navigation.
|
|
52
|
+
* @deprecated Use navigateWithData instead
|
|
53
|
+
*/
|
|
54
|
+
data: any;
|
|
55
|
+
constructor(router: Router, location: Location, inAppBrowser: InAppBrowserService);
|
|
56
|
+
/**
|
|
57
|
+
* Configura un header tipo "back" con titulo traducido.
|
|
58
|
+
*
|
|
59
|
+
* @param key Clave i18n (ej: 'pageTitle')
|
|
60
|
+
* @param namespace Namespace i18n (ej: 'Settings.Profile')
|
|
61
|
+
* @param options Opciones adicionales (backText, withMenu)
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* // Sin menu
|
|
65
|
+
* this.nav.setBackHeader('pageTitle', 'Settings.Profile');
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* // Con menu hamburguesa
|
|
69
|
+
* this.nav.setBackHeader('pageTitle', 'Settings.Profile', { withMenu: true });
|
|
70
|
+
*/
|
|
71
|
+
setBackHeader(key: string, namespace: string, options?: {
|
|
72
|
+
backText?: string;
|
|
73
|
+
withMenu?: boolean;
|
|
74
|
+
}): void;
|
|
75
|
+
/**
|
|
76
|
+
* Configura un header tipo "home" con logo y acciones.
|
|
77
|
+
*
|
|
78
|
+
* @param options Opciones del header home
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* this.nav.setHomeHeader({
|
|
82
|
+
* withMenu: true,
|
|
83
|
+
* actions: [
|
|
84
|
+
* { type: 'ICON', token: 'notifications', position: 'right', description: 'notifications-outline' }
|
|
85
|
+
* ]
|
|
86
|
+
* });
|
|
87
|
+
*/
|
|
88
|
+
setHomeHeader(options?: Partial<Omit<HomeHeaderConfig, 'type'>>): void;
|
|
89
|
+
/**
|
|
90
|
+
* Configura un header personalizado.
|
|
91
|
+
*
|
|
92
|
+
* @param options Opciones del header
|
|
93
|
+
*/
|
|
94
|
+
setCustomHeader(options: Omit<CustomHeaderConfig, 'type'>): void;
|
|
95
|
+
/**
|
|
96
|
+
* Oculta el header completamente.
|
|
97
|
+
*/
|
|
98
|
+
hideHeader(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Resetea el header al estado por defecto (home).
|
|
101
|
+
*/
|
|
102
|
+
resetHeader(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Opens a URL using the in-app browser service.
|
|
105
|
+
* @param url The URL to open
|
|
106
|
+
*/
|
|
107
|
+
navigateInApp(url: string): void;
|
|
108
|
+
/**
|
|
109
|
+
* Navigates to a route and transfers data using Angular Router state.
|
|
110
|
+
* @param route The route to navigate to
|
|
111
|
+
* @param dataTransfer The data to transfer
|
|
112
|
+
*/
|
|
113
|
+
navigateWithData(route: string, dataTransfer: any): void;
|
|
114
|
+
/**
|
|
115
|
+
* Navigates to a URL using Angular Router.
|
|
116
|
+
* @param url The URL to navigate to
|
|
117
|
+
*/
|
|
118
|
+
navigateByUrl(url: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* Opens a URL in a new browser tab.
|
|
121
|
+
* @param url The URL to open
|
|
122
|
+
*/
|
|
123
|
+
openInNewTab(url: string): void;
|
|
124
|
+
/**
|
|
125
|
+
* Navigates back to the previous page in the browser history.
|
|
126
|
+
*/
|
|
127
|
+
back(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Traduce una clave i18n en formato 'namespace.key'
|
|
130
|
+
*/
|
|
131
|
+
private translateKey;
|
|
132
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
133
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
134
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ToolbarAction } from '../../components/types';
|
|
2
|
+
/**
|
|
3
|
+
* Tipos de header soportados por NavigationService
|
|
4
|
+
*/
|
|
5
|
+
export type HeaderType = 'home' | 'back' | 'custom' | 'none';
|
|
6
|
+
/**
|
|
7
|
+
* Configuracion de header para paginas con boton volver
|
|
8
|
+
*/
|
|
9
|
+
export interface BackHeaderConfig {
|
|
10
|
+
type: 'back';
|
|
11
|
+
/** Clave i18n para el titulo (formato: 'namespace.key') */
|
|
12
|
+
titleKey: string;
|
|
13
|
+
/** Texto del boton volver (opcional, usa icono por defecto) */
|
|
14
|
+
backText?: string;
|
|
15
|
+
/** Mostrar menu hamburguesa (opcional, false por defecto) */
|
|
16
|
+
withMenu?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Configuracion de header para pagina principal (home)
|
|
20
|
+
*/
|
|
21
|
+
export interface HomeHeaderConfig {
|
|
22
|
+
type: 'home';
|
|
23
|
+
/** Mostrar menu hamburguesa */
|
|
24
|
+
withMenu?: boolean;
|
|
25
|
+
/** Acciones adicionales en el header */
|
|
26
|
+
actions?: ToolbarAction[];
|
|
27
|
+
/** Logo personalizado (CSS variable o URL) */
|
|
28
|
+
logoSrc?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Configuracion de header personalizado
|
|
32
|
+
*/
|
|
33
|
+
export interface CustomHeaderConfig {
|
|
34
|
+
type: 'custom';
|
|
35
|
+
/** Titulo del header */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** Clave i18n para el titulo */
|
|
38
|
+
titleKey?: string;
|
|
39
|
+
/** Mostrar boton volver */
|
|
40
|
+
withBack?: boolean;
|
|
41
|
+
/** Texto del boton volver */
|
|
42
|
+
backText?: string;
|
|
43
|
+
/** Mostrar acciones */
|
|
44
|
+
withActions?: boolean;
|
|
45
|
+
/** Mostrar menu */
|
|
46
|
+
withMenu?: boolean;
|
|
47
|
+
/** Acciones del header */
|
|
48
|
+
actions?: ToolbarAction[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Sin header
|
|
52
|
+
*/
|
|
53
|
+
export interface NoHeaderConfig {
|
|
54
|
+
type: 'none';
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Union de todos los tipos de configuracion de header
|
|
58
|
+
*/
|
|
59
|
+
export type HeaderConfig = BackHeaderConfig | HomeHeaderConfig | CustomHeaderConfig | NoHeaderConfig;
|
|
60
|
+
/**
|
|
61
|
+
* Configuracion por defecto para header tipo 'home'
|
|
62
|
+
*/
|
|
63
|
+
export declare const DEFAULT_HOME_HEADER: HomeHeaderConfig;
|
|
64
|
+
/**
|
|
65
|
+
* Configuracion por defecto para header tipo 'back'
|
|
66
|
+
*/
|
|
67
|
+
export declare const DEFAULT_BACK_HEADER: BackHeaderConfig;
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -233,7 +233,7 @@ export * from './lib/services/in-app-browser.service';
|
|
|
233
233
|
export * from './lib/services/link-processor.service';
|
|
234
234
|
export * from './lib/services/local-storage.service';
|
|
235
235
|
export * from './lib/services/locale.service';
|
|
236
|
-
export * from './lib/services/navigation
|
|
236
|
+
export * from './lib/services/navigation';
|
|
237
237
|
export * from './lib/services/theme.service';
|
|
238
238
|
export * from './lib/services/toast.service';
|
|
239
239
|
export * from './lib/services/types';
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/router";
|
|
4
|
-
import * as i2 from "@angular/common";
|
|
5
|
-
import * as i3 from "./in-app-browser.service";
|
|
6
|
-
/**
|
|
7
|
-
* Service for navigation and routing within the application.
|
|
8
|
-
* Supports navigation with data transfer, in-app browser, and opening links in new tabs.
|
|
9
|
-
*/
|
|
10
|
-
export class NavigationService {
|
|
11
|
-
constructor(router, location, inAppBrowser) {
|
|
12
|
-
this.router = router;
|
|
13
|
-
this.location = location;
|
|
14
|
-
this.inAppBrowser = inAppBrowser;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Opens a URL using the in-app browser service.
|
|
18
|
-
* @param url The URL to open
|
|
19
|
-
*/
|
|
20
|
-
navigateInApp(url) {
|
|
21
|
-
this.inAppBrowser.openWithInAppBrowser(url);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Navigates to a route and transfers data using Angular Router state.
|
|
25
|
-
* @param route The route to navigate to
|
|
26
|
-
* @param dataTransfer The data to transfer
|
|
27
|
-
*/
|
|
28
|
-
navigateWithData(route, dataTransfer) {
|
|
29
|
-
const navigationExtras = {
|
|
30
|
-
state: {
|
|
31
|
-
data: dataTransfer,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
this.router.navigate([route], navigationExtras);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Navigates to a URL using Angular Router.
|
|
38
|
-
* @param url The URL to navigate to
|
|
39
|
-
*/
|
|
40
|
-
navigateByUrl(url) {
|
|
41
|
-
this.router
|
|
42
|
-
.navigateByUrl(url)
|
|
43
|
-
.then(response => { })
|
|
44
|
-
.catch(error => { });
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Opens a URL in a new browser tab.
|
|
48
|
-
* @param url The URL to open
|
|
49
|
-
*/
|
|
50
|
-
openInNewTab(url) {
|
|
51
|
-
window.open(url, '_blank', 'noopener,noreferrer');
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Navigates back to the previous page in the browser history.
|
|
55
|
-
*/
|
|
56
|
-
back() {
|
|
57
|
-
this.location.back();
|
|
58
|
-
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, deps: [{ token: i1.Router }, { token: i2.Location }, { token: i3.InAppBrowserService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
60
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, providedIn: 'root' }); }
|
|
61
|
-
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, decorators: [{
|
|
63
|
-
type: Injectable,
|
|
64
|
-
args: [{
|
|
65
|
-
providedIn: 'root',
|
|
66
|
-
}]
|
|
67
|
-
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.Location }, { type: i3.InAppBrowserService }] });
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2aWdhdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9zZXJ2aWNlcy9uYXZpZ2F0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7Ozs7QUFJM0M7OztHQUdHO0FBSUgsTUFBTSxPQUFPLGlCQUFpQjtJQU01QixZQUNTLE1BQWMsRUFDZCxRQUFrQixFQUNsQ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XG4gICAqIE9wZW5zIGEgVVJMIGluIGEgbmV3IGJyb3dzZXIgdGFiLlxuICAgKiBAcGFyYW0gdXJsIFRoZSBVUkwgdG8gb3BlblxuICAgKi9cbiAgb3BlbkluTmV3VGFiKHVybDogc3RyaW5nKTogdm9pZCB7XG4gICAgd2luZG93Lm9wZW4odXJsLCAnX2JsYW5rJywgJ25vb3BlbmVyLG5vcmVmZXJyZXInKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBOYXZpZ2F0ZXMgYmFjayB0byB0aGUgcHJldmlvdXMgcGFnZSBpbiB0aGUgYnJvd3NlciBoaXN0b3J5LlxuICAgKi9cbiAgYmFjaygpOiB2b2lkIHtcbiAgICB0aGlzLmxvY2F0aW9uLmJhY2soKTtcbiAgfVxufVxuIl19
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Location } from '@angular/common';
|
|
2
|
-
import { Router } from '@angular/router';
|
|
3
|
-
import { InAppBrowserService } from './in-app-browser.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Service for navigation and routing within the application.
|
|
7
|
-
* Supports navigation with data transfer, in-app browser, and opening links in new tabs.
|
|
8
|
-
*/
|
|
9
|
-
export declare class NavigationService {
|
|
10
|
-
router: Router;
|
|
11
|
-
location: Location;
|
|
12
|
-
inAppBrowser: InAppBrowserService;
|
|
13
|
-
/**
|
|
14
|
-
* Arbitrary data to be transferred during navigation.
|
|
15
|
-
*/
|
|
16
|
-
data: any;
|
|
17
|
-
constructor(router: Router, location: Location, inAppBrowser: InAppBrowserService);
|
|
18
|
-
/**
|
|
19
|
-
* Opens a URL using the in-app browser service.
|
|
20
|
-
* @param url The URL to open
|
|
21
|
-
*/
|
|
22
|
-
navigateInApp(url: string): void;
|
|
23
|
-
/**
|
|
24
|
-
* Navigates to a route and transfers data using Angular Router state.
|
|
25
|
-
* @param route The route to navigate to
|
|
26
|
-
* @param dataTransfer The data to transfer
|
|
27
|
-
*/
|
|
28
|
-
navigateWithData(route: string, dataTransfer: any): void;
|
|
29
|
-
/**
|
|
30
|
-
* Navigates to a URL using Angular Router.
|
|
31
|
-
* @param url The URL to navigate to
|
|
32
|
-
*/
|
|
33
|
-
navigateByUrl(url: string): void;
|
|
34
|
-
/**
|
|
35
|
-
* Opens a URL in a new browser tab.
|
|
36
|
-
* @param url The URL to open
|
|
37
|
-
*/
|
|
38
|
-
openInNewTab(url: string): void;
|
|
39
|
-
/**
|
|
40
|
-
* Navigates back to the previous page in the browser history.
|
|
41
|
-
*/
|
|
42
|
-
back(): void;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
44
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
45
|
-
}
|