@telcomdev/ui 0.0.4 → 0.0.5

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.
@@ -1,6 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, OnDestroy, EventEmitter, SimpleChanges } from '@angular/core';
2
+ import { OnChanges, OnDestroy, EventEmitter, SimpleChanges, InjectionToken, Type } from '@angular/core';
3
+ import { Observable } from 'rxjs';
4
+ import { DialogRef } from '@angular/cdk/dialog';
3
5
  import * as _telcomdev_ui from '@telcomdev/ui';
6
+ import { ControlValueAccessor } from '@angular/forms';
7
+ import { ScrollStrategy } from '@angular/cdk/overlay';
4
8
 
5
9
  declare class TelcomdevUi {
6
10
  static ɵfac: i0.ɵɵFactoryDeclaration<TelcomdevUi, never>;
@@ -111,6 +115,76 @@ declare class TdDataTable<T extends object> implements OnChanges, OnDestroy {
111
115
  static ɵcmp: i0.ɵɵComponentDeclaration<TdDataTable<any>, "td-data-table", never, { "datos": { "alias": "datos"; "required": false; }; "columnas": { "alias": "columnas"; "required": false; }; "acciones": { "alias": "acciones"; "required": false; }; "botones": { "alias": "botones"; "required": false; }; "total": { "alias": "total"; "required": false; }; "cargando": { "alias": "cargando"; "required": false; }; "puedeCargarMas": { "alias": "puedeCargarMas"; "required": false; }; "itemSize": { "alias": "itemSize"; "required": false; }; "filasAntesDeCargar": { "alias": "filasAntesDeCargar"; "required": false; }; "altura": { "alias": "altura"; "required": false; }; "campoId": { "alias": "campoId"; "required": false; }; "oscuro": { "alias": "oscuro"; "required": false; }; "mostrarBusqueda": { "alias": "mostrarBusqueda"; "required": false; }; "placeholderBusqueda": { "alias": "placeholderBusqueda"; "required": false; }; "textoVacio": { "alias": "textoVacio"; "required": false; }; "descripcionVacio": { "alias": "descripcionVacio"; "required": false; }; "debounceBusqueda": { "alias": "debounceBusqueda"; "required": false; }; }, { "busquedaChange": "busquedaChange"; "accion": "accion"; "botonClick": "botonClick"; "cargarMas": "cargarMas"; }, never, ["[tdDataTableFilters]", "[tdDataTableActions]"], true, never>;
112
116
  }
113
117
 
118
+ type TdDialogTamano = 'pequeno' | 'mediano' | 'grande' | 'pantalla';
119
+ interface TdDialogConfig<D = unknown> {
120
+ data?: D;
121
+ titulo?: string;
122
+ subtitulo?: string;
123
+ icono?: string;
124
+ tamano?: TdDialogTamano;
125
+ ancho?: string;
126
+ alto?: string;
127
+ maxAncho?: string;
128
+ maxAlto?: string;
129
+ mostrarCerrar?: boolean;
130
+ cerrarAlNavegar?: boolean;
131
+ deshabilitarCierre?: boolean;
132
+ autoFocus?: 'dialog' | 'first-tabbable' | 'first-heading' | string | boolean;
133
+ restaurarFoco?: boolean;
134
+ oscuro?: boolean;
135
+ panelClass?: string | string[];
136
+ ariaLabel?: string;
137
+ }
138
+ interface TdDialogPanelData<D = unknown> {
139
+ component: Type<unknown>;
140
+ config: TdDialogConfig<D>;
141
+ fullscreen: boolean;
142
+ }
143
+ declare const TD_DIALOG_DATA: InjectionToken<unknown>;
144
+ declare const TD_DIALOG_CONFIG: InjectionToken<TdDialogConfig<unknown>>;
145
+ interface TdDialogRefLike<R = unknown> {
146
+ readonly closed: Observable<R | undefined>;
147
+ readonly id: string;
148
+ close(result?: R): void;
149
+ updateSize(width?: string | number, height?: string | number): this;
150
+ }
151
+
152
+ declare class TdDialogRef<R = unknown> implements TdDialogRefLike<R> {
153
+ private readonly ref;
154
+ readonly closed: Observable<R | undefined>;
155
+ readonly id: string;
156
+ constructor(ref: DialogRef<R, unknown>);
157
+ close(result?: R): void;
158
+ updateSize(width?: string | number, height?: string | number): this;
159
+ }
160
+
161
+ declare class TdDialog {
162
+ private readonly dialog;
163
+ open<C, D = unknown, R = unknown>(component: Type<C>, config?: TdDialogConfig<D>): TdDialogRef<R>;
164
+ closeAll(): void;
165
+ private widthFor;
166
+ private panelClasses;
167
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdDialog, never>;
168
+ static ɵprov: i0.ɵɵInjectableDeclaration<TdDialog>;
169
+ }
170
+
171
+ declare class TdDialogActions {
172
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdDialogActions, never>;
173
+ static ɵcmp: i0.ɵɵComponentDeclaration<TdDialogActions, "td-dialog-actions", never, {}, {}, never, ["*"], true, never>;
174
+ }
175
+
176
+ declare class TdDialogClose {
177
+ private readonly dialogRef;
178
+ result: unknown;
179
+ protected close(): void;
180
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdDialogClose, never>;
181
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogClose, "[tdDialogClose]", never, { "result": { "alias": "tdDialogClose"; "required": false; }; }, {}, never, never, true, never>;
182
+ }
183
+ declare class TdDialogPrimary {
184
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdDialogPrimary, never>;
185
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TdDialogPrimary, "[tdDialogPrimary]", never, {}, {}, never, never, true, never>;
186
+ }
187
+
114
188
  declare class TdFooter {
115
189
  empresa: string;
116
190
  texto: string;
@@ -254,6 +328,12 @@ declare const TD_ICONOS: {
254
328
  search: {
255
329
  path: string;
256
330
  };
331
+ visibility: {
332
+ path: string;
333
+ };
334
+ visibility_off: {
335
+ path: string;
336
+ };
257
337
  notifications: {
258
338
  path: string;
259
339
  };
@@ -289,7 +369,159 @@ declare const TD_ICONOS: {
289
369
  };
290
370
  };
291
371
  type TdIconoNombre = keyof typeof TD_ICONOS;
292
- declare const TD_ICONOS_NOMBRES: readonly ("menu" | "search" | "close" | "home" | "dashboard" | "folder" | "settings" | "people" | "person" | "security" | "inventory" | "shopping_cart" | "receipt" | "assessment" | "description" | "business" | "chevron_left" | "chevron_right" | "sun" | "moon" | "alert" | "check" | "notifications" | "chevron_down" | "apps" | "help" | "add" | "edit" | "delete" | "toggle_on" | "toggle_off" | "inbox" | "pdf")[];
372
+ declare const TD_ICONOS_NOMBRES: readonly ("menu" | "search" | "close" | "home" | "dashboard" | "folder" | "settings" | "people" | "person" | "security" | "inventory" | "shopping_cart" | "receipt" | "assessment" | "description" | "business" | "chevron_left" | "chevron_right" | "sun" | "moon" | "alert" | "check" | "visibility" | "visibility_off" | "notifications" | "chevron_down" | "apps" | "help" | "add" | "edit" | "delete" | "toggle_on" | "toggle_off" | "inbox" | "pdf")[];
373
+
374
+ declare class TdInput implements ControlValueAccessor {
375
+ private readonly cdr;
376
+ private readonly generatedId;
377
+ id: string;
378
+ name: string;
379
+ label: string;
380
+ type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'time';
381
+ placeholder: string;
382
+ autocomplete: string;
383
+ icon: string;
384
+ hint: string;
385
+ error: string;
386
+ readonly: boolean;
387
+ disabled: boolean;
388
+ required: boolean;
389
+ clearable: boolean;
390
+ dark: boolean;
391
+ min: string | number | null;
392
+ max: string | number | null;
393
+ step: string | number | null;
394
+ minlength: number | null;
395
+ maxlength: number | null;
396
+ readonly valueChange: EventEmitter<string>;
397
+ value: string;
398
+ protected focused: boolean;
399
+ protected passwordVisible: boolean;
400
+ protected get inputId(): string;
401
+ protected get descriptionId(): string | null;
402
+ protected get resolvedType(): string;
403
+ private onChange;
404
+ private onTouched;
405
+ writeValue(value: unknown): void;
406
+ registerOnChange(fn: (value: string) => void): void;
407
+ registerOnTouched(fn: () => void): void;
408
+ setDisabledState(disabled: boolean): void;
409
+ protected handleInput(event: Event): void;
410
+ protected handleBlur(): void;
411
+ protected clear(): void;
412
+ private setValue;
413
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdInput, never>;
414
+ static ɵcmp: i0.ɵɵComponentDeclaration<TdInput, "td-input", never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "error": { "alias": "error"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "dark": { "alias": "dark"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
415
+ }
416
+
417
+ interface TdSelectOption<T = unknown> {
418
+ value: T;
419
+ label: string;
420
+ description?: string;
421
+ icon?: string;
422
+ disabled?: boolean;
423
+ }
424
+ type TdSelectScrollBehavior = 'reposition' | 'close';
425
+
426
+ declare class TdAutocompleteSelect<T = unknown> implements ControlValueAccessor {
427
+ private readonly cdr;
428
+ private readonly document;
429
+ private readonly destroyRef;
430
+ private readonly scrollStrategies;
431
+ private readonly generatedId;
432
+ private searchInput?;
433
+ private connectedOverlay?;
434
+ label: string;
435
+ placeholder: string;
436
+ options: TdSelectOption<T>[];
437
+ hint: string;
438
+ error: string;
439
+ emptyText: string;
440
+ clearable: boolean;
441
+ dark: boolean;
442
+ disabled: boolean;
443
+ scrollBehavior: TdSelectScrollBehavior;
444
+ minimumCharacters: number;
445
+ filterWith: (option: TdSelectOption<T>, search: string) => boolean;
446
+ compareWith: (first: T | null, second: T | null) => boolean;
447
+ readonly selectionChange: EventEmitter<T | null>;
448
+ readonly searchChange: EventEmitter<string>;
449
+ protected value: T | null;
450
+ protected search: string;
451
+ protected open: boolean;
452
+ protected activeIndex: number;
453
+ protected readonly scrollStrategy: ScrollStrategy;
454
+ protected get inputId(): string;
455
+ protected get listId(): string;
456
+ protected get filteredOptions(): TdSelectOption<T>[];
457
+ protected readonly onTouched: () => void;
458
+ private changed;
459
+ private touched;
460
+ constructor();
461
+ writeValue(value: T | null): void;
462
+ registerOnChange(fn: (value: T | null) => void): void;
463
+ registerOnTouched(fn: () => void): void;
464
+ setDisabledState(disabled: boolean): void;
465
+ protected compare(first: T | null, second: T | null): boolean;
466
+ protected openPanel(): void;
467
+ protected close(): void;
468
+ protected handleInput(event: Event): void;
469
+ protected select(option: TdSelectOption<T>): void;
470
+ protected clear(event: MouseEvent): void;
471
+ protected handleKeydown(event: KeyboardEvent): void;
472
+ private moveActive;
473
+ private firstEnabledIndex;
474
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdAutocompleteSelect<any>, never>;
475
+ static ɵcmp: i0.ɵɵComponentDeclaration<TdAutocompleteSelect<any>, "td-autocomplete-select", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "error": { "alias": "error"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "dark": { "alias": "dark"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "scrollBehavior": { "alias": "scrollBehavior"; "required": false; }; "minimumCharacters": { "alias": "minimumCharacters"; "required": false; }; "filterWith": { "alias": "filterWith"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; }, { "selectionChange": "selectionChange"; "searchChange": "searchChange"; }, never, never, true, never>;
476
+ }
477
+
478
+ declare class TdSelect<T = unknown> implements ControlValueAccessor {
479
+ private readonly cdr;
480
+ private readonly document;
481
+ private readonly destroyRef;
482
+ private readonly scrollStrategies;
483
+ private readonly generatedId;
484
+ private connectedOverlay?;
485
+ label: string;
486
+ placeholder: string;
487
+ options: TdSelectOption<T>[];
488
+ hint: string;
489
+ error: string;
490
+ emptyText: string;
491
+ clearable: boolean;
492
+ dark: boolean;
493
+ disabled: boolean;
494
+ scrollBehavior: TdSelectScrollBehavior;
495
+ compareWith: (first: T | null, second: T | null) => boolean;
496
+ readonly selectionChange: EventEmitter<T | null>;
497
+ protected value: T | null;
498
+ protected open: boolean;
499
+ protected activeIndex: number;
500
+ protected readonly scrollStrategy: ScrollStrategy;
501
+ protected get labelId(): string;
502
+ protected get listId(): string;
503
+ protected get selectedOption(): TdSelectOption<T> | undefined;
504
+ private onChange;
505
+ private onTouched;
506
+ constructor();
507
+ writeValue(value: T | null): void;
508
+ registerOnChange(fn: (value: T | null) => void): void;
509
+ registerOnTouched(fn: () => void): void;
510
+ setDisabledState(disabled: boolean): void;
511
+ protected compare(first: T | null, second: T | null): boolean;
512
+ protected toggle(): void;
513
+ protected close(): void;
514
+ protected select(option: TdSelectOption<T>): void;
515
+ protected clear(event: MouseEvent): void;
516
+ protected handleKeydown(event: KeyboardEvent): void;
517
+ protected handleOverlayKeydown(event: KeyboardEvent): void;
518
+ private openPanel;
519
+ private moveActive;
520
+ private firstEnabledIndex;
521
+ private setValue;
522
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdSelect<any>, never>;
523
+ static ɵcmp: i0.ɵɵComponentDeclaration<TdSelect<any>, "td-select", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "error": { "alias": "error"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "dark": { "alias": "dark"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "scrollBehavior": { "alias": "scrollBehavior"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, true, never>;
524
+ }
293
525
 
294
526
  interface MenuSidebar {
295
527
  nombre: string;
@@ -335,5 +567,5 @@ declare class TdSidebar {
335
567
  static ɵcmp: i0.ɵɵ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>;
336
568
  }
337
569
 
338
- export { TD_ICONOS, TD_ICONOS_NOMBRES, TdAlerta, TdDataTable, TdFooter, TdHeader, TdIcon, TdIconoRegistry, TdSidebar, TelcomdevUi };
339
- export type { MenuSidebar, TdAlertaOpciones, TdAlertaTipo, TdDataTableAccion, TdDataTableAccionEvento, TdDataTableAlineacion, TdDataTableBoton, TdDataTableColumna, TdDataTableTipoColumna, TdDataTableTono, TdHeaderAccionPerfil, TdHeaderNotificacion, TdIconoDefinicion, TdIconoNombre, TdIconoPersonalizado, TdSidebarModoCerrado, TdSidebarSeleccion };
570
+ export { TD_DIALOG_CONFIG, TD_DIALOG_DATA, TD_ICONOS, TD_ICONOS_NOMBRES, TdAlerta, TdAutocompleteSelect, TdDataTable, TdDialog, TdDialogActions, TdDialogClose, TdDialogPrimary, TdDialogRef, TdFooter, TdHeader, TdIcon, TdIconoRegistry, TdInput, TdSelect, TdSidebar, TelcomdevUi };
571
+ export type { MenuSidebar, TdAlertaOpciones, TdAlertaTipo, TdDataTableAccion, TdDataTableAccionEvento, TdDataTableAlineacion, TdDataTableBoton, TdDataTableColumna, TdDataTableTipoColumna, TdDataTableTono, TdDialogConfig, TdDialogPanelData, TdDialogRefLike, TdDialogTamano, TdHeaderAccionPerfil, TdHeaderNotificacion, TdIconoDefinicion, TdIconoNombre, TdIconoPersonalizado, TdSelectOption, TdSelectScrollBehavior, TdSidebarModoCerrado, TdSidebarSeleccion };