@acontplus/ng-components 2.1.22 → 2.1.24
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.
|
@@ -351,12 +351,11 @@ class DialogZIndexService {
|
|
|
351
351
|
static Z_INDEX_RANGES = {
|
|
352
352
|
normal: { base: 1000, current: 1000 }, // Diálogos normales: 1000-1999
|
|
353
353
|
alert: { base: 2000, current: 2000 }, // AlertDialogs: 2000-2999 (siempre encima)
|
|
354
|
-
toast: { base: 3000, current: 3000 }, // Toasts: 3000-3999 (máxima prioridad)
|
|
355
354
|
};
|
|
356
355
|
static Z_INDEX_INCREMENT = 10;
|
|
357
356
|
/**
|
|
358
357
|
* Obtiene el siguiente z-index disponible para un tipo específico de diálogo
|
|
359
|
-
* @param type Tipo de diálogo (normal, alert
|
|
358
|
+
* @param type Tipo de diálogo (normal, alert)
|
|
360
359
|
* @returns El próximo z-index a usar
|
|
361
360
|
*/
|
|
362
361
|
getNextZIndex(type = 'normal') {
|
|
@@ -413,20 +412,8 @@ class DialogZIndexService {
|
|
|
413
412
|
// Agregar atributo data para debugging
|
|
414
413
|
pane.setAttribute('data-dialog-type', type);
|
|
415
414
|
pane.setAttribute('data-z-index', targetZIndex.toString());
|
|
416
|
-
// Para toasts, agregar clase especial para styling
|
|
417
|
-
if (type === 'toast') {
|
|
418
|
-
pane.classList.add('toast-overlay');
|
|
419
|
-
// Los toasts no deben bloquear interacciones
|
|
420
|
-
pane.style.pointerEvents = 'none';
|
|
421
|
-
// Pero el contenido del toast sí debe ser clickeable
|
|
422
|
-
const dialogContainer = pane.querySelector('.mat-mdc-dialog-container, .mat-dialog-container');
|
|
423
|
-
if (dialogContainer) {
|
|
424
|
-
dialogContainer.style.pointerEvents = 'auto';
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
415
|
}
|
|
428
|
-
|
|
429
|
-
if (backdrop && type !== 'toast') {
|
|
416
|
+
if (backdrop) {
|
|
430
417
|
backdrop.style.zIndex = (targetZIndex + 1).toString();
|
|
431
418
|
}
|
|
432
419
|
}
|
|
@@ -474,32 +461,6 @@ class DialogZIndexService {
|
|
|
474
461
|
}
|
|
475
462
|
}, 0);
|
|
476
463
|
}
|
|
477
|
-
/**
|
|
478
|
-
* Obtiene todos los toasts activos
|
|
479
|
-
* @returns Array de elementos de toast activos
|
|
480
|
-
*/
|
|
481
|
-
getActiveToasts() {
|
|
482
|
-
return Array.from(document.querySelectorAll('.cdk-overlay-pane[data-dialog-type="toast"]'));
|
|
483
|
-
}
|
|
484
|
-
/**
|
|
485
|
-
* Cierra todos los toasts activos
|
|
486
|
-
*/
|
|
487
|
-
closeAllToasts() {
|
|
488
|
-
const toasts = this.getActiveToasts();
|
|
489
|
-
toasts.forEach(toast => {
|
|
490
|
-
const closeButton = toast.querySelector('[mat-dialog-close], .toast-close-button');
|
|
491
|
-
if (closeButton) {
|
|
492
|
-
closeButton.click();
|
|
493
|
-
}
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Obtiene el número de toasts activos
|
|
498
|
-
* @returns Número de toasts actualmente visibles
|
|
499
|
-
*/
|
|
500
|
-
getActiveToastCount() {
|
|
501
|
-
return this.getActiveToasts().length;
|
|
502
|
-
}
|
|
503
464
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DialogZIndexService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
504
465
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DialogZIndexService, providedIn: 'root' });
|
|
505
466
|
}
|
|
@@ -1800,23 +1761,23 @@ class AlertDialogService {
|
|
|
1800
1761
|
showConfirmButton: true,
|
|
1801
1762
|
showCancelButton: false,
|
|
1802
1763
|
showDenyButton: false,
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1764
|
+
buttons: {
|
|
1765
|
+
confirm: { text: 'OK', focus: true },
|
|
1766
|
+
cancel: { text: 'Cancelar' },
|
|
1767
|
+
deny: { text: 'No' },
|
|
1768
|
+
},
|
|
1806
1769
|
disableClose: false,
|
|
1807
1770
|
closeOnBackdropClick: true,
|
|
1808
1771
|
allowEscapeKey: true,
|
|
1809
1772
|
allowEnterKey: true,
|
|
1810
1773
|
timerProgressBar: false,
|
|
1811
1774
|
reverseButtons: false,
|
|
1812
|
-
focusConfirm: true,
|
|
1813
1775
|
scrollbarPadding: true,
|
|
1814
1776
|
position: 'center',
|
|
1815
1777
|
draggable: false,
|
|
1816
1778
|
allowMultiple: false, // Por defecto no permitir múltiples alerts
|
|
1817
1779
|
forceToTop: true, // Por defecto los alerts siempre van encima
|
|
1818
1780
|
dialogType: 'alert', // Por defecto usar el tipo alert (z-index alto)
|
|
1819
|
-
// Nuevas opciones por defecto
|
|
1820
1781
|
layout: 'modern',
|
|
1821
1782
|
iconPosition: 'left',
|
|
1822
1783
|
contentAlignment: 'left',
|
|
@@ -1825,8 +1786,6 @@ class AlertDialogService {
|
|
|
1825
1786
|
closeButtonPosition: 'top-right',
|
|
1826
1787
|
animation: 'fade',
|
|
1827
1788
|
animationDuration: 300,
|
|
1828
|
-
autoClose: true,
|
|
1829
|
-
progressBar: true,
|
|
1830
1789
|
};
|
|
1831
1790
|
/**
|
|
1832
1791
|
* Configurar opciones por defecto para todos los diálogos
|
|
@@ -1849,16 +1808,17 @@ class AlertDialogService {
|
|
|
1849
1808
|
showConfirmButton: true,
|
|
1850
1809
|
showCancelButton: false,
|
|
1851
1810
|
showDenyButton: false,
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1811
|
+
buttons: {
|
|
1812
|
+
confirm: { text: 'OK', focus: true },
|
|
1813
|
+
cancel: { text: 'Cancelar' },
|
|
1814
|
+
deny: { text: 'No' },
|
|
1815
|
+
},
|
|
1855
1816
|
disableClose: false,
|
|
1856
1817
|
closeOnBackdropClick: true,
|
|
1857
1818
|
allowEscapeKey: true,
|
|
1858
1819
|
allowEnterKey: true,
|
|
1859
1820
|
timerProgressBar: false,
|
|
1860
1821
|
reverseButtons: false,
|
|
1861
|
-
focusConfirm: true,
|
|
1862
1822
|
scrollbarPadding: true,
|
|
1863
1823
|
position: 'center',
|
|
1864
1824
|
draggable: false,
|
|
@@ -1869,6 +1829,10 @@ class AlertDialogService {
|
|
|
1869
1829
|
iconPosition: 'left',
|
|
1870
1830
|
contentAlignment: 'left',
|
|
1871
1831
|
actionsAlignment: 'end',
|
|
1832
|
+
showCloseButton: true,
|
|
1833
|
+
closeButtonPosition: 'top-right',
|
|
1834
|
+
animation: 'fade',
|
|
1835
|
+
animationDuration: 300,
|
|
1872
1836
|
};
|
|
1873
1837
|
}
|
|
1874
1838
|
/**
|
|
@@ -1880,26 +1844,8 @@ class AlertDialogService {
|
|
|
1880
1844
|
if (!mergedOptions.allowMultiple) {
|
|
1881
1845
|
this.closeAllAlertDialogs();
|
|
1882
1846
|
}
|
|
1883
|
-
// Configuración especial para modo toast
|
|
1884
|
-
if (mergedOptions.layout === 'toast') {
|
|
1885
|
-
mergedOptions.width = mergedOptions.width || '350px';
|
|
1886
|
-
mergedOptions.showConfirmButton = mergedOptions.showConfirmButton ?? false;
|
|
1887
|
-
mergedOptions.timer = mergedOptions.timer || 4000;
|
|
1888
|
-
mergedOptions.timerProgressBar = mergedOptions.progressBar ?? true;
|
|
1889
|
-
// Si no se especificó position, usar por defecto para toasts
|
|
1890
|
-
if (!mergedOptions.position) {
|
|
1891
|
-
mergedOptions.position = 'top-end'; // Por defecto top-right para toasts
|
|
1892
|
-
}
|
|
1893
|
-
mergedOptions.disableClose = false;
|
|
1894
|
-
mergedOptions.animation = mergedOptions.animation || 'slide';
|
|
1895
|
-
mergedOptions.dialogType = 'toast'; // Los toasts usan el z-index más alto
|
|
1896
|
-
// Configuración específica para toasts no-intrusivos
|
|
1897
|
-
mergedOptions.closeOnBackdropClick = false; // No hay backdrop en toasts
|
|
1898
|
-
mergedOptions.allowEscapeKey = false; // ESC no debe cerrar toasts
|
|
1899
|
-
mergedOptions.allowMultiple = true; // Permitir múltiples toasts
|
|
1900
|
-
}
|
|
1901
1847
|
// Determinar el tipo de diálogo para z-index
|
|
1902
|
-
const dialogType = mergedOptions.dialogType ||
|
|
1848
|
+
const dialogType = mergedOptions.dialogType || 'alert';
|
|
1903
1849
|
// Calcular posición del diálogo
|
|
1904
1850
|
const position = this.getDialogPosition(mergedOptions.position || 'center');
|
|
1905
1851
|
const dialogRef = this.dialog.open(AlertDialog, {
|
|
@@ -1913,9 +1859,9 @@ class AlertDialogService {
|
|
|
1913
1859
|
backdropClass: mergedOptions.backdropClass,
|
|
1914
1860
|
position,
|
|
1915
1861
|
closeOnNavigation: true,
|
|
1916
|
-
autoFocus: mergedOptions.
|
|
1862
|
+
autoFocus: mergedOptions.buttons?.confirm?.focus !== false,
|
|
1917
1863
|
restoreFocus: true,
|
|
1918
|
-
hasBackdrop:
|
|
1864
|
+
hasBackdrop: true,
|
|
1919
1865
|
});
|
|
1920
1866
|
// Trackear este AlertDialog
|
|
1921
1867
|
this.openAlertDialogs.push(dialogRef);
|
|
@@ -2036,8 +1982,11 @@ class AlertDialogService {
|
|
|
2036
1982
|
...opts,
|
|
2037
1983
|
type: 'question',
|
|
2038
1984
|
showCancelButton: true,
|
|
2039
|
-
|
|
2040
|
-
|
|
1985
|
+
buttons: {
|
|
1986
|
+
confirm: { text: 'Sí', ...opts.buttons?.confirm },
|
|
1987
|
+
cancel: { text: 'No', ...opts.buttons?.cancel },
|
|
1988
|
+
...opts.buttons,
|
|
1989
|
+
},
|
|
2041
1990
|
});
|
|
2042
1991
|
}
|
|
2043
1992
|
/**
|
|
@@ -2062,34 +2011,11 @@ class AlertDialogService {
|
|
|
2062
2011
|
...opts,
|
|
2063
2012
|
type: 'delete',
|
|
2064
2013
|
showCancelButton: true,
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
* Toast notification (auto-cierre, posición personalizada, no-intrusivo)
|
|
2072
|
-
*/
|
|
2073
|
-
toast(options) {
|
|
2074
|
-
const opts = typeof options === 'string' ? { message: options } : options;
|
|
2075
|
-
return this.fire({
|
|
2076
|
-
// Valores por defecto que pueden ser sobrescritos
|
|
2077
|
-
timer: 3000,
|
|
2078
|
-
showConfirmButton: false,
|
|
2079
|
-
position: 'bottom-start', // Valor por defecto
|
|
2080
|
-
width: '350px',
|
|
2081
|
-
layout: 'toast', // Usar layout en lugar de toastMode
|
|
2082
|
-
dialogType: 'toast',
|
|
2083
|
-
forceToTop: false,
|
|
2084
|
-
allowMultiple: true,
|
|
2085
|
-
disableClose: true,
|
|
2086
|
-
closeOnBackdropClick: false,
|
|
2087
|
-
allowEscapeKey: false,
|
|
2088
|
-
allowEnterKey: false,
|
|
2089
|
-
autoClose: true,
|
|
2090
|
-
progressBar: true,
|
|
2091
|
-
// Los valores del usuario sobrescriben los por defecto
|
|
2092
|
-
...opts,
|
|
2014
|
+
buttons: {
|
|
2015
|
+
confirm: { text: 'Eliminar', variant: 'danger', ...opts.buttons?.confirm },
|
|
2016
|
+
cancel: { text: 'Cancelar', ...opts.buttons?.cancel },
|
|
2017
|
+
...opts.buttons,
|
|
2018
|
+
},
|
|
2093
2019
|
});
|
|
2094
2020
|
}
|
|
2095
2021
|
/**
|
|
@@ -2132,18 +2058,6 @@ class AlertDialogService {
|
|
|
2132
2058
|
// También limpiar nuestro tracking
|
|
2133
2059
|
this.openAlertDialogs = [];
|
|
2134
2060
|
}
|
|
2135
|
-
/**
|
|
2136
|
-
* Cerrar solo los toasts activos (mantener otros diálogos abiertos)
|
|
2137
|
-
*/
|
|
2138
|
-
closeAllToasts() {
|
|
2139
|
-
this.zIndexService.closeAllToasts();
|
|
2140
|
-
}
|
|
2141
|
-
/**
|
|
2142
|
-
* Obtener el número de toasts activos
|
|
2143
|
-
*/
|
|
2144
|
-
getActiveToastCount() {
|
|
2145
|
-
return this.zIndexService.getActiveToastCount();
|
|
2146
|
-
}
|
|
2147
2061
|
getDialogPosition(position) {
|
|
2148
2062
|
const positions = {
|
|
2149
2063
|
top: { top: '20px' },
|
|
@@ -2159,32 +2073,28 @@ class AlertDialogService {
|
|
|
2159
2073
|
return positions[position] || {};
|
|
2160
2074
|
}
|
|
2161
2075
|
getPanelClasses(options) {
|
|
2162
|
-
const classes = ['alert-dialog-container'];
|
|
2076
|
+
const classes = ['acp-alert-dialog-container'];
|
|
2163
2077
|
if (options.customClass) {
|
|
2164
2078
|
classes.push(options.customClass);
|
|
2165
2079
|
}
|
|
2166
2080
|
if (options.draggable) {
|
|
2167
|
-
classes.push('draggable-dialog');
|
|
2081
|
+
classes.push('acp-draggable-dialog');
|
|
2168
2082
|
}
|
|
2169
2083
|
// Agregar clases para layout
|
|
2170
2084
|
if (options.layout) {
|
|
2171
|
-
classes.push(`layout-${options.layout}`);
|
|
2085
|
+
classes.push(`acp-layout-${options.layout}`);
|
|
2172
2086
|
}
|
|
2173
2087
|
// Agregar clases para posición de icono
|
|
2174
2088
|
if (options.iconPosition) {
|
|
2175
|
-
classes.push(`icon-${options.iconPosition}`);
|
|
2089
|
+
classes.push(`acp-icon-${options.iconPosition}`);
|
|
2176
2090
|
}
|
|
2177
2091
|
// Agregar clases para alineación de contenido
|
|
2178
2092
|
if (options.contentAlignment) {
|
|
2179
|
-
classes.push(`content-${options.contentAlignment}`);
|
|
2180
|
-
}
|
|
2181
|
-
// Agregar clase para modo toast
|
|
2182
|
-
if (options.layout === 'toast') {
|
|
2183
|
-
classes.push('toast-mode');
|
|
2093
|
+
classes.push(`acp-content-${options.contentAlignment}`);
|
|
2184
2094
|
}
|
|
2185
2095
|
// Agregar clase para animación
|
|
2186
2096
|
if (options.animation) {
|
|
2187
|
-
classes.push(`animation-${options.animation}`);
|
|
2097
|
+
classes.push(`acp-animation-${options.animation}`);
|
|
2188
2098
|
}
|
|
2189
2099
|
if (options.panelClass) {
|
|
2190
2100
|
if (Array.isArray(options.panelClass)) {
|
|
@@ -3960,6 +3870,8 @@ class DateRangePicker {
|
|
|
3960
3870
|
showCheckbox = input(false, ...(ngDevMode ? [{ debugName: "showCheckbox" }] : []));
|
|
3961
3871
|
checkboxChecked = model(false, ...(ngDevMode ? [{ debugName: "checkboxChecked" }] : []));
|
|
3962
3872
|
checkboxPosition = input('suffix', ...(ngDevMode ? [{ debugName: "checkboxPosition" }] : []));
|
|
3873
|
+
startDate = input(new Date(), ...(ngDevMode ? [{ debugName: "startDate" }] : []));
|
|
3874
|
+
endDate = input(new Date(), ...(ngDevMode ? [{ debugName: "endDate" }] : []));
|
|
3963
3875
|
// NgxDatex specific inputs
|
|
3964
3876
|
singleDatePicker = input(false, ...(ngDevMode ? [{ debugName: "singleDatePicker" }] : []));
|
|
3965
3877
|
timePicker = input(false, ...(ngDevMode ? [{ debugName: "timePicker" }] : []));
|
|
@@ -4147,7 +4059,7 @@ class DateRangePicker {
|
|
|
4147
4059
|
// NgxDatex handles show/hide through its own API
|
|
4148
4060
|
}
|
|
4149
4061
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DateRangePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4150
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: DateRangePicker, isStandalone: true, selector: "acp-date-range-picker", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholderText: { classPropertyName: "placeholderText", publicName: "placeholderText", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, inputReadonly: { classPropertyName: "inputReadonly", publicName: "inputReadonly", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, formatOutputAsString: { classPropertyName: "formatOutputAsString", publicName: "formatOutputAsString", isSignal: true, isRequired: false, transformFunction: null }, calendarIcon: { classPropertyName: "calendarIcon", publicName: "calendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showCalendarButton: { classPropertyName: "showCalendarButton", publicName: "showCalendarButton", isSignal: true, isRequired: false, transformFunction: null }, showCheckbox: { classPropertyName: "showCheckbox", publicName: "showCheckbox", isSignal: true, isRequired: false, transformFunction: null }, checkboxChecked: { classPropertyName: "checkboxChecked", publicName: "checkboxChecked", isSignal: true, isRequired: false, transformFunction: null }, checkboxPosition: { classPropertyName: "checkboxPosition", publicName: "checkboxPosition", isSignal: true, isRequired: false, transformFunction: null }, singleDatePicker: { classPropertyName: "singleDatePicker", publicName: "singleDatePicker", isSignal: true, isRequired: false, transformFunction: null }, timePicker: { classPropertyName: "timePicker", publicName: "timePicker", isSignal: true, isRequired: false, transformFunction: null }, timePicker24Hour: { classPropertyName: "timePicker24Hour", publicName: "timePicker24Hour", isSignal: true, isRequired: false, transformFunction: null }, timePickerSeconds: { classPropertyName: "timePickerSeconds", publicName: "timePickerSeconds", isSignal: true, isRequired: false, transformFunction: null }, timePickerIncrement: { classPropertyName: "timePickerIncrement", publicName: "timePickerIncrement", isSignal: true, isRequired: false, transformFunction: null }, autoApply: { classPropertyName: "autoApply", publicName: "autoApply", isSignal: true, isRequired: false, transformFunction: null }, showDropdowns: { classPropertyName: "showDropdowns", publicName: "showDropdowns", isSignal: true, isRequired: false, transformFunction: null }, linkedCalendars: { classPropertyName: "linkedCalendars", publicName: "linkedCalendars", isSignal: true, isRequired: false, transformFunction: null }, alwaysShowCalendars: { classPropertyName: "alwaysShowCalendars", publicName: "alwaysShowCalendars", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkboxChecked: "checkboxCheckedChange", dateRangeSelected: "dateRangeSelected", pickerShow: "pickerShow", pickerHide: "pickerHide", pickerApply: "pickerApply", pickerCancel: "pickerCancel", checkboxChange: "checkboxChange" }, providers: [
|
|
4062
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: DateRangePicker, isStandalone: true, selector: "acp-date-range-picker", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholderText: { classPropertyName: "placeholderText", publicName: "placeholderText", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, inputReadonly: { classPropertyName: "inputReadonly", publicName: "inputReadonly", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, formatOutputAsString: { classPropertyName: "formatOutputAsString", publicName: "formatOutputAsString", isSignal: true, isRequired: false, transformFunction: null }, calendarIcon: { classPropertyName: "calendarIcon", publicName: "calendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showCalendarButton: { classPropertyName: "showCalendarButton", publicName: "showCalendarButton", isSignal: true, isRequired: false, transformFunction: null }, showCheckbox: { classPropertyName: "showCheckbox", publicName: "showCheckbox", isSignal: true, isRequired: false, transformFunction: null }, checkboxChecked: { classPropertyName: "checkboxChecked", publicName: "checkboxChecked", isSignal: true, isRequired: false, transformFunction: null }, checkboxPosition: { classPropertyName: "checkboxPosition", publicName: "checkboxPosition", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, singleDatePicker: { classPropertyName: "singleDatePicker", publicName: "singleDatePicker", isSignal: true, isRequired: false, transformFunction: null }, timePicker: { classPropertyName: "timePicker", publicName: "timePicker", isSignal: true, isRequired: false, transformFunction: null }, timePicker24Hour: { classPropertyName: "timePicker24Hour", publicName: "timePicker24Hour", isSignal: true, isRequired: false, transformFunction: null }, timePickerSeconds: { classPropertyName: "timePickerSeconds", publicName: "timePickerSeconds", isSignal: true, isRequired: false, transformFunction: null }, timePickerIncrement: { classPropertyName: "timePickerIncrement", publicName: "timePickerIncrement", isSignal: true, isRequired: false, transformFunction: null }, autoApply: { classPropertyName: "autoApply", publicName: "autoApply", isSignal: true, isRequired: false, transformFunction: null }, showDropdowns: { classPropertyName: "showDropdowns", publicName: "showDropdowns", isSignal: true, isRequired: false, transformFunction: null }, linkedCalendars: { classPropertyName: "linkedCalendars", publicName: "linkedCalendars", isSignal: true, isRequired: false, transformFunction: null }, alwaysShowCalendars: { classPropertyName: "alwaysShowCalendars", publicName: "alwaysShowCalendars", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkboxChecked: "checkboxCheckedChange", dateRangeSelected: "dateRangeSelected", pickerShow: "pickerShow", pickerHide: "pickerHide", pickerApply: "pickerApply", pickerCancel: "pickerCancel", checkboxChange: "checkboxChange" }, providers: [
|
|
4151
4063
|
{
|
|
4152
4064
|
provide: NG_VALUE_ACCESSOR,
|
|
4153
4065
|
useExisting: forwardRef(() => DateRangePicker),
|
|
@@ -4185,6 +4097,8 @@ class DateRangePicker {
|
|
|
4185
4097
|
(openEvent)="onPickerShow()"
|
|
4186
4098
|
(closeEvent)="onPickerHide()"
|
|
4187
4099
|
(checkboxChange)="onCheckboxToggle($event)"
|
|
4100
|
+
[startDate]="startDate()"
|
|
4101
|
+
[endDate]="endDate()"
|
|
4188
4102
|
></ngx-datex>
|
|
4189
4103
|
`, isInline: true, dependencies: [{ kind: "component", type: NgxDatex, selector: "ngx-datex", inputs: ["config", "locale", "theme", "appearance", "floatLabel", "label", "placeholder", "calendarIcon", "showCalendarIcon", "calendarIconPosition", "showCheckbox", "checkboxChecked", "checkboxPosition", "readonly", "disabled", "showHeader", "showFooter", "singleDatePicker", "autoApply", "showDropdowns", "timePicker", "timePicker24Hour", "timePickerIncrement", "timePickerSeconds", "linkedCalendars", "autoUpdateInput", "alwaysShowCalendars", "showCustomRangeLabel", "startDate", "endDate", "minDate", "maxDate", "maxSpan", "showWeekNumbers", "showISOWeekNumbers", "buttonClasses", "applyButtonClasses", "cancelButtonClasses", "isInvalidDate", "isCustomDate", "minYear", "maxYear", "ranges", "opens", "drops", "headerTemplate", "footerTemplate", "dayTemplate", "ariaLabel", "ariaDescribedBy"], outputs: ["dateChange", "rangeChange", "openEvent", "closeEvent", "monthChange", "yearChange", "dateHover", "validationError", "checkboxChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
4190
4104
|
}
|
|
@@ -4233,10 +4147,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
4233
4147
|
(openEvent)="onPickerShow()"
|
|
4234
4148
|
(closeEvent)="onPickerHide()"
|
|
4235
4149
|
(checkboxChange)="onCheckboxToggle($event)"
|
|
4150
|
+
[startDate]="startDate()"
|
|
4151
|
+
[endDate]="endDate()"
|
|
4236
4152
|
></ngx-datex>
|
|
4237
4153
|
`,
|
|
4238
4154
|
}]
|
|
4239
|
-
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholderText: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderText", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], inputReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputReadonly", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], formatOutputAsString: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatOutputAsString", required: false }] }], calendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIcon", required: false }] }], showCalendarButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCalendarButton", required: false }] }], showCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCheckbox", required: false }] }], checkboxChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxChecked", required: false }] }, { type: i0.Output, args: ["checkboxCheckedChange"] }], checkboxPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxPosition", required: false }] }], singleDatePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleDatePicker", required: false }] }], timePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker", required: false }] }], timePicker24Hour: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker24Hour", required: false }] }], timePickerSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerSeconds", required: false }] }], timePickerIncrement: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerIncrement", required: false }] }], autoApply: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoApply", required: false }] }], showDropdowns: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDropdowns", required: false }] }], linkedCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkedCalendars", required: false }] }], alwaysShowCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "alwaysShowCalendars", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], dateRangeSelected: [{ type: i0.Output, args: ["dateRangeSelected"] }], pickerShow: [{ type: i0.Output, args: ["pickerShow"] }], pickerHide: [{ type: i0.Output, args: ["pickerHide"] }], pickerApply: [{ type: i0.Output, args: ["pickerApply"] }], pickerCancel: [{ type: i0.Output, args: ["pickerCancel"] }], checkboxChange: [{ type: i0.Output, args: ["checkboxChange"] }] } });
|
|
4155
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholderText: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderText", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], inputReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputReadonly", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], formatOutputAsString: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatOutputAsString", required: false }] }], calendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIcon", required: false }] }], showCalendarButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCalendarButton", required: false }] }], showCheckbox: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCheckbox", required: false }] }], checkboxChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxChecked", required: false }] }, { type: i0.Output, args: ["checkboxCheckedChange"] }], checkboxPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkboxPosition", required: false }] }], startDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "startDate", required: false }] }], endDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDate", required: false }] }], singleDatePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleDatePicker", required: false }] }], timePicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker", required: false }] }], timePicker24Hour: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePicker24Hour", required: false }] }], timePickerSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerSeconds", required: false }] }], timePickerIncrement: [{ type: i0.Input, args: [{ isSignal: true, alias: "timePickerIncrement", required: false }] }], autoApply: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoApply", required: false }] }], showDropdowns: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDropdowns", required: false }] }], linkedCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkedCalendars", required: false }] }], alwaysShowCalendars: [{ type: i0.Input, args: [{ isSignal: true, alias: "alwaysShowCalendars", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], dateRangeSelected: [{ type: i0.Output, args: ["dateRangeSelected"] }], pickerShow: [{ type: i0.Output, args: ["pickerShow"] }], pickerHide: [{ type: i0.Output, args: ["pickerHide"] }], pickerApply: [{ type: i0.Output, args: ["pickerApply"] }], pickerCancel: [{ type: i0.Output, args: ["pickerCancel"] }], checkboxChange: [{ type: i0.Output, args: ["checkboxChange"] }] } });
|
|
4240
4156
|
|
|
4241
4157
|
// Angular component
|
|
4242
4158
|
|
|
@@ -4906,7 +4822,7 @@ function throwAcpPopoverInvalidPositionEnd() {
|
|
|
4906
4822
|
const ACP_POPOVER_DEFAULT_OPTIONS = new InjectionToken('acp-popover-default-options', {
|
|
4907
4823
|
providedIn: 'root',
|
|
4908
4824
|
factory: () => ({
|
|
4909
|
-
backdropClass: 'cdk-overlay-
|
|
4825
|
+
backdropClass: 'cdk-overlay-dark-backdrop',
|
|
4910
4826
|
}),
|
|
4911
4827
|
});
|
|
4912
4828
|
let popoverPanelUid = 0;
|
|
@@ -5605,8 +5521,16 @@ class AcpPopoverTrigger {
|
|
|
5605
5521
|
const overlayRef = this._createOverlay();
|
|
5606
5522
|
const overlayConfig = overlayRef.getConfig();
|
|
5607
5523
|
this._setPosition(overlayConfig.positionStrategy);
|
|
5524
|
+
// Configure backdrop based on trigger event and user preference
|
|
5608
5525
|
if (this.popover.triggerEvent === 'click') {
|
|
5609
5526
|
overlayConfig.hasBackdrop = this.popover.hasBackdrop ?? true;
|
|
5527
|
+
overlayConfig.backdropClass = this.popover.backdropClass;
|
|
5528
|
+
}
|
|
5529
|
+
else if (this.popover.triggerEvent === 'hover') {
|
|
5530
|
+
// For hover events, backdrop must be disabled to prevent flickering
|
|
5531
|
+
// The backdrop interferes with mouse events and causes infinite open/close cycles
|
|
5532
|
+
overlayConfig.hasBackdrop = false;
|
|
5533
|
+
// Note: User's hasBackdrop setting is ignored for hover to prevent UX issues
|
|
5610
5534
|
}
|
|
5611
5535
|
overlayRef.attach(this._getPortal());
|
|
5612
5536
|
if (this.popover.lazyContent) {
|
|
@@ -6074,10 +5998,13 @@ class AlertDialog {
|
|
|
6074
5998
|
dismiss: 'close',
|
|
6075
5999
|
});
|
|
6076
6000
|
}
|
|
6001
|
+
getButtonConfig(buttonType) {
|
|
6002
|
+
return this.data.buttons?.[buttonType] || {};
|
|
6003
|
+
}
|
|
6077
6004
|
getButtonVariant(buttonType) {
|
|
6078
|
-
const
|
|
6079
|
-
if (variant)
|
|
6080
|
-
return variant;
|
|
6005
|
+
const config = this.getButtonConfig(buttonType);
|
|
6006
|
+
if (config.variant)
|
|
6007
|
+
return config.variant;
|
|
6081
6008
|
// Default variants based on button type and alert type
|
|
6082
6009
|
if (buttonType === 'confirm') {
|
|
6083
6010
|
switch (this.data.type) {
|
|
@@ -6106,9 +6033,9 @@ class AlertDialog {
|
|
|
6106
6033
|
return 'primary';
|
|
6107
6034
|
}
|
|
6108
6035
|
getButtonIcon(buttonType) {
|
|
6109
|
-
const
|
|
6110
|
-
if (icon)
|
|
6111
|
-
return icon;
|
|
6036
|
+
const config = this.getButtonConfig(buttonType);
|
|
6037
|
+
if (config.icon)
|
|
6038
|
+
return config.icon;
|
|
6112
6039
|
// Default icons based on button type
|
|
6113
6040
|
switch (buttonType) {
|
|
6114
6041
|
case 'confirm':
|
|
@@ -6122,8 +6049,32 @@ class AlertDialog {
|
|
|
6122
6049
|
}
|
|
6123
6050
|
}
|
|
6124
6051
|
getButtonStyle(buttonType) {
|
|
6125
|
-
const
|
|
6126
|
-
return style || 'elevated';
|
|
6052
|
+
const config = this.getButtonConfig(buttonType);
|
|
6053
|
+
return config.style || 'elevated';
|
|
6054
|
+
}
|
|
6055
|
+
getButtonText(buttonType) {
|
|
6056
|
+
const config = this.getButtonConfig(buttonType);
|
|
6057
|
+
if (config.text)
|
|
6058
|
+
return config.text;
|
|
6059
|
+
// Default text based on button type
|
|
6060
|
+
switch (buttonType) {
|
|
6061
|
+
case 'confirm':
|
|
6062
|
+
return 'OK';
|
|
6063
|
+
case 'cancel':
|
|
6064
|
+
return 'Cancelar';
|
|
6065
|
+
case 'deny':
|
|
6066
|
+
return 'No';
|
|
6067
|
+
default:
|
|
6068
|
+
return 'OK';
|
|
6069
|
+
}
|
|
6070
|
+
}
|
|
6071
|
+
getButtonDisabled(buttonType) {
|
|
6072
|
+
const config = this.getButtonConfig(buttonType);
|
|
6073
|
+
return config.disabled || false;
|
|
6074
|
+
}
|
|
6075
|
+
getButtonFocus(buttonType) {
|
|
6076
|
+
const config = this.getButtonConfig(buttonType);
|
|
6077
|
+
return config.focus || buttonType === 'confirm';
|
|
6127
6078
|
}
|
|
6128
6079
|
getActionsAlignment() {
|
|
6129
6080
|
// Si hay una configuración específica de alineación de acciones, usarla
|
|
@@ -6226,53 +6177,35 @@ class AlertDialog {
|
|
|
6226
6177
|
this.onConfirm();
|
|
6227
6178
|
}
|
|
6228
6179
|
}
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
if (
|
|
6233
|
-
return
|
|
6180
|
+
getButtonColor(buttonType, isBackground = false) {
|
|
6181
|
+
const config = this.getButtonConfig(buttonType);
|
|
6182
|
+
const color = config.color;
|
|
6183
|
+
if (!color) {
|
|
6184
|
+
return buttonType === 'confirm' ? 'primary' : undefined;
|
|
6185
|
+
}
|
|
6186
|
+
const materialColors = ['primary', 'accent', 'warn'];
|
|
6187
|
+
if (isBackground) {
|
|
6188
|
+
return materialColors.includes(color) ? undefined : color;
|
|
6234
6189
|
}
|
|
6235
|
-
return undefined;
|
|
6190
|
+
return materialColors.includes(color) ? color : undefined;
|
|
6191
|
+
}
|
|
6192
|
+
getConfirmColor() {
|
|
6193
|
+
return this.getButtonColor('confirm');
|
|
6236
6194
|
}
|
|
6237
6195
|
getCancelColor() {
|
|
6238
|
-
|
|
6239
|
-
return undefined;
|
|
6240
|
-
if (['primary', 'accent', 'warn'].includes(this.data.cancelButtonColor)) {
|
|
6241
|
-
return this.data.cancelButtonColor;
|
|
6242
|
-
}
|
|
6243
|
-
return undefined;
|
|
6196
|
+
return this.getButtonColor('cancel');
|
|
6244
6197
|
}
|
|
6245
6198
|
getDenyColor() {
|
|
6246
|
-
|
|
6247
|
-
return undefined;
|
|
6248
|
-
if (['primary', 'accent', 'warn'].includes(this.data.denyButtonColor)) {
|
|
6249
|
-
return this.data.denyButtonColor;
|
|
6250
|
-
}
|
|
6251
|
-
return undefined;
|
|
6199
|
+
return this.getButtonColor('deny');
|
|
6252
6200
|
}
|
|
6253
6201
|
getConfirmBackgroundColor() {
|
|
6254
|
-
|
|
6255
|
-
return undefined;
|
|
6256
|
-
if (['primary', 'accent', 'warn'].includes(this.data.confirmButtonColor)) {
|
|
6257
|
-
return undefined;
|
|
6258
|
-
}
|
|
6259
|
-
return this.data.confirmButtonColor;
|
|
6202
|
+
return this.getButtonColor('confirm', true);
|
|
6260
6203
|
}
|
|
6261
6204
|
getCancelBackgroundColor() {
|
|
6262
|
-
|
|
6263
|
-
return undefined;
|
|
6264
|
-
if (['primary', 'accent', 'warn'].includes(this.data.cancelButtonColor)) {
|
|
6265
|
-
return undefined;
|
|
6266
|
-
}
|
|
6267
|
-
return this.data.cancelButtonColor;
|
|
6205
|
+
return this.getButtonColor('cancel', true);
|
|
6268
6206
|
}
|
|
6269
6207
|
getDenyBackgroundColor() {
|
|
6270
|
-
|
|
6271
|
-
return undefined;
|
|
6272
|
-
if (['primary', 'accent', 'warn'].includes(this.data.denyButtonColor)) {
|
|
6273
|
-
return undefined;
|
|
6274
|
-
}
|
|
6275
|
-
return this.data.denyButtonColor;
|
|
6208
|
+
return this.getButtonColor('deny', true);
|
|
6276
6209
|
}
|
|
6277
6210
|
// ===== CDK DRAG FUNCTIONALITY =====
|
|
6278
6211
|
/**
|
|
@@ -6284,7 +6217,7 @@ class AlertDialog {
|
|
|
6284
6217
|
this.zIndexService.bringToFront(this.elementRef.nativeElement);
|
|
6285
6218
|
}
|
|
6286
6219
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6287
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AlertDialog, isStandalone: true, selector: "acp-alert-dialog", viewQueries: [{ propertyName: "inputField", first: true, predicate: ["inputField"], descendants: true }, { propertyName: "dialogTitle", first: true, predicate: ["dialogTitle"], descendants: true }, { propertyName: "container", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\n class=\"alert-dialog\"\n [class.modern-layout]=\"data.layout === 'modern'\"\n [class.toast-layout]=\"data.layout === 'toast'\"\n [class.icon-left]=\"data.iconPosition === 'left'\"\n [class.icon-center]=\"data.iconPosition === 'center'\"\n [class.icon-top]=\"data.iconPosition === 'top'\"\n [class.content-left]=\"data.contentAlignment === 'left'\"\n [class.content-center]=\"data.contentAlignment === 'center'\"\n [class.content-right]=\"data.contentAlignment === 'right'\"\n [attr.aria-label]=\"data.ariaLabel\"\n [attr.aria-describedby]=\"data.ariaDescribedBy\"\n>\n <!-- Timer Progress Bar -->\n @if (data.timer && (data.timerProgressBar || data.progressBar || data.layout === 'toast')) {\n <mat-progress-bar\n mode=\"determinate\"\n [value]=\"timerProgress\"\n class=\"timer-progress\"\n [class.toast-progress]=\"data.layout === 'toast'\"\n >\n </mat-progress-bar>\n }\n\n <!-- Alert Header -->\n @if (data.draggable) {\n <div\n class=\"acp-alert-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n (mousedown)=\"bringToFront()\"\n >\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Toast Content (solo para modo toast) -->\n @if (data.layout === 'toast') {\n <!-- Title y Message en l\u00EDnea para toast -->\n <div class=\"toast-content\">\n @if (data.title) {\n <span class=\"toast-title\" #dialogTitle>{{ data.title }}</span>\n } @if (data.message) {\n <span class=\"toast-message\">{{ data.message }}</span>\n }\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n } @else {\n <div class=\"acp-alert-header\">\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Toast Content (solo para modo toast) -->\n @if (data.layout === 'toast') {\n <!-- Title y Message en l\u00EDnea para toast -->\n <div class=\"toast-content\">\n @if (data.title) {\n <span class=\"toast-title\" #dialogTitle>{{ data.title }}</span>\n } @if (data.message) {\n <span class=\"toast-message\">{{ data.message }}</span>\n }\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n }\n\n <!-- Content (solo para modo normal, no toast) -->\n @if (data.layout !== 'toast') {\n <mat-dialog-content class=\"alert-dialog-content\">\n <!-- Title -->\n @if (data.title) {\n <h2 class=\"alert-dialog-title\" #dialogTitle>{{ data.title }}</h2>\n }\n <!-- Image -->\n @if (data.imageUrl) {\n <div class=\"alert-dialog-image\">\n <img\n [src]=\"data.imageUrl\"\n [alt]=\"data.imageAlt || 'Alert image'\"\n [style.width]=\"data.imageWidth || 'auto'\"\n [style.height]=\"data.imageHeight || 'auto'\"\n [style.max-width]=\"data.imageWidth || '100%'\"\n />\n </div>\n }\n\n <!-- Dynamic Component -->\n @if (data.component) {\n <div #dynamicComponentContainer></div>\n } @if (data.html) {\n <div [innerHTML]=\"sanitizedHtml\"></div>\n } @else if (data.message) {\n <p class=\"alert-message\">{{ data.message }}</p>\n }\n\n <!-- Input Field -->\n @if (data.input) {\n <mat-form-field appearance=\"outline\" class=\"alert-input-field\">\n @if (data.inputLabel) {\n <mat-label>{{ data.inputLabel }}</mat-label>\n } @if (data.input === 'textarea') {\n <textarea\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n rows=\"4\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n >\n </textarea>\n } @else {\n <input\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n />\n } @if (validationError) {\n <mat-error>{{ validationError }}</mat-error>\n }\n </mat-form-field>\n }\n </mat-dialog-content>\n }\n\n <!-- Actions (solo para modo normal, no toast) -->\n @if (data.layout !== 'toast' && (data.showConfirmButton !== false || data.showCancelButton ||\n data.showDenyButton)) {\n <mat-dialog-actions\n class=\"alert-dialog-actions\"\n [class.reverse-buttons]=\"data.reverseButtons\"\n [class.vertical-buttons]=\"data.verticalButtons\"\n [align]=\"getActionsAlignment()\"\n >\n @if (data.showDenyButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('deny')\"\n [variant]=\"getButtonVariant('deny')\"\n [icon]=\"getButtonIcon('deny')\"\n (handleClick)=\"onDeny()\"\n [text]=\"data.denyText || 'No'\"\n [disabled]=\"data.disableDenyButton?? false\"\n [class.spinning]=\"data.processing && data.processingButton === 'deny'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showCancelButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('cancel')\"\n [variant]=\"getButtonVariant('cancel')\"\n [icon]=\"getButtonIcon('cancel')\"\n (handleClick)=\"onCancel()\"\n [text]=\"data.cancelText || 'Cancel'\"\n [disabled]=\"data.disableCancelButton??false\"\n [class.spinning]=\"data.processing && data.processingButton === 'cancel'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showConfirmButton !== false) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('confirm')\"\n [variant]=\"getButtonVariant('confirm')\"\n [icon]=\"getButtonIcon('confirm')\"\n (handleClick)=\"onConfirm()\"\n [text]=\"data.confirmText || 'OK'\"\n [disabled]=\"data.disableConfirmButton?? false\"\n [class.spinning]=\"data.processing && data.processingButton === 'confirm'\"\n [class.full-width]=\"data.fullWidthButtons\"\n [autofocus]=\"data.focusConfirm\"\n />\n }\n </mat-dialog-actions>\n }\n\n <!-- Footer -->\n @if (data.footer || data.footerHtml) {\n <div class=\"alert-dialog-footer\">\n @if (data.footerHtml) {\n <div [innerHTML]=\"sanitizedFooter\"></div>\n } @else { {{ data.footer }} }\n </div>\n }\n</div>\n", styles: [".alert-dialog{position:relative;overflow:hidden;padding:0;display:flex;flex-direction:column;border-radius:16px}.acp-alert-header{display:flex;align-items:flex-start;justify-content:space-between;padding:24px 24px 0;position:relative}.acp-alert-header .alert-dialog-icon{margin:4px 0 0;flex-shrink:0}.alert-dialog-title{margin:0 0 12px;font-size:20px;font-weight:600;line-height:1.2;color:#1a1a1a;text-align:left}.alert-dialog-content{text-align:left}.alert-dialog-content .alert-message{margin:0;font-size:16px;line-height:1.4;color:#666}.alert-dialog-actions{margin:24px;padding:0;gap:12px}.alert-dialog-actions.reverse-buttons{flex-direction:row-reverse}.alert-dialog-actions.vertical-buttons{flex-direction:column;align-items:stretch}.alert-dialog-actions.vertical-buttons.reverse-buttons{flex-direction:column-reverse}.close-button{position:relative;z-index:10;width:40px;height:40px;margin:0;background-color:#0000000d;border-radius:50%}.close-button mat-icon{font-size:20px;width:20px;height:20px;color:#0009}.close-button:hover{background-color:#0000001a}.alert-dialog.modern-layout .acp-alert-header{padding:24px 24px 0}.alert-dialog.modern-layout .acp-alert-header .alert-dialog-icon{margin-right:16px}.alert-dialog.modern-layout .acp-alert-header .alert-dialog-icon .icon-large{font-size:48px;width:48px;height:48px}.alert-dialog.toast-layout{border-radius:8px}.alert-dialog.toast-layout .acp-alert-header{padding:16px;align-items:center;gap:12px}.alert-dialog.toast-layout .acp-alert-header .alert-dialog-icon{margin:0;flex-shrink:0}.alert-dialog.toast-layout .acp-alert-header .alert-dialog-icon .icon-large{font-size:24px;width:24px;height:24px}.alert-dialog.toast-layout .acp-alert-header .toast-content{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}.alert-dialog.toast-layout .acp-alert-header .toast-content .toast-title{font-size:14px;font-weight:600;line-height:1.2;color:#1a1a1a;margin:0}.alert-dialog.toast-layout .acp-alert-header .toast-content .toast-message{font-size:13px;line-height:1.3;color:#666;margin:0}.alert-dialog.toast-layout .acp-alert-header .close-button{margin:0;flex-shrink:0}.alert-dialog.toast-layout .alert-dialog-content,.alert-dialog.toast-layout .alert-dialog-actions{display:none}.alert-dialog.icon-center .acp-alert-header{flex-direction:column;text-align:center;align-items:center;padding:24px 24px 16px}.alert-dialog.icon-center .acp-alert-header .alert-dialog-icon{margin:0 0 16px}.alert-dialog.icon-center .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.alert-dialog.icon-center .alert-dialog-title,.alert-dialog.icon-center .alert-dialog-content{text-align:center}.alert-dialog.icon-top .acp-alert-header{flex-direction:column;align-items:flex-start;padding:24px 24px 16px}.alert-dialog.icon-top .acp-alert-header .alert-dialog-icon{margin:0 0 16px}.alert-dialog.icon-top .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.alert-dialog.content-left .alert-dialog-title,.alert-dialog.content-left .alert-dialog-content{text-align:left}.alert-dialog.content-center .acp-alert-header{justify-content:center}.alert-dialog.content-center .alert-dialog-title,.alert-dialog.content-center .alert-dialog-content{text-align:center}.alert-dialog.content-right .alert-dialog-title,.alert-dialog.content-right .alert-dialog-content{text-align:right}.timer-progress{position:absolute;top:0;left:0;right:0;height:4px;z-index:5;border-radius:0}.timer-progress.toast-progress{height:3px;border-radius:0}:host ::ng-deep .timer-progress .mdc-linear-progress__bar{transition:transform 50ms linear}:host ::ng-deep .timer-progress .mdc-linear-progress__buffer{background-color:#0000001a}.icon-success mat-icon{color:#10b981}.icon-error mat-icon{color:#ef4444}.icon-warning mat-icon{color:#f59e0b}.icon-info mat-icon{color:#3b82f6}.icon-question mat-icon{color:#8b5cf6}.icon-delete mat-icon{color:#ef4444}.alert-dialog-image{margin:1rem auto;display:flex;justify-content:center;align-items:center}.alert-dialog-image img{max-width:100%;border-radius:8px}.alert-input-field{width:100%;margin-top:1rem}.confirm-button,.cancel-button,.deny-button{min-width:100px}.cancel-button{color:#333}.alert-dialog-footer{margin:0 24px 24px;padding-top:1rem;border-top:1px solid #e0e0e0;font-size:.875rem;color:#666}.acp-alert-header[cdkDrag]{cursor:move;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.acp-alert-header[cdkDrag]:hover{background-color:#00000005}.cdk-drag-dragging{user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}:host ::ng-deep .animation-fade .mat-mdc-dialog-container{animation:fadeIn .3s ease-out}:host ::ng-deep .animation-slide .mat-mdc-dialog-container{animation:slideIn .3s ease-out}:host ::ng-deep .animation-bounce .mat-mdc-dialog-container{animation:bounceIn .5s ease-out}:host ::ng-deep .animation-zoom .mat-mdc-dialog-container{animation:zoomIn .3s ease-out}:host ::ng-deep .toast-mode .mat-mdc-dialog-container{border-radius:8px;box-shadow:0 4px 12px #00000026;max-width:400px;animation:slideInRight .3s ease-out}:host ::ng-deep .layout-toast .mat-mdc-dialog-container{border-radius:8px;box-shadow:0 4px 12px #00000026;max-width:400px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slideInRight{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes bounceIn{0%{transform:scale(.3);opacity:0}50%{transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1);opacity:1}}@keyframes zoomIn{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: Button, selector: "acp-button", inputs: ["variant", "text", "icon", "disabled", "type", "matStyle", "customClass", "reportFormat", "extended", "title", "ariaLabel", "name", "id", "form", "tabIndex", "testId"], outputs: ["handleClick"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
6220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AlertDialog, isStandalone: true, selector: "acp-alert-dialog", viewQueries: [{ propertyName: "inputField", first: true, predicate: ["inputField"], descendants: true }, { propertyName: "dialogTitle", first: true, predicate: ["dialogTitle"], descendants: true }, { propertyName: "container", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\n class=\"acp-alert-dialog\"\n [class.modern-layout]=\"data.layout === 'modern'\"\n [class.icon-left]=\"data.iconPosition === 'left'\"\n [class.icon-center]=\"data.iconPosition === 'center'\"\n [class.icon-top]=\"data.iconPosition === 'top'\"\n [class.content-left]=\"data.contentAlignment === 'left'\"\n [class.content-center]=\"data.contentAlignment === 'center'\"\n [class.content-right]=\"data.contentAlignment === 'right'\"\n [attr.aria-label]=\"data.ariaLabel\"\n [attr.aria-describedby]=\"data.ariaDescribedBy\"\n>\n <!-- Timer Progress Bar -->\n @if (data.timer && data.timerProgressBar) {\n <mat-progress-bar mode=\"determinate\" [value]=\"timerProgress\" class=\"timer-progress\">\n </mat-progress-bar>\n }\n\n <!-- Alert Header -->\n @if (data.draggable) {\n <div\n class=\"acp-alert-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n (mousedown)=\"bringToFront()\"\n >\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"acp-alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n } @else {\n <div class=\"acp-alert-header\">\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"acp-alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n }\n\n <!-- Content -->\n <mat-dialog-content class=\"acp-alert-dialog-content\">\n <!-- Title -->\n @if (data.title) {\n <h2 class=\"acp-alert-dialog-title\" #dialogTitle>{{ data.title }}</h2>\n }\n <!-- Image -->\n @if (data.imageUrl) {\n <div class=\"acp-alert-dialog-image\">\n <img\n [src]=\"data.imageUrl\"\n [alt]=\"data.imageAlt || 'Alert image'\"\n [style.width]=\"data.imageWidth || 'auto'\"\n [style.height]=\"data.imageHeight || 'auto'\"\n [style.max-width]=\"data.imageWidth || '100%'\"\n />\n </div>\n }\n\n <!-- Dynamic Component -->\n @if (data.component) {\n <div #dynamicComponentContainer></div>\n } @if (data.html) {\n <div [innerHTML]=\"sanitizedHtml\"></div>\n } @else if (data.message) {\n <p class=\"acp-alert-message\">{{ data.message }}</p>\n }\n\n <!-- Input Field -->\n @if (data.input) {\n <mat-form-field appearance=\"outline\" class=\"acp-alert-input-field\">\n @if (data.inputLabel) {\n <mat-label>{{ data.inputLabel }}</mat-label>\n } @if (data.input === 'textarea') {\n <textarea\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n rows=\"4\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n >\n </textarea>\n } @else {\n <input\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n />\n } @if (validationError) {\n <mat-error>{{ validationError }}</mat-error>\n }\n </mat-form-field>\n }\n </mat-dialog-content>\n\n <!-- Actions -->\n @if (data.showConfirmButton !== false || data.showCancelButton || data.showDenyButton) {\n <mat-dialog-actions\n class=\"acp-alert-dialog-actions\"\n [class.reverse-buttons]=\"data.reverseButtons\"\n [class.vertical-buttons]=\"data.verticalButtons\"\n [align]=\"getActionsAlignment()\"\n >\n @if (data.showDenyButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('deny')\"\n [variant]=\"getButtonVariant('deny')\"\n [icon]=\"getButtonIcon('deny')\"\n (handleClick)=\"onDeny()\"\n [text]=\"getButtonText('deny')\"\n [disabled]=\"getButtonDisabled('deny')\"\n [class.spinning]=\"data.processing && data.processingButton === 'deny'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showCancelButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('cancel')\"\n [variant]=\"getButtonVariant('cancel')\"\n [icon]=\"getButtonIcon('cancel')\"\n (handleClick)=\"onCancel()\"\n [text]=\"getButtonText('cancel')\"\n [disabled]=\"getButtonDisabled('cancel')\"\n [class.spinning]=\"data.processing && data.processingButton === 'cancel'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showConfirmButton !== false) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('confirm')\"\n [variant]=\"getButtonVariant('confirm')\"\n [icon]=\"getButtonIcon('confirm')\"\n (handleClick)=\"onConfirm()\"\n [text]=\"getButtonText('confirm')\"\n [disabled]=\"getButtonDisabled('confirm')\"\n [class.spinning]=\"data.processing && data.processingButton === 'confirm'\"\n [class.full-width]=\"data.fullWidthButtons\"\n [autofocus]=\"getButtonFocus('confirm')\"\n />\n }\n </mat-dialog-actions>\n }\n\n <!-- Footer -->\n @if (data.footer || data.footerHtml) {\n <div class=\"acp-alert-dialog-footer\">\n @if (data.footerHtml) {\n <div [innerHTML]=\"sanitizedFooter\"></div>\n } @else { {{ data.footer }} }\n </div>\n }\n</div>\n", styles: [".acp-alert-dialog{position:relative;overflow:hidden;padding:0;display:flex;flex-direction:column;border-radius:16px}.acp-alert-header{display:flex;align-items:flex-start;justify-content:space-between;padding:24px 24px 0;position:relative}.acp-alert-header .acp-alert-dialog-icon{margin:4px 0 0;flex-shrink:0}.acp-alert-dialog-title{margin:0 0 12px;font-size:20px;font-weight:600;line-height:1.2;color:#1a1a1a;text-align:left}.acp-alert-dialog-content{text-align:left}.acp-alert-dialog-content .acp-alert-message{margin:0;font-size:16px;line-height:1.4;color:#666}.acp-alert-dialog-actions{margin:24px;padding:0;gap:12px}.acp-alert-dialog-actions.reverse-buttons{flex-direction:row-reverse}.acp-alert-dialog-actions.vertical-buttons{flex-direction:column;align-items:stretch}.acp-alert-dialog-actions.vertical-buttons.reverse-buttons{flex-direction:column-reverse}.close-button{position:relative;z-index:10;width:40px;height:40px;margin:0;background-color:#0000000d;border-radius:50%}.close-button mat-icon{font-size:20px;width:20px;height:20px;color:#0009}.close-button:hover{background-color:#0000001a}.acp-alert-dialog.modern-layout .acp-alert-header{padding:24px 24px 0}.acp-alert-dialog.modern-layout .acp-alert-header .acp-alert-dialog-icon{margin-right:16px}.acp-alert-dialog.modern-layout .acp-alert-header .acp-alert-dialog-icon .icon-large{font-size:48px;width:48px;height:48px}.acp-alert-dialog.icon-center .acp-alert-header{flex-direction:column;text-align:center;align-items:center;padding:24px 24px 16px}.acp-alert-dialog.icon-center .acp-alert-header .acp-alert-dialog-icon{margin:0 0 16px}.acp-alert-dialog.icon-center .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.acp-alert-dialog.icon-center .acp-alert-dialog-title,.acp-alert-dialog.icon-center .acp-alert-dialog-content{text-align:center}.acp-alert-dialog.icon-top .acp-alert-header{flex-direction:column;align-items:flex-start;padding:24px 24px 16px}.acp-alert-dialog.icon-top .acp-alert-header .acp-alert-dialog-icon{margin:0 0 16px}.acp-alert-dialog.icon-top .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.acp-alert-dialog.content-left .acp-alert-dialog-title,.acp-alert-dialog.content-left .acp-alert-dialog-content{text-align:left}.acp-alert-dialog.content-center .acp-alert-header{justify-content:center}.acp-alert-dialog.content-center .acp-alert-dialog-title,.acp-alert-dialog.content-center .acp-alert-dialog-content{text-align:center}.acp-alert-dialog.content-right .acp-alert-dialog-title,.acp-alert-dialog.content-right .acp-alert-dialog-content{text-align:right}.timer-progress{position:absolute;top:0;left:0;right:0;height:4px;z-index:5;border-radius:0}:host ::ng-deep .timer-progress .mdc-linear-progress__bar{transition:transform 50ms linear}:host ::ng-deep .timer-progress .mdc-linear-progress__buffer{background-color:#0000001a}.icon-success mat-icon{color:#10b981}.icon-error mat-icon{color:#ef4444}.icon-warning mat-icon{color:#f59e0b}.icon-info mat-icon{color:#3b82f6}.icon-question mat-icon{color:#8b5cf6}.icon-delete mat-icon{color:#ef4444}.acp-alert-dialog-image{margin:1rem auto;display:flex;justify-content:center;align-items:center}.acp-alert-dialog-image img{max-width:100%;border-radius:8px}.acp-alert-input-field{width:100%;margin-top:1rem}.acp-confirm-button,.acp-cancel-button,.acp-deny-button{min-width:100px}.acp-cancel-button{color:#333}.acp-alert-dialog-footer{margin:0 24px 24px;padding-top:1rem;border-top:1px solid #e0e0e0;font-size:.875rem;color:#666}.acp-alert-header[cdkDrag]{cursor:move;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.acp-alert-header[cdkDrag]:hover{background-color:#00000005}.cdk-drag-dragging{user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}:host ::ng-deep .animation-fade .mat-mdc-dialog-container{animation:fadeIn .3s ease-out}:host ::ng-deep .animation-slide .mat-mdc-dialog-container{animation:slideIn .3s ease-out}:host ::ng-deep .animation-bounce .mat-mdc-dialog-container{animation:bounceIn .5s ease-out}:host ::ng-deep .animation-zoom .mat-mdc-dialog-container{animation:zoomIn .3s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes bounceIn{0%{transform:scale(.3);opacity:0}50%{transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1);opacity:1}}@keyframes zoomIn{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i6.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: Button, selector: "acp-button", inputs: ["variant", "text", "icon", "disabled", "type", "matStyle", "customClass", "reportFormat", "extended", "title", "ariaLabel", "name", "id", "form", "tabIndex", "testId"], outputs: ["handleClick"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
6288
6221
|
}
|
|
6289
6222
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertDialog, decorators: [{
|
|
6290
6223
|
type: Component,
|
|
@@ -6299,7 +6232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
6299
6232
|
DragDropModule,
|
|
6300
6233
|
NgClass,
|
|
6301
6234
|
Button,
|
|
6302
|
-
], changeDetection: ChangeDetectionStrategy.Default, template: "<div\n class=\"alert-dialog\"\n [class.modern-layout]=\"data.layout === 'modern'\"\n [class.toast-layout]=\"data.layout === 'toast'\"\n [class.icon-left]=\"data.iconPosition === 'left'\"\n [class.icon-center]=\"data.iconPosition === 'center'\"\n [class.icon-top]=\"data.iconPosition === 'top'\"\n [class.content-left]=\"data.contentAlignment === 'left'\"\n [class.content-center]=\"data.contentAlignment === 'center'\"\n [class.content-right]=\"data.contentAlignment === 'right'\"\n [attr.aria-label]=\"data.ariaLabel\"\n [attr.aria-describedby]=\"data.ariaDescribedBy\"\n>\n <!-- Timer Progress Bar -->\n @if (data.timer && (data.timerProgressBar || data.progressBar || data.layout === 'toast')) {\n <mat-progress-bar\n mode=\"determinate\"\n [value]=\"timerProgress\"\n class=\"timer-progress\"\n [class.toast-progress]=\"data.layout === 'toast'\"\n >\n </mat-progress-bar>\n }\n\n <!-- Alert Header -->\n @if (data.draggable) {\n <div\n class=\"acp-alert-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n (mousedown)=\"bringToFront()\"\n >\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Toast Content (solo para modo toast) -->\n @if (data.layout === 'toast') {\n <!-- Title y Message en l\u00EDnea para toast -->\n <div class=\"toast-content\">\n @if (data.title) {\n <span class=\"toast-title\" #dialogTitle>{{ data.title }}</span>\n } @if (data.message) {\n <span class=\"toast-message\">{{ data.message }}</span>\n }\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n } @else {\n <div class=\"acp-alert-header\">\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Toast Content (solo para modo toast) -->\n @if (data.layout === 'toast') {\n <!-- Title y Message en l\u00EDnea para toast -->\n <div class=\"toast-content\">\n @if (data.title) {\n <span class=\"toast-title\" #dialogTitle>{{ data.title }}</span>\n } @if (data.message) {\n <span class=\"toast-message\">{{ data.message }}</span>\n }\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n }\n\n <!-- Content (solo para modo normal, no toast) -->\n @if (data.layout !== 'toast') {\n <mat-dialog-content class=\"alert-dialog-content\">\n <!-- Title -->\n @if (data.title) {\n <h2 class=\"alert-dialog-title\" #dialogTitle>{{ data.title }}</h2>\n }\n <!-- Image -->\n @if (data.imageUrl) {\n <div class=\"alert-dialog-image\">\n <img\n [src]=\"data.imageUrl\"\n [alt]=\"data.imageAlt || 'Alert image'\"\n [style.width]=\"data.imageWidth || 'auto'\"\n [style.height]=\"data.imageHeight || 'auto'\"\n [style.max-width]=\"data.imageWidth || '100%'\"\n />\n </div>\n }\n\n <!-- Dynamic Component -->\n @if (data.component) {\n <div #dynamicComponentContainer></div>\n } @if (data.html) {\n <div [innerHTML]=\"sanitizedHtml\"></div>\n } @else if (data.message) {\n <p class=\"alert-message\">{{ data.message }}</p>\n }\n\n <!-- Input Field -->\n @if (data.input) {\n <mat-form-field appearance=\"outline\" class=\"alert-input-field\">\n @if (data.inputLabel) {\n <mat-label>{{ data.inputLabel }}</mat-label>\n } @if (data.input === 'textarea') {\n <textarea\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n rows=\"4\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n >\n </textarea>\n } @else {\n <input\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n />\n } @if (validationError) {\n <mat-error>{{ validationError }}</mat-error>\n }\n </mat-form-field>\n }\n </mat-dialog-content>\n }\n\n <!-- Actions (solo para modo normal, no toast) -->\n @if (data.layout !== 'toast' && (data.showConfirmButton !== false || data.showCancelButton ||\n data.showDenyButton)) {\n <mat-dialog-actions\n class=\"alert-dialog-actions\"\n [class.reverse-buttons]=\"data.reverseButtons\"\n [class.vertical-buttons]=\"data.verticalButtons\"\n [align]=\"getActionsAlignment()\"\n >\n @if (data.showDenyButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('deny')\"\n [variant]=\"getButtonVariant('deny')\"\n [icon]=\"getButtonIcon('deny')\"\n (handleClick)=\"onDeny()\"\n [text]=\"data.denyText || 'No'\"\n [disabled]=\"data.disableDenyButton?? false\"\n [class.spinning]=\"data.processing && data.processingButton === 'deny'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showCancelButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('cancel')\"\n [variant]=\"getButtonVariant('cancel')\"\n [icon]=\"getButtonIcon('cancel')\"\n (handleClick)=\"onCancel()\"\n [text]=\"data.cancelText || 'Cancel'\"\n [disabled]=\"data.disableCancelButton??false\"\n [class.spinning]=\"data.processing && data.processingButton === 'cancel'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showConfirmButton !== false) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('confirm')\"\n [variant]=\"getButtonVariant('confirm')\"\n [icon]=\"getButtonIcon('confirm')\"\n (handleClick)=\"onConfirm()\"\n [text]=\"data.confirmText || 'OK'\"\n [disabled]=\"data.disableConfirmButton?? false\"\n [class.spinning]=\"data.processing && data.processingButton === 'confirm'\"\n [class.full-width]=\"data.fullWidthButtons\"\n [autofocus]=\"data.focusConfirm\"\n />\n }\n </mat-dialog-actions>\n }\n\n <!-- Footer -->\n @if (data.footer || data.footerHtml) {\n <div class=\"alert-dialog-footer\">\n @if (data.footerHtml) {\n <div [innerHTML]=\"sanitizedFooter\"></div>\n } @else { {{ data.footer }} }\n </div>\n }\n</div>\n", styles: [".alert-dialog{position:relative;overflow:hidden;padding:0;display:flex;flex-direction:column;border-radius:16px}.acp-alert-header{display:flex;align-items:flex-start;justify-content:space-between;padding:24px 24px 0;position:relative}.acp-alert-header .alert-dialog-icon{margin:4px 0 0;flex-shrink:0}.alert-dialog-title{margin:0 0 12px;font-size:20px;font-weight:600;line-height:1.2;color:#1a1a1a;text-align:left}.alert-dialog-content{text-align:left}.alert-dialog-content .alert-message{margin:0;font-size:16px;line-height:1.4;color:#666}.alert-dialog-actions{margin:24px;padding:0;gap:12px}.alert-dialog-actions.reverse-buttons{flex-direction:row-reverse}.alert-dialog-actions.vertical-buttons{flex-direction:column;align-items:stretch}.alert-dialog-actions.vertical-buttons.reverse-buttons{flex-direction:column-reverse}.close-button{position:relative;z-index:10;width:40px;height:40px;margin:0;background-color:#0000000d;border-radius:50%}.close-button mat-icon{font-size:20px;width:20px;height:20px;color:#0009}.close-button:hover{background-color:#0000001a}.alert-dialog.modern-layout .acp-alert-header{padding:24px 24px 0}.alert-dialog.modern-layout .acp-alert-header .alert-dialog-icon{margin-right:16px}.alert-dialog.modern-layout .acp-alert-header .alert-dialog-icon .icon-large{font-size:48px;width:48px;height:48px}.alert-dialog.toast-layout{border-radius:8px}.alert-dialog.toast-layout .acp-alert-header{padding:16px;align-items:center;gap:12px}.alert-dialog.toast-layout .acp-alert-header .alert-dialog-icon{margin:0;flex-shrink:0}.alert-dialog.toast-layout .acp-alert-header .alert-dialog-icon .icon-large{font-size:24px;width:24px;height:24px}.alert-dialog.toast-layout .acp-alert-header .toast-content{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}.alert-dialog.toast-layout .acp-alert-header .toast-content .toast-title{font-size:14px;font-weight:600;line-height:1.2;color:#1a1a1a;margin:0}.alert-dialog.toast-layout .acp-alert-header .toast-content .toast-message{font-size:13px;line-height:1.3;color:#666;margin:0}.alert-dialog.toast-layout .acp-alert-header .close-button{margin:0;flex-shrink:0}.alert-dialog.toast-layout .alert-dialog-content,.alert-dialog.toast-layout .alert-dialog-actions{display:none}.alert-dialog.icon-center .acp-alert-header{flex-direction:column;text-align:center;align-items:center;padding:24px 24px 16px}.alert-dialog.icon-center .acp-alert-header .alert-dialog-icon{margin:0 0 16px}.alert-dialog.icon-center .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.alert-dialog.icon-center .alert-dialog-title,.alert-dialog.icon-center .alert-dialog-content{text-align:center}.alert-dialog.icon-top .acp-alert-header{flex-direction:column;align-items:flex-start;padding:24px 24px 16px}.alert-dialog.icon-top .acp-alert-header .alert-dialog-icon{margin:0 0 16px}.alert-dialog.icon-top .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.alert-dialog.content-left .alert-dialog-title,.alert-dialog.content-left .alert-dialog-content{text-align:left}.alert-dialog.content-center .acp-alert-header{justify-content:center}.alert-dialog.content-center .alert-dialog-title,.alert-dialog.content-center .alert-dialog-content{text-align:center}.alert-dialog.content-right .alert-dialog-title,.alert-dialog.content-right .alert-dialog-content{text-align:right}.timer-progress{position:absolute;top:0;left:0;right:0;height:4px;z-index:5;border-radius:0}.timer-progress.toast-progress{height:3px;border-radius:0}:host ::ng-deep .timer-progress .mdc-linear-progress__bar{transition:transform 50ms linear}:host ::ng-deep .timer-progress .mdc-linear-progress__buffer{background-color:#0000001a}.icon-success mat-icon{color:#10b981}.icon-error mat-icon{color:#ef4444}.icon-warning mat-icon{color:#f59e0b}.icon-info mat-icon{color:#3b82f6}.icon-question mat-icon{color:#8b5cf6}.icon-delete mat-icon{color:#ef4444}.alert-dialog-image{margin:1rem auto;display:flex;justify-content:center;align-items:center}.alert-dialog-image img{max-width:100%;border-radius:8px}.alert-input-field{width:100%;margin-top:1rem}.confirm-button,.cancel-button,.deny-button{min-width:100px}.cancel-button{color:#333}.alert-dialog-footer{margin:0 24px 24px;padding-top:1rem;border-top:1px solid #e0e0e0;font-size:.875rem;color:#666}.acp-alert-header[cdkDrag]{cursor:move;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.acp-alert-header[cdkDrag]:hover{background-color:#00000005}.cdk-drag-dragging{user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}:host ::ng-deep .animation-fade .mat-mdc-dialog-container{animation:fadeIn .3s ease-out}:host ::ng-deep .animation-slide .mat-mdc-dialog-container{animation:slideIn .3s ease-out}:host ::ng-deep .animation-bounce .mat-mdc-dialog-container{animation:bounceIn .5s ease-out}:host ::ng-deep .animation-zoom .mat-mdc-dialog-container{animation:zoomIn .3s ease-out}:host ::ng-deep .toast-mode .mat-mdc-dialog-container{border-radius:8px;box-shadow:0 4px 12px #00000026;max-width:400px;animation:slideInRight .3s ease-out}:host ::ng-deep .layout-toast .mat-mdc-dialog-container{border-radius:8px;box-shadow:0 4px 12px #00000026;max-width:400px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slideInRight{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes bounceIn{0%{transform:scale(.3);opacity:0}50%{transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1);opacity:1}}@keyframes zoomIn{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}\n"] }]
|
|
6235
|
+
], changeDetection: ChangeDetectionStrategy.Default, template: "<div\n class=\"acp-alert-dialog\"\n [class.modern-layout]=\"data.layout === 'modern'\"\n [class.icon-left]=\"data.iconPosition === 'left'\"\n [class.icon-center]=\"data.iconPosition === 'center'\"\n [class.icon-top]=\"data.iconPosition === 'top'\"\n [class.content-left]=\"data.contentAlignment === 'left'\"\n [class.content-center]=\"data.contentAlignment === 'center'\"\n [class.content-right]=\"data.contentAlignment === 'right'\"\n [attr.aria-label]=\"data.ariaLabel\"\n [attr.aria-describedby]=\"data.ariaDescribedBy\"\n>\n <!-- Timer Progress Bar -->\n @if (data.timer && data.timerProgressBar) {\n <mat-progress-bar mode=\"determinate\" [value]=\"timerProgress\" class=\"timer-progress\">\n </mat-progress-bar>\n }\n\n <!-- Alert Header -->\n @if (data.draggable) {\n <div\n class=\"acp-alert-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n (mousedown)=\"bringToFront()\"\n >\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"acp-alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n } @else {\n <div class=\"acp-alert-header\">\n <!-- Icon -->\n @if (data.type || data.icon) {\n <div class=\"acp-alert-dialog-icon\" [ngClass]=\"'icon-' + (data.type || 'custom')\">\n <mat-icon class=\"icon-large\" [style.color]=\"data.iconColor\"> {{ getIconName() }} </mat-icon>\n </div>\n }\n\n <!-- Close Button -->\n @if (data.showCloseButton) {\n <button\n mat-icon-button\n class=\"close-button\"\n [class.top-right]=\"data.closeButtonPosition === 'top-right'\"\n [class.top-left]=\"data.closeButtonPosition === 'top-left'\"\n (click)=\"onClose()\"\n aria-label=\"Cerrar\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n }\n\n <!-- Content -->\n <mat-dialog-content class=\"acp-alert-dialog-content\">\n <!-- Title -->\n @if (data.title) {\n <h2 class=\"acp-alert-dialog-title\" #dialogTitle>{{ data.title }}</h2>\n }\n <!-- Image -->\n @if (data.imageUrl) {\n <div class=\"acp-alert-dialog-image\">\n <img\n [src]=\"data.imageUrl\"\n [alt]=\"data.imageAlt || 'Alert image'\"\n [style.width]=\"data.imageWidth || 'auto'\"\n [style.height]=\"data.imageHeight || 'auto'\"\n [style.max-width]=\"data.imageWidth || '100%'\"\n />\n </div>\n }\n\n <!-- Dynamic Component -->\n @if (data.component) {\n <div #dynamicComponentContainer></div>\n } @if (data.html) {\n <div [innerHTML]=\"sanitizedHtml\"></div>\n } @else if (data.message) {\n <p class=\"acp-alert-message\">{{ data.message }}</p>\n }\n\n <!-- Input Field -->\n @if (data.input) {\n <mat-form-field appearance=\"outline\" class=\"acp-alert-input-field\">\n @if (data.inputLabel) {\n <mat-label>{{ data.inputLabel }}</mat-label>\n } @if (data.input === 'textarea') {\n <textarea\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n rows=\"4\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n >\n </textarea>\n } @else {\n <input\n matInput\n #inputField\n [(ngModel)]=\"inputValue\"\n [placeholder]=\"data.inputPlaceholder || ''\"\n [type]=\"data.input\"\n (keyup.enter)=\"onInputEnter()\"\n [attr.aria-invalid]=\"!!validationError\"\n />\n } @if (validationError) {\n <mat-error>{{ validationError }}</mat-error>\n }\n </mat-form-field>\n }\n </mat-dialog-content>\n\n <!-- Actions -->\n @if (data.showConfirmButton !== false || data.showCancelButton || data.showDenyButton) {\n <mat-dialog-actions\n class=\"acp-alert-dialog-actions\"\n [class.reverse-buttons]=\"data.reverseButtons\"\n [class.vertical-buttons]=\"data.verticalButtons\"\n [align]=\"getActionsAlignment()\"\n >\n @if (data.showDenyButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('deny')\"\n [variant]=\"getButtonVariant('deny')\"\n [icon]=\"getButtonIcon('deny')\"\n (handleClick)=\"onDeny()\"\n [text]=\"getButtonText('deny')\"\n [disabled]=\"getButtonDisabled('deny')\"\n [class.spinning]=\"data.processing && data.processingButton === 'deny'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showCancelButton) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('cancel')\"\n [variant]=\"getButtonVariant('cancel')\"\n [icon]=\"getButtonIcon('cancel')\"\n (handleClick)=\"onCancel()\"\n [text]=\"getButtonText('cancel')\"\n [disabled]=\"getButtonDisabled('cancel')\"\n [class.spinning]=\"data.processing && data.processingButton === 'cancel'\"\n [class.full-width]=\"data.fullWidthButtons\"\n />\n } @if (data.showConfirmButton !== false) {\n <acp-button\n type=\"button\"\n [matStyle]=\"getButtonStyle('confirm')\"\n [variant]=\"getButtonVariant('confirm')\"\n [icon]=\"getButtonIcon('confirm')\"\n (handleClick)=\"onConfirm()\"\n [text]=\"getButtonText('confirm')\"\n [disabled]=\"getButtonDisabled('confirm')\"\n [class.spinning]=\"data.processing && data.processingButton === 'confirm'\"\n [class.full-width]=\"data.fullWidthButtons\"\n [autofocus]=\"getButtonFocus('confirm')\"\n />\n }\n </mat-dialog-actions>\n }\n\n <!-- Footer -->\n @if (data.footer || data.footerHtml) {\n <div class=\"acp-alert-dialog-footer\">\n @if (data.footerHtml) {\n <div [innerHTML]=\"sanitizedFooter\"></div>\n } @else { {{ data.footer }} }\n </div>\n }\n</div>\n", styles: [".acp-alert-dialog{position:relative;overflow:hidden;padding:0;display:flex;flex-direction:column;border-radius:16px}.acp-alert-header{display:flex;align-items:flex-start;justify-content:space-between;padding:24px 24px 0;position:relative}.acp-alert-header .acp-alert-dialog-icon{margin:4px 0 0;flex-shrink:0}.acp-alert-dialog-title{margin:0 0 12px;font-size:20px;font-weight:600;line-height:1.2;color:#1a1a1a;text-align:left}.acp-alert-dialog-content{text-align:left}.acp-alert-dialog-content .acp-alert-message{margin:0;font-size:16px;line-height:1.4;color:#666}.acp-alert-dialog-actions{margin:24px;padding:0;gap:12px}.acp-alert-dialog-actions.reverse-buttons{flex-direction:row-reverse}.acp-alert-dialog-actions.vertical-buttons{flex-direction:column;align-items:stretch}.acp-alert-dialog-actions.vertical-buttons.reverse-buttons{flex-direction:column-reverse}.close-button{position:relative;z-index:10;width:40px;height:40px;margin:0;background-color:#0000000d;border-radius:50%}.close-button mat-icon{font-size:20px;width:20px;height:20px;color:#0009}.close-button:hover{background-color:#0000001a}.acp-alert-dialog.modern-layout .acp-alert-header{padding:24px 24px 0}.acp-alert-dialog.modern-layout .acp-alert-header .acp-alert-dialog-icon{margin-right:16px}.acp-alert-dialog.modern-layout .acp-alert-header .acp-alert-dialog-icon .icon-large{font-size:48px;width:48px;height:48px}.acp-alert-dialog.icon-center .acp-alert-header{flex-direction:column;text-align:center;align-items:center;padding:24px 24px 16px}.acp-alert-dialog.icon-center .acp-alert-header .acp-alert-dialog-icon{margin:0 0 16px}.acp-alert-dialog.icon-center .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.acp-alert-dialog.icon-center .acp-alert-dialog-title,.acp-alert-dialog.icon-center .acp-alert-dialog-content{text-align:center}.acp-alert-dialog.icon-top .acp-alert-header{flex-direction:column;align-items:flex-start;padding:24px 24px 16px}.acp-alert-dialog.icon-top .acp-alert-header .acp-alert-dialog-icon{margin:0 0 16px}.acp-alert-dialog.icon-top .acp-alert-header .close-button{position:absolute;top:16px;right:16px}.acp-alert-dialog.content-left .acp-alert-dialog-title,.acp-alert-dialog.content-left .acp-alert-dialog-content{text-align:left}.acp-alert-dialog.content-center .acp-alert-header{justify-content:center}.acp-alert-dialog.content-center .acp-alert-dialog-title,.acp-alert-dialog.content-center .acp-alert-dialog-content{text-align:center}.acp-alert-dialog.content-right .acp-alert-dialog-title,.acp-alert-dialog.content-right .acp-alert-dialog-content{text-align:right}.timer-progress{position:absolute;top:0;left:0;right:0;height:4px;z-index:5;border-radius:0}:host ::ng-deep .timer-progress .mdc-linear-progress__bar{transition:transform 50ms linear}:host ::ng-deep .timer-progress .mdc-linear-progress__buffer{background-color:#0000001a}.icon-success mat-icon{color:#10b981}.icon-error mat-icon{color:#ef4444}.icon-warning mat-icon{color:#f59e0b}.icon-info mat-icon{color:#3b82f6}.icon-question mat-icon{color:#8b5cf6}.icon-delete mat-icon{color:#ef4444}.acp-alert-dialog-image{margin:1rem auto;display:flex;justify-content:center;align-items:center}.acp-alert-dialog-image img{max-width:100%;border-radius:8px}.acp-alert-input-field{width:100%;margin-top:1rem}.acp-confirm-button,.acp-cancel-button,.acp-deny-button{min-width:100px}.acp-cancel-button{color:#333}.acp-alert-dialog-footer{margin:0 24px 24px;padding-top:1rem;border-top:1px solid #e0e0e0;font-size:.875rem;color:#666}.acp-alert-header[cdkDrag]{cursor:move;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.acp-alert-header[cdkDrag]:hover{background-color:#00000005}.cdk-drag-dragging{user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}:host ::ng-deep .animation-fade .mat-mdc-dialog-container{animation:fadeIn .3s ease-out}:host ::ng-deep .animation-slide .mat-mdc-dialog-container{animation:slideIn .3s ease-out}:host ::ng-deep .animation-bounce .mat-mdc-dialog-container{animation:bounceIn .5s ease-out}:host ::ng-deep .animation-zoom .mat-mdc-dialog-container{animation:zoomIn .3s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes bounceIn{0%{transform:scale(.3);opacity:0}50%{transform:scale(1.05)}70%{transform:scale(.9)}to{transform:scale(1);opacity:1}}@keyframes zoomIn{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}\n"] }]
|
|
6303
6236
|
}], ctorParameters: () => [], propDecorators: { inputField: [{
|
|
6304
6237
|
type: ViewChild,
|
|
6305
6238
|
args: ['inputField']
|