irisa-minio 20.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/README.md +131 -0
- package/fesm2022/irisa-minio.mjs +824 -0
- package/fesm2022/irisa-minio.mjs.map +1 -0
- package/index.d.ts +171 -0
- package/package.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
irisa-minio
|
|
2
|
+
|
|
3
|
+
<!-- minio-image -->
|
|
4
|
+
|
|
5
|
+
image?: FileModel;
|
|
6
|
+
|
|
7
|
+
<!-- example 1 -->
|
|
8
|
+
<div class="col-12 m-0">
|
|
9
|
+
<minio-image [(ngModel)]="model.image"
|
|
10
|
+
name="image"
|
|
11
|
+
id="image">
|
|
12
|
+
<ng-template #upload
|
|
13
|
+
let-preview="preview"
|
|
14
|
+
let-uploadStateIsWait="uploadStateIsWait"
|
|
15
|
+
let-downloadStateIsWait="downloadStateIsWait"
|
|
16
|
+
let-onUpload="upload">
|
|
17
|
+
<div class="position-relative wh-90px">
|
|
18
|
+
@if(preview) {
|
|
19
|
+
<img [src]="preview"
|
|
20
|
+
class="radius-8 me-8px border"
|
|
21
|
+
width="90"
|
|
22
|
+
height="90">
|
|
23
|
+
}
|
|
24
|
+
@else {
|
|
25
|
+
<div class="radius-8 border flex-center wh-90px">
|
|
26
|
+
<i class="ri-user-3-line fs-72 text-gray-400"></i>
|
|
27
|
+
</div>
|
|
28
|
+
}
|
|
29
|
+
@if(!uploadStateIsWait && !downloadStateIsWait){
|
|
30
|
+
<button class="btn border bg-white text-gray-500 flex-center rounded-circle p-4px upload-btn"
|
|
31
|
+
(click)="onUpload()">
|
|
32
|
+
<i class="fs-18 ri-camera-line"></i>
|
|
33
|
+
</button>
|
|
34
|
+
}
|
|
35
|
+
@if(uploadStateIsWait || downloadStateIsWait){
|
|
36
|
+
<div class="flex-center loading">
|
|
37
|
+
<span class="spinner-grow spinner-grow-sm"></span>
|
|
38
|
+
</div>
|
|
39
|
+
}
|
|
40
|
+
</div>
|
|
41
|
+
</ng-template>
|
|
42
|
+
</minio-image>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- example 2 -->
|
|
46
|
+
<div class="col-md-12">
|
|
47
|
+
<label for="image"
|
|
48
|
+
class="is-required"
|
|
49
|
+
[innerText]="'HeaderImage' | gloss: glosses"></label>
|
|
50
|
+
<minio-image [(ngModel)]="model.image"
|
|
51
|
+
name="image"
|
|
52
|
+
id="image"
|
|
53
|
+
[accept]="['image/png','image/jpeg']"
|
|
54
|
+
[maxWidth]="700"
|
|
55
|
+
[maxHeight]="400"
|
|
56
|
+
[maxSize]="10"
|
|
57
|
+
sizeUnit="MB"
|
|
58
|
+
required>
|
|
59
|
+
</minio-image>
|
|
60
|
+
@for (item of formModel.form | transformErrors:'image'; track $index) {
|
|
61
|
+
<div class="d-flex align-items-center text-danger mt-1 fs-12 font-regular">
|
|
62
|
+
<i class="ri-close-circle-line"></i>
|
|
63
|
+
<span [innerText]="item.message | gloss: glosses: item.params"></span>
|
|
64
|
+
</div>
|
|
65
|
+
}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- example 3 -->
|
|
69
|
+
<div class="col-md-4 border radius-16 max-h-400px">
|
|
70
|
+
<minio-image [(ngModel)]="model.image"
|
|
71
|
+
name="image1"
|
|
72
|
+
id="image1"
|
|
73
|
+
class="h-100 flex-center">
|
|
74
|
+
<ng-template #preview
|
|
75
|
+
let-preview="preview">
|
|
76
|
+
@if(preview) {
|
|
77
|
+
<img [src]="preview"
|
|
78
|
+
class="radius-16 mh-100 mw-100">
|
|
79
|
+
}
|
|
80
|
+
@else {
|
|
81
|
+
<i class="ri-image-line fs-72 text-gray-400"></i>
|
|
82
|
+
}
|
|
83
|
+
</ng-template>
|
|
84
|
+
</minio-image>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<!-- minio-file-upload -->
|
|
89
|
+
|
|
90
|
+
attachments?: FileModel[];
|
|
91
|
+
|
|
92
|
+
<!-- example 1 -->
|
|
93
|
+
<div class="row mx-0 border radius-16 py-16px px-8px my-16px">
|
|
94
|
+
<label [innerText]="'Attachment' | gloss: glosses"></label>
|
|
95
|
+
<minio-file-upload [(ngModel)]="model.attachments"
|
|
96
|
+
name="attachments"
|
|
97
|
+
readOnly>
|
|
98
|
+
</minio-file-upload>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<!-- example 2 -->
|
|
102
|
+
<minio-file-upload [(ngModel)]="ticket.files"
|
|
103
|
+
name="attachments"
|
|
104
|
+
[maxSize]="20"
|
|
105
|
+
[sizeUnit]="'MB'"
|
|
106
|
+
[limit]="5"
|
|
107
|
+
[accept]="['application/pdf', 'image/png', 'image/jpeg']"
|
|
108
|
+
[disabled]="sendStatus.IsWait"
|
|
109
|
+
[buttonOnly]="true"
|
|
110
|
+
[multiple]="true">
|
|
111
|
+
</minio-file-upload>
|
|
112
|
+
|
|
113
|
+
<!-- example 3 -->
|
|
114
|
+
<div class="col-md-12">
|
|
115
|
+
<label for="attachments"
|
|
116
|
+
[innerText]="'Attachments' | gloss: glosses"></label>
|
|
117
|
+
<minio-file-upload [(ngModel)]="model.attachments"
|
|
118
|
+
name="attachments"
|
|
119
|
+
[maxSize]="20"
|
|
120
|
+
[sizeUnit]="'MB'"
|
|
121
|
+
[accept]="['application/pdf', 'image/png', 'image/jpeg']"
|
|
122
|
+
[multiple]="false"
|
|
123
|
+
required>
|
|
124
|
+
</minio-file-upload>
|
|
125
|
+
@for (item of formModel.form | transformErrors:'attachments'; track $index) {
|
|
126
|
+
<div class="d-flex align-items-center text-danger mt-1 fs-12 font-regular">
|
|
127
|
+
<i class="ri-close-circle-line"></i>
|
|
128
|
+
<span [innerText]="item.message | gloss: glosses"></span>
|
|
129
|
+
</div>
|
|
130
|
+
}
|
|
131
|
+
</div>
|