@libs-ui/components-inputs-upload 0.2.183 → 0.2.185
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/esm2022/index.mjs +3 -1
- package/esm2022/upload-drop-file.directive.mjs +62 -0
- package/esm2022/upload-file.directive.mjs +50 -0
- package/esm2022/upload.component.mjs +21 -66
- package/fesm2022/libs-ui-components-inputs-upload.mjs +126 -68
- package/fesm2022/libs-ui-components-inputs-upload.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/package.json +14 -14
- package/upload-drop-file.directive.d.ts +18 -0
- package/upload-file.directive.d.ts +14 -0
- package/upload.component.d.ts +6 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, model, input, output, Optional, Inject, ChangeDetectionStrategy, Component, signal, computed, viewChild,
|
|
2
|
+
import { Pipe, model, input, output, Optional, Inject, ChangeDetectionStrategy, Component, Directive, inject, ElementRef, signal, computed, viewChild, effect, untracked } from '@angular/core';
|
|
3
3
|
import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
|
|
4
4
|
import { LibsUiComponentsGalleryViewerComponent } from '@libs-ui/components-gallery';
|
|
5
5
|
import { LibsUiComponentsImageEditorComponent } from '@libs-ui/components-image-editor';
|
|
@@ -8,15 +8,15 @@ import { LibsUiComponentsPreviewFileComponent } from '@libs-ui/components-previe
|
|
|
8
8
|
import { LibsUiComponentsScrollOverlayDirective } from '@libs-ui/components-scroll-overlay';
|
|
9
9
|
import { LibsUiDynamicComponentService } from '@libs-ui/services-dynamic-component';
|
|
10
10
|
import { LibsUiNotificationService } from '@libs-ui/services-notification';
|
|
11
|
-
import { getFileExtension, ImageExtList, VideoExtList, DocumentExtList, LINK_IMAGE_ERROR_TOKEN_INJECT, getLabelBySizeFile, AudioExtList, isTypeImage, isTypeVideo, isTypeAudio, uuid, convertFileToBase64_ObjectUrl, convertBlobToFile, isIncludeImageExtList, isIncludeVideoExtList, isIncludeAudioExtList, isIncludeDocumentExtList, ERROR_MESSAGE_EMPTY_VALID, downloadFileByUrl } from '@libs-ui/utils';
|
|
11
|
+
import { getFileExtension, ImageExtList, VideoExtList, DocumentExtList, LINK_IMAGE_ERROR_TOKEN_INJECT, getLabelBySizeFile, checkMouseOverInContainer, isTypeFile, AudioExtList, isTypeImage, isTypeVideo, isTypeAudio, uuid, convertFileToBase64_ObjectUrl, convertBlobToFile, isIncludeImageExtList, isIncludeVideoExtList, isIncludeAudioExtList, isIncludeDocumentExtList, ERROR_MESSAGE_EMPTY_VALID, downloadFileByUrl } from '@libs-ui/utils';
|
|
12
12
|
import * as i1 from '@ngx-translate/core';
|
|
13
13
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
14
|
-
import { Subject, fromEvent } from 'rxjs';
|
|
15
|
-
import { tap, takeUntil } from 'rxjs/operators';
|
|
14
|
+
import { Subject, fromEvent, takeUntil as takeUntil$1 } from 'rxjs';
|
|
16
15
|
import { NgComponentOutlet, AsyncPipe } from '@angular/common';
|
|
17
16
|
import { LibsUiComponentsSpinnerComponent } from '@libs-ui/components-spinner';
|
|
18
17
|
import { LibsUiIconsGetIconComponentPipe } from '@libs-ui/icons';
|
|
19
18
|
import { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';
|
|
19
|
+
import { takeUntil } from 'rxjs/operators';
|
|
20
20
|
|
|
21
21
|
class LibsUiPipesInputsUploadCalcDurationVideoPipe {
|
|
22
22
|
transform(duration) {
|
|
@@ -156,6 +156,110 @@ const getDescriptionFormatAndSizeFileDefault = (type, maxImageSize, maxVideoSize
|
|
|
156
156
|
return description;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
+
class LibsUiComponentsInputsUploadDropFileDirective {
|
|
160
|
+
elementRef;
|
|
161
|
+
onDestroy = new Subject();
|
|
162
|
+
multiple = input(true, { transform: (value) => value ?? true });
|
|
163
|
+
outDragOver = output();
|
|
164
|
+
outDragLeave = output();
|
|
165
|
+
outDrop = output();
|
|
166
|
+
outDropFiles = output();
|
|
167
|
+
outDropFile = output();
|
|
168
|
+
constructor(elementRef) {
|
|
169
|
+
this.elementRef = elementRef;
|
|
170
|
+
}
|
|
171
|
+
ngAfterViewInit() {
|
|
172
|
+
fromEvent(this.elementRef.nativeElement, 'dragover').pipe(takeUntil(this.onDestroy)).subscribe((e) => {
|
|
173
|
+
e.stopPropagation();
|
|
174
|
+
e.preventDefault();
|
|
175
|
+
this.outDragOver.emit(e);
|
|
176
|
+
});
|
|
177
|
+
fromEvent(this.elementRef.nativeElement, 'dragleave').pipe(takeUntil(this.onDestroy)).subscribe((e) => {
|
|
178
|
+
e.stopPropagation();
|
|
179
|
+
e.preventDefault();
|
|
180
|
+
if (checkMouseOverInContainer(e, this.elementRef.nativeElement)) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
this.outDragLeave.emit(e);
|
|
184
|
+
});
|
|
185
|
+
fromEvent(this.elementRef.nativeElement, 'drop').pipe(takeUntil(this.onDestroy)).subscribe((e) => {
|
|
186
|
+
e.stopPropagation();
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
this.outDrop.emit(e);
|
|
189
|
+
const fileList = Array.from(e.dataTransfer?.files || e.clipboardData?.files || []).filter(isTypeFile);
|
|
190
|
+
if (!fileList || !fileList.length) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (this.multiple()) {
|
|
194
|
+
this.outDropFiles.emit(fileList);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this.outDropFile.emit(fileList[0]);
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
ngOnDestroy() {
|
|
201
|
+
this.onDestroy.next();
|
|
202
|
+
this.onDestroy.complete();
|
|
203
|
+
}
|
|
204
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsUploadDropFileDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
205
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsInputsUploadDropFileDirective, isStandalone: true, selector: "[LibsUiComponentsInputsUploadDropFileDirective]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outDragOver: "outDragOver", outDragLeave: "outDragLeave", outDrop: "outDrop", outDropFiles: "outDropFiles", outDropFile: "outDropFile" }, ngImport: i0 });
|
|
206
|
+
}
|
|
207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsUploadDropFileDirective, decorators: [{
|
|
208
|
+
type: Directive,
|
|
209
|
+
args: [{
|
|
210
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
211
|
+
selector: '[LibsUiComponentsInputsUploadDropFileDirective]',
|
|
212
|
+
standalone: true
|
|
213
|
+
}]
|
|
214
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
215
|
+
|
|
216
|
+
class LibsUiComponentsInputsUploadDirective {
|
|
217
|
+
onDestroy = new Subject();
|
|
218
|
+
multiple = input(true, { transform: val => val ?? true });
|
|
219
|
+
accessFiles = input('image/x-png,image/jpg,image/jpeg,image/PNG,image/x-PNG,image/JPG,image/JPEG', { transform: val => val ?? 'image/x-png,image/jpg,image/jpeg,image/PNG,image/x-PNG,image/JPG,image/JPEG' });
|
|
220
|
+
outUploadFiles = output();
|
|
221
|
+
outUploadFile = output();
|
|
222
|
+
elementRef = inject(ElementRef);
|
|
223
|
+
ngAfterViewInit() {
|
|
224
|
+
fromEvent(this.elementRef.nativeElement, 'click').pipe(takeUntil$1(this.onDestroy)).subscribe((e) => {
|
|
225
|
+
e.stopPropagation();
|
|
226
|
+
e.preventDefault();
|
|
227
|
+
const inputElementUpload = document.createElement('input');
|
|
228
|
+
inputElementUpload.type = 'file';
|
|
229
|
+
inputElementUpload.accept = this.accessFiles();
|
|
230
|
+
inputElementUpload.multiple = this.multiple();
|
|
231
|
+
inputElementUpload.style.display = 'none';
|
|
232
|
+
inputElementUpload.click();
|
|
233
|
+
fromEvent(inputElementUpload, 'change').pipe(takeUntil$1(this.onDestroy)).subscribe((event) => {
|
|
234
|
+
const files = event.dataTransfer?.files || event.target?.files;
|
|
235
|
+
inputElementUpload.remove();
|
|
236
|
+
if (!files?.length) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (this.multiple()) {
|
|
240
|
+
this.outUploadFiles.emit(files);
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
this.outUploadFile.emit(files[0]);
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
ngOnDestroy() {
|
|
248
|
+
this.onDestroy.next();
|
|
249
|
+
this.onDestroy.complete();
|
|
250
|
+
}
|
|
251
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsUploadDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
252
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: LibsUiComponentsInputsUploadDirective, isStandalone: true, selector: "[LibsUiComponentsInputsUploadDirective]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accessFiles: { classPropertyName: "accessFiles", publicName: "accessFiles", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outUploadFiles: "outUploadFiles", outUploadFile: "outUploadFile" }, ngImport: i0 });
|
|
253
|
+
}
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsUploadDirective, decorators: [{
|
|
255
|
+
type: Directive,
|
|
256
|
+
args: [{
|
|
257
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
258
|
+
selector: '[LibsUiComponentsInputsUploadDirective]',
|
|
259
|
+
standalone: true
|
|
260
|
+
}]
|
|
261
|
+
}] });
|
|
262
|
+
|
|
159
263
|
class LibsUiComponentsInputsUploadComponent {
|
|
160
264
|
// #region PROPERTIES
|
|
161
265
|
imageEditorComponentRef;
|
|
@@ -208,7 +312,7 @@ class LibsUiComponentsInputsUploadComponent {
|
|
|
208
312
|
descriptionFormatAndSizeFile = input();
|
|
209
313
|
showVideoDuration = input(false, { transform: val => val ?? false });
|
|
210
314
|
labelConfig = input();
|
|
211
|
-
|
|
315
|
+
showPopupUploadWhenHasFileAndModeSingle = input(false, { transform: val => val ?? false });
|
|
212
316
|
ignoreIconRemove = input(false, { transform: val => val ?? false });
|
|
213
317
|
ignoreIconEdit = input(false, { transform: val => val ?? false });
|
|
214
318
|
ignoreIconPreview = input(true, { transform: val => val ?? true });
|
|
@@ -260,18 +364,12 @@ class LibsUiComponentsInputsUploadComponent {
|
|
|
260
364
|
}
|
|
261
365
|
}
|
|
262
366
|
},
|
|
263
|
-
handlerUploadFile:
|
|
264
|
-
this.uploadInputRef()?.nativeElement.click();
|
|
265
|
-
this.uploadInputRef()?.nativeElement.setAttribute('accept', this.accessFiles());
|
|
266
|
-
}
|
|
367
|
+
handlerUploadFile: this.showUploadPopup.bind(this)
|
|
267
368
|
});
|
|
268
369
|
}
|
|
269
370
|
ngAfterViewInit() {
|
|
270
371
|
setTimeout(() => {
|
|
271
372
|
this.initAccessFiles();
|
|
272
|
-
if (this.uploadRef()) {
|
|
273
|
-
this.initUploadEvent();
|
|
274
|
-
}
|
|
275
373
|
}, 0);
|
|
276
374
|
}
|
|
277
375
|
// #endregion
|
|
@@ -293,58 +391,12 @@ class LibsUiComponentsInputsUploadComponent {
|
|
|
293
391
|
}
|
|
294
392
|
this.accessFiles.set(accessExts.map(ext => `.${ext}`).join(','));
|
|
295
393
|
}
|
|
296
|
-
async initUploadEvent() {
|
|
297
|
-
const uploadRef = this.uploadRef()?.nativeElement;
|
|
298
|
-
const inputUploadRef = this.uploadInputRef()?.nativeElement;
|
|
299
|
-
this.initEvent(inputUploadRef, 'change', this.handlerUploadFile.bind(this)).subscribe();
|
|
300
|
-
this.initEvent(uploadRef, 'click', this.handlerUploadFileClick.bind(this)).subscribe();
|
|
301
|
-
this.initEvent(uploadRef, 'dragover', this.handlerDragOver.bind(this)).subscribe();
|
|
302
|
-
this.initEvent(uploadRef, 'dragleave', this.handlerDragEnd.bind(this)).subscribe();
|
|
303
|
-
this.initEvent(uploadRef, 'drop', this.handlerDragDrop.bind(this)).subscribe();
|
|
304
|
-
}
|
|
305
|
-
// #endregion
|
|
306
|
-
// #region EVENT HANDLING
|
|
307
|
-
initEvent(element, eventName, callBack) {
|
|
308
|
-
return fromEvent(element, eventName).pipe(tap(e => {
|
|
309
|
-
e.stopPropagation();
|
|
310
|
-
callBack(e);
|
|
311
|
-
}), takeUntil(this.onDestroy));
|
|
312
|
-
}
|
|
313
|
-
async handlerUploadFileClick(event) {
|
|
314
|
-
event.stopPropagation();
|
|
315
|
-
if (!this.multiple() && this.fileList().length && !this.canUploadIfHasExistFile()) {
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
this.uploadInputRef()?.nativeElement.click();
|
|
319
|
-
this.uploadInputRef()?.nativeElement.setAttribute('accept', this.accessFiles());
|
|
320
|
-
}
|
|
321
|
-
async handlerUploadFile(event) {
|
|
322
|
-
await this.handleUploadFiles(event);
|
|
323
|
-
const inputUploadRef = this.uploadInputRef()?.nativeElement;
|
|
324
|
-
if (inputUploadRef) {
|
|
325
|
-
inputUploadRef.value = null;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
async handlerDragOver(event) {
|
|
329
|
-
event.preventDefault();
|
|
330
|
-
event.stopPropagation();
|
|
331
|
-
this.uploadRef()?.nativeElement.classList.toggle('libs-ui-components-inputs-upload-drag-over', true);
|
|
332
|
-
}
|
|
333
|
-
async handlerDragEnd(event) {
|
|
334
|
-
event.preventDefault();
|
|
335
|
-
event.stopPropagation();
|
|
336
|
-
this.uploadRef()?.nativeElement.classList.toggle('libs-ui-components-inputs-upload-drag-over', false);
|
|
337
|
-
}
|
|
338
|
-
async handlerDragDrop(event) {
|
|
339
|
-
event.preventDefault();
|
|
340
|
-
event.stopPropagation();
|
|
341
|
-
this.uploadRef()?.nativeElement.classList.toggle('libs-ui-components-inputs-upload-drag-over', false);
|
|
342
|
-
await this.handleUploadFiles(event);
|
|
343
|
-
}
|
|
344
394
|
// #endregion
|
|
345
395
|
// #region FILE OPERATIONS
|
|
346
|
-
async
|
|
347
|
-
|
|
396
|
+
async handlerSetClassDrag(toogle) {
|
|
397
|
+
this.uploadRef()?.nativeElement.classList.toggle('libs-ui-components-inputs-upload-drag-over', toogle);
|
|
398
|
+
}
|
|
399
|
+
async handleUploadFiles(files) {
|
|
348
400
|
if (this.maxTotalSize()) {
|
|
349
401
|
let total = 0;
|
|
350
402
|
for (let i = 0; i < files.length; i++) {
|
|
@@ -467,9 +519,9 @@ class LibsUiComponentsInputsUploadComponent {
|
|
|
467
519
|
this.outFileRemoved.emit(item);
|
|
468
520
|
}
|
|
469
521
|
this.validate();
|
|
470
|
-
if (!this.multiple() &&
|
|
522
|
+
if (!this.multiple() && this.showPopupUploadWhenHasFileAndModeSingle()) {
|
|
471
523
|
setTimeout(() => {
|
|
472
|
-
this.
|
|
524
|
+
this.showUploadPopup();
|
|
473
525
|
}, 0);
|
|
474
526
|
}
|
|
475
527
|
}
|
|
@@ -602,13 +654,17 @@ class LibsUiComponentsInputsUploadComponent {
|
|
|
602
654
|
downloadFileByUrl(config.url, config.title);
|
|
603
655
|
}
|
|
604
656
|
}
|
|
657
|
+
async showUploadPopup() {
|
|
658
|
+
this.uploadInputRef()?.nativeElement.click();
|
|
659
|
+
this.uploadInputRef()?.nativeElement.setAttribute('accept', this.accessFiles());
|
|
660
|
+
}
|
|
605
661
|
// #endregion
|
|
606
662
|
ngOnDestroy() {
|
|
607
663
|
this.onDestroy.next();
|
|
608
664
|
this.onDestroy.complete();
|
|
609
665
|
}
|
|
610
666
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
611
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsInputsUploadComponent, isStandalone: true, selector: "libs_ui-components-inputs-upload", inputs: { originFiles: { classPropertyName: "originFiles", publicName: "originFiles", isSignal: true, isRequired: false, transformFunction: null }, fileType: { classPropertyName: "fileType", publicName: "fileType", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, canUploadIfHasExistFile: { classPropertyName: "canUploadIfHasExistFile", publicName: "canUploadIfHasExistFile", isSignal: true, isRequired: false, transformFunction: null }, canSetAvatar: { classPropertyName: "canSetAvatar", publicName: "canSetAvatar", isSignal: true, isRequired: false, transformFunction: null }, limitFile: { classPropertyName: "limitFile", publicName: "limitFile", isSignal: true, isRequired: false, transformFunction: null }, maxTotalSize: { classPropertyName: "maxTotalSize", publicName: "maxTotalSize", isSignal: true, isRequired: false, transformFunction: null }, maxImageSize: { classPropertyName: "maxImageSize", publicName: "maxImageSize", isSignal: true, isRequired: false, transformFunction: null }, maxVideoSize: { classPropertyName: "maxVideoSize", publicName: "maxVideoSize", isSignal: true, isRequired: false, transformFunction: null }, maxDocumentSize: { classPropertyName: "maxDocumentSize", publicName: "maxDocumentSize", isSignal: true, isRequired: false, transformFunction: null }, maxAudioSize: { classPropertyName: "maxAudioSize", publicName: "maxAudioSize", isSignal: true, isRequired: false, transformFunction: null }, imageExtList: { classPropertyName: "imageExtList", publicName: "imageExtList", isSignal: true, isRequired: false, transformFunction: null }, videoExtList: { classPropertyName: "videoExtList", publicName: "videoExtList", isSignal: true, isRequired: false, transformFunction: null }, documentExtList: { classPropertyName: "documentExtList", publicName: "documentExtList", isSignal: true, isRequired: false, transformFunction: null }, audioExtList: { classPropertyName: "audioExtList", publicName: "audioExtList", isSignal: true, isRequired: false, transformFunction: null }, classIncludeListItem: { classPropertyName: "classIncludeListItem", publicName: "classIncludeListItem", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null }, disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, ignoreShowSizeFile: { classPropertyName: "ignoreShowSizeFile", publicName: "ignoreShowSizeFile", isSignal: true, isRequired: false, transformFunction: null }, allowShowPushMessageMaxSizeError: { classPropertyName: "allowShowPushMessageMaxSizeError", publicName: "allowShowPushMessageMaxSizeError", isSignal: true, isRequired: false, transformFunction: null }, messageTypeFileError: { classPropertyName: "messageTypeFileError", publicName: "messageTypeFileError", isSignal: true, isRequired: false, transformFunction: null }, messageMaxSizeError: { classPropertyName: "messageMaxSizeError", publicName: "messageMaxSizeError", isSignal: true, isRequired: false, transformFunction: null }, messageFileUploadError: { classPropertyName: "messageFileUploadError", publicName: "messageFileUploadError", isSignal: true, isRequired: false, transformFunction: null }, messageTotalFileExceedsError: { classPropertyName: "messageTotalFileExceedsError", publicName: "messageTotalFileExceedsError", isSignal: true, isRequired: false, transformFunction: null }, configDescriptionInputUpload: { classPropertyName: "configDescriptionInputUpload", publicName: "configDescriptionInputUpload", isSignal: true, isRequired: false, transformFunction: null }, modeDisplayFile: { classPropertyName: "modeDisplayFile", publicName: "modeDisplayFile", isSignal: true, isRequired: false, transformFunction: null }, descriptionFormatAndSizeFile: { classPropertyName: "descriptionFormatAndSizeFile", publicName: "descriptionFormatAndSizeFile", isSignal: true, isRequired: false, transformFunction: null }, showVideoDuration: { classPropertyName: "showVideoDuration", publicName: "showVideoDuration", isSignal: true, isRequired: false, transformFunction: null }, labelConfig: { classPropertyName: "labelConfig", publicName: "labelConfig", isSignal: true, isRequired: false, transformFunction: null }, showBlockUploadWhenHasFileAndModeSingle: { classPropertyName: "showBlockUploadWhenHasFileAndModeSingle", publicName: "showBlockUploadWhenHasFileAndModeSingle", isSignal: true, isRequired: false, transformFunction: null }, ignoreIconRemove: { classPropertyName: "ignoreIconRemove", publicName: "ignoreIconRemove", isSignal: true, isRequired: false, transformFunction: null }, ignoreIconEdit: { classPropertyName: "ignoreIconEdit", publicName: "ignoreIconEdit", isSignal: true, isRequired: false, transformFunction: null }, ignoreIconPreview: { classPropertyName: "ignoreIconPreview", publicName: "ignoreIconPreview", isSignal: true, isRequired: false, transformFunction: null }, classIncludeFileContent: { classPropertyName: "classIncludeFileContent", publicName: "classIncludeFileContent", isSignal: true, isRequired: false, transformFunction: null }, showBorderErrorAllItemWhenError: { classPropertyName: "showBorderErrorAllItemWhenError", publicName: "showBorderErrorAllItemWhenError", isSignal: true, isRequired: false, transformFunction: null }, configDownloadSampleFile: { classPropertyName: "configDownloadSampleFile", publicName: "configDownloadSampleFile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outClose: "outClose", outFileChanged: "outFileChanged", outFileRemoved: "outFileRemoved", outFunctionsControl: "outFunctionsControl" }, viewQueries: [{ propertyName: "uploadRef", first: true, predicate: ["upload"], descendants: true, isSignal: true }, { propertyName: "uploadInputRef", first: true, predicate: ["uploadInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col w-full h-full\">\n <div>\n @if (labelConfig();as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable() || readonly() \"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable() || readonly() \"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || disable() || readonly() \"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable() || readonly() \"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n @if ((!configDownloadSampleFile()?.position || configDownloadSampleFile()?.position === 'top') && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mb-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile?.title || ' '\"\n (outClick)=\"handlerDownloadSampleFile($event)\" />\n }\n @if (multiple() || showBlockUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple())) {\n <div #upload\n class=\"libs-ui-components-inputs-upload\"\n [class.libs-ui-components-inputs-upload-disable]=\"disable() || readonly() || (!multiple() && fileList().length && !canUploadIfHasExistFile())\"\n [class.libs-ui-components-inputs-upload-readonly]=\"readonly()\"\n [class.libs-ui-components-inputs-upload-error]=\"messageError()\">\n <div class=\"flex items-center\">\n <div class=\"mr-[16px]\">\n <i class=\"libs-ui-components-inputs-upload-icon libs-ui-icon-file-upload before:!text-[32px]\"></i>\n </div>\n <div class=\"libs-ui-components-inputs-upload-description\">\n <div class=\"mb-[4px] libs-ui-font-h6m\"\n [innerHTML]=\"(configDescriptionInputUpload().message || '') | translate:configDescriptionInputUpload().interpolateParams\">\n </div>\n @for (item of descriptionFormatAndSizeFileComputed(); track item; let last = $last) {\n <div class=\"libs-ui-font-h7r\"\n [class.mb-[4px]]=\"!last\"\n [innerHTML]=\"item.message | translate:item.interpolateParams\">\n </div>\n }\n </div>\n </div>\n @if (multiple()) {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n multiple\n [accept]=\"accessFiles()\" />\n } @else {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n [accept]=\"accessFiles()\" />\n }\n </div>\n }\n @if (messageError() && (multiple() || showBlockUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple()))) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">\n {{ (messageError() || '') | translate:{ value: limitFile() } }}\n </div>\n }\n @if (configDownloadSampleFile()?.position === 'bottom' && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mt-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile.title || ' '\"\n (moClick)=\"handlerDownloadSampleFile($event)\" />\n }\n </div>\n @if (fileList().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"relative w-full h-full px-[10px] libs-ui-components-inputs-upload-view-list {{ classIncludeFileContent() || '' }}\"\n [class.mt-[12px]]=\"multiple() || showBlockUploadWhenHasFileAndModeSingle()\">\n <ng-content select=\"[label-file]\"></ng-content>\n @for (item of fileList(); track item(); let first = $first) {\n <div class=\"libs-ui-components-inputs-upload-view-list-item {{ classIncludeListItem() || '' }}\"\n [class.libs-ui-components-inputs-upload-file-full]=\"modeDisplayFile() === 'full'\"\n [class.libs-ui-components-inputs-upload-file-short]=\"modeDisplayFile() === 'short'\"\n [class.libs-ui-border-error-general]=\"item().error || (messageError() && showBorderErrorAllItemWhenError())\"\n [class.mt-0]=\"first && !multiple() && !showBlockUploadWhenHasFileAndModeSingle()\">\n\n <div class=\"flex w-full\">\n <div class=\"flex items-center\">\n @if (canSetAvatar() && item().type === 'image') {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'!mr-0' + (item().isAvatar ? ' libs-ui-icon-check-circle-solid before:!text-[#00bc62]': ' libs-ui-icon-check-circle-outline') + ((disable() || readonly() || item().isUploading || !!item().error) ? ' libs-ui-disable' : '')\"\n [popover]=\"{config:{ content: item().isAvatar ? 'i18n_avatar' : 'i18n_choose_as_your_avatar', zIndex: zIndex()}}\"\n [classInclude]=\"'!mr-[12px] !p-0'\"\n [disable]=\"disable() || readonly() || item().isUploading || !!item().error\"\n (outClick)=\"handlerSetAvatar($event, item)\" />\n }\n </div>\n <div class=\"flex\"\n [class.w-[calc(100%-28px)]]=\"canSetAvatar()\"\n [class.w-full]=\"!canSetAvatar()\">\n @if (modeDisplayFile() === 'full') {\n <libs_ui-components-inputs-upload-avatar [disable]=\"disable() || readonly() \"\n [(item)]=\"item\"\n [showVideoDuration]=\"showVideoDuration()\"\n (outOpenPreview)=\"handlerOpenPreviewFile($event)\" />\n }\n <div class=\"relative w-full\">\n <div class=\"flex absolute w-full h-full flex-col\"\n [class.flex-col]=\"modeDisplayFile() === 'full'\"\n [class.justify-center]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\">\n <libs_ui-components-label class=\"flex w-full\"\n [labelLeft]=\"item().name\"\n [zIndexPopover]=\"zIndex() + 1\"\n [labelLeftClass]=\"'libs-ui-font-h6m ' + ((disable() || readonly() || item().isUploading || item().error) ? 'text-[#6a7383]' : 'text-[#071631]')\"\n [classInclude]=\"modeDisplayFile() === 'short' ? '!mb-0' : ''\" />\n\n @if (!ignoreShowSizeFile()) {\n <div class=\"text-[#9ca2ad] libs-ui-font-h7r shrink-0\"\n [class.flex]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\"\n [class.ml-[12px]]=\"modeDisplayFile() === 'short'\">\n {{ item().size }}\n </div>\n }\n </div>\n </div>\n @if (item().isUploading && item().percentUploading) {\n <div class=\"flex items-center ml-[16px]\"\n [class.mr-[26px]]=\"modeDisplayFile() === 'full'\">\n <div class=\"w-[120px] h-[4px] rounded-[4px] bg-[#f8f9fa] relative\">\n <div class=\"absolute top-0 left-0 h-[4px] rounded-[4px] bg-[#00bc62]\"\n [style.width.px]=\"(item().percentUploading ?? 0)*1.2\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"flex ml-[16px]\">\n @if (!ignoreIconPreview()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-eye-outline !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_preview', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() && !ignoreIconEdit() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerOpenPreviewFile(item())\" />\n }\n @if (item().type === 'image' && !item().error && !ignoreIconEdit()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-edit-line !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_edit', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerEditImage($event, item)\" />\n }\n @if (!ignoreIconRemove()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-close !mr-0'\"\n [popover]=\"{config: {content: 'i18n_delete', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0'\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerRemoveFile($event, item)\" />\n }\n </div>\n </div>\n @if (item().error && (multiple() || !showBlockUploadWhenHasFileAndModeSingle())) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">{{ (item().error || ' ') | translate }}</div>\n }\n }\n </div>\n }\n</div>\n", styles: [":host ::ng-deep .libs-ui-components-inputs-upload{width:100%;padding:16px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;background-color:#fff;border:1px dashed #e6e7ea}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-icon:before{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-color-default, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over{background-color:var(--libs-ui-color-light-3, #f4f8ff);border:1px dashed var(--libs-ui-color-light-1, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-icon:before,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description span,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-disable{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-background-disable, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-icon:before{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-backgrond-realonly, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-error{background-color:#fef5f6!important;border:1px dashed #ee2d41!important}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-file-full{background-color:#fff;padding:8px 12px}:host ::ng-deep .libs-ui-components-inputs-upload-file-short{background-color:#f4f8ff;padding:6px 12px}.libs-ui-components-inputs-upload-view-list{overflow-y:auto;max-height:100%;padding:0 10px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item{width:100%;display:flex;align-items:center;justify-content:center;border-radius:4px;margin-bottom:8px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item:hover{background-color:#f8f9fa}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsInputsUploadAvatarComponent, selector: "libs_ui-components-inputs-upload-avatar", inputs: ["item", "showVideoDuration", "disable", "size"], outputs: ["itemChange", "outOpenPreview"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
667
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LibsUiComponentsInputsUploadComponent, isStandalone: true, selector: "libs_ui-components-inputs-upload", inputs: { originFiles: { classPropertyName: "originFiles", publicName: "originFiles", isSignal: true, isRequired: false, transformFunction: null }, fileType: { classPropertyName: "fileType", publicName: "fileType", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, canUploadIfHasExistFile: { classPropertyName: "canUploadIfHasExistFile", publicName: "canUploadIfHasExistFile", isSignal: true, isRequired: false, transformFunction: null }, canSetAvatar: { classPropertyName: "canSetAvatar", publicName: "canSetAvatar", isSignal: true, isRequired: false, transformFunction: null }, limitFile: { classPropertyName: "limitFile", publicName: "limitFile", isSignal: true, isRequired: false, transformFunction: null }, maxTotalSize: { classPropertyName: "maxTotalSize", publicName: "maxTotalSize", isSignal: true, isRequired: false, transformFunction: null }, maxImageSize: { classPropertyName: "maxImageSize", publicName: "maxImageSize", isSignal: true, isRequired: false, transformFunction: null }, maxVideoSize: { classPropertyName: "maxVideoSize", publicName: "maxVideoSize", isSignal: true, isRequired: false, transformFunction: null }, maxDocumentSize: { classPropertyName: "maxDocumentSize", publicName: "maxDocumentSize", isSignal: true, isRequired: false, transformFunction: null }, maxAudioSize: { classPropertyName: "maxAudioSize", publicName: "maxAudioSize", isSignal: true, isRequired: false, transformFunction: null }, imageExtList: { classPropertyName: "imageExtList", publicName: "imageExtList", isSignal: true, isRequired: false, transformFunction: null }, videoExtList: { classPropertyName: "videoExtList", publicName: "videoExtList", isSignal: true, isRequired: false, transformFunction: null }, documentExtList: { classPropertyName: "documentExtList", publicName: "documentExtList", isSignal: true, isRequired: false, transformFunction: null }, audioExtList: { classPropertyName: "audioExtList", publicName: "audioExtList", isSignal: true, isRequired: false, transformFunction: null }, classIncludeListItem: { classPropertyName: "classIncludeListItem", publicName: "classIncludeListItem", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null }, disable: { classPropertyName: "disable", publicName: "disable", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, aspectRatio: { classPropertyName: "aspectRatio", publicName: "aspectRatio", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, ignoreShowSizeFile: { classPropertyName: "ignoreShowSizeFile", publicName: "ignoreShowSizeFile", isSignal: true, isRequired: false, transformFunction: null }, allowShowPushMessageMaxSizeError: { classPropertyName: "allowShowPushMessageMaxSizeError", publicName: "allowShowPushMessageMaxSizeError", isSignal: true, isRequired: false, transformFunction: null }, messageTypeFileError: { classPropertyName: "messageTypeFileError", publicName: "messageTypeFileError", isSignal: true, isRequired: false, transformFunction: null }, messageMaxSizeError: { classPropertyName: "messageMaxSizeError", publicName: "messageMaxSizeError", isSignal: true, isRequired: false, transformFunction: null }, messageFileUploadError: { classPropertyName: "messageFileUploadError", publicName: "messageFileUploadError", isSignal: true, isRequired: false, transformFunction: null }, messageTotalFileExceedsError: { classPropertyName: "messageTotalFileExceedsError", publicName: "messageTotalFileExceedsError", isSignal: true, isRequired: false, transformFunction: null }, configDescriptionInputUpload: { classPropertyName: "configDescriptionInputUpload", publicName: "configDescriptionInputUpload", isSignal: true, isRequired: false, transformFunction: null }, modeDisplayFile: { classPropertyName: "modeDisplayFile", publicName: "modeDisplayFile", isSignal: true, isRequired: false, transformFunction: null }, descriptionFormatAndSizeFile: { classPropertyName: "descriptionFormatAndSizeFile", publicName: "descriptionFormatAndSizeFile", isSignal: true, isRequired: false, transformFunction: null }, showVideoDuration: { classPropertyName: "showVideoDuration", publicName: "showVideoDuration", isSignal: true, isRequired: false, transformFunction: null }, labelConfig: { classPropertyName: "labelConfig", publicName: "labelConfig", isSignal: true, isRequired: false, transformFunction: null }, showPopupUploadWhenHasFileAndModeSingle: { classPropertyName: "showPopupUploadWhenHasFileAndModeSingle", publicName: "showPopupUploadWhenHasFileAndModeSingle", isSignal: true, isRequired: false, transformFunction: null }, ignoreIconRemove: { classPropertyName: "ignoreIconRemove", publicName: "ignoreIconRemove", isSignal: true, isRequired: false, transformFunction: null }, ignoreIconEdit: { classPropertyName: "ignoreIconEdit", publicName: "ignoreIconEdit", isSignal: true, isRequired: false, transformFunction: null }, ignoreIconPreview: { classPropertyName: "ignoreIconPreview", publicName: "ignoreIconPreview", isSignal: true, isRequired: false, transformFunction: null }, classIncludeFileContent: { classPropertyName: "classIncludeFileContent", publicName: "classIncludeFileContent", isSignal: true, isRequired: false, transformFunction: null }, showBorderErrorAllItemWhenError: { classPropertyName: "showBorderErrorAllItemWhenError", publicName: "showBorderErrorAllItemWhenError", isSignal: true, isRequired: false, transformFunction: null }, configDownloadSampleFile: { classPropertyName: "configDownloadSampleFile", publicName: "configDownloadSampleFile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outClose: "outClose", outFileChanged: "outFileChanged", outFileRemoved: "outFileRemoved", outFunctionsControl: "outFunctionsControl" }, viewQueries: [{ propertyName: "uploadRef", first: true, predicate: ["upload"], descendants: true, isSignal: true }, { propertyName: "uploadInputRef", first: true, predicate: ["uploadInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col w-full h-full\">\n <div>\n @if (labelConfig();as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable() || readonly() \"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable() || readonly() \"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || disable() || readonly() \"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable() || readonly() \"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n @if ((!configDownloadSampleFile()?.position || configDownloadSampleFile()?.position === 'top') && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mb-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile?.title || ' '\"\n (outClick)=\"handlerDownloadSampleFile($event)\" />\n }\n @if (multiple() || !showPopupUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple())) {\n <div #upload\n LibsUiComponentsInputsUploadDirective\n LibsUiComponentsInputsUploadDropFileDirective\n class=\"libs-ui-components-inputs-upload\"\n [class.libs-ui-components-inputs-upload-disable]=\"disable() || readonly() || (!multiple() && fileList().length && !canUploadIfHasExistFile())\"\n [class.libs-ui-components-inputs-upload-readonly]=\"readonly()\"\n [class.libs-ui-components-inputs-upload-error]=\"messageError()\"\n [multiple]=\"multiple()\"\n [accessFiles]=\"accessFiles()\"\n (outUploadFiles)=\"handleUploadFiles($event)\"\n (outUploadFile)=\"handleUploadFiles([$event])\"\n (outDragOver)=\"handlerSetClassDrag(true)\"\n (outDragLeave)=\"handlerSetClassDrag(false)\"\n (outDrop)=\"handlerSetClassDrag(false)\"\n (outDropFiles)=\"handleUploadFiles($event)\"\n (outDropFile)=\"handleUploadFiles([$event])\">\n <div class=\"flex items-center\">\n <div class=\"mr-[16px]\">\n <i class=\"libs-ui-components-inputs-upload-icon libs-ui-icon-file-upload before:!text-[32px]\"></i>\n </div>\n <div class=\"libs-ui-components-inputs-upload-description\">\n <div class=\"mb-[4px] libs-ui-font-h6m\"\n [innerHTML]=\"(configDescriptionInputUpload().message || '') | translate:configDescriptionInputUpload().interpolateParams\">\n </div>\n @for (item of descriptionFormatAndSizeFileComputed(); track item; let last = $last) {\n <div class=\"libs-ui-font-h7r\"\n [class.mb-[4px]]=\"!last\"\n [innerHTML]=\"item.message | translate:item.interpolateParams\">\n </div>\n }\n </div>\n </div>\n @if (multiple()) {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n multiple\n [accept]=\"accessFiles()\" />\n } @else {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n [accept]=\"accessFiles()\" />\n }\n </div>\n }\n @if (messageError() && (multiple() || !showPopupUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple()))) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">\n {{ (messageError() || '') | translate:{ value: limitFile() } }}\n </div>\n }\n @if (configDownloadSampleFile()?.position === 'bottom' && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mt-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile.title || ' '\"\n (moClick)=\"handlerDownloadSampleFile($event)\" />\n }\n </div>\n @if (fileList().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"relative w-full h-full px-[10px] libs-ui-components-inputs-upload-view-list {{ classIncludeFileContent() || '' }}\"\n [class.mt-[12px]]=\"multiple() || !showPopupUploadWhenHasFileAndModeSingle()\">\n <ng-content select=\"[label-file]\"></ng-content>\n @for (item of fileList(); track item(); let first = $first) {\n <div class=\"libs-ui-components-inputs-upload-view-list-item {{ classIncludeListItem() || '' }}\"\n [class.libs-ui-components-inputs-upload-file-full]=\"modeDisplayFile() === 'full'\"\n [class.libs-ui-components-inputs-upload-file-short]=\"modeDisplayFile() === 'short'\"\n [class.libs-ui-border-error-general]=\"item().error || (messageError() && showBorderErrorAllItemWhenError())\"\n [class.mt-0]=\"first && !multiple() && !showPopupUploadWhenHasFileAndModeSingle()\">\n\n <div class=\"flex w-full\">\n <div class=\"flex items-center\">\n @if (canSetAvatar() && item().type === 'image') {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'!mr-0' + (item().isAvatar ? ' libs-ui-icon-check-circle-solid before:!text-[#00bc62]': ' libs-ui-icon-check-circle-outline') + ((disable() || readonly() || item().isUploading || !!item().error) ? ' libs-ui-disable' : '')\"\n [popover]=\"{config:{ content: item().isAvatar ? 'i18n_avatar' : 'i18n_choose_as_your_avatar', zIndex: zIndex()}}\"\n [classInclude]=\"'!mr-[12px] !p-0'\"\n [disable]=\"disable() || readonly() || item().isUploading || !!item().error\"\n (outClick)=\"handlerSetAvatar($event, item)\" />\n }\n </div>\n <div class=\"flex\"\n [class.w-[calc(100%-28px)]]=\"canSetAvatar()\"\n [class.w-full]=\"!canSetAvatar()\">\n @if (modeDisplayFile() === 'full') {\n <libs_ui-components-inputs-upload-avatar [disable]=\"disable() || readonly() \"\n [(item)]=\"item\"\n [showVideoDuration]=\"showVideoDuration()\"\n (outOpenPreview)=\"handlerOpenPreviewFile($event)\" />\n }\n <div class=\"relative w-full\">\n <div class=\"flex absolute w-full h-full flex-col\"\n [class.flex-col]=\"modeDisplayFile() === 'full'\"\n [class.justify-center]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\">\n <libs_ui-components-label class=\"flex w-full\"\n [labelLeft]=\"item().name\"\n [zIndexPopover]=\"zIndex() + 1\"\n [labelLeftClass]=\"'libs-ui-font-h6m ' + ((disable() || readonly() || item().isUploading || item().error) ? 'text-[#6a7383]' : 'text-[#071631]')\"\n [classInclude]=\"modeDisplayFile() === 'short' ? '!mb-0' : ''\" />\n\n @if (!ignoreShowSizeFile()) {\n <div class=\"text-[#9ca2ad] libs-ui-font-h7r shrink-0\"\n [class.flex]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\"\n [class.ml-[12px]]=\"modeDisplayFile() === 'short'\">\n {{ item().size }}\n </div>\n }\n </div>\n </div>\n @if (item().isUploading && item().percentUploading) {\n <div class=\"flex items-center ml-[16px]\"\n [class.mr-[26px]]=\"modeDisplayFile() === 'full'\">\n <div class=\"w-[120px] h-[4px] rounded-[4px] bg-[#f8f9fa] relative\">\n <div class=\"absolute top-0 left-0 h-[4px] rounded-[4px] bg-[#00bc62]\"\n [style.width.px]=\"(item().percentUploading ?? 0)*1.2\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"flex ml-[16px]\">\n @if (!ignoreIconPreview()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-eye-outline !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_preview', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() && !ignoreIconEdit() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerOpenPreviewFile(item())\" />\n }\n @if (item().type === 'image' && !item().error && !ignoreIconEdit()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-edit-line !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_edit', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerEditImage($event, item)\" />\n }\n @if (!ignoreIconRemove()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-close !mr-0'\"\n [popover]=\"{config: {content: 'i18n_delete', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0'\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerRemoveFile($event, item)\" />\n }\n </div>\n </div>\n @if (item().error && (multiple() || showPopupUploadWhenHasFileAndModeSingle())) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">{{ (item().error || ' ') | translate }}</div>\n }\n }\n </div>\n }\n</div>\n", styles: [":host ::ng-deep .libs-ui-components-inputs-upload{width:100%;padding:16px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;background-color:#fff;border:1px dashed #e6e7ea}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-icon:before{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-color-default, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over{background-color:var(--libs-ui-color-light-3, #f4f8ff);border:1px dashed var(--libs-ui-color-light-1, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-icon:before,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description span,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-disable{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-background-disable, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-icon:before{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-backgrond-realonly, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-error{background-color:#fef5f6!important;border:1px dashed #ee2d41!important}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-file-full{background-color:#fff;padding:8px 12px}:host ::ng-deep .libs-ui-components-inputs-upload-file-short{background-color:#f4f8ff;padding:6px 12px}.libs-ui-components-inputs-upload-view-list{overflow-y:auto;max-height:100%;padding:0 10px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item{width:100%;display:flex;align-items:center;justify-content:center;border-radius:4px;margin-bottom:8px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item:hover{background-color:#f8f9fa}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsLabelComponent, selector: "libs_ui-components-label", inputs: ["iconPopoverClass", "classInclude", "labelLeft", "labelLeftClass", "labelLeftBehindToggleButton", "popover", "required", "buttonsLeft", "disableButtonsLeft", "buttonsRight", "disableButtonsRight", "labelRight", "labelRightClass", "labelRightRequired", "hasToggle", "toggleSize", "toggleActive", "toggleDisable", "description", "descriptionClass", "buttonsDescription", "disableButtonsDescription", "buttonsDescriptionContainerClass", "onlyShowCount", "zIndexPopover", "timerDestroyPopover", "count", "limitLength"], outputs: ["outClickButton", "outSwitchEvent", "outLabelRightClick", "outLabelLeftClick"] }, { kind: "component", type: LibsUiComponentsInputsUploadAvatarComponent, selector: "libs_ui-components-inputs-upload-avatar", inputs: ["item", "showVideoDuration", "disable", "size"], outputs: ["itemChange", "outOpenPreview"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }, { kind: "directive", type: LibsUiComponentsInputsUploadDirective, selector: "[LibsUiComponentsInputsUploadDirective]", inputs: ["multiple", "accessFiles"], outputs: ["outUploadFiles", "outUploadFile"] }, { kind: "directive", type: LibsUiComponentsInputsUploadDropFileDirective, selector: "[LibsUiComponentsInputsUploadDropFileDirective]", inputs: ["multiple"], outputs: ["outDragOver", "outDragLeave", "outDrop", "outDropFiles", "outDropFile"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
612
668
|
}
|
|
613
669
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsInputsUploadComponent, decorators: [{
|
|
614
670
|
type: Component,
|
|
@@ -616,13 +672,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
616
672
|
LibsUiComponentsButtonsButtonComponent,
|
|
617
673
|
LibsUiComponentsLabelComponent,
|
|
618
674
|
LibsUiComponentsInputsUploadAvatarComponent,
|
|
619
|
-
LibsUiComponentsScrollOverlayDirective
|
|
620
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col w-full h-full\">\n <div>\n @if (labelConfig();as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable() || readonly() \"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable() || readonly() \"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || disable() || readonly() \"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable() || readonly() \"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n @if ((!configDownloadSampleFile()?.position || configDownloadSampleFile()?.position === 'top') && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mb-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile?.title || ' '\"\n (outClick)=\"handlerDownloadSampleFile($event)\" />\n }\n @if (multiple() || showBlockUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple())) {\n <div #upload\n class=\"libs-ui-components-inputs-upload\"\n [class.libs-ui-components-inputs-upload-disable]=\"disable() || readonly() || (!multiple() && fileList().length && !canUploadIfHasExistFile())\"\n [class.libs-ui-components-inputs-upload-readonly]=\"readonly()\"\n [class.libs-ui-components-inputs-upload-error]=\"messageError()\">\n <div class=\"flex items-center\">\n <div class=\"mr-[16px]\">\n <i class=\"libs-ui-components-inputs-upload-icon libs-ui-icon-file-upload before:!text-[32px]\"></i>\n </div>\n <div class=\"libs-ui-components-inputs-upload-description\">\n <div class=\"mb-[4px] libs-ui-font-h6m\"\n [innerHTML]=\"(configDescriptionInputUpload().message || '') | translate:configDescriptionInputUpload().interpolateParams\">\n </div>\n @for (item of descriptionFormatAndSizeFileComputed(); track item; let last = $last) {\n <div class=\"libs-ui-font-h7r\"\n [class.mb-[4px]]=\"!last\"\n [innerHTML]=\"item.message | translate:item.interpolateParams\">\n </div>\n }\n </div>\n </div>\n @if (multiple()) {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n multiple\n [accept]=\"accessFiles()\" />\n } @else {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n [accept]=\"accessFiles()\" />\n }\n </div>\n }\n @if (messageError() && (multiple() || showBlockUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple()))) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">\n {{ (messageError() || '') | translate:{ value: limitFile() } }}\n </div>\n }\n @if (configDownloadSampleFile()?.position === 'bottom' && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mt-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile.title || ' '\"\n (moClick)=\"handlerDownloadSampleFile($event)\" />\n }\n </div>\n @if (fileList().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"relative w-full h-full px-[10px] libs-ui-components-inputs-upload-view-list {{ classIncludeFileContent() || '' }}\"\n [class.mt-[12px]]=\"multiple() || showBlockUploadWhenHasFileAndModeSingle()\">\n <ng-content select=\"[label-file]\"></ng-content>\n @for (item of fileList(); track item(); let first = $first) {\n <div class=\"libs-ui-components-inputs-upload-view-list-item {{ classIncludeListItem() || '' }}\"\n [class.libs-ui-components-inputs-upload-file-full]=\"modeDisplayFile() === 'full'\"\n [class.libs-ui-components-inputs-upload-file-short]=\"modeDisplayFile() === 'short'\"\n [class.libs-ui-border-error-general]=\"item().error || (messageError() && showBorderErrorAllItemWhenError())\"\n [class.mt-0]=\"first && !multiple() && !showBlockUploadWhenHasFileAndModeSingle()\">\n\n <div class=\"flex w-full\">\n <div class=\"flex items-center\">\n @if (canSetAvatar() && item().type === 'image') {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'!mr-0' + (item().isAvatar ? ' libs-ui-icon-check-circle-solid before:!text-[#00bc62]': ' libs-ui-icon-check-circle-outline') + ((disable() || readonly() || item().isUploading || !!item().error) ? ' libs-ui-disable' : '')\"\n [popover]=\"{config:{ content: item().isAvatar ? 'i18n_avatar' : 'i18n_choose_as_your_avatar', zIndex: zIndex()}}\"\n [classInclude]=\"'!mr-[12px] !p-0'\"\n [disable]=\"disable() || readonly() || item().isUploading || !!item().error\"\n (outClick)=\"handlerSetAvatar($event, item)\" />\n }\n </div>\n <div class=\"flex\"\n [class.w-[calc(100%-28px)]]=\"canSetAvatar()\"\n [class.w-full]=\"!canSetAvatar()\">\n @if (modeDisplayFile() === 'full') {\n <libs_ui-components-inputs-upload-avatar [disable]=\"disable() || readonly() \"\n [(item)]=\"item\"\n [showVideoDuration]=\"showVideoDuration()\"\n (outOpenPreview)=\"handlerOpenPreviewFile($event)\" />\n }\n <div class=\"relative w-full\">\n <div class=\"flex absolute w-full h-full flex-col\"\n [class.flex-col]=\"modeDisplayFile() === 'full'\"\n [class.justify-center]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\">\n <libs_ui-components-label class=\"flex w-full\"\n [labelLeft]=\"item().name\"\n [zIndexPopover]=\"zIndex() + 1\"\n [labelLeftClass]=\"'libs-ui-font-h6m ' + ((disable() || readonly() || item().isUploading || item().error) ? 'text-[#6a7383]' : 'text-[#071631]')\"\n [classInclude]=\"modeDisplayFile() === 'short' ? '!mb-0' : ''\" />\n\n @if (!ignoreShowSizeFile()) {\n <div class=\"text-[#9ca2ad] libs-ui-font-h7r shrink-0\"\n [class.flex]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\"\n [class.ml-[12px]]=\"modeDisplayFile() === 'short'\">\n {{ item().size }}\n </div>\n }\n </div>\n </div>\n @if (item().isUploading && item().percentUploading) {\n <div class=\"flex items-center ml-[16px]\"\n [class.mr-[26px]]=\"modeDisplayFile() === 'full'\">\n <div class=\"w-[120px] h-[4px] rounded-[4px] bg-[#f8f9fa] relative\">\n <div class=\"absolute top-0 left-0 h-[4px] rounded-[4px] bg-[#00bc62]\"\n [style.width.px]=\"(item().percentUploading ?? 0)*1.2\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"flex ml-[16px]\">\n @if (!ignoreIconPreview()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-eye-outline !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_preview', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() && !ignoreIconEdit() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerOpenPreviewFile(item())\" />\n }\n @if (item().type === 'image' && !item().error && !ignoreIconEdit()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-edit-line !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_edit', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerEditImage($event, item)\" />\n }\n @if (!ignoreIconRemove()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-close !mr-0'\"\n [popover]=\"{config: {content: 'i18n_delete', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0'\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerRemoveFile($event, item)\" />\n }\n </div>\n </div>\n @if (item().error && (multiple() || !showBlockUploadWhenHasFileAndModeSingle())) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">{{ (item().error || ' ') | translate }}</div>\n }\n }\n </div>\n }\n</div>\n", styles: [":host ::ng-deep .libs-ui-components-inputs-upload{width:100%;padding:16px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;background-color:#fff;border:1px dashed #e6e7ea}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-icon:before{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-color-default, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over{background-color:var(--libs-ui-color-light-3, #f4f8ff);border:1px dashed var(--libs-ui-color-light-1, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-icon:before,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description span,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-disable{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-background-disable, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-icon:before{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-backgrond-realonly, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-error{background-color:#fef5f6!important;border:1px dashed #ee2d41!important}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-file-full{background-color:#fff;padding:8px 12px}:host ::ng-deep .libs-ui-components-inputs-upload-file-short{background-color:#f4f8ff;padding:6px 12px}.libs-ui-components-inputs-upload-view-list{overflow-y:auto;max-height:100%;padding:0 10px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item{width:100%;display:flex;align-items:center;justify-content:center;border-radius:4px;margin-bottom:8px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item:hover{background-color:#f8f9fa}\n"] }]
|
|
675
|
+
LibsUiComponentsScrollOverlayDirective,
|
|
676
|
+
LibsUiComponentsInputsUploadDirective,
|
|
677
|
+
LibsUiComponentsInputsUploadDropFileDirective
|
|
678
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col w-full h-full\">\n <div>\n @if (labelConfig();as labelConfig) {\n <libs_ui-components-label [classInclude]=\"labelConfig.classInclude\"\n [labelLeft]=\"labelConfig.labelLeft\"\n [labelLeftClass]=\"labelConfig.labelLeftClass\"\n [required]=\"labelConfig.required \"\n [description]=\"labelConfig.description\"\n [labelRight]=\"labelConfig.labelRight\"\n [labelRightClass]=\"labelConfig.labelRightClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [buttonsLeft]=\"labelConfig.buttonsLeft\"\n [buttonsRight]=\"labelConfig.buttonsRight\"\n [disableButtonsLeft]=\"labelConfig.disableButtonsLeft || disable() || readonly() \"\n [disableButtonsRight]=\"labelConfig.disableButtonsRight || disable() || readonly() \"\n [hasToggle]=\"labelConfig.hasToggle\"\n [toggleActive]=\"labelConfig.toggleActive\"\n [toggleDisable]=\"labelConfig.toggleDisable || disable() || readonly() \"\n [popover]=\"labelConfig.popover\"\n [iconPopoverClass]=\"labelConfig.iconPopoverClass\"\n [onlyShowCount]=\"labelConfig.onlyShowCount\"\n [limitLength]=\"labelConfig.limitLength\"\n [buttonsDescription]=\"labelConfig.buttonsDescription\"\n [disableButtonsDescription]=\"labelConfig.disableButtonsDescription || disable() || readonly() \"\n [buttonsDescriptionContainerClass]=\"labelConfig.buttonsDescriptionContainerClass\"\n [count]=\"labelConfig.count\" />\n }\n @if ((!configDownloadSampleFile()?.position || configDownloadSampleFile()?.position === 'top') && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mb-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile?.title || ' '\"\n (outClick)=\"handlerDownloadSampleFile($event)\" />\n }\n @if (multiple() || !showPopupUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple())) {\n <div #upload\n LibsUiComponentsInputsUploadDirective\n LibsUiComponentsInputsUploadDropFileDirective\n class=\"libs-ui-components-inputs-upload\"\n [class.libs-ui-components-inputs-upload-disable]=\"disable() || readonly() || (!multiple() && fileList().length && !canUploadIfHasExistFile())\"\n [class.libs-ui-components-inputs-upload-readonly]=\"readonly()\"\n [class.libs-ui-components-inputs-upload-error]=\"messageError()\"\n [multiple]=\"multiple()\"\n [accessFiles]=\"accessFiles()\"\n (outUploadFiles)=\"handleUploadFiles($event)\"\n (outUploadFile)=\"handleUploadFiles([$event])\"\n (outDragOver)=\"handlerSetClassDrag(true)\"\n (outDragLeave)=\"handlerSetClassDrag(false)\"\n (outDrop)=\"handlerSetClassDrag(false)\"\n (outDropFiles)=\"handleUploadFiles($event)\"\n (outDropFile)=\"handleUploadFiles([$event])\">\n <div class=\"flex items-center\">\n <div class=\"mr-[16px]\">\n <i class=\"libs-ui-components-inputs-upload-icon libs-ui-icon-file-upload before:!text-[32px]\"></i>\n </div>\n <div class=\"libs-ui-components-inputs-upload-description\">\n <div class=\"mb-[4px] libs-ui-font-h6m\"\n [innerHTML]=\"(configDescriptionInputUpload().message || '') | translate:configDescriptionInputUpload().interpolateParams\">\n </div>\n @for (item of descriptionFormatAndSizeFileComputed(); track item; let last = $last) {\n <div class=\"libs-ui-font-h7r\"\n [class.mb-[4px]]=\"!last\"\n [innerHTML]=\"item.message | translate:item.interpolateParams\">\n </div>\n }\n </div>\n </div>\n @if (multiple()) {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n multiple\n [accept]=\"accessFiles()\" />\n } @else {\n <input #uploadInput\n class=\"upload-input hidden\"\n type=\"file\"\n name=\"files[]\"\n [accept]=\"accessFiles()\" />\n }\n </div>\n }\n @if (messageError() && (multiple() || !showPopupUploadWhenHasFileAndModeSingle() || (!fileList().length && !multiple()))) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">\n {{ (messageError() || '') | translate:{ value: limitFile() } }}\n </div>\n }\n @if (configDownloadSampleFile()?.position === 'bottom' && configDownloadSampleFile();as configDownloadSampleFile) {\n <libs_ui-components-buttons-button [type]=\"'button-link-primary'\"\n [classLabel]=\"'libs-ui-font-h7m'\"\n [classInclude]=\"'!mt-[8px] !p-0'\"\n [classIconLeft]=\"'libs-ui-icon-attachment before:!text-[12px]'\"\n [label]=\"configDownloadSampleFile.title || ' '\"\n (moClick)=\"handlerDownloadSampleFile($event)\" />\n }\n </div>\n @if (fileList().length) {\n <div LibsUiComponentsScrollOverlayDirective\n class=\"relative w-full h-full px-[10px] libs-ui-components-inputs-upload-view-list {{ classIncludeFileContent() || '' }}\"\n [class.mt-[12px]]=\"multiple() || !showPopupUploadWhenHasFileAndModeSingle()\">\n <ng-content select=\"[label-file]\"></ng-content>\n @for (item of fileList(); track item(); let first = $first) {\n <div class=\"libs-ui-components-inputs-upload-view-list-item {{ classIncludeListItem() || '' }}\"\n [class.libs-ui-components-inputs-upload-file-full]=\"modeDisplayFile() === 'full'\"\n [class.libs-ui-components-inputs-upload-file-short]=\"modeDisplayFile() === 'short'\"\n [class.libs-ui-border-error-general]=\"item().error || (messageError() && showBorderErrorAllItemWhenError())\"\n [class.mt-0]=\"first && !multiple() && !showPopupUploadWhenHasFileAndModeSingle()\">\n\n <div class=\"flex w-full\">\n <div class=\"flex items-center\">\n @if (canSetAvatar() && item().type === 'image') {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'!mr-0' + (item().isAvatar ? ' libs-ui-icon-check-circle-solid before:!text-[#00bc62]': ' libs-ui-icon-check-circle-outline') + ((disable() || readonly() || item().isUploading || !!item().error) ? ' libs-ui-disable' : '')\"\n [popover]=\"{config:{ content: item().isAvatar ? 'i18n_avatar' : 'i18n_choose_as_your_avatar', zIndex: zIndex()}}\"\n [classInclude]=\"'!mr-[12px] !p-0'\"\n [disable]=\"disable() || readonly() || item().isUploading || !!item().error\"\n (outClick)=\"handlerSetAvatar($event, item)\" />\n }\n </div>\n <div class=\"flex\"\n [class.w-[calc(100%-28px)]]=\"canSetAvatar()\"\n [class.w-full]=\"!canSetAvatar()\">\n @if (modeDisplayFile() === 'full') {\n <libs_ui-components-inputs-upload-avatar [disable]=\"disable() || readonly() \"\n [(item)]=\"item\"\n [showVideoDuration]=\"showVideoDuration()\"\n (outOpenPreview)=\"handlerOpenPreviewFile($event)\" />\n }\n <div class=\"relative w-full\">\n <div class=\"flex absolute w-full h-full flex-col\"\n [class.flex-col]=\"modeDisplayFile() === 'full'\"\n [class.justify-center]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\">\n <libs_ui-components-label class=\"flex w-full\"\n [labelLeft]=\"item().name\"\n [zIndexPopover]=\"zIndex() + 1\"\n [labelLeftClass]=\"'libs-ui-font-h6m ' + ((disable() || readonly() || item().isUploading || item().error) ? 'text-[#6a7383]' : 'text-[#071631]')\"\n [classInclude]=\"modeDisplayFile() === 'short' ? '!mb-0' : ''\" />\n\n @if (!ignoreShowSizeFile()) {\n <div class=\"text-[#9ca2ad] libs-ui-font-h7r shrink-0\"\n [class.flex]=\"modeDisplayFile() === 'full'\"\n [class.items-center]=\"modeDisplayFile() === 'short'\"\n [class.ml-[12px]]=\"modeDisplayFile() === 'short'\">\n {{ item().size }}\n </div>\n }\n </div>\n </div>\n @if (item().isUploading && item().percentUploading) {\n <div class=\"flex items-center ml-[16px]\"\n [class.mr-[26px]]=\"modeDisplayFile() === 'full'\">\n <div class=\"w-[120px] h-[4px] rounded-[4px] bg-[#f8f9fa] relative\">\n <div class=\"absolute top-0 left-0 h-[4px] rounded-[4px] bg-[#00bc62]\"\n [style.width.px]=\"(item().percentUploading ?? 0)*1.2\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"flex ml-[16px]\">\n @if (!ignoreIconPreview()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-eye-outline !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_preview', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() && !ignoreIconEdit() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerOpenPreviewFile(item())\" />\n }\n @if (item().type === 'image' && !item().error && !ignoreIconEdit()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-edit-line !mr-0'\"\n [popover]=\"{config:{ content: 'i18n_edit', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0' + (ignoreIconRemove() ? '' : ' !mr-[12px]')\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerEditImage($event, item)\" />\n }\n @if (!ignoreIconRemove()) {\n <libs_ui-components-buttons-button [type]=\"'button-link-third'\"\n [classIconLeft]=\"'libs-ui-icon-close !mr-0'\"\n [popover]=\"{config: {content: 'i18n_delete', zIndex: zIndex()+1}}\"\n [classInclude]=\"'!p-0'\"\n [disable]=\"item().isUploading || disable() || readonly() \"\n (outClick)=\"handlerRemoveFile($event, item)\" />\n }\n </div>\n </div>\n @if (item().error && (multiple() || showPopupUploadWhenHasFileAndModeSingle())) {\n <div class=\"mt-[8px] text-[#ee2d41] libs-ui-font-h7r\">{{ (item().error || ' ') | translate }}</div>\n }\n }\n </div>\n }\n</div>\n", styles: [":host ::ng-deep .libs-ui-components-inputs-upload{width:100%;padding:16px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;background-color:#fff;border:1px dashed #e6e7ea}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-icon:before{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description{color:#9ca2ad}:host ::ng-deep .libs-ui-components-inputs-upload .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-color-default, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over{background-color:var(--libs-ui-color-light-3, #f4f8ff);border:1px dashed var(--libs-ui-color-light-1, #226ff5)}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-icon:before,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload:hover .libs-ui-components-inputs-upload-description span,:host ::ng-deep .libs-ui-components-inputs-upload.libs-ui-components-inputs-upload-drag-over .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-disable{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-background-disable, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-icon:before{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-disable .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-disable, #9ca2ad)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly{cursor:default!important;text-decoration:none;pointer-events:none;background-color:var(--libs-ui-backgrond-realonly, #f8f9fa)!important;border:1px dashed #e6e7ea!important}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-readonly .libs-ui-components-inputs-upload-description span{color:var(--libs-ui-text-realonly, #071631)}:host ::ng-deep .libs-ui-components-inputs-upload-error{background-color:#fef5f6!important;border:1px dashed #ee2d41!important}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-icon:before{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-error .libs-ui-components-inputs-upload-description span{color:#cdd0d6}:host ::ng-deep .libs-ui-components-inputs-upload-file-full{background-color:#fff;padding:8px 12px}:host ::ng-deep .libs-ui-components-inputs-upload-file-short{background-color:#f4f8ff;padding:6px 12px}.libs-ui-components-inputs-upload-view-list{overflow-y:auto;max-height:100%;padding:0 10px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item{width:100%;display:flex;align-items:center;justify-content:center;border-radius:4px;margin-bottom:8px}.libs-ui-components-inputs-upload-view-list .libs-ui-components-inputs-upload-view-list-item:hover{background-color:#f8f9fa}\n"] }]
|
|
621
679
|
}], ctorParameters: () => [] });
|
|
622
680
|
|
|
623
681
|
/**
|
|
624
682
|
* Generated bundle index. Do not edit.
|
|
625
683
|
*/
|
|
626
684
|
|
|
627
|
-
export { LibsUiComponentsInputsUploadComponent };
|
|
685
|
+
export { LibsUiComponentsInputsUploadComponent, LibsUiComponentsInputsUploadDirective, LibsUiComponentsInputsUploadDropFileDirective };
|
|
628
686
|
//# sourceMappingURL=libs-ui-components-inputs-upload.mjs.map
|