@sumaris-net/ngx-components 18.26.13 → 18.26.14-alpha1
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/doc/changelog.md +4 -1
- package/esm2022/src/app/shared/upload-file/upload-file-popover.component.mjs +10 -4
- package/esm2022/src/app/shared/upload-file/upload-file.component.mjs +41 -4
- package/esm2022/src/app/shared/upload-file/upload-file.model.mjs +1 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +48 -5
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/upload-file/upload-file-popover.component.d.ts +5 -1
- package/src/app/shared/upload-file/upload-file.component.d.ts +6 -2
- package/src/app/shared/upload-file/upload-file.model.d.ts +7 -0
- package/src/assets/i18n/en-US.json +2 -0
- package/src/assets/i18n/en.json +2 -0
- package/src/assets/i18n/fr.json +2 -0
- package/src/assets/manifest.json +1 -1
|
@@ -16137,14 +16137,32 @@ class UploadFileComponent {
|
|
|
16137
16137
|
translate;
|
|
16138
16138
|
fileDropEl;
|
|
16139
16139
|
fileExtension;
|
|
16140
|
+
fileExtensionsExcluded = [];
|
|
16140
16141
|
uniqueFile = false;
|
|
16141
16142
|
instantUpload = false;
|
|
16142
16143
|
uploadFn;
|
|
16143
16144
|
deleteFn;
|
|
16144
16145
|
maxParallelUpload;
|
|
16146
|
+
maxFileSizeMb;
|
|
16145
16147
|
autoHideDropArea = false;
|
|
16146
16148
|
files = [];
|
|
16147
16149
|
uploading = false;
|
|
16150
|
+
checks = [
|
|
16151
|
+
// Check blacklisted extensions
|
|
16152
|
+
{
|
|
16153
|
+
isEnabled: () => !isEmptyArray(this.fileExtensionsExcluded),
|
|
16154
|
+
hasError: (file) => this.fileExtensionsExcluded
|
|
16155
|
+
.map((ext) => ext.toLowerCase())
|
|
16156
|
+
.some((ext) => file.name.toLowerCase().endsWith(ext)),
|
|
16157
|
+
error: 'FILE.UPLOAD.EXTENSION_NOT_ALLOWED_ERROR',
|
|
16158
|
+
},
|
|
16159
|
+
// Check max file size
|
|
16160
|
+
{
|
|
16161
|
+
isEnabled: () => isNotNil(this.maxFileSizeMb) && this.maxFileSizeMb > 0,
|
|
16162
|
+
hasError: (file) => file.size > this.maxFileSizeMb * 1024 * 1024,
|
|
16163
|
+
error: 'FILE.UPLOAD.MAX_FILE_SIZE_ERROR',
|
|
16164
|
+
},
|
|
16165
|
+
];
|
|
16148
16166
|
get processingFiles() {
|
|
16149
16167
|
return this.files.filter((f) => !f.deleting && isNotNil(f.progress) && f.progress < 1);
|
|
16150
16168
|
}
|
|
@@ -16225,6 +16243,7 @@ class UploadFileComponent {
|
|
|
16225
16243
|
items = files;
|
|
16226
16244
|
}
|
|
16227
16245
|
this.files.push(...items);
|
|
16246
|
+
this.checkFiles();
|
|
16228
16247
|
this.fileDropEl.nativeElement.value = '';
|
|
16229
16248
|
this.cd.markForCheck();
|
|
16230
16249
|
// Start upload
|
|
@@ -16232,6 +16251,20 @@ class UploadFileComponent {
|
|
|
16232
16251
|
this.uploadFiles(items);
|
|
16233
16252
|
}
|
|
16234
16253
|
}
|
|
16254
|
+
checkFiles() {
|
|
16255
|
+
const noCheckToDo = isEmptyArray(this.checks) || this.checks.every((check) => !check.isEnabled()) || isEmptyArray(this.files);
|
|
16256
|
+
if (noCheckToDo) {
|
|
16257
|
+
return;
|
|
16258
|
+
}
|
|
16259
|
+
this.checks
|
|
16260
|
+
.filter((check) => check.isEnabled())
|
|
16261
|
+
.flatMap((check) => this.files.map((file) => file).map((file) => ({ file, check })))
|
|
16262
|
+
.forEach((c) => {
|
|
16263
|
+
if (!c.file.error && c.check.hasError(c.file)) {
|
|
16264
|
+
c.file.error = c.check.error;
|
|
16265
|
+
}
|
|
16266
|
+
});
|
|
16267
|
+
}
|
|
16235
16268
|
/**
|
|
16236
16269
|
* Execute upload
|
|
16237
16270
|
*/
|
|
@@ -16310,16 +16343,18 @@ class UploadFileComponent {
|
|
|
16310
16343
|
return waitFor(() => this.processingFilesCount === 0, opts);
|
|
16311
16344
|
}
|
|
16312
16345
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadFileComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
16313
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: UploadFileComponent, selector: "app-upload-file", inputs: { fileExtension: "fileExtension", uniqueFile: "uniqueFile", instantUpload: "instantUpload", uploadFn: "uploadFn", deleteFn: "deleteFn", maxParallelUpload: "maxParallelUpload", autoHideDropArea: "autoHideDropArea" }, viewQueries: [{ propertyName: "fileDropEl", first: true, predicate: ["fileDropRef"], descendants: true }], ngImport: i0, template: "@if ((!uniqueFile && !autoHideDropArea) || files.length === 0) {\n <div class=\"container\" appDragAndDrop (fileDropped)=\"onFileDropped($event)\">\n <input\n type=\"file\"\n #fileDropRef\n id=\"fileDropRef\"\n [multiple]=\"!uniqueFile\"\n [accept]=\"fileExtension\"\n (change)=\"fileBrowseHandler($any($event.target).files)\"\n />\n <mat-icon style=\"font-size: xx-large\" color=\"accent\" class=\"text-size\">upload</mat-icon>\n <ion-label\n [innerHTML]=\"\n 'FILE.UPLOAD.DRAG_AND_DROP' | translate: { extension: !fileExtension ? '' : ' (' + fileExtension + ')' }\n \"\n ></ion-label>\n <ion-button>{{ 'FILE.UPLOAD.BROWSE' | translate }}</ion-button>\n </div>\n}\n<div class=\"files-list\">\n <ion-list>\n @for (file of files; track file; let i = $index) {\n <ion-item>\n <mat-icon slot=\"start\">description</mat-icon>\n <div class=\"single-file\">\n <ion-label>\n <h4 class=\"name\" [class.deleting]=\"file.deleting\">\n {{ file.name }}\n </h4>\n <p>\n {{ file.size | fileSize }}\n </p>\n </ion-label>\n <ion-progress-bar\n *ngIf=\"uploading && !file.error\"\n [value]=\"file.progress || 0\"\n [type]=\"file.deleting || file.progress === -1 ? 'indeterminate' : 'determinate'\"\n ></ion-progress-bar>\n <ion-label
|
|
16346
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: UploadFileComponent, selector: "app-upload-file", inputs: { fileExtension: "fileExtension", fileExtensionsExcluded: "fileExtensionsExcluded", uniqueFile: "uniqueFile", instantUpload: "instantUpload", uploadFn: "uploadFn", deleteFn: "deleteFn", maxParallelUpload: "maxParallelUpload", maxFileSizeMb: "maxFileSizeMb", autoHideDropArea: "autoHideDropArea" }, viewQueries: [{ propertyName: "fileDropEl", first: true, predicate: ["fileDropRef"], descendants: true }], ngImport: i0, template: "@if ((!uniqueFile && !autoHideDropArea) || files.length === 0) {\n <div class=\"container\" appDragAndDrop (fileDropped)=\"onFileDropped($event)\">\n <input\n type=\"file\"\n #fileDropRef\n id=\"fileDropRef\"\n [multiple]=\"!uniqueFile\"\n [accept]=\"fileExtension\"\n (change)=\"fileBrowseHandler($any($event.target).files)\"\n />\n <mat-icon style=\"font-size: xx-large\" color=\"accent\" class=\"text-size\">upload</mat-icon>\n <ion-label\n [innerHTML]=\"\n 'FILE.UPLOAD.DRAG_AND_DROP' | translate: { extension: !fileExtension ? '' : ' (' + fileExtension + ')' }\n \"\n ></ion-label>\n <ion-button>{{ 'FILE.UPLOAD.BROWSE' | translate }}</ion-button>\n </div>\n}\n<div class=\"files-list\">\n <ion-list>\n @for (file of files; track file; let i = $index) {\n <ion-item>\n <mat-icon slot=\"start\">description</mat-icon>\n <div class=\"single-file\">\n <ion-label>\n <h4 class=\"name\" [class.deleting]=\"file.deleting\">\n {{ file.name }}\n </h4>\n <p>\n {{ file.size | fileSize }}\n </p>\n </ion-label>\n <ion-progress-bar\n *ngIf=\"uploading && !file.error\"\n [value]=\"file.progress || 0\"\n [type]=\"file.deleting || file.progress === -1 ? 'indeterminate' : 'determinate'\"\n ></ion-progress-bar>\n <ion-label\n *ngIf=\"file.error\"\n color=\"danger\"\n [innerHTML]=\"file.error| translate: { fileExtensionsExcluded: fileExtensionsExcluded.join(', '), maxFileSizeMb: maxFileSizeMb }\"\n ></ion-label>\n </div>\n <!-- remote from list (before importation) -->\n <button *ngIf=\"!file.progress || file.error\" mat-icon-button slot=\"end\" (click)=\"deleteFile(i)\">\n <mat-icon>clear</mat-icon>\n </button>\n <!-- delete file (remotely - after importation) -->\n <button\n *ngIf=\"file.progress === 1 && !!deleteFn && !file.deleting\"\n mat-icon-button\n slot=\"end\"\n (click)=\"deleteFile(i)\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n </ion-item>\n }\n </ion-list>\n</div>\n", styles: [".container{width:calc(100% - 3rem);min-height:200px;padding:2rem;text-align:center;border:dashed 1px #979797;position:relative;margin:1.5rem}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0;cursor:pointer}.container ion-label{display:block;font-size:20px;font-weight:600;color:#38424c}.container label{display:inline-block;color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.fileover{border:solid 1px var(--ion-color-accent)}.files-list{max-height:300px;overflow:auto}.files-list .single-file{display:flex;flex-direction:column}.files-list .single-file .name{word-break:break-all}.files-list .single-file .name.deleting{color:gray!important;font-style:italic!important}\n"], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: i2$1.IonProgressBar, selector: "ion-progress-bar", inputs: ["buffer", "color", "mode", "reversed", "type", "value"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: DragAndDropDirective, selector: "[appDragAndDrop]", outputs: ["fileDropped"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FileSizePipe, name: "fileSize" }] });
|
|
16314
16347
|
}
|
|
16315
16348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadFileComponent, decorators: [{
|
|
16316
16349
|
type: Component,
|
|
16317
|
-
args: [{ selector: 'app-upload-file', template: "@if ((!uniqueFile && !autoHideDropArea) || files.length === 0) {\n <div class=\"container\" appDragAndDrop (fileDropped)=\"onFileDropped($event)\">\n <input\n type=\"file\"\n #fileDropRef\n id=\"fileDropRef\"\n [multiple]=\"!uniqueFile\"\n [accept]=\"fileExtension\"\n (change)=\"fileBrowseHandler($any($event.target).files)\"\n />\n <mat-icon style=\"font-size: xx-large\" color=\"accent\" class=\"text-size\">upload</mat-icon>\n <ion-label\n [innerHTML]=\"\n 'FILE.UPLOAD.DRAG_AND_DROP' | translate: { extension: !fileExtension ? '' : ' (' + fileExtension + ')' }\n \"\n ></ion-label>\n <ion-button>{{ 'FILE.UPLOAD.BROWSE' | translate }}</ion-button>\n </div>\n}\n<div class=\"files-list\">\n <ion-list>\n @for (file of files; track file; let i = $index) {\n <ion-item>\n <mat-icon slot=\"start\">description</mat-icon>\n <div class=\"single-file\">\n <ion-label>\n <h4 class=\"name\" [class.deleting]=\"file.deleting\">\n {{ file.name }}\n </h4>\n <p>\n {{ file.size | fileSize }}\n </p>\n </ion-label>\n <ion-progress-bar\n *ngIf=\"uploading && !file.error\"\n [value]=\"file.progress || 0\"\n [type]=\"file.deleting || file.progress === -1 ? 'indeterminate' : 'determinate'\"\n ></ion-progress-bar>\n <ion-label
|
|
16350
|
+
args: [{ selector: 'app-upload-file', template: "@if ((!uniqueFile && !autoHideDropArea) || files.length === 0) {\n <div class=\"container\" appDragAndDrop (fileDropped)=\"onFileDropped($event)\">\n <input\n type=\"file\"\n #fileDropRef\n id=\"fileDropRef\"\n [multiple]=\"!uniqueFile\"\n [accept]=\"fileExtension\"\n (change)=\"fileBrowseHandler($any($event.target).files)\"\n />\n <mat-icon style=\"font-size: xx-large\" color=\"accent\" class=\"text-size\">upload</mat-icon>\n <ion-label\n [innerHTML]=\"\n 'FILE.UPLOAD.DRAG_AND_DROP' | translate: { extension: !fileExtension ? '' : ' (' + fileExtension + ')' }\n \"\n ></ion-label>\n <ion-button>{{ 'FILE.UPLOAD.BROWSE' | translate }}</ion-button>\n </div>\n}\n<div class=\"files-list\">\n <ion-list>\n @for (file of files; track file; let i = $index) {\n <ion-item>\n <mat-icon slot=\"start\">description</mat-icon>\n <div class=\"single-file\">\n <ion-label>\n <h4 class=\"name\" [class.deleting]=\"file.deleting\">\n {{ file.name }}\n </h4>\n <p>\n {{ file.size | fileSize }}\n </p>\n </ion-label>\n <ion-progress-bar\n *ngIf=\"uploading && !file.error\"\n [value]=\"file.progress || 0\"\n [type]=\"file.deleting || file.progress === -1 ? 'indeterminate' : 'determinate'\"\n ></ion-progress-bar>\n <ion-label\n *ngIf=\"file.error\"\n color=\"danger\"\n [innerHTML]=\"file.error| translate: { fileExtensionsExcluded: fileExtensionsExcluded.join(', '), maxFileSizeMb: maxFileSizeMb }\"\n ></ion-label>\n </div>\n <!-- remote from list (before importation) -->\n <button *ngIf=\"!file.progress || file.error\" mat-icon-button slot=\"end\" (click)=\"deleteFile(i)\">\n <mat-icon>clear</mat-icon>\n </button>\n <!-- delete file (remotely - after importation) -->\n <button\n *ngIf=\"file.progress === 1 && !!deleteFn && !file.deleting\"\n mat-icon-button\n slot=\"end\"\n (click)=\"deleteFile(i)\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n </ion-item>\n }\n </ion-list>\n</div>\n", styles: [".container{width:calc(100% - 3rem);min-height:200px;padding:2rem;text-align:center;border:dashed 1px #979797;position:relative;margin:1.5rem}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0;cursor:pointer}.container ion-label{display:block;font-size:20px;font-weight:600;color:#38424c}.container label{display:inline-block;color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.fileover{border:solid 1px var(--ion-color-accent)}.files-list{max-height:300px;overflow:auto}.files-list .single-file{display:flex;flex-direction:column}.files-list .single-file .name{word-break:break-all}.files-list .single-file .name.deleting{color:gray!important;font-style:italic!important}\n"] }]
|
|
16318
16351
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.TranslateService }], propDecorators: { fileDropEl: [{
|
|
16319
16352
|
type: ViewChild,
|
|
16320
16353
|
args: ['fileDropRef', { static: false }]
|
|
16321
16354
|
}], fileExtension: [{
|
|
16322
16355
|
type: Input
|
|
16356
|
+
}], fileExtensionsExcluded: [{
|
|
16357
|
+
type: Input
|
|
16323
16358
|
}], uniqueFile: [{
|
|
16324
16359
|
type: Input
|
|
16325
16360
|
}], instantUpload: [{
|
|
@@ -16330,6 +16365,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
16330
16365
|
type: Input
|
|
16331
16366
|
}], maxParallelUpload: [{
|
|
16332
16367
|
type: Input
|
|
16368
|
+
}], maxFileSizeMb: [{
|
|
16369
|
+
type: Input
|
|
16333
16370
|
}], autoHideDropArea: [{
|
|
16334
16371
|
type: Input
|
|
16335
16372
|
}] } });
|
|
@@ -16340,12 +16377,14 @@ class UploadFilePopover {
|
|
|
16340
16377
|
cd;
|
|
16341
16378
|
uploader;
|
|
16342
16379
|
fileExtension;
|
|
16380
|
+
fileExtensionsExcluded = [];
|
|
16343
16381
|
title;
|
|
16344
16382
|
uniqueFile = false;
|
|
16345
16383
|
instantUpload = false;
|
|
16346
16384
|
uploadFn;
|
|
16347
16385
|
deleteFn;
|
|
16348
16386
|
maxParallelUpload;
|
|
16387
|
+
maxFileSizeMb;
|
|
16349
16388
|
autoHideDropArea = false;
|
|
16350
16389
|
okButtonText = 'COMMON.BTN_IMPORT';
|
|
16351
16390
|
cancelButtonText = 'COMMON.BTN_CANCEL';
|
|
@@ -16355,7 +16394,7 @@ class UploadFilePopover {
|
|
|
16355
16394
|
return this.uploader.files;
|
|
16356
16395
|
}
|
|
16357
16396
|
get disabled() {
|
|
16358
|
-
return this.importing || isEmptyArray(this.files);
|
|
16397
|
+
return this.importing || isEmptyArray(this.files) || this.files.every((file) => file.error);
|
|
16359
16398
|
}
|
|
16360
16399
|
get valid() {
|
|
16361
16400
|
return isNotEmptyArray(this.files);
|
|
@@ -16412,16 +16451,18 @@ class UploadFilePopover {
|
|
|
16412
16451
|
}
|
|
16413
16452
|
}
|
|
16414
16453
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadFilePopover, deps: [{ token: i2$1.PopoverController }, { token: i1$1.TranslateService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
16415
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: UploadFilePopover, selector: "app-upload-file-popover", inputs: { fileExtension: "fileExtension", title: "title", uniqueFile: "uniqueFile", instantUpload: "instantUpload", uploadFn: "uploadFn", deleteFn: "deleteFn", maxParallelUpload: "maxParallelUpload", autoHideDropArea: "autoHideDropArea", okButtonText: "okButtonText", cancelButtonText: "cancelButtonText" }, viewQueries: [{ propertyName: "uploader", first: true, predicate: ["uploader"], descendants: true, static: true }], ngImport: i0, template: "<ion-content class=\"ion-no-padding\" scrollY=\"false\">\n <app-upload-file\n #uploader\n [uploadFn]=\"uploadFn\"\n [deleteFn]=\"deleteFn\"\n [fileExtension]=\"fileExtension\"\n [instantUpload]=\"instantUpload\"\n [uniqueFile]=\"uniqueFile\"\n [maxParallelUpload]=\"maxParallelUpload\"\n [autoHideDropArea]=\"autoHideDropArea\"\n ></app-upload-file>\n</ion-content>\n\n<ion-footer>\n <ion-toolbar>\n <ion-row class=\"ion-no-padding ion-nowrap\" >\n <ion-col>\n @if (importing) {\n <div class=\"importing-info\">\n <ion-text color=\"medium\"><small translate>FILE.UPLOAD.IMPORTING</small></ion-text>\n \n <ion-spinner name=\"dots\" color=\"accent\"></ion-spinner>\n </div>\n }\n @if (error) {\n <ion-item lines=\"none\" color=\"transparent\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"ion-text-wrap\">\n <small [innerHTML]=\"error | translate\"></small>\n </ion-label>\n </ion-item>\n }\n </ion-col>\n <ion-col size=\"auto\">\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"cancel()\">\n <ion-label [innerHTML]=\"cancelButtonText | translate\"></ion-label>\n </ion-button>\n <ion-button\n [fill]=\"disabled ? 'clear' : 'solid'\"\n (click)=\"onValidate($event)\"\n (keyup.enter)=\"onValidate($event)\"\n color=\"tertiary\"\n [disabled]=\"disabled\"\n >\n <ion-label [innerHTML]=\"okButtonText | translate\"></ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-toolbar>\n</ion-footer>\n", styles: [".importing-info{padding-inline-start:var(--ion-padding);display:inline-flex;flex-wrap:nowrap;padding-top:8px}\n"], dependencies: [{ kind: "component", type: i2$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2$1.IonFooter, selector: "ion-footer", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: i2$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: UploadFileComponent, selector: "app-upload-file", inputs: ["fileExtension", "uniqueFile", "instantUpload", "uploadFn", "deleteFn", "maxParallelUpload", "autoHideDropArea"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
16454
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: UploadFilePopover, selector: "app-upload-file-popover", inputs: { fileExtension: "fileExtension", fileExtensionsExcluded: "fileExtensionsExcluded", title: "title", uniqueFile: "uniqueFile", instantUpload: "instantUpload", uploadFn: "uploadFn", deleteFn: "deleteFn", maxParallelUpload: "maxParallelUpload", maxFileSizeMb: "maxFileSizeMb", autoHideDropArea: "autoHideDropArea", okButtonText: "okButtonText", cancelButtonText: "cancelButtonText" }, viewQueries: [{ propertyName: "uploader", first: true, predicate: ["uploader"], descendants: true, static: true }], ngImport: i0, template: "<ion-content class=\"ion-no-padding\" scrollY=\"false\">\n <app-upload-file\n #uploader\n [uploadFn]=\"uploadFn\"\n [deleteFn]=\"deleteFn\"\n [fileExtension]=\"fileExtension\"\n [fileExtensionsExcluded]=\"fileExtensionsExcluded\"\n [instantUpload]=\"instantUpload\"\n [uniqueFile]=\"uniqueFile\"\n [maxParallelUpload]=\"maxParallelUpload\"\n [maxFileSizeMb]=\"maxFileSizeMb\"\n [autoHideDropArea]=\"autoHideDropArea\"\n ></app-upload-file>\n</ion-content>\n\n<ion-footer>\n <ion-toolbar>\n <ion-row class=\"ion-no-padding ion-nowrap\" >\n <ion-col>\n @if (importing) {\n <div class=\"importing-info\">\n <ion-text color=\"medium\"><small translate>FILE.UPLOAD.IMPORTING</small></ion-text>\n \n <ion-spinner name=\"dots\" color=\"accent\"></ion-spinner>\n </div>\n }\n @if (error) {\n <ion-item lines=\"none\" color=\"transparent\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"ion-text-wrap\">\n <small [innerHTML]=\"error | translate\"></small>\n </ion-label>\n </ion-item>\n }\n </ion-col>\n <ion-col size=\"auto\">\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"cancel()\">\n <ion-label [innerHTML]=\"cancelButtonText | translate\"></ion-label>\n </ion-button>\n <ion-button\n [fill]=\"disabled ? 'clear' : 'solid'\"\n (click)=\"onValidate($event)\"\n (keyup.enter)=\"onValidate($event)\"\n color=\"tertiary\"\n [disabled]=\"disabled\"\n >\n <ion-label [innerHTML]=\"okButtonText | translate\"></ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-toolbar>\n</ion-footer>\n", styles: [".importing-info{padding-inline-start:var(--ion-padding);display:inline-flex;flex-wrap:nowrap;padding-top:8px}\n"], dependencies: [{ kind: "component", type: i2$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2$1.IonCol, selector: "ion-col", inputs: ["offset", "offsetLg", "offsetMd", "offsetSm", "offsetXl", "offsetXs", "pull", "pullLg", "pullMd", "pullSm", "pullXl", "pullXs", "push", "pushLg", "pushMd", "pushSm", "pushXl", "pushXs", "size", "sizeLg", "sizeMd", "sizeSm", "sizeXl", "sizeXs"] }, { kind: "component", type: i2$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i2$1.IonFooter, selector: "ion-footer", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i2$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i2$1.IonRow, selector: "ion-row" }, { kind: "component", type: i2$1.IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: i2$1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: i2$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: UploadFileComponent, selector: "app-upload-file", inputs: ["fileExtension", "fileExtensionsExcluded", "uniqueFile", "instantUpload", "uploadFn", "deleteFn", "maxParallelUpload", "maxFileSizeMb", "autoHideDropArea"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
16416
16455
|
}
|
|
16417
16456
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadFilePopover, decorators: [{
|
|
16418
16457
|
type: Component,
|
|
16419
|
-
args: [{ selector: 'app-upload-file-popover', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-content class=\"ion-no-padding\" scrollY=\"false\">\n <app-upload-file\n #uploader\n [uploadFn]=\"uploadFn\"\n [deleteFn]=\"deleteFn\"\n [fileExtension]=\"fileExtension\"\n [instantUpload]=\"instantUpload\"\n [uniqueFile]=\"uniqueFile\"\n [maxParallelUpload]=\"maxParallelUpload\"\n [autoHideDropArea]=\"autoHideDropArea\"\n ></app-upload-file>\n</ion-content>\n\n<ion-footer>\n <ion-toolbar>\n <ion-row class=\"ion-no-padding ion-nowrap\" >\n <ion-col>\n @if (importing) {\n <div class=\"importing-info\">\n <ion-text color=\"medium\"><small translate>FILE.UPLOAD.IMPORTING</small></ion-text>\n \n <ion-spinner name=\"dots\" color=\"accent\"></ion-spinner>\n </div>\n }\n @if (error) {\n <ion-item lines=\"none\" color=\"transparent\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"ion-text-wrap\">\n <small [innerHTML]=\"error | translate\"></small>\n </ion-label>\n </ion-item>\n }\n </ion-col>\n <ion-col size=\"auto\">\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"cancel()\">\n <ion-label [innerHTML]=\"cancelButtonText | translate\"></ion-label>\n </ion-button>\n <ion-button\n [fill]=\"disabled ? 'clear' : 'solid'\"\n (click)=\"onValidate($event)\"\n (keyup.enter)=\"onValidate($event)\"\n color=\"tertiary\"\n [disabled]=\"disabled\"\n >\n <ion-label [innerHTML]=\"okButtonText | translate\"></ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-toolbar>\n</ion-footer>\n", styles: [".importing-info{padding-inline-start:var(--ion-padding);display:inline-flex;flex-wrap:nowrap;padding-top:8px}\n"] }]
|
|
16458
|
+
args: [{ selector: 'app-upload-file-popover', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-content class=\"ion-no-padding\" scrollY=\"false\">\n <app-upload-file\n #uploader\n [uploadFn]=\"uploadFn\"\n [deleteFn]=\"deleteFn\"\n [fileExtension]=\"fileExtension\"\n [fileExtensionsExcluded]=\"fileExtensionsExcluded\"\n [instantUpload]=\"instantUpload\"\n [uniqueFile]=\"uniqueFile\"\n [maxParallelUpload]=\"maxParallelUpload\"\n [maxFileSizeMb]=\"maxFileSizeMb\"\n [autoHideDropArea]=\"autoHideDropArea\"\n ></app-upload-file>\n</ion-content>\n\n<ion-footer>\n <ion-toolbar>\n <ion-row class=\"ion-no-padding ion-nowrap\" >\n <ion-col>\n @if (importing) {\n <div class=\"importing-info\">\n <ion-text color=\"medium\"><small translate>FILE.UPLOAD.IMPORTING</small></ion-text>\n \n <ion-spinner name=\"dots\" color=\"accent\"></ion-spinner>\n </div>\n }\n @if (error) {\n <ion-item lines=\"none\" color=\"transparent\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"ion-text-wrap\">\n <small [innerHTML]=\"error | translate\"></small>\n </ion-label>\n </ion-item>\n }\n </ion-col>\n <ion-col size=\"auto\">\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"cancel()\">\n <ion-label [innerHTML]=\"cancelButtonText | translate\"></ion-label>\n </ion-button>\n <ion-button\n [fill]=\"disabled ? 'clear' : 'solid'\"\n (click)=\"onValidate($event)\"\n (keyup.enter)=\"onValidate($event)\"\n color=\"tertiary\"\n [disabled]=\"disabled\"\n >\n <ion-label [innerHTML]=\"okButtonText | translate\"></ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n </ion-toolbar>\n</ion-footer>\n", styles: [".importing-info{padding-inline-start:var(--ion-padding);display:inline-flex;flex-wrap:nowrap;padding-top:8px}\n"] }]
|
|
16420
16459
|
}], ctorParameters: () => [{ type: i2$1.PopoverController }, { type: i1$1.TranslateService }, { type: i0.ChangeDetectorRef }], propDecorators: { uploader: [{
|
|
16421
16460
|
type: ViewChild,
|
|
16422
16461
|
args: ['uploader', { static: true }]
|
|
16423
16462
|
}], fileExtension: [{
|
|
16424
16463
|
type: Input
|
|
16464
|
+
}], fileExtensionsExcluded: [{
|
|
16465
|
+
type: Input
|
|
16425
16466
|
}], title: [{
|
|
16426
16467
|
type: Input
|
|
16427
16468
|
}], uniqueFile: [{
|
|
@@ -16434,6 +16475,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
16434
16475
|
type: Input
|
|
16435
16476
|
}], maxParallelUpload: [{
|
|
16436
16477
|
type: Input
|
|
16478
|
+
}], maxFileSizeMb: [{
|
|
16479
|
+
type: Input
|
|
16437
16480
|
}], autoHideDropArea: [{
|
|
16438
16481
|
type: Input
|
|
16439
16482
|
}], okButtonText: [{
|