sf-documents 0.1.6 → 0.1.8
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.
- package/fesm2022/sf-documents.mjs +338 -259
- package/fesm2022/sf-documents.mjs.map +1 -1
- package/lib/components/dialog/upload-dialog/upload-dialog.component.d.ts +5 -4
- package/lib/components/folder-files/folder-files.component.d.ts +11 -8
- package/lib/sf-documents.component.d.ts +13 -19
- package/lib/utils/file-type.util.d.ts +15 -5
- package/package.json +1 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { SfDocumentsService } from '../../sf-documents.service';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class FolderFilesComponent implements OnChanges, OnDestroy {
|
|
5
|
-
private documentService;
|
|
6
4
|
private documentsService;
|
|
7
5
|
private searchSubject;
|
|
8
6
|
private destroy$;
|
|
@@ -14,12 +12,13 @@ export declare class FolderFilesComponent implements OnChanges, OnDestroy {
|
|
|
14
12
|
requestData: any;
|
|
15
13
|
useBreadcrumb: boolean;
|
|
16
14
|
usesApi: boolean;
|
|
15
|
+
/** Extensiones permitidas para subir (ej. ['.pdf', '.xlsx']). Si no se define, usa el default de la librería. */
|
|
16
|
+
allowedUploadTypes: string[] | undefined;
|
|
17
17
|
onFileChange: EventEmitter<any>;
|
|
18
18
|
onCargarArchivo: EventEmitter<any>;
|
|
19
19
|
onEliminarMasivo: EventEmitter<any[]>;
|
|
20
|
-
onOpenVisorDoc: EventEmitter<any>;
|
|
21
|
-
onOpenNewWindow: EventEmitter<any>;
|
|
22
20
|
onBack: EventEmitter<void>;
|
|
21
|
+
viewDocument: EventEmitter<any>;
|
|
23
22
|
items: any[];
|
|
24
23
|
page: number;
|
|
25
24
|
pageSize: number;
|
|
@@ -38,7 +37,10 @@ export declare class FolderFilesComponent implements OnChanges, OnDestroy {
|
|
|
38
37
|
label: string;
|
|
39
38
|
value: number;
|
|
40
39
|
}[];
|
|
41
|
-
|
|
40
|
+
current_path: string;
|
|
41
|
+
current_label: string;
|
|
42
|
+
displayView: boolean;
|
|
43
|
+
constructor();
|
|
42
44
|
ngOnDestroy(): void;
|
|
43
45
|
ngOnChanges(changes: SimpleChanges): void;
|
|
44
46
|
private init;
|
|
@@ -51,13 +53,14 @@ export declare class FolderFilesComponent implements OnChanges, OnDestroy {
|
|
|
51
53
|
fileChange(data: any): void;
|
|
52
54
|
cargarArchivo(): void;
|
|
53
55
|
openVisorDoc(item: any): void;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
openCurrentInNewWindow(path?: string): void;
|
|
57
|
+
canPreview(label?: string, path?: string): boolean;
|
|
58
|
+
previewFallbackIcon(label?: string, path?: string): string;
|
|
56
59
|
goBack(): void;
|
|
57
60
|
onClickedCheckDelete(event: any, document: any): void;
|
|
58
61
|
emitEliminarMasivo(): void;
|
|
59
62
|
toggleSelectAll(): void;
|
|
60
63
|
onPageSizeChange(): void;
|
|
61
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<FolderFilesComponent, never>;
|
|
62
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FolderFilesComponent, "lib-folder-files", never, { "carpeta": { "alias": "carpeta"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; "idKatios": { "alias": "idKatios"; "required": false; }; "server": { "alias": "server"; "required": false; }; "subestado": { "alias": "subestado"; "required": false; }; "requestData": { "alias": "requestData"; "required": false; }; "useBreadcrumb": { "alias": "useBreadcrumb"; "required": false; }; "usesApi": { "alias": "usesApi"; "required": false; }; }, { "onFileChange": "onFileChange"; "onCargarArchivo": "onCargarArchivo"; "onEliminarMasivo": "onEliminarMasivo"; "
|
|
65
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FolderFilesComponent, "lib-folder-files", never, { "carpeta": { "alias": "carpeta"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; "idKatios": { "alias": "idKatios"; "required": false; }; "server": { "alias": "server"; "required": false; }; "subestado": { "alias": "subestado"; "required": false; }; "requestData": { "alias": "requestData"; "required": false; }; "useBreadcrumb": { "alias": "useBreadcrumb"; "required": false; }; "usesApi": { "alias": "usesApi"; "required": false; }; "allowedUploadTypes": { "alias": "allowedUploadTypes"; "required": false; }; }, { "onFileChange": "onFileChange"; "onCargarArchivo": "onCargarArchivo"; "onEliminarMasivo": "onEliminarMasivo"; "onBack": "onBack"; "viewDocument": "viewDocument"; }, never, never, true, never>;
|
|
63
66
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { ApplicationRef, ElementRef, EventEmitter, OnChanges,
|
|
1
|
+
import { ApplicationRef, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
3
|
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
4
|
-
import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
5
4
|
import { SfDocumentsService } from './sf-documents.service';
|
|
6
5
|
import { SfDocumentNavigationState } from './models/navigation-state.model';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class SfDocumentsComponent implements
|
|
7
|
+
export declare class SfDocumentsComponent implements OnChanges {
|
|
9
8
|
private sanitizer;
|
|
10
|
-
private dialog;
|
|
11
9
|
snackBar: MessageService;
|
|
12
10
|
private appRef;
|
|
13
11
|
private confirmationService;
|
|
@@ -33,6 +31,8 @@ export declare class SfDocumentsComponent implements OnDestroy, OnChanges {
|
|
|
33
31
|
nmco: string[];
|
|
34
32
|
useBreadcrumb: boolean;
|
|
35
33
|
usesApi: boolean;
|
|
34
|
+
/** Extensiones permitidas para subir (ej. ['.pdf', '.xlsx']). Si no se define, usa el default de la librería (pdf, xls, xlsx). */
|
|
35
|
+
allowedUploadTypes: string[] | undefined;
|
|
36
36
|
onNavigationChange: EventEmitter<SfDocumentNavigationState>;
|
|
37
37
|
server: string;
|
|
38
38
|
valorFiltro: string;
|
|
@@ -42,8 +42,6 @@ export declare class SfDocumentsComponent implements OnDestroy, OnChanges {
|
|
|
42
42
|
files: any;
|
|
43
43
|
filesFilter: any;
|
|
44
44
|
imagePathInput: any;
|
|
45
|
-
modalReference: DynamicDialogRef | undefined;
|
|
46
|
-
modalReference2: DynamicDialogRef | undefined;
|
|
47
45
|
documentoSeleccionado: any;
|
|
48
46
|
totalDocsEliminadosApi: {
|
|
49
47
|
existoso: number;
|
|
@@ -52,8 +50,6 @@ export declare class SfDocumentsComponent implements OnDestroy, OnChanges {
|
|
|
52
50
|
file: any;
|
|
53
51
|
urlDoc: any;
|
|
54
52
|
pdfUrl: any;
|
|
55
|
-
current_path: string;
|
|
56
|
-
current_label: string;
|
|
57
53
|
scanFileList: any[];
|
|
58
54
|
displayPDF: boolean;
|
|
59
55
|
panel: ElementRef<any>;
|
|
@@ -69,7 +65,10 @@ export declare class SfDocumentsComponent implements OnDestroy, OnChanges {
|
|
|
69
65
|
dynamicValues: Record<string, any>;
|
|
70
66
|
selectedDocType: string | null;
|
|
71
67
|
selectedRange: string | null;
|
|
72
|
-
|
|
68
|
+
current_path: string;
|
|
69
|
+
current_label: string;
|
|
70
|
+
displayView: boolean;
|
|
71
|
+
constructor(sanitizer: DomSanitizer, snackBar: MessageService, appRef: ApplicationRef, confirmationService: ConfirmationService, documentService: SfDocumentsService);
|
|
73
72
|
ngOnChanges(changes: SimpleChanges): void;
|
|
74
73
|
cargarParametros(tipo: string): void;
|
|
75
74
|
expandAll(): void;
|
|
@@ -81,21 +80,13 @@ export declare class SfDocumentsComponent implements OnDestroy, OnChanges {
|
|
|
81
80
|
eliminarMasivo(docsEliminables: any[]): void;
|
|
82
81
|
filtrarTipoDocumento(iArbol: any): void;
|
|
83
82
|
convertirArrayChildren(node: any): void;
|
|
84
|
-
openBigModal(content: any): void;
|
|
85
|
-
openModal2(content: any): void;
|
|
86
83
|
fileChange(data: any): void;
|
|
87
84
|
loadFileToList(file: any): void;
|
|
88
85
|
subirFotosScan(): void;
|
|
89
86
|
noZonePatch(cb: () => void): void;
|
|
90
|
-
makeFileIntoBlob(_imagePath: any): Promise<Blob>;
|
|
91
87
|
subirImagen(data: any, fileList: any): void;
|
|
92
88
|
generarData(fileList: any): void;
|
|
93
89
|
cargarArchivo(iNodo: any): void;
|
|
94
|
-
openDoc(item: any, pdfContent: any): Promise<void>;
|
|
95
|
-
openVisorDoc(item: any): void;
|
|
96
|
-
openNewWindow(item: any): Promise<void>;
|
|
97
|
-
isCurrentExcel(): boolean;
|
|
98
|
-
openCurrentInNewWindow(): void;
|
|
99
90
|
seleccionoDocs(iNodo: any): Promise<void>;
|
|
100
91
|
message(severity: string, summary: string, message: any): void;
|
|
101
92
|
gotoBottom(): void;
|
|
@@ -106,11 +97,14 @@ export declare class SfDocumentsComponent implements OnDestroy, OnChanges {
|
|
|
106
97
|
next(iValor: any): void;
|
|
107
98
|
valorDocumentosPendientes(carpetas: any): string;
|
|
108
99
|
filtrarDocumentos(): void;
|
|
109
|
-
ngOnDestroy(): void;
|
|
110
100
|
openGenerateDialog(): void;
|
|
111
101
|
generateDocument(): void;
|
|
112
102
|
private toYYYYMMDD;
|
|
113
103
|
onDocTypeChange(): void;
|
|
104
|
+
openVisorDoc(item: any): void;
|
|
105
|
+
openCurrentInNewWindow(path?: string): void;
|
|
106
|
+
canPreview(label?: string, path?: string): boolean;
|
|
107
|
+
previewFallbackIcon(label?: string, path?: string): string;
|
|
114
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<SfDocumentsComponent, never>;
|
|
115
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SfDocumentsComponent, "app-sf-documents", never, { "accion": { "alias": "accion"; "required": false; }; "entidad": { "alias": "entidad"; "required": false; }; "ndoc": { "alias": "ndoc"; "required": false; }; "tdoc": { "alias": "tdoc"; "required": false; }; "tipo": { "alias": "tipo"; "required": false; }; "Kasociada": { "alias": "Kasociada"; "required": false; }; "Producto": { "alias": "Producto"; "required": false; }; "Solicitud": { "alias": "Solicitud"; "required": false; }; "oSession": { "alias": "oSession"; "required": false; }; "perfilDocumentos": { "alias": "perfilDocumentos"; "required": false; }; "subestado": { "alias": "subestado"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; "bAtras": { "alias": "bAtras"; "required": false; }; "bFinal": { "alias": "bFinal"; "required": false; }; "botones": { "alias": "botones"; "required": false; }; "aplFiltro": { "alias": "aplFiltro"; "required": false; }; "nmco": { "alias": "nmco"; "required": false; }; "useBreadcrumb": { "alias": "useBreadcrumb"; "required": false; }; "usesApi": { "alias": "usesApi"; "required": false; }; "server": { "alias": "server"; "required": false; }; "idKatios": { "alias": "idKatios"; "required": false; }; }, { "nextTabPapa": "nextTabPapa"; "onNavigationChange": "onNavigationChange"; }, never, never, true, never>;
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SfDocumentsComponent, "app-sf-documents", never, { "accion": { "alias": "accion"; "required": false; }; "entidad": { "alias": "entidad"; "required": false; }; "ndoc": { "alias": "ndoc"; "required": false; }; "tdoc": { "alias": "tdoc"; "required": false; }; "tipo": { "alias": "tipo"; "required": false; }; "Kasociada": { "alias": "Kasociada"; "required": false; }; "Producto": { "alias": "Producto"; "required": false; }; "Solicitud": { "alias": "Solicitud"; "required": false; }; "oSession": { "alias": "oSession"; "required": false; }; "perfilDocumentos": { "alias": "perfilDocumentos"; "required": false; }; "subestado": { "alias": "subestado"; "required": false; }; "isMobile": { "alias": "isMobile"; "required": false; }; "bAtras": { "alias": "bAtras"; "required": false; }; "bFinal": { "alias": "bFinal"; "required": false; }; "botones": { "alias": "botones"; "required": false; }; "aplFiltro": { "alias": "aplFiltro"; "required": false; }; "nmco": { "alias": "nmco"; "required": false; }; "useBreadcrumb": { "alias": "useBreadcrumb"; "required": false; }; "usesApi": { "alias": "usesApi"; "required": false; }; "allowedUploadTypes": { "alias": "allowedUploadTypes"; "required": false; }; "server": { "alias": "server"; "required": false; }; "idKatios": { "alias": "idKatios"; "required": false; }; }, { "nextTabPapa": "nextTabPapa"; "onNavigationChange": "onNavigationChange"; }, never, never, true, never>;
|
|
116
110
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Extensiones permitidas por defecto para subir cuando el host no configura nada.
|
|
3
|
+
* Esto sí es configurable desde el host vía `allowedUploadTypes`, ya que es una
|
|
4
|
+
* decisión de negocio (qué tipos de documento se aceptan).
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_ALLOWED_UPLOAD_EXTENSIONS: string[];
|
|
7
|
+
/** Normaliza una lista de extensiones dada por el host (con o sin punto, mayúsc/minúsc). */
|
|
8
|
+
export declare function normalizeExtensions(extensions: string[] | undefined | null, fallback: string[]): string[];
|
|
9
|
+
/** Arma el atributo `accept` del input file a partir de las extensiones permitidas. */
|
|
10
|
+
export declare function buildAcceptAttr(extensions: string[]): string;
|
|
11
|
+
export declare function isAllowedUploadFile(file: File, extensions: string[]): boolean;
|
|
12
|
+
/** true si el navegador puede mostrar este archivo inline en un <embed>/<iframe>. */
|
|
13
|
+
export declare function canPreviewFile(name: string | undefined | null): boolean;
|
|
14
|
+
/** Ícono PrimeIcons según la extensión del archivo; 'pi-file' si no se reconoce. */
|
|
15
|
+
export declare function getFileTypeIcon(name: string | undefined | null): string;
|