@c80/ui 1.0.57 → 1.0.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/index.js +13 -8
- package/esm2022/index.js.map +1 -1
- package/esm2022/lib/action-list/action-list.component.js +7 -0
- package/esm2022/lib/action-list/action-list.component.js.map +1 -1
- package/esm2022/lib/action-list/action-list.types.js.map +1 -1
- package/esm2022/lib/card-level/card-level.component.js +4 -3
- package/esm2022/lib/card-level/card-level.component.js.map +1 -1
- package/esm2022/lib/card-level/card-level.interface.js.map +1 -1
- package/esm2022/lib/card-level/index.js.map +1 -1
- package/esm2022/lib/error-notification/error-notification.component.js +41 -0
- package/esm2022/lib/error-notification/error-notification.component.js.map +1 -0
- package/esm2022/lib/error-notification/error-notification.types.js +2 -0
- package/esm2022/lib/error-notification/error-notification.types.js.map +1 -0
- package/esm2022/lib/error-notification/index.js +3 -0
- package/esm2022/lib/error-notification/index.js.map +1 -0
- package/esm2022/lib/header/header.component.js +8 -2
- package/esm2022/lib/header/header.component.js.map +1 -1
- package/esm2022/lib/header/header.types.js.map +1 -1
- package/esm2022/lib/icon/icon.component.js +11 -5
- package/esm2022/lib/icon/icon.component.js.map +1 -1
- package/esm2022/lib/icon/icon.definitions.js +108 -2
- package/esm2022/lib/icon/icon.definitions.js.map +1 -1
- package/esm2022/lib/icon/icon.types.js.map +1 -1
- package/esm2022/lib/icon/icon.utils.js +7 -0
- package/esm2022/lib/icon/icon.utils.js.map +1 -1
- package/esm2022/lib/icon/theme.service.js +20 -0
- package/esm2022/lib/icon/theme.service.js.map +1 -1
- package/esm2022/lib/info-list/info-list.component.js +3 -0
- package/esm2022/lib/info-list/info-list.component.js.map +1 -1
- package/esm2022/lib/input-field/input-field.component.js +19 -2
- package/esm2022/lib/input-field/input-field.component.js.map +1 -1
- package/esm2022/lib/input-search/c80-input-search.component.js +26 -0
- package/esm2022/lib/input-search/c80-input-search.component.js.map +1 -0
- package/esm2022/lib/input-search/index.js +2 -0
- package/esm2022/lib/input-search/index.js.map +1 -0
- package/esm2022/lib/modal/index.js.map +1 -1
- package/esm2022/lib/modal/modal.component.js +59 -2
- package/esm2022/lib/modal/modal.component.js.map +1 -1
- package/esm2022/lib/modal/modal.service.js +60 -3
- package/esm2022/lib/modal/modal.service.js.map +1 -1
- package/esm2022/lib/modal/modal.types.js +2 -0
- package/esm2022/lib/modal/modal.types.js.map +1 -0
- package/esm2022/lib/profile-stats/profile-stats.component.js +6 -2
- package/esm2022/lib/profile-stats/profile-stats.component.js.map +1 -1
- package/esm2022/lib/profile-stats/profile-stats.types.js.map +1 -1
- package/esm2022/lib/rating-display/index.js +2 -0
- package/esm2022/lib/rating-display/index.js.map +1 -0
- package/esm2022/lib/rating-display/rating-display.component.js +24 -0
- package/esm2022/lib/rating-display/rating-display.component.js.map +1 -0
- package/esm2022/lib/rating-stars/index.js +2 -0
- package/esm2022/lib/rating-stars/index.js.map +1 -0
- package/esm2022/lib/rating-stars/rating-stars.component.js +33 -0
- package/esm2022/lib/rating-stars/rating-stars.component.js.map +1 -0
- package/esm2022/lib/select/index.js +1 -1
- package/esm2022/lib/select/index.js.map +1 -1
- package/esm2022/lib/select/select.component.js +31 -1
- package/esm2022/lib/select/select.component.js.map +1 -1
- package/esm2022/lib/select/select.types.js +2 -0
- package/esm2022/lib/select/select.types.js.map +1 -0
- package/esm2022/lib/snackbar/index.js.map +1 -1
- package/esm2022/lib/snackbar/snackbar.component.js +19 -2
- package/esm2022/lib/snackbar/snackbar.component.js.map +1 -1
- package/esm2022/lib/snackbar/snackbar.service.js +9 -0
- package/esm2022/lib/snackbar/snackbar.service.js.map +1 -1
- package/esm2022/lib/snackbar/snackbar.types.js +2 -0
- package/esm2022/lib/snackbar/{snackbar.model.js.map → snackbar.types.js.map} +1 -1
- package/esm2022/lib/spinner/index.js +2 -0
- package/esm2022/lib/spinner/index.js.map +1 -0
- package/esm2022/lib/spinner/spinner.component.js +22 -0
- package/esm2022/lib/spinner/spinner.component.js.map +1 -0
- package/esm2022/lib/stat-card/index.js.map +1 -1
- package/esm2022/lib/stat-card/stat-card.component.js +3 -0
- package/esm2022/lib/stat-card/stat-card.component.js.map +1 -1
- package/esm2022/lib/stat-card/stat-card.types.js +2 -0
- package/esm2022/lib/stat-card/stat-card.types.js.map +1 -0
- package/esm2022/lib/tab/c80-tab.component.js +19 -2
- package/esm2022/lib/tab/c80-tab.component.js.map +1 -1
- package/esm2022/lib/tab/c80-tab.types.js +2 -0
- package/esm2022/lib/tab/c80-tab.types.js.map +1 -0
- package/esm2022/lib/tab/directives/c80-tab-item.directive.js +3 -0
- package/esm2022/lib/tab/directives/c80-tab-item.directive.js.map +1 -1
- package/esm2022/lib/tab/directives/c80-tab-label.directive.js +3 -0
- package/esm2022/lib/tab/directives/c80-tab-label.directive.js.map +1 -1
- package/esm2022/lib/tab/index.js.map +1 -1
- package/esm2022/lib/table/index.js +2 -0
- package/esm2022/lib/table/index.js.map +1 -1
- package/esm2022/lib/table/table-column-visibility.service.js +27 -34
- package/esm2022/lib/table/table-column-visibility.service.js.map +1 -1
- package/esm2022/lib/table/table-crud-state.service.js +7 -7
- package/esm2022/lib/table/table-crud-state.service.js.map +1 -1
- package/esm2022/lib/table/table-data-converter.service.js +18 -10
- package/esm2022/lib/table/table-data-converter.service.js.map +1 -1
- package/esm2022/lib/table/table-data-utils.service.js +18 -4
- package/esm2022/lib/table/table-data-utils.service.js.map +1 -1
- package/esm2022/lib/table/table-dto-mapper.service.js +98 -0
- package/esm2022/lib/table/table-dto-mapper.service.js.map +1 -0
- package/esm2022/lib/table/table-pagination.service.js +79 -0
- package/esm2022/lib/table/table-pagination.service.js.map +1 -0
- package/esm2022/lib/table/table-selection.service.js +14 -3
- package/esm2022/lib/table/table-selection.service.js.map +1 -1
- package/esm2022/lib/table/table.component.js +124 -22
- package/esm2022/lib/table/table.component.js.map +1 -1
- package/esm2022/lib/table/table.types.js.map +1 -1
- package/esm2022/lib/table/table.utils.js +10 -2
- package/esm2022/lib/table/table.utils.js.map +1 -1
- package/index.d.ts +13 -8
- package/lib/action-list/action-list.component.d.ts +7 -0
- package/lib/action-list/action-list.types.d.ts +2 -1
- package/lib/card-level/card-level.component.d.ts +4 -1
- package/lib/error-notification/error-notification.component.d.ts +20 -0
- package/lib/error-notification/error-notification.types.d.ts +4 -0
- package/lib/error-notification/index.d.ts +2 -0
- package/lib/header/header.component.d.ts +7 -1
- package/lib/header/header.types.d.ts +2 -0
- package/lib/icon/icon.component.d.ts +8 -0
- package/lib/icon/icon.types.d.ts +2 -0
- package/lib/icon/icon.utils.d.ts +7 -0
- package/lib/icon/theme.service.d.ts +17 -0
- package/lib/info-list/info-list.component.d.ts +3 -0
- package/lib/input-field/input-field.component.d.ts +17 -0
- package/lib/input-search/c80-input-search.component.d.ts +16 -0
- package/lib/input-search/index.d.ts +1 -0
- package/lib/modal/index.d.ts +1 -0
- package/lib/modal/modal.component.d.ts +58 -16
- package/lib/modal/modal.service.d.ts +73 -4
- package/lib/modal/modal.types.d.ts +15 -0
- package/lib/profile-stats/profile-stats.component.d.ts +4 -0
- package/lib/profile-stats/profile-stats.types.d.ts +6 -2
- package/lib/rating-display/index.d.ts +1 -0
- package/lib/rating-display/rating-display.component.d.ts +12 -0
- package/lib/rating-stars/index.d.ts +1 -0
- package/lib/rating-stars/rating-stars.component.d.ts +19 -0
- package/lib/select/index.d.ts +1 -1
- package/lib/select/select.component.d.ts +29 -1
- package/lib/snackbar/index.d.ts +1 -1
- package/lib/snackbar/snackbar.component.d.ts +18 -1
- package/lib/snackbar/snackbar.service.d.ts +10 -1
- package/lib/spinner/index.d.ts +1 -0
- package/lib/spinner/spinner.component.d.ts +12 -0
- package/lib/stat-card/index.d.ts +1 -0
- package/lib/stat-card/stat-card.component.d.ts +4 -7
- package/lib/stat-card/stat-card.types.d.ts +7 -0
- package/lib/tab/c80-tab.component.d.ts +17 -0
- package/lib/tab/directives/c80-tab-item.directive.d.ts +3 -0
- package/lib/tab/directives/c80-tab-label.directive.d.ts +3 -0
- package/lib/tab/index.d.ts +1 -1
- package/lib/table/index.d.ts +2 -0
- package/lib/table/table-column-visibility.service.d.ts +19 -6
- package/lib/table/table-crud-state.service.d.ts +23 -13
- package/lib/table/table-data-converter.service.d.ts +2 -0
- package/lib/table/table-data-utils.service.d.ts +7 -0
- package/lib/table/table-dto-mapper.service.d.ts +34 -0
- package/lib/table/table-pagination.service.d.ts +41 -0
- package/lib/table/table-selection.service.d.ts +14 -12
- package/lib/table/table.component.d.ts +27 -3
- package/lib/table/table.types.d.ts +17 -1
- package/lib/table/table.utils.d.ts +4 -1
- package/package.json +1 -1
- package/esm2022/lib/select/select.model.js +0 -2
- package/esm2022/lib/select/select.model.js.map +0 -1
- package/esm2022/lib/snackbar/snackbar.model.js +0 -2
- package/esm2022/lib/tab/c80-tab.model.js +0 -2
- package/esm2022/lib/tab/c80-tab.model.js.map +0 -1
- /package/lib/select/{select.model.d.ts → select.types.d.ts} +0 -0
- /package/lib/snackbar/{snackbar.model.d.ts → snackbar.types.d.ts} +0 -0
- /package/lib/tab/{c80-tab.model.d.ts → c80-tab.types.d.ts} +0 -0
|
@@ -1,38 +1,80 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
message: string;
|
|
6
|
-
type?: ModalType;
|
|
7
|
-
confirmText?: string;
|
|
8
|
-
cancelText?: string;
|
|
9
|
-
yesText?: string;
|
|
10
|
-
noText?: string;
|
|
11
|
-
showCancel?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface ModalResult {
|
|
14
|
-
action: 'confirm' | 'cancel' | 'yes' | 'no';
|
|
15
|
-
confirmed: boolean;
|
|
16
|
-
}
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
17
5
|
export declare class ModalComponent {
|
|
18
6
|
private readonly modalService;
|
|
19
7
|
readonly isOpen: import("@angular/core").Signal<boolean>;
|
|
20
|
-
readonly config: import("@angular/core").Signal<ModalConfig>;
|
|
8
|
+
readonly config: import("@angular/core").Signal<import("@c80/ui").ModalConfig>;
|
|
21
9
|
readonly isVisible: import("@angular/core").Signal<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
22
13
|
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Maneja la confirmación del modal
|
|
16
|
+
*/
|
|
23
17
|
onConfirm(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Maneja la cancelación del modal
|
|
20
|
+
*/
|
|
24
21
|
onCancel(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Maneja la respuesta afirmativa del modal
|
|
24
|
+
*/
|
|
25
25
|
onYes(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Maneja la respuesta negativa del modal
|
|
28
|
+
*/
|
|
26
29
|
onNo(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Cierra el modal actual
|
|
32
|
+
*/
|
|
27
33
|
closeModal(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Maneja el clic en el backdrop del modal
|
|
36
|
+
* @param event - Evento de clic
|
|
37
|
+
*/
|
|
28
38
|
onBackdropClick(event: Event): void;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @returns Clase CSS del botón primario según el tipo de modal
|
|
42
|
+
*/
|
|
29
43
|
getPrimaryButtonClass(): string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @returns true si debe mostrar botones Sí/No
|
|
47
|
+
*/
|
|
30
48
|
showYesNoButtons(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @returns true si debe mostrar botones Confirmar/Cancelar
|
|
52
|
+
*/
|
|
31
53
|
showConfirmButtons(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @returns true si debe mostrar botón OK
|
|
57
|
+
*/
|
|
32
58
|
showOkButton(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @returns Texto del botón de confirmación
|
|
62
|
+
*/
|
|
33
63
|
getConfirmText(): string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @returns Texto del botón de cancelar
|
|
67
|
+
*/
|
|
34
68
|
getCancelText(): string;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @returns Texto del botón Sí
|
|
72
|
+
*/
|
|
35
73
|
getYesText(): string;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @returns Texto del botón No
|
|
77
|
+
*/
|
|
36
78
|
getNoText(): string;
|
|
37
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
|
|
38
80
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "c80-modal", never, {}, {}, never, never, true, never>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { ModalConfig, ModalResult } from './modal.
|
|
1
|
+
import type { ModalConfig, ModalResult } from './modal.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
3
6
|
export declare class ModalService {
|
|
4
7
|
private readonly isOpen;
|
|
5
8
|
private readonly config;
|
|
@@ -8,13 +11,79 @@ export declare class ModalService {
|
|
|
8
11
|
isOpen: import("@angular/core").Signal<boolean>;
|
|
9
12
|
config: import("@angular/core").Signal<ModalConfig>;
|
|
10
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param config
|
|
17
|
+
*/
|
|
11
18
|
showModal(config: ModalConfig): Promise<ModalResult>;
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param options
|
|
22
|
+
* @param options.title
|
|
23
|
+
* @param options.message
|
|
24
|
+
* @param options.confirmText
|
|
25
|
+
* @param options.cancelText
|
|
26
|
+
* @returns Promise que resuelve true si se confirmó
|
|
27
|
+
*/
|
|
28
|
+
confirm(options: {
|
|
29
|
+
title: string;
|
|
30
|
+
message: string;
|
|
31
|
+
confirmText?: string;
|
|
32
|
+
cancelText?: string;
|
|
33
|
+
}): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @param options
|
|
37
|
+
* @param options.title
|
|
38
|
+
* @param options.message
|
|
39
|
+
* @param options.yesText
|
|
40
|
+
* @param options.noText
|
|
41
|
+
* @returns Promise que resuelve true si se eligió Sí
|
|
42
|
+
*/
|
|
43
|
+
yesNo(options: {
|
|
44
|
+
title: string;
|
|
45
|
+
message: string;
|
|
46
|
+
yesText?: string;
|
|
47
|
+
noText?: string;
|
|
48
|
+
}): Promise<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param title
|
|
52
|
+
* @param message
|
|
53
|
+
* @returns Promise que resuelve cuando se cierra el modal
|
|
54
|
+
*/
|
|
14
55
|
info(title: string, message: string): Promise<void>;
|
|
15
|
-
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @param options
|
|
59
|
+
* @param options.title
|
|
60
|
+
* @param options.message
|
|
61
|
+
* @param options.confirmText
|
|
62
|
+
* @param options.cancelText
|
|
63
|
+
* @returns Promise que resuelve true si se confirmó
|
|
64
|
+
*/
|
|
65
|
+
warning(options: {
|
|
66
|
+
title: string;
|
|
67
|
+
message: string;
|
|
68
|
+
confirmText?: string;
|
|
69
|
+
cancelText?: string;
|
|
70
|
+
}): Promise<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @param title
|
|
74
|
+
* @param message
|
|
75
|
+
* @param confirmText
|
|
76
|
+
* @returns Promise que resuelve true si se confirmó
|
|
77
|
+
*/
|
|
16
78
|
error(title: string, message: string, confirmText?: string): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Maneja el resultado del modal y resuelve la promesa
|
|
81
|
+
* @param result - Resultado de la acción del modal
|
|
82
|
+
*/
|
|
17
83
|
handleResult(result: ModalResult): void;
|
|
84
|
+
/**
|
|
85
|
+
* Cierra el modal actual
|
|
86
|
+
*/
|
|
18
87
|
closeModal(): void;
|
|
19
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
20
89
|
static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ModalType = 'info' | 'confirm' | 'yesNo' | 'warning' | 'error';
|
|
2
|
+
export interface ModalConfig {
|
|
3
|
+
title: string;
|
|
4
|
+
message: string;
|
|
5
|
+
type?: ModalType;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
yesText?: string;
|
|
9
|
+
noText?: string;
|
|
10
|
+
showCancel?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ModalResult {
|
|
13
|
+
action: 'confirm' | 'cancel' | 'yes' | 'no';
|
|
14
|
+
confirmed: boolean;
|
|
15
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { StatItem } from './profile-stats.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Componente para mostrar estadísticas del usuario
|
|
5
|
+
* Soporta valores con etiquetas o botones de acción
|
|
6
|
+
*/
|
|
3
7
|
export declare class ProfileStatsComponent {
|
|
4
8
|
stats: import("@angular/core").InputSignal<StatItem[]>;
|
|
5
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileStatsComponent, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './rating-display.component';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export declare class RatingDisplayComponent {
|
|
6
|
+
rating: import("@angular/core").InputSignal<number>;
|
|
7
|
+
size: import("@angular/core").InputSignal<number>;
|
|
8
|
+
spacing: import("@angular/core").InputSignal<number>;
|
|
9
|
+
protected readonly stars: import("@angular/core").Signal<unknown[]>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RatingDisplayComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RatingDisplayComponent, "c80-rating-display", never, { "rating": { "alias": "rating"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "spacing": { "alias": "spacing"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './rating-stars.component';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export declare class RatingStarsComponent {
|
|
6
|
+
rating: import("@angular/core").InputSignal<number>;
|
|
7
|
+
showLabel: import("@angular/core").InputSignal<boolean>;
|
|
8
|
+
readonly: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
ratingChange: import("@angular/core").OutputEmitterRef<number>;
|
|
10
|
+
protected readonly currentRating: import("@angular/core").Signal<number>;
|
|
11
|
+
protected readonly stars: import("@angular/core").Signal<boolean[]>;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param rating
|
|
15
|
+
*/
|
|
16
|
+
protected onStarClick(rating: number): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RatingStarsComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RatingStarsComponent, "c80-rating-stars", never, { "rating": { "alias": "rating"; "required": false; "isSignal": true; }; "showLabel": { "alias": "showLabel"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "ratingChange": "ratingChange"; }, never, never, true, never>;
|
|
19
|
+
}
|
package/lib/select/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './select.
|
|
1
|
+
export * from './select.types';
|
|
2
2
|
export * from './select.component';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type ElementRef } from '@angular/core';
|
|
2
|
-
import type { SelectOption } from './select.
|
|
2
|
+
import type { SelectOption } from './select.types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
4
7
|
export declare class SelectComponent<T = string> {
|
|
5
8
|
readonly label: import("@angular/core").InputSignal<string>;
|
|
6
9
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
@@ -18,12 +21,37 @@ export declare class SelectComponent<T = string> {
|
|
|
18
21
|
readonly controlId: string;
|
|
19
22
|
readonly searchInput: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
20
23
|
readonly filteredOptions: import("@angular/core").Signal<SelectOption<T>[]>;
|
|
24
|
+
normalizeString(str: string): string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
21
28
|
toggleDropdown(): void;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @param option
|
|
32
|
+
*/
|
|
22
33
|
selectOption(option: SelectOption<T>): void;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
23
37
|
selectNull(): void;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @returns Etiqueta del valor seleccionado o placeholder
|
|
41
|
+
*/
|
|
24
42
|
getSelectedLabel(): string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
25
46
|
closeDropdown(): void;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @param term
|
|
50
|
+
*/
|
|
26
51
|
onSearchChange(term: string): void;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
27
55
|
clearSearch(): void;
|
|
28
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent<any>, never>;
|
|
29
57
|
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent<any>, "c80-select", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "opened": "opened"; }, never, never, true, never>;
|
package/lib/snackbar/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { SnackbarData } from './snackbar.
|
|
1
|
+
import type { SnackbarData } from './snackbar.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
3
6
|
export declare class SnackbarComponent {
|
|
4
7
|
private readonly elementRef;
|
|
5
8
|
private readonly renderer;
|
|
@@ -8,9 +11,23 @@ export declare class SnackbarComponent {
|
|
|
8
11
|
readonly visible: import("@angular/core").WritableSignal<boolean>;
|
|
9
12
|
private timerId?;
|
|
10
13
|
readonly panelClasses: import("@angular/core").Signal<string>;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param data
|
|
17
|
+
*/
|
|
11
18
|
show(data: SnackbarData): void;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
12
22
|
dismiss(): void;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
13
26
|
private clearTimer;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param config
|
|
30
|
+
*/
|
|
14
31
|
private applyPosition;
|
|
15
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarComponent, never>;
|
|
16
33
|
static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarComponent, "c80-snackbar", never, {}, {}, never, never, true, never>;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import type { SnackbarConfig } from './snackbar.
|
|
1
|
+
import type { SnackbarConfig } from './snackbar.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
3
6
|
export declare class SnackbarService {
|
|
4
7
|
private readonly appRef;
|
|
5
8
|
private readonly injector;
|
|
6
9
|
private componentRef?;
|
|
7
10
|
private readonly defaultConfig;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param message
|
|
14
|
+
* @param action
|
|
15
|
+
* @param config
|
|
16
|
+
*/
|
|
8
17
|
open(message: string, action?: string, config?: SnackbarConfig): void;
|
|
9
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
10
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spinner.component';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export declare class SpinnerComponent {
|
|
6
|
+
readonly size: import("@angular/core").InputSignal<number>;
|
|
7
|
+
readonly borderWidth: import("@angular/core").InputSignal<number>;
|
|
8
|
+
readonly color: import("@angular/core").InputSignal<string>;
|
|
9
|
+
readonly message: import("@angular/core").InputSignal<string>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpinnerComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpinnerComponent, "c80-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "borderWidth": { "alias": "borderWidth"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
package/lib/stat-card/index.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CardDef } from './stat-card.types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
text: string;
|
|
7
|
-
count: number;
|
|
8
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
9
6
|
export declare class StatCardComponent {
|
|
10
7
|
readonly cards: import("@angular/core").InputSignal<CardDef[]>;
|
|
11
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<StatCardComponent, never>;
|
|
@@ -2,13 +2,30 @@ import { type TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { C80TabItemDirective } from './directives/c80-tab-item.directive';
|
|
3
3
|
import { C80TabLabelDirective } from './directives/c80-tab-label.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
5
8
|
export declare class TabComponent {
|
|
6
9
|
readonly tabs: import("@angular/core").Signal<readonly C80TabItemDirective[]>;
|
|
7
10
|
readonly labels: import("@angular/core").Signal<readonly C80TabLabelDirective[]>;
|
|
8
11
|
readonly selectedIndex: import("@angular/core").ModelSignal<number>;
|
|
9
12
|
readonly selectedIndexChange: import("@angular/core").OutputEmitterRef<number>;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param index
|
|
16
|
+
*/
|
|
10
17
|
onTabClick(index: number): void;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param index
|
|
21
|
+
* @returns Template del contenido del tab o null
|
|
22
|
+
*/
|
|
11
23
|
getTabContent(index: number): TemplateRef<unknown> | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param index
|
|
27
|
+
* @returns Template de la etiqueta del tab o null
|
|
28
|
+
*/
|
|
12
29
|
getTabLabel(index: number): TemplateRef<unknown> | null;
|
|
13
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabComponent, never>;
|
|
14
31
|
static ɵcmp: i0.ɵɵComponentDeclaration<TabComponent, "c80-tab", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "selectedIndexChange": "selectedIndexChange"; }, ["tabs", "labels"], never, true, never>;
|
package/lib/tab/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { TabComponent } from './c80-tab.component';
|
|
2
2
|
export { C80TabItemDirective } from './directives/c80-tab-item.directive';
|
|
3
3
|
export { C80TabLabelDirective } from './directives/c80-tab-label.directive';
|
|
4
|
-
export type { C80Tab } from './c80-tab.
|
|
4
|
+
export type { C80Tab } from './c80-tab.types';
|
package/lib/table/index.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export * from './table-column-visibility.service';
|
|
|
6
6
|
export * from './table-data-utils.service';
|
|
7
7
|
export * from './table-selection.service';
|
|
8
8
|
export * from './table-crud-state.service';
|
|
9
|
+
export * from './table-dto-mapper.service';
|
|
10
|
+
export * from './table-pagination.service';
|
|
@@ -14,12 +14,14 @@ export declare class TableColumnVisibilityService {
|
|
|
14
14
|
/**
|
|
15
15
|
* Actualiza las keys de columnas visibles basándose en el estado actual
|
|
16
16
|
* @param columns - Definiciones de columnas
|
|
17
|
-
* @param
|
|
18
|
-
* @param creating - Si está en modo creación
|
|
19
|
-
* @param editing - ID de fila en edición (null si no hay edición)
|
|
17
|
+
* @param context - Contexto con datos, estado de creación y edición
|
|
20
18
|
* @returns Array de accessors de columnas visibles
|
|
21
19
|
*/
|
|
22
|
-
updateVisibleKeys<T extends Record<string, unknown>>(columns: TableColDef[],
|
|
20
|
+
updateVisibleKeys<T extends Record<string, unknown>>(columns: TableColDef[], context: {
|
|
21
|
+
data: T[];
|
|
22
|
+
creating: boolean;
|
|
23
|
+
editing: string | null;
|
|
24
|
+
}): string[];
|
|
23
25
|
/**
|
|
24
26
|
* Determina si una columna debe ser visible basándose en su configuración y datos
|
|
25
27
|
* Método unificado que maneja todos los casos de visibilidad
|
|
@@ -34,16 +36,27 @@ export declare class TableColumnVisibilityService {
|
|
|
34
36
|
editing?: string | null;
|
|
35
37
|
row?: T;
|
|
36
38
|
}): boolean;
|
|
39
|
+
private checkColumnVisibilityByContext;
|
|
40
|
+
private isVisibleInCreation;
|
|
41
|
+
private isVisibleInEditing;
|
|
37
42
|
/**
|
|
38
43
|
* Determina si una columna debe ser visible en los headers
|
|
39
44
|
* Wrapper para mantener compatibilidad con API existente
|
|
40
45
|
*/
|
|
41
|
-
isColumnVisibleInHeader<T extends Record<string, unknown>>(column: TableColDef,
|
|
46
|
+
isColumnVisibleInHeader<T extends Record<string, unknown>>(column: TableColDef, context: {
|
|
47
|
+
data: T[];
|
|
48
|
+
creating: boolean;
|
|
49
|
+
editing: string | null;
|
|
50
|
+
}): boolean;
|
|
42
51
|
/**
|
|
43
52
|
* Determina si una columna debe ser visible en una fila específica
|
|
44
53
|
* Wrapper para mantener compatibilidad con API existente
|
|
45
54
|
*/
|
|
46
|
-
isColumnVisibleForRow<T extends Record<string, unknown>>(column: TableColDef,
|
|
55
|
+
isColumnVisibleForRow<T extends Record<string, unknown>>(column: TableColDef, context: {
|
|
56
|
+
row: T;
|
|
57
|
+
data: T[];
|
|
58
|
+
editing: string | null;
|
|
59
|
+
}): boolean;
|
|
47
60
|
/**
|
|
48
61
|
* Verifica si todos los valores de una columna están vacíos/nulos
|
|
49
62
|
*/
|
|
@@ -1,5 +1,26 @@
|
|
|
1
|
+
import { type Signal } from '@angular/core';
|
|
1
2
|
import type { TableColDef } from './table.types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
interface CrudState<T extends Record<string, unknown>> {
|
|
5
|
+
creating: Signal<boolean>;
|
|
6
|
+
newRow: Signal<Partial<T> | null>;
|
|
7
|
+
editing: Signal<string | null>;
|
|
8
|
+
editRow: Signal<Partial<T> | null>;
|
|
9
|
+
startCreate: (context: {
|
|
10
|
+
columns: TableColDef[];
|
|
11
|
+
data: T[];
|
|
12
|
+
}) => void;
|
|
13
|
+
cancelCreate: () => void;
|
|
14
|
+
updateNewRow: (key: string, value: unknown) => void;
|
|
15
|
+
startEdit: (context: {
|
|
16
|
+
row: T;
|
|
17
|
+
columns: TableColDef[];
|
|
18
|
+
data: T[];
|
|
19
|
+
}) => void;
|
|
20
|
+
cancelEdit: () => void;
|
|
21
|
+
updateEditRow: (key: string, value: unknown) => void;
|
|
22
|
+
applyInputValues: (partialValues: Partial<T>) => void;
|
|
23
|
+
}
|
|
3
24
|
/**
|
|
4
25
|
* Servicio para gestionar el estado CRUD (Crear, Leer, Actualizar, Eliminar) en tablas C80
|
|
5
26
|
*
|
|
@@ -28,19 +49,7 @@ export declare class TableCrudStateService {
|
|
|
28
49
|
* Inicializa el estado CRUD para una nueva tabla
|
|
29
50
|
* @returns Objeto con signals y métodos para gestión CRUD
|
|
30
51
|
*/
|
|
31
|
-
createCrudState<T extends Record<string, unknown>>():
|
|
32
|
-
creating: import("@angular/core").Signal<boolean>;
|
|
33
|
-
newRow: import("@angular/core").Signal<Partial<T> | null>;
|
|
34
|
-
editing: import("@angular/core").Signal<string | null>;
|
|
35
|
-
editRow: import("@angular/core").Signal<Partial<T> | null>;
|
|
36
|
-
startCreate: (columns: TableColDef[], data: T[]) => void;
|
|
37
|
-
cancelCreate: () => void;
|
|
38
|
-
updateNewRow: (key: string, value: unknown) => void;
|
|
39
|
-
startEdit: (row: T, columns: TableColDef[], data: T[]) => void;
|
|
40
|
-
cancelEdit: () => void;
|
|
41
|
-
updateEditRow: (key: string, value: unknown) => void;
|
|
42
|
-
applyInputValues: (partialValues: Partial<T>) => void;
|
|
43
|
-
};
|
|
52
|
+
createCrudState<T extends Record<string, unknown>>(): CrudState<T>;
|
|
44
53
|
private startCreate;
|
|
45
54
|
private cancelCreate;
|
|
46
55
|
private updateRow;
|
|
@@ -50,3 +59,4 @@ export declare class TableCrudStateService {
|
|
|
50
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableCrudStateService, never>;
|
|
51
60
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableCrudStateService>;
|
|
52
61
|
}
|
|
62
|
+
export {};
|
|
@@ -15,6 +15,8 @@ export declare class TableDataConverterService {
|
|
|
15
15
|
* @returns Valor convertido al tipo apropiado
|
|
16
16
|
*/
|
|
17
17
|
convertCellValue(value: unknown, col: TableColDef, sampleValue?: unknown): unknown;
|
|
18
|
+
private convertByColumnType;
|
|
19
|
+
private convertBySampleValue;
|
|
18
20
|
/**
|
|
19
21
|
* Convierte un valor a boolean usando mejores prácticas
|
|
20
22
|
* @param value - Valor a convertir
|
|
@@ -31,6 +31,13 @@ export declare class TableDataUtilsService {
|
|
|
31
31
|
* @returns Cadena formateada para display
|
|
32
32
|
*/
|
|
33
33
|
getDisplayValue(value: unknown, col?: TableColDef): string;
|
|
34
|
+
/**
|
|
35
|
+
* Trunca un texto a N caracteres y agrega '...' si es necesario
|
|
36
|
+
* @param value - Texto a truncar
|
|
37
|
+
* @param maxLength - Longitud máxima
|
|
38
|
+
* @returns Texto truncado
|
|
39
|
+
*/
|
|
40
|
+
private truncateText;
|
|
34
41
|
private formatValueByType;
|
|
35
42
|
private formatPrimitiveValue;
|
|
36
43
|
/**
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { TableColDef } from './table.types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Servicio para mapear automáticamente datos de tabla a DTOs
|
|
5
|
+
* basándose en la configuración de TableColDef.
|
|
6
|
+
*
|
|
7
|
+
* Reglas de exclusión:
|
|
8
|
+
* - readOnly: true → campo NO se incluye
|
|
9
|
+
* - accessor: 'id' → campo NO se incluye (IDs van en URL, no en body)
|
|
10
|
+
* - readOnly: false o undefined → campo se incluye
|
|
11
|
+
*/
|
|
12
|
+
export declare class TableDtoMapperService {
|
|
13
|
+
/**
|
|
14
|
+
* Mapea un objeto de fila a DTO, excluyendo campos readOnly e id
|
|
15
|
+
* @param row - Datos de la fila
|
|
16
|
+
* @param columns - Definiciones de columnas
|
|
17
|
+
* @param additionalFields - Campos adicionales a agregar al DTO (ej: boxId)
|
|
18
|
+
* @returns DTO con solo campos editables (sin id)
|
|
19
|
+
*/
|
|
20
|
+
mapToDto(row: Record<string, unknown>, columns: TableColDef[], additionalFields?: Record<string, unknown>): Record<string, unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Convierte un valor según el tipo de columna
|
|
23
|
+
* @param value - Valor a convertir
|
|
24
|
+
* @param col - Definición de columna
|
|
25
|
+
* @returns Valor convertido
|
|
26
|
+
*/
|
|
27
|
+
private convertValue;
|
|
28
|
+
private toInteger;
|
|
29
|
+
private toNumber;
|
|
30
|
+
private toBoolean;
|
|
31
|
+
private toString;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableDtoMapperService, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableDtoMapperService>;
|
|
34
|
+
}
|