@servicemind.tis/angular-image-and-file-picker 1.0.0
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/LICENSE +21 -0
- package/README.md +305 -0
- package/fesm2022/servicemind.tis-angular-image-and-file-picker.mjs +3658 -0
- package/fesm2022/servicemind.tis-angular-image-and-file-picker.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/angular-camera-capture-dialog/angular-camera-capture-dialog.component.d.ts +34 -0
- package/lib/angular-confirmation-dialog/angular-confirmation-dialog.component.d.ts +10 -0
- package/lib/angular-error-dialog/angular-error-dialog.component.d.ts +10 -0
- package/lib/angular-file-viewer/angular-excel-file-viewer/angular-excel-file-viewer.component.d.ts +14 -0
- package/lib/angular-file-viewer/angular-file-viewer.component.d.ts +16 -0
- package/lib/angular-file-viewer/angular-pdf-viewer/angular-pdf-viewer.component.d.ts +16 -0
- package/lib/angular-file-viewer/angular-video/angular-video.component.d.ts +13 -0
- package/lib/angular-image-and-file-picker/angular-image-and-file-picker.component.d.ts +186 -0
- package/lib/angular-image-and-file-picker.module.d.ts +31 -0
- package/lib/angular-image-and-file-picker.service.d.ts +6 -0
- package/lib/angular-preview-image/angular-preview-image.component.d.ts +19 -0
- package/lib/angular-qr-code-dialog/angular-qr-code-dialog.component.d.ts +90 -0
- package/lib/angular-view-connection-dialog/angular-view-connection-dialog.component.d.ts +44 -0
- package/lib/interfaces/config.type.d.ts +19 -0
- package/lib/interfaces/file-viewer-file-type.type.d.ts +41 -0
- package/lib/interfaces/index.d.ts +3 -0
- package/lib/interfaces/socket-adapter.interface.d.ts +315 -0
- package/lib/pipes/time-ago.pipe.d.ts +7 -0
- package/lib/services/angular-helper.service.d.ts +45 -0
- package/lib/services/angular-remote-upload.service.d.ts +273 -0
- package/package.json +53 -0
- package/public-api.d.ts +7 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, ElementRef } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface CameraCaptureDialogData {
|
|
5
|
+
stream: MediaStream;
|
|
6
|
+
videoDevices?: MediaDeviceInfo[];
|
|
7
|
+
isMobile: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface CameraCaptureResult {
|
|
10
|
+
action: 'capture' | 'upload' | 'cancel';
|
|
11
|
+
file?: File;
|
|
12
|
+
}
|
|
13
|
+
export declare class AngularCameraCaptureDialogComponent implements OnInit, OnDestroy {
|
|
14
|
+
dialogRef: MatDialogRef<AngularCameraCaptureDialogComponent>;
|
|
15
|
+
data: CameraCaptureDialogData;
|
|
16
|
+
videoElement: ElementRef<HTMLVideoElement>;
|
|
17
|
+
canvasElement: ElementRef<HTMLCanvasElement>;
|
|
18
|
+
currentStream: MediaStream;
|
|
19
|
+
currentDeviceIndex: number;
|
|
20
|
+
isCapturing: import("@angular/core").WritableSignal<boolean>;
|
|
21
|
+
isSwitching: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
showFlash: import("@angular/core").WritableSignal<boolean>;
|
|
23
|
+
hasMultipleCameras: boolean;
|
|
24
|
+
constructor(dialogRef: MatDialogRef<AngularCameraCaptureDialogComponent>, data: CameraCaptureDialogData);
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
switchCamera(): Promise<void>;
|
|
28
|
+
capturePhoto(): Promise<void>;
|
|
29
|
+
openUpload(): void;
|
|
30
|
+
cancel(): void;
|
|
31
|
+
private stopStream;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularCameraCaptureDialogComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularCameraCaptureDialogComponent, "angular-camera-capture-dialog", never, {}, {}, never, never, true, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AngularConfirmationDialogComponent {
|
|
4
|
+
dialogRef: MatDialogRef<AngularConfirmationDialogComponent>;
|
|
5
|
+
data: any;
|
|
6
|
+
constructor(dialogRef: MatDialogRef<AngularConfirmationDialogComponent>, data: any);
|
|
7
|
+
onClose(status: boolean | null): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularConfirmationDialogComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularConfirmationDialogComponent, "angular-confirmation-dialog", never, {}, {}, never, never, false, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AngularErrorDialogComponent {
|
|
4
|
+
dialogRef: MatDialogRef<AngularErrorDialogComponent>;
|
|
5
|
+
data: any;
|
|
6
|
+
constructor(dialogRef: MatDialogRef<AngularErrorDialogComponent>, data: any);
|
|
7
|
+
onClose(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularErrorDialogComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularErrorDialogComponent, "angular-error-dialog", never, {}, {}, never, never, false, never>;
|
|
10
|
+
}
|
package/lib/angular-file-viewer/angular-excel-file-viewer/angular-excel-file-viewer.component.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import type { SafeUrl } from '@angular/platform-browser';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AngularExcelFileViewerComponent implements OnChanges {
|
|
6
|
+
private sanitizer;
|
|
7
|
+
src: SafeUrl;
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
iframeSrc: SafeUrl | null;
|
|
10
|
+
constructor(sanitizer: DomSanitizer);
|
|
11
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularExcelFileViewerComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularExcelFileViewerComponent, "angular-excel-file-viewer", never, { "src": { "alias": "src"; "required": true; }; }, {}, never, never, false, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
+
import type { FileViewerDialogData } from '../interfaces';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AngularFileViewerComponent {
|
|
6
|
+
dialogRef: MatDialogRef<AngularFileViewerComponent>;
|
|
7
|
+
data: FileViewerDialogData;
|
|
8
|
+
private sanitizer;
|
|
9
|
+
safeUrl: string;
|
|
10
|
+
private pdfViewer;
|
|
11
|
+
constructor(dialogRef: MatDialogRef<AngularFileViewerComponent>, data: FileViewerDialogData, sanitizer: DomSanitizer);
|
|
12
|
+
downloadFile(): void;
|
|
13
|
+
onClose(status: boolean | null): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularFileViewerComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularFileViewerComponent, "angular-file-viewer", never, {}, {}, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AngularPdfViewerComponent implements OnChanges {
|
|
4
|
+
private cdRef;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
isError: boolean;
|
|
7
|
+
src: string;
|
|
8
|
+
private pdfViewer;
|
|
9
|
+
constructor(cdRef: ChangeDetectorRef);
|
|
10
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
11
|
+
destroyPdfViewer(): void;
|
|
12
|
+
loadingFinished(ev: any): void;
|
|
13
|
+
loadingError(ev: any): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularPdfViewerComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularPdfViewerComponent, "angular-pdf-viewer", never, { "src": { "alias": "src"; "required": true; }; }, {}, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SimpleChanges } from '@angular/core';
|
|
2
|
+
import type { SafeUrl } from '@angular/platform-browser';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AngularVideoComponent {
|
|
5
|
+
src: SafeUrl;
|
|
6
|
+
type: string;
|
|
7
|
+
constructor();
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
+
getFileType(text: string): string;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularVideoComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularVideoComponent, "angular-video", never, { "src": { "alias": "src"; "required": true; }; }, {}, never, never, false, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { EventEmitter, SimpleChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import type { DialogConfig, FileViewerFileType, OptionConfig, UrlConfig, AngularRemoteUploadConfig, AngularRemoteUploadEvent } from '../interfaces';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
6
|
+
import { AngularHelperService } from '../services/angular-helper.service';
|
|
7
|
+
import { AngularRemoteUploadService } from '../services/angular-remote-upload.service';
|
|
8
|
+
import { Config } from '../interfaces/config.type';
|
|
9
|
+
import { CdkDragDrop, CdkDragMove } from '@angular/cdk/drag-drop';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class AngularImageAndFilePickerComponent implements OnDestroy {
|
|
12
|
+
dialog: MatDialog;
|
|
13
|
+
private helper;
|
|
14
|
+
private breakpointObserver;
|
|
15
|
+
private remoteUploadService;
|
|
16
|
+
private changeSubject;
|
|
17
|
+
private destroy$;
|
|
18
|
+
urlConfig: UrlConfig;
|
|
19
|
+
entityType: string;
|
|
20
|
+
entityId: any;
|
|
21
|
+
viewType: 'card' | 'list' | 'compact';
|
|
22
|
+
type: 'image' | 'file';
|
|
23
|
+
label: string | null;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
data: any;
|
|
26
|
+
hint: string | null;
|
|
27
|
+
accept: string;
|
|
28
|
+
isValidateMimeType: boolean;
|
|
29
|
+
selectedId: any;
|
|
30
|
+
options: OptionConfig | null;
|
|
31
|
+
required: boolean;
|
|
32
|
+
previewOnly: boolean;
|
|
33
|
+
previewInFlex: boolean;
|
|
34
|
+
imageItemClass: string;
|
|
35
|
+
isAddUploadedFileInLastNode: boolean;
|
|
36
|
+
isEnableDeleteConfirmation: boolean;
|
|
37
|
+
isEnableCapture: boolean;
|
|
38
|
+
deleteConfirmationMsg: string;
|
|
39
|
+
dialogConfig: DialogConfig;
|
|
40
|
+
enableDragNDropForUpload: boolean;
|
|
41
|
+
remoteUploadConfig: AngularRemoteUploadConfig | null;
|
|
42
|
+
uploadInProgress: EventEmitter<any>;
|
|
43
|
+
onUploaded: EventEmitter<any>;
|
|
44
|
+
onFileSelect: EventEmitter<any>;
|
|
45
|
+
onFileRemoved: EventEmitter<any>;
|
|
46
|
+
onError: EventEmitter<any>;
|
|
47
|
+
onRemoteUpload: EventEmitter<AngularRemoteUploadEvent>;
|
|
48
|
+
isShowImageSequence: boolean;
|
|
49
|
+
enableDragNDrop: boolean;
|
|
50
|
+
editTagButtonWhenDisabled: boolean;
|
|
51
|
+
showDeleteButtonWhenDisabled: boolean;
|
|
52
|
+
dataSequenceChange: EventEmitter<any>;
|
|
53
|
+
isMobile: boolean;
|
|
54
|
+
isTab: boolean;
|
|
55
|
+
isWaitingForMobileUpload: boolean;
|
|
56
|
+
mobileUploadFieldLabel: string;
|
|
57
|
+
pendingFiles: AngularRemoteUploadEvent[];
|
|
58
|
+
isHandset$: Observable<boolean>;
|
|
59
|
+
isTab$: Observable<boolean>;
|
|
60
|
+
config: Config;
|
|
61
|
+
isSliderLoaded: boolean;
|
|
62
|
+
filesArray: any[];
|
|
63
|
+
currentEntityId: number;
|
|
64
|
+
currentEntityType: string;
|
|
65
|
+
images: never[];
|
|
66
|
+
loading: boolean;
|
|
67
|
+
status: boolean;
|
|
68
|
+
constructor(dialog: MatDialog, helper: AngularHelperService, breakpointObserver: BreakpointObserver, remoteUploadService: AngularRemoteUploadService);
|
|
69
|
+
ngOnInit(): void;
|
|
70
|
+
ngAfterViewInit(): void;
|
|
71
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
72
|
+
prepareConfig(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Validates selected files against the accept parameter
|
|
75
|
+
* @param files - FileList of selected files
|
|
76
|
+
* @returns boolean - true if all files are valid, false otherwise
|
|
77
|
+
*/
|
|
78
|
+
private validateFileTypes;
|
|
79
|
+
setSliderLoading(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Handle click on the upload label - only trigger file selection if not clicking on mobile upload buttons
|
|
82
|
+
*/
|
|
83
|
+
handleLabelClick(event: MouseEvent): void;
|
|
84
|
+
openImageSelector(selectorId?: string): void;
|
|
85
|
+
openCameraCapture(): Promise<void>;
|
|
86
|
+
private openCameraDialog;
|
|
87
|
+
private showCameraModal;
|
|
88
|
+
detectImages(event: any, index?: number): Promise<void>;
|
|
89
|
+
processImage(file: File, uploadedImages: any[], index: number, tempId?: string): Promise<void>;
|
|
90
|
+
private getMimeTypeFromFileName;
|
|
91
|
+
private getExtensionFromMimeType;
|
|
92
|
+
uploadImages(data: any): Promise<unknown>;
|
|
93
|
+
deleteImage(event: any, t: any, index: number, img: any): void;
|
|
94
|
+
removeImage(event: any, index: number, img: any): void;
|
|
95
|
+
removeUploadedImage(img: any, index: number, silently?: boolean): void;
|
|
96
|
+
detectFiles(event: any, index?: number): Promise<void>;
|
|
97
|
+
processFile(file: File, uploadedFiles: any[], index: number, tempId?: string): Promise<void>;
|
|
98
|
+
uploadFiles(data: any): Promise<unknown>;
|
|
99
|
+
deleteFile(event: any, t: any, index: number, file: any): void;
|
|
100
|
+
removeFile(event: any, index: number, file: any): void;
|
|
101
|
+
removeUploadedFile(file: any, index: number, silently?: boolean): void;
|
|
102
|
+
onSubmit(): void;
|
|
103
|
+
downloadFile(url: string, fileName: string): Promise<void>;
|
|
104
|
+
clickTimeout: any;
|
|
105
|
+
clickDelay: number;
|
|
106
|
+
onSelectFile(file: any): void;
|
|
107
|
+
openFile(file: any): void;
|
|
108
|
+
openPreviewDialog(url: string, title: string): void;
|
|
109
|
+
openImagePreviewDialog(url: string): void;
|
|
110
|
+
openFileViewer(pdfUrl: string, fileType: FileViewerFileType): void;
|
|
111
|
+
checkingForPreview(img: string): boolean;
|
|
112
|
+
setHeight(id: string, valueForAddedHeight?: number): string;
|
|
113
|
+
generateFilesForSingleCard(): void;
|
|
114
|
+
editTagWithSpace(file: any): void;
|
|
115
|
+
onSubmitTags(file: any): void;
|
|
116
|
+
isUploadDragOver: boolean;
|
|
117
|
+
isDragging: boolean;
|
|
118
|
+
dragSourceIndex: number | null;
|
|
119
|
+
dropTargetIndex: number | null;
|
|
120
|
+
private canAcceptUploadDragDrop;
|
|
121
|
+
onUploadDragOver(event: DragEvent): void;
|
|
122
|
+
onUploadDragLeave(event: DragEvent): void;
|
|
123
|
+
onUploadDrop(event: DragEvent): void;
|
|
124
|
+
onDragStarted(index: number): void;
|
|
125
|
+
onDragEntered(index: number): void;
|
|
126
|
+
onDragMoved(event: CdkDragMove): void;
|
|
127
|
+
onMouseEnterItem(index: number): void;
|
|
128
|
+
onMouseLeaveItem(): void;
|
|
129
|
+
onDragEnded(): void;
|
|
130
|
+
drop(event: CdkDragDrop<any[]>): void;
|
|
131
|
+
updateSequence(isShowMessage?: boolean): void;
|
|
132
|
+
getTagsArray(tags: string): any[];
|
|
133
|
+
/**
|
|
134
|
+
* Check if remote upload is available and configured
|
|
135
|
+
*/
|
|
136
|
+
isRemoteUploadAvailable(): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Initialize remote upload configuration
|
|
139
|
+
* Call this in ngOnInit or when config changes
|
|
140
|
+
*/
|
|
141
|
+
private initRemoteUpload;
|
|
142
|
+
/**
|
|
143
|
+
* Handle a remote upload event
|
|
144
|
+
*/
|
|
145
|
+
private handleRemoteUpload;
|
|
146
|
+
/**
|
|
147
|
+
* Open the QR code dialog for mobile upload
|
|
148
|
+
*/
|
|
149
|
+
openRemoteUploadDialog(): void;
|
|
150
|
+
/**
|
|
151
|
+
* Check if currently paired with a mobile device
|
|
152
|
+
*/
|
|
153
|
+
isRemotePaired(): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Disconnect from paired mobile device
|
|
156
|
+
*/
|
|
157
|
+
disconnectRemote(): Promise<void>;
|
|
158
|
+
/**
|
|
159
|
+
* Trigger upload from mobile - sends field request to mobile app
|
|
160
|
+
*/
|
|
161
|
+
triggerMobileUpload(): Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Cancel waiting for mobile upload
|
|
164
|
+
*/
|
|
165
|
+
cancelMobileUpload(): Promise<void>;
|
|
166
|
+
/**
|
|
167
|
+
* Accept a pending file from mobile upload
|
|
168
|
+
* This calls the onFileAccept callback if provided, then handles the file
|
|
169
|
+
*/
|
|
170
|
+
acceptPendingFile(pendingFile: AngularRemoteUploadEvent): void;
|
|
171
|
+
/**
|
|
172
|
+
* Reject a pending file from mobile upload
|
|
173
|
+
*/
|
|
174
|
+
rejectPendingFile(pendingFile: AngularRemoteUploadEvent): void;
|
|
175
|
+
/**
|
|
176
|
+
* Open dialog showing connection status with disconnect option
|
|
177
|
+
*/
|
|
178
|
+
openViewConnectionDialog(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Check if a MIME type is an image type
|
|
181
|
+
*/
|
|
182
|
+
isImageMimeType(mimeType: string | undefined): boolean;
|
|
183
|
+
ngOnDestroy(): void;
|
|
184
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularImageAndFilePickerComponent, never>;
|
|
185
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularImageAndFilePickerComponent, "angular-image-and-file-picker", never, { "urlConfig": { "alias": "urlConfig"; "required": true; }; "entityType": { "alias": "entityType"; "required": false; }; "entityId": { "alias": "entityId"; "required": false; }; "viewType": { "alias": "viewType"; "required": false; }; "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "data": { "alias": "data"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "isValidateMimeType": { "alias": "isValidateMimeType"; "required": false; }; "selectedId": { "alias": "selectedId"; "required": false; }; "options": { "alias": "options"; "required": false; }; "required": { "alias": "required"; "required": false; }; "previewOnly": { "alias": "previewOnly"; "required": false; }; "previewInFlex": { "alias": "previewInFlex"; "required": false; }; "imageItemClass": { "alias": "imageItemClass"; "required": false; }; "isAddUploadedFileInLastNode": { "alias": "isAddUploadedFileInLastNode"; "required": false; }; "isEnableDeleteConfirmation": { "alias": "isEnableDeleteConfirmation"; "required": false; }; "isEnableCapture": { "alias": "isEnableCapture"; "required": false; }; "deleteConfirmationMsg": { "alias": "deleteConfirmationMsg"; "required": false; }; "dialogConfig": { "alias": "dialogConfig"; "required": false; }; "enableDragNDropForUpload": { "alias": "enableDragNDropForUpload"; "required": false; }; "remoteUploadConfig": { "alias": "remoteUploadConfig"; "required": false; }; "isShowImageSequence": { "alias": "isShowImageSequence"; "required": false; }; "enableDragNDrop": { "alias": "enableDragNDrop"; "required": false; }; "editTagButtonWhenDisabled": { "alias": "editTagButtonWhenDisabled"; "required": false; }; "showDeleteButtonWhenDisabled": { "alias": "showDeleteButtonWhenDisabled"; "required": false; }; }, { "uploadInProgress": "uploadInProgress"; "onUploaded": "onUploaded"; "onFileSelect": "onFileSelect"; "onFileRemoved": "onFileRemoved"; "onError": "onError"; "onRemoteUpload": "onRemoteUpload"; "dataSequenceChange": "dataSequenceChange"; }, never, never, false, never>;
|
|
186
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./angular-image-and-file-picker/angular-image-and-file-picker.component";
|
|
3
|
+
import * as i2 from "./angular-preview-image/angular-preview-image.component";
|
|
4
|
+
import * as i3 from "./angular-file-viewer/angular-file-viewer.component";
|
|
5
|
+
import * as i4 from "./angular-file-viewer/angular-excel-file-viewer/angular-excel-file-viewer.component";
|
|
6
|
+
import * as i5 from "./angular-file-viewer/angular-pdf-viewer/angular-pdf-viewer.component";
|
|
7
|
+
import * as i6 from "./angular-file-viewer/angular-video/angular-video.component";
|
|
8
|
+
import * as i7 from "./angular-error-dialog/angular-error-dialog.component";
|
|
9
|
+
import * as i8 from "./angular-confirmation-dialog/angular-confirmation-dialog.component";
|
|
10
|
+
import * as i9 from "./angular-qr-code-dialog/angular-qr-code-dialog.component";
|
|
11
|
+
import * as i10 from "./angular-view-connection-dialog/angular-view-connection-dialog.component";
|
|
12
|
+
import * as i11 from "./pipes/time-ago.pipe";
|
|
13
|
+
import * as i12 from "@angular/common";
|
|
14
|
+
import * as i13 from "@angular/common/http";
|
|
15
|
+
import * as i14 from "ngx-extended-pdf-viewer";
|
|
16
|
+
import * as i15 from "@angular/forms";
|
|
17
|
+
import * as i16 from "angularx-qrcode";
|
|
18
|
+
import * as i17 from "@angular/material/tooltip";
|
|
19
|
+
import * as i18 from "@angular/material/icon";
|
|
20
|
+
import * as i19 from "@angular/material/snack-bar";
|
|
21
|
+
import * as i20 from "@angular/material/progress-spinner";
|
|
22
|
+
import * as i21 from "@angular/material/input";
|
|
23
|
+
import * as i22 from "@angular/material/button";
|
|
24
|
+
import * as i23 from "@angular/material/dialog";
|
|
25
|
+
import * as i24 from "@angular/material/divider";
|
|
26
|
+
import * as i25 from "@angular/cdk/drag-drop";
|
|
27
|
+
export declare class AngularImageAndFilePickerModule {
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularImageAndFilePickerModule, never>;
|
|
29
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularImageAndFilePickerModule, [typeof i1.AngularImageAndFilePickerComponent, typeof i2.AngularPreviewImageComponent, typeof i3.AngularFileViewerComponent, typeof i4.AngularExcelFileViewerComponent, typeof i5.AngularPdfViewerComponent, typeof i6.AngularVideoComponent, typeof i7.AngularErrorDialogComponent, typeof i8.AngularConfirmationDialogComponent, typeof i9.AngularQrCodeDialogComponent, typeof i10.AngularViewConnectionDialogComponent, typeof i11.TimeAgoPipe], [typeof i12.CommonModule, typeof i13.HttpClientModule, typeof i14.NgxExtendedPdfViewerModule, typeof i15.FormsModule, typeof i15.ReactiveFormsModule, typeof i16.QRCodeComponent, typeof i17.MatTooltipModule, typeof i18.MatIconModule, typeof i19.MatSnackBarModule, typeof i20.MatProgressSpinnerModule, typeof i21.MatInputModule, typeof i22.MatButtonModule, typeof i23.MatDialogModule, typeof i24.MatDividerModule, typeof i25.DragDropModule], [typeof i1.AngularImageAndFilePickerComponent, typeof i9.AngularQrCodeDialogComponent]>;
|
|
30
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AngularImageAndFilePickerModule>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class AngularImageAndFilePickerService {
|
|
3
|
+
constructor();
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularImageAndFilePickerService, never>;
|
|
5
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AngularImageAndFilePickerService>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AngularPreviewImageComponent {
|
|
4
|
+
dialogRef: MatDialogRef<AngularPreviewImageComponent>;
|
|
5
|
+
data: any;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
isLandscape: boolean | undefined;
|
|
10
|
+
orientation: string | undefined;
|
|
11
|
+
imageWidth: number | undefined;
|
|
12
|
+
imageHeight: number | undefined;
|
|
13
|
+
constructor(dialogRef: MatDialogRef<AngularPreviewImageComponent>, data: any);
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
checkImageOrientation(imageUrl: string): void;
|
|
16
|
+
onClose(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularPreviewImageComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularPreviewImageComponent, "angular-preview-image", never, {}, {}, never, never, false, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { AngularRemoteUploadService, DevicesOnlineStatus } from '../services/angular-remote-upload.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface FieldInfo {
|
|
6
|
+
label?: string;
|
|
7
|
+
accept?: string;
|
|
8
|
+
type?: 'image' | 'file';
|
|
9
|
+
entityType?: string;
|
|
10
|
+
entityId?: any;
|
|
11
|
+
isMultiple?: boolean;
|
|
12
|
+
limit?: number;
|
|
13
|
+
isCompressed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface AngularQrCodeDialogData {
|
|
16
|
+
title?: string;
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
qrSize?: number;
|
|
19
|
+
showCountdown?: boolean;
|
|
20
|
+
fieldInfo?: FieldInfo;
|
|
21
|
+
}
|
|
22
|
+
export declare class AngularQrCodeDialogComponent implements OnInit, OnDestroy {
|
|
23
|
+
dialogRef: MatDialogRef<AngularQrCodeDialogComponent>;
|
|
24
|
+
data: AngularQrCodeDialogData;
|
|
25
|
+
private remoteUploadService;
|
|
26
|
+
qrData: string;
|
|
27
|
+
expiresAt: number;
|
|
28
|
+
remainingTime: string;
|
|
29
|
+
isLoading: boolean;
|
|
30
|
+
isExpired: boolean;
|
|
31
|
+
isConnected: boolean;
|
|
32
|
+
errorMessage: string | null;
|
|
33
|
+
connectionStatus: 'disconnected' | 'pending' | 'connected';
|
|
34
|
+
desktopDeviceId: string;
|
|
35
|
+
mobileDeviceId: string | null;
|
|
36
|
+
devicesStatus: DevicesOnlineStatus | null;
|
|
37
|
+
isCheckingStatus: boolean;
|
|
38
|
+
private destroy$;
|
|
39
|
+
private countdownSubscription;
|
|
40
|
+
constructor(dialogRef: MatDialogRef<AngularQrCodeDialogComponent>, data: AngularQrCodeDialogData, remoteUploadService: AngularRemoteUploadService);
|
|
41
|
+
ngOnInit(): void;
|
|
42
|
+
ngOnDestroy(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Check if there's an existing mobile connection
|
|
45
|
+
*/
|
|
46
|
+
private checkExistingConnection;
|
|
47
|
+
private generateQrCode;
|
|
48
|
+
private subscribeToEvents;
|
|
49
|
+
private startCountdown;
|
|
50
|
+
/**
|
|
51
|
+
* Format device ID for display
|
|
52
|
+
*/
|
|
53
|
+
formatDeviceId(id: string | null): string;
|
|
54
|
+
/**
|
|
55
|
+
* Refresh QR code
|
|
56
|
+
*/
|
|
57
|
+
refreshQrCode(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Connect to mobile (show QR if disconnected)
|
|
60
|
+
*/
|
|
61
|
+
connectToMobile(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Disconnect from mobile
|
|
64
|
+
*/
|
|
65
|
+
disconnect(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Refresh device status
|
|
68
|
+
*/
|
|
69
|
+
refreshStatus(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Get desktop online status indicator class
|
|
72
|
+
* Returns: 'online' (green), 'offline' (red), 'checking' (blinking yellow)
|
|
73
|
+
*/
|
|
74
|
+
getDesktopStatusClass(): string;
|
|
75
|
+
/**
|
|
76
|
+
* Get mobile online status indicator class
|
|
77
|
+
* Returns: 'online' (green), 'offline' (red), 'checking' (blinking yellow)
|
|
78
|
+
*/
|
|
79
|
+
getMobileStatusClass(): string;
|
|
80
|
+
/**
|
|
81
|
+
* Check if ready for transfer (both devices online)
|
|
82
|
+
*/
|
|
83
|
+
isReadyForTransfer(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Close dialog
|
|
86
|
+
*/
|
|
87
|
+
close(): void;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularQrCodeDialogComponent, never>;
|
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularQrCodeDialogComponent, "angular-qr-code-dialog", never, {}, {}, never, never, false, never>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { AngularRemoteUploadService, DevicesOnlineStatus } from '../services/angular-remote-upload.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface MobileConnectionInfo {
|
|
6
|
+
mobileDeviceId: string;
|
|
7
|
+
connectedAt: number;
|
|
8
|
+
lastActivity: number;
|
|
9
|
+
}
|
|
10
|
+
export interface AngularViewConnectionDialogData {
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class AngularViewConnectionDialogComponent implements OnInit, OnDestroy {
|
|
14
|
+
dialogRef: MatDialogRef<AngularViewConnectionDialogComponent>;
|
|
15
|
+
data: AngularViewConnectionDialogData;
|
|
16
|
+
private remoteUploadService;
|
|
17
|
+
private destroy$;
|
|
18
|
+
mobileConnection: MobileConnectionInfo | null;
|
|
19
|
+
devicesStatus: DevicesOnlineStatus | null;
|
|
20
|
+
isCheckingStatus: boolean;
|
|
21
|
+
disconnecting: boolean;
|
|
22
|
+
constructor(dialogRef: MatDialogRef<AngularViewConnectionDialogComponent>, data: AngularViewConnectionDialogData, remoteUploadService: AngularRemoteUploadService);
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Refresh device online status
|
|
27
|
+
*/
|
|
28
|
+
refreshStatus(): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Disconnect from mobile device
|
|
31
|
+
*/
|
|
32
|
+
disconnect(): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Close dialog without disconnecting
|
|
35
|
+
*/
|
|
36
|
+
close(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Truncate device ID to show first 8 and last 8 characters
|
|
39
|
+
*/
|
|
40
|
+
truncateDeviceId(deviceId: string): string;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AngularViewConnectionDialogComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AngularViewConnectionDialogComponent, "angular-view-connection-dialog", never, {}, {}, never, never, false, never>;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Config {
|
|
2
|
+
selectorId: string;
|
|
3
|
+
height: string;
|
|
4
|
+
limit: number;
|
|
5
|
+
fileSize?: number;
|
|
6
|
+
isCompressed?: boolean;
|
|
7
|
+
isStoredDb?: boolean;
|
|
8
|
+
isSliderPreview?: boolean;
|
|
9
|
+
hiddenDownloadBtn?: boolean;
|
|
10
|
+
hiddenDeleteBtn?: boolean;
|
|
11
|
+
hiddenPreview?: boolean;
|
|
12
|
+
isMultiple?: boolean;
|
|
13
|
+
selectionMode?: boolean;
|
|
14
|
+
cols: number;
|
|
15
|
+
colsForTab: number;
|
|
16
|
+
colsForMobile: number;
|
|
17
|
+
enableImageTags?: boolean;
|
|
18
|
+
useAdvancedCamera?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type FileViewerFileType = 'pdf' | 'excel' | 'csv' | 'image' | 'video' | 'raw';
|
|
2
|
+
export interface FileViewerDialogData {
|
|
3
|
+
src: string;
|
|
4
|
+
fileType: FileViewerFileType;
|
|
5
|
+
}
|
|
6
|
+
export interface OptionConfig {
|
|
7
|
+
selectorId?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
fileSize?: number;
|
|
10
|
+
height?: string;
|
|
11
|
+
isCompressed?: boolean;
|
|
12
|
+
isSliderPreview?: boolean;
|
|
13
|
+
hiddenDownloadBtn?: boolean;
|
|
14
|
+
hiddenDeleteBtn?: boolean;
|
|
15
|
+
hiddenPreview?: boolean;
|
|
16
|
+
isMultiple?: boolean;
|
|
17
|
+
selectionMode?: boolean;
|
|
18
|
+
cols?: number;
|
|
19
|
+
colsForTab?: number;
|
|
20
|
+
colsForMobile?: number;
|
|
21
|
+
enableImageTags?: boolean;
|
|
22
|
+
useAdvancedCamera?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface UrlConfig {
|
|
25
|
+
getUploadUrl: string;
|
|
26
|
+
attachToEntity: string | null;
|
|
27
|
+
updateTag: string | null;
|
|
28
|
+
updateSequence: string | null;
|
|
29
|
+
removeImage: string;
|
|
30
|
+
}
|
|
31
|
+
export interface DialogConfig {
|
|
32
|
+
panelClass?: string | null;
|
|
33
|
+
title?: string | null;
|
|
34
|
+
message?: string | null;
|
|
35
|
+
iconClass?: string | null;
|
|
36
|
+
icon?: string | null;
|
|
37
|
+
approveButtonText?: string | null;
|
|
38
|
+
approveButtonClass?: string | null;
|
|
39
|
+
cancelButtonText?: string | null;
|
|
40
|
+
cancelButtonClass?: string | null;
|
|
41
|
+
}
|