@solercia/ui 0.4.0 → 0.6.0
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/CHANGELOG.md +223 -0
- package/README.md +3 -1
- package/fesm2022/solercia-ui-theme-studio.mjs +4136 -0
- package/fesm2022/solercia-ui-theme-studio.mjs.map +1 -0
- package/fesm2022/solercia-ui.mjs +2565 -157
- package/fesm2022/solercia-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/solercia-ui-theme-studio.d.ts +546 -0
- package/types/solercia-ui.d.ts +1457 -537
package/types/solercia-ui.d.ts
CHANGED
|
@@ -49,6 +49,15 @@ declare class SolInputComponent implements ControlValueAccessor {
|
|
|
49
49
|
* gestor de contraseñas del navegador/SO no ofrezca guardarlos.
|
|
50
50
|
*/
|
|
51
51
|
readonly autocomplete: _angular_core.InputSignal<string | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Passthrough opcional al atributo `min` del `<input>` nativo (ola-09,
|
|
54
|
+
* P3b): fecha mínima seleccionable en `type="date"` — evita agendar al
|
|
55
|
+
* pasado desde el propio selector nativo. `undefined` por defecto — con
|
|
56
|
+
* `[attr.min]` Angular OMITE el atributo por completo, así que ningún
|
|
57
|
+
* consumidor existente cambia de comportamiento (mismo patrón aditivo de
|
|
58
|
+
* `autocomplete`, arriba).
|
|
59
|
+
*/
|
|
60
|
+
readonly min: _angular_core.InputSignal<string | undefined>;
|
|
52
61
|
readonly value: _angular_core.WritableSignal<string>;
|
|
53
62
|
readonly isDisabled: _angular_core.WritableSignal<boolean>;
|
|
54
63
|
onChange: (value: string) => void;
|
|
@@ -59,7 +68,7 @@ declare class SolInputComponent implements ControlValueAccessor {
|
|
|
59
68
|
registerOnTouched(fn: () => void): void;
|
|
60
69
|
setDisabledState(isDisabled: boolean): void;
|
|
61
70
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolInputComponent, never>;
|
|
62
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolInputComponent, "sol-input", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
71
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolInputComponent, "sol-input", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
interface SolSelectOption {
|
|
@@ -86,6 +95,17 @@ declare class SolSelectComponent implements ControlValueAccessor {
|
|
|
86
95
|
readonly showAllOption: _angular_core.InputSignal<boolean>;
|
|
87
96
|
/** Label for the "all" option in single mode. */
|
|
88
97
|
readonly allOptionLabel: _angular_core.InputSignal<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Viewport width (px) at or below which the trigger and the inner search
|
|
100
|
+
* rise to 16px to avoid iOS Safari auto-zoom. The CSS baseline keeps
|
|
101
|
+
* protecting viewports up to 640px without JavaScript; a larger value
|
|
102
|
+
* (e.g. 768 for hosts whose mobile layout starts there) extends it.
|
|
103
|
+
*/
|
|
104
|
+
readonly mobileBreakpoint: _angular_core.InputSignal<number>;
|
|
105
|
+
/** Current viewport width, refreshed on `window:resize`. */
|
|
106
|
+
private readonly viewportWidth;
|
|
107
|
+
/** True when the viewport is within `mobileBreakpoint` (drives the touch classes). */
|
|
108
|
+
readonly touchViewport: _angular_core.Signal<boolean>;
|
|
89
109
|
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
90
110
|
readonly dropUp: _angular_core.WritableSignal<boolean>;
|
|
91
111
|
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
@@ -103,6 +123,8 @@ declare class SolSelectComponent implements ControlValueAccessor {
|
|
|
103
123
|
private onTouched;
|
|
104
124
|
onDocumentClick(event: MouseEvent): void;
|
|
105
125
|
constructor(hostEl: ElementRef);
|
|
126
|
+
onViewportResize(): void;
|
|
127
|
+
private static readViewportWidth;
|
|
106
128
|
toggleDropdown(): void;
|
|
107
129
|
closeDropdown(): void;
|
|
108
130
|
onSearchInput(event: Event): void;
|
|
@@ -118,7 +140,7 @@ declare class SolSelectComponent implements ControlValueAccessor {
|
|
|
118
140
|
setDisabledState(_: boolean): void;
|
|
119
141
|
private emitMultiValue;
|
|
120
142
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolSelectComponent, never>;
|
|
121
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolSelectComponent, "sol-select", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "showAllOption": { "alias": "showAllOption"; "required": false; "isSignal": true; }; "allOptionLabel": { "alias": "allOptionLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
143
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolSelectComponent, "sol-select", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "showAllOption": { "alias": "showAllOption"; "required": false; "isSignal": true; }; "allOptionLabel": { "alias": "allOptionLabel"; "required": false; "isSignal": true; }; "mobileBreakpoint": { "alias": "mobileBreakpoint"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
122
144
|
}
|
|
123
145
|
|
|
124
146
|
declare class SolTextareaComponent implements ControlValueAccessor {
|
|
@@ -1511,8 +1533,15 @@ declare class SolPageHeaderComponent {
|
|
|
1511
1533
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolPageHeaderComponent, "sol-page-header", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1512
1534
|
}
|
|
1513
1535
|
|
|
1514
|
-
/**
|
|
1515
|
-
|
|
1536
|
+
/**
|
|
1537
|
+
* Estilo visual del botón de ícono, alineado con las variantes de `sol-button`.
|
|
1538
|
+
* `outline` (0.6.0): mismo borde y color de texto que `default`, pero con
|
|
1539
|
+
* fondo transparente — pensado para un GRUPO de icon-buttons de acciones que
|
|
1540
|
+
* deba verse homogéneo (todos con reborde) sin la superficie sólida de
|
|
1541
|
+
* `default`. `sol-button` no tiene un equivalente todavía: es específica de
|
|
1542
|
+
* `sol-icon-button`.
|
|
1543
|
+
*/
|
|
1544
|
+
type SolIconButtonVariant = 'default' | 'danger' | 'ghost' | 'outline';
|
|
1516
1545
|
/**
|
|
1517
1546
|
* Tamaño (cuadrado) del botón de ícono. `touch` (44px, PR-C4, Ola 5 GOAL §4):
|
|
1518
1547
|
* ADITIVO, mismo criterio que `SolButtonSize` — cero impacto en consumidores
|
|
@@ -1559,249 +1588,655 @@ declare class SolIconButtonComponent {
|
|
|
1559
1588
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolIconButtonComponent, "sol-icon-button", never, { "icon": { "alias": "icon"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": true; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, never, true, never>;
|
|
1560
1589
|
}
|
|
1561
1590
|
|
|
1562
|
-
/** Fila genérica de la tabla: un objeto plano indexable por clave. */
|
|
1563
|
-
type SolDataTableRow = Record<string, unknown>;
|
|
1564
1591
|
/**
|
|
1565
|
-
*
|
|
1592
|
+
* Modelo de tokens en 3 niveles (W3C DTCG-aligned): primitivos → semánticos → componente.
|
|
1593
|
+
* Los niveles VIVEN en esta fuente TS + `themes/default.theme.json` y se resuelven hacia
|
|
1594
|
+
* abajo (ver `resolveCssVars` en `theme.service.ts`) hacia el conjunto de variables
|
|
1595
|
+
* `--sol-*` de la `EMIT_TABLE`.
|
|
1566
1596
|
*
|
|
1567
|
-
*
|
|
1568
|
-
*
|
|
1569
|
-
*
|
|
1570
|
-
* - `width`: ancho CSS opcional del th (`'120px'`, `'20%'`…).
|
|
1571
|
-
* - `badge`: marca la columna de estado (chip): en el modo móvil colapsado su
|
|
1572
|
-
* valor se muestra como chip junto al título en la cabecera de la fila.
|
|
1573
|
-
* - `cellTemplate`: plantilla opcional para renderizar la celda (recibe el
|
|
1574
|
-
* valor resuelto como `$implicit` y la fila completa como `row`).
|
|
1597
|
+
* ThemeFile v2 (E8 — skins white-label): todos los bloques nuevos son OPCIONALES (`?`).
|
|
1598
|
+
* Un ThemeFile v1 sigue siendo válido sin cambios: cada token v2 ausente emite su
|
|
1599
|
+
* default (el look del `default.json` actual). Ver `ThemeFile-v2-SPEC.md` del handoff.
|
|
1575
1600
|
*/
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
label: string;
|
|
1579
|
-
sortable?: boolean;
|
|
1580
|
-
width?: string;
|
|
1581
|
-
badge?: boolean;
|
|
1582
|
-
cellTemplate?: TemplateRef<{
|
|
1583
|
-
$implicit: unknown;
|
|
1584
|
-
row: SolDataTableRow;
|
|
1585
|
-
}>;
|
|
1586
|
-
}
|
|
1601
|
+
/** Referencia a un token, p. ej. `"{color.blue.600}"` (se resuelve contra `primitives`), o un literal. */
|
|
1602
|
+
type TokenRef = string;
|
|
1587
1603
|
/**
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1590
|
-
* móvil colapsa cada fila a un resumen expandible (sin scroll horizontal)
|
|
1591
|
-
* cuando el tema activo lo prefiere (`component.table.mobile: "collapse"`).
|
|
1592
|
-
*
|
|
1593
|
-
* Componente presentacional: no conoce dominio. Las acciones no genéricas se
|
|
1594
|
-
* proyectan por el slot `#rowActions` (TemplateRef que recibe la fila).
|
|
1595
|
-
* Tematizado con `var(--sol-*)` — soporta light y dark.
|
|
1604
|
+
* Modo visual soportado por todo tema. Tipo canónico (junto a `ThemeMeta.defaultMode`);
|
|
1605
|
+
* `theme.service.ts` lo re-exporta para no romper a quien ya lo importa desde allí.
|
|
1596
1606
|
*/
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
readonly showActions: _angular_core.InputSignal<boolean>;
|
|
1612
|
-
readonly showEditAction: _angular_core.InputSignal<boolean>;
|
|
1613
|
-
readonly showDeleteAction: _angular_core.InputSignal<boolean>;
|
|
1614
|
-
readonly trackByKey: _angular_core.InputSignal<string>;
|
|
1615
|
-
/** Encabezado de la columna de acciones. */
|
|
1616
|
-
readonly actionsLabel: _angular_core.InputSignal<string>;
|
|
1617
|
-
/**
|
|
1618
|
-
* aria-label del botón ▶ de expansión de fila en el modo móvil. El default
|
|
1619
|
-
* se alinea con el texto de la clave i18n `shared.table.toggleDetails`
|
|
1620
|
-
* para que cualquier consumidor que no lo sobreescriba (vía
|
|
1621
|
-
* `[toggleDetailsLabel]`) obtenga el texto correcto sin necesidad de
|
|
1622
|
-
* traducción explícita.
|
|
1623
|
-
*/
|
|
1624
|
-
readonly toggleDetailsLabel: _angular_core.InputSignal<string>;
|
|
1625
|
-
/**
|
|
1626
|
-
* Activa la animación de entrada (`solRowReveal`, ver directiva interna
|
|
1627
|
-
* arriba) en cada fila/tarjeta. Default `true`: preserva el
|
|
1628
|
-
* comportamiento visual del widget local que este componente reemplazó
|
|
1629
|
-
* (PR7a/T51) sin requerir cambios en los consumidores existentes — el
|
|
1630
|
-
* intensity "none"/`prefers-reduced-motion` del tema ya neutraliza el
|
|
1631
|
-
* efecto (duración ~1ms, distancia 0) para quien no lo quiera, sin
|
|
1632
|
-
* necesidad de apagar este input.
|
|
1633
|
-
*/
|
|
1634
|
-
readonly rowReveal: _angular_core.InputSignal<boolean>;
|
|
1635
|
-
readonly editClicked: _angular_core.OutputEmitterRef<SolDataTableRow>;
|
|
1636
|
-
readonly deleteClicked: _angular_core.OutputEmitterRef<SolDataTableRow>;
|
|
1607
|
+
type ThemeMode = 'light' | 'dark';
|
|
1608
|
+
/** Archivo completo de theming: metadatos + primitivos compartidos + configuración por modo. */
|
|
1609
|
+
interface ThemeFile {
|
|
1610
|
+
meta: ThemeMeta;
|
|
1611
|
+
primitives: ThemePrimitives;
|
|
1612
|
+
modes: {
|
|
1613
|
+
light: ThemeModeConfig;
|
|
1614
|
+
dark: ThemeModeConfig;
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
/** Metadatos invariantes de modo (no se emiten como CSS vars). */
|
|
1618
|
+
interface ThemeMeta {
|
|
1619
|
+
tenant: string;
|
|
1620
|
+
logo: ThemeLogo;
|
|
1637
1621
|
/**
|
|
1638
|
-
*
|
|
1639
|
-
* como
|
|
1640
|
-
* defecto: aquí van las acciones específicas del dominio del consumidor.
|
|
1622
|
+
* Nombre legible del tema o plantilla (p. ej. "Institucional 2026"). Solo
|
|
1623
|
+
* metadato: no se emite como variable ni cambia el render. v2, opcional.
|
|
1641
1624
|
*/
|
|
1642
|
-
|
|
1643
|
-
$implicit: SolDataTableRow;
|
|
1644
|
-
}> | undefined>;
|
|
1625
|
+
name?: string;
|
|
1645
1626
|
/**
|
|
1646
|
-
*
|
|
1647
|
-
*
|
|
1648
|
-
*
|
|
1627
|
+
* URL del favicon propio del tenant. Se SANITIZA igual que el logo (solo
|
|
1628
|
+
* http/https/relativas); sin valor —o con una URL insegura— el favicon sigue
|
|
1629
|
+
* al logo efectivo, como hasta ahora. v2, opcional.
|
|
1649
1630
|
*/
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
readonly pageSize: _angular_core.WritableSignal<number>;
|
|
1654
|
-
readonly sortKey: _angular_core.WritableSignal<string>;
|
|
1655
|
-
readonly sortDirection: _angular_core.WritableSignal<"desc" | "asc">;
|
|
1631
|
+
favicon?: string;
|
|
1632
|
+
/** Frase de marca del tenant (login/onboarding). v2, opcional. */
|
|
1633
|
+
tagline?: string;
|
|
1656
1634
|
/**
|
|
1657
|
-
*
|
|
1658
|
-
*
|
|
1659
|
-
*
|
|
1635
|
+
* Modo por defecto de la entidad (gobernado desde BD, vía Theme Studio). Se
|
|
1636
|
+
* aplica SOLO cuando el navegador no tiene todavía una elección explícita
|
|
1637
|
+
* del toggle claro/oscuro (`ThemeService.hasExplicitModePreference()` en
|
|
1638
|
+
* `false`) — una elección explícita del usuario siempre tiene precedencia
|
|
1639
|
+
* sobre este valor. v2, opcional.
|
|
1660
1640
|
*/
|
|
1661
|
-
|
|
1662
|
-
/** Señal reactiva de viewport móvil (breakpoint canónico 767px). */
|
|
1663
|
-
readonly isMobileViewport: Signal<boolean>;
|
|
1664
|
-
/** Índices de las filas fantasma del estado de carga (7 filas fijas). */
|
|
1665
|
-
protected readonly skeletonRows: number[];
|
|
1641
|
+
defaultMode?: ThemeMode;
|
|
1666
1642
|
/**
|
|
1667
|
-
*
|
|
1668
|
-
*
|
|
1669
|
-
* "scroll": conserva la tabla con overflow-x. El token ajusta la
|
|
1670
|
-
* preferencia — NUNCA la estructura del componente.
|
|
1643
|
+
* Fuentes web por tenant. v2, opcional. La URL de carga se construye SIEMPRE
|
|
1644
|
+
* por código a partir de `family` + `weights` (jamás una URL cruda del tenant).
|
|
1671
1645
|
*/
|
|
1672
|
-
|
|
1673
|
-
/** El modo colapsado aplica solo en viewport móvil con preferencia "collapse". */
|
|
1674
|
-
readonly mobileCollapse: Signal<boolean>;
|
|
1675
|
-
/** Filas expandidas del modo colapsado (por id de trackBy). */
|
|
1676
|
-
readonly expandedRows: _angular_core.WritableSignal<ReadonlySet<string | number>>;
|
|
1677
|
-
/** Columna título de la fila colapsada = primera columna configurada. */
|
|
1678
|
-
readonly mobileTitleCol: Signal<DataTableColumn | undefined>;
|
|
1679
|
-
/** Columna del chip de estado = la marcada con `badge: true` (si existe). */
|
|
1680
|
-
readonly mobileBadgeCol: Signal<DataTableColumn | undefined>;
|
|
1681
|
-
/** Subdato = la segunda columna que no sea el chip de estado. */
|
|
1682
|
-
readonly mobileSubtitleCol: Signal<DataTableColumn | undefined>;
|
|
1683
|
-
/** Columnas ocultas en el colapso: todas menos título, subdato y chip. */
|
|
1684
|
-
readonly mobileDetailCols: Signal<DataTableColumn[]>;
|
|
1685
|
-
readonly filteredData: Signal<SolDataTableRow[]>;
|
|
1686
|
-
readonly pagedData: Signal<SolDataTableRow[]>;
|
|
1687
|
-
resolveValue(row: SolDataTableRow, key: string): unknown;
|
|
1688
|
-
trackId(index: number, row: SolDataTableRow): string | number;
|
|
1689
|
-
/** Estado de expansión de una fila en el modo móvil colapsado. */
|
|
1690
|
-
isRowExpanded(id: string | number): boolean;
|
|
1691
|
-
/** Expande/colapsa una fila del modo móvil colapsado. */
|
|
1692
|
-
toggleRow(id: string | number): void;
|
|
1693
|
-
onSearch(term: string): void;
|
|
1694
|
-
onSort(key: string): void;
|
|
1695
|
-
onPageSizeChange(size: number): void;
|
|
1696
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolDataTableComponent, never>;
|
|
1697
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolDataTableComponent, "sol-data-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "paginated": { "alias": "paginated"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "filterPosition": { "alias": "filterPosition"; "required": false; "isSignal": true; }; "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "showEditAction": { "alias": "showEditAction"; "required": false; "isSignal": true; }; "showDeleteAction": { "alias": "showDeleteAction"; "required": false; "isSignal": true; }; "trackByKey": { "alias": "trackByKey"; "required": false; "isSignal": true; }; "actionsLabel": { "alias": "actionsLabel"; "required": false; "isSignal": true; }; "toggleDetailsLabel": { "alias": "toggleDetailsLabel"; "required": false; "isSignal": true; }; "rowReveal": { "alias": "rowReveal"; "required": false; "isSignal": true; }; }, { "editClicked": "editClicked"; "deleteClicked": "deleteClicked"; }, ["rowActionsTemplate"], ["[tableFilters]", "[tableActions]"], true, never>;
|
|
1646
|
+
fonts?: ThemeFont[];
|
|
1698
1647
|
}
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1648
|
+
/** Fuente web declarada por el tenant. Único proveedor permitido: Google Fonts (sanitizable por construcción). */
|
|
1649
|
+
interface ThemeFont {
|
|
1650
|
+
family: string;
|
|
1651
|
+
provider: 'google';
|
|
1652
|
+
weights: number[];
|
|
1653
|
+
}
|
|
1654
|
+
interface ThemeLogo {
|
|
1655
|
+
url: string;
|
|
1656
|
+
/** Variante del logo para modo oscuro (opcional): un tenant sin `urlDark` usa `url` en ambos modos. */
|
|
1657
|
+
urlDark?: string;
|
|
1658
|
+
altText: string;
|
|
1659
|
+
width: number;
|
|
1660
|
+
}
|
|
1661
|
+
/** Nivel 1 — primitivos: paleta y escalas compartidas entre light y dark. */
|
|
1662
|
+
interface ThemePrimitives {
|
|
1663
|
+
color: Record<string, Record<string, string> | string>;
|
|
1664
|
+
font: {
|
|
1665
|
+
/** `display` (v2, opcional) es la tipografía de titulares; sin ella se usa `sans`. */
|
|
1666
|
+
family: {
|
|
1667
|
+
sans: string;
|
|
1668
|
+
mono: string;
|
|
1669
|
+
display?: string;
|
|
1670
|
+
};
|
|
1671
|
+
size: {
|
|
1672
|
+
sm: string;
|
|
1673
|
+
base: string;
|
|
1674
|
+
lg: string;
|
|
1675
|
+
xl: string;
|
|
1676
|
+
};
|
|
1677
|
+
weight: {
|
|
1678
|
+
normal: number;
|
|
1679
|
+
bold: number;
|
|
1680
|
+
};
|
|
1681
|
+
lineHeight: {
|
|
1682
|
+
base: string;
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
radius: {
|
|
1686
|
+
sm: string;
|
|
1687
|
+
md: string;
|
|
1688
|
+
lg: string;
|
|
1689
|
+
full: string;
|
|
1690
|
+
};
|
|
1691
|
+
space: {
|
|
1692
|
+
xs: string;
|
|
1693
|
+
sm: string;
|
|
1694
|
+
md: string;
|
|
1695
|
+
lg: string;
|
|
1696
|
+
xl: string;
|
|
1697
|
+
};
|
|
1698
|
+
size: {
|
|
1699
|
+
control: {
|
|
1700
|
+
sm: string;
|
|
1701
|
+
md: string;
|
|
1702
|
+
lg: string;
|
|
1703
|
+
};
|
|
1704
|
+
};
|
|
1705
|
+
z: Record<'1000' | '1050' | '1100', number>;
|
|
1706
|
+
borderWidth: {
|
|
1707
|
+
thin: string;
|
|
1708
|
+
};
|
|
1709
|
+
/** Duraciones y curvas de movimiento. v2, opcional (defaults del look actual). */
|
|
1710
|
+
motion?: ThemeMotionPrimitives;
|
|
1711
|
+
}
|
|
1712
|
+
/** Primitivos de movimiento: duraciones ("120ms") y curvas (cubic-bezier). */
|
|
1713
|
+
interface ThemeMotionPrimitives {
|
|
1714
|
+
duration: {
|
|
1715
|
+
fast: string;
|
|
1716
|
+
base: string;
|
|
1717
|
+
slow: string;
|
|
1718
|
+
};
|
|
1719
|
+
easing: {
|
|
1720
|
+
standard: string;
|
|
1721
|
+
entrance: string;
|
|
1722
|
+
};
|
|
1723
|
+
}
|
|
1724
|
+
/** Configuración de un modo visual: capa semántica + capa de componente. */
|
|
1725
|
+
interface ThemeModeConfig {
|
|
1726
|
+
semantic: ThemeSemantic;
|
|
1727
|
+
component: ThemeComponent;
|
|
1728
|
+
}
|
|
1729
|
+
/** Nivel 2 — semánticos: referencian primitivos, la asignación cambia entre light/dark. */
|
|
1730
|
+
interface ThemeSemantic {
|
|
1731
|
+
color: Record<'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'danger' | 'info', TokenRef> & {
|
|
1732
|
+
/**
|
|
1733
|
+
* Color del texto y los íconos que se pintan SOBRE el primario (botón primario, chip
|
|
1734
|
+
* seleccionado, badges). v2, opcional: sin valor se emite `#FFFFFF`, el mismo fallback que
|
|
1735
|
+
* los componentes ya usaban. Un primario claro (menta, amarillo) necesita un contraste oscuro.
|
|
1736
|
+
*/
|
|
1737
|
+
primaryContrast?: TokenRef;
|
|
1738
|
+
/**
|
|
1739
|
+
* Color del texto de las acciones secundarias (botón "Cancelar") sobre `secondary`.
|
|
1740
|
+
* La `EMIT_TABLE` ya lo emitía (`--sol-color-secondary-contrast`, default `#1E293B`);
|
|
1741
|
+
* aquí solo se declara en el tipo. v2, opcional.
|
|
1742
|
+
*/
|
|
1743
|
+
secondaryContrast?: TokenRef;
|
|
1744
|
+
};
|
|
1745
|
+
text: Record<'primary' | 'secondary' | 'muted', TokenRef>;
|
|
1746
|
+
surface: {
|
|
1747
|
+
page: TokenRef;
|
|
1748
|
+
surface: TokenRef;
|
|
1749
|
+
overlay: TokenRef;
|
|
1750
|
+
/** Fondos rebajados (inputs filled, filas alternas). v2, opcional. */
|
|
1751
|
+
sunken?: TokenRef;
|
|
1752
|
+
/** background-image de la página: SOLO gradients o "none" (se sanitiza; jamás `url(`). v2, opcional. */
|
|
1753
|
+
texture?: string;
|
|
1754
|
+
};
|
|
1755
|
+
border: {
|
|
1756
|
+
color: TokenRef;
|
|
1757
|
+
width: TokenRef;
|
|
1758
|
+
};
|
|
1759
|
+
layer: {
|
|
1760
|
+
dropdown: TokenRef;
|
|
1761
|
+
modal: TokenRef;
|
|
1762
|
+
tooltip: TokenRef;
|
|
1763
|
+
};
|
|
1764
|
+
/** box-shadow es un string crudo por naturaleza — 2 niveles, sin primitivo sintético. */
|
|
1765
|
+
shadow: {
|
|
1766
|
+
sm: string;
|
|
1767
|
+
md: string;
|
|
1768
|
+
lg: string;
|
|
1769
|
+
};
|
|
1770
|
+
}
|
|
1771
|
+
/** Nivel 3 — componente: tokens con consumidor puntual. Los bloques v2 son opcionales. */
|
|
1772
|
+
interface ThemeComponent {
|
|
1773
|
+
control: {
|
|
1774
|
+
inputHeight: TokenRef;
|
|
1775
|
+
buttonHeight: TokenRef;
|
|
1776
|
+
};
|
|
1777
|
+
layout: {
|
|
1778
|
+
sidebarWidth: string;
|
|
1779
|
+
headerHeight: string;
|
|
1780
|
+
};
|
|
1781
|
+
shadow: {
|
|
1782
|
+
card: string;
|
|
1783
|
+
};
|
|
1784
|
+
/** Config de alertas — preservada por estabilidad de API aunque hoy no tiene consumidor. */
|
|
1785
|
+
alerts: ThemeAlerts;
|
|
1786
|
+
/** Carácter tipográfico de titulares y cifras. v2, opcional. */
|
|
1787
|
+
typography?: ThemeTypographyComponent;
|
|
1788
|
+
/** Forma de las cards (plana / elevada / glass). v2, opcional. */
|
|
1789
|
+
card?: ThemeCardComponent;
|
|
1790
|
+
/** Estilo de los inputs (filled / outline / underline). v2, opcional. */
|
|
1791
|
+
input?: ThemeInputComponent;
|
|
1792
|
+
/** Forma de los botones (pill / sharp / uppercase). v2, opcional. */
|
|
1793
|
+
button?: ThemeButtonComponent;
|
|
1794
|
+
/** Sidebar por tenant (puede ser oscuro aunque el modo sea light). v2, opcional. */
|
|
1795
|
+
sidebar?: ThemeSidebarComponent;
|
|
1796
|
+
/** Header translúcido/sólido. v2, opcional. */
|
|
1797
|
+
header?: ThemeHeaderComponent;
|
|
1798
|
+
/** Pantalla de login white-label. v2, opcional. */
|
|
1799
|
+
auth?: ThemeAuthComponent;
|
|
1800
|
+
/** Paleta categórica para series de gráficas. v2, opcional. */
|
|
1801
|
+
chart?: ThemeChartComponent;
|
|
1802
|
+
/** Movimiento (intensidad, estilo de entrada, press). v2, opcional. */
|
|
1803
|
+
motion?: ThemeMotionComponent;
|
|
1804
|
+
/** Fondo detrás de los diálogos (desenfoque del backdrop). v2, opcional. */
|
|
1805
|
+
overlay?: ThemeOverlayComponent;
|
|
1806
|
+
/** Preferencia responsive de data-tables (aditivo, nunca estructural). v2, opcional. */
|
|
1807
|
+
table?: ThemeTableComponent;
|
|
1808
|
+
/** Preferencia responsive del calendario (aditivo, nunca estructural). v2, opcional. */
|
|
1809
|
+
calendar?: ThemeCalendarComponent;
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* Fondo detrás de un diálogo/modal. El color lo aporta `semantic.surface.overlay`;
|
|
1813
|
+
* este bloque añade el desenfoque (frosted glass) sobre lo que quede detrás.
|
|
1814
|
+
*/
|
|
1815
|
+
interface ThemeOverlayComponent {
|
|
1816
|
+
/** backdrop-filter del fondo: "none" | "blur(3px)" | "blur(8px) saturate(1.2)". */
|
|
1817
|
+
blur: string;
|
|
1818
|
+
}
|
|
1819
|
+
interface ThemeAlerts {
|
|
1820
|
+
borderRadius: string;
|
|
1821
|
+
showIcon: boolean;
|
|
1822
|
+
position: 'top-right' | 'top-center' | 'bottom-right';
|
|
1823
|
+
duration: number;
|
|
1824
|
+
/** Posición del toast en viewports angostos (default "top-center": tipo push bajo el header). v2, opcional. */
|
|
1825
|
+
positionMobile?: 'top-center' | 'top-right';
|
|
1826
|
+
}
|
|
1827
|
+
/** Carácter de titulares (h1/h2, valores de stat-card) y de cifras. */
|
|
1828
|
+
interface ThemeTypographyComponent {
|
|
1829
|
+
displayWeight: number;
|
|
1830
|
+
displayTracking: string;
|
|
1831
|
+
displayTransform: string;
|
|
1832
|
+
/** Familia para cifras (ej. mono = look técnico). Opcional. */
|
|
1833
|
+
numericFamily?: string;
|
|
1834
|
+
}
|
|
1835
|
+
/** Forma de las cards. `border` y sombras son shorthands CSS completos. */
|
|
1836
|
+
interface ThemeCardComponent {
|
|
1837
|
+
bg: TokenRef;
|
|
1838
|
+
/** Shorthand completo: "1px solid #DCE1EA" | "1px solid transparent". */
|
|
1839
|
+
border: string;
|
|
1840
|
+
radius: TokenRef;
|
|
1841
|
+
/** "none" para skins planos. */
|
|
1842
|
+
shadow: string;
|
|
1843
|
+
shadowHover: string;
|
|
1844
|
+
/** backdrop-filter: "none" | "blur(16px) saturate(1.4)". */
|
|
1845
|
+
blur: string;
|
|
1846
|
+
/** "0px" | "-4px". */
|
|
1847
|
+
hoverLift: string;
|
|
1848
|
+
}
|
|
1849
|
+
/** Estilo de los inputs. `variant` es documental; los tokens lo materializan. */
|
|
1850
|
+
interface ThemeInputComponent {
|
|
1851
|
+
variant: 'filled' | 'outline' | 'underline';
|
|
1852
|
+
bg: TokenRef;
|
|
1853
|
+
/** Shorthand completo. */
|
|
1854
|
+
border: string;
|
|
1855
|
+
radius: TokenRef;
|
|
1856
|
+
/** underline se implementa con inset box-shadow. */
|
|
1857
|
+
shadow: string;
|
|
1858
|
+
focusBorder: string;
|
|
1859
|
+
/** "0 0 0 4px rgba(...)". */
|
|
1860
|
+
focusRing: string;
|
|
1861
|
+
}
|
|
1862
|
+
/** Forma de los botones. */
|
|
1863
|
+
interface ThemeButtonComponent {
|
|
1864
|
+
/** "999px" pill | "4px" sharp. */
|
|
1865
|
+
radius: TokenRef;
|
|
1866
|
+
shadow: string;
|
|
1867
|
+
weight: number;
|
|
1868
|
+
/** "none" | "uppercase". */
|
|
1869
|
+
transform: string;
|
|
1870
|
+
}
|
|
1871
|
+
/** Sidebar por tenant. */
|
|
1872
|
+
interface ThemeSidebarComponent {
|
|
1873
|
+
/** Puede ser oscuro aunque el modo sea light. */
|
|
1874
|
+
bg: TokenRef;
|
|
1875
|
+
text: TokenRef;
|
|
1876
|
+
activeBg: string;
|
|
1877
|
+
activeText: TokenRef;
|
|
1878
|
+
itemRadius: TokenRef;
|
|
1879
|
+
/** box-shadow inset para barra de acento, o "none". */
|
|
1880
|
+
indicator: string;
|
|
1881
|
+
}
|
|
1882
|
+
/** Header de la aplicación. */
|
|
1883
|
+
interface ThemeHeaderComponent {
|
|
1884
|
+
/** rgba para efecto translúcido. */
|
|
1885
|
+
bg: string;
|
|
1886
|
+
blur: string;
|
|
1887
|
+
}
|
|
1888
|
+
/** Pantalla de login. `layout` NO es token: lo lee el template del login. */
|
|
1889
|
+
interface ThemeAuthComponent {
|
|
1890
|
+
layout: 'split-left' | 'split-right' | 'centered';
|
|
1891
|
+
/** Fondo del panel hero (o glow de página en centered) — SOLO gradients (se sanitiza). */
|
|
1892
|
+
heroBg: string;
|
|
1893
|
+
}
|
|
1894
|
+
/** Paleta para series de gráficas (3-6 colores; se rellena/recorta a 6 al emitir). */
|
|
1895
|
+
interface ThemeChartComponent {
|
|
1896
|
+
palette: string[];
|
|
1897
|
+
}
|
|
1898
|
+
/** Movimiento del tema. `intensity` multiplica duraciones y revealDistance al emitir. */
|
|
1899
|
+
interface ThemeMotionComponent {
|
|
1900
|
+
/** `smooth` (v2.1) = multiplicador 1.0 (movimiento natural sin exagerar). */
|
|
1901
|
+
intensity: 'none' | 'subtle' | 'smooth' | 'expressive';
|
|
1902
|
+
/** Animación de entrada: subir / solo fade / escala con rebote / deslizar / zoom. */
|
|
1903
|
+
revealStyle: 'rise' | 'fade' | 'pop' | 'slide' | 'zoom';
|
|
1904
|
+
/** "8px" | "26px". */
|
|
1905
|
+
revealDistance: string;
|
|
1906
|
+
/** 0.99 | 0.97. */
|
|
1907
|
+
pressScale: number;
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* Variante visual de las tablas (`sol-data-table`): solo elige QUÉ receta aplica; los colores
|
|
1911
|
+
* derivan siempre de los tokens `--sol-*` del modo activo.
|
|
1912
|
+
* - `clean`: sin filas alternas.
|
|
1913
|
+
* - `zebra`: filas alternas.
|
|
1914
|
+
* - `bordered`: rejilla completa.
|
|
1915
|
+
* - `emphasis-header`: encabezado con tinte marcado y texto en el primario.
|
|
1916
|
+
* - `banded`: filas alternas + banda cada tercera fila.
|
|
1917
|
+
*/
|
|
1918
|
+
type SolTableVariant = 'clean' | 'zebra' | 'bordered' | 'emphasis-header' | 'banded';
|
|
1919
|
+
/** Catálogo ordenado de variantes de tabla (para selectores y validación). */
|
|
1920
|
+
declare const SOL_TABLE_VARIANTS: ReadonlyArray<SolTableVariant>;
|
|
1921
|
+
/**
|
|
1922
|
+
* Preferencias de data-tables (aditivas, no emiten CSS vars).
|
|
1923
|
+
* `mobile`: default "collapse" (filas colapsables, sin scroll horizontal).
|
|
1924
|
+
* `variant` (0.6.0): receta visual; sin valor, la tabla conserva su look de siempre.
|
|
1925
|
+
* Un `@Input() variant` en `sol-data-table` sobrescribe el del tema.
|
|
1926
|
+
*/
|
|
1927
|
+
interface ThemeTableComponent {
|
|
1928
|
+
mobile?: 'collapse' | 'scroll';
|
|
1929
|
+
variant?: SolTableVariant;
|
|
1930
|
+
}
|
|
1931
|
+
/** Preferencia responsive del calendario. Default 5 (lunes–viernes). */
|
|
1932
|
+
interface ThemeCalendarComponent {
|
|
1933
|
+
mobileDays: 5 | 7;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
/** Fila genérica de la tabla: un objeto plano indexable por clave. */
|
|
1937
|
+
type SolDataTableRow = Record<string, unknown>;
|
|
1938
|
+
/**
|
|
1939
|
+
* Descriptor de columna que dirige el render de `sol-data-table`.
|
|
1940
|
+
*
|
|
1941
|
+
* - `key`: ruta al valor en la fila (soporta anidamiento con puntos, `a.b.c`).
|
|
1942
|
+
* - `label`: encabezado visible de la columna.
|
|
1943
|
+
* - `sortable`: habilita el orden por esa columna al hacer clic en el th.
|
|
1944
|
+
* - `width`: ancho CSS opcional del th (`'120px'`, `'20%'`…).
|
|
1945
|
+
* - `badge`: marca la columna de estado (chip): en el modo móvil colapsado su
|
|
1946
|
+
* valor se muestra como chip junto al título en la cabecera de la fila.
|
|
1947
|
+
* - `filter` (0.6.0, opt-in): agrega un control de filtro para esta columna
|
|
1948
|
+
* en una fila propia bajo el header (ver `sol-data-table__filters-row`) —
|
|
1949
|
+
* la fila solo aparece si AL MENOS una columna declara `filter`. `'text'`
|
|
1950
|
+
* filtra por contención (contains, case-insensitive); `'select'` filtra
|
|
1951
|
+
* por igualdad exacta contra las opciones únicas del `data` actual de esa
|
|
1952
|
+
* columna. Ambos se combinan (AND) entre sí y con la búsqueda global de
|
|
1953
|
+
* `filteredData`, client-side. No aplica en el modo colapsado móvil (la
|
|
1954
|
+
* fila de filtros vive solo dentro de `<table>`).
|
|
1955
|
+
* - `cellTemplate`: plantilla opcional para renderizar la celda (recibe el
|
|
1956
|
+
* valor resuelto como `$implicit` y la fila completa como `row`).
|
|
1957
|
+
*/
|
|
1958
|
+
interface DataTableColumn {
|
|
1959
|
+
key: string;
|
|
1960
|
+
label: string;
|
|
1961
|
+
sortable?: boolean;
|
|
1962
|
+
width?: string;
|
|
1963
|
+
badge?: boolean;
|
|
1964
|
+
filter?: 'text' | 'select';
|
|
1965
|
+
cellTemplate?: TemplateRef<{
|
|
1966
|
+
$implicit: unknown;
|
|
1967
|
+
row: SolDataTableRow;
|
|
1968
|
+
}>;
|
|
1969
|
+
}
|
|
1970
|
+
/**
|
|
1971
|
+
* Tabla de datos genérica dirigida por columnas: búsqueda, orden, paginación,
|
|
1972
|
+
* estado de carga (skeleton), estado vacío, filtros por columna (opt-in, ver
|
|
1973
|
+
* `DataTableColumn.filter`) y acciones por fila (posición configurable, ver
|
|
1974
|
+
* `actionsPosition`). Colapsa cada fila a un resumen expandible (sin scroll
|
|
1975
|
+
* horizontal) cuando el tema activo lo prefiere
|
|
1976
|
+
* (`component.table.mobile: "collapse"`) y el ancho de su propio HOST — no
|
|
1977
|
+
* del viewport del navegador, ver `collapseWidth` — cae por debajo del
|
|
1978
|
+
* umbral: una tabla dentro de un layout angosto (sidebar, grid a dos
|
|
1979
|
+
* columnas) colapsa aunque la ventana siga en ancho desktop.
|
|
1980
|
+
*
|
|
1981
|
+
* Componente presentacional: no conoce dominio. Las acciones no genéricas se
|
|
1982
|
+
* proyectan por el slot `#rowActions` (TemplateRef que recibe la fila).
|
|
1983
|
+
* Tematizado con `var(--sol-*)` — soporta light y dark.
|
|
1984
|
+
*/
|
|
1985
|
+
declare class SolDataTableComponent {
|
|
1986
|
+
private readonly themeService;
|
|
1987
|
+
private readonly host;
|
|
1988
|
+
readonly data: _angular_core.InputSignal<SolDataTableRow[]>;
|
|
1989
|
+
readonly columns: _angular_core.InputSignal<DataTableColumn[]>;
|
|
1990
|
+
/**
|
|
1991
|
+
* Estado de carga de la fuente de datos: sustituye el cuerpo por filas
|
|
1992
|
+
* skeleton tokenizadas y oculta la paginación mientras esté activo.
|
|
1993
|
+
*/
|
|
1994
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1995
|
+
readonly searchPlaceholder: _angular_core.InputSignal<string>;
|
|
1996
|
+
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
1997
|
+
readonly paginated: _angular_core.InputSignal<boolean>;
|
|
1998
|
+
readonly showToolbar: _angular_core.InputSignal<boolean>;
|
|
1999
|
+
readonly filterPosition: _angular_core.InputSignal<"right" | "left">;
|
|
2000
|
+
readonly showActions: _angular_core.InputSignal<boolean>;
|
|
2001
|
+
readonly showEditAction: _angular_core.InputSignal<boolean>;
|
|
2002
|
+
readonly showDeleteAction: _angular_core.InputSignal<boolean>;
|
|
2003
|
+
readonly trackByKey: _angular_core.InputSignal<string>;
|
|
2004
|
+
/** Encabezado de la columna de acciones. */
|
|
2005
|
+
readonly actionsLabel: _angular_core.InputSignal<string>;
|
|
2006
|
+
/**
|
|
2007
|
+
* Posición de la columna de acciones (0.6.0). `'end'` (default) preserva
|
|
2008
|
+
* el comportamiento previo — th/td de acciones después de las columnas de
|
|
2009
|
+
* datos. `'start'` los renderiza ANTES, como primera columna (aplica al
|
|
2010
|
+
* `#rowActions` proyectado y a los botones editar/eliminar por defecto
|
|
2011
|
+
* por igual). Sin efecto en el modo colapsado móvil: ahí las acciones
|
|
2012
|
+
* siguen viviendo solo en el detalle expandido de la card.
|
|
2013
|
+
*/
|
|
2014
|
+
readonly actionsPosition: _angular_core.InputSignal<"start" | "end">;
|
|
2015
|
+
/**
|
|
2016
|
+
* aria-label del botón ▶ de expansión de fila en el modo móvil. El default
|
|
2017
|
+
* se alinea con el texto de la clave i18n `shared.table.toggleDetails`
|
|
2018
|
+
* para que cualquier consumidor que no lo sobreescriba (vía
|
|
2019
|
+
* `[toggleDetailsLabel]`) obtenga el texto correcto sin necesidad de
|
|
2020
|
+
* traducción explícita.
|
|
2021
|
+
*/
|
|
2022
|
+
readonly toggleDetailsLabel: _angular_core.InputSignal<string>;
|
|
2023
|
+
/**
|
|
2024
|
+
* Activa la animación de entrada (`solRowReveal`, ver directiva interna
|
|
2025
|
+
* arriba) en cada fila/tarjeta. Default `true`: preserva el
|
|
2026
|
+
* comportamiento visual del widget local que este componente reemplazó
|
|
2027
|
+
* (PR7a/T51) sin requerir cambios en los consumidores existentes — el
|
|
2028
|
+
* intensity "none"/`prefers-reduced-motion` del tema ya neutraliza el
|
|
2029
|
+
* efecto (duración ~1ms, distancia 0) para quien no lo quiera, sin
|
|
2030
|
+
* necesidad de apagar este input.
|
|
2031
|
+
*/
|
|
2032
|
+
readonly rowReveal: _angular_core.InputSignal<boolean>;
|
|
2033
|
+
/**
|
|
2034
|
+
* Ancho (px) del HOST bajo el cual la tabla colapsa a cards (0.6.0).
|
|
2035
|
+
* Reemplaza el criterio anterior, que solo miraba el viewport del
|
|
2036
|
+
* navegador (`matchMedia`) — la fuente de verdad ahora es un
|
|
2037
|
+
* `ResizeObserver` sobre el propio elemento raíz del componente, así que
|
|
2038
|
+
* una tabla dentro de un contenedor angosto (sidebar, grid a dos
|
|
2039
|
+
* columnas) colapsa aunque la ventana siga en ancho desktop. El default
|
|
2040
|
+
* (767) conserva el breakpoint canónico previo.
|
|
2041
|
+
*/
|
|
2042
|
+
readonly collapseWidth: _angular_core.InputSignal<number>;
|
|
2043
|
+
/**
|
|
2044
|
+
* Variante visual (0.6.0): `clean` | `zebra` | `bordered` | `emphasis-header`
|
|
2045
|
+
* | `banded`. Sobrescribe `component.table.variant` del tema activo; `null`
|
|
2046
|
+
* (default) deja decidir al tema y, si el tema tampoco la declara, la tabla
|
|
2047
|
+
* conserva su look de siempre. Los colores salen de `var(--sol-*)`, así que
|
|
2048
|
+
* la variante reacciona sola a claro/oscuro.
|
|
2049
|
+
*/
|
|
2050
|
+
readonly variant: _angular_core.InputSignal<SolTableVariant | null>;
|
|
2051
|
+
readonly editClicked: _angular_core.OutputEmitterRef<SolDataTableRow>;
|
|
2052
|
+
readonly deleteClicked: _angular_core.OutputEmitterRef<SolDataTableRow>;
|
|
2053
|
+
/**
|
|
2054
|
+
* Plantilla de acciones por fila proyectada con `#rowActions`. Recibe la fila
|
|
2055
|
+
* como `$implicit`. Cuando existe, reemplaza los botones editar/eliminar por
|
|
2056
|
+
* defecto: aquí van las acciones específicas del dominio del consumidor.
|
|
2057
|
+
*/
|
|
2058
|
+
readonly rowActionsTemplate: Signal<TemplateRef<{
|
|
2059
|
+
$implicit: SolDataTableRow;
|
|
2060
|
+
}> | undefined>;
|
|
2061
|
+
/**
|
|
2062
|
+
* Carga "estirada" a un mínimo visible (anti-flash): con un backend rápido
|
|
2063
|
+
* `loading` se apaga antes de que el skeleton se perciba. `loadingVisible`
|
|
2064
|
+
* mantiene el skeleton un instante mínimo — es lo que consume el template.
|
|
2065
|
+
*/
|
|
2066
|
+
protected readonly loadingVisible: Signal<boolean>;
|
|
2067
|
+
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
2068
|
+
readonly currentPage: _angular_core.WritableSignal<number>;
|
|
2069
|
+
readonly pageSize: _angular_core.WritableSignal<number>;
|
|
2070
|
+
readonly sortKey: _angular_core.WritableSignal<string>;
|
|
2071
|
+
readonly sortDirection: _angular_core.WritableSignal<"desc" | "asc">;
|
|
2072
|
+
/** Valor de filtro por columna (0.6.0), indexado por `DataTableColumn.key`. */
|
|
2073
|
+
readonly columnFilters: _angular_core.WritableSignal<Record<string, string>>;
|
|
2074
|
+
/**
|
|
2075
|
+
* Clave de replay de `solRowReveal`: cambia con cualquier búsqueda, orden
|
|
2076
|
+
* o paginación — reinicia la animación de entrada de las filas visibles
|
|
2077
|
+
* (paridad con el widget local: `solRevealReplay` sobre el mismo filtro).
|
|
2078
|
+
*/
|
|
2079
|
+
readonly revealReplayKey: Signal<string>;
|
|
2080
|
+
/**
|
|
2081
|
+
* Señal reactiva al ancho del HOST (0.6.0, ver `collapseWidth`): true
|
|
2082
|
+
* cuando el ResizeObserver mide un ancho <= `collapseWidth()`. Fuente de
|
|
2083
|
+
* verdad del colapso — ya NO es el viewport del navegador.
|
|
2084
|
+
*/
|
|
2085
|
+
readonly isContainerNarrow: Signal<boolean>;
|
|
2086
|
+
/** Índices de las filas fantasma del estado de carga (7 filas fijas). */
|
|
2087
|
+
protected readonly skeletonRows: number[];
|
|
2088
|
+
/**
|
|
2089
|
+
* Token aditivo `component.table.mobile` del ThemeFile activo.
|
|
2090
|
+
* "collapse" (default): filas colapsables sin scroll horizontal.
|
|
2091
|
+
* "scroll": conserva la tabla con overflow-x. El token ajusta la
|
|
2092
|
+
* preferencia — NUNCA la estructura del componente.
|
|
2093
|
+
*/
|
|
2094
|
+
private readonly tableMobileMode;
|
|
2095
|
+
/** Variante efectiva: el input manda; si no, `component.table.variant` del tema activo. */
|
|
2096
|
+
readonly effectiveVariant: Signal<SolTableVariant | null>;
|
|
2097
|
+
/** El modo colapsado aplica solo con host angosto (`collapseWidth`) y preferencia "collapse". */
|
|
2098
|
+
readonly mobileCollapse: Signal<boolean>;
|
|
2099
|
+
/** Filas expandidas del modo colapsado (por id de trackBy). */
|
|
2100
|
+
readonly expandedRows: _angular_core.WritableSignal<ReadonlySet<string | number>>;
|
|
2101
|
+
/** Columna título de la fila colapsada = primera columna configurada. */
|
|
2102
|
+
readonly mobileTitleCol: Signal<DataTableColumn | undefined>;
|
|
2103
|
+
/** Columna del chip de estado = la marcada con `badge: true` (si existe). */
|
|
2104
|
+
readonly mobileBadgeCol: Signal<DataTableColumn | undefined>;
|
|
2105
|
+
/** Subdato = la segunda columna que no sea el chip de estado. */
|
|
2106
|
+
readonly mobileSubtitleCol: Signal<DataTableColumn | undefined>;
|
|
2107
|
+
/** Columnas ocultas en el colapso: todas menos título, subdato y chip. */
|
|
2108
|
+
readonly mobileDetailCols: Signal<DataTableColumn[]>;
|
|
2109
|
+
/** true si AL MENOS una columna declara `filter` — dispara la fila de filtros. */
|
|
2110
|
+
readonly hasColumnFilters: Signal<boolean>;
|
|
2111
|
+
readonly filteredData: Signal<SolDataTableRow[]>;
|
|
2112
|
+
readonly pagedData: Signal<SolDataTableRow[]>;
|
|
2113
|
+
resolveValue(row: SolDataTableRow, key: string): unknown;
|
|
2114
|
+
trackId(index: number, row: SolDataTableRow): string | number;
|
|
2115
|
+
/**
|
|
2116
|
+
* Valores únicos (ordenados) de `column` dentro de `data()` — puebla el
|
|
2117
|
+
* `<select>` de su filtro (0.6.0). Deriva del dataset completo, no del ya
|
|
2118
|
+
* filtrado: así las opciones no desaparecen a medida que el propio
|
|
2119
|
+
* usuario filtra.
|
|
2120
|
+
*/
|
|
2121
|
+
columnFilterOptions(column: DataTableColumn): string[];
|
|
2122
|
+
/** Estado de expansión de una fila en el modo móvil colapsado. */
|
|
2123
|
+
isRowExpanded(id: string | number): boolean;
|
|
2124
|
+
/** Expande/colapsa una fila del modo móvil colapsado. */
|
|
2125
|
+
toggleRow(id: string | number): void;
|
|
2126
|
+
onSearch(term: string): void;
|
|
2127
|
+
/** Cambia el filtro de una columna (0.6.0) desde su input/select nativo. */
|
|
2128
|
+
onColumnFilterChange(key: string, event: Event): void;
|
|
2129
|
+
onSort(key: string): void;
|
|
2130
|
+
onPageSizeChange(size: number): void;
|
|
2131
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolDataTableComponent, never>;
|
|
2132
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolDataTableComponent, "sol-data-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "paginated": { "alias": "paginated"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "filterPosition": { "alias": "filterPosition"; "required": false; "isSignal": true; }; "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "showEditAction": { "alias": "showEditAction"; "required": false; "isSignal": true; }; "showDeleteAction": { "alias": "showDeleteAction"; "required": false; "isSignal": true; }; "trackByKey": { "alias": "trackByKey"; "required": false; "isSignal": true; }; "actionsLabel": { "alias": "actionsLabel"; "required": false; "isSignal": true; }; "actionsPosition": { "alias": "actionsPosition"; "required": false; "isSignal": true; }; "toggleDetailsLabel": { "alias": "toggleDetailsLabel"; "required": false; "isSignal": true; }; "rowReveal": { "alias": "rowReveal"; "required": false; "isSignal": true; }; "collapseWidth": { "alias": "collapseWidth"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "editClicked": "editClicked"; "deleteClicked": "deleteClicked"; }, ["rowActionsTemplate"], ["[tableFilters]", "[tableActions]"], true, never>;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* Serializador HTML "limpio" para `sol-rich-editor`.
|
|
2137
|
+
*
|
|
2138
|
+
* NÚCLEO DEL VALOR: recorre el DOM del área editable (o un HTML pegado) y
|
|
2139
|
+
* produce HTML SEMÁNTICO CANÓNICO apto para generar PDFs con TCPDF (Laravel).
|
|
2140
|
+
* TCPDF tiene un parser HTML muy limitado: rompe con `<div>`/`<span>` con
|
|
2141
|
+
* estilos inline arbitrarios, clases desconocidas y —sobre todo— tablas
|
|
2142
|
+
* anidadas. Este serializador garantiza una salida acotada y predecible.
|
|
2143
|
+
*
|
|
2144
|
+
* ── Allowlist de TAGS de salida ──────────────────────────────────────────
|
|
2145
|
+
* Bloque: <p> <h1> <h2> <h3> <ul> <ol> <li> <table><tbody><tr><td> <br>
|
|
2146
|
+
* Inline: <strong> <em> <u> <s> <a> <img>
|
|
2147
|
+
* Chip: <span data-mention-id="…"> / <span data-task-key="…"> (OPT-IN)
|
|
2148
|
+
* Nada más. Todo lo demás se desanida (unwrap), se convierte o se descarta.
|
|
2149
|
+
*
|
|
2150
|
+
* ── Chips de mención (@) y enlace de tarea (#) — OPT-IN ───────────────────
|
|
2151
|
+
* Un `<span>` se PRESERVA en la salida SOLO si porta `data-mention-id` o
|
|
2152
|
+
* `data-task-key`. En ese caso se emite un span canónico con EXACTAMENTE ese
|
|
2153
|
+
* único atributo data-* (valor escapado) y su texto; cualquier otro atributo
|
|
2154
|
+
* del span de entrada (class, style, on*, contenteditable, href…) se DESCARTA
|
|
2155
|
+
* —no hay passthrough—. Un `<span>` normal (sin data de chip) se desanida
|
|
2156
|
+
* como siempre. Esto no abre XSS: solo el atributo data-* controlado y el
|
|
2157
|
+
* texto escapado sobreviven; el span nunca lleva estilos ni handlers.
|
|
2158
|
+
*
|
|
2159
|
+
* ── Conversión de tags de entrada ────────────────────────────────────────
|
|
2160
|
+
* <b>/<strong> → <strong>
|
|
2161
|
+
* <i>/<em> → <em>
|
|
2162
|
+
* <u>/<ins> → <u>
|
|
2163
|
+
* <s>/<strike>/<del> → <s>
|
|
2164
|
+
* <div> → <p> (o se desanida si contiene bloques)
|
|
2165
|
+
* <h4..h6> → <h3> (se acota la jerarquía)
|
|
2166
|
+
* <span>/<font> → se desanida; sus estilos (negrita/cursiva/subrayado/
|
|
2167
|
+
* tachado) se traducen a los tags semánticos anteriores.
|
|
2168
|
+
* <thead>/<tbody>/<tfoot> → se aplanan dentro de <tbody>.
|
|
2169
|
+
*
|
|
2170
|
+
* ── Allowlist de PROPIEDADES CSS de ENTRADA ──────────────────────────────
|
|
2171
|
+
* Solo se INSPECCIONAN estas cuatro; el resto de estilos inline se descarta:
|
|
2172
|
+
* - font-weight → se convierte a <strong>
|
|
2173
|
+
* - font-style → se convierte a <em>
|
|
2174
|
+
* - text-decoration → se convierte a <u> y/o <s>
|
|
2175
|
+
* - text-align → se conserva como style="text-align:…" en el bloque
|
|
2176
|
+
* IMPORTANTE: los estilos NO se copian tal cual a la salida. El serializador
|
|
2177
|
+
* DESCARTA todos los estilos de entrada y RE-GENERA solo los canónicos que
|
|
2178
|
+
* él controla:
|
|
2179
|
+
* - `style="text-align:center|right|justify"` en bloques (p/h1-3/celda)
|
|
2180
|
+
* - `style="display:block;margin:0 auto"` en imágenes centradas
|
|
2181
|
+
* Por eso el `style` de las imágenes centradas no viola la allowlist: no es
|
|
2182
|
+
* un passthrough del usuario, es salida canónica autogenerada.
|
|
2183
|
+
*
|
|
2184
|
+
* ── Tablas anidadas ──────────────────────────────────────────────────────
|
|
2185
|
+
* TCPDF rompe con tablas dentro de celdas. Cuando una <table> aparece dentro
|
|
2186
|
+
* de una celda, se APLANA: sus celdas se serializan como texto inline
|
|
2187
|
+
* separado por <br> dentro de la celda contenedora (nunca se emiten tags de
|
|
2188
|
+
* tabla anidados). Igual criterio para bloques/listas dentro de celdas: se
|
|
2189
|
+
* convierten a inline + <br> para mantener las celdas TCPDF-safe.
|
|
2190
|
+
*
|
|
2191
|
+
* ── Seguridad (anti-XSS) ─────────────────────────────────────────────────
|
|
2192
|
+
* `sanitizeHtmlToTcpdf` parsea el HTML no confiable con DOMParser (documento
|
|
2193
|
+
* INERTE: no ejecuta scripts, no dispara handlers, no carga recursos) y luego
|
|
2194
|
+
* serializa por allowlist. `<script>`, `<style>`, `<iframe>`, handlers `on*`,
|
|
2195
|
+
* `href="javascript:"` y `src` no permitidos se descartan.
|
|
2196
|
+
*/
|
|
2197
|
+
/**
|
|
2198
|
+
* Tags permitidos en la salida (para documentación/validación externa).
|
|
2199
|
+
* `span` SOLO se emite para chips de mención/tarea (`data-mention-id` /
|
|
2200
|
+
* `data-task-key`); un `<span>` normal se sigue desanidando.
|
|
2201
|
+
*/
|
|
2202
|
+
declare const TCPDF_ALLOWED_TAGS: readonly ["p", "h1", "h2", "h3", "strong", "em", "u", "s", "ul", "ol", "li", "table", "tbody", "tr", "td", "a", "img", "br", "span"];
|
|
2203
|
+
/**
|
|
2204
|
+
* Propiedades CSS de ENTRADA que el serializador inspecciona. `text-align` se
|
|
2205
|
+
* conserva como estilo canónico en bloques; las otras tres se traducen a tags
|
|
2206
|
+
* semánticos (no se emiten como `style`).
|
|
2207
|
+
*/
|
|
2208
|
+
declare const TCPDF_ALLOWED_STYLE_PROPERTIES: readonly ["text-align", "font-weight", "font-style", "text-decoration"];
|
|
2209
|
+
/**
|
|
2210
|
+
* Serializa el contenido de un elemento (típicamente el `contenteditable`) a
|
|
2211
|
+
* HTML canónico TCPDF-safe. Función PURA: no muta el DOM recibido.
|
|
2212
|
+
*/
|
|
2213
|
+
declare function serializeElementToTcpdfHtml(root: HTMLElement): string;
|
|
2214
|
+
/**
|
|
2215
|
+
* Sanea un HTML NO CONFIABLE (pegado, o valor externo del formulario) a HTML
|
|
2216
|
+
* canónico TCPDF-safe. Parsea con DOMParser (documento inerte: sin ejecución
|
|
2217
|
+
* de scripts ni carga de recursos) y aplica la allowlist. Devuelve '' si no hay
|
|
2218
|
+
* DOMParser disponible (p. ej. SSR).
|
|
2219
|
+
*/
|
|
2220
|
+
declare function sanitizeHtmlToTcpdf(rawHtml: string): string;
|
|
2221
|
+
|
|
2222
|
+
type SolAvatarSize = 'sm' | 'md' | 'lg';
|
|
2223
|
+
/**
|
|
2224
|
+
* Hash determinista (multiplicador 31, estilo `String.hashCode` de Java) de
|
|
2225
|
+
* una semilla a un índice `[0, paletteSize)`. PURA: sin `Date`/`Math.random`/
|
|
2226
|
+
* estado — la misma semilla SIEMPRE produce el mismo índice, en cualquier
|
|
2227
|
+
* instancia y en cualquier momento (spec: solercia-ui-vocero-atoms#color
|
|
2228
|
+
* estable entre instancias).
|
|
2229
|
+
*
|
|
2230
|
+
* Tolera `null`/`undefined` (índice 0/neutral) sin lanzar: `input.required()`
|
|
2231
|
+
* de Angular solo exige que el BINDING exista en el template — no que el
|
|
2232
|
+
* valor resuelto sea no-nulo en runtime. Un `[name]="entidad.nombre"` mientras
|
|
2233
|
+
* la data todavía carga pasa `undefined` sin que Angular lo bloquee (NG0950
|
|
2234
|
+
* solo dispara si el binding falta por completo, no si resuelve a `undefined`).
|
|
2235
|
+
*/
|
|
2236
|
+
declare function hashToPaletteIndex(seed: string | null | undefined, paletteSize?: number): number;
|
|
2237
|
+
/**
|
|
2238
|
+
* Iniciales a partir de un nombre: nombre compuesto → primera letra de la
|
|
2239
|
+
* primera y de la última palabra ("Ana Torres" → "AT"); una sola palabra →
|
|
1805
2240
|
* sus 2 primeras letras; vacío/solo espacios → cadena vacía; `null`/
|
|
1806
2241
|
* `undefined` (mismo motivo que `hashToPaletteIndex` arriba) → `'?'` como
|
|
1807
2242
|
* placeholder visual explícito. PURA.
|
|
@@ -1876,6 +2311,196 @@ declare class SolStarRatingComponent {
|
|
|
1876
2311
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolStarRatingComponent, "sol-star-rating", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1877
2312
|
}
|
|
1878
2313
|
|
|
2314
|
+
type SolRatingInputSize = 'sm' | 'md' | 'lg';
|
|
2315
|
+
/**
|
|
2316
|
+
* `sol-rating-input` — calificación INTERACTIVA de 1 a 5 estrellas.
|
|
2317
|
+
*
|
|
2318
|
+
* ## Por qué es un componente aparte de `sol-star-rating`
|
|
2319
|
+
*
|
|
2320
|
+
* `sol-star-rating` es de SOLO LECTURA: su contenedor es un `role="img"` con
|
|
2321
|
+
* el valor en el `aria-label` y sus estrellas son `aria-hidden`. Un lector de
|
|
2322
|
+
* pantalla anuncia «4,3 de 5» de un tirón, como quien lee una imagen.
|
|
2323
|
+
*
|
|
2324
|
+
* Este componente es un GRUPO DE OPCIONES: `role="radiogroup"` con cinco
|
|
2325
|
+
* `role="radio"`, `aria-checked` por estrella, navegación por teclado y una
|
|
2326
|
+
* sola parada de tabulación. Son dos contratos de accesibilidad distintos —
|
|
2327
|
+
* mostrar un valor y capturarlo no son el mismo widget. Unirlos detrás de una
|
|
2328
|
+
* bandera `interactive` obligaría a alternar rol, foco, tabindex y semántica
|
|
2329
|
+
* de cada estrella dentro de una misma clase, y ninguno de los dos modos
|
|
2330
|
+
* quedaría bien. Por eso `sol-star-rating` NO se modificó.
|
|
2331
|
+
*
|
|
2332
|
+
* ## Sin valor por defecto (decisión deliberada)
|
|
2333
|
+
*
|
|
2334
|
+
* El principio de «smart defaults» dice que pre-seleccionar lo probable ahorra
|
|
2335
|
+
* decisiones. Este es exactamente el caso donde ese principio NO aplica: su
|
|
2336
|
+
* límite ético es que el default debe servir a quien responde, no a quien
|
|
2337
|
+
* pregunta. Una calificación pre-marcada ancla la respuesta (sesgo de anclaje)
|
|
2338
|
+
* y le sirve al negocio, no a la clienta: si arranca en 5, la respuesta media
|
|
2339
|
+
* sube sin que nadie lo haya decidido, y el dato deja de medir la experiencia.
|
|
2340
|
+
*
|
|
2341
|
+
* Por eso `value` arranca en `null` y las cinco estrellas nacen vacías, con
|
|
2342
|
+
* ninguna `aria-checked="true"` — un radiogroup sin opción marcada es
|
|
2343
|
+
* perfectamente válido en ARIA. `writeValue(null)` vuelve a ese estado.
|
|
2344
|
+
*
|
|
2345
|
+
* ## Teclado (patrón radiogroup de WAI-ARIA)
|
|
2346
|
+
*
|
|
2347
|
+
* - `Tab` entra al grupo una sola vez: cae en la estrella marcada, o en la
|
|
2348
|
+
* primera cuando todavía no hay calificación (roving tabindex).
|
|
2349
|
+
* - `←`/`↑` y `→`/`↓` mueven el foco y marcan la estrella que reciben — es el
|
|
2350
|
+
* comportamiento estándar de un grupo de radios. Los extremos no dan la
|
|
2351
|
+
* vuelta: `←` sobre la primera la marca (así la estrella 1 siempre es
|
|
2352
|
+
* alcanzable sin ratón).
|
|
2353
|
+
* - `Inicio`/`Fin` saltan a la primera/última y la marcan.
|
|
2354
|
+
* - `Espacio` marca la estrella enfocada — útil al entrar al grupo vacío sin
|
|
2355
|
+
* haber movido el foco.
|
|
2356
|
+
* - `Suprimir`/`Retroceso` limpian la selección cuando `allowClear` está
|
|
2357
|
+
* activo.
|
|
2358
|
+
*
|
|
2359
|
+
* ## Estados
|
|
2360
|
+
*
|
|
2361
|
+
* - **normal**: interactivo.
|
|
2362
|
+
* - **`disabled`**: no se puede usar ni enfocar (`aria-disabled` en el grupo).
|
|
2363
|
+
* Lo activa el input homónimo o un `control.disable()` del formulario.
|
|
2364
|
+
* - **`readOnly`**: el valor está congelado pero se lee con contraste pleno y
|
|
2365
|
+
* sigue siendo enfocable (`aria-readonly`). Distinto de `disabled` a
|
|
2366
|
+
* propósito: «esto ya no se cambia» no es lo mismo que «esto no es para ti».
|
|
2367
|
+
* - **`error`**: mensaje visible (mismo contrato de `sol-input`: un texto, no
|
|
2368
|
+
* un booleano), `aria-invalid` y `aria-describedby` sobre el grupo.
|
|
2369
|
+
*
|
|
2370
|
+
* La vista previa al pasar el ratón pinta las estrellas pero NUNCA toca
|
|
2371
|
+
* `value` ni `aria-checked`: al salir el puntero vuelve lo elegido, así que
|
|
2372
|
+
* pasar por encima jamás pierde la respuesta de la clienta.
|
|
2373
|
+
*
|
|
2374
|
+
* Objetivo táctil: cada estrella reserva un área real de 44×44 px (ley de
|
|
2375
|
+
* Fitts) porque se usa desde el celular; por eso el tamaño por defecto es
|
|
2376
|
+
* `lg` y no el `sm` del componente de solo lectura.
|
|
2377
|
+
*
|
|
2378
|
+
* ```html
|
|
2379
|
+
* <sol-rating-input
|
|
2380
|
+
* formControlName="calificacion"
|
|
2381
|
+
* ariaLabelKey="pages.appointment.rateVisit"
|
|
2382
|
+
* [allowClear]="true"
|
|
2383
|
+
* [error]="form.controls.calificacion.touched && form.controls.calificacion.invalid
|
|
2384
|
+
* ? ('pages.appointment.rateRequired' | transloco) : ''"
|
|
2385
|
+
* (ratingChanged)="registrar($event)"
|
|
2386
|
+
* />
|
|
2387
|
+
* ```
|
|
2388
|
+
*/
|
|
2389
|
+
declare class SolRatingInputComponent implements ControlValueAccessor {
|
|
2390
|
+
private readonly i18n;
|
|
2391
|
+
/** Botones de estrella renderizados, en el mismo orden que `stars`. */
|
|
2392
|
+
private readonly starRefs;
|
|
2393
|
+
private static nextId;
|
|
2394
|
+
/** Id del mensaje de error, referenciado por `aria-describedby` del grupo. */
|
|
2395
|
+
protected readonly errorId: string;
|
|
2396
|
+
/** Tamaño de las estrellas. Hereda la escala de `sol-icon`. */
|
|
2397
|
+
readonly size: _angular_core.InputSignal<SolRatingInputSize>;
|
|
2398
|
+
/** Bloquea el control por completo: ni se usa ni se enfoca. */
|
|
2399
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2400
|
+
/** Congela el valor conservando contraste y foco (`aria-readonly`). */
|
|
2401
|
+
readonly readOnly: _angular_core.InputSignal<boolean>;
|
|
2402
|
+
/** Mensaje de error visible. Cadena vacía = sin error (contrato de `sol-input`). */
|
|
2403
|
+
readonly error: _angular_core.InputSignal<string>;
|
|
2404
|
+
/** Habilita quitar la calificación ya dada (botón visible + Suprimir/Retroceso). */
|
|
2405
|
+
readonly allowClear: _angular_core.InputSignal<boolean>;
|
|
2406
|
+
/** Clave i18n del nombre accesible del grupo. */
|
|
2407
|
+
readonly ariaLabelKey: _angular_core.InputSignal<string>;
|
|
2408
|
+
/** Clave i18n del nombre accesible de cada estrella (recibe `value` y `max`). */
|
|
2409
|
+
readonly optionLabelKey: _angular_core.InputSignal<string>;
|
|
2410
|
+
/** Clave i18n del botón que quita la calificación. */
|
|
2411
|
+
readonly clearLabelKey: _angular_core.InputSignal<string>;
|
|
2412
|
+
/** Emite la calificación elegida, o `null` cuando se limpia. */
|
|
2413
|
+
readonly ratingChanged: _angular_core.OutputEmitterRef<number | null>;
|
|
2414
|
+
/**
|
|
2415
|
+
* Calificación actual. `null` = sin responder — el estado inicial, a
|
|
2416
|
+
* propósito (ver el JSDoc de la clase).
|
|
2417
|
+
*/
|
|
2418
|
+
readonly value: _angular_core.WritableSignal<number | null>;
|
|
2419
|
+
/** Estrella bajo el puntero. Solo pinta: nunca cambia `value`. */
|
|
2420
|
+
private readonly previewValue;
|
|
2421
|
+
/** Última estrella enfocada; manda sobre `value` para el roving tabindex. */
|
|
2422
|
+
private readonly focusedIndex;
|
|
2423
|
+
/** Valores del `@for`: las 5 estrellas, de 1 a 5. */
|
|
2424
|
+
protected readonly stars: number[];
|
|
2425
|
+
/**
|
|
2426
|
+
* Deshabilitado desde el formulario (`control.disable()`), independiente del
|
|
2427
|
+
* input `disabled`.
|
|
2428
|
+
*/
|
|
2429
|
+
private readonly formDisabled;
|
|
2430
|
+
/**
|
|
2431
|
+
* Deshabilitado efectivo: el input del consumidor O el estado del formulario.
|
|
2432
|
+
*
|
|
2433
|
+
* Diverge a propósito de los controles más viejos de la librería
|
|
2434
|
+
* (`sol-select`, `sol-number-input`), que dejan `setDisabledState` vacío y
|
|
2435
|
+
* solo miran su input: con `[formControl]`, un `control.disable()` los deja
|
|
2436
|
+
* plenamente usables. Aquí el formulario SÍ manda, que es lo que un
|
|
2437
|
+
* `ControlValueAccessor` promete.
|
|
2438
|
+
*/
|
|
2439
|
+
protected readonly isDisabled: _angular_core.Signal<boolean>;
|
|
2440
|
+
/** `true` cuando el control admite cambios (ni deshabilitado ni de solo lectura). */
|
|
2441
|
+
protected readonly interactive: _angular_core.Signal<boolean>;
|
|
2442
|
+
/** El botón de limpiar solo existe si hay algo que limpiar y se puede. */
|
|
2443
|
+
protected readonly canClear: _angular_core.Signal<boolean>;
|
|
2444
|
+
/**
|
|
2445
|
+
* Índice (base 0) de la única estrella que participa del orden de tabulación:
|
|
2446
|
+
* la enfocada por última vez, si no la marcada, y si tampoco hay, la primera.
|
|
2447
|
+
* Nunca depende de la vista previa del ratón.
|
|
2448
|
+
*/
|
|
2449
|
+
protected readonly rovingIndex: _angular_core.Signal<number>;
|
|
2450
|
+
protected readonly groupLabel: _angular_core.Signal<string>;
|
|
2451
|
+
protected readonly clearLabel: _angular_core.Signal<string>;
|
|
2452
|
+
private onChange;
|
|
2453
|
+
private onTouched;
|
|
2454
|
+
/** `aria-checked` de la estrella: mira SOLO el valor, jamás la vista previa. */
|
|
2455
|
+
protected isChecked(star: number): boolean;
|
|
2456
|
+
/** Pintado: la vista previa manda sobre el valor mientras el puntero esté encima. */
|
|
2457
|
+
protected isFilled(star: number): boolean;
|
|
2458
|
+
protected tabIndexFor(star: number): number;
|
|
2459
|
+
protected optionLabel(star: number): string;
|
|
2460
|
+
protected onStarFocus(star: number): void;
|
|
2461
|
+
protected preview(star: number): void;
|
|
2462
|
+
protected clearPreview(): void;
|
|
2463
|
+
protected markTouched(): void;
|
|
2464
|
+
/**
|
|
2465
|
+
* Marca una estrella. Reemite solo si el valor cambió de verdad.
|
|
2466
|
+
*
|
|
2467
|
+
* Normaliza la entrada (`1..5`) antes de tocar nada: la plantilla nunca
|
|
2468
|
+
* manda un valor fuera de escala, pero este método es público y un consumidor
|
|
2469
|
+
* podría llamarlo con cualquier número — una calificación de 9 rompería el
|
|
2470
|
+
* `aria-checked` de las cinco estrellas.
|
|
2471
|
+
*/
|
|
2472
|
+
select(star: number): void;
|
|
2473
|
+
/** Vuelve al estado «sin responder». Requiere `allowClear`. */
|
|
2474
|
+
clear(): void;
|
|
2475
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
2476
|
+
/**
|
|
2477
|
+
* Mueve el foco a la estrella `index` (base 0) por referencia de plantilla,
|
|
2478
|
+
* sin depender de selectores CSS internos — mismo criterio que `sol-chip-group`.
|
|
2479
|
+
*/
|
|
2480
|
+
private focusStar;
|
|
2481
|
+
/**
|
|
2482
|
+
* Resuelve un texto por i18n con respaldo es-CO propio.
|
|
2483
|
+
*
|
|
2484
|
+
* El contrato `SolI18n` devuelve la CLAVE cuando falta la traducción, así que
|
|
2485
|
+
* ese caso se detecta y se cae al texto de la casa en vez de anunciarle la
|
|
2486
|
+
* clave cruda a un lector de pantalla — mismo criterio de `sol-star-rating`.
|
|
2487
|
+
*/
|
|
2488
|
+
private text;
|
|
2489
|
+
/**
|
|
2490
|
+
* Normaliza lo que llegue del formulario a `1..5` o `null`. Un `0`, un `NaN`
|
|
2491
|
+
* o un `undefined` significan «sin responder», no «cero estrellas»: la escala
|
|
2492
|
+
* empieza en 1 y el vacío tiene que seguir siendo distinguible.
|
|
2493
|
+
*/
|
|
2494
|
+
writeValue(value: number | null): void;
|
|
2495
|
+
registerOnChange(fn: (value: number | null) => void): void;
|
|
2496
|
+
registerOnTouched(fn: () => void): void;
|
|
2497
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2498
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolRatingInputComponent, never>;
|
|
2499
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolRatingInputComponent, "sol-rating-input", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "allowClear": { "alias": "allowClear"; "required": false; "isSignal": true; }; "ariaLabelKey": { "alias": "ariaLabelKey"; "required": false; "isSignal": true; }; "optionLabelKey": { "alias": "optionLabelKey"; "required": false; "isSignal": true; }; "clearLabelKey": { "alias": "clearLabelKey"; "required": false; "isSignal": true; }; }, { "ratingChanged": "ratingChanged"; }, never, never, true, never>;
|
|
2500
|
+
}
|
|
2501
|
+
/** Recorta cualquier entrada a una calificación válida (`1..5`) o a `null`. */
|
|
2502
|
+
declare function normalizeRating(raw: number | null | undefined): number | null;
|
|
2503
|
+
|
|
1879
2504
|
/**
|
|
1880
2505
|
* Tono semántico compartido por los átomos de vocero (`sol-score-badge`,
|
|
1881
2506
|
* `sol-trend`) y cualquier otro componente que necesite un color por
|
|
@@ -3807,318 +4432,570 @@ declare class SolFlowCanvasComponent {
|
|
|
3807
4432
|
* Calcula una posición `{x,y}` (esquina superior izquierda, espacio canvas)
|
|
3808
4433
|
* para CADA nodo de `nodes` — dagre cuando el chunk lazy carga y el layout
|
|
3809
4434
|
* corre sin errores; el fallback BFS síncrono si cualquiera de los dos falla
|
|
3810
|
-
* (W2, "dagre sin red" — ver docstring del módulo). Aristas que referencian
|
|
3811
|
-
* un nodo ausente en `nodes` se ignoran (mismo criterio de robustez que
|
|
3812
|
-
* `visibleEdges()` del componente). Grafos con ciclos (incluidos self-loops,
|
|
3813
|
-
* ver `flow-canvas-layout.spec.ts`) NUNCA lanzan por sí solos — dagre los
|
|
3814
|
-
* rompe internamente (`acyclicer`) solo para calcular el ranking, sin mutar
|
|
3815
|
-
* el grafo de entrada de este módulo; el `try/catch` cubre fallas AJENAS al
|
|
3816
|
-
* grafo (carga del chunk, errores internos inesperados de la librería).
|
|
3817
|
-
*
|
|
3818
|
-
* Determinístico bajo AMBOS caminos: nodos/aristas se insertan/procesan en
|
|
3819
|
-
* un orden ESTABLE (ids ordenados alfabéticamente), nunca el orden de
|
|
3820
|
-
* inserción de `nodes`/`edges` — la MISMA entrada produce SIEMPRE la misma
|
|
3821
|
-
* salida. Normaliza el resultado al origen (nunca devuelve coordenadas
|
|
3822
|
-
* negativas), mismo criterio que `clampPosition` en `flow-canvas.component.ts`
|
|
3823
|
-
* (ese clamp sigue existiendo como red de seguridad en el punto de lectura).
|
|
3824
|
-
*
|
|
3825
|
-
* Robustez de entrada (mismo criterio que el resto de `@solercia/ui`):
|
|
3826
|
-
* `nodes`/`edges` toleran `null`/`undefined` sin lanzar.
|
|
3827
|
-
*/
|
|
3828
|
-
declare function computeAutoLayoutPositions(nodes: readonly SolFlowCanvasNode[] | null | undefined, edges: readonly SolFlowCanvasEdge[] | null | undefined): Promise<Map<string, SolFlowCanvasPosition>>;
|
|
3829
|
-
|
|
3830
|
-
/**
|
|
3831
|
-
* Modelo de tokens en 3 niveles (W3C DTCG-aligned): primitivos → semánticos → componente.
|
|
3832
|
-
* Los niveles VIVEN en esta fuente TS + `themes/default.theme.json` y se resuelven hacia
|
|
3833
|
-
* abajo (ver `resolveCssVars` en `theme.service.ts`) hacia el conjunto de variables
|
|
3834
|
-
* `--sol-*` de la `EMIT_TABLE`.
|
|
3835
|
-
*
|
|
3836
|
-
* ThemeFile v2 (E8 — skins white-label): todos los bloques nuevos son OPCIONALES (`?`).
|
|
3837
|
-
* Un ThemeFile v1 sigue siendo válido sin cambios: cada token v2 ausente emite su
|
|
3838
|
-
* default (el look del `default.json` actual). Ver `ThemeFile-v2-SPEC.md` del handoff.
|
|
3839
|
-
*/
|
|
3840
|
-
/** Referencia a un token, p. ej. `"{color.blue.600}"` (se resuelve contra `primitives`), o un literal. */
|
|
3841
|
-
type TokenRef = string;
|
|
3842
|
-
/** Archivo completo de theming: metadatos + primitivos compartidos + configuración por modo. */
|
|
3843
|
-
interface ThemeFile {
|
|
3844
|
-
meta: ThemeMeta;
|
|
3845
|
-
primitives: ThemePrimitives;
|
|
3846
|
-
modes: {
|
|
3847
|
-
light: ThemeModeConfig;
|
|
3848
|
-
dark: ThemeModeConfig;
|
|
3849
|
-
};
|
|
3850
|
-
}
|
|
3851
|
-
/** Metadatos invariantes de modo (no se emiten como CSS vars). */
|
|
3852
|
-
interface ThemeMeta {
|
|
3853
|
-
tenant: string;
|
|
3854
|
-
logo: ThemeLogo;
|
|
3855
|
-
/** Frase de marca del tenant (login/onboarding). v2, opcional. */
|
|
3856
|
-
tagline?: string;
|
|
3857
|
-
/**
|
|
3858
|
-
* Fuentes web por tenant. v2, opcional. La URL de carga se construye SIEMPRE
|
|
3859
|
-
* por código a partir de `family` + `weights` (jamás una URL cruda del tenant).
|
|
3860
|
-
*/
|
|
3861
|
-
fonts?: ThemeFont[];
|
|
3862
|
-
}
|
|
3863
|
-
/** Fuente web declarada por el tenant. Único proveedor permitido: Google Fonts (sanitizable por construcción). */
|
|
3864
|
-
interface ThemeFont {
|
|
3865
|
-
family: string;
|
|
3866
|
-
provider: 'google';
|
|
3867
|
-
weights: number[];
|
|
3868
|
-
}
|
|
3869
|
-
interface ThemeLogo {
|
|
3870
|
-
url: string;
|
|
3871
|
-
/** Variante del logo para modo oscuro (opcional): un tenant sin `urlDark` usa `url` en ambos modos. */
|
|
3872
|
-
urlDark?: string;
|
|
3873
|
-
altText: string;
|
|
3874
|
-
width: number;
|
|
3875
|
-
}
|
|
3876
|
-
/** Nivel 1 — primitivos: paleta y escalas compartidas entre light y dark. */
|
|
3877
|
-
interface ThemePrimitives {
|
|
3878
|
-
color: Record<string, Record<string, string> | string>;
|
|
3879
|
-
font: {
|
|
3880
|
-
/** `display` (v2, opcional) es la tipografía de titulares; sin ella se usa `sans`. */
|
|
3881
|
-
family: {
|
|
3882
|
-
sans: string;
|
|
3883
|
-
mono: string;
|
|
3884
|
-
display?: string;
|
|
3885
|
-
};
|
|
3886
|
-
size: {
|
|
3887
|
-
sm: string;
|
|
3888
|
-
base: string;
|
|
3889
|
-
lg: string;
|
|
3890
|
-
xl: string;
|
|
3891
|
-
};
|
|
3892
|
-
weight: {
|
|
3893
|
-
normal: number;
|
|
3894
|
-
bold: number;
|
|
3895
|
-
};
|
|
3896
|
-
lineHeight: {
|
|
3897
|
-
base: string;
|
|
3898
|
-
};
|
|
3899
|
-
};
|
|
3900
|
-
radius: {
|
|
3901
|
-
sm: string;
|
|
3902
|
-
md: string;
|
|
3903
|
-
lg: string;
|
|
3904
|
-
full: string;
|
|
3905
|
-
};
|
|
3906
|
-
space: {
|
|
3907
|
-
xs: string;
|
|
3908
|
-
sm: string;
|
|
3909
|
-
md: string;
|
|
3910
|
-
lg: string;
|
|
3911
|
-
xl: string;
|
|
3912
|
-
};
|
|
3913
|
-
size: {
|
|
3914
|
-
control: {
|
|
3915
|
-
sm: string;
|
|
3916
|
-
md: string;
|
|
3917
|
-
lg: string;
|
|
3918
|
-
};
|
|
3919
|
-
};
|
|
3920
|
-
z: Record<'1000' | '1050' | '1100', number>;
|
|
3921
|
-
borderWidth: {
|
|
3922
|
-
thin: string;
|
|
3923
|
-
};
|
|
3924
|
-
/** Duraciones y curvas de movimiento. v2, opcional (defaults del look actual). */
|
|
3925
|
-
motion?: ThemeMotionPrimitives;
|
|
3926
|
-
}
|
|
3927
|
-
/** Primitivos de movimiento: duraciones ("120ms") y curvas (cubic-bezier). */
|
|
3928
|
-
interface ThemeMotionPrimitives {
|
|
3929
|
-
duration: {
|
|
3930
|
-
fast: string;
|
|
3931
|
-
base: string;
|
|
3932
|
-
slow: string;
|
|
3933
|
-
};
|
|
3934
|
-
easing: {
|
|
3935
|
-
standard: string;
|
|
3936
|
-
entrance: string;
|
|
3937
|
-
};
|
|
3938
|
-
}
|
|
3939
|
-
/** Configuración de un modo visual: capa semántica + capa de componente. */
|
|
3940
|
-
interface ThemeModeConfig {
|
|
3941
|
-
semantic: ThemeSemantic;
|
|
3942
|
-
component: ThemeComponent;
|
|
3943
|
-
}
|
|
3944
|
-
/** Nivel 2 — semánticos: referencian primitivos, la asignación cambia entre light/dark. */
|
|
3945
|
-
interface ThemeSemantic {
|
|
3946
|
-
color: Record<'primary' | 'secondary' | 'accent' | 'success' | 'warning' | 'danger' | 'info', TokenRef>;
|
|
3947
|
-
text: Record<'primary' | 'secondary' | 'muted', TokenRef>;
|
|
3948
|
-
surface: {
|
|
3949
|
-
page: TokenRef;
|
|
3950
|
-
surface: TokenRef;
|
|
3951
|
-
overlay: TokenRef;
|
|
3952
|
-
/** Fondos rebajados (inputs filled, filas alternas). v2, opcional. */
|
|
3953
|
-
sunken?: TokenRef;
|
|
3954
|
-
/** background-image de la página: SOLO gradients o "none" (se sanitiza; jamás `url(`). v2, opcional. */
|
|
3955
|
-
texture?: string;
|
|
3956
|
-
};
|
|
3957
|
-
border: {
|
|
3958
|
-
color: TokenRef;
|
|
3959
|
-
width: TokenRef;
|
|
3960
|
-
};
|
|
3961
|
-
layer: {
|
|
3962
|
-
dropdown: TokenRef;
|
|
3963
|
-
modal: TokenRef;
|
|
3964
|
-
tooltip: TokenRef;
|
|
3965
|
-
};
|
|
3966
|
-
/** box-shadow es un string crudo por naturaleza — 2 niveles, sin primitivo sintético. */
|
|
3967
|
-
shadow: {
|
|
3968
|
-
sm: string;
|
|
3969
|
-
md: string;
|
|
3970
|
-
lg: string;
|
|
3971
|
-
};
|
|
3972
|
-
}
|
|
3973
|
-
/** Nivel 3 — componente: tokens con consumidor puntual. Los bloques v2 son opcionales. */
|
|
3974
|
-
interface ThemeComponent {
|
|
3975
|
-
control: {
|
|
3976
|
-
inputHeight: TokenRef;
|
|
3977
|
-
buttonHeight: TokenRef;
|
|
3978
|
-
};
|
|
3979
|
-
layout: {
|
|
3980
|
-
sidebarWidth: string;
|
|
3981
|
-
headerHeight: string;
|
|
3982
|
-
};
|
|
3983
|
-
shadow: {
|
|
3984
|
-
card: string;
|
|
3985
|
-
};
|
|
3986
|
-
/** Config de alertas — preservada por estabilidad de API aunque hoy no tiene consumidor. */
|
|
3987
|
-
alerts: ThemeAlerts;
|
|
3988
|
-
/** Carácter tipográfico de titulares y cifras. v2, opcional. */
|
|
3989
|
-
typography?: ThemeTypographyComponent;
|
|
3990
|
-
/** Forma de las cards (plana / elevada / glass). v2, opcional. */
|
|
3991
|
-
card?: ThemeCardComponent;
|
|
3992
|
-
/** Estilo de los inputs (filled / outline / underline). v2, opcional. */
|
|
3993
|
-
input?: ThemeInputComponent;
|
|
3994
|
-
/** Forma de los botones (pill / sharp / uppercase). v2, opcional. */
|
|
3995
|
-
button?: ThemeButtonComponent;
|
|
3996
|
-
/** Sidebar por tenant (puede ser oscuro aunque el modo sea light). v2, opcional. */
|
|
3997
|
-
sidebar?: ThemeSidebarComponent;
|
|
3998
|
-
/** Header translúcido/sólido. v2, opcional. */
|
|
3999
|
-
header?: ThemeHeaderComponent;
|
|
4000
|
-
/** Pantalla de login white-label. v2, opcional. */
|
|
4001
|
-
auth?: ThemeAuthComponent;
|
|
4002
|
-
/** Paleta categórica para series de gráficas. v2, opcional. */
|
|
4003
|
-
chart?: ThemeChartComponent;
|
|
4004
|
-
/** Movimiento (intensidad, estilo de entrada, press). v2, opcional. */
|
|
4005
|
-
motion?: ThemeMotionComponent;
|
|
4006
|
-
/** Fondo detrás de los diálogos (desenfoque del backdrop). v2, opcional. */
|
|
4007
|
-
overlay?: ThemeOverlayComponent;
|
|
4008
|
-
/** Preferencia responsive de data-tables (aditivo, nunca estructural). v2, opcional. */
|
|
4009
|
-
table?: ThemeTableComponent;
|
|
4010
|
-
/** Preferencia responsive del calendario (aditivo, nunca estructural). v2, opcional. */
|
|
4011
|
-
calendar?: ThemeCalendarComponent;
|
|
4012
|
-
}
|
|
4435
|
+
* (W2, "dagre sin red" — ver docstring del módulo). Aristas que referencian
|
|
4436
|
+
* un nodo ausente en `nodes` se ignoran (mismo criterio de robustez que
|
|
4437
|
+
* `visibleEdges()` del componente). Grafos con ciclos (incluidos self-loops,
|
|
4438
|
+
* ver `flow-canvas-layout.spec.ts`) NUNCA lanzan por sí solos — dagre los
|
|
4439
|
+
* rompe internamente (`acyclicer`) solo para calcular el ranking, sin mutar
|
|
4440
|
+
* el grafo de entrada de este módulo; el `try/catch` cubre fallas AJENAS al
|
|
4441
|
+
* grafo (carga del chunk, errores internos inesperados de la librería).
|
|
4442
|
+
*
|
|
4443
|
+
* Determinístico bajo AMBOS caminos: nodos/aristas se insertan/procesan en
|
|
4444
|
+
* un orden ESTABLE (ids ordenados alfabéticamente), nunca el orden de
|
|
4445
|
+
* inserción de `nodes`/`edges` — la MISMA entrada produce SIEMPRE la misma
|
|
4446
|
+
* salida. Normaliza el resultado al origen (nunca devuelve coordenadas
|
|
4447
|
+
* negativas), mismo criterio que `clampPosition` en `flow-canvas.component.ts`
|
|
4448
|
+
* (ese clamp sigue existiendo como red de seguridad en el punto de lectura).
|
|
4449
|
+
*
|
|
4450
|
+
* Robustez de entrada (mismo criterio que el resto de `@solercia/ui`):
|
|
4451
|
+
* `nodes`/`edges` toleran `null`/`undefined` sin lanzar.
|
|
4452
|
+
*/
|
|
4453
|
+
declare function computeAutoLayoutPositions(nodes: readonly SolFlowCanvasNode[] | null | undefined, edges: readonly SolFlowCanvasEdge[] | null | undefined): Promise<Map<string, SolFlowCanvasPosition>>;
|
|
4454
|
+
|
|
4013
4455
|
/**
|
|
4014
|
-
*
|
|
4015
|
-
*
|
|
4456
|
+
* Profundidad máxima por defecto: 5 niveles visibles (raíz = nivel 1).
|
|
4457
|
+
*
|
|
4458
|
+
* Es una cota DURA heredada del árbol de jerarquía que originó este
|
|
4459
|
+
* componente: mantiene el DOM acotado (sin virtualización), evita sangrías
|
|
4460
|
+
* ilegibles en móvil y —lo más importante para un primitivo genérico— corta
|
|
4461
|
+
* la recursión si el consumidor pasa por error un grafo con ciclos.
|
|
4016
4462
|
*/
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
/**
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
/** Familia para cifras (ej. mono = look técnico). Opcional. */
|
|
4035
|
-
numericFamily?: string;
|
|
4036
|
-
}
|
|
4037
|
-
/** Forma de las cards. `border` y sombras son shorthands CSS completos. */
|
|
4038
|
-
interface ThemeCardComponent {
|
|
4039
|
-
bg: TokenRef;
|
|
4040
|
-
/** Shorthand completo: "1px solid #DCE1EA" | "1px solid transparent". */
|
|
4041
|
-
border: string;
|
|
4042
|
-
radius: TokenRef;
|
|
4043
|
-
/** "none" para skins planos. */
|
|
4044
|
-
shadow: string;
|
|
4045
|
-
shadowHover: string;
|
|
4046
|
-
/** backdrop-filter: "none" | "blur(16px) saturate(1.4)". */
|
|
4047
|
-
blur: string;
|
|
4048
|
-
/** "0px" | "-4px". */
|
|
4049
|
-
hoverLift: string;
|
|
4050
|
-
}
|
|
4051
|
-
/** Estilo de los inputs. `variant` es documental; los tokens lo materializan. */
|
|
4052
|
-
interface ThemeInputComponent {
|
|
4053
|
-
variant: 'filled' | 'outline' | 'underline';
|
|
4054
|
-
bg: TokenRef;
|
|
4055
|
-
/** Shorthand completo. */
|
|
4056
|
-
border: string;
|
|
4057
|
-
radius: TokenRef;
|
|
4058
|
-
/** underline se implementa con inset box-shadow. */
|
|
4059
|
-
shadow: string;
|
|
4060
|
-
focusBorder: string;
|
|
4061
|
-
/** "0 0 0 4px rgba(...)". */
|
|
4062
|
-
focusRing: string;
|
|
4463
|
+
declare const SOL_TREE_MAX_DEPTH = 5;
|
|
4464
|
+
/**
|
|
4465
|
+
* Nodo genérico del árbol. El componente SOLO conoce estos tres campos
|
|
4466
|
+
* (`id`, `label`, `children`); todo lo del dominio del consumidor viaja
|
|
4467
|
+
* opaco en `data` y se pinta desde la plantilla proyectada.
|
|
4468
|
+
*
|
|
4469
|
+
* @typeParam T Tipo de la carga libre de `data`.
|
|
4470
|
+
*/
|
|
4471
|
+
interface SolTreeNode<T = unknown> {
|
|
4472
|
+
/** Identificador ESTABLE y único en todo el árbol (track, expansión y foco). */
|
|
4473
|
+
id: string;
|
|
4474
|
+
/** Texto del nodo. Se usa en el render por defecto y en los `aria-label`. */
|
|
4475
|
+
label: string;
|
|
4476
|
+
/** Hijos del nodo. Ausente o vacío ⇒ es una hoja. */
|
|
4477
|
+
children?: readonly SolTreeNode<T>[];
|
|
4478
|
+
/** Carga libre del consumidor (badges, avance, ruta…). El árbol no la interpreta. */
|
|
4479
|
+
data?: T;
|
|
4063
4480
|
}
|
|
4064
|
-
/**
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4481
|
+
/**
|
|
4482
|
+
* Contexto del `ng-template` de nodo proyectado: `let-node` (`$implicit`) o
|
|
4483
|
+
* `let-node="node"` — mismo patrón que `SolFlowCanvasNodeTemplateContext` y
|
|
4484
|
+
* `SolCalendarEventTemplateContext`.
|
|
4485
|
+
*
|
|
4486
|
+
* `expanded` y `hasChildren` van en el contexto (aunque el consumidor podría
|
|
4487
|
+
* derivarlos) por el mismo criterio que ya usa `sol-flow-canvas` con
|
|
4488
|
+
* `selected`/`highlighted`: evita que la plantilla proyectada tenga que
|
|
4489
|
+
* recalcular estado que el árbol ya conoce.
|
|
4490
|
+
*/
|
|
4491
|
+
interface SolTreeNodeTemplateContext<T = unknown> {
|
|
4492
|
+
/** Alias posicional (`let-x`) — el mismo nodo que {@link node}. */
|
|
4493
|
+
$implicit: SolTreeNode<T>;
|
|
4494
|
+
/** Alias nombrado (`let-x="node"`) — el mismo nodo que {@link $implicit}. */
|
|
4495
|
+
node: SolTreeNode<T>;
|
|
4496
|
+
/** Profundidad del nodo, base 0 (las raíces son 0). */
|
|
4497
|
+
depth: number;
|
|
4498
|
+
/** Espejo del estado de expansión vigente para este nodo. */
|
|
4499
|
+
expanded: boolean;
|
|
4500
|
+
/** `true` si el nodo tiene al menos un hijo. */
|
|
4501
|
+
hasChildren: boolean;
|
|
4502
|
+
}
|
|
4503
|
+
/** Payload de `nodeToggled` — el nodo, su nuevo estado y el set completo resultante. */
|
|
4504
|
+
interface SolTreeToggleEvent<T = unknown> {
|
|
4505
|
+
/** Nodo cuyo chevron se accionó. */
|
|
4506
|
+
node: SolTreeNode<T>;
|
|
4507
|
+
/** `true` si quedó expandido. */
|
|
4508
|
+
expanded: boolean;
|
|
4509
|
+
/** Todos los ids expandidos DESPUÉS del cambio (listo para persistir o reenviar). */
|
|
4510
|
+
expandedIds: readonly string[];
|
|
4072
4511
|
}
|
|
4073
|
-
/**
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4512
|
+
/**
|
|
4513
|
+
* Marca el `<ng-template>` que pinta el CONTENIDO de cada nodo. Debe ser hijo
|
|
4514
|
+
* directo de `<sol-tree>`. Sin él, el árbol cae a un render por defecto que
|
|
4515
|
+
* muestra `node.label`.
|
|
4516
|
+
*
|
|
4517
|
+
* ```html
|
|
4518
|
+
* <sol-tree [nodes]="arbol()" (nodeSelected)="ir($event)">
|
|
4519
|
+
* <ng-template solTreeNodeDef let-node let-depth="depth">
|
|
4520
|
+
* <span>{{ node.label }}</span>
|
|
4521
|
+
* <sol-badge>{{ node.data?.metodologia }}</sol-badge>
|
|
4522
|
+
* </ng-template>
|
|
4523
|
+
* </sol-tree>
|
|
4524
|
+
* ```
|
|
4525
|
+
*
|
|
4526
|
+
* Nota de tipado: sin un input que ancle el genérico, TypeScript infiere
|
|
4527
|
+
* `T = unknown`, así que `node.data` llega como `unknown` y el consumidor lo
|
|
4528
|
+
* estrecha en su propio código. Es el mismo compromiso de `matTreeNodeDef`;
|
|
4529
|
+
* se prefirió eso antes que ensuciar la API con un input solo-para-inferencia.
|
|
4530
|
+
*/
|
|
4531
|
+
declare class SolTreeNodeDefDirective<T = unknown> {
|
|
4532
|
+
readonly template: TemplateRef<any>;
|
|
4533
|
+
/** Tipa las variables `let-` del template (`let-node`, `let-depth`, …). */
|
|
4534
|
+
static ngTemplateContextGuard<T>(_directive: SolTreeNodeDefDirective<T>, _context: unknown): _context is SolTreeNodeTemplateContext<T>;
|
|
4535
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolTreeNodeDefDirective<any>, never>;
|
|
4536
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SolTreeNodeDefDirective<any>, "[solTreeNodeDef]", never, {}, {}, never, never, true, never>;
|
|
4083
4537
|
}
|
|
4084
|
-
/**
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4538
|
+
/**
|
|
4539
|
+
* Contrato que el contenedor `sol-tree` le expone a sus nodos. Se declara
|
|
4540
|
+
* aparte (y no como `inject(SolTreeComponent)`) para que el nodo recursivo
|
|
4541
|
+
* NO dependa de una clase declarada después en el archivo y para que el
|
|
4542
|
+
* acoplamiento entre ambos quede explícito y probable.
|
|
4543
|
+
*/
|
|
4544
|
+
interface SolTreeOwner {
|
|
4545
|
+
readonly expandedSet: Signal<ReadonlySet<string>>;
|
|
4546
|
+
readonly maxDepth: Signal<number>;
|
|
4547
|
+
readonly indent: Signal<number>;
|
|
4548
|
+
readonly nodeTemplate: Signal<TemplateRef<SolTreeNodeTemplateContext> | null>;
|
|
4549
|
+
toggle(node: SolTreeNode): void;
|
|
4550
|
+
select(node: SolTreeNode): void;
|
|
4089
4551
|
}
|
|
4090
|
-
/**
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4552
|
+
/**
|
|
4553
|
+
* `sol-tree` — árbol jerárquico genérico del design system.
|
|
4554
|
+
*
|
|
4555
|
+
* Sube a la librería el MECANISMO (recursión, ARIA `tree`/`treeitem`/`group`,
|
|
4556
|
+
* roving tabindex con flechas, expandir/colapsar, cota de profundidad) y deja
|
|
4557
|
+
* en la aplicación el CÓMO SE PINTA cada nodo, vía el `ng-template` marcado
|
|
4558
|
+
* con `solTreeNodeDef`. Cero conocimiento del dominio: ni rutas, ni `Router`,
|
|
4559
|
+
* ni badges, ni barras de avance.
|
|
4560
|
+
*
|
|
4561
|
+
* ```html
|
|
4562
|
+
* <sol-tree
|
|
4563
|
+
* [nodes]="arbol()"
|
|
4564
|
+
* [(expandedIds)]="expandidos"
|
|
4565
|
+
* (nodeSelected)="router.navigate(['/proyectos', $event.id])"
|
|
4566
|
+
* (nodeToggled)="persistir($event.expandedIds)"
|
|
4567
|
+
* >
|
|
4568
|
+
* <ng-template solTreeNodeDef let-node let-expanded="expanded">
|
|
4569
|
+
* <sol-card>{{ node.label }}</sol-card>
|
|
4570
|
+
* </ng-template>
|
|
4571
|
+
* </sol-tree>
|
|
4572
|
+
* ```
|
|
4573
|
+
*
|
|
4574
|
+
* Estados: si `nodes` llega vacío el árbol no pinta nada — el vacío legítimo,
|
|
4575
|
+
* la carga y el error son del consumidor (`sol-skeleton`, `sol-empty-state`).
|
|
4576
|
+
*
|
|
4577
|
+
* @typeParam T Tipo de la carga libre `data` de cada nodo.
|
|
4578
|
+
*/
|
|
4579
|
+
declare class SolTreeComponent<T = unknown> implements SolTreeOwner {
|
|
4580
|
+
private readonly i18n;
|
|
4581
|
+
private readonly state;
|
|
4582
|
+
/** Raíces del bosque. Un árbol de una sola raíz es un arreglo de un elemento. */
|
|
4583
|
+
readonly nodes: _angular_core.InputSignal<readonly SolTreeNode<T>[]>;
|
|
4584
|
+
/**
|
|
4585
|
+
* Ids expandidos, enlazable en dos vías `[(expandedIds)]`.
|
|
4586
|
+
*
|
|
4587
|
+
* `null` (default) = NO controlado: el árbol maneja la expansión solo y la
|
|
4588
|
+
* siembra con {@link defaultExpandedDepth}. Cualquier arreglo —incluido
|
|
4589
|
+
* `[]`— pasa a modo controlado: manda el consumidor y el árbol solo propone
|
|
4590
|
+
* el nuevo valor. Se eligió `null` en vez de `[]` como default justamente
|
|
4591
|
+
* para poder distinguir "no me controles" de "todo colapsado".
|
|
4592
|
+
*/
|
|
4593
|
+
readonly expandedIds: _angular_core.ModelSignal<readonly string[] | null>;
|
|
4594
|
+
/**
|
|
4595
|
+
* Niveles que arrancan expandidos en modo no controlado. `1` (default)
|
|
4596
|
+
* expande las raíces, así el árbol nunca se ve como un muro de filas
|
|
4597
|
+
* colapsadas; `0` lo deja todo cerrado.
|
|
4598
|
+
*/
|
|
4599
|
+
readonly defaultExpandedDepth: _angular_core.InputSignal<number>;
|
|
4600
|
+
/** Niveles VISIBLES como máximo. Ver {@link SOL_TREE_MAX_DEPTH}. */
|
|
4601
|
+
readonly maxDepth: _angular_core.InputSignal<number>;
|
|
4602
|
+
/** Sangría en px que suma cada nivel. */
|
|
4603
|
+
readonly indent: _angular_core.InputSignal<number>;
|
|
4604
|
+
/** Override del `aria-label` del contenedor `role="tree"`. */
|
|
4605
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
4606
|
+
/** Se emite al activar un nodo hoja con Enter/Espacio, o al llamar {@link select}. */
|
|
4607
|
+
readonly nodeSelected: _angular_core.OutputEmitterRef<SolTreeNode<T>>;
|
|
4608
|
+
/** Se emite en cada expandir/colapsar, con el set completo resultante. */
|
|
4609
|
+
readonly nodeToggled: _angular_core.OutputEmitterRef<SolTreeToggleEvent<T>>;
|
|
4610
|
+
/** Plantilla de contenido proyectada (opcional: sin ella se pinta `node.label`). */
|
|
4611
|
+
private readonly nodeDef;
|
|
4612
|
+
readonly nodeTemplate: Signal<TemplateRef<SolTreeNodeTemplateContext<unknown>> | null>;
|
|
4613
|
+
/** Ids que la semilla dejaría expandidos con la profundidad actual. */
|
|
4614
|
+
private readonly seedIds;
|
|
4615
|
+
/**
|
|
4616
|
+
* Clave estructural de la semilla. Se compara como string (no por
|
|
4617
|
+
* identidad del arreglo) para que un `nodes` recreado con el MISMO
|
|
4618
|
+
* contenido no borre lo que el usuario ya expandió o colapsó a mano.
|
|
4619
|
+
*/
|
|
4620
|
+
private readonly seedKey;
|
|
4621
|
+
/** Expansión interna (modo no controlado); se resiembra al cambiar el árbol. */
|
|
4622
|
+
private readonly autoExpanded;
|
|
4623
|
+
/** Set de expansión vigente: el del consumidor si controla, si no el interno. */
|
|
4624
|
+
readonly expandedSet: Signal<ReadonlySet<string>>;
|
|
4625
|
+
readonly treeAriaLabel: Signal<string>;
|
|
4626
|
+
constructor();
|
|
4627
|
+
/** ¿Está expandido ese id? */
|
|
4628
|
+
isExpanded(id: string): boolean;
|
|
4629
|
+
/** Alterna la expansión de un nodo (lo mismo que hace el chevron). */
|
|
4630
|
+
toggle(node: SolTreeNode): void;
|
|
4631
|
+
/** Fija la expansión de un nodo y emite `nodeToggled`. */
|
|
4632
|
+
setExpanded(node: SolTreeNode, expanded: boolean): void;
|
|
4633
|
+
/**
|
|
4634
|
+
* Emite `nodeSelected`. Es la puerta para que la plantilla proyectada
|
|
4635
|
+
* seleccione CUALQUIER nodo con un clic propio (`(click)="tree.select(node)"`
|
|
4636
|
+
* sobre una referencia `#tree`), no solo las hojas con Enter/Espacio.
|
|
4637
|
+
*/
|
|
4638
|
+
select(node: SolTreeNode): void;
|
|
4639
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolTreeComponent<any>, never>;
|
|
4640
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolTreeComponent<any>, "sol-tree", never, { "nodes": { "alias": "nodes"; "required": true; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "defaultExpandedDepth": { "alias": "defaultExpandedDepth"; "required": false; "isSignal": true; }; "maxDepth": { "alias": "maxDepth"; "required": false; "isSignal": true; }; "indent": { "alias": "indent"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "expandedIds": "expandedIdsChange"; "nodeSelected": "nodeSelected"; "nodeToggled": "nodeToggled"; }, ["nodeDef"], never, true, never>;
|
|
4095
4641
|
}
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4642
|
+
|
|
4643
|
+
/**
|
|
4644
|
+
* Tono visual de la etiqueta de tipo de una notificación. Coincide 1:1 con
|
|
4645
|
+
* las variantes de `sol-badge` — la librería NUNCA conoce el catálogo de
|
|
4646
|
+
* tipos del consumidor (el original acoplado resolvía `RULE_TYPE_LABELS`),
|
|
4647
|
+
* así que el consumidor entrega la etiqueta YA resuelta y, opcionalmente,
|
|
4648
|
+
* el tono con el que debe pintarse.
|
|
4649
|
+
*/
|
|
4650
|
+
type SolNotificationTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
4651
|
+
/**
|
|
4652
|
+
* Notificación genérica del panel. Sin conocimiento de dominio: no hay
|
|
4653
|
+
* `rule_type`, `target_type` ni `target_id` — lo que el consumidor necesite
|
|
4654
|
+
* para enrutar viaja opaco en `data` y regresa intacto en los outputs.
|
|
4655
|
+
*
|
|
4656
|
+
* `title`/`body` son DATOS del consumidor (texto ya listo para mostrar), no
|
|
4657
|
+
* copy de UI: por eso son texto crudo y no claves i18n, igual que
|
|
4658
|
+
* `TimelineNode.label`. El copy propio del panel (títulos de estado,
|
|
4659
|
+
* acciones, tiempo relativo) sí se resuelve por `SOL_I18N`.
|
|
4660
|
+
*/
|
|
4661
|
+
interface SolNotificationItem<TData = unknown> {
|
|
4662
|
+
/** Identidad estable — usada como `track` del `@for`. */
|
|
4663
|
+
id: string | number;
|
|
4664
|
+
/** Título visible. Dato del consumidor, ya traducido. */
|
|
4665
|
+
title: string;
|
|
4666
|
+
/** Cuerpo/descripción opcional. Se recorta a dos líneas. */
|
|
4667
|
+
body?: string;
|
|
4668
|
+
/**
|
|
4669
|
+
* Marca de tiempo del evento. Tolera `string` ISO, epoch-ms, `Date`,
|
|
4670
|
+
* `null` y `undefined`; un valor inválido se trata como ausente y la fila
|
|
4671
|
+
* simplemente no muestra tiempo (nunca "Invalid Date").
|
|
4672
|
+
*/
|
|
4673
|
+
timestamp?: string | number | Date | null;
|
|
4674
|
+
/** `true` cuando ya fue leída. Ausente equivale a NO leída. */
|
|
4675
|
+
read?: boolean;
|
|
4676
|
+
/** Etiqueta de tipo ya resuelta a texto por el consumidor. */
|
|
4677
|
+
typeLabel?: string;
|
|
4678
|
+
/** Tono del `sol-badge` de la etiqueta de tipo. Default: `neutral`. */
|
|
4679
|
+
tone?: SolNotificationTone;
|
|
4680
|
+
/** Carga libre del consumidor. La librería no la lee: solo la devuelve. */
|
|
4681
|
+
data?: TData;
|
|
4682
|
+
}
|
|
4683
|
+
/** Estado excluyente que el panel está renderizando en este momento. */
|
|
4684
|
+
type SolNotificationPanelState = 'loading' | 'error' | 'empty' | 'content';
|
|
4685
|
+
/** Fila derivada: la notificación más lo que el panel calculó para pintarla. */
|
|
4686
|
+
interface SolNotificationRow<T> {
|
|
4687
|
+
item: T;
|
|
4688
|
+
timeLabel: string;
|
|
4689
|
+
tone: SolNotificationTone;
|
|
4099
4690
|
}
|
|
4100
|
-
/**
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4691
|
+
/**
|
|
4692
|
+
* `sol-notification-panel` — centro de notificaciones genérico y sin
|
|
4693
|
+
* acoplamiento al dominio.
|
|
4694
|
+
*
|
|
4695
|
+
* Extraído del `notification-panel` de `solercia-command`, que inyectaba
|
|
4696
|
+
* `NotificationsService` (se auto-alimentaba), inyectaba `Router` (navegaba
|
|
4697
|
+
* solo) e importaba `AppNotification`/`RULE_TYPE_LABELS` de `@entities`.
|
|
4698
|
+
* Aquí SUBE únicamente la presentación: la lista, el contador de no leídas,
|
|
4699
|
+
* los estados y las acciones. QUEDA en la aplicación de dónde salen los
|
|
4700
|
+
* datos y a dónde navega cada notificación — el panel no inyecta servicios
|
|
4701
|
+
* de datos, no llama HTTP y no navega: **emite**.
|
|
4702
|
+
*
|
|
4703
|
+
* ## Vacío ≠ error (deuda que este componente salda)
|
|
4704
|
+
*
|
|
4705
|
+
* El original mostraba "no hay notificaciones" también cuando la carga
|
|
4706
|
+
* fallaba (su `error:` solo apagaba el spinner), así que le mentía al
|
|
4707
|
+
* usuario. Aquí `state()` es excluyente y ordenado —
|
|
4708
|
+
* `loading` › `error` › `empty` › `content`— con `error` ANTES de `empty`:
|
|
4709
|
+
* una carga fallida deja `items` vacío, y si `empty` ganara volveríamos a
|
|
4710
|
+
* decir "no tienes notificaciones" cuando la verdad es "no pudimos saberlo".
|
|
4711
|
+
* Además el estado de error se pinta con estructura, tono y `role="alert"`
|
|
4712
|
+
* propios (nunca el `sol-empty-state`) y ofrece salida vía `retryRequested`.
|
|
4713
|
+
*
|
|
4714
|
+
* ## Fuente de verdad
|
|
4715
|
+
*
|
|
4716
|
+
* El panel NO guarda un espejo interno de `read`: lo pinta desde `items`.
|
|
4717
|
+
* Marcar como leída emite y espera que el consumidor reasigne `items` — así
|
|
4718
|
+
* la UI nunca afirma un cambio que el backend rechazó.
|
|
4719
|
+
*
|
|
4720
|
+
* Uso:
|
|
4721
|
+
* ```html
|
|
4722
|
+
* <sol-notification-panel
|
|
4723
|
+
* [items]="notificaciones()"
|
|
4724
|
+
* [loading]="cargando()"
|
|
4725
|
+
* [error]="fallo()"
|
|
4726
|
+
* [errorMessage]="mensajeDelBackend()"
|
|
4727
|
+
* (itemSelected)="abrir($event)"
|
|
4728
|
+
* (markedRead)="marcarLeida($event)"
|
|
4729
|
+
* (markedAllRead)="marcarTodas()"
|
|
4730
|
+
* (retryRequested)="recargar()"
|
|
4731
|
+
* (closed)="cerrar()"
|
|
4732
|
+
* />
|
|
4733
|
+
* ```
|
|
4734
|
+
*/
|
|
4735
|
+
declare class SolNotificationPanelComponent<T extends SolNotificationItem = SolNotificationItem> {
|
|
4736
|
+
private readonly i18n;
|
|
4737
|
+
/**
|
|
4738
|
+
* Notificaciones a mostrar. El panel NO las va a buscar: el consumidor es
|
|
4739
|
+
* la fuente de verdad. Tipado con `null | undefined` a propósito, para el
|
|
4740
|
+
* patrón `[items]="stream$ | async"` (misma lección que `sol-timeline`).
|
|
4741
|
+
*/
|
|
4742
|
+
readonly items: _angular_core.InputSignal<readonly T[] | null | undefined>;
|
|
4743
|
+
/** `true` mientras la carga está en curso. Gana sobre cualquier otro estado. */
|
|
4744
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
4745
|
+
/** `true` cuando la carga falló. Gana sobre el vacío — nunca se confunden. */
|
|
4746
|
+
readonly error: _angular_core.InputSignal<boolean>;
|
|
4747
|
+
/**
|
|
4748
|
+
* Detalle del error tal como lo reportó el consumidor (mensaje del
|
|
4749
|
+
* backend). Cuando viene, reemplaza la descripción genérica: un error
|
|
4750
|
+
* específico jamás debe degradarse a "algo salió mal".
|
|
4751
|
+
*/
|
|
4752
|
+
readonly errorMessage: _angular_core.InputSignal<string>;
|
|
4753
|
+
/**
|
|
4754
|
+
* Claves i18n del estado vacío. Son inputs (no constantes) para que un
|
|
4755
|
+
* consumidor que filtra la lista distinga "todavía no hay nada" de "no hay
|
|
4756
|
+
* resultados con este filtro" sin que la librería conozca filtro alguno.
|
|
4757
|
+
*/
|
|
4758
|
+
readonly emptyTitleKey: _angular_core.InputSignal<string>;
|
|
4759
|
+
readonly emptyDescriptionKey: _angular_core.InputSignal<string>;
|
|
4760
|
+
/** Se activó una notificación. El consumidor decide a dónde lleva. */
|
|
4761
|
+
readonly itemSelected: _angular_core.OutputEmitterRef<T>;
|
|
4762
|
+
/** Se pidió marcar UNA notificación como leída. */
|
|
4763
|
+
readonly markedRead: _angular_core.OutputEmitterRef<T>;
|
|
4764
|
+
/** Se pidió marcar todas como leídas. */
|
|
4765
|
+
readonly markedAllRead: _angular_core.OutputEmitterRef<void>;
|
|
4766
|
+
/**
|
|
4767
|
+
* Se pidió reintentar la carga. Añadido sobre los cuatro outputs del
|
|
4768
|
+
* encargo: un estado de error sin salida es un callejón sin salida — el
|
|
4769
|
+
* usuario ve el fallo y no puede hacer nada desde el panel.
|
|
4770
|
+
*/
|
|
4771
|
+
readonly retryRequested: _angular_core.OutputEmitterRef<void>;
|
|
4772
|
+
/** Se pidió cerrar el panel. */
|
|
4773
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
4774
|
+
/** Lista normalizada: `null`/`undefined` se tratan como vacía. */
|
|
4775
|
+
private readonly list;
|
|
4776
|
+
/** Notificaciones sin leer. `read` ausente cuenta como NO leída. */
|
|
4777
|
+
readonly unreadCount: _angular_core.Signal<number>;
|
|
4778
|
+
/**
|
|
4779
|
+
* Estado excluyente. El orden es la corrección de fondo: `error` ANTES de
|
|
4780
|
+
* `empty`, porque una carga fallida también deja la lista vacía.
|
|
4781
|
+
*/
|
|
4782
|
+
readonly state: _angular_core.Signal<SolNotificationPanelState>;
|
|
4783
|
+
/** Filas listas para pintar: la notificación + su tiempo relativo y tono. */
|
|
4784
|
+
readonly rows: _angular_core.Signal<SolNotificationRow<T>[]>;
|
|
4785
|
+
readonly dialogAria: _angular_core.Signal<string>;
|
|
4786
|
+
readonly title: _angular_core.Signal<string>;
|
|
4787
|
+
readonly markAllReadLabel: _angular_core.Signal<string>;
|
|
4788
|
+
readonly closeLabel: _angular_core.Signal<string>;
|
|
4789
|
+
readonly markReadLabel: _angular_core.Signal<string>;
|
|
4790
|
+
readonly unreadDotLabel: _angular_core.Signal<string>;
|
|
4791
|
+
readonly errorTitle: _angular_core.Signal<string>;
|
|
4792
|
+
readonly retryLabel: _angular_core.Signal<string>;
|
|
4793
|
+
/** Etiqueta accesible del contador; el badge solo muestra el número. */
|
|
4794
|
+
readonly unreadAria: _angular_core.Signal<string>;
|
|
4795
|
+
/** Descripción del error: el mensaje real del consumidor si lo hay. */
|
|
4796
|
+
readonly errorDescription: _angular_core.Signal<string>;
|
|
4797
|
+
/**
|
|
4798
|
+
* Formatea la marca de tiempo como texto relativo ("hace 2 h"). Devuelve
|
|
4799
|
+
* cadena vacía cuando falta o es inválida — el panel omite el tiempo en vez
|
|
4800
|
+
* de mostrar basura.
|
|
4801
|
+
*/
|
|
4802
|
+
private formatRelativeTime;
|
|
4803
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolNotificationPanelComponent<any>, never>;
|
|
4804
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolNotificationPanelComponent<any>, "sol-notification-panel", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "emptyTitleKey": { "alias": "emptyTitleKey"; "required": false; "isSignal": true; }; "emptyDescriptionKey": { "alias": "emptyDescriptionKey"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; "markedRead": "markedRead"; "markedAllRead": "markedAllRead"; "retryRequested": "retryRequested"; "closed": "closed"; }, never, never, true, never>;
|
|
4110
4805
|
}
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4806
|
+
|
|
4807
|
+
/** Borde del disparador con el que se alinea el panel. */
|
|
4808
|
+
type SolFloatingPanelAlign = 'start' | 'end';
|
|
4809
|
+
|
|
4810
|
+
/**
|
|
4811
|
+
* Un ámbito seleccionable: la unidad de contexto sobre la que trabaja la
|
|
4812
|
+
* aplicación (empresa, sede, proyecto, espacio de trabajo, tenant…).
|
|
4813
|
+
*
|
|
4814
|
+
* El tipo es deliberadamente ANÉMICO y agnóstico del dominio: la librería solo
|
|
4815
|
+
* necesita saber cómo pintar cada fila y cómo identificarla. Todo lo que el
|
|
4816
|
+
* consumidor necesite recuperar al recibir la selección viaja intacto en
|
|
4817
|
+
* `data`, sin que `@solercia/ui` conozca su forma.
|
|
4818
|
+
*
|
|
4819
|
+
* @typeParam TData Carga libre del consumidor (p. ej. la membresía completa).
|
|
4820
|
+
*/
|
|
4821
|
+
interface SolScope<TData = unknown> {
|
|
4822
|
+
/** Identificador estable y único dentro de la lista. Ancla el ámbito activo. */
|
|
4823
|
+
readonly id: string;
|
|
4824
|
+
/** Etiqueta principal ya resuelta al idioma activo (nombre del ámbito). */
|
|
4825
|
+
readonly label: string;
|
|
4826
|
+
/**
|
|
4827
|
+
* Etiqueta secundaria opcional, ya resuelta al idioma activo. El consumidor
|
|
4828
|
+
* decide qué significa: el rol del usuario en la empresa, el plan contratado,
|
|
4829
|
+
* la ciudad de la sede… La librería solo la pinta atenuada junto al `label`.
|
|
4830
|
+
*/
|
|
4831
|
+
readonly sublabel?: string;
|
|
4832
|
+
/**
|
|
4833
|
+
* Ícono del `ICON_REGISTRY` para representar el ámbito. Si no se provee, el
|
|
4834
|
+
* componente cae a las iniciales del `label` mediante `sol-avatar`, así que
|
|
4835
|
+
* una lista sin íconos igual se distingue de un vistazo.
|
|
4836
|
+
*/
|
|
4837
|
+
readonly icon?: SolIconName | string;
|
|
4838
|
+
/** Imagen/logo del ámbito. Solo aplica cuando no hay `icon`; alimenta el avatar. */
|
|
4839
|
+
readonly imageUrl?: string | null;
|
|
4840
|
+
/** Carga libre del consumidor. La librería nunca la lee — solo la devuelve al emitir. */
|
|
4841
|
+
readonly data?: TData;
|
|
4114
4842
|
}
|
|
4115
|
-
/**
|
|
4116
|
-
|
|
4117
|
-
|
|
4843
|
+
/**
|
|
4844
|
+
* Estados mutuamente excluyentes del selector. Se modelan como un único
|
|
4845
|
+
* discriminante (y no como banderas sueltas `loading`/`error`) precisamente
|
|
4846
|
+
* para que "cargando", "vacío" y "error" NUNCA puedan confundirse ni
|
|
4847
|
+
* solaparse: la lista vacía es un estado legítimo, no una falla.
|
|
4848
|
+
*/
|
|
4849
|
+
type SolScopeSwitcherStatus = 'idle' | 'loading' | 'error';
|
|
4850
|
+
/**
|
|
4851
|
+
* `sol-scope-switcher` — selector genérico de ámbito activo.
|
|
4852
|
+
*
|
|
4853
|
+
* Presenta la lista de ámbitos disponibles con su etiqueta y su etiqueta
|
|
4854
|
+
* secundaria, marca cuál está activo y emite el elegido. Nada más.
|
|
4855
|
+
*
|
|
4856
|
+
* ## Frontera deliberada: esto es SOLO el selector visual
|
|
4857
|
+
*
|
|
4858
|
+
* El componente es un control puro y sin memoria. NO persiste la elección, NO
|
|
4859
|
+
* reinicia stores, NO recarga menús, NO reconecta sockets y NO toca cabeceras
|
|
4860
|
+
* HTTP: todo eso es política de la aplicación anfitriona, que reacciona a
|
|
4861
|
+
* `scopeSelected` y decide qué significa "cambiar de ámbito" en su dominio.
|
|
4862
|
+
* Meter cualquiera de esas responsabilidades aquí ataría `@solercia/ui` a un
|
|
4863
|
+
* backend y a un modelo de sesión concretos, que es justo lo que este refactor
|
|
4864
|
+
* evita.
|
|
4865
|
+
*
|
|
4866
|
+
* También es la aplicación —no el componente— la que decide si un cambio
|
|
4867
|
+
* prospera: mientras verifica el acceso puede pasar `disabled` para congelar
|
|
4868
|
+
* el control, y si falla puede pasar `status="error"` conservando `scopes` y
|
|
4869
|
+
* `activeScopeId` anteriores. En ese caso el selector sigue mostrando el
|
|
4870
|
+
* contexto vigente y suma una alerta debajo, sin quedar en un estado a medias.
|
|
4871
|
+
*
|
|
4872
|
+
* ## Un solo ámbito
|
|
4873
|
+
*
|
|
4874
|
+
* Con un único ámbito no se renderiza disparador ni panel: se muestra como
|
|
4875
|
+
* activo, en texto estático, sin obligar a elegir entre una sola opción.
|
|
4876
|
+
*
|
|
4877
|
+
* @typeParam TData Tipo de la carga libre `SolScope.data`.
|
|
4878
|
+
*
|
|
4879
|
+
* @example
|
|
4880
|
+
* ```html
|
|
4881
|
+
* <sol-scope-switcher
|
|
4882
|
+
* [scopes]="empresas()"
|
|
4883
|
+
* [activeScopeId]="empresaActivaId()"
|
|
4884
|
+
* [status]="estado()"
|
|
4885
|
+
* [disabled]="cambiando()"
|
|
4886
|
+
* (scopeSelected)="cambiarEmpresa($event)"
|
|
4887
|
+
* />
|
|
4888
|
+
* ```
|
|
4889
|
+
*/
|
|
4890
|
+
declare class SolScopeSwitcherComponent<TData = unknown> {
|
|
4891
|
+
private readonly i18n;
|
|
4892
|
+
private readonly hostEl;
|
|
4893
|
+
/**
|
|
4894
|
+
* Ámbitos disponibles, en el orden en que deben listarse. Tolera `null` y
|
|
4895
|
+
* `undefined` para servir sin ceremonia al patrón asíncrono
|
|
4896
|
+
* (`[scopes]="stream$ | async"`), que emite vacío antes de traer datos.
|
|
4897
|
+
*/
|
|
4898
|
+
readonly scopes: _angular_core.InputSignal<readonly SolScope<TData>[] | null | undefined>;
|
|
4899
|
+
/**
|
|
4900
|
+
* Id del ámbito activo. `null` (o un id que ya no está en la lista) cae al
|
|
4901
|
+
* primer ámbito disponible: el backend suele aplicar ese mismo respaldo, y
|
|
4902
|
+
* mostrar un disparador en blanco sería mentirle al usuario sobre el
|
|
4903
|
+
* contexto en el que realmente está trabajando.
|
|
4904
|
+
*/
|
|
4905
|
+
readonly activeScopeId: _angular_core.InputSignal<string | null | undefined>;
|
|
4906
|
+
/** Estado del selector. La lista vacía se deriva de `scopes`, no de aquí. */
|
|
4907
|
+
readonly status: _angular_core.InputSignal<SolScopeSwitcherStatus>;
|
|
4908
|
+
/**
|
|
4909
|
+
* Congela el disparador sin ocultar el contexto (p. ej. mientras la
|
|
4910
|
+
* aplicación verifica el acceso al ámbito recién elegido).
|
|
4911
|
+
*/
|
|
4912
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
4913
|
+
/** Borde del disparador contra el que se alinea el panel. */
|
|
4914
|
+
readonly align: _angular_core.InputSignal<SolFloatingPanelAlign>;
|
|
4915
|
+
/**
|
|
4916
|
+
* Mensaje de error ya resuelto. Sobrescribe el texto por defecto para que la
|
|
4917
|
+
* aplicación distinga "sin conexión" de "perdiste el acceso"; si viene vacío,
|
|
4918
|
+
* se usa la clave `shared.scopeSwitcher.error`.
|
|
4919
|
+
*/
|
|
4920
|
+
readonly errorMessage: _angular_core.InputSignal<string>;
|
|
4921
|
+
/** Texto del estado vacío. Vacío ⇒ clave `shared.scopeSwitcher.empty`. */
|
|
4922
|
+
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
4923
|
+
/** Texto del estado de carga. Vacío ⇒ clave `shared.scopeSwitcher.loading`. */
|
|
4924
|
+
readonly loadingMessage: _angular_core.InputSignal<string>;
|
|
4925
|
+
/** `aria-label` del disparador. Vacío ⇒ clave `shared.scopeSwitcher.trigger`. */
|
|
4926
|
+
readonly triggerAriaLabel: _angular_core.InputSignal<string>;
|
|
4927
|
+
/** `aria-label` del panel. Vacío ⇒ clave `shared.scopeSwitcher.panel`. */
|
|
4928
|
+
readonly panelAriaLabel: _angular_core.InputSignal<string>;
|
|
4929
|
+
/**
|
|
4930
|
+
* Emite el ámbito elegido, con su `data` intacta. El componente NO persiste,
|
|
4931
|
+
* NO recarga y NO reintenta: la aplicación decide qué hacer con el evento.
|
|
4932
|
+
*
|
|
4933
|
+
* No emite cuando el usuario vuelve a elegir el ámbito que ya estaba activo —
|
|
4934
|
+
* en el consumidor eso equivaldría a reiniciar todo el contexto sin motivo.
|
|
4935
|
+
*/
|
|
4936
|
+
readonly scopeSelected: _angular_core.OutputEmitterRef<SolScope<TData>>;
|
|
4937
|
+
/** Emite al abrir (`true`) y al cerrar (`false`) el panel. */
|
|
4938
|
+
readonly openChange: _angular_core.OutputEmitterRef<boolean>;
|
|
4939
|
+
/** Verdadero mientras el panel está desplegado. */
|
|
4940
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
4941
|
+
/** Verdadero cuando el panel volteó hacia arriba (lo decide la directiva). */
|
|
4942
|
+
readonly dropUp: _angular_core.WritableSignal<boolean>;
|
|
4943
|
+
/** Índice del ámbito enfocado por teclado; `-1` cuando el panel está cerrado. */
|
|
4944
|
+
readonly highlightedIndex: _angular_core.WritableSignal<number>;
|
|
4945
|
+
/** Altura estimada del panel: umbral de volteo de `solFloatingPanel`. */
|
|
4946
|
+
readonly panelFlipThreshold = 320;
|
|
4947
|
+
private static nextId;
|
|
4948
|
+
/** Id único que enlaza el disparador (`aria-controls`) con el panel portaleado. */
|
|
4949
|
+
readonly panelId: string;
|
|
4950
|
+
private readonly triggerRef;
|
|
4951
|
+
private readonly panelRef;
|
|
4952
|
+
private readonly optionRefs;
|
|
4953
|
+
/** Lista normalizada: `null`/`undefined` se comportan como lista vacía. */
|
|
4954
|
+
readonly scopeList: _angular_core.Signal<readonly SolScope<TData>[]>;
|
|
4955
|
+
/** No hay ámbitos que listar. Es un estado legítimo, nunca un error. */
|
|
4956
|
+
readonly isEmpty: _angular_core.Signal<boolean>;
|
|
4957
|
+
/** Un único ámbito: se muestra como activo, sin obligar a elegir. */
|
|
4958
|
+
readonly isSingle: _angular_core.Signal<boolean>;
|
|
4959
|
+
/** El selector está reportando una falla. */
|
|
4960
|
+
readonly hasError: _angular_core.Signal<boolean>;
|
|
4961
|
+
/** Id realmente vigente: el explícito si sigue en la lista, si no el primero. */
|
|
4962
|
+
readonly effectiveActiveId: _angular_core.Signal<string | null>;
|
|
4963
|
+
/** Ámbito activo resuelto, o `null` cuando la lista está vacía. */
|
|
4964
|
+
readonly activeScope: _angular_core.Signal<SolScope<TData> | null>;
|
|
4965
|
+
private readonly loadingKey;
|
|
4966
|
+
private readonly emptyKey;
|
|
4967
|
+
private readonly errorKey;
|
|
4968
|
+
private readonly triggerAriaKey;
|
|
4969
|
+
private readonly panelAriaKey;
|
|
4970
|
+
private readonly activeOptionAriaKey;
|
|
4971
|
+
readonly loadingText: _angular_core.Signal<string>;
|
|
4972
|
+
readonly emptyText: _angular_core.Signal<string>;
|
|
4973
|
+
readonly errorText: _angular_core.Signal<string>;
|
|
4974
|
+
readonly triggerAriaText: _angular_core.Signal<string>;
|
|
4975
|
+
readonly panelAriaText: _angular_core.Signal<string>;
|
|
4976
|
+
readonly activeOptionAriaText: _angular_core.Signal<string>;
|
|
4977
|
+
constructor();
|
|
4978
|
+
/** Abre o cierra el panel desde el disparador. */
|
|
4979
|
+
protected onTriggerClick(): void;
|
|
4980
|
+
/** Teclado del disparador: abre con flechas/Enter/Espacio. */
|
|
4981
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
4982
|
+
/** Teclado del panel: navegación itinerante y selección. */
|
|
4983
|
+
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
4984
|
+
/** Elige un ámbito, cierra el panel y devuelve el foco al disparador. */
|
|
4985
|
+
protected select(scope: SolScope<TData>): void;
|
|
4986
|
+
/** Escape cierra el panel y devuelve el foco al disparador. */
|
|
4987
|
+
protected onDocumentEscape(): void;
|
|
4988
|
+
/**
|
|
4989
|
+
* Clic afuera. El panel vive portaleado en `document.body`, así que "dentro"
|
|
4990
|
+
* abarca tanto el host como el nodo portaleado.
|
|
4991
|
+
*/
|
|
4992
|
+
protected onDocumentClick(event: MouseEvent): void;
|
|
4993
|
+
private open;
|
|
4994
|
+
private close;
|
|
4995
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolScopeSwitcherComponent<any>, never>;
|
|
4996
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolScopeSwitcherComponent<any>, "sol-scope-switcher", never, { "scopes": { "alias": "scopes"; "required": false; "isSignal": true; }; "activeScopeId": { "alias": "activeScopeId"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "loadingMessage": { "alias": "loadingMessage"; "required": false; "isSignal": true; }; "triggerAriaLabel": { "alias": "triggerAriaLabel"; "required": false; "isSignal": true; }; "panelAriaLabel": { "alias": "panelAriaLabel"; "required": false; "isSignal": true; }; }, { "scopeSelected": "scopeSelected"; "openChange": "openChange"; }, never, never, true, never>;
|
|
4118
4997
|
}
|
|
4119
4998
|
|
|
4120
|
-
/** Modo visual soportado por todo tema (el toggle es preferencia local del usuario). */
|
|
4121
|
-
type ThemeMode = 'light' | 'dark';
|
|
4122
4999
|
/** Contexto que recibe un default v2 calculado: modo activo + resolutor de rutas del contrato. */
|
|
4123
5000
|
interface EmitDefaultContext {
|
|
4124
5001
|
mode: ThemeMode;
|
|
@@ -4137,7 +5014,7 @@ type EmitDefaultV1 = string | ((ctx: EmitDefaultContext) => string);
|
|
|
4137
5014
|
*/
|
|
4138
5015
|
type EmitRow = readonly [name: string, path: string, defaultV1?: EmitDefaultV1];
|
|
4139
5016
|
/**
|
|
4140
|
-
* Tabla única de "qué variables existen":
|
|
5017
|
+
* Tabla única de "qué variables existen": 96 filas (47 v1 obligatorias + 49 v2
|
|
4141
5018
|
* con default). Cada fila es [nombreCssVar, rutaDelToken, defaultV1?]; la ruta
|
|
4142
5019
|
* apunta dentro de `{ primitives, semantic, component }` (ver `resolveCssVars`).
|
|
4143
5020
|
* Agregar/quitar una fila cambia el conjunto emitido — por eso el test de tokens
|
|
@@ -4180,7 +5057,7 @@ declare function isRenderableTheme(file: ThemeFile | null | undefined): file is
|
|
|
4180
5057
|
/**
|
|
4181
5058
|
* ThemeService — runtime de theming white-label, AGNÓSTICO del host.
|
|
4182
5059
|
*
|
|
4183
|
-
* Emite los
|
|
5060
|
+
* Emite los 96 tokens `--sol-*` sobre `:root` a partir de un `ThemeFile` y
|
|
4184
5061
|
* reacciona a tres entradas: el tema del tenant (cargado por el puerto
|
|
4185
5062
|
* `THEME_SOURCE` que provee el host), el default empaquetado
|
|
4186
5063
|
* (`SOL_DEFAULT_THEME`) y el toggle light/dark. NO conoce el ORIGEN del tema
|
|
@@ -4232,6 +5109,12 @@ declare class ThemeService {
|
|
|
4232
5109
|
readonly logo: _angular_core.Signal<ThemeLogo | null>;
|
|
4233
5110
|
/** Nombre de marca del tenant (branding runtime): altText del logo o el slug del tenant. */
|
|
4234
5111
|
readonly brandName: _angular_core.Signal<string | null>;
|
|
5112
|
+
/**
|
|
5113
|
+
* URL del favicon del TENANT: `meta.favicon` sanitizado si existe y es seguro;
|
|
5114
|
+
* si no, la URL del logo efectivo. `null` sin tema de tenant (se restaura el
|
|
5115
|
+
* favicon empaquetado del host).
|
|
5116
|
+
*/
|
|
5117
|
+
readonly tenantFavicon: _angular_core.Signal<string | null>;
|
|
4235
5118
|
/** href original del favicon empaquetado (index.html); se captura una sola vez. */
|
|
4236
5119
|
private faviconOriginalHref;
|
|
4237
5120
|
private faviconCaptured;
|
|
@@ -4241,9 +5124,39 @@ declare class ThemeService {
|
|
|
4241
5124
|
* en vez de que la librería tire vía THEME_SOURCE). Validado como cualquier
|
|
4242
5125
|
* tema: uno inválido cae al default. Útil para hosts que ya tienen el tema en
|
|
4243
5126
|
* memoria (SSR, caché) o que no quieren implementar un ThemeSource.
|
|
5127
|
+
*
|
|
5128
|
+
* MODO POR DEFECTO (BD): si el tema traído trae `meta.defaultMode` y este
|
|
5129
|
+
* navegador NO tiene todavía una elección explícita del toggle
|
|
5130
|
+
* (`hasExplicitModePreference()` en `false`), ese modo se aplica AHORA — sin
|
|
5131
|
+
* persistirlo en `localStorage` — para que BD siga gobernando mientras el
|
|
5132
|
+
* usuario no elija por su cuenta.
|
|
4244
5133
|
*/
|
|
4245
5134
|
setTenantTheme(theme: ThemeFile | null): void;
|
|
5135
|
+
/**
|
|
5136
|
+
* Aplica `meta.defaultMode` del tema de la entidad (BD) como AUTORIDAD en
|
|
5137
|
+
* cada carga: cuando el tema declara un modo por defecto, ese modo gana
|
|
5138
|
+
* SIEMPRE, sobrescribiendo cualquier valor viejo en `localStorage`. Asi
|
|
5139
|
+
* ningun navegador se queda "pegado" en un modo antiguo — al recargar, el
|
|
5140
|
+
* modo vuelve a salir de BD. El toggle sol/luna sigue funcionando como
|
|
5141
|
+
* override en vivo dentro de la sesion; el siguiente arranque vuelve a
|
|
5142
|
+
* imponer el valor de BD. Si el tema NO declara `defaultMode` (v1), no se
|
|
5143
|
+
* toca nada y rige la preferencia local / del sistema de siempre.
|
|
5144
|
+
*
|
|
5145
|
+
* Se llama desde los DOS caminos que fijan el tema del tenant: el PUSH
|
|
5146
|
+
* (`setTenantTheme`) y el PULL via THEME_SOURCE (`loadTenantTheme`), para
|
|
5147
|
+
* que el shell real de PANDORA (que tira el tema) tambien lo honre.
|
|
5148
|
+
*/
|
|
5149
|
+
private applyEntityDefaultMode;
|
|
5150
|
+
/**
|
|
5151
|
+
* Fija el modo oscuro/claro y lo PERSISTE como elección EXPLÍCITA del
|
|
5152
|
+
* usuario (toggle sol/luna, o "Aplicar tema" del Theme Studio). A partir de
|
|
5153
|
+
* este punto `hasExplicitModePreference()` es `true` y `setTenantTheme` deja
|
|
5154
|
+
* de imponer `meta.defaultMode` en este navegador.
|
|
5155
|
+
*/
|
|
5156
|
+
setDarkMode(dark: boolean): void;
|
|
4246
5157
|
toggleMode(): void;
|
|
5158
|
+
/** `true` si este navegador ya tiene una elección EXPLÍCITA de modo (toggle) en `localStorage`. */
|
|
5159
|
+
hasExplicitModePreference(): boolean;
|
|
4247
5160
|
/**
|
|
4248
5161
|
* Fuerza la recarga del tema del tenant activo (Theme Studio: tras el PUT
|
|
4249
5162
|
* de `:id/theme` el tema recién persistido debe verse sin re-login ni
|
|
@@ -4325,6 +5238,13 @@ interface ThemeSource {
|
|
|
4325
5238
|
loadTheme(tenantId: number | string): Promise<ThemeFile | null>;
|
|
4326
5239
|
}
|
|
4327
5240
|
declare const THEME_SOURCE: InjectionToken<ThemeSource>;
|
|
5241
|
+
/**
|
|
5242
|
+
* The bundled "Vértice" ThemeFile as a plain constant (0.6.0). It is the
|
|
5243
|
+
* factory value of `SOL_DEFAULT_THEME` and the default base theme of the
|
|
5244
|
+
* headless Theme Studio builder (`@solercia/ui/theme-studio`). Treat it as
|
|
5245
|
+
* read-only: clone it before mutating.
|
|
5246
|
+
*/
|
|
5247
|
+
declare const SOL_BUNDLED_DEFAULT_THEME: ThemeFile;
|
|
4328
5248
|
/**
|
|
4329
5249
|
* The theme the library ships with and applies when there is no tenant theme.
|
|
4330
5250
|
* Defaults to the bundled "Vértice" theme (a full ThemeFile that mirrors the
|
|
@@ -4364,5 +5284,5 @@ declare function createIdentitySolI18n(): SolI18n;
|
|
|
4364
5284
|
*/
|
|
4365
5285
|
declare const SOL_I18N: InjectionToken<SolI18n>;
|
|
4366
5286
|
|
|
4367
|
-
export { DEFAULT_SCORE_THRESHOLDS, EMIT_TABLE, KANBAN_ADD_ACTION, KanbanReorderService, NEUTRAL_CALENDAR_COLOR, SOL_CALENDAR_COLOR, SOL_CHART_ENGINE, SOL_DEFAULT_THEME, SOL_I18N, SOL_TENANT_RESOLVER, SolAvatarComponent, SolBadgeComponent, SolButtonComponent, SolCalendarComponent, SolCalendarGridComponent, SolCalendarHeaderComponent, SolCardComponent, SolChartComponent, SolCheckboxComponent, SolChipComponent, SolChipGroupComponent, SolDataTableComponent, SolDatePickerComponent, SolDayPickerComponent, SolDrawerComponent, SolEmptyStateComponent, SolFileUploadComponent, SolFlowCanvasComponent, SolFormFieldComponent, SolIconButtonComponent, SolIconComponent, SolInputComponent, SolKanbanBoardComponent, SolKanbanCardComponent, SolKanbanColumnComponent, SolKanbanDragSourceComponent, SolMessageStatusComponent, SolModalComponent, SolNumberInputComponent, SolPageHeaderComponent, SolPaginationComponent, SolProgressBarComponent, SolRichEditorComponent, SolScoreBadgeComponent, SolSearchInputComponent, SolSelectComponent, SolSkeletonComponent, SolSpinnerComponent, SolStarRatingComponent, SolStepperComponent, SolTabsComponent, SolTextareaComponent, SolTimelineComponent, SolToggleComponent, SolTooltipComponent, SolTrendComponent, SolViewToggleComponent, SolVirtualScrollComponent, SolWizardComponent, SolWizardStepDirective, TCPDF_ALLOWED_STYLE_PROPERTIES, TCPDF_ALLOWED_TAGS, THEME_SOURCE, ThemeService, buildDayColumns, buildGoogleFontsUrl, collectUndatedNodes, computeAutoLayoutPositions, computeEventHeight, computeEventTop, computeGlobalRange, computeInitials, computeMonthAxisTicks, computeNowTop, createIdentitySolI18n, dayKey, defaultStatusToken, defaultTrendFormat, getWeekStart, hashToPaletteIndex, isRenderableTheme, isSafeBackgroundImage, isSafeCssColor, parseEventDate, positionRows, provideTheme, resolveCssVars, resolveScoreTone, resolveTrendDirection, sanitizeAssetUrl, sanitizeHtmlToTcpdf, serializeElementToTcpdfHtml };
|
|
4368
|
-
export type { CalendarDayColumn, DataTableColumn, DayPickerItem, KanbanCardTemplateContext, KanbanColumn, KanbanColumnAction, KanbanDragSourceItemContext, KanbanItem, KanbanItemMoved, LinkableTask, MentionUser, PositionedTimelineRow, SolAvatarSize, SolButtonSize, SolButtonVariant, SolCalendarColorStrategy, SolCalendarEvent, SolCalendarEventTemplateContext, SolCalendarLegendItem, SolCalendarView, SolChartData, SolChartEngineFactory, SolChartEngineHandle, SolChartOptions, SolChartSeries, SolChartType, SolCheckboxColor, SolCheckboxShape, SolCheckboxSize, SolChipOption, SolChipRole, SolChipSize, SolDataTableRow, SolDatePickerSize, SolDrawerSide, SolDrawerSize, SolDrawerVariant, SolFlowCanvasConnectionCreatedEvent, SolFlowCanvasConnectionRemovedEvent, SolFlowCanvasEdge, SolFlowCanvasEdgeKind, SolFlowCanvasNode, SolFlowCanvasNodeBadge, SolFlowCanvasNodeMovedEvent, SolFlowCanvasNodeSelectedEvent, SolFlowCanvasNodeTemplateContext, SolFlowCanvasNodeVisualState, SolFlowCanvasPosition, SolI18n, SolIconButtonSize, SolIconButtonVariant, SolIconName, SolIconSize, SolIconVariant, SolMessageStatus, SolProgressMode, SolProgressSize, SolProgressVariant, SolRichImageUploader, SolScoreThreshold, SolSelectOption, SolSkeletonVariant, SolStarRatingSize, SolStepperNavigation, SolStepperOrientation, SolStepperStep, SolStepperStepState, SolTabItem, SolTenantResolver, SolTimelineAxisTick, SolTimelineRange, SolTimelineStatusResolver, SolTone, SolTrendDirection, SolViewToggleOption, SolVirtualScrollItemContext, SolWizardCanAdvance, SolWizardStep, StateColorSet, ThemeAlerts, ThemeComponent, ThemeFile, ThemeFont, ThemeLogo, ThemeMeta, ThemeMode, ThemeModeConfig, ThemePrimitives, ThemeSemantic, ThemeSource, TimelineLegendItem, TimelineNode, TokenRef };
|
|
5287
|
+
export { DEFAULT_SCORE_THRESHOLDS, EMIT_TABLE, KANBAN_ADD_ACTION, KanbanReorderService, NEUTRAL_CALENDAR_COLOR, SOL_BUNDLED_DEFAULT_THEME, SOL_CALENDAR_COLOR, SOL_CHART_ENGINE, SOL_DEFAULT_THEME, SOL_I18N, SOL_TABLE_VARIANTS, SOL_TENANT_RESOLVER, SOL_TREE_MAX_DEPTH, SolAvatarComponent, SolBadgeComponent, SolButtonComponent, SolCalendarComponent, SolCalendarGridComponent, SolCalendarHeaderComponent, SolCardComponent, SolChartComponent, SolCheckboxComponent, SolChipComponent, SolChipGroupComponent, SolDataTableComponent, SolDatePickerComponent, SolDayPickerComponent, SolDrawerComponent, SolEmptyStateComponent, SolFileUploadComponent, SolFlowCanvasComponent, SolFormFieldComponent, SolIconButtonComponent, SolIconComponent, SolInputComponent, SolKanbanBoardComponent, SolKanbanCardComponent, SolKanbanColumnComponent, SolKanbanDragSourceComponent, SolMessageStatusComponent, SolModalComponent, SolNotificationPanelComponent, SolNumberInputComponent, SolPageHeaderComponent, SolPaginationComponent, SolProgressBarComponent, SolRatingInputComponent, SolRichEditorComponent, SolScopeSwitcherComponent, SolScoreBadgeComponent, SolSearchInputComponent, SolSelectComponent, SolSkeletonComponent, SolSpinnerComponent, SolStarRatingComponent, SolStepperComponent, SolTabsComponent, SolTextareaComponent, SolTimelineComponent, SolToggleComponent, SolTooltipComponent, SolTreeComponent, SolTreeNodeDefDirective, SolTrendComponent, SolViewToggleComponent, SolVirtualScrollComponent, SolWizardComponent, SolWizardStepDirective, TCPDF_ALLOWED_STYLE_PROPERTIES, TCPDF_ALLOWED_TAGS, THEME_SOURCE, ThemeService, buildDayColumns, buildGoogleFontsUrl, collectUndatedNodes, computeAutoLayoutPositions, computeEventHeight, computeEventTop, computeGlobalRange, computeInitials, computeMonthAxisTicks, computeNowTop, createIdentitySolI18n, dayKey, defaultStatusToken, defaultTrendFormat, getWeekStart, hashToPaletteIndex, isRenderableTheme, isSafeBackgroundImage, isSafeCssColor, normalizeRating, parseEventDate, positionRows, provideTheme, resolveCssVars, resolveScoreTone, resolveTrendDirection, sanitizeAssetUrl, sanitizeHtmlToTcpdf, serializeElementToTcpdfHtml };
|
|
5288
|
+
export type { CalendarDayColumn, DataTableColumn, DayPickerItem, KanbanCardTemplateContext, KanbanColumn, KanbanColumnAction, KanbanDragSourceItemContext, KanbanItem, KanbanItemMoved, LinkableTask, MentionUser, PositionedTimelineRow, SolAvatarSize, SolButtonSize, SolButtonVariant, SolCalendarColorStrategy, SolCalendarEvent, SolCalendarEventTemplateContext, SolCalendarLegendItem, SolCalendarView, SolChartData, SolChartEngineFactory, SolChartEngineHandle, SolChartOptions, SolChartSeries, SolChartType, SolCheckboxColor, SolCheckboxShape, SolCheckboxSize, SolChipOption, SolChipRole, SolChipSize, SolDataTableRow, SolDatePickerSize, SolDrawerSide, SolDrawerSize, SolDrawerVariant, SolFlowCanvasConnectionCreatedEvent, SolFlowCanvasConnectionRemovedEvent, SolFlowCanvasEdge, SolFlowCanvasEdgeKind, SolFlowCanvasNode, SolFlowCanvasNodeBadge, SolFlowCanvasNodeMovedEvent, SolFlowCanvasNodeSelectedEvent, SolFlowCanvasNodeTemplateContext, SolFlowCanvasNodeVisualState, SolFlowCanvasPosition, SolI18n, SolIconButtonSize, SolIconButtonVariant, SolIconName, SolIconSize, SolIconVariant, SolMessageStatus, SolNotificationItem, SolNotificationPanelState, SolNotificationTone, SolProgressMode, SolProgressSize, SolProgressVariant, SolRatingInputSize, SolRichImageUploader, SolScope, SolScopeSwitcherStatus, SolScoreThreshold, SolSelectOption, SolSkeletonVariant, SolStarRatingSize, SolStepperNavigation, SolStepperOrientation, SolStepperStep, SolStepperStepState, SolTabItem, SolTableVariant, SolTenantResolver, SolTimelineAxisTick, SolTimelineRange, SolTimelineStatusResolver, SolTone, SolTreeNode, SolTreeNodeTemplateContext, SolTreeToggleEvent, SolTrendDirection, SolViewToggleOption, SolVirtualScrollItemContext, SolWizardCanAdvance, SolWizardStep, StateColorSet, ThemeAlerts, ThemeComponent, ThemeFile, ThemeFont, ThemeLogo, ThemeMeta, ThemeMode, ThemeModeConfig, ThemePrimitives, ThemeSemantic, ThemeSource, ThemeTableComponent, TimelineLegendItem, TimelineNode, TokenRef };
|