@yuuvis/client-framework 3.5.0 → 3.6.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.
@@ -1,17 +1,17 @@
1
1
  import * as i1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, signal, input, effect, Component, computed, ChangeDetectionStrategy, Injectable, viewChild, linkedSignal, untracked, output, viewChildren, NgModule, Pipe } from '@angular/core';
4
+ import { inject, signal, computed, input, effect, Component, 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
7
  import * as i2 from '@angular/material/icon';
8
8
  import { MatIconModule } from '@angular/material/icon';
9
- import { AuditService, EventService, LocalizationService, TranslateService, YuvEventType, LocaleDatePipe, TranslatePipe, ObjectConfigService, Utils, DmsService, SystemService, Situation, PendingChangesService, NotificationService, UserService, ObjectLockingService, TabGuardDirective } from '@yuuvis/client-core';
9
+ import { AuditService, EventService, YuvEventType, LocaleDatePipe, TranslatePipe, ObjectConfigService, Utils, DmsService, TranslateService, SystemService, Situation, PendingChangesService, NotificationService, UserService, ObjectLockingService, TabGuardDirective } from '@yuuvis/client-core';
10
10
  import { BusyOverlayDirective, RetentionBadgeComponent } from '@yuuvis/client-framework/common';
11
11
  import { YUV_ICONS } from '@yuuvis/client-framework/icons';
12
+ import { AuditRendererDirective, RendererDirective } from '@yuuvis/client-framework/renderer';
12
13
  import { YmtIconButtonDirective, YmtButtonDirective } from '@yuuvis/material';
13
14
  import { finalize, of, map } from 'rxjs';
14
- import { RendererDirective } from '@yuuvis/client-framework/renderer';
15
15
  import * as i1$1 from '@yuuvis/material/panes';
16
16
  import { YmtPanesModule } from '@yuuvis/material/panes';
17
17
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -27,8 +27,6 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
27
27
  class ObjectAuditComponent {
28
28
  #auditService;
29
29
  #eventService;
30
- #localization;
31
- #translate;
32
30
  #objectID;
33
31
  #objectTypeID;
34
32
  #dmsObjectEffect;
@@ -38,18 +36,19 @@ class ObjectAuditComponent {
38
36
  constructor() {
39
37
  this.#auditService = inject(AuditService);
40
38
  this.#eventService = inject(EventService);
41
- this.#localization = inject(LocalizationService);
42
- this.#translate = inject(TranslateService);
43
39
  this.icons = {
44
40
  filter: YUV_ICONS.filter,
45
41
  arrowNext: YUV_ICONS.arrowNext
46
42
  };
47
43
  this.auditsRes = signal(undefined, ...(ngDevMode ? [{ debugName: "auditsRes" }] : /* istanbul ignore next */ []));
48
- this.resolvedItems = signal([], ...(ngDevMode ? [{ debugName: "resolvedItems" }] : /* istanbul ignore next */ []));
44
+ // TODO: please recheck that.
45
+ // TODO: Remove this filter once the system:ren:text audit lifecycle planning is complete and the tag's
46
+ // purpose is fully defined.
47
+ // eslint-disable-next-line max-len
48
+ // https://help.optimal-systems.com/yuuvis/Momentum/latest/index.html#_content_renditions_asynchronous_full_text_indexing.html
49
+ this.items = computed(() => (this.auditsRes()?.items ?? []).filter((i) => !i.detail.includes('[system:ren:text, 1]')), ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
49
50
  this.error = signal(false, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
50
51
  this.busy = signal(false, ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
51
- this.searchActions = [];
52
- this.auditLabels = {};
53
52
  this.dmsObject = input(undefined, ...(ngDevMode ? [{ debugName: "dmsObject" }] : /* istanbul ignore next */ []));
54
53
  this.#dmsObjectEffect = effect(() => {
55
54
  const dmsObject = this.dmsObject();
@@ -76,29 +75,6 @@ class ObjectAuditComponent {
76
75
  * Whether or not to ignore admin and user separation of audit entries
77
76
  */
78
77
  this.allActions = input(false, ...(ngDevMode ? [{ debugName: "allActions" }] : /* istanbul ignore next */ []));
79
- this.auditLabels = {
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')
101
- };
102
78
  this.#eventService
103
79
  .on(YuvEventType.DMS_OBJECT_UPDATED)
104
80
  .pipe(takeUntilDestroyed())
@@ -126,7 +102,6 @@ class ObjectAuditComponent {
126
102
  .subscribe({
127
103
  next: (res) => {
128
104
  this.auditsRes.set(res);
129
- this.resolvedItems.set(this.#mapResult(res));
130
105
  },
131
106
  error: () => {
132
107
  this.#onError();
@@ -147,7 +122,6 @@ class ObjectAuditComponent {
147
122
  next: (res) => {
148
123
  this.busy.set(false);
149
124
  this.auditsRes.set(res);
150
- this.resolvedItems.set(this.#mapResult(res));
151
125
  },
152
126
  error: () => {
153
127
  this.busy.set(false);
@@ -155,44 +129,8 @@ class ObjectAuditComponent {
155
129
  }
156
130
  });
157
131
  }
158
- #mapResult(res) {
159
- return (res.items
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
164
- // https://help.optimal-systems.com/yuuvis/Momentum/latest/index.html#_content_renditions_asynchronous_full_text_indexing.html
165
- .filter((i) => !i.detail.includes('[system:ren:text, 1]'))
166
- .map((i) => {
167
- const auditEntry = { ...i, label: this.auditLabels['a' + i.action] };
168
- // tag related audits
169
- if ([110, 210, 310].includes(i.action)) {
170
- const params = this.#getAuditEntryParams(i);
171
- if (params) {
172
- const localizedLabel = `${params[0]}:${params[1]}`;
173
- auditEntry.more = `${this.#localization.getLocalizedLabel(params[0]) ?? params[0]}: ${this.#localization.getLocalizedLabel(localizedLabel) ?? localizedLabel}`;
174
- }
175
- }
176
- // restore audit
177
- else if (i.action === 325) {
178
- const params = this.#getAuditEntryParams(i);
179
- auditEntry.more = this.#translate.instant('yuv.audit.label.update.restore.more', {
180
- version: params[0] || '[?]'
181
- });
182
- }
183
- // custom audits
184
- else if (i.action === 10000) {
185
- auditEntry.label = this.#localization.getLocalizedLabel(`audit:custom:${i.subaction}`) || `${i.subaction}`;
186
- }
187
- return auditEntry;
188
- }));
189
- }
190
- #getAuditEntryParams(auditItem) {
191
- const auditDetailMatch = auditItem.detail.match(/\[(.*?)\]/);
192
- return auditDetailMatch?.[1]?.split(',').map((i) => i.trim()) ?? [];
193
- }
194
132
  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" }] }); }
133
+ 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 = items();\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]=\"'date-' + $index + ' content-' + $index + ' version-' + $index + ' creator-' + $index\"\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 <div class=\"content\" [id]=\"'content-' + $index\"><ng-container [yuvAuditRenderer]=\"item\" /></div>\n <span class=\"version\" [id]=\"'version-' + $index\">{{ 'yuv.audit.label.version' | translate: { version: item.version } }}</span>\n </div>\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) 2fr;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:flex-start}:host .timeline :where(.audit) .node .label .content{flex:1;min-width:0;word-break:break-word}:host .timeline :where(.audit) .node .label .content .title{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: "directive", type: AuditRendererDirective, selector: "[yuvAuditRenderer]", inputs: ["yuvAuditRenderer"] }, { kind: "pipe", type: LocaleDatePipe, name: "localeDate" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
196
134
  }
197
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, decorators: [{
198
136
  type: Component,
@@ -203,8 +141,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
203
141
  BusyOverlayDirective,
204
142
  TranslatePipe,
205
143
  MatIconModule,
206
- YmtIconButtonDirective
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"] }]
144
+ YmtIconButtonDirective,
145
+ AuditRendererDirective
146
+ ], 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 = items();\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]=\"'date-' + $index + ' content-' + $index + ' version-' + $index + ' creator-' + $index\"\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 <div class=\"content\" [id]=\"'content-' + $index\"><ng-container [yuvAuditRenderer]=\"item\" /></div>\n <span class=\"version\" [id]=\"'version-' + $index\">{{ 'yuv.audit.label.version' | translate: { version: item.version } }}</span>\n </div>\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) 2fr;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:flex-start}:host .timeline :where(.audit) .node .label .content{flex:1;min-width:0;word-break:break-word}:host .timeline :where(.audit) .node .label .content .title{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
147
  }], 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 }] }] } });
209
148
 
210
149
  /**