@telcomdev/ui 0.1.21 → 0.1.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telcomdev/ui",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Librería UI reutilizable para los sistemas TelcomDev.",
5
5
  "keywords": [
6
6
  "angular",
@@ -37,6 +37,31 @@ declare class TdAlerta {
37
37
  private static inyectarEstilos;
38
38
  }
39
39
 
40
+ type TdBadgeTone = 'primary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
41
+ type TdBadgeVariant = 'soft' | 'solid' | 'outline';
42
+ type TdBadgeSize = 'sm' | 'md' | 'lg';
43
+ type TdBadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
44
+ declare class TdBadge {
45
+ tone: TdBadgeTone;
46
+ variant: TdBadgeVariant;
47
+ size: TdBadgeSize;
48
+ value: string | number | null | undefined;
49
+ position: TdBadgePosition;
50
+ icon: string;
51
+ floating: boolean;
52
+ hidden: boolean;
53
+ dot: boolean;
54
+ pill: boolean;
55
+ ariaLabel: string;
56
+ protected get isFloating(): boolean;
57
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TdBadge, never>;
58
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TdBadge, "td-badge", never, { "tone": { "alias": "tone"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "value": { "alias": "value"; "required": false; }; "position": { "alias": "position"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "floating": { "alias": "floating"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "dot": { "alias": "dot"; "required": false; }; "pill": { "alias": "pill"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; }, {}, never, ["*"], true, never>;
59
+ static ngAcceptInputType_floating: unknown;
60
+ static ngAcceptInputType_hidden: unknown;
61
+ static ngAcceptInputType_dot: unknown;
62
+ static ngAcceptInputType_pill: unknown;
63
+ }
64
+
40
65
  type TdButtonVariant = 'solid' | 'soft' | 'outline' | 'ghost';
41
66
  type TdButtonTone = 'primary' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
42
67
  type TdButtonSize = 'sm' | 'md' | 'lg';
@@ -128,12 +153,23 @@ declare class TdCheckbox implements ControlValueAccessor, FormCheckboxControl {
128
153
 
129
154
  type TdMenuTono = 'neutro' | 'primario' | 'exito' | 'advertencia' | 'peligro';
130
155
  type TdMenuPosicion = 'abajo-inicio' | 'abajo-fin' | 'arriba-inicio' | 'arriba-fin';
156
+ interface TdMenuBadge {
157
+ etiqueta?: string | number;
158
+ tone?: TdBadgeTone;
159
+ variant?: TdBadgeVariant;
160
+ size?: TdBadgeSize;
161
+ icono?: string;
162
+ dot?: boolean;
163
+ pill?: boolean;
164
+ ariaLabel?: string;
165
+ }
131
166
  interface TdMenuItem<T = unknown> {
132
167
  id: string;
133
168
  etiqueta: string;
134
169
  icono?: string;
135
170
  descripcion?: string;
136
171
  tono?: TdMenuTono;
172
+ badge?: string | number | TdMenuBadge;
137
173
  data?: T;
138
174
  separadorAntes?: boolean;
139
175
  visible?: boolean;
@@ -158,11 +194,13 @@ declare class TdMenu<T = unknown> {
158
194
  readonly abiertoChange: EventEmitter<boolean>;
159
195
  protected abierto: boolean;
160
196
  protected get itemsVisibles(): TdMenuItem<T>[];
197
+ protected badgeConfig(item: TdMenuItem<T>): TdMenuBadge | null;
161
198
  protected alternar(): void;
162
199
  protected cerrar(): void;
163
200
  protected seleccionar(item: TdMenuItem<T>): void;
164
201
  protected posiciones(): CdkConnectedOverlay['positions'];
165
202
  private establecerAbierto;
203
+ private badgeTonePorTono;
166
204
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TdMenu<any>, never>;
167
205
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TdMenu<any>, "td-menu", never, { "items": { "alias": "items"; "required": false; }; "etiqueta": { "alias": "etiqueta"; "required": false; }; "icono": { "alias": "icono"; "required": false; }; "posicion": { "alias": "posicion"; "required": false; }; "ancho": { "alias": "ancho"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "seleccion": "seleccion"; "abiertoChange": "abiertoChange"; }, never, never, true, never>;
168
206
  }
@@ -710,6 +748,14 @@ interface TdHeaderNotificacion {
710
748
  leida?: boolean;
711
749
  }
712
750
  type TdHeaderAccionPerfil = 'perfil' | 'configuracion' | 'salir';
751
+ type TdHeaderPerfilAccionTono = 'neutral' | 'primary' | 'danger';
752
+ interface TdHeaderPerfilAccion {
753
+ id: string;
754
+ etiqueta: string;
755
+ icono?: string;
756
+ descripcion?: string;
757
+ tono?: TdHeaderPerfilAccionTono;
758
+ }
713
759
  declare class TdHeader {
714
760
  menuAbierto: boolean;
715
761
  mostrarMenu: boolean;
@@ -719,22 +765,30 @@ declare class TdHeader {
719
765
  notificaciones: TdHeaderNotificacion[];
720
766
  oscuro: boolean;
721
767
  fijo: boolean;
768
+ mostrarNotificaciones: boolean;
769
+ mostrarPerfil: boolean;
770
+ perfilAcciones: TdHeaderPerfilAccion[];
722
771
  readonly menuToggle: EventEmitter<void>;
723
772
  readonly notificacionSeleccionada: EventEmitter<TdHeaderNotificacion>;
724
773
  readonly verTodasNotificaciones: EventEmitter<void>;
725
774
  readonly accionPerfil: EventEmitter<TdHeaderAccionPerfil>;
775
+ readonly perfilAccionSeleccionada: EventEmitter<TdHeaderPerfilAccion>;
726
776
  protected panelNotificacionesAbierto: boolean;
727
777
  protected panelPerfilAbierto: boolean;
728
778
  protected alternarMenu(): void;
729
779
  protected alternarNotificaciones(): void;
730
780
  protected alternarPerfil(): void;
731
781
  protected seleccionarNotificacion(notificacion: TdHeaderNotificacion): void;
732
- protected emitirAccionPerfil(accion: TdHeaderAccionPerfil): void;
782
+ protected emitirAccionPerfil(accion: TdHeaderPerfilAccion): void;
733
783
  protected notificacionesNoLeidas(): number;
734
784
  protected inicialesUsuario(): string;
785
+ protected accionesPerfilVisibles(): TdHeaderPerfilAccion[];
786
+ private esAccionPerfilLegacy;
735
787
  protected cerrarConEscape(): void;
736
788
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TdHeader, never>;
737
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TdHeader, "td-header", never, { "menuAbierto": { "alias": "menuAbierto"; "required": false; }; "mostrarMenu": { "alias": "mostrarMenu"; "required": false; }; "usuario": { "alias": "usuario"; "required": false; }; "cargo": { "alias": "cargo"; "required": false; }; "avatarUrl": { "alias": "avatarUrl"; "required": false; }; "notificaciones": { "alias": "notificaciones"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "fijo": { "alias": "fijo"; "required": false; }; }, { "menuToggle": "menuToggle"; "notificacionSeleccionada": "notificacionSeleccionada"; "verTodasNotificaciones": "verTodasNotificaciones"; "accionPerfil": "accionPerfil"; }, never, ["[tdHeaderStart]", "[tdHeaderCenter]", "[tdHeaderActions]"], true, never>;
789
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TdHeader, "td-header", never, { "menuAbierto": { "alias": "menuAbierto"; "required": false; }; "mostrarMenu": { "alias": "mostrarMenu"; "required": false; }; "usuario": { "alias": "usuario"; "required": false; }; "cargo": { "alias": "cargo"; "required": false; }; "avatarUrl": { "alias": "avatarUrl"; "required": false; }; "notificaciones": { "alias": "notificaciones"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "fijo": { "alias": "fijo"; "required": false; }; "mostrarNotificaciones": { "alias": "mostrarNotificaciones"; "required": false; }; "mostrarPerfil": { "alias": "mostrarPerfil"; "required": false; }; "perfilAcciones": { "alias": "perfilAcciones"; "required": false; }; }, { "menuToggle": "menuToggle"; "notificacionSeleccionada": "notificacionSeleccionada"; "verTodasNotificaciones": "verTodasNotificaciones"; "accionPerfil": "accionPerfil"; "perfilAccionSeleccionada": "perfilAccionSeleccionada"; }, never, ["[tdHeaderStart]", "[tdHeaderCenter]", "[tdHeaderActions]"], true, never>;
790
+ static ngAcceptInputType_mostrarNotificaciones: unknown;
791
+ static ngAcceptInputType_mostrarPerfil: unknown;
738
792
  }
739
793
 
740
794
  declare class TdIcon {
@@ -1467,6 +1521,8 @@ interface TdSidebarSeleccion {
1467
1521
 
1468
1522
  type TdSidebarModoCerrado = 'compacto' | 'oculto';
1469
1523
  declare class TdSidebar {
1524
+ private readonly router;
1525
+ private readonly destroyRef;
1470
1526
  titulo: string;
1471
1527
  subtitulo: string;
1472
1528
  etiquetaNavegacion: string;
@@ -1487,12 +1543,20 @@ declare class TdSidebar {
1487
1543
  protected readonly abiertoInterno: _angular_core.WritableSignal<boolean>;
1488
1544
  protected readonly menuNormalizado: _angular_core.WritableSignal<MenuSidebar[]>;
1489
1545
  protected readonly expandidos: _angular_core.WritableSignal<ReadonlySet<string>>;
1546
+ protected readonly rutaSeleccionada: _angular_core.WritableSignal<string>;
1547
+ constructor();
1490
1548
  protected alternarGrupo(clave: string): void;
1491
1549
  protected estaExpandido(clave: string): boolean;
1492
1550
  protected seleccionarItem(item: MenuSidebar, nivel: number): void;
1551
+ protected esItemSeleccionado(item: MenuSidebar): boolean;
1493
1552
  protected claveItem(item: MenuSidebar, padre: string, indice: number): string;
1494
1553
  protected inicialMarca(): string;
1495
1554
  private normalizarMenu;
1555
+ private expandirRutaActual;
1556
+ private buscarMejorCoincidenciaPorRuta;
1557
+ private mejorCoincidencia;
1558
+ private rutaCoincide;
1559
+ private normalizarRuta;
1496
1560
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TdSidebar, never>;
1497
1561
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TdSidebar, "td-sidebar", never, { "titulo": { "alias": "titulo"; "required": false; }; "subtitulo": { "alias": "subtitulo"; "required": false; }; "etiquetaNavegacion": { "alias": "etiquetaNavegacion"; "required": false; }; "logoUrl": { "alias": "logoUrl"; "required": false; }; "logoAlt": { "alias": "logoAlt"; "required": false; }; "textoCarga": { "alias": "textoCarga"; "required": false; }; "mensajeVacio": { "alias": "mensajeVacio"; "required": false; }; "error": { "alias": "error"; "required": false; }; "cargando": { "alias": "cargando"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "modoCerrado": { "alias": "modoCerrado"; "required": false; }; "abierto": { "alias": "abierto"; "required": false; }; "menu": { "alias": "menu"; "required": false; }; }, { "abiertoChange": "abiertoChange"; "seleccionar": "seleccionar"; }, never, never, true, never>;
1498
1562
  }
@@ -1574,5 +1638,51 @@ declare class TdThemeService {
1574
1638
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<TdThemeService>;
1575
1639
  }
1576
1640
 
1577
- export { TD_DIALOG_CONFIG, TD_DIALOG_DATA, TD_ICONOS, TD_ICONOS_NOMBRES, TD_THEME_DARK_COLORS, TD_THEME_LIGHT_COLORS, TdAlerta, TdAutocompleteSelect, TdButton, TdCheckbox, TdDataTable, TdDatePicker, TdDialog, TdDialogActions, TdDialogClose, TdDialogPrimary, TdDialogRef, TdFileUpload, TdFileViewer, TdFileViewerService, TdFooter, TdHeader, TdIcon, TdIconoRegistry, TdInput, TdMenu, TdRadioGroup, TdSelect, TdSidebar, TdTab, TdTabs, TdTextarea, TdThemeService, TelcomdevUi, createTdFormControlBridge };
1578
- export type { MenuSidebar, TdAlertaOpciones, TdAlertaTipo, TdButtonSize, TdButtonTone, TdButtonType, TdButtonVariant, TdDataTableAccion, TdDataTableAccionEvento, TdDataTableAccionesPresentacion, TdDataTableAlineacion, TdDataTableBoton, TdDataTableColumna, TdDataTableImagenConfig, TdDataTableImagenEvento, TdDataTableImagenForma, TdDataTableTipoColumna, TdDataTableTono, TdDatePickerMode, TdDatePickerValue, TdDateRange, TdDialogConfig, TdDialogPanelData, TdDialogRefLike, TdDialogTamano, TdErrorDisplay, TdFileAttachment, TdFileSource, TdFileUploadItem, TdFileUploadPreviewKind, TdFileUploadRejectReason, TdFileUploadRejected, TdFileUploadValue, TdFileUploadVariant, TdFileViewerArchivo, TdFileViewerKind, TdFileViewerOpenOptions, TdFormControlBridge, TdHeaderAccionPerfil, TdHeaderNotificacion, TdIconoDefinicion, TdIconoNombre, TdIconoPersonalizado, TdInputEmptyValue, TdInputMask, TdInputSanitize, TdInputSanitizeFn, TdInputSanitizePreset, TdInputValue, TdMenuItem, TdMenuPosicion, TdMenuSeleccion, TdMenuTono, TdRadioDirection, TdRadioOption, TdRadioVariant, TdSelectAppearance, TdSelectOption, TdSelectOverflowText, TdSelectScrollBehavior, TdSidebarModoCerrado, TdSidebarSeleccion, TdTabsAlignment, TdTabsVariant, TdTextareaEmptyValue, TdTextareaValue, TdThemeMode, TdThemePaletteColor };
1641
+ type TdTooltipPosition = 'top' | 'bottom' | 'left' | 'right';
1642
+ type TdTooltipTone = 'dark' | 'light' | 'primary';
1643
+
1644
+ declare class TdTooltip implements OnDestroy {
1645
+ private readonly overlay;
1646
+ private readonly elementRef;
1647
+ private readonly viewContainerRef;
1648
+ private readonly renderer;
1649
+ private readonly tooltipId;
1650
+ private overlayRef?;
1651
+ private panelRef?;
1652
+ private showTimer?;
1653
+ private hideTimer?;
1654
+ content: string | null | undefined;
1655
+ tdTooltipPosition: TdTooltipPosition;
1656
+ tdTooltipTone: TdTooltipTone;
1657
+ tdTooltipMaxWidth: string;
1658
+ tdTooltipShowDelay: number;
1659
+ tdTooltipHideDelay: number;
1660
+ tdTooltipMultiline: boolean;
1661
+ tdTooltipDisabled: boolean;
1662
+ protected handleMouseEnter(): void;
1663
+ protected handleMouseLeave(): void;
1664
+ protected handleFocusIn(): void;
1665
+ protected handleFocusOut(): void;
1666
+ protected handleTouchStart(): void;
1667
+ protected handleKeydown(event: KeyboardEvent): void;
1668
+ ngOnDestroy(): void;
1669
+ private scheduleShow;
1670
+ private scheduleHide;
1671
+ private showNow;
1672
+ private hideNow;
1673
+ private ensureOverlay;
1674
+ private positions;
1675
+ private get normalizedContent();
1676
+ private clearTimers;
1677
+ private destroyOverlay;
1678
+ private isFlexiblePositionStrategy;
1679
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TdTooltip, never>;
1680
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TdTooltip, "[tdTooltip]", never, { "content": { "alias": "tdTooltip"; "required": false; }; "tdTooltipPosition": { "alias": "tdTooltipPosition"; "required": false; }; "tdTooltipTone": { "alias": "tdTooltipTone"; "required": false; }; "tdTooltipMaxWidth": { "alias": "tdTooltipMaxWidth"; "required": false; }; "tdTooltipShowDelay": { "alias": "tdTooltipShowDelay"; "required": false; }; "tdTooltipHideDelay": { "alias": "tdTooltipHideDelay"; "required": false; }; "tdTooltipMultiline": { "alias": "tdTooltipMultiline"; "required": false; }; "tdTooltipDisabled": { "alias": "tdTooltipDisabled"; "required": false; }; }, {}, never, never, true, never>;
1681
+ static ngAcceptInputType_tdTooltipShowDelay: unknown;
1682
+ static ngAcceptInputType_tdTooltipHideDelay: unknown;
1683
+ static ngAcceptInputType_tdTooltipMultiline: unknown;
1684
+ static ngAcceptInputType_tdTooltipDisabled: unknown;
1685
+ }
1686
+
1687
+ export { TD_DIALOG_CONFIG, TD_DIALOG_DATA, TD_ICONOS, TD_ICONOS_NOMBRES, TD_THEME_DARK_COLORS, TD_THEME_LIGHT_COLORS, TdAlerta, TdAutocompleteSelect, TdBadge, TdButton, TdCheckbox, TdDataTable, TdDatePicker, TdDialog, TdDialogActions, TdDialogClose, TdDialogPrimary, TdDialogRef, TdFileUpload, TdFileViewer, TdFileViewerService, TdFooter, TdHeader, TdIcon, TdIconoRegistry, TdInput, TdMenu, TdRadioGroup, TdSelect, TdSidebar, TdTab, TdTabs, TdTextarea, TdThemeService, TdTooltip, TelcomdevUi, createTdFormControlBridge };
1688
+ export type { MenuSidebar, TdAlertaOpciones, TdAlertaTipo, TdBadgePosition, TdBadgeSize, TdBadgeTone, TdBadgeVariant, TdButtonSize, TdButtonTone, TdButtonType, TdButtonVariant, TdDataTableAccion, TdDataTableAccionEvento, TdDataTableAccionesPresentacion, TdDataTableAlineacion, TdDataTableBoton, TdDataTableColumna, TdDataTableImagenConfig, TdDataTableImagenEvento, TdDataTableImagenForma, TdDataTableTipoColumna, TdDataTableTono, TdDatePickerMode, TdDatePickerValue, TdDateRange, TdDialogConfig, TdDialogPanelData, TdDialogRefLike, TdDialogTamano, TdErrorDisplay, TdFileAttachment, TdFileSource, TdFileUploadItem, TdFileUploadPreviewKind, TdFileUploadRejectReason, TdFileUploadRejected, TdFileUploadValue, TdFileUploadVariant, TdFileViewerArchivo, TdFileViewerKind, TdFileViewerOpenOptions, TdFormControlBridge, TdHeaderAccionPerfil, TdHeaderNotificacion, TdHeaderPerfilAccion, TdHeaderPerfilAccionTono, TdIconoDefinicion, TdIconoNombre, TdIconoPersonalizado, TdInputEmptyValue, TdInputMask, TdInputSanitize, TdInputSanitizeFn, TdInputSanitizePreset, TdInputValue, TdMenuBadge, TdMenuItem, TdMenuPosicion, TdMenuSeleccion, TdMenuTono, TdRadioDirection, TdRadioOption, TdRadioVariant, TdSelectAppearance, TdSelectOption, TdSelectOverflowText, TdSelectScrollBehavior, TdSidebarModoCerrado, TdSidebarSeleccion, TdTabsAlignment, TdTabsVariant, TdTextareaEmptyValue, TdTextareaValue, TdThemeMode, TdThemePaletteColor, TdTooltipPosition, TdTooltipTone };