barsa-sap-ui 1.0.321 → 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.
- package/esm2020/lib/barsa-pishnamayesh-payam/barsa-pishnamayesh-payam.component.mjs +129 -11
- package/esm2020/lib/blob-viewer/blob-viewer.component.mjs +11 -3
- package/esm2020/lib/file-viewer-popover/file-viewer-popover.component.mjs +9 -4
- package/esm2020/lib/form-dialog/form-dialog.component.mjs +9 -4
- package/fesm2015/barsa-sap-ui.mjs +144 -14
- package/fesm2015/barsa-sap-ui.mjs.map +1 -1
- package/fesm2020/barsa-sap-ui.mjs +143 -14
- package/fesm2020/barsa-sap-ui.mjs.map +1 -1
- package/lib/barsa-pishnamayesh-payam/barsa-pishnamayesh-payam.component.d.ts +56 -6
- package/lib/blob-viewer/blob-viewer.component.d.ts +3 -2
- package/lib/file-viewer-popover/file-viewer-popover.component.d.ts +3 -1
- package/lib/form-dialog/form-dialog.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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 {
|
|
@@ -9439,6 +9440,9 @@ class FormDialogComponent extends BaseComponent {
|
|
|
9439
9440
|
this._setCaption(formPanelCtrlr);
|
|
9440
9441
|
this.formPanelCtrlr = formPanelCtrlr;
|
|
9441
9442
|
}
|
|
9443
|
+
get Adapter() {
|
|
9444
|
+
return this.formPanelCtrlr.Adapter;
|
|
9445
|
+
}
|
|
9442
9446
|
ngOnInit() {
|
|
9443
9447
|
super.ngOnInit();
|
|
9444
9448
|
const formPanelCtrlr = this.formPanelCtrlr;
|
|
@@ -9486,14 +9490,16 @@ class FormDialogComponent extends BaseComponent {
|
|
|
9486
9490
|
this.dialogRef = this._dialogService.open(this.dialogTemplateRef, setting);
|
|
9487
9491
|
}
|
|
9488
9492
|
onCancel() {
|
|
9493
|
+
const adapter = this.Adapter;
|
|
9494
|
+
adapter.fireEvent('ToolClick', adapter, { Key: 'Cancel' });
|
|
9489
9495
|
this._close();
|
|
9490
9496
|
}
|
|
9491
9497
|
onSave() {
|
|
9492
|
-
const adapter = this.
|
|
9498
|
+
const adapter = this.Adapter;
|
|
9493
9499
|
adapter.fireEvent('ToolClick', adapter, { Key: 'SaveAndClose' });
|
|
9494
9500
|
}
|
|
9495
9501
|
onOk() {
|
|
9496
|
-
const adapter = this.
|
|
9502
|
+
const adapter = this.Adapter;
|
|
9497
9503
|
adapter.fireEvent('ToolClick', adapter, { Key: 'Ok' });
|
|
9498
9504
|
}
|
|
9499
9505
|
onFormClose() {
|
|
@@ -9509,7 +9515,7 @@ class FormDialogComponent extends BaseComponent {
|
|
|
9509
9515
|
// @Input() RefreshFormPanelControl = (formpanelCtrlr) => {};
|
|
9510
9516
|
_close() {
|
|
9511
9517
|
// this.dialogRef.nativeElement.close();
|
|
9512
|
-
this.
|
|
9518
|
+
this.Adapter.Control.fireEvent('RequestForClose', this.Adapter.Control);
|
|
9513
9519
|
// this.dialogRef.close();
|
|
9514
9520
|
// this.dialogParams.close();
|
|
9515
9521
|
// this.dialogOpened = false;
|
|
@@ -11245,6 +11251,14 @@ class BlobViewerComponent extends BaseComponent {
|
|
|
11245
11251
|
this.fallbackUrl = this.getFallbackUrl(this.file.Id);
|
|
11246
11252
|
this._downloadFileId(this.file.Id, true, 'pdf', false, false);
|
|
11247
11253
|
}
|
|
11254
|
+
ngOnChanges(changes) {
|
|
11255
|
+
super.ngOnChanges(changes);
|
|
11256
|
+
const { file } = changes;
|
|
11257
|
+
if (file && !file.firstChange) {
|
|
11258
|
+
this.fallbackUrl = this.getFallbackUrl(this.file.Id);
|
|
11259
|
+
this._downloadFileId(this.file.Id, true, 'pdf', false, false);
|
|
11260
|
+
}
|
|
11261
|
+
}
|
|
11248
11262
|
_downloadFileId(fileId, viewInBrowser, convertTo, forOcx, isOfficeOnline) {
|
|
11249
11263
|
this._setLoading(true);
|
|
11250
11264
|
BarsaApi.Common.File.DownloadFileContent.bind(this)({
|
|
@@ -11265,7 +11279,7 @@ class BlobViewerComponent extends BaseComponent {
|
|
|
11265
11279
|
});
|
|
11266
11280
|
}
|
|
11267
11281
|
getFallbackUrl(fileId) {
|
|
11268
|
-
return `امکان نمایش فایل در این مرورگر وجود ندارد.
|
|
11282
|
+
return `امکان نمایش فایل در این مرورگر وجود ندارد.
|
|
11269
11283
|
برای باز کردن فایل از لینک زیر استفاده کنید: </br> <a href='${BarsaApi.Common.File.CreateAttachmentUrl(fileId, false, true)}'>دانلود فایل بصورت pdf</a> </br> <a href='${BarsaApi.Common.File.CreateAttachmentUrl(fileId, false, false)}'>دانلود فایل بصورت بصورت اصلی</a>`;
|
|
11270
11284
|
}
|
|
11271
11285
|
_setLoading(loading) {
|
|
@@ -11279,7 +11293,7 @@ class BlobViewerComponent extends BaseComponent {
|
|
|
11279
11293
|
}
|
|
11280
11294
|
}
|
|
11281
11295
|
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 });
|
|
11282
|
-
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 });
|
|
11296
|
+
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 });
|
|
11283
11297
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BlobViewerComponent, decorators: [{
|
|
11284
11298
|
type: Component,
|
|
11285
11299
|
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"] }]
|
|
@@ -11438,16 +11452,20 @@ class FileViewerPopoverComponent extends BaseComponent {
|
|
|
11438
11452
|
}
|
|
11439
11453
|
}
|
|
11440
11454
|
FileViewerPopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FileViewerPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11441
|
-
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\">\
|
|
11455
|
+
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 });
|
|
11442
11456
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FileViewerPopoverComponent, decorators: [{
|
|
11443
11457
|
type: Component,
|
|
11444
|
-
args: [{ selector: 'bsu-file-viewer-popover', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div style=\"display: flex; align-items: center; column-gap: 1px\">\
|
|
11445
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
11458
|
+
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"] }]
|
|
11459
|
+
}], ctorParameters: function () { return []; }, propDecorators: { files: [{
|
|
11460
|
+
type: Input
|
|
11461
|
+
}], file: [{
|
|
11446
11462
|
type: Input
|
|
11447
11463
|
}], deviceSize: [{
|
|
11448
11464
|
type: Input
|
|
11449
11465
|
}], canDownload: [{
|
|
11450
11466
|
type: Input
|
|
11467
|
+
}], disableRemove: [{
|
|
11468
|
+
type: Input
|
|
11451
11469
|
}], remove: [{
|
|
11452
11470
|
type: Output
|
|
11453
11471
|
}] } });
|
|
@@ -11713,17 +11731,128 @@ class BarsaPishnamayeshPayamComponent extends FieldBaseComponent {
|
|
|
11713
11731
|
super.ngOnInit();
|
|
11714
11732
|
const mo = this.context.formControl.Mo;
|
|
11715
11733
|
const { $FieldDict } = mo;
|
|
11716
|
-
this.data = mo[$FieldDict['محتوای پیام']];
|
|
11717
|
-
this.data.$ContentHtml = this._domSanitizer.bypassSecurityTrustHtml(this.data.ContentHtml);
|
|
11718
|
-
this.data.$SendDate = 'امروز 11:45';
|
|
11734
|
+
this.data = new PayamClassType(mo[$FieldDict['محتوای پیام']], this._domSanitizer, this._dateService);
|
|
11719
11735
|
}
|
|
11720
11736
|
}
|
|
11721
11737
|
BarsaPishnamayeshPayamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaPishnamayeshPayamComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11722
|
-
BarsaPishnamayeshPayamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BarsaPishnamayeshPayamComponent, selector: "bsu-barsa-pishnamayesh-payam",
|
|
11738
|
+
BarsaPishnamayeshPayamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BarsaPishnamayeshPayamComponent, selector: "bsu-barsa-pishnamayesh-payam", providers: [
|
|
11739
|
+
{
|
|
11740
|
+
provide: DateService,
|
|
11741
|
+
useFactory: getDateService$1,
|
|
11742
|
+
deps: [LogService]
|
|
11743
|
+
}
|
|
11744
|
+
], 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 });
|
|
11723
11745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaPishnamayeshPayamComponent, decorators: [{
|
|
11724
11746
|
type: Component,
|
|
11725
|
-
args: [{ selector: 'bsu-barsa-pishnamayesh-payam', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11726
|
-
|
|
11747
|
+
args: [{ selector: 'bsu-barsa-pishnamayesh-payam', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
11748
|
+
{
|
|
11749
|
+
provide: DateService,
|
|
11750
|
+
useFactory: getDateService$1,
|
|
11751
|
+
deps: [LogService]
|
|
11752
|
+
}
|
|
11753
|
+
], 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"] }]
|
|
11754
|
+
}] });
|
|
11755
|
+
class PayamClassType {
|
|
11756
|
+
constructor(payam, _domSanitizer, _dateService) {
|
|
11757
|
+
this.payam = payam;
|
|
11758
|
+
this._domSanitizer = _domSanitizer;
|
|
11759
|
+
this._dateService = _dateService;
|
|
11760
|
+
this.$content = this._domSanitizer.bypassSecurityTrustHtml(payam.ContentHtml);
|
|
11761
|
+
this.$sendDate = this._getDateString(payam.SendDate);
|
|
11762
|
+
this.$readDate = !payam.ReadDate ? '' : this._getDateString(payam.ReadDate);
|
|
11763
|
+
this.$toText = payam.ToText.split(';');
|
|
11764
|
+
this.$ccText = payam.CcText?.split(';');
|
|
11765
|
+
this.$bccText = payam.BccText?.split(';');
|
|
11766
|
+
this.$fromPhoto = BarsaApi.Common.Util.GetIconUrl(payam.FromPhoto, null, null, 64);
|
|
11767
|
+
this.$details = payam.Details?.map((c) => new PayamClassType(c, _domSanitizer, _dateService));
|
|
11768
|
+
this.$attachments = payam.Attachments?.map((c) => ({
|
|
11769
|
+
Id: c.Id,
|
|
11770
|
+
IsNew: false,
|
|
11771
|
+
IsDeleted: false,
|
|
11772
|
+
Type: c.Extension,
|
|
11773
|
+
FileName: `${c.Name}.${c.Extension}`
|
|
11774
|
+
}));
|
|
11775
|
+
this.$importance = {
|
|
11776
|
+
icon: this._iconImportance(payam.Importance),
|
|
11777
|
+
text: this._textImportance(payam.Importance)
|
|
11778
|
+
};
|
|
11779
|
+
this.$accessLevel = {
|
|
11780
|
+
icon: this._iconAccessLevel(payam.AccessLevel),
|
|
11781
|
+
text: this._textAccessLevel(payam.AccessLevel)
|
|
11782
|
+
};
|
|
11783
|
+
if (payam.Todo?.DueDate) {
|
|
11784
|
+
this.$todo = this._textTodo(payam.Todo);
|
|
11785
|
+
}
|
|
11786
|
+
}
|
|
11787
|
+
_textTodo(todo) {
|
|
11788
|
+
if (!todo || !todo.DueDate) {
|
|
11789
|
+
return { text: '', color: '10' };
|
|
11790
|
+
}
|
|
11791
|
+
let dueDateStr = '';
|
|
11792
|
+
let doneDateStr = '';
|
|
11793
|
+
if (BarsaApi.Ext.isString(todo.DueDate)) {
|
|
11794
|
+
dueDateStr = this._getDateString(todo.DueDate);
|
|
11795
|
+
}
|
|
11796
|
+
if (todo.DoneDate) {
|
|
11797
|
+
doneDateStr = this._getDateString(todo.DoneDate);
|
|
11798
|
+
}
|
|
11799
|
+
// eslint-disable-next-line no-eval
|
|
11800
|
+
const dueDate = eval(todo.DueDate);
|
|
11801
|
+
if (todo.State === 2) {
|
|
11802
|
+
return { text: BarsaApi.BBB.Mail_TodoCompleted + ': ' + doneDateStr, color: '8' };
|
|
11803
|
+
}
|
|
11804
|
+
else if (new Date().getTime() < dueDate.getTime()) {
|
|
11805
|
+
return { text: BarsaApi.BBB.Mail_TodoDueDate + ': ' + dueDateStr, color: '1' };
|
|
11806
|
+
}
|
|
11807
|
+
else {
|
|
11808
|
+
return {
|
|
11809
|
+
text: BarsaApi.BBB.Mail_TodoOverdue + ': ' + (doneDateStr ? doneDateStr : dueDateStr),
|
|
11810
|
+
color: '2'
|
|
11811
|
+
};
|
|
11812
|
+
}
|
|
11813
|
+
}
|
|
11814
|
+
_textImportance(i) {
|
|
11815
|
+
if (i) {
|
|
11816
|
+
return BarsaApi.BBB['Mail_Importance' + i];
|
|
11817
|
+
}
|
|
11818
|
+
return null;
|
|
11819
|
+
}
|
|
11820
|
+
_textAccessLevel(i) {
|
|
11821
|
+
if (i) {
|
|
11822
|
+
return BarsaApi.BBB['Mail_Sensitivity' + i];
|
|
11823
|
+
}
|
|
11824
|
+
return null;
|
|
11825
|
+
}
|
|
11826
|
+
_iconImportance(i) {
|
|
11827
|
+
if (i) {
|
|
11828
|
+
return 'priority_' + i.toString() + '.png';
|
|
11829
|
+
}
|
|
11830
|
+
return null;
|
|
11831
|
+
}
|
|
11832
|
+
_iconAccessLevel(i) {
|
|
11833
|
+
if (i) {
|
|
11834
|
+
return 'lock_' + i.toString() + '.png';
|
|
11835
|
+
}
|
|
11836
|
+
return null;
|
|
11837
|
+
}
|
|
11838
|
+
_getSize(size) {
|
|
11839
|
+
size = size.replace('KB', 'کیلوبایت');
|
|
11840
|
+
size = size.replace('MB', 'مگابایت');
|
|
11841
|
+
size = size.replace('B', 'بایت');
|
|
11842
|
+
return size;
|
|
11843
|
+
}
|
|
11844
|
+
_getAttachmentIcon(extension) {
|
|
11845
|
+
if (BarsaApi.Ext.isEmpty(extension) === false) {
|
|
11846
|
+
return '/assets/Images/FileTypeIcons/' + '_' + extension + '.PNG';
|
|
11847
|
+
}
|
|
11848
|
+
return null;
|
|
11849
|
+
}
|
|
11850
|
+
_getDateString(date) {
|
|
11851
|
+
// eslint-disable-next-line no-eval
|
|
11852
|
+
const dateInfo = this._dateService.getDateInfo(eval(date));
|
|
11853
|
+
return `${dateInfo.dayName} ${dateInfo.monthName} ${dateInfo.year} ${dateInfo.hour}:${dateInfo.minutes}`;
|
|
11854
|
+
}
|
|
11855
|
+
}
|
|
11727
11856
|
|
|
11728
11857
|
const components = [
|
|
11729
11858
|
UiTextFieldComponent,
|