@acontplus/ng-components 2.1.12 → 2.1.14

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.12",
3
+ "version": "2.1.14",
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,42 @@ declare class AdvancedDialogService {
239
240
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AdvancedDialogService>;
240
241
  }
241
242
 
243
+ /**
244
+ * Servicio centralizado para manejar z-index de todos los diálogos
245
+ * Asegura que los diálogos siempre aparezcan en el orden correcto
246
+ */
247
+ declare class DialogZIndexService {
248
+ private static currentZIndex;
249
+ private static readonly Z_INDEX_INCREMENT;
250
+ /**
251
+ * Obtiene el siguiente z-index disponible
252
+ * @returns El próximo z-index a usar
253
+ */
254
+ getNextZIndex(): number;
255
+ /**
256
+ * Obtiene el z-index actual más alto
257
+ * @returns El z-index más alto actualmente en uso
258
+ */
259
+ getCurrentZIndex(): number;
260
+ /**
261
+ * Resetea el contador de z-index (útil para testing)
262
+ */
263
+ reset(): void;
264
+ /**
265
+ * Aplica z-index a un diálogo específico
266
+ * @param dialogRef Referencia al diálogo
267
+ * @param zIndex Z-index a aplicar (opcional, si no se proporciona usa getNextZIndex())
268
+ */
269
+ applyZIndex(dialogRef: any, zIndex?: number): void;
270
+ /**
271
+ * Trae un diálogo al frente (usado por drag functionality)
272
+ * @param element Elemento del diálogo a traer al frente
273
+ */
274
+ bringToFront(element: HTMLElement): void;
275
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogZIndexService, never>;
276
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogZIndexService>;
277
+ }
278
+
242
279
  declare class OverlayService {
243
280
  private readonly overlay;
244
281
  private overlayRef;
@@ -433,7 +470,7 @@ declare class AutocompleteWrapperService {
433
470
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AutocompleteWrapperService>;
434
471
  }
435
472
 
436
- type AlertType = 'success' | 'error' | 'warning' | 'info' | 'question';
473
+ type AlertType = 'success' | 'error' | 'warning' | 'info' | 'question' | 'delete';
437
474
  type AlertPosition = 'top' | 'top-start' | 'top-end' | 'center' | 'center-start' | 'center-end' | 'bottom' | 'bottom-start' | 'bottom-end';
438
475
  interface AlertDialogOptions {
439
476
  title?: string;
@@ -450,10 +487,21 @@ interface AlertDialogOptions {
450
487
  customClass?: string;
451
488
  panelClass?: string | string[];
452
489
  backdropClass?: string;
490
+ layout?: 'default' | 'modern' | 'toast';
491
+ iconPosition?: 'left' | 'center' | 'top';
492
+ contentAlignment?: 'left' | 'center' | 'right';
493
+ showCloseButton?: boolean;
494
+ closeButtonPosition?: 'top-right' | 'top-left';
495
+ draggable?: boolean;
496
+ dragHandle?: string;
497
+ animation?: 'fade' | 'slide' | 'bounce' | 'zoom' | 'none';
498
+ animationDuration?: number;
499
+ toastMode?: boolean;
500
+ toastPosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
501
+ autoClose?: boolean;
502
+ progressBar?: boolean;
453
503
  component?: Type<any>;
454
- componentProps?: {
455
- [key: string]: any;
456
- };
504
+ componentProps?: Record<string, any>;
457
505
  verticalButtons?: boolean;
458
506
  fullWidthButtons?: boolean;
459
507
  reverseButtons?: boolean;
@@ -464,6 +512,7 @@ interface AlertDialogOptions {
464
512
  allowEscapeKey?: boolean;
465
513
  allowEnterKey?: boolean;
466
514
  scrollbarPadding?: boolean;
515
+ allowMultiple?: boolean;
467
516
  showConfirmButton?: boolean;
468
517
  showCancelButton?: boolean;
469
518
  showDenyButton?: boolean;
@@ -495,9 +544,7 @@ interface AlertDialogOptions {
495
544
  inputPlaceholder?: string;
496
545
  inputValue?: string;
497
546
  inputValidator?: (value: string) => string | null | Promise<string | null>;
498
- inputAttributes?: {
499
- [key: string]: string;
500
- };
547
+ inputAttributes?: Record<string, string>;
501
548
  imageUrl?: string;
502
549
  imageWidth?: string;
503
550
  imageHeight?: string;
@@ -530,6 +577,7 @@ interface AlertDialogResult<T = any> {
530
577
  }
531
578
  declare class AlertDialogService {
532
579
  private dialog;
580
+ private zIndexService;
533
581
  private defaultOptions;
534
582
  /**
535
583
  * Configurar opciones por defecto para todos los diálogos
@@ -573,6 +621,10 @@ declare class AlertDialogService {
573
621
  prompt(options: Omit<AlertDialogOptions, 'input'> & {
574
622
  input?: AlertDialogOptions['input'];
575
623
  }): Promise<AlertDialogResult<string>>;
624
+ /**
625
+ * Diálogo de confirmación para eliminar
626
+ */
627
+ delete(options: string | Omit<AlertDialogOptions, 'type' | 'showCancelButton'>): Promise<AlertDialogResult>;
576
628
  /**
577
629
  * Toast notification (auto-cierre, posición personalizada)
578
630
  */
@@ -583,6 +635,8 @@ declare class AlertDialogService {
583
635
  closeAll(): void;
584
636
  private getDialogPosition;
585
637
  private getPanelClasses;
638
+ private getToastPosition;
639
+ private getToastDialogPosition;
586
640
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogService, never>;
587
641
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AlertDialogService>;
588
642
  }
@@ -596,21 +650,17 @@ declare class AlertDialogService {
596
650
  declare class DialogWrapper implements AfterViewInit, OnDestroy {
597
651
  dialogRef: MatDialogRef<DialogWrapper, any>;
598
652
  config: DialogWrapperConfig<unknown>;
653
+ private zIndexService;
599
654
  /**
600
655
  * A template reference that acts as an anchor for dynamic content.
601
656
  * This is where the component specified in the config will be rendered.
602
657
  */
603
- readonly contentHost: _angular_core.Signal<ViewContainerRef>;
658
+ readonly contentHost: Signal<ViewContainerRef>;
604
659
  /**
605
660
  * A reference to the header element for the z-index focus logic.
606
661
  * Used to bring the dialog to the front when clicked.
607
662
  */
608
- readonly header: _angular_core.Signal<ElementRef<any> | undefined>;
609
- /**
610
- * Static counter to track the highest z-index for multiple dialogs.
611
- * Ensures that the most recently clicked dialog appears on top.
612
- */
613
- private static lastZIndex;
663
+ readonly header: Signal<ElementRef | undefined>;
614
664
  /**
615
665
  * Timeout ID for debouncing z-index updates to prevent excessive DOM manipulations.
616
666
  */
@@ -638,7 +688,7 @@ declare class DialogWrapper implements AfterViewInit, OnDestroy {
638
688
  onClose(): void;
639
689
  /**
640
690
  * Brings the dialog to the front by adjusting its z-index.
641
- * Uses requestAnimationFrame to debounce updates and prevent excessive DOM manipulations.
691
+ * Uses the centralized DialogZIndexService for consistent z-index management.
642
692
  * Called when the dialog header is clicked.
643
693
  */
644
694
  bringToFront(): void;
@@ -1377,7 +1427,7 @@ declare class DataGrid<T = any> implements AfterViewInit, OnDestroy, OnChanges {
1377
1427
  noResultTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
1378
1428
  paginationTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
1379
1429
  summaryTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
1380
- size: _angular_core.InputSignal<"medium" | "small" | "normal">;
1430
+ size: _angular_core.InputSignal<"small" | "medium" | "normal">;
1381
1431
  headerCellTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
1382
1432
  expandable: _angular_core.InputSignal<boolean>;
1383
1433
  expansionTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
@@ -1401,7 +1451,7 @@ declare class DataGrid<T = any> implements AfterViewInit, OnDestroy, OnChanges {
1401
1451
  sortDirection: _angular_core.InputSignal<SortDirection>;
1402
1452
  sortDisableClear: _angular_core.InputSignal<boolean>;
1403
1453
  sortDisabled: _angular_core.InputSignal<boolean>;
1404
- sortStart: _angular_core.InputSignal<"asc" | "desc">;
1454
+ sortStart: _angular_core.InputSignal<"desc" | "asc">;
1405
1455
  rowHover: _angular_core.InputSignal<boolean>;
1406
1456
  rowStriped: _angular_core.InputSignal<boolean>;
1407
1457
  rowSelectable: _angular_core.InputSignal<boolean>;
@@ -2576,38 +2626,49 @@ declare function throwAcpPopoverInvalidPositionEnd(): void;
2576
2626
  type ButtonType = 'confirm' | 'cancel' | 'deny';
2577
2627
  declare class AlertDialog implements OnInit, OnDestroy {
2578
2628
  inputField?: ElementRef<HTMLInputElement | HTMLTextAreaElement>;
2629
+ dialogTitle?: ElementRef<HTMLElement>;
2579
2630
  private container;
2580
2631
  private componentRef;
2632
+ private timerInterval;
2581
2633
  inputValue: string;
2582
2634
  validationError: string | null;
2583
2635
  timerProgress: number;
2584
- private timerInterval;
2585
2636
  sanitizedHtml: SafeHtml;
2586
2637
  sanitizedFooter: SafeHtml | null;
2587
2638
  dialogRef: MatDialogRef<any, any>;
2588
2639
  data: AlertDialogOptions;
2589
2640
  private sanitizer;
2590
- private environmentInjector;
2641
+ private renderer;
2642
+ private elementRef;
2643
+ private cdr;
2644
+ private zIndexService;
2591
2645
  constructor();
2592
2646
  ngOnDestroy(): void;
2593
2647
  private startTimer;
2594
2648
  private loadComponent;
2595
2649
  ngOnInit(): void;
2596
2650
  getIconName(): string;
2651
+ onClose(): void;
2597
2652
  getButtonVariant(buttonType: ButtonType): ButtonVariant;
2598
2653
  getButtonIcon(buttonType: ButtonType): string;
2599
2654
  getButtonStyle(buttonType: ButtonType): MaterialButtonStyle;
2655
+ getActionsAlignment(): 'start' | 'center' | 'end';
2600
2656
  onConfirm(): Promise<void>;
2601
2657
  onCancel(): void;
2602
2658
  onDeny(): void;
2603
2659
  onInputEnter(): void;
2604
- private closeWithResult;
2605
2660
  getConfirmColor(): any;
2606
2661
  getCancelColor(): any;
2607
2662
  getDenyColor(): any;
2608
2663
  getConfirmBackgroundColor(): string | undefined;
2609
2664
  getCancelBackgroundColor(): string | undefined;
2610
2665
  getDenyBackgroundColor(): string | undefined;
2666
+ /**
2667
+ * Brings the dialog to the front by adjusting its z-index.
2668
+ * Uses the centralized DialogZIndexService for consistent z-index management.
2669
+ * Called when the dialog header is clicked.
2670
+ */
2671
+ bringToFront(): void;
2611
2672
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialog, never>;
2612
2673
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialog, "acp-alert-dialog", never, {}, {}, never, never, true, never>;
2613
2674
  }
@@ -2655,5 +2716,5 @@ declare class StatusDisplayPipe implements PipeTransform {
2655
2716
  static ɵpipe: _angular_core.ɵɵPipeDeclaration<StatusDisplayPipe, "statusDisplay", true>;
2656
2717
  }
2657
2718
 
2658
- 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 };
2719
+ 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 };
2659
2720
  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 };