@yuuvis/client-framework 3.4.2 → 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,18 +1,17 @@
1
- import * as i2 from '@angular/common';
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, inject, 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
- import * as i3 from '@angular/material/icon';
7
+ import * as i2 from '@angular/material/icon';
8
8
  import { MatIconModule } from '@angular/material/icon';
9
- import * as i1 from '@yuuvis/client-core';
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, YuvEventType, LocaleDatePipe, TranslatePipe, ObjectConfigService, Utils, DmsService, TranslateService, 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';
12
+ import { AuditRendererDirective, RendererDirective } from '@yuuvis/client-framework/renderer';
13
13
  import { YmtIconButtonDirective, YmtButtonDirective } from '@yuuvis/material';
14
14
  import { finalize, of, map } from 'rxjs';
15
- import { RendererDirective } from '@yuuvis/client-framework/renderer';
16
15
  import * as i1$1 from '@yuuvis/material/panes';
17
16
  import { YmtPanesModule } from '@yuuvis/material/panes';
18
17
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -26,37 +25,41 @@ 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
+ #objectID;
31
+ #objectTypeID;
29
32
  #dmsObjectEffect;
30
33
  get objectID() {
31
- return this._objectID;
34
+ return this.#objectID;
32
35
  }
33
- constructor(auditService, eventService, system, translate) {
34
- this.auditService = auditService;
35
- this.eventService = eventService;
36
- this.system = system;
37
- this.translate = translate;
38
- this.FILTER_CACHE_KEY = 'yuv.audit.filters';
36
+ constructor() {
37
+ this.#auditService = inject(AuditService);
38
+ this.#eventService = inject(EventService);
39
39
  this.icons = {
40
40
  filter: YUV_ICONS.filter,
41
41
  arrowNext: YUV_ICONS.arrowNext
42
42
  };
43
43
  this.auditsRes = signal(undefined, ...(ngDevMode ? [{ debugName: "auditsRes" }] : /* istanbul ignore next */ []));
44
- 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 */ []));
45
50
  this.error = signal(false, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
46
51
  this.busy = signal(false, ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
47
- this.searchActions = [];
48
- this.auditLabels = {};
49
52
  this.dmsObject = input(undefined, ...(ngDevMode ? [{ debugName: "dmsObject" }] : /* istanbul ignore next */ []));
50
53
  this.#dmsObjectEffect = effect(() => {
51
- const o = this.dmsObject();
52
- if (!o) {
53
- this._objectID = undefined;
54
- this._objectTypeID = undefined;
54
+ const dmsObject = this.dmsObject();
55
+ if (!dmsObject) {
56
+ this.#objectID = undefined;
57
+ this.#objectTypeID = undefined;
55
58
  this.auditsRes.set(undefined);
56
59
  }
57
- else if (!this._objectID || this._objectID !== o.id) {
58
- this._objectID = o.id;
59
- this._objectTypeID = o.objectTypeId;
60
+ else if (!this.#objectID || this.#objectID !== dmsObject.id) {
61
+ this.#objectID = dmsObject.id;
62
+ this.#objectTypeID = dmsObject.objectTypeId;
60
63
  this.query();
61
64
  }
62
65
  else {
@@ -72,88 +75,17 @@ class ObjectAuditComponent {
72
75
  * Whether or not to ignore admin and user separation of audit entries
73
76
  */
74
77
  this.allActions = input(false, ...(ngDevMode ? [{ debugName: "allActions" }] : /* istanbul ignore next */ []));
75
- this.auditLabels = {
76
- a100: this.translate.instant('yuv.audit.label.create.metadata'),
77
- a101: this.translate.instant('yuv.audit.label.create.metadata.withcontent'),
78
- a110: this.translate.instant('yuv.audit.label.create.tag'),
79
- a200: this.translate.instant('yuv.audit.label.delete'),
80
- a201: this.translate.instant('yuv.audit.label.delete.content'), // #v
81
- a202: this.translate.instant('yuv.audit.label.delete.marked'),
82
- a210: this.translate.instant('yuv.audit.label.delete.tag'), // #v
83
- a220: this.translate.instant('yuv.audit.label.delete.version'), // #v
84
- a300: this.translate.instant('yuv.audit.label.update.metadata'),
85
- a301: this.translate.instant('yuv.audit.label.update.content'),
86
- a302: this.translate.instant('yuv.audit.label.update.metadata.withcontent'),
87
- a303: this.translate.instant('yuv.audit.label.update.move.content'),
88
- a310: this.translate.instant('yuv.audit.label.update.tag'),
89
- a325: this.translate.instant('yuv.audit.label.update.restore'),
90
- a340: this.translate.instant('yuv.audit.label.update.move'),
91
- a400: this.translate.instant('yuv.audit.label.get.content'),
92
- a401: this.translate.instant('yuv.audit.label.get.metadata'),
93
- a402: this.translate.instant('yuv.audit.label.get.rendition.text'),
94
- a403: this.translate.instant('yuv.audit.label.get.rendition.pdf'),
95
- a404: this.translate.instant('yuv.audit.label.get.rendition.thumbnail'),
96
- a10000: this.translate.instant('yuv.audit.label.get.custom')
97
- };
98
- this.eventService
78
+ this.#eventService
99
79
  .on(YuvEventType.DMS_OBJECT_UPDATED)
100
80
  .pipe(takeUntilDestroyed())
101
- .subscribe((e) => {
102
- const dmsObject = e.data;
81
+ .subscribe((event) => {
82
+ const dmsObject = event.data;
103
83
  // reload audit entries when update belongs to the current dms object
104
84
  if (dmsObject.id === this.objectID) {
105
85
  this.query();
106
86
  }
107
87
  });
108
88
  }
109
- #fetchAuditEntries() {
110
- if (!this._objectID || !this._objectTypeID)
111
- return;
112
- this.error.set(false);
113
- this.busy.set(true);
114
- this.auditService.getAuditEntries(this._objectID, { skipActions: this.skipActions() }).subscribe({
115
- next: (res) => {
116
- this.busy.set(false);
117
- this.auditsRes.set(res);
118
- this.resolvedItems.set(this.#mapResult(res));
119
- },
120
- error: () => {
121
- this.busy.set(false);
122
- this.onError();
123
- }
124
- });
125
- }
126
- #mapResult(res) {
127
- return (res.items
128
- // TODO: Remove this filter once the system:ren:text audit lifecycle planning is complete and the tag's purpose is fully defined.
129
- // https://help.optimal-systems.com/yuuvis/Momentum/latest/index.html#_content_renditions_asynchronous_full_text_indexing.html
130
- .filter((i) => !i.detail.includes('[system:ren:text, 1]'))
131
- .map((i) => {
132
- const r = { ...i, label: this.auditLabels['a' + i.action] };
133
- // tag related audits
134
- if ([110, 210, 310].includes(i.action)) {
135
- const params = this.#getAuditEntryParams(i);
136
- if (params) {
137
- const localizedLabel = `${params[0]}:${params[1]}`;
138
- r.more = `${this.system.getLocalizedLabel(params[0]) ?? params[0]}: ${this.system.getLocalizedLabel(localizedLabel) ?? localizedLabel}`;
139
- }
140
- }
141
- // restore audit
142
- else if (i.action === 325) {
143
- const params = this.#getAuditEntryParams(i);
144
- r.more = this.translate.instant('yuv.audit.label.update.restore.more', { version: params[0] || '[?]' });
145
- }
146
- // custom audits
147
- else if (i.action === 10000) {
148
- r.label = this.system.getLocalizedLabel(`audit:custom:${i.subaction}`) || `${i.subaction}`;
149
- }
150
- return r;
151
- }));
152
- }
153
- #getAuditEntryParams(auditItem) {
154
- const m = auditItem.detail.match(/\[(.*?)\]/);
155
- return m && m[1] ? m[1].split(',').map((i) => i.trim()) : [];
156
- }
157
89
  /**
158
90
  * Execute a query from the search panel.
159
91
  */
@@ -164,26 +96,41 @@ class ObjectAuditComponent {
164
96
  const currentAuditsRes = this.auditsRes();
165
97
  if (currentAuditsRes) {
166
98
  this.busy.set(true);
167
- this.auditService
99
+ this.#auditService
168
100
  .getPage(currentAuditsRes, page)
169
101
  .pipe(finalize(() => this.busy.set(false)))
170
102
  .subscribe({
171
103
  next: (res) => {
172
104
  this.auditsRes.set(res);
173
- this.resolvedItems.set(this.#mapResult(res));
174
105
  },
175
106
  error: () => {
176
- this.onError();
107
+ this.#onError();
177
108
  }
178
109
  });
179
110
  }
180
111
  }
181
- onError() {
112
+ #onError() {
182
113
  this.auditsRes.set(undefined);
183
114
  this.error.set(true);
184
115
  }
185
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, deps: [{ token: i1.AuditService }, { token: i1.EventService }, { token: i1.SystemService }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
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 translate>yuv.audit.fetch.error</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 $index) {\n <li class=\"audit\" attr.aria-labelledby=\"'title-{{ $index }} creator-{{ $index }} date-{{ $index }}'\">\n <time [attr.datetime]=\"item.creationDate\" 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\">{{ 'yuv.audit.label.version' | translate: ({version: item.version}) }}</span>\n </div>\n <div class=\"more meta\">{{ item.more }}</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\" translate>yuv.audit.result.empty</div>\n }\n\n <!-- controls -->\n @if (auditsResult.hasMoreItems || auditsResult.page > 1) {\n <div class=\"footer\" yuvOfflineDisabled>\n <div class=\"paging\">\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>chevron_left</mat-icon>\n </button>\n <div class=\"page\">\n {{ auditsResult.page }}\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>chevron_right</mat-icon>\n </button>\n </div>\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: i2.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: i3.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" }] }); }
116
+ #fetchAuditEntries() {
117
+ if (!this.#objectID || !this.#objectTypeID)
118
+ return;
119
+ this.error.set(false);
120
+ this.busy.set(true);
121
+ this.#auditService.getAuditEntries(this.#objectID, { skipActions: this.skipActions() }).subscribe({
122
+ next: (res) => {
123
+ this.busy.set(false);
124
+ this.auditsRes.set(res);
125
+ },
126
+ error: () => {
127
+ this.busy.set(false);
128
+ this.#onError();
129
+ }
130
+ });
131
+ }
132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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" }] }); }
187
134
  }
188
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, decorators: [{
189
136
  type: Component,
@@ -194,9 +141,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
194
141
  BusyOverlayDirective,
195
142
  TranslatePipe,
196
143
  MatIconModule,
197
- 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 translate>yuv.audit.fetch.error</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 $index) {\n <li class=\"audit\" attr.aria-labelledby=\"'title-{{ $index }} creator-{{ $index }} date-{{ $index }}'\">\n <time [attr.datetime]=\"item.creationDate\" 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\">{{ 'yuv.audit.label.version' | translate: ({version: item.version}) }}</span>\n </div>\n <div class=\"more meta\">{{ item.more }}</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\" translate>yuv.audit.result.empty</div>\n }\n\n <!-- controls -->\n @if (auditsResult.hasMoreItems || auditsResult.page > 1) {\n <div class=\"footer\" yuvOfflineDisabled>\n <div class=\"paging\">\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>chevron_left</mat-icon>\n </button>\n <div class=\"page\">\n {{ auditsResult.page }}\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>chevron_right</mat-icon>\n </button>\n </div>\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"] }]
199
- }], ctorParameters: () => [{ type: i1.AuditService }, { type: i1.EventService }, { type: i1.SystemService }, { type: i1.TranslateService }], 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 }] }] } });
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"] }]
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 }] }] } });
200
148
 
201
149
  /**
202
150
  * Component showing header data for a dms object. These will be
@@ -408,7 +356,7 @@ class ObjectMetadataSectionComponent {
408
356
  this.objectForm()?.setFormPristine();
409
357
  }
410
358
  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: i3.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"] }] }); }
359
+ 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
360
  }
413
361
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectMetadataSectionComponent, decorators: [{
414
362
  type: Component,