@kaufmann-lab/ui 0.1.41 → 0.1.43
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/fesm2022/kaufmann-lab-ui-business.mjs +1 -1
- package/fesm2022/kaufmann-lab-ui-business.mjs.map +1 -1
- package/fesm2022/kaufmann-lab-ui-charts.mjs +1 -1
- package/fesm2022/kaufmann-lab-ui-charts.mjs.map +1 -1
- package/fesm2022/kaufmann-lab-ui-core.mjs +314 -141
- package/fesm2022/kaufmann-lab-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/kaufmann-lab-ui-core.d.ts +133 -43
package/package.json
CHANGED
|
@@ -1690,6 +1690,12 @@ interface DataTableCellClick<T = unknown> {
|
|
|
1690
1690
|
column: DataTableColumn;
|
|
1691
1691
|
index: number;
|
|
1692
1692
|
}
|
|
1693
|
+
/** Separación, en px, de cada fade de borde respecto de la caja que lo ancla. */
|
|
1694
|
+
interface FadeInsets {
|
|
1695
|
+
readonly left: number;
|
|
1696
|
+
readonly right: number;
|
|
1697
|
+
readonly bottom: number;
|
|
1698
|
+
}
|
|
1693
1699
|
/** Tope de filas (o tarjetas) esqueleto: con `loading`, una página de 50 no pinta 50. */
|
|
1694
1700
|
declare const DATA_TABLE_MAX_SKELETON_ROWS = 12;
|
|
1695
1701
|
/** Vistas disponibles cuando `cardable` está activo. */
|
|
@@ -1910,11 +1916,20 @@ declare class DataTable<T = unknown> {
|
|
|
1910
1916
|
* visual — con varias columnas y poco ancho disponible, la tabla se corta
|
|
1911
1917
|
* en el borde y nada le avisa al usuario que hay más contenido
|
|
1912
1918
|
* scrolleando. `canScrollLeft`/`canScrollRight` alimentan un fade en cada
|
|
1913
|
-
* borde — visible solo cuando de verdad
|
|
1914
|
-
* así una tabla que entra completa no
|
|
1919
|
+
* borde (físico, también con `dir="rtl"`) — visible solo cuando de verdad
|
|
1920
|
+
* hay algo que revelar de ese lado, así una tabla que entra completa no
|
|
1921
|
+
* muestra fades falsos.
|
|
1915
1922
|
*/
|
|
1916
1923
|
protected readonly canScrollLeft: _angular_core.WritableSignal<boolean>;
|
|
1917
1924
|
protected readonly canScrollRight: _angular_core.WritableSignal<boolean>;
|
|
1925
|
+
/**
|
|
1926
|
+
* Distancia a la que cada fade se separa del borde de la caja que lo ancla: las columnas fijas del
|
|
1927
|
+
* lado (el fade nace donde ellas terminan y no queda tapado por sus celdas) y la barra de scroll
|
|
1928
|
+
* clásica, que ocupa espacio dentro del contenedor y que el fade no debe pisar.
|
|
1929
|
+
*/
|
|
1930
|
+
protected readonly fadeInsets: _angular_core.WritableSignal<FadeInsets>;
|
|
1931
|
+
/** Ancho de las columnas `sticky` de cada lado, medido en `measureStickyOffsets`. */
|
|
1932
|
+
private fixedWidths;
|
|
1918
1933
|
/**
|
|
1919
1934
|
* Hay contenido oculto por scroll horizontal. Solo entonces el contenedor
|
|
1920
1935
|
* es una región nombrada y enfocable (`tabindex="0"`, `role="region"`):
|
|
@@ -2513,6 +2528,19 @@ type ModalIconTone = 'danger' | 'warn' | 'info';
|
|
|
2513
2528
|
*
|
|
2514
2529
|
* <kf-modal [(open)]="open" title="¿Descartar los cambios?" icon="alert-triangle" iconTone="warn">…</kf-modal>
|
|
2515
2530
|
*
|
|
2531
|
+
* ## Acciones junto a la X: `[kf-modal-actions]` y `closeLabel`
|
|
2532
|
+
* `[kf-modal-actions]` proyecta controles en el encabezado, a la izquierda del botón de cerrar (por
|
|
2533
|
+
* ejemplo un menú «⋯» de `kf-action-menu`), sin armar un encabezado propio. Quedan centrados con la
|
|
2534
|
+
* X y, si el slot está vacío, no ocupan lugar. Con `@if`, un solo elemento raíz por bloque: Angular
|
|
2535
|
+
* decide el slot por ese elemento. `closeLabel` es el nombre accesible del botón de
|
|
2536
|
+
* cerrar («Cerrar diálogo» por defecto): úsalo cuando el diálogo tiene un nombre más preciso.
|
|
2537
|
+
*
|
|
2538
|
+
* <kf-modal [(open)]="open" title="Avisos" closeLabel="Cerrar avisos">
|
|
2539
|
+
* <kf-action-menu kf-modal-actions iconOnly variant="ghost" size="sm" icon="more-horizontal"
|
|
2540
|
+
* label="Opciones de avisos" [items]="items" />
|
|
2541
|
+
* …
|
|
2542
|
+
* </kf-modal>
|
|
2543
|
+
*
|
|
2516
2544
|
* ## Panel lateral: `panel`
|
|
2517
2545
|
* Con `panel` el diálogo se presenta como un panel pegado al borde derecho, de alto completo
|
|
2518
2546
|
* (`100dvh`) y esquinas rectas, para formularios de alta y edición. El encabezado y el pie quedan
|
|
@@ -2597,6 +2625,9 @@ declare class Modal {
|
|
|
2597
2625
|
readonly icon: _angular_core.InputSignal<IconName | undefined>;
|
|
2598
2626
|
/** Tono de la pastilla del ícono. */
|
|
2599
2627
|
readonly iconTone: _angular_core.InputSignal<ModalIconTone>;
|
|
2628
|
+
/** Nombre accesible del botón de cerrar. Sin valor (o vacío) es «Cerrar diálogo». */
|
|
2629
|
+
readonly closeLabel: _angular_core.InputSignal<string | undefined>;
|
|
2630
|
+
protected readonly resolvedCloseLabel: _angular_core.Signal<string>;
|
|
2600
2631
|
protected readonly titleId: string;
|
|
2601
2632
|
private readonly dialog;
|
|
2602
2633
|
private readonly panelRef;
|
|
@@ -2623,7 +2654,7 @@ declare class Modal {
|
|
|
2623
2654
|
*/
|
|
2624
2655
|
protected onHostClick(event: MouseEvent): void;
|
|
2625
2656
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Modal, never>;
|
|
2626
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Modal, "kf-modal", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dividers": { "alias": "dividers"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fullscreenOnMobile": { "alias": "fullscreenOnMobile"; "required": false; "isSignal": true; }; "panel": { "alias": "panel"; "required": false; "isSignal": true; }; "initialFocus": { "alias": "initialFocus"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconTone": { "alias": "iconTone"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["[kf-modal-meta]", "[kf-modal-toolbar]", "*", "[footer]"], true, never>;
|
|
2657
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Modal, "kf-modal", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dividers": { "alias": "dividers"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "fullscreenOnMobile": { "alias": "fullscreenOnMobile"; "required": false; "isSignal": true; }; "panel": { "alias": "panel"; "required": false; "isSignal": true; }; "initialFocus": { "alias": "initialFocus"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconTone": { "alias": "iconTone"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["[kf-modal-meta]", "[kf-modal-actions]", "[kf-modal-toolbar]", "*", "[footer]"], true, never>;
|
|
2627
2658
|
}
|
|
2628
2659
|
|
|
2629
2660
|
type ConfirmDialogTone = 'primary' | 'danger';
|
|
@@ -3481,6 +3512,17 @@ type DrawerSheetWidth = 'full' | 'readable';
|
|
|
3481
3512
|
* <div kf-drawer-footer> ...Limpiar / Ver 12 resultados... </div>
|
|
3482
3513
|
* </kf-drawer>
|
|
3483
3514
|
*
|
|
3515
|
+
* `[kf-drawer-actions]` proyecta controles en la barra de título, a la izquierda del botón de
|
|
3516
|
+
* cerrar (por ejemplo un menú «⋯» de `kf-action-menu`), sin armar un encabezado propio. Solo se
|
|
3517
|
+
* dibuja con `title`, que es lo que crea la barra; no cambia el nombre del cierre (`closeLabel`). Con
|
|
3518
|
+
* `@if`, un solo elemento raíz por bloque: Angular decide el slot por ese elemento.
|
|
3519
|
+
*
|
|
3520
|
+
* <kf-drawer [(open)]="open" role="dialog" side="right" title="Avisos" closeLabel="Cerrar avisos">
|
|
3521
|
+
* <kf-action-menu kf-drawer-actions iconOnly variant="ghost" size="sm" icon="more-horizontal"
|
|
3522
|
+
* label="Opciones de avisos" [items]="items" />
|
|
3523
|
+
* …
|
|
3524
|
+
* </kf-drawer>
|
|
3525
|
+
*
|
|
3484
3526
|
* `side="bottom"` lo convierte en hoja inferior (grip, esquinas superiores
|
|
3485
3527
|
* redondeadas, alto máximo 80vh) — pensado para un resumen en mobile.
|
|
3486
3528
|
*
|
|
@@ -3698,7 +3740,7 @@ declare class Drawer {
|
|
|
3698
3740
|
protected onDragCancel(): void;
|
|
3699
3741
|
private getOrCreateFocusTrap;
|
|
3700
3742
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Drawer, never>;
|
|
3701
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Drawer, "kf-drawer", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "sheetSize": { "alias": "sheetSize"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "sheetWidth": { "alias": "sheetWidth"; "required": false; "isSignal": true; }; "flush": { "alias": "flush"; "required": false; "isSignal": true; }; "swipeToClose": { "alias": "swipeToClose"; "required": false; "isSignal": true; }; "closeOnBack": { "alias": "closeOnBack"; "required": false; "isSignal": true; }; "mountInOverlay": { "alias": "mountInOverlay"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closedAfterBack": "closedAfterBack"; "detentChange": "detentChange"; }, never, ["[kf-drawer-header]", "*", "[kf-drawer-footer]"], true, never>;
|
|
3743
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Drawer, "kf-drawer", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "sheetSize": { "alias": "sheetSize"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "sheetWidth": { "alias": "sheetWidth"; "required": false; "isSignal": true; }; "flush": { "alias": "flush"; "required": false; "isSignal": true; }; "swipeToClose": { "alias": "swipeToClose"; "required": false; "isSignal": true; }; "closeOnBack": { "alias": "closeOnBack"; "required": false; "isSignal": true; }; "mountInOverlay": { "alias": "mountInOverlay"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closedAfterBack": "closedAfterBack"; "detentChange": "detentChange"; }, never, ["[kf-drawer-actions]", "[kf-drawer-header]", "*", "[kf-drawer-footer]"], true, never>;
|
|
3702
3744
|
}
|
|
3703
3745
|
|
|
3704
3746
|
/**
|
|
@@ -7216,8 +7258,9 @@ declare class Select {
|
|
|
7216
7258
|
/**
|
|
7217
7259
|
* Pone el asterisco rojo en la etiqueta (igual que `kf-input`) y
|
|
7218
7260
|
* `aria-required="true"` en el campo de búsqueda del panel, que es el único elemento
|
|
7219
|
-
* `role="combobox"` (el trigger es un botón y ARIA no admite `aria-required` ahí).
|
|
7220
|
-
*
|
|
7261
|
+
* `role="combobox"` (el trigger es un botón y ARIA no admite `aria-required` ahí). El trigger
|
|
7262
|
+
* lo comunica como descripción («Obligatorio», `aria-describedby`), también deshabilitado.
|
|
7263
|
+
* Solo señaliza: la validación sigue en el formulario del consumidor.
|
|
7221
7264
|
*/
|
|
7222
7265
|
readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
7223
7266
|
/** Mensaje de error con `role="alert"`, debajo del trigger. */
|
|
@@ -7269,6 +7312,7 @@ declare class Select {
|
|
|
7269
7312
|
readonly triggerId: string;
|
|
7270
7313
|
readonly listboxId: string;
|
|
7271
7314
|
readonly errorId: string;
|
|
7315
|
+
protected readonly requiredId: string;
|
|
7272
7316
|
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
7273
7317
|
readonly searchQuery: _angular_core.WritableSignal<string>;
|
|
7274
7318
|
readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
@@ -7283,6 +7327,8 @@ declare class Select {
|
|
|
7283
7327
|
* nombre accesible, así que con label visible no se emite.
|
|
7284
7328
|
*/
|
|
7285
7329
|
readonly triggerAriaLabel: _angular_core.Signal<string | null>;
|
|
7330
|
+
/** Descripción del trigger: «Obligatorio» con `required` y el mensaje de error, si hay. */
|
|
7331
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
7286
7332
|
/**
|
|
7287
7333
|
* Textos que `width="fit"` mide para dimensionar el trigger: el de cada
|
|
7288
7334
|
* opción tal como se vería en el trigger (`shortLabel` o `label`) y el
|
|
@@ -8687,6 +8733,13 @@ interface ToastOptions {
|
|
|
8687
8733
|
scope?: string;
|
|
8688
8734
|
/** Lo retira {@link ToastService.clearNavigationScoped}, que la app llama al navegar. */
|
|
8689
8735
|
clearOnNavigate?: boolean;
|
|
8736
|
+
/**
|
|
8737
|
+
* Aviso crítico: no se descarta solo (sin cuenta regresiva ni `duration`), se queda hasta que
|
|
8738
|
+
* alguien lo cierre y los avisos nuevos no lo desplazan ni lo retira {@link ToastService.clearNavigationScoped}.
|
|
8739
|
+
* Sin `tone` toma `error`. Se anuncia a lectores de pantalla como alerta (`role="alert"`). Si ya
|
|
8740
|
+
* hay {@link TOAST_MAX_VISIBLE} críticos visibles, espera en la cola a que se cierre uno.
|
|
8741
|
+
*/
|
|
8742
|
+
critical?: boolean;
|
|
8690
8743
|
}
|
|
8691
8744
|
/** Messages for each leg of {@link ToastService.promise}. */
|
|
8692
8745
|
interface ToastPromiseMessages<T = unknown> {
|
|
@@ -8694,7 +8747,7 @@ interface ToastPromiseMessages<T = unknown> {
|
|
|
8694
8747
|
success?: string | ((value: T) => string);
|
|
8695
8748
|
error?: string | ((error: unknown) => string);
|
|
8696
8749
|
}
|
|
8697
|
-
/**
|
|
8750
|
+
/** A toast of the stack, as rendered by `kf-toast-host`. */
|
|
8698
8751
|
interface ToastState {
|
|
8699
8752
|
id: number;
|
|
8700
8753
|
message: string;
|
|
@@ -8705,12 +8758,16 @@ interface ToastState {
|
|
|
8705
8758
|
key?: string;
|
|
8706
8759
|
scope?: string;
|
|
8707
8760
|
clearOnNavigate?: boolean;
|
|
8761
|
+
/** Persistente: sin cuenta regresiva, se cierra solo a mano (ver {@link ToastOptions.critical}). */
|
|
8762
|
+
critical: boolean;
|
|
8708
8763
|
/** Veces que llegó este aviso (misma `key`) mientras estaba visible o en cola. */
|
|
8709
8764
|
count: number;
|
|
8710
8765
|
/** Cambia en cada refresco: el host reinicia la barra de cuenta regresiva. */
|
|
8711
8766
|
revision: number;
|
|
8712
8767
|
}
|
|
8713
|
-
/** Máximo de avisos
|
|
8768
|
+
/** Máximo de avisos visibles a la vez; los que no caben esperan en la cola o desplazan al más antiguo. */
|
|
8769
|
+
declare const TOAST_MAX_VISIBLE = 3;
|
|
8770
|
+
/** Máximo de avisos no críticos en espera; al pasarlo se descarta el más antiguo. Los críticos nunca se descartan. */
|
|
8714
8771
|
declare const TOAST_MAX_QUEUE = 3;
|
|
8715
8772
|
/**
|
|
8716
8773
|
* Auto-dismiss time per tone when the caller doesn't pass `duration`. Errors and
|
|
@@ -8724,15 +8781,16 @@ declare const TOAST_DEFAULT_DURATION_MS: Readonly<Record<Exclude<ToastTone, 'loa
|
|
|
8724
8781
|
* resuming the timer early. */
|
|
8725
8782
|
type ToastPauseSource = 'hover' | 'focus';
|
|
8726
8783
|
/**
|
|
8727
|
-
*
|
|
8728
|
-
*
|
|
8784
|
+
* Pila de avisos: hasta {@link TOAST_MAX_VISIBLE} (3) visibles a la vez, el más nuevo junto a
|
|
8785
|
+
* la esquina. Un `show()` sin `key` ni `critical` conserva el comportamiento de siempre (una
|
|
8786
|
+
* línea de estado global): reemplaza al aviso sin clave que esté visible, sin apilarse.
|
|
8729
8787
|
*
|
|
8730
8788
|
* Avisos con `key` (opt-in, sin clave nada cambia):
|
|
8731
8789
|
* - la misma clave refresca el visible (texto, temporizador, contador «×N») sin
|
|
8732
8790
|
* parpadear, o la entrada en cola con esa clave;
|
|
8733
|
-
* - una clave distinta
|
|
8734
|
-
* hasta {@link TOAST_MAX_QUEUE} avisos (deduplicada por clave) y se muestra al
|
|
8735
|
-
* cerrarse
|
|
8791
|
+
* - una clave distinta se suma a la pila mientras haya lugar; con la pila llena espera en una
|
|
8792
|
+
* cola de hasta {@link TOAST_MAX_QUEUE} avisos (deduplicada por clave) y se muestra al
|
|
8793
|
+
* cerrarse uno; un `show()` sin clave no espera: desplaza al aviso no crítico más antiguo.
|
|
8736
8794
|
* - `dismiss('clave')`, `dismissAll()`, `clearScope(scope)` y
|
|
8737
8795
|
* `clearNavigationScoped()` los retiran. La librería no depende del router: la
|
|
8738
8796
|
* app llama a este último desde sus eventos de navegación.
|
|
@@ -8745,15 +8803,24 @@ type ToastPauseSource = 'hover' | 'focus';
|
|
|
8745
8803
|
* toast.show('No se pudo sincronizar la foto', { tone: 'error', key: 'sync-photo', clearOnNavigate: true });
|
|
8746
8804
|
* ```
|
|
8747
8805
|
*
|
|
8806
|
+
* Avisos críticos (`critical: true`): persistentes, sin cuenta regresiva; solo se retiran al
|
|
8807
|
+
* cerrarlos (o con `dismiss`, `dismissAll` y `clearScope`, nunca con `clearNavigationScoped`). Con
|
|
8808
|
+
* la pila llena, un crítico desplaza al no crítico más antiguo; si los tres visibles son
|
|
8809
|
+
* críticos, espera en la cola (los críticos en espera nunca se descartan, y el host los cuenta).
|
|
8810
|
+
*
|
|
8811
|
+
* ```ts
|
|
8812
|
+
* toast.show('Falla de energía en la sucursal Lima', { critical: true, key: 'notice:42' });
|
|
8813
|
+
* ```
|
|
8814
|
+
*
|
|
8748
8815
|
* Duration by tone (when `duration` isn't passed): `success`/`info` 2800ms,
|
|
8749
8816
|
* `warning` 5000ms, `error` 8000ms (`TOAST_DEFAULT_DURATION_MS`); an explicit
|
|
8750
|
-
* `duration` always wins. The countdown pauses while the pointer or focus is
|
|
8751
|
-
* on
|
|
8817
|
+
* `duration` always wins. The countdown of each toast pauses while the pointer or focus is
|
|
8818
|
+
* on it. Error toasts also get a larger, always-opaque close button.
|
|
8752
8819
|
*
|
|
8753
8820
|
* Angular has no global function that can mount UI on its own, so the
|
|
8754
8821
|
* imperative `showToast(...)` of the reference design system becomes a
|
|
8755
|
-
* root-provided service holding signal state: `ToastService.show(...)`
|
|
8756
|
-
* the
|
|
8822
|
+
* root-provided service holding signal state: `ToastService.show(...)` adds
|
|
8823
|
+
* the toast to the stack and `ToastHost` (standalone, mounted once in the app
|
|
8757
8824
|
* shell) renders it.
|
|
8758
8825
|
*
|
|
8759
8826
|
* @example
|
|
@@ -8775,45 +8842,55 @@ type ToastPauseSource = 'hover' | 'focus';
|
|
|
8775
8842
|
* ```
|
|
8776
8843
|
*/
|
|
8777
8844
|
declare class ToastService {
|
|
8778
|
-
private readonly
|
|
8845
|
+
private readonly _visible;
|
|
8779
8846
|
private readonly _queue;
|
|
8780
8847
|
private nextId;
|
|
8781
|
-
|
|
8782
|
-
private
|
|
8783
|
-
/**
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
/** Time left on the auto-dismiss countdown while paused. `undefined` when no countdown
|
|
8787
|
-
* is currently paused. */
|
|
8788
|
-
private remainingMs?;
|
|
8789
|
-
private readonly pauseSources;
|
|
8790
|
-
/** The single active toast, or `null`. */
|
|
8848
|
+
/** Temporizadores y pausas de cada aviso visible, por `id`. */
|
|
8849
|
+
private readonly timers;
|
|
8850
|
+
/** La pila visible, del más antiguo al más nuevo (el orden en que se dibuja). */
|
|
8851
|
+
readonly visible: _angular_core.Signal<ToastState[]>;
|
|
8852
|
+
/** El aviso visible más reciente, o `null`. Con un solo aviso es «el» aviso. */
|
|
8791
8853
|
readonly current: _angular_core.Signal<ToastState | null>;
|
|
8792
|
-
/** Avisos
|
|
8854
|
+
/** Avisos en espera (la pila llena), en orden de llegada. */
|
|
8793
8855
|
readonly queue: _angular_core.Signal<ToastState[]>;
|
|
8794
8856
|
/**
|
|
8795
|
-
* Shows a toast
|
|
8796
|
-
* refresca,
|
|
8857
|
+
* Shows a toast. Sin `key` ni `critical` reemplaza al aviso sin clave visible; con `key`
|
|
8858
|
+
* refresca, apila o encola según la política de la clase. Returns its id
|
|
8797
8859
|
* (el del toast refrescado, si la clave ya existía).
|
|
8798
8860
|
*/
|
|
8799
8861
|
show(message: string, options?: ToastOptions): number;
|
|
8800
|
-
/** Retira todos los avisos:
|
|
8862
|
+
/** Retira todos los avisos: los visibles (con su salida) y los de la cola. */
|
|
8801
8863
|
dismissAll(): void;
|
|
8802
8864
|
/** Retira los avisos con este `scope`, visibles o en cola. */
|
|
8803
8865
|
clearScope(scope: string): void;
|
|
8804
|
-
/** Retira los avisos con `clearOnNavigate
|
|
8866
|
+
/** Retira los avisos con `clearOnNavigate`, salvo los críticos. La app lo llama desde sus eventos de navegación. */
|
|
8805
8867
|
clearNavigationScoped(): void;
|
|
8806
8868
|
private removeWhere;
|
|
8807
8869
|
private createState;
|
|
8808
8870
|
private merge;
|
|
8871
|
+
/**
|
|
8872
|
+
* Muestra `entry` si hay lugar o puede hacerlo; si no, lo deja en la cola. Sin clave ni
|
|
8873
|
+
* `critical` reemplaza al aviso sin clave visible (la línea de estado de siempre); un crítico y un
|
|
8874
|
+
* aviso sin clave, con la pila llena, desplazan al no crítico más antiguo; el resto espera.
|
|
8875
|
+
*/
|
|
8876
|
+
private admit;
|
|
8877
|
+
/** Suma a la cola; pasado {@link TOAST_MAX_QUEUE} descarta los no críticos más antiguos. */
|
|
8878
|
+
private enqueue;
|
|
8809
8879
|
/** Mismo toast visible con datos nuevos: reinicia el temporizador (o lo deja en pausa). */
|
|
8810
|
-
private
|
|
8880
|
+
private refreshVisible;
|
|
8881
|
+
/** Sin cuenta regresiva: los críticos y los `loading` solo se cierran a mano o por código. */
|
|
8882
|
+
private isPersistent;
|
|
8811
8883
|
private present;
|
|
8884
|
+
private timersOf;
|
|
8812
8885
|
private scheduleDismiss;
|
|
8886
|
+
/** Quita un aviso de la pila al instante, sin animación de salida, y apaga sus temporizadores. */
|
|
8887
|
+
private removeNow;
|
|
8888
|
+
/** Sube de la cola a la pila mientras haya lugar: primero los críticos, luego por orden de llegada. */
|
|
8889
|
+
private fillFromQueue;
|
|
8813
8890
|
/**
|
|
8814
8891
|
* Pauses the auto-dismiss countdown for `id` while `source` (pointer hover or focus) is
|
|
8815
8892
|
* active on it, so a user reaching for the action/dismiss button never loses the toast
|
|
8816
|
-
* mid-interaction (WCAG 2.2.1). No-op when `id` isn't
|
|
8893
|
+
* mid-interaction (WCAG 2.2.1). No-op when `id` isn't visible, it's leaving, or
|
|
8817
8894
|
* it has no running countdown (persistent or `loading` toasts, or already paused by
|
|
8818
8895
|
* another source).
|
|
8819
8896
|
*/
|
|
@@ -8825,9 +8902,9 @@ declare class ToastService {
|
|
|
8825
8902
|
resume(id: number, source: ToastPauseSource): void;
|
|
8826
8903
|
/**
|
|
8827
8904
|
* Starts the exit animation, then removes the toast. No-op when `id` is no
|
|
8828
|
-
* longer
|
|
8829
|
-
* clave (`string`) retira el visible con esa clave y la entrada en cola. Al
|
|
8830
|
-
* terminar la salida
|
|
8905
|
+
* longer visible, so a stale timer never kills a newer toast. Sin argumento retira el más
|
|
8906
|
+
* reciente. Con una clave (`string`) retira el visible con esa clave y la entrada en cola. Al
|
|
8907
|
+
* terminar la salida sube a la pila el siguiente aviso de la cola, si hay.
|
|
8831
8908
|
*/
|
|
8832
8909
|
dismiss(idOrKey?: number | string): void;
|
|
8833
8910
|
/**
|
|
@@ -8840,17 +8917,30 @@ declare class ToastService {
|
|
|
8840
8917
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ToastService>;
|
|
8841
8918
|
}
|
|
8842
8919
|
/**
|
|
8843
|
-
* Renders
|
|
8844
|
-
* one instance in the app shell (e.g. next
|
|
8845
|
-
* inputs and re-renders itself from the service state.
|
|
8920
|
+
* Renders the stack that `ToastService` holds (up to {@link TOAST_MAX_VISIBLE} toasts), fixed
|
|
8921
|
+
* bottom-right with the newest next to the corner. Mount one instance in the app shell (e.g. next
|
|
8922
|
+
* to the router outlet); it takes no inputs and re-renders itself from the service state.
|
|
8923
|
+
*
|
|
8924
|
+
* Cada aviso se anuncia solo: `role="alert"` (asertivo) los de tono `error` y los críticos,
|
|
8925
|
+
* `role="status"` (cortés) el resto. Con críticos en espera de lugar, la pila lo dice con un
|
|
8926
|
+
* contador.
|
|
8846
8927
|
*
|
|
8847
8928
|
* <kf-toast-host />
|
|
8929
|
+
*
|
|
8930
|
+
* La pila (`.kf-toast-stack`) es la que se posiciona: un portal que quiera moverla (por ejemplo
|
|
8931
|
+
* arriba) cambia `inset-*` en esa clase, no en `.kf-toast`.
|
|
8848
8932
|
*/
|
|
8849
8933
|
declare class ToastHost {
|
|
8850
8934
|
private readonly toastService;
|
|
8851
|
-
/**
|
|
8935
|
+
/** La pila, del más antiguo al más nuevo; `@for track t.id` monta de nuevo el nodo de cada aviso nuevo y reinicia sus animaciones. */
|
|
8852
8936
|
protected readonly toastList: _angular_core.Signal<ToastState[]>;
|
|
8937
|
+
/** Críticos que esperan lugar porque la pila está llena de críticos. */
|
|
8938
|
+
protected readonly waitingCritical: _angular_core.Signal<number>;
|
|
8939
|
+
protected waitingText(count: number): string;
|
|
8853
8940
|
protected toastIcon(tone: ToastTone): IconName;
|
|
8941
|
+
/** Error y crítico interrumpen al lector de pantalla; el resto espera su turno. */
|
|
8942
|
+
protected isAlert(t: ToastState): boolean;
|
|
8943
|
+
protected dismissLabel(t: ToastState): string;
|
|
8854
8944
|
protected dismiss(id: number): void;
|
|
8855
8945
|
/** Pauses the toast's auto-dismiss timer while the pointer or keyboard focus is on it. */
|
|
8856
8946
|
protected pause(t: ToastState, source: ToastPauseSource): void;
|
|
@@ -8955,5 +9045,5 @@ declare class ViewToggle {
|
|
|
8955
9045
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ViewToggle, "kf-view-toggle", never, { "view": { "alias": "view"; "required": true; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "tableLabel": { "alias": "tableLabel"; "required": false; "isSignal": true; }; "cardsLabel": { "alias": "cardsLabel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "viewChange": "viewChange"; }, never, never, true, never>;
|
|
8956
9046
|
}
|
|
8957
9047
|
|
|
8958
|
-
export { AUDIO_PLAYER_LABELS, ActionMenu, ActionRow, ActionTile, AdminBadge, AiMark, AiTag, Alert, AlertGroup, AlertRow, AudioPlayer, Avatar, Badge, BrandLogo, Breadcrumb, BucketProgress, Button, CUSTOM_PRESET_ID, Calendar, Card, Carousel, CarouselSlide, Checkbox, Chip, Collapsible, ConfirmDialog, ContactPopover, ContentSlot, ContentState, ContentStateLoading, ContentViewer, CursorPager, DATA_TABLE_MAX_SKELETON_ROWS, DEFAULT_MILESTONE_TIMELINE_LABELS, DEFAULT_PAGE_SIZE_OPTIONS, DataFreshness, DataTable, DateField, DateRangeField, DateTimeField, DeadlineStrip, DescriptionList, DescriptionValue, Divider, DocumentRow, Drawer, Dropdown, DropdownGroup, DropdownItem, DropdownPanel, EditFooter, EmptyState, EventTimeline, FeatureCard, Field, FieldLabel, Fieldset, FileInput, Filter, FilterChips, FloatingToolbar, FolderTabs, FolderTabsPanel, Footer, FormatInputDirective, Icon, Image, Input, JourneyStepper, LIST_TOOLBAR_HYSTERESIS, LayoutThumb, Link, ListGroup, ListMap, ListToolbar, MEDIA_VIEWER_LABELS, MediaViewer, MetricCard, MilestoneTimeline, Modal, MultiSelect, NoteBlock, NumberStepper, OptionList, PROGRESS_STATUS, PROGRESS_STATUS_LABEL, PageHeader, Pagination, Panel, PopoverDirective, PortalHeader, Progress, ProgressStrip, PulseDot, RowActions, SKELETON_PRESET_MAX_COUNT, ScrollSpyDirective, ScrollTop, SectionHeader, SectionNav, SectionNavItem, SectionNavSubsection, Segmented, Select, SelectableCardGroup, SelectableCardPreview, SidebarShell, SignaturePad, Skeleton, SkeletonPreset, Slider, SortableItem, SortableList, Spinner, StatCard, StatTile, StatusMark, StatusNode, StatusPill, Switch, TOAST_DEFAULT_DURATION_MS, TOAST_MAX_QUEUE, Tabs, Text, Textarea, TileGrid, TimeField, TimeSlotPicker, ToastHost, ToastService, TooltipDirective, ViewToggle, ZoomPanDirective, dataTableViewSignal, defaultDateRangePresets, formatDataAge, formatFileSize, resolveListToolbarMode };
|
|
9048
|
+
export { AUDIO_PLAYER_LABELS, ActionMenu, ActionRow, ActionTile, AdminBadge, AiMark, AiTag, Alert, AlertGroup, AlertRow, AudioPlayer, Avatar, Badge, BrandLogo, Breadcrumb, BucketProgress, Button, CUSTOM_PRESET_ID, Calendar, Card, Carousel, CarouselSlide, Checkbox, Chip, Collapsible, ConfirmDialog, ContactPopover, ContentSlot, ContentState, ContentStateLoading, ContentViewer, CursorPager, DATA_TABLE_MAX_SKELETON_ROWS, DEFAULT_MILESTONE_TIMELINE_LABELS, DEFAULT_PAGE_SIZE_OPTIONS, DataFreshness, DataTable, DateField, DateRangeField, DateTimeField, DeadlineStrip, DescriptionList, DescriptionValue, Divider, DocumentRow, Drawer, Dropdown, DropdownGroup, DropdownItem, DropdownPanel, EditFooter, EmptyState, EventTimeline, FeatureCard, Field, FieldLabel, Fieldset, FileInput, Filter, FilterChips, FloatingToolbar, FolderTabs, FolderTabsPanel, Footer, FormatInputDirective, Icon, Image, Input, JourneyStepper, LIST_TOOLBAR_HYSTERESIS, LayoutThumb, Link, ListGroup, ListMap, ListToolbar, MEDIA_VIEWER_LABELS, MediaViewer, MetricCard, MilestoneTimeline, Modal, MultiSelect, NoteBlock, NumberStepper, OptionList, PROGRESS_STATUS, PROGRESS_STATUS_LABEL, PageHeader, Pagination, Panel, PopoverDirective, PortalHeader, Progress, ProgressStrip, PulseDot, RowActions, SKELETON_PRESET_MAX_COUNT, ScrollSpyDirective, ScrollTop, SectionHeader, SectionNav, SectionNavItem, SectionNavSubsection, Segmented, Select, SelectableCardGroup, SelectableCardPreview, SidebarShell, SignaturePad, Skeleton, SkeletonPreset, Slider, SortableItem, SortableList, Spinner, StatCard, StatTile, StatusMark, StatusNode, StatusPill, Switch, TOAST_DEFAULT_DURATION_MS, TOAST_MAX_QUEUE, TOAST_MAX_VISIBLE, Tabs, Text, Textarea, TileGrid, TimeField, TimeSlotPicker, ToastHost, ToastService, TooltipDirective, ViewToggle, ZoomPanDirective, dataTableViewSignal, defaultDateRangePresets, formatDataAge, formatFileSize, resolveListToolbarMode };
|
|
8959
9049
|
export type { ActionMenuEntry, ActionMenuGroup, ActionMenuItem, ActionMenuPresentation, ActionRowState, ActionRowStatusPlacement, ActionRowStatusTone, AlertAppearance, AlertGroupEntry, AlertGroupItem, AlertIconAlign, AlertRowTone, AlertTone, AlertVariant, AudioPlayerLabels, AudioPlayerLayout, AudioPlayerStatus, AudioPlayerVariant, BreadcrumbItem, BucketProgressItem, CalendarDay, ConfirmDialogIconPlacement, ConfirmDialogResult, ConfirmDialogTone, ContentStateKind, ContentStateLoad, ContentStateVariant, ContentViewerType, DataTableCardRole, DataTableCardRows, DataTableCellClick, DataTableColumn, DataTableDensity, DataTableItemLabel, DataTableSort, DataTableView, DateFieldPresentation, DateRange, DateRangeFieldPresentation, DateRangePreset, DateTimeFieldPresentation, DeadlineItem, DescriptionItem, DescriptionListDensity, DescriptionListLayout, DividerOrientation, DocumentRowTone, DrawerDetent, DrawerRole, DrawerSheetSize, DrawerSheetWidth, DrawerSide, DrawerSize, DropdownItemBadgeTone, DropdownItemTone, DropdownPanelRole, DropdownPanelVariant, EditFooterPlacement, EmptyStateTone, EmptyStateVariant, EventTimelineItem, EventTimelineTone, FileRejection, FileRejectionReason, FilterChipOption, FilterFieldChange, FilterFieldConfig, FilterFieldType, FilterValue, FloatingToolbarPlacement, FolderTabOption, FooterLink, IconName, IconRotation, IconSize, ImageFit, ImageNaturalSize, ImageRadius, ImageStatus, InputBound, JourneyStep, JourneyStepStatus, JourneyStepperColorScheme, JourneyStepperOrientation, JourneyStepperSurface, LayoutThumbSize, LayoutThumbTile, LayoutThumbTone, LinkVariant, ListMapView, ListToolbarMode, MediaViewerClose, MediaViewerDescription, MediaViewerDescriptionSource, MediaViewerItem, MediaViewerItemStatus, MediaViewerItemType, MediaViewerLabels, MediaViewerLabelsInput, MediaViewerTone, MilestoneGroup, MilestoneItem, MilestoneTimelineLabels, ModalIconTone, ModalSize, MultiSelectOption, NoteBlockTone, OptionListOption, PageHeaderDensity, PageHeaderLayout, PageHeaderTitleSize, PaginationItem, PopoverPlacement, PopoverTrigger, PortalHeaderAdminAction, PortalHeaderNavItem, ProgressSize, ProgressStatus, ProgressStripVariant, ProgressTone, RowAction, RowActionKind, RowActionsMode, ScrollSpyScrollOptions, SectionNavSubsectionData, SegmentedFit, SegmentedOption, SegmentedSemantics, SelectOption, SelectableCardLayout, SelectableCardOption, SidebarNavItemData, SignaturePadResult, SkeletonPresetVariant, SkeletonVariant, SortableItemContext, SortableListLabels, SortableListReorder, SortableListVariant, SpinnerSize, StatCardBadgeTone, StatCardDensity, StatCardTone, StatTileTone, StatTileVariant, SurfaceTone, SwitchSize, TabOption, TabSection, TabSectionSelect, TabUrgency, TabsOverflow, TextAs, TextTone, TextVariant, TimeSlot, ToastAction, ToastOptions, ToastPromiseMessages, ToastState, ToastTone, TooltipPosition, ViewToggleOption, ZoomPanMode, ZoomPanRotation, ZoomPanSize, ZoomPanSwipe };
|