@eqproject/eqp-attachments 2.0.5 → 2.0.6
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/README.md +7 -5
- package/esm2020/lib/eqp-attachments.component.mjs +7 -9
- package/esm2020/lib/eqp-attachments.module.mjs +4 -4
- package/esm2020/lib/helpers/attachment.helper.mjs +3 -3
- package/esm2020/lib/modules/material.module.mjs +4 -4
- package/esm2020/lib/services/eqp-attachment-dialog.service.mjs +3 -3
- package/esm2020/lib/services/eqp-attachment.service.mjs +4 -7
- package/fesm2015/eqproject-eqp-attachments.mjs +23 -28
- package/fesm2015/eqproject-eqp-attachments.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-attachments.mjs +23 -28
- package/fesm2020/eqproject-eqp-attachments.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,6 +98,8 @@ export class AppModule {}
|
|
|
98
98
|
| [separatedUploadButtons] | `boolean` | `false` | no | It allows you to establish, if the uploading buttons are separated or included in a menu (default: false) |
|
|
99
99
|
| [singleAttachmentDragAndDrop] | `boolean` | `false` | no | In the case of single attachment management, it allows you to establish if the drag and drop is included for the upload of the file (default: false) |
|
|
100
100
|
| [cropOptions] | `Array<CropOptionEnum>` | `[]` | no | Array of options to include during the crop of a file |
|
|
101
|
+
| [allowedTypes] | `Array<AttachmentType>` | `[ AttachmentType.FILE, AttachmentType.LINK ]` | no | Array to establish what type of attachments can be loaded |
|
|
102
|
+
|
|
101
103
|
|
|
102
104
|
|
|
103
105
|
### Outputs
|
|
@@ -120,7 +122,7 @@ export class AppModule {}
|
|
|
120
122
|
| FileContentType | Contains the content type of the uploaded file | `string` | "image/bmp", "image/gif", "image/jpeg", ... |
|
|
121
123
|
| FileExtension | Contains the extension of the uploaded file | `string` | "pdf", "jpg", "docx",... |
|
|
122
124
|
| FilePath | Contains the path where the uploaded file gets physically saved or contains the actual link uploaded by the user | `string` | "C:\\Users\\EQProject\\Desktop\\" or "https://eqproject.it/".
|
|
123
|
-
| AttachmentType | It is an enum defining the type of the IAttachmentDTO | `AttachmentType` | Possible values: `FILE = 1` and `
|
|
125
|
+
| AttachmentType | It is an enum defining the type of the IAttachmentDTO | `AttachmentType` | Possible values: `FILE = 1`, `LINK = 2` and `DROPBOX = 3`. |
|
|
124
126
|
| FileDataBase64 | Contains the base64 string of the uploaded file | `string` | - |
|
|
125
127
|
| IsImage | It is set to TRUE if the uploaded file is an image. | `boolean` | - |
|
|
126
128
|
| FileThumbnailBase64 | Contains the base64 string of a thumbnail of the uploaded image. When uploading an attachment it is always null. Usefull to display the inline preview of a previously uploaded image if the full image base64 is too havy (specially loading a long list of IAttachmentDTO). | `string` | - |
|
|
@@ -136,7 +138,7 @@ export class AppModule {}
|
|
|
136
138
|
|
|
137
139
|
| EnumType | Description | Notes |
|
|
138
140
|
| ------------- | ------------- | ------------- |
|
|
139
|
-
| AttachmentType | Define the type of the IAttachmentDTO | FILE = 1: the user uploaded a file; LINK = 2: the user uploaded a link |
|
|
141
|
+
| AttachmentType | Define the type of the IAttachmentDTO | FILE = 1: the user uploaded a file; LINK = 2: the user uploaded a link; DROPBOX = 3: the user uploaded a file using Dropbox |
|
|
140
142
|
|
|
141
143
|
|
|
142
144
|
|
|
@@ -153,8 +155,8 @@ File upload modal has been removed. So when using ViewChild, use addFile() funct
|
|
|
153
155
|
CASE 1: Single attachment
|
|
154
156
|
```html
|
|
155
157
|
<eqp-attachments
|
|
156
|
-
[multipleAttachment]="false" [attachmentsList]="singleAttachment"
|
|
157
|
-
[allowOnlyImages]="false"
|
|
158
|
+
[multipleAttachment]="false" [attachmentsList]="[singleAttachment]"
|
|
159
|
+
[allowOnlyImages]="false"
|
|
158
160
|
[isDisabled]="false" [allowedTypes]="[1,2,3]"
|
|
159
161
|
(downloadAttachment)="viewAttachment($event)"
|
|
160
162
|
(localEditedAttachments)="catchAttachmentList($event)"
|
|
@@ -226,4 +228,4 @@ CASE 2: Multiple attachments
|
|
|
226
228
|
```
|
|
227
229
|
|
|
228
230
|
## Credits
|
|
229
|
-
This library has been developed by EqProject SRL, for more info contact: info@eqproject.it
|
|
231
|
+
This library has been developed by EqProject SRL, for more info contact: info@eqproject.it
|