@servicemind.tis/angular-image-and-file-picker 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +54 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,10 +28,14 @@ npm install @servicemind.tis/angular-image-and-file-picker
28
28
 
29
29
  ### Peer Dependencies
30
30
 
31
+ All of these are declared as peer dependencies and must be installed alongside the library:
32
+
31
33
  ```bash
32
- npm install @angular/material @angular/cdk
34
+ npm install @angular/material @angular/cdk ngx-extended-pdf-viewer angularx-qrcode
33
35
  ```
34
36
 
37
+ `ngx-extended-pdf-viewer` powers the PDF preview and `angularx-qrcode` renders the pairing QR code for upload-from-phone. Both are required even if you don't use those features, because the library's NgModule imports them.
38
+
35
39
  ---
36
40
 
37
41
  ## 🧩 Module Setup
@@ -82,17 +86,50 @@ This is the main component that allows users to upload and preview files.
82
86
 
83
87
  ### ✅ Inputs
84
88
 
85
- | Input | Type | Description |
86
- |---------------|---------------------|-------------|
87
- | `urlConfig` | `UrlConfig` | API endpoints for upload, attach, delete |
88
- | `entityType` | `string` | Type of the associated entity |
89
- | `disabled` | `boolean` | Disable upload actions |
90
- | `viewType` | `'card'` | View format |
91
- | `options` | `UploadOptions` | Visual and functional configurations |
92
- | `accept` | `string` | Allowed file types (e.g., `.jpg,.png`) |
93
- | `label` | `string` | Upload label |
94
- | `data` | `any[]` | Existing file data to render |
95
- | `dialogConfig`| `DialogConfig` | Custom confirmation dialog settings |
89
+ `urlConfig` is the only required input — it is declared `@Input({ required: true })`.
90
+
91
+ | Input | Type | Default | Description |
92
+ |---|---|---|---|
93
+ | `urlConfig` | `UrlConfig` | — | **Required.** API endpoints for upload, attach and delete |
94
+ | `entityType` | `string` | — | Type of the associated entity |
95
+ | `entityId` | `any` | — | Id of the associated entity |
96
+ | `type` | `'image' \| 'file'` | `'image'` | What the picker accepts |
97
+ | `viewType` | `'card' \| 'list' \| 'compact'` | `'card'` | Layout of the previews |
98
+ | `label` | `string \| null` | `null` | Upload label |
99
+ | `hint` | `string \| null` | `null` | Hint text below the control |
100
+ | `data` | `any` | — | Existing files to render |
101
+ | `accept` | `string` | `''` | Allowed file types, e.g. `.jpg,.png` |
102
+ | `isValidateMimeType` | `boolean` | `true` | Validate the real MIME type, not just the extension |
103
+ | `disabled` | `boolean` | `false` | Disable upload actions |
104
+ | `required` | `boolean` | `false` | Show the required indicator |
105
+ | `selectedId` | `any` | `null` | Pre-select a file by id |
106
+ | `options` | `OptionConfig \| null` | `null` | Visual and functional configuration |
107
+ | `previewOnly` | `boolean` | `false` | Render previews with no upload affordance |
108
+ | `previewInFlex` | `boolean` | `false` | Lay previews out with flex instead of grid |
109
+ | `imageItemClass` | `string` | `''` | Extra classes on each preview tile |
110
+ | `isAddUploadedFileInLastNode` | `boolean` | `false` | Append new uploads instead of prepending |
111
+ | `isEnableDeleteConfirmation` | `boolean` | `true` | Confirm before deleting |
112
+ | `deleteConfirmationMsg` | `string` | — | Override the confirmation text |
113
+ | `isEnableCapture` | `boolean` | `false` | Offer camera capture |
114
+ | `dialogConfig` | `DialogConfig` | — | Confirmation dialog labels and sizing |
115
+ | `enableDragNDropForUpload` | `boolean` | `false` | Accept files dropped onto the control |
116
+ | `enableDragNDrop` | `boolean` | `false` | Allow reordering previews by dragging |
117
+ | `isShowImageSequence` | `boolean` | `false` | Show the ordering index on each preview |
118
+ | `editTagButtonWhenDisabled` | `boolean` | `false` | Keep the tag button active while disabled |
119
+ | `showDeleteButtonWhenDisabled` | `boolean` | `false` | Keep the delete button visible while disabled |
120
+ | `remoteUploadConfig` | `AngularRemoteUploadConfig \| null` | `null` | Enables upload-from-phone via QR pairing |
121
+
122
+ ### 📡 Outputs
123
+
124
+ | Output | Emits | Description |
125
+ |---|---|---|
126
+ | `onFileSelect` | `any` | A file was chosen, before upload starts |
127
+ | `uploadInProgress` | — | Upload started |
128
+ | `onUploaded` | — | Upload finished |
129
+ | `onFileRemoved` | `any` | A file was removed |
130
+ | `onError` | — | Upload or validation failed |
131
+ | `onRemoteUpload` | `AngularRemoteUploadEvent` | Progress of a phone-paired remote upload |
132
+ | `dataSequenceChange` | `any` | Preview order changed via drag and drop |
96
133
 
97
134
  ---
98
135
 
@@ -190,8 +227,11 @@ bootstrapApplication(AppComponent, {
190
227
 
191
228
  The component uses Angular Material — ensure a theme is included:
192
229
 
193
- ```scss
194
- @import "~@angular/material/prebuilt-themes/indigo-pink.css";
230
+ ```json
231
+ "styles": [
232
+ "@angular/material/prebuilt-themes/azure-blue.css",
233
+ "src/styles.scss"
234
+ ]
195
235
  ```
196
236
 
197
237
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicemind.tis/angular-image-and-file-picker",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Angular image and file upload component with drag-and-drop, pre-signed URL uploads, client-side compression, camera capture, and built-in preview for images, PDFs, video, and Excel.",
5
5
  "keywords": [
6
6
  "angular",