@bizdoc/core 3.5.5 → 3.5.6

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.
@@ -9017,9 +9017,9 @@ class ExpandedItemComponent {
9017
9017
  }
9018
9018
  }
9019
9019
  async _target(id) {
9020
- const origin = this.model.recipients.filter(r => r.originId === id);
9021
- if (origin.length) {
9022
- const users = await firstValueFrom(this._accounts.getAll(origin.map(r => r.userId)));
9020
+ const origins = this.model.recipients.filter(r => r.originId === id);
9021
+ if (origins.length) {
9022
+ const users = await firstValueFrom(this._accounts.getAll(origins.map(r => r.userId)));
9023
9023
  return this._translate.join(users.map(u => this._formatUserElement(u)));
9024
9024
  }
9025
9025
  return undefined;
@@ -9111,12 +9111,13 @@ class ExpandedItemComponent {
9111
9111
  this.mode = 'working';
9112
9112
  this._mailbox.send(id, version, formId, null, action, args).subscribe({
9113
9113
  next: async (r) => {
9114
- const caction = this._session.profile.actions.find(a => a.name === action), adjective = caction.adjective || caction.title;
9115
9114
  const target = await this._target(id);
9115
+ const adjective = this._getActionAdjective(action);
9116
9116
  if (target)
9117
- this._sb.toast('SentTo', number, adjective.toLowerCase(), target);
9117
+ this._sb.toast('SentTo', number, adjective, target);
9118
9118
  else
9119
- this._sb.toast('Sent', number, adjective.toLowerCase());
9119
+ this._sb.toast('Sent', number, adjective);
9120
+ deepAssign(this.model, r);
9120
9121
  this.sent.emit(this.model);
9121
9122
  this.mode = 'done';
9122
9123
  }, error: e => {
@@ -9127,6 +9128,10 @@ class ExpandedItemComponent {
9127
9128
  }
9128
9129
  });
9129
9130
  }
9131
+ _getActionAdjective(action) {
9132
+ const caction = this._session.profile.actions.find(a => a.name === action), adjective = caction.adjective || caction.title;
9133
+ return adjective.toLowerCase();
9134
+ }
9130
9135
  /**
9131
9136
  *
9132
9137
  * @param response
@@ -9562,26 +9567,32 @@ class BrowseItemsComponent {
9562
9567
  this.customColumns.push(c);
9563
9568
  });
9564
9569
  }
9570
+ onActionTaken(item) {
9571
+ if (item.folderId !== this.folderId)
9572
+ this.dataSource.data.remove(item);
9573
+ }
9574
+ /**
9575
+ *
9576
+ * @param action
9577
+ * @param args
9578
+ */
9565
9579
  sendAll(action, args) {
9566
9580
  const params = queryParams(args);
9567
9581
  this._forEach(i => this._mailbox.send(i.id, i.version, i.formId, null, action, params, i.read, i.folderId, i.received).
9568
- pipe(tap(() => {
9569
- if (i.folderId !== this.folderId)
9570
- this.dataSource.data.remove(i);
9571
- })), 'SendErr').
9582
+ pipe(tap(this.onActionTaken.bind(this))), 'SendErr').
9572
9583
  subscribe(e => {
9573
9584
  if (e.length > 1)
9574
- this._sb.toast('SentMany', e.length.toString(), this._actionAdjective(action, true));
9585
+ this._sb.toast('SentMany', e.length.toString(), this._getActionAdjective(action, true));
9575
9586
  else {
9576
9587
  const origin = e[0].recipients.filter(r => r.originId === e[0].id);
9577
9588
  if (origin.length)
9578
- this._accounts.getAll(origin.map(r => r.userId)).subscribe(u => this._sb.toast('SentTo', e[0].number, this._actionAdjective(action), this._translate.join(u.map(u => u.name))));
9589
+ this._accounts.getAll(origin.map(r => r.userId)).subscribe(u => this._sb.toast('SentTo', e[0].number, this._getActionAdjective(action), this._translate.join(u.map(u => u.name))));
9579
9590
  else
9580
- this._sb.toast('Sent', e[0].number, this._actionAdjective(action));
9591
+ this._sb.toast('Sent', e[0].number, this._getActionAdjective(action));
9581
9592
  }
9582
9593
  });
9583
9594
  }
9584
- _actionAdjective(name, plural) {
9595
+ _getActionAdjective(name, plural) {
9585
9596
  const action = this._session.profile.actions.find(a => a.name === name);
9586
9597
  return ((plural ? (action.adjectivePlural || action.adjective) : action.adjective) || action.title).toLowerCase();
9587
9598
  }
@@ -9590,7 +9601,7 @@ class BrowseItemsComponent {
9590
9601
  this._destroy.complete();
9591
9602
  }
9592
9603
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BrowseItemsComponent, deps: [{ token: MailboxService }, { token: AccountService }, { token: CubeService }, { token: SessionService }, { token: PromptService }, { token: TranslateService }, { token: i0.ChangeDetectorRef }, { token: RouterImpl }, { token: HubService }, { token: BIZDOC_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
9593
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.5", type: BrowseItemsComponent, isStandalone: false, selector: "bizdoc-browse-items", inputs: { folderId: "folderId", filterType: "filterType", filters: "filters" }, outputs: { onopen: "open", onInsights: "insights" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<mat-progress-bar mode=\"query\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n@if (dataSource?.data.length === 0) {\r\n <bizdoc-none title=\"NoMessages\" [subtitle]=\"!isMobile && folderId === DRAFT ? 'AltN' : null\" icon=\"mail_outline\"></bizdoc-none>\r\n}\r\n<mat-table cdkDropList class=\"data-table\"\r\n [cdkDropListDisabled]=\"isMobile\"\r\n [cdkDropListData]=\"dataSource?.data\"\r\n cdkDropListConnectedTo=\"folders\"\r\n cdkDropListSortingDisabled\r\n [dataSource]=\"dataSource\" matSort multiTemplateDataRows (matSortChange)=\"sortData()\"\r\n id=\"browse-table\" [@list]=\"dataSource\" [style.display]=\"dataSource?.data.length ?'':'none'\">\r\n <ng-container matColumnDef=\"select\">\r\n <mat-header-cell *matHeaderCellDef>\r\n <div class=\"\"></div>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [aria-label]=\"'Check'|translate\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" [aria-label]=\"'Check'|translate\"\r\n (change)=\"$event ? selection.toggle(item) : null\"\r\n [checked]=\"selection.isSelected(item)\">\r\n </mat-checkbox>\r\n <!-- drag -->\r\n <!--<button mat-icon-button cdkDragHandle\r\n (mousedown)=\"dragDisabled = false\"\r\n (mouseup)=\"dragDisabled = true\"\r\n (touchstart)=\"dragDisabled = false\"\r\n (touchend)=\"dragDisabled = true\"\r\n class=\"drag hide-xs\" aria-disabled=\"true\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>-->\r\n <button mat-icon-button (click)=\"toggleExpanded(item, $event)\" [bizdocTooltip]=\"'Details' | translate\" [attr.aria-label]=\"'Details' | translate\" class=\"tool\"><mat-icon>{{item == expandedElement ? 'unfold_less' : 'unfold_more'}}</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Number column -->\r\n<ng-container matColumnDef=\"number\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Number' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.number}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- Subject column -->\r\n<ng-container matColumnDef=\"subject\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Subject' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.subject}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"owner\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Owner' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.ownerId) {\r\n <bizdoc-identity-name [identity]=\"item.ownerId\" [by]=\"item.ownerById\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n<ng-container matColumnDef=\"sender\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Sender' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.senderId) {\r\n <bizdoc-identity-name [identity]=\"item.senderId\" [by]=\"item.byId\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"received\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.received | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"receivedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"received\">{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.received | amCalendar\">{{item.received | amTimeAgo}}</mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"replied\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.replied | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issued\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.issued | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issuedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"issued\">{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.issued | amCalendar\"> {{item.issued | amTimeAgo}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"state\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"stateId\">{{'Status' | translate }}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <bizdoc-status [stateId]=\"item.stateId\"></bizdoc-status>\r\n </mat-cell>\r\n</ng-container>\r\n\r\n@if (customColumns) {\r\n @for (c of customColumns; track c) {\r\n <ng-container [matColumnDef]=\"c.name\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header> {{c.title}} </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @switch (c.type) {\r\n @case ('Date') {\r\n <span>\r\n {{item.model[c.name] | amCalendar }}\r\n </span>\r\n }\r\n @case ('Decimal') {\r\n <span>\r\n {{item.model[c.name] | number }}\r\n </span>\r\n }\r\n @case ('Boolean') {\r\n <span>\r\n <bizdoc-checkbox [checked]=\"item.model[c.name]\"></bizdoc-checkbox>\r\n </span>\r\n }\r\n @default {\r\n <span>\r\n {{item.model[c.name]}}z\r\n </span>\r\n }\r\n }\r\n </mat-cell>\r\n </ng-container>\r\n }\r\n}\r\n\r\n<!-- Value column -->\r\n<ng-container matColumnDef=\"value\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Amount' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.value | currency : item.currencyCode : 'symbol' : currencyFormat}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- options column -->\r\n<ng-container matColumnDef=\"options\">\r\n <mat-header-cell *matHeaderCellDef></mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <button mat-icon-button (click)=\"flag(item, $event)\" [bizdocTooltip]=\"'Flagged'| translate\" [attr.aria-label]=\"'ToggleFlagged' | translate\" class=\"tool\"><mat-icon [class.filled]=\"item.flag\">star</mat-icon></button>\r\n @if (enableViews) {\r\n <button mat-icon-button (click)=\"insights(item, $event)\" [bizdocTooltip]=\"'Insights' | translate\" [attr.aria-label]=\"'Insight' | translate\" class=\"tool\"><mat-icon>data_usage</mat-icon></button>\r\n }\r\n <button mat-icon-button (click)=\"$event.stopPropagation()\" [matMenuTriggerFor]=\"menu\" [matMenuTriggerData]=\"{item: item}\" [bizdocTooltip]=\"'Options' | translate\" [attr.aria-label]=\"'Options' | translate\" class=\"tool hide-xs\"><mat-icon>more_vert</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Expanded Content Column -->\r\n<ng-container matColumnDef=\"expandedDetail\">\r\n <mat-cell *matCellDef=\"let item\" [attr.colspan]=\"displayedColumns.length\" [@updated]=\"item == updatedElement\"\r\n [class.read-row]=\"item.read\">\r\n <div [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\" style=\"width: 100%\">\r\n @if (item == expandedElement) {\r\n <bizdoc-expanded-item [model]=\"item\"></bizdoc-expanded-item>\r\n }\r\n </div>\r\n </mat-cell>\r\n</ng-container>\r\n<mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></mat-header-row>\r\n<mat-row @item [@updated]=\"item == updatedElement\"\r\n *matRowDef=\"let item; let dataIndex = dataIndex; columns: displayedColumns;\" class=\"element-row\"\r\n cdkDrag [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"dragDisabled\"\r\n (cdkDragReleased)=\"dragDisabled = true\"\r\n [ngClass]=\"{'selected-row': selectedElement === item,\r\n 'expanded-row': expandedElement === item,\r\n 'odd-row': dataIndex % 2,\r\n 'read-row': item.read}\" matRipple\r\n (click)=\"open(item, $event)\">\r\n <div *cdkDragPreview>\r\n <button mat-icon-button aria-disabled=\"true\"><mat-icon>drag_indicator</mat-icon></button> <span>#{{item.number}}</span>\r\n </div>\r\n <div *cdkDragPlaceholder>\r\n <!-- none -->\r\n </div>\r\n</mat-row>\r\n<mat-row *matRowDef=\"let item; ; let dataIndex = dataIndex; columns: ['expandedDetail']\"\r\n class=\"detail-row\" matRipple\r\n [ngClass]=\"{ 'selected-row': selectedElement === item,\r\n 'odd-row': dataIndex % 2\r\n }\"></mat-row>\r\n</mat-table>\r\n<mat-paginator #paginator [hidePageSize]=\"true\" [pageSize]=\"PAGE_SIZE\" [style.display]=\"!isMobile && dataSource?.data.length>PAGE_SIZE ? '':'none'\"></mat-paginator>\r\n<mat-menu #menu=\"matMenu\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <button mat-menu-item (click)=\"open(item, $event)\">{{'Open'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"toggleRead(item)\">{{(item.read ?'MarkAsUnread':'MarkAsRead')|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"copy(item)\">{{'Copy'| translate}}</button>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["#browse-table{width:100%}#browse-table .detail-row{min-height:0}#browse-table .element-row{cursor:pointer}#browse-table .element-row .drag{cursor:move}#browse-table .read-row{font-weight:100}@media screen and (min-width: 600px){.mat-mdc-row .tool{opacity:.05}.mat-mdc-row:hover .tool{opacity:1}}::ng-deep .mat-column-options{justify-content:end;padding-inline-end:8px}::ng-deep .mat-column-value{justify-content:right}::ng-deep .mat-column-select{white-space:nowrap}::ng-deep .mat-column-number{white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$8.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$8.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$8.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: i2$8.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i12.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i5$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i6$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7$4.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i7$5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i2$5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: CheckboxComponent, selector: "bizdoc-checkbox", inputs: ["checked", "color", "icon"] }, { kind: "directive", type: StateDirective, selector: "bizdoc-status", inputs: ["stateId"] }, { kind: "component", type: IdentityName, selector: "bizdoc-identity-name", inputs: ["identity", "by", "chating"] }, { kind: "component", type: NoneComponent, selector: "bizdoc-none", inputs: ["title", "subtitle", "icon"] }, { kind: "component", type: ExpandedItemComponent, selector: "bizdoc-expanded-item", inputs: ["model"], outputs: ["sent"] }, { kind: "directive", type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }, { kind: "pipe", type: i9.CurrencyPipe, name: "currency" }, { kind: "pipe", type: CalendarPipe, name: "amCalendar" }, { kind: "pipe", type: TimeAgoPipe, name: "amTimeAgo" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
9604
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.5", type: BrowseItemsComponent, isStandalone: false, selector: "bizdoc-browse-items", inputs: { folderId: "folderId", filterType: "filterType", filters: "filters" }, outputs: { onopen: "open", onInsights: "insights" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<mat-progress-bar mode=\"query\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n@if (dataSource?.data.length === 0) {\r\n <bizdoc-none title=\"NoMessages\" [subtitle]=\"!isMobile && folderId === DRAFT ? 'AltN' : null\" icon=\"mail_outline\"></bizdoc-none>\r\n}\r\n<mat-table cdkDropList class=\"data-table\"\r\n [cdkDropListDisabled]=\"isMobile\"\r\n [cdkDropListData]=\"dataSource?.data\"\r\n cdkDropListConnectedTo=\"folders\"\r\n cdkDropListSortingDisabled\r\n [dataSource]=\"dataSource\" matSort multiTemplateDataRows (matSortChange)=\"sortData()\"\r\n id=\"browse-table\" [@list]=\"dataSource\" [style.display]=\"dataSource?.data.length ?'':'none'\">\r\n <ng-container matColumnDef=\"select\">\r\n <mat-header-cell *matHeaderCellDef>\r\n <div class=\"\"></div>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [aria-label]=\"'Check'|translate\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" [aria-label]=\"'Check'|translate\"\r\n (change)=\"$event ? selection.toggle(item) : null\"\r\n [checked]=\"selection.isSelected(item)\">\r\n </mat-checkbox>\r\n <!-- drag -->\r\n <!--<button mat-icon-button cdkDragHandle\r\n (mousedown)=\"dragDisabled = false\"\r\n (mouseup)=\"dragDisabled = true\"\r\n (touchstart)=\"dragDisabled = false\"\r\n (touchend)=\"dragDisabled = true\"\r\n class=\"drag hide-xs\" aria-disabled=\"true\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>-->\r\n <button mat-icon-button (click)=\"toggleExpanded(item, $event)\" [bizdocTooltip]=\"'Details' | translate\" [attr.aria-label]=\"'Details' | translate\" class=\"tool\"><mat-icon>{{item == expandedElement ? 'unfold_less' : 'unfold_more'}}</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Number column -->\r\n<ng-container matColumnDef=\"number\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Number' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.number}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- Subject column -->\r\n<ng-container matColumnDef=\"subject\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Subject' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.subject}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"owner\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Owner' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.ownerId) {\r\n <bizdoc-identity-name [identity]=\"item.ownerId\" [by]=\"item.ownerById\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n<ng-container matColumnDef=\"sender\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Sender' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.senderId) {\r\n <bizdoc-identity-name [identity]=\"item.senderId\" [by]=\"item.byId\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"received\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.received | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"receivedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"received\">{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.received | amCalendar\">{{item.received | amTimeAgo}}</mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"replied\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.replied | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issued\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.issued | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issuedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"issued\">{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.issued | amCalendar\"> {{item.issued | amTimeAgo}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"state\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"stateId\">{{'Status' | translate }}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <bizdoc-status [stateId]=\"item.stateId\"></bizdoc-status>\r\n </mat-cell>\r\n</ng-container>\r\n\r\n@if (customColumns) {\r\n @for (c of customColumns; track c) {\r\n <ng-container [matColumnDef]=\"c.name\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header> {{c.title}} </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @switch (c.type) {\r\n @case ('Date') {\r\n <span>\r\n {{item.model[c.name] | amCalendar }}\r\n </span>\r\n }\r\n @case ('Decimal') {\r\n <span>\r\n {{item.model[c.name] | number }}\r\n </span>\r\n }\r\n @case ('Boolean') {\r\n <span>\r\n <bizdoc-checkbox [checked]=\"item.model[c.name]\"></bizdoc-checkbox>\r\n </span>\r\n }\r\n @default {\r\n <span>\r\n {{item.model[c.name]}}z\r\n </span>\r\n }\r\n }\r\n </mat-cell>\r\n </ng-container>\r\n }\r\n}\r\n\r\n<!-- Value column -->\r\n<ng-container matColumnDef=\"value\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Amount' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.value | currency : item.currencyCode : 'symbol' : currencyFormat}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- options column -->\r\n<ng-container matColumnDef=\"options\">\r\n <mat-header-cell *matHeaderCellDef></mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <button mat-icon-button (click)=\"flag(item, $event)\" [bizdocTooltip]=\"'Flagged'| translate\" [attr.aria-label]=\"'ToggleFlagged' | translate\" class=\"tool\"><mat-icon [class.filled]=\"item.flag\">star</mat-icon></button>\r\n @if (enableViews) {\r\n <button mat-icon-button (click)=\"insights(item, $event)\" [bizdocTooltip]=\"'Insights' | translate\" [attr.aria-label]=\"'Insight' | translate\" class=\"tool\"><mat-icon>data_usage</mat-icon></button>\r\n }\r\n <button mat-icon-button (click)=\"$event.stopPropagation()\" [matMenuTriggerFor]=\"menu\" [matMenuTriggerData]=\"{item: item}\" [bizdocTooltip]=\"'Options' | translate\" [attr.aria-label]=\"'Options' | translate\" class=\"tool hide-xs\"><mat-icon>more_vert</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Expanded Content Column -->\r\n<ng-container matColumnDef=\"expandedDetail\">\r\n <mat-cell *matCellDef=\"let item\" [attr.colspan]=\"displayedColumns.length\" [@updated]=\"item == updatedElement\"\r\n [class.read-row]=\"item.read\">\r\n <div [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\" style=\"width: 100%\">\r\n @if (item == expandedElement) {\r\n <bizdoc-expanded-item [model]=\"item\" (sent)=\"onActionTaken($event)\"></bizdoc-expanded-item>\r\n }\r\n </div>\r\n </mat-cell>\r\n</ng-container>\r\n<mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></mat-header-row>\r\n<mat-row @item [@updated]=\"item == updatedElement\"\r\n *matRowDef=\"let item; let dataIndex = dataIndex; columns: displayedColumns;\" class=\"element-row\"\r\n cdkDrag [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"dragDisabled\"\r\n (cdkDragReleased)=\"dragDisabled = true\"\r\n [ngClass]=\"{'selected-row': selectedElement === item,\r\n 'expanded-row': expandedElement === item,\r\n 'odd-row': dataIndex % 2,\r\n 'read-row': item.read}\" matRipple\r\n (click)=\"open(item, $event)\">\r\n <div *cdkDragPreview>\r\n <button mat-icon-button aria-disabled=\"true\"><mat-icon>drag_indicator</mat-icon></button> <span>#{{item.number}}</span>\r\n </div>\r\n <div *cdkDragPlaceholder>\r\n <!-- none -->\r\n </div>\r\n</mat-row>\r\n<mat-row *matRowDef=\"let item; ; let dataIndex = dataIndex; columns: ['expandedDetail']\"\r\n class=\"detail-row\" matRipple\r\n [ngClass]=\"{ 'selected-row': selectedElement === item,\r\n 'odd-row': dataIndex % 2\r\n }\"></mat-row>\r\n</mat-table>\r\n<mat-paginator #paginator [hidePageSize]=\"true\" [pageSize]=\"PAGE_SIZE\" [style.display]=\"!isMobile && dataSource?.data.length>PAGE_SIZE ? '':'none'\"></mat-paginator>\r\n<mat-menu #menu=\"matMenu\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <button mat-menu-item (click)=\"open(item, $event)\">{{'Open'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"toggleRead(item)\">{{(item.read ?'MarkAsUnread':'MarkAsRead')|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"copy(item)\">{{'Copy'| translate}}</button>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["#browse-table{width:100%}#browse-table .detail-row{min-height:0}#browse-table .element-row{cursor:pointer}#browse-table .element-row .drag{cursor:move}#browse-table .read-row{font-weight:100}@media screen and (min-width: 600px){.mat-mdc-row .tool{opacity:.05}.mat-mdc-row:hover .tool{opacity:1}}::ng-deep .mat-column-options{justify-content:end;padding-inline-end:8px}::ng-deep .mat-column-value{justify-content:right}::ng-deep .mat-column-select{white-space:nowrap}::ng-deep .mat-column-number{white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$8.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$8.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$8.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: i2$8.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i12.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i5$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6$1.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i6$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i7$4.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: i7$5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i2$5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: CheckboxComponent, selector: "bizdoc-checkbox", inputs: ["checked", "color", "icon"] }, { kind: "directive", type: StateDirective, selector: "bizdoc-status", inputs: ["stateId"] }, { kind: "component", type: IdentityName, selector: "bizdoc-identity-name", inputs: ["identity", "by", "chating"] }, { kind: "component", type: NoneComponent, selector: "bizdoc-none", inputs: ["title", "subtitle", "icon"] }, { kind: "component", type: ExpandedItemComponent, selector: "bizdoc-expanded-item", inputs: ["model"], outputs: ["sent"] }, { kind: "directive", type: TooltipDirective, selector: "[bizdocTooltip]", inputs: ["bizdocTooltip", "bizdocTooltipTemplate", "bizdocTooltipContext", "bizdocTooltipPosition", "bizdocTooltipDuration", "bizdocTooltipDisabled"] }, { kind: "pipe", type: i9.DecimalPipe, name: "number" }, { kind: "pipe", type: i9.CurrencyPipe, name: "currency" }, { kind: "pipe", type: CalendarPipe, name: "amCalendar" }, { kind: "pipe", type: TimeAgoPipe, name: "amTimeAgo" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
9594
9605
  listAnimation,
9595
9606
  itemAnimation,
9596
9607
  expandListItemAnimation,
@@ -9604,7 +9615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImpor
9604
9615
  itemAnimation,
9605
9616
  expandListItemAnimation,
9606
9617
  listItemUpdatedAnimation
9607
- ], template: "<mat-progress-bar mode=\"query\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n@if (dataSource?.data.length === 0) {\r\n <bizdoc-none title=\"NoMessages\" [subtitle]=\"!isMobile && folderId === DRAFT ? 'AltN' : null\" icon=\"mail_outline\"></bizdoc-none>\r\n}\r\n<mat-table cdkDropList class=\"data-table\"\r\n [cdkDropListDisabled]=\"isMobile\"\r\n [cdkDropListData]=\"dataSource?.data\"\r\n cdkDropListConnectedTo=\"folders\"\r\n cdkDropListSortingDisabled\r\n [dataSource]=\"dataSource\" matSort multiTemplateDataRows (matSortChange)=\"sortData()\"\r\n id=\"browse-table\" [@list]=\"dataSource\" [style.display]=\"dataSource?.data.length ?'':'none'\">\r\n <ng-container matColumnDef=\"select\">\r\n <mat-header-cell *matHeaderCellDef>\r\n <div class=\"\"></div>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [aria-label]=\"'Check'|translate\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" [aria-label]=\"'Check'|translate\"\r\n (change)=\"$event ? selection.toggle(item) : null\"\r\n [checked]=\"selection.isSelected(item)\">\r\n </mat-checkbox>\r\n <!-- drag -->\r\n <!--<button mat-icon-button cdkDragHandle\r\n (mousedown)=\"dragDisabled = false\"\r\n (mouseup)=\"dragDisabled = true\"\r\n (touchstart)=\"dragDisabled = false\"\r\n (touchend)=\"dragDisabled = true\"\r\n class=\"drag hide-xs\" aria-disabled=\"true\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>-->\r\n <button mat-icon-button (click)=\"toggleExpanded(item, $event)\" [bizdocTooltip]=\"'Details' | translate\" [attr.aria-label]=\"'Details' | translate\" class=\"tool\"><mat-icon>{{item == expandedElement ? 'unfold_less' : 'unfold_more'}}</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Number column -->\r\n<ng-container matColumnDef=\"number\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Number' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.number}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- Subject column -->\r\n<ng-container matColumnDef=\"subject\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Subject' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.subject}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"owner\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Owner' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.ownerId) {\r\n <bizdoc-identity-name [identity]=\"item.ownerId\" [by]=\"item.ownerById\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n<ng-container matColumnDef=\"sender\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Sender' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.senderId) {\r\n <bizdoc-identity-name [identity]=\"item.senderId\" [by]=\"item.byId\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"received\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.received | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"receivedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"received\">{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.received | amCalendar\">{{item.received | amTimeAgo}}</mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"replied\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.replied | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issued\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.issued | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issuedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"issued\">{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.issued | amCalendar\"> {{item.issued | amTimeAgo}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"state\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"stateId\">{{'Status' | translate }}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <bizdoc-status [stateId]=\"item.stateId\"></bizdoc-status>\r\n </mat-cell>\r\n</ng-container>\r\n\r\n@if (customColumns) {\r\n @for (c of customColumns; track c) {\r\n <ng-container [matColumnDef]=\"c.name\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header> {{c.title}} </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @switch (c.type) {\r\n @case ('Date') {\r\n <span>\r\n {{item.model[c.name] | amCalendar }}\r\n </span>\r\n }\r\n @case ('Decimal') {\r\n <span>\r\n {{item.model[c.name] | number }}\r\n </span>\r\n }\r\n @case ('Boolean') {\r\n <span>\r\n <bizdoc-checkbox [checked]=\"item.model[c.name]\"></bizdoc-checkbox>\r\n </span>\r\n }\r\n @default {\r\n <span>\r\n {{item.model[c.name]}}z\r\n </span>\r\n }\r\n }\r\n </mat-cell>\r\n </ng-container>\r\n }\r\n}\r\n\r\n<!-- Value column -->\r\n<ng-container matColumnDef=\"value\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Amount' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.value | currency : item.currencyCode : 'symbol' : currencyFormat}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- options column -->\r\n<ng-container matColumnDef=\"options\">\r\n <mat-header-cell *matHeaderCellDef></mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <button mat-icon-button (click)=\"flag(item, $event)\" [bizdocTooltip]=\"'Flagged'| translate\" [attr.aria-label]=\"'ToggleFlagged' | translate\" class=\"tool\"><mat-icon [class.filled]=\"item.flag\">star</mat-icon></button>\r\n @if (enableViews) {\r\n <button mat-icon-button (click)=\"insights(item, $event)\" [bizdocTooltip]=\"'Insights' | translate\" [attr.aria-label]=\"'Insight' | translate\" class=\"tool\"><mat-icon>data_usage</mat-icon></button>\r\n }\r\n <button mat-icon-button (click)=\"$event.stopPropagation()\" [matMenuTriggerFor]=\"menu\" [matMenuTriggerData]=\"{item: item}\" [bizdocTooltip]=\"'Options' | translate\" [attr.aria-label]=\"'Options' | translate\" class=\"tool hide-xs\"><mat-icon>more_vert</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Expanded Content Column -->\r\n<ng-container matColumnDef=\"expandedDetail\">\r\n <mat-cell *matCellDef=\"let item\" [attr.colspan]=\"displayedColumns.length\" [@updated]=\"item == updatedElement\"\r\n [class.read-row]=\"item.read\">\r\n <div [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\" style=\"width: 100%\">\r\n @if (item == expandedElement) {\r\n <bizdoc-expanded-item [model]=\"item\"></bizdoc-expanded-item>\r\n }\r\n </div>\r\n </mat-cell>\r\n</ng-container>\r\n<mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></mat-header-row>\r\n<mat-row @item [@updated]=\"item == updatedElement\"\r\n *matRowDef=\"let item; let dataIndex = dataIndex; columns: displayedColumns;\" class=\"element-row\"\r\n cdkDrag [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"dragDisabled\"\r\n (cdkDragReleased)=\"dragDisabled = true\"\r\n [ngClass]=\"{'selected-row': selectedElement === item,\r\n 'expanded-row': expandedElement === item,\r\n 'odd-row': dataIndex % 2,\r\n 'read-row': item.read}\" matRipple\r\n (click)=\"open(item, $event)\">\r\n <div *cdkDragPreview>\r\n <button mat-icon-button aria-disabled=\"true\"><mat-icon>drag_indicator</mat-icon></button> <span>#{{item.number}}</span>\r\n </div>\r\n <div *cdkDragPlaceholder>\r\n <!-- none -->\r\n </div>\r\n</mat-row>\r\n<mat-row *matRowDef=\"let item; ; let dataIndex = dataIndex; columns: ['expandedDetail']\"\r\n class=\"detail-row\" matRipple\r\n [ngClass]=\"{ 'selected-row': selectedElement === item,\r\n 'odd-row': dataIndex % 2\r\n }\"></mat-row>\r\n</mat-table>\r\n<mat-paginator #paginator [hidePageSize]=\"true\" [pageSize]=\"PAGE_SIZE\" [style.display]=\"!isMobile && dataSource?.data.length>PAGE_SIZE ? '':'none'\"></mat-paginator>\r\n<mat-menu #menu=\"matMenu\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <button mat-menu-item (click)=\"open(item, $event)\">{{'Open'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"toggleRead(item)\">{{(item.read ?'MarkAsUnread':'MarkAsRead')|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"copy(item)\">{{'Copy'| translate}}</button>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["#browse-table{width:100%}#browse-table .detail-row{min-height:0}#browse-table .element-row{cursor:pointer}#browse-table .element-row .drag{cursor:move}#browse-table .read-row{font-weight:100}@media screen and (min-width: 600px){.mat-mdc-row .tool{opacity:.05}.mat-mdc-row:hover .tool{opacity:1}}::ng-deep .mat-column-options{justify-content:end;padding-inline-end:8px}::ng-deep .mat-column-value{justify-content:right}::ng-deep .mat-column-select{white-space:nowrap}::ng-deep .mat-column-number{white-space:nowrap}\n"] }]
9618
+ ], template: "<mat-progress-bar mode=\"query\" [style.visibility]=\"loading ? 'visible':'hidden'\"></mat-progress-bar>\r\n@if (dataSource?.data.length === 0) {\r\n <bizdoc-none title=\"NoMessages\" [subtitle]=\"!isMobile && folderId === DRAFT ? 'AltN' : null\" icon=\"mail_outline\"></bizdoc-none>\r\n}\r\n<mat-table cdkDropList class=\"data-table\"\r\n [cdkDropListDisabled]=\"isMobile\"\r\n [cdkDropListData]=\"dataSource?.data\"\r\n cdkDropListConnectedTo=\"folders\"\r\n cdkDropListSortingDisabled\r\n [dataSource]=\"dataSource\" matSort multiTemplateDataRows (matSortChange)=\"sortData()\"\r\n id=\"browse-table\" [@list]=\"dataSource\" [style.display]=\"dataSource?.data.length ?'':'none'\">\r\n <ng-container matColumnDef=\"select\">\r\n <mat-header-cell *matHeaderCellDef>\r\n <div class=\"\"></div>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [aria-label]=\"'Check'|translate\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\" [aria-label]=\"'Check'|translate\"\r\n (change)=\"$event ? selection.toggle(item) : null\"\r\n [checked]=\"selection.isSelected(item)\">\r\n </mat-checkbox>\r\n <!-- drag -->\r\n <!--<button mat-icon-button cdkDragHandle\r\n (mousedown)=\"dragDisabled = false\"\r\n (mouseup)=\"dragDisabled = true\"\r\n (touchstart)=\"dragDisabled = false\"\r\n (touchend)=\"dragDisabled = true\"\r\n class=\"drag hide-xs\" aria-disabled=\"true\">\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>-->\r\n <button mat-icon-button (click)=\"toggleExpanded(item, $event)\" [bizdocTooltip]=\"'Details' | translate\" [attr.aria-label]=\"'Details' | translate\" class=\"tool\"><mat-icon>{{item == expandedElement ? 'unfold_less' : 'unfold_more'}}</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Number column -->\r\n<ng-container matColumnDef=\"number\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Number' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.number}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- Subject column -->\r\n<ng-container matColumnDef=\"subject\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Subject' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.subject}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"owner\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Owner' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.ownerId) {\r\n <bizdoc-identity-name [identity]=\"item.ownerId\" [by]=\"item.ownerById\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n<ng-container matColumnDef=\"sender\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Sender' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @if (item.senderId) {\r\n <bizdoc-identity-name [identity]=\"item.senderId\" [by]=\"item.byId\"></bizdoc-identity-name>\r\n }\r\n </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"received\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.received | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"receivedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"received\">{{'Received' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.received | amCalendar\">{{item.received | amTimeAgo}}</mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"replied\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.replied | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issued\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.issued | amCalendar}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"issuedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"issued\">{{'Issued' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.issued | amCalendar\"> {{item.issued | amTimeAgo}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"state\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header=\"stateId\">{{'Status' | translate }}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <bizdoc-status [stateId]=\"item.stateId\"></bizdoc-status>\r\n </mat-cell>\r\n</ng-container>\r\n\r\n@if (customColumns) {\r\n @for (c of customColumns; track c) {\r\n <ng-container [matColumnDef]=\"c.name\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header> {{c.title}} </mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n @switch (c.type) {\r\n @case ('Date') {\r\n <span>\r\n {{item.model[c.name] | amCalendar }}\r\n </span>\r\n }\r\n @case ('Decimal') {\r\n <span>\r\n {{item.model[c.name] | number }}\r\n </span>\r\n }\r\n @case ('Boolean') {\r\n <span>\r\n <bizdoc-checkbox [checked]=\"item.model[c.name]\"></bizdoc-checkbox>\r\n </span>\r\n }\r\n @default {\r\n <span>\r\n {{item.model[c.name]}}z\r\n </span>\r\n }\r\n }\r\n </mat-cell>\r\n </ng-container>\r\n }\r\n}\r\n\r\n<!-- Value column -->\r\n<ng-container matColumnDef=\"value\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Amount' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\"> {{item.value | currency : item.currencyCode : 'symbol' : currencyFormat}} </mat-cell>\r\n</ng-container>\r\n\r\n<!-- options column -->\r\n<ng-container matColumnDef=\"options\">\r\n <mat-header-cell *matHeaderCellDef></mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\">\r\n <button mat-icon-button (click)=\"flag(item, $event)\" [bizdocTooltip]=\"'Flagged'| translate\" [attr.aria-label]=\"'ToggleFlagged' | translate\" class=\"tool\"><mat-icon [class.filled]=\"item.flag\">star</mat-icon></button>\r\n @if (enableViews) {\r\n <button mat-icon-button (click)=\"insights(item, $event)\" [bizdocTooltip]=\"'Insights' | translate\" [attr.aria-label]=\"'Insight' | translate\" class=\"tool\"><mat-icon>data_usage</mat-icon></button>\r\n }\r\n <button mat-icon-button (click)=\"$event.stopPropagation()\" [matMenuTriggerFor]=\"menu\" [matMenuTriggerData]=\"{item: item}\" [bizdocTooltip]=\"'Options' | translate\" [attr.aria-label]=\"'Options' | translate\" class=\"tool hide-xs\"><mat-icon>more_vert</mat-icon></button>\r\n </mat-cell>\r\n</ng-container>\r\n<!-- Expanded Content Column -->\r\n<ng-container matColumnDef=\"expandedDetail\">\r\n <mat-cell *matCellDef=\"let item\" [attr.colspan]=\"displayedColumns.length\" [@updated]=\"item == updatedElement\"\r\n [class.read-row]=\"item.read\">\r\n <div [@detailExpand]=\"item == expandedElement ? 'expanded' : 'collapsed'\" style=\"width: 100%\">\r\n @if (item == expandedElement) {\r\n <bizdoc-expanded-item [model]=\"item\" (sent)=\"onActionTaken($event)\"></bizdoc-expanded-item>\r\n }\r\n </div>\r\n </mat-cell>\r\n</ng-container>\r\n<mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></mat-header-row>\r\n<mat-row @item [@updated]=\"item == updatedElement\"\r\n *matRowDef=\"let item; let dataIndex = dataIndex; columns: displayedColumns;\" class=\"element-row\"\r\n cdkDrag [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"dragDisabled\"\r\n (cdkDragReleased)=\"dragDisabled = true\"\r\n [ngClass]=\"{'selected-row': selectedElement === item,\r\n 'expanded-row': expandedElement === item,\r\n 'odd-row': dataIndex % 2,\r\n 'read-row': item.read}\" matRipple\r\n (click)=\"open(item, $event)\">\r\n <div *cdkDragPreview>\r\n <button mat-icon-button aria-disabled=\"true\"><mat-icon>drag_indicator</mat-icon></button> <span>#{{item.number}}</span>\r\n </div>\r\n <div *cdkDragPlaceholder>\r\n <!-- none -->\r\n </div>\r\n</mat-row>\r\n<mat-row *matRowDef=\"let item; ; let dataIndex = dataIndex; columns: ['expandedDetail']\"\r\n class=\"detail-row\" matRipple\r\n [ngClass]=\"{ 'selected-row': selectedElement === item,\r\n 'odd-row': dataIndex % 2\r\n }\"></mat-row>\r\n</mat-table>\r\n<mat-paginator #paginator [hidePageSize]=\"true\" [pageSize]=\"PAGE_SIZE\" [style.display]=\"!isMobile && dataSource?.data.length>PAGE_SIZE ? '':'none'\"></mat-paginator>\r\n<mat-menu #menu=\"matMenu\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <button mat-menu-item (click)=\"open(item, $event)\">{{'Open'|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"toggleRead(item)\">{{(item.read ?'MarkAsUnread':'MarkAsRead')|translate}}</button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item (click)=\"copy(item)\">{{'Copy'| translate}}</button>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["#browse-table{width:100%}#browse-table .detail-row{min-height:0}#browse-table .element-row{cursor:pointer}#browse-table .element-row .drag{cursor:move}#browse-table .read-row{font-weight:100}@media screen and (min-width: 600px){.mat-mdc-row .tool{opacity:.05}.mat-mdc-row:hover .tool{opacity:1}}::ng-deep .mat-column-options{justify-content:end;padding-inline-end:8px}::ng-deep .mat-column-value{justify-content:right}::ng-deep .mat-column-select{white-space:nowrap}::ng-deep .mat-column-number{white-space:nowrap}\n"] }]
9608
9619
  }], ctorParameters: () => [{ type: MailboxService }, { type: AccountService }, { type: CubeService }, { type: SessionService }, { type: PromptService }, { type: TranslateService }, { type: i0.ChangeDetectorRef }, { type: RouterImpl }, { type: HubService }, { type: undefined, decorators: [{
9609
9620
  type: Inject,
9610
9621
  args: [BIZDOC_CONFIG]
@@ -10050,11 +10061,9 @@ class ComposeFormComponent {
10050
10061
  this.workingChange.emit(true);
10051
10062
  return this._mailbox.submit(id, version, formId, model).
10052
10063
  pipe(tap({
10053
- next: () => {
10054
- this._sb.toast('Submitted', number);
10055
- }, error: e => {
10056
- this._handleError(e, 'SubmitErr');
10057
- }, finalize: () => {
10064
+ next: () => this._sb.toast('Submitted', number),
10065
+ error: e => this._handleError(e, 'SubmitErr'),
10066
+ finalize: () => {
10058
10067
  this.working = false;
10059
10068
  this.workingChange.emit(false);
10060
10069
  }
@@ -10113,19 +10122,15 @@ class ComposeFormComponent {
10113
10122
  closeOnNavigation: true
10114
10123
  }).afterClosed().subscribe(args => {
10115
10124
  if (args) {
10116
- this._applychanges();
10117
- const params = queryParams(args);
10118
10125
  this.working = true;
10119
10126
  this.workingChange.emit(true);
10120
- const { id, version, number, model, formId } = this.model;
10127
+ this._applychanges();
10128
+ const { id, version, number, model, formId, folderId } = this.model;
10129
+ const params = queryParams(args);
10121
10130
  this._mailbox.send(id, version, formId, model, action, params).
10122
10131
  subscribe({
10123
10132
  next: r => {
10124
- const origin = r.recipients.filter(r => r.originId === id);
10125
- if (origin.length)
10126
- this._accounts.getAll(origin.map(r => r.userId)).subscribe(u => this._sb.toast('SentTo', number, this._getActionAdjective(action), this._translate.join(u.map(u => u.name))));
10127
- else
10128
- this._sb.toast('Sent', number, this._getActionAdjective(action));
10133
+ this._toastSentMessage(r, action);
10129
10134
  this.working = false;
10130
10135
  this.workingChange.emit(false);
10131
10136
  observe.next(r);
@@ -10146,6 +10151,18 @@ class ComposeFormComponent {
10146
10151
  });
10147
10152
  });
10148
10153
  }
10154
+ /**
10155
+ *
10156
+ * @param model
10157
+ * @param action
10158
+ */
10159
+ _toastSentMessage(model, action) {
10160
+ const origins = model.recipients.filter(r => r.originId === r.id);
10161
+ if (origins.length)
10162
+ this._accounts.getAll(origins.map(r => r.userId)).subscribe(u => this._sb.toast('SentTo', model.number, this._getActionAdjective(action), this._translate.join(u.map(u => u.name))));
10163
+ else
10164
+ this._sb.toast('Sent', model.number, this._getActionAdjective(action));
10165
+ }
10149
10166
  /** */
10150
10167
  copy() {
10151
10168
  this._mailbox.copy(this.model.documentId).subscribe({
@@ -10393,7 +10410,8 @@ class ComposePaneComponent {
10393
10410
  this.form.discard().subscribe({ next: this._close.bind(this) });
10394
10411
  }
10395
10412
  send(action) {
10396
- this.form.send(action).subscribe({ next: this._close.bind(this) });
10413
+ const { folderId } = this.model;
10414
+ this.form.send(action).subscribe({ next: r => folderId !== r.folderId && this._close() });
10397
10415
  }
10398
10416
  submit() {
10399
10417
  this.form.submit().subscribe(e => e && this._close());
@@ -22156,7 +22174,8 @@ class ComposeMobileComponent {
22156
22174
  }
22157
22175
  }
22158
22176
  send(action) {
22159
- this.form.send(action).subscribe({ next: this._close.bind(this) });
22177
+ const { folderId } = this.model;
22178
+ this.form.send(action).subscribe({ next: r => folderId !== r.folderId && this._close() });
22160
22179
  }
22161
22180
  edit() {
22162
22181
  this.mode = 'compose';