@wavemaker/app-ng-runtime 11.9.0-next.27462 → 11.9.0-next.27466

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.
@@ -253,6 +253,13 @@
253
253
  i0__namespace.ɵɵadvance();
254
254
  i0__namespace.ɵɵclassMap(ctx_r1.cleariconclass);
255
255
  } }
256
+ function FileUploadComponent_ul_4_div_1_li_1_div_18_Template(rf, ctx) { if (rf & 1) {
257
+ const _r10 = i0__namespace.ɵɵgetCurrentView();
258
+ i0__namespace.ɵɵelementStart(0, "div", 45)(1, "a", 55);
259
+ i0__namespace.ɵɵlistener("click", function FileUploadComponent_ul_4_div_1_li_1_div_18_Template_a_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r10); const ft_r7 = i0__namespace.ɵɵnextContext(2).$implicit; const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.onFileDelete($event, ft_r7)); });
260
+ i0__namespace.ɵɵelement(2, "i", 56);
261
+ i0__namespace.ɵɵelementEnd()();
262
+ } }
256
263
  function FileUploadComponent_ul_4_div_1_li_1_Template(rf, ctx) { if (rf & 1) {
257
264
  i0__namespace.ɵɵelementStart(0, "li", 32)(1, "div", 33);
258
265
  i0__namespace.ɵɵelement(2, "div", 34);
@@ -269,12 +276,14 @@
269
276
  i0__namespace.ɵɵtemplate(15, FileUploadComponent_ul_4_div_1_li_1_div_15_Template, 3, 0, "div", 44);
270
277
  i0__namespace.ɵɵelementStart(16, "div", 45);
271
278
  i0__namespace.ɵɵtemplate(17, FileUploadComponent_ul_4_div_1_li_1_a_17_Template, 2, 4, "a", 46);
272
- i0__namespace.ɵɵelementEnd()()();
279
+ i0__namespace.ɵɵelementEnd();
280
+ i0__namespace.ɵɵtemplate(18, FileUploadComponent_ul_4_div_1_li_1_div_18_Template, 3, 0, "div", 44);
281
+ i0__namespace.ɵɵelementEnd()();
273
282
  } if (rf & 2) {
274
283
  const ft_r7 = i0__namespace.ɵɵnextContext().$implicit;
275
284
  const ctx_r1 = i0__namespace.ɵɵnextContext(2);
276
285
  i0__namespace.ɵɵadvance(2);
277
- i0__namespace.ɵɵclassMapInterpolate1("media-left media-middle file-icon ", i0__namespace.ɵɵpipeBind1(3, 13, ctx_r1.getFileExtension(ft_r7.name)), "");
286
+ i0__namespace.ɵɵclassMapInterpolate1("media-left media-middle file-icon ", i0__namespace.ɵɵpipeBind1(3, 14, ctx_r1.getFileExtension(ft_r7.name)), "");
278
287
  i0__namespace.ɵɵpropertyInterpolate("title", ctx_r1.getFileExtension(ft_r7.name));
279
288
  i0__namespace.ɵɵadvance(5);
280
289
  i0__namespace.ɵɵtextInterpolate(ft_r7.storageName || ft_r7.name);
@@ -294,10 +303,12 @@
294
303
  i0__namespace.ɵɵproperty("ngIf", ft_r7.status === "onProgress" || ft_r7.status === "queued");
295
304
  i0__namespace.ɵɵadvance(2);
296
305
  i0__namespace.ɵɵproperty("ngIf", ctx_r1.cleariconclass !== "" && ft_r7.status !== "onProgress");
306
+ i0__namespace.ɵɵadvance();
307
+ i0__namespace.ɵɵproperty("ngIf", ft_r7.status === "success");
297
308
  } }
298
309
  function FileUploadComponent_ul_4_div_1_Template(rf, ctx) { if (rf & 1) {
299
310
  i0__namespace.ɵɵelementStart(0, "div");
300
- i0__namespace.ɵɵtemplate(1, FileUploadComponent_ul_4_div_1_li_1_Template, 18, 15, "li", 31);
311
+ i0__namespace.ɵɵtemplate(1, FileUploadComponent_ul_4_div_1_li_1_Template, 19, 16, "li", 31);
301
312
  i0__namespace.ɵɵelementEnd();
302
313
  } if (rf & 2) {
303
314
  const ft_r7 = ctx.$implicit;
@@ -316,23 +327,23 @@
316
327
  } }
317
328
  function FileUploadComponent_ul_5_li_1_Template(rf, ctx) { if (rf & 1) {
318
329
  i0__namespace.ɵɵelementStart(0, "li", 32)(1, "div", 33);
319
- i0__namespace.ɵɵelement(2, "div", 57);
320
- i0__namespace.ɵɵelementStart(3, "div", 35)(4, "p", 58)(5, "label", 37);
330
+ i0__namespace.ɵɵelement(2, "div", 59);
331
+ i0__namespace.ɵɵelementStart(3, "div", 35)(4, "p", 60)(5, "label", 37);
321
332
  i0__namespace.ɵɵtext(6);
322
333
  i0__namespace.ɵɵelementEnd();
323
334
  i0__namespace.ɵɵelement(7, "br");
324
335
  i0__namespace.ɵɵelementEnd()();
325
336
  i0__namespace.ɵɵelementStart(8, "div", 45);
326
- i0__namespace.ɵɵelement(9, "span", 59);
337
+ i0__namespace.ɵɵelement(9, "span", 61);
327
338
  i0__namespace.ɵɵelementEnd()()();
328
339
  } if (rf & 2) {
329
- const ft_r10 = ctx.$implicit;
340
+ const ft_r11 = ctx.$implicit;
330
341
  i0__namespace.ɵɵadvance(6);
331
- i0__namespace.ɵɵtextInterpolate(ft_r10.name);
342
+ i0__namespace.ɵɵtextInterpolate(ft_r11.name);
332
343
  } }
333
344
  function FileUploadComponent_ul_5_Template(rf, ctx) { if (rf & 1) {
334
- i0__namespace.ɵɵelementStart(0, "ul", 55);
335
- i0__namespace.ɵɵtemplate(1, FileUploadComponent_ul_5_li_1_Template, 10, 1, "li", 56);
345
+ i0__namespace.ɵɵelementStart(0, "ul", 57);
346
+ i0__namespace.ɵɵtemplate(1, FileUploadComponent_ul_5_li_1_Template, 10, 1, "li", 58);
336
347
  i0__namespace.ɵɵelementEnd();
337
348
  } if (rf & 2) {
338
349
  const ctx_r1 = i0__namespace.ɵɵnextContext();
@@ -472,8 +483,11 @@
472
483
  }
473
484
  /*this function to clear the specified file. if argument is not provided, it clears the complete list */
474
485
  clear(fileObj) {
475
- this.selectedFiles = (fileObj) ? this.selectedFiles.filter((file) => file !== fileObj) : [];
476
- this.uploadedFiles = (fileObj) ? this.uploadedFiles.filter((file) => file !== fileObj) : [];
486
+ this.selectedFiles = (fileObj) ? this.clearFile(this.selectedFiles, fileObj) : [];
487
+ this.uploadedFiles = (fileObj) ? this.clearFile(this.uploadedFiles, fileObj) : [];
488
+ }
489
+ clearFile(files, fileObj) {
490
+ return files.filter((file) => file?._response?.fileName !== fileObj?._response?.fileName || file?.name !== fileObj?.name || file !== fileObj);
477
491
  }
478
492
  /*this function to set the class names for clear icon */
479
493
  setClearIconClass(classValue) {
@@ -539,6 +553,44 @@
539
553
  }
540
554
  }
541
555
  }
556
+ onFileDelete($event, file) {
557
+ if (!file) {
558
+ return;
559
+ }
560
+ const beforeDeleteVal = this.invokeEventCallback('beforedelete', { $event: file });
561
+ if (beforeDeleteVal !== false) {
562
+ this.dialogService.showAppConfirmDialog({
563
+ title: "Delete file",
564
+ message: "Are you sure you want to delete this file?",
565
+ oktext: "Ok",
566
+ canceltext: "Cancel",
567
+ onOk: () => {
568
+ if (this.deletedatasource) {
569
+ this.deletedatasource.setInput('file', file._response.fileName || file.name);
570
+ this.deleteFileObservable = new rxjs.Subject();
571
+ this.deletedatasource._deleteFileObservable = this.deleteFileObservable;
572
+ this.deletedatasource._deleteFileObservable.asObservable().subscribe((response) => {
573
+ if (response.status === "success") {
574
+ this.selectedFiles = this.selectedFiles.filter((fileObj) => file !== fileObj) || [];
575
+ this.uploadedFiles = this.uploadedFiles.filter((fileObj) => file !== fileObj) || [];
576
+ this.deletedatasource._deleteFileObservable.unsubscribe();
577
+ }
578
+ }, (error) => {
579
+ this.deletedatasource._deleteFileObservable.unsubscribe();
580
+ });
581
+ }
582
+ this.invokeEventCallback('delete', { $event: file });
583
+ this.dialogService.closeAppConfirmDialog();
584
+ },
585
+ onCancel: () => {
586
+ this.dialogService.closeAppConfirmDialog();
587
+ },
588
+ onOpen: () => {
589
+ $('.cancel-action').focus();
590
+ }
591
+ });
592
+ }
593
+ }
542
594
  // Prevent default behavior (Prevent file from being opened)
543
595
  dragOverHandler($event) {
544
596
  $event.preventDefault();
@@ -616,10 +668,11 @@
616
668
  }
617
669
  super.onPropertyChange(key, nv, ov);
618
670
  }
619
- constructor(inj, app, onSelectEvt, explicitContext) {
671
+ constructor(inj, app, onSelectEvt, dialogService, explicitContext) {
620
672
  super(inj, WIDGET_CONFIG, explicitContext);
621
673
  this.app = app;
622
674
  this.onSelectEvt = onSelectEvt;
675
+ this.dialogService = dialogService;
623
676
  this.selectedFiles = [];
624
677
  this.uploadedFiles = [];
625
678
  this.selectedFolders = [];
@@ -667,10 +720,10 @@
667
720
  document.removeEventListener('mouseleave', this.dropCb);
668
721
  super.ngOnDestroy();
669
722
  }
670
- static { this.ɵfac = function FileUploadComponent_Factory(t) { return new (t || FileUploadComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1__namespace.App), i0__namespace.ɵɵinjectAttribute('select.event'), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
723
+ static { this.ɵfac = function FileUploadComponent_Factory(t) { return new (t || FileUploadComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(i1__namespace.App), i0__namespace.ɵɵinjectAttribute('select.event'), i0__namespace.ɵɵdirectiveInject(i1__namespace.AbstractDialogService), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
671
724
  static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: FileUploadComponent, selectors: [["", "wmFileUpload", ""]], features: [i0__namespace.ɵɵProvidersFeature([
672
725
  i3.provideAsWidgetRef(FileUploadComponent)
673
- ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0, decls: 6, vars: 5, consts: [["init-widget", "", 1, "app-fileupload"], ["class", "app-multi-file-upload", 4, "ngIf"], ["class", "app-single-file-upload", 4, "ngIf"], ["focus-target", "", "class", "app-button btn btn-default", 3, "disabled", "click", 4, "ngIf"], ["class", "list-group file-upload", 3, "ngStyle", 4, "ngIf"], ["class", "list-group file-upload", 3, "ngStyle", "title", 4, "ngIf"], [1, "app-multi-file-upload"], ["id", "dropzone", 1, "drop-box", 3, "click", "dragover", "drop", "ngClass"], [1, "message"], [1, "upload-label", 3, "innerHtml"], [1, "form-horizontal", 3, "name"], ["class", "file-input", "type", "file", "name", "files", "multiple", "", 3, "disabled", "accept", "click", "change", 4, "ngIf"], ["href", "javascript:void(0);", 1, "app-anchor", "upload-label"], ["class", "upload-extensions", 3, "innerHtml", 4, "ngIf"], ["class", "upload-extensions", 4, "ngIf"], ["type", "file", "name", "files", "multiple", "", 1, "file-input", 3, "click", "change", "disabled", "accept"], [1, "upload-extensions", 3, "innerHtml"], [1, "upload-extensions"], [1, "app-single-file-upload"], [1, "app-button-wrapper"], ["class", "file-input", "multiple", "", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["class", "file-input", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["id", "dropzone", "focus-target", "", 1, "app-button", "btn", "btn-default", 3, "ngClass"], ["aria-hidden", "true"], [1, "caption", 3, "innerHTML"], [1, "app-files-upload-status", "single"], ["multiple", "", "name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["focus-target", "", 1, "app-button", "btn", "btn-default", 3, "click", "disabled"], [1, "list-group", "file-upload", 3, "ngStyle"], [4, "ngFor", "ngForOf"], ["class", "list-group-item file-upload-status", 4, "ngIf"], [1, "list-group-item", "file-upload-status"], [1, "media", "upload-file-list"], [3, "title"], [1, "media-body", "media-middle", "file-details"], [1, "uploaddetails", "col-md-3"], [1, "upload-title"], [3, "class", 4, "ngIf"], ["class", "filesize", 4, "ngIf"], [3, "class", "title", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "progress col-md-7 upload-progress", 4, "ngIf"], ["class", "col-md-1 upload-progress-percentage", 4, "ngIf"], ["class", "media-right media-middle", 4, "ngIf"], [1, "media-right", "media-middle"], ["class", "btn btn-transparent btn-default status-icon", "type", "button", 3, "title", "click", 4, "ngIf"], [1, "filesize"], [1, "error-message"], [1, "progress", "col-md-7", "upload-progress"], [1, "progress-bar", "progress-bar-striped", 3, "ngClass", "ngStyle"], [1, "col-md-1", "upload-progress-percentage"], ["type", "button", 1, "btn", "btn-transparent", "file-upload-stop", 3, "click"], [1, "wi", "wi-close"], ["type", "button", 1, "btn", "btn-transparent", "btn-default", "status-icon", 3, "click", "title"], [1, "list-group", "file-upload", 3, "ngStyle", "title"], ["class", "list-group-item file-upload-status", 4, "ngFor", "ngForOf"], [1, "media-left", "media-middle", "file-icon", "fa", "fa-folder-o"], [1, "uploaddetails"], [1, "status-icon", "wi", "wi-cancel", "text-danger"]], template: function FileUploadComponent_Template(rf, ctx) { if (rf & 1) {
726
+ ]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c0, decls: 6, vars: 5, consts: [["init-widget", "", 1, "app-fileupload"], ["class", "app-multi-file-upload", 4, "ngIf"], ["class", "app-single-file-upload", 4, "ngIf"], ["focus-target", "", "class", "app-button btn btn-default", 3, "disabled", "click", 4, "ngIf"], ["class", "list-group file-upload", 3, "ngStyle", 4, "ngIf"], ["class", "list-group file-upload", 3, "ngStyle", "title", 4, "ngIf"], [1, "app-multi-file-upload"], ["id", "dropzone", 1, "drop-box", 3, "click", "dragover", "drop", "ngClass"], [1, "message"], [1, "upload-label", 3, "innerHtml"], [1, "form-horizontal", 3, "name"], ["class", "file-input", "type", "file", "name", "files", "multiple", "", 3, "disabled", "accept", "click", "change", 4, "ngIf"], ["href", "javascript:void(0);", 1, "app-anchor", "upload-label"], ["class", "upload-extensions", 3, "innerHtml", 4, "ngIf"], ["class", "upload-extensions", 4, "ngIf"], ["type", "file", "name", "files", "multiple", "", 1, "file-input", 3, "click", "change", "disabled", "accept"], [1, "upload-extensions", 3, "innerHtml"], [1, "upload-extensions"], [1, "app-single-file-upload"], [1, "app-button-wrapper"], ["class", "file-input", "multiple", "", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["class", "file-input", "name", "files", "type", "file", 3, "accept", "disabled", "change", "click", 4, "ngIf"], ["id", "dropzone", "focus-target", "", 1, "app-button", "btn", "btn-default", 3, "ngClass"], ["aria-hidden", "true"], [1, "caption", 3, "innerHTML"], [1, "app-files-upload-status", "single"], ["multiple", "", "name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["name", "files", "type", "file", 1, "file-input", 3, "change", "click", "accept", "disabled"], ["focus-target", "", 1, "app-button", "btn", "btn-default", 3, "click", "disabled"], [1, "list-group", "file-upload", 3, "ngStyle"], [4, "ngFor", "ngForOf"], ["class", "list-group-item file-upload-status", 4, "ngIf"], [1, "list-group-item", "file-upload-status"], [1, "media", "upload-file-list"], [3, "title"], [1, "media-body", "media-middle", "file-details"], [1, "uploaddetails", "col-md-3"], [1, "upload-title"], [3, "class", 4, "ngIf"], ["class", "filesize", 4, "ngIf"], [3, "class", "title", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "progress col-md-7 upload-progress", 4, "ngIf"], ["class", "col-md-1 upload-progress-percentage", 4, "ngIf"], ["class", "media-right media-middle", 4, "ngIf"], [1, "media-right", "media-middle"], ["class", "btn btn-transparent btn-default status-icon", "type", "button", 3, "title", "click", 4, "ngIf"], [1, "filesize"], [1, "error-message"], [1, "progress", "col-md-7", "upload-progress"], [1, "progress-bar", "progress-bar-striped", 3, "ngClass", "ngStyle"], [1, "col-md-1", "upload-progress-percentage"], ["type", "button", 1, "btn", "btn-transparent", "file-upload-stop", 3, "click"], [1, "wi", "wi-close"], ["type", "button", 1, "btn", "btn-transparent", "btn-default", "status-icon", 3, "click", "title"], ["title", "delete", "type", "button", 1, "btn", "btn-transparent", "btn-default", "status-icon", 3, "click"], [1, "wi", "wi-delete"], [1, "list-group", "file-upload", 3, "ngStyle", "title"], ["class", "list-group-item file-upload-status", 4, "ngFor", "ngForOf"], [1, "media-left", "media-middle", "file-icon", "fa", "fa-folder-o"], [1, "uploaddetails"], [1, "status-icon", "wi", "wi-cancel", "text-danger"]], template: function FileUploadComponent_Template(rf, ctx) { if (rf & 1) {
674
727
  i0__namespace.ɵɵelementStart(0, "div", 0);
675
728
  i0__namespace.ɵɵtemplate(1, FileUploadComponent_div_1_Template, 12, 13, "div", 1)(2, FileUploadComponent_div_2_Template, 9, 10, "div", 2)(3, FileUploadComponent_button_3_Template, 3, 5, "button", 3)(4, FileUploadComponent_ul_4_Template, 2, 5, "ul", 4)(5, FileUploadComponent_ul_5_Template, 2, 6, "ul", 5);
676
729
  i0__namespace.ɵɵelementEnd();
@@ -691,11 +744,11 @@
691
744
  type: i0.Component,
692
745
  args: [{ selector: '[wmFileUpload]', providers: [
693
746
  i3.provideAsWidgetRef(FileUploadComponent)
694
- ], template: "<div class=\"app-fileupload\" init-widget>\n <!-- drag and drop files UI in web -->\n <div class=\"app-multi-file-upload\" *ngIf=\"!_isMobileType && multiple\">\n <div id=\"dropzone\" class=\"drop-box\" (click)=\"triggerFileSelect()\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\" (dragover)=\"dragOverHandler($event);\" (drop)=\"onFileDrop($event);\">\n <i class=\"{{iconclass}}\"></i>\n <div class=\"message\">\n <label [innerHtml]=\"caption\" class=\"upload-label\"></label>\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <input class=\"file-input\" [attr.aria-label]=\"hint || 'File selection field'\" type=\"file\" name=\"files\" *ngIf=\"multiple\" [disabled]=\"disabled\" [accept]=\"chooseFilter\" (click)=\"onFileElemClick($event)\" (change)=\"onFileSelect($event, $event.target.files)\" multiple >\n <a class=\"app-anchor upload-label\" href=\"javascript:void(0);\">{{ fileUploadMessage }}</a>\n </form>\n <label *ngIf=\"chooseFilter\" [innerHtml]=\"chooseFilter + ' only '\" class=\"upload-extensions\"></label>\n <span *ngIf=\"chooseFilter && maxfilesize\" class=\"upload-extensions\"> . </span>\n <label *ngIf=\"maxfilesize\" [innerHtml]=\"maxfilesize + 'MB max'\" class=\"upload-extensions\"></label>\n </div>\n </div>\n </div>\n <!-- single file upload in web and single , multiple file upload UI in mobile runmode -->\n <div class=\"app-single-file-upload\" *ngIf=\"!_isCordova && (!multiple || _isMobileType)\">\n <div class=\"app-button-wrapper\">\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <!-- support for file upload in Mobileapp in its runmode (Web) -->\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n multiple name=\"files\" type=\"file\">\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"!multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n name=\"files\" type=\"file\">\n <button id=\"dropzone\" focus-target class=\"app-button btn btn-default\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\">\n <i class=\"{{iconclass}}\" aria-hidden=\"true\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n </form>\n </div>\n <div class=\"app-files-upload-status single\"></div>\n </div>\n <!-- support for file upload in Mobile Application (device) -->\n <button *ngIf=\"_isCordova\" focus-target class=\"app-button btn btn-default\" (click)=\"openFileSelector()\" [disabled]=\"disabled\">\n <i class=\"{{iconclass}}\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n <!-- list of selectedfiles UI -->\n <ul class=\"list-group file-upload\" [ngStyle]=\"{height: filelistheight, overflow: overflow}\" *ngIf=\"uploadedFiles.length > 0\" >\n <div *ngFor=\"let ft of uploadedFiles\">\n <li class=\"list-group-item file-upload-status\" *ngIf=\"ft.status !== 'abort'\">\n <div class=\"media upload-file-list\">\n <div class=\"media-left media-middle file-icon {{getFileExtension(ft.name) | fileIconClass}}\" title=\"{{getFileExtension(ft.name)}}\"></div>\n <div class=\"media-body media-middle file-details\">\n <p class=\"uploaddetails col-md-3\">\n <span class=\"upload-title\">{{ ft.storageName || ft.name }}</span>\n <span *ngIf=\"ft.status === 'success'\"\n class=\"status-icon {{ft.status | stateClass }}\"></span>\n <br/>\n <span class=\"filesize\" *ngIf=\"ft.fileLength !== 0\">{{ft.size | filesize:0}}</span>\n <span *ngIf=\"ft.status === 'error'\"\n class=\"status-icon {{ft.status | stateClass }}\"\n title=\"{{ft.errMsg || this.appLocale.MESSAGE_FILE_UPLOAD_FAILED}}\"></span>\n <span *ngIf=\"ft.status === 'error'\" class=\"error-message\">Upload Failed</span>\n </p>\n <div *ngIf=\"ft.status === 'onProgress' || showprogressbar\"\n class=\"progress col-md-7 upload-progress\">\n <div [ngClass]=\"ft.status === 'error' ? 'progress-bar-danger' : 'progress-bar-info'\"\n [ngStyle]=\"{width: (ft.progress +'%')}\"\n class=\"progress-bar progress-bar-striped\"></div>\n </div>\n <div *ngIf=\"(ft.status === 'onProgress' || showprogressbar && showprogressbarpercentage) && ft.progress \"\n class=\"col-md-1 upload-progress-percentage\">{{ ft.progress + '%' }}\n </div>\n </div>\n <div class=\"media-right media-middle\" *ngIf=\"ft.status === 'onProgress' || ft.status === 'queued'\">\n <a class=\"btn btn-transparent file-upload-stop\" type=\"button\" (click)=\"abortFileUpload(ft)\">\n <i class=\"wi wi-close\"></i>\n </a>\n </div>\n <div class=\"media-right media-middle\">\n <a (click)=\"clear(ft)\" *ngIf=\"cleariconclass !== '' && ft.status !== 'onProgress'\"\n class=\"btn btn-transparent btn-default status-icon\" title=\"{{cleariconhint}}\" type=\"button\">\n <i class=\"{{cleariconclass}}\"></i>\n </a>\n </div>\n </div>\n </li>\n </div>\n </ul>\n <!-- list of selectedfolders UI to show the error in title -->\n <ul class=\"list-group file-upload\" [ngStyle]=\"{height: filelistheight, overflow: overflow}\" title=\"{{this.appLocale.MESSAGE_FOLDER_UPLOADS_NOT_ALLOWED}}\" *ngIf=\"selectedFolders.length > 0\" >\n <li *ngFor=\"let ft of selectedFolders\" class=\"list-group-item file-upload-status\">\n <div class=\"media upload-file-list\">\n <div class=\"media-left media-middle file-icon fa fa-folder-o\"></div>\n <div class=\"media-body media-middle file-details\">\n <p class=\"uploaddetails\">\n <label class=\"upload-title\">{{ft.name}}</label><br/>\n </p>\n </div>\n <div class=\"media-right media-middle\" >\n <span class=\"status-icon wi wi-cancel text-danger\"></span>\n </div>\n </div>\n </li>\n </ul>\n</div>\n" }]
747
+ ], template: "<div class=\"app-fileupload\" init-widget>\n <!-- drag and drop files UI in web -->\n <div class=\"app-multi-file-upload\" *ngIf=\"!_isMobileType && multiple\">\n <div id=\"dropzone\" class=\"drop-box\" (click)=\"triggerFileSelect()\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\" (dragover)=\"dragOverHandler($event);\" (drop)=\"onFileDrop($event);\">\n <i class=\"{{iconclass}}\"></i>\n <div class=\"message\">\n <label [innerHtml]=\"caption\" class=\"upload-label\"></label>\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <input class=\"file-input\" [attr.aria-label]=\"hint || 'File selection field'\" type=\"file\" name=\"files\" *ngIf=\"multiple\" [disabled]=\"disabled\" [accept]=\"chooseFilter\" (click)=\"onFileElemClick($event)\" (change)=\"onFileSelect($event, $event.target.files)\" multiple >\n <a class=\"app-anchor upload-label\" href=\"javascript:void(0);\">{{ fileUploadMessage }}</a>\n </form>\n <label *ngIf=\"chooseFilter\" [innerHtml]=\"chooseFilter + ' only '\" class=\"upload-extensions\"></label>\n <span *ngIf=\"chooseFilter && maxfilesize\" class=\"upload-extensions\"> . </span>\n <label *ngIf=\"maxfilesize\" [innerHtml]=\"maxfilesize + 'MB max'\" class=\"upload-extensions\"></label>\n </div>\n </div>\n </div>\n <!-- single file upload in web and single , multiple file upload UI in mobile runmode -->\n <div class=\"app-single-file-upload\" *ngIf=\"!_isCordova && (!multiple || _isMobileType)\">\n <div class=\"app-button-wrapper\">\n <form class=\"form-horizontal\" name=\"{{formName}}\">\n <!-- support for file upload in Mobileapp in its runmode (Web) -->\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n multiple name=\"files\" type=\"file\">\n <input (change)=\"onFileSelect($event, $event.target.files)\" (click)=\"onFileElemClick($event)\" *ngIf=\"!multiple\"\n [accept]=\"chooseFilter\" [attr.aria-label]=\"arialabel || 'File selection field'\" [disabled]=\"disabled\" class=\"file-input\"\n name=\"files\" type=\"file\">\n <button id=\"dropzone\" focus-target class=\"app-button btn btn-default\" [ngClass]=\"{'highlight-drop-box' : highlightDropArea}\">\n <i class=\"{{iconclass}}\" aria-hidden=\"true\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n </form>\n </div>\n <div class=\"app-files-upload-status single\"></div>\n </div>\n <!-- support for file upload in Mobile Application (device) -->\n <button *ngIf=\"_isCordova\" focus-target class=\"app-button btn btn-default\" (click)=\"openFileSelector()\" [disabled]=\"disabled\">\n <i class=\"{{iconclass}}\"></i>\n <span class=\"caption\" [innerHTML]=\"caption\"></span>\n </button>\n <!-- list of selectedfiles UI -->\n <ul class=\"list-group file-upload\" [ngStyle]=\"{height: filelistheight, overflow: overflow}\" *ngIf=\"uploadedFiles.length > 0\" >\n <div *ngFor=\"let ft of uploadedFiles\">\n <li class=\"list-group-item file-upload-status\" *ngIf=\"ft.status !== 'abort'\">\n <div class=\"media upload-file-list\">\n <div class=\"media-left media-middle file-icon {{getFileExtension(ft.name) | fileIconClass}}\" title=\"{{getFileExtension(ft.name)}}\"></div>\n <div class=\"media-body media-middle file-details\">\n <p class=\"uploaddetails col-md-3\">\n <span class=\"upload-title\">{{ ft.storageName || ft.name }}</span>\n <span *ngIf=\"ft.status === 'success'\"\n class=\"status-icon {{ft.status | stateClass }}\"></span>\n <br/>\n <span class=\"filesize\" *ngIf=\"ft.fileLength !== 0\">{{ft.size | filesize:0}}</span>\n <span *ngIf=\"ft.status === 'error'\"\n class=\"status-icon {{ft.status | stateClass }}\"\n title=\"{{ft.errMsg || this.appLocale.MESSAGE_FILE_UPLOAD_FAILED}}\"></span>\n <span *ngIf=\"ft.status === 'error'\" class=\"error-message\">Upload Failed</span>\n </p>\n <div *ngIf=\"ft.status === 'onProgress' || showprogressbar\"\n class=\"progress col-md-7 upload-progress\">\n <div [ngClass]=\"ft.status === 'error' ? 'progress-bar-danger' : 'progress-bar-info'\"\n [ngStyle]=\"{width: (ft.progress +'%')}\"\n class=\"progress-bar progress-bar-striped\"></div>\n </div>\n <div *ngIf=\"(ft.status === 'onProgress' || showprogressbar && showprogressbarpercentage) && ft.progress \"\n class=\"col-md-1 upload-progress-percentage\">{{ ft.progress + '%' }}\n </div>\n </div>\n <div class=\"media-right media-middle\" *ngIf=\"ft.status === 'onProgress' || ft.status === 'queued'\">\n <a class=\"btn btn-transparent file-upload-stop\" type=\"button\" (click)=\"abortFileUpload(ft)\">\n <i class=\"wi wi-close\"></i>\n </a>\n </div>\n <div class=\"media-right media-middle\">\n <a (click)=\"clear(ft)\" *ngIf=\"cleariconclass !== '' && ft.status !== 'onProgress'\"\n class=\"btn btn-transparent btn-default status-icon\" title=\"{{cleariconhint}}\" type=\"button\">\n <i class=\"{{cleariconclass}}\"></i>\n </a>\n </div>\n <div class=\"media-right media-middle\" *ngIf=\"ft.status === 'success'\">\n <a (click)=\"onFileDelete($event, ft)\" class=\"btn btn-transparent btn-default status-icon\" title=\"delete\" type=\"button\">\n <i class=\"wi wi-delete\"></i>\n </a>\n </div>\n </div>\n </li>\n </div>\n </ul>\n <!-- list of selectedfolders UI to show the error in title -->\n <ul class=\"list-group file-upload\" [ngStyle]=\"{height: filelistheight, overflow: overflow}\" title=\"{{this.appLocale.MESSAGE_FOLDER_UPLOADS_NOT_ALLOWED}}\" *ngIf=\"selectedFolders.length > 0\" >\n <li *ngFor=\"let ft of selectedFolders\" class=\"list-group-item file-upload-status\">\n <div class=\"media upload-file-list\">\n <div class=\"media-left media-middle file-icon fa fa-folder-o\"></div>\n <div class=\"media-body media-middle file-details\">\n <p class=\"uploaddetails\">\n <label class=\"upload-title\">{{ft.name}}</label><br/>\n </p>\n </div>\n <div class=\"media-right media-middle\" >\n <span class=\"status-icon wi wi-cancel text-danger\"></span>\n </div>\n </div>\n </li>\n </ul>\n</div>\n" }]
695
748
  }], () => [{ type: i0__namespace.Injector }, { type: i1__namespace.App }, { type: undefined, decorators: [{
696
749
  type: i0.Attribute,
697
750
  args: ['select.event']
698
- }] }, { type: undefined, decorators: [{
751
+ }] }, { type: i1__namespace.AbstractDialogService }, { type: undefined, decorators: [{
699
752
  type: i0.Inject,
700
753
  args: ['EXPLICIT_CONTEXT']
701
754
  }, {