@bizdoc/core 3.8.10 → 3.9.0
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/fesm2022/bizdoc-core.mjs +125 -86
- package/fesm2022/bizdoc-core.mjs.map +1 -1
- package/index.d.ts +22 -15
- package/package.json +1 -1
package/fesm2022/bizdoc-core.mjs
CHANGED
@@ -1184,22 +1184,16 @@ class SessionService {
|
|
1184
1184
|
this._stepNotificationsCount(move);
|
1185
1185
|
}
|
1186
1186
|
_stepNotificationsCount(move) {
|
1187
|
-
let { messagesCount } = this._profile;
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
messagesCount = (messagesCount || 0) + move;
|
1192
|
-
this._profile.messagesCount = messagesCount;
|
1193
|
-
this._messagesCount$.next(messagesCount);
|
1187
|
+
let { messagesCount: counter } = this._profile;
|
1188
|
+
counter = promote(move, counter);
|
1189
|
+
this._profile.messagesCount = counter;
|
1190
|
+
this._messagesCount$.next(counter);
|
1194
1191
|
}
|
1195
1192
|
_stepInboxCount(move) {
|
1196
|
-
let { inboxCount } = this._profile;
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
inboxCount = (inboxCount || 0) + move;
|
1201
|
-
this._profile.inboxCount = inboxCount;
|
1202
|
-
this._inboxCount$.next(inboxCount);
|
1193
|
+
let { inboxCount: counter } = this._profile;
|
1194
|
+
counter = promote(move, counter);
|
1195
|
+
this._profile.inboxCount = counter;
|
1196
|
+
this._inboxCount$.next(counter);
|
1203
1197
|
}
|
1204
1198
|
/** */
|
1205
1199
|
get tags() {
|
@@ -1352,12 +1346,20 @@ class SessionService {
|
|
1352
1346
|
});
|
1353
1347
|
}
|
1354
1348
|
markInboxAsTouched() {
|
1349
|
+
if (this.isImpersonating) {
|
1350
|
+
this._stepInboxCount(0);
|
1351
|
+
return Promise.resolve();
|
1352
|
+
}
|
1355
1353
|
return firstValueFrom(this._http.put('/api/account/inboxview', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
|
1356
1354
|
this._stepInboxCount(0);
|
1357
1355
|
this._profile.options.inboxView = e.time;
|
1358
1356
|
})));
|
1359
1357
|
}
|
1360
1358
|
markNotificationsAsTouched() {
|
1359
|
+
if (this.isImpersonating) {
|
1360
|
+
this._stepNotificationsCount(0);
|
1361
|
+
return Promise.resolve();
|
1362
|
+
}
|
1361
1363
|
return firstValueFrom(this._http.put('/api/account/notificationsView', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
|
1362
1364
|
this._stepNotificationsCount(0);
|
1363
1365
|
this._profile.options.notificationsView = e.time;
|
@@ -1434,6 +1436,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
|
|
1434
1436
|
type: Inject,
|
1435
1437
|
args: [BIZDOC_CONFIG]
|
1436
1438
|
}] }, { type: i1.HttpClient }, { type: i2.CookieService }, { type: HubService }, { type: i7.MatIconRegistry }, { type: i2$1.DomSanitizer }] });
|
1439
|
+
function promote(move, counter) {
|
1440
|
+
switch (move) {
|
1441
|
+
case 0:
|
1442
|
+
counter = 0;
|
1443
|
+
break;
|
1444
|
+
case 1:
|
1445
|
+
counter += 1;
|
1446
|
+
break;
|
1447
|
+
case -1:
|
1448
|
+
counter = counter ? counter - 1 : 0;
|
1449
|
+
break;
|
1450
|
+
}
|
1451
|
+
return counter;
|
1452
|
+
}
|
1437
1453
|
function loadServiceWorker() {
|
1438
1454
|
window.addEventListener('load', function () {
|
1439
1455
|
navigator.serviceWorker.register('/js/app-sw.js').then(function () {
|
@@ -9009,15 +9025,25 @@ class ExpandedItemComponent {
|
|
9009
9025
|
this._refresh();
|
9010
9026
|
this._refreshTask = setInterval(() => this._refresh(), REFRESH_TIME);
|
9011
9027
|
}
|
9028
|
+
/** */
|
9029
|
+
async _refresh() {
|
9030
|
+
const { actions } = this.model;
|
9031
|
+
this.actions = actions && actions.length ? this._session.profile.actions.filter(a => actions.indexOf(a.name) > -1) : undefined;
|
9032
|
+
this._sender();
|
9033
|
+
this._comments();
|
9034
|
+
this._note();
|
9035
|
+
this._awaiting();
|
9036
|
+
}
|
9037
|
+
/** */
|
9012
9038
|
async _note() {
|
9013
|
-
const { ownerId,
|
9039
|
+
const { ownerId, ownerBy, issued, substituteId, received, replied, log, id, note, repliedBy, actionId, escalated, originId, draft } = this.model;
|
9014
9040
|
let target;
|
9015
|
-
if (
|
9041
|
+
if (actionId)
|
9016
9042
|
target = await this._target(id);
|
9017
9043
|
if (substituteId) {
|
9018
9044
|
const substituting = await firstValueFrom(this._accounts.get(substituteId));
|
9019
9045
|
if (replied) {
|
9020
|
-
const time = this._fromNow(replied), aaction = this._session.profile.actions.find(a => a.name ===
|
9046
|
+
const time = this._fromNow(replied), aaction = this._session.profile.actions.find(a => a.name === actionId), adjective = (aaction.adjective || aaction.title).toLowerCase();
|
9021
9047
|
if (target)
|
9022
9048
|
this.note = this._translate.personalize('YouSubstituteActionTakenTo', substituting.gender, adjective, target, this._formatUserElement(substituting), time);
|
9023
9049
|
else
|
@@ -9034,44 +9060,44 @@ class ExpandedItemComponent {
|
|
9034
9060
|
}
|
9035
9061
|
else if (replied) {
|
9036
9062
|
const time = this._fromNow(replied);
|
9037
|
-
if (
|
9038
|
-
if (
|
9063
|
+
if (repliedBy) {
|
9064
|
+
if (repliedBy === this._session.userId) {
|
9039
9065
|
if (target)
|
9040
|
-
this.note = this._translate.get('ActionTakenByYouTo', this._actionName(
|
9066
|
+
this.note = this._translate.get('ActionTakenByYouTo', this._actionName(actionId, 'you'), target, this._session.profile.name, time);
|
9041
9067
|
else
|
9042
|
-
this.note = this._translate.get('ActionTakenByYou', this._actionName(
|
9068
|
+
this.note = this._translate.get('ActionTakenByYou', this._actionName(actionId, 'you'), this._session.profile.name, time);
|
9043
9069
|
}
|
9044
9070
|
else
|
9045
|
-
this._accounts.get(
|
9071
|
+
this._accounts.get(repliedBy).subscribe(u => {
|
9046
9072
|
if (target)
|
9047
|
-
this.note = this._translate.get('YouTakenActionByTo', this._formatUserElement(u), this._actionName(
|
9073
|
+
this.note = this._translate.get('YouTakenActionByTo', this._formatUserElement(u), this._actionName(actionId, u.gender), target, time);
|
9048
9074
|
else
|
9049
|
-
this.note = this._translate.get('YouTakenActionBy', this._formatUserElement(u), this._actionName(
|
9075
|
+
this.note = this._translate.get('YouTakenActionBy', this._formatUserElement(u), this._actionName(actionId, u.gender), time);
|
9050
9076
|
});
|
9051
9077
|
}
|
9052
|
-
else if (this._session.
|
9078
|
+
else if (this._session.userId) {
|
9053
9079
|
if (target)
|
9054
|
-
this.note = this._translate.personalize('ActionTakenTo', this._session.profile.gender, this._session.profile.name, this._actionName(
|
9080
|
+
this.note = this._translate.personalize('ActionTakenTo', this._session.profile.gender, this._session.profile.name, this._actionName(actionId, this._session.profile.gender), target, time);
|
9055
9081
|
else
|
9056
|
-
this.note = this._translate.personalize('ActionTaken', this._session.profile.gender, this._session.profile.name, this._actionName(
|
9082
|
+
this.note = this._translate.personalize('ActionTaken', this._session.profile.gender, this._session.profile.name, this._actionName(actionId, this._session.profile.gender), time);
|
9057
9083
|
}
|
9058
9084
|
else {
|
9059
9085
|
if (target)
|
9060
|
-
this.note = this._translate.get('YouTakenActionTo', this._actionName(
|
9086
|
+
this.note = this._translate.get('YouTakenActionTo', this._actionName(actionId, 'you'), target, time);
|
9061
9087
|
else
|
9062
|
-
this.note = this._translate.get('YouTakenAction', this._actionName(
|
9088
|
+
this.note = this._translate.get('YouTakenAction', this._actionName(actionId, 'you'), time);
|
9063
9089
|
}
|
9064
9090
|
}
|
9065
9091
|
else if (note)
|
9066
9092
|
this.note = note;
|
9067
9093
|
else if (originId) {
|
9068
9094
|
const origin = this.model.recipients.find(r => r.id === originId);
|
9069
|
-
const action = this._session.profile.actions.find(a => a.name === origin.
|
9070
|
-
if ((origin.
|
9095
|
+
const action = this._session.profile.actions.find(a => a.name === origin.actionId), adjective = action.adjective || action.past || action.title;
|
9096
|
+
if ((origin.repliedBy || origin.userId) === this._session.userId)
|
9071
9097
|
this.note = this._translate.get('ActionByYou', adjective);
|
9072
|
-
else if (origin.
|
9098
|
+
else if (origin.repliedBy) {
|
9073
9099
|
const who = await firstValueFrom(this._accounts.get(origin.userId));
|
9074
|
-
const by = await firstValueFrom(this._accounts.get(origin.
|
9100
|
+
const by = await firstValueFrom(this._accounts.get(origin.repliedBy));
|
9075
9101
|
this.note = this._translate.get('ActionByBy', adjective, by.name, who.name);
|
9076
9102
|
}
|
9077
9103
|
else {
|
@@ -9081,11 +9107,11 @@ class ExpandedItemComponent {
|
|
9081
9107
|
}
|
9082
9108
|
else if (ownerId === this._session.userId && !draft) {
|
9083
9109
|
const time = this._fromNow(issued);
|
9084
|
-
if (
|
9085
|
-
if (
|
9110
|
+
if (ownerBy) {
|
9111
|
+
if (ownerBy === this._session.userId)
|
9086
9112
|
this.note = this._translate.personalize('YouSubmittedNoteBy', this._session.profile.byGender, this._session.profile.name, time);
|
9087
9113
|
else {
|
9088
|
-
const by = await firstValueFrom(this._accounts.get(
|
9114
|
+
const by = await firstValueFrom(this._accounts.get(ownerBy));
|
9089
9115
|
if (this._session.isImpersonating)
|
9090
9116
|
this.note = this._translate.personalize('SubmittedNoteBy', by.gender, this._formatUserElement(by), this._session.profile.name, time);
|
9091
9117
|
else
|
@@ -9131,18 +9157,30 @@ class ExpandedItemComponent {
|
|
9131
9157
|
return dayjs.duration(time, 's').humanize();
|
9132
9158
|
}
|
9133
9159
|
/** */
|
9134
|
-
async
|
9135
|
-
const {
|
9136
|
-
|
9137
|
-
|
9138
|
-
|
9139
|
-
|
9160
|
+
async _sender() {
|
9161
|
+
const { senderId, senderBy } = this.model;
|
9162
|
+
if (!senderId)
|
9163
|
+
return;
|
9164
|
+
if (senderId === this._session.userId) {
|
9165
|
+
if (senderBy) {
|
9166
|
+
const by = await firstValueFrom(this._accounts.get(senderBy));
|
9167
|
+
this.sender = this._translate.get('YouBy', this._formatUserElement(by));
|
9168
|
+
}
|
9169
|
+
}
|
9170
|
+
else {
|
9140
9171
|
const who = await firstValueFrom(this._accounts.get(senderId));
|
9141
|
-
|
9172
|
+
if (senderBy) {
|
9173
|
+
if (senderBy === this._session.profile.byId) {
|
9174
|
+
this.sender = this._translate.get('ByYou', this._formatUserElement(who));
|
9175
|
+
}
|
9176
|
+
else {
|
9177
|
+
const by = await firstValueFrom(this._accounts.get(senderBy));
|
9178
|
+
this.sender = this._translate.get('By', this._formatUserElement(who), this._formatUserElement(by));
|
9179
|
+
}
|
9180
|
+
}
|
9181
|
+
else
|
9182
|
+
this.sender = this._formatUserElement(who);
|
9142
9183
|
}
|
9143
|
-
this._comments();
|
9144
|
-
this._note();
|
9145
|
-
this._awaiting();
|
9146
9184
|
}
|
9147
9185
|
_comments() {
|
9148
9186
|
const { viewed, comments } = this.model;
|
@@ -9693,7 +9731,7 @@ class BrowseItemsComponent {
|
|
9693
9731
|
this._destroy.complete();
|
9694
9732
|
}
|
9695
9733
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", 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 }); }
|
9696
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", 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 : null : CALENDAR_SPEC}} </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 | amDateFormat: 'lll'\">{{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 : null : CALENDAR_SPEC}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"repliedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.replied | amDateFormat: 'lll'\"> {{item.replied | amTimeAgo}} </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 : null : CALENDAR_SPEC }} </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 | amDateFormat: 'lll'\"> {{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 : null : CALENDAR_SPEC}}\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: i1$3.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: DateFormatPipe, name: "amDateFormat" }, { kind: "pipe", type: CalendarPipe, name: "amCalendar" }, { kind: "pipe", type: TimeAgoPipe, name: "amTimeAgo" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
|
9734
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", 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.ownerBy\"></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.senderBy\"></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 : null : CALENDAR_SPEC}} </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 | amDateFormat: 'lll'\">{{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 : null : CALENDAR_SPEC}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"repliedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.replied | amDateFormat: 'lll'\"> {{item.replied | amTimeAgo}} </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 : null : CALENDAR_SPEC }} </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 | amDateFormat: 'lll'\"> {{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 : null : CALENDAR_SPEC}}\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: i1$3.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: DateFormatPipe, name: "amDateFormat" }, { kind: "pipe", type: CalendarPipe, name: "amCalendar" }, { kind: "pipe", type: TimeAgoPipe, name: "amTimeAgo" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], animations: [
|
9697
9735
|
listAnimation,
|
9698
9736
|
itemAnimation,
|
9699
9737
|
expandListItemAnimation,
|
@@ -9707,7 +9745,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
|
|
9707
9745
|
itemAnimation,
|
9708
9746
|
expandListItemAnimation,
|
9709
9747
|
listItemUpdatedAnimation
|
9710
|
-
], 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 : null : CALENDAR_SPEC}} </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 | amDateFormat: 'lll'\">{{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 : null : CALENDAR_SPEC}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"repliedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.replied | amDateFormat: 'lll'\"> {{item.replied | amTimeAgo}} </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 : null : CALENDAR_SPEC }} </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 | amDateFormat: 'lll'\"> {{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 : null : CALENDAR_SPEC}}\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"] }]
|
9748
|
+
], 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.ownerBy\"></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.senderBy\"></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 : null : CALENDAR_SPEC}} </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 | amDateFormat: 'lll'\">{{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 : null : CALENDAR_SPEC}} </mat-cell>\r\n</ng-container>\r\n\r\n<ng-container matColumnDef=\"repliedAgo\">\r\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{'Replied' | translate}}</mat-header-cell>\r\n <mat-cell *matCellDef=\"let item\" [bizdocTooltip]=\"item.replied | amDateFormat: 'lll'\"> {{item.replied | amTimeAgo}} </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 : null : CALENDAR_SPEC }} </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 | amDateFormat: 'lll'\"> {{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 : null : CALENDAR_SPEC}}\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"] }]
|
9711
9749
|
}], ctorParameters: () => [{ type: MailboxService }, { type: AccountService }, { type: CubeService }, { type: SessionService }, { type: PromptService }, { type: TranslateService }, { type: i0.ChangeDetectorRef }, { type: RouterImpl }, { type: HubService }, { type: undefined, decorators: [{
|
9712
9750
|
type: Inject,
|
9713
9751
|
args: [BIZDOC_CONFIG]
|
@@ -15752,8 +15790,8 @@ class FlowViewComponent extends TraceBase {
|
|
15752
15790
|
}]
|
15753
15791
|
});
|
15754
15792
|
// add action indicator
|
15755
|
-
if (recipient.
|
15756
|
-
const action = this._session.profile.actions.find(a => a.name === recipient.
|
15793
|
+
if (recipient.actionId) {
|
15794
|
+
const action = this._session.profile.actions.find(a => a.name === recipient.actionId);
|
15757
15795
|
action.shape && !recipient.pending &&
|
15758
15796
|
indicators.push({
|
15759
15797
|
id: id + 'action',
|
@@ -16032,8 +16070,8 @@ class FlowViewComponent extends TraceBase {
|
|
16032
16070
|
async _startNode() {
|
16033
16071
|
let note, role;
|
16034
16072
|
const ago = dayjs(this.model.issued).fromNow();
|
16035
|
-
if (this.model.
|
16036
|
-
if (this.model.
|
16073
|
+
if (this.model.ownerBy) {
|
16074
|
+
if (this.model.ownerBy === this._session.userId) {
|
16037
16075
|
if (this.model.ownerId === this._session.profile.userId)
|
16038
16076
|
note = this._translate.personalize('YouSubmittedNoteBy', this._session.profile.byGender, this._session.profile.name, ago);
|
16039
16077
|
else {
|
@@ -16042,7 +16080,7 @@ class FlowViewComponent extends TraceBase {
|
|
16042
16080
|
}
|
16043
16081
|
}
|
16044
16082
|
else {
|
16045
|
-
const by = await firstValueFrom(this._accounts.get(this.model.
|
16083
|
+
const by = await firstValueFrom(this._accounts.get(this.model.ownerBy));
|
16046
16084
|
if (this.model.ownerId === this._session.userId)
|
16047
16085
|
note = this._translate.personalize('SubmittedNoteYouBy', by.gender, by.name, ago);
|
16048
16086
|
else if (this.model.ownerId === this._session.profile.userId)
|
@@ -16104,9 +16142,9 @@ class FlowViewComponent extends TraceBase {
|
|
16104
16142
|
const who = await firstValueFrom(this._accounts.get(sibling.userId));
|
16105
16143
|
to.push(who.name);
|
16106
16144
|
}
|
16107
|
-
if (recipient.
|
16108
|
-
if (recipient.
|
16109
|
-
const action = this._action(recipient.
|
16145
|
+
if (recipient.repliedBy) {
|
16146
|
+
if (recipient.repliedBy === this._session.profile.byId) {
|
16147
|
+
const action = this._action(recipient.actionId, this._session.profile.byGender);
|
16110
16148
|
if (to.length) {
|
16111
16149
|
if (recipient.userId === this._session.profile.userId)
|
16112
16150
|
tooltip.note = this._translate.get('ActionTakenByYouTo', action, this._translate.join(to), this._session.profile.name, ago);
|
@@ -16123,8 +16161,8 @@ class FlowViewComponent extends TraceBase {
|
|
16123
16161
|
}
|
16124
16162
|
}
|
16125
16163
|
else {
|
16126
|
-
const by = await firstValueFrom(this._accounts.get(recipient.
|
16127
|
-
const action = this._action(recipient.
|
16164
|
+
const by = await firstValueFrom(this._accounts.get(recipient.repliedBy));
|
16165
|
+
const action = this._action(recipient.actionId, by.gender);
|
16128
16166
|
if (recipient.userId === this._session.profile.userId) {
|
16129
16167
|
if (to.length)
|
16130
16168
|
tooltip.note = this._translate.get('YouTakenActionByTo', by.name, action, this._translate.join(to), ago);
|
@@ -16142,7 +16180,7 @@ class FlowViewComponent extends TraceBase {
|
|
16142
16180
|
}
|
16143
16181
|
else if (to.length) {
|
16144
16182
|
if (recipient.userId === this._session.profile.userId) {
|
16145
|
-
const action = this._action(recipient.
|
16183
|
+
const action = this._action(recipient.actionId, this._session.profile.gender);
|
16146
16184
|
if (this._session.isImpersonating)
|
16147
16185
|
tooltip.note = this._translate.get('ActionTakenTo', this._session.profile.name, action, this._translate.join(to), ago);
|
16148
16186
|
else
|
@@ -16150,21 +16188,21 @@ class FlowViewComponent extends TraceBase {
|
|
16150
16188
|
}
|
16151
16189
|
else {
|
16152
16190
|
const who = await firstValueFrom(this._accounts.get(recipient.userId));
|
16153
|
-
const action = this._action(recipient.
|
16191
|
+
const action = this._action(recipient.actionId, who.gender);
|
16154
16192
|
tooltip.note = this._translate.get('ActionTakenTo', who.name, action, this._translate.join(to));
|
16155
16193
|
}
|
16156
16194
|
}
|
16157
16195
|
else if (this._session.isImpersonating) {
|
16158
|
-
const action = this._action(recipient.
|
16196
|
+
const action = this._action(recipient.actionId, this._session.profile.gender);
|
16159
16197
|
tooltip.note = this._translate.get('ActionTaken', this._session.profile.name, action, ago);
|
16160
16198
|
}
|
16161
16199
|
else if (recipient.userId === this._session.profile.userId) {
|
16162
|
-
const action = this._action(recipient.
|
16200
|
+
const action = this._action(recipient.actionId, You);
|
16163
16201
|
tooltip.note = this._translate.get('YouTakenAction', action, ago);
|
16164
16202
|
}
|
16165
16203
|
else {
|
16166
16204
|
const who = await firstValueFrom(this._accounts.get(recipient.userId));
|
16167
|
-
const action = this._action(recipient.
|
16205
|
+
const action = this._action(recipient.actionId, who.gender);
|
16168
16206
|
tooltip.note = this._translate.get('ActionTaken', who.name, action, ago);
|
16169
16207
|
}
|
16170
16208
|
}
|
@@ -16190,12 +16228,12 @@ class FlowViewComponent extends TraceBase {
|
|
16190
16228
|
}
|
16191
16229
|
}
|
16192
16230
|
if (recipient.originId && !recipient.replied) {
|
16193
|
-
const origin = this.model.recipients.find(r => r.id === recipient.originId), action = this._session.profile.actions.find(a => a.name === origin.
|
16194
|
-
if ((origin.
|
16231
|
+
const origin = this.model.recipients.find(r => r.id === recipient.originId), action = this._session.profile.actions.find(a => a.name === origin.actionId), adjective = action.adjective || action.past || action.title;
|
16232
|
+
if ((origin.repliedBy || origin.userId) === this._session.userId)
|
16195
16233
|
tooltip.substituting = this._translate.get('ActionByYou', adjective);
|
16196
|
-
else if (origin.
|
16234
|
+
else if (origin.repliedBy) {
|
16197
16235
|
const who = await firstValueFrom(this._accounts.get(origin.userId));
|
16198
|
-
const by = await firstValueFrom(this._accounts.get(origin.
|
16236
|
+
const by = await firstValueFrom(this._accounts.get(origin.repliedBy));
|
16199
16237
|
tooltip.substituting = this._translate.get('ActionByBy', adjective, by.name, who.name);
|
16200
16238
|
}
|
16201
16239
|
else {
|
@@ -16411,8 +16449,8 @@ class TraceViewComponent extends TraceBase {
|
|
16411
16449
|
step.role = this._roleName(recipient.role);
|
16412
16450
|
step.fyi = recipient.fyi;
|
16413
16451
|
if (recipient.substituteId) {
|
16414
|
-
if (recipient.
|
16415
|
-
if (recipient.
|
16452
|
+
if (recipient.repliedBy) {
|
16453
|
+
if (recipient.repliedBy === this._session.userId) {
|
16416
16454
|
let who = await profileOf(recipient.userId);
|
16417
16455
|
if (recipient.substituteId === this._session.userId)
|
16418
16456
|
step.name = this._translate.get('ByYou', nameOf(who));
|
@@ -16424,7 +16462,7 @@ class TraceViewComponent extends TraceBase {
|
|
16424
16462
|
step.action = await actionBy(action, You, recipient.id);
|
16425
16463
|
}
|
16426
16464
|
else {
|
16427
|
-
let by = await profileOf(recipient.
|
16465
|
+
let by = await profileOf(recipient.repliedBy), who = await profileOf(recipient.userId), substituting = await profileOf(recipient.substituteId);
|
16428
16466
|
step.name = this._translate.get('SubstitutingBy', nameOf(who), nameOf(substituting), nameOf(by));
|
16429
16467
|
if (by.role)
|
16430
16468
|
step.role = by.role;
|
@@ -16453,22 +16491,22 @@ class TraceViewComponent extends TraceBase {
|
|
16453
16491
|
step.action = await actionBy(action, who.gender, recipient.id);
|
16454
16492
|
}
|
16455
16493
|
}
|
16456
|
-
else if (recipient.
|
16494
|
+
else if (recipient.repliedBy) {
|
16457
16495
|
if (recipient.userId === this._session.userId) {
|
16458
|
-
let by = await profileOf(recipient.
|
16496
|
+
let by = await profileOf(recipient.repliedBy);
|
16459
16497
|
step.name = this._translate.get('YouBy', nameOf(by));
|
16460
16498
|
if (action)
|
16461
16499
|
step.action = await actionBy(action, by.gender, recipient.id);
|
16462
16500
|
}
|
16463
16501
|
else {
|
16464
16502
|
let who = await profileOf(recipient.userId);
|
16465
|
-
if (recipient.
|
16503
|
+
if (recipient.repliedBy === this._session.userId) {
|
16466
16504
|
step.name = this._translate.get('ByYou', nameOf(who));
|
16467
16505
|
if (action)
|
16468
16506
|
step.action = await actionBy(action, You, recipient.id);
|
16469
16507
|
}
|
16470
16508
|
else {
|
16471
|
-
let by = await profileOf(recipient.
|
16509
|
+
let by = await profileOf(recipient.repliedBy);
|
16472
16510
|
step.name = this._translate.get('By', nameOf(who), nameOf(by));
|
16473
16511
|
if (by.role)
|
16474
16512
|
step.role = by.role;
|
@@ -16528,7 +16566,7 @@ class TraceViewComponent extends TraceBase {
|
|
16528
16566
|
fyi: recipient.fyi,
|
16529
16567
|
estimate: recipient.estimate,
|
16530
16568
|
pending: recipient.pending,
|
16531
|
-
action: recipient.
|
16569
|
+
action: recipient.actionId,
|
16532
16570
|
note: recipient.note,
|
16533
16571
|
type: recipient.estimate ? 'Estimate' : 'Pending',
|
16534
16572
|
duration: recipient.pending ? dayjs().diff(recipient.received, 's') : null,
|
@@ -16561,12 +16599,12 @@ class TraceViewComponent extends TraceBase {
|
|
16561
16599
|
step.role = who.role;
|
16562
16600
|
}
|
16563
16601
|
}
|
16564
|
-
else if (recipient.
|
16602
|
+
else if (recipient.repliedBy) {
|
16565
16603
|
let who = await profileOf(recipient.userId);
|
16566
|
-
if (recipient.
|
16604
|
+
if (recipient.repliedBy === this._session.userId)
|
16567
16605
|
step.name = this._translate.get('ByYou', nameOf(who));
|
16568
16606
|
else {
|
16569
|
-
let by = await profileOf(recipient.
|
16607
|
+
let by = await profileOf(recipient.repliedBy);
|
16570
16608
|
step.name = this._translate.get('By', nameOf(who), nameOf(by));
|
16571
16609
|
if (by.role)
|
16572
16610
|
step.role = by.role;
|
@@ -19589,10 +19627,11 @@ class HomeBase {
|
|
19589
19627
|
window.dispatchEvent(new Event('resize'));
|
19590
19628
|
}
|
19591
19629
|
_markInboxAsTouched() {
|
19592
|
-
this._session.
|
19630
|
+
this._session.profile.inboxCount &&
|
19631
|
+
this._session.markInboxAsTouched();
|
19593
19632
|
}
|
19594
19633
|
_markNotificationsAsTouched(_) {
|
19595
|
-
this._session.profile.
|
19634
|
+
this._session.profile.messagesCount &&
|
19596
19635
|
this._session.markNotificationsAsTouched();
|
19597
19636
|
}
|
19598
19637
|
_set(name, val) {
|
@@ -23444,8 +23483,8 @@ class PeopleComponent {
|
|
23444
23483
|
this._me = session.profile.byId || session.profile.userId;
|
23445
23484
|
}
|
23446
23485
|
ngOnChanges(_) {
|
23447
|
-
this._push(this.model.ownerId, this.model.
|
23448
|
-
this.model.recipients.reverse().forEach(r => this._push(r.userId, r.
|
23486
|
+
this._push(this.model.ownerId, this.model.ownerBy, this.model.senderId);
|
23487
|
+
this.model.recipients.reverse().forEach(r => this._push(r.userId, r.repliedBy, r.substituteId));
|
23449
23488
|
this._accounts.getAll(this._userIds).subscribe(us => this.people = us);
|
23450
23489
|
}
|
23451
23490
|
_push(...userId) {
|
@@ -31676,15 +31715,15 @@ class TraceElementComponent {
|
|
31676
31715
|
}
|
31677
31716
|
if (recipient.substituteId) {
|
31678
31717
|
const substitute = await firstValueFrom(this._accounts.get(recipient.substituteId));
|
31679
|
-
if (recipient.
|
31680
|
-
const by = await firstValueFrom(this._accounts.get(recipient.
|
31718
|
+
if (recipient.repliedBy) {
|
31719
|
+
const by = await firstValueFrom(this._accounts.get(recipient.repliedBy));
|
31681
31720
|
info.push(this._translate.get('SubstitutingBy', this._chat.format(who), this._chat.format(substitute), this._chat.format(by)));
|
31682
31721
|
}
|
31683
31722
|
else
|
31684
31723
|
info.push(this._translate.get('Substituting', this._chat.format(who), this._chat.format(substitute)));
|
31685
31724
|
}
|
31686
|
-
else if (recipient.
|
31687
|
-
const by = await firstValueFrom(this._accounts.get(recipient.
|
31725
|
+
else if (recipient.repliedBy) {
|
31726
|
+
const by = await firstValueFrom(this._accounts.get(recipient.repliedBy));
|
31688
31727
|
info.push(this._translate.get('By', this._chat.format(who), this._chat.format(by)));
|
31689
31728
|
}
|
31690
31729
|
else
|