shirkasoft-ui-components 1.14.0 → 2.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 +4 -8
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +363 -69
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +905 -843
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1440
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -300
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +1028 -533
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-knob.mjs +389 -201
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -314
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -327
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -819
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +1916 -1698
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -175
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +175 -49
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -402
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +310 -124
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme.mjs +141 -174
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -203
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +179 -109
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +95 -134
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -165
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components.mjs +0 -9
- package/package.json +5 -5
- package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
- package/types/shirkasoft-ui-components-button.d.ts +142 -49
- package/types/shirkasoft-ui-components-chart.d.ts +59 -44
- package/types/shirkasoft-ui-components-config.d.ts +193 -204
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -66
- package/types/shirkasoft-ui-components-date-picker.d.ts +527 -398
- package/types/shirkasoft-ui-components-fieldset.d.ts +135 -60
- package/types/shirkasoft-ui-components-file-upload.d.ts +176 -112
- package/types/shirkasoft-ui-components-icons.d.ts +1302 -1294
- package/types/shirkasoft-ui-components-knob.d.ts +144 -78
- package/types/shirkasoft-ui-components-loading.d.ts +155 -64
- package/types/shirkasoft-ui-components-modal.d.ts +134 -136
- package/types/shirkasoft-ui-components-notification.d.ts +63 -59
- package/types/shirkasoft-ui-components-price-input.d.ts +198 -113
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
- package/types/shirkasoft-ui-components-select.d.ts +301 -196
- package/types/shirkasoft-ui-components-sidebar.d.ts +198 -93
- package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
- package/types/shirkasoft-ui-components-table.d.ts +849 -660
- package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
- package/types/shirkasoft-ui-components-tag.d.ts +54 -23
- package/types/shirkasoft-ui-components-text-field.d.ts +231 -127
- package/types/shirkasoft-ui-components-theme-picker.d.ts +92 -58
- package/types/shirkasoft-ui-components-theme.d.ts +56 -64
- package/types/shirkasoft-ui-components-timeline.d.ts +325 -150
- package/types/shirkasoft-ui-components-toggle.d.ts +73 -49
- package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
- package/types/shirkasoft-ui-components-utils.d.ts +15 -16
- package/types/shirkasoft-ui-components-wizard.d.ts +236 -87
- package/types/shirkasoft-ui-components.d.ts +1 -2
- package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
|
@@ -1,301 +1,485 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { CommonModule } from
|
|
4
|
-
import { TranslocoService } from
|
|
5
|
-
import { LucideUpload, ShkIconDirective } from
|
|
6
|
-
import { getIcon } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input, model, output, signal } from "@angular/core";
|
|
3
|
+
import { CommonModule } from "@angular/common";
|
|
4
|
+
import { TranslocoService } from "@jsverse/transloco";
|
|
5
|
+
import { LucideUpload, ShkIconDirective } from "shirkasoft-ui-components/icons";
|
|
6
|
+
import { getIcon } from "shirkasoft-ui-components/utils";
|
|
7
|
+
var FileUploadComponent = class FileUploadComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.getIcon = (name) => getIcon(name, LucideUpload);
|
|
10
|
+
this.transloco = inject(TranslocoService);
|
|
11
|
+
this.label = input("Cargar archivo", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
12
|
+
this.accept = input("image/*", ...ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []);
|
|
13
|
+
this.maxFileSize = input(2097152, ...ngDevMode ? [{ debugName: "maxFileSize" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this.maxFiles = input(0, ...ngDevMode ? [{ debugName: "maxFiles" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.fileUploadText = input("Seleccionar archivo", ...ngDevMode ? [{ debugName: "fileUploadText" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.fileRecommendation = input("", ...ngDevMode ? [{ debugName: "fileRecommendation" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.changeFilesText = input("Cambiar archivos", ...ngDevMode ? [{ debugName: "changeFilesText" }] : /* istanbul ignore next */ []);
|
|
18
|
+
this.multiple = input(false, ...ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []);
|
|
19
|
+
this.existingFiles = input([], ...ngDevMode ? [{ debugName: "existingFiles" }] : /* istanbul ignore next */ []);
|
|
20
|
+
this.existingDisplay = input("chips", ...ngDevMode ? [{ debugName: "existingDisplay" }] : /* istanbul ignore next */ []);
|
|
21
|
+
this.fileSelected = output();
|
|
22
|
+
this.fileRemoved = output();
|
|
23
|
+
this.fileError = output();
|
|
24
|
+
this.fileWarning = output();
|
|
25
|
+
this.existingFileAction = output();
|
|
26
|
+
this.existingFileRemove = output();
|
|
27
|
+
this.value = model([], ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this.touch = output();
|
|
29
|
+
this.errorMessage = signal("", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.isDragOver = signal(false, ...ngDevMode ? [{ debugName: "isDragOver" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.previewUrls = /* @__PURE__ */ new Map();
|
|
32
|
+
this.canAddMore = computed(() => {
|
|
33
|
+
if (!this.multiple()) return this.selectedFiles().length === 0;
|
|
34
|
+
const max = this.maxFiles();
|
|
35
|
+
if (max <= 0) return true;
|
|
36
|
+
return this.selectedFiles().length < max;
|
|
37
|
+
}, ...ngDevMode ? [{ debugName: "canAddMore" }] : /* istanbul ignore next */ []);
|
|
38
|
+
this.maxReached = computed(() => {
|
|
39
|
+
const max = this.maxFiles();
|
|
40
|
+
if (max <= 0) return false;
|
|
41
|
+
return this.selectedFiles().length >= max;
|
|
42
|
+
}, ...ngDevMode ? [{ debugName: "maxReached" }] : /* istanbul ignore next */ []);
|
|
43
|
+
}
|
|
44
|
+
get selectedFiles() {
|
|
45
|
+
return this.value;
|
|
46
|
+
}
|
|
47
|
+
isImageFile(file) {
|
|
48
|
+
return file.type.startsWith("image/");
|
|
49
|
+
}
|
|
50
|
+
previewUrl(file) {
|
|
51
|
+
if (!this.previewUrls.has(file)) this.previewUrls.set(file, URL.createObjectURL(file));
|
|
52
|
+
return this.previewUrls.get(file) ?? "";
|
|
53
|
+
}
|
|
54
|
+
onDragOver(event) {
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
this.isDragOver.set(true);
|
|
58
|
+
}
|
|
59
|
+
onDragLeave(event) {
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
event.stopPropagation();
|
|
62
|
+
this.isDragOver.set(false);
|
|
63
|
+
}
|
|
64
|
+
onDrop(event) {
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
event.stopPropagation();
|
|
67
|
+
this.isDragOver.set(false);
|
|
68
|
+
const files = event.dataTransfer?.files;
|
|
69
|
+
if (files && files.length > 0) this.processFiles(Array.from(files));
|
|
70
|
+
}
|
|
71
|
+
onFileChange(event) {
|
|
72
|
+
const input = event.target;
|
|
73
|
+
const files = input.files;
|
|
74
|
+
if (files && files.length > 0) this.processFiles(Array.from(files));
|
|
75
|
+
input.value = "";
|
|
76
|
+
}
|
|
77
|
+
processFiles(files) {
|
|
78
|
+
this.errorMessage.set("");
|
|
79
|
+
const validFiles = [];
|
|
80
|
+
for (const file of files) {
|
|
81
|
+
const error = this.validateFile(file);
|
|
82
|
+
if (error) {
|
|
83
|
+
this.fileError.emit(error);
|
|
84
|
+
this.errorMessage.set(error.message);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const warning = this.checkSizeWarning(file);
|
|
88
|
+
if (warning) this.fileWarning.emit(warning);
|
|
89
|
+
validFiles.push(file);
|
|
90
|
+
}
|
|
91
|
+
const max = this.maxFiles();
|
|
92
|
+
if (max > 0) {
|
|
93
|
+
const allowed = max - this.selectedFiles().length;
|
|
94
|
+
if (validFiles.length > allowed) {
|
|
95
|
+
const errorMsg = this.transloco.translate("fileUpload.maxFiles", void 0, `Máximo ${max} archivos permitidos`);
|
|
96
|
+
this.errorMessage.set(errorMsg);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (this.multiple()) this.selectedFiles.set([...this.selectedFiles(), ...validFiles]);
|
|
101
|
+
else {
|
|
102
|
+
this.clearPreviews();
|
|
103
|
+
this.selectedFiles.set(validFiles);
|
|
104
|
+
}
|
|
105
|
+
this.touch.emit();
|
|
106
|
+
this.fileSelected.emit(this.selectedFiles());
|
|
107
|
+
}
|
|
108
|
+
validateFile(file) {
|
|
109
|
+
const acceptStr = this.accept();
|
|
110
|
+
if (acceptStr && acceptStr !== "*") {
|
|
111
|
+
if (!acceptStr.split(",").map((t) => t.trim()).some((type) => {
|
|
112
|
+
if (type.endsWith("/*")) {
|
|
113
|
+
const category = type.replace("/*", "");
|
|
114
|
+
return file.type.startsWith(category);
|
|
115
|
+
}
|
|
116
|
+
if (type.startsWith(".")) {
|
|
117
|
+
const ext = type.slice(1).toLowerCase();
|
|
118
|
+
return file.name.toLowerCase().endsWith("." + ext);
|
|
119
|
+
}
|
|
120
|
+
if (type.includes("/")) return file.type === type;
|
|
121
|
+
return false;
|
|
122
|
+
})) return {
|
|
123
|
+
type: "type",
|
|
124
|
+
message: this.transloco.translate("fileUpload.invalidType", { accept: acceptStr }, `Tipo de archivo no válido. Formatos aceptados: ${acceptStr}`),
|
|
125
|
+
file
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (this.maxFileSize() > 0 && file.size > this.maxFileSize()) return {
|
|
129
|
+
type: "size",
|
|
130
|
+
message: this.transloco.translate("fileUpload.fileTooLarge", { size: this.formatFileSize(this.maxFileSize()) }, `El archivo excede el tamaño máximo de ${this.formatFileSize(this.maxFileSize())}`),
|
|
131
|
+
file
|
|
132
|
+
};
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
checkSizeWarning(file) {
|
|
136
|
+
if (this.maxFileSize() > 0 && file.size > this.maxFileSize() * .9) return {
|
|
137
|
+
type: "size",
|
|
138
|
+
message: this.transloco.translate("fileUpload.sizeWarning", { size: this.formatFileSize(this.maxFileSize()) }, `El archivo está cerca del límite de tamaño (${this.formatFileSize(this.maxFileSize())})`),
|
|
139
|
+
file
|
|
140
|
+
};
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
removeFile(file) {
|
|
144
|
+
const url = this.previewUrls.get(file);
|
|
145
|
+
if (url) {
|
|
146
|
+
URL.revokeObjectURL(url);
|
|
147
|
+
this.previewUrls.delete(file);
|
|
148
|
+
}
|
|
149
|
+
this.selectedFiles.update((files) => files.filter((f) => f !== file));
|
|
150
|
+
this.errorMessage.set("");
|
|
151
|
+
if (this.selectedFiles().length === 0) this.fileRemoved.emit();
|
|
152
|
+
}
|
|
153
|
+
changeFiles() {
|
|
154
|
+
this.clearPreviews();
|
|
155
|
+
this.selectedFiles.set([]);
|
|
156
|
+
this.errorMessage.set("");
|
|
157
|
+
}
|
|
158
|
+
clearPreviews() {
|
|
159
|
+
for (const [file, url] of this.previewUrls) URL.revokeObjectURL(url);
|
|
160
|
+
this.previewUrls.clear();
|
|
161
|
+
}
|
|
162
|
+
ngOnDestroy() {
|
|
163
|
+
this.clearPreviews();
|
|
164
|
+
}
|
|
165
|
+
onExistingAction(file) {
|
|
166
|
+
this.existingFileAction.emit(file);
|
|
167
|
+
}
|
|
168
|
+
onExistingRemove(file) {
|
|
169
|
+
this.existingFileRemove.emit(file);
|
|
170
|
+
}
|
|
171
|
+
isExistingImage(file) {
|
|
172
|
+
if ((file.mimeType || "").toLowerCase().startsWith("image/")) return true;
|
|
173
|
+
const ext = this.getExtension(file.name).toLowerCase();
|
|
174
|
+
return [
|
|
175
|
+
"jpg",
|
|
176
|
+
"jpeg",
|
|
177
|
+
"png",
|
|
178
|
+
"gif",
|
|
179
|
+
"webp",
|
|
180
|
+
"svg"
|
|
181
|
+
].includes(ext);
|
|
182
|
+
}
|
|
183
|
+
getExtension(name) {
|
|
184
|
+
return name.split(".").pop()?.toLowerCase() || "";
|
|
185
|
+
}
|
|
186
|
+
getExistingBadge(file) {
|
|
187
|
+
const ext = this.getExtension(file.name);
|
|
188
|
+
switch (ext) {
|
|
189
|
+
case "pdf": return {
|
|
190
|
+
label: "PDF",
|
|
191
|
+
color: "bg-red-100 text-red-600",
|
|
192
|
+
icon: "file-text"
|
|
193
|
+
};
|
|
194
|
+
case "doc":
|
|
195
|
+
case "docx": return {
|
|
196
|
+
label: "DOC",
|
|
197
|
+
color: "bg-blue-100 text-blue-600",
|
|
198
|
+
icon: "file-text"
|
|
199
|
+
};
|
|
200
|
+
case "xls":
|
|
201
|
+
case "xlsx": return {
|
|
202
|
+
label: "XLS",
|
|
203
|
+
color: "bg-green-100 text-green-600",
|
|
204
|
+
icon: "file-spreadsheet"
|
|
205
|
+
};
|
|
206
|
+
default: return {
|
|
207
|
+
label: ext.toUpperCase() || "FILE",
|
|
208
|
+
color: "bg-slate-100 text-slate-500",
|
|
209
|
+
icon: "file"
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
trackExistingFile(file) {
|
|
214
|
+
return file.id ?? file.name;
|
|
215
|
+
}
|
|
216
|
+
formatFileSize(bytes) {
|
|
217
|
+
if (bytes < 1024) return bytes + " B";
|
|
218
|
+
if (bytes < 1048576) return (bytes / 1024).toFixed(1) + " KB";
|
|
219
|
+
return (bytes / 1048576).toFixed(1) + " MB";
|
|
220
|
+
}
|
|
221
|
+
static {
|
|
222
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
223
|
+
minVersion: "12.0.0",
|
|
224
|
+
version: "22.3.2",
|
|
225
|
+
ngImport: i0,
|
|
226
|
+
type: FileUploadComponent,
|
|
227
|
+
deps: [],
|
|
228
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
static {
|
|
232
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
233
|
+
minVersion: "17.0.0",
|
|
234
|
+
version: "22.3.2",
|
|
235
|
+
type: FileUploadComponent,
|
|
236
|
+
isStandalone: true,
|
|
237
|
+
selector: "shk-file-upload",
|
|
238
|
+
inputs: {
|
|
239
|
+
label: {
|
|
240
|
+
classPropertyName: "label",
|
|
241
|
+
publicName: "label",
|
|
242
|
+
isSignal: true,
|
|
243
|
+
isRequired: false,
|
|
244
|
+
transformFunction: null
|
|
245
|
+
},
|
|
246
|
+
accept: {
|
|
247
|
+
classPropertyName: "accept",
|
|
248
|
+
publicName: "accept",
|
|
249
|
+
isSignal: true,
|
|
250
|
+
isRequired: false,
|
|
251
|
+
transformFunction: null
|
|
252
|
+
},
|
|
253
|
+
maxFileSize: {
|
|
254
|
+
classPropertyName: "maxFileSize",
|
|
255
|
+
publicName: "maxFileSize",
|
|
256
|
+
isSignal: true,
|
|
257
|
+
isRequired: false,
|
|
258
|
+
transformFunction: null
|
|
259
|
+
},
|
|
260
|
+
maxFiles: {
|
|
261
|
+
classPropertyName: "maxFiles",
|
|
262
|
+
publicName: "maxFiles",
|
|
263
|
+
isSignal: true,
|
|
264
|
+
isRequired: false,
|
|
265
|
+
transformFunction: null
|
|
266
|
+
},
|
|
267
|
+
fileUploadText: {
|
|
268
|
+
classPropertyName: "fileUploadText",
|
|
269
|
+
publicName: "fileUploadText",
|
|
270
|
+
isSignal: true,
|
|
271
|
+
isRequired: false,
|
|
272
|
+
transformFunction: null
|
|
273
|
+
},
|
|
274
|
+
fileRecommendation: {
|
|
275
|
+
classPropertyName: "fileRecommendation",
|
|
276
|
+
publicName: "fileRecommendation",
|
|
277
|
+
isSignal: true,
|
|
278
|
+
isRequired: false,
|
|
279
|
+
transformFunction: null
|
|
280
|
+
},
|
|
281
|
+
changeFilesText: {
|
|
282
|
+
classPropertyName: "changeFilesText",
|
|
283
|
+
publicName: "changeFilesText",
|
|
284
|
+
isSignal: true,
|
|
285
|
+
isRequired: false,
|
|
286
|
+
transformFunction: null
|
|
287
|
+
},
|
|
288
|
+
multiple: {
|
|
289
|
+
classPropertyName: "multiple",
|
|
290
|
+
publicName: "multiple",
|
|
291
|
+
isSignal: true,
|
|
292
|
+
isRequired: false,
|
|
293
|
+
transformFunction: null
|
|
294
|
+
},
|
|
295
|
+
existingFiles: {
|
|
296
|
+
classPropertyName: "existingFiles",
|
|
297
|
+
publicName: "existingFiles",
|
|
298
|
+
isSignal: true,
|
|
299
|
+
isRequired: false,
|
|
300
|
+
transformFunction: null
|
|
301
|
+
},
|
|
302
|
+
existingDisplay: {
|
|
303
|
+
classPropertyName: "existingDisplay",
|
|
304
|
+
publicName: "existingDisplay",
|
|
305
|
+
isSignal: true,
|
|
306
|
+
isRequired: false,
|
|
307
|
+
transformFunction: null
|
|
308
|
+
},
|
|
309
|
+
value: {
|
|
310
|
+
classPropertyName: "value",
|
|
311
|
+
publicName: "value",
|
|
312
|
+
isSignal: true,
|
|
313
|
+
isRequired: false,
|
|
314
|
+
transformFunction: null
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
outputs: {
|
|
318
|
+
fileSelected: "fileSelected",
|
|
319
|
+
fileRemoved: "fileRemoved",
|
|
320
|
+
fileError: "fileError",
|
|
321
|
+
fileWarning: "fileWarning",
|
|
322
|
+
existingFileAction: "existingFileAction",
|
|
323
|
+
existingFileRemove: "existingFileRemove",
|
|
324
|
+
value: "valueChange",
|
|
325
|
+
touch: "touch"
|
|
326
|
+
},
|
|
327
|
+
ngImport: i0,
|
|
328
|
+
template: "<div class=\"flex flex-col gap-2\">\n @if (label()) {\n <label class=\"text-sm font-medium _shk-text-surface-700\">\n {{ label() }}\n </label>\n }\n\n @if (canAddMore()) {\n <div\n class=\"shk-dropzone relative border-2 border-dashed _shk-border rounded-lg p-4 transition-colors hover:[border-color:var(--shk-primary-400)] dark:hover:[border-color:var(--shk-primary-500)]\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n >\n <input\n #fileInput\n type=\"file\"\n [accept]=\"accept()\"\n [multiple]=\"multiple()\"\n (change)=\"onFileChange($event)\"\n class=\"hidden\"\n />\n\n <div\n class=\"flex flex-col items-center gap-2 cursor-pointer\"\n (click)=\"fileInput.click()\"\n [class.drag-over]=\"isDragOver()\"\n >\n <svg [shkIcon]=\"getIcon('upload')\" class=\"w-8 h-8 _shk-icon-subtle\"></svg>\n <span class=\"text-sm _shk-text-surface-700\">\n {{ fileUploadText() }}\n </span>\n @if (fileRecommendation()) {\n <span class=\"text-xs _shk-text-surface-400\">\n {{ fileRecommendation() }}\n </span>\n }\n </div>\n </div>\n }\n\n @if (maxReached()) {\n <div class=\"text-xs _shk-text-surface-400 text-center py-2\">\n Máximo {{ maxFiles() }} archivos alcanzado\n </div>\n }\n\n @if (selectedFiles().length > 0) {\n <div class=\"flex flex-wrap gap-3\">\n @for (file of selectedFiles(); track file.name + file.size + file.lastModified) {\n <div class=\"relative group\">\n @if (isImageFile(file)) {\n <img\n [src]=\"previewUrl(file)\"\n [alt]=\"file.name\"\n class=\"w-20 h-20 object-cover rounded-lg _shk-border\"\n />\n } @else {\n <div class=\"w-20 h-20 rounded-lg _shk-border flex flex-col items-center justify-center _shk-bg-surface-50 gap-1\">\n <svg [shkIcon]=\"getIcon('file')\" class=\"w-6 h-6 _shk-text-surface-400\"></svg>\n <span class=\"text-[10px] _shk-text-surface-400 truncate max-w-[70px] px-1 text-center\">{{ file.name }}</span>\n </div>\n }\n <button\n type=\"button\"\n (click)=\"removeFile(file)\"\n class=\"absolute -top-1.5 -right-1.5 w-5 h-5 bg-red-500 text-white rounded-full text-xs flex items-center justify-center opacity-0 group-hover:opacity-100 transition shadow\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-3 h-3\"></svg>\n </button>\n </div>\n }\n </div>\n @if (!multiple()) {\n <button\n type=\"button\"\n (click)=\"changeFiles()\"\n class=\"text-xs _shk-text-primary hover:[color:var(--shk-primary-700)] dark:[color:var(--shk-primary-400)] dark:hover:[color:var(--shk-primary-300)] underline cursor-pointer bg-transparent border-0\"\n >\n {{ changeFilesText() }}\n </button>\n }\n }\n\n @if (existingFiles().length > 0) {\n <div class=\"flex flex-wrap gap-3\">\n @for (file of existingFiles(); track trackExistingFile(file)) {\n @if (existingDisplay() === 'tiles') {\n @let badge = getExistingBadge(file);\n <div class=\"relative group w-[80px]\">\n <div\n class=\"w-20 h-20 rounded-lg border _shk-border overflow-hidden cursor-pointer relative\"\n (click)=\"onExistingAction(file)\"\n [title]=\"file.name\"\n >\n @if (isExistingImage(file) && file.url) {\n <img [src]=\"file.url\" [alt]=\"file.name\" class=\"w-full h-full object-cover\" />\n } @else {\n <div class=\"w-full h-full flex flex-col items-center justify-center gap-1 _shk-bg-surface-50\">\n <svg [shkIcon]=\"getIcon(badge.icon)\" class=\"w-6 h-6 _shk-text-surface-400\"></svg>\n <span class=\"px-1.5 py-0.5 rounded text-[9px] font-semibold leading-none\" [class]=\"badge.color\">\n {{ badge.label }}\n </span>\n </div>\n }\n <div\n class=\"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 flex items-center justify-center transition rounded-lg\"\n >\n <svg [shkIcon]=\"getIcon('download')\" class=\"w-5 h-5 text-white\"></svg>\n </div>\n </div>\n <button\n type=\"button\"\n (click)=\"onExistingRemove(file)\"\n class=\"absolute -top-1.5 -right-1.5 w-5 h-5 bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition shadow\"\n aria-label=\"Remove\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-3 h-3\"></svg>\n </button>\n <span class=\"block text-[10px] _shk-text-surface-400 truncate text-center mt-1 max-w-[80px]\" [title]=\"file.name\">\n {{ file.name }}\n </span>\n </div>\n } @else {\n @let badge = getExistingBadge(file);\n <div class=\"flex items-center gap-2 _shk-bg-surface-50 border _shk-border rounded-full pl-3 pr-1.5 py-1 text-sm _shk-text-surface-700\">\n <svg [shkIcon]=\"getIcon(badge.icon)\" class=\"w-4 h-4 _shk-text-surface-400 shrink-0\"></svg>\n <span class=\"max-w-[200px] truncate\" [title]=\"file.name\">{{ file.name }}</span>\n <button\n type=\"button\"\n (click)=\"onExistingAction(file)\"\n [title]=\"file.name\"\n class=\"p-1 rounded-full hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 hover:[color:var(--shk-primary-600)]\"\n >\n <svg [shkIcon]=\"getIcon('download')\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n <button\n type=\"button\"\n (click)=\"onExistingRemove(file)\"\n class=\"p-1 rounded-full hover:[background-color:var(--shk-error-50)] _shk-text-surface-500 hover:[color:var(--shk-error-600)]\"\n aria-label=\"Remove\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (errorMessage()) {\n <p class=\"text-xs _shk-text-red-500\">{{ errorMessage() }}</p>\n }\n</div>",
|
|
329
|
+
dependencies: [{
|
|
330
|
+
kind: "ngmodule",
|
|
331
|
+
type: CommonModule
|
|
332
|
+
}, {
|
|
333
|
+
kind: "directive",
|
|
334
|
+
type: ShkIconDirective,
|
|
335
|
+
selector: "svg[shkIcon]",
|
|
336
|
+
inputs: [
|
|
337
|
+
"shkIcon",
|
|
338
|
+
"size",
|
|
339
|
+
"strokeWidth",
|
|
340
|
+
"color"
|
|
341
|
+
]
|
|
342
|
+
}],
|
|
343
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
348
|
+
minVersion: "12.0.0",
|
|
349
|
+
version: "22.3.2",
|
|
350
|
+
ngImport: i0,
|
|
351
|
+
type: FileUploadComponent,
|
|
352
|
+
decorators: [{
|
|
353
|
+
type: Component,
|
|
354
|
+
args: [{
|
|
355
|
+
selector: "shk-file-upload",
|
|
356
|
+
imports: [CommonModule, ShkIconDirective],
|
|
357
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
358
|
+
template: "<div class=\"flex flex-col gap-2\">\n @if (label()) {\n <label class=\"text-sm font-medium _shk-text-surface-700\">\n {{ label() }}\n </label>\n }\n\n @if (canAddMore()) {\n <div\n class=\"shk-dropzone relative border-2 border-dashed _shk-border rounded-lg p-4 transition-colors hover:[border-color:var(--shk-primary-400)] dark:hover:[border-color:var(--shk-primary-500)]\"\n [attr.aria-invalid]=\"errorMessage() ? true : null\"\n (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\"\n (drop)=\"onDrop($event)\"\n >\n <input\n #fileInput\n type=\"file\"\n [accept]=\"accept()\"\n [multiple]=\"multiple()\"\n (change)=\"onFileChange($event)\"\n class=\"hidden\"\n />\n\n <div\n class=\"flex flex-col items-center gap-2 cursor-pointer\"\n (click)=\"fileInput.click()\"\n [class.drag-over]=\"isDragOver()\"\n >\n <svg [shkIcon]=\"getIcon('upload')\" class=\"w-8 h-8 _shk-icon-subtle\"></svg>\n <span class=\"text-sm _shk-text-surface-700\">\n {{ fileUploadText() }}\n </span>\n @if (fileRecommendation()) {\n <span class=\"text-xs _shk-text-surface-400\">\n {{ fileRecommendation() }}\n </span>\n }\n </div>\n </div>\n }\n\n @if (maxReached()) {\n <div class=\"text-xs _shk-text-surface-400 text-center py-2\">\n Máximo {{ maxFiles() }} archivos alcanzado\n </div>\n }\n\n @if (selectedFiles().length > 0) {\n <div class=\"flex flex-wrap gap-3\">\n @for (file of selectedFiles(); track file.name + file.size + file.lastModified) {\n <div class=\"relative group\">\n @if (isImageFile(file)) {\n <img\n [src]=\"previewUrl(file)\"\n [alt]=\"file.name\"\n class=\"w-20 h-20 object-cover rounded-lg _shk-border\"\n />\n } @else {\n <div class=\"w-20 h-20 rounded-lg _shk-border flex flex-col items-center justify-center _shk-bg-surface-50 gap-1\">\n <svg [shkIcon]=\"getIcon('file')\" class=\"w-6 h-6 _shk-text-surface-400\"></svg>\n <span class=\"text-[10px] _shk-text-surface-400 truncate max-w-[70px] px-1 text-center\">{{ file.name }}</span>\n </div>\n }\n <button\n type=\"button\"\n (click)=\"removeFile(file)\"\n class=\"absolute -top-1.5 -right-1.5 w-5 h-5 bg-red-500 text-white rounded-full text-xs flex items-center justify-center opacity-0 group-hover:opacity-100 transition shadow\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-3 h-3\"></svg>\n </button>\n </div>\n }\n </div>\n @if (!multiple()) {\n <button\n type=\"button\"\n (click)=\"changeFiles()\"\n class=\"text-xs _shk-text-primary hover:[color:var(--shk-primary-700)] dark:[color:var(--shk-primary-400)] dark:hover:[color:var(--shk-primary-300)] underline cursor-pointer bg-transparent border-0\"\n >\n {{ changeFilesText() }}\n </button>\n }\n }\n\n @if (existingFiles().length > 0) {\n <div class=\"flex flex-wrap gap-3\">\n @for (file of existingFiles(); track trackExistingFile(file)) {\n @if (existingDisplay() === 'tiles') {\n @let badge = getExistingBadge(file);\n <div class=\"relative group w-[80px]\">\n <div\n class=\"w-20 h-20 rounded-lg border _shk-border overflow-hidden cursor-pointer relative\"\n (click)=\"onExistingAction(file)\"\n [title]=\"file.name\"\n >\n @if (isExistingImage(file) && file.url) {\n <img [src]=\"file.url\" [alt]=\"file.name\" class=\"w-full h-full object-cover\" />\n } @else {\n <div class=\"w-full h-full flex flex-col items-center justify-center gap-1 _shk-bg-surface-50\">\n <svg [shkIcon]=\"getIcon(badge.icon)\" class=\"w-6 h-6 _shk-text-surface-400\"></svg>\n <span class=\"px-1.5 py-0.5 rounded text-[9px] font-semibold leading-none\" [class]=\"badge.color\">\n {{ badge.label }}\n </span>\n </div>\n }\n <div\n class=\"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 flex items-center justify-center transition rounded-lg\"\n >\n <svg [shkIcon]=\"getIcon('download')\" class=\"w-5 h-5 text-white\"></svg>\n </div>\n </div>\n <button\n type=\"button\"\n (click)=\"onExistingRemove(file)\"\n class=\"absolute -top-1.5 -right-1.5 w-5 h-5 bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition shadow\"\n aria-label=\"Remove\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-3 h-3\"></svg>\n </button>\n <span class=\"block text-[10px] _shk-text-surface-400 truncate text-center mt-1 max-w-[80px]\" [title]=\"file.name\">\n {{ file.name }}\n </span>\n </div>\n } @else {\n @let badge = getExistingBadge(file);\n <div class=\"flex items-center gap-2 _shk-bg-surface-50 border _shk-border rounded-full pl-3 pr-1.5 py-1 text-sm _shk-text-surface-700\">\n <svg [shkIcon]=\"getIcon(badge.icon)\" class=\"w-4 h-4 _shk-text-surface-400 shrink-0\"></svg>\n <span class=\"max-w-[200px] truncate\" [title]=\"file.name\">{{ file.name }}</span>\n <button\n type=\"button\"\n (click)=\"onExistingAction(file)\"\n [title]=\"file.name\"\n class=\"p-1 rounded-full hover:[background-color:var(--shk-surface-200)] _shk-text-surface-500 hover:[color:var(--shk-primary-600)]\"\n >\n <svg [shkIcon]=\"getIcon('download')\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n <button\n type=\"button\"\n (click)=\"onExistingRemove(file)\"\n class=\"p-1 rounded-full hover:[background-color:var(--shk-error-50)] _shk-text-surface-500 hover:[color:var(--shk-error-600)]\"\n aria-label=\"Remove\"\n >\n <svg [shkIcon]=\"getIcon('x')\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n </div>\n }\n }\n </div>\n }\n\n @if (errorMessage()) {\n <p class=\"text-xs _shk-text-red-500\">{{ errorMessage() }}</p>\n }\n</div>"
|
|
359
|
+
}]
|
|
360
|
+
}],
|
|
361
|
+
propDecorators: {
|
|
362
|
+
label: [{
|
|
363
|
+
type: i0.Input,
|
|
364
|
+
args: [{
|
|
365
|
+
isSignal: true,
|
|
366
|
+
alias: "label",
|
|
367
|
+
required: false
|
|
368
|
+
}]
|
|
369
|
+
}],
|
|
370
|
+
accept: [{
|
|
371
|
+
type: i0.Input,
|
|
372
|
+
args: [{
|
|
373
|
+
isSignal: true,
|
|
374
|
+
alias: "accept",
|
|
375
|
+
required: false
|
|
376
|
+
}]
|
|
377
|
+
}],
|
|
378
|
+
maxFileSize: [{
|
|
379
|
+
type: i0.Input,
|
|
380
|
+
args: [{
|
|
381
|
+
isSignal: true,
|
|
382
|
+
alias: "maxFileSize",
|
|
383
|
+
required: false
|
|
384
|
+
}]
|
|
385
|
+
}],
|
|
386
|
+
maxFiles: [{
|
|
387
|
+
type: i0.Input,
|
|
388
|
+
args: [{
|
|
389
|
+
isSignal: true,
|
|
390
|
+
alias: "maxFiles",
|
|
391
|
+
required: false
|
|
392
|
+
}]
|
|
393
|
+
}],
|
|
394
|
+
fileUploadText: [{
|
|
395
|
+
type: i0.Input,
|
|
396
|
+
args: [{
|
|
397
|
+
isSignal: true,
|
|
398
|
+
alias: "fileUploadText",
|
|
399
|
+
required: false
|
|
400
|
+
}]
|
|
401
|
+
}],
|
|
402
|
+
fileRecommendation: [{
|
|
403
|
+
type: i0.Input,
|
|
404
|
+
args: [{
|
|
405
|
+
isSignal: true,
|
|
406
|
+
alias: "fileRecommendation",
|
|
407
|
+
required: false
|
|
408
|
+
}]
|
|
409
|
+
}],
|
|
410
|
+
changeFilesText: [{
|
|
411
|
+
type: i0.Input,
|
|
412
|
+
args: [{
|
|
413
|
+
isSignal: true,
|
|
414
|
+
alias: "changeFilesText",
|
|
415
|
+
required: false
|
|
416
|
+
}]
|
|
417
|
+
}],
|
|
418
|
+
multiple: [{
|
|
419
|
+
type: i0.Input,
|
|
420
|
+
args: [{
|
|
421
|
+
isSignal: true,
|
|
422
|
+
alias: "multiple",
|
|
423
|
+
required: false
|
|
424
|
+
}]
|
|
425
|
+
}],
|
|
426
|
+
existingFiles: [{
|
|
427
|
+
type: i0.Input,
|
|
428
|
+
args: [{
|
|
429
|
+
isSignal: true,
|
|
430
|
+
alias: "existingFiles",
|
|
431
|
+
required: false
|
|
432
|
+
}]
|
|
433
|
+
}],
|
|
434
|
+
existingDisplay: [{
|
|
435
|
+
type: i0.Input,
|
|
436
|
+
args: [{
|
|
437
|
+
isSignal: true,
|
|
438
|
+
alias: "existingDisplay",
|
|
439
|
+
required: false
|
|
440
|
+
}]
|
|
441
|
+
}],
|
|
442
|
+
fileSelected: [{
|
|
443
|
+
type: i0.Output,
|
|
444
|
+
args: ["fileSelected"]
|
|
445
|
+
}],
|
|
446
|
+
fileRemoved: [{
|
|
447
|
+
type: i0.Output,
|
|
448
|
+
args: ["fileRemoved"]
|
|
449
|
+
}],
|
|
450
|
+
fileError: [{
|
|
451
|
+
type: i0.Output,
|
|
452
|
+
args: ["fileError"]
|
|
453
|
+
}],
|
|
454
|
+
fileWarning: [{
|
|
455
|
+
type: i0.Output,
|
|
456
|
+
args: ["fileWarning"]
|
|
457
|
+
}],
|
|
458
|
+
existingFileAction: [{
|
|
459
|
+
type: i0.Output,
|
|
460
|
+
args: ["existingFileAction"]
|
|
461
|
+
}],
|
|
462
|
+
existingFileRemove: [{
|
|
463
|
+
type: i0.Output,
|
|
464
|
+
args: ["existingFileRemove"]
|
|
465
|
+
}],
|
|
466
|
+
value: [{
|
|
467
|
+
type: i0.Input,
|
|
468
|
+
args: [{
|
|
469
|
+
isSignal: true,
|
|
470
|
+
alias: "value",
|
|
471
|
+
required: false
|
|
472
|
+
}]
|
|
473
|
+
}, {
|
|
474
|
+
type: i0.Output,
|
|
475
|
+
args: ["valueChange"]
|
|
476
|
+
}],
|
|
477
|
+
touch: [{
|
|
478
|
+
type: i0.Output,
|
|
479
|
+
args: ["touch"]
|
|
480
|
+
}]
|
|
481
|
+
}
|
|
482
|
+
});
|
|
300
483
|
export { FileUploadComponent };
|
|
301
|
-
|
|
484
|
+
|
|
485
|
+
//# sourceMappingURL=shirkasoft-ui-components-file-upload.mjs.map
|