@yuuvis/client-framework 2.1.8 → 2.1.9
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/common/lib/services/layout-settings/layout-settings.service.d.ts +1 -0
- package/fesm2022/yuuvis-client-framework-common.mjs +1 -0
- package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-list.mjs +7 -2
- package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs +48 -18
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +23 -8
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-summary.mjs +120 -118
- package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-versions.mjs +177 -0
- package/fesm2022/yuuvis-client-framework-object-versions.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-overflow-hidden.mjs +70 -0
- package/fesm2022/yuuvis-client-framework-overflow-hidden.mjs.map +1 -0
- package/lib/assets/i18n/de.json +7 -0
- package/lib/assets/i18n/en.json +7 -0
- package/list/lib/list.component.d.ts +1 -0
- package/metadata-form/lib/metadata-form-element-registry.service.d.ts +1 -0
- package/metadata-form/lib/object-metadata-element-template.directive.d.ts +23 -5
- package/object-details/lib/object-details-header/object-details-header.component.d.ts +12 -1
- package/object-details/lib/object-details.component.d.ts +5 -0
- package/object-form/README.md +43 -0
- package/object-summary/lib/object-summary.module.d.ts +7 -5
- package/object-versions/README.md +3 -0
- package/object-versions/index.d.ts +2 -0
- package/object-versions/lib/object-versions.component.d.ts +30 -0
- package/object-versions/lib/object-versions.module.d.ts +7 -0
- package/overflow-hidden/README.md +3 -0
- package/overflow-hidden/index.d.ts +2 -0
- package/overflow-hidden/lib/overflow-hidden.component.d.ts +19 -0
- package/overflow-hidden/lib/overflow-hidden.module.d.ts +7 -0
- package/package.json +12 -4
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, viewChild, effect, input, output, signal, untracked, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i6 from '@angular/material/button';
|
|
4
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
+
import * as i5 from '@angular/material/icon';
|
|
6
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
7
|
+
import * as i4 from '@angular/material/tabs';
|
|
8
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
9
|
+
import * as i7 from '@angular/material/tooltip';
|
|
10
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
11
|
+
import * as i2 from '@yuuvis/client-core';
|
|
12
|
+
import { DmsService, TranslateService, TranslateModule, LocaleDatePipe } from '@yuuvis/client-core';
|
|
13
|
+
import { LayoutSettingsService, ConfirmService, BusyOverlayDirective } from '@yuuvis/client-framework/common';
|
|
14
|
+
import * as i3 from '@yuuvis/client-framework/list';
|
|
15
|
+
import { ListComponent, YuvListModule } from '@yuuvis/client-framework/list';
|
|
16
|
+
import { ObjectDetailsHeaderComponent } from '@yuuvis/client-framework/object-details';
|
|
17
|
+
import { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';
|
|
18
|
+
import { ObjectSummaryDataComponent } from '@yuuvis/client-framework/object-summary';
|
|
19
|
+
import * as i1 from '@yuuvis/client-framework/split-view';
|
|
20
|
+
import { YuvSplitViewModule } from '@yuuvis/client-framework/split-view';
|
|
21
|
+
import { switchMap, finalize } from 'rxjs';
|
|
22
|
+
|
|
23
|
+
class ObjectVersionsComponent {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.#layoutSettingsService = inject(LayoutSettingsService);
|
|
26
|
+
this.#dmsService = inject(DmsService);
|
|
27
|
+
this.#confirm = inject(ConfirmService);
|
|
28
|
+
this.translate = inject(TranslateService);
|
|
29
|
+
this.versionList = viewChild(ListComponent);
|
|
30
|
+
this.#versionListEffect = effect(() => {
|
|
31
|
+
const list = this.versionList();
|
|
32
|
+
if (list)
|
|
33
|
+
setTimeout(() => list.focus(), 100);
|
|
34
|
+
this.#preSelect();
|
|
35
|
+
});
|
|
36
|
+
this.dmsObject = input.required();
|
|
37
|
+
this.#dmsObjectEffect = effect(() => {
|
|
38
|
+
const o = this.dmsObject();
|
|
39
|
+
// this.selectedVersion.set(o);
|
|
40
|
+
if (o)
|
|
41
|
+
this.#fetchVersions(o);
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Object type to use for retrieving header data
|
|
45
|
+
*/
|
|
46
|
+
this.type = input.required();
|
|
47
|
+
/**
|
|
48
|
+
* If the object config for the given type has been stored in a certain bucket, this
|
|
49
|
+
* bucket can be provided here. If no bucket is set, the config will be retrieved
|
|
50
|
+
* from the main object config
|
|
51
|
+
*/
|
|
52
|
+
this.objectConfigBucket = input(undefined);
|
|
53
|
+
this.objectRestored = output();
|
|
54
|
+
this.splitGutterSize = this.#layoutSettingsService.DEFAULT_SPLIT_VIEW_GUTTER_SIZE;
|
|
55
|
+
this.busy = signal(false);
|
|
56
|
+
this.versions = signal([]);
|
|
57
|
+
this.#versionsEffect = effect(() => {
|
|
58
|
+
const v = this.versions();
|
|
59
|
+
untracked(() => {
|
|
60
|
+
this.#preSelect();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
this.selectedVersion = signal(undefined);
|
|
64
|
+
this.error = signal(undefined);
|
|
65
|
+
}
|
|
66
|
+
#layoutSettingsService;
|
|
67
|
+
#dmsService;
|
|
68
|
+
#confirm;
|
|
69
|
+
#versionListEffect;
|
|
70
|
+
#dmsObjectEffect;
|
|
71
|
+
#versionsEffect;
|
|
72
|
+
#preSelect() {
|
|
73
|
+
const vl = this.versionList();
|
|
74
|
+
if (vl && !this.selectedVersion()) {
|
|
75
|
+
vl.select(0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
itemSelected(selectedIndex) {
|
|
79
|
+
const idx = selectedIndex[0];
|
|
80
|
+
this.selectedVersion.set(this.versions()[idx]);
|
|
81
|
+
}
|
|
82
|
+
downloadCurrentVersion() {
|
|
83
|
+
const o = this.selectedVersion();
|
|
84
|
+
if (o)
|
|
85
|
+
this.#dmsService.downloadContent([o], true);
|
|
86
|
+
}
|
|
87
|
+
restoreCurrentVersion() {
|
|
88
|
+
const o = this.selectedVersion();
|
|
89
|
+
if (o) {
|
|
90
|
+
this.#confirm
|
|
91
|
+
.confirm({
|
|
92
|
+
title: this.translate.instant('yuv.object-versions.actions.restore'),
|
|
93
|
+
message: this.translate.instant('yuv.object-versions.actions.restore.confirm.message', {
|
|
94
|
+
version: o.version
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
.subscribe((confirmed) => {
|
|
98
|
+
if (confirmed)
|
|
99
|
+
this.#executeRestoreCurrentVersion(o);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
#executeRestoreCurrentVersion(version) {
|
|
104
|
+
this.busy.set(true);
|
|
105
|
+
this.#dmsService
|
|
106
|
+
.restoreDmsObject(version.id, version.version)
|
|
107
|
+
.pipe(switchMap((dmsObject) => this.#dmsService.getDmsObjectVersions(dmsObject.id)), finalize(() => this.busy.set(false)))
|
|
108
|
+
.subscribe({
|
|
109
|
+
next: (versions) => {
|
|
110
|
+
this.versions.set(versions);
|
|
111
|
+
this.versionList()?.select(0);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
#fetchVersions(dmsObject) {
|
|
116
|
+
// if the dms object only has one version we do not need to ask the backend
|
|
117
|
+
if (dmsObject.version === 1) {
|
|
118
|
+
this.versions.set([dmsObject]);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.busy.set(true);
|
|
122
|
+
this.#dmsService
|
|
123
|
+
.getDmsObjectVersions(dmsObject.id)
|
|
124
|
+
.pipe(finalize(() => this.busy.set(false)))
|
|
125
|
+
.subscribe({
|
|
126
|
+
next: (versions) => {
|
|
127
|
+
this.versions.set(versions);
|
|
128
|
+
},
|
|
129
|
+
error: (e) => {
|
|
130
|
+
// TODO: handle errors
|
|
131
|
+
this.error.set(this.translate.instant('yuv.object-versions.error.fetch-versions'));
|
|
132
|
+
console.error(e);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectVersionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
138
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectVersionsComponent, isStandalone: true, selector: "yuv-object-versions", inputs: { dmsObject: { classPropertyName: "dmsObject", publicName: "dmsObject", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, objectConfigBucket: { classPropertyName: "objectConfigBucket", publicName: "objectConfigBucket", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { objectRestored: "objectRestored" }, viewQueries: [{ propertyName: "versionList", first: true, predicate: ListComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let err = error();\n@if (!err) {\n <yuv-split-view [gutterSize]=\"splitGutterSize\" layoutSettingsID=\"yuv.object-versions.split\">\n <!-- version details -->\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"version-details ymt-panel\" [yuvBusyOverlay]=\"busy()\">\n @let selected = selectedVersion();\n @if (selected) {\n <yuv-object-details-header [dmsObject]=\"selected\" [type]=\"type()\" [bucket]=\"objectConfigBucket()\">\n <ng-template #yuvHeaderActions>\n <button mat-icon-button (click)=\"downloadCurrentVersion()\" [matTooltip]=\"'yuv.object-versions.actions.download' | translate\">\n <mat-icon>download</mat-icon>\n </button>\n <button mat-icon-button (click)=\"restoreCurrentVersion()\" [matTooltip]=\"'yuv.object-versions.actions.restore' | translate\">\n <mat-icon>restore_page</mat-icon>\n </button>\n </ng-template>\n </yuv-object-details-header>\n\n <mat-tab-group class=\"version-tabs\">\n <mat-tab [label]=\"'yuv.object-versions.tabs.content.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-preview [dmsObject]=\"selected\" [version]=\"selected.version\"></yuv-object-preview>\n </ng-template>\n </mat-tab>\n <mat-tab [label]=\"'yuv.object-versions.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-summary-data [dmsObject]=\"selected\"></yuv-object-summary-data>\n </ng-template> </mat-tab\n ></mat-tab-group>\n }\n </div>\n </ng-template>\n\n <!-- versions list -->\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"version-list ymt-panel\">\n <yuv-list selectOnEnter=\"true\" (itemSelect)=\"itemSelected($event)\">\n @for (v of versions(); track v.version) {\n <div class=\"version\" yuvListItem>\n <div class=\"label\">{{ 'yuv.object-versions.list.version' | translate: { version: v.version } }}</div>\n\n <span class=\"modified-on\">{{ v.modified.on | localeDate }}</span>\n <span class=\"modified-by\">{{ v.modified.by.title }}</span>\n </div>\n }\n </yuv-list>\n </div>\n </ng-template>\n </yuv-split-view>\n} @else {\n <div class=\"error\">\n <p>{{ err }}</p>\n </div>\n}\n", styles: [":host{display:block}:host .ymt-panel{background-color:var(--ymt-surface);border:1px solid var(--ymt-outline-variant);border-radius:var(--ymt-corner-m)}:host .ymt-panel{height:100%;overflow:hidden}:host mat-tab-group{overflow:hidden;height:100%}:host mat-tab-group ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}:host .version{display:grid;grid-template-rows:auto auto;grid-template-columns:1fr auto;grid-template-areas:\"version version\" \"by on\";border-block-end:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-s) var(--ymt-spacing-l);gap:var(--ymt-spacing-s)}:host .version .label{grid-area:version;font:var(--ymt-font-title-small)}:host .version .modified-by{grid-area:by;font:var(--ymt-font-body);color:var(--ymt-text-color-subtle)}:host .version .modified-on{grid-area:on;font:var(--ymt-font-body);color:var(--ymt-text-color-subtle)}:host .error{height:100%;display:flex;align-items:center;justify-content:center}:host .error>p{background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);border:var(--ymt-danger);padding:var(--ymt-spacing-xs);border-radius:var(--ymt-corner-xs)}\n"], dependencies: [{ kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version"] }, { kind: "component", type: ObjectDetailsHeaderComponent, selector: "yuv-object-details-header", inputs: ["dmsObject", "type", "bucket"] }, { kind: "ngmodule", type: YuvListModule }, { kind: "component", type: i3.ListComponent, selector: "yuv-list", inputs: ["multiselect", "selfHandleSelection", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: i3.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay"] }, { kind: "component", type: ObjectSummaryDataComponent, selector: "yuv-object-summary-data", inputs: ["dmsObject"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i4.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i4.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: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: LocaleDatePipe, name: "localeDate" }] }); }
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: ObjectVersionsComponent, decorators: [{
|
|
141
|
+
type: Component,
|
|
142
|
+
args: [{ selector: 'yuv-object-versions', imports: [
|
|
143
|
+
YuvSplitViewModule,
|
|
144
|
+
TranslateModule,
|
|
145
|
+
ObjectPreviewComponent,
|
|
146
|
+
ObjectDetailsHeaderComponent,
|
|
147
|
+
YuvListModule,
|
|
148
|
+
BusyOverlayDirective,
|
|
149
|
+
ObjectSummaryDataComponent,
|
|
150
|
+
MatTabsModule,
|
|
151
|
+
MatIconModule,
|
|
152
|
+
MatButtonModule,
|
|
153
|
+
MatTooltipModule,
|
|
154
|
+
LocaleDatePipe
|
|
155
|
+
], template: "@let err = error();\n@if (!err) {\n <yuv-split-view [gutterSize]=\"splitGutterSize\" layoutSettingsID=\"yuv.object-versions.split\">\n <!-- version details -->\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"version-details ymt-panel\" [yuvBusyOverlay]=\"busy()\">\n @let selected = selectedVersion();\n @if (selected) {\n <yuv-object-details-header [dmsObject]=\"selected\" [type]=\"type()\" [bucket]=\"objectConfigBucket()\">\n <ng-template #yuvHeaderActions>\n <button mat-icon-button (click)=\"downloadCurrentVersion()\" [matTooltip]=\"'yuv.object-versions.actions.download' | translate\">\n <mat-icon>download</mat-icon>\n </button>\n <button mat-icon-button (click)=\"restoreCurrentVersion()\" [matTooltip]=\"'yuv.object-versions.actions.restore' | translate\">\n <mat-icon>restore_page</mat-icon>\n </button>\n </ng-template>\n </yuv-object-details-header>\n\n <mat-tab-group class=\"version-tabs\">\n <mat-tab [label]=\"'yuv.object-versions.tabs.content.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-preview [dmsObject]=\"selected\" [version]=\"selected.version\"></yuv-object-preview>\n </ng-template>\n </mat-tab>\n <mat-tab [label]=\"'yuv.object-versions.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-summary-data [dmsObject]=\"selected\"></yuv-object-summary-data>\n </ng-template> </mat-tab\n ></mat-tab-group>\n }\n </div>\n </ng-template>\n\n <!-- versions list -->\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"version-list ymt-panel\">\n <yuv-list selectOnEnter=\"true\" (itemSelect)=\"itemSelected($event)\">\n @for (v of versions(); track v.version) {\n <div class=\"version\" yuvListItem>\n <div class=\"label\">{{ 'yuv.object-versions.list.version' | translate: { version: v.version } }}</div>\n\n <span class=\"modified-on\">{{ v.modified.on | localeDate }}</span>\n <span class=\"modified-by\">{{ v.modified.by.title }}</span>\n </div>\n }\n </yuv-list>\n </div>\n </ng-template>\n </yuv-split-view>\n} @else {\n <div class=\"error\">\n <p>{{ err }}</p>\n </div>\n}\n", styles: [":host{display:block}:host .ymt-panel{background-color:var(--ymt-surface);border:1px solid var(--ymt-outline-variant);border-radius:var(--ymt-corner-m)}:host .ymt-panel{height:100%;overflow:hidden}:host mat-tab-group{overflow:hidden;height:100%}:host mat-tab-group ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}:host .version{display:grid;grid-template-rows:auto auto;grid-template-columns:1fr auto;grid-template-areas:\"version version\" \"by on\";border-block-end:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-s) var(--ymt-spacing-l);gap:var(--ymt-spacing-s)}:host .version .label{grid-area:version;font:var(--ymt-font-title-small)}:host .version .modified-by{grid-area:by;font:var(--ymt-font-body);color:var(--ymt-text-color-subtle)}:host .version .modified-on{grid-area:on;font:var(--ymt-font-body);color:var(--ymt-text-color-subtle)}:host .error{height:100%;display:flex;align-items:center;justify-content:center}:host .error>p{background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);border:var(--ymt-danger);padding:var(--ymt-spacing-xs);border-radius:var(--ymt-corner-xs)}\n"] }]
|
|
156
|
+
}] });
|
|
157
|
+
|
|
158
|
+
const cmp = [ObjectVersionsComponent];
|
|
159
|
+
class YuvObjectVersionsModule {
|
|
160
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectVersionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
161
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectVersionsModule, imports: [ObjectVersionsComponent], exports: [ObjectVersionsComponent] }); }
|
|
162
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectVersionsModule, imports: [cmp] }); }
|
|
163
|
+
}
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvObjectVersionsModule, decorators: [{
|
|
165
|
+
type: NgModule,
|
|
166
|
+
args: [{
|
|
167
|
+
imports: cmp,
|
|
168
|
+
exports: cmp
|
|
169
|
+
}]
|
|
170
|
+
}] });
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Generated bundle index. Do not edit.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
export { ObjectVersionsComponent, YuvObjectVersionsModule };
|
|
177
|
+
//# sourceMappingURL=yuuvis-client-framework-object-versions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-object-versions.mjs","sources":["../../../../../libs/yuuvis/client-framework/object-versions/src/lib/object-versions.component.ts","../../../../../libs/yuuvis/client-framework/object-versions/src/lib/object-versions.component.html","../../../../../libs/yuuvis/client-framework/object-versions/src/lib/object-versions.module.ts","../../../../../libs/yuuvis/client-framework/object-versions/src/yuuvis-client-framework-object-versions.ts"],"sourcesContent":["import { Component, effect, inject, input, output, signal, untracked, viewChild } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { DmsObject, DmsService, LocaleDatePipe, TranslateModule, TranslateService, VirtualObjectType } from '@yuuvis/client-core';\nimport { BusyOverlayDirective, ConfirmService, LayoutSettingsService } from '@yuuvis/client-framework/common';\nimport { ListComponent, YuvListModule } from '@yuuvis/client-framework/list';\nimport { ObjectDetailsHeaderComponent } from '@yuuvis/client-framework/object-details';\nimport { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';\nimport { ObjectSummaryDataComponent } from '@yuuvis/client-framework/object-summary';\nimport { YuvSplitViewModule } from '@yuuvis/client-framework/split-view';\nimport { finalize, switchMap } from 'rxjs';\n\n@Component({\n selector: 'yuv-object-versions',\n imports: [\n YuvSplitViewModule,\n TranslateModule,\n ObjectPreviewComponent,\n ObjectDetailsHeaderComponent,\n YuvListModule,\n BusyOverlayDirective,\n ObjectSummaryDataComponent,\n MatTabsModule,\n MatIconModule,\n MatButtonModule,\n MatTooltipModule,\n LocaleDatePipe\n ],\n templateUrl: './object-versions.component.html',\n styleUrl: './object-versions.component.scss'\n})\nexport class ObjectVersionsComponent {\n #layoutSettingsService = inject(LayoutSettingsService);\n #dmsService = inject(DmsService);\n #confirm = inject(ConfirmService);\n\n private translate = inject(TranslateService);\n\n versionList = viewChild(ListComponent);\n #versionListEffect = effect(() => {\n const list = this.versionList();\n\n if (list) setTimeout(() => list.focus(), 100);\n this.#preSelect();\n });\n\n dmsObject = input.required<DmsObject>();\n #dmsObjectEffect = effect(() => {\n const o = this.dmsObject();\n // this.selectedVersion.set(o);\n if (o) this.#fetchVersions(o);\n });\n\n /**\n * Object type to use for retrieving header data\n */\n type = input.required<VirtualObjectType>();\n /**\n * If the object config for the given type has been stored in a certain bucket, this\n * bucket can be provided here. If no bucket is set, the config will be retrieved\n * from the main object config\n */\n objectConfigBucket = input<string | undefined>(undefined);\n\n objectRestored = output<number>();\n\n splitGutterSize = this.#layoutSettingsService.DEFAULT_SPLIT_VIEW_GUTTER_SIZE;\n busy = signal<boolean>(false);\n versions = signal<DmsObject[]>([]);\n #versionsEffect = effect(() => {\n const v = this.versions();\n untracked(() => {\n this.#preSelect();\n });\n });\n selectedVersion = signal<DmsObject | undefined>(undefined);\n error = signal<string | undefined>(undefined);\n\n #preSelect() {\n const vl = this.versionList();\n if (vl && !this.selectedVersion()) {\n vl.select(0);\n }\n }\n\n itemSelected(selectedIndex: number[]) {\n const idx = selectedIndex[0];\n this.selectedVersion.set(this.versions()[idx]);\n }\n\n downloadCurrentVersion() {\n const o = this.selectedVersion();\n if (o) this.#dmsService.downloadContent([o], true);\n }\n\n restoreCurrentVersion() {\n const o = this.selectedVersion();\n if (o) {\n this.#confirm\n .confirm({\n title: this.translate.instant('yuv.object-versions.actions.restore'),\n message: this.translate.instant('yuv.object-versions.actions.restore.confirm.message', {\n version: o.version\n })\n })\n .subscribe((confirmed: boolean) => {\n if (confirmed) this.#executeRestoreCurrentVersion(o);\n });\n }\n }\n\n #executeRestoreCurrentVersion(version: DmsObject) {\n this.busy.set(true);\n this.#dmsService\n .restoreDmsObject(version.id, version.version)\n .pipe(\n switchMap((dmsObject: DmsObject) => this.#dmsService.getDmsObjectVersions(dmsObject.id)),\n finalize(() => this.busy.set(false))\n )\n .subscribe({\n next: (versions: DmsObject[]) => {\n this.versions.set(versions);\n this.versionList()?.select(0);\n }\n });\n }\n\n #fetchVersions(dmsObject: DmsObject) {\n // if the dms object only has one version we do not need to ask the backend\n if (dmsObject.version === 1) {\n this.versions.set([dmsObject]);\n } else {\n this.busy.set(true);\n this.#dmsService\n .getDmsObjectVersions(dmsObject.id)\n .pipe(finalize(() => this.busy.set(false)))\n .subscribe({\n next: (versions: DmsObject[]) => {\n this.versions.set(versions);\n },\n error: (e) => {\n // TODO: handle errors\n this.error.set(this.translate.instant('yuv.object-versions.error.fetch-versions'));\n console.error(e);\n }\n });\n }\n }\n}\n","@let err = error();\n@if (!err) {\n <yuv-split-view [gutterSize]=\"splitGutterSize\" layoutSettingsID=\"yuv.object-versions.split\">\n <!-- version details -->\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"version-details ymt-panel\" [yuvBusyOverlay]=\"busy()\">\n @let selected = selectedVersion();\n @if (selected) {\n <yuv-object-details-header [dmsObject]=\"selected\" [type]=\"type()\" [bucket]=\"objectConfigBucket()\">\n <ng-template #yuvHeaderActions>\n <button mat-icon-button (click)=\"downloadCurrentVersion()\" [matTooltip]=\"'yuv.object-versions.actions.download' | translate\">\n <mat-icon>download</mat-icon>\n </button>\n <button mat-icon-button (click)=\"restoreCurrentVersion()\" [matTooltip]=\"'yuv.object-versions.actions.restore' | translate\">\n <mat-icon>restore_page</mat-icon>\n </button>\n </ng-template>\n </yuv-object-details-header>\n\n <mat-tab-group class=\"version-tabs\">\n <mat-tab [label]=\"'yuv.object-versions.tabs.content.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-preview [dmsObject]=\"selected\" [version]=\"selected.version\"></yuv-object-preview>\n </ng-template>\n </mat-tab>\n <mat-tab [label]=\"'yuv.object-versions.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-summary-data [dmsObject]=\"selected\"></yuv-object-summary-data>\n </ng-template> </mat-tab\n ></mat-tab-group>\n }\n </div>\n </ng-template>\n\n <!-- versions list -->\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"version-list ymt-panel\">\n <yuv-list selectOnEnter=\"true\" (itemSelect)=\"itemSelected($event)\">\n @for (v of versions(); track v.version) {\n <div class=\"version\" yuvListItem>\n <div class=\"label\">{{ 'yuv.object-versions.list.version' | translate: { version: v.version } }}</div>\n\n <span class=\"modified-on\">{{ v.modified.on | localeDate }}</span>\n <span class=\"modified-by\">{{ v.modified.by.title }}</span>\n </div>\n }\n </yuv-list>\n </div>\n </ng-template>\n </yuv-split-view>\n} @else {\n <div class=\"error\">\n <p>{{ err }}</p>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { ObjectVersionsComponent } from './object-versions.component';\n\nconst cmp = [ObjectVersionsComponent];\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YuvObjectVersionsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAiCa,uBAAuB,CAAA;AAnBpC,IAAA,WAAA,GAAA;AAoBE,QAAA,IAAA,CAAA,sBAAsB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACtD,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,cAAc,CAAC;AAEzB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE5C,QAAA,IAAA,CAAA,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC;AACtC,QAAA,IAAA,CAAA,kBAAk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,EAAA,CALvB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAAvB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAKvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAHzB,GAAG,CAAA,EAAA,CAAA,CAAA;;4FAGD,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, contentChild, signal, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This component is designed to switch the rendered content when it is overflowing due to
|
|
8
|
+
* resizing. If there is enough available space you can render the 'real' component. If there
|
|
9
|
+
* is not enough space to render the whole component anymore (it would overflow) another component
|
|
10
|
+
* can take it's place. If you do not specify that replace-component, the component will just
|
|
11
|
+
* disappear and make room for other more important components.
|
|
12
|
+
*/
|
|
13
|
+
class OverflowHiddenComponent {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.#elRef = inject(ElementRef);
|
|
16
|
+
// component/content to be rendered when there is enough space
|
|
17
|
+
this.defaultSlot = contentChild.required('yuvDefaultSlot');
|
|
18
|
+
// component/content to be rendered when the default component overflows
|
|
19
|
+
this.overflowSlot = contentChild('yuvOverflowSlot');
|
|
20
|
+
this.overflow = signal(false);
|
|
21
|
+
}
|
|
22
|
+
#elRef;
|
|
23
|
+
#contentObserver;
|
|
24
|
+
#initObserver() {
|
|
25
|
+
this.#contentObserver = new IntersectionObserver((entries) => {
|
|
26
|
+
const overflowContainer = entries[0];
|
|
27
|
+
this.overflow.set(overflowContainer.intersectionRatio < 1);
|
|
28
|
+
}, {
|
|
29
|
+
threshold: [1],
|
|
30
|
+
root: this.#elRef.nativeElement
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
ngAfterViewInit() {
|
|
34
|
+
this.#initObserver();
|
|
35
|
+
this.#contentObserver?.observe(this.#elRef.nativeElement.querySelector('.default'));
|
|
36
|
+
}
|
|
37
|
+
ngOnDestroy() {
|
|
38
|
+
if (this.#contentObserver)
|
|
39
|
+
this.#contentObserver.disconnect();
|
|
40
|
+
}
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: OverflowHiddenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: OverflowHiddenComponent, isStandalone: true, selector: "yuv-overflow-hidden", host: { properties: { "class.overflowing": "overflow()" } }, queries: [{ propertyName: "defaultSlot", first: true, predicate: ["yuvDefaultSlot"], descendants: true, isSignal: true }, { propertyName: "overflowSlot", first: true, predicate: ["yuvOverflowSlot"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"default\">\n <ng-container *ngTemplateOutlet=\"defaultSlot()\"></ng-container>\n</div>\n@let os = overflowSlot();\n@if (os) {\n <div class=\"overflow\">\n <ng-container *ngTemplateOutlet=\"os\"></ng-container>\n </div>\n}\n", styles: [":host{display:grid;grid-template-columns:auto;grid-template-rows:auto;align-items:center;overflow:hidden}:host.overflowing .default{opacity:0;z-index:0}:host.overflowing .overflow{opacity:1;z-index:1}:host .default,:host .overflow{grid-column:1;grid-row:1;z-index:1}:host .overflow{opacity:0;z-index:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: OverflowHiddenComponent, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{ selector: 'yuv-overflow-hidden', imports: [CommonModule], host: {
|
|
47
|
+
'[class.overflowing]': 'overflow()'
|
|
48
|
+
}, template: "<div class=\"default\">\n <ng-container *ngTemplateOutlet=\"defaultSlot()\"></ng-container>\n</div>\n@let os = overflowSlot();\n@if (os) {\n <div class=\"overflow\">\n <ng-container *ngTemplateOutlet=\"os\"></ng-container>\n </div>\n}\n", styles: [":host{display:grid;grid-template-columns:auto;grid-template-rows:auto;align-items:center;overflow:hidden}:host.overflowing .default{opacity:0;z-index:0}:host.overflowing .overflow{opacity:1;z-index:1}:host .default,:host .overflow{grid-column:1;grid-row:1;z-index:1}:host .overflow{opacity:0;z-index:0}\n"] }]
|
|
49
|
+
}] });
|
|
50
|
+
|
|
51
|
+
const cmp = [OverflowHiddenComponent];
|
|
52
|
+
class YuvOverflowHiddenModule {
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvOverflowHiddenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
54
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.12", ngImport: i0, type: YuvOverflowHiddenModule, imports: [OverflowHiddenComponent], exports: [OverflowHiddenComponent] }); }
|
|
55
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvOverflowHiddenModule, imports: [cmp] }); }
|
|
56
|
+
}
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: YuvOverflowHiddenModule, decorators: [{
|
|
58
|
+
type: NgModule,
|
|
59
|
+
args: [{
|
|
60
|
+
imports: cmp,
|
|
61
|
+
exports: cmp
|
|
62
|
+
}]
|
|
63
|
+
}] });
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Generated bundle index. Do not edit.
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
export { OverflowHiddenComponent, YuvOverflowHiddenModule };
|
|
70
|
+
//# sourceMappingURL=yuuvis-client-framework-overflow-hidden.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-overflow-hidden.mjs","sources":["../../../../../libs/yuuvis/client-framework/overflow-hidden/src/lib/overflow-hidden.component.ts","../../../../../libs/yuuvis/client-framework/overflow-hidden/src/lib/overflow-hidden.component.html","../../../../../libs/yuuvis/client-framework/overflow-hidden/src/lib/overflow-hidden.module.ts","../../../../../libs/yuuvis/client-framework/overflow-hidden/src/yuuvis-client-framework-overflow-hidden.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterViewInit, Component, contentChild, ElementRef, inject, OnDestroy, signal, TemplateRef } from '@angular/core';\n\n/**\n * This component is designed to switch the rendered content when it is overflowing due to\n * resizing. If there is enough available space you can render the 'real' component. If there\n * is not enough space to render the whole component anymore (it would overflow) another component\n * can take it's place. If you do not specify that replace-component, the component will just\n * disappear and make room for other more important components.\n */\n@Component({\n selector: 'yuv-overflow-hidden',\n imports: [CommonModule],\n templateUrl: './overflow-hidden.component.html',\n styleUrl: './overflow-hidden.component.scss',\n host: {\n '[class.overflowing]': 'overflow()'\n }\n})\nexport class OverflowHiddenComponent implements AfterViewInit, OnDestroy {\n #elRef = inject(ElementRef);\n\n // component/content to be rendered when there is enough space\n defaultSlot = contentChild.required<TemplateRef<any>>('yuvDefaultSlot');\n // component/content to be rendered when the default component overflows\n overflowSlot = contentChild<TemplateRef<any>>('yuvOverflowSlot');\n\n #contentObserver?: IntersectionObserver;\n overflow = signal<boolean>(false);\n\n #initObserver() {\n this.#contentObserver = new IntersectionObserver(\n (entries) => {\n const overflowContainer = entries[0];\n this.overflow.set(overflowContainer.intersectionRatio < 1);\n },\n {\n threshold: [1],\n root: this.#elRef.nativeElement\n }\n );\n }\n\n ngAfterViewInit(): void {\n this.#initObserver();\n this.#contentObserver?.observe(this.#elRef.nativeElement.querySelector('.default'));\n }\n\n ngOnDestroy(): void {\n if (this.#contentObserver) this.#contentObserver.disconnect();\n }\n}\n","<div class=\"default\">\n <ng-container *ngTemplateOutlet=\"defaultSlot()\"></ng-container>\n</div>\n@let os = overflowSlot();\n@if (os) {\n <div class=\"overflow\">\n <ng-container *ngTemplateOutlet=\"os\"></ng-container>\n </div>\n}\n","import { NgModule } from '@angular/core';\n\nimport { OverflowHiddenComponent } from './overflow-hidden.component';\n\nconst cmp = [OverflowHiddenComponent];\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YuvOverflowHiddenModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;;;AAMG;MAUU,uBAAuB,CAAA;AATpC,IAAA,WAAA,GAAA;AAUE,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;;AAG3B,QAAA,IAAA,CAAA,WAAW,GAAG,YAAY,CAAC,QAAQ,CAAmB,gBAAgB,CAAC;;AAEvE,QAAA,IAAA,CAAA,YAAY,GAAG,YAAY,CAAmB,iBAAiB,CAAC;AAGhE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAU,KAAK,CAAC;AAuBlC;AA/BC,IAAA,MAAM;AAON,IAAA,gBAAgB;IAGhB,aAAa,GAAA;QACX,IAAI,CAAC,gBAAgB,GAAG,IAAI,oBAAoB,CAC9C,CAAC,OAAO,KAAI;AACV,YAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC;YACpC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB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,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAOX,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBATnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EACtB,OAAA,EAAA,CAAC,YAAY,CAAC,EAGjB,IAAA,EAAA;AACJ,wBAAA,qBAAqB,EAAE;AACxB,qBAAA,EAAA,QAAA,EAAA,oPAAA,EAAA,MAAA,EAAA,CAAA,kTAAA,CAAA,EAAA;;;AEbH,MAAM,GAAG,GAAG,CAAC,uBAAuB,CAAC;MAKxB,uBAAuB,CAAA;+GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAvB,uBAAuB,EAAA,OAAA,EAAA,CALvB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAAvB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAKvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAHzB,GAAG,CAAA,EAAA,CAAA,CAAA;;4FAGD,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACRD;;AAEG;;;;"}
|
package/lib/assets/i18n/de.json
CHANGED
|
@@ -96,6 +96,13 @@
|
|
|
96
96
|
"yuv.object-flavor.picker.title": "Typ hinzufügen",
|
|
97
97
|
"yuv.object-preview.tiff-warning": "Dieses Dokument ist nicht die Original-TIFF-Datei, sondern nur eine Repräsentation. TIFF-Dateien werden nicht für die Vorschau unterstützt. Bitte laden Sie das Dokument herunter, um das Original anzuzeigen.",
|
|
98
98
|
"yuv.object-summary.load.error": "",
|
|
99
|
+
"yuv.object-versions.actions.download": "Version herunterladen",
|
|
100
|
+
"yuv.object-versions.actions.restore": "Version wiederherstellen",
|
|
101
|
+
"yuv.object-versions.actions.restore.confirm.message": "Sind Sie sicher, dass Sie die Version {{version}} wiederherstellen wollen?",
|
|
102
|
+
"yuv.object-versions.error.fetch-versions": "Versionen konnten nicht geladen werden",
|
|
103
|
+
"yuv.object-versions.list.version": "Version {{version}}",
|
|
104
|
+
"yuv.object-versions.tabs.content.title": "Inhalt",
|
|
105
|
+
"yuv.object-versions.tabs.indexdata.title": "Metadaten",
|
|
99
106
|
"yuv.sequence-list.form.nextAssignee": "Empfänger",
|
|
100
107
|
"yuv.sequence-list.form.task": "Aufgabe",
|
|
101
108
|
"yuv.simple-search.label": "Suchen",
|
package/lib/assets/i18n/en.json
CHANGED
|
@@ -96,6 +96,13 @@
|
|
|
96
96
|
"yuv.object-flavor.picker.title": "Add type",
|
|
97
97
|
"yuv.object-preview.tiff-warning": "This document is not the original *.tiff file, but only a representation. The preview does not support *.tiff files. Please download the document to view the original.",
|
|
98
98
|
"yuv.object-summary.load.error": "",
|
|
99
|
+
"yuv.object-versions.actions.download": "Download version",
|
|
100
|
+
"yuv.object-versions.actions.restore": "Restore version",
|
|
101
|
+
"yuv.object-versions.actions.restore.confirm.message": "Are you sure to restore version {{version}} to become the new current version?",
|
|
102
|
+
"yuv.object-versions.error.fetch-versions": "Could not load versions",
|
|
103
|
+
"yuv.object-versions.list.version": "Version {{version}}",
|
|
104
|
+
"yuv.object-versions.tabs.content.title": "Content",
|
|
105
|
+
"yuv.object-versions.tabs.indexdata.title": "Metadaten",
|
|
99
106
|
"yuv.sequence-list.form.nextAssignee": "Recipient",
|
|
100
107
|
"yuv.sequence-list.form.task": "Task",
|
|
101
108
|
"yuv.simple-search.label": "Search",
|
|
@@ -50,6 +50,7 @@ export declare class ListComponent implements OnDestroy {
|
|
|
50
50
|
* This is useful for lists that are used for display purposes only.
|
|
51
51
|
*/
|
|
52
52
|
disableSelection: import("@angular/core").InputSignal<boolean>;
|
|
53
|
+
focus(): void;
|
|
53
54
|
select(index: number, shiftKey?: boolean, ctrlKey?: boolean): void;
|
|
54
55
|
/**
|
|
55
56
|
* Clear the current selection.
|
|
@@ -21,6 +21,7 @@ export declare class MetadataFormElementRegistry {
|
|
|
21
21
|
private _edit;
|
|
22
22
|
private _search;
|
|
23
23
|
private _create;
|
|
24
|
+
NAME_PROPERTY_PREFIX: string;
|
|
24
25
|
/**
|
|
25
26
|
* Get a template to render a certain form element
|
|
26
27
|
* @param propertyType The internal type to get the template for
|
|
@@ -15,13 +15,31 @@ import * as i0 from "@angular/core";
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
export declare class ObjectMetadataElementTemplateDirective implements OnInit, OnDestroy {
|
|
18
|
-
private
|
|
19
|
-
|
|
18
|
+
#private;
|
|
19
|
+
/**
|
|
20
|
+
* Bucket to register the template. Use 'default' for templates that should be
|
|
21
|
+
* used across all situations.
|
|
22
|
+
*/
|
|
20
23
|
yuvMetadataElementTemplate?: string;
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Situation to register the template for. So only object forms for that
|
|
26
|
+
* situation (CREATE, EDIT, SEARCH) will use the template. Defaults to `EDIT`.
|
|
27
|
+
*/
|
|
28
|
+
situation: import("@angular/core").InputSignal<Situation>;
|
|
29
|
+
/**
|
|
30
|
+
* Internal property type to get the registered template. You need to set either
|
|
31
|
+
* `propertyType` or `propertyName` to get a template. Setting a name and
|
|
32
|
+
* a type, the name will be used because it is more precise.
|
|
33
|
+
*/
|
|
34
|
+
propertyType: import("@angular/core").InputSignal<string | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* Pick registered metadata element by name. You need to set either
|
|
37
|
+
* `propertyType` or `propertyName` to get a template. Setting a name and
|
|
38
|
+
* a type, the name will be used because it is more precise.
|
|
39
|
+
*/
|
|
40
|
+
propertyName: import("@angular/core").InputSignal<string | undefined>;
|
|
23
41
|
ngOnInit(): void;
|
|
24
42
|
ngOnDestroy(): void;
|
|
25
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectMetadataElementTemplateDirective, never>;
|
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ObjectMetadataElementTemplateDirective, "[yuvMetadataElementTemplate]", never, { "yuvMetadataElementTemplate": { "alias": "yuvMetadataElementTemplate"; "required": false; }; "propertyType": { "alias": "propertyType"; "required": false; }; "
|
|
44
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ObjectMetadataElementTemplateDirective, "[yuvMetadataElementTemplate]", never, { "yuvMetadataElementTemplate": { "alias": "yuvMetadataElementTemplate"; "required": false; }; "situation": { "alias": "situation"; "required": false; "isSignal": true; }; "propertyType": { "alias": "propertyType"; "required": false; "isSignal": true; }; "propertyName": { "alias": "propertyName"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
27
45
|
}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import { DmsObject, VirtualObjectType } from '@yuuvis/client-core';
|
|
2
3
|
import { RendererDirectiveInput } from '@yuuvis/client-framework/renderer';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* Component showing header data for a dms object. These will be
|
|
6
7
|
* generated from the object config for the given object.
|
|
8
|
+
*
|
|
9
|
+
* You could inject a set of actions into the headers actions slot
|
|
10
|
+
* by adding them to the components body:
|
|
11
|
+
*
|
|
12
|
+
* ```html
|
|
13
|
+
* <yuv-object-details-header [dmsObject]="obj">
|
|
14
|
+
* <ng-template #yuvHeaderActions>...</ng-template>
|
|
15
|
+
* </yuv-object-details-header>
|
|
16
|
+
* ```
|
|
7
17
|
*/
|
|
8
18
|
export declare class ObjectDetailsHeaderComponent {
|
|
9
19
|
#private;
|
|
20
|
+
headerActions: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
10
21
|
dmsObject: import("@angular/core").InputSignal<DmsObject | undefined>;
|
|
11
22
|
/**
|
|
12
23
|
* Virtual object type to use for retrieving header data
|
|
@@ -22,5 +33,5 @@ export declare class ObjectDetailsHeaderComponent {
|
|
|
22
33
|
icon: string;
|
|
23
34
|
};
|
|
24
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectDetailsHeaderComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ObjectDetailsHeaderComponent, "yuv-object-details-header", never, { "dmsObject": { "alias": "dmsObject"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": true; "isSignal": true; }; "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; }, {},
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ObjectDetailsHeaderComponent, "yuv-object-details-header", never, { "dmsObject": { "alias": "dmsObject"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": true; "isSignal": true; }; "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; }, {}, ["headerActions"], never, true, never>;
|
|
26
37
|
}
|
|
@@ -23,6 +23,11 @@ export declare class ObjectDetailsComponent {
|
|
|
23
23
|
* Virtual object type to use for retrieving header data
|
|
24
24
|
*/
|
|
25
25
|
type: import("@angular/core").InputSignal<VirtualObjectType>;
|
|
26
|
+
/**
|
|
27
|
+
* If the object config for the given type has been stored in a certain bucket, this
|
|
28
|
+
* bucket can be provided here. If no bucket is set, the config will be retrieved
|
|
29
|
+
* from the main object config
|
|
30
|
+
*/
|
|
26
31
|
objectConfigBucket: import("@angular/core").InputSignal<string | undefined>;
|
|
27
32
|
/**
|
|
28
33
|
* ID of a DmsObject. The object will be fetched from the backend upfront.
|
package/object-form/README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
1
|
# @yuuvis/client-framework/object-form
|
|
2
2
|
|
|
3
3
|
Secondary entry point of `@yuuvis/client-framework`. It can be used by importing from `@yuuvis/client-framework/object-form`.
|
|
4
|
+
|
|
5
|
+
Components for rendering object forms. These forms are generated from object types (OT) or secondary object types (SOT). Each property of the type will be presented with a matching form field base on the property definition.
|
|
6
|
+
|
|
7
|
+
## Extending a form
|
|
8
|
+
|
|
9
|
+
The `object-form` component can be provided with extensions for certain fields. To do so, you have to create a component that extends `ObjectFormElementExtension`, which will give you access to the form, the fields value an an API to interact with the form:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { ObjectFormElementExtension } from '@yuuvis/client-framework/object-form';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
selector: 'form-extension',
|
|
16
|
+
imports: [],
|
|
17
|
+
templateUrl: './form-extension.component.html',
|
|
18
|
+
styleUrl: './form-extension.component.scss'
|
|
19
|
+
})
|
|
20
|
+
export class FormExtensionComponent extends ObjectFormElementExtension {
|
|
21
|
+
// implement your extension logic
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
You need to be aware that the component you create will be rendered beside the connected form control within the form. So make sure to respect the size (height in particular) of the form field.
|
|
26
|
+
|
|
27
|
+
Once you implemented your extension, you have to add it to the form:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { IObjectFormElementExtension } from '@yuuvis/client-framework/object-form';
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
formExtensions: IObjectFormElementExtension[] = [
|
|
34
|
+
{
|
|
35
|
+
// name of the object type mproperty to connect the extension to
|
|
36
|
+
property: 'name',
|
|
37
|
+
// the extension component
|
|
38
|
+
cmp: FormExtensionComponent
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<yuv-object-form [elementExtensions]="formExtensions" [formOptions]="fo"></yuv-object-form>
|
|
45
|
+
```
|
|
46
|
+
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
static
|
|
2
|
+
import * as i1 from "./object-summary/object-summary.component";
|
|
3
|
+
import * as i2 from "./multi-object-summary/multi-object-summary.component";
|
|
4
|
+
import * as i3 from "./object-summary-data/object-summary-data.component";
|
|
5
|
+
export declare class YuvObjectSummaryModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YuvObjectSummaryModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<YuvObjectSummaryModule, never, [typeof i1.ObjectSummaryComponent, typeof i2.MultiObjectSummaryComponent, typeof i3.ObjectSummaryDataComponent], [typeof i1.ObjectSummaryComponent, typeof i2.MultiObjectSummaryComponent, typeof i3.ObjectSummaryDataComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<YuvObjectSummaryModule>;
|
|
7
9
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DmsObject, VirtualObjectType } from '@yuuvis/client-core';
|
|
2
|
+
import { ListComponent } from '@yuuvis/client-framework/list';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ObjectVersionsComponent {
|
|
5
|
+
#private;
|
|
6
|
+
private translate;
|
|
7
|
+
versionList: import("@angular/core").Signal<ListComponent | undefined>;
|
|
8
|
+
dmsObject: import("@angular/core").InputSignal<DmsObject>;
|
|
9
|
+
/**
|
|
10
|
+
* Object type to use for retrieving header data
|
|
11
|
+
*/
|
|
12
|
+
type: import("@angular/core").InputSignal<VirtualObjectType>;
|
|
13
|
+
/**
|
|
14
|
+
* If the object config for the given type has been stored in a certain bucket, this
|
|
15
|
+
* bucket can be provided here. If no bucket is set, the config will be retrieved
|
|
16
|
+
* from the main object config
|
|
17
|
+
*/
|
|
18
|
+
objectConfigBucket: import("@angular/core").InputSignal<string | undefined>;
|
|
19
|
+
objectRestored: import("@angular/core").OutputEmitterRef<number>;
|
|
20
|
+
splitGutterSize: number;
|
|
21
|
+
busy: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
versions: import("@angular/core").WritableSignal<DmsObject[]>;
|
|
23
|
+
selectedVersion: import("@angular/core").WritableSignal<DmsObject | undefined>;
|
|
24
|
+
error: import("@angular/core").WritableSignal<string | undefined>;
|
|
25
|
+
itemSelected(selectedIndex: number[]): void;
|
|
26
|
+
downloadCurrentVersion(): void;
|
|
27
|
+
restoreCurrentVersion(): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectVersionsComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ObjectVersionsComponent, "yuv-object-versions", never, { "dmsObject": { "alias": "dmsObject"; "required": true; "isSignal": true; }; "type": { "alias": "type"; "required": true; "isSignal": true; }; "objectConfigBucket": { "alias": "objectConfigBucket"; "required": false; "isSignal": true; }; }, { "objectRestored": "objectRestored"; }, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./object-versions.component";
|
|
3
|
+
export declare class YuvObjectVersionsModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YuvObjectVersionsModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<YuvObjectVersionsModule, never, [typeof i1.ObjectVersionsComponent], [typeof i1.ObjectVersionsComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<YuvObjectVersionsModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AfterViewInit, OnDestroy, TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* This component is designed to switch the rendered content when it is overflowing due to
|
|
5
|
+
* resizing. If there is enough available space you can render the 'real' component. If there
|
|
6
|
+
* is not enough space to render the whole component anymore (it would overflow) another component
|
|
7
|
+
* can take it's place. If you do not specify that replace-component, the component will just
|
|
8
|
+
* disappear and make room for other more important components.
|
|
9
|
+
*/
|
|
10
|
+
export declare class OverflowHiddenComponent implements AfterViewInit, OnDestroy {
|
|
11
|
+
#private;
|
|
12
|
+
defaultSlot: import("@angular/core").Signal<TemplateRef<any>>;
|
|
13
|
+
overflowSlot: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
14
|
+
overflow: import("@angular/core").WritableSignal<boolean>;
|
|
15
|
+
ngAfterViewInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OverflowHiddenComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OverflowHiddenComponent, "yuv-overflow-hidden", never, {}, {}, ["defaultSlot", "overflowSlot"], never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./overflow-hidden.component";
|
|
3
|
+
export declare class YuvOverflowHiddenModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YuvOverflowHiddenModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<YuvOverflowHiddenModule, never, [typeof i1.OverflowHiddenComponent], [typeof i1.OverflowHiddenComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<YuvOverflowHiddenModule>;
|
|
7
|
+
}
|