@acontplus/ng-components 2.1.13 → 2.1.15

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": "@acontplus/ng-components",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "Comprehensive Angular Material UI component library featuring dynamic Tabulator tables, theme toggle with dark mode, dialog wrappers, autocomplete components, cards, buttons, icons, input chips, spinners, directives, pipes, and SCSS styling utilities.",
5
5
  "peerDependencies": {
6
6
  "@acontplus/ui-kit": "^1.0.2",
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Type, AfterViewInit, OnDestroy, ViewContainerRef, ElementRef, OnInit, TemplateRef, OnChanges, SimpleChanges, InjectionToken, QueryList, TrackByFunction, KeyValueChangeRecord, OutputEmitterRef, WritableSignal, EventEmitter, ComponentRef, AfterContentInit, PipeTransform } from '@angular/core';
2
+ import { Type, AfterViewInit, OnDestroy, Signal, ViewContainerRef, ElementRef, OnInit, TemplateRef, OnChanges, SimpleChanges, InjectionToken, QueryList, TrackByFunction, KeyValueChangeRecord, OutputEmitterRef, WritableSignal, EventEmitter, ComponentRef, AfterContentInit, PipeTransform } from '@angular/core';
3
3
  import { MatDialogRef } from '@angular/material/dialog';
4
4
  import { ScrollStrategy } from '@angular/cdk/overlay';
5
5
  import { FormControl, ControlValueAccessor } from '@angular/forms';
@@ -205,6 +205,7 @@ declare class AdvancedDialogService {
205
205
  private readonly dialog;
206
206
  private readonly overlay;
207
207
  private readonly breakpointObserver;
208
+ private readonly zIndexService;
208
209
  private readonly isMobile$;
209
210
  /**
210
211
  * Main method to open any component in a dialog.
@@ -239,6 +240,74 @@ declare class AdvancedDialogService {
239
240
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AdvancedDialogService>;
240
241
  }
241
242
 
243
+ type DialogType = 'normal' | 'alert' | 'toast';
244
+ /**
245
+ * Servicio centralizado para manejar z-index de todos los diálogos
246
+ * Asegura que los diálogos siempre aparezcan en el orden correcto
247
+ * Los AlertDialogs siempre tienen prioridad sobre otros diálogos
248
+ */
249
+ declare class DialogZIndexService {
250
+ private static readonly Z_INDEX_RANGES;
251
+ private static readonly Z_INDEX_INCREMENT;
252
+ /**
253
+ * Obtiene el siguiente z-index disponible para un tipo específico de diálogo
254
+ * @param type Tipo de diálogo (normal, alert, toast)
255
+ * @returns El próximo z-index a usar
256
+ */
257
+ getNextZIndex(type?: DialogType): number;
258
+ /**
259
+ * Obtiene el z-index actual más alto para un tipo específico
260
+ * @param type Tipo de diálogo
261
+ * @returns El z-index más alto actualmente en uso para ese tipo
262
+ */
263
+ getCurrentZIndex(type?: DialogType): number;
264
+ /**
265
+ * Obtiene el z-index más alto de todos los tipos
266
+ * @returns El z-index más alto de todos los diálogos
267
+ */
268
+ getHighestZIndex(): number;
269
+ /**
270
+ * Resetea el contador de z-index (útil para testing)
271
+ * @param type Tipo específico a resetear, o undefined para resetear todos
272
+ */
273
+ reset(type?: DialogType): void;
274
+ /**
275
+ * Aplica z-index a un diálogo específico
276
+ * @param dialogRef Referencia al diálogo
277
+ * @param type Tipo de diálogo (determina el rango de z-index)
278
+ * @param zIndex Z-index específico a aplicar (opcional)
279
+ */
280
+ applyZIndex(dialogRef: any, type?: DialogType, zIndex?: number): void;
281
+ /**
282
+ * Trae un diálogo al frente (usado por drag functionality)
283
+ * @param element Elemento del diálogo a traer al frente
284
+ * @param type Tipo de diálogo
285
+ */
286
+ bringToFront(element: HTMLElement, type?: DialogType): void;
287
+ /**
288
+ * Fuerza un diálogo a estar siempre encima de todos los demás
289
+ * Útil para alertas críticas que deben tener máxima prioridad
290
+ * @param dialogRef Referencia al diálogo
291
+ */
292
+ forceToTop(dialogRef: any): void;
293
+ /**
294
+ * Obtiene todos los toasts activos
295
+ * @returns Array de elementos de toast activos
296
+ */
297
+ getActiveToasts(): HTMLElement[];
298
+ /**
299
+ * Cierra todos los toasts activos
300
+ */
301
+ closeAllToasts(): void;
302
+ /**
303
+ * Obtiene el número de toasts activos
304
+ * @returns Número de toasts actualmente visibles
305
+ */
306
+ getActiveToastCount(): number;
307
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogZIndexService, never>;
308
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogZIndexService>;
309
+ }
310
+
242
311
  declare class OverlayService {
243
312
  private readonly overlay;
244
313
  private overlayRef;
@@ -465,6 +534,8 @@ interface AlertDialogOptions {
465
534
  progressBar?: boolean;
466
535
  component?: Type<any>;
467
536
  componentProps?: Record<string, any>;
537
+ forceToTop?: boolean;
538
+ dialogType?: DialogType;
468
539
  verticalButtons?: boolean;
469
540
  fullWidthButtons?: boolean;
470
541
  reverseButtons?: boolean;
@@ -475,6 +546,7 @@ interface AlertDialogOptions {
475
546
  allowEscapeKey?: boolean;
476
547
  allowEnterKey?: boolean;
477
548
  scrollbarPadding?: boolean;
549
+ allowMultiple?: boolean;
478
550
  showConfirmButton?: boolean;
479
551
  showCancelButton?: boolean;
480
552
  showDenyButton?: boolean;
@@ -539,6 +611,7 @@ interface AlertDialogResult<T = any> {
539
611
  }
540
612
  declare class AlertDialogService {
541
613
  private dialog;
614
+ private zIndexService;
542
615
  private defaultOptions;
543
616
  /**
544
617
  * Configurar opciones por defecto para todos los diálogos
@@ -587,13 +660,25 @@ declare class AlertDialogService {
587
660
  */
588
661
  delete(options: string | Omit<AlertDialogOptions, 'type' | 'showCancelButton'>): Promise<AlertDialogResult>;
589
662
  /**
590
- * Toast notification (auto-cierre, posición personalizada)
663
+ * Toast notification (auto-cierre, posición personalizada, no-intrusivo)
591
664
  */
592
665
  toast(options: string | AlertDialogOptions): Promise<AlertDialogResult>;
666
+ /**
667
+ * Alerta crítica que siempre aparece encima de todo
668
+ */
669
+ critical(options: string | Omit<AlertDialogOptions, 'forceToTop'>): Promise<AlertDialogResult>;
593
670
  /**
594
671
  * Cerrar todos los diálogos abiertos
595
672
  */
596
673
  closeAll(): void;
674
+ /**
675
+ * Cerrar solo los toasts activos (mantener otros diálogos abiertos)
676
+ */
677
+ closeAllToasts(): void;
678
+ /**
679
+ * Obtener el número de toasts activos
680
+ */
681
+ getActiveToastCount(): number;
597
682
  private getDialogPosition;
598
683
  private getPanelClasses;
599
684
  private getToastPosition;
@@ -611,21 +696,17 @@ declare class AlertDialogService {
611
696
  declare class DialogWrapper implements AfterViewInit, OnDestroy {
612
697
  dialogRef: MatDialogRef<DialogWrapper, any>;
613
698
  config: DialogWrapperConfig<unknown>;
699
+ private zIndexService;
614
700
  /**
615
701
  * A template reference that acts as an anchor for dynamic content.
616
702
  * This is where the component specified in the config will be rendered.
617
703
  */
618
- readonly contentHost: _angular_core.Signal<ViewContainerRef>;
704
+ readonly contentHost: Signal<ViewContainerRef>;
619
705
  /**
620
706
  * A reference to the header element for the z-index focus logic.
621
707
  * Used to bring the dialog to the front when clicked.
622
708
  */
623
- readonly header: _angular_core.Signal<ElementRef<any> | undefined>;
624
- /**
625
- * Static counter to track the highest z-index for multiple dialogs.
626
- * Ensures that the most recently clicked dialog appears on top.
627
- */
628
- private static lastZIndex;
709
+ readonly header: Signal<ElementRef | undefined>;
629
710
  /**
630
711
  * Timeout ID for debouncing z-index updates to prevent excessive DOM manipulations.
631
712
  */
@@ -653,7 +734,7 @@ declare class DialogWrapper implements AfterViewInit, OnDestroy {
653
734
  onClose(): void;
654
735
  /**
655
736
  * Brings the dialog to the front by adjusting its z-index.
656
- * Uses requestAnimationFrame to debounce updates and prevent excessive DOM manipulations.
737
+ * Uses the centralized DialogZIndexService for consistent z-index management.
657
738
  * Called when the dialog header is clicked.
658
739
  */
659
740
  bringToFront(): void;
@@ -1392,7 +1473,7 @@ declare class DataGrid<T = any> implements AfterViewInit, OnDestroy, OnChanges {
1392
1473
  noResultTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
1393
1474
  paginationTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
1394
1475
  summaryTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
1395
- size: _angular_core.InputSignal<"small" | "medium" | "normal">;
1476
+ size: _angular_core.InputSignal<"normal" | "small" | "medium">;
1396
1477
  headerCellTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
1397
1478
  expandable: _angular_core.InputSignal<boolean>;
1398
1479
  expansionTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
@@ -1416,7 +1497,7 @@ declare class DataGrid<T = any> implements AfterViewInit, OnDestroy, OnChanges {
1416
1497
  sortDirection: _angular_core.InputSignal<SortDirection>;
1417
1498
  sortDisableClear: _angular_core.InputSignal<boolean>;
1418
1499
  sortDisabled: _angular_core.InputSignal<boolean>;
1419
- sortStart: _angular_core.InputSignal<"asc" | "desc">;
1500
+ sortStart: _angular_core.InputSignal<"desc" | "asc">;
1420
1501
  rowHover: _angular_core.InputSignal<boolean>;
1421
1502
  rowStriped: _angular_core.InputSignal<boolean>;
1422
1503
  rowSelectable: _angular_core.InputSignal<boolean>;
@@ -2589,14 +2670,12 @@ declare function throwAcpPopoverInvalidPositionStart(): void;
2589
2670
  declare function throwAcpPopoverInvalidPositionEnd(): void;
2590
2671
 
2591
2672
  type ButtonType = 'confirm' | 'cancel' | 'deny';
2592
- declare class AlertDialog implements OnInit, OnDestroy, AfterViewInit {
2673
+ declare class AlertDialog implements OnInit, OnDestroy {
2593
2674
  inputField?: ElementRef<HTMLInputElement | HTMLTextAreaElement>;
2594
2675
  dialogTitle?: ElementRef<HTMLElement>;
2595
2676
  private container;
2596
2677
  private componentRef;
2597
2678
  private timerInterval;
2598
- private static lastZIndex;
2599
- private bringToFrontTimeoutId;
2600
2679
  inputValue: string;
2601
2680
  validationError: string | null;
2602
2681
  timerProgress: number;
@@ -2608,9 +2687,9 @@ declare class AlertDialog implements OnInit, OnDestroy, AfterViewInit {
2608
2687
  private renderer;
2609
2688
  private elementRef;
2610
2689
  private cdr;
2690
+ private zIndexService;
2611
2691
  constructor();
2612
2692
  ngOnDestroy(): void;
2613
- ngAfterViewInit(): void;
2614
2693
  private startTimer;
2615
2694
  private loadComponent;
2616
2695
  ngOnInit(): void;
@@ -2632,7 +2711,7 @@ declare class AlertDialog implements OnInit, OnDestroy, AfterViewInit {
2632
2711
  getDenyBackgroundColor(): string | undefined;
2633
2712
  /**
2634
2713
  * Brings the dialog to the front by adjusting its z-index.
2635
- * Uses requestAnimationFrame to debounce updates and prevent excessive DOM manipulations.
2714
+ * Uses the centralized DialogZIndexService for consistent z-index management.
2636
2715
  * Called when the dialog header is clicked.
2637
2716
  */
2638
2717
  bringToFront(): void;
@@ -2683,5 +2762,5 @@ declare class StatusDisplayPipe implements PipeTransform {
2683
2762
  static ɵpipe: _angular_core.ɵɵPipeDeclaration<StatusDisplayPipe, "statusDisplay", true>;
2684
2763
  }
2685
2764
 
2686
- export { ACP_DRAWER_DATA, ACP_DRAWER_DEFAULT_OPTIONS, ACP_POPOVER_CONTENT, ACP_POPOVER_DEFAULT_OPTIONS, ACP_POPOVER_SCROLL_STRATEGY, AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG, AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG, AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG, AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG, AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG, AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG, AcpDrawer, AcpDrawerConfig, AcpDrawerContainer, AcpDrawerRef, AcpPopover, AcpPopoverContent, AcpPopoverTarget, AcpPopoverTrigger, AdvancedDialogService, AlertDialog, AlertDialogService, AutocompleteWrapperService, Button, DATA_GRID_DEFAULT_OPTIONS, DataGrid, DateRangePicker, DialogWrapper, DynamicCard, DynamicSelect, GetTotalPipe, IconRegistryService, InputChip, KeyboardNavigationService, OverlayService, Pagination, ReusableAutocompleteComponent, Spinner, StatusDisplayPipe, SvgIcon, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, _AcpPopoverContentBase, createAutocompleteWrapperConfig, throwAcpPopoverInvalidPositionEnd, throwAcpPopoverInvalidPositionStart, throwAcpPopoverMissingError };
2687
- export type { AcpPopoverDefaultOptions, AcpPopoverPanel, AcpPopoverPosition, AcpPopoverPositionEnd, AcpPopoverPositionStart, AcpPopoverTriggerEvent, AlertDialogOptions, AlertDialogResult, AlertPosition, AlertType, AutoFocusTarget, AutocompleteWrapperActions, AutocompleteWrapperConfig, AutocompleteWrapperEventHandler, AutocompleteWrapperEvents, AutocompleteWrapperFilters, AutocompleteWrapperItem, AutocompleteWrapperItemProperty, AutocompleteWrapperPaginationInfo, AutocompleteWrapperSearchField, AutocompleteWrapperSearchFunction, AutocompleteWrapperSearchMode, AutocompleteWrapperSearchResult, AutocompleteWrapperState, AutocompleteWrapperStockOption, DataGridButtonType, DataGridCellTemplate, DataGridColumn, DataGridColumnButton, DataGridColumnButtonBadge, DataGridColumnButtonPop, DataGridColumnButtonTooltip, DataGridColumnPinOption, DataGridColumnPinValue, DataGridColumnTag, DataGridColumnTagValue, DataGridColumnType, DataGridColumnTypeParameter, DataGridDefaultOptions, DataGridMenuItem, DataGridRowClassFormatter, DataGridRowSelectionFormatter, DataGridSortProp, DateRangePickerOptions, DateRangeValue, DialogSize, DialogWrapperConfig, DrawerPosition, FocusableElement, IconRegistryConfig, MatCustomDialogConfig, PopoverCloseReason, ReusableAutocompleteWrapperComponent, TabulatorColumn, TabulatorConfig, TabulatorEventHandlers, TabulatorTheme };
2765
+ export { ACP_DRAWER_DATA, ACP_DRAWER_DEFAULT_OPTIONS, ACP_POPOVER_CONTENT, ACP_POPOVER_DEFAULT_OPTIONS, ACP_POPOVER_SCROLL_STRATEGY, AUTOCOMPLETE_WRAPPER_CUSTOMER_CONFIG, AUTOCOMPLETE_WRAPPER_DEFAULT_CONFIG, AUTOCOMPLETE_WRAPPER_LOCAL_CONFIG, AUTOCOMPLETE_WRAPPER_PAGINATED_CONFIG, AUTOCOMPLETE_WRAPPER_PRODUCT_CONFIG, AUTOCOMPLETE_WRAPPER_SIMPLE_CONFIG, AcpDrawer, AcpDrawerConfig, AcpDrawerContainer, AcpDrawerRef, AcpPopover, AcpPopoverContent, AcpPopoverTarget, AcpPopoverTrigger, AdvancedDialogService, AlertDialog, AlertDialogService, AutocompleteWrapperService, Button, DATA_GRID_DEFAULT_OPTIONS, DataGrid, DateRangePicker, DialogWrapper, DialogZIndexService, DynamicCard, DynamicSelect, GetTotalPipe, IconRegistryService, InputChip, KeyboardNavigationService, OverlayService, Pagination, ReusableAutocompleteComponent, Spinner, StatusDisplayPipe, SvgIcon, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, _AcpPopoverContentBase, createAutocompleteWrapperConfig, throwAcpPopoverInvalidPositionEnd, throwAcpPopoverInvalidPositionStart, throwAcpPopoverMissingError };
2766
+ export type { AcpPopoverDefaultOptions, AcpPopoverPanel, AcpPopoverPosition, AcpPopoverPositionEnd, AcpPopoverPositionStart, AcpPopoverTriggerEvent, AlertDialogOptions, AlertDialogResult, AlertPosition, AlertType, AutoFocusTarget, AutocompleteWrapperActions, AutocompleteWrapperConfig, AutocompleteWrapperEventHandler, AutocompleteWrapperEvents, AutocompleteWrapperFilters, AutocompleteWrapperItem, AutocompleteWrapperItemProperty, AutocompleteWrapperPaginationInfo, AutocompleteWrapperSearchField, AutocompleteWrapperSearchFunction, AutocompleteWrapperSearchMode, AutocompleteWrapperSearchResult, AutocompleteWrapperState, AutocompleteWrapperStockOption, DataGridButtonType, DataGridCellTemplate, DataGridColumn, DataGridColumnButton, DataGridColumnButtonBadge, DataGridColumnButtonPop, DataGridColumnButtonTooltip, DataGridColumnPinOption, DataGridColumnPinValue, DataGridColumnTag, DataGridColumnTagValue, DataGridColumnType, DataGridColumnTypeParameter, DataGridDefaultOptions, DataGridMenuItem, DataGridRowClassFormatter, DataGridRowSelectionFormatter, DataGridSortProp, DateRangePickerOptions, DateRangeValue, DialogSize, DialogType, DialogWrapperConfig, DrawerPosition, FocusableElement, IconRegistryConfig, MatCustomDialogConfig, PopoverCloseReason, ReusableAutocompleteWrapperComponent, TabulatorColumn, TabulatorConfig, TabulatorEventHandlers, TabulatorTheme };