ln-20-lib-components 0.0.40 → 0.0.41

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.
@@ -0,0 +1,3554 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, model, input, computed, output, forwardRef, ChangeDetectionStrategy, effect, signal, ContentChildren, inject, ViewChild, Pipe, viewChild, ContentChild } from '@angular/core';
3
+ import { toObservable, takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
4
+ import * as i1 from '@angular/forms';
5
+ import { ReactiveFormsModule, NG_VALUE_ACCESSOR, FormsModule, NonNullableFormBuilder, FormGroup } from '@angular/forms';
6
+ import { switchMap, debounceTime, filter, map, distinctUntilChanged, Subject } from 'rxjs';
7
+ import * as i1$1 from '@angular/common';
8
+ import { NgClass, CommonModule } from '@angular/common';
9
+ import { CheckboxModule } from 'primeng/checkbox';
10
+ import * as i2 from 'primeng/datepicker';
11
+ import { DatePickerModule } from 'primeng/datepicker';
12
+ import { IftaLabelModule } from 'primeng/iftalabel';
13
+ import * as i6 from 'primeng/inputotp';
14
+ import { InputOtpModule } from 'primeng/inputotp';
15
+ import * as i3 from 'primeng/multiselect';
16
+ import { MultiSelectModule } from 'primeng/multiselect';
17
+ import * as i4 from 'primeng/select';
18
+ import { SelectModule } from 'primeng/select';
19
+ import * as i5 from 'primeng/togglebutton';
20
+ import { ToggleButtonModule } from 'primeng/togglebutton';
21
+ import * as i7 from 'primeng/toggleswitch';
22
+ import { ToggleSwitchModule } from 'primeng/toggleswitch';
23
+ import * as i10 from 'primeng/tooltip';
24
+ import { TooltipModule } from 'primeng/tooltip';
25
+ import * as i8 from 'primeng/inputnumber';
26
+ import { InputNumberModule } from 'primeng/inputnumber';
27
+ import * as i9 from 'primeng/textarea';
28
+ import { TextareaModule } from 'primeng/textarea';
29
+ import * as i2$1 from 'primeng/inputtext';
30
+ import { InputTextModule } from 'primeng/inputtext';
31
+ import { InputMaskModule } from 'primeng/inputmask';
32
+ import * as i9$1 from 'primeng/knob';
33
+ import { KnobModule } from 'primeng/knob';
34
+ import * as i11 from 'primeng/chip';
35
+ import { ChipModule } from 'primeng/chip';
36
+ import * as i4$1 from 'primeng/api';
37
+ import { PrimeTemplate, FilterService } from 'primeng/api';
38
+ import * as i1$2 from 'primeng/button';
39
+ import { ButtonModule } from 'primeng/button';
40
+ import jsPDF from 'jspdf';
41
+ import autoTable from 'jspdf-autotable';
42
+ import * as i2$2 from 'primeng/table';
43
+ import { TableModule } from 'primeng/table';
44
+ import * as XLSX from 'xlsx';
45
+ import * as i1$3 from 'primeng/badge';
46
+ import { BadgeModule } from 'primeng/badge';
47
+ import * as i1$4 from 'primeng/toolbar';
48
+ import { ToolbarModule } from 'primeng/toolbar';
49
+ import { DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
50
+ import * as i1$5 from 'primeng/speeddial';
51
+ import { SpeedDialModule } from 'primeng/speeddial';
52
+
53
+ class LibComponentsService {
54
+ constructor() { }
55
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LibComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
56
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LibComponentsService, providedIn: 'root' });
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LibComponentsService, decorators: [{
59
+ type: Injectable,
60
+ args: [{
61
+ providedIn: 'root'
62
+ }]
63
+ }], ctorParameters: () => [] });
64
+
65
+ class LibComponentsComponent {
66
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LibComponentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
67
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: LibComponentsComponent, isStandalone: true, selector: "lib-lib-components", ngImport: i0, template: `
68
+ <p>
69
+ lib-components works!
70
+ </p>
71
+ `, isInline: true, styles: [""] });
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LibComponentsComponent, decorators: [{
74
+ type: Component,
75
+ args: [{ selector: 'lib-lib-components', imports: [], template: `
76
+ <p>
77
+ lib-components works!
78
+ </p>
79
+ ` }]
80
+ }] });
81
+
82
+ var ETypeInput;
83
+ (function (ETypeInput) {
84
+ ETypeInput["TEXT"] = "text";
85
+ ETypeInput["PASSWORD"] = "password";
86
+ ETypeInput["EMAIL"] = "email";
87
+ ETypeInput["EMAIL_PASSWORD"] = "email-password";
88
+ ETypeInput["NUMBER"] = "number";
89
+ ETypeInput["DATE"] = "date";
90
+ ETypeInput["TIME"] = "time";
91
+ ETypeInput["DATETIME_LOCAL"] = "datetime-local";
92
+ ETypeInput["SEARCH"] = "search";
93
+ ETypeInput["TEL"] = "tel";
94
+ ETypeInput["URL"] = "url";
95
+ ETypeInput["COLOR"] = "color";
96
+ ETypeInput["MONTH"] = "month";
97
+ ETypeInput["WEEK"] = "week";
98
+ ETypeInput["FILE"] = "file";
99
+ ETypeInput["CHECKBOX"] = "checkbox";
100
+ ETypeInput["RADIO"] = "radio";
101
+ ETypeInput["RANGE"] = "range";
102
+ ETypeInput["HIDDEN"] = "hidden";
103
+ ETypeInput["TEXTAREA"] = "textarea";
104
+ ETypeInput["SELECT"] = "select";
105
+ ETypeInput["MULTISELECT"] = "multiselect";
106
+ ETypeInput["AUTOCOMPLETE"] = "autocomplete";
107
+ ETypeInput["SWITCH"] = "switch";
108
+ ETypeInput["CALENDAR"] = "calendar";
109
+ ETypeInput["DROPDOWN"] = "dropdown";
110
+ ETypeInput["CHIPS"] = "chips";
111
+ ETypeInput["TOGGLE"] = "toggle";
112
+ ETypeInput["OTP"] = "otp";
113
+ ETypeInput["CURRENCY"] = "currency";
114
+ ETypeInput["KNOB"] = "knob";
115
+ ETypeInput["BADGE"] = "badge";
116
+ ETypeInput["DECIMAL"] = "decimal";
117
+ ETypeInput["IMAGE"] = "image";
118
+ ETypeInput["COMPONENT"] = "component";
119
+ })(ETypeInput || (ETypeInput = {}));
120
+
121
+ class DisabledContainerComponent {
122
+ disabled = model(false);
123
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DisabledContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
124
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: DisabledContainerComponent, isStandalone: true, selector: "lib-disabled-container", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange" }, ngImport: i0, template: "<fieldset [disabled]=\"disabled()\" class=\"disabled-container\">\r\n <ng-content></ng-content>\r\n</fieldset>\r\n", styles: [".disabled-container{border:none;margin:0;padding:0;min-width:0}.disabled-container:disabled{opacity:.6;cursor:not-allowed}.disabled-container:disabled *{pointer-events:none}\n"] });
125
+ }
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: DisabledContainerComponent, decorators: [{
127
+ type: Component,
128
+ args: [{ selector: 'lib-disabled-container', imports: [], template: "<fieldset [disabled]=\"disabled()\" class=\"disabled-container\">\r\n <ng-content></ng-content>\r\n</fieldset>\r\n", styles: [".disabled-container{border:none;margin:0;padding:0;min-width:0}.disabled-container:disabled{opacity:.6;cursor:not-allowed}.disabled-container:disabled *{pointer-events:none}\n"] }]
129
+ }] });
130
+
131
+ class CustomInputComponent {
132
+ controlData = input.required();
133
+ controlUpperName = computed(() => this.controlData().controlName.toLocaleUpperCase());
134
+ showPassword = false;
135
+ output = output();
136
+ onChange = (_value) => { };
137
+ constructor() { }
138
+ control = computed(() => this.controlData().control);
139
+ controlValue = computed(() => this.control().value);
140
+ hasControlValue = computed(() => this.controlValue() !== null && this.controlValue() !== undefined);
141
+ writeValue(value) {
142
+ if (value !== this.controlData().control.value) {
143
+ this.controlData().control.setValue(value, { emitEvent: false });
144
+ }
145
+ }
146
+ get showLabel() {
147
+ return !this.controlData().hideLabel;
148
+ }
149
+ get inputTypesEnum() {
150
+ return ETypeInput;
151
+ }
152
+ onCheckboxChange(event, control) {
153
+ const input = event.target;
154
+ const isChecked = input.checked;
155
+ control.setValue(isChecked);
156
+ }
157
+ registerOnChange(fn) {
158
+ this.onChange = fn;
159
+ }
160
+ onBlur() {
161
+ this.controlData().onBlur?.();
162
+ }
163
+ onFocus() {
164
+ this.controlData().onFocus?.();
165
+ }
166
+ onTouched = () => { };
167
+ registerOnTouched(fn) {
168
+ this.onTouched = fn;
169
+ }
170
+ generateUniqueId(baseString) {
171
+ const timestamp = new Date().getTime();
172
+ const random = Math.random().toString(36).substring(2, 8);
173
+ return `${baseString}-${timestamp}-${random}`;
174
+ }
175
+ togglePasswordVisibility() {
176
+ this.showPassword = !this.showPassword;
177
+ }
178
+ onSelectChange() {
179
+ this.output.emit(this.controlData());
180
+ }
181
+ /**
182
+ * Sincroniza el valor del input visible con el input oculto de password
183
+ * para mantener ambos actualizados
184
+ */
185
+ syncPasswordAutofill(event) {
186
+ const visibleInput = event.target;
187
+ const currentComponent = visibleInput.closest('lib-custom-input');
188
+ if (!currentComponent)
189
+ return;
190
+ const hiddenInput = currentComponent.querySelector('input[type="password"][id^="password-autofill-hidden-"]');
191
+ if (hiddenInput && hiddenInput.value !== visibleInput.value) {
192
+ hiddenInput.value = visibleInput.value;
193
+ }
194
+ }
195
+ /**
196
+ * Maneja el autocompletado cuando el navegador llena el input oculto de password.
197
+ * Actualiza el input visible y el FormControl.
198
+ */
199
+ onPasswordAutofillHidden(event) {
200
+ const hiddenInput = event.target;
201
+ const passwordValue = hiddenInput.value;
202
+ if (!passwordValue)
203
+ return;
204
+ // Buscar el input visible de password en el mismo componente
205
+ const currentComponent = hiddenInput.closest('lib-custom-input');
206
+ if (!currentComponent)
207
+ return;
208
+ const visibleInput = currentComponent.querySelector('input[type="password"]:not([id^="password-autofill-hidden-"]), input[type="text"][class*="custom-password"]');
209
+ if (visibleInput && visibleInput.value !== passwordValue) {
210
+ // Actualizar el input visible
211
+ visibleInput.value = passwordValue;
212
+ // Actualizar el FormControl
213
+ this.controlData().control.setValue(passwordValue, { emitEvent: true });
214
+ // Disparar eventos para que Angular Forms lo detecte
215
+ visibleInput.dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));
216
+ visibleInput.dispatchEvent(new Event('change', { bubbles: true, cancelable: true }));
217
+ }
218
+ }
219
+ /**
220
+ * Maneja el autocompletado del password cuando el navegador llena automáticamente
221
+ * el campo de password oculto en EMAIL_PASSWORD. Busca el siguiente campo de password
222
+ * en el formulario y actualiza su FormControl directamente.
223
+ */
224
+ onPasswordAutofill(event) {
225
+ const passwordInput = event.target;
226
+ const passwordValue = passwordInput.value;
227
+ if (!passwordValue)
228
+ return;
229
+ // Buscar el formulario padre
230
+ let parent = passwordInput.parentElement;
231
+ let formElement = null;
232
+ for (let i = 0; i < 6 && parent; i++) {
233
+ if (parent.tagName === 'FORM') {
234
+ formElement = parent;
235
+ break;
236
+ }
237
+ parent = parent.parentElement;
238
+ }
239
+ if (!formElement)
240
+ return;
241
+ // Buscar el componente lib-custom-input actual (EMAIL_PASSWORD)
242
+ const currentComponent = passwordInput.closest('lib-custom-input');
243
+ if (!currentComponent)
244
+ return;
245
+ // Buscar todos los componentes lib-custom-input en el formulario
246
+ const allCustomInputs = formElement.querySelectorAll('lib-custom-input');
247
+ const currentIndex = Array.from(allCustomInputs).indexOf(currentComponent);
248
+ // Buscar el siguiente componente después del actual que tenga un campo de password
249
+ for (let i = currentIndex + 1; i < allCustomInputs.length; i++) {
250
+ const nextComponent = allCustomInputs[i];
251
+ // Buscar el input de password dentro del componente siguiente
252
+ const passwordField = nextComponent.querySelector('input[type="password"]:not([id="password-autofill-helper"])');
253
+ if (passwordField) {
254
+ // Actualizar el valor directamente en el input
255
+ // y disparar eventos para que Angular Forms lo detecte
256
+ passwordField.value = passwordValue;
257
+ passwordField.dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));
258
+ passwordField.dispatchEvent(new Event('change', { bubbles: true, cancelable: true }));
259
+ // Forzar la actualización después de un breve delay
260
+ // para asegurar que Angular Forms procese el cambio
261
+ setTimeout(() => {
262
+ if (passwordField.value !== passwordValue) {
263
+ passwordField.value = passwordValue;
264
+ passwordField.dispatchEvent(new Event('input', { bubbles: true }));
265
+ }
266
+ }, 50);
267
+ break;
268
+ }
269
+ }
270
+ }
271
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
272
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: CustomInputComponent, isStandalone: true, selector: "lib-custom-input", inputs: { controlData: { classPropertyName: "controlData", publicName: "controlData", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { output: "output" }, providers: [{
273
+ provide: NG_VALUE_ACCESSOR,
274
+ useExisting: forwardRef(() => CustomInputComponent),
275
+ multi: true
276
+ }], ngImport: i0, template: "@let localControl = controlData().control;\r\n@let placeholder = controlData().label || controlUpperName();\r\n@let name = controlData().controlName;\r\n@let typeInput = controlData().typeInput;\r\n@let readonly = controlData().readonly || false;\r\n@let dateConfig = controlData().dateConfig;\r\n@let multiSelectConfig = controlData().multiSelectConfig;\r\n@let selectConfig = controlData().selectConfig;\r\n@let toggleConfig = controlData().toggleConfig;\r\n@let textareaConfig = controlData().textareaConfig;\r\n@let currencyConfig = controlData().currencyConfig;\r\n@let decimalConfig = controlData().decimalConfig;\r\n@let autoFocus = controlData().autoFocus ?? false;\r\n<div class=\"flex flex-col gap-1 \">\r\n <lib-disabled-container [disabled]=\"readonly\">\r\n\r\n <p style=\"font-size: 12px; letter-spacing: 0.5px;\" class=\"text-sm text-gray-600 dark:text-gray-300 truncate\"\r\n [pTooltip]=\"placeholder\" tooltipPosition=\"top\" [showDelay]=\"300\">\r\n {{ placeholder }}\r\n </p>\r\n @switch (typeInput) {\r\n @case (inputTypesEnum.EMAIL_PASSWORD) {\r\n <input [formControl]=\"localControl\" (blur)=\"onTouched()\" pInputText [id]=\"generateUniqueId(name)\" [name]=\"name\"\r\n type=\"email\" [readOnly]=\"readonly\" autocomplete=\"email\" autocorrect=\"on\" autocapitalize=\"on\"\r\n spellcheck=\"true\" [ngClass]=\"{\r\n 'border-red-500 focus:ring-red-500':\r\n localControl.invalid &&\r\n (localControl.dirty || localControl.touched),\r\n 'bg-gray-100 cursor-not-allowed': readonly,\r\n }\"\r\n class=\"custom-input h-12 w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\" />\r\n <input type=\"password\" name=\"password\" id=\"password-autofill-helper\" autocomplete=\"current-password\" tabindex=\"-1\"\r\n style=\"position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0;\"\r\n aria-hidden=\"true\"\r\n (input)=\"onPasswordAutofill($event)\" />\r\n }\r\n @case (inputTypesEnum.PASSWORD) {\r\n <!-- Input oculto siempre de tipo password para el autocompletado del navegador -->\r\n <input \r\n type=\"password\" \r\n name=\"password-autofill\"\r\n [id]=\"'password-autofill-hidden-' + generateUniqueId(name)\"\r\n autocomplete=\"current-password\" \r\n tabindex=\"-1\"\r\n style=\"position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0;\"\r\n aria-hidden=\"true\"\r\n [value]=\"localControl.value || ''\"\r\n (input)=\"onPasswordAutofillHidden($event)\" />\r\n <div class=\"relative\">\r\n <input [readOnly]=\"readonly || false\" [id]=\"generateUniqueId(name)\" [type]=\"showPassword ? 'text' : 'password'\"\r\n autocomplete=\"password\" autocorrect=\"on\" autocapitalize=\"on\" spellcheck=\"true\"\r\n class=\"custom-password w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 transition-all duration-200\"\r\n aria-describedby=\"password-help\" [formControl]=\"localControl\" \r\n (input)=\"syncPasswordAutofill($event)\" />\r\n <button type=\"button\"\r\n class=\"custom-password-toggle absolute inset-y-0 right-0 flex items-center justify-center w-12 h-full text-gray-400 transition-colors duration-200 ease-in-out hover:text-gray-600 focus:outline-none focus:text-gray-600 active:text-gray-700 dark:text-gray-500 dark:hover:text-gray-300 dark:focus:text-gray-300\"\r\n (click)=\"togglePasswordVisibility()\" [attr.aria-label]=\"\r\n showPassword ? 'Ocultar contrase\u00F1a' : 'Mostrar contrase\u00F1a'\r\n \">\r\n <i class=\"fas text-lg transition-all duration-200 ease-in-out\" [ngClass]=\"{\r\n 'fa-solid fa-eye': !showPassword,\r\n 'fa-solid fa-eye-slash': showPassword,\r\n }\"></i>\r\n </button>\r\n </div>\r\n }\r\n @case (inputTypesEnum.EMAIL) {\r\n <input [formControl]=\"localControl\" (blur)=\"onTouched()\" pInputText [id]=\"generateUniqueId(name)\" [name]=\"name\"\r\n [type]=\"typeInput\" [readOnly]=\"readonly\" autocomplete=\"email\" autocorrect=\"on\" autocapitalize=\"on\" spellcheck=\"true\"\r\n [ngClass]=\"{\r\n 'border-red-500 focus:ring-red-500':\r\n localControl.invalid &&\r\n (localControl.dirty || localControl.touched),\r\n 'bg-gray-100 cursor-not-allowed': readonly,\r\n }\"\r\n class=\"custom-input h-12 w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\" />\r\n }\r\n @case (inputTypesEnum.CURRENCY) {\r\n <p-inputnumber [autofocus]=\"autoFocus ?? false\" [formControl]=\"localControl\" (onFocus)=\"onFocus()\" (onBlur)=\"onBlur()\" (blur)=\"onTouched()\" [id]=\"generateUniqueId(name)\" mode=\"currency\"\r\n [currency]=\"currencyConfig?.currency ?? 'USD'\" [locale]=\"currencyConfig?.locale ?? 'es-CO'\" [minFractionDigits]=\"currencyConfig?.minFractionDigits ?? 2\"\r\n [maxFractionDigits]=\"currencyConfig?.maxFractionDigits ?? 2\" [readonly]=\"readonly\" [disabled]=\"readonly\" />\r\n }\r\n @case (inputTypesEnum.DATE) {\r\n <lib-disabled-container [disabled]=\"readonly\">\r\n <p-datepicker [formControl]=\"localControl\" [selectionMode]=\"dateConfig?.selectionMode || 'single'\"\r\n [maxDate]=\"dateConfig?.maxDate || null\" [minDate]=\"dateConfig?.minDate || null\" class=\"custom-datepicker\"\r\n appendTo=\"body\" />\r\n </lib-disabled-container>\r\n }\r\n @case (inputTypesEnum.TOGGLE) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <p-togglebutton [formControl]=\"localControl\" [onLabel]=\"toggleConfig?.onLabel || 'Si'\"\r\n [offLabel]=\"toggleConfig?.offLabel || 'No'\" class=\"custom-toggle\" />\r\n </div>\r\n }\r\n @case (inputTypesEnum.MULTISELECT) {\r\n <p-multiselect [filter]=\"true\" [options]=\"multiSelectConfig?.options\" [formControl]=\"localControl\"\r\n [optionLabel]=\"multiSelectConfig?.optionLabel ?? 'name'\" placeholder=\"\" [maxSelectedLabels]=\"3\"\r\n class=\"custom-multiselect\" appendTo=\"body\" />\r\n }\r\n @case (inputTypesEnum.SELECT) {\r\n <p-select [filter]=\"true\" [options]=\"selectConfig?.options\" [formControl]=\"localControl\"\r\n [optionLabel]=\"selectConfig?.optionLabel ?? 'name'\" placeholder=\"\" class=\"custom-select\"\r\n (onChange)=\"onSelectChange()\" appendTo=\"body\" [disabled]=\"readonly\" [readonly]=\"readonly\" [styleClass]=\"\r\n (localControl.invalid && (localControl.dirty || localControl.touched) ? 'border-red-500 focus:ring-red-500 ' : '') +\r\n (readonly ? 'bg-gray-100 cursor-not-allowed' : '')\r\n \" />\r\n }\r\n \r\n @case (inputTypesEnum.CHECKBOX) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <input [id]=\"generateUniqueId(name)\" [readOnly]=\"readonly\" [type]=\"typeInput\" [checked]=\"localControl.value\"\r\n (change)=\"onCheckboxChange($event, localControl)\"\r\n class=\"custom-checkbox h-5 w-5 border-2 border-gray-300 dark:border-transparent rounded focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 transition-all duration-200\"\r\n [formControl]=\"localControl\" />\r\n </div>\r\n }\r\n @case (inputTypesEnum.OTP) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <p-inputotp [id]=\"generateUniqueId(name)\" (onBlur)=\"onTouched()\" [mask]=\"controlData().otpConfig?.mask ?? false\"\r\n [length]=\"controlData().otpConfig?.length ?? 6\" [integerOnly]=\"controlData().otpConfig?.integerOnly ?? false\"\r\n class=\"custom-otp border-2 border-gray-300 dark:border-transparent rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 transition-all duration-200\"\r\n [formControl]=\"localControl\" />\r\n </div>\r\n }\r\n @case (inputTypesEnum.SWITCH) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <p-toggleswitch [id]=\"generateUniqueId(name)\" [formControl]=\"localControl\"\r\n class=\"custom-switch border-2 border-gray-300 dark:border-transparent rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 transition-all duration-200\"\r\n (change)=\"onCheckboxChange($event, localControl)\">\r\n <ng-template #handle let-checked=\"checked\">\r\n <span class=\"text-xs bg-gray-100 dark:bg-gray-600 text-gray-800 dark:text-gray-200 rounded-full px-1\">\r\n @if (checked) {\r\n Si\r\n }\r\n @else {\r\n No\r\n }\r\n </span>\r\n </ng-template>\r\n </p-toggleswitch>\r\n </div>\r\n }\r\n @case (inputTypesEnum.DECIMAL) {\r\n <p-inputnumber [autofocus]=\"autoFocus ?? false\" [formControl]=\"localControl\" (onBlur)=\"onBlur()\" (blur)=\"onTouched()\" [id]=\"generateUniqueId(name)\" mode=\"decimal\"\r\n (onFocus)=\"onFocus()\"\r\n [locale]=\"'es-CO'\" [minFractionDigits]=\"decimalConfig?.minFractionDigits ?? 2\" [maxFractionDigits]=\"decimalConfig?.maxFractionDigits ?? 2\" [useGrouping]=\"decimalConfig?.useGrouping ?? true\" [readonly]=\"readonly\" [disabled]=\"readonly\" />\r\n }\r\n @case (inputTypesEnum.TEXTAREA) {\r\n <textarea pTextarea [formControl]=\"localControl\" [rows]=\"textareaConfig?.rows ?? 3\"\r\n [cols]=\"textareaConfig?.cols ?? 30\" [autoResize]=\"true\" [variant]=\"textareaConfig?.variant ?? 'outlined'\"\r\n (blur)=\"onTouched()\" [id]=\"generateUniqueId(name)\" [readonly]=\"readonly\" autocomplete=\"off\" autocorrect=\"off\"\r\n autocapitalize=\"off\" spellcheck=\"false\"\r\n class=\"custom-textarea w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\"></textarea>\r\n }\r\n @default {\r\n <input [formControl]=\"localControl\" (blur)=\"onTouched()\" pInputText [id]=\"generateUniqueId(name)\" [type]=\"typeInput\"\r\n [readOnly]=\"readonly\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" [ngClass]=\"{\r\n 'border-red-500 focus:ring-red-500':\r\n localControl.invalid &&\r\n (localControl.dirty || localControl.touched),\r\n 'bg-gray-100 cursor-not-allowed': readonly,\r\n }\"\r\n class=\"custom-input h-12 w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\" />\r\n }\r\n }\r\n </lib-disabled-container>\r\n\r\n</div>\r\n\r\n@if (localControl.invalid && !hasControlValue()) {\r\n<div class=\"custom-error mt-1 text-sm text-red-600 dark:text-red-400\">\r\n @if (localControl.errors?.[\"required\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El campo es requerido' }}</span>\r\n }\r\n @if (localControl.errors?.[\"min\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{ 'El valor m\u00EDnimo es de ' +\r\n localControl.errors?.[\"min\"].min.toFixed(2) }}</span>\r\n }\r\n @if (localControl.errors?.[\"max\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{ 'El valor m\u00E1ximo es de ' +\r\n localControl.errors?.[\"max\"].max.toFixed(2) }}</span>\r\n }\r\n @if (localControl.errors?.[\"minlength\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El largo m\u00EDnimo es de ' + localControl.errors?.[\"minlength\"].requiredLength\r\n }}</span>\r\n }\r\n @if (localControl.errors?.[\"maxlength\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El largo m\u00E1ximo es de ' + localControl.errors?.[\"maxlength\"].requiredLength\r\n }}</span>\r\n }\r\n @if (localControl.errors?.[\"email\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El correo electr\u00F3nico no es v\u00E1lido' }}</span>\r\n }\r\n @if (localControl.errors?.[\"pattern\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El formato no es v\u00E1lido' }}</span>\r\n }\r\n</div>\r\n}", styles: ["@charset \"UTF-8\";:host ::ng-deep p-datepicker>span>.p-inputtext{width:100%;border-radius:.5rem;outline:none;background-color:#f9fafb;height:44px;padding-right:2.5rem;color:#111827;transition:all .2s ease-in-out}:host ::ng-deep p-datepicker>.p-datepicker>.p-inputtext{background:transparent;color:#111827;height:44px;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-datepicker>.p-datepicker>.p-inputtext{background:transparent;background-color:#374151;color:#f3f4f6}:host ::ng-deep p-datepicker>span{width:100%;position:relative;display:inline-flex}:host ::ng-deep p-datepicker .p-datepicker-trigger{position:absolute!important;right:0!important;top:0!important;height:44px!important;width:2.5rem!important;background:transparent!important;border:none!important;box-shadow:none!important;color:#6b7280!important;display:flex!important;align-items:center!important;justify-content:center!important;z-index:1!important}:host ::ng-deep .my-app-dark p-datepicker .p-datepicker-trigger{color:#9ca3af!important}:host ::ng-deep p-datepicker .p-datepicker-trigger .p-button-icon{font-size:.875rem}:host ::ng-deep p-multiselect{border:1px solid #d1d5db;background:transparent;color:#111827;height:44px;width:100%;border-radius:.5rem;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-multiselect{background:transparent;color:#f3f4f6}:host ::ng-deep p-select{background:transparent;color:#111827;height:44px;width:100%;border-radius:.5rem;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-select{background:transparent;color:#f3f4f6}:host ::ng-deep p-select>.p-select-label{font-size:small;position:relative}:host ::ng-deep p-inputnumber{background:transparent;color:#111827;height:44px;width:100%;border:1px solid #d1d5db;border-radius:.5rem;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-inputnumber{background:transparent;color:#f3f4f6}:host-context(.my-app-dark) ::ng-deep .custom-datepicker>.p-inputwrapper>.p-inputtext{color:#f3f4f6;background-color:#374151}:host-context(.my-app-dark) ::ng-deep p-datepicker>span>.p-inputtext{background-color:#374151;color:#f3f4f6}:host-context(.my-app-dark) ::ng-deep .p-inputtext{background-color:#374151;color:#f3f4f6;border-color:transparent}:host-context(.my-app-dark) ::ng-deep .p-inputnumber-input{background-color:#374151;color:#f3f4f6;border-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: IftaLabelModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i3.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i4.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: ToggleButtonModule }, { kind: "component", type: i5.ToggleButton, selector: "p-toggleButton, p-togglebutton, p-toggle-button", inputs: ["onLabel", "offLabel", "onIcon", "offIcon", "ariaLabel", "ariaLabelledBy", "disabled", "style", "styleClass", "inputId", "tabindex", "size", "iconPos", "autofocus", "allowEmpty"], outputs: ["onChange"] }, { kind: "ngmodule", type: InputOtpModule }, { kind: "component", type: i6.InputOtp, selector: "p-inputOtp, p-inputotp, p-input-otp", inputs: ["invalid", "disabled", "readonly", "variant", "tabindex", "length", "styleClass", "mask", "integerOnly", "autofocus", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i7.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i8.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled", "fluid"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i9.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "variant", "fluid", "pSize"], outputs: ["onResize"] }, { kind: "component", type: DisabledContainerComponent, selector: "lib-disabled-container", inputs: ["disabled"], outputs: ["disabledChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i10.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
277
+ }
278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomInputComponent, decorators: [{
279
+ type: Component,
280
+ args: [{ selector: 'lib-custom-input', imports: [
281
+ ReactiveFormsModule,
282
+ IftaLabelModule,
283
+ NgClass,
284
+ DatePickerModule,
285
+ CheckboxModule,
286
+ MultiSelectModule,
287
+ SelectModule,
288
+ ToggleButtonModule,
289
+ InputOtpModule,
290
+ ToggleSwitchModule,
291
+ InputNumberModule,
292
+ TextareaModule,
293
+ DisabledContainerComponent,
294
+ TooltipModule,
295
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{
296
+ provide: NG_VALUE_ACCESSOR,
297
+ useExisting: forwardRef(() => CustomInputComponent),
298
+ multi: true
299
+ }], template: "@let localControl = controlData().control;\r\n@let placeholder = controlData().label || controlUpperName();\r\n@let name = controlData().controlName;\r\n@let typeInput = controlData().typeInput;\r\n@let readonly = controlData().readonly || false;\r\n@let dateConfig = controlData().dateConfig;\r\n@let multiSelectConfig = controlData().multiSelectConfig;\r\n@let selectConfig = controlData().selectConfig;\r\n@let toggleConfig = controlData().toggleConfig;\r\n@let textareaConfig = controlData().textareaConfig;\r\n@let currencyConfig = controlData().currencyConfig;\r\n@let decimalConfig = controlData().decimalConfig;\r\n@let autoFocus = controlData().autoFocus ?? false;\r\n<div class=\"flex flex-col gap-1 \">\r\n <lib-disabled-container [disabled]=\"readonly\">\r\n\r\n <p style=\"font-size: 12px; letter-spacing: 0.5px;\" class=\"text-sm text-gray-600 dark:text-gray-300 truncate\"\r\n [pTooltip]=\"placeholder\" tooltipPosition=\"top\" [showDelay]=\"300\">\r\n {{ placeholder }}\r\n </p>\r\n @switch (typeInput) {\r\n @case (inputTypesEnum.EMAIL_PASSWORD) {\r\n <input [formControl]=\"localControl\" (blur)=\"onTouched()\" pInputText [id]=\"generateUniqueId(name)\" [name]=\"name\"\r\n type=\"email\" [readOnly]=\"readonly\" autocomplete=\"email\" autocorrect=\"on\" autocapitalize=\"on\"\r\n spellcheck=\"true\" [ngClass]=\"{\r\n 'border-red-500 focus:ring-red-500':\r\n localControl.invalid &&\r\n (localControl.dirty || localControl.touched),\r\n 'bg-gray-100 cursor-not-allowed': readonly,\r\n }\"\r\n class=\"custom-input h-12 w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\" />\r\n <input type=\"password\" name=\"password\" id=\"password-autofill-helper\" autocomplete=\"current-password\" tabindex=\"-1\"\r\n style=\"position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0;\"\r\n aria-hidden=\"true\"\r\n (input)=\"onPasswordAutofill($event)\" />\r\n }\r\n @case (inputTypesEnum.PASSWORD) {\r\n <!-- Input oculto siempre de tipo password para el autocompletado del navegador -->\r\n <input \r\n type=\"password\" \r\n name=\"password-autofill\"\r\n [id]=\"'password-autofill-hidden-' + generateUniqueId(name)\"\r\n autocomplete=\"current-password\" \r\n tabindex=\"-1\"\r\n style=\"position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0;\"\r\n aria-hidden=\"true\"\r\n [value]=\"localControl.value || ''\"\r\n (input)=\"onPasswordAutofillHidden($event)\" />\r\n <div class=\"relative\">\r\n <input [readOnly]=\"readonly || false\" [id]=\"generateUniqueId(name)\" [type]=\"showPassword ? 'text' : 'password'\"\r\n autocomplete=\"password\" autocorrect=\"on\" autocapitalize=\"on\" spellcheck=\"true\"\r\n class=\"custom-password w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 transition-all duration-200\"\r\n aria-describedby=\"password-help\" [formControl]=\"localControl\" \r\n (input)=\"syncPasswordAutofill($event)\" />\r\n <button type=\"button\"\r\n class=\"custom-password-toggle absolute inset-y-0 right-0 flex items-center justify-center w-12 h-full text-gray-400 transition-colors duration-200 ease-in-out hover:text-gray-600 focus:outline-none focus:text-gray-600 active:text-gray-700 dark:text-gray-500 dark:hover:text-gray-300 dark:focus:text-gray-300\"\r\n (click)=\"togglePasswordVisibility()\" [attr.aria-label]=\"\r\n showPassword ? 'Ocultar contrase\u00F1a' : 'Mostrar contrase\u00F1a'\r\n \">\r\n <i class=\"fas text-lg transition-all duration-200 ease-in-out\" [ngClass]=\"{\r\n 'fa-solid fa-eye': !showPassword,\r\n 'fa-solid fa-eye-slash': showPassword,\r\n }\"></i>\r\n </button>\r\n </div>\r\n }\r\n @case (inputTypesEnum.EMAIL) {\r\n <input [formControl]=\"localControl\" (blur)=\"onTouched()\" pInputText [id]=\"generateUniqueId(name)\" [name]=\"name\"\r\n [type]=\"typeInput\" [readOnly]=\"readonly\" autocomplete=\"email\" autocorrect=\"on\" autocapitalize=\"on\" spellcheck=\"true\"\r\n [ngClass]=\"{\r\n 'border-red-500 focus:ring-red-500':\r\n localControl.invalid &&\r\n (localControl.dirty || localControl.touched),\r\n 'bg-gray-100 cursor-not-allowed': readonly,\r\n }\"\r\n class=\"custom-input h-12 w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\" />\r\n }\r\n @case (inputTypesEnum.CURRENCY) {\r\n <p-inputnumber [autofocus]=\"autoFocus ?? false\" [formControl]=\"localControl\" (onFocus)=\"onFocus()\" (onBlur)=\"onBlur()\" (blur)=\"onTouched()\" [id]=\"generateUniqueId(name)\" mode=\"currency\"\r\n [currency]=\"currencyConfig?.currency ?? 'USD'\" [locale]=\"currencyConfig?.locale ?? 'es-CO'\" [minFractionDigits]=\"currencyConfig?.minFractionDigits ?? 2\"\r\n [maxFractionDigits]=\"currencyConfig?.maxFractionDigits ?? 2\" [readonly]=\"readonly\" [disabled]=\"readonly\" />\r\n }\r\n @case (inputTypesEnum.DATE) {\r\n <lib-disabled-container [disabled]=\"readonly\">\r\n <p-datepicker [formControl]=\"localControl\" [selectionMode]=\"dateConfig?.selectionMode || 'single'\"\r\n [maxDate]=\"dateConfig?.maxDate || null\" [minDate]=\"dateConfig?.minDate || null\" class=\"custom-datepicker\"\r\n appendTo=\"body\" />\r\n </lib-disabled-container>\r\n }\r\n @case (inputTypesEnum.TOGGLE) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <p-togglebutton [formControl]=\"localControl\" [onLabel]=\"toggleConfig?.onLabel || 'Si'\"\r\n [offLabel]=\"toggleConfig?.offLabel || 'No'\" class=\"custom-toggle\" />\r\n </div>\r\n }\r\n @case (inputTypesEnum.MULTISELECT) {\r\n <p-multiselect [filter]=\"true\" [options]=\"multiSelectConfig?.options\" [formControl]=\"localControl\"\r\n [optionLabel]=\"multiSelectConfig?.optionLabel ?? 'name'\" placeholder=\"\" [maxSelectedLabels]=\"3\"\r\n class=\"custom-multiselect\" appendTo=\"body\" />\r\n }\r\n @case (inputTypesEnum.SELECT) {\r\n <p-select [filter]=\"true\" [options]=\"selectConfig?.options\" [formControl]=\"localControl\"\r\n [optionLabel]=\"selectConfig?.optionLabel ?? 'name'\" placeholder=\"\" class=\"custom-select\"\r\n (onChange)=\"onSelectChange()\" appendTo=\"body\" [disabled]=\"readonly\" [readonly]=\"readonly\" [styleClass]=\"\r\n (localControl.invalid && (localControl.dirty || localControl.touched) ? 'border-red-500 focus:ring-red-500 ' : '') +\r\n (readonly ? 'bg-gray-100 cursor-not-allowed' : '')\r\n \" />\r\n }\r\n \r\n @case (inputTypesEnum.CHECKBOX) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <input [id]=\"generateUniqueId(name)\" [readOnly]=\"readonly\" [type]=\"typeInput\" [checked]=\"localControl.value\"\r\n (change)=\"onCheckboxChange($event, localControl)\"\r\n class=\"custom-checkbox h-5 w-5 border-2 border-gray-300 dark:border-transparent rounded focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 transition-all duration-200\"\r\n [formControl]=\"localControl\" />\r\n </div>\r\n }\r\n @case (inputTypesEnum.OTP) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <p-inputotp [id]=\"generateUniqueId(name)\" (onBlur)=\"onTouched()\" [mask]=\"controlData().otpConfig?.mask ?? false\"\r\n [length]=\"controlData().otpConfig?.length ?? 6\" [integerOnly]=\"controlData().otpConfig?.integerOnly ?? false\"\r\n class=\"custom-otp border-2 border-gray-300 dark:border-transparent rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 transition-all duration-200\"\r\n [formControl]=\"localControl\" />\r\n </div>\r\n }\r\n @case (inputTypesEnum.SWITCH) {\r\n <div class=\"flex justify-center items-center p-4\">\r\n <p-toggleswitch [id]=\"generateUniqueId(name)\" [formControl]=\"localControl\"\r\n class=\"custom-switch border-2 border-gray-300 dark:border-transparent rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 transition-all duration-200\"\r\n (change)=\"onCheckboxChange($event, localControl)\">\r\n <ng-template #handle let-checked=\"checked\">\r\n <span class=\"text-xs bg-gray-100 dark:bg-gray-600 text-gray-800 dark:text-gray-200 rounded-full px-1\">\r\n @if (checked) {\r\n Si\r\n }\r\n @else {\r\n No\r\n }\r\n </span>\r\n </ng-template>\r\n </p-toggleswitch>\r\n </div>\r\n }\r\n @case (inputTypesEnum.DECIMAL) {\r\n <p-inputnumber [autofocus]=\"autoFocus ?? false\" [formControl]=\"localControl\" (onBlur)=\"onBlur()\" (blur)=\"onTouched()\" [id]=\"generateUniqueId(name)\" mode=\"decimal\"\r\n (onFocus)=\"onFocus()\"\r\n [locale]=\"'es-CO'\" [minFractionDigits]=\"decimalConfig?.minFractionDigits ?? 2\" [maxFractionDigits]=\"decimalConfig?.maxFractionDigits ?? 2\" [useGrouping]=\"decimalConfig?.useGrouping ?? true\" [readonly]=\"readonly\" [disabled]=\"readonly\" />\r\n }\r\n @case (inputTypesEnum.TEXTAREA) {\r\n <textarea pTextarea [formControl]=\"localControl\" [rows]=\"textareaConfig?.rows ?? 3\"\r\n [cols]=\"textareaConfig?.cols ?? 30\" [autoResize]=\"true\" [variant]=\"textareaConfig?.variant ?? 'outlined'\"\r\n (blur)=\"onTouched()\" [id]=\"generateUniqueId(name)\" [readonly]=\"readonly\" autocomplete=\"off\" autocorrect=\"off\"\r\n autocapitalize=\"off\" spellcheck=\"false\"\r\n class=\"custom-textarea w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\"></textarea>\r\n }\r\n @default {\r\n <input [formControl]=\"localControl\" (blur)=\"onTouched()\" pInputText [id]=\"generateUniqueId(name)\" [type]=\"typeInput\"\r\n [readOnly]=\"readonly\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" [ngClass]=\"{\r\n 'border-red-500 focus:ring-red-500':\r\n localControl.invalid &&\r\n (localControl.dirty || localControl.touched),\r\n 'bg-gray-100 cursor-not-allowed': readonly,\r\n }\"\r\n class=\"custom-input h-12 w-full px-3 py-2 border border-gray-300 dark:border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100\" />\r\n }\r\n }\r\n </lib-disabled-container>\r\n\r\n</div>\r\n\r\n@if (localControl.invalid && !hasControlValue()) {\r\n<div class=\"custom-error mt-1 text-sm text-red-600 dark:text-red-400\">\r\n @if (localControl.errors?.[\"required\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El campo es requerido' }}</span>\r\n }\r\n @if (localControl.errors?.[\"min\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{ 'El valor m\u00EDnimo es de ' +\r\n localControl.errors?.[\"min\"].min.toFixed(2) }}</span>\r\n }\r\n @if (localControl.errors?.[\"max\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{ 'El valor m\u00E1ximo es de ' +\r\n localControl.errors?.[\"max\"].max.toFixed(2) }}</span>\r\n }\r\n @if (localControl.errors?.[\"minlength\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El largo m\u00EDnimo es de ' + localControl.errors?.[\"minlength\"].requiredLength\r\n }}</span>\r\n }\r\n @if (localControl.errors?.[\"maxlength\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El largo m\u00E1ximo es de ' + localControl.errors?.[\"maxlength\"].requiredLength\r\n }}</span>\r\n }\r\n @if (localControl.errors?.[\"email\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El correo electr\u00F3nico no es v\u00E1lido' }}</span>\r\n }\r\n @if (localControl.errors?.[\"pattern\"]) {\r\n <span style=\"font-size: 0.675rem; font-style: italic; letter-spacing: 0.02em;\">{{\r\n 'El formato no es v\u00E1lido' }}</span>\r\n }\r\n</div>\r\n}", styles: ["@charset \"UTF-8\";:host ::ng-deep p-datepicker>span>.p-inputtext{width:100%;border-radius:.5rem;outline:none;background-color:#f9fafb;height:44px;padding-right:2.5rem;color:#111827;transition:all .2s ease-in-out}:host ::ng-deep p-datepicker>.p-datepicker>.p-inputtext{background:transparent;color:#111827;height:44px;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-datepicker>.p-datepicker>.p-inputtext{background:transparent;background-color:#374151;color:#f3f4f6}:host ::ng-deep p-datepicker>span{width:100%;position:relative;display:inline-flex}:host ::ng-deep p-datepicker .p-datepicker-trigger{position:absolute!important;right:0!important;top:0!important;height:44px!important;width:2.5rem!important;background:transparent!important;border:none!important;box-shadow:none!important;color:#6b7280!important;display:flex!important;align-items:center!important;justify-content:center!important;z-index:1!important}:host ::ng-deep .my-app-dark p-datepicker .p-datepicker-trigger{color:#9ca3af!important}:host ::ng-deep p-datepicker .p-datepicker-trigger .p-button-icon{font-size:.875rem}:host ::ng-deep p-multiselect{border:1px solid #d1d5db;background:transparent;color:#111827;height:44px;width:100%;border-radius:.5rem;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-multiselect{background:transparent;color:#f3f4f6}:host ::ng-deep p-select{background:transparent;color:#111827;height:44px;width:100%;border-radius:.5rem;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-select{background:transparent;color:#f3f4f6}:host ::ng-deep p-select>.p-select-label{font-size:small;position:relative}:host ::ng-deep p-inputnumber{background:transparent;color:#111827;height:44px;width:100%;border:1px solid #d1d5db;border-radius:.5rem;transition:all .2s ease-in-out}:host ::ng-deep .my-app-dark p-inputnumber{background:transparent;color:#f3f4f6}:host-context(.my-app-dark) ::ng-deep .custom-datepicker>.p-inputwrapper>.p-inputtext{color:#f3f4f6;background-color:#374151}:host-context(.my-app-dark) ::ng-deep p-datepicker>span>.p-inputtext{background-color:#374151;color:#f3f4f6}:host-context(.my-app-dark) ::ng-deep .p-inputtext{background-color:#374151;color:#f3f4f6;border-color:transparent}:host-context(.my-app-dark) ::ng-deep .p-inputnumber-input{background-color:#374151;color:#f3f4f6;border-color:transparent}\n"] }]
300
+ }], ctorParameters: () => [] });
301
+
302
+ class FormChildComponent {
303
+ controlsData = input.required();
304
+ formGroup = input.required();
305
+ formSubmit = output();
306
+ constructor() {
307
+ }
308
+ submit() {
309
+ this.formSubmit.emit(this.formGroup());
310
+ }
311
+ onSelectChange(controlConfig) {
312
+ controlConfig.selectConfig?.change?.(controlConfig);
313
+ }
314
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormChildComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
315
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: FormChildComponent, isStandalone: true, selector: "lib-form-child", inputs: { controlsData: { classPropertyName: "controlsData", publicName: "controlsData", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { formSubmit: "formSubmit" }, ngImport: i0, template: "@let controls = controlsData();\r\n\r\n<form\r\n [formGroup]=\"formGroup()\"\r\n (submit)=\"submit()\"\r\n autocomplete=\"off\"\r\n class=\"grid grid-cols-12 gap-3\"\r\n>\r\n @for (controlData of controls; track controlData.controlName) {\r\n <div\r\n class=\"flex flex-col w-full\"\r\n [ngClass]=\"{\r\n 'col-span-1': !controlData.colSpan,\r\n 'col-span-2': controlData.colSpan === 2,\r\n 'col-span-3': controlData.colSpan === 3,\r\n 'col-span-4': controlData.colSpan === 4,\r\n 'col-span-5': controlData.colSpan === 5,\r\n 'col-span-6': controlData.colSpan === 6,\r\n 'col-span-7': controlData.colSpan === 7,\r\n 'col-span-8': controlData.colSpan === 8,\r\n 'col-span-9': controlData.colSpan === 9,\r\n 'col-span-10': controlData.colSpan === 10,\r\n 'col-span-11': controlData.colSpan === 11,\r\n 'col-span-12': controlData.colSpan === 12,\r\n }\"\r\n >\r\n <lib-custom-input\r\n [id]=\"controlData.controlName\"\r\n [controlData]=\"controlData\"\r\n [formControlName]=\"controlData.controlName\"\r\n class=\"w-full\"\r\n (output)=\"onSelectChange($event)\"\r\n >\r\n </lib-custom-input>\r\n </div>\r\n }\r\n</form>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CustomInputComponent, selector: "lib-custom-input", inputs: ["controlData"], outputs: ["output"] }] });
316
+ }
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormChildComponent, decorators: [{
318
+ type: Component,
319
+ args: [{ selector: 'lib-form-child', imports: [
320
+ ReactiveFormsModule,
321
+ CommonModule,
322
+ CustomInputComponent
323
+ ], template: "@let controls = controlsData();\r\n\r\n<form\r\n [formGroup]=\"formGroup()\"\r\n (submit)=\"submit()\"\r\n autocomplete=\"off\"\r\n class=\"grid grid-cols-12 gap-3\"\r\n>\r\n @for (controlData of controls; track controlData.controlName) {\r\n <div\r\n class=\"flex flex-col w-full\"\r\n [ngClass]=\"{\r\n 'col-span-1': !controlData.colSpan,\r\n 'col-span-2': controlData.colSpan === 2,\r\n 'col-span-3': controlData.colSpan === 3,\r\n 'col-span-4': controlData.colSpan === 4,\r\n 'col-span-5': controlData.colSpan === 5,\r\n 'col-span-6': controlData.colSpan === 6,\r\n 'col-span-7': controlData.colSpan === 7,\r\n 'col-span-8': controlData.colSpan === 8,\r\n 'col-span-9': controlData.colSpan === 9,\r\n 'col-span-10': controlData.colSpan === 10,\r\n 'col-span-11': controlData.colSpan === 11,\r\n 'col-span-12': controlData.colSpan === 12,\r\n }\"\r\n >\r\n <lib-custom-input\r\n [id]=\"controlData.controlName\"\r\n [controlData]=\"controlData\"\r\n [formControlName]=\"controlData.controlName\"\r\n class=\"w-full\"\r\n (output)=\"onSelectChange($event)\"\r\n >\r\n </lib-custom-input>\r\n </div>\r\n }\r\n</form>\r\n" }]
324
+ }], ctorParameters: () => [] });
325
+
326
+ class HttpMessageComponent {
327
+ httpMessage = model();
328
+ clearMessage() {
329
+ this.httpMessage.set(undefined);
330
+ }
331
+ get isError() {
332
+ const message = this.httpMessage();
333
+ return message?.type === 'error';
334
+ }
335
+ get isSuccess() {
336
+ const message = this.httpMessage();
337
+ return message?.type === 'success';
338
+ }
339
+ get isWarning() {
340
+ const message = this.httpMessage();
341
+ return message?.type === 'warning';
342
+ }
343
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HttpMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
344
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: HttpMessageComponent, isStandalone: true, selector: "lib-http-message", inputs: { httpMessage: { classPropertyName: "httpMessage", publicName: "httpMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { httpMessage: "httpMessageChange" }, ngImport: i0, template: "@if (httpMessage()) {\r\n @if (isError) {\r\n <div class=\"group relative mt-3 p-3 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 transition-all duration-200 hover:shadow-md\">\r\n <div class=\"flex items-start gap-2\">\r\n <svg class=\"w-5 h-5 text-red-500 dark:text-red-400 flex-shrink-0 mt-0.5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n <p class=\"flex-1 text-red-700 dark:text-red-300 text-sm font-medium leading-relaxed\">\r\n {{ httpMessage()?.message }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n (click)=\"clearMessage()\"\r\n class=\"opacity-0 group-hover:opacity-100 transition-opacity duration-200 text-red-500 dark:text-red-400 hover:text-red-700 dark:hover:text-red-200 p-1 rounded hover:bg-red-100 dark:hover:bg-red-800/30\"\r\n aria-label=\"Cerrar mensaje de error\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n @if (isSuccess) {\r\n <div class=\"group relative mt-3 p-3 rounded-lg bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 transition-all duration-200 hover:shadow-md\">\r\n <div class=\"flex items-start gap-2\">\r\n <svg class=\"w-5 h-5 text-green-500 dark:text-green-400 flex-shrink-0 mt-0.5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n <p class=\"flex-1 text-green-700 dark:text-green-300 text-sm font-medium leading-relaxed\">\r\n {{ httpMessage()?.message }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n (click)=\"clearMessage()\"\r\n class=\"opacity-0 group-hover:opacity-100 transition-opacity duration-200 text-green-500 dark:text-green-400 hover:text-green-700 dark:hover:text-green-200 p-1 rounded hover:bg-green-100 dark:hover:bg-green-800/30\"\r\n aria-label=\"Cerrar mensaje de \u00E9xito\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n @if (isWarning) {\r\n <div class=\"group relative mt-3 p-3 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 transition-all duration-200 hover:shadow-md\">\r\n <div class=\"flex items-start gap-2\">\r\n <svg class=\"w-5 h-5 text-amber-500 dark:text-amber-400 flex-shrink-0 mt-0.5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fill-rule=\"evenodd\" d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n <p class=\"flex-1 text-amber-700 dark:text-amber-300 text-sm font-medium leading-relaxed\">\r\n {{ httpMessage()?.message }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n (click)=\"clearMessage()\"\r\n class=\"opacity-0 group-hover:opacity-100 transition-opacity duration-200 text-amber-500 dark:text-amber-400 hover:text-amber-700 dark:hover:text-amber-200 p-1 rounded hover:bg-amber-100 dark:hover:bg-amber-800/30\"\r\n aria-label=\"Cerrar mensaje de advertencia\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n}\r\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
345
+ }
346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HttpMessageComponent, decorators: [{
347
+ type: Component,
348
+ args: [{ selector: 'lib-http-message', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (httpMessage()) {\r\n @if (isError) {\r\n <div class=\"group relative mt-3 p-3 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 transition-all duration-200 hover:shadow-md\">\r\n <div class=\"flex items-start gap-2\">\r\n <svg class=\"w-5 h-5 text-red-500 dark:text-red-400 flex-shrink-0 mt-0.5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n <p class=\"flex-1 text-red-700 dark:text-red-300 text-sm font-medium leading-relaxed\">\r\n {{ httpMessage()?.message }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n (click)=\"clearMessage()\"\r\n class=\"opacity-0 group-hover:opacity-100 transition-opacity duration-200 text-red-500 dark:text-red-400 hover:text-red-700 dark:hover:text-red-200 p-1 rounded hover:bg-red-100 dark:hover:bg-red-800/30\"\r\n aria-label=\"Cerrar mensaje de error\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n @if (isSuccess) {\r\n <div class=\"group relative mt-3 p-3 rounded-lg bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 transition-all duration-200 hover:shadow-md\">\r\n <div class=\"flex items-start gap-2\">\r\n <svg class=\"w-5 h-5 text-green-500 dark:text-green-400 flex-shrink-0 mt-0.5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n <p class=\"flex-1 text-green-700 dark:text-green-300 text-sm font-medium leading-relaxed\">\r\n {{ httpMessage()?.message }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n (click)=\"clearMessage()\"\r\n class=\"opacity-0 group-hover:opacity-100 transition-opacity duration-200 text-green-500 dark:text-green-400 hover:text-green-700 dark:hover:text-green-200 p-1 rounded hover:bg-green-100 dark:hover:bg-green-800/30\"\r\n aria-label=\"Cerrar mensaje de \u00E9xito\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n @if (isWarning) {\r\n <div class=\"group relative mt-3 p-3 rounded-lg bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 transition-all duration-200 hover:shadow-md\">\r\n <div class=\"flex items-start gap-2\">\r\n <svg class=\"w-5 h-5 text-amber-500 dark:text-amber-400 flex-shrink-0 mt-0.5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\r\n <path fill-rule=\"evenodd\" d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n <p class=\"flex-1 text-amber-700 dark:text-amber-300 text-sm font-medium leading-relaxed\">\r\n {{ httpMessage()?.message }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n (click)=\"clearMessage()\"\r\n class=\"opacity-0 group-hover:opacity-100 transition-opacity duration-200 text-amber-500 dark:text-amber-400 hover:text-amber-700 dark:hover:text-amber-200 p-1 rounded hover:bg-amber-100 dark:hover:bg-amber-800/30\"\r\n aria-label=\"Cerrar mensaje de advertencia\"\r\n >\r\n <svg class=\"w-4 h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n}\r\n" }]
349
+ }] });
350
+
351
+ class FormComponent {
352
+ formGroup = model.required();
353
+ controls = input.required();
354
+ formConfig = input();
355
+ httpMessage = model();
356
+ formSubmit = output();
357
+ formChanges = output();
358
+ formChangesDebounced = output();
359
+ constructor() {
360
+ effect(() => {
361
+ const controls = this.controls();
362
+ const controlsNames = this.controls().map((controlConfig) => controlConfig.controlName);
363
+ const controlsToDelete = Object.keys(this.formGroup().controls).filter(control => !controlsNames.includes(control));
364
+ controls.forEach((controlData) => {
365
+ this.formGroup.update((formGroup) => {
366
+ if (formGroup.contains(controlData.controlName)) {
367
+ formGroup.setControl(controlData.controlName, controlData.control);
368
+ }
369
+ else {
370
+ formGroup.addControl(controlData.controlName, controlData.control);
371
+ }
372
+ controlsToDelete.forEach(controlName => {
373
+ formGroup.removeControl(controlName);
374
+ });
375
+ return formGroup;
376
+ });
377
+ });
378
+ });
379
+ effect(() => {
380
+ const controlsDataTypeSelect = this.controls().filter((controlData) => controlData.typeInput === ETypeInput.SELECT);
381
+ controlsDataTypeSelect.forEach((controlData) => {
382
+ const control = this.formGroup().get(controlData.controlName);
383
+ const controlValue = control?.value;
384
+ if (controlValue) {
385
+ const options = controlData.selectConfig?.options ?? [];
386
+ const optionSelected = options.find((option) => {
387
+ return option.code === controlValue.code;
388
+ });
389
+ if (optionSelected) {
390
+ control?.setValue(optionSelected);
391
+ }
392
+ }
393
+ });
394
+ });
395
+ effect(() => {
396
+ this.formGroup().valueChanges.subscribe(() => {
397
+ this.formChanges.emit(this.formGroup());
398
+ });
399
+ });
400
+ const fg$ = toObservable(this.formGroup);
401
+ fg$.pipe(switchMap((fg) => fg.valueChanges.pipe(debounceTime(650), filter(() => this.anyInteracted(fg)), map(() => fg))), takeUntilDestroyed())
402
+ .subscribe(() => this.formChangesDebounced.emit(this.formGroup()));
403
+ }
404
+ anyInteracted(formGroup) {
405
+ return Object.values(formGroup.controls).some(control => control.touched || control.dirty);
406
+ }
407
+ submit(formGroup) {
408
+ this.formSubmit.emit(formGroup);
409
+ }
410
+ clearHttpMessage() {
411
+ this.httpMessage.set(undefined);
412
+ }
413
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
414
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: FormComponent, isStandalone: true, selector: "lib-form", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: true, transformFunction: null }, formConfig: { classPropertyName: "formConfig", publicName: "formConfig", isSignal: true, isRequired: false, transformFunction: null }, httpMessage: { classPropertyName: "httpMessage", publicName: "httpMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formGroup: "formGroupChange", httpMessage: "httpMessageChange", formSubmit: "formSubmit", formChanges: "formChanges", formChangesDebounced: "formChangesDebounced" }, ngImport: i0, template: "<div class=\"w-full p-2 rounded-lg\" [style.backgroundColor]=\"formConfig()?.backgroundColor || 'transparent'\">\r\n <lib-form-child [controlsData]=\"controls()\" [formGroup]=\"formGroup()\" (formSubmit)=\"submit($event)\">\r\n </lib-form-child>\r\n @if (httpMessage()) {\r\n <lib-http-message [(httpMessage)]=\"httpMessage\"></lib-http-message>\r\n }\r\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: FormChildComponent, selector: "lib-form-child", inputs: ["controlsData", "formGroup"], outputs: ["formSubmit"] }, { kind: "component", type: HttpMessageComponent, selector: "lib-http-message", inputs: ["httpMessage"], outputs: ["httpMessageChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
415
+ }
416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FormComponent, decorators: [{
417
+ type: Component,
418
+ args: [{ selector: 'lib-form', imports: [
419
+ ReactiveFormsModule,
420
+ FormChildComponent,
421
+ HttpMessageComponent
422
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"w-full p-2 rounded-lg\" [style.backgroundColor]=\"formConfig()?.backgroundColor || 'transparent'\">\r\n <lib-form-child [controlsData]=\"controls()\" [formGroup]=\"formGroup()\" (formSubmit)=\"submit($event)\">\r\n </lib-form-child>\r\n @if (httpMessage()) {\r\n <lib-http-message [(httpMessage)]=\"httpMessage\"></lib-http-message>\r\n }\r\n</div>" }]
423
+ }], ctorParameters: () => [] });
424
+
425
+ class InlineInputComponent {
426
+ config = input({ typeInput: ETypeInput.TEXT });
427
+ value = model(null);
428
+ outputValue = output();
429
+ outputBlur = output();
430
+ outputDebounced = output();
431
+ // Capturar templates proyectados desde el componente padre
432
+ templates;
433
+ // Para el manejo de chips
434
+ chips = [];
435
+ currentInput = '';
436
+ showDuplicateMessage = false;
437
+ duplicateChips = [];
438
+ duplicateMessageTimer = null;
439
+ constructor() {
440
+ effect(() => {
441
+ this.outputValue.emit(this.value());
442
+ });
443
+ const value$ = toObservable(this.value);
444
+ value$
445
+ .pipe(debounceTime(300), // <- adjust ms here
446
+ distinctUntilChanged(), // avoid repeats for same value
447
+ takeUntilDestroyed() // auto-cleanup on destroy
448
+ )
449
+ .subscribe(v => this.outputDebounced.emit(v));
450
+ effect(() => {
451
+ this.valueSelect.update((_prev) => {
452
+ const options = this.config()?.selectConfig?.options;
453
+ const currentValue = this.value();
454
+ if (this.isSelection(currentValue))
455
+ return currentValue;
456
+ if (currentValue === null || currentValue === undefined)
457
+ return undefined;
458
+ return options?.find(option => option.code === currentValue);
459
+ });
460
+ });
461
+ }
462
+ ngOnInit() {
463
+ }
464
+ onChange = () => { };
465
+ onTouched = () => { };
466
+ writeValue(value) {
467
+ this.value.set(value);
468
+ // Si es tipo CHIPS, inicializar los chips desde el valor
469
+ if (this.type === ETypeInput.CHIPS && typeof value === 'string') {
470
+ this.chips = value ? value.split(' ').filter(chip => chip.trim() !== '') : [];
471
+ }
472
+ }
473
+ registerOnChange(fn) {
474
+ this.onChange = fn;
475
+ }
476
+ registerOnTouched(fn) {
477
+ this.onTouched = fn;
478
+ }
479
+ onChangeValue(value) {
480
+ this.value.set(value);
481
+ this.onChange(value);
482
+ }
483
+ onBlur() {
484
+ this.onTouched();
485
+ this.outputBlur.emit(this.value());
486
+ }
487
+ /**
488
+ * Maneja eventos de teclado para prevenir la navegación de PrimeNG Table
489
+ * cuando se usan las flechas izquierda/derecha dentro del input
490
+ */
491
+ onKeyDown(event) {
492
+ // Verificar si son teclas de flecha izquierda o derecha
493
+ if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
494
+ // Detener la propagación del evento hacia el table
495
+ event.stopPropagation();
496
+ }
497
+ }
498
+ isSelection(value) {
499
+ return !!value && typeof value === 'object' && 'code' in value && 'name' in value;
500
+ }
501
+ valueSelect = signal(undefined);
502
+ setValueSelect(value) {
503
+ this.valueSelect.set(value);
504
+ }
505
+ get type() {
506
+ return this.config()?.typeInput ?? ETypeInput.TEXT;
507
+ }
508
+ get ETypeInput() {
509
+ return ETypeInput;
510
+ }
511
+ get duplicatesText() {
512
+ return this.duplicateChips.join(', ');
513
+ }
514
+ get currency() {
515
+ return this.config()?.currencyConfig?.currency ?? 'COP';
516
+ }
517
+ get locale() {
518
+ return this.config()?.currencyConfig?.locale ?? 'es-CO';
519
+ }
520
+ get minFractionDigits() {
521
+ return this.config()?.currencyConfig?.minFractionDigits ?? 2;
522
+ }
523
+ get maxFractionDigits() {
524
+ return this.config()?.currencyConfig?.maxFractionDigits ?? 2;
525
+ }
526
+ knobValueInput = computed(() => {
527
+ let response = this.value();
528
+ const knobConfig = this.config()?.knobConfig ?? { min: 0, max: 100, step: 1 };
529
+ response = parseInt(this.value()) ?? 0;
530
+ if (response < (knobConfig?.min ?? 0)) {
531
+ response = knobConfig.min ?? 0;
532
+ }
533
+ if (response > (knobConfig?.max ?? 100)) {
534
+ response = knobConfig.max ?? 100;
535
+ }
536
+ return response;
537
+ });
538
+ knobValueTemplate = computed(() => {
539
+ return this.config()?.knobConfig?.valueTemplate ?? '';
540
+ });
541
+ // Métodos para manejo de chips
542
+ onChipInputChange(event) {
543
+ const target = event.target;
544
+ this.currentInput = target.value;
545
+ }
546
+ onChipKeydown(event) {
547
+ if (event.key === ' ' || event.key === 'Enter') {
548
+ event.preventDefault();
549
+ this.addChip();
550
+ }
551
+ else if (event.key === 'Backspace' && this.currentInput === '' && this.chips.length > 0) {
552
+ // Si no hay texto y hay chips, eliminar el último chip
553
+ this.removeChip(this.chips.length - 1);
554
+ }
555
+ // No interceptar las flechas aquí ya que se maneja en onKeyDown
556
+ }
557
+ onChipPaste(event) {
558
+ event.preventDefault();
559
+ const pastedText = event.clipboardData?.getData('text') || '';
560
+ this.processPastedText(pastedText);
561
+ }
562
+ addChip() {
563
+ const trimmedValue = this.currentInput.trim();
564
+ if (trimmedValue) {
565
+ if (this.chips.includes(trimmedValue)) {
566
+ // Mostrar mensaje de duplicado con el chip específico
567
+ this.duplicateChips = [trimmedValue];
568
+ this.showDuplicateAlert();
569
+ }
570
+ else {
571
+ this.chips.push(trimmedValue);
572
+ this.currentInput = '';
573
+ this.updateChipsValue();
574
+ this.hideDuplicateAlert();
575
+ }
576
+ }
577
+ }
578
+ removeChip(index) {
579
+ this.chips.splice(index, 1);
580
+ this.updateChipsValue();
581
+ }
582
+ updateChipsValue() {
583
+ const chipsValue = this.chips.join(' ');
584
+ this.value.set(chipsValue);
585
+ this.onChange(chipsValue);
586
+ }
587
+ showDuplicateAlert() {
588
+ this.showDuplicateMessage = true;
589
+ // Limpiar timer anterior si existe
590
+ if (this.duplicateMessageTimer) {
591
+ clearTimeout(this.duplicateMessageTimer);
592
+ }
593
+ // Ocultar mensaje después de 3 segundos
594
+ this.duplicateMessageTimer = setTimeout(() => {
595
+ this.hideDuplicateAlert();
596
+ }, 3000);
597
+ }
598
+ hideDuplicateAlert() {
599
+ this.showDuplicateMessage = false;
600
+ this.duplicateChips = [];
601
+ if (this.duplicateMessageTimer) {
602
+ clearTimeout(this.duplicateMessageTimer);
603
+ this.duplicateMessageTimer = null;
604
+ }
605
+ }
606
+ processPastedText(text) {
607
+ // Dividir el texto por espacios y filtrar elementos vacíos
608
+ const newChips = text
609
+ .split(/\s+/) // Dividir por uno o más espacios
610
+ .map(chip => chip.trim()) // Limpiar espacios en cada elemento
611
+ .filter(chip => chip !== ''); // Filtrar elementos vacíos
612
+ const foundDuplicates = [];
613
+ let addedChips = 0;
614
+ // Agregar cada chip nuevo y recopilar duplicados
615
+ newChips.forEach(chipText => {
616
+ if (!this.chips.includes(chipText)) {
617
+ this.chips.push(chipText);
618
+ addedChips++;
619
+ }
620
+ else {
621
+ // Solo agregar a duplicados si no está ya en la lista
622
+ if (!foundDuplicates.includes(chipText)) {
623
+ foundDuplicates.push(chipText);
624
+ }
625
+ }
626
+ });
627
+ // Limpiar el input actual
628
+ this.currentInput = '';
629
+ // Actualizar el valor si se agregaron chips
630
+ if (addedChips > 0) {
631
+ this.updateChipsValue();
632
+ }
633
+ // Mostrar alerta si hubo duplicados
634
+ if (foundDuplicates.length > 0) {
635
+ this.duplicateChips = foundDuplicates;
636
+ this.showDuplicateAlert();
637
+ }
638
+ else {
639
+ this.hideDuplicateAlert();
640
+ }
641
+ }
642
+ /**
643
+ * Método público para establecer chips desde un array externo
644
+ * @param chipsArray Array de strings que representan las chips
645
+ */
646
+ setChipsFromArray(chipsArray) {
647
+ if (!Array.isArray(chipsArray)) {
648
+ console.warn('setChipsFromArray: El parámetro debe ser un array de strings');
649
+ return;
650
+ }
651
+ // Filtrar elementos válidos (strings no vacíos)
652
+ const validChips = chipsArray
653
+ .filter(chip => typeof chip === 'string' && chip.trim() !== '')
654
+ .map(chip => chip.trim());
655
+ // Actualizar el array de chips
656
+ this.chips = [...validChips];
657
+ // Limpiar el input actual
658
+ this.currentInput = '';
659
+ // Actualizar el valor del componente
660
+ this.updateChipsValue();
661
+ // Ocultar cualquier mensaje de duplicado
662
+ this.hideDuplicateAlert();
663
+ }
664
+ /**
665
+ * Método público para obtener las chips actuales como array
666
+ * @returns Array de strings con las chips actuales
667
+ */
668
+ getChipsAsArray() {
669
+ return [...this.chips];
670
+ }
671
+ /**
672
+ * Método público para limpiar todas las chips
673
+ */
674
+ clearAllChips() {
675
+ this.chips = [];
676
+ this.currentInput = '';
677
+ this.updateChipsValue();
678
+ this.hideDuplicateAlert();
679
+ }
680
+ /**
681
+ * Método público para agregar múltiples chips desde un array
682
+ * Evita duplicados y muestra mensajes de alerta si es necesario
683
+ * @param chipsArray Array de strings a agregar
684
+ */
685
+ addChipsFromArray(chipsArray) {
686
+ if (!Array.isArray(chipsArray)) {
687
+ console.warn('addChipsFromArray: El parámetro debe ser un array de strings');
688
+ return;
689
+ }
690
+ // Filtrar elementos válidos
691
+ const validChips = chipsArray
692
+ .filter(chip => typeof chip === 'string' && chip.trim() !== '')
693
+ .map(chip => chip.trim());
694
+ const foundDuplicates = [];
695
+ let addedChips = 0;
696
+ // Agregar cada chip nuevo y recopilar duplicados
697
+ validChips.forEach(chipText => {
698
+ if (!this.chips.includes(chipText)) {
699
+ this.chips.push(chipText);
700
+ addedChips++;
701
+ }
702
+ else {
703
+ // Solo agregar a duplicados si no está ya en la lista
704
+ if (!foundDuplicates.includes(chipText)) {
705
+ foundDuplicates.push(chipText);
706
+ }
707
+ }
708
+ });
709
+ // Actualizar el valor si se agregaron chips
710
+ if (addedChips > 0) {
711
+ this.updateChipsValue();
712
+ }
713
+ // Mostrar alerta si hubo duplicados
714
+ if (foundDuplicates.length > 0) {
715
+ this.duplicateChips = foundDuplicates;
716
+ this.showDuplicateAlert();
717
+ }
718
+ else {
719
+ this.hideDuplicateAlert();
720
+ }
721
+ }
722
+ // Limpiar timer al destruir el componente
723
+ ngOnDestroy() {
724
+ if (this.duplicateMessageTimer) {
725
+ clearTimeout(this.duplicateMessageTimer);
726
+ }
727
+ }
728
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: InlineInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
729
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: InlineInputComponent, isStandalone: true, selector: "lib-inline-input", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", outputValue: "outputValue", outputBlur: "outputBlur", outputDebounced: "outputDebounced" }, providers: [
730
+ {
731
+ provide: NG_VALUE_ACCESSOR,
732
+ useExisting: forwardRef(() => InlineInputComponent),
733
+ multi: true
734
+ }
735
+ ], queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: "@let valueInput = value();\n@let isDisabled = config().isDisabled ?? false;\n@let knobConfig = config().knobConfig;\n@let textareaConfig = config().textareaConfig;\n@let dateConfig = config().dateConfig;\n\n@switch (type) {\n@case (ETypeInput.CURRENCY) {\n<p-inputnumber [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" mode=\"currency\" [currency]=\"currency\" [locale]=\"locale\"\n [minFractionDigits]=\"minFractionDigits\" [maxFractionDigits]=\"maxFractionDigits\" class=\"w-full\"\n [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.DECIMAL) {\n<p-inputnumber [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" mode=\"decimal\" [locale]=\"locale\" [minFractionDigits]=\"2\" [maxFractionDigits]=\"2\"\n [useGrouping]=\"true\" class=\"w-full\" [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.DATE) {\n<p-datepicker [ngModel]=\"valueInput\" appendTo=\"body\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" class=\"w-full\" [disabled]=\"isDisabled\" [maxDate]=\"dateConfig?.maxDate || null\"\n [minDate]=\"dateConfig?.minDate || null\" [selectionMode]=\"dateConfig?.selectionMode || 'single'\" />\n}\n@case (ETypeInput.DATETIME_LOCAL) {\n<p-datepicker [ngModel]=\"valueInput\" appendTo=\"body\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" class=\"w-full\" [showTime]=\"true\" [hourFormat]=\"'24'\" [disabled]=\"isDisabled\"\n [maxDate]=\"dateConfig?.maxDate || null\" [minDate]=\"dateConfig?.minDate || null\" [selectionMode]=\"dateConfig?.selectionMode || 'single'\" />\n}\n@case (ETypeInput.SELECT) {\n<p-select [options]=\"config().selectConfig?.options ?? []\" [optionLabel]=\"config().selectConfig?.optionLabel ?? 'name'\"\n [(ngModel)]=\"valueSelect\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\"\n appendTo=\"body\" class=\"w-full inline-input-select\" [disabled]=\"config().isDisabled ?? false\" >\n @for (template of templates; track $index) {\n <ng-template [pTemplate]=\"template.getType()\" let-item>\n <ng-container *ngTemplateOutlet=\"template.template; context: { $implicit: item }\"></ng-container>\n </ng-template>\n }\n</p-select>\n}\n@case (ETypeInput.MULTISELECT) {\n<p-multiselect [options]=\"config().multiSelectConfig?.options ?? []\"\n [optionLabel]=\"config().multiSelectConfig?.optionLabel ?? 'name'\" [ngModel]=\"valueInput\"\n (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\" [filter]=\"true\"\n appendTo=\"body\" class=\"w-full\" [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.OTP) {\n<p-inputotp class=\"w-full\" [mask]=\"config().otpConfig?.mask ?? false\" [length]=\"config().otpConfig?.length ?? 6\"\n [integerOnly]=\"config().otpConfig?.integerOnly ?? false\" [ngModel]=\"valueInput\"\n (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\" [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.KNOB) {\n<p-knob [ngModel]=\"knobValueInput()\" (ngModelChange)=\"onChangeValue($event)\" class=\"w-full\" [min]=\"knobConfig?.min ?? 0\"\n [max]=\"knobConfig?.max ?? 100\" [step]=\"knobConfig?.step ?? 1\" [disabled]=\"isDisabled\" [readonly]=\"true\"\n [valueTemplate]=\"knobValueTemplate()\" [size]=\"knobConfig?.size ?? 100\" />\n}\n@case (ETypeInput.TEXTAREA) {\n<textarea class=\"w-full h-full p-2 border border-gray-300 rounded-md\" pTextarea [rows]=\"textareaConfig?.rows ?? 3\"\n [cols]=\"textareaConfig?.cols ?? 30\" [autoResize]=\"true\" [variant]=\"textareaConfig?.variant ?? 'outlined'\"\n [disabled]=\"isDisabled\" [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"></textarea>\n}\n@case (ETypeInput.CHIPS) {\n<div class=\"chips-input-wrapper\">\n <div\n class=\"chips-container w-full p-2 border border-gray-300 rounded-md min-h-[40px] flex flex-wrap items-center gap-2\"\n [class.border-red-500]=\"showDuplicateMessage\">\n @for (chip of chips; track $index) {\n <p-chip [label]=\"chip\" [removable]=\"!isDisabled\" (onRemove)=\"removeChip($index)\" class=\"chip-item\" />\n }\n <input type=\"text\" class=\"chip-input flex-1 border-0 outline-0 bg-transparent min-w-[100px]\" [value]=\"currentInput\"\n (input)=\"onChipInputChange($event)\" (keydown)=\"onChipKeydown($event); onKeyDown($event)\"\n (paste)=\"onChipPaste($event)\" [disabled]=\"isDisabled\"\n placeholder=\"Escribe o pega elementos separados por espacios...\" />\n </div>\n @if (showDuplicateMessage) {\n <div class=\"duplicate-message text-red-500 text-sm mt-1 flex items-center gap-1\">\n <i class=\"pi pi-exclamation-triangle text-red-500\"></i>\n <span>\n @if (duplicateChips.length === 1) {\n El elemento \"<strong>{{ duplicatesText }}</strong>\" ya existe en la lista\n } @else {\n Los elementos \"<strong>{{ duplicatesText }}</strong>\" ya existen en la lista\n }\n </span>\n </div>\n }\n</div>\n}\n@case (ETypeInput.SWITCH) {\n<div class=\"flex justify-center items-center p-2\">\n <p-toggleswitch [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n class=\"w-full\" [disabled]=\"isDisabled\" />\n</div>\n}\n@default {\n<input pInputText class=\"w-full h-full p-2 border border-gray-300 rounded-md\" [type]=\"type\"\n [readOnly]=\"config().readonly ?? false\" [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\" [disabled]=\"isDisabled\" />\n}\n}", styles: [":host{width:100%;height:100%}.chips-input-wrapper{width:100%}.chips-input-wrapper .chips-container{cursor:text;transition:border-color .2s ease,box-shadow .2s ease}.chips-input-wrapper .chips-container:focus-within{border-color:#007ad9;box-shadow:0 0 0 1px #007ad9}.chips-input-wrapper .chips-container.border-red-500{border-color:#ef4444!important;box-shadow:0 0 0 1px #ef4444!important}.chips-input-wrapper .chips-container .chip-item{margin:0}.chips-input-wrapper .chips-container .chip-input:focus{outline:none}.chips-input-wrapper .chips-container .chip-input::placeholder{color:#6b7280;font-style:italic}.chips-input-wrapper .duplicate-message{animation:slideDown .3s ease-out}.chips-input-wrapper .duplicate-message i{font-size:14px}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}::ng-deep p-select.inline-input-select{border:1px solid #d1d5db!important;background:transparent;color:#111827;height:44px;width:100%;border-radius:.5rem;transition:all .2s ease-in-out;display:flex;align-items:center;justify-content:space-between}::ng-deep p-select.inline-input-select .p-select-label{border:none}::ng-deep p-select.inline-input-select .p-select-trigger{border:none}::ng-deep .my-app-dark p-select.inline-input-select{border:1px solid transparent!important;background:transparent;color:#f3f4f6}::ng-deep .my-app-dark p-inputnumber .p-inputnumber-input{background-color:#374151;color:#f3f4f6;border-color:transparent}::ng-deep .my-app-dark p-datepicker .p-inputtext{background-color:#374151;color:#f3f4f6}::ng-deep .my-app-dark p-multiselect .p-multiselect-label{background-color:#374151;color:#f3f4f6}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i4$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i4.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i3.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i8.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled", "fluid"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: InputOtpModule }, { kind: "component", type: i6.InputOtp, selector: "p-inputOtp, p-inputotp, p-input-otp", inputs: ["invalid", "disabled", "readonly", "variant", "tabindex", "length", "styleClass", "mask", "integerOnly", "autofocus", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: KnobModule }, { kind: "component", type: i9$1.Knob, selector: "p-knob", inputs: ["styleClass", "style", "ariaLabel", "ariaLabelledBy", "tabindex", "valueColor", "rangeColor", "textColor", "valueTemplate", "name", "size", "step", "min", "max", "strokeWidth", "disabled", "showValue", "readonly"], outputs: ["onChange"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i9.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "variant", "fluid", "pSize"], outputs: ["onResize"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i11.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "style", "styleClass", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i7.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
736
+ }
737
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: InlineInputComponent, decorators: [{
738
+ type: Component,
739
+ args: [{ selector: 'lib-inline-input', standalone: true, imports: [
740
+ FormsModule,
741
+ InputTextModule,
742
+ DatePickerModule,
743
+ SelectModule,
744
+ MultiSelectModule,
745
+ InputMaskModule,
746
+ InputNumberModule,
747
+ InputOtpModule,
748
+ KnobModule,
749
+ TextareaModule,
750
+ ChipModule,
751
+ ToggleSwitchModule,
752
+ CommonModule
753
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
754
+ {
755
+ provide: NG_VALUE_ACCESSOR,
756
+ useExisting: forwardRef(() => InlineInputComponent),
757
+ multi: true
758
+ }
759
+ ], template: "@let valueInput = value();\n@let isDisabled = config().isDisabled ?? false;\n@let knobConfig = config().knobConfig;\n@let textareaConfig = config().textareaConfig;\n@let dateConfig = config().dateConfig;\n\n@switch (type) {\n@case (ETypeInput.CURRENCY) {\n<p-inputnumber [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" mode=\"currency\" [currency]=\"currency\" [locale]=\"locale\"\n [minFractionDigits]=\"minFractionDigits\" [maxFractionDigits]=\"maxFractionDigits\" class=\"w-full\"\n [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.DECIMAL) {\n<p-inputnumber [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" mode=\"decimal\" [locale]=\"locale\" [minFractionDigits]=\"2\" [maxFractionDigits]=\"2\"\n [useGrouping]=\"true\" class=\"w-full\" [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.DATE) {\n<p-datepicker [ngModel]=\"valueInput\" appendTo=\"body\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" class=\"w-full\" [disabled]=\"isDisabled\" [maxDate]=\"dateConfig?.maxDate || null\"\n [minDate]=\"dateConfig?.minDate || null\" [selectionMode]=\"dateConfig?.selectionMode || 'single'\" />\n}\n@case (ETypeInput.DATETIME_LOCAL) {\n<p-datepicker [ngModel]=\"valueInput\" appendTo=\"body\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\" class=\"w-full\" [showTime]=\"true\" [hourFormat]=\"'24'\" [disabled]=\"isDisabled\"\n [maxDate]=\"dateConfig?.maxDate || null\" [minDate]=\"dateConfig?.minDate || null\" [selectionMode]=\"dateConfig?.selectionMode || 'single'\" />\n}\n@case (ETypeInput.SELECT) {\n<p-select [options]=\"config().selectConfig?.options ?? []\" [optionLabel]=\"config().selectConfig?.optionLabel ?? 'name'\"\n [(ngModel)]=\"valueSelect\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\"\n appendTo=\"body\" class=\"w-full inline-input-select\" [disabled]=\"config().isDisabled ?? false\" >\n @for (template of templates; track $index) {\n <ng-template [pTemplate]=\"template.getType()\" let-item>\n <ng-container *ngTemplateOutlet=\"template.template; context: { $implicit: item }\"></ng-container>\n </ng-template>\n }\n</p-select>\n}\n@case (ETypeInput.MULTISELECT) {\n<p-multiselect [options]=\"config().multiSelectConfig?.options ?? []\"\n [optionLabel]=\"config().multiSelectConfig?.optionLabel ?? 'name'\" [ngModel]=\"valueInput\"\n (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\" [filter]=\"true\"\n appendTo=\"body\" class=\"w-full\" [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.OTP) {\n<p-inputotp class=\"w-full\" [mask]=\"config().otpConfig?.mask ?? false\" [length]=\"config().otpConfig?.length ?? 6\"\n [integerOnly]=\"config().otpConfig?.integerOnly ?? false\" [ngModel]=\"valueInput\"\n (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\" [disabled]=\"isDisabled\" />\n}\n@case (ETypeInput.KNOB) {\n<p-knob [ngModel]=\"knobValueInput()\" (ngModelChange)=\"onChangeValue($event)\" class=\"w-full\" [min]=\"knobConfig?.min ?? 0\"\n [max]=\"knobConfig?.max ?? 100\" [step]=\"knobConfig?.step ?? 1\" [disabled]=\"isDisabled\" [readonly]=\"true\"\n [valueTemplate]=\"knobValueTemplate()\" [size]=\"knobConfig?.size ?? 100\" />\n}\n@case (ETypeInput.TEXTAREA) {\n<textarea class=\"w-full h-full p-2 border border-gray-300 rounded-md\" pTextarea [rows]=\"textareaConfig?.rows ?? 3\"\n [cols]=\"textareaConfig?.cols ?? 30\" [autoResize]=\"true\" [variant]=\"textareaConfig?.variant ?? 'outlined'\"\n [disabled]=\"isDisabled\" [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"></textarea>\n}\n@case (ETypeInput.CHIPS) {\n<div class=\"chips-input-wrapper\">\n <div\n class=\"chips-container w-full p-2 border border-gray-300 rounded-md min-h-[40px] flex flex-wrap items-center gap-2\"\n [class.border-red-500]=\"showDuplicateMessage\">\n @for (chip of chips; track $index) {\n <p-chip [label]=\"chip\" [removable]=\"!isDisabled\" (onRemove)=\"removeChip($index)\" class=\"chip-item\" />\n }\n <input type=\"text\" class=\"chip-input flex-1 border-0 outline-0 bg-transparent min-w-[100px]\" [value]=\"currentInput\"\n (input)=\"onChipInputChange($event)\" (keydown)=\"onChipKeydown($event); onKeyDown($event)\"\n (paste)=\"onChipPaste($event)\" [disabled]=\"isDisabled\"\n placeholder=\"Escribe o pega elementos separados por espacios...\" />\n </div>\n @if (showDuplicateMessage) {\n <div class=\"duplicate-message text-red-500 text-sm mt-1 flex items-center gap-1\">\n <i class=\"pi pi-exclamation-triangle text-red-500\"></i>\n <span>\n @if (duplicateChips.length === 1) {\n El elemento \"<strong>{{ duplicatesText }}</strong>\" ya existe en la lista\n } @else {\n Los elementos \"<strong>{{ duplicatesText }}</strong>\" ya existen en la lista\n }\n </span>\n </div>\n }\n</div>\n}\n@case (ETypeInput.SWITCH) {\n<div class=\"flex justify-center items-center p-2\">\n <p-toggleswitch [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\" (onBlur)=\"onBlur()\"\n class=\"w-full\" [disabled]=\"isDisabled\" />\n</div>\n}\n@default {\n<input pInputText class=\"w-full h-full p-2 border border-gray-300 rounded-md\" [type]=\"type\"\n [readOnly]=\"config().readonly ?? false\" [ngModel]=\"valueInput\" (ngModelChange)=\"onChangeValue($event)\"\n (blur)=\"onBlur()\" (keydown)=\"onKeyDown($event)\" [disabled]=\"isDisabled\" />\n}\n}", styles: [":host{width:100%;height:100%}.chips-input-wrapper{width:100%}.chips-input-wrapper .chips-container{cursor:text;transition:border-color .2s ease,box-shadow .2s ease}.chips-input-wrapper .chips-container:focus-within{border-color:#007ad9;box-shadow:0 0 0 1px #007ad9}.chips-input-wrapper .chips-container.border-red-500{border-color:#ef4444!important;box-shadow:0 0 0 1px #ef4444!important}.chips-input-wrapper .chips-container .chip-item{margin:0}.chips-input-wrapper .chips-container .chip-input:focus{outline:none}.chips-input-wrapper .chips-container .chip-input::placeholder{color:#6b7280;font-style:italic}.chips-input-wrapper .duplicate-message{animation:slideDown .3s ease-out}.chips-input-wrapper .duplicate-message i{font-size:14px}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}::ng-deep p-select.inline-input-select{border:1px solid #d1d5db!important;background:transparent;color:#111827;height:44px;width:100%;border-radius:.5rem;transition:all .2s ease-in-out;display:flex;align-items:center;justify-content:space-between}::ng-deep p-select.inline-input-select .p-select-label{border:none}::ng-deep p-select.inline-input-select .p-select-trigger{border:none}::ng-deep .my-app-dark p-select.inline-input-select{border:1px solid transparent!important;background:transparent;color:#f3f4f6}::ng-deep .my-app-dark p-inputnumber .p-inputnumber-input{background-color:#374151;color:#f3f4f6;border-color:transparent}::ng-deep .my-app-dark p-datepicker .p-inputtext{background-color:#374151;color:#f3f4f6}::ng-deep .my-app-dark p-multiselect .p-multiselect-label{background-color:#374151;color:#f3f4f6}\n"] }]
760
+ }], ctorParameters: () => [], propDecorators: { templates: [{
761
+ type: ContentChildren,
762
+ args: [PrimeTemplate]
763
+ }] } });
764
+
765
+ class AminatedContainerComponent {
766
+ isLoading = true;
767
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AminatedContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
768
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: AminatedContainerComponent, isStandalone: true, selector: "lib-aminated-container", ngImport: i0, template: "<div class=\"fade-in-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.fade-in-container{animation:fadeIn .8s ease-out forwards;opacity:0;transform:translateY(10px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
769
+ }
770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AminatedContainerComponent, decorators: [{
771
+ type: Component,
772
+ args: [{ selector: 'lib-aminated-container', imports: [CommonModule], template: "<div class=\"fade-in-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.fade-in-container{animation:fadeIn .8s ease-out forwards;opacity:0;transform:translateY(10px)}\n"] }]
773
+ }] });
774
+
775
+ class SpeedDialService {
776
+ panelOffset = 10;
777
+ mainButtonHost;
778
+ activeAnchor;
779
+ _isMenuOpen = signal(false);
780
+ _panelTop = signal('0px');
781
+ _panelLeft = signal('0px');
782
+ constructor() { }
783
+ _speedDialConfig = signal({});
784
+ speedDialConfig = this._speedDialConfig.asReadonly();
785
+ isMenuOpen = this._isMenuOpen.asReadonly();
786
+ panelTop = this._panelTop.asReadonly();
787
+ panelLeft = this._panelLeft.asReadonly();
788
+ setSpeedDialConfig(config) {
789
+ this._speedDialConfig.set(config);
790
+ if (this.isMenuOpen())
791
+ this.updatePanelPosition();
792
+ }
793
+ setMainButtonHost(host) {
794
+ this.mainButtonHost = host;
795
+ if (this.isMenuOpen())
796
+ this.updatePanelPosition();
797
+ }
798
+ buttons = computed(() => {
799
+ return this.speedDialConfig().buttons;
800
+ });
801
+ overlayButtons = computed(() => {
802
+ return this.buttons().map((button) => {
803
+ return {
804
+ ...button,
805
+ onClick: (data) => {
806
+ this.closeMenu();
807
+ button.onClick?.(data);
808
+ }
809
+ };
810
+ });
811
+ });
812
+ mainButton = computed(() => {
813
+ const rawMainButton = this.speedDialConfig().mainButton;
814
+ return {
815
+ ...rawMainButton,
816
+ icon: this.isMenuOpen() ? 'fa-solid fa-xmark' : rawMainButton.icon,
817
+ severity: this.isMenuOpen() ? 'danger' : rawMainButton.severity,
818
+ onClick: (data) => {
819
+ rawMainButton.onClick?.(data);
820
+ }
821
+ };
822
+ });
823
+ direction = computed(() => {
824
+ return this.speedDialConfig().direction;
825
+ });
826
+ toggleMenu(anchor) {
827
+ const nextState = !this.isMenuOpen();
828
+ this._isMenuOpen.set(nextState);
829
+ this.activeAnchor = anchor ?? this.mainButtonHost;
830
+ if (!nextState)
831
+ return;
832
+ this.updatePanelPosition();
833
+ window.addEventListener('resize', this.handleViewportChange);
834
+ window.addEventListener('scroll', this.handleViewportChange, true);
835
+ }
836
+ closeMenu() {
837
+ if (!this.isMenuOpen())
838
+ return;
839
+ this._isMenuOpen.set(false);
840
+ this.activeAnchor = undefined;
841
+ window.removeEventListener('resize', this.handleViewportChange);
842
+ window.removeEventListener('scroll', this.handleViewportChange, true);
843
+ }
844
+ destroy() {
845
+ this.closeMenu();
846
+ this.mainButtonHost = undefined;
847
+ }
848
+ handleViewportChange = () => {
849
+ if (!this.isMenuOpen())
850
+ return;
851
+ this.updatePanelPosition();
852
+ };
853
+ updatePanelPosition() {
854
+ const anchor = this.activeAnchor ?? this.mainButtonHost;
855
+ if (!anchor)
856
+ return;
857
+ const rect = anchor.getBoundingClientRect();
858
+ const fixedContainingBlock = this.getFixedContainingBlock(anchor);
859
+ const containingBlockRect = fixedContainingBlock?.getBoundingClientRect();
860
+ const offsetTop = containingBlockRect?.top ?? 0;
861
+ const offsetLeft = containingBlockRect?.left ?? 0;
862
+ switch (this.direction()) {
863
+ case 'top':
864
+ this._panelTop.set(`${rect.top - offsetTop - this.panelOffset}px`);
865
+ this._panelLeft.set(`${rect.left - offsetLeft}px`);
866
+ break;
867
+ case 'bottom':
868
+ this._panelTop.set(`${rect.bottom - offsetTop + this.panelOffset}px`);
869
+ this._panelLeft.set(`${rect.left - offsetLeft}px`);
870
+ break;
871
+ case 'left':
872
+ this._panelTop.set(`${rect.top - offsetTop}px`);
873
+ this._panelLeft.set(`${rect.left - offsetLeft - this.panelOffset}px`);
874
+ break;
875
+ case 'right':
876
+ this._panelTop.set(`${rect.top - offsetTop}px`);
877
+ this._panelLeft.set(`${rect.right - offsetLeft + this.panelOffset}px`);
878
+ break;
879
+ }
880
+ }
881
+ /**
882
+ * Detecta el ancestro que actúa como containing block para elementos fixed.
883
+ * Si existe (por transform/filter/contain/etc), el panel debe posicionarse
884
+ * relativo a ese contenedor y no al viewport.
885
+ */
886
+ getFixedContainingBlock(element) {
887
+ let current = element.parentElement;
888
+ while (current) {
889
+ const styles = window.getComputedStyle(current);
890
+ const hasTransformContext = styles.transform !== 'none' ||
891
+ styles.perspective !== 'none' ||
892
+ styles.filter !== 'none' ||
893
+ (styles.backdropFilter && styles.backdropFilter !== 'none') ||
894
+ styles.contain.includes('paint') ||
895
+ styles.contain.includes('layout') ||
896
+ styles.willChange.includes('transform') ||
897
+ styles.willChange.includes('filter') ||
898
+ styles.willChange.includes('perspective');
899
+ if (hasTransformContext) {
900
+ return current;
901
+ }
902
+ current = current.parentElement;
903
+ }
904
+ return null;
905
+ }
906
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
907
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialService, providedIn: 'root' });
908
+ }
909
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialService, decorators: [{
910
+ type: Injectable,
911
+ args: [{
912
+ providedIn: 'root'
913
+ }]
914
+ }], ctorParameters: () => [] });
915
+
916
+ class AppButtonNgService {
917
+ buttonConfig = signal({});
918
+ constructor() {
919
+ // Effect para manejar automáticamente la rotación de mensajes
920
+ effect(() => {
921
+ const config = this.buttonConfig();
922
+ if (config.loading && config.loadingMessages && config.loadingMessages.length > 1) {
923
+ this.startMessageRotation();
924
+ }
925
+ else {
926
+ this.stopMessageRotation();
927
+ }
928
+ });
929
+ }
930
+ setButtonConfig(buttonConfig) {
931
+ this.buttonConfig.set(buttonConfig);
932
+ }
933
+ // Computed público para acceder al label dinámico
934
+ label = computed(() => {
935
+ const config = this.buttonConfig();
936
+ // Si está cargando y tiene mensajes de carga, rotar entre ellos
937
+ if (config.loading && config.loadingMessages && config.loadingMessages.length > 0) {
938
+ const messages = config.loadingMessages;
939
+ const index = this.messageIndex() % messages.length; // Wrap around
940
+ return messages[index];
941
+ }
942
+ // Si no está cargando, retornar el label normal
943
+ return config.label ? config.label : '';
944
+ });
945
+ //#region Loading Messages
946
+ messageIndex = signal(0);
947
+ intervalId;
948
+ startMessageRotation() {
949
+ if (this.intervalId)
950
+ return;
951
+ this.intervalId = setInterval(() => {
952
+ this.messageIndex.update(index => index + 1);
953
+ }, 6000);
954
+ }
955
+ stopMessageRotation() {
956
+ if (this.intervalId) {
957
+ clearInterval(this.intervalId);
958
+ this.intervalId = undefined;
959
+ this.messageIndex.set(0);
960
+ }
961
+ }
962
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AppButtonNgService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
963
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AppButtonNgService, providedIn: 'root' });
964
+ }
965
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AppButtonNgService, decorators: [{
966
+ type: Injectable,
967
+ args: [{
968
+ providedIn: 'root'
969
+ }]
970
+ }], ctorParameters: () => [] });
971
+
972
+ class ButtonNgComponent {
973
+ appButtonNgService = inject(AppButtonNgService);
974
+ buttonConfig = model.required();
975
+ onClick = output();
976
+ constructor() {
977
+ effect(() => {
978
+ this.appButtonNgService.setButtonConfig(this.buttonConfig());
979
+ });
980
+ }
981
+ get label() {
982
+ return this.appButtonNgService.label();
983
+ }
984
+ onClickButton() {
985
+ if (this.buttonConfig().onClick) {
986
+ return;
987
+ }
988
+ this.onClick.emit();
989
+ }
990
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ButtonNgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
991
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: ButtonNgComponent, isStandalone: true, selector: "lib-button-ng", inputs: { buttonConfig: { classPropertyName: "buttonConfig", publicName: "buttonConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { buttonConfig: "buttonConfigChange", onClick: "onClick" }, providers: [AppButtonNgService], ngImport: i0, template: "@let config = buttonConfig(); @let tooltipConfig = buttonConfig().tooltipConfig;\r\n@if (!config.hideButton) {\r\n <div\r\n [ngClass]=\"{\r\n 'full-width-button': config.fullWidth,\r\n 'full-height-button': config.fullHeight,\r\n 'cursor-pointer': this.onClick\r\n }\"\r\n [class]=\"config.class ?? ''\"\r\n >\r\n <p-button\r\n [label]=\"config.hasTemplate ? undefined : label\"\r\n [icon]=\"config.hasTemplate ? undefined : config.icon\"\r\n [severity]=\"config.hasTemplate ? 'secondary' : config.severity\"\r\n [loading]=\"config.loading || false\"\r\n [disabled]=\"config.disabled || false\"\r\n [rounded]=\"config.rounded || false\"\r\n [raised]=\"config.raised || false\"\r\n [variant]=\"config.hasTemplate ? 'text' : config.variant\"\r\n [badge]=\"config.badge\"\r\n (onClick)=\"config?.onClick?.() ?? onClickButton()\"\r\n [size]=\"config?.size\"\r\n pTooltip=\"{{ tooltipConfig?.pTooltip }}\"\r\n [tooltipPosition]=\"tooltipConfig?.tooltipPosition ?? 'top'\"\r\n [iconPos]=\"config?.iconPos ?? 'left'\"\r\n [ngClass]=\"{\r\n 'cursor-pointer': (config.onClick || config.hasStaticClick) && !config.disabled,\r\n 'cursor-auto': !((config.onClick || config.hasStaticClick) && !config.disabled),\r\n 'no-hover-template': config.hasTemplate\r\n }\"\r\n [outlined]=\"config.outlined || false\"\r\n [text]=\"config.text || false\"\r\n >\r\n @if (config.hasTemplate) {\r\n <ng-content></ng-content>\r\n }\r\n </p-button>\r\n </div>\r\n}\r\n", styles: [".full-width-button ::ng-deep p-button button{width:100%}.full-height-button ::ng-deep p-button button{height:100%}::ng-deep .cursor-auto button{cursor:auto!important}::ng-deep .cursor-pointer button{cursor:pointer!important}::ng-deep .no-hover-template button{background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important}::ng-deep .no-hover-template button:hover,::ng-deep .no-hover-template button:focus,::ng-deep .no-hover-template button:active{background:transparent!important;border:none!important;box-shadow:none!important}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i10.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
992
+ }
993
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ButtonNgComponent, decorators: [{
994
+ type: Component,
995
+ args: [{ selector: 'lib-button-ng', imports: [
996
+ ButtonModule,
997
+ TooltipModule,
998
+ CommonModule
999
+ ], providers: [AppButtonNgService], template: "@let config = buttonConfig(); @let tooltipConfig = buttonConfig().tooltipConfig;\r\n@if (!config.hideButton) {\r\n <div\r\n [ngClass]=\"{\r\n 'full-width-button': config.fullWidth,\r\n 'full-height-button': config.fullHeight,\r\n 'cursor-pointer': this.onClick\r\n }\"\r\n [class]=\"config.class ?? ''\"\r\n >\r\n <p-button\r\n [label]=\"config.hasTemplate ? undefined : label\"\r\n [icon]=\"config.hasTemplate ? undefined : config.icon\"\r\n [severity]=\"config.hasTemplate ? 'secondary' : config.severity\"\r\n [loading]=\"config.loading || false\"\r\n [disabled]=\"config.disabled || false\"\r\n [rounded]=\"config.rounded || false\"\r\n [raised]=\"config.raised || false\"\r\n [variant]=\"config.hasTemplate ? 'text' : config.variant\"\r\n [badge]=\"config.badge\"\r\n (onClick)=\"config?.onClick?.() ?? onClickButton()\"\r\n [size]=\"config?.size\"\r\n pTooltip=\"{{ tooltipConfig?.pTooltip }}\"\r\n [tooltipPosition]=\"tooltipConfig?.tooltipPosition ?? 'top'\"\r\n [iconPos]=\"config?.iconPos ?? 'left'\"\r\n [ngClass]=\"{\r\n 'cursor-pointer': (config.onClick || config.hasStaticClick) && !config.disabled,\r\n 'cursor-auto': !((config.onClick || config.hasStaticClick) && !config.disabled),\r\n 'no-hover-template': config.hasTemplate\r\n }\"\r\n [outlined]=\"config.outlined || false\"\r\n [text]=\"config.text || false\"\r\n >\r\n @if (config.hasTemplate) {\r\n <ng-content></ng-content>\r\n }\r\n </p-button>\r\n </div>\r\n}\r\n", styles: [".full-width-button ::ng-deep p-button button{width:100%}.full-height-button ::ng-deep p-button button{height:100%}::ng-deep .cursor-auto button{cursor:auto!important}::ng-deep .cursor-pointer button{cursor:pointer!important}::ng-deep .no-hover-template button{background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important}::ng-deep .no-hover-template button:hover,::ng-deep .no-hover-template button:focus,::ng-deep .no-hover-template button:active{background:transparent!important;border:none!important;box-shadow:none!important}\n"] }]
1000
+ }], ctorParameters: () => [] });
1001
+
1002
+ class SpeedDialComponent {
1003
+ mainButtonContainer;
1004
+ speedDialConfig = input.required();
1005
+ speedDialService = inject(SpeedDialService);
1006
+ constructor() {
1007
+ effect(() => {
1008
+ this.speedDialService.setSpeedDialConfig(this.speedDialConfig());
1009
+ });
1010
+ }
1011
+ get buttons() {
1012
+ return this.speedDialService.buttons();
1013
+ }
1014
+ get overlayButtons() {
1015
+ return this.speedDialService.overlayButtons();
1016
+ }
1017
+ get mainButton() {
1018
+ return this.speedDialService.mainButton();
1019
+ }
1020
+ get isMenuOpen() {
1021
+ return this.speedDialService.isMenuOpen();
1022
+ }
1023
+ get panelTop() {
1024
+ return this.speedDialService.panelTop();
1025
+ }
1026
+ get panelLeft() {
1027
+ return this.speedDialService.panelLeft();
1028
+ }
1029
+ get direction() {
1030
+ return this.speedDialService.direction();
1031
+ }
1032
+ ngAfterViewInit() {
1033
+ const hostElement = this.mainButtonContainer?.nativeElement;
1034
+ if (!hostElement)
1035
+ return;
1036
+ this.speedDialService.setMainButtonHost(hostElement);
1037
+ }
1038
+ ngOnDestroy() {
1039
+ this.speedDialService.destroy();
1040
+ }
1041
+ closeMenu() {
1042
+ this.speedDialService.closeMenu();
1043
+ }
1044
+ onMainButtonClick(event) {
1045
+ const target = event.target;
1046
+ const anchor = target?.closest('button,[role="button"]');
1047
+ this.speedDialService.toggleMenu(anchor ?? this.mainButtonContainer?.nativeElement);
1048
+ }
1049
+ stopPropagation(event) {
1050
+ event.stopPropagation();
1051
+ }
1052
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1053
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SpeedDialComponent, isStandalone: true, selector: "lib-speed-dial", inputs: { speedDialConfig: { classPropertyName: "speedDialConfig", publicName: "speedDialConfig", isSignal: true, isRequired: true, transformFunction: null } }, providers: [SpeedDialService], viewQueries: [{ propertyName: "mainButtonContainer", first: true, predicate: ["mainButtonContainer"], descendants: true }], ngImport: i0, template: "<div\r\n #mainButtonContainer\r\n class=\"speed-dial-main-button\"\r\n [class.speed-dial-main-button--open]=\"isMenuOpen\"\r\n (click)=\"onMainButtonClick($event)\"\r\n>\r\n <lib-button-ng [buttonConfig]=\"mainButton\"></lib-button-ng>\r\n</div>\r\n\r\n@if (isMenuOpen) {\r\n <div class=\"speed-dial-overlay\" (click)=\"closeMenu()\">\r\n <div\r\n class=\"speed-dial-panel bg-gray-100 dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-lg\"\r\n [style.top]=\"panelTop\"\r\n [style.left]=\"panelLeft\"\r\n (click)=\"stopPropagation($event)\"\r\n [ngClass]=\"{\r\n 'speed-dial-panel--top': direction === 'top',\r\n 'speed-dial-panel--bottom': direction === 'bottom',\r\n 'speed-dial-panel--left': direction === 'left',\r\n 'speed-dial-panel--right': direction === 'right'\r\n }\"\r\n >\r\n @for (button of overlayButtons; track $index) {\r\n <lib-button-ng [buttonConfig]=\"button\"></lib-button-ng>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [".speed-dial-main-button{display:inline-flex}.speed-dial-main-button--open{position:relative;z-index:2147483647}.speed-dial-overlay{position:fixed;inset:0;z-index:2147483645}.speed-dial-panel{position:fixed;z-index:2147483646;display:flex;gap:.5rem;overflow:auto;padding:.75rem;border-radius:.75rem;background:#fff;box-shadow:0 10px 30px #0f172a40}.speed-dial-panel--top{flex-direction:column;max-width:22rem;max-height:30rem;transform:translateY(-100%)}.speed-dial-panel--bottom{flex-direction:column;max-width:22rem;max-height:30rem}.speed-dial-panel--left{flex-direction:row;max-width:40rem;max-height:8rem;transform:translate(-100%)}.speed-dial-panel--right{flex-direction:row;max-width:40rem;max-height:8rem}:host-context(.dark) .speed-dial-panel{background:#111827}\n"], dependencies: [{ kind: "component", type: ButtonNgComponent, selector: "lib-button-ng", inputs: ["buttonConfig"], outputs: ["buttonConfigChange", "onClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1054
+ }
1055
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialComponent, decorators: [{
1056
+ type: Component,
1057
+ args: [{ selector: 'lib-speed-dial', imports: [ButtonNgComponent, CommonModule], providers: [SpeedDialService], template: "<div\r\n #mainButtonContainer\r\n class=\"speed-dial-main-button\"\r\n [class.speed-dial-main-button--open]=\"isMenuOpen\"\r\n (click)=\"onMainButtonClick($event)\"\r\n>\r\n <lib-button-ng [buttonConfig]=\"mainButton\"></lib-button-ng>\r\n</div>\r\n\r\n@if (isMenuOpen) {\r\n <div class=\"speed-dial-overlay\" (click)=\"closeMenu()\">\r\n <div\r\n class=\"speed-dial-panel bg-gray-100 dark:bg-gray-900 border border-gray-200 dark:border-gray-800 rounded-lg\"\r\n [style.top]=\"panelTop\"\r\n [style.left]=\"panelLeft\"\r\n (click)=\"stopPropagation($event)\"\r\n [ngClass]=\"{\r\n 'speed-dial-panel--top': direction === 'top',\r\n 'speed-dial-panel--bottom': direction === 'bottom',\r\n 'speed-dial-panel--left': direction === 'left',\r\n 'speed-dial-panel--right': direction === 'right'\r\n }\"\r\n >\r\n @for (button of overlayButtons; track $index) {\r\n <lib-button-ng [buttonConfig]=\"button\"></lib-button-ng>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [".speed-dial-main-button{display:inline-flex}.speed-dial-main-button--open{position:relative;z-index:2147483647}.speed-dial-overlay{position:fixed;inset:0;z-index:2147483645}.speed-dial-panel{position:fixed;z-index:2147483646;display:flex;gap:.5rem;overflow:auto;padding:.75rem;border-radius:.75rem;background:#fff;box-shadow:0 10px 30px #0f172a40}.speed-dial-panel--top{flex-direction:column;max-width:22rem;max-height:30rem;transform:translateY(-100%)}.speed-dial-panel--bottom{flex-direction:column;max-width:22rem;max-height:30rem}.speed-dial-panel--left{flex-direction:row;max-width:40rem;max-height:8rem;transform:translate(-100%)}.speed-dial-panel--right{flex-direction:row;max-width:40rem;max-height:8rem}:host-context(.dark) .speed-dial-panel{background:#111827}\n"] }]
1058
+ }], ctorParameters: () => [], propDecorators: { mainButtonContainer: [{
1059
+ type: ViewChild,
1060
+ args: ['mainButtonContainer']
1061
+ }] } });
1062
+
1063
+ class KeyToDisplayNamePipe {
1064
+ transform(key, keysNames) {
1065
+ return keysNames?.[key] ?? key;
1066
+ }
1067
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: KeyToDisplayNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1068
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: KeyToDisplayNamePipe, isStandalone: true, name: "keyToDisplayName" });
1069
+ }
1070
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: KeyToDisplayNamePipe, decorators: [{
1071
+ type: Pipe,
1072
+ args: [{
1073
+ name: 'keyToDisplayName'
1074
+ }]
1075
+ }] });
1076
+
1077
+ /**
1078
+ * Utilidades para manejar errores de API según la interfaz IApiError
1079
+ */
1080
+ class ApiErrorUtil {
1081
+ /**
1082
+ * Procesa errores de API y extrae el mensaje según la interfaz IApiError
1083
+ * @param error - El error HTTP recibido
1084
+ * @param fallbackMessage - Mensaje por defecto si no se puede extraer el mensaje del error
1085
+ * @returns El mensaje de error procesado
1086
+ */
1087
+ static handleApiError(error, fallbackMessage) {
1088
+ const apiError = error.error;
1089
+ const errorMessage = Array.isArray(apiError?.message)
1090
+ ? apiError.message.join(', ')
1091
+ : apiError?.message ?? fallbackMessage;
1092
+ return errorMessage;
1093
+ }
1094
+ /**
1095
+ * Procesa errores de API con información detallada de campos
1096
+ * y muestra tanto el mensaje general como los errores específicos de campo
1097
+ * @param error - El error HTTP recibido
1098
+ * @param fallbackMessage - Mensaje por defecto si no se puede extraer el mensaje del error
1099
+ * @returns El mensaje de error procesado con información de campos si está disponible
1100
+ */
1101
+ static handleApiErrorWithFields(error, fallbackMessage) {
1102
+ const apiError = error.error;
1103
+ let errorMessage = Array.isArray(apiError?.message)
1104
+ ? apiError.message.join(', ')
1105
+ : apiError?.message ?? fallbackMessage;
1106
+ // Si hay errores de campo específicos, los agregamos al mensaje
1107
+ if (apiError?.errors && apiError.errors.length > 0) {
1108
+ const fieldErrors = apiError.errors
1109
+ .map(fieldError => `${fieldError.field}: ${fieldError.message}`)
1110
+ .join(', ');
1111
+ errorMessage = `${errorMessage}. Errores de campos: ${fieldErrors}`;
1112
+ }
1113
+ return errorMessage;
1114
+ }
1115
+ /**
1116
+ * Obtiene solo los errores de campo específicos
1117
+ * @param error - El error HTTP recibido
1118
+ * @returns Array de errores de campo o array vacío si no hay errores
1119
+ */
1120
+ static getFieldErrors(error) {
1121
+ const apiError = error.error;
1122
+ return apiError?.errors ?? [];
1123
+ }
1124
+ /**
1125
+ * Verifica si el error tiene errores de campo específicos
1126
+ * @param error - El error HTTP recibido
1127
+ * @returns true si hay errores de campo, false en caso contrario
1128
+ */
1129
+ static hasFieldErrors(error) {
1130
+ const apiError = error.error;
1131
+ return apiError?.errors && apiError.errors.length > 0;
1132
+ }
1133
+ /**
1134
+ * Obtiene el código de error específico
1135
+ * @param error - El error HTTP recibido
1136
+ * @returns El código de error o undefined si no está disponible
1137
+ */
1138
+ static getErrorCode(error) {
1139
+ const apiError = error.error;
1140
+ return apiError?.errorCode;
1141
+ }
1142
+ /**
1143
+ * Obtiene el timestamp del error
1144
+ * @param error - El error HTTP recibido
1145
+ * @returns El timestamp del error o undefined si no está disponible
1146
+ */
1147
+ static getErrorTimestamp(error) {
1148
+ const apiError = error.error;
1149
+ return apiError?.timestamp;
1150
+ }
1151
+ }
1152
+
1153
+ class CookieUtil {
1154
+ /**
1155
+ * Obtiene el valor de una cookie por su nombre
1156
+ * @param name - Nombre de la cookie
1157
+ * @returns El valor de la cookie o null si no existe
1158
+ */
1159
+ static getCookie(name) {
1160
+ if (typeof document === 'undefined') {
1161
+ return null;
1162
+ }
1163
+ const nameEQ = name + '=';
1164
+ const ca = document.cookie.split(';');
1165
+ for (let i = 0; i < ca.length; i++) {
1166
+ let c = ca[i];
1167
+ while (c.charAt(0) === ' ') {
1168
+ c = c.substring(1, c.length);
1169
+ }
1170
+ if (c.indexOf(nameEQ) === 0) {
1171
+ return c.substring(nameEQ.length, c.length);
1172
+ }
1173
+ }
1174
+ return null;
1175
+ }
1176
+ /**
1177
+ * Establece una cookie
1178
+ * @param name - Nombre de la cookie
1179
+ * @param value - Valor de la cookie
1180
+ * @param days - Días hasta que expire (por defecto 365)
1181
+ * @param path - Ruta de la cookie (por defecto '/')
1182
+ */
1183
+ static setCookie(name, value, days = 365, path = '/') {
1184
+ if (typeof document === 'undefined') {
1185
+ return;
1186
+ }
1187
+ let expires = '';
1188
+ if (days) {
1189
+ const date = new Date();
1190
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
1191
+ expires = '; expires=' + date.toUTCString();
1192
+ }
1193
+ document.cookie = name + '=' + (value || '') + expires + '; path=' + path;
1194
+ }
1195
+ /**
1196
+ * Elimina una cookie
1197
+ * @param name - Nombre de la cookie a eliminar
1198
+ * @param path - Ruta de la cookie (por defecto '/')
1199
+ */
1200
+ static eraseCookie(name, path = '/') {
1201
+ if (typeof document === 'undefined') {
1202
+ return;
1203
+ }
1204
+ document.cookie = name + '=; Path=' + path + '; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
1205
+ }
1206
+ /**
1207
+ * Obtiene un valor booleano desde una cookie
1208
+ * @param name - Nombre de la cookie
1209
+ * @param defaultValue - Valor por defecto si la cookie no existe
1210
+ * @returns El valor booleano
1211
+ */
1212
+ static getBooleanCookie(name, defaultValue = false) {
1213
+ const value = this.getCookie(name);
1214
+ if (value === null) {
1215
+ return defaultValue;
1216
+ }
1217
+ return value === 'true';
1218
+ }
1219
+ /**
1220
+ * Establece un valor booleano en una cookie
1221
+ * @param name - Nombre de la cookie
1222
+ * @param value - Valor booleano
1223
+ * @param days - Días hasta que expire (por defecto 365)
1224
+ * @param path - Ruta de la cookie (por defecto '/')
1225
+ */
1226
+ static setBooleanCookie(name, value, days = 365, path = '/') {
1227
+ this.setCookie(name, value.toString(), days, path);
1228
+ }
1229
+ }
1230
+
1231
+ const formatCurrency = (amount, currency) => {
1232
+ return new Intl.NumberFormat('es-CO', {
1233
+ style: 'currency',
1234
+ currency: currency || 'COP'
1235
+ }).format(amount);
1236
+ };
1237
+
1238
+ const isSameDay = (date1, date2) => {
1239
+ const date1Copy = new Date(date1.setHours(0, 0, 0, 0));
1240
+ const date2Copy = new Date(date2.setHours(0, 0, 0, 0));
1241
+ return date1Copy.getTime() === date2Copy.getTime();
1242
+ };
1243
+ const formatDateDMA = (date) => {
1244
+ return new Date(date).toLocaleDateString('es-CO', {
1245
+ year: 'numeric',
1246
+ month: '2-digit',
1247
+ day: '2-digit'
1248
+ });
1249
+ };
1250
+ // Crea una funcion que tambien muestre la hora
1251
+ const formatDateDMAWithTime = (date) => {
1252
+ return new Date(date).toLocaleDateString('es-CO', {
1253
+ year: 'numeric',
1254
+ month: '2-digit',
1255
+ day: '2-digit',
1256
+ hour: '2-digit',
1257
+ minute: '2-digit'
1258
+ });
1259
+ };
1260
+
1261
+ /**
1262
+ * Enum con los tipos de archivos más relevantes para la aplicación
1263
+ */
1264
+ var EFileType;
1265
+ (function (EFileType) {
1266
+ // Documentos
1267
+ EFileType["PDF"] = "application/pdf";
1268
+ EFileType["DOC"] = "application/msword";
1269
+ EFileType["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
1270
+ EFileType["XLS"] = "application/vnd.ms-excel";
1271
+ EFileType["XLSX"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
1272
+ EFileType["PPT"] = "application/vnd.ms-powerpoint";
1273
+ EFileType["PPTX"] = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
1274
+ EFileType["TXT"] = "text/plain";
1275
+ EFileType["RTF"] = "application/rtf";
1276
+ // Imágenes
1277
+ EFileType["JPG"] = "image/jpeg";
1278
+ EFileType["PNG"] = "image/png";
1279
+ EFileType["GIF"] = "image/gif";
1280
+ EFileType["BMP"] = "image/bmp";
1281
+ EFileType["SVG"] = "image/svg+xml";
1282
+ EFileType["WEBP"] = "image/webp";
1283
+ // Archivos comprimidos
1284
+ EFileType["ZIP"] = "application/zip";
1285
+ EFileType["RAR"] = "application/vnd.rar";
1286
+ EFileType["TAR"] = "application/x-tar";
1287
+ EFileType["GZ"] = "application/gzip";
1288
+ // Archivos de datos
1289
+ EFileType["CSV"] = "text/csv";
1290
+ EFileType["JSON"] = "application/json";
1291
+ EFileType["XML"] = "application/xml";
1292
+ // Archivos de audio
1293
+ EFileType["MP3"] = "audio/mpeg";
1294
+ EFileType["WAV"] = "audio/wav";
1295
+ EFileType["OGG"] = "audio/ogg";
1296
+ // Archivos de video
1297
+ EFileType["MP4"] = "video/mp4";
1298
+ EFileType["AVI"] = "video/x-msvideo";
1299
+ EFileType["MOV"] = "video/quicktime";
1300
+ EFileType["WMV"] = "video/x-ms-wmv";
1301
+ // Todos los tipos de imagen
1302
+ EFileType["ALL_IMAGES"] = "image/*";
1303
+ // Todos los tipos de documento
1304
+ EFileType["ALL_DOCUMENTS"] = "application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,text/plain,application/rtf";
1305
+ // Todos los tipos de archivo
1306
+ EFileType["ALL_FILES"] = "*/*";
1307
+ })(EFileType || (EFileType = {}));
1308
+ /**
1309
+ * Método mejorado para abrir el selector de archivos
1310
+ * @param options - Opciones para configurar el input de archivo
1311
+ */
1312
+ const triggerFileInput = (options = {}) => {
1313
+ const { accept = EFileType.ALL_FILES, multiple = false, onFileSelected } = options;
1314
+ const input = document.createElement('input');
1315
+ input.type = 'file';
1316
+ input.accept = accept;
1317
+ input.multiple = multiple;
1318
+ input.style.display = 'none';
1319
+ input.onchange = (event) => {
1320
+ const target = event.target;
1321
+ const files = target.files;
1322
+ if (files && files.length > 0 && onFileSelected) {
1323
+ if (multiple) {
1324
+ // Si es múltiple, llamar al callback con todos los archivos
1325
+ Array.from(files).forEach(file => {
1326
+ onFileSelected(file);
1327
+ });
1328
+ }
1329
+ else {
1330
+ // Si es único, llamar al callback con el primer archivo
1331
+ const file = files[0];
1332
+ onFileSelected(file);
1333
+ }
1334
+ }
1335
+ document.body.removeChild(input);
1336
+ };
1337
+ document.body.appendChild(input);
1338
+ input.click();
1339
+ };
1340
+ /**
1341
+ * Función para capturar una foto usando la cámara
1342
+ */
1343
+ const capturePhotoFromCamera = async (options = {}) => {
1344
+ const { quality = 0.9, facingMode = 'environment', onPhotoTaken, onError } = options;
1345
+ try {
1346
+ if (!navigator.mediaDevices?.getUserMedia) {
1347
+ throw new Error('Cámara no soportada en este navegador');
1348
+ }
1349
+ const stream = await navigator.mediaDevices.getUserMedia({
1350
+ video: { facingMode }
1351
+ });
1352
+ const video = document.createElement('video');
1353
+ const canvas = document.createElement('canvas');
1354
+ const context = canvas.getContext('2d');
1355
+ // Crear modal
1356
+ const modal = document.createElement('div');
1357
+ modal.style.cssText = `
1358
+ position: fixed; top: 0; left: 0; width: 100%; height: 100%;
1359
+ background: rgba(0,0,0,0.9); display: flex; flex-direction: column;
1360
+ align-items: center; justify-content: center; z-index: 10000;
1361
+ `;
1362
+ video.style.cssText = 'width: 80%; max-width: 500px; border-radius: 8px;';
1363
+ video.srcObject = stream;
1364
+ video.autoplay = true;
1365
+ video.playsInline = true;
1366
+ const buttonsDiv = document.createElement('div');
1367
+ buttonsDiv.style.cssText = 'display: flex; gap: 20px; margin-top: 20px;';
1368
+ const captureBtn = document.createElement('button');
1369
+ captureBtn.textContent = 'Tomar Foto';
1370
+ captureBtn.style.cssText = `
1371
+ padding: 12px 24px; background: #007bff; color: white;
1372
+ border: none; border-radius: 6px; cursor: pointer; font-size: 16px;
1373
+ `;
1374
+ const cancelBtn = document.createElement('button');
1375
+ cancelBtn.textContent = 'Cancelar';
1376
+ cancelBtn.style.cssText = `
1377
+ padding: 12px 24px; background: #6c757d; color: white;
1378
+ border: none; border-radius: 6px; cursor: pointer; font-size: 16px;
1379
+ `;
1380
+ const cleanup = () => {
1381
+ stream.getTracks().forEach(track => track.stop());
1382
+ modal.remove();
1383
+ };
1384
+ captureBtn.onclick = () => {
1385
+ canvas.width = video.videoWidth;
1386
+ canvas.height = video.videoHeight;
1387
+ context.drawImage(video, 0, 0);
1388
+ canvas.toBlob((blob) => {
1389
+ if (blob && onPhotoTaken) {
1390
+ const file = new File([blob], `photo-${Date.now()}.jpg`, { type: 'image/jpeg' });
1391
+ onPhotoTaken(file);
1392
+ }
1393
+ cleanup();
1394
+ }, 'image/jpeg', quality);
1395
+ };
1396
+ cancelBtn.onclick = cleanup;
1397
+ document.addEventListener('keydown', (e) => {
1398
+ if (e.key === 'Escape')
1399
+ cleanup();
1400
+ });
1401
+ buttonsDiv.append(captureBtn, cancelBtn);
1402
+ modal.append(video, buttonsDiv);
1403
+ document.body.appendChild(modal);
1404
+ }
1405
+ catch (error) {
1406
+ if (onError)
1407
+ onError(error);
1408
+ }
1409
+ };
1410
+ var EFileIcons;
1411
+ (function (EFileIcons) {
1412
+ EFileIcons["FILE"] = "file";
1413
+ EFileIcons["IMAGE"] = "image";
1414
+ EFileIcons["VIDEO"] = "video";
1415
+ EFileIcons["FOLDER"] = "folder";
1416
+ EFileIcons["EXCEL"] = "excel";
1417
+ EFileIcons["SIGNATURE"] = "signature";
1418
+ EFileIcons["CONTRACT"] = "contract";
1419
+ EFileIcons["FINGERPRINT"] = "fingerprint";
1420
+ EFileIcons["ID_CARD"] = "id_card";
1421
+ EFileIcons["FILE_BOX"] = "file_box";
1422
+ EFileIcons["SECURE_BUILDING"] = "secure_building";
1423
+ EFileIcons["POLICE"] = "police";
1424
+ })(EFileIcons || (EFileIcons = {}));
1425
+ const DocumentIcon = {
1426
+ [EFileIcons.FILE]: 'fa-solid fa-file-lines',
1427
+ [EFileIcons.IMAGE]: 'fa-solid fa-file-image',
1428
+ [EFileIcons.VIDEO]: 'fa-solid fa-file-video',
1429
+ [EFileIcons.FOLDER]: 'fa-solid fa-folder',
1430
+ [EFileIcons.EXCEL]: 'fa-solid fa-file-excel',
1431
+ [EFileIcons.SIGNATURE]: 'fa-solid fa-signature',
1432
+ [EFileIcons.CONTRACT]: 'fa-solid fa-file-contract',
1433
+ [EFileIcons.FINGERPRINT]: 'fa-solid fa-fingerprint',
1434
+ [EFileIcons.ID_CARD]: 'fa-solid fa-id-card',
1435
+ [EFileIcons.SECURE_BUILDING]: 'fa-solid fa-building-shield',
1436
+ [EFileIcons.POLICE]: 'fa-solid fa-hand-middle-finger',
1437
+ [EFileIcons.FILE_BOX]: 'fa-solid fa-box-archive'
1438
+ };
1439
+ const downloadFile = (blob, fileName) => {
1440
+ const url = window.URL.createObjectURL(blob);
1441
+ const link = document.createElement('a');
1442
+ link.href = url;
1443
+ link.download = fileName;
1444
+ document.body.appendChild(link);
1445
+ link.click();
1446
+ document.body.removeChild(link);
1447
+ window.URL.revokeObjectURL(url);
1448
+ };
1449
+
1450
+ //sin uuid, codigo propio
1451
+ const generateId = () => {
1452
+ return Date.now().toString(36) + Math.random().toString(36).substring(2, 15);
1453
+ };
1454
+
1455
+ const formatNumber = (number) => {
1456
+ return new Intl.NumberFormat('es-CO', {
1457
+ minimumFractionDigits: 2,
1458
+ maximumFractionDigits: 2
1459
+ }).format(number);
1460
+ };
1461
+ const fixedNumber = (number) => {
1462
+ return Number(number.toFixed(2));
1463
+ };
1464
+
1465
+ const hasValues = (obj) => {
1466
+ return Object.values(obj).some(value => value !== null && value !== undefined);
1467
+ };
1468
+ /**
1469
+ * Elimina las propiedades de un objeto que tengan valores null o undefined.
1470
+ * Retorna un nuevo objeto sin mutar el original.
1471
+ * @param obj - Objeto del cual se eliminarán las propiedades null/undefined
1472
+ * @returns Nuevo objeto sin las propiedades con valores null o undefined
1473
+ */
1474
+ const removeNullUndefined = (obj) => {
1475
+ const result = {};
1476
+ Object.keys(obj).forEach(key => {
1477
+ const value = obj[key];
1478
+ if (value !== null && value !== undefined) {
1479
+ result[key] = value;
1480
+ }
1481
+ });
1482
+ return result;
1483
+ };
1484
+ /**
1485
+ * Realiza un upsert en un array de strings. Si el string ya existe, no hace nada.
1486
+ * Si no existe, lo agrega al array.
1487
+ * @param targetArray - Array de strings donde se realizará el upsert
1488
+ * @param value - String o array de strings a insertar
1489
+ * @returns Array actualizado con los nuevos valores
1490
+ */
1491
+ const upsertArrayStrings = (targetArray, value) => {
1492
+ // Crear una copia del array original para evitar mutaciones
1493
+ const result = [...targetArray];
1494
+ // Convertir el valor a array para procesamiento uniforme
1495
+ const valuesToInsert = Array.isArray(value) ? value : [value];
1496
+ // Procesar cada valor
1497
+ valuesToInsert.forEach(stringValue => {
1498
+ // Solo agregar si no existe en el array
1499
+ if (!result.includes(stringValue)) {
1500
+ result.push(stringValue);
1501
+ }
1502
+ });
1503
+ return result;
1504
+ };
1505
+ const sameArray = (arr1, arr2) => {
1506
+ if (arr1.length !== arr2.length)
1507
+ return false;
1508
+ const sorted1 = Array.from(arr1).sort();
1509
+ const sorted2 = Array.from(arr2).sort();
1510
+ return sorted1.every((item, index) => item === sorted2[index]);
1511
+ };
1512
+ const getOptionByCode = (options, code) => {
1513
+ if (!code)
1514
+ return undefined;
1515
+ return options.find((item) => item.code === code);
1516
+ };
1517
+ const createEnumeratedList = (items) => {
1518
+ if (items.length === 0) {
1519
+ return '';
1520
+ }
1521
+ if (items.length === 1) {
1522
+ return `1. ${items[0]}`;
1523
+ }
1524
+ return items
1525
+ .map((item, index) => `${index + 1}. ${item}`)
1526
+ .join('\n');
1527
+ };
1528
+
1529
+ class PrimeNgUtil {
1530
+ static isPrimeNgSelection(value) {
1531
+ return typeof value === 'object' && value !== null && 'name' in value && 'code' in value;
1532
+ }
1533
+ }
1534
+
1535
+ class BadgeNgComponent {
1536
+ config = model.required();
1537
+ get value() {
1538
+ return this.config().value;
1539
+ }
1540
+ get severity() {
1541
+ return this.config().severity;
1542
+ }
1543
+ get badgeSize() {
1544
+ return this.config().badgeSize ?? 'small';
1545
+ }
1546
+ get fullWidth() {
1547
+ return this.config().fullWidth ?? true;
1548
+ }
1549
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BadgeNgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1550
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: BadgeNgComponent, isStandalone: true, selector: "lib-badge-ng", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { config: "configChange" }, ngImport: i0, template: "<p-badge\r\n [style]=\"{\r\n textAlign: 'center',\r\n width: fullWidth ? '100%' : 'auto'\r\n }\"\r\n [value]=\"value\"\r\n [severity]=\"severity\"\r\n [badgeSize]=\"badgeSize\"\r\n/>\r\n", dependencies: [{ kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i1$3.Badge, selector: "p-badge", inputs: ["styleClass", "style", "badgeSize", "size", "severity", "value", "badgeDisabled"] }] });
1551
+ }
1552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BadgeNgComponent, decorators: [{
1553
+ type: Component,
1554
+ args: [{ selector: 'lib-badge-ng', imports: [BadgeModule], template: "<p-badge\r\n [style]=\"{\r\n textAlign: 'center',\r\n width: fullWidth ? '100%' : 'auto'\r\n }\"\r\n [value]=\"value\"\r\n [severity]=\"severity\"\r\n [badgeSize]=\"badgeSize\"\r\n/>\r\n" }]
1555
+ }] });
1556
+
1557
+ class ToolbarNgComponent {
1558
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToolbarNgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1559
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ToolbarNgComponent, isStandalone: true, selector: "lib-toolbar-ng", ngImport: i0, template: "<p-toolbar class=\"border-0 bg-transparent\">\r\n <ng-template pTemplate=\"start\">\r\n <ng-content select=\"[toolbarStart]\"></ng-content>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"center\">\r\n <ng-content select=\"[toolbarCenter]\"></ng-content>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"end\">\r\n <ng-content select=\"[toolbarEnd]\"></ng-content>\r\n </ng-template>\r\n</p-toolbar>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i1$4.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: i4$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] });
1560
+ }
1561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToolbarNgComponent, decorators: [{
1562
+ type: Component,
1563
+ args: [{ selector: 'lib-toolbar-ng', imports: [
1564
+ ToolbarModule
1565
+ ], template: "<p-toolbar class=\"border-0 bg-transparent\">\r\n <ng-template pTemplate=\"start\">\r\n <ng-content select=\"[toolbarStart]\"></ng-content>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"center\">\r\n <ng-content select=\"[toolbarCenter]\"></ng-content>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"end\">\r\n <ng-content select=\"[toolbarEnd]\"></ng-content>\r\n </ng-template>\r\n</p-toolbar>\r\n" }]
1566
+ }] });
1567
+
1568
+ // services/dialog.service.ts
1569
+ class CustomDialogService {
1570
+ dialogRef;
1571
+ dialogService = inject(DialogService);
1572
+ constructor() { }
1573
+ open(component, options = {}) {
1574
+ const defaultConfig = {
1575
+ closable: true,
1576
+ header: options.header || '',
1577
+ width: options.width || '50%',
1578
+ height: options.height || 'auto',
1579
+ closeOnEscape: options.closeOnEscape ?? true,
1580
+ baseZIndex: options.baseZIndex || 10000,
1581
+ maximizable: options.maximizable ?? true,
1582
+ data: options.data || {},
1583
+ style: {
1584
+ borderRadius: '8px',
1585
+ ...options.style
1586
+ },
1587
+ modal: true
1588
+ };
1589
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
1590
+ this.dialogRef = this.dialogService.open(component, defaultConfig);
1591
+ return this.dialogRef;
1592
+ }
1593
+ close(result) {
1594
+ if (this.dialogRef) {
1595
+ this.dialogRef.close(result);
1596
+ }
1597
+ }
1598
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1599
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomDialogService, providedIn: 'root' });
1600
+ }
1601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CustomDialogService, decorators: [{
1602
+ type: Injectable,
1603
+ args: [{
1604
+ providedIn: 'root'
1605
+ }]
1606
+ }], ctorParameters: () => [] });
1607
+
1608
+ class BaseDialogComponent {
1609
+ destroy$ = new Subject();
1610
+ data;
1611
+ ref = inject(DynamicDialogRef);
1612
+ config = inject(DynamicDialogConfig);
1613
+ constructor() {
1614
+ this.data = this.config.data;
1615
+ }
1616
+ ngOnDestroy() {
1617
+ this.destroy$.next();
1618
+ this.destroy$.complete();
1619
+ }
1620
+ close(result) {
1621
+ this.ref.close(result);
1622
+ }
1623
+ dismiss() {
1624
+ this.ref.close({ success: false });
1625
+ }
1626
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BaseDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1627
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: BaseDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
1628
+ }
1629
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: BaseDialogComponent, decorators: [{
1630
+ type: Component,
1631
+ args: [{
1632
+ standalone: true,
1633
+ template: ''
1634
+ }]
1635
+ }], ctorParameters: () => [] });
1636
+
1637
+ const pickListConstant = (e, element) => {
1638
+ if (e.id === element?.id) {
1639
+ e.isSelected = !e.isSelected;
1640
+ if (e.isSelected) {
1641
+ delete e.buttonConfig.variant;
1642
+ delete e.buttonConfig.raised;
1643
+ }
1644
+ else {
1645
+ e.buttonConfig.variant = 'outlined';
1646
+ e.buttonConfig.raised = true;
1647
+ }
1648
+ }
1649
+ };
1650
+
1651
+ class ContainerElementsComponent {
1652
+ cols = input(3);
1653
+ elements = model([]);
1654
+ severityButton = input('contrast');
1655
+ outputElements = output();
1656
+ constructor() {
1657
+ }
1658
+ ngOnInit() {
1659
+ this.elements.update((elements) => {
1660
+ elements.forEach((e) => {
1661
+ // Si e.isSelected es true, se elimina el variant y raised
1662
+ if (e.isSelected) {
1663
+ delete e.buttonConfig.variant;
1664
+ delete e.buttonConfig.raised;
1665
+ }
1666
+ else {
1667
+ e.buttonConfig.variant = 'outlined';
1668
+ e.buttonConfig.raised = true;
1669
+ }
1670
+ e.buttonConfig = {
1671
+ ...e.buttonConfig,
1672
+ fullWidth: true,
1673
+ fullHeight: true,
1674
+ hasStaticClick: true,
1675
+ severity: this.severityButton()
1676
+ };
1677
+ });
1678
+ return [...elements];
1679
+ });
1680
+ }
1681
+ containerClass = computed(() => 'w-[45%] flex flex-col shadow-md bg-white dark:bg-gray-800 rounded-xl h-full overflow-y-auto');
1682
+ titleClass = computed(() => 'text-lg font-bold self-center text-center');
1683
+ containerElementsClass = computed(() => `grid grid-cols-${this.cols() ?? 3} gap-2 p-2`);
1684
+ getButtonConfig(buttonConfig) {
1685
+ return { ...buttonConfig, fullWidth: true, severity: this.severityButton(), hasStaticClick: true };
1686
+ }
1687
+ onButtonClick(element) {
1688
+ this.elements.update((elements) => {
1689
+ elements.forEach((e) => {
1690
+ pickListConstant(e, element);
1691
+ });
1692
+ return [...elements];
1693
+ });
1694
+ this.outputElements.emit([...this.elements()]);
1695
+ }
1696
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ContainerElementsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1697
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: ContainerElementsComponent, isStandalone: true, selector: "lib-container-elements", inputs: { cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, elements: { classPropertyName: "elements", publicName: "elements", isSignal: true, isRequired: false, transformFunction: null }, severityButton: { classPropertyName: "severityButton", publicName: "severityButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { elements: "elementsChange", outputElements: "outputElements" }, ngImport: i0, template: "<div class=\"h-full w-full\" [class]=\"containerClass()\">\r\n <div class=\"dynamic-grid\" [style.--grid-cols]=\"cols()\">\r\n @for (element of elements(); track element.id) {\r\n <div class=\"grid-item\">\r\n @if (element.buttonConfig) {\r\n <lib-button-ng [(buttonConfig)]=\"element.buttonConfig\" (onClick)=\"onButtonClick(element)\"></lib-button-ng>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>", styles: [".dynamic-grid{display:grid;gap:.5rem;padding:.5rem;grid-template-columns:repeat(var(--grid-cols, 3),1fr)}.grid-item{border-radius:.375rem;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}\n"], dependencies: [{ kind: "component", type: ButtonNgComponent, selector: "lib-button-ng", inputs: ["buttonConfig"], outputs: ["buttonConfigChange", "onClick"] }, { kind: "ngmodule", type: CommonModule }] });
1698
+ }
1699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ContainerElementsComponent, decorators: [{
1700
+ type: Component,
1701
+ args: [{ selector: 'lib-container-elements', imports: [ButtonNgComponent, CommonModule], template: "<div class=\"h-full w-full\" [class]=\"containerClass()\">\r\n <div class=\"dynamic-grid\" [style.--grid-cols]=\"cols()\">\r\n @for (element of elements(); track element.id) {\r\n <div class=\"grid-item\">\r\n @if (element.buttonConfig) {\r\n <lib-button-ng [(buttonConfig)]=\"element.buttonConfig\" (onClick)=\"onButtonClick(element)\"></lib-button-ng>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>", styles: [".dynamic-grid{display:grid;gap:.5rem;padding:.5rem;grid-template-columns:repeat(var(--grid-cols, 3),1fr)}.grid-item{border-radius:.375rem;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}\n"] }]
1702
+ }], ctorParameters: () => [] });
1703
+
1704
+ class PickListComponent {
1705
+ constructor() {
1706
+ }
1707
+ ngOnInit() { }
1708
+ sourceElements = model([]);
1709
+ hasAnySourceElementSelected = computed(() => this.sourceElements().some(element => element.isSelected));
1710
+ targetElements = model([]);
1711
+ hasAnyTargetElementSelected = computed(() => this.targetElements().some(element => element.isSelected));
1712
+ config = input();
1713
+ outputElements = output();
1714
+ sourceSeverityButton = computed(() => this.config()?.sourceSeverityButton ?? 'secondary');
1715
+ targetSeverityButton = computed(() => this.config()?.targetSeverityButton ?? 'contrast');
1716
+ controlButtons = computed(() => [
1717
+ {
1718
+ label: '',
1719
+ icon: 'pi pi-angle-double-right',
1720
+ severity: this.sourceSeverityButton(),
1721
+ disabled: this.sourceElements().length === 0,
1722
+ tooltipConfig: {
1723
+ pTooltip: this.sourceElements().length === 0 ? 'No hay elementos' : 'Mover todos hacia la derecha',
1724
+ tooltipPosition: 'top'
1725
+ },
1726
+ onClick: () => {
1727
+ this.moveAllSourceToTarget();
1728
+ }
1729
+ },
1730
+ {
1731
+ label: '',
1732
+ icon: 'pi pi-angle-right',
1733
+ severity: this.sourceSeverityButton(),
1734
+ disabled: !this.hasAnySourceElementSelected(),
1735
+ tooltipConfig: {
1736
+ pTooltip: !this.hasAnySourceElementSelected() ? 'No hay elementos seleccionados' : 'Mover los elementos seleccionados hacia la derecha',
1737
+ tooltipPosition: 'top'
1738
+ },
1739
+ onClick: () => {
1740
+ this.moveSelectedSourceToTarget();
1741
+ }
1742
+ },
1743
+ {
1744
+ label: '',
1745
+ icon: 'pi pi-angle-double-left',
1746
+ severity: this.targetSeverityButton(),
1747
+ disabled: this.targetElements().length === 0,
1748
+ tooltipConfig: {
1749
+ pTooltip: this.targetElements().length === 0 ? 'No hay elementos' : 'Mover todos hacia la izquierda',
1750
+ tooltipPosition: 'top'
1751
+ },
1752
+ onClick: () => {
1753
+ this.moveAllTargetToSource();
1754
+ }
1755
+ },
1756
+ {
1757
+ label: '',
1758
+ icon: 'pi pi-angle-left',
1759
+ severity: this.targetSeverityButton(),
1760
+ disabled: !this.hasAnyTargetElementSelected(),
1761
+ tooltipConfig: {
1762
+ pTooltip: !this.hasAnyTargetElementSelected() ? 'No hay elementos seleccionados' : 'Mover los elementos seleccionados hacia la izquierda',
1763
+ tooltipPosition: 'top'
1764
+ },
1765
+ onClick: () => {
1766
+ this.moveSelectedTargetToSource();
1767
+ }
1768
+ }
1769
+ ]);
1770
+ /**
1771
+ * Mueve todos los elementos del sourceElements al targetElements,
1772
+ * convirtiendo su severidad para que coincida con targetSeverityButton
1773
+ */
1774
+ moveAllSourceToTarget() {
1775
+ const sourceElementsCopy = [...this.sourceElements()];
1776
+ if (sourceElementsCopy.length === 0) {
1777
+ return;
1778
+ }
1779
+ // Convertir los elementos para usar targetSeverityButton
1780
+ const convertedElements = sourceElementsCopy.map(element => {
1781
+ const convertedElement = {
1782
+ ...element,
1783
+ isSelected: false, // Limpiar selección
1784
+ buttonConfig: {
1785
+ ...element.buttonConfig,
1786
+ severity: this.targetSeverityButton(),
1787
+ variant: 'outlined',
1788
+ raised: true
1789
+ }
1790
+ };
1791
+ return convertedElement;
1792
+ });
1793
+ // Agregar elementos convertidos al target
1794
+ this.targetElements.update(currentTarget => [
1795
+ ...currentTarget,
1796
+ ...convertedElements
1797
+ ]);
1798
+ // Limpiar sourceElements
1799
+ this.sourceElements.set([]);
1800
+ this.handleOutputElements();
1801
+ }
1802
+ /**
1803
+ * Mueve todos los elementos del targetElements al sourceElements,
1804
+ * convirtiendo su severidad para que coincida con sourceSeverityButton
1805
+ */
1806
+ moveAllTargetToSource() {
1807
+ const targetElementsCopy = [...this.targetElements()];
1808
+ if (targetElementsCopy.length === 0) {
1809
+ return;
1810
+ }
1811
+ // Convertir los elementos para usar sourceSeverityButton
1812
+ const convertedElements = targetElementsCopy.map(element => {
1813
+ const convertedElement = {
1814
+ ...element,
1815
+ isSelected: false, // Limpiar selección
1816
+ buttonConfig: {
1817
+ ...element.buttonConfig,
1818
+ severity: this.sourceSeverityButton(),
1819
+ variant: 'outlined',
1820
+ raised: true
1821
+ }
1822
+ };
1823
+ return convertedElement;
1824
+ });
1825
+ // Agregar elementos convertidos al source
1826
+ this.sourceElements.update(currentSource => [
1827
+ ...currentSource,
1828
+ ...convertedElements
1829
+ ]);
1830
+ // Limpiar targetElements
1831
+ this.targetElements.set([]);
1832
+ this.handleOutputElements();
1833
+ }
1834
+ /**
1835
+ * Mueve los elementos seleccionados del sourceElements al targetElements,
1836
+ * ubicándolos en la primera posición y convirtiendo su severidad
1837
+ */
1838
+ moveSelectedSourceToTarget() {
1839
+ const selectedElements = this.sourceElements().filter(element => element.isSelected);
1840
+ const remainingElements = this.sourceElements().filter(element => !element.isSelected);
1841
+ if (selectedElements.length === 0) {
1842
+ return;
1843
+ }
1844
+ // Convertir los elementos seleccionados para usar targetSeverityButton
1845
+ const convertedElements = selectedElements.map(element => {
1846
+ const convertedElement = {
1847
+ ...element,
1848
+ isSelected: false, // Limpiar selección
1849
+ buttonConfig: {
1850
+ ...element.buttonConfig,
1851
+ severity: this.targetSeverityButton(),
1852
+ variant: 'outlined',
1853
+ raised: true
1854
+ }
1855
+ };
1856
+ return convertedElement;
1857
+ });
1858
+ // Agregar elementos convertidos al inicio de targetElements
1859
+ this.targetElements.update(currentTarget => [
1860
+ ...convertedElements,
1861
+ ...currentTarget
1862
+ ]);
1863
+ // Actualizar sourceElements sin los elementos seleccionados
1864
+ this.sourceElements.set(remainingElements);
1865
+ this.handleOutputElements();
1866
+ }
1867
+ /**
1868
+ * Mueve los elementos seleccionados del targetElements al sourceElements,
1869
+ * ubicándolos en la primera posición y convirtiendo su severidad
1870
+ */
1871
+ moveSelectedTargetToSource() {
1872
+ const selectedElements = this.targetElements().filter(element => element.isSelected);
1873
+ const remainingElements = this.targetElements().filter(element => !element.isSelected);
1874
+ if (selectedElements.length === 0) {
1875
+ return;
1876
+ }
1877
+ // Convertir los elementos seleccionados para usar sourceSeverityButton
1878
+ const convertedElements = selectedElements.map(element => {
1879
+ const convertedElement = {
1880
+ ...element,
1881
+ isSelected: false, // Limpiar selección
1882
+ buttonConfig: {
1883
+ ...element.buttonConfig,
1884
+ severity: this.sourceSeverityButton(),
1885
+ variant: 'outlined',
1886
+ raised: true
1887
+ }
1888
+ };
1889
+ return convertedElement;
1890
+ });
1891
+ // Agregar elementos convertidos al inicio de sourceElements
1892
+ this.sourceElements.update(currentSource => [
1893
+ ...convertedElements,
1894
+ ...currentSource
1895
+ ]);
1896
+ // Actualizar targetElements sin los elementos seleccionados
1897
+ this.targetElements.set(remainingElements);
1898
+ this.handleOutputElements();
1899
+ }
1900
+ handleOutputElements() {
1901
+ this.outputElements.emit({ sourceElements: this.sourceElements(), targetElements: this.targetElements() });
1902
+ }
1903
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PickListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1904
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: PickListComponent, isStandalone: true, selector: "lib-pick-list", inputs: { sourceElements: { classPropertyName: "sourceElements", publicName: "sourceElements", isSignal: true, isRequired: false, transformFunction: null }, targetElements: { classPropertyName: "targetElements", publicName: "targetElements", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sourceElements: "sourceElementsChange", targetElements: "targetElementsChange", outputElements: "outputElements" }, ngImport: i0, template: "@let cols = config()?.cols ?? 3;\r\n@let sourceSeverityButton = config()?.sourceSeverityButton ?? 'secondary';\r\n@let targetSeverityButton = config()?.targetSeverityButton ?? 'contrast';\r\n<div class=\"flex gap-4 h-80 w-full bg-gray-100 dark:bg-gray-800 rounded-xl p-3\">\r\n <lib-container-elements id=\"source-container\" [cols]=\"cols\" class=\"w-full h-full\" [(elements)]=\"sourceElements\"\r\n #sourceContainer [severityButton]=\"sourceSeverityButton\"\r\n (outputElements)=\"handleOutputElements()\"></lib-container-elements>\r\n\r\n <div class=\"w-[10%] flex flex-col items-center justify-center gap-6 rounded-xl bg-gray-200 dark:bg-gray-800\">\r\n @for (button of controlButtons(); track $index) {\r\n <lib-button-ng [buttonConfig]=\"button\"></lib-button-ng>\r\n }\r\n </div>\r\n\r\n <lib-container-elements id=\"target-container\" [cols]=\"cols\" class=\"w-full h-full\" [(elements)]=\"targetElements\"\r\n #targetContainer [severityButton]=\"targetSeverityButton\"\r\n (outputElements)=\"handleOutputElements()\"></lib-container-elements>\r\n\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: ButtonNgComponent, selector: "lib-button-ng", inputs: ["buttonConfig"], outputs: ["buttonConfigChange", "onClick"] }, { kind: "component", type: ContainerElementsComponent, selector: "lib-container-elements", inputs: ["cols", "elements", "severityButton"], outputs: ["elementsChange", "outputElements"] }] });
1905
+ }
1906
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PickListComponent, decorators: [{
1907
+ type: Component,
1908
+ args: [{ selector: 'lib-pick-list', imports: [ButtonNgComponent, ContainerElementsComponent], template: "@let cols = config()?.cols ?? 3;\r\n@let sourceSeverityButton = config()?.sourceSeverityButton ?? 'secondary';\r\n@let targetSeverityButton = config()?.targetSeverityButton ?? 'contrast';\r\n<div class=\"flex gap-4 h-80 w-full bg-gray-100 dark:bg-gray-800 rounded-xl p-3\">\r\n <lib-container-elements id=\"source-container\" [cols]=\"cols\" class=\"w-full h-full\" [(elements)]=\"sourceElements\"\r\n #sourceContainer [severityButton]=\"sourceSeverityButton\"\r\n (outputElements)=\"handleOutputElements()\"></lib-container-elements>\r\n\r\n <div class=\"w-[10%] flex flex-col items-center justify-center gap-6 rounded-xl bg-gray-200 dark:bg-gray-800\">\r\n @for (button of controlButtons(); track $index) {\r\n <lib-button-ng [buttonConfig]=\"button\"></lib-button-ng>\r\n }\r\n </div>\r\n\r\n <lib-container-elements id=\"target-container\" [cols]=\"cols\" class=\"w-full h-full\" [(elements)]=\"targetElements\"\r\n #targetContainer [severityButton]=\"targetSeverityButton\"\r\n (outputElements)=\"handleOutputElements()\"></lib-container-elements>\r\n\r\n</div>" }]
1909
+ }], ctorParameters: () => [] });
1910
+
1911
+ class AdvancedFilterService {
1912
+ constructor() {
1913
+ // Effect para actualizar isSelected basado en los chips
1914
+ effect(() => {
1915
+ const chips = [...this.searchChips()];
1916
+ this.updateElementSelection(chips);
1917
+ });
1918
+ }
1919
+ configInlineInput = computed(() => ({
1920
+ typeInput: ETypeInput.CHIPS
1921
+ }));
1922
+ _searchChips = signal([]);
1923
+ searchChips = this._searchChips.asReadonly();
1924
+ setSearchChips(searchChips) {
1925
+ this._searchChips.set(searchChips);
1926
+ }
1927
+ setStringToArrayChips(searchValue) {
1928
+ this._searchChips.set(searchValue.split(' ').filter(chip => chip.trim() !== ''));
1929
+ }
1930
+ _sourceElements = signal([]);
1931
+ sourceElements = this._sourceElements.asReadonly();
1932
+ setSourceElements(sourceElements) {
1933
+ this._sourceElements.set(sourceElements);
1934
+ }
1935
+ configPickList = computed(() => ({
1936
+ cols: 3,
1937
+ sourceSeverityButton: 'contrast',
1938
+ targetSeverityButton: 'success'
1939
+ }));
1940
+ /**
1941
+ * Actualiza la selección de elementos basándose en los chips del input
1942
+ * @param chips Array de strings que representan los chips actuales
1943
+ */
1944
+ updateElementSelection(chips) {
1945
+ this._sourceElements.update(currentElements => {
1946
+ return currentElements.map((element) => {
1947
+ // Verificar si el label del elemento está en el array de chips
1948
+ const shouldBeSelected = chips.includes(element.buttonConfig?.label || '');
1949
+ if (shouldBeSelected) {
1950
+ delete element.buttonConfig.variant;
1951
+ delete element.buttonConfig.raised;
1952
+ }
1953
+ else {
1954
+ element.buttonConfig.variant = 'outlined';
1955
+ element.buttonConfig.raised = true;
1956
+ }
1957
+ return {
1958
+ ...element,
1959
+ isSelected: shouldBeSelected
1960
+ };
1961
+ });
1962
+ });
1963
+ }
1964
+ outputElements(event) {
1965
+ const { sourceElements } = event;
1966
+ this.setSourceElements(sourceElements);
1967
+ this.validateAndSyncChipsWithElements(sourceElements);
1968
+ }
1969
+ /**
1970
+ * Valida y sincroniza los chips con los elementos de sourceElements
1971
+ * @param sourceElements Array de elementos fuente
1972
+ */
1973
+ validateAndSyncChipsWithElements(sourceElements) {
1974
+ const currentChips = this._searchChips();
1975
+ if (sourceElements.length === 0) {
1976
+ this.setSearchChips([]);
1977
+ return;
1978
+ }
1979
+ const validChips = [];
1980
+ // Iterar sobre cada chip actual
1981
+ currentChips.forEach(chip => {
1982
+ // Buscar el elemento correspondiente en sourceElements
1983
+ const element = sourceElements.find(el => el.buttonConfig?.label === chip);
1984
+ if (element) {
1985
+ // Si la chip existe en sourceElements
1986
+ if (element.isSelected === false) {
1987
+ // Si la chip está en isSelected false, NO la incluimos en validChips (la eliminamos)
1988
+ return;
1989
+ }
1990
+ else {
1991
+ // Si la chip está seleccionada, la mantenemos
1992
+ validChips.push(chip);
1993
+ }
1994
+ }
1995
+ else {
1996
+ // Si la chip no está en sourceElements, NO la incluimos en validChips (la eliminamos)
1997
+ return;
1998
+ }
1999
+ });
2000
+ // Verificar si hay elementos seleccionados que no tienen chip correspondiente
2001
+ sourceElements.forEach(element => {
2002
+ if (element.isSelected && element.buttonConfig?.label) {
2003
+ const chipExists = currentChips.includes(element.buttonConfig.label);
2004
+ if (!chipExists) {
2005
+ // Si el elemento está seleccionado pero no tiene chip, agregamos la chip
2006
+ validChips.push(element.buttonConfig.label);
2007
+ }
2008
+ }
2009
+ });
2010
+ // Actualizar los chips solo si hay cambios
2011
+ if (JSON.stringify(validChips.sort()) !== JSON.stringify(currentChips.sort())) {
2012
+ this._searchChips.set(validChips);
2013
+ }
2014
+ }
2015
+ /**
2016
+ * Método público para establecer chips desde un array externo
2017
+ * Útil para gestionar las chips programáticamente
2018
+ * @param chipsArray Array de strings que representan las chips
2019
+ */
2020
+ setChipsFromArray(chipsArray) {
2021
+ if (!Array.isArray(chipsArray)) {
2022
+ console.warn('setChipsFromArray: El parámetro debe ser un array de strings');
2023
+ return;
2024
+ }
2025
+ // Filtrar elementos válidos (strings no vacíos)
2026
+ const validChips = chipsArray
2027
+ .filter(chip => typeof chip === 'string' && chip.trim() !== '')
2028
+ .map(chip => chip.trim());
2029
+ // Actualizar las chips
2030
+ this._searchChips.set(validChips);
2031
+ }
2032
+ /**
2033
+ * Método público para limpiar todas las chips
2034
+ */
2035
+ clearAllChips() {
2036
+ this._searchChips.set([]);
2037
+ }
2038
+ /**
2039
+ * Método público para agregar chips desde un array
2040
+ * Evita duplicados
2041
+ * @param chipsArray Array de strings a agregar
2042
+ */
2043
+ addChipsFromArray(chipsArray) {
2044
+ if (!Array.isArray(chipsArray)) {
2045
+ console.warn('addChipsFromArray: El parámetro debe ser un array de strings');
2046
+ return;
2047
+ }
2048
+ const currentChips = this._searchChips();
2049
+ // Filtrar elementos válidos y únicos
2050
+ const validChips = chipsArray
2051
+ .filter(chip => typeof chip === 'string' && chip.trim() !== '')
2052
+ .map(chip => chip.trim())
2053
+ .filter(chip => !currentChips.includes(chip));
2054
+ // Agregar las nuevas chips
2055
+ if (validChips.length > 0) {
2056
+ this._searchChips.set([...currentChips, ...validChips]);
2057
+ }
2058
+ }
2059
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AdvancedFilterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2060
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AdvancedFilterService, providedIn: 'root' });
2061
+ }
2062
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AdvancedFilterService, decorators: [{
2063
+ type: Injectable,
2064
+ args: [{
2065
+ providedIn: 'root'
2066
+ }]
2067
+ }], ctorParameters: () => [] });
2068
+
2069
+ class AdvancedFilterComponent {
2070
+ advancedFilterService = inject(AdvancedFilterService);
2071
+ sourceElements = model([]);
2072
+ targetElements = model([]);
2073
+ // Referencia al componente de inline input para gestionar las chips
2074
+ inlineInputComponent = viewChild('inlineInputRef');
2075
+ constructor() {
2076
+ // Sincronizar el service con el model del componente
2077
+ effect(() => {
2078
+ this.sourceElements.set(this.advancedFilterService.sourceElements());
2079
+ });
2080
+ // Efecto para sincronizar chips con el inline input
2081
+ effect(() => {
2082
+ const chips = this.advancedFilterService.searchChips();
2083
+ const inlineInput = this.inlineInputComponent();
2084
+ if (inlineInput && Array.isArray(chips)) {
2085
+ // Usar el nuevo método para establecer las chips
2086
+ inlineInput.setChipsFromArray(chips);
2087
+ }
2088
+ });
2089
+ }
2090
+ ngOnInit() {
2091
+ this.initializeChipsWhitSourceElementsSelected();
2092
+ this.advancedFilterService.setSourceElements(this.sourceElements());
2093
+ }
2094
+ initializeChipsWhitSourceElementsSelected() {
2095
+ this.advancedFilterService.setSearchChips(this.sourceElements()
2096
+ .filter((element) => element.isSelected)
2097
+ .map((element) => element.buttonConfig?.label?.toString() ?? ''));
2098
+ }
2099
+ get configInlineInput() {
2100
+ return this.advancedFilterService.configInlineInput();
2101
+ }
2102
+ valueChangeInlineInput(value) {
2103
+ this.advancedFilterService.setStringToArrayChips(value);
2104
+ }
2105
+ get configPickList() {
2106
+ return this.advancedFilterService.configPickList();
2107
+ }
2108
+ outputElements(event) {
2109
+ this.advancedFilterService.outputElements(event);
2110
+ }
2111
+ /**
2112
+ * Método público para establecer chips desde un array externo
2113
+ * @param chipsArray Array de strings que representan las chips
2114
+ */
2115
+ setChipsFromArray(chipsArray) {
2116
+ this.advancedFilterService.setChipsFromArray(chipsArray);
2117
+ }
2118
+ /**
2119
+ * Método público para limpiar todas las chips
2120
+ */
2121
+ clearAllChips() {
2122
+ this.advancedFilterService.clearAllChips();
2123
+ }
2124
+ /**
2125
+ * Método público para agregar chips desde un array
2126
+ * @param chipsArray Array de strings a agregar
2127
+ */
2128
+ addChipsFromArray(chipsArray) {
2129
+ this.advancedFilterService.addChipsFromArray(chipsArray);
2130
+ }
2131
+ /**
2132
+ * Método público para obtener las chips actuales como array
2133
+ * @returns Array de strings con las chips actuales
2134
+ */
2135
+ getChipsAsArray() {
2136
+ return this.advancedFilterService.searchChips();
2137
+ }
2138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AdvancedFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.17", type: AdvancedFilterComponent, isStandalone: true, selector: "lib-advanced-filter", inputs: { sourceElements: { classPropertyName: "sourceElements", publicName: "sourceElements", isSignal: true, isRequired: false, transformFunction: null }, targetElements: { classPropertyName: "targetElements", publicName: "targetElements", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sourceElements: "sourceElementsChange", targetElements: "targetElementsChange" }, providers: [AdvancedFilterService], viewQueries: [{ propertyName: "inlineInputComponent", first: true, predicate: ["inlineInputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\r\n <lib-inline-input #inlineInputRef [config]=\"configInlineInput\" (valueChange)=\"valueChangeInlineInput($event)\">\r\n </lib-inline-input>\r\n <lib-pick-list [(sourceElements)]=\"sourceElements\" [(targetElements)]=\"targetElements\"\r\n (outputElements)=\"outputElements($event)\" [config]=\"configPickList\"></lib-pick-list>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: InlineInputComponent, selector: "lib-inline-input", inputs: ["config", "value"], outputs: ["valueChange", "outputValue", "outputBlur", "outputDebounced"] }, { kind: "component", type: PickListComponent, selector: "lib-pick-list", inputs: ["sourceElements", "targetElements", "config"], outputs: ["sourceElementsChange", "targetElementsChange", "outputElements"] }] });
2140
+ }
2141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AdvancedFilterComponent, decorators: [{
2142
+ type: Component,
2143
+ args: [{ selector: 'lib-advanced-filter', imports: [InlineInputComponent, PickListComponent], providers: [AdvancedFilterService], template: "<div class=\"flex flex-col gap-4\">\r\n <lib-inline-input #inlineInputRef [config]=\"configInlineInput\" (valueChange)=\"valueChangeInlineInput($event)\">\r\n </lib-inline-input>\r\n <lib-pick-list [(sourceElements)]=\"sourceElements\" [(targetElements)]=\"targetElements\"\r\n (outputElements)=\"outputElements($event)\" [config]=\"configPickList\"></lib-pick-list>\r\n</div>" }]
2144
+ }], ctorParameters: () => [] });
2145
+
2146
+ class ModalAdvancedFilterComponent extends BaseDialogComponent {
2147
+ constructor() {
2148
+ super();
2149
+ }
2150
+ sourceElements = signal([]);
2151
+ targetElements = signal([]);
2152
+ ngOnInit() {
2153
+ if (this.data) {
2154
+ this.sourceElements.set(this.data.sourceElements ?? []);
2155
+ this.targetElements.set(this.data.targetElements ?? []);
2156
+ }
2157
+ }
2158
+ applyFiltersButton = computed(() => {
2159
+ return {
2160
+ label: 'Aplicar Filtros',
2161
+ severity: 'info',
2162
+ onClick: () => {
2163
+ this.close({ success: true, data: { sourceElements: this.sourceElements(), targetElements: this.targetElements() } });
2164
+ },
2165
+ disabled: this.targetElements().length === 0
2166
+ };
2167
+ });
2168
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ModalAdvancedFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2169
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ModalAdvancedFilterComponent, isStandalone: true, selector: "lib-modal-advanced-filter", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col gap-4\">\r\n <lib-advanced-filter [(sourceElements)]=\"sourceElements\" [(targetElements)]=\"targetElements\"></lib-advanced-filter>\r\n <div class=\"flex justify-end\">\r\n <lib-button-ng [buttonConfig]=\"applyFiltersButton()\"></lib-button-ng>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "component", type: AdvancedFilterComponent, selector: "lib-advanced-filter", inputs: ["sourceElements", "targetElements"], outputs: ["sourceElementsChange", "targetElementsChange"] }, { kind: "component", type: ButtonNgComponent, selector: "lib-button-ng", inputs: ["buttonConfig"], outputs: ["buttonConfigChange", "onClick"] }] });
2170
+ }
2171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ModalAdvancedFilterComponent, decorators: [{
2172
+ type: Component,
2173
+ args: [{ selector: 'lib-modal-advanced-filter', imports: [AdvancedFilterComponent, ButtonNgComponent], template: "<div class=\"flex flex-col gap-4\">\r\n <lib-advanced-filter [(sourceElements)]=\"sourceElements\" [(targetElements)]=\"targetElements\"></lib-advanced-filter>\r\n <div class=\"flex justify-end\">\r\n <lib-button-ng [buttonConfig]=\"applyFiltersButton()\"></lib-button-ng>\r\n </div>\r\n</div>" }]
2174
+ }], ctorParameters: () => [] });
2175
+
2176
+ class TableNgEditService {
2177
+ editConfig = signal(undefined);
2178
+ keysNames = signal({});
2179
+ constructor() { }
2180
+ setEditConfig(editConfig) {
2181
+ this.editConfig.set(editConfig);
2182
+ }
2183
+ setKeysNames(keysNames) {
2184
+ this.keysNames.set(keysNames);
2185
+ }
2186
+ fb = inject(NonNullableFormBuilder);
2187
+ controls = computed(() => {
2188
+ const formValues = this.searchFormGroup().value;
2189
+ const controls = [
2190
+ {
2191
+ controlName: 'search',
2192
+ control: this.fb.control(formValues.search, { validators: [] }),
2193
+ typeInput: ETypeInput.TEXT,
2194
+ colSpan: 12,
2195
+ label: '-'
2196
+ }
2197
+ ];
2198
+ return controls;
2199
+ });
2200
+ searchFormGroup = signal(new FormGroup({}));
2201
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgEditService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2202
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgEditService, providedIn: 'root' });
2203
+ }
2204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgEditService, decorators: [{
2205
+ type: Injectable,
2206
+ args: [{
2207
+ providedIn: 'root'
2208
+ }]
2209
+ }], ctorParameters: () => [] });
2210
+
2211
+ class TableNgGeneralService {
2212
+ constructor() { }
2213
+ MOCK_EMPTY_DATE = new Date(1900, 0, 1);
2214
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgGeneralService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2215
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgGeneralService, providedIn: 'root' });
2216
+ }
2217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgGeneralService, decorators: [{
2218
+ type: Injectable,
2219
+ args: [{
2220
+ providedIn: 'root'
2221
+ }]
2222
+ }], ctorParameters: () => [] });
2223
+
2224
+ class TableNgService {
2225
+ tableNgGeneralService = inject(TableNgGeneralService);
2226
+ filterService = inject(FilterService);
2227
+ dialogService = inject(CustomDialogService);
2228
+ initialValue;
2229
+ constructor() {
2230
+ this.filterService.register('globalCustomFilter', (rowData, filter) => {
2231
+ if (!filter || filter.trim() === '')
2232
+ return true;
2233
+ const searchTerm = filter.toLowerCase();
2234
+ // Si es string
2235
+ if (typeof rowData === 'string') {
2236
+ return rowData.toLowerCase().includes(searchTerm);
2237
+ }
2238
+ // Si es array de botones
2239
+ if (Array.isArray(rowData)) {
2240
+ return rowData.some((button) => {
2241
+ const label = button.label || '';
2242
+ return label.toLowerCase().includes(searchTerm);
2243
+ });
2244
+ }
2245
+ return false;
2246
+ });
2247
+ /**
2248
+ * Filtro para arrays de strings que verifica si el valor contiene alguno de los strings del filtro.
2249
+ * Uso: dt.filter(['valor1', 'valor2'], 'nombreColumna', 'arrayStringFilter')
2250
+ * @param rowData - Puede ser un string o array de strings
2251
+ * @param filter - Array de strings para filtrar
2252
+ * @returns true si encuentra coincidencias parciales (case-insensitive)
2253
+ */
2254
+ this.filterService.register('arrayStringFilter', (rowData, filter) => {
2255
+ // Si no hay filtro o el filtro está vacío, mostrar todos los elementos
2256
+ if (!filter || !Array.isArray(filter) || filter.length === 0)
2257
+ return true;
2258
+ // Si rowData es null, undefined o vacío, no mostrar el elemento
2259
+ if (rowData == null || rowData === '')
2260
+ return false;
2261
+ // Si rowData es un string
2262
+ if (typeof rowData === 'string') {
2263
+ return filter.some(filterValue => rowData.toLowerCase().includes(filterValue.toLowerCase()));
2264
+ }
2265
+ // Si rowData es un array de strings
2266
+ if (Array.isArray(rowData)) {
2267
+ return rowData.some(dataValue => filter.some(filterValue => typeof dataValue === 'string' &&
2268
+ dataValue.toLowerCase().includes(filterValue.toLowerCase())));
2269
+ }
2270
+ // Para otros tipos de datos, convertir a string si es posible
2271
+ const stringValue = String(rowData);
2272
+ if (stringValue && stringValue !== 'undefined' && stringValue !== 'null') {
2273
+ return filter.some(filterValue => stringValue.toLowerCase().includes(filterValue.toLowerCase()));
2274
+ }
2275
+ return false;
2276
+ });
2277
+ /**
2278
+ * Filtro exacto para arrays de strings que verifica coincidencias exactas.
2279
+ * Uso: dt.filter(['valor1', 'valor2'], 'nombreColumna', 'arrayStringExactFilter')
2280
+ * @param rowData - Puede ser un string o array de strings
2281
+ * @param filter - Array de strings para filtrar
2282
+ * @returns true si encuentra coincidencias exactas (case-sensitive)
2283
+ */
2284
+ this.filterService.register('arrayStringExactFilter', (rowData, filter) => {
2285
+ if (!filter || !Array.isArray(filter) || filter.length === 0)
2286
+ return true;
2287
+ // Si rowData es null, undefined o vacío, no mostrar el elemento
2288
+ if (rowData == null || rowData === '')
2289
+ return false;
2290
+ // Si rowData es un string
2291
+ if (typeof rowData === 'string') {
2292
+ return filter.includes(rowData);
2293
+ }
2294
+ // Si rowData es un array de strings
2295
+ if (Array.isArray(rowData)) {
2296
+ return rowData.some(dataValue => filter.includes(dataValue));
2297
+ }
2298
+ // Para otros tipos de datos, convertir a string si es posible
2299
+ const stringValue = String(rowData);
2300
+ if (stringValue && stringValue !== 'undefined' && stringValue !== 'null') {
2301
+ return filter.includes(stringValue);
2302
+ }
2303
+ return false;
2304
+ });
2305
+ this.filterService.register('customIn', (rowData, filter) => {
2306
+ if (!filter || !Array.isArray(filter) || filter.length === 0)
2307
+ return true;
2308
+ // Si rowData es null, undefined o vacío, no mostrar el elemento
2309
+ if (rowData == null || rowData === '')
2310
+ return false;
2311
+ if (typeof rowData === 'string') {
2312
+ return filter.includes(rowData);
2313
+ }
2314
+ // Para otros tipos de datos, convertir a string si es posible
2315
+ const stringValue = String(rowData);
2316
+ if (stringValue && stringValue !== 'undefined' && stringValue !== 'null') {
2317
+ return filter.includes(stringValue);
2318
+ }
2319
+ return false;
2320
+ });
2321
+ }
2322
+ get MOCK_EMPTY_DATE() {
2323
+ return this.tableNgGeneralService.MOCK_EMPTY_DATE;
2324
+ }
2325
+ setInitialValue(data) {
2326
+ this.initialValue = data;
2327
+ }
2328
+ //#region SORT
2329
+ customSort(event) {
2330
+ let field = undefined;
2331
+ let order = undefined;
2332
+ switch (event.mode) {
2333
+ case 'single':
2334
+ field = event.field;
2335
+ order = event.order;
2336
+ break;
2337
+ case 'multiple': {
2338
+ const multiSortMeta = event.multiSortMeta ?? [];
2339
+ const sortMeta = multiSortMeta[0];
2340
+ field = sortMeta?.field ?? undefined;
2341
+ order = sortMeta?.order ?? undefined;
2342
+ break;
2343
+ }
2344
+ default:
2345
+ break;
2346
+ }
2347
+ if (!field || order === undefined)
2348
+ return;
2349
+ const data = event.data ?? [];
2350
+ if (order === 0) {
2351
+ // Sin sorting - restaurar orden original
2352
+ data.splice(0, data.length, ...this.initialValue);
2353
+ }
2354
+ else {
2355
+ // Aplicar sorting
2356
+ data.sort((a, b) => {
2357
+ const valueA = this.getFieldValue(a, field);
2358
+ const valueB = this.getFieldValue(b, field);
2359
+ const result = this.compareValues(valueA, valueB);
2360
+ return order * result; // 1 para ASC, -1 para DESC
2361
+ });
2362
+ }
2363
+ }
2364
+ getFieldValue(item, field) {
2365
+ const rawValue = item.rowData[field];
2366
+ // Si es un array (probablemente IButtonConfig[])
2367
+ if (Array.isArray(rawValue) && rawValue.length > 0) {
2368
+ // Verificar si tenemos configuración de sorting para este campo
2369
+ const buttonKeyToSort = item.sortConfig?.buttonKeyToSort?.[field];
2370
+ if (buttonKeyToSort) {
2371
+ // Usar la primera configuración de botón del array
2372
+ const firstButton = rawValue[0];
2373
+ return firstButton[buttonKeyToSort];
2374
+ }
2375
+ // Si no hay configuración, intentar usar 'label' por defecto
2376
+ const firstButton = rawValue[0];
2377
+ return firstButton.label || '';
2378
+ }
2379
+ // Si es un string o cualquier otro tipo
2380
+ return rawValue;
2381
+ }
2382
+ compareValues(a, b) {
2383
+ // Manejar valores null/undefined
2384
+ if (a == null && b == null)
2385
+ return 0;
2386
+ if (a == null)
2387
+ return -1;
2388
+ if (b == null)
2389
+ return 1;
2390
+ // Si ambos son strings, usar localeCompare para mejor sorting
2391
+ if (typeof a === 'string' && typeof b === 'string') {
2392
+ return a.toLowerCase().localeCompare(b.toLowerCase());
2393
+ }
2394
+ // Si ambos son números
2395
+ if (typeof a === 'number' && typeof b === 'number') {
2396
+ return a - b;
2397
+ }
2398
+ // Si ambos son booleanos
2399
+ if (typeof a === 'boolean' && typeof b === 'boolean') {
2400
+ return a === b ? 0 : a ? 1 : -1;
2401
+ }
2402
+ // Si son fechas
2403
+ if (a instanceof Date && b instanceof Date) {
2404
+ return a.getTime() - b.getTime();
2405
+ }
2406
+ // Para otros tipos, convertir a string y comparar
2407
+ const strA = String(a).toLowerCase();
2408
+ const strB = String(b).toLowerCase();
2409
+ return strA.localeCompare(strB);
2410
+ }
2411
+ //#endregion
2412
+ //#region Global Filter
2413
+ fb = inject(NonNullableFormBuilder);
2414
+ controls = computed(() => {
2415
+ const formValues = this.searchFormGroup().value;
2416
+ const controls = [
2417
+ {
2418
+ controlName: 'search',
2419
+ control: this.fb.control(formValues.search, { validators: [] }),
2420
+ typeInput: ETypeInput.TEXT,
2421
+ colSpan: 12,
2422
+ label: 'Buscar'
2423
+ }
2424
+ ];
2425
+ return controls;
2426
+ });
2427
+ searchFormGroup = signal(new FormGroup({}));
2428
+ values = toSignal(this.searchFormGroup().valueChanges);
2429
+ submitGlobalSearch(formGroup, dt) {
2430
+ const search = formGroup.value.search ?? '';
2431
+ dt.filterGlobal(search, 'globalCustomFilter');
2432
+ }
2433
+ clearSearchInput() {
2434
+ this.searchFormGroup().get('search')?.setValue('');
2435
+ }
2436
+ //#endregion
2437
+ //#region Selection
2438
+ async openModalManagementSelectedItems(selectedItems, config) {
2439
+ const { SelectedItemsManagementComponent } = await import('./ln-20-lib-components-selected-items-management.component-Dox7jzc7.mjs');
2440
+ let configSelectedItems = config;
2441
+ if (config) {
2442
+ configSelectedItems = structuredClone(config);
2443
+ delete configSelectedItems.lazyLoadingConfig;
2444
+ const selectionTableConfig = {
2445
+ ...(configSelectedItems.selectionTableConfig ?? {}),
2446
+ showManagementConfig: false
2447
+ };
2448
+ const globalFilterConfig = {
2449
+ ...(configSelectedItems.globalFilterConfig ?? {}),
2450
+ advancedIdentifierFiltersConfig: {
2451
+ isEnabled: false
2452
+ }
2453
+ };
2454
+ configSelectedItems.globalFilterConfig = globalFilterConfig;
2455
+ configSelectedItems.selectionTableConfig = selectionTableConfig;
2456
+ }
2457
+ const ref = this.dialogService?.open(SelectedItemsManagementComponent, {
2458
+ header: 'Gestionar Seleccionados',
2459
+ data: {
2460
+ selectedItems: selectedItems(),
2461
+ config: configSelectedItems
2462
+ },
2463
+ width: '90%',
2464
+ height: '90%',
2465
+ styleClass: 'overflow-hidden'
2466
+ });
2467
+ ref.onClose.subscribe((selectedReturnItems) => {
2468
+ if (selectedReturnItems) {
2469
+ selectedItems.set(selectedReturnItems);
2470
+ }
2471
+ });
2472
+ }
2473
+ //#endregion
2474
+ //#region Custom Filter
2475
+ //#endregion
2476
+ excelButton = computed(() => {
2477
+ return {
2478
+ label: '',
2479
+ icon: 'fa-solid fa-file-excel',
2480
+ variant: 'text',
2481
+ severity: 'success',
2482
+ raised: true,
2483
+ size: 'large',
2484
+ tooltipConfig: {
2485
+ pTooltip: this.config()?.labelsConfig?.exportExcelTooltip ?? 'Exportar a Excel',
2486
+ tooltipPosition: 'top'
2487
+ }
2488
+ };
2489
+ });
2490
+ pdfButton = computed(() => {
2491
+ return {
2492
+ label: '',
2493
+ icon: 'fa-solid fa-file-pdf',
2494
+ variant: 'text',
2495
+ severity: 'danger',
2496
+ raised: true,
2497
+ size: 'large',
2498
+ tooltipConfig: {
2499
+ pTooltip: this.config()?.labelsConfig?.exportPdfTooltip ?? 'Exportar a PDF',
2500
+ tooltipPosition: 'top'
2501
+ }
2502
+ };
2503
+ });
2504
+ refreshButton = computed(() => {
2505
+ return {
2506
+ label: '',
2507
+ icon: 'fa-solid fa-refresh',
2508
+ variant: 'text',
2509
+ severity: 'info',
2510
+ raised: true,
2511
+ size: 'large',
2512
+ onClick: () => {
2513
+ this.refreshTable();
2514
+ },
2515
+ tooltipConfig: {
2516
+ pTooltip: this.config()?.labelsConfig?.refreshTooltip ?? 'Refrescar',
2517
+ tooltipPosition: 'top'
2518
+ },
2519
+ loading: this.isLoadingRefreshButton(),
2520
+ disabled: this.isLoadingRefreshButton(),
2521
+ };
2522
+ });
2523
+ refreshTable() {
2524
+ if (this.refreshConfig()) {
2525
+ this.refreshConfig()?.callback();
2526
+ }
2527
+ }
2528
+ _config = signal(undefined);
2529
+ config = this._config.asReadonly();
2530
+ setConfig(value) {
2531
+ this._config.set(value);
2532
+ }
2533
+ refreshConfig = computed(() => {
2534
+ return this.config()?.refreshConfig;
2535
+ });
2536
+ enableRefreshButton = computed(() => {
2537
+ return this.refreshConfig()?.isEnabled ?? false;
2538
+ });
2539
+ isLoadingRefreshButton = computed(() => {
2540
+ return this.refreshConfig()?.isLoading ?? false;
2541
+ });
2542
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2543
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgService, providedIn: 'root' });
2544
+ }
2545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgService, decorators: [{
2546
+ type: Injectable,
2547
+ args: [{
2548
+ providedIn: 'root'
2549
+ }]
2550
+ }], ctorParameters: () => [] });
2551
+
2552
+ /* eslint-disable @typescript-eslint/no-unsafe-argument */
2553
+ class TableNgComponent {
2554
+ tableNgService = inject(TableNgService);
2555
+ tableNgEditService = inject(TableNgEditService);
2556
+ dialogService = inject(CustomDialogService);
2557
+ data = model.required();
2558
+ // Loading state management
2559
+ loadingTimeout = null;
2560
+ isLoading = signal(false);
2561
+ timeoutExpired = signal(false);
2562
+ config = model();
2563
+ editConfig = model();
2564
+ footerConfig = model();
2565
+ toolbarButtons = model([]);
2566
+ toolbarSpeedDialButtons = model([]);
2567
+ sourceElements = model([]);
2568
+ targetElements = model([]);
2569
+ httpMessage = model();
2570
+ lazyLoading = output();
2571
+ outputChangeData = output();
2572
+ outputHandleEditInitButton = output();
2573
+ outputAddRow = output();
2574
+ outputDeleteRow = output();
2575
+ outputRowInlineChange = output();
2576
+ outputRowDataChange = output();
2577
+ outputEditData = output();
2578
+ outputIsEditing = output();
2579
+ resetData() {
2580
+ this.data.set([]);
2581
+ }
2582
+ advancedFiltersPerformed = [];
2583
+ advancedFiltersValues = signal({});
2584
+ dt;
2585
+ fb = inject(NonNullableFormBuilder);
2586
+ //#region Labels Configuration
2587
+ /** Get pagination report template with default English value */
2588
+ getCustomPageReport() {
2589
+ return this.config()?.labelsConfig?.customPageReport ?? 'Showing {first} to {last} of {totalRecords} entries';
2590
+ }
2591
+ /** Get selected items label with default English value */
2592
+ getSelectedItemsLabel() {
2593
+ return this.config()?.labelsConfig?.selectedItemsLabel ?? 'You have selected';
2594
+ }
2595
+ /** Get records label with default English value */
2596
+ getRecordsLabel() {
2597
+ return this.config()?.labelsConfig?.recordsLabel ?? 'records';
2598
+ }
2599
+ /** Get loading message with default English value */
2600
+ getLoadingMessage() {
2601
+ return this.config()?.labelsConfig?.loadingMessage ?? 'Loading...';
2602
+ }
2603
+ /** Get no data message with default English value */
2604
+ getNoDataMessage() {
2605
+ return this.config()?.labelsConfig?.noDataMessage ?? 'No information available';
2606
+ }
2607
+ //#endregion
2608
+ constructor() {
2609
+ this.tableNgEditService.setEditConfig(this.editConfig());
2610
+ this.tableNgEditService.setKeysNames(this.config()?.keysNames ?? {});
2611
+ // Effect para sincronizar el config con el servicio cuando cambie
2612
+ effect(() => {
2613
+ const configValue = this.config();
2614
+ if (configValue) {
2615
+ this.tableNgService.setConfig(configValue);
2616
+ }
2617
+ });
2618
+ effect(() => {
2619
+ this.outputChangeData.emit([...this.data()]);
2620
+ });
2621
+ // Effect para gestionar el loading basado en el estado de data
2622
+ effect(() => {
2623
+ const currentData = this.data();
2624
+ // Limpiar el timeout anterior si existe
2625
+ if (this.loadingTimeout) {
2626
+ clearTimeout(this.loadingTimeout);
2627
+ this.loadingTimeout = null;
2628
+ }
2629
+ if (currentData.length === 0) {
2630
+ // Si data está vacío, activar loading
2631
+ this.isLoading.set(true);
2632
+ this.loadingTimeout = setTimeout(() => {
2633
+ if (this.data().length === 0) {
2634
+ this.isLoading.set(false);
2635
+ this.timeoutExpired.set(true);
2636
+ }
2637
+ }, 0);
2638
+ }
2639
+ else {
2640
+ // Si hay data, desactivar loading y resetear timeout
2641
+ this.isLoading.set(false);
2642
+ this.timeoutExpired.set(false);
2643
+ }
2644
+ });
2645
+ }
2646
+ ngOnInit() {
2647
+ this.tableNgService.setInitialValue([...this.data()]);
2648
+ }
2649
+ ngOnDestroy() {
2650
+ // Limpiar el timeout al destruir el componente
2651
+ if (this.loadingTimeout) {
2652
+ clearTimeout(this.loadingTimeout);
2653
+ this.loadingTimeout = null;
2654
+ }
2655
+ }
2656
+ get hideToolbar() { return this.config()?.hideToolbar ?? false; }
2657
+ /**
2658
+ * Calcula el número total de columnas para el colspan del mensaje vacío
2659
+ */
2660
+ totalColumns = computed(() => {
2661
+ const selectedColumns = this.config()?.selectedColumns ?? [];
2662
+ const baseColumns = selectedColumns.length > 0 ? selectedColumns.length : this.keys().length;
2663
+ const selectionColumn = this.config()?.selectionTableConfig?.isEnabled ? 1 : 0;
2664
+ const expansionColumn = this.config()?.rowExpansionConfig?.isEnabled ? 1 : 0;
2665
+ const editColumn = (this.editConfig()?.type === 'row' || this.editConfig()?.type === 'cell') && this.editConfig()?.isEnabled ? 1 : 0;
2666
+ return baseColumns + selectionColumn + expansionColumn + editColumn;
2667
+ });
2668
+ isPrimeNgSelection(value) {
2669
+ return PrimeNgUtil.isPrimeNgSelection(value);
2670
+ }
2671
+ hasErrorValues(object) {
2672
+ return Object.keys(object).length > 0;
2673
+ }
2674
+ rowFieldsValue = signal({});
2675
+ rowFieldsHasValue = computed(() => {
2676
+ return Object.keys(this.rowFieldsValue()).reduce((acc, key) => {
2677
+ acc[key] = !!this.rowFieldsValue()[key];
2678
+ return acc;
2679
+ }, {});
2680
+ });
2681
+ inlineChange(value, key) {
2682
+ this.rowFieldsValue.update((prev) => {
2683
+ return { ...prev, [key]: value };
2684
+ });
2685
+ this.outputRowInlineChange.emit({ ...this.rowFieldsValue() });
2686
+ }
2687
+ trackById(index, item) {
2688
+ return item.id;
2689
+ }
2690
+ frozenHandle(value) {
2691
+ return value ? value : false;
2692
+ }
2693
+ isDate(value) {
2694
+ return value instanceof Date;
2695
+ }
2696
+ onFilter(event) {
2697
+ const filters = event.filters;
2698
+ if (!filters)
2699
+ return;
2700
+ const global = filters['global'];
2701
+ if (!global?.['value']) {
2702
+ this.handleAdvancedFiltersPerformed(filters);
2703
+ }
2704
+ }
2705
+ resetRowDatas() {
2706
+ this.data.update((data) => {
2707
+ return data.map((item) => {
2708
+ return {
2709
+ ...item,
2710
+ rowData: {}
2711
+ };
2712
+ });
2713
+ });
2714
+ }
2715
+ get ETypeInput() {
2716
+ return ETypeInput;
2717
+ }
2718
+ handleAdvancedFiltersPerformed(filters) {
2719
+ if (!filters)
2720
+ return;
2721
+ const entriesFilters = Object.entries(filters);
2722
+ const keysColumn = this.config()?.keys ?? [];
2723
+ entriesFilters.forEach(([key, value]) => {
2724
+ const valueArray = value;
2725
+ const hasValue = !!valueArray[0]?.value;
2726
+ const keyColumn = key.split('.')[1];
2727
+ if (keysColumn.includes(keyColumn)) {
2728
+ const index = this.advancedFiltersPerformed.indexOf(keyColumn);
2729
+ if (hasValue && index === -1) {
2730
+ // Agregar si no existe
2731
+ this.advancedFiltersPerformed.push(keyColumn);
2732
+ }
2733
+ else if (!hasValue && index !== -1) {
2734
+ // Quitar si ya no tiene valor
2735
+ this.advancedFiltersPerformed.splice(index, 1);
2736
+ }
2737
+ }
2738
+ });
2739
+ }
2740
+ numberOfRecords = computed(() => {
2741
+ return this.data().length ?? 0;
2742
+ });
2743
+ hasRecords = computed(() => {
2744
+ return this.numberOfRecords() > 0;
2745
+ });
2746
+ /**
2747
+ * Computed que valida si al menos una fila tiene datos válidos en rowData.
2748
+ * Retorna true si al menos una fila tiene un valor que no sea '', null o undefined.
2749
+ * Retorna false si todas las filas tienen valores vacíos, null o undefined.
2750
+ */
2751
+ hasValidRowData = computed(() => {
2752
+ const data = this.data();
2753
+ return data.some(item => {
2754
+ if (!item?.rowData || typeof item.rowData !== 'object') {
2755
+ return false;
2756
+ }
2757
+ const values = Object.values(item.rowData);
2758
+ // Verificar si al menos un valor es válido (no vacío, null o undefined)
2759
+ return values.some(value => {
2760
+ if (value === null || value === undefined || value === '') {
2761
+ return false;
2762
+ }
2763
+ // Si es string, verificar que no esté vacío después de trim
2764
+ if (typeof value === 'string') {
2765
+ return value.trim() !== '';
2766
+ }
2767
+ // Para otros tipos (números, fechas, booleanos, etc.)
2768
+ return true;
2769
+ });
2770
+ });
2771
+ });
2772
+ keys = computed(() => {
2773
+ return this.config()?.keys ?? [];
2774
+ });
2775
+ onRowClick(item) {
2776
+ item.onClick();
2777
+ }
2778
+ //#region Scroll Config
2779
+ scrollHeight = computed(() => {
2780
+ const scrollHeightInitial = this.config()?.scrollConfig?.scrollHeight ?? '58vh';
2781
+ let res = scrollHeightInitial;
2782
+ if (this.showBottomToolbar()) {
2783
+ const { number: size, unit } = this.parseValue(scrollHeightInitial);
2784
+ res = `${size - 7.6}${unit}`;
2785
+ }
2786
+ return res;
2787
+ });
2788
+ parseValue(str) {
2789
+ const match = str.match(/^(-?\d+\.?\d*)(.*)$/);
2790
+ if (match) {
2791
+ return {
2792
+ number: parseFloat(match[1]),
2793
+ unit: match[2]
2794
+ };
2795
+ }
2796
+ return { number: 0, unit: '' };
2797
+ }
2798
+ //#endregion
2799
+ //#region Paginator Config
2800
+ paginatorStyleClass = computed(() => {
2801
+ if (this.showBottomToolbar()) {
2802
+ return 'p-datatable-paginator p-datatable-paginator-bottom sticky bottom-18 z-10';
2803
+ }
2804
+ return 'p-datatable-paginator p-datatable-paginator-bottom sticky bottom-2 z-10';
2805
+ });
2806
+ //#endregion
2807
+ //#region toolbar config
2808
+ showBottomToolbar = computed(() => {
2809
+ return this.showManagementSelectionConfig();
2810
+ });
2811
+ //#endregion
2812
+ //#region Clear Filters
2813
+ clearFilters() {
2814
+ this.tableNgService.clearSearchInput();
2815
+ this.advancedFiltersPerformed = [];
2816
+ this.advancedFiltersValues.set({});
2817
+ this.dt.clear();
2818
+ this.targetElements.set([]);
2819
+ this.handleTableValueToSourceElements();
2820
+ this.selectedItems.set([]);
2821
+ }
2822
+ get filteredValue() {
2823
+ return !!this.dt?.filteredValue && this.dt.filteredValue.length > 0;
2824
+ }
2825
+ clearFiltersButton = computed(() => {
2826
+ return {
2827
+ icon: 'fa-solid fa-filter-circle-xmark',
2828
+ rounded: true,
2829
+ raised: true,
2830
+ severity: 'contrast',
2831
+ tooltipConfig: {
2832
+ pTooltip: 'Limpiar filtros'
2833
+ },
2834
+ onClick: () => {
2835
+ this.clearFilters();
2836
+ }
2837
+ };
2838
+ });
2839
+ //#endregion
2840
+ //#region Global Filter
2841
+ get controlsGlobalFilter() {
2842
+ return this.tableNgService.controls();
2843
+ }
2844
+ get searchFormGroupGlobalFilter() {
2845
+ return this.tableNgService.searchFormGroup();
2846
+ }
2847
+ submitGlobalSearch(formGroup) {
2848
+ this.dt.globalFilterFields = this.config()?.globalFilterConfig?.globalFilterFields ?? [];
2849
+ this.tableNgService.submitGlobalSearch(formGroup, this.dt);
2850
+ }
2851
+ //#endregion
2852
+ //#region SORT
2853
+ customSort(event) {
2854
+ this.tableNgService.customSort(event);
2855
+ }
2856
+ //#endregion
2857
+ //#region Selection
2858
+ selectedItems = model([]);
2859
+ totalItemsSelected = computed(() => this.selectedItems().length);
2860
+ showManagementSelectionConfig = computed(() => this.totalItemsSelected() > 0 && (this.config()?.selectionTableConfig?.showManagementConfig ?? false));
2861
+ buttonTotalItemsSelected = computed(() => {
2862
+ return {
2863
+ label: this.totalItemsSelected().toLocaleString(),
2864
+ variant: 'text',
2865
+ rounded: true
2866
+ };
2867
+ });
2868
+ showSelectedItemsManagementButton = computed(() => {
2869
+ return {
2870
+ icon: 'fa-solid fa-eye',
2871
+ rounded: true,
2872
+ variant: 'text',
2873
+ severity: 'secondary',
2874
+ onClick: () => {
2875
+ this.openModalManagementSelectedItems();
2876
+ }
2877
+ };
2878
+ });
2879
+ openModalManagementSelectedItems() {
2880
+ this.tableNgService.openModalManagementSelectedItems(this.selectedItems, this.config())
2881
+ .then(() => { })
2882
+ .catch(() => { });
2883
+ }
2884
+ //#endregion
2885
+ //#region Custom Filter
2886
+ inlineFormChanges(inlineValue, filter, typeInput, key) {
2887
+ const lazyLoadingConfig = this.config()?.lazyLoadingConfig;
2888
+ if (typeInput === ETypeInput.MULTISELECT) {
2889
+ const options = inlineValue ? inlineValue : undefined;
2890
+ const arrayValue = options ? options.map((data) => lazyLoadingConfig?.isEnabled ? data.code : data.name) : undefined;
2891
+ if (Array.isArray(arrayValue) && arrayValue.length === 0) {
2892
+ if (key) {
2893
+ this.advancedFiltersValues.update((prev) => {
2894
+ const { [key]: _value, ...rest } = prev;
2895
+ return { ...rest };
2896
+ });
2897
+ }
2898
+ }
2899
+ if (inlineValue && (Array.isArray(arrayValue) && arrayValue.length > 0)) {
2900
+ filter(arrayValue);
2901
+ }
2902
+ }
2903
+ }
2904
+ formChanges(formValue, filter, key) {
2905
+ if (Array.isArray(formValue['multiSelect'])) {
2906
+ this.advancedFiltersValues.update((prev) => {
2907
+ return { ...prev, [key]: formValue };
2908
+ });
2909
+ }
2910
+ if (!Array.isArray(formValue['multiSelect']) && this.advancedFiltersValues()?.[key]) {
2911
+ this.advancedFiltersValues.update((prev) => {
2912
+ const { [key]: _value, ...rest } = prev;
2913
+ return { ...rest };
2914
+ });
2915
+ }
2916
+ const arrayValue = Array.isArray(formValue['multiSelect'])
2917
+ ? formValue['multiSelect'].map((data) => data.code)
2918
+ : [];
2919
+ if (arrayValue.length > 0) {
2920
+ filter(arrayValue);
2921
+ }
2922
+ }
2923
+ rowDataKey(key) {
2924
+ return `rowData.${key}`;
2925
+ }
2926
+ //#endregion
2927
+ //#region Lazy Loading
2928
+ onLazyLoad(event) {
2929
+ const filters = event.filters ?? {};
2930
+ const filtersWithValue = this.getFiltersWithValue(filters);
2931
+ const metaPagination = {};
2932
+ if (event.first) {
2933
+ metaPagination.skip = event.first;
2934
+ }
2935
+ if (event.rows) {
2936
+ metaPagination.limit = event.rows;
2937
+ }
2938
+ if (event.sortOrder) {
2939
+ metaPagination.sortOrder = event.sortOrder === 1 ? 'ASC' : 'DESC';
2940
+ }
2941
+ if (event.sortField) {
2942
+ metaPagination.sortBy = event.sortField;
2943
+ }
2944
+ const lazyLoadResponse = {
2945
+ filters: filtersWithValue,
2946
+ metaPagination
2947
+ };
2948
+ this.lazyLoading.emit(lazyLoadResponse);
2949
+ }
2950
+ getFiltersWithValue(filters) {
2951
+ const result = {};
2952
+ Object.entries(filters).forEach(([key, filter]) => {
2953
+ const keyColumn = key.split('.')[1];
2954
+ if (!filter)
2955
+ return;
2956
+ if (Array.isArray(filter)) {
2957
+ // Si es un array, filtrar solo los elementos que tienen value
2958
+ const filtersWithValue = filter.filter(f => f.value !== undefined && f.value !== null && f.value !== '');
2959
+ if (filtersWithValue.length > 0) {
2960
+ result[keyColumn] = filtersWithValue;
2961
+ }
2962
+ }
2963
+ else {
2964
+ // Si es un objeto único, verificar si tiene value
2965
+ if (filter.value !== undefined && filter.value !== null && filter.value !== '') {
2966
+ result[keyColumn] = filter;
2967
+ }
2968
+ }
2969
+ });
2970
+ return result;
2971
+ }
2972
+ //#endregion
2973
+ //#region Edit
2974
+ onCellValueChange() {
2975
+ this.updateDataWithTableValue();
2976
+ }
2977
+ onRowDataChange(_data) {
2978
+ }
2979
+ onEditData() {
2980
+ this.updateDataWithTableValue();
2981
+ this.outputEditData.emit([...this.data()]);
2982
+ }
2983
+ get controlsEdit() {
2984
+ return this.tableNgEditService.controls();
2985
+ }
2986
+ get searchFormGroupEdit() {
2987
+ return this.tableNgEditService.searchFormGroup();
2988
+ }
2989
+ customControlConfig(key, value) {
2990
+ return {
2991
+ controlName: key,
2992
+ control: this.fb.control(value),
2993
+ typeInput: ETypeInput.TEXT
2994
+ };
2995
+ }
2996
+ cellFormGroup = this.fb.group({});
2997
+ //#region Row
2998
+ addRowButton = computed(() => {
2999
+ const editConfig = this.editConfig();
3000
+ const isDisabled = editConfig?.type === 'cell'
3001
+ ? (editConfig?.cellEditConfig?.isDisabledAddButton ?? false)
3002
+ : (editConfig?.rowEditConfig?.isDisabledAddButton ?? false) || this.hasRowInEdit;
3003
+ const button = {
3004
+ icon: 'fa-solid fa-plus',
3005
+ rounded: true,
3006
+ severity: 'success',
3007
+ tooltipConfig: {
3008
+ pTooltip: 'Agregar registro',
3009
+ tooltipPosition: 'top'
3010
+ },
3011
+ onClick: () => {
3012
+ this.addRow();
3013
+ },
3014
+ disabled: isDisabled
3015
+ };
3016
+ return button;
3017
+ });
3018
+ addRow() {
3019
+ const editConfig = this.editConfig();
3020
+ // Si es modo cell y hay defaultTableNgData configurado, agregar la fila directamente
3021
+ if (editConfig?.type === 'cell' && editConfig?.cellEditConfig?.defaultTableNgData) {
3022
+ const newRow = this.editConfig()?.cellEditConfig?.defaultTableNgData;
3023
+ if (newRow) {
3024
+ this.data.update(currentData => [...currentData, newRow]);
3025
+ this.outputChangeData.emit(this.data());
3026
+ return;
3027
+ }
3028
+ }
3029
+ // Comportamiento original para modo row o cuando no hay defaultTableNgData
3030
+ this.outputAddRow.emit(this.data());
3031
+ this.setEditingRowId(null);
3032
+ }
3033
+ defaultTableNgData = computed(() => {
3034
+ const editConfig = this.editConfig();
3035
+ let defaultData;
3036
+ // Usar la configuración apropiada según el tipo de edición
3037
+ if (editConfig?.type === 'cell' && editConfig?.cellEditConfig?.defaultTableNgData) {
3038
+ defaultData = editConfig.cellEditConfig.defaultTableNgData;
3039
+ }
3040
+ else if (editConfig?.type === 'row' && editConfig?.rowEditConfig?.defaultTableNgData) {
3041
+ defaultData = editConfig.rowEditConfig.defaultTableNgData;
3042
+ }
3043
+ const res = { ...defaultData };
3044
+ return {
3045
+ ...res,
3046
+ id: generateId()
3047
+ };
3048
+ });
3049
+ clonedRowData = null;
3050
+ editingRowId = signal(null);
3051
+ /**
3052
+ * Verifica si una fila específica está siendo editada
3053
+ */
3054
+ isRowEditing(id) {
3055
+ return this.editingRowId() === id;
3056
+ }
3057
+ /**
3058
+ * Verifica si hay alguna fila siendo editada actualmente
3059
+ */
3060
+ get hasRowInEdit() {
3061
+ return this.editingRowId() !== null;
3062
+ }
3063
+ onRowEditInit(data) {
3064
+ // Verificar si ya hay una fila en edición
3065
+ this.clonedRowData = structuredClone(data.rowData);
3066
+ this.setEditingRowId(data.id);
3067
+ this.outputHandleEditInitButton.emit(data);
3068
+ }
3069
+ setEditingRowId(id) {
3070
+ this.editingRowId.set(id);
3071
+ this.outputIsEditing.emit(true);
3072
+ }
3073
+ onRowEditSave(_data) {
3074
+ this.clonedRowData = null;
3075
+ this.editingRowId.set(null);
3076
+ this.updateDataWithTableValue();
3077
+ this.setEnableErrors(false);
3078
+ this.outputIsEditing.emit(false);
3079
+ this.outputRowDataChange.emit(_data);
3080
+ }
3081
+ onRowEditCancel(data, index) {
3082
+ if (this.clonedRowData && this.editingRowId() === data.id) {
3083
+ const items = [...this.data()];
3084
+ items[index] = { ...items[index], rowData: this.clonedRowData };
3085
+ this.data.set(items);
3086
+ }
3087
+ this.clonedRowData = null;
3088
+ this.setEditingRowId(null);
3089
+ this.setEnableErrors(false);
3090
+ this.outputIsEditing.emit(false);
3091
+ }
3092
+ updateDataWithTableValue() {
3093
+ const tableValue = (this.dt.value ?? []);
3094
+ this.data.set([...tableValue]);
3095
+ }
3096
+ editInitButton = computed(() => {
3097
+ return {
3098
+ icon: 'fa-solid fa-pencil',
3099
+ rounded: true,
3100
+ variant: 'text',
3101
+ severity: 'secondary'
3102
+ };
3103
+ });
3104
+ getEditInitButton(productId) {
3105
+ return {
3106
+ ...this.editInitButton(),
3107
+ disabled: this.hasRowInEdit && !this.isRowEditing(productId)
3108
+ };
3109
+ }
3110
+ editSaveButton = computed(() => {
3111
+ return {
3112
+ icon: 'fa-solid fa-check',
3113
+ rounded: true,
3114
+ variant: 'text',
3115
+ severity: 'secondary'
3116
+ };
3117
+ });
3118
+ editSaveButtonWithErrors = computed(() => {
3119
+ return {
3120
+ icon: 'fa-solid fa-check',
3121
+ rounded: true,
3122
+ variant: 'text',
3123
+ severity: 'secondary'
3124
+ };
3125
+ });
3126
+ enableErrors = false;
3127
+ setEnableErrors(value) {
3128
+ this.enableErrors = value;
3129
+ }
3130
+ onEditSaveWithErrors() {
3131
+ this.setEnableErrors(true);
3132
+ }
3133
+ editCancelButton = computed(() => {
3134
+ return {
3135
+ icon: 'fa-solid fa-times',
3136
+ rounded: true,
3137
+ variant: 'text',
3138
+ severity: 'secondary'
3139
+ };
3140
+ });
3141
+ deleteRowButton = computed(() => {
3142
+ return {
3143
+ icon: 'fa-solid fa-trash',
3144
+ rounded: true,
3145
+ variant: 'text',
3146
+ severity: 'danger'
3147
+ };
3148
+ });
3149
+ getDeleteRowButton() {
3150
+ return {
3151
+ ...this.deleteRowButton(),
3152
+ disabled: this.hasRowInEdit
3153
+ };
3154
+ }
3155
+ removeRowFromData(data) {
3156
+ const { id } = data;
3157
+ const items = [...this.data()];
3158
+ items.splice(items.findIndex(item => item.id === id), 1);
3159
+ this.data.set(items);
3160
+ this.outputDeleteRow.emit(data);
3161
+ }
3162
+ deleteRow(data) {
3163
+ this.removeRowFromData(data);
3164
+ this.outputEditData.emit(this.data());
3165
+ }
3166
+ //#endregion Row
3167
+ get footerRows() {
3168
+ return this.footerConfig()?.footerRows || [];
3169
+ }
3170
+ applyPipe(value, pipeConfig) {
3171
+ if (!pipeConfig || !pipeConfig.pipe) {
3172
+ return value?.toString() || '';
3173
+ }
3174
+ switch (pipeConfig.pipe) {
3175
+ case 'currency': {
3176
+ const currencyCode = pipeConfig.args?.[0] || 'COP';
3177
+ return new Intl.NumberFormat('es-CO', {
3178
+ style: 'currency',
3179
+ currency: currencyCode
3180
+ }).format(value);
3181
+ }
3182
+ case 'number': {
3183
+ const digits = pipeConfig.args?.[0] || '1.2-2';
3184
+ const [minInteger, fractional] = digits.split('.');
3185
+ const [minFractional, maxFractional] = fractional ? fractional.split('-') : ['0', '0'];
3186
+ return new Intl.NumberFormat('es-CO', {
3187
+ minimumIntegerDigits: parseInt(minInteger),
3188
+ minimumFractionDigits: parseInt(minFractional),
3189
+ maximumFractionDigits: parseInt(maxFractional || minFractional)
3190
+ }).format(value);
3191
+ }
3192
+ case 'date': {
3193
+ if (value instanceof Date) {
3194
+ return value.toLocaleDateString('es-CO');
3195
+ }
3196
+ return value?.toString() || '';
3197
+ }
3198
+ default:
3199
+ return value?.toString() || '';
3200
+ }
3201
+ }
3202
+ // #endregion
3203
+ //#region Row Expansion
3204
+ rowExpansionButton(isRowExpanded) {
3205
+ return computed(() => {
3206
+ return {
3207
+ icon: isRowExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right',
3208
+ rounded: true,
3209
+ variant: 'text',
3210
+ severity: 'contrast'
3211
+ };
3212
+ });
3213
+ }
3214
+ //#endregion
3215
+ itemTemplateInput = input(null);
3216
+ itemTemplate;
3217
+ get currentItemTemplate() {
3218
+ return this.itemTemplateInput() || this.itemTemplate || null;
3219
+ }
3220
+ isThatItemInTheProductSelection(field) {
3221
+ const selectedColumns = this.config()?.selectedColumns ?? [];
3222
+ if (!selectedColumns.length) {
3223
+ return true;
3224
+ }
3225
+ return selectedColumns.some((column) => column.field === field);
3226
+ }
3227
+ //#region Advanced Identifier Filters
3228
+ advancedIdentifierFiltersButton = computed(() => {
3229
+ return {
3230
+ icon: 'pi pi-filter',
3231
+ rounded: true,
3232
+ severity: 'warn',
3233
+ raised: true,
3234
+ tooltipConfig: {
3235
+ pTooltip: this.data().length === 0 ? 'No hay datos para filtrar' : 'Filtros avanzados',
3236
+ tooltipPosition: 'top'
3237
+ },
3238
+ onClick: () => {
3239
+ this.openAdvancedIdentifierFilters();
3240
+ },
3241
+ disabled: this.data().length === 0
3242
+ };
3243
+ });
3244
+ openAdvancedIdentifierFilters() {
3245
+ if (this.sourceElements().length === 0) {
3246
+ this.handleTableValueToSourceElements();
3247
+ }
3248
+ this.handleSelectedItemsToSourceElements();
3249
+ if (this.data().length === 0) {
3250
+ return;
3251
+ }
3252
+ const ref = this.dialogService.open(ModalAdvancedFilterComponent, {
3253
+ header: 'Filtros Avanzados',
3254
+ width: '70%',
3255
+ height: '70%',
3256
+ styleClass: 'overflow-hidden',
3257
+ data: {
3258
+ sourceElements: this.sourceElements(),
3259
+ targetElements: this.targetElements()
3260
+ }
3261
+ });
3262
+ ref.onClose.subscribe((result) => {
3263
+ const { sourceElements, targetElements } = result?.data ?? {};
3264
+ if (!result?.success) {
3265
+ return;
3266
+ }
3267
+ if (result?.data?.targetElements?.length === 0) {
3268
+ return;
3269
+ }
3270
+ if (sourceElements.length === 0) {
3271
+ return;
3272
+ }
3273
+ this.sourceElements.set(sourceElements ?? []);
3274
+ this.targetElements.set(targetElements ?? []);
3275
+ this.identifiersSelected.set((this.targetElements() ?? []).filter((element) => element.buttonConfig?.label).map((element) => element.buttonConfig?.label) ?? []);
3276
+ this.dt.filter(this.identifiersSelected(), 'rowData.identifier', 'arrayStringFilter');
3277
+ });
3278
+ }
3279
+ handleTableValueToSourceElements() {
3280
+ const value = this.data();
3281
+ if (!value.some((item) => item.rowData['identifier'])) {
3282
+ return;
3283
+ }
3284
+ const sourceElements = value.map((item) => ({
3285
+ id: item.id,
3286
+ buttonConfig: {
3287
+ label: item.rowData['identifier'],
3288
+ fullWidth: true,
3289
+ fullHeight: true
3290
+ },
3291
+ isSelected: false
3292
+ }));
3293
+ this.sourceElements.set(sourceElements);
3294
+ }
3295
+ handleSelectedItemsToSourceElements() {
3296
+ const selectedItems = this.selectedItems();
3297
+ if (!selectedItems.some((item) => item.rowData['identifier'])) {
3298
+ return;
3299
+ }
3300
+ const identifiers = selectedItems.map((item) => item.rowData['identifier']);
3301
+ const sourceElements = this.sourceElements().map((item) => ({
3302
+ ...item,
3303
+ isSelected: identifiers.includes(item.buttonConfig?.label)
3304
+ }));
3305
+ this.sourceElements.set(sourceElements);
3306
+ }
3307
+ identifiersSelected = signal([]);
3308
+ //#endregion
3309
+ get excelButton() {
3310
+ return this.tableNgService.excelButton();
3311
+ }
3312
+ get pdfButton() {
3313
+ return this.tableNgService.pdfButton();
3314
+ }
3315
+ lazyLoadingConfig = computed(() => {
3316
+ return this.config()?.lazyLoadingConfig ?? undefined;
3317
+ });
3318
+ isEnabledLazyLoading = computed(() => {
3319
+ return this.lazyLoadingConfig()?.isEnabled ?? false;
3320
+ });
3321
+ prepareDataForExport(dataToExport) {
3322
+ const keys = this.config()?.keys ?? [];
3323
+ const keysNames = this.config()?.keysNames ?? {};
3324
+ return dataToExport.map((item) => {
3325
+ const row = {};
3326
+ const rowData = item.rowData;
3327
+ keys.forEach((key) => {
3328
+ const keyName = keysNames[key] ?? key;
3329
+ if (rowData[key]) {
3330
+ let value = rowData[key];
3331
+ switch (typeof value) {
3332
+ case 'number':
3333
+ value = formatNumber(value);
3334
+ break;
3335
+ default:
3336
+ break;
3337
+ }
3338
+ row[keyName] = value;
3339
+ }
3340
+ });
3341
+ return row;
3342
+ });
3343
+ }
3344
+ exportCSV(data) {
3345
+ // Create a new workbook
3346
+ const workbook = XLSX.utils.book_new();
3347
+ const worksheet = XLSX.utils.json_to_sheet(data);
3348
+ // Get title from config or use default
3349
+ const name = this.config()?.excelConfig?.name ?? 'Report';
3350
+ const fileName = name || 'table-export';
3351
+ // Excel sheet names cannot exceed 31 characters
3352
+ const sheetName = name.substring(0, 31);
3353
+ // Add the worksheet to the workbook
3354
+ XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);
3355
+ // Generate Excel file and trigger download
3356
+ XLSX.writeFile(workbook, `${fileName}.xlsx`);
3357
+ }
3358
+ exportData(dt, endpoint) {
3359
+ if (this.isEnabledLazyLoading()) {
3360
+ const filters = dt.filters ?? {};
3361
+ const filterQuery = {};
3362
+ Object.entries(filters).forEach(([key, value]) => {
3363
+ const keyName = key.split('.')[1];
3364
+ const valueFilter = value[0]?.value;
3365
+ filterQuery[keyName] = valueFilter;
3366
+ });
3367
+ this.lazyLoadingConfig()?.excelLazyLoadingConfig?.callback(removeNullUndefined(filterQuery))
3368
+ .subscribe((response) => {
3369
+ const data = this.prepareDataForExport(response);
3370
+ if (endpoint === 'excel') {
3371
+ this.exportCSV(data);
3372
+ }
3373
+ else {
3374
+ this.exportPDF(data);
3375
+ }
3376
+ });
3377
+ }
3378
+ else {
3379
+ const value = dt.value ?? this.data();
3380
+ const filteredValue = dt.filteredValue ?? [];
3381
+ let dataToExport = [];
3382
+ if (filteredValue.length > 0) {
3383
+ dataToExport = filteredValue;
3384
+ }
3385
+ else {
3386
+ dataToExport = value;
3387
+ }
3388
+ const data = this.prepareDataForExport(dataToExport);
3389
+ if (endpoint === 'excel') {
3390
+ this.exportCSV(data);
3391
+ }
3392
+ else {
3393
+ this.exportPDF(data);
3394
+ }
3395
+ }
3396
+ }
3397
+ exportPDF(data) {
3398
+ // Get title from config or use default
3399
+ const name = this.config()?.pdfConfig?.name ?? this.config()?.excelConfig?.name ?? 'Report';
3400
+ const fileName = name || 'table-export';
3401
+ // Get keys and column names
3402
+ const keys = this.config()?.keys ?? [];
3403
+ const keysNames = this.config()?.keysNames ?? {};
3404
+ // Prepare headers
3405
+ const headers = keys.map((key) => keysNames[key] ?? key);
3406
+ // Prepare rows data
3407
+ const rows = data.map((row) => {
3408
+ return keys.map((key) => {
3409
+ const keyName = keysNames[key] ?? key;
3410
+ return row[keyName] ?? '';
3411
+ });
3412
+ });
3413
+ // Create PDF document
3414
+ const doc = new jsPDF({
3415
+ orientation: 'landscape',
3416
+ unit: 'mm',
3417
+ format: 'a4'
3418
+ });
3419
+ // Add title
3420
+ doc.setFontSize(16);
3421
+ doc.text(name, 14, 15);
3422
+ // Add table
3423
+ autoTable(doc, {
3424
+ head: [headers],
3425
+ body: rows,
3426
+ startY: 20,
3427
+ styles: {
3428
+ fontSize: 8,
3429
+ cellPadding: 2
3430
+ },
3431
+ headStyles: {
3432
+ fillColor: [66, 139, 202],
3433
+ textColor: 255,
3434
+ fontStyle: 'bold'
3435
+ },
3436
+ alternateRowStyles: {
3437
+ fillColor: [245, 245, 245]
3438
+ },
3439
+ margin: { top: 20 }
3440
+ });
3441
+ // Save PDF
3442
+ doc.save(`${fileName}.pdf`);
3443
+ }
3444
+ enableExcelButton = computed(() => {
3445
+ return this.config()?.excelConfig?.isEnabled ?? false;
3446
+ });
3447
+ enablePdfButton = computed(() => {
3448
+ return this.config()?.pdfConfig?.isEnabled ?? false;
3449
+ });
3450
+ get enableRefreshButton() {
3451
+ return this.tableNgService.enableRefreshButton();
3452
+ }
3453
+ get refreshButton() {
3454
+ return this.tableNgService.refreshButton();
3455
+ }
3456
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3457
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TableNgComponent, isStandalone: true, selector: "lib-table-ng", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, editConfig: { classPropertyName: "editConfig", publicName: "editConfig", isSignal: true, isRequired: false, transformFunction: null }, footerConfig: { classPropertyName: "footerConfig", publicName: "footerConfig", isSignal: true, isRequired: false, transformFunction: null }, toolbarButtons: { classPropertyName: "toolbarButtons", publicName: "toolbarButtons", isSignal: true, isRequired: false, transformFunction: null }, toolbarSpeedDialButtons: { classPropertyName: "toolbarSpeedDialButtons", publicName: "toolbarSpeedDialButtons", isSignal: true, isRequired: false, transformFunction: null }, sourceElements: { classPropertyName: "sourceElements", publicName: "sourceElements", isSignal: true, isRequired: false, transformFunction: null }, targetElements: { classPropertyName: "targetElements", publicName: "targetElements", isSignal: true, isRequired: false, transformFunction: null }, httpMessage: { classPropertyName: "httpMessage", publicName: "httpMessage", isSignal: true, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null }, itemTemplateInput: { classPropertyName: "itemTemplateInput", publicName: "itemTemplateInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange", config: "configChange", editConfig: "editConfigChange", footerConfig: "footerConfigChange", toolbarButtons: "toolbarButtonsChange", toolbarSpeedDialButtons: "toolbarSpeedDialButtonsChange", sourceElements: "sourceElementsChange", targetElements: "targetElementsChange", httpMessage: "httpMessageChange", lazyLoading: "lazyLoading", outputChangeData: "outputChangeData", outputHandleEditInitButton: "outputHandleEditInitButton", outputAddRow: "outputAddRow", outputDeleteRow: "outputDeleteRow", outputRowInlineChange: "outputRowInlineChange", outputRowDataChange: "outputRowDataChange", outputEditData: "outputEditData", outputIsEditing: "outputIsEditing", selectedItems: "selectedItemsChange" }, providers: [TableNgService, TableNgEditService], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true, static: true }], viewQueries: [{ propertyName: "dt", first: true, predicate: ["dt"], descendants: true }], ngImport: i0, template: "@let paginationConfig = config()?.paginationConfig;\n@let globalFilterConfig = config()?.globalFilterConfig;\n@let selectionTableConfig = config()?.selectionTableConfig;\n@let filterConfigByKey = config()?.filterConfigByKey;\n@let frozenColumnConfigByKey = config()?.frozenColumnConfigByKey;\n@let scrollConfig = config()?.scrollConfig;\n@let lazyLoadingConfig = config()?.lazyLoadingConfig;\n@let keysNames = config()?.keysNames;\n@let columnConfig = config()?.columnConfig;\n@let editEnabled = editConfig()?.isEnabled ?? false;\n@let editType = editConfig()?.type ?? 'cell';\n@let inlineControls = editConfig()?.inlineControls;\n@let rowErrorConfig = editConfig()?.rowEditConfig?.rowErrorConfig;\n@let footerRows = footerConfig()?.footerRows;\n@let footerEnabled = footerConfig()?.isEnabled ?? false;\n@let titleConfig = config()?.titleConfig;\n@let selectedColumns = config()?.selectedColumns;\n@let rowExpansionConfig = config()?.rowExpansionConfig;\n@let advancedIdentifierFiltersConfig = config()?.globalFilterConfig?.advancedIdentifierFiltersConfig;\n\n<div class=\"p-datatable-wrapper\">\n @if (titleConfig?.isEnabled && titleConfig?.title) {\n <div class=\"table-title-container\">\n <h2 class=\"table-title\">{{ titleConfig!.title }}</h2>\n </div>\n }\n @if (!hideToolbar || (filteredValue || advancedFiltersPerformed.length > 0)) {\n <lib-toolbar-ng class=\"p-toolbar-header sticky top-0 z-30 dark:bg-gray-800\">\n <div class=\"flex gap-2\" toolbarStart>\n @if (globalFilterConfig?.isEnabled && !lazyLoadingConfig?.isEnabled) {\n <lib-form [controls]=\"controlsGlobalFilter\" [(formGroup)]=\"searchFormGroupGlobalFilter\"\n (formSubmit)=\"submitGlobalSearch($event)\"></lib-form>\n }\n @if (advancedIdentifierFiltersConfig?.isEnabled) {\n <lib-button-ng class=\"animate__animated animate__fadeIn\"\n [buttonConfig]=\"advancedIdentifierFiltersButton()\"></lib-button-ng>\n }\n @if (filteredValue || advancedFiltersPerformed.length > 0) {\n <lib-button-ng class=\"animate__animated animate__fadeIn\" [buttonConfig]=\"clearFiltersButton()\"></lib-button-ng>\n }\n </div>\n <div class=\"flex gap-2\" toolbarEnd>\n @if (toolbarSpeedDialButtons().length > 0) {\n @for (speedDial of toolbarSpeedDialButtons(); track $index) {\n <lib-speed-dial [speedDialConfig]=\"speedDial\"></lib-speed-dial>\n }\n }\n @if (toolbarButtons().length > 0) {\n @for (button of toolbarButtons(); track $index) {\n <lib-button-ng [buttonConfig]=\"button\"></lib-button-ng>\n }\n }\n @if ((editType === 'row' || editType === 'cell') && editEnabled) {\n <lib-button-ng [buttonConfig]=\"addRowButton()\"></lib-button-ng>\n }\n @if (enableExcelButton()) {\n <lib-button-ng [buttonConfig]=\"excelButton\" (onClick)=\"exportData(dt,'excel')\"></lib-button-ng>\n }\n @if (enablePdfButton()) {\n <lib-button-ng [buttonConfig]=\"pdfButton\" (onClick)=\"exportData(dt,'pdf')\"></lib-button-ng>\n }\n @if (enableRefreshButton) {\n <lib-button-ng [buttonConfig]=\"refreshButton\"></lib-button-ng>\n }\n </div>\n </lib-toolbar-ng>\n }\n <p-table #dt styleClass=\"p-datatable-sm\" [value]=\"data()\" [lazy]=\"lazyLoadingConfig?.isEnabled ?? false\"\n [editMode]=\"editType\" [totalRecords]=\"\n lazyLoadingConfig?.isEnabled\n ? (lazyLoadingConfig?.totalRecords ?? 0)\n : data().length\n \" [customSort]=\"true\" [paginator]=\"paginationConfig?.paginator ?? true\" [showCurrentPageReport]=\"true\"\n [rows]=\"paginationConfig?.rows ?? 5\" [rowsPerPageOptions]=\"paginationConfig?.rowsPerPageOptions ?? [5, 10, 20]\"\n [paginatorStyleClass]=\"paginatorStyleClass()\" [resizableColumns]=\"true\" [rowTrackBy]=\"trackById\"\n [columns]=\"selectedColumns\" [scrollable]=\"scrollConfig?.isEnabled ?? false\"\n [scrollHeight]=\"scrollConfig?.isEnabled ? scrollHeight() : undefined\" (onLazyLoad)=\"onLazyLoad($event)\"\n (sortFunction)=\"customSort($event)\" (onFilter)=\"onFilter($event)\" [(selection)]=\"selectedItems\"\n [currentPageReportTemplate]=\"getCustomPageReport()\" selectionPageOnly=\"true\" dataKey=\"id\" class=\"w-full\">\n <ng-template #header let-columns>\n <tr>\n @if (rowExpansionConfig?.isEnabled) {\n <th alignFrozen=\"left\" pFrozenColumn style=\"width: 2rem\" class=\"p-datatable-header-cell p-frozen-column\">\n\n </th>\n }\n @if (selectionTableConfig?.isEnabled) {\n <th alignFrozen=\"left\" pFrozenColumn style=\"width: 2rem\" class=\"p-datatable-header-cell p-frozen-column\">\n <p-tableHeaderCheckbox />\n </th>\n }\n\n @if (selectedColumns) {\n @for (column of columns; track $index) {\n <th pResizableColumn [id]=\"column.field\" alignFrozen=\"right\" pFrozenColumn\n [frozen]=\"frozenHandle(frozenColumnConfigByKey?.[column.field])\" [pSortableColumn]=\"column.field\"\n class=\"p-datatable-header-cell\" [style.width.%]=\"columnConfig?.sizeByKey?.[column.field] ?? null\" [ngClass]=\"{\n 'p-frozen-column': frozenHandle(\n frozenColumnConfigByKey?.[column.field]\n ),\n }\">\n <div class=\"flex gap-2 justify-center items-center py-0 px-0\">\n {{ column.field | keyToDisplayName: keysNames }}\n @if(!editEnabled){\n <p-sortIcon [field]=\"column.field\" />\n }\n @if (filterConfigByKey?.[column.field]?.isEnabled) {\n <p-columnFilter type=\"text\" [field]=\"`rowData.${column.field}`\" display=\"menu\" [ngClass]=\"{\n 'bg-green-200 rounded-full p-1 shadow-sm text-green-500 transition-all duration-300 ease-in-out':\n advancedFiltersPerformed.includes(column.field),\n }\" [type]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig?.type ??\n 'text'\n \" [matchMode]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.matchMode\n \" [showMatchModes]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showMatchModes ?? false\n \" [showOperator]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showOperator ?? false\n \" [showAddButton]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showAddButton ?? false\n \" [showApplyButton]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showApplyButton ?? false\n \" [showClearButton]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showClearButton ?? false\n \">\n @if (\n filterConfigByKey?.[column.field]?.customColumnFilterConfig\n ?.isEnabled ?? false\n ) {\n <ng-template #filter let-value let-filter=\"filterCallback\">\n <div style=\"min-width: 20rem\" class=\"\">\n <lib-inline-input\n (outputValue)=\"inlineFormChanges($event, filter, filterConfigByKey?.[column.field]?.customColumnFilterConfig?.inlineControlConfig?.typeInput, column.field)\"\n (outputDebounced)=\"onFilter($event)\" [(ngModel)]=\"advancedFiltersValues()[column.field]\"\n [config]=\"filterConfigByKey?.[column.field]?.customColumnFilterConfig?.inlineControlConfig ?? {typeInput: ETypeInput.TEXT}\"></lib-inline-input>\n </div>\n </ng-template>\n }\n </p-columnFilter>\n }\n </div>\n </th>\n }\n }@else {\n @for (key of keys(); track $index) {\n <th [id]=\"key\" pResizableColumn alignFrozen=\"right\" pFrozenColumn\n [frozen]=\"frozenHandle(frozenColumnConfigByKey?.[key])\" [pSortableColumn]=\"key\"\n class=\"p-datatable-header-cell\" [style.width.%]=\"columnConfig?.sizeByKey?.[key] ?? null\" [ngClass]=\"{\n 'p-frozen-column': frozenHandle(frozenColumnConfigByKey?.[key]),\n }\">\n <div class=\"flex gap-2 justify-center items-center py-0 px-0\">\n {{ key | keyToDisplayName: keysNames }}\n @if(!editEnabled){\n <p-sortIcon [field]=\"key\" />\n }\n @if (filterConfigByKey?.[key]?.isEnabled) {\n <p-columnFilter type=\"text\" [field]=\"`rowData.${key}`\" display=\"menu\" [ngClass]=\"{\n 'bg-green-200 rounded-full p-1 shadow-sm text-green-500 transition-all duration-300 ease-in-out':\n advancedFiltersPerformed.includes(key),\n }\" [type]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.type ?? 'text'\"\n [matchMode]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.matchMode\"\n [showMatchModes]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showMatchModes ?? false\"\n [showOperator]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showOperator ?? false\"\n [showAddButton]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showAddButton ?? false\"\n [showApplyButton]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showApplyButton ?? false\"\n [showClearButton]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showClearButton ?? false\">\n @if (\n filterConfigByKey?.[key]?.customColumnFilterConfig\n ?.isEnabled ?? false\n ) {\n <ng-template #filter let-value let-filter=\"filterCallback\">\n <div style=\"min-width: 20rem\" class=\"\">\n <!-- <app-custom-advanced-filter filter\n [customColumnFilterConfig]=\"filterConfigByKey![key]!.customColumnFilterConfig!\"\n (formChanges)=\"formChanges($event, filter, key)\"\n [initialValue]=\"advancedFiltersValues[key]\"></app-custom-advanced-filter> -->\n <lib-inline-input\n (outputValue)=\"inlineFormChanges($event, filter, filterConfigByKey?.[key]?.customColumnFilterConfig?.inlineControlConfig?.typeInput, key)\"\n [(ngModel)]=\"advancedFiltersValues()[key]\"\n [config]=\"filterConfigByKey?.[key]?.customColumnFilterConfig?.inlineControlConfig ?? {typeInput: ETypeInput.TEXT}\"></lib-inline-input>\n </div>\n </ng-template>\n }\n </p-columnFilter>\n }\n </div>\n </th>\n }\n }\n\n @if (editType === 'cell' && editEnabled) {\n <th class=\"p-datatable-header-cell\" style=\"width: 100px\">\n </th>\n }\n @if (editType === 'row' && editEnabled) {\n <th class=\"p-datatable-header-cell\" style=\"width: 100px\">\n </th>\n }\n\n </tr>\n </ng-template>\n\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"totalColumns()\">\n @if (isLoading()) {\n <!-- Loading state -->\n <div class=\"p-8 text-center\">\n <div class=\"flex flex-col items-center justify-center gap-4\">\n <i class=\"pi pi-spin pi-spinner text-4xl text-blue-500\"></i>\n <p class=\"text-gray-600 text-lg\">{{ getLoadingMessage() }}</p>\n </div>\n </div>\n } @else if (timeoutExpired()) {\n <!-- No data available -->\n <div class=\"p-8 text-center text-gray-500\">\n <div class=\"flex flex-col items-center justify-center gap-3\">\n <i class=\"pi pi-info-circle text-4xl text-gray-400\"></i>\n <p class=\"text-lg\">{{ getNoDataMessage() }}</p>\n </div>\n </div>\n }\n </td>\n </tr>\n </ng-template>\n\n @if (hasRecords()) {\n @if (editEnabled) {\n @switch (editType) {\n @case ('cell') {\n <ng-template #body let-item let-editing=\"editing\">\n <tr class=\"p-datatable-row p-selectable-row\">\n @if (selectedColumns) {\n @for (column of selectedColumns; track $index){\n <td [pEditableColumn]=\"column.field\" pEditableColumnField=\"rowData.{{column.field}}\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[column.field]\" (outputDebounced)=\"onEditData()\"\n [config]=\"inlineControls?.[column.field] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n </ng-template>\n <ng-template #output>\n @if (inlineControls?.[column.field]?.typeInput === ETypeInput.NUMBER) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | number: '1.2-2' }}\n\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.CURRENCY) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | currency: item?.currencyTypeCellConfig?.[column.field]?.currency ??\n 'USD' }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATE) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATETIME_LOCAL) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy HH:mm\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[column.field]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n @if (item.rowData[column.field]?.name) {\n {{ item.rowData[column.field]?.name }}\n } @else {\n {{ item.rowData[column.field] }}\n }\n }\n\n </ng-template>\n </p-cellEditor>\n </td>\n }\n } @else {\n @for (key of keys(); track $index){\n <td [pEditableColumn]=\"key\" pEditableColumnField=\"rowData.{{key}}\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[key]\" (outputDebounced)=\"onEditData()\"\n [config]=\"inlineControls?.[key] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n </ng-template>\n <ng-template #output>\n @if (inlineControls?.[key]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[key]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n {{ item.rowData[key] }}\n }\n </ng-template>\n </p-cellEditor>\n </td>\n }\n }\n @if (editType === 'cell' && editEnabled) {\n <td class=\"px-2 py-1 text-center\">\n <div class=\"flex justify-center items-center gap-2\">\n <lib-button-ng [buttonConfig]=\"getDeleteRowButton()\" (onClick)=\"deleteRow(item)\"></lib-button-ng>\n </div>\n </td>\n }\n </tr>\n </ng-template>\n }\n @case ('row') {\n <ng-template #body let-item let-editing=\"editing\" let-ri=\"rowIndex\">\n <tr [pEditableRow]=\"item\" class=\"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 border-b\">\n @if (selectedColumns) {\n @for (column of selectedColumns; track $index){\n <td>\n <div class=\"flex flex-col gap-2\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[column.field]\"\n (outputValue)=\"inlineChange($event, column.field)\" (outputDebounced)=\"onEditData()\"\n [config]=\"inlineControls?.[column.field] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n\n </ng-template>\n <ng-template #output>\n\n @if (inlineControls?.[column.field]?.typeInput === ETypeInput.NUMBER) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | number: '1.2-2' }}\n\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.CURRENCY) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | currency: item?.currencyTypeCellConfig?.[column.field]?.currency ??\n 'USD' }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATE) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATETIME_LOCAL) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy HH:mm\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[column.field]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n @if (item.rowData[column.field]?.name) {\n {{ item.rowData[column.field]?.name }}\n } @else {\n {{ item.rowData[column.field] }}\n }\n }\n\n\n </ng-template>\n </p-cellEditor>\n\n @if (rowErrorConfig?.isEnabled && enableErrors && !rowFieldsHasValue()[column.field]) {\n <span class=\"text-red-500 italic text-xs\">{{\n rowErrorConfig?.fieldErrors?.[item.id]?.[column.field]?.message ??\n '' }}</span>\n }\n </div>\n </td>\n }\n } @else {\n @for (key of keys(); track $index){\n <td>\n <div class=\"flex flex-col gap-2\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[key]\" (outputValue)=\"inlineChange($event, key)\"\n (outputDebounced)=\"onEditData()\" [config]=\"inlineControls?.[key] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n </ng-template>\n <ng-template #output>\n\n @if (inlineControls?.[key]?.typeInput === ETypeInput.NUMBER) {\n <div class=\"text-right\">\n {{ item.rowData[key] | number: '1.2-2' }}\n\n </div>\n }\n @else if(inlineControls?.[key]?.typeInput === ETypeInput.CURRENCY) {\n <div class=\"text-right\">\n {{ item.rowData[key] | currency: item?.currencyTypeCellConfig?.[key]?.currency ?? 'USD' }}\n </div>\n } @else if(inlineControls?.[key]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[key]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n @if (item.rowData[key]?.name) {\n {{ item.rowData[key]?.name }}\n } @else {\n {{ item.rowData[key] }}\n }\n }\n\n\n </ng-template>\n </p-cellEditor>\n\n @if (rowErrorConfig?.isEnabled && enableErrors && !rowFieldsHasValue()[key]) {\n <span class=\"text-red-500 italic text-xs\">{{ rowErrorConfig?.fieldErrors?.[item.id]?.[key]?.message ??\n '' }}</span>\n }\n </div>\n </td>\n }\n }\n <td>\n <div class=\"flex justify-center items-center gap-2\">\n @if(!editing){\n <lib-button-ng pButton pRipple pInitEditableRow [buttonConfig]=\"getEditInitButton(item.id)\"\n (onClick)=\"onRowEditInit(item)\"></lib-button-ng>\n @if(!editConfig()?.rowEditConfig?.isDisabledDeleteButton){\n <lib-button-ng [buttonConfig]=\"getDeleteRowButton()\" (onClick)=\"deleteRow(item)\"></lib-button-ng>\n }\n }\n @if(editing){\n @if (hasErrorValues(rowErrorConfig?.fieldErrors?.[item.id] ?? {})) {\n <lib-button-ng [buttonConfig]=\"editSaveButtonWithErrors()\"\n (onClick)=\"onEditSaveWithErrors()\"></lib-button-ng>\n }\n @else {\n <lib-button-ng pButton pRipple pSaveEditableRow [buttonConfig]=\"editSaveButton()\"\n (onClick)=\"onRowEditSave(item)\"></lib-button-ng>\n }\n <lib-button-ng pButton pRipple pCancelEditableRow [buttonConfig]=\"editCancelButton()\"\n (onClick)=\"onRowEditCancel(item, ri)\"></lib-button-ng>\n }\n </div>\n </td>\n </tr>\n </ng-template>\n }\n }\n } @else {\n\n <ng-template #body let-item let-expanded=\"expanded\">\n <tr class=\"p-datatable-row p-selectable-row\" [ngClass]=\"{\n 'bg-gray-50 dark:bg-gray-800 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700': item.onClick && !item.isSelected && !item.isLoading,\n 'bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600': !item.onClick && !item.isSelected && !item.isLoading,\n 'bg-blue-100 dark:bg-blue-900 border-l-4 border-blue-500 hover:bg-blue-200 dark:hover:bg-blue-800': item.isSelected && !item.isLoading,\n 'skeleton-row': item.isLoading\n }\" (click)=\"item?.isLoading ? null : onRowClick(item)\">\n\n @if (rowExpansionConfig?.isEnabled) {\n <td (click)=\"$event.stopPropagation()\" [class.skeleton-cell]=\"item.isLoading\"\n [style.height]=\"item.isLoading ? '3rem' : 'auto'\">\n @if (!item.isLoading) {\n <lib-button-ng [buttonConfig]=\"rowExpansionButton(expanded)()\" type=\"button\" pRipple\n [pRowToggler]=\"item\"></lib-button-ng>\n } @else {\n <div class=\"skeleton-content\"></div>\n }\n </td>\n }\n\n @if (selectionTableConfig?.isEnabled) {\n <td (click)=\"$event.stopPropagation()\" alignFrozen=\"left\" pFrozenColumn class=\"shadow-lg\"\n [class.skeleton-cell]=\"item.isLoading\" [style.height]=\"item.isLoading ? '3rem' : 'auto'\">\n @if (!item.isLoading) {\n <p-tableCheckbox [id]=\"item\" [value]=\"item\" />\n } @else {\n <div class=\"skeleton-content\"></div>\n }\n </td>\n }\n\n @for (key of keys(); track $index) {\n @if (isThatItemInTheProductSelection(key)) {\n <td [id]=\"key\" class=\"p-datatable-cell\" [style.height]=\"item.isLoading ? '3rem' : 'min-content'\"\n alignFrozen=\"right\" pFrozenColumn [ngClass]=\"{\n 'p-frozen-column': frozenHandle(frozenColumnConfigByKey?.[key]),\n 'text-center': item.rowDataButtons?.[key] || item.typeCell?.[key] === ETypeInput.BADGE,\n 'skeleton-cell': item.isLoading\n }\" [frozen]=\"frozenHandle(frozenColumnConfigByKey?.[key])\">\n @if (item.isLoading) {\n <div class=\"skeleton-content\"></div>\n } @else {\n @if (item.rowDataButtons?.[key]) {\n <div class=\"flex gap-4 w-full justify-center items-center\">\n @for (btn of item.rowDataButtons[key]; track $index) {\n @if (btn) {\n <lib-button-ng class=\"w-full\" (click)=\"$event.stopPropagation()\" [buttonConfig]=\"btn\"></lib-button-ng>\n }\n }\n </div>\n } @else {\n @switch (item.typeCell?.[key]) {\n @case (ETypeInput.IMAGE) {\n <img [src]=\"item.rowData[key]\" alt=\"Image\" class=\"w-10 h-10 mx-auto\">\n }\n @case (ETypeInput.DATE) {\n {{ item.rowData[key] | date: \"dd/MM/yyyy\" }}\n }\n @case (ETypeInput.DATETIME_LOCAL) {\n {{ item.rowData[key] | date: \"dd/MM/yyyy HH:mm\" }}\n }\n @case (ETypeInput.CURRENCY) {\n {{item?.currencyTypeCellConfig?.[key]?.currency}} {{ item.rowData[key] | currency:\n item?.currencyTypeCellConfig?.[key]?.currency ?? 'USD' }}\n }\n @case (ETypeInput.BADGE) {\n <lib-badge-ng [config]=\"item.rowData[key]\"></lib-badge-ng>\n }\n @case (ETypeInput.COMPONENT) {\n <ng-container\n *ngTemplateOutlet=\"item.rowDataComponents?.[key]; context: { $implicit: item.raw }\"></ng-container>\n }\n @default {\n @if (isDate(item.rowData[key])) {\n {{ item.rowData[key] | date: \"dd/MM/yyyy\" }}\n } @else if (typeof item.rowData[key] === \"string\") {\n {{ item.rowData[key] }}\n } @else if (isPrimeNgSelection(item.rowData[key])) {\n {{ item.rowData[key].name }}\n } @else if(typeof item.rowData[key] === \"number\") {\n <p class=\"text-right\">\n {{ item.rowData[key] | number: '1.2-2' }}\n </p>\n }\n }\n }\n }\n }\n </td>\n }\n }\n </tr>\n </ng-template>\n }\n }\n\n <ng-template #footer>\n @if (footerEnabled) {\n @for (row of footerRows; track $index) {\n <tr class=\"p-datatable-row p-datatable-footer-row\">\n @for (cell of row; track $index) {\n <td colSpan=\"{{ cell.colSpan }}\" class=\"{{ cell.class }} text-right font-bold p-3 pb-0\">{{\n applyPipe(cell.value,\n cell.pipeConfig) }}</td>\n\n }\n </tr>\n }\n\n }\n </ng-template>\n <ng-template #expandedrow let-item>\n <tr>\n <td colspan=\"100%\">\n <div class=\"p-datatable-row-expansion\">\n <ng-container *ngTemplateOutlet=\"currentItemTemplate; context: { $implicit: item }\"></ng-container>\n\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (showBottomToolbar()) {\n <div class=\"p-datatable-footer sticky bottom-2 z-9 animate__animated animate__fadeIn\">\n <lib-toolbar-ng>\n @if (showManagementSelectionConfig()) {\n <div toolbarStart\n class=\"p-datatable-footer-content flex items-center gap-3 px-4 rounded-lg animate__animated animate__fadeIn\">\n <span class=\"font-medium text-gray-700 dark:text-gray-300\">{{ getSelectedItemsLabel() }}</span>\n <div class=\"p-datatable-footer-badge flex items-center justify-center min-w-[28px] h-7 px-2 rounded-md\">\n <span class=\"font-semibold text-gray-900 dark:text-gray-100\">{{\n totalItemsSelected().toLocaleString()\n }}</span>\n </div>\n <span class=\"text-sm text-gray-600\">{{ getRecordsLabel() }}</span>\n <lib-button-ng [buttonConfig]=\"showSelectedItemsManagementButton()\"></lib-button-ng>\n </div>\n }\n </lib-toolbar-ng>\n </div>\n }\n</div>\n@if (httpMessage()) {\n<lib-http-message [(httpMessage)]=\"httpMessage\"></lib-http-message>\n}", styles: [".cursor-pointer{cursor:pointer}.empty-data-message{text-align:center;padding:2rem;color:#6c757d;font-style:italic}.table-title-container{background:var(--p-surface-50);border-bottom:1px solid var(--p-surface-200);padding:1.25rem 2rem;position:relative}.table-title{color:var(--p-text-color);font-size:1.5rem;font-weight:600;text-align:center;margin:0;letter-spacing:-.025em;text-shadow:0 1px 2px rgba(0,0,0,.05);background:linear-gradient(135deg,var(--p-text-color) 0%,var(--p-text-muted-color) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;position:relative}.table-title:after{content:\"\";position:absolute;bottom:-.5rem;left:50%;transform:translate(-50%);width:60px;height:2px;background:linear-gradient(90deg,var(--p-primary-color),var(--p-primary-600));border-radius:1px}:host ::ng-deep .p-datatable-paginator{background:var(--p-surface-100);border-top:1px solid var(--p-surface-300);padding:1rem}:host ::ng-deep .p-datatable-paginator .p-paginator{background:transparent;border:none;padding:0}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page{background:var(--p-surface-200);border:1px solid var(--p-surface-300);color:var(--p-text-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page:hover{background:var(--p-surface-300);border-color:var(--p-primary-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--p-primary-color);border-color:var(--p-primary-color);color:var(--p-primary-contrast-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last{background:var(--p-surface-200);border:1px solid var(--p-surface-300);color:var(--p-text-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:hover,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:hover,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:hover,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:hover{background:var(--p-surface-300);border-color:var(--p-primary-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:disabled,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:disabled,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:disabled,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:disabled{background:var(--p-surface-100);border-color:var(--p-surface-300);color:var(--p-text-muted-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-current{color:var(--p-text-color);font-weight:500}:host ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown{background:var(--p-surface-200);border:1px solid var(--p-surface-300);color:var(--p-text-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:hover{border-color:var(--p-primary-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color-100)}.skeleton-row{pointer-events:none;-webkit-user-select:none;user-select:none;min-height:3rem}.skeleton-cell{position:relative;overflow:hidden;min-height:3rem;padding:.75rem .5rem!important}.skeleton-cell .skeleton-content{position:absolute;inset:.5rem;min-height:1.5rem;background:linear-gradient(90deg,#d1d5db33,#d1d5db66,#d1d5db33);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}@keyframes skeleton-loading{0%{background-position:200% 0}to{background-position:-200% 0}}:host-context(.my-app-dark) .skeleton-cell .skeleton-content{background:linear-gradient(90deg,#4b556333,#4b556366,#4b556333);background-size:200% 100%}:host ::ng-deep .p-datatable .p-datatable-tbody .skeleton-row .skeleton-cell{width:auto;min-width:fit-content}:host-context(.my-app-dark) .table-title-container{background:var(--p-surface-800);border-bottom-color:var(--p-surface-700)}:host-context(.my-app-dark) .table-title{color:var(--p-text-color);background:linear-gradient(135deg,var(--p-text-color) 0%,var(--p-text-muted-color) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator{background:var(--p-surface-900);border-top-color:var(--p-surface-800)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page{background:var(--p-surface-800);border-color:var(--p-surface-700);color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page:hover{background:var(--p-surface-700);border-color:var(--p-primary-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--p-primary-color);border-color:var(--p-primary-color);color:var(--p-primary-contrast-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last{background:var(--p-surface-800);border-color:var(--p-surface-700);color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:hover,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:hover,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:hover,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:hover{background:var(--p-surface-700);border-color:var(--p-primary-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:disabled,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:disabled,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:disabled,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:disabled{background:var(--p-surface-900);border-color:var(--p-surface-800);color:var(--p-text-muted-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-current{color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown{background:var(--p-surface-800);border-color:var(--p-surface-700);color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:hover{border-color:var(--p-primary-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color-100)}.flex{display:flex}.flex-col{flex-direction:column}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.justify-center{justify-content:center}.items-center{align-items:center}.text-center{text-align:center}.text-right{text-align:right}.text-left{text-align:left}.text-gray-400{color:#9ca3af}.text-gray-500{color:#6b7280}.text-gray-600{color:#4b5563}.text-gray-700{color:#374151}.text-gray-900{color:#111827}.text-blue-500{color:#3b82f6}.text-red-500{color:#ef4444}.text-green-500{color:#22c55e}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.italic{font-style:italic}.w-full{width:100%}.w-10{width:2.5rem}.h-10{height:2.5rem}.h-7{height:1.75rem}.min-w-28{min-width:28px}.mx-auto{margin-left:auto;margin-right:auto}.p-1{padding:.25rem}.p-3{padding:.75rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.py-0{padding-top:0;padding-bottom:0}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-0{padding-bottom:0}.bg-gray-50{background-color:#f9fafb}.bg-gray-100{background-color:#f3f4f6}.bg-gray-200{background-color:#e5e7eb}.bg-gray-600{background-color:#4b5563}.bg-gray-700{background-color:#374151}.bg-gray-800{background-color:#1f2937}.bg-blue-100{background-color:#dbeafe}.bg-blue-200{background-color:#bfdbfe}.bg-blue-800{background-color:#1e40af}.bg-blue-900{background-color:#1e3a8a}.bg-green-200{background-color:#bbf7d0}.border-b{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:var(--p-surface-300)}.border-l-4{border-left-width:4px;border-left-style:solid}.border-blue-500{border-color:#3b82f6}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.shadow-sm{box-shadow:0 1px 2px #0000000d}.shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.sticky{position:sticky}.top-0{top:0}.bottom-2{bottom:.5rem}.bottom-18{bottom:4.5rem}.z-9{z-index:9}.z-10{z-index:10}.z-30{z-index:30}.hover\\:bg-gray-50:hover{background-color:#f9fafb}.hover\\:bg-gray-100:hover{background-color:#f3f4f6}.hover\\:bg-gray-200:hover{background-color:#e5e7eb}.hover\\:bg-blue-200:hover{background-color:#bfdbfe}.hover\\:bg-blue-800:hover{background-color:#1e40af}:host-context(.my-app-dark) .dark\\:bg-gray-800{background-color:#1f2937}:host-context(.my-app-dark) .dark\\:bg-gray-700{background-color:#374151}:host-context(.my-app-dark) .dark\\:bg-gray-600{background-color:#4b5563}:host-context(.my-app-dark) .dark\\:bg-blue-900{background-color:#1e3a8a}:host-context(.my-app-dark) .dark\\:bg-blue-800{background-color:#1e40af}:host-context(.my-app-dark) .dark\\:hover\\:bg-gray-800:hover{background-color:#1f2937}:host-context(.my-app-dark) .dark\\:hover\\:bg-gray-700:hover{background-color:#374151}:host-context(.my-app-dark) .dark\\:hover\\:bg-gray-600:hover{background-color:#4b5563}:host-context(.my-app-dark) .dark\\:hover\\:bg-blue-800:hover{background-color:#1e40af}.animate__animated{animation-duration:1s;animation-fill-mode:both}.animate__fadeIn{animation-name:fadeIn}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i2$2.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "directive", type: i2$2.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "directive", type: i2$2.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "directive", type: i2$2.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i2$2.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i2$2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$2.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i2$2.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "directive", type: i2$2.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i2$2.InitEditableRow, selector: "[pInitEditableRow]" }, { kind: "directive", type: i2$2.SaveEditableRow, selector: "[pSaveEditableRow]" }, { kind: "directive", type: i2$2.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i2$2.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "component", type: ButtonNgComponent, selector: "lib-button-ng", inputs: ["buttonConfig"], outputs: ["buttonConfigChange", "onClick"] }, { kind: "component", type: ToolbarNgComponent, selector: "lib-toolbar-ng" }, { kind: "component", type: FormComponent, selector: "lib-form", inputs: ["formGroup", "controls", "formConfig", "httpMessage"], outputs: ["formGroupChange", "httpMessageChange", "formSubmit", "formChanges", "formChangesDebounced"] }, { kind: "pipe", type: KeyToDisplayNamePipe, name: "keyToDisplayName" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InlineInputComponent, selector: "lib-inline-input", inputs: ["config", "value"], outputs: ["valueChange", "outputValue", "outputBlur", "outputDebounced"] }, { kind: "component", type: BadgeNgComponent, selector: "lib-badge-ng", inputs: ["config"], outputs: ["configChange"] }, { kind: "component", type: HttpMessageComponent, selector: "lib-http-message", inputs: ["httpMessage"], outputs: ["httpMessageChange"] }, { kind: "component", type: SpeedDialComponent, selector: "lib-speed-dial", inputs: ["speedDialConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3458
+ }
3459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TableNgComponent, decorators: [{
3460
+ type: Component,
3461
+ args: [{ selector: 'lib-table-ng', imports: [
3462
+ CommonModule,
3463
+ TableModule,
3464
+ ButtonNgComponent,
3465
+ ToolbarNgComponent,
3466
+ FormComponent,
3467
+ KeyToDisplayNamePipe,
3468
+ FormsModule,
3469
+ InlineInputComponent,
3470
+ BadgeNgComponent,
3471
+ HttpMessageComponent,
3472
+ SpeedDialComponent
3473
+ ], providers: [TableNgService, TableNgEditService], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let paginationConfig = config()?.paginationConfig;\n@let globalFilterConfig = config()?.globalFilterConfig;\n@let selectionTableConfig = config()?.selectionTableConfig;\n@let filterConfigByKey = config()?.filterConfigByKey;\n@let frozenColumnConfigByKey = config()?.frozenColumnConfigByKey;\n@let scrollConfig = config()?.scrollConfig;\n@let lazyLoadingConfig = config()?.lazyLoadingConfig;\n@let keysNames = config()?.keysNames;\n@let columnConfig = config()?.columnConfig;\n@let editEnabled = editConfig()?.isEnabled ?? false;\n@let editType = editConfig()?.type ?? 'cell';\n@let inlineControls = editConfig()?.inlineControls;\n@let rowErrorConfig = editConfig()?.rowEditConfig?.rowErrorConfig;\n@let footerRows = footerConfig()?.footerRows;\n@let footerEnabled = footerConfig()?.isEnabled ?? false;\n@let titleConfig = config()?.titleConfig;\n@let selectedColumns = config()?.selectedColumns;\n@let rowExpansionConfig = config()?.rowExpansionConfig;\n@let advancedIdentifierFiltersConfig = config()?.globalFilterConfig?.advancedIdentifierFiltersConfig;\n\n<div class=\"p-datatable-wrapper\">\n @if (titleConfig?.isEnabled && titleConfig?.title) {\n <div class=\"table-title-container\">\n <h2 class=\"table-title\">{{ titleConfig!.title }}</h2>\n </div>\n }\n @if (!hideToolbar || (filteredValue || advancedFiltersPerformed.length > 0)) {\n <lib-toolbar-ng class=\"p-toolbar-header sticky top-0 z-30 dark:bg-gray-800\">\n <div class=\"flex gap-2\" toolbarStart>\n @if (globalFilterConfig?.isEnabled && !lazyLoadingConfig?.isEnabled) {\n <lib-form [controls]=\"controlsGlobalFilter\" [(formGroup)]=\"searchFormGroupGlobalFilter\"\n (formSubmit)=\"submitGlobalSearch($event)\"></lib-form>\n }\n @if (advancedIdentifierFiltersConfig?.isEnabled) {\n <lib-button-ng class=\"animate__animated animate__fadeIn\"\n [buttonConfig]=\"advancedIdentifierFiltersButton()\"></lib-button-ng>\n }\n @if (filteredValue || advancedFiltersPerformed.length > 0) {\n <lib-button-ng class=\"animate__animated animate__fadeIn\" [buttonConfig]=\"clearFiltersButton()\"></lib-button-ng>\n }\n </div>\n <div class=\"flex gap-2\" toolbarEnd>\n @if (toolbarSpeedDialButtons().length > 0) {\n @for (speedDial of toolbarSpeedDialButtons(); track $index) {\n <lib-speed-dial [speedDialConfig]=\"speedDial\"></lib-speed-dial>\n }\n }\n @if (toolbarButtons().length > 0) {\n @for (button of toolbarButtons(); track $index) {\n <lib-button-ng [buttonConfig]=\"button\"></lib-button-ng>\n }\n }\n @if ((editType === 'row' || editType === 'cell') && editEnabled) {\n <lib-button-ng [buttonConfig]=\"addRowButton()\"></lib-button-ng>\n }\n @if (enableExcelButton()) {\n <lib-button-ng [buttonConfig]=\"excelButton\" (onClick)=\"exportData(dt,'excel')\"></lib-button-ng>\n }\n @if (enablePdfButton()) {\n <lib-button-ng [buttonConfig]=\"pdfButton\" (onClick)=\"exportData(dt,'pdf')\"></lib-button-ng>\n }\n @if (enableRefreshButton) {\n <lib-button-ng [buttonConfig]=\"refreshButton\"></lib-button-ng>\n }\n </div>\n </lib-toolbar-ng>\n }\n <p-table #dt styleClass=\"p-datatable-sm\" [value]=\"data()\" [lazy]=\"lazyLoadingConfig?.isEnabled ?? false\"\n [editMode]=\"editType\" [totalRecords]=\"\n lazyLoadingConfig?.isEnabled\n ? (lazyLoadingConfig?.totalRecords ?? 0)\n : data().length\n \" [customSort]=\"true\" [paginator]=\"paginationConfig?.paginator ?? true\" [showCurrentPageReport]=\"true\"\n [rows]=\"paginationConfig?.rows ?? 5\" [rowsPerPageOptions]=\"paginationConfig?.rowsPerPageOptions ?? [5, 10, 20]\"\n [paginatorStyleClass]=\"paginatorStyleClass()\" [resizableColumns]=\"true\" [rowTrackBy]=\"trackById\"\n [columns]=\"selectedColumns\" [scrollable]=\"scrollConfig?.isEnabled ?? false\"\n [scrollHeight]=\"scrollConfig?.isEnabled ? scrollHeight() : undefined\" (onLazyLoad)=\"onLazyLoad($event)\"\n (sortFunction)=\"customSort($event)\" (onFilter)=\"onFilter($event)\" [(selection)]=\"selectedItems\"\n [currentPageReportTemplate]=\"getCustomPageReport()\" selectionPageOnly=\"true\" dataKey=\"id\" class=\"w-full\">\n <ng-template #header let-columns>\n <tr>\n @if (rowExpansionConfig?.isEnabled) {\n <th alignFrozen=\"left\" pFrozenColumn style=\"width: 2rem\" class=\"p-datatable-header-cell p-frozen-column\">\n\n </th>\n }\n @if (selectionTableConfig?.isEnabled) {\n <th alignFrozen=\"left\" pFrozenColumn style=\"width: 2rem\" class=\"p-datatable-header-cell p-frozen-column\">\n <p-tableHeaderCheckbox />\n </th>\n }\n\n @if (selectedColumns) {\n @for (column of columns; track $index) {\n <th pResizableColumn [id]=\"column.field\" alignFrozen=\"right\" pFrozenColumn\n [frozen]=\"frozenHandle(frozenColumnConfigByKey?.[column.field])\" [pSortableColumn]=\"column.field\"\n class=\"p-datatable-header-cell\" [style.width.%]=\"columnConfig?.sizeByKey?.[column.field] ?? null\" [ngClass]=\"{\n 'p-frozen-column': frozenHandle(\n frozenColumnConfigByKey?.[column.field]\n ),\n }\">\n <div class=\"flex gap-2 justify-center items-center py-0 px-0\">\n {{ column.field | keyToDisplayName: keysNames }}\n @if(!editEnabled){\n <p-sortIcon [field]=\"column.field\" />\n }\n @if (filterConfigByKey?.[column.field]?.isEnabled) {\n <p-columnFilter type=\"text\" [field]=\"`rowData.${column.field}`\" display=\"menu\" [ngClass]=\"{\n 'bg-green-200 rounded-full p-1 shadow-sm text-green-500 transition-all duration-300 ease-in-out':\n advancedFiltersPerformed.includes(column.field),\n }\" [type]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig?.type ??\n 'text'\n \" [matchMode]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.matchMode\n \" [showMatchModes]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showMatchModes ?? false\n \" [showOperator]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showOperator ?? false\n \" [showAddButton]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showAddButton ?? false\n \" [showApplyButton]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showApplyButton ?? false\n \" [showClearButton]=\"\n filterConfigByKey?.[column.field]?.primeNgColumnFilterConfig\n ?.showClearButton ?? false\n \">\n @if (\n filterConfigByKey?.[column.field]?.customColumnFilterConfig\n ?.isEnabled ?? false\n ) {\n <ng-template #filter let-value let-filter=\"filterCallback\">\n <div style=\"min-width: 20rem\" class=\"\">\n <lib-inline-input\n (outputValue)=\"inlineFormChanges($event, filter, filterConfigByKey?.[column.field]?.customColumnFilterConfig?.inlineControlConfig?.typeInput, column.field)\"\n (outputDebounced)=\"onFilter($event)\" [(ngModel)]=\"advancedFiltersValues()[column.field]\"\n [config]=\"filterConfigByKey?.[column.field]?.customColumnFilterConfig?.inlineControlConfig ?? {typeInput: ETypeInput.TEXT}\"></lib-inline-input>\n </div>\n </ng-template>\n }\n </p-columnFilter>\n }\n </div>\n </th>\n }\n }@else {\n @for (key of keys(); track $index) {\n <th [id]=\"key\" pResizableColumn alignFrozen=\"right\" pFrozenColumn\n [frozen]=\"frozenHandle(frozenColumnConfigByKey?.[key])\" [pSortableColumn]=\"key\"\n class=\"p-datatable-header-cell\" [style.width.%]=\"columnConfig?.sizeByKey?.[key] ?? null\" [ngClass]=\"{\n 'p-frozen-column': frozenHandle(frozenColumnConfigByKey?.[key]),\n }\">\n <div class=\"flex gap-2 justify-center items-center py-0 px-0\">\n {{ key | keyToDisplayName: keysNames }}\n @if(!editEnabled){\n <p-sortIcon [field]=\"key\" />\n }\n @if (filterConfigByKey?.[key]?.isEnabled) {\n <p-columnFilter type=\"text\" [field]=\"`rowData.${key}`\" display=\"menu\" [ngClass]=\"{\n 'bg-green-200 rounded-full p-1 shadow-sm text-green-500 transition-all duration-300 ease-in-out':\n advancedFiltersPerformed.includes(key),\n }\" [type]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.type ?? 'text'\"\n [matchMode]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.matchMode\"\n [showMatchModes]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showMatchModes ?? false\"\n [showOperator]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showOperator ?? false\"\n [showAddButton]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showAddButton ?? false\"\n [showApplyButton]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showApplyButton ?? false\"\n [showClearButton]=\"filterConfigByKey?.[key]?.primeNgColumnFilterConfig?.showClearButton ?? false\">\n @if (\n filterConfigByKey?.[key]?.customColumnFilterConfig\n ?.isEnabled ?? false\n ) {\n <ng-template #filter let-value let-filter=\"filterCallback\">\n <div style=\"min-width: 20rem\" class=\"\">\n <!-- <app-custom-advanced-filter filter\n [customColumnFilterConfig]=\"filterConfigByKey![key]!.customColumnFilterConfig!\"\n (formChanges)=\"formChanges($event, filter, key)\"\n [initialValue]=\"advancedFiltersValues[key]\"></app-custom-advanced-filter> -->\n <lib-inline-input\n (outputValue)=\"inlineFormChanges($event, filter, filterConfigByKey?.[key]?.customColumnFilterConfig?.inlineControlConfig?.typeInput, key)\"\n [(ngModel)]=\"advancedFiltersValues()[key]\"\n [config]=\"filterConfigByKey?.[key]?.customColumnFilterConfig?.inlineControlConfig ?? {typeInput: ETypeInput.TEXT}\"></lib-inline-input>\n </div>\n </ng-template>\n }\n </p-columnFilter>\n }\n </div>\n </th>\n }\n }\n\n @if (editType === 'cell' && editEnabled) {\n <th class=\"p-datatable-header-cell\" style=\"width: 100px\">\n </th>\n }\n @if (editType === 'row' && editEnabled) {\n <th class=\"p-datatable-header-cell\" style=\"width: 100px\">\n </th>\n }\n\n </tr>\n </ng-template>\n\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"totalColumns()\">\n @if (isLoading()) {\n <!-- Loading state -->\n <div class=\"p-8 text-center\">\n <div class=\"flex flex-col items-center justify-center gap-4\">\n <i class=\"pi pi-spin pi-spinner text-4xl text-blue-500\"></i>\n <p class=\"text-gray-600 text-lg\">{{ getLoadingMessage() }}</p>\n </div>\n </div>\n } @else if (timeoutExpired()) {\n <!-- No data available -->\n <div class=\"p-8 text-center text-gray-500\">\n <div class=\"flex flex-col items-center justify-center gap-3\">\n <i class=\"pi pi-info-circle text-4xl text-gray-400\"></i>\n <p class=\"text-lg\">{{ getNoDataMessage() }}</p>\n </div>\n </div>\n }\n </td>\n </tr>\n </ng-template>\n\n @if (hasRecords()) {\n @if (editEnabled) {\n @switch (editType) {\n @case ('cell') {\n <ng-template #body let-item let-editing=\"editing\">\n <tr class=\"p-datatable-row p-selectable-row\">\n @if (selectedColumns) {\n @for (column of selectedColumns; track $index){\n <td [pEditableColumn]=\"column.field\" pEditableColumnField=\"rowData.{{column.field}}\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[column.field]\" (outputDebounced)=\"onEditData()\"\n [config]=\"inlineControls?.[column.field] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n </ng-template>\n <ng-template #output>\n @if (inlineControls?.[column.field]?.typeInput === ETypeInput.NUMBER) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | number: '1.2-2' }}\n\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.CURRENCY) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | currency: item?.currencyTypeCellConfig?.[column.field]?.currency ??\n 'USD' }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATE) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATETIME_LOCAL) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy HH:mm\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[column.field]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n @if (item.rowData[column.field]?.name) {\n {{ item.rowData[column.field]?.name }}\n } @else {\n {{ item.rowData[column.field] }}\n }\n }\n\n </ng-template>\n </p-cellEditor>\n </td>\n }\n } @else {\n @for (key of keys(); track $index){\n <td [pEditableColumn]=\"key\" pEditableColumnField=\"rowData.{{key}}\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[key]\" (outputDebounced)=\"onEditData()\"\n [config]=\"inlineControls?.[key] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n </ng-template>\n <ng-template #output>\n @if (inlineControls?.[key]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[key]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n {{ item.rowData[key] }}\n }\n </ng-template>\n </p-cellEditor>\n </td>\n }\n }\n @if (editType === 'cell' && editEnabled) {\n <td class=\"px-2 py-1 text-center\">\n <div class=\"flex justify-center items-center gap-2\">\n <lib-button-ng [buttonConfig]=\"getDeleteRowButton()\" (onClick)=\"deleteRow(item)\"></lib-button-ng>\n </div>\n </td>\n }\n </tr>\n </ng-template>\n }\n @case ('row') {\n <ng-template #body let-item let-editing=\"editing\" let-ri=\"rowIndex\">\n <tr [pEditableRow]=\"item\" class=\"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 border-b\">\n @if (selectedColumns) {\n @for (column of selectedColumns; track $index){\n <td>\n <div class=\"flex flex-col gap-2\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[column.field]\"\n (outputValue)=\"inlineChange($event, column.field)\" (outputDebounced)=\"onEditData()\"\n [config]=\"inlineControls?.[column.field] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n\n </ng-template>\n <ng-template #output>\n\n @if (inlineControls?.[column.field]?.typeInput === ETypeInput.NUMBER) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | number: '1.2-2' }}\n\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.CURRENCY) {\n <div class=\"text-right\">\n {{ item.rowData[column.field] | currency: item?.currencyTypeCellConfig?.[column.field]?.currency ??\n 'USD' }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATE) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.DATETIME_LOCAL) {\n <div class=\"text-left\">\n {{ item.rowData[column.field] | date: \"dd/MM/yyyy HH:mm\" }}\n </div>\n } @else if(inlineControls?.[column.field]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[column.field]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n @if (item.rowData[column.field]?.name) {\n {{ item.rowData[column.field]?.name }}\n } @else {\n {{ item.rowData[column.field] }}\n }\n }\n\n\n </ng-template>\n </p-cellEditor>\n\n @if (rowErrorConfig?.isEnabled && enableErrors && !rowFieldsHasValue()[column.field]) {\n <span class=\"text-red-500 italic text-xs\">{{\n rowErrorConfig?.fieldErrors?.[item.id]?.[column.field]?.message ??\n '' }}</span>\n }\n </div>\n </td>\n }\n } @else {\n @for (key of keys(); track $index){\n <td>\n <div class=\"flex flex-col gap-2\">\n <p-cellEditor>\n <ng-template #input>\n <lib-inline-input [(ngModel)]=\"item.rowData[key]\" (outputValue)=\"inlineChange($event, key)\"\n (outputDebounced)=\"onEditData()\" [config]=\"inlineControls?.[key] ?? {typeInput: ETypeInput.TEXT}\">\n </lib-inline-input>\n </ng-template>\n <ng-template #output>\n\n @if (inlineControls?.[key]?.typeInput === ETypeInput.NUMBER) {\n <div class=\"text-right\">\n {{ item.rowData[key] | number: '1.2-2' }}\n\n </div>\n }\n @else if(inlineControls?.[key]?.typeInput === ETypeInput.CURRENCY) {\n <div class=\"text-right\">\n {{ item.rowData[key] | currency: item?.currencyTypeCellConfig?.[key]?.currency ?? 'USD' }}\n </div>\n } @else if(inlineControls?.[key]?.typeInput === ETypeInput.SWITCH) {\n <div class=\"text-center\">\n @if (item.rowData[key]) {\n <i class=\"fa-solid fa-check text-green-500\"></i>\n } @else {\n <i class=\"fa-solid fa-times text-red-500\"></i>\n }\n </div>\n } @else {\n @if (item.rowData[key]?.name) {\n {{ item.rowData[key]?.name }}\n } @else {\n {{ item.rowData[key] }}\n }\n }\n\n\n </ng-template>\n </p-cellEditor>\n\n @if (rowErrorConfig?.isEnabled && enableErrors && !rowFieldsHasValue()[key]) {\n <span class=\"text-red-500 italic text-xs\">{{ rowErrorConfig?.fieldErrors?.[item.id]?.[key]?.message ??\n '' }}</span>\n }\n </div>\n </td>\n }\n }\n <td>\n <div class=\"flex justify-center items-center gap-2\">\n @if(!editing){\n <lib-button-ng pButton pRipple pInitEditableRow [buttonConfig]=\"getEditInitButton(item.id)\"\n (onClick)=\"onRowEditInit(item)\"></lib-button-ng>\n @if(!editConfig()?.rowEditConfig?.isDisabledDeleteButton){\n <lib-button-ng [buttonConfig]=\"getDeleteRowButton()\" (onClick)=\"deleteRow(item)\"></lib-button-ng>\n }\n }\n @if(editing){\n @if (hasErrorValues(rowErrorConfig?.fieldErrors?.[item.id] ?? {})) {\n <lib-button-ng [buttonConfig]=\"editSaveButtonWithErrors()\"\n (onClick)=\"onEditSaveWithErrors()\"></lib-button-ng>\n }\n @else {\n <lib-button-ng pButton pRipple pSaveEditableRow [buttonConfig]=\"editSaveButton()\"\n (onClick)=\"onRowEditSave(item)\"></lib-button-ng>\n }\n <lib-button-ng pButton pRipple pCancelEditableRow [buttonConfig]=\"editCancelButton()\"\n (onClick)=\"onRowEditCancel(item, ri)\"></lib-button-ng>\n }\n </div>\n </td>\n </tr>\n </ng-template>\n }\n }\n } @else {\n\n <ng-template #body let-item let-expanded=\"expanded\">\n <tr class=\"p-datatable-row p-selectable-row\" [ngClass]=\"{\n 'bg-gray-50 dark:bg-gray-800 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700': item.onClick && !item.isSelected && !item.isLoading,\n 'bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600': !item.onClick && !item.isSelected && !item.isLoading,\n 'bg-blue-100 dark:bg-blue-900 border-l-4 border-blue-500 hover:bg-blue-200 dark:hover:bg-blue-800': item.isSelected && !item.isLoading,\n 'skeleton-row': item.isLoading\n }\" (click)=\"item?.isLoading ? null : onRowClick(item)\">\n\n @if (rowExpansionConfig?.isEnabled) {\n <td (click)=\"$event.stopPropagation()\" [class.skeleton-cell]=\"item.isLoading\"\n [style.height]=\"item.isLoading ? '3rem' : 'auto'\">\n @if (!item.isLoading) {\n <lib-button-ng [buttonConfig]=\"rowExpansionButton(expanded)()\" type=\"button\" pRipple\n [pRowToggler]=\"item\"></lib-button-ng>\n } @else {\n <div class=\"skeleton-content\"></div>\n }\n </td>\n }\n\n @if (selectionTableConfig?.isEnabled) {\n <td (click)=\"$event.stopPropagation()\" alignFrozen=\"left\" pFrozenColumn class=\"shadow-lg\"\n [class.skeleton-cell]=\"item.isLoading\" [style.height]=\"item.isLoading ? '3rem' : 'auto'\">\n @if (!item.isLoading) {\n <p-tableCheckbox [id]=\"item\" [value]=\"item\" />\n } @else {\n <div class=\"skeleton-content\"></div>\n }\n </td>\n }\n\n @for (key of keys(); track $index) {\n @if (isThatItemInTheProductSelection(key)) {\n <td [id]=\"key\" class=\"p-datatable-cell\" [style.height]=\"item.isLoading ? '3rem' : 'min-content'\"\n alignFrozen=\"right\" pFrozenColumn [ngClass]=\"{\n 'p-frozen-column': frozenHandle(frozenColumnConfigByKey?.[key]),\n 'text-center': item.rowDataButtons?.[key] || item.typeCell?.[key] === ETypeInput.BADGE,\n 'skeleton-cell': item.isLoading\n }\" [frozen]=\"frozenHandle(frozenColumnConfigByKey?.[key])\">\n @if (item.isLoading) {\n <div class=\"skeleton-content\"></div>\n } @else {\n @if (item.rowDataButtons?.[key]) {\n <div class=\"flex gap-4 w-full justify-center items-center\">\n @for (btn of item.rowDataButtons[key]; track $index) {\n @if (btn) {\n <lib-button-ng class=\"w-full\" (click)=\"$event.stopPropagation()\" [buttonConfig]=\"btn\"></lib-button-ng>\n }\n }\n </div>\n } @else {\n @switch (item.typeCell?.[key]) {\n @case (ETypeInput.IMAGE) {\n <img [src]=\"item.rowData[key]\" alt=\"Image\" class=\"w-10 h-10 mx-auto\">\n }\n @case (ETypeInput.DATE) {\n {{ item.rowData[key] | date: \"dd/MM/yyyy\" }}\n }\n @case (ETypeInput.DATETIME_LOCAL) {\n {{ item.rowData[key] | date: \"dd/MM/yyyy HH:mm\" }}\n }\n @case (ETypeInput.CURRENCY) {\n {{item?.currencyTypeCellConfig?.[key]?.currency}} {{ item.rowData[key] | currency:\n item?.currencyTypeCellConfig?.[key]?.currency ?? 'USD' }}\n }\n @case (ETypeInput.BADGE) {\n <lib-badge-ng [config]=\"item.rowData[key]\"></lib-badge-ng>\n }\n @case (ETypeInput.COMPONENT) {\n <ng-container\n *ngTemplateOutlet=\"item.rowDataComponents?.[key]; context: { $implicit: item.raw }\"></ng-container>\n }\n @default {\n @if (isDate(item.rowData[key])) {\n {{ item.rowData[key] | date: \"dd/MM/yyyy\" }}\n } @else if (typeof item.rowData[key] === \"string\") {\n {{ item.rowData[key] }}\n } @else if (isPrimeNgSelection(item.rowData[key])) {\n {{ item.rowData[key].name }}\n } @else if(typeof item.rowData[key] === \"number\") {\n <p class=\"text-right\">\n {{ item.rowData[key] | number: '1.2-2' }}\n </p>\n }\n }\n }\n }\n }\n </td>\n }\n }\n </tr>\n </ng-template>\n }\n }\n\n <ng-template #footer>\n @if (footerEnabled) {\n @for (row of footerRows; track $index) {\n <tr class=\"p-datatable-row p-datatable-footer-row\">\n @for (cell of row; track $index) {\n <td colSpan=\"{{ cell.colSpan }}\" class=\"{{ cell.class }} text-right font-bold p-3 pb-0\">{{\n applyPipe(cell.value,\n cell.pipeConfig) }}</td>\n\n }\n </tr>\n }\n\n }\n </ng-template>\n <ng-template #expandedrow let-item>\n <tr>\n <td colspan=\"100%\">\n <div class=\"p-datatable-row-expansion\">\n <ng-container *ngTemplateOutlet=\"currentItemTemplate; context: { $implicit: item }\"></ng-container>\n\n </div>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (showBottomToolbar()) {\n <div class=\"p-datatable-footer sticky bottom-2 z-9 animate__animated animate__fadeIn\">\n <lib-toolbar-ng>\n @if (showManagementSelectionConfig()) {\n <div toolbarStart\n class=\"p-datatable-footer-content flex items-center gap-3 px-4 rounded-lg animate__animated animate__fadeIn\">\n <span class=\"font-medium text-gray-700 dark:text-gray-300\">{{ getSelectedItemsLabel() }}</span>\n <div class=\"p-datatable-footer-badge flex items-center justify-center min-w-[28px] h-7 px-2 rounded-md\">\n <span class=\"font-semibold text-gray-900 dark:text-gray-100\">{{\n totalItemsSelected().toLocaleString()\n }}</span>\n </div>\n <span class=\"text-sm text-gray-600\">{{ getRecordsLabel() }}</span>\n <lib-button-ng [buttonConfig]=\"showSelectedItemsManagementButton()\"></lib-button-ng>\n </div>\n }\n </lib-toolbar-ng>\n </div>\n }\n</div>\n@if (httpMessage()) {\n<lib-http-message [(httpMessage)]=\"httpMessage\"></lib-http-message>\n}", styles: [".cursor-pointer{cursor:pointer}.empty-data-message{text-align:center;padding:2rem;color:#6c757d;font-style:italic}.table-title-container{background:var(--p-surface-50);border-bottom:1px solid var(--p-surface-200);padding:1.25rem 2rem;position:relative}.table-title{color:var(--p-text-color);font-size:1.5rem;font-weight:600;text-align:center;margin:0;letter-spacing:-.025em;text-shadow:0 1px 2px rgba(0,0,0,.05);background:linear-gradient(135deg,var(--p-text-color) 0%,var(--p-text-muted-color) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;position:relative}.table-title:after{content:\"\";position:absolute;bottom:-.5rem;left:50%;transform:translate(-50%);width:60px;height:2px;background:linear-gradient(90deg,var(--p-primary-color),var(--p-primary-600));border-radius:1px}:host ::ng-deep .p-datatable-paginator{background:var(--p-surface-100);border-top:1px solid var(--p-surface-300);padding:1rem}:host ::ng-deep .p-datatable-paginator .p-paginator{background:transparent;border:none;padding:0}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page{background:var(--p-surface-200);border:1px solid var(--p-surface-300);color:var(--p-text-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page:hover{background:var(--p-surface-300);border-color:var(--p-primary-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--p-primary-color);border-color:var(--p-primary-color);color:var(--p-primary-contrast-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last{background:var(--p-surface-200);border:1px solid var(--p-surface-300);color:var(--p-text-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:hover,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:hover,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:hover,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:hover{background:var(--p-surface-300);border-color:var(--p-primary-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:disabled,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:disabled,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:disabled,:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:disabled{background:var(--p-surface-100);border-color:var(--p-surface-300);color:var(--p-text-muted-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-current{color:var(--p-text-color);font-weight:500}:host ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown{background:var(--p-surface-200);border:1px solid var(--p-surface-300);color:var(--p-text-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:hover{border-color:var(--p-primary-color)}:host ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color-100)}.skeleton-row{pointer-events:none;-webkit-user-select:none;user-select:none;min-height:3rem}.skeleton-cell{position:relative;overflow:hidden;min-height:3rem;padding:.75rem .5rem!important}.skeleton-cell .skeleton-content{position:absolute;inset:.5rem;min-height:1.5rem;background:linear-gradient(90deg,#d1d5db33,#d1d5db66,#d1d5db33);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}@keyframes skeleton-loading{0%{background-position:200% 0}to{background-position:-200% 0}}:host-context(.my-app-dark) .skeleton-cell .skeleton-content{background:linear-gradient(90deg,#4b556333,#4b556366,#4b556333);background-size:200% 100%}:host ::ng-deep .p-datatable .p-datatable-tbody .skeleton-row .skeleton-cell{width:auto;min-width:fit-content}:host-context(.my-app-dark) .table-title-container{background:var(--p-surface-800);border-bottom-color:var(--p-surface-700)}:host-context(.my-app-dark) .table-title{color:var(--p-text-color);background:linear-gradient(135deg,var(--p-text-color) 0%,var(--p-text-muted-color) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator{background:var(--p-surface-900);border-top-color:var(--p-surface-800)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page{background:var(--p-surface-800);border-color:var(--p-surface-700);color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page:hover{background:var(--p-surface-700);border-color:var(--p-primary-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-pages .p-paginator-page.p-highlight{background:var(--p-primary-color);border-color:var(--p-primary-color);color:var(--p-primary-contrast-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last{background:var(--p-surface-800);border-color:var(--p-surface-700);color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:hover,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:hover,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:hover,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:hover{background:var(--p-surface-700);border-color:var(--p-primary-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-first:disabled,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-prev:disabled,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-next:disabled,:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-last:disabled{background:var(--p-surface-900);border-color:var(--p-surface-800);color:var(--p-text-muted-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-paginator-current{color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown{background:var(--p-surface-800);border-color:var(--p-surface-700);color:var(--p-text-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:hover{border-color:var(--p-primary-color)}:host-context(.my-app-dark) ::ng-deep .p-datatable-paginator .p-paginator .p-dropdown:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 2px var(--p-primary-color-100)}.flex{display:flex}.flex-col{flex-direction:column}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.justify-center{justify-content:center}.items-center{align-items:center}.text-center{text-align:center}.text-right{text-align:right}.text-left{text-align:left}.text-gray-400{color:#9ca3af}.text-gray-500{color:#6b7280}.text-gray-600{color:#4b5563}.text-gray-700{color:#374151}.text-gray-900{color:#111827}.text-blue-500{color:#3b82f6}.text-red-500{color:#ef4444}.text-green-500{color:#22c55e}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.italic{font-style:italic}.w-full{width:100%}.w-10{width:2.5rem}.h-10{height:2.5rem}.h-7{height:1.75rem}.min-w-28{min-width:28px}.mx-auto{margin-left:auto;margin-right:auto}.p-1{padding:.25rem}.p-3{padding:.75rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.py-0{padding-top:0;padding-bottom:0}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.pb-0{padding-bottom:0}.bg-gray-50{background-color:#f9fafb}.bg-gray-100{background-color:#f3f4f6}.bg-gray-200{background-color:#e5e7eb}.bg-gray-600{background-color:#4b5563}.bg-gray-700{background-color:#374151}.bg-gray-800{background-color:#1f2937}.bg-blue-100{background-color:#dbeafe}.bg-blue-200{background-color:#bfdbfe}.bg-blue-800{background-color:#1e40af}.bg-blue-900{background-color:#1e3a8a}.bg-green-200{background-color:#bbf7d0}.border-b{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:var(--p-surface-300)}.border-l-4{border-left-width:4px;border-left-style:solid}.border-blue-500{border-color:#3b82f6}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.shadow-sm{box-shadow:0 1px 2px #0000000d}.shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.sticky{position:sticky}.top-0{top:0}.bottom-2{bottom:.5rem}.bottom-18{bottom:4.5rem}.z-9{z-index:9}.z-10{z-index:10}.z-30{z-index:30}.hover\\:bg-gray-50:hover{background-color:#f9fafb}.hover\\:bg-gray-100:hover{background-color:#f3f4f6}.hover\\:bg-gray-200:hover{background-color:#e5e7eb}.hover\\:bg-blue-200:hover{background-color:#bfdbfe}.hover\\:bg-blue-800:hover{background-color:#1e40af}:host-context(.my-app-dark) .dark\\:bg-gray-800{background-color:#1f2937}:host-context(.my-app-dark) .dark\\:bg-gray-700{background-color:#374151}:host-context(.my-app-dark) .dark\\:bg-gray-600{background-color:#4b5563}:host-context(.my-app-dark) .dark\\:bg-blue-900{background-color:#1e3a8a}:host-context(.my-app-dark) .dark\\:bg-blue-800{background-color:#1e40af}:host-context(.my-app-dark) .dark\\:hover\\:bg-gray-800:hover{background-color:#1f2937}:host-context(.my-app-dark) .dark\\:hover\\:bg-gray-700:hover{background-color:#374151}:host-context(.my-app-dark) .dark\\:hover\\:bg-gray-600:hover{background-color:#4b5563}:host-context(.my-app-dark) .dark\\:hover\\:bg-blue-800:hover{background-color:#1e40af}.animate__animated{animation-duration:1s;animation-fill-mode:both}.animate__fadeIn{animation-name:fadeIn}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"] }]
3474
+ }], ctorParameters: () => [], propDecorators: { dt: [{
3475
+ type: ViewChild,
3476
+ args: ['dt']
3477
+ }], itemTemplate: [{
3478
+ type: ContentChild,
3479
+ args: ['item', { static: true }]
3480
+ }] } });
3481
+
3482
+ class SpeedDialNgService {
3483
+ constructor() { }
3484
+ _config = signal({});
3485
+ config = this._config.asReadonly();
3486
+ items = computed(() => this.config().items);
3487
+ buttonProps = computed(() => this.config().buttonProps ?? { severity: 'primary', rounded: true });
3488
+ tooltipOptions = computed(() => this.config().tooltipOptions ?? { tooltipPosition: 'top' });
3489
+ style = computed(() => this.config().style ?? {});
3490
+ direction = computed(() => this.config().direction ?? 'down');
3491
+ setConfig(value) {
3492
+ this._config.set(value);
3493
+ }
3494
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialNgService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3495
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialNgService, providedIn: 'root' });
3496
+ }
3497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialNgService, decorators: [{
3498
+ type: Injectable,
3499
+ args: [{
3500
+ providedIn: 'root'
3501
+ }]
3502
+ }], ctorParameters: () => [] });
3503
+
3504
+ class SpeedDialNgComponent {
3505
+ speedDialNgService = inject(SpeedDialNgService);
3506
+ configInput = input.required();
3507
+ constructor() {
3508
+ }
3509
+ ngOnInit() {
3510
+ this.speedDialNgService.setConfig(this.configInput());
3511
+ }
3512
+ get config() {
3513
+ return this.speedDialNgService.config();
3514
+ }
3515
+ get items() {
3516
+ return this.speedDialNgService.items();
3517
+ }
3518
+ get buttonProps() {
3519
+ return this.speedDialNgService.buttonProps();
3520
+ }
3521
+ get tooltipOptions() {
3522
+ return this.speedDialNgService.tooltipOptions();
3523
+ }
3524
+ get style() {
3525
+ return this.speedDialNgService.style();
3526
+ }
3527
+ get direction() {
3528
+ return this.speedDialNgService.direction();
3529
+ }
3530
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialNgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3531
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: SpeedDialNgComponent, isStandalone: true, selector: "lib-speed-dial-ng", inputs: { configInput: { classPropertyName: "configInput", publicName: "configInput", isSignal: true, isRequired: true, transformFunction: null } }, providers: [SpeedDialNgService], ngImport: i0, template: "\r\n<p-speeddial \r\n[model]=\"items\" \r\ndirection=\"up\" \r\n[style]=\"style\" \r\n[buttonProps]=\"buttonProps\" \r\n[tooltipOptions]=\"tooltipOptions\" \r\n[direction]=\"direction\"\r\n/>", styles: [""], dependencies: [{ kind: "ngmodule", type: SpeedDialModule }, { kind: "component", type: i1$5.SpeedDial, selector: "p-speeddial, p-speedDial, p-speed-dial", inputs: ["id", "model", "visible", "style", "className", "direction", "transitionDelay", "type", "radius", "mask", "disabled", "hideOnClickOutside", "buttonStyle", "buttonClassName", "maskStyle", "maskClassName", "showIcon", "hideIcon", "rotateAnimation", "ariaLabel", "ariaLabelledBy", "tooltipOptions", "buttonProps"], outputs: ["onVisibleChange", "visibleChange", "onClick", "onShow", "onHide"] }] });
3532
+ }
3533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SpeedDialNgComponent, decorators: [{
3534
+ type: Component,
3535
+ args: [{ selector: 'lib-speed-dial-ng', imports: [SpeedDialModule], providers: [SpeedDialNgService], template: "\r\n<p-speeddial \r\n[model]=\"items\" \r\ndirection=\"up\" \r\n[style]=\"style\" \r\n[buttonProps]=\"buttonProps\" \r\n[tooltipOptions]=\"tooltipOptions\" \r\n[direction]=\"direction\"\r\n/>" }]
3536
+ }], ctorParameters: () => [] });
3537
+
3538
+ /*
3539
+ * Public API Surface of lib-components
3540
+
3541
+ NPM TOKEN:
3542
+ 4f5f941cb6703a2bea326507bd5098aa7dd8224ef4d9b434f6209c73855bf7ac
3543
+ 8b61ac2dab0cf90c13878339c755b09f868b34906ad196a1138433f76f41feb4
3544
+ 37b8f0500846352a33a9d1e2a8504e8a4332cd035a3819d9dc4b2dcdf557c3f0
3545
+ 31f1ccdf0a47736bd3851647d485385323328542c49de9d95498d875e3977f5e
3546
+ de13d65e8a0357ce9f2e18c899c8e7f6f728181baa031761ecdd7ef5cb166eb2
3547
+ */
3548
+
3549
+ /**
3550
+ * Generated bundle index. Do not edit.
3551
+ */
3552
+
3553
+ export { AminatedContainerComponent as A, BaseDialogComponent as B, DisabledContainerComponent as D, ETypeInput as E, FormComponent as F, HttpMessageComponent as H, InlineInputComponent as I, LibComponentsService as L, SpeedDialComponent as S, TableNgComponent as T, ButtonNgComponent as a, LibComponentsComponent as b, SpeedDialService as c, SpeedDialNgComponent as d };
3554
+ //# sourceMappingURL=ln-20-lib-components-ln-20-lib-components-DHrxn8ai.mjs.map