sf-documents 0.1.4 → 0.1.6

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.
@@ -3,7 +3,7 @@ import { Injectable, Pipe, InjectionToken, EventEmitter, ViewChild, Output, Inpu
3
3
  import { BehaviorSubject, Subject, of } from 'rxjs';
4
4
  import * as i3$1 from 'primeng/api';
5
5
  import { ConfirmationService } from 'primeng/api';
6
- import * as i2$2 from 'primeng/dynamicdialog';
6
+ import * as i2$1 from 'primeng/dynamicdialog';
7
7
  import { DialogService } from 'primeng/dynamicdialog';
8
8
  import { ToastModule } from 'primeng/toast';
9
9
  import * as _ from 'lodash';
@@ -16,8 +16,8 @@ import * as i5 from 'primeng/checkbox';
16
16
  import { CheckboxModule } from 'primeng/checkbox';
17
17
  import * as i2 from 'primeng/dialog';
18
18
  import { DialogModule } from 'primeng/dialog';
19
- import * as i2$1 from '@angular/common';
20
- import { CommonModule } from '@angular/common';
19
+ import * as i9 from '@angular/common';
20
+ import { CommonModule, DatePipe } from '@angular/common';
21
21
  import * as i3 from '@angular/forms';
22
22
  import { FormsModule } from '@angular/forms';
23
23
  import * as i1 from '@angular/platform-browser';
@@ -34,18 +34,31 @@ import * as i12 from 'primeng/dropdown';
34
34
  import { DropdownModule } from 'primeng/dropdown';
35
35
  import * as i13 from 'primeng/datepicker';
36
36
  import { DatePickerModule } from 'primeng/datepicker';
37
+ import * as i14 from 'primeng/skeleton';
38
+ import { SkeletonModule } from 'primeng/skeleton';
37
39
 
38
40
  class SfDocumentsService {
39
41
  _loading = new BehaviorSubject(false);
42
+ _loadingData = new BehaviorSubject(false);
40
43
  loading$ = this._loading.asObservable();
44
+ loadingData$ = this._loadingData.asObservable();
41
45
  set loading(loading) {
42
46
  this._loading.next(loading);
43
47
  }
48
+ set loadingData(loading) {
49
+ this._loadingData.next(loading);
50
+ }
51
+ get loading() {
52
+ return this._loading.getValue();
53
+ }
54
+ get loadingData() {
55
+ return this._loadingData.getValue();
56
+ }
44
57
  constructor() { }
45
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
46
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, providedIn: 'root' });
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SfDocumentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
59
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SfDocumentsService, providedIn: 'root' });
47
60
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SfDocumentsService, decorators: [{
49
62
  type: Injectable,
50
63
  args: [{
51
64
  providedIn: 'root'
@@ -60,21 +73,41 @@ class SafePipe {
60
73
  transform(url) {
61
74
  return this.sanitizer.bypassSecurityTrustResourceUrl(url);
62
75
  }
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
64
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SafePipe, isStandalone: true, name: "safe" });
76
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
77
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: SafePipe, isStandalone: true, name: "safe" });
65
78
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SafePipe, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SafePipe, decorators: [{
67
80
  type: Pipe,
68
81
  args: [{ name: 'safe' }]
69
82
  }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
70
83
 
71
84
  const DOCUMENT_SERVICE = new InjectionToken('DOCUMENT_SERVICE');
72
85
 
86
+ const ALLOWED_UPLOAD_EXTENSIONS = ['.pdf', '.xls', '.xlsx'];
87
+ const ALLOWED_UPLOAD_MIME_TYPES = [
88
+ 'application/pdf',
89
+ 'application/vnd.ms-excel',
90
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
91
+ ];
92
+ const UPLOAD_ACCEPT_ATTR = [...ALLOWED_UPLOAD_MIME_TYPES, ...ALLOWED_UPLOAD_EXTENSIONS].join(',');
93
+ const EXCEL_EXTENSIONS = ['.xls', '.xlsx'];
94
+ function isAllowedUploadFile(file) {
95
+ return ALLOWED_UPLOAD_MIME_TYPES.includes(file.type) ||
96
+ ALLOWED_UPLOAD_EXTENSIONS.some(ext => file.name.toLowerCase().endsWith(ext));
97
+ }
98
+ function isExcelFileName(name) {
99
+ if (!name)
100
+ return false;
101
+ const lower = name.toLowerCase();
102
+ return EXCEL_EXTENSIONS.some(ext => lower.endsWith(ext));
103
+ }
104
+
73
105
  class UploadDialogComponent {
74
106
  selectedDocument;
75
107
  onUploaded = new EventEmitter();
76
108
  loadFile = new EventEmitter();
77
109
  visible = false;
110
+ acceptedFileTypes = UPLOAD_ACCEPT_ATTR;
78
111
  fileInput;
79
112
  constructor() { }
80
113
  showDialog() {
@@ -90,18 +123,18 @@ class UploadDialogComponent {
90
123
  if (!input.files?.length)
91
124
  return;
92
125
  const files = Array.from(input.files);
93
- const pdfs = files.filter(f => f.type === 'application/pdf' || f.name.toLowerCase().endsWith('.pdf'));
126
+ const validFiles = files.filter(f => isAllowedUploadFile(f));
94
127
  const imagePathInput = input.value;
95
- if (pdfs?.length)
96
- this.onUploaded.emit({ fileList: pdfs, tagValue: imagePathInput });
128
+ if (validFiles?.length)
129
+ this.onUploaded.emit({ fileList: validFiles, tagValue: imagePathInput });
97
130
  this.visible = false;
98
131
  }
99
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UploadDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
100
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UploadDialogComponent, isStandalone: true, selector: "lib-upload-dialog", inputs: { selectedDocument: "selectedDocument" }, outputs: { onUploaded: "onUploaded", loadFile: "loadFile" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<button pButton type=\"button\" label=\"Subir archivo\" icon=\"pi pi-upload\"\r\n class=\"p-button-outlined ff-btn-upload\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"mt-3\">\r\n <div class=\"text-center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" accept=\"application/pdf,.pdf\" multiple>\r\n </div>\r\n <div class=\"text-center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i1$1.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: DialogModule }, { kind: "component", type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] });
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UploadDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
133
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: UploadDialogComponent, isStandalone: true, selector: "lib-upload-dialog", inputs: { selectedDocument: "selectedDocument" }, outputs: { onUploaded: "onUploaded", loadFile: "loadFile" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<button pButton type=\"button\" label=\"Subir archivo\" icon=\"pi pi-upload\"\r\n class=\"p-button-outlined ff-btn-upload\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"mt-3\">\r\n <div class=\"text-center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" [attr.accept]=\"acceptedFileTypes\" multiple>\r\n </div>\r\n <div class=\"text-center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "component", type: i1$1.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: DialogModule }, { kind: "component", type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }] });
101
134
  }
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UploadDialogComponent, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: UploadDialogComponent, decorators: [{
103
136
  type: Component,
104
- args: [{ selector: 'lib-upload-dialog', imports: [CommonModule, ButtonModule, DialogModule], template: "<button pButton type=\"button\" label=\"Subir archivo\" icon=\"pi pi-upload\"\r\n class=\"p-button-outlined ff-btn-upload\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"mt-3\">\r\n <div class=\"text-center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" accept=\"application/pdf,.pdf\" multiple>\r\n </div>\r\n <div class=\"text-center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n" }]
137
+ args: [{ selector: 'lib-upload-dialog', imports: [CommonModule, ButtonModule, DialogModule], template: "<button pButton type=\"button\" label=\"Subir archivo\" icon=\"pi pi-upload\"\r\n class=\"p-button-outlined ff-btn-upload\"\r\n (click)=\"showDialog()\"></button>\r\n\r\n<p-dialog [header] = \"'Adicionar ' + selectedDocument.label\" [(visible)]=\"visible\" [modal]=\"true\" [style]=\"{ width: '30rem' }\" [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\nposition = \"top\" [closable]=\"true\" (onHide)=\"visible=false\">\r\n <div class=\"mt-3\">\r\n <div class=\"text-center\">\r\n <input #fileInput type=\"file\" (change)=\"fileChange($event)\" class=\"hidden\"\r\n placeholder=\"Upload file\" [attr.accept]=\"acceptedFileTypes\" multiple>\r\n </div>\r\n <div class=\"text-center\">\r\n <p-button\r\n icon=\"pi pi-upload\"\r\n (click)=\"loadFileClick()\"\r\n [text] = \"true\"\r\n [rounded]=\"true\"\r\n ></p-button>\r\n\r\n <!-- <label *ngIf=\"isMobile\" (click)=\"openModal2(scanContent)\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">camera_alt</mat-icon>\r\n </label> -->\r\n </div>\r\n </div>\r\n</p-dialog>\r\n" }]
105
138
  }], ctorParameters: () => [], propDecorators: { selectedDocument: [{
106
139
  type: Input
107
140
  }], onUploaded: [{
@@ -113,6 +146,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
113
146
  args: ['fileInput', { static: true }]
114
147
  }] } });
115
148
 
149
+ // flexible-date.pipe.ts
150
+ class FlexibleDatePipe {
151
+ datePipe = new DatePipe('es'); // o el locale que uses
152
+ transform(value, format = 'dd/MM/yyyy HH:mm') {
153
+ const parsed = this.parseFlexibleDate(value);
154
+ if (!parsed)
155
+ return value ?? ''; // fallback: mostrar el string original en vez de explotar
156
+ return this.datePipe.transform(parsed, format) ?? '';
157
+ }
158
+ parseFlexibleDate(value) {
159
+ if (!value)
160
+ return null;
161
+ if (value instanceof Date)
162
+ return isNaN(value.getTime()) ? null : value;
163
+ if (typeof value === 'number')
164
+ return new Date(value);
165
+ let str = String(value).trim();
166
+ // Colapsar espacios múltiples: "Jun 4 2026 5:03PM" -> "Jun 4 2026 5:03PM"
167
+ str = str.replace(/\s+/g, ' ');
168
+ // Intento 1: Date nativo (cubre ISO, "Jun 4 2026 5:03PM", RFC2822, etc.)
169
+ let d = new Date(str);
170
+ if (!isNaN(d.getTime()))
171
+ return d;
172
+ // Intento 2: formatos comunes tipo "dd/MM/yyyy HH:mm" o "MM/dd/yyyy"
173
+ const slashMatch = str.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})(?:\s+(\d{1,2}):(\d{2})(?::(\d{2}))?\s*(AM|PM)?)?$/i);
174
+ if (slashMatch) {
175
+ let [, a, b, year, hh, mm, ss, ampm] = slashMatch;
176
+ if (year.length === 2)
177
+ year = '20' + year;
178
+ let hour = hh ? parseInt(hh, 10) : 0;
179
+ if (ampm) {
180
+ if (/PM/i.test(ampm) && hour < 12)
181
+ hour += 12;
182
+ if (/AM/i.test(ampm) && hour === 12)
183
+ hour = 0;
184
+ }
185
+ // Asumimos dd/MM/yyyy (ajustá si tu backend manda MM/dd/yyyy)
186
+ d = new Date(+year, +a - 1, +b, hour, mm ? +mm : 0, ss ? +ss : 0);
187
+ if (!isNaN(d.getTime()))
188
+ return d;
189
+ }
190
+ // Intento 3: "yyyy-MM-dd HH:mm:ss" sin la 'T' de ISO
191
+ const isoLike = str.replace(' ', 'T');
192
+ d = new Date(isoLike);
193
+ if (!isNaN(d.getTime()))
194
+ return d;
195
+ return null; // no se pudo parsear
196
+ }
197
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FlexibleDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
198
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: FlexibleDatePipe, isStandalone: true, name: "flexibleDate" });
199
+ }
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FlexibleDatePipe, decorators: [{
201
+ type: Pipe,
202
+ args: [{ name: 'flexibleDate' }]
203
+ }] });
204
+
116
205
  class FolderFilesComponent {
117
206
  documentService;
118
207
  documentsService = inject(DOCUMENT_SERVICE);
@@ -264,6 +353,9 @@ class FolderFilesComponent {
264
353
  openNewWindow(item) {
265
354
  this.onOpenNewWindow.emit(item);
266
355
  }
356
+ isExcel(item) {
357
+ return isExcelFileName(item?.label) || isExcelFileName(item?.Path);
358
+ }
267
359
  goBack() {
268
360
  this.onBack.emit();
269
361
  }
@@ -290,16 +382,16 @@ class FolderFilesComponent {
290
382
  this.page = 1;
291
383
  this.loadFiles();
292
384
  }
293
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderFilesComponent, deps: [{ token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
294
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FolderFilesComponent, isStandalone: true, selector: "lib-folder-files", inputs: { carpeta: "carpeta", isMobile: "isMobile", idKatios: "idKatios", server: "server", subestado: "subestado", requestData: "requestData", useBreadcrumb: "useBreadcrumb", usesApi: "usesApi" }, outputs: { onFileChange: "onFileChange", onCargarArchivo: "onCargarArchivo", onEliminarMasivo: "onEliminarMasivo", onOpenVisorDoc: "onOpenVisorDoc", onOpenNewWindow: "onOpenNewWindow", onBack: "onBack" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ff-layout\">\r\n <!-- Header fijo -->\r\n <div class=\"ff-header\">\r\n <div class=\"ff-back-row\" *ngIf=\"!useBreadcrumb\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goBack()\"></button>\r\n </div>\r\n\r\n <!-- Toolbar: b\u00FAsqueda + botones de acci\u00F3n -->\r\n <div class=\"ff-toolbar\">\r\n <p-iconfield class=\"ff-toolbar__search\">\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText\r\n [placeholder]=\"'Buscar en ' + carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\">\r\n </lib-upload-dialog>\r\n\r\n <button pButton type=\"button\"\r\n icon=\"pi pi-trash\"\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n (click)=\"emitEliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"\r\n class=\"p-button-outlined p-button-danger p-button-sm ff-btn-delete\">\r\n <span class=\"ff-btn-label\">Eliminar ({{docsEliminables.length}})</span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Fila seleccionar todo / total archivos -->\r\n <div class=\"ff-select-row\" *ngIf=\"!loading && items.length > 0\">\r\n <div class=\"ff-select-row__left\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\">\r\n </p-checkbox>\r\n <span *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\" class=\"ff-select-row__label\">Seleccionar todo</span>\r\n </div>\r\n <span class=\"ff-select-row__count\">{{totalRecords || items.length}} {{(totalRecords || items.length) === 1 ? 'archivo' : 'archivos'}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Contenido scrollable -->\r\n <div class=\"ff-file-list-wrapper\">\r\n <!-- Loading -->\r\n <div *ngIf=\"loading\" class=\"ff-loading\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n </div>\r\n\r\n <!-- Lista de archivos -->\r\n <div class=\"ff-file-list\" *ngIf=\"!loading\">\r\n <div class=\"ff-file-item\" *ngFor=\"let item of items\" (click)=\"openVisorDoc(item)\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"\r\n (click)=\"$event.stopPropagation()\">\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <embed *ngIf=\"carpeta.TipoArchivo == '2'\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\">\r\n <img *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\" class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\">\r\n <iframe *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </div>\r\n\r\n <div class=\"ff-file-item__info\">\r\n <span class=\"ff-file-item__name\">{{item.label}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida | date:'dd/MM/yyyy HH:mm'}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida | date:'dd/MM/yyyy HH:mm'}}</span>\r\n <i class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\" tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Sin resultados -->\r\n <div *ngIf=\"!loading && items.length === 0\" class=\"ff-empty\">\r\n Sin documentos cargados\r\n </div>\r\n </div>\r\n\r\n <!-- Footer fijo: paginaci\u00F3n compacta -->\r\n <div class=\"ff-footer\" *ngIf=\"usesApi && totalRecords > 0\">\r\n <div class=\"ff-pagination\">\r\n <p-select [options]=\"pageSizeOptions\" optionLabel=\"label\" optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\" (ngModelChange)=\"onPageSizeChange()\">\r\n </p-select>\r\n <p-paginator\r\n [first]=\"first\"\r\n [rows]=\"pageSize\"\r\n [totalRecords]=\"totalRecords\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [showPageLinks]=\"false\"\r\n [showFirstLastIcon]=\"false\">\r\n </p-paginator>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-header{flex-shrink:0}.ff-back-row{display:flex;margin-block:15px}.ff-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:4px;padding:.5rem}.ff-toolbar__search{flex:1;min-width:0}:host ::ng-deep .ff-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.ff-toolbar__actions{display:flex;align-items:center;gap:6px;flex-shrink:0}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px;padding:.4rem .75rem}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .ff-btn-delete{white-space:nowrap;font-size:13px;padding:.4rem .75rem}.ff-select-row{display:flex;align-items:center;justify-content:space-between;padding:8px 4px;border-bottom:1px solid #e5e7eb;padding:.5rem}.ff-select-row__left{display:flex;align-items:center;gap:8px}.ff-select-row__label{font-size:13px;color:#374151}.ff-select-row__count{font-size:13px;color:#6b7280}.ff-file-list-wrapper{flex:1;min-height:0;overflow-y:auto}.ff-loading{text-align:center;padding:20px}.ff-file-list{display:flex;flex-direction:column}.ff-file-item{display:flex;align-items:center;gap:12px;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.ff-file-item:hover{background-color:#f9fafb}.ff-file-item__preview{flex-shrink:0;width:85px;height:100px;overflow:hidden;display:flex;align-items:center;justify-content:center}.ff-file-item__frame{width:85px;height:100px;border:none;pointer-events:none;object-fit:cover}.ff-file-item__info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;text-align:right}.ff-file-item__name{font-size:13px;font-weight:500;color:#111827;min-width:0;word-break:break-word}.ff-file-item__date{font-size:12px;color:#9ca3af;white-space:nowrap}.ff-file-item__open{font-size:18px;color:#3b82f6;flex-shrink:0;padding:4px;border-radius:4px;transition:color .15s ease,background-color .15s ease;cursor:pointer;align-self:flex-end}.ff-file-item__open:hover{color:#2563eb;background-color:#eff6ff}.ff-empty{text-align:center;padding:20px;color:#999}.ff-footer{flex-shrink:0;border-top:1px solid #e5e7eb}.ff-pagination{display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:6px 8px;font-size:13px}:host ::ng-deep .ff-pagination .p-select{width:auto;min-width:90px}:host ::ng-deep .ff-pagination .p-select .p-select-label{font-size:12px;padding:4px 8px}:host ::ng-deep .ff-pagination .p-paginator{padding:0;background:transparent;border:none;gap:0}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-current{font-size:12px;color:#6b7280;padding:0 6px;min-width:auto;height:auto}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-prev,:host ::ng-deep .ff-pagination .p-paginator .p-paginator-next{min-width:28px;height:28px;font-size:12px}@media only screen and (max-width: 656px){.ff-toolbar{gap:6px}.ff-btn-label{display:none}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button .p-button-label{display:none}:host ::ng-deep .ff-toolbar__actions .p-button{padding:.5rem}.ff-file-item__preview,.ff-file-item__frame{width:65px;height:80px}.ff-file-item__name{font-size:12px}.ff-file-item__date{font-size:11px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i7.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "component", type: UploadDialogComponent, selector: "lib-upload-dialog", inputs: ["selectedDocument"], outputs: ["onUploaded", "loadFile"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i8.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"] }] });
385
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FolderFilesComponent, deps: [{ token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
386
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: FolderFilesComponent, isStandalone: true, selector: "lib-folder-files", inputs: { carpeta: "carpeta", isMobile: "isMobile", idKatios: "idKatios", server: "server", subestado: "subestado", requestData: "requestData", useBreadcrumb: "useBreadcrumb", usesApi: "usesApi" }, outputs: { onFileChange: "onFileChange", onCargarArchivo: "onCargarArchivo", onEliminarMasivo: "onEliminarMasivo", onOpenVisorDoc: "onOpenVisorDoc", onOpenNewWindow: "onOpenNewWindow", onBack: "onBack" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"ff-layout\">\r\n <!-- Header fijo -->\r\n <div class=\"ff-header\">\r\n <div class=\"ff-back-row\" *ngIf=\"!useBreadcrumb\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goBack()\"></button>\r\n </div>\r\n\r\n <!-- Toolbar: b\u00FAsqueda + botones de acci\u00F3n -->\r\n <div class=\"ff-toolbar\">\r\n <p-iconfield class=\"ff-toolbar__search\">\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText\r\n [placeholder]=\"'Buscar en ' + carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\">\r\n </lib-upload-dialog>\r\n\r\n <button pButton type=\"button\"\r\n icon=\"pi pi-trash\"\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n (click)=\"emitEliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"\r\n class=\"p-button-outlined p-button-danger p-button-sm ff-btn-delete\">\r\n <span class=\"ff-btn-label\">Eliminar ({{docsEliminables.length}})</span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Fila seleccionar todo / total archivos -->\r\n <div class=\"ff-select-row\" *ngIf=\"!loading && items.length > 0\">\r\n <div class=\"ff-select-row__left\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\">\r\n </p-checkbox>\r\n <span *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\" class=\"ff-select-row__label\">Seleccionar todo</span>\r\n </div>\r\n <span class=\"ff-select-row__count\">{{totalRecords || items.length}} {{(totalRecords || items.length) === 1 ? 'archivo' : 'archivos'}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Contenido scrollable -->\r\n <div class=\"ff-file-list-wrapper\">\r\n <!-- Loading -->\r\n <div *ngIf=\"loading\" class=\"ff-loading\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n </div>\r\n\r\n <!-- Lista de archivos -->\r\n <div class=\"ff-file-list\" *ngIf=\"!loading\">\r\n <div class=\"ff-file-item\" *ngFor=\"let item of items\" (click)=\"openVisorDoc(item)\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"\r\n (click)=\"$event.stopPropagation()\">\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <i *ngIf=\"isExcel(item)\" class=\"pi pi-file-excel ff-file-item__frame ff-file-item__icon\"></i>\r\n <ng-container *ngIf=\"!isExcel(item)\">\r\n <embed *ngIf=\"carpeta.TipoArchivo == '2'\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\">\r\n <img *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\" class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\">\r\n <iframe *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"ff-file-item__info\">\r\n <span class=\"ff-file-item__name\">{{item.label}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida | flexibleDate:'dd/MM/yyyy HH:mm'}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida | flexibleDate:'dd/MM/yyyy HH:mm'}}</span>\r\n <i class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\" tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Sin resultados -->\r\n <div *ngIf=\"!loading && items.length === 0\" class=\"ff-empty\">\r\n Sin documentos cargados\r\n </div>\r\n </div>\r\n\r\n <!-- Footer fijo: paginaci\u00F3n compacta -->\r\n <div class=\"ff-footer\" *ngIf=\"usesApi && totalRecords > 0\">\r\n <div class=\"ff-pagination\">\r\n <p-select [options]=\"pageSizeOptions\" optionLabel=\"label\" optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\" (ngModelChange)=\"onPageSizeChange()\">\r\n </p-select>\r\n <p-paginator\r\n [first]=\"first\"\r\n [rows]=\"pageSize\"\r\n [totalRecords]=\"totalRecords\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [showPageLinks]=\"false\"\r\n [showFirstLastIcon]=\"false\">\r\n </p-paginator>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-header{flex-shrink:0}.ff-back-row{display:flex;margin-block:15px}.ff-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:4px;padding:.5rem}.ff-toolbar__search{flex:1;min-width:0}:host ::ng-deep .ff-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.ff-toolbar__actions{display:flex;align-items:center;gap:6px;flex-shrink:0}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px;padding:.4rem .75rem}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .ff-btn-delete{white-space:nowrap;font-size:13px;padding:.4rem .75rem}.ff-select-row{display:flex;align-items:center;justify-content:space-between;padding:8px 4px;border-bottom:1px solid #e5e7eb;padding:.5rem}.ff-select-row__left{display:flex;align-items:center;gap:8px}.ff-select-row__label{font-size:13px;color:#374151}.ff-select-row__count{font-size:13px;color:#6b7280}.ff-file-list-wrapper{flex:1;min-height:0;overflow-y:auto}.ff-loading{text-align:center;padding:20px}.ff-file-list{display:flex;flex-direction:column}.ff-file-item{display:flex;align-items:center;gap:12px;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.ff-file-item:hover{background-color:#f9fafb}.ff-file-item__preview{flex-shrink:0;width:85px;height:100px;overflow:hidden;display:flex;align-items:center;justify-content:center}.ff-file-item__frame{width:85px;height:100px;border:none;pointer-events:none;object-fit:cover}.ff-file-item__icon{display:flex;align-items:center;justify-content:center;font-size:40px;color:#1d6f42;background-color:#f0faf5;border-radius:4px}.ff-file-item__info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;text-align:right}.ff-file-item__name{font-size:13px;font-weight:500;color:#111827;min-width:0;word-break:break-word}.ff-file-item__date{font-size:12px;color:#9ca3af;overflow:hidden}.ff-file-item__open{font-size:18px;color:#3b82f6;flex-shrink:0;padding:4px;border-radius:4px;transition:color .15s ease,background-color .15s ease;cursor:pointer;align-self:flex-end}.ff-file-item__open:hover{color:#2563eb;background-color:#eff6ff}.ff-empty{text-align:center;padding:20px;color:#999}.ff-footer{flex-shrink:0;border-top:1px solid #e5e7eb}.ff-pagination{display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:6px 8px;font-size:13px}:host ::ng-deep .ff-pagination .p-select{width:auto;min-width:90px}:host ::ng-deep .ff-pagination .p-select .p-select-label{font-size:12px;padding:4px 8px}:host ::ng-deep .ff-pagination .p-paginator{padding:0;background:transparent;border:none;gap:0}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-current{font-size:12px;color:#6b7280;padding:0 6px;min-width:auto;height:auto}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-prev,:host ::ng-deep .ff-pagination .p-paginator .p-paginator-next{min-width:28px;height:28px;font-size:12px}@media only screen and (max-width: 656px){.ff-toolbar{gap:6px}.ff-btn-label{display:none}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button .p-button-label{display:none}:host ::ng-deep .ff-toolbar__actions .p-button{padding:.5rem}.ff-file-item__preview,.ff-file-item__frame{width:65px;height:80px}.ff-file-item__icon{font-size:28px}.ff-file-item__name{font-size:12px}.ff-file-item__date{font-size:11px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i7.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "component", type: UploadDialogComponent, selector: "lib-upload-dialog", inputs: ["selectedDocument"], outputs: ["onUploaded", "loadFile"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i8.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: "pipe", type: FlexibleDatePipe, name: "flexibleDate" }] });
295
387
  }
296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderFilesComponent, decorators: [{
388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FolderFilesComponent, decorators: [{
297
389
  type: Component,
298
390
  args: [{ selector: 'lib-folder-files', imports: [
299
391
  CommonModule, FormsModule, ButtonModule,
300
392
  CheckboxModule, InputTextModule, InputIcon, IconField,
301
- PaginatorModule, SafePipe, UploadDialogComponent, SelectModule
302
- ], standalone: true, template: "<div class=\"ff-layout\">\r\n <!-- Header fijo -->\r\n <div class=\"ff-header\">\r\n <div class=\"ff-back-row\" *ngIf=\"!useBreadcrumb\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goBack()\"></button>\r\n </div>\r\n\r\n <!-- Toolbar: b\u00FAsqueda + botones de acci\u00F3n -->\r\n <div class=\"ff-toolbar\">\r\n <p-iconfield class=\"ff-toolbar__search\">\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText\r\n [placeholder]=\"'Buscar en ' + carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\">\r\n </lib-upload-dialog>\r\n\r\n <button pButton type=\"button\"\r\n icon=\"pi pi-trash\"\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n (click)=\"emitEliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"\r\n class=\"p-button-outlined p-button-danger p-button-sm ff-btn-delete\">\r\n <span class=\"ff-btn-label\">Eliminar ({{docsEliminables.length}})</span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Fila seleccionar todo / total archivos -->\r\n <div class=\"ff-select-row\" *ngIf=\"!loading && items.length > 0\">\r\n <div class=\"ff-select-row__left\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\">\r\n </p-checkbox>\r\n <span *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\" class=\"ff-select-row__label\">Seleccionar todo</span>\r\n </div>\r\n <span class=\"ff-select-row__count\">{{totalRecords || items.length}} {{(totalRecords || items.length) === 1 ? 'archivo' : 'archivos'}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Contenido scrollable -->\r\n <div class=\"ff-file-list-wrapper\">\r\n <!-- Loading -->\r\n <div *ngIf=\"loading\" class=\"ff-loading\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n </div>\r\n\r\n <!-- Lista de archivos -->\r\n <div class=\"ff-file-list\" *ngIf=\"!loading\">\r\n <div class=\"ff-file-item\" *ngFor=\"let item of items\" (click)=\"openVisorDoc(item)\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"\r\n (click)=\"$event.stopPropagation()\">\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <embed *ngIf=\"carpeta.TipoArchivo == '2'\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\">\r\n <img *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\" class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\">\r\n <iframe *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </div>\r\n\r\n <div class=\"ff-file-item__info\">\r\n <span class=\"ff-file-item__name\">{{item.label}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida | date:'dd/MM/yyyy HH:mm'}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida | date:'dd/MM/yyyy HH:mm'}}</span>\r\n <i class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\" tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Sin resultados -->\r\n <div *ngIf=\"!loading && items.length === 0\" class=\"ff-empty\">\r\n Sin documentos cargados\r\n </div>\r\n </div>\r\n\r\n <!-- Footer fijo: paginaci\u00F3n compacta -->\r\n <div class=\"ff-footer\" *ngIf=\"usesApi && totalRecords > 0\">\r\n <div class=\"ff-pagination\">\r\n <p-select [options]=\"pageSizeOptions\" optionLabel=\"label\" optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\" (ngModelChange)=\"onPageSizeChange()\">\r\n </p-select>\r\n <p-paginator\r\n [first]=\"first\"\r\n [rows]=\"pageSize\"\r\n [totalRecords]=\"totalRecords\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [showPageLinks]=\"false\"\r\n [showFirstLastIcon]=\"false\">\r\n </p-paginator>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-header{flex-shrink:0}.ff-back-row{display:flex;margin-block:15px}.ff-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:4px;padding:.5rem}.ff-toolbar__search{flex:1;min-width:0}:host ::ng-deep .ff-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.ff-toolbar__actions{display:flex;align-items:center;gap:6px;flex-shrink:0}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px;padding:.4rem .75rem}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .ff-btn-delete{white-space:nowrap;font-size:13px;padding:.4rem .75rem}.ff-select-row{display:flex;align-items:center;justify-content:space-between;padding:8px 4px;border-bottom:1px solid #e5e7eb;padding:.5rem}.ff-select-row__left{display:flex;align-items:center;gap:8px}.ff-select-row__label{font-size:13px;color:#374151}.ff-select-row__count{font-size:13px;color:#6b7280}.ff-file-list-wrapper{flex:1;min-height:0;overflow-y:auto}.ff-loading{text-align:center;padding:20px}.ff-file-list{display:flex;flex-direction:column}.ff-file-item{display:flex;align-items:center;gap:12px;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.ff-file-item:hover{background-color:#f9fafb}.ff-file-item__preview{flex-shrink:0;width:85px;height:100px;overflow:hidden;display:flex;align-items:center;justify-content:center}.ff-file-item__frame{width:85px;height:100px;border:none;pointer-events:none;object-fit:cover}.ff-file-item__info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;text-align:right}.ff-file-item__name{font-size:13px;font-weight:500;color:#111827;min-width:0;word-break:break-word}.ff-file-item__date{font-size:12px;color:#9ca3af;white-space:nowrap}.ff-file-item__open{font-size:18px;color:#3b82f6;flex-shrink:0;padding:4px;border-radius:4px;transition:color .15s ease,background-color .15s ease;cursor:pointer;align-self:flex-end}.ff-file-item__open:hover{color:#2563eb;background-color:#eff6ff}.ff-empty{text-align:center;padding:20px;color:#999}.ff-footer{flex-shrink:0;border-top:1px solid #e5e7eb}.ff-pagination{display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:6px 8px;font-size:13px}:host ::ng-deep .ff-pagination .p-select{width:auto;min-width:90px}:host ::ng-deep .ff-pagination .p-select .p-select-label{font-size:12px;padding:4px 8px}:host ::ng-deep .ff-pagination .p-paginator{padding:0;background:transparent;border:none;gap:0}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-current{font-size:12px;color:#6b7280;padding:0 6px;min-width:auto;height:auto}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-prev,:host ::ng-deep .ff-pagination .p-paginator .p-paginator-next{min-width:28px;height:28px;font-size:12px}@media only screen and (max-width: 656px){.ff-toolbar{gap:6px}.ff-btn-label{display:none}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button .p-button-label{display:none}:host ::ng-deep .ff-toolbar__actions .p-button{padding:.5rem}.ff-file-item__preview,.ff-file-item__frame{width:65px;height:80px}.ff-file-item__name{font-size:12px}.ff-file-item__date{font-size:11px}}\n"] }]
393
+ PaginatorModule, SafePipe, UploadDialogComponent, SelectModule, FlexibleDatePipe
394
+ ], standalone: true, template: "<div class=\"ff-layout\">\r\n <!-- Header fijo -->\r\n <div class=\"ff-header\">\r\n <div class=\"ff-back-row\" *ngIf=\"!useBreadcrumb\">\r\n <button pButton type=\"button\" icon=\"pi pi-arrow-left\" label=\"Volver\" (click)=\"goBack()\"></button>\r\n </div>\r\n\r\n <!-- Toolbar: b\u00FAsqueda + botones de acci\u00F3n -->\r\n <div class=\"ff-toolbar\">\r\n <p-iconfield class=\"ff-toolbar__search\">\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText\r\n [placeholder]=\"'Buscar en ' + carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0','')\"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\">\r\n </lib-upload-dialog>\r\n\r\n <button pButton type=\"button\"\r\n icon=\"pi pi-trash\"\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n (click)=\"emitEliminarMasivo()\"\r\n [disabled]=\"docsEliminables.length === 0\"\r\n class=\"p-button-outlined p-button-danger p-button-sm ff-btn-delete\">\r\n <span class=\"ff-btn-label\">Eliminar ({{docsEliminables.length}})</span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Fila seleccionar todo / total archivos -->\r\n <div class=\"ff-select-row\" *ngIf=\"!loading && items.length > 0\">\r\n <div class=\"ff-select-row__left\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\">\r\n </p-checkbox>\r\n <span *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\" class=\"ff-select-row__label\">Seleccionar todo</span>\r\n </div>\r\n <span class=\"ff-select-row__count\">{{totalRecords || items.length}} {{(totalRecords || items.length) === 1 ? 'archivo' : 'archivos'}}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Contenido scrollable -->\r\n <div class=\"ff-file-list-wrapper\">\r\n <!-- Loading -->\r\n <div *ngIf=\"loading\" class=\"ff-loading\">\r\n <i class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem;\"></i>\r\n </div>\r\n\r\n <!-- Lista de archivos -->\r\n <div class=\"ff-file-list\" *ngIf=\"!loading\">\r\n <div class=\"ff-file-item\" *ngFor=\"let item of items\" (click)=\"openVisorDoc(item)\">\r\n <p-checkbox *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"item.delete\"\r\n (onChange)=\"onClickedCheckDelete($event, item)\"\r\n (click)=\"$event.stopPropagation()\">\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <i *ngIf=\"isExcel(item)\" class=\"pi pi-file-excel ff-file-item__frame ff-file-item__icon\"></i>\r\n <ng-container *ngIf=\"!isExcel(item)\">\r\n <embed *ngIf=\"carpeta.TipoArchivo == '2'\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\">\r\n <img *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\" class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\">\r\n <iframe *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\" class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\" frameborder=\"0\"></iframe>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"ff-file-item__info\">\r\n <span class=\"ff-file-item__name\">{{item.label}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && !isMobile\">Fecha Subida: {{item.FechaSubida | flexibleDate:'dd/MM/yyyy HH:mm'}}</span>\r\n <span class=\"ff-file-item__date\" *ngIf=\"item.FechaSubida && isMobile\">{{item.FechaSubida | flexibleDate:'dd/MM/yyyy HH:mm'}}</span>\r\n <i class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"openNewWindow(item); $event.stopPropagation()\"\r\n role=\"button\" tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"openNewWindow(item); $event.stopPropagation()\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Sin resultados -->\r\n <div *ngIf=\"!loading && items.length === 0\" class=\"ff-empty\">\r\n Sin documentos cargados\r\n </div>\r\n </div>\r\n\r\n <!-- Footer fijo: paginaci\u00F3n compacta -->\r\n <div class=\"ff-footer\" *ngIf=\"usesApi && totalRecords > 0\">\r\n <div class=\"ff-pagination\">\r\n <p-select [options]=\"pageSizeOptions\" optionLabel=\"label\" optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\" (ngModelChange)=\"onPageSizeChange()\">\r\n </p-select>\r\n <p-paginator\r\n [first]=\"first\"\r\n [rows]=\"pageSize\"\r\n [totalRecords]=\"totalRecords\"\r\n (onPageChange)=\"onPageChange($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [showPageLinks]=\"false\"\r\n [showFirstLastIcon]=\"false\">\r\n </p-paginator>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.ff-header{flex-shrink:0}.ff-back-row{display:flex;margin-block:15px}.ff-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:4px;padding:.5rem}.ff-toolbar__search{flex:1;min-width:0}:host ::ng-deep .ff-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.ff-toolbar__actions{display:flex;align-items:center;gap:6px;flex-shrink:0}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px;padding:.4rem .75rem}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .ff-btn-delete{white-space:nowrap;font-size:13px;padding:.4rem .75rem}.ff-select-row{display:flex;align-items:center;justify-content:space-between;padding:8px 4px;border-bottom:1px solid #e5e7eb;padding:.5rem}.ff-select-row__left{display:flex;align-items:center;gap:8px}.ff-select-row__label{font-size:13px;color:#374151}.ff-select-row__count{font-size:13px;color:#6b7280}.ff-file-list-wrapper{flex:1;min-height:0;overflow-y:auto}.ff-loading{text-align:center;padding:20px}.ff-file-list{display:flex;flex-direction:column}.ff-file-item{display:flex;align-items:center;gap:12px;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.ff-file-item:hover{background-color:#f9fafb}.ff-file-item__preview{flex-shrink:0;width:85px;height:100px;overflow:hidden;display:flex;align-items:center;justify-content:center}.ff-file-item__frame{width:85px;height:100px;border:none;pointer-events:none;object-fit:cover}.ff-file-item__icon{display:flex;align-items:center;justify-content:center;font-size:40px;color:#1d6f42;background-color:#f0faf5;border-radius:4px}.ff-file-item__info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;text-align:right}.ff-file-item__name{font-size:13px;font-weight:500;color:#111827;min-width:0;word-break:break-word}.ff-file-item__date{font-size:12px;color:#9ca3af;overflow:hidden}.ff-file-item__open{font-size:18px;color:#3b82f6;flex-shrink:0;padding:4px;border-radius:4px;transition:color .15s ease,background-color .15s ease;cursor:pointer;align-self:flex-end}.ff-file-item__open:hover{color:#2563eb;background-color:#eff6ff}.ff-empty{text-align:center;padding:20px;color:#999}.ff-footer{flex-shrink:0;border-top:1px solid #e5e7eb}.ff-pagination{display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:6px 8px;font-size:13px}:host ::ng-deep .ff-pagination .p-select{width:auto;min-width:90px}:host ::ng-deep .ff-pagination .p-select .p-select-label{font-size:12px;padding:4px 8px}:host ::ng-deep .ff-pagination .p-paginator{padding:0;background:transparent;border:none;gap:0}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-current{font-size:12px;color:#6b7280;padding:0 6px;min-width:auto;height:auto}:host ::ng-deep .ff-pagination .p-paginator .p-paginator-prev,:host ::ng-deep .ff-pagination .p-paginator .p-paginator-next{min-width:28px;height:28px;font-size:12px}@media only screen and (max-width: 656px){.ff-toolbar{gap:6px}.ff-btn-label{display:none}:host ::ng-deep .ff-toolbar__actions lib-upload-dialog .p-button .p-button-label{display:none}:host ::ng-deep .ff-toolbar__actions .p-button{padding:.5rem}.ff-file-item__preview,.ff-file-item__frame{width:65px;height:80px}.ff-file-item__icon{font-size:28px}.ff-file-item__name{font-size:12px}.ff-file-item__date{font-size:11px}}\n"] }]
303
395
  }], ctorParameters: () => [{ type: SfDocumentsService }], propDecorators: { carpeta: [{
304
396
  type: Input
305
397
  }], isMobile: [{
@@ -445,7 +537,8 @@ class SfDocumentsComponent {
445
537
  cargarParametros(tipo) {
446
538
  if (tipo !== '1')
447
539
  return;
448
- this.documentService.loading = true;
540
+ this.documentService.loadingData = true;
541
+ this.documentService.loading = false;
449
542
  const data = {
450
543
  action: this.accion,
451
544
  entity: this.entidad,
@@ -471,7 +564,7 @@ class SfDocumentsComponent {
471
564
  code: d.idDoc
472
565
  }));
473
566
  }), finalize(() => {
474
- this.documentService.loading = false;
567
+ this.documentService.loadingData = false;
475
568
  })).subscribe({
476
569
  error: (error) => {
477
570
  this.errorCargarArbol(error);
@@ -519,11 +612,11 @@ class SfDocumentsComponent {
519
612
  this.files = iArbol;
520
613
  this.filesFilter = iArbol;
521
614
  this.expandAll();
522
- this.documentService.loading = false;
615
+ this.documentService.loadingData = false;
523
616
  };
524
617
  errorCargarArbol = (iError) => {
525
618
  this.message("error", "Error al traer la información", iError.message);
526
- this.documentService.loading = false;
619
+ this.documentService.loadingData = false;
527
620
  };
528
621
  // onClickedCheckDelete($event: any, document: any) {
529
622
  // if ($event.checked) this.docsEliminables.push(document);
@@ -784,6 +877,12 @@ class SfDocumentsComponent {
784
877
  async openNewWindow(item) {
785
878
  window.open(item.Path, '_blank').focus();
786
879
  }
880
+ isCurrentExcel() {
881
+ return isExcelFileName(this.current_label) || isExcelFileName(this.current_path);
882
+ }
883
+ openCurrentInNewWindow() {
884
+ window.open(this.current_path, '_blank').focus();
885
+ }
787
886
  async seleccionoDocs(iNodo) {
788
887
  var path = iNodo.Path + iNodo.label;
789
888
  this.pdfUrl = "//imagenes//" + iNodo.idKatios + "//" + path;
@@ -941,18 +1040,18 @@ class SfDocumentsComponent {
941
1040
  this.dynamicValues[key] = null;
942
1041
  }
943
1042
  }
944
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, deps: [{ token: i1.DomSanitizer }, { token: i2$2.DialogService }, { token: i3$1.MessageService }, { token: i0.ApplicationRef }, { token: i3$1.ConfirmationService }, { token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
945
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SfDocumentsComponent, isStandalone: true, selector: "app-sf-documents", inputs: { accion: "accion", entidad: "entidad", ndoc: "ndoc", tdoc: "tdoc", tipo: "tipo", Kasociada: "Kasociada", Producto: "Producto", Solicitud: "Solicitud", oSession: "oSession", perfilDocumentos: "perfilDocumentos", subestado: "subestado", isMobile: "isMobile", bAtras: "bAtras", bFinal: "bFinal", botones: "botones", aplFiltro: "aplFiltro", nmco: "nmco", useBreadcrumb: "useBreadcrumb", usesApi: "usesApi", server: "server", idKatios: "idKatios" }, outputs: { nextTabPapa: "nextTabPapa", onNavigationChange: "onNavigationChange" }, providers: [DialogService, ConfirmationService], viewQueries: [{ propertyName: "panel", first: true, predicate: ["pdf"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div class=\"sf-doc-layout\">\r\n <div class=\"sf-doc-fixed\">\r\n <div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n <!-- Toolbar superior (solo tab 1) -->\r\n <div *ngIf=\"tab==1\" class=\"doc-toolbar\">\r\n <div class=\"doc-toolbar-left\" *ngIf=\"aplFiltro\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Buscar carpeta...\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"(documentTypes.length > 0)\" >\r\n <button pButton type=\"button\"\r\n label=\"Generar documento\"\r\n icon=\"pi pi-plus\"\r\n class=\"p-button-sm\"\r\n (click)=\"openGenerateDialog()\"\r\n [disabled]=\"enProceso || !canGenerate\">\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n <div class=\"sf-doc-scrollable\" *ngIf=\"tab==1\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\">\r\n <div class=\"folder-list\">\r\n <div class=\"folder-item\" *ngFor=\"let item of carpeta.children\" (click)=\"VerDetalleTab(item)\">\r\n <i class=\"pi pi-folder folder-item__icon\" [ngStyle]=\"{'color': (item.children?.length > 0 || item.fileCount > 0) ? 'green':'red' }\"></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{item.label}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"item.children?.length > 0\">{{item.children.length}} {{item.children.length === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"(!item.children || item.children.length === 0) && item.fileCount\">{{item.fileCount}} {{item.fileCount === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"(!item.children || item.children.length === 0) && !item.fileCount\">0 archivos</span>\r\n </div>\r\n <i class=\"pi pi-chevron-right folder-item__arrow\"></i>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"botones\">\r\n <div class=\"buttons\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"sf-doc-scrollable sf-doc-scrollable--files\" *ngIf=\"tab==2\">\r\n <lib-folder-files\r\n [carpeta]=\"carpetaSeleccionada\"\r\n [isMobile]=\"isMobile\"\r\n [idKatios]=\"idKatios\"\r\n [server]=\"server\"\r\n [subestado]=\"subestado\"\r\n [requestData]=\"requestData\"\r\n [useBreadcrumb]=\"useBreadcrumb\"\r\n [usesApi]=\"usesApi\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onOpenVisorDoc)=\"openVisorDoc($event)\"\r\n (onOpenNewWindow)=\"openNewWindow($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\">\r\n </lib-folder-files>\r\n </div>\r\n</div>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n<p-dialog header=\"Generar documento\"\r\n [(visible)]=\"displayGenerate\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [style]=\"{width: isMobile ? '95vw' : '520px'}\">\r\n\r\n <div class=\"gen-form\">\r\n <!-- Tipo de documento -->\r\n <div class=\"gen-field\">\r\n <label class=\"gen-label\">Tipo de documento</label>\r\n <p-dropdown\r\n class=\"gen-control\"\r\n [options]=\"documentTypes\"\r\n optionLabel=\"label\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDocType\"\r\n placeholder=\"Seleccione un tipo\"\r\n appendTo=\"body\"\r\n (onChange)=\"onDocTypeChange()\">\r\n </p-dropdown>\r\n </div>\r\n\r\n <!-- Par\u00E1metros din\u00E1micos -->\r\n <div class=\"gen-section\" *ngIf=\"dynamicParams.length\">\r\n <div class=\"gen-field\" *ngFor=\"let p of dynamicParams\">\r\n <label class=\"gen-label\">\r\n {{ p.description }}\r\n <span class=\"gen-required\" *ngIf=\"p.required\">*</span>\r\n </label>\r\n\r\n <!-- Date -->\r\n <p-datepicker\r\n *ngIf=\"(p.type || '').toLowerCase() === 'date'\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n [showIcon]=\"true\"\r\n appendTo=\"body\"\r\n dateFormat=\"yy-mm-dd\">\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"(p.type || '').toLowerCase() === 'nvarchar' || (p.type || '').toLowerCase() === 'string'\"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\" />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"['int','decimal','number'].includes((p.type || '').toLowerCase())\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n >\r\n </p-inputNumber>\r\n\r\n <!-- Boolean -->\r\n <div class=\"gen-control gen-checkbox\"\r\n *ngIf=\"['boolean','bit','bool'].includes((p.type || '').toLowerCase())\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-checkbox>\r\n <span class=\"gen-checkbox-label\">S\u00ED</span>\r\n </div>\r\n\r\n <!-- helper opcional -->\r\n <small class=\"gen-help\" *ngIf=\"p.help\">{{ p.help }}</small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button pButton type=\"button\" label=\"Cancelar\" class=\"p-button-text\"\r\n (click)=\"displayGenerate=false\"></button>\r\n\r\n <button pButton type=\"button\" label=\"Generar\" icon=\"pi pi-cog\"\r\n (click)=\"generateDocument()\"\r\n [disabled]=\"!selectedDocType || enProceso\">\r\n </button>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-fixed{flex-shrink:0}.sf-doc-scrollable{flex:1;min-height:0;overflow-y:auto}.sf-doc-scrollable--files{overflow:hidden;display:flex;flex-direction:column}:host ::ng-deep .sf-doc-scrollable--files>lib-folder-files{flex:1;min-height:0}.iconWhatsApp{font-size:40px;color:#6495ed}.doc-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:.5rem}:host ::ng-deep .doc-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.doc-toolbar-left{flex:1;min-width:180px}.doc-toolbar-right{display:flex;justify-content:flex-end}:host ::ng-deep .doc-toolbar-right .p-button-outlined{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px}:host ::ng-deep .doc-toolbar-right .p-button-outlined:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .doc-toolbar-right .p-button-outlined:disabled{opacity:.5}@media only screen and (max-width: 656px),(max-device-width: 656px){.doc-toolbar{flex-direction:column;align-items:stretch}.doc-toolbar-right{justify-content:stretch}.doc-toolbar-right button{width:100%}}.folder-list{display:flex;flex-direction:column}.folder-item{display:flex;align-items:center;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.folder-item:hover{background-color:#f9fafb}.folder-item:last-child{border-bottom:1px solid #e5e7eb}.folder-item__icon{font-size:18px;color:#6b7280;margin-right:12px;flex-shrink:0}.folder-item__info{display:flex;flex-direction:column;flex:1;min-width:0}.folder-item__name{font-size:13.5px;font-weight:500;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.folder-item__count{font-size:12px;color:#9ca3af;margin-top:1px}.folder-item__arrow{font-size:13px;color:#9ca3af;margin-left:12px;flex-shrink:0}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}.gen-form{display:flex;flex-direction:column;gap:14px}.gen-section{display:flex;flex-direction:column;gap:12px}.gen-field{display:flex;flex-direction:column;gap:6px}.gen-label{font-size:13px;font-weight:600;color:#111827}.gen-required{color:#ef4444;margin-left:4px}.gen-control{width:100%}:host ::ng-deep .gen-control .p-dropdown,:host ::ng-deep .gen-control .p-inputtext,:host ::ng-deep .gen-control .p-inputnumber,:host ::ng-deep .gen-control .p-datepicker{width:100%}:host ::ng-deep .gen-control .p-inputnumber-input{width:100%}.gen-checkbox{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}.gen-checkbox-label{font-size:14px;color:#374151}.gen-help{color:#6b7280}\n"], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i6$1.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "ngmodule", type: PanelModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: FolderFilesComponent, selector: "lib-folder-files", inputs: ["carpeta", "isMobile", "idKatios", "server", "subestado", "requestData", "useBreadcrumb", "usesApi"], outputs: ["onFileChange", "onCargarArchivo", "onEliminarMasivo", "onOpenVisorDoc", "onOpenNewWindow", "onBack"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i12.Dropdown, selector: "p-dropdown", 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", "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: DatePickerModule }, { kind: "component", type: i13.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"] }] });
1043
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SfDocumentsComponent, deps: [{ token: i1.DomSanitizer }, { token: i2$1.DialogService }, { token: i3$1.MessageService }, { token: i0.ApplicationRef }, { token: i3$1.ConfirmationService }, { token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
1044
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: SfDocumentsComponent, isStandalone: true, selector: "app-sf-documents", inputs: { accion: "accion", entidad: "entidad", ndoc: "ndoc", tdoc: "tdoc", tipo: "tipo", Kasociada: "Kasociada", Producto: "Producto", Solicitud: "Solicitud", oSession: "oSession", perfilDocumentos: "perfilDocumentos", subestado: "subestado", isMobile: "isMobile", bAtras: "bAtras", bFinal: "bFinal", botones: "botones", aplFiltro: "aplFiltro", nmco: "nmco", useBreadcrumb: "useBreadcrumb", usesApi: "usesApi", server: "server", idKatios: "idKatios" }, outputs: { nextTabPapa: "nextTabPapa", onNavigationChange: "onNavigationChange" }, providers: [DialogService, ConfirmationService], viewQueries: [{ propertyName: "panel", first: true, predicate: ["pdf"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div class=\"sf-doc-layout\">\r\n <div class=\"sf-doc-fixed\">\r\n <div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n <!-- Toolbar superior (solo tab 1) -->\r\n <div *ngIf=\"tab==1\" class=\"doc-toolbar\">\r\n <div class=\"doc-toolbar-left\" *ngIf=\"aplFiltro\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Buscar carpeta...\" [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\" class=\"w-full\" [disabled]=\"documentService.loadingData\">\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"(documentTypes.length > 0)\">\r\n <button pButton type=\"button\" label=\"Generar documento\" icon=\"pi pi-plus\" class=\"p-button-sm\"\r\n (click)=\"openGenerateDialog()\" [disabled]=\"enProceso || !canGenerate\">\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n <div class=\"sf-doc-scrollable\" *ngIf=\"tab==1\">\r\n <div class=\"folder-list\">\r\n @if(!documentService.loadingData){\r\n <ng-container *ngFor=\"let carpeta of filesFilter\">\r\n <div class=\"folder-list\">\r\n <div class=\"folder-item\" *ngFor=\"let item of carpeta.children\" (click)=\"VerDetalleTab(item)\">\r\n <i class=\"pi pi-folder folder-item__icon\"\r\n [ngStyle]=\"{'color': (item.children?.length > 0 || item.fileCount > 0) ? 'green':'red' }\"></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{item.label}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"item.children?.length > 0\">{{item.children.length}}\r\n {{item.children.length === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\"\r\n *ngIf=\"(!item.children || item.children.length === 0) && item.fileCount\">{{item.fileCount}}\r\n {{item.fileCount === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\"\r\n *ngIf=\"(!item.children || item.children.length === 0) && !item.fileCount\">0\r\n archivos</span>\r\n </div>\r\n <i class=\"pi pi-chevron-right folder-item__arrow\"></i>\r\n </div>\r\n </div>\r\n </ng-container>\r\n }\r\n @else{\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <ng-container *ngIf=\"botones\">\r\n <div class=\"buttons\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"sf-doc-scrollable sf-doc-scrollable--files\" *ngIf=\"tab==2\">\r\n <lib-folder-files [carpeta]=\"carpetaSeleccionada\" [isMobile]=\"isMobile\" [idKatios]=\"idKatios\" [server]=\"server\"\r\n [subestado]=\"subestado\" [requestData]=\"requestData\" [useBreadcrumb]=\"useBreadcrumb\" [usesApi]=\"usesApi\"\r\n (onFileChange)=\"fileChange($event)\" (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onOpenVisorDoc)=\"openVisorDoc($event)\" (onOpenNewWindow)=\"openNewWindow($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\" (onBack)=\"goToTab('1')\">\r\n </lib-folder-files>\r\n </div>\r\n</div>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <div *ngIf=\"isCurrentExcel()\" class=\"sf-doc-excel-fallback\">\r\n <i class=\"pi pi-file-excel\"></i>\r\n <p>La vista previa no est\u00E1 disponible para archivos de Excel.</p>\r\n <button pButton type=\"button\" label=\"Abrir en una nueva ventana\" icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"></button>\r\n </div>\r\n <ng-container *ngIf=\"!isCurrentExcel()\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n </ng-container>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div>\r\n <div *ngIf=\"isCurrentExcel()\" class=\"sf-doc-excel-fallback\">\r\n <i class=\"pi pi-file-excel\"></i>\r\n <p>La vista previa no est\u00E1 disponible para archivos de Excel.</p>\r\n <button pButton type=\"button\" label=\"Abrir en una nueva ventana\" icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"></button>\r\n </div>\r\n <ng-container *ngIf=\"!isCurrentExcel()\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n<p-dialog header=\"Generar documento\" [(visible)]=\"displayGenerate\" [modal]=\"true\" [closable]=\"true\"\r\n [style]=\"{width: isMobile ? '95vw' : '520px'}\">\r\n\r\n <div class=\"gen-form\">\r\n <!-- Tipo de documento -->\r\n <div class=\"gen-field\">\r\n <label class=\"gen-label\">Tipo de documento</label>\r\n <p-dropdown class=\"gen-control\" [options]=\"documentTypes\" optionLabel=\"label\" optionValue=\"code\"\r\n [(ngModel)]=\"selectedDocType\" placeholder=\"Seleccione un tipo\" appendTo=\"body\" (onChange)=\"onDocTypeChange()\">\r\n </p-dropdown>\r\n </div>\r\n\r\n <!-- Par\u00E1metros din\u00E1micos -->\r\n <div class=\"gen-section\" *ngIf=\"dynamicParams.length\">\r\n <div class=\"gen-field\" *ngFor=\"let p of dynamicParams\">\r\n <label class=\"gen-label\">\r\n {{ p.description }}\r\n <span class=\"gen-required\" *ngIf=\"p.required\">*</span>\r\n </label>\r\n\r\n <!-- Date -->\r\n <p-datepicker *ngIf=\"(p.type || '').toLowerCase() === 'date'\" class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\" [showIcon]=\"true\" appendTo=\"body\" dateFormat=\"yy-mm-dd\">\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input *ngIf=\"(p.type || '').toLowerCase() === 'nvarchar' || (p.type || '').toLowerCase() === 'string'\"\r\n pInputText class=\"gen-control\" [(ngModel)]=\"dynamicValues[p.name]\" placeholder=\"Ingrese un valor\" />\r\n\r\n <!-- Number -->\r\n <p-inputNumber *ngIf=\"['int','decimal','number'].includes((p.type || '').toLowerCase())\" class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-inputNumber>\r\n\r\n <!-- Boolean -->\r\n <div class=\"gen-control gen-checkbox\" *ngIf=\"['boolean','bit','bool'].includes((p.type || '').toLowerCase())\">\r\n <p-checkbox [binary]=\"true\" [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-checkbox>\r\n <span class=\"gen-checkbox-label\">S\u00ED</span>\r\n </div>\r\n\r\n <!-- helper opcional -->\r\n <small class=\"gen-help\" *ngIf=\"p.help\">{{ p.help }}</small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button pButton type=\"button\" label=\"Cancelar\" class=\"p-button-text\" (click)=\"displayGenerate=false\"></button>\r\n\r\n <button pButton type=\"button\" label=\"Generar\" icon=\"pi pi-cog\" (click)=\"generateDocument()\"\r\n [disabled]=\"!selectedDocType || enProceso\">\r\n </button>\r\n </ng-template>\r\n</p-dialog>", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-fixed{flex-shrink:0}.sf-doc-scrollable{flex:1;min-height:0;overflow-y:auto}.sf-doc-scrollable--files{overflow:hidden;display:flex;flex-direction:column}:host ::ng-deep .sf-doc-scrollable--files>lib-folder-files{flex:1;min-height:0}.iconWhatsApp{font-size:40px;color:#6495ed}.doc-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:.5rem}:host ::ng-deep .doc-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.doc-toolbar-left{flex:1;min-width:180px}.doc-toolbar-right{display:flex;justify-content:flex-end}:host ::ng-deep .doc-toolbar-right .p-button-outlined{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px}:host ::ng-deep .doc-toolbar-right .p-button-outlined:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .doc-toolbar-right .p-button-outlined:disabled{opacity:.5}@media only screen and (max-width: 656px),(max-device-width: 656px){.doc-toolbar{flex-direction:column;align-items:stretch}.doc-toolbar-right{justify-content:stretch}.doc-toolbar-right button{width:100%}}.folder-list{display:flex;flex-direction:column}.folder-item{display:flex;align-items:center;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.folder-item:hover{background-color:#f9fafb}.folder-item:last-child{border-bottom:1px solid #e5e7eb}.folder-item__icon{font-size:18px;color:#6b7280;margin-right:12px;flex-shrink:0}.folder-item__info{display:flex;flex-direction:column;flex:1;min-width:0}.folder-item__name{font-size:13.5px;font-weight:500;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.folder-item__count{font-size:12px;color:#9ca3af;margin-top:1px}.folder-item__arrow{font-size:13px;color:#9ca3af;margin-left:12px;flex-shrink:0}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.sf-doc-excel-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:300px;text-align:center;color:#374151}.sf-doc-excel-fallback i{font-size:48px;color:#1d6f42}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}.gen-form{display:flex;flex-direction:column;gap:14px}.gen-section{display:flex;flex-direction:column;gap:12px}.gen-field{display:flex;flex-direction:column;gap:6px}.gen-label{font-size:13px;font-weight:600;color:#111827}.gen-required{color:#ef4444;margin-left:4px}.gen-control{width:100%}:host ::ng-deep .gen-control .p-dropdown,:host ::ng-deep .gen-control .p-inputtext,:host ::ng-deep .gen-control .p-inputnumber,:host ::ng-deep .gen-control .p-datepicker{width:100%}:host ::ng-deep .gen-control .p-inputnumber-input{width:100%}.gen-checkbox{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}.gen-checkbox-label{font-size:14px;color:#374151}.gen-help{color:#6b7280}\n"], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i6$1.ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "ngmodule", type: PanelModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i9.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i9.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: FolderFilesComponent, selector: "lib-folder-files", inputs: ["carpeta", "isMobile", "idKatios", "server", "subestado", "requestData", "useBreadcrumb", "usesApi"], outputs: ["onFileChange", "onCargarArchivo", "onEliminarMasivo", "onOpenVisorDoc", "onOpenNewWindow", "onBack"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i12.Dropdown, selector: "p-dropdown", 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", "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: DatePickerModule }, { kind: "component", type: i13.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: SkeletonModule }, { kind: "component", type: i14.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
946
1045
  }
947
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, decorators: [{
1046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SfDocumentsComponent, decorators: [{
948
1047
  type: Component,
949
1048
  args: [{ selector: 'app-sf-documents', imports: [
950
1049
  ToastModule, ButtonModule, ConfirmDialogModule, PanelModule, CheckboxModule,
951
1050
  DialogModule, CommonModule, FormsModule, SafePipe, InputTextModule, InputIcon,
952
1051
  IconField, FolderFilesComponent,
953
- DropdownModule, DatePickerModule
954
- ], providers: [DialogService, ConfirmationService], standalone: true, template: "<div class=\"sf-doc-layout\">\r\n <div class=\"sf-doc-fixed\">\r\n <div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n <!-- Toolbar superior (solo tab 1) -->\r\n <div *ngIf=\"tab==1\" class=\"doc-toolbar\">\r\n <div class=\"doc-toolbar-left\" *ngIf=\"aplFiltro\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Buscar carpeta...\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\">\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"(documentTypes.length > 0)\" >\r\n <button pButton type=\"button\"\r\n label=\"Generar documento\"\r\n icon=\"pi pi-plus\"\r\n class=\"p-button-sm\"\r\n (click)=\"openGenerateDialog()\"\r\n [disabled]=\"enProceso || !canGenerate\">\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n <div class=\"sf-doc-scrollable\" *ngIf=\"tab==1\">\r\n <ng-container *ngFor=\"let carpeta of filesFilter\">\r\n <div class=\"folder-list\">\r\n <div class=\"folder-item\" *ngFor=\"let item of carpeta.children\" (click)=\"VerDetalleTab(item)\">\r\n <i class=\"pi pi-folder folder-item__icon\" [ngStyle]=\"{'color': (item.children?.length > 0 || item.fileCount > 0) ? 'green':'red' }\"></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{item.label}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"item.children?.length > 0\">{{item.children.length}} {{item.children.length === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"(!item.children || item.children.length === 0) && item.fileCount\">{{item.fileCount}} {{item.fileCount === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"(!item.children || item.children.length === 0) && !item.fileCount\">0 archivos</span>\r\n </div>\r\n <i class=\"pi pi-chevron-right folder-item__arrow\"></i>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"botones\">\r\n <div class=\"buttons\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"sf-doc-scrollable sf-doc-scrollable--files\" *ngIf=\"tab==2\">\r\n <lib-folder-files\r\n [carpeta]=\"carpetaSeleccionada\"\r\n [isMobile]=\"isMobile\"\r\n [idKatios]=\"idKatios\"\r\n [server]=\"server\"\r\n [subestado]=\"subestado\"\r\n [requestData]=\"requestData\"\r\n [useBreadcrumb]=\"useBreadcrumb\"\r\n [usesApi]=\"usesApi\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onOpenVisorDoc)=\"openVisorDoc($event)\"\r\n (onOpenNewWindow)=\"openNewWindow($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\">\r\n </lib-folder-files>\r\n </div>\r\n</div>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div>\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n<p-dialog header=\"Generar documento\"\r\n [(visible)]=\"displayGenerate\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [style]=\"{width: isMobile ? '95vw' : '520px'}\">\r\n\r\n <div class=\"gen-form\">\r\n <!-- Tipo de documento -->\r\n <div class=\"gen-field\">\r\n <label class=\"gen-label\">Tipo de documento</label>\r\n <p-dropdown\r\n class=\"gen-control\"\r\n [options]=\"documentTypes\"\r\n optionLabel=\"label\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDocType\"\r\n placeholder=\"Seleccione un tipo\"\r\n appendTo=\"body\"\r\n (onChange)=\"onDocTypeChange()\">\r\n </p-dropdown>\r\n </div>\r\n\r\n <!-- Par\u00E1metros din\u00E1micos -->\r\n <div class=\"gen-section\" *ngIf=\"dynamicParams.length\">\r\n <div class=\"gen-field\" *ngFor=\"let p of dynamicParams\">\r\n <label class=\"gen-label\">\r\n {{ p.description }}\r\n <span class=\"gen-required\" *ngIf=\"p.required\">*</span>\r\n </label>\r\n\r\n <!-- Date -->\r\n <p-datepicker\r\n *ngIf=\"(p.type || '').toLowerCase() === 'date'\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n [showIcon]=\"true\"\r\n appendTo=\"body\"\r\n dateFormat=\"yy-mm-dd\">\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"(p.type || '').toLowerCase() === 'nvarchar' || (p.type || '').toLowerCase() === 'string'\"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\" />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"['int','decimal','number'].includes((p.type || '').toLowerCase())\"\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n >\r\n </p-inputNumber>\r\n\r\n <!-- Boolean -->\r\n <div class=\"gen-control gen-checkbox\"\r\n *ngIf=\"['boolean','bit','bool'].includes((p.type || '').toLowerCase())\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-checkbox>\r\n <span class=\"gen-checkbox-label\">S\u00ED</span>\r\n </div>\r\n\r\n <!-- helper opcional -->\r\n <small class=\"gen-help\" *ngIf=\"p.help\">{{ p.help }}</small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button pButton type=\"button\" label=\"Cancelar\" class=\"p-button-text\"\r\n (click)=\"displayGenerate=false\"></button>\r\n\r\n <button pButton type=\"button\" label=\"Generar\" icon=\"pi pi-cog\"\r\n (click)=\"generateDocument()\"\r\n [disabled]=\"!selectedDocType || enProceso\">\r\n </button>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-fixed{flex-shrink:0}.sf-doc-scrollable{flex:1;min-height:0;overflow-y:auto}.sf-doc-scrollable--files{overflow:hidden;display:flex;flex-direction:column}:host ::ng-deep .sf-doc-scrollable--files>lib-folder-files{flex:1;min-height:0}.iconWhatsApp{font-size:40px;color:#6495ed}.doc-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:.5rem}:host ::ng-deep .doc-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.doc-toolbar-left{flex:1;min-width:180px}.doc-toolbar-right{display:flex;justify-content:flex-end}:host ::ng-deep .doc-toolbar-right .p-button-outlined{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px}:host ::ng-deep .doc-toolbar-right .p-button-outlined:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .doc-toolbar-right .p-button-outlined:disabled{opacity:.5}@media only screen and (max-width: 656px),(max-device-width: 656px){.doc-toolbar{flex-direction:column;align-items:stretch}.doc-toolbar-right{justify-content:stretch}.doc-toolbar-right button{width:100%}}.folder-list{display:flex;flex-direction:column}.folder-item{display:flex;align-items:center;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.folder-item:hover{background-color:#f9fafb}.folder-item:last-child{border-bottom:1px solid #e5e7eb}.folder-item__icon{font-size:18px;color:#6b7280;margin-right:12px;flex-shrink:0}.folder-item__info{display:flex;flex-direction:column;flex:1;min-width:0}.folder-item__name{font-size:13.5px;font-weight:500;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.folder-item__count{font-size:12px;color:#9ca3af;margin-top:1px}.folder-item__arrow{font-size:13px;color:#9ca3af;margin-left:12px;flex-shrink:0}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}.gen-form{display:flex;flex-direction:column;gap:14px}.gen-section{display:flex;flex-direction:column;gap:12px}.gen-field{display:flex;flex-direction:column;gap:6px}.gen-label{font-size:13px;font-weight:600;color:#111827}.gen-required{color:#ef4444;margin-left:4px}.gen-control{width:100%}:host ::ng-deep .gen-control .p-dropdown,:host ::ng-deep .gen-control .p-inputtext,:host ::ng-deep .gen-control .p-inputnumber,:host ::ng-deep .gen-control .p-datepicker{width:100%}:host ::ng-deep .gen-control .p-inputnumber-input{width:100%}.gen-checkbox{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}.gen-checkbox-label{font-size:14px;color:#374151}.gen-help{color:#6b7280}\n"] }]
955
- }], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i2$2.DialogService }, { type: i3$1.MessageService }, { type: i0.ApplicationRef }, { type: i3$1.ConfirmationService }, { type: SfDocumentsService }], propDecorators: { accion: [{
1052
+ DropdownModule, DatePickerModule, SkeletonModule
1053
+ ], providers: [DialogService, ConfirmationService], standalone: true, template: "<div class=\"sf-doc-layout\">\r\n <div class=\"sf-doc-fixed\">\r\n <div class=\"buttons\" *ngIf=\"botones\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n <!-- Toolbar superior (solo tab 1) -->\r\n <div *ngIf=\"tab==1\" class=\"doc-toolbar\">\r\n <div class=\"doc-toolbar-left\" *ngIf=\"aplFiltro\">\r\n <p-iconfield>\r\n <p-inputicon class=\"pi pi-search\" />\r\n <input type=\"text\" pInputText placeholder=\"Buscar carpeta...\" [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\" class=\"w-full\" [disabled]=\"documentService.loadingData\">\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"(documentTypes.length > 0)\">\r\n <button pButton type=\"button\" label=\"Generar documento\" icon=\"pi pi-plus\" class=\"p-button-sm\"\r\n (click)=\"openGenerateDialog()\" [disabled]=\"enProceso || !canGenerate\">\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <p-confirmDialog header=\"Atencion\" icon=\"pi pi-exclamation-triangle\"></p-confirmDialog>\r\n <div class=\"sf-doc-scrollable\" *ngIf=\"tab==1\">\r\n <div class=\"folder-list\">\r\n @if(!documentService.loadingData){\r\n <ng-container *ngFor=\"let carpeta of filesFilter\">\r\n <div class=\"folder-list\">\r\n <div class=\"folder-item\" *ngFor=\"let item of carpeta.children\" (click)=\"VerDetalleTab(item)\">\r\n <i class=\"pi pi-folder folder-item__icon\"\r\n [ngStyle]=\"{'color': (item.children?.length > 0 || item.fileCount > 0) ? 'green':'red' }\"></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{item.label}}</span>\r\n <span class=\"folder-item__count\" *ngIf=\"item.children?.length > 0\">{{item.children.length}}\r\n {{item.children.length === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\"\r\n *ngIf=\"(!item.children || item.children.length === 0) && item.fileCount\">{{item.fileCount}}\r\n {{item.fileCount === 1 ? 'archivo' : 'archivos'}}</span>\r\n <span class=\"folder-item__count\"\r\n *ngIf=\"(!item.children || item.children.length === 0) && !item.fileCount\">0\r\n archivos</span>\r\n </div>\r\n <i class=\"pi pi-chevron-right folder-item__arrow\"></i>\r\n </div>\r\n </div>\r\n </ng-container>\r\n }\r\n @else{\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n <div class=\"folder-item\">\r\n <p-skeleton shape=\"circle\" size=\"2rem\" styleClass=\"mr-2\" />\r\n <div class=\"self-center\" style=\"flex: 1\">\r\n <p-skeleton width=\"100%\" styleClass=\"mb-2\" />\r\n <p-skeleton width=\"75%\" />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n <ng-container *ngIf=\"botones\">\r\n <div class=\"buttons\">\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"bAtras\">\r\n <button pButton type=\"button\" label=\"Atras\" icon=\"pi pi-arrow-left\" (click)=\"next(-1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" style=\"text-align: center\" *ngIf=\"!bFinal && botones\">\r\n <button pButton type=\"button\" label=\"Siguiente\" icon=\"pi pi-arrow-right\" (click)=\"next(1)\"></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button pButton type=\"button\" label=\"Finalizar\" icon=\"pi pi-home\" (click)=\"next(0)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"sf-doc-scrollable sf-doc-scrollable--files\" *ngIf=\"tab==2\">\r\n <lib-folder-files [carpeta]=\"carpetaSeleccionada\" [isMobile]=\"isMobile\" [idKatios]=\"idKatios\" [server]=\"server\"\r\n [subestado]=\"subestado\" [requestData]=\"requestData\" [useBreadcrumb]=\"useBreadcrumb\" [usesApi]=\"usesApi\"\r\n (onFileChange)=\"fileChange($event)\" (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onOpenVisorDoc)=\"openVisorDoc($event)\" (onOpenNewWindow)=\"openNewWindow($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\" (onBack)=\"goToTab('1')\">\r\n </lib-folder-files>\r\n </div>\r\n</div>\r\n\r\n<p-dialog *ngIf=\"displayPDF\" [(visible)]=\"displayPDF\"\r\n header=\"{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\" [modal]=\"true\" [style]=\"{width: '70vw'}\">\r\n <div *ngIf=\"isCurrentExcel()\" class=\"sf-doc-excel-fallback\">\r\n <i class=\"pi pi-file-excel\"></i>\r\n <p>La vista previa no est\u00E1 disponible para archivos de Excel.</p>\r\n <button pButton type=\"button\" label=\"Abrir en una nueva ventana\" icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"></button>\r\n </div>\r\n <ng-container *ngIf=\"!isCurrentExcel()\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n </ng-container>\r\n</p-dialog>\r\n\r\n\r\n<ng-template #pdfContent>\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\" id=\"modal-basic-title\">{{current_label.replace('#toolbar=0&navpanes=0&statusbar=0','')}}\r\n </h4>\r\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalReference?.close()\">\r\n <span aria-hidden=\"true\">&times;</span>\r\n </button>\r\n </div>\r\n <div>\r\n <div *ngIf=\"isCurrentExcel()\" class=\"sf-doc-excel-fallback\">\r\n <i class=\"pi pi-file-excel\"></i>\r\n <p>La vista previa no est\u00E1 disponible para archivos de Excel.</p>\r\n <button pButton type=\"button\" label=\"Abrir en una nueva ventana\" icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"></button>\r\n </div>\r\n <ng-container *ngIf=\"!isCurrentExcel()\">\r\n <embed *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\" [src]=\"current_path | safe\"\r\n style=\"width:100%; min-height: 600px\">\r\n <iframe *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\" style=\"width:100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"></iframe>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- <ng-template #scanContent>\r\n <div class=\"div-table\">\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <h4>Escanear documentos</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n Archivos cargados: <h4>{{scanFileList.length}}</h4>\r\n </div>\r\n <div class=\"div-table-row\" style=\"text-align: center\">\r\n <label (click)=\"takePhotoClick()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">add_to_photos</mat-icon>\r\n </label>\r\n\r\n <label *ngIf=\"scanFileList.length != 0\" (click)=\"subirFotosScan()\" class=\"btn\">\r\n <mat-icon style=\"font-size: 2.5em; color:#0056b2\">share</mat-icon>\r\n </label>\r\n </div>\r\n </div>\r\n</ng-template> -->\r\n<p-dialog header=\"Generar documento\" [(visible)]=\"displayGenerate\" [modal]=\"true\" [closable]=\"true\"\r\n [style]=\"{width: isMobile ? '95vw' : '520px'}\">\r\n\r\n <div class=\"gen-form\">\r\n <!-- Tipo de documento -->\r\n <div class=\"gen-field\">\r\n <label class=\"gen-label\">Tipo de documento</label>\r\n <p-dropdown class=\"gen-control\" [options]=\"documentTypes\" optionLabel=\"label\" optionValue=\"code\"\r\n [(ngModel)]=\"selectedDocType\" placeholder=\"Seleccione un tipo\" appendTo=\"body\" (onChange)=\"onDocTypeChange()\">\r\n </p-dropdown>\r\n </div>\r\n\r\n <!-- Par\u00E1metros din\u00E1micos -->\r\n <div class=\"gen-section\" *ngIf=\"dynamicParams.length\">\r\n <div class=\"gen-field\" *ngFor=\"let p of dynamicParams\">\r\n <label class=\"gen-label\">\r\n {{ p.description }}\r\n <span class=\"gen-required\" *ngIf=\"p.required\">*</span>\r\n </label>\r\n\r\n <!-- Date -->\r\n <p-datepicker *ngIf=\"(p.type || '').toLowerCase() === 'date'\" class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\" [showIcon]=\"true\" appendTo=\"body\" dateFormat=\"yy-mm-dd\">\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input *ngIf=\"(p.type || '').toLowerCase() === 'nvarchar' || (p.type || '').toLowerCase() === 'string'\"\r\n pInputText class=\"gen-control\" [(ngModel)]=\"dynamicValues[p.name]\" placeholder=\"Ingrese un valor\" />\r\n\r\n <!-- Number -->\r\n <p-inputNumber *ngIf=\"['int','decimal','number'].includes((p.type || '').toLowerCase())\" class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-inputNumber>\r\n\r\n <!-- Boolean -->\r\n <div class=\"gen-control gen-checkbox\" *ngIf=\"['boolean','bit','bool'].includes((p.type || '').toLowerCase())\">\r\n <p-checkbox [binary]=\"true\" [(ngModel)]=\"dynamicValues[p.name]\">\r\n </p-checkbox>\r\n <span class=\"gen-checkbox-label\">S\u00ED</span>\r\n </div>\r\n\r\n <!-- helper opcional -->\r\n <small class=\"gen-help\" *ngIf=\"p.help\">{{ p.help }}</small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button pButton type=\"button\" label=\"Cancelar\" class=\"p-button-text\" (click)=\"displayGenerate=false\"></button>\r\n\r\n <button pButton type=\"button\" label=\"Generar\" icon=\"pi pi-cog\" (click)=\"generateDocument()\"\r\n [disabled]=\"!selectedDocType || enProceso\">\r\n </button>\r\n </ng-template>\r\n</p-dialog>", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-layout{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.sf-doc-fixed{flex-shrink:0}.sf-doc-scrollable{flex:1;min-height:0;overflow-y:auto}.sf-doc-scrollable--files{overflow:hidden;display:flex;flex-direction:column}:host ::ng-deep .sf-doc-scrollable--files>lib-folder-files{flex:1;min-height:0}.iconWhatsApp{font-size:40px;color:#6495ed}.doc-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:.5rem}:host ::ng-deep .doc-toolbar .p-inputtext{padding:.45rem .65rem .45rem 2.5rem;font-size:13px}.doc-toolbar-left{flex:1;min-width:180px}.doc-toolbar-right{display:flex;justify-content:flex-end}:host ::ng-deep .doc-toolbar-right .p-button-outlined{background:transparent;border:1px solid #d1d5db;color:#374151;font-weight:500;font-size:13px}:host ::ng-deep .doc-toolbar-right .p-button-outlined:hover{background:#f9fafb;border-color:#9ca3af}:host ::ng-deep .doc-toolbar-right .p-button-outlined:disabled{opacity:.5}@media only screen and (max-width: 656px),(max-device-width: 656px){.doc-toolbar{flex-direction:column;align-items:stretch}.doc-toolbar-right{justify-content:stretch}.doc-toolbar-right button{width:100%}}.folder-list{display:flex;flex-direction:column}.folder-item{display:flex;align-items:center;padding:12px 8px;border-bottom:1px solid #e5e7eb;cursor:pointer;transition:background-color .15s ease}.folder-item:hover{background-color:#f9fafb}.folder-item:last-child{border-bottom:1px solid #e5e7eb}.folder-item__icon{font-size:18px;color:#6b7280;margin-right:12px;flex-shrink:0}.folder-item__info{display:flex;flex-direction:column;flex:1;min-width:0}.folder-item__name{font-size:13.5px;font-weight:500;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.folder-item__count{font-size:12px;color:#9ca3af;margin-top:1px}.folder-item__arrow{font-size:13px;color:#9ca3af;margin-left:12px;flex-shrink:0}.buttons{display:flex;justify-content:space-around;margin-block:15px}.frameDoc{overflow:hidden;border:none}.sf-doc-excel-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:300px;text-align:center;color:#374151}.sf-doc-excel-fallback i{font-size:48px;color:#1d6f42}.buttonResponsive,buttonResponsiveBotonFinal{display:inline-block;border-radius:4px;background-color:#00f;border:none;color:#fff;text-align:center;font-size:12px;padding:10px;width:200px;transition:all .5s;cursor:pointer;margin:20px 5px 5px}.gen-form{display:flex;flex-direction:column;gap:14px}.gen-section{display:flex;flex-direction:column;gap:12px}.gen-field{display:flex;flex-direction:column;gap:6px}.gen-label{font-size:13px;font-weight:600;color:#111827}.gen-required{color:#ef4444;margin-left:4px}.gen-control{width:100%}:host ::ng-deep .gen-control .p-dropdown,:host ::ng-deep .gen-control .p-inputtext,:host ::ng-deep .gen-control .p-inputnumber,:host ::ng-deep .gen-control .p-datepicker{width:100%}:host ::ng-deep .gen-control .p-inputnumber-input{width:100%}.gen-checkbox{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}.gen-checkbox-label{font-size:14px;color:#374151}.gen-help{color:#6b7280}\n"] }]
1054
+ }], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i2$1.DialogService }, { type: i3$1.MessageService }, { type: i0.ApplicationRef }, { type: i3$1.ConfirmationService }, { type: SfDocumentsService }], propDecorators: { accion: [{
956
1055
  type: Input
957
1056
  }], entidad: [{
958
1057
  type: Input