ngx-dsxlibrary 2.21.65 → 2.21.66

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.
@@ -32,6 +32,9 @@ import { Button, ButtonModule } from 'primeng/button';
32
32
  import moment from 'moment-timezone';
33
33
  import { ToastrService } from 'ngx-toastr';
34
34
  import Swal from 'sweetalert2';
35
+ import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
36
+ import * as i6 from 'primeng/floatlabel';
37
+ import { FloatLabel, FloatLabelModule } from 'primeng/floatlabel';
35
38
  import { FileUpload, FileUploadModule } from 'primeng/fileupload';
36
39
  import { LottieComponent } from 'ngx-lottie';
37
40
  import { createTimeline } from 'animejs';
@@ -41,12 +44,9 @@ import * as i4 from 'primeng/menubar';
41
44
  import { MenubarModule } from 'primeng/menubar';
42
45
  import { JwtHelperService } from '@auth0/angular-jwt';
43
46
  import { CookieService } from 'ngx-cookie-service';
44
- import * as i6 from 'primeng/floatlabel';
45
- import { FloatLabelModule } from 'primeng/floatlabel';
46
47
  import * as i7 from 'primeng/password';
47
48
  import { PasswordModule } from 'primeng/password';
48
49
  import { AccordionModule } from 'primeng/accordion';
49
- import { AutoCompleteModule } from 'primeng/autocomplete';
50
50
  import { AutoFocusModule } from 'primeng/autofocus';
51
51
  import { AvatarGroupModule } from 'primeng/avatargroup';
52
52
  import { BadgeModule } from 'primeng/badge';
@@ -4059,11 +4059,11 @@ function getActionMessageConfig(action, secondArg, thirdArg) {
4059
4059
  if (isActive) {
4060
4060
  return {
4061
4061
  ...defaults,
4062
- title: '¿Archivar registro?',
4063
- message: 'El registro dejará de estar visible en las listas principales, pero podrás recuperarlo más tarde.' +
4062
+ title: '¿Borrar registro?',
4063
+ message: 'El registro dejará de estar disponible en las listas principales.' +
4064
4064
  (dataPreview ? `<br>${dataPreview}` : ''),
4065
- icono: 'icon/folder01.png',
4066
- confirmButtonText: 'Archivar',
4065
+ icono: 'icon/trash-bin.png',
4066
+ confirmButtonText: 'Eliminar',
4067
4067
  cancelButtonText: 'Cancelar',
4068
4068
  showConfirmButton: true,
4069
4069
  showCancelButton: true,
@@ -4637,16 +4637,16 @@ const ACTION_CONFIG = {
4637
4637
  hardDelete: {
4638
4638
  label: 'Eliminar',
4639
4639
  icon: 'delete_forever',
4640
- primeIcon: 'pi pi-trash',
4640
+ primeIcon: 'fa-regular fa-trash-can',
4641
4641
  colorToken: 'danger',
4642
4642
  tooltip: 'Eliminar registro',
4643
4643
  },
4644
4644
  softDelete: {
4645
4645
  label: 'Archivar',
4646
- icon: 'archive',
4647
- primeIcon: 'pi pi-thumbs-down',
4646
+ icon: 'delete',
4647
+ primeIcon: 'fa-regular fa-trash-can',
4648
4648
  colorToken: 'warning',
4649
- tooltip: 'Archivar registro',
4649
+ tooltip: 'Borrar registro',
4650
4650
  },
4651
4651
  return: {
4652
4652
  label: 'Restaurar',
@@ -4683,7 +4683,7 @@ const ACTION_CONFIG = {
4683
4683
  edit: {
4684
4684
  label: 'Editar',
4685
4685
  icon: 'edit',
4686
- primeIcon: 'pi pi-file-edit',
4686
+ primeIcon: 'fa-regular fa-pen-to-square',
4687
4687
  colorToken: 'primary',
4688
4688
  tooltip: 'Editar registro',
4689
4689
  },
@@ -4753,8 +4753,131 @@ const ACTION_CONFIG = {
4753
4753
  },
4754
4754
  };
4755
4755
 
4756
+ class DsxAutocomplete {
4757
+ // Inputs usando Señales
4758
+ datasource = input.required(...(ngDevMode ? [{ debugName: "datasource" }] : /* istanbul ignore next */ []));
4759
+ optionLabel = input.required(...(ngDevMode ? [{ debugName: "optionLabel" }] : /* istanbul ignore next */ []));
4760
+ // Label del input (ej: 'Requisitos')
4761
+ label = input('Seleccionar', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
4762
+ //Delay por defecto
4763
+ delay = input(100, ...(ngDevMode ? [{ debugName: "delay" }] : /* istanbul ignore next */ []));
4764
+ // OBLIGATORIO para la creación automática: nombre de la propiedad ID (ej: 'requisitoId')
4765
+ idKey = input.required(...(ngDevMode ? [{ debugName: "idKey" }] : /* istanbul ignore next */ []));
4766
+ // Opcional para PrimeNG (por defecto toma el valor de idKey para identificar duplicados)
4767
+ dataKey = input('', ...(ngDevMode ? [{ debugName: "dataKey" }] : /* istanbul ignore next */ []));
4768
+ permitirCrear = input(false, ...(ngDevMode ? [{ debugName: "permitirCrear" }] : /* istanbul ignore next */ []));
4769
+ debug = input(false, ...(ngDevMode ? [{ debugName: "debug" }] : /* istanbul ignore next */ []));
4770
+ factoryNuevoRegistro = input(...(ngDevMode ? [undefined, { debugName: "factoryNuevoRegistro" }] : /* istanbul ignore next */ []));
4771
+ // Estado Interno
4772
+ dataFiltrada = signal([], ...(ngDevMode ? [{ debugName: "dataFiltrada" }] : /* istanbul ignore next */ []));
4773
+ value = [];
4774
+ onChange = () => { };
4775
+ onTouched = () => { };
4776
+ disabled = false;
4777
+ searchRequisitos(event) {
4778
+ const inicio = performance.now();
4779
+ const label = this.optionLabel();
4780
+ // FLUJO A: El usuario hizo clic en el botón dropdown (Texto vacío)
4781
+ if (!event.query || event.query.trim() === '') {
4782
+ // Cargamos TODO el universo de datos para que el usuario pueda navegar libremente
4783
+ const todoElUniverso = this.datasource();
4784
+ this.dataFiltrada.set(todoElUniverso);
4785
+ if (this.debug()) {
4786
+ console.log('[DsxAutocomplete] Modo dropdown activo: Mostrando lista completa de registros:', todoElUniverso.length);
4787
+ }
4788
+ return;
4789
+ }
4790
+ // FLUJO B: El usuario está escribiendo (Búsqueda inteligente con límite de 10)
4791
+ const palabrasBuscadas = event.query
4792
+ .toLowerCase()
4793
+ .trim()
4794
+ .split(/\s+/)
4795
+ .filter((palabra) => palabra.length > 0);
4796
+ const filtrados = this.datasource()
4797
+ .filter((item) => {
4798
+ const textoRegistro = String(item[label] || '').toLowerCase();
4799
+ return palabrasBuscadas.every((palabra) => textoRegistro.includes(palabra));
4800
+ })
4801
+ .slice(0, 10); // <-- El límite se aplica estrictamente al escribir
4802
+ this.dataFiltrada.set(filtrados);
4803
+ if (this.debug()) {
4804
+ console.log(`[DsxAutocomplete] Búsqueda inteligente para "${event.query}" tardó ${(performance.now() - inicio).toFixed(2)}ms. Encontrados:`, filtrados.length);
4805
+ }
4806
+ }
4807
+ evaluarYAgregar(event) {
4808
+ const valorInput = event.target.value?.trim();
4809
+ if (!valorInput)
4810
+ return;
4811
+ const sugerencias = this.dataFiltrada();
4812
+ const actuales = this.value || [];
4813
+ const campoId = this.idKey(); // Obtenemos de forma segura el nombre del ID stringificado
4814
+ if (sugerencias.length > 0) {
4815
+ const primeraMatch = sugerencias[0];
4816
+ // Comparamos identidades usando el campoId dinámico
4817
+ const yaExiste = actuales.some((item) => item[campoId] === primeraMatch[campoId]);
4818
+ if (!yaExiste)
4819
+ this.actualizarFormulario([...actuales, primeraMatch]);
4820
+ }
4821
+ else if (this.permitirCrear()) {
4822
+ let nuevo;
4823
+ if (this.factoryNuevoRegistro()) {
4824
+ nuevo = this.factoryNuevoRegistro()(valorInput);
4825
+ }
4826
+ else {
4827
+ // Al estructurar el objeto usando [campoId], garantizamos que viaje con el nombre correcto de tu entidad
4828
+ nuevo = {
4829
+ [campoId]: 0,
4830
+ [this.optionLabel()]: valorInput.toUpperCase(),
4831
+ activo: true,
4832
+ };
4833
+ }
4834
+ this.actualizarFormulario([...actuales, nuevo]);
4835
+ }
4836
+ event.target.value = '';
4837
+ this.dataFiltrada.set([]);
4838
+ }
4839
+ actualizarFormulario(nuevaLista) {
4840
+ this.value = nuevaLista;
4841
+ this.onChange(this.value);
4842
+ if (this.debug())
4843
+ console.log('[DsxAutocomplete] Estado del Formulario Actualizado con Objetos:', this.value);
4844
+ }
4845
+ // --- ControlValueAccessor ---
4846
+ writeValue(value) {
4847
+ this.value = value || [];
4848
+ }
4849
+ registerOnChange(fn) {
4850
+ this.onChange = fn;
4851
+ }
4852
+ registerOnTouched(fn) {
4853
+ this.onTouched = fn;
4854
+ }
4855
+ setDisabledState(isDisabled) {
4856
+ this.disabled = isDisabled;
4857
+ }
4858
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: DsxAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
4859
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.16", type: DsxAutocomplete, isStandalone: true, selector: "dsx-autocomplete", inputs: { datasource: { classPropertyName: "datasource", publicName: "datasource", isSignal: true, isRequired: true, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, idKey: { classPropertyName: "idKey", publicName: "idKey", isSignal: true, isRequired: true, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, permitirCrear: { classPropertyName: "permitirCrear", publicName: "permitirCrear", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null }, factoryNuevoRegistro: { classPropertyName: "factoryNuevoRegistro", publicName: "factoryNuevoRegistro", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
4860
+ {
4861
+ provide: NG_VALUE_ACCESSOR,
4862
+ useExisting: forwardRef(() => DsxAutocomplete),
4863
+ multi: true,
4864
+ },
4865
+ ], ngImport: i0, template: "<p-floatlabel variant=\"on\">\r\n <p-autoComplete\r\n fluid\r\n multiple\r\n [dropdown]=\"true\"\r\n [suggestions]=\"dataFiltrada()\"\r\n (completeMethod)=\"searchRequisitos($event)\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onChange(value)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled\"\r\n [optionLabel]=\"optionLabel()\"\r\n [dataKey]=\"dataKey() || idKey()\"\r\n (keyup.enter)=\"evaluarYAgregar($event)\"\r\n [delay]=\"delay()\"\r\n >\r\n </p-autoComplete>\r\n <label>{{ label() }}</label>\r\n</p-floatlabel>\r\n", styles: [""], dependencies: [{ kind: "component", type: AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { 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: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] });
4866
+ }
4867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: DsxAutocomplete, decorators: [{
4868
+ type: Component,
4869
+ args: [{ selector: 'dsx-autocomplete', imports: [AutoComplete, FormsModule, FloatLabel], providers: [
4870
+ {
4871
+ provide: NG_VALUE_ACCESSOR,
4872
+ useExisting: forwardRef(() => DsxAutocomplete),
4873
+ multi: true,
4874
+ },
4875
+ ], template: "<p-floatlabel variant=\"on\">\r\n <p-autoComplete\r\n fluid\r\n multiple\r\n [dropdown]=\"true\"\r\n [suggestions]=\"dataFiltrada()\"\r\n (completeMethod)=\"searchRequisitos($event)\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onChange(value)\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled\"\r\n [optionLabel]=\"optionLabel()\"\r\n [dataKey]=\"dataKey() || idKey()\"\r\n (keyup.enter)=\"evaluarYAgregar($event)\"\r\n [delay]=\"delay()\"\r\n >\r\n </p-autoComplete>\r\n <label>{{ label() }}</label>\r\n</p-floatlabel>\r\n" }]
4876
+ }], propDecorators: { datasource: [{ type: i0.Input, args: [{ isSignal: true, alias: "datasource", required: true }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], idKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "idKey", required: true }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], permitirCrear: [{ type: i0.Input, args: [{ isSignal: true, alias: "permitirCrear", required: false }] }], debug: [{ type: i0.Input, args: [{ isSignal: true, alias: "debug", required: false }] }], factoryNuevoRegistro: [{ type: i0.Input, args: [{ isSignal: true, alias: "factoryNuevoRegistro", required: false }] }] } });
4877
+
4756
4878
  class FileComponent {
4757
4879
  // Inputs
4880
+ existingFile = input(null, ...(ngDevMode ? [{ debugName: "existingFile" }] : /* istanbul ignore next */ []));
4758
4881
  existingFileName = input(null, ...(ngDevMode ? [{ debugName: "existingFileName" }] : /* istanbul ignore next */ []));
4759
4882
  debug = input(false, ...(ngDevMode ? [{ debugName: "debug" }] : /* istanbul ignore next */ []));
4760
4883
  required = input(true, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
@@ -4780,7 +4903,7 @@ class FileComponent {
4780
4903
  hasExistingFile = computed(() => {
4781
4904
  if (!this.isViewActive())
4782
4905
  return false;
4783
- const hasFile = !!this.existingFileName() && !this.isReplacing();
4906
+ const hasFile = !!this.existingFileName() && !this.isReplacing() && !this.existingFile();
4784
4907
  if (this.debug() && this.isViewActive())
4785
4908
  this.log('hasExistingFile', { hasFile });
4786
4909
  return hasFile;
@@ -4964,7 +5087,7 @@ class FileComponent {
4964
5087
  console.log(`[FileComponent] ${method}`, data || '');
4965
5088
  }
4966
5089
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4967
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FileComponent, isStandalone: true, selector: "dsx-file-upload", inputs: { existingFileName: { classPropertyName: "existingFileName", publicName: "existingFileName", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, pTooltipOverride: { classPropertyName: "pTooltipOverride", publicName: "pTooltipOverride", isSignal: true, isRequired: false, transformFunction: null }, tooltipPositionOverride: { classPropertyName: "tooltipPositionOverride", publicName: "tooltipPositionOverride", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, invalidSummary: { classPropertyName: "invalidSummary", publicName: "invalidSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidDetail: { classPropertyName: "invalidDetail", publicName: "invalidDetail", isSignal: true, isRequired: false, transformFunction: null }, invalidSizeSummary: { classPropertyName: "invalidSizeSummary", publicName: "invalidSizeSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidSizeDetail: { classPropertyName: "invalidSizeDetail", publicName: "invalidSizeDetail", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
5090
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FileComponent, isStandalone: true, selector: "dsx-file-upload", inputs: { existingFile: { classPropertyName: "existingFile", publicName: "existingFile", isSignal: true, isRequired: false, transformFunction: null }, existingFileName: { classPropertyName: "existingFileName", publicName: "existingFileName", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, pTooltipOverride: { classPropertyName: "pTooltipOverride", publicName: "pTooltipOverride", isSignal: true, isRequired: false, transformFunction: null }, tooltipPositionOverride: { classPropertyName: "tooltipPositionOverride", publicName: "tooltipPositionOverride", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, invalidSummary: { classPropertyName: "invalidSummary", publicName: "invalidSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidDetail: { classPropertyName: "invalidDetail", publicName: "invalidDetail", isSignal: true, isRequired: false, transformFunction: null }, invalidSizeSummary: { classPropertyName: "invalidSizeSummary", publicName: "invalidSizeSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidSizeDetail: { classPropertyName: "invalidSizeDetail", publicName: "invalidSizeDetail", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
4968
5091
  {
4969
5092
  provide: NG_VALUE_ACCESSOR,
4970
5093
  useExisting: forwardRef(() => FileComponent),
@@ -4975,7 +5098,7 @@ class FileComponent {
4975
5098
  useExisting: forwardRef(() => FileComponent),
4976
5099
  multi: true,
4977
5100
  },
4978
- ], viewQueries: [{ propertyName: "fileUpload", first: true, predicate: ["fileUpload"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (showExistingFile()) {\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"file-name\"> \uD83D\uDCC4 {{ existingFileName() }} </span>\r\n\r\n <p-button\r\n icon=\"pi pi-cloud-upload\"\r\n [rounded]=\"true\"\r\n severity=\"info\"\r\n (click)=\"startReplace()\"\r\n [disabled]=\"isReplaceButtonDisabled()\"\r\n pTooltip=\"Reemplazar archivo\"\r\n tooltipPosition=\"top\"\r\n />\r\n </div>\r\n} @else {\r\n <div class=\"flex items-center gap-2\">\r\n <p-fileUpload\r\n #fileUpload\r\n mode=\"basic\"\r\n [accept]=\"accept()\"\r\n [maxFileSize]=\"maxFileSize() * 1024 * 1024\"\r\n [invalidFileTypeMessageSummary]=\"invalidSummary()\"\r\n [invalidFileTypeMessageDetail]=\"invalidDetail()\"\r\n [invalidFileSizeMessageSummary]=\"invalidSizeSummary()\"\r\n [invalidFileSizeMessageDetail]=\"invalidSizeDetail()\"\r\n (onSelect)=\"onSelect($event)\"\r\n [disabled]=\"!isFileUploadEnabled()\"\r\n [pTooltip]=\"pTooltipOverride()\"\r\n [tooltipPosition]=\"tooltipPositionOverride()\"\r\n />\r\n\r\n @if (isReplacing()) {\r\n <p-button\r\n icon=\"pi pi-times\"\r\n [rounded]=\"true\"\r\n severity=\"secondary\"\r\n (click)=\"cancelReplace()\"\r\n [disabled]=\"disabled()\"\r\n pTooltip=\"Cancelar reemplazo\"\r\n tooltipPosition=\"top\"\r\n />\r\n }\r\n </div>\r\n}\r\n", styles: [".file-name{display:inline-block;font-size:clamp(.85rem,1vw + .5rem,1.4rem);font-weight:500;color:#2c3e50;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}\n"], dependencies: [{ kind: "component", type: FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }] });
5101
+ ], viewQueries: [{ propertyName: "fileUpload", first: true, predicate: ["fileUpload"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (showExistingFile() && !existingFile()) {\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"file-name\"> \uD83D\uDCC4 {{ existingFileName() }} </span>\r\n\r\n <p-button\r\n icon=\"pi pi-cloud-upload\"\r\n [rounded]=\"true\"\r\n severity=\"info\"\r\n (click)=\"startReplace()\"\r\n [disabled]=\"isReplaceButtonDisabled()\"\r\n pTooltip=\"Reemplazar archivo\"\r\n tooltipPosition=\"top\"\r\n />\r\n </div>\r\n} @else {\r\n <div class=\"flex items-center gap-2\">\r\n <p-fileUpload\r\n #fileUpload\r\n mode=\"basic\"\r\n [accept]=\"accept()\"\r\n [maxFileSize]=\"maxFileSize() * 1024 * 1024\"\r\n [invalidFileTypeMessageSummary]=\"invalidSummary()\"\r\n [invalidFileTypeMessageDetail]=\"invalidDetail()\"\r\n [invalidFileSizeMessageSummary]=\"invalidSizeSummary()\"\r\n [invalidFileSizeMessageDetail]=\"invalidSizeDetail()\"\r\n (onSelect)=\"onSelect($event)\"\r\n [disabled]=\"!isFileUploadEnabled()\"\r\n [pTooltip]=\"pTooltipOverride()\"\r\n [tooltipPosition]=\"tooltipPositionOverride()\"\r\n />\r\n\r\n @if (isReplacing() || existingFile()) {\r\n <p-button\r\n icon=\"pi pi-times\"\r\n [rounded]=\"true\"\r\n severity=\"secondary\"\r\n (click)=\"cancelReplace()\"\r\n [disabled]=\"disabled()\"\r\n pTooltip=\"Cancelar reemplazo\"\r\n tooltipPosition=\"top\"\r\n />\r\n }\r\n </div>\r\n}\r\n", styles: [".file-name{display:inline-block;font-size:clamp(.85rem,1vw + .5rem,1.4rem);font-weight:500;color:#2c3e50;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}\n"], dependencies: [{ kind: "component", type: FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }] });
4979
5102
  }
4980
5103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FileComponent, decorators: [{
4981
5104
  type: Component,
@@ -4990,8 +5113,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
4990
5113
  useExisting: forwardRef(() => FileComponent),
4991
5114
  multi: true,
4992
5115
  },
4993
- ], template: "@if (showExistingFile()) {\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"file-name\"> \uD83D\uDCC4 {{ existingFileName() }} </span>\r\n\r\n <p-button\r\n icon=\"pi pi-cloud-upload\"\r\n [rounded]=\"true\"\r\n severity=\"info\"\r\n (click)=\"startReplace()\"\r\n [disabled]=\"isReplaceButtonDisabled()\"\r\n pTooltip=\"Reemplazar archivo\"\r\n tooltipPosition=\"top\"\r\n />\r\n </div>\r\n} @else {\r\n <div class=\"flex items-center gap-2\">\r\n <p-fileUpload\r\n #fileUpload\r\n mode=\"basic\"\r\n [accept]=\"accept()\"\r\n [maxFileSize]=\"maxFileSize() * 1024 * 1024\"\r\n [invalidFileTypeMessageSummary]=\"invalidSummary()\"\r\n [invalidFileTypeMessageDetail]=\"invalidDetail()\"\r\n [invalidFileSizeMessageSummary]=\"invalidSizeSummary()\"\r\n [invalidFileSizeMessageDetail]=\"invalidSizeDetail()\"\r\n (onSelect)=\"onSelect($event)\"\r\n [disabled]=\"!isFileUploadEnabled()\"\r\n [pTooltip]=\"pTooltipOverride()\"\r\n [tooltipPosition]=\"tooltipPositionOverride()\"\r\n />\r\n\r\n @if (isReplacing()) {\r\n <p-button\r\n icon=\"pi pi-times\"\r\n [rounded]=\"true\"\r\n severity=\"secondary\"\r\n (click)=\"cancelReplace()\"\r\n [disabled]=\"disabled()\"\r\n pTooltip=\"Cancelar reemplazo\"\r\n tooltipPosition=\"top\"\r\n />\r\n }\r\n </div>\r\n}\r\n", styles: [".file-name{display:inline-block;font-size:clamp(.85rem,1vw + .5rem,1.4rem);font-weight:500;color:#2c3e50;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}\n"] }]
4994
- }], ctorParameters: () => [], propDecorators: { existingFileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "existingFileName", required: false }] }], debug: [{ type: i0.Input, args: [{ isSignal: true, alias: "debug", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], pTooltipOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "pTooltipOverride", required: false }] }], tooltipPositionOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPositionOverride", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], invalidSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidSummary", required: false }] }], invalidDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidDetail", required: false }] }], invalidSizeSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidSizeSummary", required: false }] }], invalidSizeDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidSizeDetail", required: false }] }], fileUpload: [{ type: i0.ViewChild, args: ['fileUpload', { isSignal: true }] }] } });
5116
+ ], template: "@if (showExistingFile() && !existingFile()) {\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"file-name\"> \uD83D\uDCC4 {{ existingFileName() }} </span>\r\n\r\n <p-button\r\n icon=\"pi pi-cloud-upload\"\r\n [rounded]=\"true\"\r\n severity=\"info\"\r\n (click)=\"startReplace()\"\r\n [disabled]=\"isReplaceButtonDisabled()\"\r\n pTooltip=\"Reemplazar archivo\"\r\n tooltipPosition=\"top\"\r\n />\r\n </div>\r\n} @else {\r\n <div class=\"flex items-center gap-2\">\r\n <p-fileUpload\r\n #fileUpload\r\n mode=\"basic\"\r\n [accept]=\"accept()\"\r\n [maxFileSize]=\"maxFileSize() * 1024 * 1024\"\r\n [invalidFileTypeMessageSummary]=\"invalidSummary()\"\r\n [invalidFileTypeMessageDetail]=\"invalidDetail()\"\r\n [invalidFileSizeMessageSummary]=\"invalidSizeSummary()\"\r\n [invalidFileSizeMessageDetail]=\"invalidSizeDetail()\"\r\n (onSelect)=\"onSelect($event)\"\r\n [disabled]=\"!isFileUploadEnabled()\"\r\n [pTooltip]=\"pTooltipOverride()\"\r\n [tooltipPosition]=\"tooltipPositionOverride()\"\r\n />\r\n\r\n @if (isReplacing() || existingFile()) {\r\n <p-button\r\n icon=\"pi pi-times\"\r\n [rounded]=\"true\"\r\n severity=\"secondary\"\r\n (click)=\"cancelReplace()\"\r\n [disabled]=\"disabled()\"\r\n pTooltip=\"Cancelar reemplazo\"\r\n tooltipPosition=\"top\"\r\n />\r\n }\r\n </div>\r\n}\r\n", styles: [".file-name{display:inline-block;font-size:clamp(.85rem,1vw + .5rem,1.4rem);font-weight:500;color:#2c3e50;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}\n"] }]
5117
+ }], ctorParameters: () => [], propDecorators: { existingFile: [{ type: i0.Input, args: [{ isSignal: true, alias: "existingFile", required: false }] }], existingFileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "existingFileName", required: false }] }], debug: [{ type: i0.Input, args: [{ isSignal: true, alias: "debug", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], pTooltipOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "pTooltipOverride", required: false }] }], tooltipPositionOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPositionOverride", required: false }] }], maxFileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxFileSize", required: false }] }], invalidSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidSummary", required: false }] }], invalidDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidDetail", required: false }] }], invalidSizeSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidSizeSummary", required: false }] }], invalidSizeDetail: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidSizeDetail", required: false }] }], fileUpload: [{ type: i0.ViewChild, args: ['fileUpload', { isSignal: true }] }] } });
4995
5118
 
4996
5119
  class JsonHighlightPipe {
4997
5120
  /**
@@ -5114,26 +5237,25 @@ class JsonValuesDebujComponent {
5114
5237
  id = uid();
5115
5238
  subscription;
5116
5239
  changesCount = 0;
5117
- // Computed que indica si debemos mostrar debug
5118
- get shouldDebug() {
5119
- // Si debug está explícitamente true, mostrar
5120
- if (this.debug())
5121
- return true;
5122
- // Si está en modo desarrollo y debug no es false, mostrar
5123
- if (isDevMode() && this.debug() !== false)
5124
- return true;
5125
- // En cualquier otro caso, no mostrar
5126
- return false;
5240
+ // Indica si debemos mostrar el componente visualmente
5241
+ get shouldShowVisual() {
5242
+ // Solo mostrar visualmente en modo desarrollo
5243
+ return isDevMode();
5244
+ }
5245
+ // Indica si debemos mostrar logs en consola
5246
+ get shouldShowLogs() {
5247
+ // Solo logs en desarrollo Y cuando debug está explícitamente true
5248
+ return isDevMode() && this.debug() === true;
5127
5249
  }
5128
5250
  constructor() {
5129
- if (this.shouldDebug) {
5130
- console.log('CONSTRUCTOR', this.id);
5251
+ if (this.shouldShowLogs) {
5252
+ console.log('[JsonDebug] CONSTRUCTOR', this.id);
5131
5253
  }
5132
5254
  effect((onCleanup) => {
5133
5255
  const form = this.form();
5134
5256
  if (!form)
5135
- return; // 👈 CLAVE
5136
- if (this.shouldDebug) {
5257
+ return;
5258
+ if (this.shouldShowLogs) {
5137
5259
  console.log(`[json-debug:${this.id}] EFFECT INIT`, {
5138
5260
  controls: Object.keys(form.controls).length,
5139
5261
  });
@@ -5142,8 +5264,11 @@ class JsonValuesDebujComponent {
5142
5264
  this.debugValue.set(form.getRawValue());
5143
5265
  this.subscription = form.valueChanges.subscribe(() => {
5144
5266
  this.debugValue.set(form.getRawValue());
5145
- if (this.shouldDebug) {
5267
+ if (this.shouldShowLogs) {
5146
5268
  this.changesCount++;
5269
+ console.log(`[json-debug:${this.id}] CHANGE #${this.changesCount}`, {
5270
+ formValue: form.getRawValue(),
5271
+ });
5147
5272
  }
5148
5273
  });
5149
5274
  onCleanup(() => {
@@ -5152,22 +5277,22 @@ class JsonValuesDebujComponent {
5152
5277
  });
5153
5278
  }
5154
5279
  ngOnDestroy() {
5155
- if (this.shouldDebug) {
5156
- console.log('DESTROY', this.id);
5280
+ if (this.shouldShowLogs) {
5281
+ console.log('[JsonDebug] DESTROY', this.id);
5157
5282
  }
5158
5283
  this.subscription?.unsubscribe();
5159
- if (this.shouldDebug) {
5160
- console.log(`[json-debug:${this.id}] DESTROY`, {
5284
+ if (this.shouldShowLogs) {
5285
+ console.log(`[json-debug:${this.id}] DESTROY SUMMARY`, {
5161
5286
  totalChanges: this.changesCount,
5162
5287
  });
5163
5288
  }
5164
5289
  }
5165
5290
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: JsonValuesDebujComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5166
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: JsonValuesDebujComponent, isStandalone: true, selector: "app-json-values-debuj", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (form() && shouldDebug) {\r\n <div class=\"custom-container\">\r\n <pre class=\"custom-pre\" [innerHTML]=\"debugValue() | jsonHighlight\"></pre>\r\n </div>\r\n}\r\n", styles: [".custom-container{width:100%;overflow:auto;max-height:700px;background:#1e1e1e;border:1px solid #333;border-radius:8px;padding:1rem;margin-bottom:1rem}.custom-pre{margin:0;white-space:pre-wrap;word-break:break-word;font-family:Consolas,Monaco,Courier New,monospace;font-size:13px;line-height:1.55;color:#d4d4d4}.json-key{color:#9cdcfe;font-weight:600}.json-string{color:#ce9178}.json-number{color:#b5cea8;font-weight:600}.json-boolean{color:#569cd6;font-weight:700}.json-null{color:gray;font-style:italic}.json-bracket{color:gold;font-weight:700}.json-colon{color:#d4d4d4}.json-comma{color:gray}.json-date-part{color:#4fc1ff;font-weight:600}.json-date-sep{color:gray}.json-date-time{color:#c586c0}.custom-container::-webkit-scrollbar{width:10px;height:10px}.custom-container::-webkit-scrollbar-track{background:#252526}.custom-container::-webkit-scrollbar-thumb{background:#555;border-radius:6px}.custom-container::-webkit-scrollbar-thumb:hover{background:#777}\n"], dependencies: [{ kind: "pipe", type: JsonHighlightPipe, name: "jsonHighlight" }], encapsulation: i0.ViewEncapsulation.None });
5291
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: JsonValuesDebujComponent, isStandalone: true, selector: "app-json-values-debuj", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, debug: { classPropertyName: "debug", publicName: "debug", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (form() && shouldShowVisual) {\r\n <div class=\"custom-container\">\r\n <pre class=\"custom-pre\" [innerHTML]=\"debugValue() | jsonHighlight\"></pre>\r\n </div>\r\n}\r\n", styles: [".custom-container{width:100%;overflow:auto;max-height:700px;background:#1e1e1e;border:1px solid #333;border-radius:8px;box-shadow:0 4px 12px #0000004d;padding:1.25rem;margin-bottom:1.25rem}.custom-pre{margin:0;white-space:pre-wrap;word-break:break-word;word-wrap:break-word;font-family:Segoe UI,Fira Code,JetBrains Mono,Consolas,Monaco,Courier New,monospace;font-size:15px;line-height:1.65;color:#d4d4d4;font-weight:400}.json-key{color:#9cdcfe;font-weight:600;font-size:15px}.json-string{color:#ce9178;font-size:15px}.json-number{color:#b5cea8;font-weight:600;font-size:15px}.json-boolean{color:#569cd6;font-weight:700;font-size:15px}.json-null{color:gray;font-style:italic;font-size:15px}.json-bracket{color:gold;font-weight:700;font-size:16px}.json-colon{color:#d4d4d4;font-weight:500}.json-comma{color:gray;font-size:14px}.json-date-part{color:#4fc1ff;font-weight:600;font-size:15px}.json-date-sep{color:gray}.json-date-time{color:#c586c0;font-size:15px}.custom-container::-webkit-scrollbar{width:12px;height:12px}.custom-container::-webkit-scrollbar-track{background:#252526;border-radius:6px}.custom-container::-webkit-scrollbar-thumb{background:#555;border-radius:6px;transition:background .2s ease}.custom-container::-webkit-scrollbar-thumb:hover{background:#777}.custom-container::-webkit-scrollbar-corner{background:#1e1e1e}.custom-container{font-smooth:antialiased;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.custom-pre:hover{background:#252526;transition:background .2s ease;cursor:text}.json-null,.json-undefined{color:#f48771;font-style:italic;opacity:.8}.json-empty{color:gray;font-style:italic}.json-comma+br{margin-bottom:2px}\n"], dependencies: [{ kind: "pipe", type: JsonHighlightPipe, name: "jsonHighlight" }], encapsulation: i0.ViewEncapsulation.None });
5167
5292
  }
5168
5293
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: JsonValuesDebujComponent, decorators: [{
5169
5294
  type: Component,
5170
- args: [{ selector: 'app-json-values-debuj', standalone: true, imports: [JsonHighlightPipe], encapsulation: ViewEncapsulation.None, template: "@if (form() && shouldDebug) {\r\n <div class=\"custom-container\">\r\n <pre class=\"custom-pre\" [innerHTML]=\"debugValue() | jsonHighlight\"></pre>\r\n </div>\r\n}\r\n", styles: [".custom-container{width:100%;overflow:auto;max-height:700px;background:#1e1e1e;border:1px solid #333;border-radius:8px;padding:1rem;margin-bottom:1rem}.custom-pre{margin:0;white-space:pre-wrap;word-break:break-word;font-family:Consolas,Monaco,Courier New,monospace;font-size:13px;line-height:1.55;color:#d4d4d4}.json-key{color:#9cdcfe;font-weight:600}.json-string{color:#ce9178}.json-number{color:#b5cea8;font-weight:600}.json-boolean{color:#569cd6;font-weight:700}.json-null{color:gray;font-style:italic}.json-bracket{color:gold;font-weight:700}.json-colon{color:#d4d4d4}.json-comma{color:gray}.json-date-part{color:#4fc1ff;font-weight:600}.json-date-sep{color:gray}.json-date-time{color:#c586c0}.custom-container::-webkit-scrollbar{width:10px;height:10px}.custom-container::-webkit-scrollbar-track{background:#252526}.custom-container::-webkit-scrollbar-thumb{background:#555;border-radius:6px}.custom-container::-webkit-scrollbar-thumb:hover{background:#777}\n"] }]
5295
+ args: [{ selector: 'app-json-values-debuj', standalone: true, imports: [JsonHighlightPipe], encapsulation: ViewEncapsulation.None, template: "@if (form() && shouldShowVisual) {\r\n <div class=\"custom-container\">\r\n <pre class=\"custom-pre\" [innerHTML]=\"debugValue() | jsonHighlight\"></pre>\r\n </div>\r\n}\r\n", styles: [".custom-container{width:100%;overflow:auto;max-height:700px;background:#1e1e1e;border:1px solid #333;border-radius:8px;box-shadow:0 4px 12px #0000004d;padding:1.25rem;margin-bottom:1.25rem}.custom-pre{margin:0;white-space:pre-wrap;word-break:break-word;word-wrap:break-word;font-family:Segoe UI,Fira Code,JetBrains Mono,Consolas,Monaco,Courier New,monospace;font-size:15px;line-height:1.65;color:#d4d4d4;font-weight:400}.json-key{color:#9cdcfe;font-weight:600;font-size:15px}.json-string{color:#ce9178;font-size:15px}.json-number{color:#b5cea8;font-weight:600;font-size:15px}.json-boolean{color:#569cd6;font-weight:700;font-size:15px}.json-null{color:gray;font-style:italic;font-size:15px}.json-bracket{color:gold;font-weight:700;font-size:16px}.json-colon{color:#d4d4d4;font-weight:500}.json-comma{color:gray;font-size:14px}.json-date-part{color:#4fc1ff;font-weight:600;font-size:15px}.json-date-sep{color:gray}.json-date-time{color:#c586c0;font-size:15px}.custom-container::-webkit-scrollbar{width:12px;height:12px}.custom-container::-webkit-scrollbar-track{background:#252526;border-radius:6px}.custom-container::-webkit-scrollbar-thumb{background:#555;border-radius:6px;transition:background .2s ease}.custom-container::-webkit-scrollbar-thumb:hover{background:#777}.custom-container::-webkit-scrollbar-corner{background:#1e1e1e}.custom-container{font-smooth:antialiased;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.custom-pre:hover{background:#252526;transition:background .2s ease;cursor:text}.json-null,.json-undefined{color:#f48771;font-style:italic;opacity:.8}.json-empty{color:gray;font-style:italic}.json-comma+br{margin-bottom:2px}\n"] }]
5171
5296
  }], ctorParameters: () => [], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], debug: [{ type: i0.Input, args: [{ isSignal: true, alias: "debug", required: false }] }] } });
5172
5297
 
5173
5298
  class IcoLabel {
@@ -7487,6 +7612,7 @@ const httpAuthorizeInterceptor = (req, next) => {
7487
7612
  return next(authReq).pipe(
7488
7613
  // Manejo de errores en la respuesta
7489
7614
  catchError((error) => {
7615
+ //console.log('Interceptor - Error HTTP detectado:', error);
7490
7616
  // Si el error es 401 (no autorizado), intenta refrescar el token
7491
7617
  if (error.status === HttpStatusCode.Unauthorized) {
7492
7618
  const refreshToken = _authorizeService.getTokenRefresh();
@@ -7540,6 +7666,21 @@ const httpAuthorizeInterceptor = (req, next) => {
7540
7666
  }))));
7541
7667
  }
7542
7668
  }
7669
+ if (error.status === 0) {
7670
+ //console.error('❌ Servidor de seguridad no disponible', error);
7671
+ const refreshError = new HttpErrorResponse({
7672
+ status: HttpStatusCode.Unauthorized,
7673
+ statusText: 'El servicio de seguridad no está disponible',
7674
+ error: 'No se pudo conectar al servicio de seguridad para refrescar el token. Por favor, inténtalo de nuevo más tarde.',
7675
+ url: req.url,
7676
+ });
7677
+ // Enviamos el error al manejador centralizado para mostrar el mensaje al usuario
7678
+ return _handleErrorService.handleErrorResponse(refreshError);
7679
+ }
7680
+ // console.log(
7681
+ // 'Interceptor - Error HTTP no relacionado con autorización:',
7682
+ // error,
7683
+ // );
7543
7684
  // Para otros errores, delega al servicio de manejo de errores
7544
7685
  return _handleErrorService.handleErrorResponse(error);
7545
7686
  }),
@@ -8686,6 +8827,7 @@ class ResultResponseService {
8686
8827
  if (!Array.isArray(data) || data.length === 0) {
8687
8828
  return '';
8688
8829
  }
8830
+ //console.log('Data recibida para construir la guía asociada:', data); // Depuración: Verificar el formato de los datos
8689
8831
  const itemsHtml = data
8690
8832
  .map((item) => {
8691
8833
  const cantidadRegistros = String(item?.cantidadRegistros ?? '0');
@@ -8749,6 +8891,10 @@ function containsFile(obj) {
8749
8891
  * Convierte un objeto plano a una instancia de FormData compatible con ASP.NET Core [FromForm].
8750
8892
  * Desglosa automáticamente arreglos primitivos, archivos sueltos y FileLists.
8751
8893
  */
8894
+ /**
8895
+ * Convierte un objeto a FormData compatible con ASP.NET Core
8896
+ * Maneja: primitivos, archivos, arreglos primitivos, arreglos de objetos complejos
8897
+ */
8752
8898
  function toFormData(obj) {
8753
8899
  const formData = new FormData();
8754
8900
  Object.keys(obj).forEach((key) => {
@@ -8757,19 +8903,41 @@ function toFormData(obj) {
8757
8903
  if (value === null || value === undefined) {
8758
8904
  return;
8759
8905
  }
8760
- // CASO 1: Es un Arreglo (int[], string[], File[])
8906
+ // CASO 1: Es un Arreglo
8761
8907
  if (Array.isArray(value)) {
8762
- value.forEach((item) => {
8763
- if (item instanceof File || item instanceof Blob) {
8764
- formData.append(key, item);
8765
- }
8766
- else if (item !== null && item !== undefined) {
8767
- // Envía múltiples llaves repetidas con el mismo nombre
8768
- formData.append(key, String(item));
8769
- }
8770
- });
8908
+ // Si el arreglo está vacío, lo ignoramos
8909
+ if (value.length === 0)
8910
+ return;
8911
+ // Verificar si es un arreglo de objetos complejos (no primitivos ni archivos)
8912
+ const isComplexArray = value.every((item) => item !== null &&
8913
+ item !== undefined &&
8914
+ typeof item === 'object' &&
8915
+ !(item instanceof File) &&
8916
+ !(item instanceof Blob));
8917
+ if (isComplexArray) {
8918
+ // CASO 1A: Arreglo de objetos complejos → formato clave[índice].propiedad
8919
+ value.forEach((item, index) => {
8920
+ Object.keys(item).forEach((subKey) => {
8921
+ const subValue = item[subKey];
8922
+ if (subValue !== null && subValue !== undefined) {
8923
+ formData.append(`${key}[${index}].${subKey}`, subValue instanceof File ? subValue : String(subValue));
8924
+ }
8925
+ });
8926
+ });
8927
+ }
8928
+ else {
8929
+ // CASO 1B: Arreglo de primitivos o archivos
8930
+ value.forEach((item) => {
8931
+ if (item instanceof File || item instanceof Blob) {
8932
+ formData.append(key, item);
8933
+ }
8934
+ else if (item !== null && item !== undefined) {
8935
+ formData.append(key, String(item));
8936
+ }
8937
+ });
8938
+ }
8771
8939
  }
8772
- // CASO 2: Es un FileList (Múltiples archivos desde un input html)
8940
+ // CASO 2: FileList
8773
8941
  else if (value instanceof FileList) {
8774
8942
  for (let i = 0; i < value.length; i++) {
8775
8943
  const file = value.item(i);
@@ -8777,11 +8945,15 @@ function toFormData(obj) {
8777
8945
  formData.append(key, file);
8778
8946
  }
8779
8947
  }
8780
- // CASO 3: Es un único Archivo o Blob
8948
+ // CASO 3: Archivo único
8781
8949
  else if (value instanceof File || value instanceof Blob) {
8782
8950
  formData.append(key, value);
8783
8951
  }
8784
- // CASO 4: Tipos primitivos ordinarios (string, number, boolean)
8952
+ // CASO 4: Objeto complejo (no arreglo, no archivo)
8953
+ else if (typeof value === 'object') {
8954
+ formData.append(key, JSON.stringify(value));
8955
+ }
8956
+ // CASO 5: Tipos primitivos
8785
8957
  else {
8786
8958
  formData.append(key, String(value));
8787
8959
  }
@@ -9274,7 +9446,7 @@ class FormPreviewService {
9274
9446
  ${cells
9275
9447
  .map((cell, i) => `
9276
9448
  <tr style="border-bottom: ${i < cells.length - 1 ? '0.5px solid #f1f3f5' : 'none'}">
9277
- <td style="padding: 6px 12px; background: #f8f9fa; width: 130px; color: #6c757d; border-right: 0.5px solid #f1f3f5;">
9449
+ <td style="padding: 6px 12px; background: #f8f9fa; text-transform: uppercase; width: auto; color: #6c757d; border-right: 0.5px solid #f1f3f5;">
9278
9450
  ${this.escapeHtml(cell.label)}
9279
9451
  </td>
9280
9452
  <td style="padding: 6px 12px; color: #212529; font-weight: 500;">
@@ -9488,7 +9660,7 @@ class TablePreviewService {
9488
9660
  : ''}
9489
9661
  ${showLabel
9490
9662
  ? `
9491
- <td style="padding: 6px 8px; background: #f8f9fa; width: 130px; color: #6c757d; border-right: 0.5px solid #f1f3f5;">
9663
+ <td style="padding: 6px 8px; background: #f8f9fa; text-transform: uppercase; width: auto; color: #6c757d; border-right: 0.5px solid #f1f3f5;">
9492
9664
  ${this.escapeHtml(cell.label)}
9493
9665
  </td>
9494
9666
  `
@@ -10208,5 +10380,5 @@ function sorensenDiceValidator(dataSource, key, umbral = 0.7) {
10208
10380
  * Generated bundle index. Do not edit.
10209
10381
  */
10210
10382
 
10211
- export { ACTION_TYPES, AlertaService, AppMessageErrorComponent, AppMessageHelpComponent, ArrowNavigationDirective, AuthorizeService, AutoScrollHeightDirective, BaseCRUDService, CACHE_KEYS, CacheService, CssV2Component, DSX_PALETTE, DateIndicator, DocxPreviewComponent, DsxAddToolsModule, DsxButtonComponent, DsxEnableDisable, DsxMessagesService, DsxStatusToggle, DteService, ENVIRONMENT, EndpointService, ErrorHandlerService, FileComponent, FormPreviewService, GTQFormatter, HeaderDsx, HelpersService, HttpHelpersService, INITIAL_PARAMETERS, IcoLabel, IconDsxComponent, JoinByPipe, JsonHighlightPipe, JsonValuesDebujComponent, JsonViewerComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, LogoDsxComponent, MasterDetailChangeService, NavbarDsxComponent, NetworkStatusComponent, OnlyRangoPatternDirective, ParameterValuesService, PdfPreviewComponent, PrimeNgModule, QrGenerator, ResultFileService, SWEET_ALERT_THEMES, ScreenInspector, SecurityService, SelectAllOnFocusDirective, SpinnerLoadingService, SweetAlert2DialogService, TablePreviewService, TemplateHighlight, TokenPurposeLogin, TruncatePipe, UtilityAddService, asyncExistsValidator, atLeastOneFieldRequiredValidator, chainControlGroups, createCurrencyFormatter, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, dateRangeValidatorFromTo, developmentEnvironment, getActionMessageConfig, getZeroBasedRolIndex, guardTokenPurposeGuard, httpAuthorizeInterceptor, minimumAgeValidator, nitValidator, productionEnvironment, provideEnvironment, sorensenDiceValidator, templateStructureValidator, templateVariablesValidator, validateEnvironmentConfig };
10383
+ export { ACTION_TYPES, AlertaService, AppMessageErrorComponent, AppMessageHelpComponent, ArrowNavigationDirective, AuthorizeService, AutoScrollHeightDirective, BaseCRUDService, CACHE_KEYS, CacheService, CssV2Component, DSX_PALETTE, DateIndicator, DocxPreviewComponent, DsxAddToolsModule, DsxAutocomplete, DsxButtonComponent, DsxEnableDisable, DsxMessagesService, DsxStatusToggle, DteService, ENVIRONMENT, EndpointService, ErrorHandlerService, FileComponent, FormPreviewService, GTQFormatter, HeaderDsx, HelpersService, HttpHelpersService, INITIAL_PARAMETERS, IcoLabel, IconDsxComponent, JoinByPipe, JsonHighlightPipe, JsonValuesDebujComponent, JsonViewerComponent, KpicardComponent, LoadingComponent, LoadingLottieComponent, LogoDsxComponent, MasterDetailChangeService, NavbarDsxComponent, NetworkStatusComponent, OnlyRangoPatternDirective, ParameterValuesService, PdfPreviewComponent, PrimeNgModule, QrGenerator, ResultFileService, SWEET_ALERT_THEMES, ScreenInspector, SecurityService, SelectAllOnFocusDirective, SpinnerLoadingService, SweetAlert2DialogService, TablePreviewService, TemplateHighlight, TokenPurposeLogin, TruncatePipe, UtilityAddService, asyncExistsValidator, atLeastOneFieldRequiredValidator, chainControlGroups, createCurrencyFormatter, createInitialCache, createTypedCacheProvider, cuiValidator, dateMinMaxValidator, dateRangeValidator, dateRangeValidatorFromTo, developmentEnvironment, getActionMessageConfig, getZeroBasedRolIndex, guardTokenPurposeGuard, httpAuthorizeInterceptor, minimumAgeValidator, nitValidator, productionEnvironment, provideEnvironment, sorensenDiceValidator, templateStructureValidator, templateVariablesValidator, validateEnvironmentConfig };
10212
10384
  //# sourceMappingURL=ngx-dsxlibrary.mjs.map