barsa-sap-ui 1.0.322 → 1.0.323

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.
@@ -84,6 +84,7 @@ import * as i7$b from '@fundamental-ngx/core/segmented-button';
84
84
  import * as i3$6 from '@fundamental-ngx/core/pagination';
85
85
  import * as i3$7 from '@fundamental-ngx/core/panel';
86
86
  import * as i1$6 from '@fundamental-ngx/core/switch';
87
+ import * as i6$6 from '@fundamental-ngx/core/info-label';
87
88
  import { CdkTableModule } from '@angular/cdk/table';
88
89
 
89
90
  class ProgressIndicatorComponent extends BaseComponent {
@@ -11265,6 +11266,14 @@ class BlobViewerComponent extends BaseComponent {
11265
11266
  this.fallbackUrl = this.getFallbackUrl(this.file.Id);
11266
11267
  this._downloadFileId(this.file.Id, true, 'pdf', false, false);
11267
11268
  }
11269
+ ngOnChanges(changes) {
11270
+ super.ngOnChanges(changes);
11271
+ const { file } = changes;
11272
+ if (file && !file.firstChange) {
11273
+ this.fallbackUrl = this.getFallbackUrl(this.file.Id);
11274
+ this._downloadFileId(this.file.Id, true, 'pdf', false, false);
11275
+ }
11276
+ }
11268
11277
  _downloadFileId(fileId, viewInBrowser, convertTo, forOcx, isOfficeOnline) {
11269
11278
  this._setLoading(true);
11270
11279
  BarsaApi.Common.File.DownloadFileContent.bind(this)({
@@ -11285,7 +11294,7 @@ class BlobViewerComponent extends BaseComponent {
11285
11294
  });
11286
11295
  }
11287
11296
  getFallbackUrl(fileId) {
11288
- return `امکان نمایش فایل در این مرورگر وجود ندارد.
11297
+ return `امکان نمایش فایل در این مرورگر وجود ندارد.
11289
11298
  برای باز کردن فایل از لینک زیر استفاده کنید: </br> <a href='${BarsaApi.Common.File.CreateAttachmentUrl(fileId, false, true)}'>دانلود فایل بصورت pdf</a> </br> <a href='${BarsaApi.Common.File.CreateAttachmentUrl(fileId, false, false)}'>دانلود فایل بصورت بصورت اصلی</a>`;
11290
11299
  }
11291
11300
  _setLoading(loading) {
@@ -11299,7 +11308,7 @@ class BlobViewerComponent extends BaseComponent {
11299
11308
  }
11300
11309
  }
11301
11310
  BlobViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BlobViewerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
11302
- BlobViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BlobViewerComponent, selector: "bsu-blob-viewer", inputs: { file: "file" }, usesInheritance: true, ngImport: i0, template: "<bsu-mask *ngIf=\"loading\"></bsu-mask>\r\n<object\r\n *ngIf=\"valueUrl\"\r\n style=\"flex-grow: 1\"\r\n [attr.data]=\"valueUrl\"\r\n type=\"application/pdf\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n [attr.html]=\"fallbackUrl\"\r\n></object>\r\n", styles: [":host{display:block;position:relative;height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11311
+ BlobViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BlobViewerComponent, selector: "bsu-blob-viewer", inputs: { file: "file" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<bsu-mask *ngIf=\"loading\"></bsu-mask>\r\n<object\r\n *ngIf=\"valueUrl\"\r\n style=\"flex-grow: 1\"\r\n [attr.data]=\"valueUrl\"\r\n type=\"application/pdf\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n [attr.html]=\"fallbackUrl\"\r\n></object>\r\n", styles: [":host{display:block;position:relative;height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11303
11312
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BlobViewerComponent, decorators: [{
11304
11313
  type: Component,
11305
11314
  args: [{ selector: 'bsu-blob-viewer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bsu-mask *ngIf=\"loading\"></bsu-mask>\r\n<object\r\n *ngIf=\"valueUrl\"\r\n style=\"flex-grow: 1\"\r\n [attr.data]=\"valueUrl\"\r\n type=\"application/pdf\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n [attr.html]=\"fallbackUrl\"\r\n></object>\r\n", styles: [":host{display:block;position:relative;height:100%;width:100%}\n"] }]
@@ -11461,16 +11470,20 @@ class FileViewerPopoverComponent extends BaseComponent {
11461
11470
  }
11462
11471
  }
11463
11472
  FileViewerPopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FileViewerPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11464
- FileViewerPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: FileViewerPopoverComponent, selector: "bsu-file-viewer-popover", inputs: { file: "file", deviceSize: "deviceSize", canDownload: "canDownload" }, outputs: { remove: "remove" }, usesInheritance: true, ngImport: i0, template: "<div style=\"display: flex; align-items: center; column-gap: 1px\">\r\n <button\r\n fd-button\r\n [fdPopoverTrigger]=\"deviceSize === 's' ? popoverMobile : popoverLarge\"\r\n [label]=\"file.FileName || ''\"\r\n glyph=\"attachment\"\r\n [fdMenu]=\"true\"\r\n class=\"btn-actionsheet\"\r\n ></button>\r\n <fd-popover #popoverMobile [mobile]=\"true\" [mobileConfig]=\"{ title: 'Mobile Popover', hasCloseButton: true }\">\r\n <ng-template #popoverBodyContent>\r\n <ng-container\r\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverMobile, mobile: true }\"\r\n ></ng-container>\r\n </ng-template>\r\n </fd-popover>\r\n <fd-popover #popoverLarge>\r\n <fd-popover-body>\r\n <ng-container\r\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverLarge, mobile: false }\"\r\n ></ng-container>\r\n </fd-popover-body>\r\n </fd-popover>\r\n\r\n <button fd-button glyph=\"delete\" (click)=\"remove.emit()\"></button>\r\n</div>\r\n\r\n<ng-template #popoverbodyTpl let-popover let-mobile=\"mobile\">\r\n <div fd-popover-body-header>\r\n <div fd-bar [cozy]=\"true\" id=\"popover-bar-header-3\">\r\n <div fd-bar-left>\r\n <fd-bar-element>{{ file.FileName }}</fd-bar-element>\r\n </div>\r\n </div>\r\n </div>\r\n <bsu-file-viewer-content\r\n [file]=\"file\"\r\n [width]=\"mobile ? '100vw' : '30vw'\"\r\n [cardMode]=\"true\"\r\n [showContent]=\"true\"\r\n [showFooter]=\"true\"\r\n [cardContentHeight]=\"mobile ? null : '320px'\"\r\n ></bsu-file-viewer-content>\r\n <div fd-popover-body-footer *ngIf=\"canDownload\">\r\n <div fd-bar barDesign=\"footer\">\r\n <div fd-bar-right>\r\n <fd-button-bar\r\n fdType=\"transparent\"\r\n glyph=\"download\"\r\n downloadFiles\r\n [files]=\"[file]\"\r\n (click)=\"popover.close()\"\r\n ></fd-button-bar>\r\n <fd-button-bar\r\n *ngIf=\"!mobile\"\r\n fdType=\"transparent\"\r\n glyph=\"resize\"\r\n fullscreenFiles\r\n [files]=\"[file]\"\r\n (click)=\"popover.close()\"\r\n ></fd-button-bar>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.btn-actionsheet{width:100%!important;max-width:100%!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$3.BarComponent, selector: "[fd-bar]", inputs: ["class", "barDesign", "inPage", "inHomePage", "size"] }, { kind: "directive", type: i2$3.BarLeftDirective, selector: "[fd-bar-left]" }, { kind: "directive", type: i2$3.BarRightDirective, selector: "[fd-bar-right]" }, { kind: "directive", type: i2$3.BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth", "isTitle"] }, { kind: "component", type: i2$3.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "directive", type: i2$3.DeprecatedBarContentDensityDirective, selector: "[fd-bar][cozy]" }, { kind: "component", type: i3$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i7$2.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "directive", type: i7$2.PopoverBodyHeaderDirective, selector: "[fdPopoverBodyHeader], [fd-popover-body-header]" }, { kind: "directive", type: i7$2.PopoverBodyFooterDirective, selector: "[fdPopoverBodyFooter], [fd-popover-body-footer]" }, { kind: "component", type: i7$2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i7$2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "component", type: FileViewerContentComponent, selector: "bsu-file-viewer-content", inputs: ["fillWidth", "imageOnly", "cardMode", "showFooter", "showContent", "width", "cardContentHeight", "file"] }, { kind: "directive", type: FullscreenFilesDirective, selector: "[fullscreenFiles]", inputs: ["files", "title", "isImageGallery", "component"] }, { kind: "directive", type: DownloadFilesDirective, selector: "[downloadFiles]", inputs: ["files"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11473
+ FileViewerPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: FileViewerPopoverComponent, selector: "bsu-file-viewer-popover", inputs: { files: "files", file: "file", deviceSize: "deviceSize", canDownload: "canDownload", disableRemove: "disableRemove" }, outputs: { remove: "remove" }, usesInheritance: true, ngImport: i0, template: "<div style=\"display: flex; align-items: center; column-gap: 1px\">\n <button\n fd-button\n [fdPopoverTrigger]=\"deviceSize === 's' ? popoverMobile : popoverLarge\"\n [label]=\"file.FileName || ''\"\n glyph=\"attachment\"\n [fdMenu]=\"true\"\n class=\"btn-actionsheet\"\n ></button>\n <fd-popover\n #popoverMobile\n [mobile]=\"true\"\n [mobileConfig]=\"{ title: 'ShowFiles' | bbbTranslate, hasCloseButton: true }\"\n >\n <ng-template #popoverBodyContent>\n <ng-container\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverMobile, mobile: true }\"\n ></ng-container>\n </ng-template>\n </fd-popover>\n <fd-popover #popoverLarge>\n <fd-popover-body>\n <ng-container\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverLarge, mobile: false }\"\n ></ng-container>\n </fd-popover-body>\n </fd-popover>\n\n <button *ngIf=\"!disableRemove\" fd-button glyph=\"delete\" (click)=\"remove.emit()\"></button>\n</div>\n\n<ng-template #popoverbodyTpl let-popover let-mobile=\"mobile\">\n <div fd-popover-body-header>\n <div fd-bar [cozy]=\"true\" id=\"popover-bar-header-3\">\n <div fd-bar-left>\n <fd-bar-element>{{ file.FileName }}</fd-bar-element>\n </div>\n </div>\n </div>\n <bsu-file-viewer-content\n [file]=\"file\"\n [width]=\"mobile ? '100vw' : '30vw'\"\n [cardMode]=\"true\"\n [showContent]=\"true\"\n [showFooter]=\"true\"\n [cardContentHeight]=\"mobile ? null : '320px'\"\n ></bsu-file-viewer-content>\n <div fd-popover-body-footer *ngIf=\"canDownload\">\n <div fd-bar barDesign=\"footer\">\n <div fd-bar-right>\n <fd-button-bar\n fdType=\"transparent\"\n glyph=\"download\"\n downloadFiles\n [files]=\"[file]\"\n (click)=\"popover.close()\"\n ></fd-button-bar>\n <fd-button-bar\n *ngIf=\"!mobile\"\n fdType=\"transparent\"\n glyph=\"resize\"\n fullscreenFiles\n [files]=\"files?.length ? files : [file]\"\n (click)=\"popover.close()\"\n ></fd-button-bar>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [":host{display:block}.btn-actionsheet{width:100%!important;max-width:100%!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$3.BarComponent, selector: "[fd-bar]", inputs: ["class", "barDesign", "inPage", "inHomePage", "size"] }, { kind: "directive", type: i2$3.BarLeftDirective, selector: "[fd-bar-left]" }, { kind: "directive", type: i2$3.BarRightDirective, selector: "[fd-bar-right]" }, { kind: "directive", type: i2$3.BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth", "isTitle"] }, { kind: "component", type: i2$3.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "directive", type: i2$3.DeprecatedBarContentDensityDirective, selector: "[fd-bar][cozy]" }, { kind: "component", type: i3$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i7$2.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "directive", type: i7$2.PopoverBodyHeaderDirective, selector: "[fdPopoverBodyHeader], [fd-popover-body-header]" }, { kind: "directive", type: i7$2.PopoverBodyFooterDirective, selector: "[fdPopoverBodyFooter], [fd-popover-body-footer]" }, { kind: "component", type: i7$2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i7$2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "component", type: FileViewerContentComponent, selector: "bsu-file-viewer-content", inputs: ["fillWidth", "imageOnly", "cardMode", "showFooter", "showContent", "width", "cardContentHeight", "file"] }, { kind: "directive", type: FullscreenFilesDirective, selector: "[fullscreenFiles]", inputs: ["files", "title", "isImageGallery", "component"] }, { kind: "directive", type: DownloadFilesDirective, selector: "[downloadFiles]", inputs: ["files"] }, { kind: "pipe", type: i2.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11465
11474
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FileViewerPopoverComponent, decorators: [{
11466
11475
  type: Component,
11467
- args: [{ selector: 'bsu-file-viewer-popover', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div style=\"display: flex; align-items: center; column-gap: 1px\">\r\n <button\r\n fd-button\r\n [fdPopoverTrigger]=\"deviceSize === 's' ? popoverMobile : popoverLarge\"\r\n [label]=\"file.FileName || ''\"\r\n glyph=\"attachment\"\r\n [fdMenu]=\"true\"\r\n class=\"btn-actionsheet\"\r\n ></button>\r\n <fd-popover #popoverMobile [mobile]=\"true\" [mobileConfig]=\"{ title: 'Mobile Popover', hasCloseButton: true }\">\r\n <ng-template #popoverBodyContent>\r\n <ng-container\r\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverMobile, mobile: true }\"\r\n ></ng-container>\r\n </ng-template>\r\n </fd-popover>\r\n <fd-popover #popoverLarge>\r\n <fd-popover-body>\r\n <ng-container\r\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverLarge, mobile: false }\"\r\n ></ng-container>\r\n </fd-popover-body>\r\n </fd-popover>\r\n\r\n <button fd-button glyph=\"delete\" (click)=\"remove.emit()\"></button>\r\n</div>\r\n\r\n<ng-template #popoverbodyTpl let-popover let-mobile=\"mobile\">\r\n <div fd-popover-body-header>\r\n <div fd-bar [cozy]=\"true\" id=\"popover-bar-header-3\">\r\n <div fd-bar-left>\r\n <fd-bar-element>{{ file.FileName }}</fd-bar-element>\r\n </div>\r\n </div>\r\n </div>\r\n <bsu-file-viewer-content\r\n [file]=\"file\"\r\n [width]=\"mobile ? '100vw' : '30vw'\"\r\n [cardMode]=\"true\"\r\n [showContent]=\"true\"\r\n [showFooter]=\"true\"\r\n [cardContentHeight]=\"mobile ? null : '320px'\"\r\n ></bsu-file-viewer-content>\r\n <div fd-popover-body-footer *ngIf=\"canDownload\">\r\n <div fd-bar barDesign=\"footer\">\r\n <div fd-bar-right>\r\n <fd-button-bar\r\n fdType=\"transparent\"\r\n glyph=\"download\"\r\n downloadFiles\r\n [files]=\"[file]\"\r\n (click)=\"popover.close()\"\r\n ></fd-button-bar>\r\n <fd-button-bar\r\n *ngIf=\"!mobile\"\r\n fdType=\"transparent\"\r\n glyph=\"resize\"\r\n fullscreenFiles\r\n [files]=\"[file]\"\r\n (click)=\"popover.close()\"\r\n ></fd-button-bar>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.btn-actionsheet{width:100%!important;max-width:100%!important}\n"] }]
11468
- }], ctorParameters: function () { return []; }, propDecorators: { file: [{
11476
+ args: [{ selector: 'bsu-file-viewer-popover', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div style=\"display: flex; align-items: center; column-gap: 1px\">\n <button\n fd-button\n [fdPopoverTrigger]=\"deviceSize === 's' ? popoverMobile : popoverLarge\"\n [label]=\"file.FileName || ''\"\n glyph=\"attachment\"\n [fdMenu]=\"true\"\n class=\"btn-actionsheet\"\n ></button>\n <fd-popover\n #popoverMobile\n [mobile]=\"true\"\n [mobileConfig]=\"{ title: 'ShowFiles' | bbbTranslate, hasCloseButton: true }\"\n >\n <ng-template #popoverBodyContent>\n <ng-container\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverMobile, mobile: true }\"\n ></ng-container>\n </ng-template>\n </fd-popover>\n <fd-popover #popoverLarge>\n <fd-popover-body>\n <ng-container\n *ngTemplateOutlet=\"popoverbodyTpl; context: { $implicit: popoverLarge, mobile: false }\"\n ></ng-container>\n </fd-popover-body>\n </fd-popover>\n\n <button *ngIf=\"!disableRemove\" fd-button glyph=\"delete\" (click)=\"remove.emit()\"></button>\n</div>\n\n<ng-template #popoverbodyTpl let-popover let-mobile=\"mobile\">\n <div fd-popover-body-header>\n <div fd-bar [cozy]=\"true\" id=\"popover-bar-header-3\">\n <div fd-bar-left>\n <fd-bar-element>{{ file.FileName }}</fd-bar-element>\n </div>\n </div>\n </div>\n <bsu-file-viewer-content\n [file]=\"file\"\n [width]=\"mobile ? '100vw' : '30vw'\"\n [cardMode]=\"true\"\n [showContent]=\"true\"\n [showFooter]=\"true\"\n [cardContentHeight]=\"mobile ? null : '320px'\"\n ></bsu-file-viewer-content>\n <div fd-popover-body-footer *ngIf=\"canDownload\">\n <div fd-bar barDesign=\"footer\">\n <div fd-bar-right>\n <fd-button-bar\n fdType=\"transparent\"\n glyph=\"download\"\n downloadFiles\n [files]=\"[file]\"\n (click)=\"popover.close()\"\n ></fd-button-bar>\n <fd-button-bar\n *ngIf=\"!mobile\"\n fdType=\"transparent\"\n glyph=\"resize\"\n fullscreenFiles\n [files]=\"files?.length ? files : [file]\"\n (click)=\"popover.close()\"\n ></fd-button-bar>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [":host{display:block}.btn-actionsheet{width:100%!important;max-width:100%!important}\n"] }]
11477
+ }], ctorParameters: function () { return []; }, propDecorators: { files: [{
11478
+ type: Input
11479
+ }], file: [{
11469
11480
  type: Input
11470
11481
  }], deviceSize: [{
11471
11482
  type: Input
11472
11483
  }], canDownload: [{
11473
11484
  type: Input
11485
+ }], disableRemove: [{
11486
+ type: Input
11474
11487
  }], remove: [{
11475
11488
  type: Output
11476
11489
  }] } });
@@ -11738,17 +11751,129 @@ class BarsaPishnamayeshPayamComponent extends FieldBaseComponent {
11738
11751
  super.ngOnInit();
11739
11752
  const mo = this.context.formControl.Mo;
11740
11753
  const { $FieldDict } = mo;
11741
- this.data = mo[$FieldDict['محتوای پیام']];
11742
- this.data.$ContentHtml = this._domSanitizer.bypassSecurityTrustHtml(this.data.ContentHtml);
11743
- this.data.$SendDate = 'امروز 11:45';
11754
+ this.data = new PayamClassType(mo[$FieldDict['محتوای پیام']], this._domSanitizer, this._dateService);
11744
11755
  }
11745
11756
  }
11746
11757
  BarsaPishnamayeshPayamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaPishnamayeshPayamComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
11747
- BarsaPishnamayeshPayamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BarsaPishnamayeshPayamComponent, selector: "bsu-barsa-pishnamayesh-payam", usesInheritance: true, ngImport: i0, template: "<fd-card cardType=\"object\">\n <fd-card-header>\n <fd-avatar image=\"\" [circle]=\"true\" size=\"s\" ariaLabel=\"avatar image\" title=\"avatar image\"></fd-avatar>\n <div fd-card-title class=\"header-fields\">\n <h5 fd-title>\n <a fd-link [emphasized]=\"true\" aria-label=\"Sender\"> {{ data.FromText }}</a>\n </h5>\n <fd-object-identifier [description]=\"'(' + data.$SendDate + ')'\"> </fd-object-identifier>\n </div>\n <div fd-card-subtitle>\n <h5 fd-title>{{ data.Subject }}</h5>\n <button fd-button fdType=\"transparent\">\u06AF\u06CC\u0631\u0646\u062F\u06AF\u0627\u0646</button>\n </div>\n </fd-card-header>\n <fd-card-content>\n <fd-panel\n [(expanded)]=\"expanded\"\n expandId=\"panel-expand-1\"\n expandAriaLabel=\"Panel Expand\"\n expandAriaLabelledBy=\"panel-expandable-title-1\"\n >\n <h5 fd-panel-title id=\"panel-expandable-title-1\">\u0645\u062D\u062A\u0648\u0627\u06CC \u067E\u06CC\u0627\u0645</h5>\n <div fd-panel-content [innerHtml]=\"data.$ContentHtml\" fillEmptySpace [decrement]=\"'2rem'\"></div>\n </fd-panel>\n <div></div>\n </fd-card-content>\n <!-- <fd-card-footer>\n <button *fdCardFooterActionItem fd-button fdCompact>Assign to Project</button>\n </fd-card-footer> -->\n</fd-card>\n", styles: [":host{display:block;width:100%;height:100%}:host ::ng-deep .fd-card__subtitle{display:flex;align-items:center;column-gap:5px;justify-content:start}:host ::ng-deep .fd-object-identifier__text{margin-top:0}:host ::ng-deep .fd-panel__header{border-bottom:none}.iframe{border-style:none;height:98%;width:98%}.header-fields{display:flex;column-gap:5px;align-items:center;justify-content:center}.fx-column{flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i2.FillEmptySpaceDirective, selector: "[fillEmptySpace]", inputs: ["decrement"] }, { kind: "component", type: i3$3.AvatarComponent, selector: "fd-avatar", inputs: ["class", "id", "ariaLabel", "ariaLabelledby", "label", "size", "glyph", "zoomGlyph", "circle", "transparent", "contain", "placeholder", "tile", "border", "colorAccent", "random", "clickable", "backgroundImage", "image", "alterIcon", "backupImage"], outputs: ["avatarClicked", "zoomGlyphClicked"] }, { kind: "component", type: i3$4.LinkComponent, selector: "[fdLink], [fd-link], [fd-breadcrumb-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i5$1.CardComponent, selector: "fd-card", inputs: ["badge", "isLoading", "cardType", "id", "role"] }, { kind: "component", type: i5$1.CardHeaderComponent, selector: "fd-card-header", inputs: ["interactive", "tabindex"] }, { kind: "component", type: i5$1.CardContentComponent, selector: "fd-card-content" }, { kind: "directive", type: i5$1.CardTitleDirective, selector: "[fd-card-title]" }, { kind: "directive", type: i5$1.CardSubtitleDirective, selector: "[fd-card-subtitle]" }, { kind: "component", type: i5.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: i7$7.ObjectIdentifierComponent, selector: "fd-object-identifier", inputs: ["description", "bold", "medium"] }, { kind: "component", type: i3$7.PanelComponent, selector: "fd-panel", inputs: ["class", "fixed", "id", "expandId", "expandAriaLabel", "expandAriaLabelledBy", "expanded"], outputs: ["expandedChange"] }, { kind: "directive", type: i3$7.PanelContentDirective, selector: "[fd-panel-content]", inputs: ["height", "minHeight", "maxHeight", "ariaLabel", "ariaLabelledBy", "role", "id"] }, { kind: "directive", type: i3$7.PanelTitleDirective, selector: "[fd-panel-title]", inputs: ["id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11758
+ BarsaPishnamayeshPayamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BarsaPishnamayeshPayamComponent, selector: "bsu-barsa-pishnamayesh-payam", providers: [
11759
+ {
11760
+ provide: DateService,
11761
+ useFactory: getDateService$1,
11762
+ deps: [LogService]
11763
+ }
11764
+ ], usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngTemplateOutlet=\"\n showPayamClass;\n context: {\n $implicit: data,\n primary: !data.$details?.length,\n isFirst: true\n }\n \"\n>\n</ng-container>\n<ng-template #showPayamClass let-data let-primary=\"primary\" let-isFirst=\"isFirst\">\n <ng-container\n *ngTemplateOutlet=\"\n namayeshPayam;\n context: {\n $implicit: data.payam.Subject,\n fromText: data.payam.FromText,\n toText: data.$toText,\n importance: data.$importance,\n readDate: data.$readDate,\n sendDate: data.$sendDate,\n ccText: data.$ccText,\n bccText: data.$bccText,\n accessLevel: data.$accessLevel,\n content: data.$content,\n fromPhoto: data.$fromPhoto,\n details: data.$details,\n attachments: data.$attachments,\n todo: data.$todo,\n customText: data.payam.CustomText,\n primary: primary,\n isFirst: isFirst\n }\n \"\n >\n </ng-container>\n</ng-template>\n\n<ng-template\n #namayeshPayam\n let-subject\n let-content=\"content\"\n let-fromText=\"fromText\"\n let-toText=\"toText\"\n let-importance=\"importance\"\n let-readDate=\"readDate\"\n let-sendDate=\"sendDate\"\n let-ccText=\"ccText\"\n let-bccText=\"bccText\"\n let-fromPhoto=\"fromPhoto\"\n let-details=\"details\"\n let-accessLevel=\"accessLevel\"\n let-primary=\"primary\"\n let-isFirst=\"isFirst\"\n let-attachments=\"attachments\"\n let-todo=\"todo\"\n let-customText=\"customText\"\n>\n <fd-card cardType=\"object\">\n <fd-card-header>\n <fd-avatar\n [image]=\"fromPhoto\"\n [circle]=\"true\"\n size=\"s\"\n [ariaLabel]=\"fromText\"\n [label]=\"fromText\"\n [title]=\"fromText\"\n ></fd-avatar>\n <div fd-card-title class=\"header-fields\">\n <h5 fd-title>\n <a fd-link [emphasized]=\"true\" aria-label=\"Sender\"> {{ fromText }}</a>\n </h5>\n <fd-object-identifier [description]=\"'(' + sendDate + ')'\"> </fd-object-identifier>\n </div>\n <div fd-card-subtitle>\n <h5 fd-title>{{ subject }}</h5>\n <fd-popover>\n <fd-popover-control>\n <button fd-button fdType=\"transparent\" [fdMenu]=\"true\">{{ 'Recievers' | bbbTranslate }}</button>\n </fd-popover-control>\n <fd-popover-body>\n <ul fd-list>\n <li fd-list-item *ngFor=\"let rec of toText\">\n <a fd-list-link>{{ rec }}</a>\n </li>\n </ul>\n </fd-popover-body>\n </fd-popover>\n </div>\n </fd-card-header>\n <fd-card-content>\n <fd-panel [expanded]=\"isFirst\">\n <div fd-panel-title id=\"panel-expandable-title-1\">\n <h5 fd-title>{{ '\u0645\u062D\u062A\u0648\u0627\u06CC \u067E\u06CC\u0627\u0645' | bbbTranslate }}</h5>\n <div class=\"payamIcons\">\n <fd-popover *ngIf=\"importance.icon\">\n <fd-popover-control>\n <img [src]=\"'/Customization/Mail/' + importance.icon\" />\n </fd-popover-control>\n <fd-popover-body>\n <ul fd-list>\n <li fd-list-item>{{ importance.text }}</li>\n </ul>\n </fd-popover-body>\n </fd-popover>\n <fd-popover *ngIf=\"accessLevel.icon\">\n <fd-popover-control>\n <img [src]=\"'/Customization/Mail/' + accessLevel.icon\" />\n </fd-popover-control>\n <fd-popover-body>\n <ul fd-list>\n <li fd-list-item>{{ accessLevel.text }}</li>\n </ul>\n </fd-popover-body>\n </fd-popover>\n <fd-info-label\n *ngIf=\"todo\"\n [label]=\"todo.text\"\n [color]=\"todo.color\"\n [title]=\"todo.text\"\n ></fd-info-label>\n </div>\n </div>\n <div fd-panel-content>\n <div *ngIf=\"customText\">\n <fd-message-strip type=\"information\" [noIcon]=\"true\" [dismissible]=\"false\">\n {{ customText }}\n </fd-message-strip>\n </div>\n <div [innerHtml]=\"content\" [disable]=\"!primary || attachments?.length\"></div>\n\n <div *ngIf=\"attachments?.length\" class=\"attachments\">\n <ng-container *ngFor=\"let file of attachments\">\n <bsu-file-viewer-popover\n *ngIf=\"!file.IsDeleted\"\n [file]=\"file\"\n [files]=\"attachments\"\n [deviceSize]=\"(deviceSize$ | async)!!\"\n [canDownload]=\"true\"\n [disableRemove]=\"true\"\n ></bsu-file-viewer-popover>\n </ng-container>\n <ng-container *ngIf=\"attachments.length > 1\">\n <button\n fd-button\n [title]=\"'Download' | bbbTranslate\"\n [glyph]=\"'download'\"\n downloadFiles\n [files]=\"attachments\"\n ></button>\n </ng-container>\n </div>\n <div class=\"readAt\">\n <fd-object-identifier\n *ngIf=\"readDate\"\n [description]=\"('ReadAt' | bbbTranslate) + ': (' + readDate + ')'\"\n >\n </fd-object-identifier>\n </div>\n </div>\n </fd-panel>\n </fd-card-content>\n <!-- <fd-card-footer>\n <button *fdCardFooterActionItem fd-button fdCompact>Assign to Project</button>\n </fd-card-footer> -->\n </fd-card>\n <ng-contianer *ngFor=\"let detail of details\">\n <ng-container\n *ngTemplateOutlet=\"\n showPayamClass;\n context: {\n $implicit: detail\n }\n \"\n >\n </ng-container>\n </ng-contianer>\n</ng-template>\n", styles: [":host{display:block;position:relative;width:100%;height:100%}:host ::ng-deep .fd-panel__content{border-bottom:none;padding-bottom:5px}:host ::ng-deep .fd-card__subtitle{display:flex;align-items:center;column-gap:5px;justify-content:start}:host ::ng-deep .fd-object-identifier__text{margin-top:0}:host ::ng-deep .fd-panel__header{border-bottom:none}fd-card-header{cursor:default;border-bottom:none!important}fd-card-header:before{position:relative!important;display:none!important}fd-card-header:hover{background:var(--fdCard_Background_Color)!important}.attachments{display:flex;flex-wrap:wrap;column-gap:5px;row-gap:5px}.readAt{padding-top:2rem}.readAt ::ng-deep p{color:var(--sapButton_BorderColor)!important}.payamIcons{display:flex;column-gap:5px}.payamIcons img{width:16px}@media (max-width: 410px){h5{max-width:210px}}@media (max-width: 1040px){.h5{max-width:600px}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$3.AvatarComponent, selector: "fd-avatar", inputs: ["class", "id", "ariaLabel", "ariaLabelledby", "label", "size", "glyph", "zoomGlyph", "circle", "transparent", "contain", "placeholder", "tile", "border", "colorAccent", "random", "clickable", "backgroundImage", "image", "alterIcon", "backupImage"], outputs: ["avatarClicked", "zoomGlyphClicked"] }, { kind: "component", type: i3$4.LinkComponent, selector: "[fdLink], [fd-link], [fd-breadcrumb-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "component", type: i3$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i5$1.CardComponent, selector: "fd-card", inputs: ["badge", "isLoading", "cardType", "id", "role"] }, { kind: "component", type: i5$1.CardHeaderComponent, selector: "fd-card-header", inputs: ["interactive", "tabindex"] }, { kind: "component", type: i5$1.CardContentComponent, selector: "fd-card-content" }, { kind: "directive", type: i5$1.CardTitleDirective, selector: "[fd-card-title]" }, { kind: "directive", type: i5$1.CardSubtitleDirective, selector: "[fd-card-subtitle]" }, { kind: "component", type: i6$6.InfoLabelComponent, selector: "fd-info-label", inputs: ["class", "type", "glyph", "font", "color", "label", "title", "ariaLabel", "ariaLabelledBy"] }, { kind: "component", type: i6$1.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline"], outputs: ["focusEscapeList"] }, { kind: "component", type: i6$1.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "directive", type: i6$1.ListLinkDirective, selector: "[fd-list-link], [fdListLink]", inputs: ["navigationIndicator", "navigated"] }, { kind: "component", type: i5.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: i9$3.MessageStripComponent, selector: "fd-message-strip", inputs: ["class", "dismissible", "noIcon", "type", "id", "ariaLabelledBy", "ariaLabel", "dismissLabel", "width", "minWidth", "marginBottom"], outputs: ["onDismiss"] }, { kind: "component", type: i7$7.ObjectIdentifierComponent, selector: "fd-object-identifier", inputs: ["description", "bold", "medium"] }, { kind: "component", type: i3$7.PanelComponent, selector: "fd-panel", inputs: ["class", "fixed", "id", "expandId", "expandAriaLabel", "expandAriaLabelledBy", "expanded"], outputs: ["expandedChange"] }, { kind: "directive", type: i3$7.PanelContentDirective, selector: "[fd-panel-content]", inputs: ["height", "minHeight", "maxHeight", "ariaLabel", "ariaLabelledBy", "role", "id"] }, { kind: "directive", type: i3$7.PanelTitleDirective, selector: "[fd-panel-title]", inputs: ["id"] }, { kind: "component", type: i7$2.PopoverControlComponent, selector: "fd-popover-control" }, { kind: "component", type: i7$2.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i7$2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: FileViewerPopoverComponent, selector: "bsu-file-viewer-popover", inputs: ["files", "file", "deviceSize", "canDownload", "disableRemove"], outputs: ["remove"] }, { kind: "directive", type: DownloadFilesDirective, selector: "[downloadFiles]", inputs: ["files"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11748
11765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaPishnamayeshPayamComponent, decorators: [{
11749
11766
  type: Component,
11750
- args: [{ selector: 'bsu-barsa-pishnamayesh-payam', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-card cardType=\"object\">\n <fd-card-header>\n <fd-avatar image=\"\" [circle]=\"true\" size=\"s\" ariaLabel=\"avatar image\" title=\"avatar image\"></fd-avatar>\n <div fd-card-title class=\"header-fields\">\n <h5 fd-title>\n <a fd-link [emphasized]=\"true\" aria-label=\"Sender\"> {{ data.FromText }}</a>\n </h5>\n <fd-object-identifier [description]=\"'(' + data.$SendDate + ')'\"> </fd-object-identifier>\n </div>\n <div fd-card-subtitle>\n <h5 fd-title>{{ data.Subject }}</h5>\n <button fd-button fdType=\"transparent\">\u06AF\u06CC\u0631\u0646\u062F\u06AF\u0627\u0646</button>\n </div>\n </fd-card-header>\n <fd-card-content>\n <fd-panel\n [(expanded)]=\"expanded\"\n expandId=\"panel-expand-1\"\n expandAriaLabel=\"Panel Expand\"\n expandAriaLabelledBy=\"panel-expandable-title-1\"\n >\n <h5 fd-panel-title id=\"panel-expandable-title-1\">\u0645\u062D\u062A\u0648\u0627\u06CC \u067E\u06CC\u0627\u0645</h5>\n <div fd-panel-content [innerHtml]=\"data.$ContentHtml\" fillEmptySpace [decrement]=\"'2rem'\"></div>\n </fd-panel>\n <div></div>\n </fd-card-content>\n <!-- <fd-card-footer>\n <button *fdCardFooterActionItem fd-button fdCompact>Assign to Project</button>\n </fd-card-footer> -->\n</fd-card>\n", styles: [":host{display:block;width:100%;height:100%}:host ::ng-deep .fd-card__subtitle{display:flex;align-items:center;column-gap:5px;justify-content:start}:host ::ng-deep .fd-object-identifier__text{margin-top:0}:host ::ng-deep .fd-panel__header{border-bottom:none}.iframe{border-style:none;height:98%;width:98%}.header-fields{display:flex;column-gap:5px;align-items:center;justify-content:center}.fx-column{flex-direction:column}\n"] }]
11751
- }] });
11767
+ args: [{ selector: 'bsu-barsa-pishnamayesh-payam', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
11768
+ {
11769
+ provide: DateService,
11770
+ useFactory: getDateService$1,
11771
+ deps: [LogService]
11772
+ }
11773
+ ], template: "<ng-container\n *ngTemplateOutlet=\"\n showPayamClass;\n context: {\n $implicit: data,\n primary: !data.$details?.length,\n isFirst: true\n }\n \"\n>\n</ng-container>\n<ng-template #showPayamClass let-data let-primary=\"primary\" let-isFirst=\"isFirst\">\n <ng-container\n *ngTemplateOutlet=\"\n namayeshPayam;\n context: {\n $implicit: data.payam.Subject,\n fromText: data.payam.FromText,\n toText: data.$toText,\n importance: data.$importance,\n readDate: data.$readDate,\n sendDate: data.$sendDate,\n ccText: data.$ccText,\n bccText: data.$bccText,\n accessLevel: data.$accessLevel,\n content: data.$content,\n fromPhoto: data.$fromPhoto,\n details: data.$details,\n attachments: data.$attachments,\n todo: data.$todo,\n customText: data.payam.CustomText,\n primary: primary,\n isFirst: isFirst\n }\n \"\n >\n </ng-container>\n</ng-template>\n\n<ng-template\n #namayeshPayam\n let-subject\n let-content=\"content\"\n let-fromText=\"fromText\"\n let-toText=\"toText\"\n let-importance=\"importance\"\n let-readDate=\"readDate\"\n let-sendDate=\"sendDate\"\n let-ccText=\"ccText\"\n let-bccText=\"bccText\"\n let-fromPhoto=\"fromPhoto\"\n let-details=\"details\"\n let-accessLevel=\"accessLevel\"\n let-primary=\"primary\"\n let-isFirst=\"isFirst\"\n let-attachments=\"attachments\"\n let-todo=\"todo\"\n let-customText=\"customText\"\n>\n <fd-card cardType=\"object\">\n <fd-card-header>\n <fd-avatar\n [image]=\"fromPhoto\"\n [circle]=\"true\"\n size=\"s\"\n [ariaLabel]=\"fromText\"\n [label]=\"fromText\"\n [title]=\"fromText\"\n ></fd-avatar>\n <div fd-card-title class=\"header-fields\">\n <h5 fd-title>\n <a fd-link [emphasized]=\"true\" aria-label=\"Sender\"> {{ fromText }}</a>\n </h5>\n <fd-object-identifier [description]=\"'(' + sendDate + ')'\"> </fd-object-identifier>\n </div>\n <div fd-card-subtitle>\n <h5 fd-title>{{ subject }}</h5>\n <fd-popover>\n <fd-popover-control>\n <button fd-button fdType=\"transparent\" [fdMenu]=\"true\">{{ 'Recievers' | bbbTranslate }}</button>\n </fd-popover-control>\n <fd-popover-body>\n <ul fd-list>\n <li fd-list-item *ngFor=\"let rec of toText\">\n <a fd-list-link>{{ rec }}</a>\n </li>\n </ul>\n </fd-popover-body>\n </fd-popover>\n </div>\n </fd-card-header>\n <fd-card-content>\n <fd-panel [expanded]=\"isFirst\">\n <div fd-panel-title id=\"panel-expandable-title-1\">\n <h5 fd-title>{{ '\u0645\u062D\u062A\u0648\u0627\u06CC \u067E\u06CC\u0627\u0645' | bbbTranslate }}</h5>\n <div class=\"payamIcons\">\n <fd-popover *ngIf=\"importance.icon\">\n <fd-popover-control>\n <img [src]=\"'/Customization/Mail/' + importance.icon\" />\n </fd-popover-control>\n <fd-popover-body>\n <ul fd-list>\n <li fd-list-item>{{ importance.text }}</li>\n </ul>\n </fd-popover-body>\n </fd-popover>\n <fd-popover *ngIf=\"accessLevel.icon\">\n <fd-popover-control>\n <img [src]=\"'/Customization/Mail/' + accessLevel.icon\" />\n </fd-popover-control>\n <fd-popover-body>\n <ul fd-list>\n <li fd-list-item>{{ accessLevel.text }}</li>\n </ul>\n </fd-popover-body>\n </fd-popover>\n <fd-info-label\n *ngIf=\"todo\"\n [label]=\"todo.text\"\n [color]=\"todo.color\"\n [title]=\"todo.text\"\n ></fd-info-label>\n </div>\n </div>\n <div fd-panel-content>\n <div *ngIf=\"customText\">\n <fd-message-strip type=\"information\" [noIcon]=\"true\" [dismissible]=\"false\">\n {{ customText }}\n </fd-message-strip>\n </div>\n <div [innerHtml]=\"content\" [disable]=\"!primary || attachments?.length\"></div>\n\n <div *ngIf=\"attachments?.length\" class=\"attachments\">\n <ng-container *ngFor=\"let file of attachments\">\n <bsu-file-viewer-popover\n *ngIf=\"!file.IsDeleted\"\n [file]=\"file\"\n [files]=\"attachments\"\n [deviceSize]=\"(deviceSize$ | async)!!\"\n [canDownload]=\"true\"\n [disableRemove]=\"true\"\n ></bsu-file-viewer-popover>\n </ng-container>\n <ng-container *ngIf=\"attachments.length > 1\">\n <button\n fd-button\n [title]=\"'Download' | bbbTranslate\"\n [glyph]=\"'download'\"\n downloadFiles\n [files]=\"attachments\"\n ></button>\n </ng-container>\n </div>\n <div class=\"readAt\">\n <fd-object-identifier\n *ngIf=\"readDate\"\n [description]=\"('ReadAt' | bbbTranslate) + ': (' + readDate + ')'\"\n >\n </fd-object-identifier>\n </div>\n </div>\n </fd-panel>\n </fd-card-content>\n <!-- <fd-card-footer>\n <button *fdCardFooterActionItem fd-button fdCompact>Assign to Project</button>\n </fd-card-footer> -->\n </fd-card>\n <ng-contianer *ngFor=\"let detail of details\">\n <ng-container\n *ngTemplateOutlet=\"\n showPayamClass;\n context: {\n $implicit: detail\n }\n \"\n >\n </ng-container>\n </ng-contianer>\n</ng-template>\n", styles: [":host{display:block;position:relative;width:100%;height:100%}:host ::ng-deep .fd-panel__content{border-bottom:none;padding-bottom:5px}:host ::ng-deep .fd-card__subtitle{display:flex;align-items:center;column-gap:5px;justify-content:start}:host ::ng-deep .fd-object-identifier__text{margin-top:0}:host ::ng-deep .fd-panel__header{border-bottom:none}fd-card-header{cursor:default;border-bottom:none!important}fd-card-header:before{position:relative!important;display:none!important}fd-card-header:hover{background:var(--fdCard_Background_Color)!important}.attachments{display:flex;flex-wrap:wrap;column-gap:5px;row-gap:5px}.readAt{padding-top:2rem}.readAt ::ng-deep p{color:var(--sapButton_BorderColor)!important}.payamIcons{display:flex;column-gap:5px}.payamIcons img{width:16px}@media (max-width: 410px){h5{max-width:210px}}@media (max-width: 1040px){.h5{max-width:600px}}\n"] }]
11774
+ }] });
11775
+ class PayamClassType {
11776
+ constructor(payam, _domSanitizer, _dateService) {
11777
+ var _a, _b, _c, _d, _e;
11778
+ this.payam = payam;
11779
+ this._domSanitizer = _domSanitizer;
11780
+ this._dateService = _dateService;
11781
+ this.$content = this._domSanitizer.bypassSecurityTrustHtml(payam.ContentHtml);
11782
+ this.$sendDate = this._getDateString(payam.SendDate);
11783
+ this.$readDate = !payam.ReadDate ? '' : this._getDateString(payam.ReadDate);
11784
+ this.$toText = payam.ToText.split(';');
11785
+ this.$ccText = (_a = payam.CcText) === null || _a === void 0 ? void 0 : _a.split(';');
11786
+ this.$bccText = (_b = payam.BccText) === null || _b === void 0 ? void 0 : _b.split(';');
11787
+ this.$fromPhoto = BarsaApi.Common.Util.GetIconUrl(payam.FromPhoto, null, null, 64);
11788
+ this.$details = (_c = payam.Details) === null || _c === void 0 ? void 0 : _c.map((c) => new PayamClassType(c, _domSanitizer, _dateService));
11789
+ this.$attachments = (_d = payam.Attachments) === null || _d === void 0 ? void 0 : _d.map((c) => ({
11790
+ Id: c.Id,
11791
+ IsNew: false,
11792
+ IsDeleted: false,
11793
+ Type: c.Extension,
11794
+ FileName: `${c.Name}.${c.Extension}`
11795
+ }));
11796
+ this.$importance = {
11797
+ icon: this._iconImportance(payam.Importance),
11798
+ text: this._textImportance(payam.Importance)
11799
+ };
11800
+ this.$accessLevel = {
11801
+ icon: this._iconAccessLevel(payam.AccessLevel),
11802
+ text: this._textAccessLevel(payam.AccessLevel)
11803
+ };
11804
+ if ((_e = payam.Todo) === null || _e === void 0 ? void 0 : _e.DueDate) {
11805
+ this.$todo = this._textTodo(payam.Todo);
11806
+ }
11807
+ }
11808
+ _textTodo(todo) {
11809
+ if (!todo || !todo.DueDate) {
11810
+ return { text: '', color: '10' };
11811
+ }
11812
+ let dueDateStr = '';
11813
+ let doneDateStr = '';
11814
+ if (BarsaApi.Ext.isString(todo.DueDate)) {
11815
+ dueDateStr = this._getDateString(todo.DueDate);
11816
+ }
11817
+ if (todo.DoneDate) {
11818
+ doneDateStr = this._getDateString(todo.DoneDate);
11819
+ }
11820
+ // eslint-disable-next-line no-eval
11821
+ const dueDate = eval(todo.DueDate);
11822
+ if (todo.State === 2) {
11823
+ return { text: BarsaApi.BBB.Mail_TodoCompleted + ': ' + doneDateStr, color: '8' };
11824
+ }
11825
+ else if (new Date().getTime() < dueDate.getTime()) {
11826
+ return { text: BarsaApi.BBB.Mail_TodoDueDate + ': ' + dueDateStr, color: '1' };
11827
+ }
11828
+ else {
11829
+ return {
11830
+ text: BarsaApi.BBB.Mail_TodoOverdue + ': ' + (doneDateStr ? doneDateStr : dueDateStr),
11831
+ color: '2'
11832
+ };
11833
+ }
11834
+ }
11835
+ _textImportance(i) {
11836
+ if (i) {
11837
+ return BarsaApi.BBB['Mail_Importance' + i];
11838
+ }
11839
+ return null;
11840
+ }
11841
+ _textAccessLevel(i) {
11842
+ if (i) {
11843
+ return BarsaApi.BBB['Mail_Sensitivity' + i];
11844
+ }
11845
+ return null;
11846
+ }
11847
+ _iconImportance(i) {
11848
+ if (i) {
11849
+ return 'priority_' + i.toString() + '.png';
11850
+ }
11851
+ return null;
11852
+ }
11853
+ _iconAccessLevel(i) {
11854
+ if (i) {
11855
+ return 'lock_' + i.toString() + '.png';
11856
+ }
11857
+ return null;
11858
+ }
11859
+ _getSize(size) {
11860
+ size = size.replace('KB', 'کیلوبایت');
11861
+ size = size.replace('MB', 'مگابایت');
11862
+ size = size.replace('B', 'بایت');
11863
+ return size;
11864
+ }
11865
+ _getAttachmentIcon(extension) {
11866
+ if (BarsaApi.Ext.isEmpty(extension) === false) {
11867
+ return '/assets/Images/FileTypeIcons/' + '_' + extension + '.PNG';
11868
+ }
11869
+ return null;
11870
+ }
11871
+ _getDateString(date) {
11872
+ // eslint-disable-next-line no-eval
11873
+ const dateInfo = this._dateService.getDateInfo(eval(date));
11874
+ return `${dateInfo.dayName} ${dateInfo.monthName} ${dateInfo.year} ${dateInfo.hour}:${dateInfo.minutes}`;
11875
+ }
11876
+ }
11752
11877
 
11753
11878
  const components = [
11754
11879
  UiTextFieldComponent,