@bizdoc/core 1.13.24 → 1.13.25

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.
@@ -1253,9 +1253,9 @@ class MailboxService {
1253
1253
  folder.count++;
1254
1254
  });
1255
1255
  }
1256
- formatDownloadUrl(documentId, fileId) {
1256
+ formatDownloadUrl(documentId, fileId, inline) {
1257
1257
  const token = this._auth.getAccessToken();
1258
- return `/api/attachments/${documentId}/${fileId}?access_token=${token}`;
1258
+ return `/api/attachments/${documentId}/${fileId}?access_token=${token}&inline=${inline ? true : false}`;
1259
1259
  }
1260
1260
  download(documentId, fileId) {
1261
1261
  //new Observable<any>(observe => {
@@ -4687,7 +4687,7 @@ class AttachmentPreview {
4687
4687
  this._afterClosed = new Subject();
4688
4688
  this.dir = _directionality.value;
4689
4689
  this.isImage = isImage(this.data.file.contentType);
4690
- this.objectData = sanitizer.bypassSecurityTrustResourceUrl(this._url());
4690
+ this.objectData = sanitizer.bypassSecurityTrustResourceUrl(this._url(true));
4691
4691
  this.beforeClose().subscribe(() => this.slideDown = 'leave');
4692
4692
  }
4693
4693
  resize() {
@@ -4705,8 +4705,8 @@ class AttachmentPreview {
4705
4705
  download() {
4706
4706
  location.assign(this._url());
4707
4707
  }
4708
- _url() {
4709
- return this._service.formatDownloadUrl(this.data.documentId, this.data.file.id);
4708
+ _url(inline) {
4709
+ return this._service.formatDownloadUrl(this.data.documentId, this.data.file.id, inline);
4710
4710
  }
4711
4711
  rotate() {
4712
4712
  const elem = (this.isImage ? this.img : this.obj).nativeElement;
@@ -4749,7 +4749,7 @@ class AttachmentPreview {
4749
4749
  }
4750
4750
  }
4751
4751
  AttachmentPreview.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AttachmentPreview, deps: [{ token: i7$2.Directionality }, { token: i0.Renderer2 }, { token: FILE_PREVIEW_DIALOG_DATA }, { token: i1$5.DomSanitizer }, { token: MailboxService }, { token: i1$4.OverlayRef }], target: i0.ɵɵFactoryTarget.Component });
4752
- AttachmentPreview.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: AttachmentPreview, selector: "bizdoc-attachment-preview", host: { listeners: { "document:resize": "resize()", "document:keydown.escape": "close()" } }, viewQueries: [{ propertyName: "obj", first: true, predicate: ["obj"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"overlay-content\" [@slideContent]=\"animationState\" (@slideContent.start)=\"onAnimationStart($event)\"\r\n [dir]=\"dir\" (@slideContent.done)=\"onAnimationDone($event)\">\r\n <div class=\"toolbar-wrapper\" fxLayout=\"row\" [@slideDown]=\"slideDown\" *ngIf=\"!loading\">\r\n <button mat-icon-button (click)=\"close()\" bizdocTooltip=\"{{'Back' | translate}}\"><mat-icon class=\"mat-icon-rtl-mirror\">keyboard_arrow_left</mat-icon></button>\r\n <span class=\"mat-body-1\">{{data.file.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button (click)=\"rotate()\" bizdocTooltip=\"{{'Rotate' | translate }}\"><mat-icon>screen_rotation</mat-icon></button>\r\n <button mat-icon-button (click)=\"download()\" bizdocTooltip=\"{{'Download' | translate}}\"><mat-icon>save_alt</mat-icon></button>\r\n </div>\r\n <div class=\"spinner-wrapper\" *ngIf=\"loading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <object (load)=\"onLoad($event)\" [data]=\"objectData\" [type]=\"data.file.contentType\" *ngIf=\"!isImage\" #obj></object>\r\n <img *ngIf=\"isImage\" (load)=\"onLoad($event)\" [style.opacity]=\"loading ? 0 : 1\" [@fade]=\"loading ? 'fadeOut' : 'fadeIn'\" [src]=\"objectData\" #img>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;align-items:center}.spinner-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}img{width:100%;max-width:500px;height:auto}.overlay-content{padding:1em}.overlay-content .toolbar-wrapper{align-items:center;color:#f5f5f5}.divider{flex:1 1 auto}\n"], components: [{ type: i7$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i8$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i7$2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }], pipes: { "translate": TranslatePipe }, animations: [
4752
+ AttachmentPreview.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: AttachmentPreview, selector: "bizdoc-attachment-preview", host: { listeners: { "document:resize": "resize()", "document:keydown.escape": "close()" } }, viewQueries: [{ propertyName: "obj", first: true, predicate: ["obj"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"overlay-content\" [@slideContent]=\"animationState\" (@slideContent.start)=\"onAnimationStart($event)\"\r\n [dir]=\"dir\" (@slideContent.done)=\"onAnimationDone($event)\">\r\n <div class=\"toolbar-wrapper\" fxLayout=\"row\" [@slideDown]=\"slideDown\" *ngIf=\"!loading\">\r\n <button mat-icon-button (click)=\"close()\" bizdocTooltip=\"{{'Back' | translate}}\"><mat-icon class=\"mat-icon-rtl-mirror\">keyboard_arrow_left</mat-icon></button>\r\n <span class=\"mat-body-1\">{{data.file.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button (click)=\"rotate()\" bizdocTooltip=\"{{'Rotate' | translate }}\"><mat-icon>screen_rotation</mat-icon></button>\r\n <button mat-icon-button (click)=\"download()\" bizdocTooltip=\"{{'Download' | translate}}\"><mat-icon>save_alt</mat-icon></button>\r\n </div>\r\n <div class=\"spinner-wrapper\" *ngIf=\"loading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <object (load)=\"onLoad($event)\" [data]=\"objectData\" [type]=\"data.file.contentType\" *ngIf=\"!isImage\" #obj width=\"250\"\r\n height=\"200\">\r\n </object>\r\n <img *ngIf=\"isImage\" (load)=\"onLoad($event)\" [style.opacity]=\"loading ? 0 : 1\" [@fade]=\"loading ? 'fadeOut' : 'fadeIn'\" [src]=\"objectData\" #img>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;align-items:center}.spinner-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}img{width:100%;max-width:500px;height:auto}.overlay-content{padding:1em}.overlay-content .toolbar-wrapper{align-items:center;color:#f5f5f5}.divider{flex:1 1 auto}\n"], components: [{ type: i7$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i8$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i7$2.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }], pipes: { "translate": TranslatePipe }, animations: [
4753
4753
  trigger('fade', [
4754
4754
  state('fadeOut', style({ opacity: 0 })),
4755
4755
  state('fadeIn', style({ opacity: 1 })),
@@ -4788,7 +4788,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
4788
4788
  state('leave', style({ transform: 'translate3d(0, 25%, 0)', opacity: 0 })),
4789
4789
  transition('* => *', animate(ANIMATION_TIMINGS)),
4790
4790
  ])
4791
- ], template: "<div class=\"overlay-content\" [@slideContent]=\"animationState\" (@slideContent.start)=\"onAnimationStart($event)\"\r\n [dir]=\"dir\" (@slideContent.done)=\"onAnimationDone($event)\">\r\n <div class=\"toolbar-wrapper\" fxLayout=\"row\" [@slideDown]=\"slideDown\" *ngIf=\"!loading\">\r\n <button mat-icon-button (click)=\"close()\" bizdocTooltip=\"{{'Back' | translate}}\"><mat-icon class=\"mat-icon-rtl-mirror\">keyboard_arrow_left</mat-icon></button>\r\n <span class=\"mat-body-1\">{{data.file.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button (click)=\"rotate()\" bizdocTooltip=\"{{'Rotate' | translate }}\"><mat-icon>screen_rotation</mat-icon></button>\r\n <button mat-icon-button (click)=\"download()\" bizdocTooltip=\"{{'Download' | translate}}\"><mat-icon>save_alt</mat-icon></button>\r\n </div>\r\n <div class=\"spinner-wrapper\" *ngIf=\"loading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <object (load)=\"onLoad($event)\" [data]=\"objectData\" [type]=\"data.file.contentType\" *ngIf=\"!isImage\" #obj></object>\r\n <img *ngIf=\"isImage\" (load)=\"onLoad($event)\" [style.opacity]=\"loading ? 0 : 1\" [@fade]=\"loading ? 'fadeOut' : 'fadeIn'\" [src]=\"objectData\" #img>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;align-items:center}.spinner-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}img{width:100%;max-width:500px;height:auto}.overlay-content{padding:1em}.overlay-content .toolbar-wrapper{align-items:center;color:#f5f5f5}.divider{flex:1 1 auto}\n"] }]
4791
+ ], template: "<div class=\"overlay-content\" [@slideContent]=\"animationState\" (@slideContent.start)=\"onAnimationStart($event)\"\r\n [dir]=\"dir\" (@slideContent.done)=\"onAnimationDone($event)\">\r\n <div class=\"toolbar-wrapper\" fxLayout=\"row\" [@slideDown]=\"slideDown\" *ngIf=\"!loading\">\r\n <button mat-icon-button (click)=\"close()\" bizdocTooltip=\"{{'Back' | translate}}\"><mat-icon class=\"mat-icon-rtl-mirror\">keyboard_arrow_left</mat-icon></button>\r\n <span class=\"mat-body-1\">{{data.file.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button (click)=\"rotate()\" bizdocTooltip=\"{{'Rotate' | translate }}\"><mat-icon>screen_rotation</mat-icon></button>\r\n <button mat-icon-button (click)=\"download()\" bizdocTooltip=\"{{'Download' | translate}}\"><mat-icon>save_alt</mat-icon></button>\r\n </div>\r\n <div class=\"spinner-wrapper\" *ngIf=\"loading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <object (load)=\"onLoad($event)\" [data]=\"objectData\" [type]=\"data.file.contentType\" *ngIf=\"!isImage\" #obj width=\"250\"\r\n height=\"200\">\r\n </object>\r\n <img *ngIf=\"isImage\" (load)=\"onLoad($event)\" [style.opacity]=\"loading ? 0 : 1\" [@fade]=\"loading ? 'fadeOut' : 'fadeIn'\" [src]=\"objectData\" #img>\r\n</div>\r\n", styles: [":host{display:flex;flex-direction:column;align-items:center}.spinner-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}img{width:100%;max-width:500px;height:auto}.overlay-content{padding:1em}.overlay-content .toolbar-wrapper{align-items:center;color:#f5f5f5}.divider{flex:1 1 auto}\n"] }]
4792
4792
  }], ctorParameters: function () { return [{ type: i7$2.Directionality }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
4793
4793
  type: Inject,
4794
4794
  args: [FILE_PREVIEW_DIALOG_DATA]
@@ -5371,10 +5371,10 @@ class FileInput {
5371
5371
  }
5372
5372
  FileInput.nextId = 0;
5373
5373
  FileInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FileInput, deps: [{ token: i0.ElementRef }, { token: MailboxService }, { token: i1$5.DomSanitizer }, { token: AttachmentInfo }, { token: TranslateService }, { token: SessionService }, { token: PromptService }, { token: i1$2.NgControl, optional: true, self: true }, { token: DOCUMENT_MODEL }], target: i0.ɵɵFactoryTarget.Component });
5374
- FileInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FileInput, selector: "bizdoc-file-upload", inputs: { multiple: "multiple", accept: "accept", icon: "icon", value: "value", placeholder: "placeholder", required: "required", disabled: "disabled" }, host: { listeners: { "document:drop": "handleDocumentDrop($event)", "drop": "handleDrop($event)", "dragenter": "handleEnter($event)", "dragleave": "handleLeave($event)", "dragover": "handleOver($event)" }, properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy" }, classAttribute: "file-dropable" }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<button mat-button *ngIf=\"!items; else preview\" (click)=\"prompt()\">\r\n <mat-icon class=\"filled\">{{icon}}</mat-icon>\r\n <span class=\"mat-h3\">{{placeholder}}</span>\r\n</button>\r\n<input type=\"file\" #input\r\n [accept]=accept [multiple]=multiple (change)='_change($event)' style=\"display: none\" />\r\n<ng-template #preview>\r\n <div *ngFor='let a of items' class=\"attachment-item\"\r\n [class.deleted]=\"a.deleted\" [class.failed]=\"a.failed\"\r\n [progressIndicator]=\"a.progress\">\r\n <img *ngIf=\"a.isImage\" [src]=\"a.url\" (click)=\"openPreview(a)\" height=\"80\" class=\"file-preview\">\r\n <div *ngIf=\"a.hasPreview && !a.isImage\" fxLayout=\"column\" class=\"file-preview\">\r\n <button mat-icon-button (click)=\"openPreview(a)\" [bizdocTooltip]=\"'Preview'|translate\"><mat-icon class=\"mat-icon-rtl-mirror\">find_in_page</mat-icon></button>\r\n <span>.{{a.fileExt}}</span>\r\n </div>\r\n <mat-icon *ngIf=\"a.icon\" [svgIcon]=\"a.icon\" [inline]=\"true\"></mat-icon>\r\n <div class=\"file-overlay row\">\r\n <span class=\"filename\">{{a.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button class=\"options\" [matMenuTriggerFor]=\"menu\" [bizdocTooltip]=\"'Options' | translate\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n </div>\r\n <mat-menu #menu>\r\n <ng-container *ngIf=\"!a.failed\">\r\n <ng-container *ngIf=\"canEdit(a) && !a.failed\">\r\n <ng-container *ngIf=\"!a.checkedOut\">\r\n <button mat-menu-item (click)=\"checkOut(a)\">{{\"CheckOut\" | translate}}</button>\r\n <button mat-menu-item (click)=\"prompt()\">{{\"Add\" | translate}}</button>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"checkIn(a)\" *ngIf=\"a.checkedOut\">{{\"CheckIn\" | translate}}</button>\r\n </ng-container>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"download(a)\">{{\"Download\" | translate}}</button>\r\n <button mat-menu-item *ngIf=\"canPreview(a)\" (click)=\"openPreview(a)\"><mat-icon>landscape</mat-icon> {{\"Preview\" | translate}}</button>\r\n <ng-container *ngIf=\"hasVersion(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item *ngFor=\"let v of getVersions(a)\" (click)=\"previewOrDownload(v)\">{{v.time | amCalendar}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"canEdit(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"discard(a)\">{{\"Discard\" | translate}}</button>\r\n </ng-container>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"cancel(a)\" *ngIf=\"a.failed\">{{\"Cancel\" | translate}}</button>\r\n </mat-menu>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:flex}.attachment-item{height:80px;position:relative}.attachment-item img{cursor:zoom-in}.attachment-item .file-preview{position:absolute}.attachment-item .file-overlay{position:relative;height:inherit}.attachment-item .file-overlay .filename{font-size:x-small;cursor:pointer;background:rgba(255,255,255,.4);align-self:flex-end}.attachment-item .file-overlay:hover .filename{background:white;opacity:.5}\n"], components: [{ type: i7$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i9.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i12$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ProgressDirective, selector: "[progressIndicator]", inputs: ["progressIndicator"] }, { type: i6$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }, { type: i9.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }], pipes: { "translate": TranslatePipe, "amCalendar": CalendarPipe } });
5374
+ FileInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FileInput, selector: "bizdoc-file-upload", inputs: { multiple: "multiple", accept: "accept", icon: "icon", value: "value", placeholder: "placeholder", required: "required", disabled: "disabled" }, host: { listeners: { "document:drop": "handleDocumentDrop($event)", "drop": "handleDrop($event)", "dragenter": "handleEnter($event)", "dragleave": "handleLeave($event)", "dragover": "handleOver($event)" }, properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy" }, classAttribute: "file-dropable" }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<button mat-button *ngIf=\"!items; else preview\" (click)=\"prompt()\">\r\n <mat-icon class=\"filled\">{{icon}}</mat-icon>\r\n <span class=\"mat-h3\">{{placeholder}}</span>\r\n</button>\r\n<input type=\"file\" #input\r\n [accept]=accept [multiple]=multiple (change)='_change($event)' style=\"display: none\" />\r\n<ng-template #preview>\r\n <div *ngFor='let a of items' class=\"attachment-item\"\r\n [class.deleted]=\"a.deleted\" [class.failed]=\"a.failed\"\r\n [progressIndicator]=\"a.progress\">\r\n <img *ngIf=\"a.isImage\" [src]=\"a.url\" (click)=\"openPreview(a)\" height=\"80\" class=\"file-preview\">\r\n <div *ngIf=\"a.hasPreview && !a.isImage\" fxLayout=\"column\" class=\"file-preview\">\r\n <button mat-icon-button (click)=\"openPreview(a)\" [bizdocTooltip]=\"'Preview'|translate\"><mat-icon class=\"mat-icon-rtl-mirror\">find_in_page</mat-icon></button>\r\n <span>.{{a.fileExt}}</span>\r\n </div>\r\n <mat-icon *ngIf=\"a.icon\" [svgIcon]=\"a.icon\" [inline]=\"true\"></mat-icon>\r\n <div class=\"file-overlay row\">\r\n <span class=\"filename\">{{a.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button class=\"options\" [matMenuTriggerFor]=\"menu\" [bizdocTooltip]=\"'Options' | translate\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n </div>\r\n <mat-menu #menu>\r\n <ng-container *ngIf=\"!a.failed\">\r\n <ng-container *ngIf=\"canEdit(a) && !a.failed\">\r\n <ng-container *ngIf=\"!a.checkedOut\">\r\n <button mat-menu-item (click)=\"checkOut(a)\">{{\"CheckOut\" | translate}}</button>\r\n <button mat-menu-item (click)=\"prompt()\" *ngIf=\"multiple\">{{\"Add\" | translate}}</button>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"checkIn(a)\" *ngIf=\"a.checkedOut\">{{\"CheckIn\" | translate}}</button>\r\n </ng-container>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"download(a)\">{{\"Download\" | translate}}</button>\r\n <button mat-menu-item *ngIf=\"canPreview(a)\" (click)=\"openPreview(a)\"><mat-icon>landscape</mat-icon> {{\"Preview\" | translate}}</button>\r\n <ng-container *ngIf=\"hasVersion(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item *ngFor=\"let v of getVersions(a)\" (click)=\"previewOrDownload(v)\">{{v.time | amCalendar}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"canEdit(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"discard(a)\">{{\"Discard\" | translate}}</button>\r\n </ng-container>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"cancel(a)\" *ngIf=\"a.failed\">{{\"Cancel\" | translate}}</button>\r\n </mat-menu>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:flex}.attachment-item{height:80px;position:relative}.attachment-item img{cursor:zoom-in}.attachment-item .file-preview{position:absolute}.attachment-item .file-overlay{position:relative;height:inherit}.attachment-item .file-overlay .filename{font-size:x-small;cursor:pointer;background:rgba(255,255,255,.4);align-self:flex-end}.attachment-item .file-overlay:hover .filename{background:white;opacity:.5}\n"], components: [{ type: i7$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i9.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { type: i12$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ProgressDirective, selector: "[progressIndicator]", inputs: ["progressIndicator"] }, { type: i6$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }, { type: i9.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }], pipes: { "translate": TranslatePipe, "amCalendar": CalendarPipe } });
5375
5375
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FileInput, decorators: [{
5376
5376
  type: Component,
5377
- args: [{ host: { class: 'file-dropable' }, selector: 'bizdoc-file-upload', template: "<button mat-button *ngIf=\"!items; else preview\" (click)=\"prompt()\">\r\n <mat-icon class=\"filled\">{{icon}}</mat-icon>\r\n <span class=\"mat-h3\">{{placeholder}}</span>\r\n</button>\r\n<input type=\"file\" #input\r\n [accept]=accept [multiple]=multiple (change)='_change($event)' style=\"display: none\" />\r\n<ng-template #preview>\r\n <div *ngFor='let a of items' class=\"attachment-item\"\r\n [class.deleted]=\"a.deleted\" [class.failed]=\"a.failed\"\r\n [progressIndicator]=\"a.progress\">\r\n <img *ngIf=\"a.isImage\" [src]=\"a.url\" (click)=\"openPreview(a)\" height=\"80\" class=\"file-preview\">\r\n <div *ngIf=\"a.hasPreview && !a.isImage\" fxLayout=\"column\" class=\"file-preview\">\r\n <button mat-icon-button (click)=\"openPreview(a)\" [bizdocTooltip]=\"'Preview'|translate\"><mat-icon class=\"mat-icon-rtl-mirror\">find_in_page</mat-icon></button>\r\n <span>.{{a.fileExt}}</span>\r\n </div>\r\n <mat-icon *ngIf=\"a.icon\" [svgIcon]=\"a.icon\" [inline]=\"true\"></mat-icon>\r\n <div class=\"file-overlay row\">\r\n <span class=\"filename\">{{a.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button class=\"options\" [matMenuTriggerFor]=\"menu\" [bizdocTooltip]=\"'Options' | translate\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n </div>\r\n <mat-menu #menu>\r\n <ng-container *ngIf=\"!a.failed\">\r\n <ng-container *ngIf=\"canEdit(a) && !a.failed\">\r\n <ng-container *ngIf=\"!a.checkedOut\">\r\n <button mat-menu-item (click)=\"checkOut(a)\">{{\"CheckOut\" | translate}}</button>\r\n <button mat-menu-item (click)=\"prompt()\">{{\"Add\" | translate}}</button>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"checkIn(a)\" *ngIf=\"a.checkedOut\">{{\"CheckIn\" | translate}}</button>\r\n </ng-container>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"download(a)\">{{\"Download\" | translate}}</button>\r\n <button mat-menu-item *ngIf=\"canPreview(a)\" (click)=\"openPreview(a)\"><mat-icon>landscape</mat-icon> {{\"Preview\" | translate}}</button>\r\n <ng-container *ngIf=\"hasVersion(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item *ngFor=\"let v of getVersions(a)\" (click)=\"previewOrDownload(v)\">{{v.time | amCalendar}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"canEdit(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"discard(a)\">{{\"Discard\" | translate}}</button>\r\n </ng-container>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"cancel(a)\" *ngIf=\"a.failed\">{{\"Cancel\" | translate}}</button>\r\n </mat-menu>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:flex}.attachment-item{height:80px;position:relative}.attachment-item img{cursor:zoom-in}.attachment-item .file-preview{position:absolute}.attachment-item .file-overlay{position:relative;height:inherit}.attachment-item .file-overlay .filename{font-size:x-small;cursor:pointer;background:rgba(255,255,255,.4);align-self:flex-end}.attachment-item .file-overlay:hover .filename{background:white;opacity:.5}\n"] }]
5377
+ args: [{ host: { class: 'file-dropable' }, selector: 'bizdoc-file-upload', template: "<button mat-button *ngIf=\"!items; else preview\" (click)=\"prompt()\">\r\n <mat-icon class=\"filled\">{{icon}}</mat-icon>\r\n <span class=\"mat-h3\">{{placeholder}}</span>\r\n</button>\r\n<input type=\"file\" #input\r\n [accept]=accept [multiple]=multiple (change)='_change($event)' style=\"display: none\" />\r\n<ng-template #preview>\r\n <div *ngFor='let a of items' class=\"attachment-item\"\r\n [class.deleted]=\"a.deleted\" [class.failed]=\"a.failed\"\r\n [progressIndicator]=\"a.progress\">\r\n <img *ngIf=\"a.isImage\" [src]=\"a.url\" (click)=\"openPreview(a)\" height=\"80\" class=\"file-preview\">\r\n <div *ngIf=\"a.hasPreview && !a.isImage\" fxLayout=\"column\" class=\"file-preview\">\r\n <button mat-icon-button (click)=\"openPreview(a)\" [bizdocTooltip]=\"'Preview'|translate\"><mat-icon class=\"mat-icon-rtl-mirror\">find_in_page</mat-icon></button>\r\n <span>.{{a.fileExt}}</span>\r\n </div>\r\n <mat-icon *ngIf=\"a.icon\" [svgIcon]=\"a.icon\" [inline]=\"true\"></mat-icon>\r\n <div class=\"file-overlay row\">\r\n <span class=\"filename\">{{a.fileName}}</span>\r\n <span class=\"divider\"></span>\r\n <button mat-icon-button class=\"options\" [matMenuTriggerFor]=\"menu\" [bizdocTooltip]=\"'Options' | translate\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n </div>\r\n <mat-menu #menu>\r\n <ng-container *ngIf=\"!a.failed\">\r\n <ng-container *ngIf=\"canEdit(a) && !a.failed\">\r\n <ng-container *ngIf=\"!a.checkedOut\">\r\n <button mat-menu-item (click)=\"checkOut(a)\">{{\"CheckOut\" | translate}}</button>\r\n <button mat-menu-item (click)=\"prompt()\" *ngIf=\"multiple\">{{\"Add\" | translate}}</button>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"checkIn(a)\" *ngIf=\"a.checkedOut\">{{\"CheckIn\" | translate}}</button>\r\n </ng-container>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"download(a)\">{{\"Download\" | translate}}</button>\r\n <button mat-menu-item *ngIf=\"canPreview(a)\" (click)=\"openPreview(a)\"><mat-icon>landscape</mat-icon> {{\"Preview\" | translate}}</button>\r\n <ng-container *ngIf=\"hasVersion(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item *ngFor=\"let v of getVersions(a)\" (click)=\"previewOrDownload(v)\">{{v.time | amCalendar}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"canEdit(a)\">\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"discard(a)\">{{\"Discard\" | translate}}</button>\r\n </ng-container>\r\n </ng-container>\r\n <button mat-menu-item (click)=\"cancel(a)\" *ngIf=\"a.failed\">{{\"Cancel\" | translate}}</button>\r\n </mat-menu>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:flex}.attachment-item{height:80px;position:relative}.attachment-item img{cursor:zoom-in}.attachment-item .file-preview{position:absolute}.attachment-item .file-overlay{position:relative;height:inherit}.attachment-item .file-overlay .filename{font-size:x-small;cursor:pointer;background:rgba(255,255,255,.4);align-self:flex-end}.attachment-item .file-overlay:hover .filename{background:white;opacity:.5}\n"] }]
5378
5378
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MailboxService }, { type: i1$5.DomSanitizer }, { type: AttachmentInfo }, { type: TranslateService }, { type: SessionService }, { type: PromptService }, { type: i1$2.NgControl, decorators: [{
5379
5379
  type: Optional
5380
5380
  }, {