@yuuvis/client-framework 2.1.0 → 2.1.1
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-forms.mjs +18 -35
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +235 -163
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +39 -19
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs +18 -2
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs +2 -2
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs.map +1 -1
- package/forms/lib/elements/datetime-range/datetime-range.component.d.ts +4 -4
- package/forms/lib/elements/range-select-date/date-range-picker/date-range-picker.component.d.ts +3 -3
- package/lib/assets/i18n/de.json +2 -2
- package/lib/assets/i18n/en.json +2 -2
- package/master-details/index.d.ts +1 -0
- package/object-details/index.d.ts +2 -0
- package/object-details/lib/object-details-header/object-details-header.component.d.ts +26 -0
- package/object-details/lib/object-details-shell/object-details-shell.component.d.ts +26 -38
- package/object-details/lib/object-details.component.d.ts +13 -5
- package/object-details/lib/object-details.module.d.ts +12 -0
- package/package.json +4 -4
- package/tile-list/lib/tile-config/tile-config-tile/tile-config-tile.component.d.ts +3 -3
- package/tile-list/lib/tile-config/tile-config.component.d.ts +3 -2
- package/upload-progress/index.d.ts +1 -0
- package/upload-progress/lib/upload-progress/upload-progress.module.d.ts +7 -0
|
@@ -1,26 +1,189 @@
|
|
|
1
|
-
import * as i1$1 from '@angular/common';
|
|
2
|
-
import { CommonModule, JsonPipe } from '@angular/common';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import * as i2
|
|
6
|
-
import {
|
|
2
|
+
import { inject, input, computed, Component, effect, signal, output, viewChildren, Input, viewChild, untracked, NgModule, Pipe } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
7
5
|
import * as i1 from '@yuuvis/client-core';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { RetentionService, TranslateModule, LocaleDatePipe, ObjectConfigService, TranslateService, EventService, DmsService, YuvEventType, PendingChangesService, NotificationService, SystemService, Situation, ConfigService, UserService } from '@yuuvis/client-core';
|
|
7
|
+
import { RendererDirective } from '@yuuvis/client-framework/renderer';
|
|
8
|
+
import * as i3 from '@angular/material/icon';
|
|
9
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
10
10
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
|
-
import {
|
|
11
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
12
12
|
import { BusyOverlayDirective } from '@yuuvis/client-framework/common';
|
|
13
|
+
import * as i2$1 from '@angular/material/tabs';
|
|
14
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
15
|
+
import { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';
|
|
16
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
13
17
|
import { YUV_ICONS } from '@yuuvis/client-framework/icons';
|
|
14
18
|
import { finalize } from 'rxjs';
|
|
15
|
-
import * as i3 from '@angular/material/icon';
|
|
16
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
17
19
|
import { YmtIconButtonDirective, YmtButtonDirective } from '@yuuvis/material';
|
|
18
|
-
import * as i2 from '@angular/material/tooltip';
|
|
19
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
20
|
-
import { PanelComponent } from '@yuuvis/client-framework/panel';
|
|
21
20
|
import { MatButtonModule } from '@angular/material/button';
|
|
22
21
|
import { ObjectFormComponent } from '@yuuvis/client-framework/object-form';
|
|
23
22
|
|
|
23
|
+
class RetentionBadgeComponent {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.#retention = inject(RetentionService);
|
|
26
|
+
this.dmsObject = input.required();
|
|
27
|
+
this.retentionData = computed(() => {
|
|
28
|
+
return this.#retention.getRetentionState(this.dmsObject());
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
#retention;
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: RetentionBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: RetentionBadgeComponent, isStandalone: true, selector: "yuv-retention-badge", inputs: { dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let rd = retentionData();\n@if (rd.underRetention) {\n <div class=\"badge\">\n <span class=\"badge__icon\">\n <mat-icon class=\"ymt-icon--size-s\">lock_clock</mat-icon>\n </span>\n <span class=\"badge__label\">\n <span class=\"badge__label-truncated\">\n {{\n 'yuv.retention-badge.retain'\n | translate\n : {\n from: rd.start | localeDate: 'shortDate',\n until: rd.end | localeDate: 'shortDate'\n }\n }}\n </span>\n </span>\n </div>\n}\n", styles: [":host{display:contents}:host .badge{font:var(--ymt-font-body-subtle);color:var(--badge-retention-color, var(--ymt-on-surface));display:inline-flex;overflow:hidden;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-s) var(--ymt-spacing-2xs) var(--ymt-spacing-xs);background-color:var(--badge-retention-background, var(--ymt-primary-container));border-radius:var(--ymt-corner-full);gap:var(--ymt-spacing-s)}:host .badge__icon{flex-shrink:0;color:var(--badge-retention-icon-color, var(--ymt-on-primary-container));display:flex;align-items:center;justify-content:center}:host .badge__label{color:var(--badge-retention-color, var(--ymt-on-surface));align-self:stretch;display:flex;align-items:center;justify-content:center;border-top-right-radius:var(--ymt-corner-full);border-bottom-right-radius:var(--ymt-corner-full);overflow:hidden}:host .badge__label-truncated{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: LocaleDatePipe, name: "localeDate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
34
|
+
}
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: RetentionBadgeComponent, decorators: [{
|
|
36
|
+
type: Component,
|
|
37
|
+
args: [{ selector: 'yuv-retention-badge', standalone: true, imports: [CommonModule, TranslateModule, LocaleDatePipe, MatIconModule], template: "@let rd = retentionData();\n@if (rd.underRetention) {\n <div class=\"badge\">\n <span class=\"badge__icon\">\n <mat-icon class=\"ymt-icon--size-s\">lock_clock</mat-icon>\n </span>\n <span class=\"badge__label\">\n <span class=\"badge__label-truncated\">\n {{\n 'yuv.retention-badge.retain'\n | translate\n : {\n from: rd.start | localeDate: 'shortDate',\n until: rd.end | localeDate: 'shortDate'\n }\n }}\n </span>\n </span>\n </div>\n}\n", styles: [":host{display:contents}:host .badge{font:var(--ymt-font-body-subtle);color:var(--badge-retention-color, var(--ymt-on-surface));display:inline-flex;overflow:hidden;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-s) var(--ymt-spacing-2xs) var(--ymt-spacing-xs);background-color:var(--badge-retention-background, var(--ymt-primary-container));border-radius:var(--ymt-corner-full);gap:var(--ymt-spacing-s)}:host .badge__icon{flex-shrink:0;color:var(--badge-retention-icon-color, var(--ymt-on-primary-container));display:flex;align-items:center;justify-content:center}:host .badge__label{color:var(--badge-retention-color, var(--ymt-on-surface));align-self:stretch;display:flex;align-items:center;justify-content:center;border-top-right-radius:var(--ymt-corner-full);border-bottom-right-radius:var(--ymt-corner-full);overflow:hidden}:host .badge__label-truncated{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block}\n"] }]
|
|
38
|
+
}] });
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Component showing header data for a dms object. These will be
|
|
42
|
+
* generated from the object config for the given object.
|
|
43
|
+
*/
|
|
44
|
+
class ObjectDetailsHeaderComponent {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.#objectConfig = inject(ObjectConfigService);
|
|
47
|
+
this.dmsObject = input(undefined);
|
|
48
|
+
this.#dmsObjectEffect = effect(() => {
|
|
49
|
+
const o = this.dmsObject();
|
|
50
|
+
const t = this.type();
|
|
51
|
+
if (o && t)
|
|
52
|
+
this.#setHeaderData();
|
|
53
|
+
else
|
|
54
|
+
this.headerData = undefined;
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* Virtual object type to use for retrieving header data
|
|
58
|
+
*/
|
|
59
|
+
this.type = input.required();
|
|
60
|
+
/**
|
|
61
|
+
* Bucket of the object config to retrieve header data from
|
|
62
|
+
*/
|
|
63
|
+
this.bucket = input(undefined);
|
|
64
|
+
}
|
|
65
|
+
#objectConfig;
|
|
66
|
+
#dmsObjectEffect;
|
|
67
|
+
#setHeaderData() {
|
|
68
|
+
const o = this.dmsObject();
|
|
69
|
+
if (!o) {
|
|
70
|
+
this.headerData = undefined;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
const roc = this.#objectConfig.getResolvedObjectConfig(o.data, this.type(), this.bucket());
|
|
74
|
+
this.headerData = {
|
|
75
|
+
title: roc.title,
|
|
76
|
+
description: roc.description,
|
|
77
|
+
icon: roc.icon?.value
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
82
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectDetailsHeaderComponent, isStandalone: true, selector: "yuv-object-details-header", inputs: { dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let dmsObj = dmsObject();\n@if (dmsObj && headerData) {\n <div class=\"icon\">\n <mat-icon>{{ headerData.icon }}</mat-icon>\n </div>\n <h2><ng-container *yuvRenderer=\"headerData.title\"></ng-container></h2>\n <div class=\"description\"><ng-container *yuvRenderer=\"headerData.description\"></ng-container></div>\n <div class=\"badges\">\n <yuv-retention-badge [dmsObject]=\"dmsObj\"></yuv-retention-badge>\n </div>\n}\n", styles: [":host{display:grid;padding:var(--ymt-spacing-m);grid-template-rows:auto auto;grid-template-columns:auto 1fr;grid-template-areas:\"icon title\" \"icon description\" \". badges\";row-gap:var(--ymt-spacing-xs);column-gap:var(--ymt-spacing-m)}:host .icon{grid-area:icon}:host h2{grid-area:title;margin:0}:host .description{grid-area:description}:host .badges{grid-area:badges}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }, { kind: "component", type: RetentionBadgeComponent, selector: "yuv-retention-badge", inputs: ["dmsObject"] }] }); }
|
|
83
|
+
}
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsHeaderComponent, decorators: [{
|
|
85
|
+
type: Component,
|
|
86
|
+
args: [{ selector: 'yuv-object-details-header', imports: [CommonModule, MatIconModule, RendererDirective, RetentionBadgeComponent], template: "@let dmsObj = dmsObject();\n@if (dmsObj && headerData) {\n <div class=\"icon\">\n <mat-icon>{{ headerData.icon }}</mat-icon>\n </div>\n <h2><ng-container *yuvRenderer=\"headerData.title\"></ng-container></h2>\n <div class=\"description\"><ng-container *yuvRenderer=\"headerData.description\"></ng-container></div>\n <div class=\"badges\">\n <yuv-retention-badge [dmsObject]=\"dmsObj\"></yuv-retention-badge>\n </div>\n}\n", styles: [":host{display:grid;padding:var(--ymt-spacing-m);grid-template-rows:auto auto;grid-template-columns:auto 1fr;grid-template-areas:\"icon title\" \"icon description\" \". badges\";row-gap:var(--ymt-spacing-xs);column-gap:var(--ymt-spacing-m)}:host .icon{grid-area:icon}:host h2{grid-area:title;margin:0}:host .description{grid-area:description}:host .badges{grid-area:badges}\n"] }]
|
|
87
|
+
}] });
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Wrapper component for details of a dms object. This component
|
|
91
|
+
* provides a header based on the object configuration for the given object.
|
|
92
|
+
* It will also take care of loading the object if you only provide the objects ID.
|
|
93
|
+
*/
|
|
94
|
+
class ObjectDetailsShellComponent {
|
|
95
|
+
#eventService;
|
|
96
|
+
#dmsService;
|
|
97
|
+
#dmsObjectEffect;
|
|
98
|
+
#objectIdEffect;
|
|
99
|
+
constructor() {
|
|
100
|
+
// this.#objectConfig
|
|
101
|
+
// .getObjectConfigs$()
|
|
102
|
+
// // this.objectConfigService.getObjectConfigs$(this.bucket || '')
|
|
103
|
+
// .pipe(takeUntilDestroyed())
|
|
104
|
+
// .subscribe((res: ObjectConfigRecord) => {
|
|
105
|
+
// this.oc = res;
|
|
106
|
+
// if (this._dmsObject) this._getHeaderData();
|
|
107
|
+
// });
|
|
108
|
+
this.translate = inject(TranslateService);
|
|
109
|
+
this.#eventService = inject(EventService);
|
|
110
|
+
this.#dmsService = inject(DmsService);
|
|
111
|
+
this.retentionState = signal(undefined);
|
|
112
|
+
this.busy = signal(false);
|
|
113
|
+
/**
|
|
114
|
+
* DmsObject to show the details for.
|
|
115
|
+
*/
|
|
116
|
+
this.dmsObject = input(undefined);
|
|
117
|
+
this._dmsObject = signal(undefined);
|
|
118
|
+
this.#dmsObjectEffect = effect(() => {
|
|
119
|
+
this._dmsObject.set(this.dmsObject());
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* Virtual object type to use for retrieving header data
|
|
123
|
+
*/
|
|
124
|
+
this.type = input.required();
|
|
125
|
+
/**
|
|
126
|
+
* Bucket of the object config to retrieve header data from
|
|
127
|
+
*/
|
|
128
|
+
this.bucket = input(undefined);
|
|
129
|
+
/**
|
|
130
|
+
* ID to store the components layout state (splitted tabs, gutter position)
|
|
131
|
+
*/
|
|
132
|
+
this.layoutSettingsID = input(undefined);
|
|
133
|
+
/**
|
|
134
|
+
* ID of a DmsObject. The object will be fetched from the backend upfront.
|
|
135
|
+
*/
|
|
136
|
+
this.objectId = input(undefined);
|
|
137
|
+
this.#objectIdEffect = effect(() => {
|
|
138
|
+
const oid = this.objectId();
|
|
139
|
+
if (oid)
|
|
140
|
+
this.#getDmsObject(oid);
|
|
141
|
+
else
|
|
142
|
+
this._dmsObject.set(undefined);
|
|
143
|
+
});
|
|
144
|
+
this.dmsObjectChange = output();
|
|
145
|
+
this.#eventService
|
|
146
|
+
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
147
|
+
.pipe(takeUntilDestroyed())
|
|
148
|
+
.subscribe((e) => {
|
|
149
|
+
const o = e.data;
|
|
150
|
+
const dmsObj = this._dmsObject();
|
|
151
|
+
if (dmsObj && dmsObj.id === o.id)
|
|
152
|
+
this._dmsObject.set(o);
|
|
153
|
+
});
|
|
154
|
+
this.#eventService
|
|
155
|
+
.on(YuvEventType.DMS_OBJECT_DELETED)
|
|
156
|
+
.pipe(takeUntilDestroyed())
|
|
157
|
+
.subscribe((e) => {
|
|
158
|
+
if (e.data?.id === this._dmsObject()?.id) {
|
|
159
|
+
this._dmsObject.set(undefined);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
#getDmsObject(id) {
|
|
164
|
+
this.busy.set(true);
|
|
165
|
+
this.#dmsService.getDmsObject(id).subscribe({
|
|
166
|
+
next: (dmsObject) => this._dmsObject.set(dmsObject),
|
|
167
|
+
error: () => {
|
|
168
|
+
this._dmsObject.set(undefined);
|
|
169
|
+
this.contextError = this.translate.instant('yuv.object-metadata.context.load.error');
|
|
170
|
+
},
|
|
171
|
+
complete: () => {
|
|
172
|
+
this.busy.set(false);
|
|
173
|
+
const o = this._dmsObject();
|
|
174
|
+
if (o)
|
|
175
|
+
this.dmsObjectChange.emit(o);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectDetailsShellComponent, isStandalone: true, selector: "yuv-object-details-shell", inputs: { dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, layoutSettingsID: { classPropertyName: "layoutSettingsID", publicName: "layoutSettingsID", isSignal: true, isRequired: false, transformFunction: null }, objectId: { classPropertyName: "objectId", publicName: "objectId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dmsObjectChange: "dmsObjectChange" }, ngImport: i0, template: "@let dmsObj = _dmsObject();\n@if (dmsObj) {\n <yuv-object-details-header [dmsObject]=\"dmsObj\" [type]=\"type()\" [bucket]=\"bucket()\"></yuv-object-details-header>\n <div class=\"content\" [yuvBusyOverlay]=\"busy()\">\n <ng-content></ng-content>\n </div>\n} @else {\n <div class=\"empty\">\n @if (contextError) {\n <div class=\"error\">{{ contextError }}</div>\n } @else {\n <!-- EMPTY -->\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;position:relative;background-color:var(--ymt-surface)}:host .content{flex:1}:host .empty{height:100%;display:grid;align-items:center;justify-content:center}:host .empty .error{max-width:40ch;margin:var(--ymt-spacing-m);color:var(--ymt-text-color-subtle);padding:var(--ymt-spacing-s);border-radius:.5em;line-height:1.5em;border:1px solid var(--ymt-outline-variant)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ObjectDetailsHeaderComponent, selector: "yuv-object-details-header", inputs: ["dmsObject", "type", "bucket"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay"] }] }); }
|
|
181
|
+
}
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsShellComponent, decorators: [{
|
|
183
|
+
type: Component,
|
|
184
|
+
args: [{ selector: 'yuv-object-details-shell', standalone: true, imports: [CommonModule, ObjectDetailsHeaderComponent, MatTooltipModule, BusyOverlayDirective], template: "@let dmsObj = _dmsObject();\n@if (dmsObj) {\n <yuv-object-details-header [dmsObject]=\"dmsObj\" [type]=\"type()\" [bucket]=\"bucket()\"></yuv-object-details-header>\n <div class=\"content\" [yuvBusyOverlay]=\"busy()\">\n <ng-content></ng-content>\n </div>\n} @else {\n <div class=\"empty\">\n @if (contextError) {\n <div class=\"error\">{{ contextError }}</div>\n } @else {\n <!-- EMPTY -->\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;position:relative;background-color:var(--ymt-surface)}:host .content{flex:1}:host .empty{height:100%;display:grid;align-items:center;justify-content:center}:host .empty .error{max-width:40ch;margin:var(--ymt-spacing-m);color:var(--ymt-text-color-subtle);padding:var(--ymt-spacing-s);border-radius:.5em;line-height:1.5em;border:1px solid var(--ymt-outline-variant)}\n"] }]
|
|
185
|
+
}], ctorParameters: () => [] });
|
|
186
|
+
|
|
24
187
|
class ObjectAuditComponent {
|
|
25
188
|
#dmsObjectEffect;
|
|
26
189
|
get objectID() {
|
|
@@ -180,134 +343,13 @@ class ObjectAuditComponent {
|
|
|
180
343
|
this.error = true;
|
|
181
344
|
}
|
|
182
345
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectAuditComponent, deps: [{ token: i1.AuditService }, { token: i1.EventService }, { token: i1.SystemService }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
183
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.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: "<div class=\"yuv-audit\" [ngClass]=\"{ singleEntry: auditsRes?.items?.length === 1, onPage: auditsRes && auditsRes.page > 1 }\" [yuvBusyOverlay]=\"busy\">\n @if (error) {\n <div class=\"error\">\n <div translate>yuv.audit.fetch.error</div>\n </div>\n }\n\n @if (auditsRes) {\n <!-- list of audits -->\n @let resItems = resolvedItems();\n @if (resItems.length) {\n <div class=\"timeline\">\n @for (item of resItems; track $index) {\n <div class=\"audit\">\n <div class=\"date\">{{ item.creationDate | localeDate }}</div>\n <div class=\"node\">\n <div class=\"label\">\n <span class=\"title\">{{ item.label }}</span> \n </div>\n <div class=\"more meta\">{{ item.more }}</div>\n <div class=\"creator meta\">{{ item.createdBy.title }}</div>\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty\" translate>yuv.audit.result.empty</div>\n }\n\n <!-- controls -->\n @if (auditsRes.hasMoreItems || auditsRes.page > 1) {\n <div class=\"footer\" yuvOfflineDisabled>\n <div class=\"paging\">\n <button ymtIconButton [attr.aria-label]=\"'yuv.audit.label.paging.prev' | translate\" [disabled]=\"auditsRes.page === 1\" (click)=\"goToPage(auditsRes.page - 1)\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <div class=\"page\">\n {{ auditsRes.page }}\n </div>\n <button ymtIconButton [attr.aria-label]=\"'yuv.audit.label.paging.next' | translate\" [disabled]=\"!auditsRes.hasMoreItems\" (click)=\"goToPage(auditsRes.page + 1)\">\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%;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);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) 1fr;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:end}: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:4px 6px;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:1px solid var(--track-color)}:host .timeline :where(.audit):after{grid-area:line;content:\"\";width:11px;height:11px;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:
|
|
346
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.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: "<div class=\"yuv-audit\" [ngClass]=\"{ singleEntry: auditsRes?.items?.length === 1, onPage: auditsRes && auditsRes.page > 1 }\" [yuvBusyOverlay]=\"busy\">\n @if (error) {\n <div class=\"error\">\n <div translate>yuv.audit.fetch.error</div>\n </div>\n }\n\n @if (auditsRes) {\n <!-- list of audits -->\n @let resItems = resolvedItems();\n @if (resItems.length) {\n <div class=\"timeline\">\n @for (item of resItems; track $index) {\n <div class=\"audit\">\n <div class=\"date\">{{ item.creationDate | localeDate }}</div>\n <div class=\"node\">\n <div class=\"label\">\n <span class=\"title\">{{ item.label }}</span> \n </div>\n <div class=\"more meta\">{{ item.more }}</div>\n <div class=\"creator meta\">{{ item.createdBy.title }}</div>\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty\" translate>yuv.audit.result.empty</div>\n }\n\n <!-- controls -->\n @if (auditsRes.hasMoreItems || auditsRes.page > 1) {\n <div class=\"footer\" yuvOfflineDisabled>\n <div class=\"paging\">\n <button ymtIconButton [attr.aria-label]=\"'yuv.audit.label.paging.prev' | translate\" [disabled]=\"auditsRes.page === 1\" (click)=\"goToPage(auditsRes.page - 1)\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <div class=\"page\">\n {{ auditsRes.page }}\n </div>\n <button ymtIconButton [attr.aria-label]=\"'yuv.audit.label.paging.next' | translate\" [disabled]=\"!auditsRes.hasMoreItems\" (click)=\"goToPage(auditsRes.page + 1)\">\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%;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);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) 1fr;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:end}: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:4px 6px;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:1px solid var(--track-color)}:host .timeline :where(.audit):after{grid-area:line;content:\"\";width:11px;height:11px;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"] }, { kind: "pipe", type: LocaleDatePipe, name: "localeDate" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "directive", type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { 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"] }] }); }
|
|
184
347
|
}
|
|
185
348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectAuditComponent, decorators: [{
|
|
186
349
|
type: Component,
|
|
187
350
|
args: [{ selector: 'yuv-object-audit', standalone: true, imports: [CommonModule, ReactiveFormsModule, BusyOverlayDirective, LocaleDatePipe, TranslateModule, MatIconModule, YmtIconButtonDirective], template: "<div class=\"yuv-audit\" [ngClass]=\"{ singleEntry: auditsRes?.items?.length === 1, onPage: auditsRes && auditsRes.page > 1 }\" [yuvBusyOverlay]=\"busy\">\n @if (error) {\n <div class=\"error\">\n <div translate>yuv.audit.fetch.error</div>\n </div>\n }\n\n @if (auditsRes) {\n <!-- list of audits -->\n @let resItems = resolvedItems();\n @if (resItems.length) {\n <div class=\"timeline\">\n @for (item of resItems; track $index) {\n <div class=\"audit\">\n <div class=\"date\">{{ item.creationDate | localeDate }}</div>\n <div class=\"node\">\n <div class=\"label\">\n <span class=\"title\">{{ item.label }}</span> \n </div>\n <div class=\"more meta\">{{ item.more }}</div>\n <div class=\"creator meta\">{{ item.createdBy.title }}</div>\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty\" translate>yuv.audit.result.empty</div>\n }\n\n <!-- controls -->\n @if (auditsRes.hasMoreItems || auditsRes.page > 1) {\n <div class=\"footer\" yuvOfflineDisabled>\n <div class=\"paging\">\n <button ymtIconButton [attr.aria-label]=\"'yuv.audit.label.paging.prev' | translate\" [disabled]=\"auditsRes.page === 1\" (click)=\"goToPage(auditsRes.page - 1)\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <div class=\"page\">\n {{ auditsRes.page }}\n </div>\n <button ymtIconButton [attr.aria-label]=\"'yuv.audit.label.paging.next' | translate\" [disabled]=\"!auditsRes.hasMoreItems\" (click)=\"goToPage(auditsRes.page + 1)\">\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%;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);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) 1fr;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:end}: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:4px 6px;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:1px solid var(--track-color)}:host .timeline :where(.audit):after{grid-area:line;content:\"\";width:11px;height:11px;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"] }]
|
|
188
351
|
}], ctorParameters: () => [{ type: i1.AuditService }, { type: i1.EventService }, { type: i1.SystemService }, { type: i1.TranslateService }] });
|
|
189
352
|
|
|
190
|
-
class ObjectDetailsShellComponent {
|
|
191
|
-
/**
|
|
192
|
-
* DmsObject to show the details for.
|
|
193
|
-
*/
|
|
194
|
-
set dmsObject(o) {
|
|
195
|
-
this._dmsObject = o;
|
|
196
|
-
// this.objectTypeId = o ? this.systemService.getLeadingObjectTypeID(o.objectTypeId, o.data[BaseObjectTypeField.SECONDARY_OBJECT_TYPE_IDS] as string) : undefined;
|
|
197
|
-
if (this._dmsObject) {
|
|
198
|
-
this._getHeaderData();
|
|
199
|
-
this.retentionEndDate = this._dmsObject.data[RetentionField.RETENTION_END]
|
|
200
|
-
? new Date(this._dmsObject.data[RetentionField.RETENTION_END])
|
|
201
|
-
: undefined;
|
|
202
|
-
const today = new Date();
|
|
203
|
-
this.retentionEnded = this.retentionEndDate && today > this.retentionEndDate;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
get dmsObject() {
|
|
207
|
-
return this._dmsObject;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* ID of a DmsObject. The object will be fetched from the backend upfront.
|
|
211
|
-
*/
|
|
212
|
-
set objectId(id) {
|
|
213
|
-
if (id) {
|
|
214
|
-
this._getDmsObject(id);
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
this.dmsObject = undefined;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
constructor() {
|
|
221
|
-
this.translate = inject(TranslateService);
|
|
222
|
-
this.objectConfigService = inject(ObjectConfigService);
|
|
223
|
-
this.eventService = inject(EventService);
|
|
224
|
-
this.dmsService = inject(DmsService);
|
|
225
|
-
this.systemService = inject(SystemService);
|
|
226
|
-
this.userService = inject(UserService);
|
|
227
|
-
this._subs = [];
|
|
228
|
-
this.busy = false;
|
|
229
|
-
this.isAdvancedUser = this.userService.isAdvancedUser;
|
|
230
|
-
this.dmsObjectChange = new EventEmitter();
|
|
231
|
-
this.objectConfigService
|
|
232
|
-
.getObjectConfigs$()
|
|
233
|
-
// this.objectConfigService.getObjectConfigs$(this.bucket || '')
|
|
234
|
-
.pipe(takeUntilDestroyed())
|
|
235
|
-
.subscribe((res) => {
|
|
236
|
-
this.oc = res;
|
|
237
|
-
if (this._dmsObject)
|
|
238
|
-
this._getHeaderData();
|
|
239
|
-
});
|
|
240
|
-
this.eventService
|
|
241
|
-
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
242
|
-
.pipe(takeUntilDestroyed())
|
|
243
|
-
.subscribe((e) => {
|
|
244
|
-
const o = e.data;
|
|
245
|
-
if (this._dmsObject && this._dmsObject.id === o.id)
|
|
246
|
-
this.dmsObject = o;
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
_getHeaderData() {
|
|
250
|
-
if (this._dmsObject) {
|
|
251
|
-
const oc = this.oc[this._dmsObject.objectTypeId];
|
|
252
|
-
// const ic = oc.icon ? (this._dmsObject.data[oc.icon.propertyName] as string) : this._dmsObject.objectTypeId;
|
|
253
|
-
const icon = {
|
|
254
|
-
title: this.systemService.getLocalizedLabel(this._dmsObject.objectTypeId)
|
|
255
|
-
};
|
|
256
|
-
if (oc.icon)
|
|
257
|
-
icon.svg = oc.icon.svg;
|
|
258
|
-
else
|
|
259
|
-
icon.src = this.systemService.getObjectTypeIconUri(this._dmsObject.objectTypeId);
|
|
260
|
-
this.headerData = {
|
|
261
|
-
icon,
|
|
262
|
-
title: oc.title ? this.dmsObject?.data[oc.title.propertyName] : undefined,
|
|
263
|
-
description: oc.description ? this.dmsObject?.data[oc.description.propertyName] : undefined
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
else
|
|
267
|
-
this.headerData = undefined;
|
|
268
|
-
}
|
|
269
|
-
_getDmsObject(id) {
|
|
270
|
-
this.busy = true;
|
|
271
|
-
this.dmsService.getDmsObject(id).subscribe({
|
|
272
|
-
next: (dmsObject) => (this.dmsObject = dmsObject),
|
|
273
|
-
error: () => {
|
|
274
|
-
this.dmsObject = undefined;
|
|
275
|
-
this.contextError = this.translate.instant('yuv.object-metadata.context.load.error');
|
|
276
|
-
},
|
|
277
|
-
complete: () => {
|
|
278
|
-
this.busy = false;
|
|
279
|
-
this.dmsObjectChange.emit(this.dmsObject);
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
ngOnInit() {
|
|
284
|
-
this._subs.push(this.eventService.on(YuvEventType.DMS_OBJECT_DELETED).subscribe((event) => {
|
|
285
|
-
if (event.data?.id === this._dmsObject?.id) {
|
|
286
|
-
this._dmsObject = undefined;
|
|
287
|
-
}
|
|
288
|
-
}));
|
|
289
|
-
}
|
|
290
|
-
ngOnDestroy() {
|
|
291
|
-
this._subs.forEach((s) => s.unsubscribe());
|
|
292
|
-
}
|
|
293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
294
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.12", type: ObjectDetailsShellComponent, isStandalone: true, selector: "yuv-object-details-shell", inputs: { layoutSettingsID: "layoutSettingsID", dmsObject: "dmsObject", objectId: "objectId" }, outputs: { dmsObjectChange: "dmsObjectChange" }, ngImport: i0, template: "<yuv-panel\n *ngIf=\"dmsObject; else tplEmpty\"\n [yuvBusyOverlay]=\"busy\"\n [icon]=\"headerData?.icon\"\n [matTooltip]=\"headerData?.title\"\n [description]=\"headerData?.description\"\n>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</yuv-panel>\n\n<ng-template #tplEmpty>\n <div class=\"empty\">\n <div class=\"error\" *ngIf=\"contextError; else tplEmptyNoError\">{{ contextError }}</div>\n </div>\n</ng-template>\n\n<ng-template #tplEmptyNoError> EMPTY </ng-template>\n\n\n", styles: [":host{display:block}:host yuv-panel{height:100%}:host .content{height:100%}:host .empty{height:100%;display:grid;align-items:center;justify-content:center}:host .empty .error{max-width:40ch;margin:var(--ymt-spacing-m);color:var(--ymt-text-color-subtle);padding:var(--ymt-spacing-s);border-radius:.5em;line-height:1.5em;border:1px solid var(--ymt-outline-variant)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PanelComponent, selector: "yuv-panel", inputs: ["icon", "title", "description"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay"] }] }); }
|
|
295
|
-
}
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsShellComponent, decorators: [{
|
|
297
|
-
type: Component,
|
|
298
|
-
args: [{ selector: 'yuv-object-details-shell', standalone: true, imports: [CommonModule, PanelComponent,
|
|
299
|
-
MatTooltipModule,
|
|
300
|
-
BusyOverlayDirective], template: "<yuv-panel\n *ngIf=\"dmsObject; else tplEmpty\"\n [yuvBusyOverlay]=\"busy\"\n [icon]=\"headerData?.icon\"\n [matTooltip]=\"headerData?.title\"\n [description]=\"headerData?.description\"\n>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</yuv-panel>\n\n<ng-template #tplEmpty>\n <div class=\"empty\">\n <div class=\"error\" *ngIf=\"contextError; else tplEmptyNoError\">{{ contextError }}</div>\n </div>\n</ng-template>\n\n<ng-template #tplEmptyNoError> EMPTY </ng-template>\n\n\n", styles: [":host{display:block}:host yuv-panel{height:100%}:host .content{height:100%}:host .empty{height:100%;display:grid;align-items:center;justify-content:center}:host .empty .error{max-width:40ch;margin:var(--ymt-spacing-m);color:var(--ymt-text-color-subtle);padding:var(--ymt-spacing-s);border-radius:.5em;line-height:1.5em;border:1px solid var(--ymt-outline-variant)}\n"] }]
|
|
301
|
-
}], ctorParameters: () => [], propDecorators: { layoutSettingsID: [{
|
|
302
|
-
type: Input
|
|
303
|
-
}], dmsObject: [{
|
|
304
|
-
type: Input
|
|
305
|
-
}], dmsObjectChange: [{
|
|
306
|
-
type: Output
|
|
307
|
-
}], objectId: [{
|
|
308
|
-
type: Input
|
|
309
|
-
}] } });
|
|
310
|
-
|
|
311
353
|
class ObjectMetadataComponent {
|
|
312
354
|
constructor() {
|
|
313
355
|
this.#pendingChanges = inject(PendingChangesService);
|
|
@@ -488,7 +530,7 @@ class ObjectMetadataComponent {
|
|
|
488
530
|
this.#formSubscriptions.forEach((s) => s.unsubscribe());
|
|
489
531
|
}
|
|
490
532
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectMetadataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
491
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectMetadataComponent, isStandalone: true, selector: "yuv-object-metadata", inputs: { disableControls: { classPropertyName: "disableControls", publicName: "disableControls", isSignal: true, isRequired: false, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: false, isRequired: false, transformFunction: null }, formDisabled: { classPropertyName: "formDisabled", publicName: "formDisabled", isSignal: false, isRequired: false, transformFunction: null }, dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, flavoredDmsObject: { classPropertyName: "flavoredDmsObject", publicName: "flavoredDmsObject", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indexDataSaved: "indexDataSaved", statusChanged: "statusChanged" }, host: { properties: { "class.empty": "empty()" } }, viewQueries: [{ propertyName: "objectForms", predicate: ObjectFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<main>\n @if (empty()) {\n <p class=\"empty\">{{ 'yuv.object-metadata.empty.message' | translate }}</p>\n } @else {\n <yuv-object-form [formOptions]=\"mainFormOptions()\" (statusChanged)=\"onFormStatusChanged('main', $event)\"></yuv-object-form>\n\n @for (fo of flavorFormOptions(); track $index) {\n <details [attr.open]=\"$index === 0\">\n <summary>\n @if (fo.icon) {\n @if (fo.svgIcon) {\n <mat-icon [svgIcon]=\"fo.icon\"></mat-icon>\n } @else {\n <mat-icon>{{ fo.icon }}</mat-icon>\n }\n }\n <span>{{ fo.label }}</span\n ><mat-icon class=\"arr\">keyboard_arrow_down</mat-icon>\n </summary>\n <yuv-object-form [formOptions]=\"fo.formOptions\" (statusChanged)=\"onFormStatusChanged(fo.id, $event)\"></yuv-object-form>\n </details>\n }\n }\n</main>\n\n<footer [ngClass]=\"{ visible: !disableControls() && controlsVisible() }\">\n <div class=\"container\">\n <button ymtButton=\"secondary\" button-size=\"small\" (click)=\"resetForm()\" [hidden]=\"!combinedFormState?.dirty\" [disabled]=\"!combinedFormState?.dirty\">\n {{ 'yuv.object-metadata.button.reset' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n button-size=\"small\"\n [ngClass]=\"{ spinning: busy() }\"\n (click)=\"save()\"\n [disabled]=\"!combinedFormState?.dirty || combinedFormState?.invalid\"\n >\n {{ 'yuv.object-metadata.button.save' | translate }}\n </button>\n </div>\n</footer>\n", styles: [":host{--_object-metadata-panel-background: var(--object-metadata-footer-background, var(--ymt-surface));--_object-metadata-footer-background: var(--object-metadata-footer-background, var(--ymt-surface-container));--_object-metadata-footer-border-color: var(--object-metadata-footer-border-color, var(--ymt-outline-variant));--_object-metadata-footer-height: 4rem;display:grid;grid-template-rows:1fr auto;grid-template-columns:1fr;height:100%;overflow:hidden;position:relative;background-color:var(--_object-metadata-panel-background)}:host.empty main{justify-content:center;align-items:center}:host main{grid-row:1/span 3;grid-column:1;overflow-y:auto;width:100%;display:flex;flex-flow:column;padding:var(--ymt-spacing-3xl) var(--ymt-spacing-l) var(--_object-metadata-footer-height) var(--ymt-spacing-l)}:host footer{grid-row:-1;grid-column:1;padding:var(--ymt-spacing-l);opacity:0}:host footer .container{background:var(--_object-metadata-footer-background);padding:var(--ymt-spacing-s);display:flex;align-items:center;justify-content:end;gap:var(--ymt-spacing-s);border-radius:var(--ymt-corner-full)}:host footer.visible{animation:controlsAppear .2s ease-in-out forwards}:host main details{background-color:var(--ymt-surface);border:1px solid var(--ymt-outline-variant)}:host main details:not(:last-child){margin-block-end:var(--ymt-spacing-m)}:host main details[open] yuv-icon.arr{transform:rotate(180deg)}:host main details summary{padding:var(--ymt-spacing-xs);cursor:pointer;display:flex;align-items:center;font-weight:700;color:var(--ymt-text-color-subtle);position:relative}:host main details summary span{flex:1}:host main details summary::marker{display:none}:host main details summary mat-icon{margin-inline-end:var(--ymt-spacing-xs)}@keyframes controlsAppear{0%{opacity:0;translate:0 var(--ymt-spacing-m)}to{opacity:1;translate:0 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
533
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectMetadataComponent, isStandalone: true, selector: "yuv-object-metadata", inputs: { disableControls: { classPropertyName: "disableControls", publicName: "disableControls", isSignal: true, isRequired: false, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: false, isRequired: false, transformFunction: null }, formDisabled: { classPropertyName: "formDisabled", publicName: "formDisabled", isSignal: false, isRequired: false, transformFunction: null }, dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, flavoredDmsObject: { classPropertyName: "flavoredDmsObject", publicName: "flavoredDmsObject", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indexDataSaved: "indexDataSaved", statusChanged: "statusChanged" }, host: { properties: { "class.empty": "empty()" } }, viewQueries: [{ propertyName: "objectForms", predicate: ObjectFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<main>\n @if (empty()) {\n <p class=\"empty\">{{ 'yuv.object-metadata.empty.message' | translate }}</p>\n } @else {\n <yuv-object-form [formOptions]=\"mainFormOptions()\" (statusChanged)=\"onFormStatusChanged('main', $event)\"></yuv-object-form>\n\n @for (fo of flavorFormOptions(); track $index) {\n <details [attr.open]=\"$index === 0\">\n <summary>\n @if (fo.icon) {\n @if (fo.svgIcon) {\n <mat-icon [svgIcon]=\"fo.icon\"></mat-icon>\n } @else {\n <mat-icon>{{ fo.icon }}</mat-icon>\n }\n }\n <span>{{ fo.label }}</span\n ><mat-icon class=\"arr\">keyboard_arrow_down</mat-icon>\n </summary>\n <yuv-object-form [formOptions]=\"fo.formOptions\" (statusChanged)=\"onFormStatusChanged(fo.id, $event)\"></yuv-object-form>\n </details>\n }\n }\n</main>\n\n<footer [ngClass]=\"{ visible: !disableControls() && controlsVisible() }\">\n <div class=\"container\">\n <button ymtButton=\"secondary\" button-size=\"small\" (click)=\"resetForm()\" [hidden]=\"!combinedFormState?.dirty\" [disabled]=\"!combinedFormState?.dirty\">\n {{ 'yuv.object-metadata.button.reset' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n button-size=\"small\"\n [ngClass]=\"{ spinning: busy() }\"\n (click)=\"save()\"\n [disabled]=\"!combinedFormState?.dirty || combinedFormState?.invalid\"\n >\n {{ 'yuv.object-metadata.button.save' | translate }}\n </button>\n </div>\n</footer>\n", styles: [":host{--_object-metadata-panel-background: var(--object-metadata-footer-background, var(--ymt-surface));--_object-metadata-footer-background: var(--object-metadata-footer-background, var(--ymt-surface-container));--_object-metadata-footer-border-color: var(--object-metadata-footer-border-color, var(--ymt-outline-variant));--_object-metadata-footer-height: 4rem;display:grid;grid-template-rows:1fr auto;grid-template-columns:1fr;height:100%;overflow:hidden;position:relative;background-color:var(--_object-metadata-panel-background)}:host.empty main{justify-content:center;align-items:center}:host main{grid-row:1/span 3;grid-column:1;overflow-y:auto;width:100%;display:flex;flex-flow:column;padding:var(--ymt-spacing-3xl) var(--ymt-spacing-l) var(--_object-metadata-footer-height) var(--ymt-spacing-l)}:host footer{grid-row:-1;grid-column:1;padding:var(--ymt-spacing-l);opacity:0}:host footer .container{background:var(--_object-metadata-footer-background);padding:var(--ymt-spacing-s);display:flex;align-items:center;justify-content:end;gap:var(--ymt-spacing-s);border-radius:var(--ymt-corner-full)}:host footer.visible{animation:controlsAppear .2s ease-in-out forwards}:host main details{background-color:var(--ymt-surface);border:1px solid var(--ymt-outline-variant)}:host main details:not(:last-child){margin-block-end:var(--ymt-spacing-m)}:host main details[open] yuv-icon.arr{transform:rotate(180deg)}:host main details summary{padding:var(--ymt-spacing-xs);cursor:pointer;display:flex;align-items:center;font-weight:700;color:var(--ymt-text-color-subtle);position:relative}:host main details summary span{flex:1}:host main details summary::marker{display:none}:host main details summary mat-icon{margin-inline-end:var(--ymt-spacing-xs)}@keyframes controlsAppear{0%{opacity:0;translate:0 var(--ymt-spacing-m)}to{opacity:1;translate:0 0}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ObjectFormComponent, selector: "yuv-object-form", inputs: ["formOptions", "inert", "elementExtensions", "isInnerTableForm"], outputs: ["statusChanged", "onFormReady"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }] }); }
|
|
492
534
|
}
|
|
493
535
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectMetadataComponent, decorators: [{
|
|
494
536
|
type: Component,
|
|
@@ -504,6 +546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
504
546
|
class ObjectDetailsComponent {
|
|
505
547
|
#configService;
|
|
506
548
|
#userService;
|
|
549
|
+
#detailsShellEffect;
|
|
507
550
|
/**
|
|
508
551
|
* If you want to set the order of the tabs within object details, you can use
|
|
509
552
|
* this input property. The tab order will be defined by the index of the
|
|
@@ -521,39 +564,85 @@ class ObjectDetailsComponent {
|
|
|
521
564
|
constructor() {
|
|
522
565
|
this.#configService = inject(ConfigService);
|
|
523
566
|
this.#userService = inject(UserService);
|
|
567
|
+
this.detailsShell = viewChild.required(ObjectDetailsShellComponent);
|
|
568
|
+
this.#detailsShellEffect = effect(() => {
|
|
569
|
+
const shell = this.detailsShell();
|
|
570
|
+
untracked(() => {
|
|
571
|
+
this._dmsObject = shell._dmsObject;
|
|
572
|
+
});
|
|
573
|
+
});
|
|
524
574
|
this.isAdvancedUser = this.#userService.isAdvancedUser;
|
|
525
575
|
this.currentUser = signal(this.#userService.getCurrentUser());
|
|
576
|
+
/**
|
|
577
|
+
* ID to store the components layout state (splitted tabs, gutter position)
|
|
578
|
+
*/
|
|
579
|
+
this.layoutSettingsID = signal(undefined);
|
|
580
|
+
/**
|
|
581
|
+
* DmsObject to show the details for.
|
|
582
|
+
*/
|
|
583
|
+
this.dmsObject = input(undefined);
|
|
584
|
+
/**
|
|
585
|
+
* Virtual object type to use for retrieving header data
|
|
586
|
+
*/
|
|
587
|
+
this.type = input.required();
|
|
526
588
|
if (this.#configService.get('client.objectDetailsTabs'))
|
|
527
589
|
this.panelOrder = this.#configService.get('client.objectDetailsTabs');
|
|
528
590
|
}
|
|
529
591
|
onIndexdataSaved(updatedObject) {
|
|
530
|
-
this.
|
|
592
|
+
if (this._dmsObject)
|
|
593
|
+
this._dmsObject.set(updatedObject);
|
|
531
594
|
}
|
|
532
595
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
533
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectDetailsComponent, isStandalone: true, selector: "yuv-object-details", inputs: { panelOrder: "panelOrder",
|
|
596
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectDetailsComponent, isStandalone: true, selector: "yuv-object-details", inputs: { panelOrder: { classPropertyName: "panelOrder", publicName: "panelOrder", isSignal: false, isRequired: false, transformFunction: null }, dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, objectId: { classPropertyName: "objectId", publicName: "objectId", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailsShell", first: true, predicate: ObjectDetailsShellComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<yuv-object-details-shell [objectId]=\"objectId\" [dmsObject]=\"_dmsObject ? _dmsObject() : undefined\" [layoutSettingsID]=\"layoutSettingsID()\" [type]=\"type()\">\n @let dmsObj = detailsShell()._dmsObject();\n <mat-tab-group>\n <!-- content -->\n <mat-tab [label]=\"'yuv.object-details.tabs.content.title' | translate\">\n <ng-template matTabContent>\n @if (dmsObj && dmsObj.content) {\n <yuv-object-preview [dmsObject]=\"dmsObj\"></yuv-object-preview>\n }\n </ng-template>\n </mat-tab>\n\n <!-- indexdata -->\n <mat-tab [label]=\"'yuv.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-metadata [dmsObject]=\"dmsObj\" (indexDataSaved)=\"onIndexdataSaved($event)\"> </yuv-object-metadata>\n </ng-template>\n </mat-tab>\n <!-- history -->\n <mat-tab [label]=\"'yuv.object-metadata.tabs.history.title' | translate\">\n <ng-template matTabContent> <yuv-object-audit [dmsObject]=\"dmsObj\"></yuv-object-audit> </ng-template\n ></mat-tab>\n </mat-tab-group>\n</yuv-object-details-shell>\n", styles: [":host{display:block}:host yuv-object-details-shell{height:100%}:host mat-tab-group{overflow:hidden;height:100%}:host mat-tab-group ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}:host yuv-object-preview{background-color:var(--ymt-surface-container-low)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i2$1.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i2$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i2$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: ObjectDetailsShellComponent, selector: "yuv-object-details-shell", inputs: ["dmsObject", "type", "bucket", "layoutSettingsID", "objectId"], outputs: ["dmsObjectChange"] }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version"] }, { kind: "component", type: ObjectMetadataComponent, selector: "yuv-object-metadata", inputs: ["disableControls", "situation", "formDisabled", "dmsObject", "flavoredDmsObject"], outputs: ["indexDataSaved", "statusChanged"] }, { kind: "component", type: ObjectAuditComponent, selector: "yuv-object-audit", inputs: ["dmsObject", "skipActions", "allActions"] }] }); }
|
|
534
597
|
}
|
|
535
598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectDetailsComponent, decorators: [{
|
|
536
599
|
type: Component,
|
|
537
600
|
args: [{ selector: 'yuv-object-details', standalone: true, imports: [
|
|
538
|
-
JsonPipe,
|
|
539
601
|
CommonModule,
|
|
540
602
|
TranslateModule,
|
|
541
603
|
MatTabsModule,
|
|
542
604
|
ObjectDetailsShellComponent,
|
|
543
|
-
|
|
605
|
+
ObjectPreviewComponent,
|
|
544
606
|
ObjectMetadataComponent,
|
|
545
607
|
ObjectAuditComponent
|
|
546
|
-
], template: "<yuv-object-details-shell [objectId]=\"objectId\" [
|
|
608
|
+
], template: "<yuv-object-details-shell [objectId]=\"objectId\" [dmsObject]=\"_dmsObject ? _dmsObject() : undefined\" [layoutSettingsID]=\"layoutSettingsID()\" [type]=\"type()\">\n @let dmsObj = detailsShell()._dmsObject();\n <mat-tab-group>\n <!-- content -->\n <mat-tab [label]=\"'yuv.object-details.tabs.content.title' | translate\">\n <ng-template matTabContent>\n @if (dmsObj && dmsObj.content) {\n <yuv-object-preview [dmsObject]=\"dmsObj\"></yuv-object-preview>\n }\n </ng-template>\n </mat-tab>\n\n <!-- indexdata -->\n <mat-tab [label]=\"'yuv.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-metadata [dmsObject]=\"dmsObj\" (indexDataSaved)=\"onIndexdataSaved($event)\"> </yuv-object-metadata>\n </ng-template>\n </mat-tab>\n <!-- history -->\n <mat-tab [label]=\"'yuv.object-metadata.tabs.history.title' | translate\">\n <ng-template matTabContent> <yuv-object-audit [dmsObject]=\"dmsObj\"></yuv-object-audit> </ng-template\n ></mat-tab>\n </mat-tab-group>\n</yuv-object-details-shell>\n", styles: [":host{display:block}:host yuv-object-details-shell{height:100%}:host mat-tab-group{overflow:hidden;height:100%}:host mat-tab-group ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}:host yuv-object-preview{background-color:var(--ymt-surface-container-low)}\n"] }]
|
|
547
609
|
}], ctorParameters: () => [], propDecorators: { panelOrder: [{
|
|
548
610
|
type: Input
|
|
549
|
-
}], layoutSettingsID: [{
|
|
550
|
-
type: Input
|
|
551
|
-
}], dmsObject: [{
|
|
552
|
-
type: Input
|
|
553
611
|
}], objectId: [{
|
|
554
612
|
type: Input
|
|
555
613
|
}] } });
|
|
556
614
|
|
|
615
|
+
const cmp = [
|
|
616
|
+
ObjectDetailsComponent,
|
|
617
|
+
ObjectDetailsHeaderComponent,
|
|
618
|
+
ObjectDetailsShellComponent,
|
|
619
|
+
ObjectMetadataComponent,
|
|
620
|
+
ObjectAuditComponent,
|
|
621
|
+
RetentionBadgeComponent
|
|
622
|
+
];
|
|
623
|
+
class YuvObjectDetailsModule {
|
|
624
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectDetailsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
625
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectDetailsModule, imports: [ObjectDetailsComponent,
|
|
626
|
+
ObjectDetailsHeaderComponent,
|
|
627
|
+
ObjectDetailsShellComponent,
|
|
628
|
+
ObjectMetadataComponent,
|
|
629
|
+
ObjectAuditComponent,
|
|
630
|
+
RetentionBadgeComponent], exports: [ObjectDetailsComponent,
|
|
631
|
+
ObjectDetailsHeaderComponent,
|
|
632
|
+
ObjectDetailsShellComponent,
|
|
633
|
+
ObjectMetadataComponent,
|
|
634
|
+
ObjectAuditComponent,
|
|
635
|
+
RetentionBadgeComponent] }); }
|
|
636
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectDetailsModule, imports: [cmp] }); }
|
|
637
|
+
}
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectDetailsModule, decorators: [{
|
|
639
|
+
type: NgModule,
|
|
640
|
+
args: [{
|
|
641
|
+
imports: cmp,
|
|
642
|
+
exports: cmp
|
|
643
|
+
}]
|
|
644
|
+
}] });
|
|
645
|
+
|
|
557
646
|
class FormSectionGroupPipe {
|
|
558
647
|
transform(form, id) {
|
|
559
648
|
return form.get(id);
|
|
@@ -569,26 +658,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
569
658
|
}]
|
|
570
659
|
}] });
|
|
571
660
|
|
|
572
|
-
class RetentionBadgeComponent {
|
|
573
|
-
constructor() {
|
|
574
|
-
this.#retention = inject(RetentionService);
|
|
575
|
-
this.dmsObject = input.required();
|
|
576
|
-
this.retentionData = computed(() => {
|
|
577
|
-
return this.#retention.getRetentionState(this.dmsObject());
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
#retention;
|
|
581
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: RetentionBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
582
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: RetentionBadgeComponent, isStandalone: true, selector: "yuv-retention-badge", inputs: { dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let rd = retentionData();\n@if (rd.underRetention) {\n <div class=\"badge\">\n <span class=\"badge__icon\">\n <mat-icon class=\"ymt-icon--size-s\">lock_clock</mat-icon>\n </span>\n <span class=\"badge__label\">\n <span class=\"badge__label-truncated\">\n {{\n 'yuv.retention-badge.retain'\n | translate\n : {\n from: rd.start | localeDate: 'shortDate',\n until: rd.end | localeDate: 'shortDate'\n }\n }}\n </span>\n </span>\n </div>\n}\n", styles: [":host{display:contents}:host .badge{font:var(--ymt-font-body-subtle);color:var(--badge-retention-color, var(--ymt-on-surface));display:inline-flex;overflow:hidden;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-s) var(--ymt-spacing-2xs) var(--ymt-spacing-xs);background-color:var(--badge-retention-background, var(--ymt-primary-container));border-radius:var(--ymt-corner-full);gap:var(--ymt-spacing-s)}:host .badge__icon{flex-shrink:0;color:var(--badge-retention-icon-color, var(--ymt-on-primary-container));display:flex;align-items:center;justify-content:center}:host .badge__label{color:var(--badge-retention-color, var(--ymt-on-surface));align-self:stretch;display:flex;align-items:center;justify-content:center;border-top-right-radius:var(--ymt-corner-full);border-bottom-right-radius:var(--ymt-corner-full);overflow:hidden}:host .badge__label-truncated{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: LocaleDatePipe, name: "localeDate" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
583
|
-
}
|
|
584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: RetentionBadgeComponent, decorators: [{
|
|
585
|
-
type: Component,
|
|
586
|
-
args: [{ selector: 'yuv-retention-badge', standalone: true, imports: [CommonModule, TranslateModule, LocaleDatePipe, MatIconModule], template: "@let rd = retentionData();\n@if (rd.underRetention) {\n <div class=\"badge\">\n <span class=\"badge__icon\">\n <mat-icon class=\"ymt-icon--size-s\">lock_clock</mat-icon>\n </span>\n <span class=\"badge__label\">\n <span class=\"badge__label-truncated\">\n {{\n 'yuv.retention-badge.retain'\n | translate\n : {\n from: rd.start | localeDate: 'shortDate',\n until: rd.end | localeDate: 'shortDate'\n }\n }}\n </span>\n </span>\n </div>\n}\n", styles: [":host{display:contents}:host .badge{font:var(--ymt-font-body-subtle);color:var(--badge-retention-color, var(--ymt-on-surface));display:inline-flex;overflow:hidden;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-s) var(--ymt-spacing-2xs) var(--ymt-spacing-xs);background-color:var(--badge-retention-background, var(--ymt-primary-container));border-radius:var(--ymt-corner-full);gap:var(--ymt-spacing-s)}:host .badge__icon{flex-shrink:0;color:var(--badge-retention-icon-color, var(--ymt-on-primary-container));display:flex;align-items:center;justify-content:center}:host .badge__label{color:var(--badge-retention-color, var(--ymt-on-surface));align-self:stretch;display:flex;align-items:center;justify-content:center;border-top-right-radius:var(--ymt-corner-full);border-bottom-right-radius:var(--ymt-corner-full);overflow:hidden}:host .badge__label-truncated{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block}\n"] }]
|
|
587
|
-
}] });
|
|
588
|
-
|
|
589
661
|
/**
|
|
590
662
|
* Generated bundle index. Do not edit.
|
|
591
663
|
*/
|
|
592
664
|
|
|
593
|
-
export { FormSectionGroupPipe, ObjectAuditComponent, ObjectDetailsComponent, ObjectDetailsShellComponent, ObjectMetadataComponent, RetentionBadgeComponent };
|
|
665
|
+
export { FormSectionGroupPipe, ObjectAuditComponent, ObjectDetailsComponent, ObjectDetailsHeaderComponent, ObjectDetailsShellComponent, ObjectMetadataComponent, RetentionBadgeComponent, YuvObjectDetailsModule };
|
|
594
666
|
//# sourceMappingURL=yuuvis-client-framework-object-details.mjs.map
|