@c80/ui 1.0.63 → 1.1.2
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/README.md +1 -1
- package/esm2022/index.js +3 -0
- package/esm2022/index.js.map +1 -1
- package/esm2022/lib/header/header.component.js +4 -3
- package/esm2022/lib/header/header.component.js.map +1 -1
- package/esm2022/lib/icon/icon.definitions.js +3 -0
- package/esm2022/lib/icon/icon.definitions.js.map +1 -1
- package/esm2022/lib/icon/theme.service.js +19 -4
- package/esm2022/lib/icon/theme.service.js.map +1 -1
- package/esm2022/lib/info-message/index.js +3 -0
- package/esm2022/lib/info-message/index.js.map +1 -0
- package/esm2022/lib/info-message/info-message.component.js +25 -0
- package/esm2022/lib/info-message/info-message.component.js.map +1 -0
- package/esm2022/lib/info-message/info-message.types.js +2 -0
- package/esm2022/lib/info-message/info-message.types.js.map +1 -0
- package/esm2022/lib/legal-disclaimer/index.js +2 -0
- package/esm2022/lib/legal-disclaimer/index.js.map +1 -0
- package/esm2022/lib/legal-disclaimer/legal-disclaimer.component.js +21 -0
- package/esm2022/lib/legal-disclaimer/legal-disclaimer.component.js.map +1 -0
- package/esm2022/lib/modal/modal.component.js +9 -2
- package/esm2022/lib/modal/modal.component.js.map +1 -1
- package/esm2022/lib/modal/modal.service.js +17 -5
- package/esm2022/lib/modal/modal.service.js.map +1 -1
- package/esm2022/lib/modal/modal.types.js.map +1 -1
- package/esm2022/lib/navigation-card/index.js +3 -0
- package/esm2022/lib/navigation-card/index.js.map +1 -0
- package/esm2022/lib/navigation-card/navigation-card.component.js +18 -0
- package/esm2022/lib/navigation-card/navigation-card.component.js.map +1 -0
- package/esm2022/lib/navigation-card/navigation-card.types.js +2 -0
- package/esm2022/lib/navigation-card/navigation-card.types.js.map +1 -0
- package/esm2022/lib/table/table-dto-mapper.service.js +29 -32
- package/esm2022/lib/table/table-dto-mapper.service.js.map +1 -1
- package/esm2022/lib/table/table-selection.service.js +16 -16
- package/esm2022/lib/table/table-selection.service.js.map +1 -1
- package/esm2022/lib/table/table.component.js +22 -6
- package/esm2022/lib/table/table.component.js.map +1 -1
- package/esm2022/lib/table/table.utils.js +4 -3
- package/esm2022/lib/table/table.utils.js.map +1 -1
- package/index.d.ts +3 -0
- package/lib/header/header.component.d.ts +2 -1
- package/lib/icon/theme.service.d.ts +34 -0
- package/lib/info-message/index.d.ts +2 -0
- package/lib/info-message/info-message.component.d.ts +17 -0
- package/lib/info-message/info-message.types.d.ts +5 -0
- package/lib/legal-disclaimer/index.d.ts +1 -0
- package/lib/legal-disclaimer/legal-disclaimer.component.d.ts +15 -0
- package/lib/modal/modal.component.d.ts +5 -0
- package/lib/modal/modal.service.d.ts +11 -2
- package/lib/modal/modal.types.d.ts +1 -0
- package/lib/navigation-card/index.d.ts +2 -0
- package/lib/navigation-card/navigation-card.component.d.ts +10 -0
- package/lib/navigation-card/navigation-card.types.d.ts +7 -0
- package/lib/table/table-dto-mapper.service.d.ts +12 -5
- package/lib/table/table-selection.service.d.ts +1 -1
- package/lib/table/table.component.d.ts +2 -1
- package/lib/table/table.utils.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,8 +1,42 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/** Clave de almacenamiento donde se persiste la preferencia de tema. */
|
|
4
|
+
export declare const THEME_STORAGE_KEY = "theme";
|
|
5
|
+
/**
|
|
6
|
+
* Contrato mínimo de almacenamiento que necesita ThemeService.
|
|
7
|
+
* Permite a las apps consumidoras inyectar su propio backend
|
|
8
|
+
* (por ejemplo, un StorageService propio) sin acoplar la librería a localStorage.
|
|
9
|
+
*/
|
|
10
|
+
export interface ThemeStorage {
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param key
|
|
14
|
+
* @returns Valor almacenado o null si no existe
|
|
15
|
+
*/
|
|
16
|
+
get(key: string): string | null;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param key
|
|
20
|
+
* @param value
|
|
21
|
+
*/
|
|
22
|
+
set(key: string, value: string): void;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param key
|
|
26
|
+
* @returns true si hay un valor almacenado para la clave
|
|
27
|
+
*/
|
|
28
|
+
has(key: string): boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Token del almacenamiento usado por ThemeService.
|
|
32
|
+
* El default reproduce el comportamiento histórico respaldado por localStorage.
|
|
33
|
+
*/
|
|
34
|
+
export declare const THEME_STORAGE: InjectionToken<ThemeStorage>;
|
|
2
35
|
/**
|
|
3
36
|
*
|
|
4
37
|
*/
|
|
5
38
|
export declare class ThemeService {
|
|
39
|
+
private readonly storage;
|
|
6
40
|
readonly isDark: import("@angular/core").WritableSignal<boolean>;
|
|
7
41
|
/**
|
|
8
42
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InfoNotificationLevel, InfoMessageLink } from './info-message.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Componente reutilizable para mostrar mensajes informativos o de advertencia
|
|
5
|
+
*/
|
|
6
|
+
export declare class InfoMessageComponent {
|
|
7
|
+
message: import("@angular/core").InputSignal<string>;
|
|
8
|
+
level: import("@angular/core").InputSignal<InfoNotificationLevel>;
|
|
9
|
+
linkConfig: import("@angular/core").InputSignal<InfoMessageLink | undefined>;
|
|
10
|
+
/**
|
|
11
|
+
* Retorna el ícono según el nivel
|
|
12
|
+
* @returns Nombre del ícono a mostrar
|
|
13
|
+
*/
|
|
14
|
+
protected get icon(): string;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InfoMessageComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfoMessageComponent, "c80-info-message", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; "linkConfig": { "alias": "linkConfig"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './legal-disclaimer.component';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Texto legal genérico por defecto.
|
|
4
|
+
* Neutro y sin dominio específico; las apps deben pasar su propio texto vía el input `text`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_LEGAL_DISCLAIMER = "La informaci\u00F3n mostrada se proporciona \u00FAnicamente con fines orientativos y puede no estar actualizada. El uso de esta aplicaci\u00F3n es responsabilidad exclusiva del usuario.";
|
|
7
|
+
/**
|
|
8
|
+
* Componente reutilizable para mostrar avisos legales.
|
|
9
|
+
* Por defecto muestra un texto genérico, personalizable mediante el input `text`.
|
|
10
|
+
*/
|
|
11
|
+
export declare class LegalDisclaimerComponent {
|
|
12
|
+
readonly text: import("@angular/core").InputSignal<string>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegalDisclaimerComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LegalDisclaimerComponent, "c80-legal-disclaimer", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -76,6 +76,11 @@ export declare class ModalComponent {
|
|
|
76
76
|
* @returns Texto del botón No
|
|
77
77
|
*/
|
|
78
78
|
getNoText(): string;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @returns Texto del botón OK
|
|
82
|
+
*/
|
|
83
|
+
getOkText(): string;
|
|
79
84
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
80
85
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "c80-modal", never, {}, {}, never, never, true, never>;
|
|
81
86
|
}
|
|
@@ -23,6 +23,7 @@ export declare class ModalService {
|
|
|
23
23
|
* @param options.message
|
|
24
24
|
* @param options.confirmText
|
|
25
25
|
* @param options.cancelText
|
|
26
|
+
* @param options.allowHtml
|
|
26
27
|
* @returns Promise que resuelve true si se confirmó
|
|
27
28
|
*/
|
|
28
29
|
confirm(options: {
|
|
@@ -30,6 +31,7 @@ export declare class ModalService {
|
|
|
30
31
|
message: string;
|
|
31
32
|
confirmText?: string;
|
|
32
33
|
cancelText?: string;
|
|
34
|
+
allowHtml?: boolean;
|
|
33
35
|
}): Promise<boolean>;
|
|
34
36
|
/**
|
|
35
37
|
*
|
|
@@ -38,6 +40,7 @@ export declare class ModalService {
|
|
|
38
40
|
* @param options.message
|
|
39
41
|
* @param options.yesText
|
|
40
42
|
* @param options.noText
|
|
43
|
+
* @param options.allowHtml
|
|
41
44
|
* @returns Promise que resuelve true si se eligió Sí
|
|
42
45
|
*/
|
|
43
46
|
yesNo(options: {
|
|
@@ -45,14 +48,17 @@ export declare class ModalService {
|
|
|
45
48
|
message: string;
|
|
46
49
|
yesText?: string;
|
|
47
50
|
noText?: string;
|
|
51
|
+
allowHtml?: boolean;
|
|
48
52
|
}): Promise<boolean>;
|
|
49
53
|
/**
|
|
50
54
|
*
|
|
51
55
|
* @param title
|
|
52
56
|
* @param message
|
|
57
|
+
* @param allowHtml
|
|
58
|
+
* @param confirmText
|
|
53
59
|
* @returns Promise que resuelve cuando se cierra el modal
|
|
54
60
|
*/
|
|
55
|
-
info(title: string, message: string): Promise<void>;
|
|
61
|
+
info(title: string, message: string, allowHtml?: boolean, confirmText?: string): Promise<void>;
|
|
56
62
|
/**
|
|
57
63
|
*
|
|
58
64
|
* @param options
|
|
@@ -60,6 +66,7 @@ export declare class ModalService {
|
|
|
60
66
|
* @param options.message
|
|
61
67
|
* @param options.confirmText
|
|
62
68
|
* @param options.cancelText
|
|
69
|
+
* @param options.allowHtml
|
|
63
70
|
* @returns Promise que resuelve true si se confirmó
|
|
64
71
|
*/
|
|
65
72
|
warning(options: {
|
|
@@ -67,15 +74,17 @@ export declare class ModalService {
|
|
|
67
74
|
message: string;
|
|
68
75
|
confirmText?: string;
|
|
69
76
|
cancelText?: string;
|
|
77
|
+
allowHtml?: boolean;
|
|
70
78
|
}): Promise<boolean>;
|
|
71
79
|
/**
|
|
72
80
|
*
|
|
73
81
|
* @param title
|
|
74
82
|
* @param message
|
|
75
83
|
* @param confirmText
|
|
84
|
+
* @param allowHtml
|
|
76
85
|
* @returns Promise que resuelve true si se confirmó
|
|
77
86
|
*/
|
|
78
|
-
error(title: string, message: string, confirmText?: string): Promise<void>;
|
|
87
|
+
error(title: string, message: string, confirmText?: string, allowHtml?: boolean): Promise<void>;
|
|
79
88
|
/**
|
|
80
89
|
* Maneja el resultado del modal y resuelve la promesa
|
|
81
90
|
* @param result - Resultado de la acción del modal
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NavigationCard } from './navigation-card.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NavigationCardComponent {
|
|
4
|
+
readonly card: import("@angular/core").InputSignal<NavigationCard>;
|
|
5
|
+
readonly active: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
readonly cardClick: import("@angular/core").OutputEmitterRef<NavigationCard>;
|
|
7
|
+
onCardClick(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationCardComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationCardComponent, "c80-navigation-card", never, { "card": { "alias": "card"; "required": true; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; }, { "cardClick": "cardClick"; }, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -7,9 +7,15 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* Reglas de exclusión:
|
|
8
8
|
* - readOnly: true → campo NO se incluye
|
|
9
9
|
* - accessor: 'id' → campo NO se incluye (IDs van en URL, no en body)
|
|
10
|
+
* - undefined / null → campo NO se incluye (no hubo cambio)
|
|
11
|
+
* - '' (cadena vacía) → se envía null para LIMPIAR el campo
|
|
10
12
|
* - readOnly: false o undefined → campo se incluye
|
|
13
|
+
*
|
|
14
|
+
* La conversión de tipos delega en TableDataConverterService (que acepta
|
|
15
|
+
* strings, tal como llegan desde los inputs HTML).
|
|
11
16
|
*/
|
|
12
17
|
export declare class TableDtoMapperService {
|
|
18
|
+
private readonly converter;
|
|
13
19
|
/**
|
|
14
20
|
* Mapea un objeto de fila a DTO, excluyendo campos readOnly e id
|
|
15
21
|
* @param row - Datos de la fila
|
|
@@ -19,16 +25,17 @@ export declare class TableDtoMapperService {
|
|
|
19
25
|
*/
|
|
20
26
|
mapToDto(row: Record<string, unknown>, columns: TableColDef[], additionalFields?: Record<string, unknown>): Record<string, unknown>;
|
|
21
27
|
/**
|
|
22
|
-
* Convierte un valor según el tipo de columna
|
|
28
|
+
* Convierte un valor según el tipo de columna, reutilizando
|
|
29
|
+
* TableDataConverterService (acepta strings provenientes de inputs HTML).
|
|
23
30
|
* @param value - Valor a convertir
|
|
24
31
|
* @param col - Definición de columna
|
|
25
32
|
* @returns Valor convertido
|
|
26
33
|
*/
|
|
27
34
|
private convertValue;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
private
|
|
35
|
+
/**
|
|
36
|
+
* Aplica los límites min/max declarados en la columna a un valor numérico.
|
|
37
|
+
*/
|
|
38
|
+
private applyBounds;
|
|
32
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableDtoMapperService, never>;
|
|
33
40
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableDtoMapperService>;
|
|
34
41
|
}
|
|
@@ -25,7 +25,7 @@ export declare class TableSelectionService {
|
|
|
25
25
|
* Inicializa el estado de selección para una nueva tabla
|
|
26
26
|
* @returns Objeto con signals y métodos de selección
|
|
27
27
|
*/
|
|
28
|
-
createSelectionState<T extends Record<string, unknown>>(): SelectionState<T>;
|
|
28
|
+
createSelectionState<T extends Record<string, unknown>>(getRowId?: (item: T) => string): SelectionState<T>;
|
|
29
29
|
private clearSelection;
|
|
30
30
|
private toggleSelectAll;
|
|
31
31
|
private toggleItemSelection;
|
|
@@ -139,6 +139,7 @@ import * as i0 from "@angular/core";
|
|
|
139
139
|
readonly customActions: import("@angular/core").InputSignal<CustomTableAction[]>;
|
|
140
140
|
readonly size: import("@angular/core").InputSignal<number>;
|
|
141
141
|
readonly multiple: import("@angular/core").InputSignal<boolean>;
|
|
142
|
+
readonly rowId: import("@angular/core").InputSignal<string>;
|
|
142
143
|
readonly searchable: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>;
|
|
143
144
|
readonly allowSelection: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>;
|
|
144
145
|
readonly noConfirm: import("@angular/core").InputSignalWithTransform<boolean, string | boolean>;
|
|
@@ -276,5 +277,5 @@ import * as i0 from "@angular/core";
|
|
|
276
277
|
*/
|
|
277
278
|
getActionColor(action: CustomTableAction): string | undefined;
|
|
278
279
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
279
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "c80-table", never, { "data$": { "alias": "data$"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "inputValues$": { "alias": "inputValues$"; "required": false; "isSignal": true; }; "customActions": { "alias": "customActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "allowSelection": { "alias": "allowSelection"; "required": false; "isSignal": true; }; "noConfirm": { "alias": "noConfirm"; "required": false; "isSignal": true; }; "paginated": { "alias": "paginated"; "required": false; "isSignal": true; }; "paginationConfig": { "alias": "paginationConfig"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; "searchTerm": "searchTerm"; "errorEvent": "errorEvent"; "selectable": "selectable"; "paginationChange": "paginationChange"; }, never, never, true, never>;
|
|
280
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "c80-table", never, { "data$": { "alias": "data$"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "inputValues$": { "alias": "inputValues$"; "required": false; "isSignal": true; }; "customActions": { "alias": "customActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "rowId": { "alias": "rowId"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "allowSelection": { "alias": "allowSelection"; "required": false; "isSignal": true; }; "noConfirm": { "alias": "noConfirm"; "required": false; "isSignal": true; }; "paginated": { "alias": "paginated"; "required": false; "isSignal": true; }; "paginationConfig": { "alias": "paginationConfig"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; "searchTerm": "searchTerm"; "errorEvent": "errorEvent"; "selectable": "selectable"; "paginationChange": "paginationChange"; }, never, never, true, never>;
|
|
280
281
|
}
|
|
@@ -25,9 +25,10 @@ export declare function getInputValue(event: Event, col?: TableColDef): unknown;
|
|
|
25
25
|
* Extrae el ID de una fila para usar como trackBy en ngFor
|
|
26
26
|
* @param index - Índice de la fila
|
|
27
27
|
* @param row - Fila de datos
|
|
28
|
+
* @param rowId - Accessor de la PK de la fila (default 'id')
|
|
28
29
|
* @returns ID como string o índice como fallback
|
|
29
30
|
*/
|
|
30
|
-
export declare function trackById<T extends Record<string, unknown>>(index: number, row: T): string | number;
|
|
31
|
+
export declare function trackById<T extends Record<string, unknown>>(index: number, row: T, rowId?: string): string | number;
|
|
31
32
|
/**
|
|
32
33
|
* Verifica si una acción debe mostrarse para una fila específica
|
|
33
34
|
* CREATE se excluye porque se maneja con el botón "+" en el header
|