bit-ng-library 12.0.2 → 12.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/bit-ng-library.d.ts +2 -2
- package/bit-ng-library.metadata.json +1 -1
- package/bundles/bit-ng-library.umd.js +10 -7
- package/bundles/bit-ng-library.umd.js.map +1 -1
- package/esm2015/bit-ng-library.js +2 -2
- package/esm2015/lib/sharedlibrary/components/upload/bit-ng-upload.component.js +10 -8
- package/fesm2015/bit-ng-library.js +8 -6
- package/fesm2015/bit-ng-library.js.map +1 -1
- package/lib/sharedlibrary/components/upload/bit-ng-upload.component.d.ts +8 -7
- package/package.json +1 -1
|
@@ -3436,6 +3436,7 @@
|
|
|
3436
3436
|
function BitNGUploadComponent(generalUtils, changeDetector) {
|
|
3437
3437
|
this.generalUtils = generalUtils;
|
|
3438
3438
|
this.changeDetector = changeDetector;
|
|
3439
|
+
this.inputAccept = "*";
|
|
3439
3440
|
this.onSuccess = new i0.EventEmitter();
|
|
3440
3441
|
this.onError = new i0.EventEmitter();
|
|
3441
3442
|
}
|
|
@@ -3477,7 +3478,7 @@
|
|
|
3477
3478
|
this.startLoading();
|
|
3478
3479
|
this.uploader.uploadAll();
|
|
3479
3480
|
};
|
|
3480
|
-
/** Elimina la cola de ficheros y
|
|
3481
|
+
/** Elimina la cola de ficheros y des-selecciona el fichero que pudiera estar seleccionado en el single input file */
|
|
3481
3482
|
BitNGUploadComponent.prototype.removeQueue = function () {
|
|
3482
3483
|
this.stopLoading();
|
|
3483
3484
|
this.uploader.clearQueue();
|
|
@@ -3494,8 +3495,8 @@
|
|
|
3494
3495
|
this.startLoading();
|
|
3495
3496
|
item.upload();
|
|
3496
3497
|
};
|
|
3497
|
-
/** Elimina de la cola un fichero en concreto y en el caso de que coincida con el seleccionado en el single input file,
|
|
3498
|
-
* lo
|
|
3498
|
+
/** Elimina de la cola un fichero en concreto y en el caso de que coincida con el seleccionado en el single input file, también
|
|
3499
|
+
* lo des-selecciona
|
|
3499
3500
|
*/
|
|
3500
3501
|
BitNGUploadComponent.prototype.removeFile = function (item) {
|
|
3501
3502
|
this.stopLoading();
|
|
@@ -3509,7 +3510,7 @@
|
|
|
3509
3510
|
this.stopLoading();
|
|
3510
3511
|
item.cancel();
|
|
3511
3512
|
};
|
|
3512
|
-
/**
|
|
3513
|
+
/** Des-selecciona el fichero seleccionado en el input file */
|
|
3513
3514
|
BitNGUploadComponent.prototype.removeInputFile = function () {
|
|
3514
3515
|
if (this.fileInput)
|
|
3515
3516
|
this.fileInput.nativeElement.value = "";
|
|
@@ -3523,7 +3524,7 @@
|
|
|
3523
3524
|
BitNGUploadComponent.decorators = [
|
|
3524
3525
|
{ type: i0.Component, args: [{
|
|
3525
3526
|
selector: "bit-ng-upload",
|
|
3526
|
-
template: " <div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div *ngIf=\"hasDropZone\"
|
|
3527
|
+
template: " <div class=\"grid\">\r\n <div class=\"col-12\">\r\n <div *ngIf=\"hasDropZone\"\r\n ng2FileDrop\r\n [ngClass]=\"{'nv-file-over': hasBaseDropZoneOver}\"\r\n (fileOver)=\"fileOverBase($event)\"\r\n [uploader]=\"uploader\"\r\n class=\"well my-drop-zone\">\r\n <div class=\"contenedor-upload\">\r\n <i class=\"fa fa-file documento\"></i>\r\n <div>\r\n <span>{{ \"bitnglibrary.upload.dropfiles\" | transloco }}</span>\r\n <div class=\"grid\">\r\n <div class=\"col-12\">\r\n <label *ngIf=\"hasMultipleUpload\" class=\"btn-upload\">\r\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple [accept]=\"inputAccept\" />\r\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.multiple' | transloco}}\r\n </label>\r\n <label *ngIf=\"hasSingleUpload\" class=\"btn-upload\">\r\n <input #fileRef type=\"file\" ng2FileSelect [uploader]=\"uploader\" [accept]=\"inputAccept\" />\r\n <i class=\"fa fa-upload\"></i>{{'bitnglibrary.upload.simple' | transloco}}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"grid\">\r\n <div *ngIf=\"hasQueue\" class=\"col-12\">\r\n <p>{{\"bitnglibrary.upload.uploadfiles\" | transloco}}: {{ uploader?.queue?.length }}</p>\r\n\r\n <p-table [value]=\"uploader.queue\">\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th width=\"50%\">{{\"bitnglibrary.upload.filename\" | transloco}}</th>\r\n <th *ngIf=\"uploader.options.isHTML5\">{{\"bitnglibrary.upload.filesize\" | transloco}}</th>\r\n <th *ngIf=\"uploader.options.isHTML5 && hasProgressBar\">{{\"bitnglibrary.upload.progress\" | transloco}}</th>\r\n <th *ngIf=\"canUpload\">Estat</th>\r\n <th>{{\"bitnglibrary.upload.actions\" | transloco}}</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item>\r\n <tr>\r\n <td><strong>{{ item?.file?.name }}</strong></td>\r\n <td *ngIf=\"uploader.options.isHTML5\" nowrap>{{ item?.file?.size/1024 | number:'.2' }} KB</td>\r\n <td *ngIf=\"uploader.options.isHTML5 && hasProgressBar\">\r\n <div class=\"progress\" style=\"margin-bottom: 0;\">\r\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': item.progress + '%' }\"></div>\r\n </div>\r\n </td>\r\n <td *ngIf=\"canUpload\" class=\"p-text-center\">\r\n <span *ngIf=\"item.isSuccess\"><i class=\"fa fa-check\"></i></span>\r\n <span *ngIf=\"item.isCancel\"><i class=\"fa fa-ban\"></i></span>\r\n <span *ngIf=\"item.isError\"><i class=\"fa fa-times\"></i></span>\r\n </td>\r\n <td nowrap>\r\n <p-button *ngIf=\"canUpload\" icon=\"fa fa-upload\" title=\"{{'bitnglibrary.upload.upload' | transloco}}\" styleClass=\"p-button-success\"\r\n (click)=\"uploadFile(item)\" [disabled]=\"item.isReady || item.isUploading || item.isSuccess\">\r\n </p-button>\r\n <p-button *ngIf=\"canUpload\" icon=\"fa fa-ban\" title=\"{{'bitnglibrary.upload.cancelupload' | transloco}}\" styleClass=\"p-button-warning\"\r\n (click)=\"cancelFile(item)\" [disabled]=\"!item.isUploading\">\r\n </p-button>\r\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removefromqueue' | transloco}}\" styleClass=\"p-button-danger\"\r\n (click)=\"removeFile(item)\">\r\n </p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <div *ngIf=\"hasProgressBar\" class=\"cola-progreso\">\r\n <span>{{\"bitnglibrary.upload.progressqueue\" | transloco}}<span>{{(uploader.progress.toString() == 'NaN'? (\"bitnglibrary.upload.finishupload\"|transloco): uploader.progress + ' %')}}</span></span>\r\n <div class=\"progress\">\r\n <div class=\"progress-bar\" role=\"progressbar\" [ngStyle]=\"{ 'width': (uploader.progress.toString() == 'NaN'?'0':uploader.progress) + '%' }\"></div>\r\n </div>\r\n </div>\r\n <div>\r\n <p-button icon=\"fa fa-upload\" *ngIf=\"canUpload\" title=\"{{'bitnglibrary.upload.uploadall' | transloco}}\" styleClass=\"p-button-success\"\r\n (click)=\"uploadAll()\" [disabled]=\"!uploader.getNotUploadedItems().length\">\r\n </p-button>\r\n <p-button icon=\"fa fa-ban\" *ngIf=\"canUpload\" title=\"{{'bitnglibrary.upload.cancelall' | transloco}}\" styleClass=\"p-button-warning\"\r\n (click)=\"cancelQueue()\" [disabled]=\"!uploader.isUploading\">\r\n </p-button>\r\n <p-button icon=\"fa fa-trash\" title=\"{{'bitnglibrary.upload.removeall' | transloco}}\" styleClass=\"p-button-danger\"\r\n (click)=\"removeQueue()\" [disabled]=\"!uploader.queue.length\">\r\n </p-button>\r\n </div>\r\n </div>\r\n </div>\r\n",
|
|
3527
3528
|
//styleUrls: ["bit-ng-upload.component.css"],
|
|
3528
3529
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
3529
3530
|
},] }
|
|
@@ -3543,6 +3544,7 @@
|
|
|
3543
3544
|
hasProgressBar: [{ type: i0.Input }],
|
|
3544
3545
|
sizeDropZone: [{ type: i0.Input }],
|
|
3545
3546
|
sizeQueue: [{ type: i0.Input }],
|
|
3547
|
+
inputAccept: [{ type: i0.Input }],
|
|
3546
3548
|
onSuccess: [{ type: i0.Output }],
|
|
3547
3549
|
onError: [{ type: i0.Output }],
|
|
3548
3550
|
fileInput: [{ type: i0.ViewChild, args: ["fileRef",] }]
|
|
@@ -5156,8 +5158,9 @@
|
|
|
5156
5158
|
exports["ɵa"] = FocusService;
|
|
5157
5159
|
exports["ɵb"] = TranslateService;
|
|
5158
5160
|
exports["ɵc"] = BitMessageService;
|
|
5159
|
-
exports["ɵd"] =
|
|
5160
|
-
exports["ɵe"] =
|
|
5161
|
+
exports["ɵd"] = GeneralUtils;
|
|
5162
|
+
exports["ɵe"] = AyudaService;
|
|
5163
|
+
exports["ɵf"] = SessionSharedService;
|
|
5161
5164
|
|
|
5162
5165
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5163
5166
|
|