@acontplus/ng-components 2.1.12 → 2.1.13

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.13",
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",
@@ -433,7 +433,7 @@ declare class AutocompleteWrapperService {
433
433
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AutocompleteWrapperService>;
434
434
  }
435
435
 
436
- type AlertType = 'success' | 'error' | 'warning' | 'info' | 'question';
436
+ type AlertType = 'success' | 'error' | 'warning' | 'info' | 'question' | 'delete';
437
437
  type AlertPosition = 'top' | 'top-start' | 'top-end' | 'center' | 'center-start' | 'center-end' | 'bottom' | 'bottom-start' | 'bottom-end';
438
438
  interface AlertDialogOptions {
439
439
  title?: string;
@@ -450,10 +450,21 @@ interface AlertDialogOptions {
450
450
  customClass?: string;
451
451
  panelClass?: string | string[];
452
452
  backdropClass?: string;
453
+ layout?: 'default' | 'modern' | 'toast';
454
+ iconPosition?: 'left' | 'center' | 'top';
455
+ contentAlignment?: 'left' | 'center' | 'right';
456
+ showCloseButton?: boolean;
457
+ closeButtonPosition?: 'top-right' | 'top-left';
458
+ draggable?: boolean;
459
+ dragHandle?: string;
460
+ animation?: 'fade' | 'slide' | 'bounce' | 'zoom' | 'none';
461
+ animationDuration?: number;
462
+ toastMode?: boolean;
463
+ toastPosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
464
+ autoClose?: boolean;
465
+ progressBar?: boolean;
453
466
  component?: Type<any>;
454
- componentProps?: {
455
- [key: string]: any;
456
- };
467
+ componentProps?: Record<string, any>;
457
468
  verticalButtons?: boolean;
458
469
  fullWidthButtons?: boolean;
459
470
  reverseButtons?: boolean;
@@ -495,9 +506,7 @@ interface AlertDialogOptions {
495
506
  inputPlaceholder?: string;
496
507
  inputValue?: string;
497
508
  inputValidator?: (value: string) => string | null | Promise<string | null>;
498
- inputAttributes?: {
499
- [key: string]: string;
500
- };
509
+ inputAttributes?: Record<string, string>;
501
510
  imageUrl?: string;
502
511
  imageWidth?: string;
503
512
  imageHeight?: string;
@@ -573,6 +582,10 @@ declare class AlertDialogService {
573
582
  prompt(options: Omit<AlertDialogOptions, 'input'> & {
574
583
  input?: AlertDialogOptions['input'];
575
584
  }): Promise<AlertDialogResult<string>>;
585
+ /**
586
+ * Diálogo de confirmación para eliminar
587
+ */
588
+ delete(options: string | Omit<AlertDialogOptions, 'type' | 'showCancelButton'>): Promise<AlertDialogResult>;
576
589
  /**
577
590
  * Toast notification (auto-cierre, posición personalizada)
578
591
  */
@@ -583,6 +596,8 @@ declare class AlertDialogService {
583
596
  closeAll(): void;
584
597
  private getDialogPosition;
585
598
  private getPanelClasses;
599
+ private getToastPosition;
600
+ private getToastDialogPosition;
586
601
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialogService, never>;
587
602
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AlertDialogService>;
588
603
  }
@@ -1377,7 +1392,7 @@ declare class DataGrid<T = any> implements AfterViewInit, OnDestroy, OnChanges {
1377
1392
  noResultTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
1378
1393
  paginationTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
1379
1394
  summaryTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
1380
- size: _angular_core.InputSignal<"medium" | "small" | "normal">;
1395
+ size: _angular_core.InputSignal<"small" | "medium" | "normal">;
1381
1396
  headerCellTemplate: _angular_core.InputSignal<TemplateRef<any> | DataGridCellTemplate | undefined>;
1382
1397
  expandable: _angular_core.InputSignal<boolean>;
1383
1398
  expansionTemplate: _angular_core.InputSignal<TemplateRef<any> | null>;
@@ -2574,40 +2589,53 @@ declare function throwAcpPopoverInvalidPositionStart(): void;
2574
2589
  declare function throwAcpPopoverInvalidPositionEnd(): void;
2575
2590
 
2576
2591
  type ButtonType = 'confirm' | 'cancel' | 'deny';
2577
- declare class AlertDialog implements OnInit, OnDestroy {
2592
+ declare class AlertDialog implements OnInit, OnDestroy, AfterViewInit {
2578
2593
  inputField?: ElementRef<HTMLInputElement | HTMLTextAreaElement>;
2594
+ dialogTitle?: ElementRef<HTMLElement>;
2579
2595
  private container;
2580
2596
  private componentRef;
2597
+ private timerInterval;
2598
+ private static lastZIndex;
2599
+ private bringToFrontTimeoutId;
2581
2600
  inputValue: string;
2582
2601
  validationError: string | null;
2583
2602
  timerProgress: number;
2584
- private timerInterval;
2585
2603
  sanitizedHtml: SafeHtml;
2586
2604
  sanitizedFooter: SafeHtml | null;
2587
2605
  dialogRef: MatDialogRef<any, any>;
2588
2606
  data: AlertDialogOptions;
2589
2607
  private sanitizer;
2590
- private environmentInjector;
2608
+ private renderer;
2609
+ private elementRef;
2610
+ private cdr;
2591
2611
  constructor();
2592
2612
  ngOnDestroy(): void;
2613
+ ngAfterViewInit(): void;
2593
2614
  private startTimer;
2594
2615
  private loadComponent;
2595
2616
  ngOnInit(): void;
2596
2617
  getIconName(): string;
2618
+ onClose(): void;
2597
2619
  getButtonVariant(buttonType: ButtonType): ButtonVariant;
2598
2620
  getButtonIcon(buttonType: ButtonType): string;
2599
2621
  getButtonStyle(buttonType: ButtonType): MaterialButtonStyle;
2622
+ getActionsAlignment(): 'start' | 'center' | 'end';
2600
2623
  onConfirm(): Promise<void>;
2601
2624
  onCancel(): void;
2602
2625
  onDeny(): void;
2603
2626
  onInputEnter(): void;
2604
- private closeWithResult;
2605
2627
  getConfirmColor(): any;
2606
2628
  getCancelColor(): any;
2607
2629
  getDenyColor(): any;
2608
2630
  getConfirmBackgroundColor(): string | undefined;
2609
2631
  getCancelBackgroundColor(): string | undefined;
2610
2632
  getDenyBackgroundColor(): string | undefined;
2633
+ /**
2634
+ * Brings the dialog to the front by adjusting its z-index.
2635
+ * Uses requestAnimationFrame to debounce updates and prevent excessive DOM manipulations.
2636
+ * Called when the dialog header is clicked.
2637
+ */
2638
+ bringToFront(): void;
2611
2639
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertDialog, never>;
2612
2640
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertDialog, "acp-alert-dialog", never, {}, {}, never, never, true, never>;
2613
2641
  }