@yuuvis/client-framework 3.0.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/yuuvis-client-framework-actions.mjs +214 -126
- package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-app-bar.mjs +3 -3
- package/fesm2022/yuuvis-client-framework-app-bar.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-badges.mjs +379 -0
- package/fesm2022/yuuvis-client-framework-badges.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-breadcrumb.mjs +3 -3
- package/fesm2022/yuuvis-client-framework-breadcrumb.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-clipboard.mjs +8 -8
- package/fesm2022/yuuvis-client-framework-clipboard.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-datepicker.mjs +31 -31
- package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +745 -657
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-icons.mjs +9 -9
- package/fesm2022/yuuvis-client-framework-icons.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +10 -9
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs +19 -17
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +215 -208
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs +18 -18
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-form.mjs +41 -37
- package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-preview.mjs +9 -9
- package/fesm2022/yuuvis-client-framework-object-preview.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs +29 -29
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-summary.mjs +16 -16
- package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-versions.mjs +18 -12
- package/fesm2022/yuuvis-client-framework-object-versions.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-pagination.mjs +3 -3
- package/fesm2022/yuuvis-client-framework-pagination.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-query-list.mjs +7 -7
- package/fesm2022/yuuvis-client-framework-query-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-renderer.mjs +40 -40
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs +50 -38
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-simple-search.mjs +3 -3
- package/fesm2022/yuuvis-client-framework-simple-search.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-sort.mjs +3 -3
- package/fesm2022/yuuvis-client-framework-sort.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +191 -127
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-token-search.mjs +7 -7
- package/fesm2022/yuuvis-client-framework-token-search.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tree.mjs +9 -9
- package/fesm2022/yuuvis-client-framework-tree.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs +10 -10
- package/fesm2022/yuuvis-client-framework-upload-progress.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework.mjs +96 -51
- package/fesm2022/yuuvis-client-framework.mjs.map +1 -1
- package/lib/assets/i18n/de.json +12 -1
- package/lib/assets/i18n/en.json +12 -1
- package/package.json +9 -5
- package/types/yuuvis-client-framework-actions.d.ts +91 -52
- package/types/yuuvis-client-framework-badges.d.ts +194 -0
- package/types/yuuvis-client-framework-forms.d.ts +215 -186
- package/types/yuuvis-client-framework-object-details.d.ts +104 -104
- package/types/yuuvis-client-framework-object-versions.d.ts +1 -0
- package/types/yuuvis-client-framework-sequence-list.d.ts +2 -2
- package/types/yuuvis-client-framework-tile-list.d.ts +11 -6
- package/types/yuuvis-client-framework.d.ts +13 -0
|
@@ -1,189 +1,30 @@
|
|
|
1
|
+
import * as i2 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
1
3
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
4
|
+
import { signal, input, effect, Component, inject, computed, ChangeDetectionStrategy, Injectable, viewChild, linkedSignal, untracked, output, viewChildren, NgModule, Pipe } from '@angular/core';
|
|
3
5
|
import { takeUntilDestroyed, toSignal, rxResource } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
7
|
import * as i3 from '@angular/material/icon';
|
|
5
8
|
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
-
import * as i1
|
|
7
|
-
import {
|
|
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';
|
|
11
|
+
import { BusyOverlayDirective, RetentionBadgeComponent } from '@yuuvis/client-framework/common';
|
|
12
|
+
import { YUV_ICONS } from '@yuuvis/client-framework/icons';
|
|
13
|
+
import { YmtIconButtonDirective, YmtButtonDirective } from '@yuuvis/material';
|
|
14
|
+
import { finalize, of, map } from 'rxjs';
|
|
8
15
|
import { RendererDirective } from '@yuuvis/client-framework/renderer';
|
|
9
|
-
import * as i1 from '@yuuvis/material/panes';
|
|
16
|
+
import * as i1$1 from '@yuuvis/material/panes';
|
|
10
17
|
import { YmtPanesModule } from '@yuuvis/material/panes';
|
|
11
18
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
12
|
-
import { BusyOverlayDirective, RetentionBadgeComponent } from '@yuuvis/client-framework/common';
|
|
13
|
-
import { finalize, of, map } from 'rxjs';
|
|
14
19
|
import * as i1$2 from '@angular/material/tabs';
|
|
15
20
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
16
21
|
import { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';
|
|
17
|
-
import * as i2 from '@angular/common';
|
|
18
|
-
import { CommonModule } from '@angular/common';
|
|
19
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
20
|
-
import { YUV_ICONS } from '@yuuvis/client-framework/icons';
|
|
21
|
-
import { YmtIconButtonDirective, YmtButtonDirective } from '@yuuvis/material';
|
|
22
22
|
import { MatButtonModule } from '@angular/material/button';
|
|
23
23
|
import { ObjectFormComponent } from '@yuuvis/client-framework/object-form';
|
|
24
24
|
import { ObjectSummaryDataComponent } from '@yuuvis/client-framework/object-summary';
|
|
25
25
|
import * as i2$1 from '@angular/material/progress-spinner';
|
|
26
26
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Component showing header data for a dms object. These will be
|
|
30
|
-
* generated from the object config for the given object.
|
|
31
|
-
*
|
|
32
|
-
* You could inject a set of actions into the headers actions slot
|
|
33
|
-
* by adding them to the components body:
|
|
34
|
-
*
|
|
35
|
-
* ```html
|
|
36
|
-
* <yuv-object-details-header [dmsObject]="obj">
|
|
37
|
-
* <ng-template #yuvHeaderActions>...</ng-template>
|
|
38
|
-
* </yuv-object-details-header>
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
class ObjectDetailsHeaderComponent {
|
|
42
|
-
#objectConfig;
|
|
43
|
-
#eventService;
|
|
44
|
-
constructor() {
|
|
45
|
-
this.#objectConfig = inject(ObjectConfigService);
|
|
46
|
-
this.#eventService = inject(EventService);
|
|
47
|
-
this.dmsObject = input(undefined, ...(ngDevMode ? [{ debugName: "dmsObject" }] : /* istanbul ignore next */ []));
|
|
48
|
-
/**
|
|
49
|
-
* Virtual object type to use for retrieving header data
|
|
50
|
-
*/
|
|
51
|
-
this.type = input.required(...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
52
|
-
/**
|
|
53
|
-
* Bucket of the object config to retrieve header data from
|
|
54
|
-
*/
|
|
55
|
-
this.bucket = input(undefined, ...(ngDevMode ? [{ debugName: "bucket" }] : /* istanbul ignore next */ []));
|
|
56
|
-
/** Template rendered in the actions area, aligned to the right of the title row. */
|
|
57
|
-
this.actions = input(undefined, ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
58
|
-
/** Template rendered in the badges area, aligned to the right of the subtitle row. */
|
|
59
|
-
this.badges = input(...(ngDevMode ? [undefined, { debugName: "badges" }] : /* istanbul ignore next */ []));
|
|
60
|
-
this.headerData = computed(() => {
|
|
61
|
-
const object = this.dmsObject();
|
|
62
|
-
const type = this.type();
|
|
63
|
-
return object && type ? this.#setHeaderData() : undefined;
|
|
64
|
-
}, ...(ngDevMode ? [{ debugName: "headerData" }] : /* istanbul ignore next */ []));
|
|
65
|
-
this.#eventService
|
|
66
|
-
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
67
|
-
.pipe(takeUntilDestroyed())
|
|
68
|
-
.subscribe(() => this.#setHeaderData());
|
|
69
|
-
}
|
|
70
|
-
#setHeaderData() {
|
|
71
|
-
const object = this.dmsObject();
|
|
72
|
-
if (!object) {
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
const roc = this.#objectConfig.getResolvedObjectConfig(object.data, this.type(), this.bucket());
|
|
77
|
-
return {
|
|
78
|
-
title: roc.title,
|
|
79
|
-
description: roc.description,
|
|
80
|
-
icon: roc.icon?.value
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ObjectDetailsHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
85
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", 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 }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, badges: { classPropertyName: "badges", publicName: "badges", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let dmsObj = dmsObject();\n@let headerD = headerData();\n@if (dmsObj && headerD) {\n <ymt-pane-header [icon]=\"headerD.icon\" [actions]=\"actions()\" [badges]=\"badges()\">\n <ng-template #yuvPaneHeaderTitle>\n <ng-container *yuvRenderer=\"headerD.title\" />\n </ng-template>\n <ng-template #yuvPaneHeaderSubtitle>\n <ng-container *yuvRenderer=\"headerD.description\" />\n </ng-template>\n </ymt-pane-header>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: YmtPanesModule }, { kind: "component", type: i1.YmtPaneHeaderComponent, selector: "ymt-pane-header", inputs: ["title", "icon", "subtitle", "actions", "badges"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
86
|
-
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ObjectDetailsHeaderComponent, decorators: [{
|
|
88
|
-
type: Component,
|
|
89
|
-
args: [{ selector: 'yuv-object-details-header', imports: [MatIconModule, YmtPanesModule, RendererDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let dmsObj = dmsObject();\n@let headerD = headerData();\n@if (dmsObj && headerD) {\n <ymt-pane-header [icon]=\"headerD.icon\" [actions]=\"actions()\" [badges]=\"badges()\">\n <ng-template #yuvPaneHeaderTitle>\n <ng-container *yuvRenderer=\"headerD.title\" />\n </ng-template>\n <ng-template #yuvPaneHeaderSubtitle>\n <ng-container *yuvRenderer=\"headerD.description\" />\n </ng-template>\n </ymt-pane-header>\n}\n" }]
|
|
90
|
-
}], ctorParameters: () => [], propDecorators: { dmsObject: [{ type: i0.Input, args: [{ isSignal: true, alias: "dmsObject", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], bucket: [{ type: i0.Input, args: [{ isSignal: true, alias: "bucket", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], badges: [{ type: i0.Input, args: [{ isSignal: true, alias: "badges", required: false }] }] } });
|
|
91
|
-
|
|
92
|
-
class ObjectDetailsShellService {
|
|
93
|
-
constructor() {
|
|
94
|
-
this.id = Utils.uuid();
|
|
95
|
-
this.#dmsService = inject(DmsService);
|
|
96
|
-
this.translate = inject(TranslateService);
|
|
97
|
-
this.#dmsObject = signal(undefined, ...(ngDevMode ? [{ debugName: "#dmsObject" }] : /* istanbul ignore next */ []));
|
|
98
|
-
this.dmsObject = this.#dmsObject.asReadonly();
|
|
99
|
-
this.contextError = signal(undefined, ...(ngDevMode ? [{ debugName: "contextError" }] : /* istanbul ignore next */ []));
|
|
100
|
-
this.busy = signal(false, ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
|
|
101
|
-
}
|
|
102
|
-
#dmsService;
|
|
103
|
-
#dmsObject;
|
|
104
|
-
setDmsObject(dmsObject) {
|
|
105
|
-
this.#dmsObject.set(dmsObject);
|
|
106
|
-
this.contextError.set(undefined);
|
|
107
|
-
}
|
|
108
|
-
fetchDmsObject(id) {
|
|
109
|
-
this.busy.set(true);
|
|
110
|
-
this.#dmsService
|
|
111
|
-
.getDmsObject(id)
|
|
112
|
-
.pipe(finalize(() => this.busy.set(false)))
|
|
113
|
-
.subscribe({
|
|
114
|
-
next: (dmsObject) => this.#dmsObject.set(dmsObject),
|
|
115
|
-
error: () => {
|
|
116
|
-
this.#dmsObject.set(undefined);
|
|
117
|
-
this.contextError.set(this.translate.instant('yuv.object-metadata.context.load.error'));
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ObjectDetailsShellService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
122
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ObjectDetailsShellService }); }
|
|
123
|
-
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ObjectDetailsShellService, decorators: [{
|
|
125
|
-
type: Injectable
|
|
126
|
-
}] });
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Wrapper component for details of a dms object. This component
|
|
130
|
-
* provides a header based on the object configuration for the given object.
|
|
131
|
-
* It will also take care of loading the object if you only provide the objects ID.
|
|
132
|
-
*/
|
|
133
|
-
class ObjectDetailsShellComponent {
|
|
134
|
-
#eventService;
|
|
135
|
-
#odShellService;
|
|
136
|
-
constructor() {
|
|
137
|
-
this.#eventService = inject(EventService);
|
|
138
|
-
this.#odShellService = inject(ObjectDetailsShellService);
|
|
139
|
-
this.retentionState = signal(undefined, ...(ngDevMode ? [{ debugName: "retentionState" }] : /* istanbul ignore next */ []));
|
|
140
|
-
this.contextError = this.#odShellService.contextError;
|
|
141
|
-
this.dmsObject = this.#odShellService.dmsObject;
|
|
142
|
-
this.busy = this.#odShellService.busy;
|
|
143
|
-
/** Template rendered in the actions area, aligned to the right of the title row. */
|
|
144
|
-
this.actions = input(undefined, ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
145
|
-
/** Template rendered in the badges area, aligned to the right of the subtitle row. */
|
|
146
|
-
this.badges = input(...(ngDevMode ? [undefined, { debugName: "badges" }] : /* istanbul ignore next */ []));
|
|
147
|
-
/**
|
|
148
|
-
* Virtual object type to use for retrieving header data
|
|
149
|
-
*/
|
|
150
|
-
this.type = input.required(...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
151
|
-
/**
|
|
152
|
-
* Bucket of the object config to retrieve header data from
|
|
153
|
-
*/
|
|
154
|
-
this.bucket = input(undefined, ...(ngDevMode ? [{ debugName: "bucket" }] : /* istanbul ignore next */ []));
|
|
155
|
-
/**
|
|
156
|
-
* Whether to hide the header
|
|
157
|
-
*/
|
|
158
|
-
this.hideHeader = input(false, ...(ngDevMode ? [{ debugName: "hideHeader" }] : /* istanbul ignore next */ []));
|
|
159
|
-
this.#eventService
|
|
160
|
-
.on(YuvEventType.DMS_OBJECT_UPDATED, YuvEventType.DMS_OBJECT_DELETED)
|
|
161
|
-
.pipe(takeUntilDestroyed())
|
|
162
|
-
.subscribe((evt) => {
|
|
163
|
-
switch (evt.type) {
|
|
164
|
-
case YuvEventType.DMS_OBJECT_UPDATED: {
|
|
165
|
-
const obj = evt.data;
|
|
166
|
-
const dmsObj = this.dmsObject();
|
|
167
|
-
if (dmsObj?.id === obj.id)
|
|
168
|
-
this.#odShellService.setDmsObject(obj);
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
case YuvEventType.DMS_OBJECT_DELETED: {
|
|
172
|
-
if (evt.data?.id === this.dmsObject()?.id) {
|
|
173
|
-
this.#odShellService.setDmsObject(undefined);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ObjectDetailsShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
180
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ObjectDetailsShellComponent, isStandalone: true, selector: "yuv-object-details-shell", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, badges: { classPropertyName: "badges", publicName: "badges", 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 }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let dmsObj = dmsObject();\n@if (dmsObj) {\n @if (!hideHeader()) {\n <yuv-object-details-header\n [dmsObject]=\"dmsObj\"\n [type]=\"type()\"\n [bucket]=\"bucket()\"\n [badges]=\"badges()\"\n [actions]=\"actions()\"\n />\n }\n <div class=\"content\" [yuvBusyOverlay]=\"busy()\">\n <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;overflow:hidden}: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: "component", type: ObjectDetailsHeaderComponent, selector: "yuv-object-details-header", inputs: ["dmsObject", "type", "bucket", "actions", "badges"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay", "yuvBusyOverlayConfig", "yuvBusyError"], outputs: ["yuvBusyErrorDismiss"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
181
|
-
}
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ObjectDetailsShellComponent, decorators: [{
|
|
183
|
-
type: Component,
|
|
184
|
-
args: [{ selector: 'yuv-object-details-shell', standalone: true, imports: [ObjectDetailsHeaderComponent, MatTooltipModule, BusyOverlayDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let dmsObj = dmsObject();\n@if (dmsObj) {\n @if (!hideHeader()) {\n <yuv-object-details-header\n [dmsObject]=\"dmsObj\"\n [type]=\"type()\"\n [bucket]=\"bucket()\"\n [badges]=\"badges()\"\n [actions]=\"actions()\"\n />\n }\n <div class=\"content\" [yuvBusyOverlay]=\"busy()\">\n <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;overflow:hidden}: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: () => [], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], badges: [{ type: i0.Input, args: [{ isSignal: true, alias: "badges", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], bucket: [{ type: i0.Input, args: [{ isSignal: true, alias: "bucket", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }] } });
|
|
186
|
-
|
|
187
28
|
class ObjectAuditComponent {
|
|
188
29
|
#dmsObjectEffect;
|
|
189
30
|
get objectID() {
|
|
@@ -341,10 +182,10 @@ class ObjectAuditComponent {
|
|
|
341
182
|
this.auditsRes.set(undefined);
|
|
342
183
|
this.error.set(true);
|
|
343
184
|
}
|
|
344
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
345
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
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" }] }); }
|
|
346
187
|
}
|
|
347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectAuditComponent, decorators: [{
|
|
348
189
|
type: Component,
|
|
349
190
|
args: [{ selector: 'yuv-object-audit', standalone: true, imports: [
|
|
350
191
|
CommonModule,
|
|
@@ -355,7 +196,166 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
355
196
|
MatIconModule,
|
|
356
197
|
YmtIconButtonDirective
|
|
357
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"] }]
|
|
358
|
-
}], ctorParameters: () => [{ type: i1
|
|
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 }] }] } });
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Component showing header data for a dms object. These will be
|
|
203
|
+
* generated from the object config for the given object.
|
|
204
|
+
*
|
|
205
|
+
* You could inject a set of actions into the headers actions slot
|
|
206
|
+
* by adding them to the components body:
|
|
207
|
+
*
|
|
208
|
+
* ```html
|
|
209
|
+
* <yuv-object-details-header [dmsObject]="obj">
|
|
210
|
+
* <ng-template #yuvHeaderActions>...</ng-template>
|
|
211
|
+
* </yuv-object-details-header>
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
class ObjectDetailsHeaderComponent {
|
|
215
|
+
#objectConfig;
|
|
216
|
+
#eventService;
|
|
217
|
+
constructor() {
|
|
218
|
+
this.#objectConfig = inject(ObjectConfigService);
|
|
219
|
+
this.#eventService = inject(EventService);
|
|
220
|
+
this.dmsObject = input(undefined, ...(ngDevMode ? [{ debugName: "dmsObject" }] : /* istanbul ignore next */ []));
|
|
221
|
+
/**
|
|
222
|
+
* Virtual object type to use for retrieving header data
|
|
223
|
+
*/
|
|
224
|
+
this.type = input.required(...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
225
|
+
/**
|
|
226
|
+
* Bucket of the object config to retrieve header data from
|
|
227
|
+
*/
|
|
228
|
+
this.bucket = input(undefined, ...(ngDevMode ? [{ debugName: "bucket" }] : /* istanbul ignore next */ []));
|
|
229
|
+
/** Template rendered in the actions area, aligned to the right of the title row. */
|
|
230
|
+
this.actions = input(undefined, ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
231
|
+
/** Template rendered in the badges area, aligned to the right of the subtitle row. */
|
|
232
|
+
this.badges = input(...(ngDevMode ? [undefined, { debugName: "badges" }] : /* istanbul ignore next */ []));
|
|
233
|
+
this.headerData = computed(() => {
|
|
234
|
+
const object = this.dmsObject();
|
|
235
|
+
const type = this.type();
|
|
236
|
+
return object && type ? this.#setHeaderData() : undefined;
|
|
237
|
+
}, ...(ngDevMode ? [{ debugName: "headerData" }] : /* istanbul ignore next */ []));
|
|
238
|
+
this.#eventService
|
|
239
|
+
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
240
|
+
.pipe(takeUntilDestroyed())
|
|
241
|
+
.subscribe(() => this.#setHeaderData());
|
|
242
|
+
}
|
|
243
|
+
#setHeaderData() {
|
|
244
|
+
const object = this.dmsObject();
|
|
245
|
+
if (!object) {
|
|
246
|
+
return undefined;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
const roc = this.#objectConfig.getResolvedObjectConfig(object.data, this.type(), this.bucket());
|
|
250
|
+
return {
|
|
251
|
+
title: roc.title,
|
|
252
|
+
description: roc.description,
|
|
253
|
+
icon: roc.icon?.value
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
258
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.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 }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, badges: { classPropertyName: "badges", publicName: "badges", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let dmsObj = dmsObject();\n@let headerD = headerData();\n@if (dmsObj && headerD) {\n <ymt-pane-header [icon]=\"headerD.icon\" [actions]=\"actions()\" [badges]=\"badges()\">\n <ng-template #yuvPaneHeaderTitle>\n <ng-container *yuvRenderer=\"headerD.title\" />\n </ng-template>\n <ng-template #yuvPaneHeaderSubtitle>\n <ng-container *yuvRenderer=\"headerD.description\" />\n </ng-template>\n </ymt-pane-header>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: YmtPanesModule }, { kind: "component", type: i1$1.YmtPaneHeaderComponent, selector: "ymt-pane-header", inputs: ["title", "icon", "subtitle", "actions", "badges"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
259
|
+
}
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsHeaderComponent, decorators: [{
|
|
261
|
+
type: Component,
|
|
262
|
+
args: [{ selector: 'yuv-object-details-header', imports: [MatIconModule, YmtPanesModule, RendererDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let dmsObj = dmsObject();\n@let headerD = headerData();\n@if (dmsObj && headerD) {\n <ymt-pane-header [icon]=\"headerD.icon\" [actions]=\"actions()\" [badges]=\"badges()\">\n <ng-template #yuvPaneHeaderTitle>\n <ng-container *yuvRenderer=\"headerD.title\" />\n </ng-template>\n <ng-template #yuvPaneHeaderSubtitle>\n <ng-container *yuvRenderer=\"headerD.description\" />\n </ng-template>\n </ymt-pane-header>\n}\n" }]
|
|
263
|
+
}], ctorParameters: () => [], propDecorators: { dmsObject: [{ type: i0.Input, args: [{ isSignal: true, alias: "dmsObject", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], bucket: [{ type: i0.Input, args: [{ isSignal: true, alias: "bucket", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], badges: [{ type: i0.Input, args: [{ isSignal: true, alias: "badges", required: false }] }] } });
|
|
264
|
+
|
|
265
|
+
class ObjectDetailsShellService {
|
|
266
|
+
constructor() {
|
|
267
|
+
this.id = Utils.uuid();
|
|
268
|
+
this.#dmsService = inject(DmsService);
|
|
269
|
+
this.translate = inject(TranslateService);
|
|
270
|
+
this.#dmsObject = signal(undefined, ...(ngDevMode ? [{ debugName: "#dmsObject" }] : /* istanbul ignore next */ []));
|
|
271
|
+
this.dmsObject = this.#dmsObject.asReadonly();
|
|
272
|
+
this.contextError = signal(undefined, ...(ngDevMode ? [{ debugName: "contextError" }] : /* istanbul ignore next */ []));
|
|
273
|
+
this.busy = signal(false, ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
|
|
274
|
+
}
|
|
275
|
+
#dmsService;
|
|
276
|
+
#dmsObject;
|
|
277
|
+
setDmsObject(dmsObject) {
|
|
278
|
+
this.#dmsObject.set(dmsObject);
|
|
279
|
+
this.contextError.set(undefined);
|
|
280
|
+
}
|
|
281
|
+
fetchDmsObject(id) {
|
|
282
|
+
this.busy.set(true);
|
|
283
|
+
this.#dmsService
|
|
284
|
+
.getDmsObject(id)
|
|
285
|
+
.pipe(finalize(() => this.busy.set(false)))
|
|
286
|
+
.subscribe({
|
|
287
|
+
next: (dmsObject) => this.#dmsObject.set(dmsObject),
|
|
288
|
+
error: () => {
|
|
289
|
+
this.#dmsObject.set(undefined);
|
|
290
|
+
this.contextError.set(this.translate.instant('yuv.object-metadata.context.load.error'));
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsShellService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
295
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsShellService }); }
|
|
296
|
+
}
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsShellService, decorators: [{
|
|
298
|
+
type: Injectable
|
|
299
|
+
}] });
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Wrapper component for details of a dms object. This component
|
|
303
|
+
* provides a header based on the object configuration for the given object.
|
|
304
|
+
* It will also take care of loading the object if you only provide the objects ID.
|
|
305
|
+
*/
|
|
306
|
+
class ObjectDetailsShellComponent {
|
|
307
|
+
#eventService;
|
|
308
|
+
#odShellService;
|
|
309
|
+
constructor() {
|
|
310
|
+
this.#eventService = inject(EventService);
|
|
311
|
+
this.#odShellService = inject(ObjectDetailsShellService);
|
|
312
|
+
this.retentionState = signal(undefined, ...(ngDevMode ? [{ debugName: "retentionState" }] : /* istanbul ignore next */ []));
|
|
313
|
+
this.contextError = this.#odShellService.contextError;
|
|
314
|
+
this.dmsObject = this.#odShellService.dmsObject;
|
|
315
|
+
this.busy = this.#odShellService.busy;
|
|
316
|
+
/** Template rendered in the actions area, aligned to the right of the title row. */
|
|
317
|
+
this.actions = input(undefined, ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
318
|
+
/** Template rendered in the badges area, aligned to the right of the subtitle row. */
|
|
319
|
+
this.badges = input(...(ngDevMode ? [undefined, { debugName: "badges" }] : /* istanbul ignore next */ []));
|
|
320
|
+
/**
|
|
321
|
+
* Virtual object type to use for retrieving header data
|
|
322
|
+
*/
|
|
323
|
+
this.type = input.required(...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
324
|
+
/**
|
|
325
|
+
* Bucket of the object config to retrieve header data from
|
|
326
|
+
*/
|
|
327
|
+
this.bucket = input(undefined, ...(ngDevMode ? [{ debugName: "bucket" }] : /* istanbul ignore next */ []));
|
|
328
|
+
/**
|
|
329
|
+
* Whether to hide the header
|
|
330
|
+
*/
|
|
331
|
+
this.hideHeader = input(false, ...(ngDevMode ? [{ debugName: "hideHeader" }] : /* istanbul ignore next */ []));
|
|
332
|
+
this.#eventService
|
|
333
|
+
.on(YuvEventType.DMS_OBJECT_UPDATED, YuvEventType.DMS_OBJECT_DELETED)
|
|
334
|
+
.pipe(takeUntilDestroyed())
|
|
335
|
+
.subscribe((evt) => {
|
|
336
|
+
switch (evt.type) {
|
|
337
|
+
case YuvEventType.DMS_OBJECT_UPDATED: {
|
|
338
|
+
const obj = evt.data;
|
|
339
|
+
const dmsObj = this.dmsObject();
|
|
340
|
+
if (dmsObj?.id === obj.id)
|
|
341
|
+
this.#odShellService.setDmsObject(obj);
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
case YuvEventType.DMS_OBJECT_DELETED: {
|
|
345
|
+
if (evt.data?.id === this.dmsObject()?.id) {
|
|
346
|
+
this.#odShellService.setDmsObject(undefined);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
353
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ObjectDetailsShellComponent, isStandalone: true, selector: "yuv-object-details-shell", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, badges: { classPropertyName: "badges", publicName: "badges", 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 }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let dmsObj = dmsObject();\n@if (dmsObj) {\n @if (!hideHeader()) {\n <yuv-object-details-header\n [dmsObject]=\"dmsObj\"\n [type]=\"type()\"\n [bucket]=\"bucket()\"\n [badges]=\"badges()\"\n [actions]=\"actions()\"\n />\n }\n <div class=\"content\" [yuvBusyOverlay]=\"busy()\">\n <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;overflow:hidden}: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: "component", type: ObjectDetailsHeaderComponent, selector: "yuv-object-details-header", inputs: ["dmsObject", "type", "bucket", "actions", "badges"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay", "yuvBusyOverlayConfig", "yuvBusyError"], outputs: ["yuvBusyErrorDismiss"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
354
|
+
}
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsShellComponent, decorators: [{
|
|
356
|
+
type: Component,
|
|
357
|
+
args: [{ selector: 'yuv-object-details-shell', standalone: true, imports: [ObjectDetailsHeaderComponent, MatTooltipModule, BusyOverlayDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let dmsObj = dmsObject();\n@if (dmsObj) {\n @if (!hideHeader()) {\n <yuv-object-details-header\n [dmsObject]=\"dmsObj\"\n [type]=\"type()\"\n [bucket]=\"bucket()\"\n [badges]=\"badges()\"\n [actions]=\"actions()\"\n />\n }\n <div class=\"content\" [yuvBusyOverlay]=\"busy()\">\n <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;overflow:hidden}: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"] }]
|
|
358
|
+
}], ctorParameters: () => [], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], badges: [{ type: i0.Input, args: [{ isSignal: true, alias: "badges", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], bucket: [{ type: i0.Input, args: [{ isSignal: true, alias: "bucket", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }] } });
|
|
359
359
|
|
|
360
360
|
class ObjectMetadataSectionComponent {
|
|
361
361
|
constructor() {
|
|
@@ -407,15 +407,15 @@ class ObjectMetadataSectionComponent {
|
|
|
407
407
|
setFormPristine() {
|
|
408
408
|
this.objectForm()?.setFormPristine();
|
|
409
409
|
}
|
|
410
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
411
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
410
|
+
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"] }] }); }
|
|
412
412
|
}
|
|
413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectMetadataSectionComponent, decorators: [{
|
|
414
414
|
type: Component,
|
|
415
415
|
args: [{ selector: 'yuv-object-metadata-section', imports: [MatIconModule, MatProgressSpinnerModule, ObjectFormComponent], host: {
|
|
416
416
|
'[class.invalid]': 'objectForm()?.form?.invalid',
|
|
417
417
|
'[class.dirty]': 'objectForm()?.form?.dirty'
|
|
418
|
-
}, 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\"
|
|
418
|
+
}, 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"] }]
|
|
419
419
|
}], propDecorators: { objectForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ObjectFormComponent), { isSignal: true }] }], section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: true }] }], expandedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }], elementExtensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementExtensions", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], statusChanged: [{ type: i0.Output, args: ["statusChanged"] }] } });
|
|
420
420
|
|
|
421
421
|
class ObjectMetadataComponent {
|
|
@@ -426,12 +426,15 @@ class ObjectMetadataComponent {
|
|
|
426
426
|
this.#system = inject(SystemService);
|
|
427
427
|
this.#dmsService = inject(DmsService);
|
|
428
428
|
this.#userService = inject(UserService);
|
|
429
|
+
this.#objectLocking = inject(ObjectLockingService);
|
|
429
430
|
this.user = toSignal(this.#userService.user$);
|
|
430
431
|
this.hasWritePermission = computed(() => {
|
|
431
432
|
const flavoredDmsObject = this.flavoredDmsObject();
|
|
432
|
-
const
|
|
433
|
-
const
|
|
434
|
-
|
|
433
|
+
const dmsObject = this.dmsObject();
|
|
434
|
+
const obj = flavoredDmsObject ? flavoredDmsObject.object : dmsObject;
|
|
435
|
+
const lockState = obj ? this.#objectLocking.getLockState(obj) : undefined;
|
|
436
|
+
const lockedByOther = !!lockState?.locked && !lockState.lockedByCurrentUser;
|
|
437
|
+
return lockedByOther ? false : obj?.permissions?.writeIndexData || false;
|
|
435
438
|
}, ...(ngDevMode ? [{ debugName: "hasWritePermission" }] : /* istanbul ignore next */ []));
|
|
436
439
|
this.objectForms = viewChildren(ObjectFormComponent, ...(ngDevMode ? [{ debugName: "objectForms" }] : /* istanbul ignore next */ []));
|
|
437
440
|
this.objectMetadataSectionForms = viewChildren(ObjectMetadataSectionComponent, ...(ngDevMode ? [{ debugName: "objectMetadataSectionForms" }] : /* istanbul ignore next */ []));
|
|
@@ -459,8 +462,8 @@ class ObjectMetadataComponent {
|
|
|
459
462
|
* Set to 'true' to prevent all metadata from being edited
|
|
460
463
|
*/
|
|
461
464
|
this.formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
462
|
-
this.
|
|
463
|
-
this.
|
|
465
|
+
this.dmsObjectInput = input(undefined, { ...(ngDevMode ? { debugName: "dmsObjectInput" } : /* istanbul ignore next */ {}), alias: 'dmsObject' });
|
|
466
|
+
this.dmsObject = linkedSignal(this.dmsObjectInput, ...(ngDevMode ? [{ debugName: "dmsObject" }] : /* istanbul ignore next */ []));
|
|
464
467
|
/**
|
|
465
468
|
* @deprecated This input will be removed in the future.
|
|
466
469
|
* Please migrate to using `dmsObject` and `flavors` inputs instead.
|
|
@@ -485,7 +488,7 @@ class ObjectMetadataComponent {
|
|
|
485
488
|
*/
|
|
486
489
|
this.#legacyFlavors = signal(undefined, ...(ngDevMode ? [{ debugName: "#legacyFlavors" }] : /* istanbul ignore next */ []));
|
|
487
490
|
this.#mainFormOptionsResource = rxResource({
|
|
488
|
-
params: this.
|
|
491
|
+
params: this.dmsObject,
|
|
489
492
|
stream: ({ params }) => {
|
|
490
493
|
if (!params)
|
|
491
494
|
return of(undefined);
|
|
@@ -504,7 +507,7 @@ class ObjectMetadataComponent {
|
|
|
504
507
|
this.flavors = input(undefined, ...(ngDevMode ? [{ debugName: "flavors" }] : /* istanbul ignore next */ []));
|
|
505
508
|
// forms of applied flavors
|
|
506
509
|
this.flavorFormOptions = computed(() => {
|
|
507
|
-
const object = this.
|
|
510
|
+
const object = this.dmsObject();
|
|
508
511
|
const flavors = this.flavors() ?? this.#legacyFlavors();
|
|
509
512
|
const mappedFlavors = (flavors || []).reduce((acc, curr) => ({ ...acc, [curr.sot]: curr }), {});
|
|
510
513
|
if (!object)
|
|
@@ -525,6 +528,7 @@ class ObjectMetadataComponent {
|
|
|
525
528
|
#system;
|
|
526
529
|
#dmsService;
|
|
527
530
|
#userService;
|
|
531
|
+
#objectLocking;
|
|
528
532
|
#pendingTaskId;
|
|
529
533
|
#formSubscriptions;
|
|
530
534
|
// state of all individual forms
|
|
@@ -542,13 +546,13 @@ class ObjectMetadataComponent {
|
|
|
542
546
|
*
|
|
543
547
|
*/
|
|
544
548
|
#init(object, flavors) {
|
|
545
|
-
const o = this.
|
|
549
|
+
const o = this.dmsObject();
|
|
546
550
|
if (object && (!o || o !== object)) {
|
|
547
551
|
this.#legacyFlavors.set(flavors);
|
|
548
552
|
this.#objectToForm(object);
|
|
549
553
|
}
|
|
550
554
|
if (object)
|
|
551
|
-
this.
|
|
555
|
+
this.dmsObject.set(object);
|
|
552
556
|
}
|
|
553
557
|
#mainFormOptionsResource;
|
|
554
558
|
/**
|
|
@@ -610,13 +614,13 @@ class ObjectMetadataComponent {
|
|
|
610
614
|
return this.combinedFormState;
|
|
611
615
|
}
|
|
612
616
|
save() {
|
|
613
|
-
// TODO: this.
|
|
614
|
-
const object = this.
|
|
617
|
+
// TODO: this.dmsObject should be this.dmsObject() once this.#init() is removed
|
|
618
|
+
const object = this.dmsObject();
|
|
615
619
|
if (object && this.combinedFormState) {
|
|
616
620
|
this.busySaving.set(true);
|
|
617
621
|
this.#dmsService.updateDmsObject(object.id, this.combinedFormState.data).subscribe({
|
|
618
622
|
next: (updatedObject) => {
|
|
619
|
-
this.
|
|
623
|
+
this.dmsObject.set(updatedObject);
|
|
620
624
|
this.setFormPristine();
|
|
621
625
|
this.indexDataSaved.emit(updatedObject);
|
|
622
626
|
this.#finishPending();
|
|
@@ -625,7 +629,7 @@ class ObjectMetadataComponent {
|
|
|
625
629
|
},
|
|
626
630
|
error: (err) => {
|
|
627
631
|
this.#notificationService.error('',
|
|
628
|
-
// this.
|
|
632
|
+
// this.dmsObject?.title || '',
|
|
629
633
|
err.status === 404
|
|
630
634
|
? this.translate.instant('yuv.object-metadata.context.load.error')
|
|
631
635
|
: this.translate.instant('yuv.object-metadata.save.error'));
|
|
@@ -675,10 +679,10 @@ class ObjectMetadataComponent {
|
|
|
675
679
|
ngOnDestroy() {
|
|
676
680
|
this.#formSubscriptions.forEach((s) => s.unsubscribe());
|
|
677
681
|
}
|
|
678
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
679
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
682
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectMetadataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
683
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ObjectMetadataComponent, isStandalone: true, selector: "yuv-object-metadata", inputs: { disableControls: { classPropertyName: "disableControls", publicName: "disableControls", isSignal: true, isRequired: false, transformFunction: null }, disableBasicMetadata: { classPropertyName: "disableBasicMetadata", publicName: "disableBasicMetadata", isSignal: true, isRequired: false, transformFunction: null }, elementExtensions: { classPropertyName: "elementExtensions", publicName: "elementExtensions", isSignal: true, isRequired: false, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null }, dmsObjectInput: { classPropertyName: "dmsObjectInput", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, flavoredDmsObject: { classPropertyName: "flavoredDmsObject", publicName: "flavoredDmsObject", isSignal: true, isRequired: false, transformFunction: null }, flavors: { classPropertyName: "flavors", publicName: "flavors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indexDataSaved: "indexDataSaved", statusChanged: "statusChanged" }, host: { properties: { "class.empty": "empty()", "class.loading": "busyLoading()" } }, viewQueries: [{ propertyName: "objectForms", predicate: ObjectFormComponent, descendants: true, isSignal: true }, { propertyName: "objectMetadataSectionForms", predicate: ObjectMetadataSectionComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<main [yuvBusyOverlay]=\"busySaving() || busyLoading() || mainFormOptionsIsLoading()\">\n @if (empty()) {\n <p>{{ 'yuv.object-metadata.empty.message' | translate }}</p>\n }\n @if (!mainFormOptions()) {\n <yuv-object-form\n [readonly]=\"!hasWritePermission()\"\n [formOptions]=\"mainFormOptions()\"\n [elementExtensions]=\"elementExtensions()\"\n (statusChanged)=\"onFormStatusChanged('main', $event)\"\n />\n }\n @for (fo of flavorFormOptions(); track $index) {\n <yuv-object-metadata-section\n [readonly]=\"!hasWritePermission()\"\n [section]=\"fo\"\n [elementExtensions]=\"elementExtensions()\"\n [expanded]=\"$index === 0\"\n (statusChanged)=\"onFormStatusChanged(fo.id, $event)\"\n />\n }\n\n <!-- base data -->\n @let object = dmsObject() ?? dmsObject();\n @if (object && !disableBasicMetadata()) {\n <yuv-object-summary-data [dmsObject]=\"object\" />\n }\n</main>\n\n<footer [attr.inert]=\"disableControls() || !controlsVisible() || null\">\n <div class=\"container\">\n <button\n ymtButton=\"secondary\"\n button-size=\"small\"\n [disabled]=\"busySaving() || busyLoading()\"\n (click)=\"resetForm()\"\n [hidden]=\"!combinedFormState?.dirty\"\n [disabled]=\"!combinedFormState?.dirty\"\n >\n {{ 'yuv.object-metadata.button.reset' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n button-size=\"small\"\n (click)=\"save()\"\n [disabled]=\"!combinedFormState?.dirty || combinedFormState?.invalid || busySaving() || busyLoading()\"\n >\n {{ 'yuv.object-metadata.button.save' | translate }}\n </button>\n </div>\n</footer>\n", styles: [":host{--_object-metadata-panel-background: var(--object-metadata-panel-background, var(--ymt-surface-container-low));--_object-metadata-section-background: var(--object-metadata-section-background, var(--ymt-surface));--_object-metadata-section-corner: var(--object-metadata-section-corner, var(--ymt-corner-m));--_object-metadata-footer-background: var(--object-metadata-footer-background, var(--ymt-surface-container));--_object-metadata-footer-border: 1px solid var(--object-metadata-footer-border, var(--ymt-outline-variant));--_object-metadata-footer-indent: var(--object-metadata-footer-indent, var(--ymt-spacing-xs));--_object-metadata-footer-height: 4rem;--_object-metadata-footer-corner: var(--object-metadata-footer-corner, var(--ymt-corner-s));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.loading main>*{opacity:0}: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(--_object-metadata-footer-indent);opacity:0;z-index:101}: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(--_object-metadata-footer-corner);border:var(--_object-metadata-footer-border)}:host footer:not([inert]){animation:controlsAppear .2s ease-in-out forwards}:host main yuv-object-metadata-section{margin-block-end:var(--ymt-spacing-m)}:host main yuv-object-summary-data{background-color:var(--_object-metadata-section-background);border:1px solid var(--ymt-outline-variant);border-radius:var(--_object-metadata-section-corner);padding:var(--ymt-spacing-m)}@keyframes controlsAppear{0%{opacity:0;translate:0 var(--ymt-spacing-m)}to{opacity:1;translate:0 0}}\n"], dependencies: [{ kind: "component", type: ObjectFormComponent, selector: "yuv-object-form", inputs: ["formOptions", "inert", "readonly", "elementExtensions", "isInnerTableForm"], outputs: ["statusChanged", "onFormReady"] }, { kind: "component", type: ObjectSummaryDataComponent, selector: "yuv-object-summary-data", inputs: ["dmsObject", "flavors", "showAppliedFlavors"] }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay", "yuvBusyOverlayConfig", "yuvBusyError"], outputs: ["yuvBusyErrorDismiss"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: ObjectMetadataSectionComponent, selector: "yuv-object-metadata-section", inputs: ["section", "expanded", "elementExtensions", "readonly"], outputs: ["statusChanged"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
680
684
|
}
|
|
681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectMetadataComponent, decorators: [{
|
|
682
686
|
type: Component,
|
|
683
687
|
args: [{ selector: 'yuv-object-metadata', standalone: true, imports: [
|
|
684
688
|
ObjectFormComponent,
|
|
@@ -693,8 +697,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
693
697
|
], host: {
|
|
694
698
|
'[class.empty]': 'empty()',
|
|
695
699
|
'[class.loading]': 'busyLoading()'
|
|
696
|
-
}, template: "<main [yuvBusyOverlay]=\"busySaving() || busyLoading() || mainFormOptionsIsLoading()\">\n @if (empty()) {\n <p>{{ 'yuv.object-metadata.empty.message' | translate }}</p>\n }\n @if (!mainFormOptions()) {\n <yuv-object-form\n [readonly]=\"!hasWritePermission()\"\n [formOptions]=\"mainFormOptions()\"\n [elementExtensions]=\"elementExtensions()\"\n (statusChanged)=\"onFormStatusChanged('main', $event)\"\n
|
|
697
|
-
}], propDecorators: { objectForms: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ObjectFormComponent), { isSignal: true }] }], objectMetadataSectionForms: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ObjectMetadataSectionComponent), { isSignal: true }] }], disableControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableControls", required: false }] }], disableBasicMetadata: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBasicMetadata", required: false }] }], elementExtensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementExtensions", required: false }] }], situation: [{ type: i0.Input, args: [{ isSignal: true, alias: "situation", required: false }] }],
|
|
700
|
+
}, template: "<main [yuvBusyOverlay]=\"busySaving() || busyLoading() || mainFormOptionsIsLoading()\">\n @if (empty()) {\n <p>{{ 'yuv.object-metadata.empty.message' | translate }}</p>\n }\n @if (!mainFormOptions()) {\n <yuv-object-form\n [readonly]=\"!hasWritePermission()\"\n [formOptions]=\"mainFormOptions()\"\n [elementExtensions]=\"elementExtensions()\"\n (statusChanged)=\"onFormStatusChanged('main', $event)\"\n />\n }\n @for (fo of flavorFormOptions(); track $index) {\n <yuv-object-metadata-section\n [readonly]=\"!hasWritePermission()\"\n [section]=\"fo\"\n [elementExtensions]=\"elementExtensions()\"\n [expanded]=\"$index === 0\"\n (statusChanged)=\"onFormStatusChanged(fo.id, $event)\"\n />\n }\n\n <!-- base data -->\n @let object = dmsObject() ?? dmsObject();\n @if (object && !disableBasicMetadata()) {\n <yuv-object-summary-data [dmsObject]=\"object\" />\n }\n</main>\n\n<footer [attr.inert]=\"disableControls() || !controlsVisible() || null\">\n <div class=\"container\">\n <button\n ymtButton=\"secondary\"\n button-size=\"small\"\n [disabled]=\"busySaving() || busyLoading()\"\n (click)=\"resetForm()\"\n [hidden]=\"!combinedFormState?.dirty\"\n [disabled]=\"!combinedFormState?.dirty\"\n >\n {{ 'yuv.object-metadata.button.reset' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n button-size=\"small\"\n (click)=\"save()\"\n [disabled]=\"!combinedFormState?.dirty || combinedFormState?.invalid || busySaving() || busyLoading()\"\n >\n {{ 'yuv.object-metadata.button.save' | translate }}\n </button>\n </div>\n</footer>\n", styles: [":host{--_object-metadata-panel-background: var(--object-metadata-panel-background, var(--ymt-surface-container-low));--_object-metadata-section-background: var(--object-metadata-section-background, var(--ymt-surface));--_object-metadata-section-corner: var(--object-metadata-section-corner, var(--ymt-corner-m));--_object-metadata-footer-background: var(--object-metadata-footer-background, var(--ymt-surface-container));--_object-metadata-footer-border: 1px solid var(--object-metadata-footer-border, var(--ymt-outline-variant));--_object-metadata-footer-indent: var(--object-metadata-footer-indent, var(--ymt-spacing-xs));--_object-metadata-footer-height: 4rem;--_object-metadata-footer-corner: var(--object-metadata-footer-corner, var(--ymt-corner-s));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.loading main>*{opacity:0}: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(--_object-metadata-footer-indent);opacity:0;z-index:101}: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(--_object-metadata-footer-corner);border:var(--_object-metadata-footer-border)}:host footer:not([inert]){animation:controlsAppear .2s ease-in-out forwards}:host main yuv-object-metadata-section{margin-block-end:var(--ymt-spacing-m)}:host main yuv-object-summary-data{background-color:var(--_object-metadata-section-background);border:1px solid var(--ymt-outline-variant);border-radius:var(--_object-metadata-section-corner);padding:var(--ymt-spacing-m)}@keyframes controlsAppear{0%{opacity:0;translate:0 var(--ymt-spacing-m)}to{opacity:1;translate:0 0}}\n"] }]
|
|
701
|
+
}], propDecorators: { objectForms: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ObjectFormComponent), { isSignal: true }] }], objectMetadataSectionForms: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ObjectMetadataSectionComponent), { isSignal: true }] }], disableControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableControls", required: false }] }], disableBasicMetadata: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBasicMetadata", required: false }] }], elementExtensions: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementExtensions", required: false }] }], situation: [{ type: i0.Input, args: [{ isSignal: true, alias: "situation", required: false }] }], dmsObjectInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dmsObject", required: false }] }], flavoredDmsObject: [{ type: i0.Input, args: [{ isSignal: true, alias: "flavoredDmsObject", required: false }] }], indexDataSaved: [{ type: i0.Output, args: ["indexDataSaved"] }], statusChanged: [{ type: i0.Output, args: ["statusChanged"] }], flavors: [{ type: i0.Input, args: [{ isSignal: true, alias: "flavors", required: false }] }] } });
|
|
698
702
|
|
|
699
703
|
class ObjectDetailsComponent {
|
|
700
704
|
constructor() {
|
|
@@ -754,10 +758,10 @@ class ObjectDetailsComponent {
|
|
|
754
758
|
onIndexdataSaved(updatedObject) {
|
|
755
759
|
this.#odShellService.setDmsObject(updatedObject);
|
|
756
760
|
}
|
|
757
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
758
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
761
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
762
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ObjectDetailsComponent, isStandalone: true, selector: "yuv-object-details", inputs: { dmsObjectInput: { classPropertyName: "dmsObjectInput", publicName: "dmsObject", isSignal: true, isRequired: false, transformFunction: null }, flavors: { classPropertyName: "flavors", publicName: "flavors", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, objectConfigBucket: { classPropertyName: "objectConfigBucket", publicName: "objectConfigBucket", isSignal: true, isRequired: false, transformFunction: null }, objectId: { classPropertyName: "objectId", publicName: "objectId", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, badges: { classPropertyName: "badges", publicName: "badges", isSignal: true, isRequired: false, transformFunction: null } }, providers: [ObjectDetailsShellService], ngImport: i0, template: "<yuv-object-details-shell\n [type]=\"type()\"\n [hideHeader]=\"hideHeader()\"\n [bucket]=\"objectConfigBucket()\"\n [actions]=\"actions()\"\n [badges]=\"badges()\"\n>\n @let dmsObj = dmsObject();\n <mat-tab-group yuvTabGuardDisable>\n <!-- content -->\n @if (dmsObj && dmsObj.content) {\n <mat-tab [label]=\"'yuv.object-details.tabs.content.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-preview [dmsObject]=\"dmsObj\" />\n </ng-template>\n </mat-tab>\n }\n\n <!-- indexdata -->\n <mat-tab [label]=\"'yuv.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-metadata\n [dmsObject]=\"dmsObject()\"\n [flavors]=\"flavors()\"\n (indexDataSaved)=\"onIndexdataSaved($event)\"\n />\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\" /> </ng-template\n ></mat-tab>\n </mat-tab-group>\n</yuv-object-details-shell>\n", styles: [":host{display:block;overflow:hidden}: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: MatTabsModule }, { kind: "directive", type: i1$2.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i1$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i1$2.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: "directive", type: TabGuardDirective, selector: "mat-tab-group[yuvTabGuardDisable]" }, { kind: "component", type: ObjectDetailsShellComponent, selector: "yuv-object-details-shell", inputs: ["actions", "badges", "type", "bucket", "hideHeader"] }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version", "metadata"] }, { kind: "component", type: ObjectMetadataComponent, selector: "yuv-object-metadata", inputs: ["disableControls", "disableBasicMetadata", "elementExtensions", "situation", "dmsObject", "flavoredDmsObject", "flavors"], outputs: ["indexDataSaved", "statusChanged"] }, { kind: "component", type: ObjectAuditComponent, selector: "yuv-object-audit", inputs: ["dmsObject", "skipActions", "allActions"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
759
763
|
}
|
|
760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ObjectDetailsComponent, decorators: [{
|
|
761
765
|
type: Component,
|
|
762
766
|
args: [{ selector: 'yuv-object-details', standalone: true, imports: [
|
|
763
767
|
TranslatePipe,
|
|
@@ -767,7 +771,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
767
771
|
ObjectPreviewComponent,
|
|
768
772
|
ObjectMetadataComponent,
|
|
769
773
|
ObjectAuditComponent
|
|
770
|
-
], providers: [ObjectDetailsShellService], template: "<yuv-object-details-shell
|
|
774
|
+
], providers: [ObjectDetailsShellService], template: "<yuv-object-details-shell\n [type]=\"type()\"\n [hideHeader]=\"hideHeader()\"\n [bucket]=\"objectConfigBucket()\"\n [actions]=\"actions()\"\n [badges]=\"badges()\"\n>\n @let dmsObj = dmsObject();\n <mat-tab-group yuvTabGuardDisable>\n <!-- content -->\n @if (dmsObj && dmsObj.content) {\n <mat-tab [label]=\"'yuv.object-details.tabs.content.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-preview [dmsObject]=\"dmsObj\" />\n </ng-template>\n </mat-tab>\n }\n\n <!-- indexdata -->\n <mat-tab [label]=\"'yuv.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-metadata\n [dmsObject]=\"dmsObject()\"\n [flavors]=\"flavors()\"\n (indexDataSaved)=\"onIndexdataSaved($event)\"\n />\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\" /> </ng-template\n ></mat-tab>\n </mat-tab-group>\n</yuv-object-details-shell>\n", styles: [":host{display:block;overflow:hidden}: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"] }]
|
|
771
775
|
}], propDecorators: { dmsObjectInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dmsObject", required: false }] }], flavors: [{ type: i0.Input, args: [{ isSignal: true, alias: "flavors", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], objectConfigBucket: [{ type: i0.Input, args: [{ isSignal: true, alias: "objectConfigBucket", required: false }] }], objectId: [{ type: i0.Input, args: [{ isSignal: true, alias: "objectId", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], badges: [{ type: i0.Input, args: [{ isSignal: true, alias: "badges", required: false }] }] } });
|
|
772
776
|
|
|
773
777
|
const cmp = [
|
|
@@ -775,25 +779,28 @@ const cmp = [
|
|
|
775
779
|
ObjectDetailsHeaderComponent,
|
|
776
780
|
ObjectDetailsShellComponent,
|
|
777
781
|
ObjectMetadataComponent,
|
|
782
|
+
ObjectMetadataSectionComponent,
|
|
778
783
|
ObjectAuditComponent,
|
|
779
784
|
RetentionBadgeComponent
|
|
780
785
|
];
|
|
781
786
|
class YuvObjectDetailsModule {
|
|
782
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
783
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
787
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: YuvObjectDetailsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
788
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.12", ngImport: i0, type: YuvObjectDetailsModule, imports: [ObjectDetailsComponent,
|
|
784
789
|
ObjectDetailsHeaderComponent,
|
|
785
790
|
ObjectDetailsShellComponent,
|
|
786
791
|
ObjectMetadataComponent,
|
|
792
|
+
ObjectMetadataSectionComponent,
|
|
787
793
|
ObjectAuditComponent,
|
|
788
794
|
RetentionBadgeComponent], exports: [ObjectDetailsComponent,
|
|
789
795
|
ObjectDetailsHeaderComponent,
|
|
790
796
|
ObjectDetailsShellComponent,
|
|
791
797
|
ObjectMetadataComponent,
|
|
798
|
+
ObjectMetadataSectionComponent,
|
|
792
799
|
ObjectAuditComponent,
|
|
793
800
|
RetentionBadgeComponent] }); }
|
|
794
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
801
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: YuvObjectDetailsModule, imports: [cmp] }); }
|
|
795
802
|
}
|
|
796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: YuvObjectDetailsModule, decorators: [{
|
|
797
804
|
type: NgModule,
|
|
798
805
|
args: [{
|
|
799
806
|
imports: cmp,
|
|
@@ -805,10 +812,10 @@ class FormSectionGroupPipe {
|
|
|
805
812
|
transform(form, id) {
|
|
806
813
|
return form.get(id);
|
|
807
814
|
}
|
|
808
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
809
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
815
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormSectionGroupPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
816
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.12", ngImport: i0, type: FormSectionGroupPipe, isStandalone: true, name: "formSectionGroup" }); }
|
|
810
817
|
}
|
|
811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormSectionGroupPipe, decorators: [{
|
|
812
819
|
type: Pipe,
|
|
813
820
|
args: [{
|
|
814
821
|
name: 'formSectionGroup',
|
|
@@ -820,5 +827,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
820
827
|
* Generated bundle index. Do not edit.
|
|
821
828
|
*/
|
|
822
829
|
|
|
823
|
-
export { FormSectionGroupPipe, ObjectAuditComponent, ObjectDetailsComponent, ObjectDetailsHeaderComponent, ObjectDetailsShellComponent, ObjectDetailsShellService, ObjectMetadataComponent, YuvObjectDetailsModule };
|
|
830
|
+
export { FormSectionGroupPipe, ObjectAuditComponent, ObjectDetailsComponent, ObjectDetailsHeaderComponent, ObjectDetailsShellComponent, ObjectDetailsShellService, ObjectMetadataComponent, ObjectMetadataSectionComponent, YuvObjectDetailsModule };
|
|
824
831
|
//# sourceMappingURL=yuuvis-client-framework-object-details.mjs.map
|