sf-documents 0.1.8 → 0.1.10
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.
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Pipe, InjectionToken, EventEmitter, ViewChild, Output, Input, Component, inject, ElementRef } from '@angular/core';
|
|
3
3
|
import { BehaviorSubject, Subject, of } from 'rxjs';
|
|
4
|
-
import * as i2
|
|
4
|
+
import * as i2 from 'primeng/api';
|
|
5
5
|
import { ConfirmationService } from 'primeng/api';
|
|
6
6
|
import { ToastModule } from 'primeng/toast';
|
|
7
7
|
import * as _ from 'lodash';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i3 from 'primeng/button';
|
|
9
9
|
import { ButtonModule } from 'primeng/button';
|
|
10
10
|
import * as i5$1 from 'primeng/confirmdialog';
|
|
11
11
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
12
12
|
import { PanelModule } from 'primeng/panel';
|
|
13
|
-
import * as i4 from 'primeng/checkbox';
|
|
13
|
+
import * as i4$1 from 'primeng/checkbox';
|
|
14
14
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
15
|
-
import * as
|
|
15
|
+
import * as i4 from 'primeng/dialog';
|
|
16
16
|
import { DialogModule } from 'primeng/dialog';
|
|
17
17
|
import * as i8 from '@angular/common';
|
|
18
18
|
import { CommonModule, registerLocaleData, DatePipe } from '@angular/common';
|
|
19
|
-
import * as i2 from '@angular/forms';
|
|
19
|
+
import * as i2$1 from '@angular/forms';
|
|
20
20
|
import { FormsModule } from '@angular/forms';
|
|
21
21
|
import * as i1 from '@angular/platform-browser';
|
|
22
22
|
import * as i5 from 'primeng/inputtext';
|
|
@@ -54,10 +54,10 @@ class SfDocumentsService {
|
|
|
54
54
|
return this._loadingData.getValue();
|
|
55
55
|
}
|
|
56
56
|
constructor() { }
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
58
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
58
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, providedIn: 'root' });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsService, decorators: [{
|
|
61
61
|
type: Injectable,
|
|
62
62
|
args: [{
|
|
63
63
|
providedIn: 'root'
|
|
@@ -72,10 +72,10 @@ class SafePipe {
|
|
|
72
72
|
transform(url) {
|
|
73
73
|
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
74
74
|
}
|
|
75
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
76
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
76
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SafePipe, isStandalone: true, name: "safe" });
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SafePipe, decorators: [{
|
|
79
79
|
type: Pipe,
|
|
80
80
|
args: [{ name: 'safe' }]
|
|
81
81
|
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
@@ -88,10 +88,12 @@ const DOCUMENT_SERVICE = new InjectionToken('DOCUMENT_SERVICE');
|
|
|
88
88
|
* decisión de negocio (qué tipos de documento se aceptan).
|
|
89
89
|
*/
|
|
90
90
|
const DEFAULT_ALLOWED_UPLOAD_EXTENSIONS = ['.pdf', '.xls', '.xlsx'];
|
|
91
|
+
const MAX_POR_ARCHIVO = 25 * 1024 * 1024; // 25 MB
|
|
92
|
+
const MAX_POR_LOTE = 100 * 1024 * 1024; // 100 MB
|
|
91
93
|
const MIME_TYPES_BY_EXTENSION = {
|
|
92
94
|
'.pdf': 'application/pdf',
|
|
93
95
|
'.xls': 'application/vnd.ms-excel',
|
|
94
|
-
'.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
96
|
+
'.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
95
97
|
};
|
|
96
98
|
/**
|
|
97
99
|
* Extensiones que el navegador puede renderizar inline dentro de un <embed>/<iframe>.
|
|
@@ -99,7 +101,16 @@ const MIME_TYPES_BY_EXTENSION = {
|
|
|
99
101
|
* decisión de negocio, así que la librería la conoce de antemano (evita que el host
|
|
100
102
|
* marque como "previsualizable" un tipo que en realidad nunca se va a renderizar).
|
|
101
103
|
*/
|
|
102
|
-
const PREVIEWABLE_EXTENSIONS = [
|
|
104
|
+
const PREVIEWABLE_EXTENSIONS = [
|
|
105
|
+
'.pdf',
|
|
106
|
+
'.jpg',
|
|
107
|
+
'.jpeg',
|
|
108
|
+
'.png',
|
|
109
|
+
'.gif',
|
|
110
|
+
'.webp',
|
|
111
|
+
'.bmp',
|
|
112
|
+
'.svg',
|
|
113
|
+
];
|
|
103
114
|
const ICON_BY_EXTENSION = {
|
|
104
115
|
'.pdf': 'pi-file-pdf',
|
|
105
116
|
'.xls': 'pi-file-excel',
|
|
@@ -112,31 +123,55 @@ const ICON_BY_EXTENSION = {
|
|
|
112
123
|
'.gif': 'pi-image',
|
|
113
124
|
'.webp': 'pi-image',
|
|
114
125
|
'.bmp': 'pi-image',
|
|
115
|
-
'.svg': 'pi-image'
|
|
126
|
+
'.svg': 'pi-image',
|
|
116
127
|
};
|
|
117
128
|
/** Normaliza una lista de extensiones dada por el host (con o sin punto, mayúsc/minúsc). */
|
|
118
129
|
function normalizeExtensions(extensions, fallback) {
|
|
119
130
|
const list = extensions && extensions.length ? extensions : fallback;
|
|
120
131
|
return list
|
|
121
|
-
.map(ext => ext.trim().toLowerCase())
|
|
122
|
-
.filter(ext => !!ext)
|
|
123
|
-
.map(ext => (ext.startsWith('.') ? ext : `.${ext}`));
|
|
132
|
+
.map((ext) => ext.trim().toLowerCase())
|
|
133
|
+
.filter((ext) => !!ext)
|
|
134
|
+
.map((ext) => (ext.startsWith('.') ? ext : `.${ext}`));
|
|
124
135
|
}
|
|
125
136
|
/** Arma el atributo `accept` del input file a partir de las extensiones permitidas. */
|
|
126
137
|
function buildAcceptAttr(extensions) {
|
|
127
|
-
const mimeTypes = extensions
|
|
138
|
+
const mimeTypes = extensions
|
|
139
|
+
.map((ext) => MIME_TYPES_BY_EXTENSION[ext])
|
|
140
|
+
.filter((m) => !!m);
|
|
128
141
|
return [...new Set([...mimeTypes, ...extensions])].join(',');
|
|
129
142
|
}
|
|
130
143
|
function hasExtension(fileName, extensions) {
|
|
131
144
|
if (!fileName)
|
|
132
145
|
return false;
|
|
133
146
|
const lower = fileName.toLowerCase();
|
|
134
|
-
return extensions.some(ext => lower.endsWith(ext));
|
|
147
|
+
return extensions.some((ext) => lower.endsWith(ext));
|
|
135
148
|
}
|
|
136
149
|
function isAllowedUploadFile(file, extensions) {
|
|
137
|
-
const mimeTypes = extensions
|
|
150
|
+
const mimeTypes = extensions
|
|
151
|
+
.map((ext) => MIME_TYPES_BY_EXTENSION[ext])
|
|
152
|
+
.filter((m) => !!m);
|
|
138
153
|
return mimeTypes.includes(file.type) || hasExtension(file.name, extensions);
|
|
139
154
|
}
|
|
155
|
+
/** Formatea un tamaño en bytes a MB con un decimal (ej. "12.3 MB"). */
|
|
156
|
+
function formatFileSizeMB(bytes) {
|
|
157
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
158
|
+
}
|
|
159
|
+
/** Tamaño total en bytes de un conjunto de archivos. */
|
|
160
|
+
function getBatchSize(files) {
|
|
161
|
+
return files.reduce((total, file) => total + file.size, 0);
|
|
162
|
+
}
|
|
163
|
+
/** Separa los archivos según superen o no el tamaño máximo permitido por archivo. */
|
|
164
|
+
function splitFilesByMaxSize(files, maxFileSize) {
|
|
165
|
+
const allowed = [];
|
|
166
|
+
const rejected = [];
|
|
167
|
+
files.forEach((file) => {
|
|
168
|
+
if (file.size > maxFileSize)
|
|
169
|
+
rejected.push({ name: file.name, size: file.size });
|
|
170
|
+
else
|
|
171
|
+
allowed.push(file);
|
|
172
|
+
});
|
|
173
|
+
return { allowed, rejected };
|
|
174
|
+
}
|
|
140
175
|
/** true si el navegador puede mostrar este archivo inline en un <embed>/<iframe>. */
|
|
141
176
|
function canPreviewFile(name) {
|
|
142
177
|
return hasExtension(name, PREVIEWABLE_EXTENSIONS);
|
|
@@ -146,24 +181,36 @@ function getFileTypeIcon(name) {
|
|
|
146
181
|
if (!name)
|
|
147
182
|
return 'pi-file';
|
|
148
183
|
const lower = name.toLowerCase();
|
|
149
|
-
const match = Object.keys(ICON_BY_EXTENSION).find(ext => lower.endsWith(ext));
|
|
184
|
+
const match = Object.keys(ICON_BY_EXTENSION).find((ext) => lower.endsWith(ext));
|
|
150
185
|
return match ? ICON_BY_EXTENSION[match] : 'pi-file';
|
|
151
186
|
}
|
|
152
187
|
|
|
153
188
|
class UploadDialogComponent {
|
|
189
|
+
messageService;
|
|
154
190
|
selectedDocument;
|
|
155
191
|
/** Extensiones permitidas para subir (ej. ['.pdf', '.xlsx']). Si no se define, usa el default de la librería. */
|
|
156
192
|
allowedExtensions;
|
|
157
193
|
onUploaded = new EventEmitter();
|
|
158
194
|
loadFile = new EventEmitter();
|
|
159
195
|
fileInput;
|
|
160
|
-
|
|
196
|
+
maxFileSize = MAX_POR_ARCHIVO;
|
|
197
|
+
maxBatchSize = MAX_POR_LOTE;
|
|
198
|
+
displayOversizedDialog = false;
|
|
199
|
+
allowedFiles = [];
|
|
200
|
+
rejectedFiles = [];
|
|
201
|
+
pendingTagValue;
|
|
202
|
+
constructor(messageService) {
|
|
203
|
+
this.messageService = messageService;
|
|
204
|
+
}
|
|
161
205
|
get normalizedExtensions() {
|
|
162
206
|
return normalizeExtensions(this.allowedExtensions, DEFAULT_ALLOWED_UPLOAD_EXTENSIONS);
|
|
163
207
|
}
|
|
164
208
|
get acceptedFileTypes() {
|
|
165
209
|
return buildAcceptAttr(this.normalizedExtensions);
|
|
166
210
|
}
|
|
211
|
+
formatSize(bytes) {
|
|
212
|
+
return formatFileSizeMB(bytes);
|
|
213
|
+
}
|
|
167
214
|
loadFileClick() {
|
|
168
215
|
this.loadFile.emit();
|
|
169
216
|
this.fileInput.nativeElement.value = '';
|
|
@@ -175,17 +222,49 @@ class UploadDialogComponent {
|
|
|
175
222
|
return;
|
|
176
223
|
const files = Array.from(input.files);
|
|
177
224
|
const validFiles = files.filter(f => isAllowedUploadFile(f, this.normalizedExtensions));
|
|
178
|
-
const
|
|
179
|
-
if (validFiles
|
|
180
|
-
|
|
225
|
+
const tagValue = input.value;
|
|
226
|
+
if (!validFiles.length)
|
|
227
|
+
return;
|
|
228
|
+
if (getBatchSize(validFiles) > this.maxBatchSize) {
|
|
229
|
+
this.addMessage('error', 'Lote demasiado grande', `El lote seleccionado supera el tamaño máximo permitido de ${this.formatSize(this.maxBatchSize)}.`);
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
const { allowed, rejected } = splitFilesByMaxSize(validFiles, this.maxFileSize);
|
|
233
|
+
if (!rejected.length) {
|
|
234
|
+
this.onUploaded.emit({ fileList: allowed, tagValue });
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
this.allowedFiles = allowed;
|
|
238
|
+
this.rejectedFiles = rejected;
|
|
239
|
+
this.pendingTagValue = tagValue;
|
|
240
|
+
this.displayOversizedDialog = true;
|
|
241
|
+
}
|
|
242
|
+
continuarConPermitidos() {
|
|
243
|
+
this.displayOversizedDialog = false;
|
|
244
|
+
if (this.allowedFiles.length) {
|
|
245
|
+
this.onUploaded.emit({ fileList: this.allowedFiles, tagValue: this.pendingTagValue });
|
|
246
|
+
}
|
|
247
|
+
this.limpiarSeleccionRechazada();
|
|
248
|
+
}
|
|
249
|
+
cancelarEnvio() {
|
|
250
|
+
this.displayOversizedDialog = false;
|
|
251
|
+
this.limpiarSeleccionRechazada();
|
|
252
|
+
}
|
|
253
|
+
limpiarSeleccionRechazada() {
|
|
254
|
+
this.allowedFiles = [];
|
|
255
|
+
this.rejectedFiles = [];
|
|
256
|
+
this.pendingTagValue = null;
|
|
257
|
+
}
|
|
258
|
+
addMessage(severity, summary, detail) {
|
|
259
|
+
this.messageService.add({ severity, summary, detail, life: 4000 });
|
|
181
260
|
}
|
|
182
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
183
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
261
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UploadDialogComponent, deps: [{ token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
262
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UploadDialogComponent, isStandalone: true, selector: "lib-upload-dialog", inputs: { selectedDocument: "selectedDocument", allowedExtensions: "allowedExtensions" }, outputs: { onUploaded: "onUploaded", loadFile: "loadFile" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<input\r\n #fileInput\r\n type=\"file\"\r\n (change)=\"fileChange($event)\"\r\n class=\"hidden\"\r\n placeholder=\"Upload file\"\r\n [attr.accept]=\"acceptedFileTypes\"\r\n multiple\r\n/>\r\n<button\r\n pButton\r\n type=\"button\"\r\n label=\"Subir archivo\"\r\n icon=\"pi pi-upload\"\r\n class=\"p-button-outlined ff-btn-upload\"\r\n (click)=\"loadFileClick()\"\r\n></button>\r\n\r\n<p-dialog\r\n header=\"Archivos que superan el tama\u00F1o permitido\"\r\n [(visible)]=\"displayOversizedDialog\"\r\n [modal]=\"true\"\r\n [closable]=\"false\"\r\n [style]=\"{ width: '32rem' }\"\r\n [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\n>\r\n <p>\r\n Tama\u00F1o m\u00E1ximo por archivo:\r\n <strong>{{ formatSize(maxFileSize) }}</strong>\r\n </p>\r\n\r\n <div class=\"oversized-section\">\r\n <p class=\"oversized-title\">Archivos rechazados:</p>\r\n <ul class=\"oversized-list\">\r\n <li *ngFor=\"let file of rejectedFiles\">\r\n {{ file.name }} \u2014 {{ formatSize(file.size) }}\r\n </li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"oversized-section\" *ngIf=\"allowedFiles.length\">\r\n <p class=\"oversized-title\">Archivos que s\u00ED se enviar\u00E1n:</p>\r\n <ul class=\"oversized-list\">\r\n <li *ngFor=\"let file of allowedFiles\">{{ file.name }}</li>\r\n </ul>\r\n </div>\r\n <p *ngIf=\"!allowedFiles.length\">No hay archivos v\u00E1lidos para enviar.</p>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Cancelar\"\r\n class=\"p-button-text\"\r\n (click)=\"cancelarEnvio()\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Continuar\"\r\n icon=\"pi pi-upload\"\r\n [disabled]=\"!allowedFiles.length\"\r\n (click)=\"continuarConPermitidos()\"\r\n ></button>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".oversized-section{margin-bottom:1rem}.oversized-section .oversized-title{font-weight:600;margin-bottom:.25rem}.oversized-section .oversized-list{margin:0;padding-left:1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4.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"] }] });
|
|
184
263
|
}
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UploadDialogComponent, decorators: [{
|
|
186
265
|
type: Component,
|
|
187
|
-
args: [{ selector: 'lib-upload-dialog', imports: [CommonModule, ButtonModule, DialogModule], template: "<input\r\n #fileInput\r\n type=\"file\"\r\n (change)=\"fileChange($event)\"\r\n class=\"hidden\"\r\n placeholder=\"Upload file\"\r\n [attr.accept]=\"acceptedFileTypes\"\r\n multiple\r\n/>\r\n<button\r\n pButton\r\n type=\"button\"\r\n label=\"Subir archivo\"\r\n icon=\"pi pi-upload\"\r\n class=\"p-button-outlined ff-btn-upload\"\r\n (click)=\"loadFileClick()\"\r\n></button>\r\n\r\n
|
|
188
|
-
}], ctorParameters: () => [], propDecorators: { selectedDocument: [{
|
|
266
|
+
args: [{ selector: 'lib-upload-dialog', imports: [CommonModule, ButtonModule, DialogModule], template: "<input\r\n #fileInput\r\n type=\"file\"\r\n (change)=\"fileChange($event)\"\r\n class=\"hidden\"\r\n placeholder=\"Upload file\"\r\n [attr.accept]=\"acceptedFileTypes\"\r\n multiple\r\n/>\r\n<button\r\n pButton\r\n type=\"button\"\r\n label=\"Subir archivo\"\r\n icon=\"pi pi-upload\"\r\n class=\"p-button-outlined ff-btn-upload\"\r\n (click)=\"loadFileClick()\"\r\n></button>\r\n\r\n<p-dialog\r\n header=\"Archivos que superan el tama\u00F1o permitido\"\r\n [(visible)]=\"displayOversizedDialog\"\r\n [modal]=\"true\"\r\n [closable]=\"false\"\r\n [style]=\"{ width: '32rem' }\"\r\n [breakpoints]=\"{ '1199px': '75vw', '575px': '90vw' }\"\r\n>\r\n <p>\r\n Tama\u00F1o m\u00E1ximo por archivo:\r\n <strong>{{ formatSize(maxFileSize) }}</strong>\r\n </p>\r\n\r\n <div class=\"oversized-section\">\r\n <p class=\"oversized-title\">Archivos rechazados:</p>\r\n <ul class=\"oversized-list\">\r\n <li *ngFor=\"let file of rejectedFiles\">\r\n {{ file.name }} \u2014 {{ formatSize(file.size) }}\r\n </li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"oversized-section\" *ngIf=\"allowedFiles.length\">\r\n <p class=\"oversized-title\">Archivos que s\u00ED se enviar\u00E1n:</p>\r\n <ul class=\"oversized-list\">\r\n <li *ngFor=\"let file of allowedFiles\">{{ file.name }}</li>\r\n </ul>\r\n </div>\r\n <p *ngIf=\"!allowedFiles.length\">No hay archivos v\u00E1lidos para enviar.</p>\r\n\r\n <ng-template pTemplate=\"footer\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Cancelar\"\r\n class=\"p-button-text\"\r\n (click)=\"cancelarEnvio()\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Continuar\"\r\n icon=\"pi pi-upload\"\r\n [disabled]=\"!allowedFiles.length\"\r\n (click)=\"continuarConPermitidos()\"\r\n ></button>\r\n </ng-template>\r\n</p-dialog>\r\n", styles: [".oversized-section{margin-bottom:1rem}.oversized-section .oversized-title{font-weight:600;margin-bottom:.25rem}.oversized-section .oversized-list{margin:0;padding-left:1.25rem}\n"] }]
|
|
267
|
+
}], ctorParameters: () => [{ type: i2.MessageService }], propDecorators: { selectedDocument: [{
|
|
189
268
|
type: Input
|
|
190
269
|
}], allowedExtensions: [{
|
|
191
270
|
type: Input
|
|
@@ -247,10 +326,10 @@ class FlexibleDatePipe {
|
|
|
247
326
|
return d;
|
|
248
327
|
return null; // no se pudo parsear
|
|
249
328
|
}
|
|
250
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
251
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
329
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FlexibleDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
330
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: FlexibleDatePipe, isStandalone: true, name: "flexibleDate" });
|
|
252
331
|
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FlexibleDatePipe, decorators: [{
|
|
254
333
|
type: Pipe,
|
|
255
334
|
args: [{ name: 'flexibleDate' }]
|
|
256
335
|
}] });
|
|
@@ -456,10 +535,10 @@ class FolderFilesComponent {
|
|
|
456
535
|
this.page = 1;
|
|
457
536
|
this.loadFiles();
|
|
458
537
|
}
|
|
459
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
460
|
-
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", allowedUploadTypes: "allowedUploadTypes" }, outputs: { onFileChange: "onFileChange", onCargarArchivo: "onCargarArchivo", onEliminarMasivo: "onEliminarMasivo", onBack: "onBack", viewDocument: "viewDocument" }, 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\r\n pButton\r\n type=\"button\"\r\n icon=\"pi pi-arrow-left\"\r\n label=\"Volver\"\r\n (click)=\"goBack()\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n [placeholder]=\"\r\n 'Buscar en ' +\r\n carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\r\n \"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\"\r\n />\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog\r\n *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n [allowedExtensions]=\"allowedUploadTypes\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\"\r\n >\r\n </lib-upload-dialog>\r\n\r\n <button\r\n pButton\r\n 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 >\r\n <span class=\"ff-btn-label\"\r\n >Eliminar ({{ docsEliminables.length }})</span\r\n >\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\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\"\r\n >\r\n </p-checkbox>\r\n <span\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n class=\"ff-select-row__label\"\r\n >Seleccionar todo</span\r\n >\r\n </div>\r\n <span class=\"ff-select-row__count\"\r\n >{{ totalRecords || items.length }}\r\n {{\r\n (totalRecords || items.length) === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\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\r\n class=\"ff-file-item\"\r\n *ngFor=\"let item of items\"\r\n (click)=\"openVisorDoc(item)\"\r\n >\r\n <p-checkbox\r\n *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 >\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <i\r\n *ngIf=\"!canPreview(item.label, item.Path)\"\r\n class=\"pi ff-file-item__frame ff-file-item__icon\"\r\n [ngClass]=\"previewFallbackIcon(item.label, item.Path)\"\r\n ></i>\r\n <ng-container *ngIf=\"canPreview(item.label, item.Path)\">\r\n <embed\r\n *ngIf=\"carpeta.TipoArchivo == '2'\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n />\r\n <img\r\n *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\"\r\n class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\"\r\n />\r\n <iframe\r\n *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n frameborder=\"0\"\r\n ></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\"\r\n >Fecha Subida:\r\n {{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <span\r\n class=\"ff-file-item__date\"\r\n *ngIf=\"item.FechaSubida && isMobile\"\r\n >{{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <i\r\n class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n ></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\r\n [options]=\"pageSizeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\"\r\n (ngModelChange)=\"onPageSizeChange()\"\r\n >\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 >\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:#6b7280;background-color:#f3f4f6;border-radius:4px}.ff-file-item__icon.pi-file-excel{color:#1d6f42;background-color:#f0faf5}.ff-file-item__icon.pi-file-pdf{color:#b91c1c;background-color:#fef2f2}.ff-file-item__icon.pi-file-word{color:#1d4ed8;background-color:#eff6ff}.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}}.sf-doc-preview-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:300px;text-align:center;color:#374151}.sf-doc-preview-fallback i{font-size:48px;color:#6b7280}.sf-doc-preview-fallback i.pi-file-excel{color:#1d6f42}.sf-doc-preview-fallback i.pi-file-pdf{color:#b91c1c}.sf-doc-preview-fallback i.pi-file-word{color:#1d4ed8}.frameDoc{overflow:hidden;border:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.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: i4.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: i5.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: i6.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", "allowedExtensions"], outputs: ["onUploaded", "loadFile"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i7.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" }, { kind: "ngmodule", type: DialogModule }] });
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderFilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
539
|
+
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", allowedUploadTypes: "allowedUploadTypes" }, outputs: { onFileChange: "onFileChange", onCargarArchivo: "onCargarArchivo", onEliminarMasivo: "onEliminarMasivo", onBack: "onBack", viewDocument: "viewDocument" }, 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\r\n pButton\r\n type=\"button\"\r\n icon=\"pi pi-arrow-left\"\r\n label=\"Volver\"\r\n (click)=\"goBack()\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n [placeholder]=\"\r\n 'Buscar en ' +\r\n carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\r\n \"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\"\r\n />\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog\r\n *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n [allowedExtensions]=\"allowedUploadTypes\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\"\r\n >\r\n </lib-upload-dialog>\r\n\r\n <button\r\n pButton\r\n 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 >\r\n <span class=\"ff-btn-label\"\r\n >Eliminar ({{ docsEliminables.length }})</span\r\n >\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\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\"\r\n >\r\n </p-checkbox>\r\n <span\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n class=\"ff-select-row__label\"\r\n >Seleccionar todo</span\r\n >\r\n </div>\r\n <span class=\"ff-select-row__count\"\r\n >{{ totalRecords || items.length }}\r\n {{\r\n (totalRecords || items.length) === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\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\r\n class=\"ff-file-item\"\r\n *ngFor=\"let item of items\"\r\n (click)=\"openVisorDoc(item)\"\r\n >\r\n <p-checkbox\r\n *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 >\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <i\r\n *ngIf=\"!canPreview(item.label, item.Path)\"\r\n class=\"pi ff-file-item__frame ff-file-item__icon\"\r\n [ngClass]=\"previewFallbackIcon(item.label, item.Path)\"\r\n ></i>\r\n <ng-container *ngIf=\"canPreview(item.label, item.Path)\">\r\n <embed\r\n *ngIf=\"carpeta.TipoArchivo == '2'\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n />\r\n <img\r\n *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\"\r\n class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\"\r\n />\r\n <iframe\r\n *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n frameborder=\"0\"\r\n ></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\"\r\n >Fecha Subida:\r\n {{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <span\r\n class=\"ff-file-item__date\"\r\n *ngIf=\"item.FechaSubida && isMobile\"\r\n >{{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <i\r\n class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n ></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\r\n [options]=\"pageSizeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\"\r\n (ngModelChange)=\"onPageSizeChange()\"\r\n >\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 >\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:#6b7280;background-color:#f3f4f6;border-radius:4px}.ff-file-item__icon.pi-file-excel{color:#1d6f42;background-color:#f0faf5}.ff-file-item__icon.pi-file-pdf{color:#b91c1c;background-color:#fef2f2}.ff-file-item__icon.pi-file-word{color:#1d4ed8;background-color:#eff6ff}.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: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.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: i4$1.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: i5.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: i6.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", "allowedExtensions"], outputs: ["onUploaded", "loadFile"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i7.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" }, { kind: "ngmodule", type: DialogModule }] });
|
|
461
540
|
}
|
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FolderFilesComponent, decorators: [{
|
|
463
542
|
type: Component,
|
|
464
543
|
args: [{ selector: 'lib-folder-files', imports: [
|
|
465
544
|
CommonModule,
|
|
@@ -475,7 +554,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
475
554
|
SelectModule,
|
|
476
555
|
FlexibleDatePipe,
|
|
477
556
|
DialogModule,
|
|
478
|
-
], 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\r\n pButton\r\n type=\"button\"\r\n icon=\"pi pi-arrow-left\"\r\n label=\"Volver\"\r\n (click)=\"goBack()\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n [placeholder]=\"\r\n 'Buscar en ' +\r\n carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\r\n \"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\"\r\n />\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog\r\n *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n [allowedExtensions]=\"allowedUploadTypes\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\"\r\n >\r\n </lib-upload-dialog>\r\n\r\n <button\r\n pButton\r\n 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 >\r\n <span class=\"ff-btn-label\"\r\n >Eliminar ({{ docsEliminables.length }})</span\r\n >\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\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\"\r\n >\r\n </p-checkbox>\r\n <span\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n class=\"ff-select-row__label\"\r\n >Seleccionar todo</span\r\n >\r\n </div>\r\n <span class=\"ff-select-row__count\"\r\n >{{ totalRecords || items.length }}\r\n {{\r\n (totalRecords || items.length) === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\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\r\n class=\"ff-file-item\"\r\n *ngFor=\"let item of items\"\r\n (click)=\"openVisorDoc(item)\"\r\n >\r\n <p-checkbox\r\n *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 >\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <i\r\n *ngIf=\"!canPreview(item.label, item.Path)\"\r\n class=\"pi ff-file-item__frame ff-file-item__icon\"\r\n [ngClass]=\"previewFallbackIcon(item.label, item.Path)\"\r\n ></i>\r\n <ng-container *ngIf=\"canPreview(item.label, item.Path)\">\r\n <embed\r\n *ngIf=\"carpeta.TipoArchivo == '2'\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n />\r\n <img\r\n *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\"\r\n class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\"\r\n />\r\n <iframe\r\n *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n frameborder=\"0\"\r\n ></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\"\r\n >Fecha Subida:\r\n {{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <span\r\n class=\"ff-file-item__date\"\r\n *ngIf=\"item.FechaSubida && isMobile\"\r\n >{{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <i\r\n class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n ></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\r\n [options]=\"pageSizeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\"\r\n (ngModelChange)=\"onPageSizeChange()\"\r\n >\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 >\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:#6b7280;background-color:#f3f4f6;border-radius:4px}.ff-file-item__icon.pi-file-excel{color:#1d6f42;background-color:#f0faf5}.ff-file-item__icon.pi-file-pdf{color:#b91c1c;background-color:#fef2f2}.ff-file-item__icon.pi-file-word{color:#1d4ed8;background-color:#eff6ff}.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}}.sf-doc-preview-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:300px;text-align:center;color:#374151}.sf-doc-preview-fallback i{font-size:48px;color:#6b7280}.sf-doc-preview-fallback i.pi-file-excel{color:#1d6f42}.sf-doc-preview-fallback i.pi-file-pdf{color:#b91c1c}.sf-doc-preview-fallback i.pi-file-word{color:#1d4ed8}.frameDoc{overflow:hidden;border:none}\n"] }]
|
|
557
|
+
], 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\r\n pButton\r\n type=\"button\"\r\n icon=\"pi pi-arrow-left\"\r\n label=\"Volver\"\r\n (click)=\"goBack()\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n [placeholder]=\"\r\n 'Buscar en ' +\r\n carpeta.label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\r\n \"\r\n [(ngModel)]=\"searchQuery\"\r\n (input)=\"onSearchInput()\"\r\n class=\"w-full\"\r\n />\r\n </p-iconfield>\r\n\r\n <div class=\"ff-toolbar__actions\">\r\n <lib-upload-dialog\r\n *ngIf=\"carpeta?.reglas?.permisos?.cargarFront\"\r\n [selectedDocument]=\"carpeta\"\r\n [allowedExtensions]=\"allowedUploadTypes\"\r\n (onUploaded)=\"fileChange($event)\"\r\n (loadFile)=\"cargarArchivo()\"\r\n >\r\n </lib-upload-dialog>\r\n\r\n <button\r\n pButton\r\n 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 >\r\n <span class=\"ff-btn-label\"\r\n >Eliminar ({{ docsEliminables.length }})</span\r\n >\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\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n [binary]=\"true\"\r\n [(ngModel)]=\"allSelected\"\r\n (onChange)=\"toggleSelectAll()\"\r\n >\r\n </p-checkbox>\r\n <span\r\n *ngIf=\"carpeta?.reglas?.permisos?.borrarFront\"\r\n class=\"ff-select-row__label\"\r\n >Seleccionar todo</span\r\n >\r\n </div>\r\n <span class=\"ff-select-row__count\"\r\n >{{ totalRecords || items.length }}\r\n {{\r\n (totalRecords || items.length) === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\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\r\n class=\"ff-file-item\"\r\n *ngFor=\"let item of items\"\r\n (click)=\"openVisorDoc(item)\"\r\n >\r\n <p-checkbox\r\n *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 >\r\n </p-checkbox>\r\n\r\n <div class=\"ff-file-item__preview\">\r\n <i\r\n *ngIf=\"!canPreview(item.label, item.Path)\"\r\n class=\"pi ff-file-item__frame ff-file-item__icon\"\r\n [ngClass]=\"previewFallbackIcon(item.label, item.Path)\"\r\n ></i>\r\n <ng-container *ngIf=\"canPreview(item.label, item.Path)\">\r\n <embed\r\n *ngIf=\"carpeta.TipoArchivo == '2'\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n />\r\n <img\r\n *ngIf=\"carpeta.TipoArchivo == '1' && isMobile\"\r\n class=\"ff-file-item__frame\"\r\n src=\"https://macuna.tecfinanzas.com/Imagenes/pdf_icon.png\"\r\n />\r\n <iframe\r\n *ngIf=\"carpeta.TipoArchivo == '1' && !isMobile\"\r\n class=\"ff-file-item__frame\"\r\n [src]=\"item.Path | safe\"\r\n frameborder=\"0\"\r\n ></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\"\r\n >Fecha Subida:\r\n {{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <span\r\n class=\"ff-file-item__date\"\r\n *ngIf=\"item.FechaSubida && isMobile\"\r\n >{{ item.FechaSubida | flexibleDate: \"dd/MM/yyyy HH:mm\" }}</span\r\n >\r\n <i\r\n class=\"pi pi-external-link ff-file-item__open\"\r\n (click)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n aria-label=\"Abrir en nueva ventana\"\r\n (keydown.enter)=\"\r\n openCurrentInNewWindow(item.Path); $event.stopPropagation()\r\n \"\r\n ></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\r\n [options]=\"pageSizeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [(ngModel)]=\"pageSize\"\r\n (ngModelChange)=\"onPageSizeChange()\"\r\n >\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 >\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:#6b7280;background-color:#f3f4f6;border-radius:4px}.ff-file-item__icon.pi-file-excel{color:#1d6f42;background-color:#f0faf5}.ff-file-item__icon.pi-file-pdf{color:#b91c1c;background-color:#fef2f2}.ff-file-item__icon.pi-file-word{color:#1d4ed8;background-color:#eff6ff}.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"] }]
|
|
479
558
|
}], ctorParameters: () => [], propDecorators: { carpeta: [{
|
|
480
559
|
type: Input
|
|
481
560
|
}], isMobile: [{
|
|
@@ -862,7 +941,7 @@ class SfDocumentsComponent {
|
|
|
862
941
|
var sIdKatios = this.idKatios;
|
|
863
942
|
dataDocs = { data: data };
|
|
864
943
|
formData.append('data', JSON.stringify(dataDocs));
|
|
865
|
-
formData.append('merge', '
|
|
944
|
+
formData.append('merge', 'false');
|
|
866
945
|
for (let _i = 0; _i < fileList.length; _i++) {
|
|
867
946
|
formData.append('files', fileList[_i], fileList[_i].name);
|
|
868
947
|
}
|
|
@@ -1105,10 +1184,10 @@ class SfDocumentsComponent {
|
|
|
1105
1184
|
previewFallbackIcon(label, path) {
|
|
1106
1185
|
return getFileTypeIcon(label || this.current_label || path || this.current_path);
|
|
1107
1186
|
}
|
|
1108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1109
|
-
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", allowedUploadTypes: "allowedUploadTypes", server: "server", idKatios: "idKatios" }, outputs: { nextTabPapa: "nextTabPapa", onNavigationChange: "onNavigationChange" }, providers: [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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n placeholder=\"Buscar carpeta...\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\"\r\n [disabled]=\"documentService.loadingData\"\r\n />\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"documentTypes.length > 0\">\r\n <button\r\n pButton\r\n 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\r\n header=\"Atencion\"\r\n icon=\"pi pi-exclamation-triangle\"\r\n ></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\r\n class=\"folder-item\"\r\n *ngFor=\"let item of carpeta.children\"\r\n (click)=\"VerDetalleTab(item)\"\r\n >\r\n <i\r\n class=\"pi pi-folder folder-item__icon\"\r\n [ngStyle]=\"{\r\n color:\r\n item.children?.length > 0 || item.fileCount > 0\r\n ? 'green'\r\n : 'red',\r\n }\"\r\n ></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{ item.label }}</span>\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"item.children?.length > 0\"\r\n >{{ item.children.length }}\r\n {{\r\n item.children.length === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n item.fileCount\r\n \"\r\n >{{ item.fileCount }}\r\n {{ item.fileCount === 1 ? \"archivo\" : \"archivos\" }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n !item.fileCount\r\n \"\r\n >0 archivos</span\r\n >\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 } @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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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 [allowedUploadTypes]=\"allowedUploadTypes\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\"\r\n (viewDocument)=\"openVisorDoc($event)\"\r\n >\r\n </lib-folder-files>\r\n </div>\r\n</div>\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\r\n<p-dialog\r\n [(visible)]=\"displayView\"\r\n [header]=\"current_label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\"\r\n [modal]=\"true\"\r\n [style]=\"{ width: '70vw' }\"\r\n appendTo=\"body\"\r\n>\r\n <div *ngIf=\"!canPreview()\" class=\"sf-doc-preview-fallback\">\r\n <i class=\"pi\" [ngClass]=\"previewFallbackIcon()\"></i>\r\n <p>La vista previa no est\u00E1 disponible para este tipo de archivo.</p>\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Abrir en una nueva ventana\"\r\n icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"\r\n ></button>\r\n </div>\r\n <ng-container *ngIf=\"canPreview()\">\r\n <embed\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\"\r\n [src]=\"current_path | safe\"\r\n style=\"width: 100%; min-height: 600px\"\r\n />\r\n <iframe\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\"\r\n style=\"width: 100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"\r\n ></iframe>\r\n </ng-container>\r\n</p-dialog>\r\n\r\n<p-dialog\r\n 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 >\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 >\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"\r\n (p.type || '').toLowerCase() === 'nvarchar' ||\r\n (p.type || '').toLowerCase() === 'string'\r\n \"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\"\r\n />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"\r\n ['int', 'decimal', 'number'].includes((p.type || '').toLowerCase())\r\n \"\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\r\n class=\"gen-control gen-checkbox\"\r\n *ngIf=\"\r\n ['boolean', 'bit', 'bool'].includes((p.type || '').toLowerCase())\r\n \"\r\n >\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\r\n pButton\r\n type=\"button\"\r\n label=\"Cancelar\"\r\n class=\"p-button-text\"\r\n (click)=\"displayGenerate = false\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Generar\"\r\n 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", 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}.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: i2$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: i5$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: i4.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: i7$1.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: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.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: i5.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", "allowedUploadTypes"], outputs: ["onFileChange", "onCargarArchivo", "onEliminarMasivo", "onBack", "viewDocument"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i11.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: i12.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: i13.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
1187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, deps: [{ token: i1.DomSanitizer }, { token: i2.MessageService }, { token: i0.ApplicationRef }, { token: i2.ConfirmationService }, { token: SfDocumentsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1188
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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", allowedUploadTypes: "allowedUploadTypes", server: "server", idKatios: "idKatios" }, outputs: { nextTabPapa: "nextTabPapa", onNavigationChange: "onNavigationChange" }, providers: [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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n placeholder=\"Buscar carpeta...\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\"\r\n [disabled]=\"documentService.loadingData\"\r\n />\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"documentTypes.length > 0\">\r\n <button\r\n pButton\r\n 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\r\n header=\"Atencion\"\r\n icon=\"pi pi-exclamation-triangle\"\r\n ></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\r\n class=\"folder-item\"\r\n *ngFor=\"let item of carpeta.children\"\r\n (click)=\"VerDetalleTab(item)\"\r\n >\r\n <i\r\n class=\"pi pi-folder folder-item__icon\"\r\n [ngStyle]=\"{\r\n color:\r\n item.children?.length > 0 || item.fileCount > 0\r\n ? 'green'\r\n : 'red',\r\n }\"\r\n ></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{ item.label }}</span>\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"item.children?.length > 0\"\r\n >{{ item.children.length }}\r\n {{\r\n item.children.length === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n item.fileCount\r\n \"\r\n >{{ item.fileCount }}\r\n {{ item.fileCount === 1 ? \"archivo\" : \"archivos\" }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n !item.fileCount\r\n \"\r\n >0 archivos</span\r\n >\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 } @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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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 [allowedUploadTypes]=\"allowedUploadTypes\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\"\r\n (viewDocument)=\"openVisorDoc($event)\"\r\n >\r\n </lib-folder-files>\r\n </div>\r\n</div>\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\r\n<p-dialog\r\n [(visible)]=\"displayView\"\r\n [header]=\"current_label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\"\r\n [modal]=\"true\"\r\n [style]=\"{ width: '70vw' }\"\r\n appendTo=\"body\"\r\n>\r\n <div *ngIf=\"!canPreview()\" class=\"sf-doc-preview-fallback\">\r\n <i class=\"pi\" [ngClass]=\"previewFallbackIcon()\"></i>\r\n <p>La vista previa no est\u00E1 disponible para este tipo de archivo.</p>\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Abrir en una nueva ventana\"\r\n icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"\r\n ></button>\r\n </div>\r\n <ng-container *ngIf=\"canPreview()\">\r\n <embed\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\"\r\n [src]=\"current_path | safe\"\r\n style=\"width: 100%; min-height: 600px\"\r\n />\r\n <iframe\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\"\r\n style=\"width: 100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"\r\n ></iframe>\r\n </ng-container>\r\n</p-dialog>\r\n\r\n<p-dialog\r\n 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 >\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 >\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"\r\n (p.type || '').toLowerCase() === 'nvarchar' ||\r\n (p.type || '').toLowerCase() === 'string'\r\n \"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\"\r\n />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"\r\n ['int', 'decimal', 'number'].includes((p.type || '').toLowerCase())\r\n \"\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\r\n class=\"gen-control gen-checkbox\"\r\n *ngIf=\"\r\n ['boolean', 'bit', 'bool'].includes((p.type || '').toLowerCase())\r\n \"\r\n >\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\r\n pButton\r\n type=\"button\"\r\n label=\"Cancelar\"\r\n class=\"p-button-text\"\r\n (click)=\"displayGenerate = false\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Generar\"\r\n 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", 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}.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}.sf-doc-preview-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:300px;text-align:center;color:#374151}.sf-doc-preview-fallback i{font-size:48px;color:#6b7280}.sf-doc-preview-fallback i.pi-file-excel{color:#1d6f42}.sf-doc-preview-fallback i.pi-file-pdf{color:#b91c1c}.sf-doc-preview-fallback i.pi-file-word{color:#1d4ed8}.frameDoc{overflow:hidden;border:none}\n"], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3.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: i5$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: i4$1.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: i4.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: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.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: i5.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", "allowedUploadTypes"], outputs: ["onFileChange", "onCargarArchivo", "onEliminarMasivo", "onBack", "viewDocument"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i11.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: i12.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: i13.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }] });
|
|
1110
1189
|
}
|
|
1111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SfDocumentsComponent, decorators: [{
|
|
1112
1191
|
type: Component,
|
|
1113
1192
|
args: [{ selector: 'app-sf-documents', imports: [
|
|
1114
1193
|
ToastModule,
|
|
@@ -1127,8 +1206,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1127
1206
|
DropdownModule,
|
|
1128
1207
|
DatePickerModule,
|
|
1129
1208
|
SkeletonModule,
|
|
1130
|
-
], providers: [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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n placeholder=\"Buscar carpeta...\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\"\r\n [disabled]=\"documentService.loadingData\"\r\n />\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"documentTypes.length > 0\">\r\n <button\r\n pButton\r\n 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\r\n header=\"Atencion\"\r\n icon=\"pi pi-exclamation-triangle\"\r\n ></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\r\n class=\"folder-item\"\r\n *ngFor=\"let item of carpeta.children\"\r\n (click)=\"VerDetalleTab(item)\"\r\n >\r\n <i\r\n class=\"pi pi-folder folder-item__icon\"\r\n [ngStyle]=\"{\r\n color:\r\n item.children?.length > 0 || item.fileCount > 0\r\n ? 'green'\r\n : 'red',\r\n }\"\r\n ></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{ item.label }}</span>\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"item.children?.length > 0\"\r\n >{{ item.children.length }}\r\n {{\r\n item.children.length === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n item.fileCount\r\n \"\r\n >{{ item.fileCount }}\r\n {{ item.fileCount === 1 ? \"archivo\" : \"archivos\" }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n !item.fileCount\r\n \"\r\n >0 archivos</span\r\n >\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 } @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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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 [allowedUploadTypes]=\"allowedUploadTypes\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\"\r\n (viewDocument)=\"openVisorDoc($event)\"\r\n >\r\n </lib-folder-files>\r\n </div>\r\n</div>\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\r\n<p-dialog\r\n [(visible)]=\"displayView\"\r\n [header]=\"current_label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\"\r\n [modal]=\"true\"\r\n [style]=\"{ width: '70vw' }\"\r\n appendTo=\"body\"\r\n>\r\n <div *ngIf=\"!canPreview()\" class=\"sf-doc-preview-fallback\">\r\n <i class=\"pi\" [ngClass]=\"previewFallbackIcon()\"></i>\r\n <p>La vista previa no est\u00E1 disponible para este tipo de archivo.</p>\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Abrir en una nueva ventana\"\r\n icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"\r\n ></button>\r\n </div>\r\n <ng-container *ngIf=\"canPreview()\">\r\n <embed\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\"\r\n [src]=\"current_path | safe\"\r\n style=\"width: 100%; min-height: 600px\"\r\n />\r\n <iframe\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\"\r\n style=\"width: 100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"\r\n ></iframe>\r\n </ng-container>\r\n</p-dialog>\r\n\r\n<p-dialog\r\n 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 >\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 >\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"\r\n (p.type || '').toLowerCase() === 'nvarchar' ||\r\n (p.type || '').toLowerCase() === 'string'\r\n \"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\"\r\n />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"\r\n ['int', 'decimal', 'number'].includes((p.type || '').toLowerCase())\r\n \"\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\r\n class=\"gen-control gen-checkbox\"\r\n *ngIf=\"\r\n ['boolean', 'bit', 'bool'].includes((p.type || '').toLowerCase())\r\n \"\r\n >\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\r\n pButton\r\n type=\"button\"\r\n label=\"Cancelar\"\r\n class=\"p-button-text\"\r\n (click)=\"displayGenerate = false\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Generar\"\r\n 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", 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}.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"] }]
|
|
1131
|
-
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i2
|
|
1209
|
+
], providers: [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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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\r\n type=\"text\"\r\n pInputText\r\n placeholder=\"Buscar carpeta...\"\r\n [(ngModel)]=\"valorFiltro\"\r\n (keyup)=\"filtrarDocumentos()\"\r\n class=\"w-full\"\r\n [disabled]=\"documentService.loadingData\"\r\n />\r\n </p-iconfield>\r\n </div>\r\n\r\n <div class=\"doc-toolbar-right\" *ngIf=\"documentTypes.length > 0\">\r\n <button\r\n pButton\r\n 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\r\n header=\"Atencion\"\r\n icon=\"pi pi-exclamation-triangle\"\r\n ></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\r\n class=\"folder-item\"\r\n *ngFor=\"let item of carpeta.children\"\r\n (click)=\"VerDetalleTab(item)\"\r\n >\r\n <i\r\n class=\"pi pi-folder folder-item__icon\"\r\n [ngStyle]=\"{\r\n color:\r\n item.children?.length > 0 || item.fileCount > 0\r\n ? 'green'\r\n : 'red',\r\n }\"\r\n ></i>\r\n <div class=\"folder-item__info\">\r\n <span class=\"folder-item__name\">{{ item.label }}</span>\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"item.children?.length > 0\"\r\n >{{ item.children.length }}\r\n {{\r\n item.children.length === 1 ? \"archivo\" : \"archivos\"\r\n }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n item.fileCount\r\n \"\r\n >{{ item.fileCount }}\r\n {{ item.fileCount === 1 ? \"archivo\" : \"archivos\" }}</span\r\n >\r\n <span\r\n class=\"folder-item__count\"\r\n *ngIf=\"\r\n (!item.children || item.children.length === 0) &&\r\n !item.fileCount\r\n \"\r\n >0 archivos</span\r\n >\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 } @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\r\n pButton\r\n type=\"button\"\r\n label=\"Atras\"\r\n icon=\"pi pi-arrow-left\"\r\n (click)=\"next(-1)\"\r\n ></button>\r\n </div>\r\n <div\r\n class=\"div-table-col50\"\r\n style=\"text-align: center\"\r\n *ngIf=\"!bFinal && botones\"\r\n >\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Siguiente\"\r\n icon=\"pi pi-arrow-right\"\r\n (click)=\"next(1)\"\r\n ></button>\r\n </div>\r\n <div class=\"div-table-col50\" *ngIf=\"bFinal\">\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Finalizar\"\r\n icon=\"pi pi-home\"\r\n (click)=\"next(0)\"\r\n ></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 [allowedUploadTypes]=\"allowedUploadTypes\"\r\n (onFileChange)=\"fileChange($event)\"\r\n (onCargarArchivo)=\"cargarArchivo($event)\"\r\n (onEliminarMasivo)=\"eliminarMasivo($event)\"\r\n (onBack)=\"goToTab('1')\"\r\n (viewDocument)=\"openVisorDoc($event)\"\r\n >\r\n </lib-folder-files>\r\n </div>\r\n</div>\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\r\n<p-dialog\r\n [(visible)]=\"displayView\"\r\n [header]=\"current_label.replace('#toolbar=0&navpanes=0&statusbar=0', '')\"\r\n [modal]=\"true\"\r\n [style]=\"{ width: '70vw' }\"\r\n appendTo=\"body\"\r\n>\r\n <div *ngIf=\"!canPreview()\" class=\"sf-doc-preview-fallback\">\r\n <i class=\"pi\" [ngClass]=\"previewFallbackIcon()\"></i>\r\n <p>La vista previa no est\u00E1 disponible para este tipo de archivo.</p>\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Abrir en una nueva ventana\"\r\n icon=\"pi pi-external-link\"\r\n (click)=\"openCurrentInNewWindow()\"\r\n ></button>\r\n </div>\r\n <ng-container *ngIf=\"canPreview()\">\r\n <embed\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '2'\"\r\n [src]=\"current_path | safe\"\r\n style=\"width: 100%; min-height: 600px\"\r\n />\r\n <iframe\r\n *ngIf=\"carpetaSeleccionada.TipoArchivo == '1'\"\r\n style=\"width: 100%; min-height: 600px\"\r\n [src]=\"current_path | safe\"\r\n ></iframe>\r\n </ng-container>\r\n</p-dialog>\r\n\r\n<p-dialog\r\n 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 >\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 >\r\n </p-datepicker>\r\n\r\n <!-- String -->\r\n <input\r\n *ngIf=\"\r\n (p.type || '').toLowerCase() === 'nvarchar' ||\r\n (p.type || '').toLowerCase() === 'string'\r\n \"\r\n pInputText\r\n class=\"gen-control\"\r\n [(ngModel)]=\"dynamicValues[p.name]\"\r\n placeholder=\"Ingrese un valor\"\r\n />\r\n\r\n <!-- Number -->\r\n <p-inputNumber\r\n *ngIf=\"\r\n ['int', 'decimal', 'number'].includes((p.type || '').toLowerCase())\r\n \"\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\r\n class=\"gen-control gen-checkbox\"\r\n *ngIf=\"\r\n ['boolean', 'bit', 'bool'].includes((p.type || '').toLowerCase())\r\n \"\r\n >\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\r\n pButton\r\n type=\"button\"\r\n label=\"Cancelar\"\r\n class=\"p-button-text\"\r\n (click)=\"displayGenerate = false\"\r\n ></button>\r\n\r\n <button\r\n pButton\r\n type=\"button\"\r\n label=\"Generar\"\r\n 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", 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}.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}.sf-doc-preview-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:300px;text-align:center;color:#374151}.sf-doc-preview-fallback i{font-size:48px;color:#6b7280}.sf-doc-preview-fallback i.pi-file-excel{color:#1d6f42}.sf-doc-preview-fallback i.pi-file-pdf{color:#b91c1c}.sf-doc-preview-fallback i.pi-file-word{color:#1d4ed8}.frameDoc{overflow:hidden;border:none}\n"] }]
|
|
1210
|
+
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i2.MessageService }, { type: i0.ApplicationRef }, { type: i2.ConfirmationService }, { type: SfDocumentsService }], propDecorators: { accion: [{
|
|
1132
1211
|
type: Input
|
|
1133
1212
|
}], entidad: [{
|
|
1134
1213
|
type: Input
|