@yuuvis/client-framework 3.4.2 → 3.5.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/yuuvis-client-framework-datepicker.mjs +2 -2
- package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +97 -88
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-preview.mjs +2 -1
- package/fesm2022/yuuvis-client-framework-object-preview.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-renderer.mjs +95 -142
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework.mjs +172 -3
- package/fesm2022/yuuvis-client-framework.mjs.map +1 -1
- package/lib/assets/i18n/de.json +7 -0
- package/lib/assets/i18n/en.json +12 -5
- package/package.json +6 -6
- package/types/yuuvis-client-framework-object-details.d.ts +3 -11
- package/types/yuuvis-client-framework-renderer.d.ts +10 -4
- package/types/yuuvis-client-framework.d.ts +121 -2
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { signal, input, effect, Component,
|
|
4
|
+
import { inject, signal, input, effect, Component, computed, ChangeDetectionStrategy, Injectable, viewChild, linkedSignal, untracked, output, viewChildren, NgModule, Pipe } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed, toSignal, rxResource } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i2 from '@angular/material/icon';
|
|
8
8
|
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
-
import
|
|
10
|
-
import { YuvEventType, LocaleDatePipe, TranslatePipe, ObjectConfigService, EventService, Utils, DmsService, TranslateService, SystemService, Situation, PendingChangesService, NotificationService, UserService, ObjectLockingService, TabGuardDirective } from '@yuuvis/client-core';
|
|
9
|
+
import { AuditService, EventService, LocalizationService, TranslateService, YuvEventType, LocaleDatePipe, TranslatePipe, ObjectConfigService, Utils, DmsService, SystemService, Situation, PendingChangesService, NotificationService, UserService, ObjectLockingService, TabGuardDirective } from '@yuuvis/client-core';
|
|
11
10
|
import { BusyOverlayDirective, RetentionBadgeComponent } from '@yuuvis/client-framework/common';
|
|
12
11
|
import { YUV_ICONS } from '@yuuvis/client-framework/icons';
|
|
13
12
|
import { YmtIconButtonDirective, YmtButtonDirective } from '@yuuvis/material';
|
|
@@ -26,16 +25,21 @@ import * as i2$1 from '@angular/material/progress-spinner';
|
|
|
26
25
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
27
26
|
|
|
28
27
|
class ObjectAuditComponent {
|
|
28
|
+
#auditService;
|
|
29
|
+
#eventService;
|
|
30
|
+
#localization;
|
|
31
|
+
#translate;
|
|
32
|
+
#objectID;
|
|
33
|
+
#objectTypeID;
|
|
29
34
|
#dmsObjectEffect;
|
|
30
35
|
get objectID() {
|
|
31
|
-
return this
|
|
32
|
-
}
|
|
33
|
-
constructor(
|
|
34
|
-
this
|
|
35
|
-
this
|
|
36
|
-
this
|
|
37
|
-
this
|
|
38
|
-
this.FILTER_CACHE_KEY = 'yuv.audit.filters';
|
|
36
|
+
return this.#objectID;
|
|
37
|
+
}
|
|
38
|
+
constructor() {
|
|
39
|
+
this.#auditService = inject(AuditService);
|
|
40
|
+
this.#eventService = inject(EventService);
|
|
41
|
+
this.#localization = inject(LocalizationService);
|
|
42
|
+
this.#translate = inject(TranslateService);
|
|
39
43
|
this.icons = {
|
|
40
44
|
filter: YUV_ICONS.filter,
|
|
41
45
|
arrowNext: YUV_ICONS.arrowNext
|
|
@@ -48,15 +52,15 @@ class ObjectAuditComponent {
|
|
|
48
52
|
this.auditLabels = {};
|
|
49
53
|
this.dmsObject = input(undefined, ...(ngDevMode ? [{ debugName: "dmsObject" }] : /* istanbul ignore next */ []));
|
|
50
54
|
this.#dmsObjectEffect = effect(() => {
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
53
|
-
this
|
|
54
|
-
this
|
|
55
|
+
const dmsObject = this.dmsObject();
|
|
56
|
+
if (!dmsObject) {
|
|
57
|
+
this.#objectID = undefined;
|
|
58
|
+
this.#objectTypeID = undefined;
|
|
55
59
|
this.auditsRes.set(undefined);
|
|
56
60
|
}
|
|
57
|
-
else if (!this
|
|
58
|
-
this
|
|
59
|
-
this
|
|
61
|
+
else if (!this.#objectID || this.#objectID !== dmsObject.id) {
|
|
62
|
+
this.#objectID = dmsObject.id;
|
|
63
|
+
this.#objectTypeID = dmsObject.objectTypeId;
|
|
60
64
|
this.query();
|
|
61
65
|
}
|
|
62
66
|
else {
|
|
@@ -73,45 +77,73 @@ class ObjectAuditComponent {
|
|
|
73
77
|
*/
|
|
74
78
|
this.allActions = input(false, ...(ngDevMode ? [{ debugName: "allActions" }] : /* istanbul ignore next */ []));
|
|
75
79
|
this.auditLabels = {
|
|
76
|
-
a100: this
|
|
77
|
-
a101: this
|
|
78
|
-
a110: this
|
|
79
|
-
a200: this
|
|
80
|
-
a201: this
|
|
81
|
-
a202: this
|
|
82
|
-
a210: this
|
|
83
|
-
a220: this
|
|
84
|
-
a300: this
|
|
85
|
-
a301: this
|
|
86
|
-
a302: this
|
|
87
|
-
a303: this
|
|
88
|
-
a310: this
|
|
89
|
-
a325: this
|
|
90
|
-
a340: this
|
|
91
|
-
a400: this
|
|
92
|
-
a401: this
|
|
93
|
-
a402: this
|
|
94
|
-
a403: this
|
|
95
|
-
a404: this
|
|
96
|
-
a10000: this
|
|
80
|
+
a100: this.#translate.instant('yuv.audit.label.create.metadata'),
|
|
81
|
+
a101: this.#translate.instant('yuv.audit.label.create.metadata.withcontent'),
|
|
82
|
+
a110: this.#translate.instant('yuv.audit.label.create.tag'),
|
|
83
|
+
a200: this.#translate.instant('yuv.audit.label.delete'),
|
|
84
|
+
a201: this.#translate.instant('yuv.audit.label.delete.content'), // #v
|
|
85
|
+
a202: this.#translate.instant('yuv.audit.label.delete.marked'),
|
|
86
|
+
a210: this.#translate.instant('yuv.audit.label.delete.tag'), // #v
|
|
87
|
+
a220: this.#translate.instant('yuv.audit.label.delete.version'), // #v
|
|
88
|
+
a300: this.#translate.instant('yuv.audit.label.update.metadata'),
|
|
89
|
+
a301: this.#translate.instant('yuv.audit.label.update.content'),
|
|
90
|
+
a302: this.#translate.instant('yuv.audit.label.update.metadata.withcontent'),
|
|
91
|
+
a303: this.#translate.instant('yuv.audit.label.update.move.content'),
|
|
92
|
+
a310: this.#translate.instant('yuv.audit.label.update.tag'),
|
|
93
|
+
a325: this.#translate.instant('yuv.audit.label.update.restore'),
|
|
94
|
+
a340: this.#translate.instant('yuv.audit.label.update.move'),
|
|
95
|
+
a400: this.#translate.instant('yuv.audit.label.get.content'),
|
|
96
|
+
a401: this.#translate.instant('yuv.audit.label.get.metadata'),
|
|
97
|
+
a402: this.#translate.instant('yuv.audit.label.get.rendition.text'),
|
|
98
|
+
a403: this.#translate.instant('yuv.audit.label.get.rendition.pdf'),
|
|
99
|
+
a404: this.#translate.instant('yuv.audit.label.get.rendition.thumbnail'),
|
|
100
|
+
a10000: this.#translate.instant('yuv.audit.label.get.custom')
|
|
97
101
|
};
|
|
98
|
-
this
|
|
102
|
+
this.#eventService
|
|
99
103
|
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
100
104
|
.pipe(takeUntilDestroyed())
|
|
101
|
-
.subscribe((
|
|
102
|
-
const dmsObject =
|
|
105
|
+
.subscribe((event) => {
|
|
106
|
+
const dmsObject = event.data;
|
|
103
107
|
// reload audit entries when update belongs to the current dms object
|
|
104
108
|
if (dmsObject.id === this.objectID) {
|
|
105
109
|
this.query();
|
|
106
110
|
}
|
|
107
111
|
});
|
|
108
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Execute a query from the search panel.
|
|
115
|
+
*/
|
|
116
|
+
query() {
|
|
117
|
+
this.#fetchAuditEntries();
|
|
118
|
+
}
|
|
119
|
+
goToPage(page) {
|
|
120
|
+
const currentAuditsRes = this.auditsRes();
|
|
121
|
+
if (currentAuditsRes) {
|
|
122
|
+
this.busy.set(true);
|
|
123
|
+
this.#auditService
|
|
124
|
+
.getPage(currentAuditsRes, page)
|
|
125
|
+
.pipe(finalize(() => this.busy.set(false)))
|
|
126
|
+
.subscribe({
|
|
127
|
+
next: (res) => {
|
|
128
|
+
this.auditsRes.set(res);
|
|
129
|
+
this.resolvedItems.set(this.#mapResult(res));
|
|
130
|
+
},
|
|
131
|
+
error: () => {
|
|
132
|
+
this.#onError();
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
#onError() {
|
|
138
|
+
this.auditsRes.set(undefined);
|
|
139
|
+
this.error.set(true);
|
|
140
|
+
}
|
|
109
141
|
#fetchAuditEntries() {
|
|
110
|
-
if (!this
|
|
142
|
+
if (!this.#objectID || !this.#objectTypeID)
|
|
111
143
|
return;
|
|
112
144
|
this.error.set(false);
|
|
113
145
|
this.busy.set(true);
|
|
114
|
-
this
|
|
146
|
+
this.#auditService.getAuditEntries(this.#objectID, { skipActions: this.skipActions() }).subscribe({
|
|
115
147
|
next: (res) => {
|
|
116
148
|
this.busy.set(false);
|
|
117
149
|
this.auditsRes.set(res);
|
|
@@ -119,71 +151,48 @@ class ObjectAuditComponent {
|
|
|
119
151
|
},
|
|
120
152
|
error: () => {
|
|
121
153
|
this.busy.set(false);
|
|
122
|
-
this
|
|
154
|
+
this.#onError();
|
|
123
155
|
}
|
|
124
156
|
});
|
|
125
157
|
}
|
|
126
158
|
#mapResult(res) {
|
|
127
159
|
return (res.items
|
|
128
|
-
// TODO:
|
|
160
|
+
// TODO: please recheck that.
|
|
161
|
+
// TODO: Remove this filter once the system:ren:text audit lifecycle planning is complete and the tag's
|
|
162
|
+
// purpose is fully defined.
|
|
163
|
+
// eslint-disable-next-line max-len
|
|
129
164
|
// https://help.optimal-systems.com/yuuvis/Momentum/latest/index.html#_content_renditions_asynchronous_full_text_indexing.html
|
|
130
165
|
.filter((i) => !i.detail.includes('[system:ren:text, 1]'))
|
|
131
166
|
.map((i) => {
|
|
132
|
-
const
|
|
167
|
+
const auditEntry = { ...i, label: this.auditLabels['a' + i.action] };
|
|
133
168
|
// tag related audits
|
|
134
169
|
if ([110, 210, 310].includes(i.action)) {
|
|
135
170
|
const params = this.#getAuditEntryParams(i);
|
|
136
171
|
if (params) {
|
|
137
172
|
const localizedLabel = `${params[0]}:${params[1]}`;
|
|
138
|
-
|
|
173
|
+
auditEntry.more = `${this.#localization.getLocalizedLabel(params[0]) ?? params[0]}: ${this.#localization.getLocalizedLabel(localizedLabel) ?? localizedLabel}`;
|
|
139
174
|
}
|
|
140
175
|
}
|
|
141
176
|
// restore audit
|
|
142
177
|
else if (i.action === 325) {
|
|
143
178
|
const params = this.#getAuditEntryParams(i);
|
|
144
|
-
|
|
179
|
+
auditEntry.more = this.#translate.instant('yuv.audit.label.update.restore.more', {
|
|
180
|
+
version: params[0] || '[?]'
|
|
181
|
+
});
|
|
145
182
|
}
|
|
146
183
|
// custom audits
|
|
147
184
|
else if (i.action === 10000) {
|
|
148
|
-
|
|
185
|
+
auditEntry.label = this.#localization.getLocalizedLabel(`audit:custom:${i.subaction}`) || `${i.subaction}`;
|
|
149
186
|
}
|
|
150
|
-
return
|
|
187
|
+
return auditEntry;
|
|
151
188
|
}));
|
|
152
189
|
}
|
|
153
190
|
#getAuditEntryParams(auditItem) {
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Execute a query from the search panel.
|
|
159
|
-
*/
|
|
160
|
-
query() {
|
|
161
|
-
this.#fetchAuditEntries();
|
|
162
|
-
}
|
|
163
|
-
goToPage(page) {
|
|
164
|
-
const currentAuditsRes = this.auditsRes();
|
|
165
|
-
if (currentAuditsRes) {
|
|
166
|
-
this.busy.set(true);
|
|
167
|
-
this.auditService
|
|
168
|
-
.getPage(currentAuditsRes, page)
|
|
169
|
-
.pipe(finalize(() => this.busy.set(false)))
|
|
170
|
-
.subscribe({
|
|
171
|
-
next: (res) => {
|
|
172
|
-
this.auditsRes.set(res);
|
|
173
|
-
this.resolvedItems.set(this.#mapResult(res));
|
|
174
|
-
},
|
|
175
|
-
error: () => {
|
|
176
|
-
this.onError();
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
onError() {
|
|
182
|
-
this.auditsRes.set(undefined);
|
|
183
|
-
this.error.set(true);
|
|
191
|
+
const auditDetailMatch = auditItem.detail.match(/\[(.*?)\]/);
|
|
192
|
+
return auditDetailMatch?.[1]?.split(',').map((i) => i.trim()) ?? [];
|
|
184
193
|
}
|
|
185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, deps: [
|
|
186
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ObjectAuditComponent, isStandalone: true, selector: "yuv-object-audit", inputs: { dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, skipActions: { classPropertyName: "skipActions", publicName: "skipActions", isSignal: true, isRequired: false, transformFunction: null }, allActions: { classPropertyName: "allActions", publicName: "allActions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let auditsResult = auditsRes();\n\n<div\n class=\"yuv-audit\"\n [ngClass]=\"{ singleEntry: auditsResult?.items?.length === 1, onPage: auditsResult && auditsResult.page > 1 }\"\n [yuvBusyOverlay]=\"busy()\"\n>\n @if (error()) {\n <div class=\"error\">\n <div
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ObjectAuditComponent, isStandalone: true, selector: "yuv-object-audit", inputs: { dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, skipActions: { classPropertyName: "skipActions", publicName: "skipActions", isSignal: true, isRequired: false, transformFunction: null }, allActions: { classPropertyName: "allActions", publicName: "allActions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let auditsResult = auditsRes();\n\n<div\n class=\"yuv-audit\"\n [ngClass]=\"{ singleEntry: auditsResult?.items?.length === 1, onPage: auditsResult && auditsResult.page > 1 }\"\n [yuvBusyOverlay]=\"busy()\"\n [attr.aria-busy]=\"busy()\"\n>\n @if (error()) {\n <div class=\"error\" role=\"alert\">\n <div>{{ 'yuv.audit.fetch.error' | translate }}</div>\n </div>\n }\n\n @if (auditsResult) {\n <!-- list of audits -->\n @let resItems = resolvedItems();\n @if (resItems.length) {\n <ul class=\"timeline\" [attr.aria-label]=\"'yuv.audit.timeline' | translate\">\n @for (item of resItems; track item.creationDate + '-' + item.action) {\n <li\n class=\"audit\"\n [attr.aria-labelledby]=\"\n 'date-' + $index + ' title-' + $index + ' version-' + $index + (item.more ? ' more-' + $index : '') + ' creator-' + $index\n \"\n >\n <time [attr.datetime]=\"item.creationDate\" [id]=\"'date-' + $index\" class=\"date\">{{ item.creationDate | localeDate }}</time>\n <div class=\"node\">\n <div class=\"label\">\n <span class=\"title\" [id]=\"'title-' + $index\">{{ item.label }}</span>\n <span class=\"version\" [id]=\"'version-' + $index\">{{ 'yuv.audit.label.version' | translate: { version: item.version } }}</span>\n </div>\n @if (item.more) {\n <div class=\"more meta\" [id]=\"'more-' + $index\">{{ item.more }}</div>\n }\n <div class=\"creator meta\" [id]=\"'creator-' + $index\">{{ item.createdBy.title }}</div>\n </div>\n </li>\n }\n </ul>\n } @else {\n <div class=\"empty\" role=\"status\" translate>yuv.audit.result.empty</div>\n }\n\n <!-- controls -->\n @if (auditsResult.hasMoreItems || auditsResult.page > 1) {\n <div class=\"footer\" yuvOfflineDisabled>\n <nav class=\"paging\" [attr.aria-label]=\"'yuv.audit.label.paging' | translate\">\n <button\n ymtIconButton\n [attr.aria-label]=\"'yuv.audit.label.paging.prev' | translate\"\n [disabled]=\"auditsResult.page === 1\"\n (click)=\"goToPage(auditsResult.page - 1)\"\n >\n <mat-icon aria-hidden=\"true\">chevron_left</mat-icon>\n </button>\n <div\n class=\"page\"\n aria-live=\"polite\"\n [attr.aria-label]=\"'yuv.audit.label.paging.current' | translate: { page: auditsResult.page }\"\n >\n <span aria-hidden=\"true\">{{ auditsResult.page }}</span>\n </div>\n <button\n ymtIconButton\n [attr.aria-label]=\"'yuv.audit.label.paging.next' | translate\"\n [disabled]=\"!auditsResult.hasMoreItems\"\n (click)=\"goToPage(auditsResult.page + 1)\"\n >\n <mat-icon aria-hidden=\"true\">chevron_right</mat-icon>\n </button>\n </nav>\n </div>\n }\n }\n</div>\n", styles: [":host{--_object-audit-panel-background: var(--object-audit-panel-background, var(--ymt-surface))}:host .yuv-audit{position:relative;height:100%;width:100%;display:grid;grid-template-columns:1fr;grid-template-rows:1fr auto;grid-template-areas:\"items\" \"footer\";background-color:var(--_object-audit-panel-background);container-type:inline-size;container-name:cmp}:host .yuv-audit .error{grid-area:items;display:flex;flex-flow:column;align-items:center;justify-content:center}:host .yuv-audit .error>div{background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);margin:var(--ymt-spacing-m);padding:var(--ymt-spacing-m);border-radius:var(--ymt-spacing-xs)}:host .yuv-audit .audits{grid-area:items}:host .yuv-audit .empty{grid-area:items;display:flex;flex-flow:column;align-items:center;justify-content:center;color:var(--ymt-text-color-subtle)}:host .yuv-audit .footer{grid-area:footer;background-color:var(--ymt-surface);border-top:1px solid var(--ymt-outline-variant);display:flex}:host .yuv-audit .footer .paging{flex:1;display:flex;align-items:center;justify-content:flex-end;padding:var(--ymt-spacing-xs)}:host .yuv-audit .footer .paging .page{padding:0 var(--ymt-spacing-xs)}:host .timeline{--track-color: var(--ymt-outline-variant);--track-size: var(--ymt-spacing-4xl);margin-block-start:0;margin-block-end:0;overflow-y:auto;padding:var(--ymt-spacing-3xl) var(--ymt-spacing-2xs) var(--ymt-spacing-3xl) var(--ymt-spacing-l)}@container (max-width: 450px){:host .timeline .audit{grid-template-columns:var(--track-size) auto;grid-template-rows:var(--track-size) auto;grid-template-areas:\"line date\" \"node node\"}:host .timeline .audit .date{justify-self:start}:host .timeline .audit .date,:host .timeline .audit:after{translate:0 .5em}:host .timeline .audit .node{margin:0;width:100%}:host .timeline .audit:last-child:before{height:100%}}:host .timeline :where(.audit){display:grid;grid-template-columns:1fr var(--track-size) 6fr;grid-template-areas:\"date line node\"}:host .timeline :where(.audit) .date{grid-area:date;justify-self:end;align-self:center}:host .timeline :where(.audit) .node{grid-area:node;justify-self:start;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);border-radius:.25em;margin:var(--ymt-spacing-xs) 0;padding:var(--ymt-spacing-m);box-sizing:border-box;display:grid;gap:var(--ymt-spacing-3xs)}:host .timeline :where(.audit) .node .label{display:flex;align-items:center}:host .timeline :where(.audit) .node .label .title{flex:1;word-break:break-word;font-weight:700;color:var(--ymt-text-color)}:host .timeline :where(.audit) .node .label .version{line-height:1em;border-radius:2px;background-color:rgb(from var(--ymt-primary) r g b/.15);color:var(--ymt-primary);font:var(--ymt-font-body-subtle);font-family:monospace;align-self:center;margin-left:var(--ymt-spacing-m);padding:2px 4px;display:block}:host .timeline :where(.audit) .node .meta{color:var(--ymt-text-color-subtle)}:host .timeline :where(.audit):before{grid-area:line;content:\"\";width:calc(50% + 1px);height:100%;border-inline-end:2px solid var(--track-color)}:host .timeline :where(.audit):after{grid-area:line;content:\"\";width:14px;height:14px;border-radius:50%;border:2px solid var(--track-color);background-color:var(--ymt-surface-panel);box-sizing:border-box;align-self:center;justify-self:center}:host .timeline :where(.audit):first-child:before{height:50%;align-self:end}:host .timeline :where(.audit):last-child:before{height:50%;align-self:start}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay", "yuvBusyOverlayConfig", "yuvBusyError"], outputs: ["yuvBusyErrorDismiss"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }, { kind: "pipe", type: LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
187
196
|
}
|
|
188
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, decorators: [{
|
|
189
198
|
type: Component,
|
|
@@ -195,8 +204,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
195
204
|
TranslatePipe,
|
|
196
205
|
MatIconModule,
|
|
197
206
|
YmtIconButtonDirective
|
|
198
|
-
], template: "@let auditsResult = auditsRes();\n\n<div\n class=\"yuv-audit\"\n [ngClass]=\"{ singleEntry: auditsResult?.items?.length === 1, onPage: auditsResult && auditsResult.page > 1 }\"\n [yuvBusyOverlay]=\"busy()\"\n>\n @if (error()) {\n <div class=\"error\">\n <div
|
|
199
|
-
}], ctorParameters: () => [
|
|
207
|
+
], template: "@let auditsResult = auditsRes();\n\n<div\n class=\"yuv-audit\"\n [ngClass]=\"{ singleEntry: auditsResult?.items?.length === 1, onPage: auditsResult && auditsResult.page > 1 }\"\n [yuvBusyOverlay]=\"busy()\"\n [attr.aria-busy]=\"busy()\"\n>\n @if (error()) {\n <div class=\"error\" role=\"alert\">\n <div>{{ 'yuv.audit.fetch.error' | translate }}</div>\n </div>\n }\n\n @if (auditsResult) {\n <!-- list of audits -->\n @let resItems = resolvedItems();\n @if (resItems.length) {\n <ul class=\"timeline\" [attr.aria-label]=\"'yuv.audit.timeline' | translate\">\n @for (item of resItems; track item.creationDate + '-' + item.action) {\n <li\n class=\"audit\"\n [attr.aria-labelledby]=\"\n 'date-' + $index + ' title-' + $index + ' version-' + $index + (item.more ? ' more-' + $index : '') + ' creator-' + $index\n \"\n >\n <time [attr.datetime]=\"item.creationDate\" [id]=\"'date-' + $index\" class=\"date\">{{ item.creationDate | localeDate }}</time>\n <div class=\"node\">\n <div class=\"label\">\n <span class=\"title\" [id]=\"'title-' + $index\">{{ item.label }}</span>\n <span class=\"version\" [id]=\"'version-' + $index\">{{ 'yuv.audit.label.version' | translate: { version: item.version } }}</span>\n </div>\n @if (item.more) {\n <div class=\"more meta\" [id]=\"'more-' + $index\">{{ item.more }}</div>\n }\n <div class=\"creator meta\" [id]=\"'creator-' + $index\">{{ item.createdBy.title }}</div>\n </div>\n </li>\n }\n </ul>\n } @else {\n <div class=\"empty\" role=\"status\" translate>yuv.audit.result.empty</div>\n }\n\n <!-- controls -->\n @if (auditsResult.hasMoreItems || auditsResult.page > 1) {\n <div class=\"footer\" yuvOfflineDisabled>\n <nav class=\"paging\" [attr.aria-label]=\"'yuv.audit.label.paging' | translate\">\n <button\n ymtIconButton\n [attr.aria-label]=\"'yuv.audit.label.paging.prev' | translate\"\n [disabled]=\"auditsResult.page === 1\"\n (click)=\"goToPage(auditsResult.page - 1)\"\n >\n <mat-icon aria-hidden=\"true\">chevron_left</mat-icon>\n </button>\n <div\n class=\"page\"\n aria-live=\"polite\"\n [attr.aria-label]=\"'yuv.audit.label.paging.current' | translate: { page: auditsResult.page }\"\n >\n <span aria-hidden=\"true\">{{ auditsResult.page }}</span>\n </div>\n <button\n ymtIconButton\n [attr.aria-label]=\"'yuv.audit.label.paging.next' | translate\"\n [disabled]=\"!auditsResult.hasMoreItems\"\n (click)=\"goToPage(auditsResult.page + 1)\"\n >\n <mat-icon aria-hidden=\"true\">chevron_right</mat-icon>\n </button>\n </nav>\n </div>\n }\n }\n</div>\n", styles: [":host{--_object-audit-panel-background: var(--object-audit-panel-background, var(--ymt-surface))}:host .yuv-audit{position:relative;height:100%;width:100%;display:grid;grid-template-columns:1fr;grid-template-rows:1fr auto;grid-template-areas:\"items\" \"footer\";background-color:var(--_object-audit-panel-background);container-type:inline-size;container-name:cmp}:host .yuv-audit .error{grid-area:items;display:flex;flex-flow:column;align-items:center;justify-content:center}:host .yuv-audit .error>div{background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);margin:var(--ymt-spacing-m);padding:var(--ymt-spacing-m);border-radius:var(--ymt-spacing-xs)}:host .yuv-audit .audits{grid-area:items}:host .yuv-audit .empty{grid-area:items;display:flex;flex-flow:column;align-items:center;justify-content:center;color:var(--ymt-text-color-subtle)}:host .yuv-audit .footer{grid-area:footer;background-color:var(--ymt-surface);border-top:1px solid var(--ymt-outline-variant);display:flex}:host .yuv-audit .footer .paging{flex:1;display:flex;align-items:center;justify-content:flex-end;padding:var(--ymt-spacing-xs)}:host .yuv-audit .footer .paging .page{padding:0 var(--ymt-spacing-xs)}:host .timeline{--track-color: var(--ymt-outline-variant);--track-size: var(--ymt-spacing-4xl);margin-block-start:0;margin-block-end:0;overflow-y:auto;padding:var(--ymt-spacing-3xl) var(--ymt-spacing-2xs) var(--ymt-spacing-3xl) var(--ymt-spacing-l)}@container (max-width: 450px){:host .timeline .audit{grid-template-columns:var(--track-size) auto;grid-template-rows:var(--track-size) auto;grid-template-areas:\"line date\" \"node node\"}:host .timeline .audit .date{justify-self:start}:host .timeline .audit .date,:host .timeline .audit:after{translate:0 .5em}:host .timeline .audit .node{margin:0;width:100%}:host .timeline .audit:last-child:before{height:100%}}:host .timeline :where(.audit){display:grid;grid-template-columns:1fr var(--track-size) 6fr;grid-template-areas:\"date line node\"}:host .timeline :where(.audit) .date{grid-area:date;justify-self:end;align-self:center}:host .timeline :where(.audit) .node{grid-area:node;justify-self:start;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);border-radius:.25em;margin:var(--ymt-spacing-xs) 0;padding:var(--ymt-spacing-m);box-sizing:border-box;display:grid;gap:var(--ymt-spacing-3xs)}:host .timeline :where(.audit) .node .label{display:flex;align-items:center}:host .timeline :where(.audit) .node .label .title{flex:1;word-break:break-word;font-weight:700;color:var(--ymt-text-color)}:host .timeline :where(.audit) .node .label .version{line-height:1em;border-radius:2px;background-color:rgb(from var(--ymt-primary) r g b/.15);color:var(--ymt-primary);font:var(--ymt-font-body-subtle);font-family:monospace;align-self:center;margin-left:var(--ymt-spacing-m);padding:2px 4px;display:block}:host .timeline :where(.audit) .node .meta{color:var(--ymt-text-color-subtle)}:host .timeline :where(.audit):before{grid-area:line;content:\"\";width:calc(50% + 1px);height:100%;border-inline-end:2px solid var(--track-color)}:host .timeline :where(.audit):after{grid-area:line;content:\"\";width:14px;height:14px;border-radius:50%;border:2px solid var(--track-color);background-color:var(--ymt-surface-panel);box-sizing:border-box;align-self:center;justify-self:center}:host .timeline :where(.audit):first-child:before{height:50%;align-self:end}:host .timeline :where(.audit):last-child:before{height:50%;align-self:start}\n"] }]
|
|
208
|
+
}], ctorParameters: () => [], propDecorators: { dmsObject: [{ type: i0.Input, args: [{ isSignal: true, alias: "dmsObject", required: false }] }], skipActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "skipActions", required: false }] }], allActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "allActions", required: false }] }] } });
|
|
200
209
|
|
|
201
210
|
/**
|
|
202
211
|
* Component showing header data for a dms object. These will be
|
|
@@ -408,7 +417,7 @@ class ObjectMetadataSectionComponent {
|
|
|
408
417
|
this.objectForm()?.setFormPristine();
|
|
409
418
|
}
|
|
410
419
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectMetadataSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
411
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ObjectMetadataSectionComponent, isStandalone: true, selector: "yuv-object-metadata-section", inputs: { section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: true, transformFunction: null }, expandedInput: { classPropertyName: "expandedInput", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, elementExtensions: { classPropertyName: "elementExtensions", publicName: "elementExtensions", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { statusChanged: "statusChanged" }, host: { properties: { "class.invalid": "objectForm()?.form?.invalid", "class.dirty": "objectForm()?.form?.dirty" } }, viewQueries: [{ propertyName: "objectForm", first: true, predicate: ObjectFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let _section = section();\n@let fo = formOptions();\n\n<h3>\n <button\n type=\"button\"\n [attr.aria-expanded]=\"expanded()\"\n class=\"accordion-trigger\"\n [attr.aria-controls]=\"'sect_' + _section.id\"\n [id]=\"'accordion_' + _section.id\"\n (click)=\"expanded.set(!expanded())\"\n [attr.aria-busy]=\"busy()\"\n >\n @if (_section.icon) {\n @if (_section.svgIcon) {\n <mat-icon [svgIcon]=\"_section.icon\" />\n } @else {\n <mat-icon>{{ _section.icon }}</mat-icon>\n }\n }\n <span>{{ _section.label }}</span>\n @if (busy()) {\n <mat-spinner diameter=\"24\" />\n }\n <mat-icon class=\"arr\">keyboard_arrow_down</mat-icon>\n </button>\n</h3>\n<div\n [id]=\"'sect_' + _section.id\"\n role=\"region\"\n [attr.aria-labelledby]=\"'accordion_' + _section.id\"\n class=\"accordion-panel\"\n>\n @if (fo) {\n <yuv-object-form\n #objectForm\n [hidden]=\"!expanded()\"\n [readonly]=\"readonly()\"\n [formOptions]=\"fo\"\n [elementExtensions]=\"elementExtensions()\"\n (statusChanged)=\"statusChanged.emit($event)\"\n />\n }\n</div>\n", styles: [":host{--section-state-border-color: var(--ymt-outline-variant);--section-state-outline-color: transparent;background-color:var(--_object-metadata-section-background);border:1px solid var(--section-state-border-color);border-radius:var(--_object-metadata-section-corner);outline:3px solid var(--section-state-outline-color)}:host.invalid{--section-state-border-color: var(--ymt-danger);--section-state-outline-color: rgb(from var(--ymt-danger) r g b /.2)}:host.dirty:not(.invalid){--section-state-border-color: var(--ymt-success);--section-state-outline-color: rgb(from var(--ymt-success) r g b /.2)}:host h3{margin:0;padding:0;display:flex}:host h3 button{margin:var(--ymt-spacing-2xs);border-radius:calc(var(--_object-metadata-section-corner) * .5);flex:1;padding:var(--ymt-spacing-xs);cursor:pointer;display:flex;gap:var(--ymt-spacing-xs);align-items:center;font-weight:700;color:var(--ymt-text-color-subtle);background-color:transparent;border:none}:host h3 button:hover{background-color:var(--ymt-hover-background)}:host h3 button:focus-visible{background-color:var(--ymt-hover-background);outline:2px solid var(--ymt-outline);outline-offset:-2px}:host h3 button[aria-expanded=true] mat-icon.arr{transform:rotate(180deg)}:host h3 button span{flex:1;text-align:start}:host h3 button mat-icon{margin-inline-end:var(--ymt-spacing-xs);transition:transform .3s ease}:host details{background-color:var(--_object-metadata-section-background);border:1px solid var(--ymt-outline-variant);border-radius:var(--_object-metadata-section-corner)}:host details:not(:last-child){margin-block-end:var(--ymt-spacing-m)}:host details[open] yuv-icon.arr{transform:rotate(180deg)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type:
|
|
420
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ObjectMetadataSectionComponent, isStandalone: true, selector: "yuv-object-metadata-section", inputs: { section: { classPropertyName: "section", publicName: "section", isSignal: true, isRequired: true, transformFunction: null }, expandedInput: { classPropertyName: "expandedInput", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, elementExtensions: { classPropertyName: "elementExtensions", publicName: "elementExtensions", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { statusChanged: "statusChanged" }, host: { properties: { "class.invalid": "objectForm()?.form?.invalid", "class.dirty": "objectForm()?.form?.dirty" } }, viewQueries: [{ propertyName: "objectForm", first: true, predicate: ObjectFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let _section = section();\n@let fo = formOptions();\n\n<h3>\n <button\n type=\"button\"\n [attr.aria-expanded]=\"expanded()\"\n class=\"accordion-trigger\"\n [attr.aria-controls]=\"'sect_' + _section.id\"\n [id]=\"'accordion_' + _section.id\"\n (click)=\"expanded.set(!expanded())\"\n [attr.aria-busy]=\"busy()\"\n >\n @if (_section.icon) {\n @if (_section.svgIcon) {\n <mat-icon [svgIcon]=\"_section.icon\" />\n } @else {\n <mat-icon>{{ _section.icon }}</mat-icon>\n }\n }\n <span>{{ _section.label }}</span>\n @if (busy()) {\n <mat-spinner diameter=\"24\" />\n }\n <mat-icon class=\"arr\">keyboard_arrow_down</mat-icon>\n </button>\n</h3>\n<div\n [id]=\"'sect_' + _section.id\"\n role=\"region\"\n [attr.aria-labelledby]=\"'accordion_' + _section.id\"\n class=\"accordion-panel\"\n>\n @if (fo) {\n <yuv-object-form\n #objectForm\n [hidden]=\"!expanded()\"\n [readonly]=\"readonly()\"\n [formOptions]=\"fo\"\n [elementExtensions]=\"elementExtensions()\"\n (statusChanged)=\"statusChanged.emit($event)\"\n />\n }\n</div>\n", styles: [":host{--section-state-border-color: var(--ymt-outline-variant);--section-state-outline-color: transparent;background-color:var(--_object-metadata-section-background);border:1px solid var(--section-state-border-color);border-radius:var(--_object-metadata-section-corner);outline:3px solid var(--section-state-outline-color)}:host.invalid{--section-state-border-color: var(--ymt-danger);--section-state-outline-color: rgb(from var(--ymt-danger) r g b /.2)}:host.dirty:not(.invalid){--section-state-border-color: var(--ymt-success);--section-state-outline-color: rgb(from var(--ymt-success) r g b /.2)}:host h3{margin:0;padding:0;display:flex}:host h3 button{margin:var(--ymt-spacing-2xs);border-radius:calc(var(--_object-metadata-section-corner) * .5);flex:1;padding:var(--ymt-spacing-xs);cursor:pointer;display:flex;gap:var(--ymt-spacing-xs);align-items:center;font-weight:700;color:var(--ymt-text-color-subtle);background-color:transparent;border:none}:host h3 button:hover{background-color:var(--ymt-hover-background)}:host h3 button:focus-visible{background-color:var(--ymt-hover-background);outline:2px solid var(--ymt-outline);outline-offset:-2px}:host h3 button[aria-expanded=true] mat-icon.arr{transform:rotate(180deg)}:host h3 button span{flex:1;text-align:start}:host h3 button mat-icon{margin-inline-end:var(--ymt-spacing-xs);transition:transform .3s ease}:host details{background-color:var(--_object-metadata-section-background);border:1px solid var(--ymt-outline-variant);border-radius:var(--_object-metadata-section-corner)}:host details:not(:last-child){margin-block-end:var(--ymt-spacing-m)}:host details[open] yuv-icon.arr{transform:rotate(180deg)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i2$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: ObjectFormComponent, selector: "yuv-object-form", inputs: ["formOptions", "inert", "readonly", "elementExtensions", "isInnerTableForm"], outputs: ["statusChanged", "onFormReady"] }] }); }
|
|
412
421
|
}
|
|
413
422
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectMetadataSectionComponent, decorators: [{
|
|
414
423
|
type: Component,
|