@eqproject/eqp-attachments 2.0.1 → 2.0.3
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 +21 -4
- package/esm2020/lib/eqp-attachments.component.mjs +250 -58
- package/esm2020/lib/eqp-attachments.module.mjs +12 -8
- package/esm2020/lib/helpers/attachment.helper.mjs +9 -4
- package/esm2020/lib/interfaces/IAttachment.mjs +7 -1
- 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 +27 -0
- package/fesm2015/eqproject-eqp-attachments.mjs +315 -93
- package/fesm2015/eqproject-eqp-attachments.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-attachments.mjs +307 -77
- package/fesm2020/eqproject-eqp-attachments.mjs.map +1 -1
- package/lib/eqp-attachments.component.d.ts +58 -10
- package/lib/eqp-attachments.module.d.ts +2 -1
- package/lib/helpers/attachment.helper.d.ts +1 -0
- package/lib/interfaces/IAttachment.d.ts +6 -1
- package/lib/services/eqp-attachment.service.d.ts +7 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -77,7 +77,14 @@ export class AppModule {}
|
|
|
77
77
|
| [abortLabel] | `string` | `"Annulla"` | no | Sets the abort button label. |
|
|
78
78
|
| [saveLabel] | `string` | `"Salva"` | no | Sets the save button label. |
|
|
79
79
|
| [exitLabel] | `string` | `"Esci"` | no | Sets the exit button label. |
|
|
80
|
+
| [uploadWithDropboxLabel] | `string` | `"Carica con Dropbox"` | no | Sets the dropbox button label.";
|
|
81
|
+
| [cropLabel] | `string` | `"Scegli le dimensioni dell'immagine"` | no | Sets the crop label.";
|
|
82
|
+
| [flipHorinzontalLabel] | `string` | `"Capovolgi orizzontalmente"` | no | Sets the horizontal flip button label.";
|
|
83
|
+
| [flipVerticalLabel] | `string` | `"Capovolgi verticalmente"` | no | Sets the vertical flip button label.";
|
|
84
|
+
| [rotateRightLabel] | `string` | `"Ruota a destra"` | no | Sets the rotation left button label.";
|
|
85
|
+
| [rotateLeftLabel] | `string` | `"Ruota a sinistra"` | no | Sets the rotation right button label.";
|
|
80
86
|
| [eqpTableSearchText] | `string` | `"Cerca"` | no | Sets the eqp-table search input placeholder. |
|
|
87
|
+
| [isTableSearcheable] | `boolean` | `true` | no | It allows you to establish, in the case of multiple attachments management, whether the table is searchable or not (default: true) |
|
|
81
88
|
| [deleteDialogTitle] | `string` | `"Sei sicuro di voler procedere?"` | no | Sets the confirm dialog title when deleting an IAttachmentDTO. |
|
|
82
89
|
| [deleteDialogMessage] | `string` | `"Sei sicuro di voler cancellare quest'allegato?"` | no | Sets the confirm dialog message when deleting an IAttachmentDTO. |
|
|
83
90
|
| [noImageSelectedErrorMessage] | `string` | `"Non è possibile selezionare un file che non sia un'immagine"` | no | Has effect only if `[allowOnlyImages]="true"`. Sets the error dialog message when the user tries to upload a file which is not an image. |
|
|
@@ -87,6 +94,10 @@ export class AppModule {}
|
|
|
87
94
|
| [isEqpTableMultiLanguage] | `boolean` | `false` | no | It allows you to establish whether the eqp-table containing the list of attachments uses multilanguage or not |
|
|
88
95
|
| [tablePaginatorVisible] | `boolean` | `true` | no | It allows you to establish, in the case of multiple attachments management, whether the table containing the list of attachments must be paged or not (default: true) |
|
|
89
96
|
| [tablePaginatorSize] | `number` | `null` | no | In case of managing multiple attachments, it allows you to establish the default page size for the table containing the list of attachments (default: null) |
|
|
97
|
+
| [showPreview] | `boolean` | `true` | no | It allows you to establish if there is the possibility to view the preview (default: true) |
|
|
98
|
+
| [separatedUploadButtons] | `boolean` | `false` | no | It allows you to establish, if the uploading buttons are separated or included in a menu (default: false) |
|
|
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
|
+
| [cropOptions] | `Array<CropOptionEnum>` | `[]` | no | Array of options to include during the crop of a file |
|
|
90
101
|
|
|
91
102
|
|
|
92
103
|
### Outputs
|
|
@@ -138,9 +149,14 @@ To make this examples work you need to replace the FileDataBase64 property value
|
|
|
138
149
|
|
|
139
150
|
CASE 1: Single attachment
|
|
140
151
|
```html
|
|
141
|
-
<eqp-attachments
|
|
142
|
-
[
|
|
143
|
-
|
|
152
|
+
<eqp-attachments
|
|
153
|
+
[multipleAttachment]="false" [attachmentsList]="singleAttachment"
|
|
154
|
+
[allowOnlyImages]="false" [compressionOptions]="compressionOptions"
|
|
155
|
+
[isDisabled]="false" [allowedTypes]="[1,2,3]"
|
|
156
|
+
(downloadAttachment)="viewAttachment($event)"
|
|
157
|
+
(localEditedAttachments)="catchAttachmentList($event)"
|
|
158
|
+
(onDeleteAttachment)="onDeleteAttachment($event)"
|
|
159
|
+
[showPreview]="false" [cropOptions]="[1,2]">
|
|
144
160
|
</eqp-attachments>
|
|
145
161
|
```
|
|
146
162
|
|
|
@@ -172,7 +188,8 @@ CASE 2: Multiple attachments
|
|
|
172
188
|
```html
|
|
173
189
|
<eqp-attachments [multipleAttachment]="true" [attachmentsList]="attachmentsList"
|
|
174
190
|
[allowOnlyImages]="false" [downloadTooltipPosition]="'below'" (downloadAttachment)="viewAttachment($event)"
|
|
175
|
-
(localEditedAttachments)="catchAttachmentList($event)"
|
|
191
|
+
(localEditedAttachments)="catchAttachmentList($event)" [isTableSearcheable]="false"
|
|
192
|
+
[tablePaginatorVisible]="false" [allowedTypes]="[1,2,3]" [cropOptions]="[1,2]">
|
|
176
193
|
</eqp-attachments>
|
|
177
194
|
```
|
|
178
195
|
|