@servicemind.tis/tis-image-and-file-upload-and-view 1.2.24 → 1.2.26

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.
@@ -65,12 +65,19 @@ export interface TisSocketAdapter {
65
65
  getUserId?(): string | Promise<string>;
66
66
  /**
67
67
  * Send a message directly via socket (for handshake and communication)
68
- * @param message - The message to send { action: string, data: any }
68
+ * @param message - The message to send { action: string; data: any }
69
69
  */
70
70
  sendViaSocket?(message: {
71
71
  action: string;
72
72
  data: any;
73
73
  }): void;
74
+ /**
75
+ * Call API via socket and get response as Observable
76
+ * @param route - The API route to call
77
+ * @param body - The request body
78
+ * @returns Observable that emits the API response
79
+ */
80
+ callApiViaSocket?(route: string, body: any): Observable<any>;
74
81
  }
75
82
  /**
76
83
  * Configuration for remote upload feature
@@ -88,7 +88,7 @@ export declare class TisRemoteUploadService implements OnDestroy {
88
88
  */
89
89
  private buildQrUrl;
90
90
  /**
91
- * Send message to mobile device
91
+ * Send message to mobile device via channel
92
92
  */
93
93
  sendToMobile(type: string, data: any): void;
94
94
  /**
@@ -96,9 +96,13 @@ export declare class TisRemoteUploadService implements OnDestroy {
96
96
  */
97
97
  private acceptMobileConnection;
98
98
  /**
99
- * Disconnect from mobile device
99
+ * Disconnect from mobile device - call API and clear local state
100
100
  */
101
- disconnect(): void;
101
+ disconnect(): Promise<void>;
102
+ /**
103
+ * Handle disconnect initiated from remote (mobile) side
104
+ */
105
+ private handleRemoteDisconnect;
102
106
  /**
103
107
  * Subscribe to channel for receiving messages from mobile
104
108
  */
@@ -107,6 +111,11 @@ export declare class TisRemoteUploadService implements OnDestroy {
107
111
  * Handle incoming channel messages from mobile
108
112
  */
109
113
  private handleChannelMessage;
114
+ /**
115
+ * Handle mobile-link-established message
116
+ * This is sent when mobile successfully connects via the backend
117
+ */
118
+ private handleMobileLinkEstablished;
110
119
  /**
111
120
  * Handle connection state messages from mobile
112
121
  */
@@ -6,7 +6,7 @@ import { BreakpointObserver } from '@angular/cdk/layout';
6
6
  import { TisHelperService } from '../services/tis-helper.service';
7
7
  import { TisRemoteUploadService } from '../services/tis-remote-upload.service';
8
8
  import { Config } from '../interfaces/config.type';
9
- import { CdkDragDrop } from '@angular/cdk/drag-drop';
9
+ import { CdkDragDrop, CdkDragMove } from '@angular/cdk/drag-drop';
10
10
  import * as i0 from "@angular/core";
11
11
  export declare class TisImageAndFileUploadAndViewComponent implements OnDestroy {
12
12
  dialog: MatDialog;
@@ -98,10 +98,18 @@ export declare class TisImageAndFileUploadAndViewComponent implements OnDestroy
98
98
  openImagePreviewDialog(url: string): void;
99
99
  openFileViewer(pdfUrl: string, fileType: FileViewerFileType): void;
100
100
  checkingForPreview(img: string): boolean;
101
- setHeight(id: string): string;
102
101
  generateFilesForSingleCard(): void;
103
102
  editTagWithSpace(file: any): void;
104
103
  onSubmitTags(file: any): void;
104
+ isDragging: boolean;
105
+ dragSourceIndex: number | null;
106
+ dropTargetIndex: number | null;
107
+ onDragStarted(index: number): void;
108
+ onDragEntered(index: number): void;
109
+ onDragMoved(event: CdkDragMove): void;
110
+ onMouseEnterItem(index: number): void;
111
+ onMouseLeaveItem(): void;
112
+ onDragEnded(): void;
105
113
  drop(event: CdkDragDrop<any[]>): void;
106
114
  updateSequence(isShowMessage?: boolean): void;
107
115
  getTagsArray(tags: string): any[];
@@ -3,12 +3,23 @@ import { MatDialogRef } from '@angular/material/dialog';
3
3
  import { TisRemoteUploadService } from '../services/tis-remote-upload.service';
4
4
  import { TisRemoteUploadEvent } from '../interfaces/socket-adapter.interface';
5
5
  import * as i0 from "@angular/core";
6
+ export interface FieldInfo {
7
+ label?: string;
8
+ accept?: string;
9
+ type?: 'image' | 'file';
10
+ entityType?: string;
11
+ entityId?: any;
12
+ isMultiple?: boolean;
13
+ limit?: number;
14
+ isCompressed?: boolean;
15
+ }
6
16
  export interface TisQrCodeDialogData {
7
17
  title?: string;
8
18
  subtitle?: string;
9
19
  qrSize?: number;
10
20
  showCountdown?: boolean;
11
21
  autoCloseOnUpload?: boolean;
22
+ fieldInfo?: FieldInfo;
12
23
  }
13
24
  export declare class TisQrCodeDialogComponent implements OnInit, OnDestroy {
14
25
  dialogRef: MatDialogRef<TisQrCodeDialogComponent>;
@@ -36,6 +47,10 @@ export declare class TisQrCodeDialogComponent implements OnInit, OnDestroy {
36
47
  private checkExistingConnection;
37
48
  private generateQrCode;
38
49
  private subscribeToEvents;
50
+ /**
51
+ * Send field configuration to mobile device
52
+ */
53
+ private sendFieldInfoToMobile;
39
54
  private startCountdown;
40
55
  /**
41
56
  * Format device ID for display
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicemind.tis/tis-image-and-file-upload-and-view",
3
- "version": "1.2.24",
3
+ "version": "1.2.26",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0",