@solercia/ui 0.1.0 → 0.1.1
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 +21 -0
- package/fesm2022/solercia-ui.mjs +1213 -11
- package/fesm2022/solercia-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/types/solercia-ui.d.ts +269 -6
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solercia/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Design system Solercia (componentes sol-*, theming agnóstico por puertos, contrato i18n y schematics ng add/ng generate) para proyectos Angular del ecosistema Solercia.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Solercia Solutions SAS",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/solercia-solutions/boki-front.git",
|
|
10
10
|
"directory": "projects/solercia/ui"
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
package/types/solercia-ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { ElementRef, TemplateRef, AfterViewChecked, InjectionToken, AfterViewInit,
|
|
2
|
+
import { ElementRef, TemplateRef, AfterViewChecked, InjectionToken, AfterViewInit, Signal, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { SafeHtml } from '@angular/platform-browser';
|
|
5
5
|
import { ChartConfiguration } from 'chart.js';
|
|
@@ -1098,6 +1098,24 @@ declare class SolChartComponent {
|
|
|
1098
1098
|
|
|
1099
1099
|
/** Hook opcional para subir una imagen y devolver su URL definitiva. */
|
|
1100
1100
|
type SolRichImageUploader = (file: File) => Promise<string>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Usuario mencionable con `@` (opt-in). Al elegirlo se inserta un chip
|
|
1103
|
+
* `<span data-mention-id="id">@name</span>` y se emite su `id` en
|
|
1104
|
+
* `mentionsChange`.
|
|
1105
|
+
*/
|
|
1106
|
+
interface MentionUser {
|
|
1107
|
+
id: string;
|
|
1108
|
+
name: string;
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* Tarea enlazable con `#` (opt-in). Al elegirla se inserta un chip
|
|
1112
|
+
* `<span data-task-key="key">key</span>` y se emite su `key` en
|
|
1113
|
+
* `taskLinksChange`.
|
|
1114
|
+
*/
|
|
1115
|
+
interface LinkableTask {
|
|
1116
|
+
key: string;
|
|
1117
|
+
title: string;
|
|
1118
|
+
}
|
|
1101
1119
|
/** Estado de los formatos activos bajo el cursor (para resaltar la toolbar). */
|
|
1102
1120
|
interface ActiveFormats {
|
|
1103
1121
|
bold: boolean;
|
|
@@ -1146,8 +1164,22 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1146
1164
|
readonly imageMaxBytes: _angular_core.InputSignal<number>;
|
|
1147
1165
|
/** Hook opcional para subir la imagen y usar su URL en vez del data URL. */
|
|
1148
1166
|
readonly imageUpload: _angular_core.InputSignal<SolRichImageUploader | null>;
|
|
1167
|
+
/**
|
|
1168
|
+
* Usuarios mencionables con `@` (opt-in). Vacío ⇒ menciones DESACTIVADAS:
|
|
1169
|
+
* el editor se comporta exactamente igual que sin esta capacidad.
|
|
1170
|
+
*/
|
|
1171
|
+
readonly mentionableUsers: _angular_core.InputSignal<MentionUser[]>;
|
|
1172
|
+
/**
|
|
1173
|
+
* Tareas enlazables con `#` (opt-in). Vacío ⇒ enlaces DESACTIVADOS: el
|
|
1174
|
+
* editor se comporta exactamente igual que sin esta capacidad.
|
|
1175
|
+
*/
|
|
1176
|
+
readonly linkableTasks: _angular_core.InputSignal<LinkableTask[]>;
|
|
1149
1177
|
/** Emite el HTML limpio en cada cambio (además del flujo CVA). */
|
|
1150
1178
|
readonly valueChange: _angular_core.OutputEmitterRef<string>;
|
|
1179
|
+
/** IDs únicos (orden de documento) de los usuarios mencionados en el contenido. */
|
|
1180
|
+
readonly mentionsChange: _angular_core.OutputEmitterRef<string[]>;
|
|
1181
|
+
/** Keys únicas (orden de documento) de las tareas enlazadas en el contenido. */
|
|
1182
|
+
readonly taskLinksChange: _angular_core.OutputEmitterRef<string[]>;
|
|
1151
1183
|
private readonly editable;
|
|
1152
1184
|
private readonly fileInput;
|
|
1153
1185
|
private readonly linkInput;
|
|
@@ -1161,6 +1193,21 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1161
1193
|
readonly tableCols: _angular_core.WritableSignal<number>;
|
|
1162
1194
|
readonly linkUrl: _angular_core.WritableSignal<string>;
|
|
1163
1195
|
readonly imageError: _angular_core.WritableSignal<string>;
|
|
1196
|
+
readonly showMentionPopover: _angular_core.WritableSignal<boolean>;
|
|
1197
|
+
readonly showTaskPopover: _angular_core.WritableSignal<boolean>;
|
|
1198
|
+
readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
1199
|
+
readonly popoverTop: _angular_core.WritableSignal<number>;
|
|
1200
|
+
readonly popoverLeft: _angular_core.WritableSignal<number>;
|
|
1201
|
+
private readonly mentionQuery;
|
|
1202
|
+
private readonly taskQuery;
|
|
1203
|
+
/** Rango que abarca `@query`/`#query`; se reemplaza por el chip al elegir. */
|
|
1204
|
+
private triggerRange;
|
|
1205
|
+
/** Menciones activas solo si hay usuarios; si no, el trigger `@` se ignora. */
|
|
1206
|
+
readonly mentionsEnabled: _angular_core.Signal<boolean>;
|
|
1207
|
+
/** Enlaces activos solo si hay tareas; si no, el trigger `#` se ignora. */
|
|
1208
|
+
readonly tasksEnabled: _angular_core.Signal<boolean>;
|
|
1209
|
+
readonly filteredUsers: _angular_core.Signal<MentionUser[]>;
|
|
1210
|
+
readonly filteredTasks: _angular_core.Signal<LinkableTask[]>;
|
|
1164
1211
|
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
1165
1212
|
readonly isEmpty: _angular_core.Signal<boolean>;
|
|
1166
1213
|
readonly editorAriaLabel: _angular_core.Signal<string>;
|
|
@@ -1193,6 +1240,8 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1193
1240
|
linkConfirm: string;
|
|
1194
1241
|
editorAria: string;
|
|
1195
1242
|
imageTooLarge: string;
|
|
1243
|
+
mentionList: string;
|
|
1244
|
+
taskList: string;
|
|
1196
1245
|
}>;
|
|
1197
1246
|
/** Selección guardada al abrir menús que roban el foco (enlace/imagen). */
|
|
1198
1247
|
private savedRange;
|
|
@@ -1212,6 +1261,10 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1212
1261
|
getHtml(): string;
|
|
1213
1262
|
onInput(): void;
|
|
1214
1263
|
onBlur(): void;
|
|
1264
|
+
/** Navegación del popover de menciones/tareas (solo cuando está abierto). */
|
|
1265
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
1266
|
+
/** Inicial en mayúscula para el avatar del popover de menciones. */
|
|
1267
|
+
initial(name: string): string;
|
|
1215
1268
|
/** Recalcula el estado de la toolbar de forma diferida (tras el DOM). */
|
|
1216
1269
|
scheduleActiveUpdate(): void;
|
|
1217
1270
|
cmd(command: string): void;
|
|
@@ -1229,6 +1282,28 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1229
1282
|
private handleImageFile;
|
|
1230
1283
|
private insertImage;
|
|
1231
1284
|
private showImageError;
|
|
1285
|
+
/**
|
|
1286
|
+
* Analiza el texto anterior al cursor: si hay un trigger `@`/`#` activo (al
|
|
1287
|
+
* inicio o precedido por espacio) y su lista está habilitada, abre el popover
|
|
1288
|
+
* respectivo; si no, lo cierra.
|
|
1289
|
+
*/
|
|
1290
|
+
private detectAutocomplete;
|
|
1291
|
+
/** Trigger + consulta inmediatamente antes del cursor colapsado (o null). */
|
|
1292
|
+
private getQueryBeforeCursor;
|
|
1293
|
+
/** Ubica el popover bajo el caret (cálculo manual; sin librerías de posición). */
|
|
1294
|
+
private positionPopover;
|
|
1295
|
+
closePopovers(): void;
|
|
1296
|
+
selectMention(event: Event | null, index: number): void;
|
|
1297
|
+
selectTask(event: Event | null, index: number): void;
|
|
1298
|
+
/**
|
|
1299
|
+
* Reemplaza el rango `@query`/`#query` por un chip `<span>` no editable con
|
|
1300
|
+
* el atributo data-* dado, y deja el cursor tras él con un espacio.
|
|
1301
|
+
*/
|
|
1302
|
+
private insertChip;
|
|
1303
|
+
/** Marca los chips como no editables tras (re)pintar el contenido. */
|
|
1304
|
+
private hardenChips;
|
|
1305
|
+
/** IDs/keys únicos (orden de documento) de los chips presentes en el DOM. */
|
|
1306
|
+
private collectChipValues;
|
|
1232
1307
|
onPaste(event: ClipboardEvent): void;
|
|
1233
1308
|
preventSteal(event: Event): void;
|
|
1234
1309
|
onTriggerMousedown(event: Event): void;
|
|
@@ -1246,7 +1321,181 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1246
1321
|
private updateActiveFormats;
|
|
1247
1322
|
private selectedImage;
|
|
1248
1323
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolRichEditorComponent, never>;
|
|
1249
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolRichEditorComponent, "sol-rich-editor", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "imageMaxBytes": { "alias": "imageMaxBytes"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
1324
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SolRichEditorComponent, "sol-rich-editor", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "imageMaxBytes": { "alias": "imageMaxBytes"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; "mentionableUsers": { "alias": "mentionableUsers"; "required": false; "isSignal": true; }; "linkableTasks": { "alias": "linkableTasks"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "mentionsChange": "mentionsChange"; "taskLinksChange": "taskLinksChange"; }, never, never, true, never>;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* Cabecera de página del design system: título (H1) + subtítulo opcional a la
|
|
1329
|
+
* izquierda, con un slot proyectado de acciones alineadas a la derecha (p. ej.
|
|
1330
|
+
* un botón "Crear"). Tematizado con `var(--sol-*)` — soporta light y dark.
|
|
1331
|
+
*
|
|
1332
|
+
* Uso:
|
|
1333
|
+
* ```html
|
|
1334
|
+
* <sol-page-header title="Profesionales" subtitle="Gestiona tu equipo">
|
|
1335
|
+
* <sol-button (clicked)="crear()">Crear</sol-button>
|
|
1336
|
+
* </sol-page-header>
|
|
1337
|
+
* ```
|
|
1338
|
+
*/
|
|
1339
|
+
declare class SolPageHeaderComponent {
|
|
1340
|
+
/** Título principal (H1). Obligatorio. */
|
|
1341
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
1342
|
+
/** Subtítulo opcional bajo el título. */
|
|
1343
|
+
readonly subtitle: _angular_core.InputSignal<string>;
|
|
1344
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolPageHeaderComponent, never>;
|
|
1345
|
+
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>;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
/** Estilo visual del botón de ícono, alineado con las variantes de `sol-button`. */
|
|
1349
|
+
type SolIconButtonVariant = 'default' | 'danger' | 'ghost';
|
|
1350
|
+
/** Tamaño (cuadrado) del botón de ícono. */
|
|
1351
|
+
type SolIconButtonSize = 'sm' | 'md' | 'lg';
|
|
1352
|
+
/**
|
|
1353
|
+
* Botón cuadrado de solo ícono, con `aria-label` obligatorio por accesibilidad.
|
|
1354
|
+
* El ícono sale del registry de la librería vía `sol-icon` (nunca SVG inline).
|
|
1355
|
+
* Tematizado con `var(--sol-*)` — soporta light y dark.
|
|
1356
|
+
*
|
|
1357
|
+
* Uso:
|
|
1358
|
+
* ```html
|
|
1359
|
+
* <sol-icon-button icon="edit" ariaLabel="Editar" (clicked)="editar()" />
|
|
1360
|
+
* <sol-icon-button icon="trash" variant="danger" ariaLabel="Eliminar" (clicked)="eliminar()" />
|
|
1361
|
+
* ```
|
|
1362
|
+
*/
|
|
1363
|
+
declare class SolIconButtonComponent {
|
|
1364
|
+
/** Ícono del registry a mostrar. Obligatorio. */
|
|
1365
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
1366
|
+
/** Etiqueta accesible obligatoria (el botón no tiene texto visible). */
|
|
1367
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
1368
|
+
/** Atributo `type` nativo del botón. */
|
|
1369
|
+
readonly type: _angular_core.InputSignal<"submit" | "button">;
|
|
1370
|
+
/** Estilo visual. */
|
|
1371
|
+
readonly variant: _angular_core.InputSignal<SolIconButtonVariant>;
|
|
1372
|
+
/** Tamaño cuadrado. */
|
|
1373
|
+
readonly size: _angular_core.InputSignal<SolIconButtonSize>;
|
|
1374
|
+
/** Deshabilita el botón. */
|
|
1375
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1376
|
+
/** Se emite al hacer clic cuando el botón no está deshabilitado. */
|
|
1377
|
+
readonly clicked: _angular_core.OutputEmitterRef<void>;
|
|
1378
|
+
/** Clases CSS combinando variante y tamaño. */
|
|
1379
|
+
readonly cssClass: _angular_core.Signal<string>;
|
|
1380
|
+
onClick(event: MouseEvent): void;
|
|
1381
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolIconButtonComponent, never>;
|
|
1382
|
+
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>;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/** Fila genérica de la tabla: un objeto plano indexable por clave. */
|
|
1386
|
+
type SolDataTableRow = Record<string, unknown>;
|
|
1387
|
+
/**
|
|
1388
|
+
* Descriptor de columna que dirige el render de `sol-data-table`.
|
|
1389
|
+
*
|
|
1390
|
+
* - `key`: ruta al valor en la fila (soporta anidamiento con puntos, `a.b.c`).
|
|
1391
|
+
* - `label`: encabezado visible de la columna.
|
|
1392
|
+
* - `sortable`: habilita el orden por esa columna al hacer clic en el th.
|
|
1393
|
+
* - `width`: ancho CSS opcional del th (`'120px'`, `'20%'`…).
|
|
1394
|
+
* - `badge`: marca la columna de estado (chip): en el modo móvil colapsado su
|
|
1395
|
+
* valor se muestra como chip junto al título en la cabecera de la fila.
|
|
1396
|
+
* - `cellTemplate`: plantilla opcional para renderizar la celda (recibe el
|
|
1397
|
+
* valor resuelto como `$implicit` y la fila completa como `row`).
|
|
1398
|
+
*/
|
|
1399
|
+
interface DataTableColumn {
|
|
1400
|
+
key: string;
|
|
1401
|
+
label: string;
|
|
1402
|
+
sortable?: boolean;
|
|
1403
|
+
width?: string;
|
|
1404
|
+
badge?: boolean;
|
|
1405
|
+
cellTemplate?: TemplateRef<{
|
|
1406
|
+
$implicit: unknown;
|
|
1407
|
+
row: SolDataTableRow;
|
|
1408
|
+
}>;
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* Tabla de datos genérica dirigida por columnas: búsqueda, orden, paginación,
|
|
1412
|
+
* estado de carga (skeleton), estado vacío y acciones por fila. En viewport
|
|
1413
|
+
* móvil colapsa cada fila a un resumen expandible (sin scroll horizontal)
|
|
1414
|
+
* cuando el tema activo lo prefiere (`component.table.mobile: "collapse"`).
|
|
1415
|
+
*
|
|
1416
|
+
* Componente presentacional: no conoce dominio. Las acciones no genéricas se
|
|
1417
|
+
* proyectan por el slot `#rowActions` (TemplateRef que recibe la fila).
|
|
1418
|
+
* Tematizado con `var(--sol-*)` — soporta light y dark.
|
|
1419
|
+
*/
|
|
1420
|
+
declare class SolDataTableComponent {
|
|
1421
|
+
private readonly themeService;
|
|
1422
|
+
readonly data: _angular_core.InputSignal<SolDataTableRow[]>;
|
|
1423
|
+
readonly columns: _angular_core.InputSignal<DataTableColumn[]>;
|
|
1424
|
+
/**
|
|
1425
|
+
* Estado de carga de la fuente de datos: sustituye el cuerpo por filas
|
|
1426
|
+
* skeleton tokenizadas y oculta la paginación mientras esté activo.
|
|
1427
|
+
*/
|
|
1428
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
1429
|
+
readonly searchPlaceholder: _angular_core.InputSignal<string>;
|
|
1430
|
+
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
1431
|
+
readonly paginated: _angular_core.InputSignal<boolean>;
|
|
1432
|
+
readonly showToolbar: _angular_core.InputSignal<boolean>;
|
|
1433
|
+
readonly filterPosition: _angular_core.InputSignal<"left" | "right">;
|
|
1434
|
+
readonly showActions: _angular_core.InputSignal<boolean>;
|
|
1435
|
+
readonly showEditAction: _angular_core.InputSignal<boolean>;
|
|
1436
|
+
readonly showDeleteAction: _angular_core.InputSignal<boolean>;
|
|
1437
|
+
readonly trackByKey: _angular_core.InputSignal<string>;
|
|
1438
|
+
/** Encabezado de la columna de acciones. */
|
|
1439
|
+
readonly actionsLabel: _angular_core.InputSignal<string>;
|
|
1440
|
+
/** aria-label del botón ▶ de expansión de fila en el modo móvil. */
|
|
1441
|
+
readonly toggleDetailsLabel: _angular_core.InputSignal<string>;
|
|
1442
|
+
readonly editClicked: _angular_core.OutputEmitterRef<SolDataTableRow>;
|
|
1443
|
+
readonly deleteClicked: _angular_core.OutputEmitterRef<SolDataTableRow>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Plantilla de acciones por fila proyectada con `#rowActions`. Recibe la fila
|
|
1446
|
+
* como `$implicit`. Cuando existe, reemplaza los botones editar/eliminar por
|
|
1447
|
+
* defecto: aquí van las acciones específicas del dominio del consumidor.
|
|
1448
|
+
*/
|
|
1449
|
+
readonly rowActionsTemplate: Signal<TemplateRef<{
|
|
1450
|
+
$implicit: SolDataTableRow;
|
|
1451
|
+
}> | undefined>;
|
|
1452
|
+
/**
|
|
1453
|
+
* Carga "estirada" a un mínimo visible (anti-flash): con un backend rápido
|
|
1454
|
+
* `loading` se apaga antes de que el skeleton se perciba. `loadingVisible`
|
|
1455
|
+
* mantiene el skeleton un instante mínimo — es lo que consume el template.
|
|
1456
|
+
*/
|
|
1457
|
+
protected readonly loadingVisible: Signal<boolean>;
|
|
1458
|
+
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
1459
|
+
readonly currentPage: _angular_core.WritableSignal<number>;
|
|
1460
|
+
readonly pageSize: _angular_core.WritableSignal<number>;
|
|
1461
|
+
readonly sortKey: _angular_core.WritableSignal<string>;
|
|
1462
|
+
readonly sortDirection: _angular_core.WritableSignal<"desc" | "asc">;
|
|
1463
|
+
/** Señal reactiva de viewport móvil (breakpoint canónico 767px). */
|
|
1464
|
+
readonly isMobileViewport: Signal<boolean>;
|
|
1465
|
+
/** Índices de las filas fantasma del estado de carga (7 filas fijas). */
|
|
1466
|
+
protected readonly skeletonRows: number[];
|
|
1467
|
+
/**
|
|
1468
|
+
* Token aditivo `component.table.mobile` del ThemeFile activo.
|
|
1469
|
+
* "collapse" (default): filas colapsables sin scroll horizontal.
|
|
1470
|
+
* "scroll": conserva la tabla con overflow-x. El token ajusta la
|
|
1471
|
+
* preferencia — NUNCA la estructura del componente.
|
|
1472
|
+
*/
|
|
1473
|
+
private readonly tableMobileMode;
|
|
1474
|
+
/** El modo colapsado aplica solo en viewport móvil con preferencia "collapse". */
|
|
1475
|
+
readonly mobileCollapse: Signal<boolean>;
|
|
1476
|
+
/** Filas expandidas del modo colapsado (por id de trackBy). */
|
|
1477
|
+
readonly expandedRows: _angular_core.WritableSignal<ReadonlySet<string | number>>;
|
|
1478
|
+
/** Columna título de la fila colapsada = primera columna configurada. */
|
|
1479
|
+
readonly mobileTitleCol: Signal<DataTableColumn | undefined>;
|
|
1480
|
+
/** Columna del chip de estado = la marcada con `badge: true` (si existe). */
|
|
1481
|
+
readonly mobileBadgeCol: Signal<DataTableColumn | undefined>;
|
|
1482
|
+
/** Subdato = la segunda columna que no sea el chip de estado. */
|
|
1483
|
+
readonly mobileSubtitleCol: Signal<DataTableColumn | undefined>;
|
|
1484
|
+
/** Columnas ocultas en el colapso: todas menos título, subdato y chip. */
|
|
1485
|
+
readonly mobileDetailCols: Signal<DataTableColumn[]>;
|
|
1486
|
+
readonly filteredData: Signal<SolDataTableRow[]>;
|
|
1487
|
+
readonly pagedData: Signal<SolDataTableRow[]>;
|
|
1488
|
+
resolveValue(row: SolDataTableRow, key: string): unknown;
|
|
1489
|
+
trackId(index: number, row: SolDataTableRow): string | number;
|
|
1490
|
+
/** Estado de expansión de una fila en el modo móvil colapsado. */
|
|
1491
|
+
isRowExpanded(id: string | number): boolean;
|
|
1492
|
+
/** Expande/colapsa una fila del modo móvil colapsado. */
|
|
1493
|
+
toggleRow(id: string | number): void;
|
|
1494
|
+
onSearch(term: string): void;
|
|
1495
|
+
onSort(key: string): void;
|
|
1496
|
+
onPageSizeChange(size: number): void;
|
|
1497
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolDataTableComponent, never>;
|
|
1498
|
+
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; }; }, { "editClicked": "editClicked"; "deleteClicked": "deleteClicked"; }, ["rowActionsTemplate"], ["[tableFilters]", "[tableActions]"], true, never>;
|
|
1250
1499
|
}
|
|
1251
1500
|
|
|
1252
1501
|
/**
|
|
@@ -1261,8 +1510,18 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1261
1510
|
* ── Allowlist de TAGS de salida ──────────────────────────────────────────
|
|
1262
1511
|
* Bloque: <p> <h1> <h2> <h3> <ul> <ol> <li> <table><tbody><tr><td> <br>
|
|
1263
1512
|
* Inline: <strong> <em> <u> <s> <a> <img>
|
|
1513
|
+
* Chip: <span data-mention-id="…"> / <span data-task-key="…"> (OPT-IN)
|
|
1264
1514
|
* Nada más. Todo lo demás se desanida (unwrap), se convierte o se descarta.
|
|
1265
1515
|
*
|
|
1516
|
+
* ── Chips de mención (@) y enlace de tarea (#) — OPT-IN ───────────────────
|
|
1517
|
+
* Un `<span>` se PRESERVA en la salida SOLO si porta `data-mention-id` o
|
|
1518
|
+
* `data-task-key`. En ese caso se emite un span canónico con EXACTAMENTE ese
|
|
1519
|
+
* único atributo data-* (valor escapado) y su texto; cualquier otro atributo
|
|
1520
|
+
* del span de entrada (class, style, on*, contenteditable, href…) se DESCARTA
|
|
1521
|
+
* —no hay passthrough—. Un `<span>` normal (sin data de chip) se desanida
|
|
1522
|
+
* como siempre. Esto no abre XSS: solo el atributo data-* controlado y el
|
|
1523
|
+
* texto escapado sobreviven; el span nunca lleva estilos ni handlers.
|
|
1524
|
+
*
|
|
1266
1525
|
* ── Conversión de tags de entrada ────────────────────────────────────────
|
|
1267
1526
|
* <b>/<strong> → <strong>
|
|
1268
1527
|
* <i>/<em> → <em>
|
|
@@ -1301,8 +1560,12 @@ declare class SolRichEditorComponent implements ControlValueAccessor, AfterViewI
|
|
|
1301
1560
|
* serializa por allowlist. `<script>`, `<style>`, `<iframe>`, handlers `on*`,
|
|
1302
1561
|
* `href="javascript:"` y `src` no permitidos se descartan.
|
|
1303
1562
|
*/
|
|
1304
|
-
/**
|
|
1305
|
-
|
|
1563
|
+
/**
|
|
1564
|
+
* Tags permitidos en la salida (para documentación/validación externa).
|
|
1565
|
+
* `span` SOLO se emite para chips de mención/tarea (`data-mention-id` /
|
|
1566
|
+
* `data-task-key`); un `<span>` normal se sigue desanidando.
|
|
1567
|
+
*/
|
|
1568
|
+
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"];
|
|
1306
1569
|
/**
|
|
1307
1570
|
* Propiedades CSS de ENTRADA que el serializador inspecciona. `text-align` se
|
|
1308
1571
|
* conserva como estilo canónico en bloques; las otras tres se traducen a tags
|
|
@@ -1859,5 +2122,5 @@ declare function createIdentitySolI18n(): SolI18n;
|
|
|
1859
2122
|
*/
|
|
1860
2123
|
declare const SOL_I18N: InjectionToken<SolI18n>;
|
|
1861
2124
|
|
|
1862
|
-
export { EMIT_TABLE, SOL_CHART_ENGINE, SOL_DEFAULT_THEME, SOL_I18N, SOL_TENANT_RESOLVER, SolBadgeComponent, SolButtonComponent, SolCardComponent, SolChartComponent, SolCheckboxComponent, SolDatePickerComponent, SolDayPickerComponent, SolEmptyStateComponent, SolFileUploadComponent, SolFormFieldComponent, SolIconComponent, SolInputComponent, SolModalComponent, SolPaginationComponent, SolProgressBarComponent, SolRichEditorComponent, SolSearchInputComponent, SolSelectComponent, SolSkeletonComponent, SolSpinnerComponent, SolStepperComponent, SolTabsComponent, SolTextareaComponent, SolToggleComponent, SolTooltipComponent, SolViewToggleComponent, SolVirtualScrollComponent, SolWizardComponent, SolWizardStepDirective, TCPDF_ALLOWED_STYLE_PROPERTIES, TCPDF_ALLOWED_TAGS, THEME_SOURCE, ThemeService, buildGoogleFontsUrl, createIdentitySolI18n, isRenderableTheme, isSafeBackgroundImage, provideTheme, resolveCssVars, sanitizeAssetUrl, sanitizeHtmlToTcpdf, serializeElementToTcpdfHtml };
|
|
1863
|
-
export type { DayPickerItem, SolButtonSize, SolButtonVariant, SolChartData, SolChartEngineFactory, SolChartEngineHandle, SolChartOptions, SolChartSeries, SolChartType, SolCheckboxColor, SolCheckboxShape, SolCheckboxSize, SolDatePickerSize, SolI18n, SolIconName, SolIconSize, SolIconVariant, SolProgressMode, SolProgressSize, SolProgressVariant, SolRichImageUploader, SolSelectOption, SolSkeletonVariant, SolStepperOrientation, SolStepperStep, SolStepperStepState, SolTabItem, SolTenantResolver, SolViewToggleOption, SolVirtualScrollItemContext, SolWizardCanAdvance, SolWizardStep, ThemeAlerts, ThemeComponent, ThemeFile, ThemeFont, ThemeLogo, ThemeMeta, ThemeMode, ThemeModeConfig, ThemePrimitives, ThemeSemantic, ThemeSource, TokenRef };
|
|
2125
|
+
export { EMIT_TABLE, SOL_CHART_ENGINE, SOL_DEFAULT_THEME, SOL_I18N, SOL_TENANT_RESOLVER, SolBadgeComponent, SolButtonComponent, SolCardComponent, SolChartComponent, SolCheckboxComponent, SolDataTableComponent, SolDatePickerComponent, SolDayPickerComponent, SolEmptyStateComponent, SolFileUploadComponent, SolFormFieldComponent, SolIconButtonComponent, SolIconComponent, SolInputComponent, SolModalComponent, SolPageHeaderComponent, SolPaginationComponent, SolProgressBarComponent, SolRichEditorComponent, SolSearchInputComponent, SolSelectComponent, SolSkeletonComponent, SolSpinnerComponent, SolStepperComponent, SolTabsComponent, SolTextareaComponent, SolToggleComponent, SolTooltipComponent, SolViewToggleComponent, SolVirtualScrollComponent, SolWizardComponent, SolWizardStepDirective, TCPDF_ALLOWED_STYLE_PROPERTIES, TCPDF_ALLOWED_TAGS, THEME_SOURCE, ThemeService, buildGoogleFontsUrl, createIdentitySolI18n, isRenderableTheme, isSafeBackgroundImage, provideTheme, resolveCssVars, sanitizeAssetUrl, sanitizeHtmlToTcpdf, serializeElementToTcpdfHtml };
|
|
2126
|
+
export type { DataTableColumn, DayPickerItem, LinkableTask, MentionUser, SolButtonSize, SolButtonVariant, SolChartData, SolChartEngineFactory, SolChartEngineHandle, SolChartOptions, SolChartSeries, SolChartType, SolCheckboxColor, SolCheckboxShape, SolCheckboxSize, SolDataTableRow, SolDatePickerSize, SolI18n, SolIconButtonSize, SolIconButtonVariant, SolIconName, SolIconSize, SolIconVariant, SolProgressMode, SolProgressSize, SolProgressVariant, SolRichImageUploader, SolSelectOption, SolSkeletonVariant, SolStepperOrientation, SolStepperStep, SolStepperStepState, SolTabItem, SolTenantResolver, SolViewToggleOption, SolVirtualScrollItemContext, SolWizardCanAdvance, SolWizardStep, ThemeAlerts, ThemeComponent, ThemeFile, ThemeFont, ThemeLogo, ThemeMeta, ThemeMode, ThemeModeConfig, ThemePrimitives, ThemeSemantic, ThemeSource, TokenRef };
|