@yuuvis/client-framework 3.5.0 → 3.7.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-object-details.mjs +13 -74
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs +139 -90
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-renderer.mjs +192 -3
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +7 -0
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/lib/assets/i18n/de.json +5 -5
- package/lib/assets/i18n/en.json +5 -5
- package/package.json +5 -5
- package/renderer/README.md +212 -2
- package/types/yuuvis-client-framework-object-details.d.ts +1 -9
- package/types/yuuvis-client-framework-object-relationship.d.ts +1 -1
- package/types/yuuvis-client-framework-renderer.d.ts +63 -3
package/lib/assets/i18n/de.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"yuv.pwa.update.
|
|
2
|
+
"yuv.pwa.update.cancel": "Später",
|
|
3
|
+
"yuv.pwa.update.confirm": "Neu laden",
|
|
3
4
|
"yuv.pwa.update.message": "Eine neue Version der Anwendung ist verfügbar. Jetzt neu laden, um zu aktualisieren?",
|
|
5
|
+
"yuv.pwa.update.title": "Update verfügbar",
|
|
4
6
|
"yuv.pwa.update.unrecoverable.message": "Die Anwendung muss neu geladen werden, um fortzufahren.",
|
|
5
|
-
"yuv.pwa.update.confirm": "Neu laden",
|
|
6
|
-
"yuv.pwa.update.cancel": "Später",
|
|
7
7
|
"yuv.session.expires.message": "Ihre Sitzung läuft in einer Minute ab.",
|
|
8
8
|
"yuv.session.extend.action": "Sitzung verlängern",
|
|
9
9
|
"yuv.action-menu.action.copy.dms.object.description": "",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"yuv.action-menu.action.cut.dms.object.description": "",
|
|
12
12
|
"yuv.action-menu.action.cut.dms.object.label": "Ausschneiden",
|
|
13
13
|
"yuv.action-menu.action.delete.dms.object.confirm.cancel": "Abbrechen",
|
|
14
|
-
"yuv.action-menu.action.delete.dms.object.confirm.message": "Möchten Sie die
|
|
14
|
+
"yuv.action-menu.action.delete.dms.object.confirm.message": "Möchten Sie die ausgewählten Objekte wirklich löschen? Dieser Vorgang kann nicht rückgängig gemacht werden.",
|
|
15
15
|
"yuv.action-menu.action.delete.dms.object.confirm.ok": "Löschen",
|
|
16
16
|
"yuv.action-menu.action.delete.dms.object.description": "Löscht das Objekt.",
|
|
17
17
|
"yuv.action-menu.action.delete.dms.object.label": "Löschen",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"yuv.audit.label.get.metadata": "Metadaten wurden gelesen",
|
|
84
84
|
"yuv.audit.label.get.rendition.pdf": "PDF-Rendition wurde angefordert",
|
|
85
85
|
"yuv.audit.label.get.rendition.text": "Text-Rendition wurde angefordert",
|
|
86
|
-
"yuv.audit.label.get.rendition.thumbnail": "
|
|
86
|
+
"yuv.audit.label.get.rendition.thumbnail": "Miniaturansicht wurde angefordert",
|
|
87
87
|
"yuv.audit.label.paging": "Seitennavigation",
|
|
88
88
|
"yuv.audit.label.paging.current": "Seite {{page}}",
|
|
89
89
|
"yuv.audit.label.paging.next": "zur nächsten Seite",
|
package/lib/assets/i18n/en.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"yuv.pwa.update.
|
|
2
|
+
"yuv.pwa.update.cancel": "Later",
|
|
3
|
+
"yuv.pwa.update.confirm": "Reload",
|
|
3
4
|
"yuv.pwa.update.message": "A new version of the application is available. Reload now to update?",
|
|
5
|
+
"yuv.pwa.update.title": "Update available",
|
|
4
6
|
"yuv.pwa.update.unrecoverable.message": "The application needs to be reloaded to continue.",
|
|
5
|
-
"yuv.pwa.update.confirm": "Reload",
|
|
6
|
-
"yuv.pwa.update.cancel": "Later",
|
|
7
7
|
"yuv.session.expires.message": "Your session will expire in one minute.",
|
|
8
8
|
"yuv.session.extend.action": "Extend session",
|
|
9
9
|
"yuv.action-menu.action.copy.dms.object.description": "",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"yuv.badge.empty.selection": "No badges currently available for selection.",
|
|
26
26
|
"yuv.badge.lock.description": "This object is locked and cannot be modified.",
|
|
27
27
|
"yuv.badge.lock.label": "Locked",
|
|
28
|
-
"yuv.badge.lock.self.description": "
|
|
28
|
+
"yuv.badge.lock.self.description": "This object is locked by you.",
|
|
29
29
|
"yuv.badge.lock.self.label": "Locked by you",
|
|
30
30
|
"yuv.badge.retention.description": "This object is subject to a retention period.",
|
|
31
31
|
"yuv.badge.retention.label": "Retention",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"yuv.tile-config.slot.action.headline": "Actions",
|
|
172
172
|
"yuv.tile-config.slot.badges.headline": "Badges",
|
|
173
173
|
"yuv.tile-config.slot.icon.headline": "Icon",
|
|
174
|
-
"yuv.tile-config.slot.property.headline": "
|
|
174
|
+
"yuv.tile-config.slot.property.headline": "Attribute",
|
|
175
175
|
"yuv.tile-config.title": "Hit list configuration for {{bucket}}",
|
|
176
176
|
"yuv.tile-config.trigger.tooltip": "Hit list configuration",
|
|
177
177
|
"yuv.tile-list.item.actions-menu.button.tooltip": "Open actions menu",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuuvis/client-framework",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"author": "OPTIMAL SYSTEMS GmbH <npm@optimal-systems.de>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
"@angular/common": "^21.2.9",
|
|
9
9
|
"@angular/core": "^21.2.9",
|
|
10
10
|
"angular-gridster2": "^21.0.1",
|
|
11
|
-
"@yuuvis/client-core": "^3.
|
|
12
|
-
"@yuuvis/client-shell-core": "^3.
|
|
13
|
-
"@yuuvis/client-components": "^3.
|
|
11
|
+
"@yuuvis/client-core": "^3.7.0",
|
|
12
|
+
"@yuuvis/client-shell-core": "^3.7.0",
|
|
13
|
+
"@yuuvis/client-components": "^3.7.0",
|
|
14
14
|
"ng-dynamic-component": "^10.8.2",
|
|
15
15
|
"modern-normalize": "^3.0.1"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@angular/material": "^21.2.7",
|
|
19
19
|
"@ngrx/signals": "^21.1.0",
|
|
20
|
-
"@yuuvis/material": "^3.
|
|
20
|
+
"@yuuvis/material": "^3.7.0",
|
|
21
21
|
"@yuuvis/media-viewer": "^3.0.2",
|
|
22
22
|
"angular-split": "^20.0.0",
|
|
23
23
|
"vis-network": "^10.0.2",
|
package/renderer/README.md
CHANGED
|
@@ -1,5 +1,215 @@
|
|
|
1
1
|
# @yuuvis/client-framework/renderer
|
|
2
2
|
|
|
3
|
-
Secondary entry point of `@yuuvis/client-framework`.
|
|
3
|
+
Secondary entry point of `@yuuvis/client-framework`. Import everything from `@yuuvis/client-framework/renderer`.
|
|
4
4
|
|
|
5
|
-
Provides
|
|
5
|
+
Provides a pluggable rendering layer for two distinct things:
|
|
6
|
+
|
|
7
|
+
1. **Property renderers** — components that render a single object-type property value (string, integer, datetime, file size, organization, table, …) inside list rows, summary panels, tile slots, smart-search results, and detail headers.
|
|
8
|
+
2. **Audit renderers** — components that render the inner content of a single entry in the audit timeline (`ObjectAuditComponent`), keyed by the audit `action` (and optionally `subaction`).
|
|
9
|
+
|
|
10
|
+
Both subsystems share the same shape: a service that maintains a registry, an abstract base component that consumers extend, and a directive that resolves and instantiates the right component for a given input.
|
|
11
|
+
|
|
12
|
+
## Public API
|
|
13
|
+
|
|
14
|
+
| Export | Kind | Purpose |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `RendererService` | service (`providedIn: 'root'`) | Registry for property renderers. |
|
|
17
|
+
| `RendererDirective` (`*yuvRenderer`) | structural directive | Renders a `ResolvedObjectConfigItem` using the registered renderer. |
|
|
18
|
+
| `AbstractRendererComponent<T, U>` | abstract component | Base class for custom property renderers. |
|
|
19
|
+
| `RendererComponent` | type | Union of the built-in property renderer components. |
|
|
20
|
+
| `RendererDirectiveInput` | type alias of `ResolvedObjectConfigItem` | Input shape for `*yuvRenderer`. |
|
|
21
|
+
| `AuditRendererService` | service (`providedIn: 'root'`) | Registry for audit-entry renderers. |
|
|
22
|
+
| `AuditRendererDirective` (`[yuvAuditRenderer]`) | attribute directive | Renders an `AuditEntry` using the registered renderer. |
|
|
23
|
+
| `AbstractAuditRendererComponent` | abstract component | Base class for custom audit renderers. |
|
|
24
|
+
| `DefaultAuditRendererComponent` | component | Built-in fallback that resolves localized audit labels for all known actions (100, 200, 300, 400, custom 10000). |
|
|
25
|
+
| Built-in property renderers | components | `StringRendererComponent`, `IntegerRendererComponent`, `DecimalRendererComponent`, `BooleanRendererComponent`, `DateTimeRendererComponent`, `FileSizeRendererComponent`, `IconRendererComponent`, `OrganizationRendererComponent`, `TableRendererComponent`, `UnknownRendererComponent` (fallback). |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Property renderers
|
|
30
|
+
|
|
31
|
+
### Rendering a property — `*yuvRenderer`
|
|
32
|
+
|
|
33
|
+
`*yuvRenderer` takes a `ResolvedObjectConfigItem` and instantiates the matching renderer into the host view. The host owns the layout; the directive owns the value cell.
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
@for (property of object.properties; track property.propertyName) {
|
|
37
|
+
<div class="row">
|
|
38
|
+
<div class="label">{{ property.label }}</div>
|
|
39
|
+
<div class="value">
|
|
40
|
+
<ng-container *yuvRenderer="property.value" />
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Input shape:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
interface ResolvedObjectConfigItem {
|
|
50
|
+
propertyName: string; // schema property name (e.g. 'system:contentStreamLength')
|
|
51
|
+
rendererType?: RendererType; // optional explicit renderer key — wins over propertyName lookup
|
|
52
|
+
value?: unknown; // the value passed to the renderer
|
|
53
|
+
meta?: Record<string, unknown>; // additional context (e.g. *_title for user fields)
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Resolution order inside `RendererService`:
|
|
58
|
+
|
|
59
|
+
1. If `rendererType` is set → look up by that key (`getRendererByType`).
|
|
60
|
+
2. Otherwise look up by `propertyName` (`getRenderer`). If not registered, fall back to the property's internal field type derived from `SystemService`.
|
|
61
|
+
3. If nothing matches → `UnknownRendererComponent`.
|
|
62
|
+
|
|
63
|
+
The directive re-renders only when the input object actually changes (deep equality via `JSON.stringify`).
|
|
64
|
+
|
|
65
|
+
### Built-in registrations
|
|
66
|
+
|
|
67
|
+
`RendererService` ships with these defaults (in `RendererService` constructor):
|
|
68
|
+
|
|
69
|
+
| Key | Component |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `integer` | `IntegerRendererComponent` |
|
|
72
|
+
| `decimal` | `DecimalRendererComponent` |
|
|
73
|
+
| `datetime` | `DateTimeRendererComponent` |
|
|
74
|
+
| `icon` | `IconRendererComponent` |
|
|
75
|
+
| `string` | `StringRendererComponent` |
|
|
76
|
+
| `boolean` | `BooleanRendererComponent` |
|
|
77
|
+
| `table` | `TableRendererComponent` |
|
|
78
|
+
| `InternalFieldType.STRING_ORGANIZATION` / `STRING_ORGANIZATION_SET` | `OrganizationRendererComponent` |
|
|
79
|
+
| `ContentStreamField.LENGTH` | `FileSizeRendererComponent` |
|
|
80
|
+
|
|
81
|
+
### Registering a custom renderer
|
|
82
|
+
|
|
83
|
+
Get the service and call one of the registration methods. Either overrides the default for that key.
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { inject, Injectable } from '@angular/core';
|
|
87
|
+
import { RendererService } from '@yuuvis/client-framework/renderer';
|
|
88
|
+
import { MyHashRendererComponent } from './my-hash.renderer';
|
|
89
|
+
|
|
90
|
+
@Injectable({ providedIn: 'root' })
|
|
91
|
+
export class MyAppRendererSetup {
|
|
92
|
+
#renderers = inject(RendererService);
|
|
93
|
+
|
|
94
|
+
init(): void {
|
|
95
|
+
// Override by renderer type (matches `rendererType` on ResolvedObjectConfigItem)
|
|
96
|
+
this.#renderers.registerRendererByType('string', MyHashRendererComponent);
|
|
97
|
+
|
|
98
|
+
// Or scope to a single property — and optionally to a specific object type
|
|
99
|
+
this.#renderers.registerRenderer(MyHashRendererComponent, 'document:sha256');
|
|
100
|
+
this.#renderers.registerRenderer(MyHashRendererComponent, 'document:sha256', 'system:document');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Call this from `APP_INITIALIZER` or any service that runs before the views using the directive are constructed. Registrations are stored in a signal, so consumers that re-resolve their renderer will pick up changes; however the directive only re-resolves when its input changes — switching renderers at runtime requires re-pushing the input.
|
|
106
|
+
|
|
107
|
+
### Writing a custom property renderer
|
|
108
|
+
|
|
109
|
+
Extend `AbstractRendererComponent<T, U>`. `T` is the value type, `U` is the meta-shape (defaults to `null`).
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import { ChangeDetectionStrategy, Component, computed } from '@angular/core';
|
|
113
|
+
import { AbstractRendererComponent } from '@yuuvis/client-framework/renderer';
|
|
114
|
+
|
|
115
|
+
@Component({
|
|
116
|
+
selector: 'app-hash-renderer',
|
|
117
|
+
standalone: true,
|
|
118
|
+
template: `<code class="hash" [title]="value()">{{ short() }}</code>`,
|
|
119
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
120
|
+
})
|
|
121
|
+
export class MyHashRendererComponent extends AbstractRendererComponent<string> {
|
|
122
|
+
protected short = computed(() => this.value()?.slice(0, 12) ?? '');
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The base class exposes:
|
|
127
|
+
|
|
128
|
+
- `propertyName = input.required<string>()`
|
|
129
|
+
- `value = input.required<T | null>()`
|
|
130
|
+
- `meta = input<Record<string, unknown> | U>()`
|
|
131
|
+
- `getProperty(): SchemaResponseFieldDefinition | undefined` — schema definition for the property from `SystemService`.
|
|
132
|
+
|
|
133
|
+
All renderers must be `standalone: true` and should use `ChangeDetectionStrategy.OnPush`.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Audit renderers
|
|
138
|
+
|
|
139
|
+
### Rendering an audit entry — `[yuvAuditRenderer]`
|
|
140
|
+
|
|
141
|
+
`[yuvAuditRenderer]` is the attribute-directive twin for the audit timeline. The host component (`ObjectAuditComponent`) owns the date column, timeline line, version badge, and creator label; the renderer owns the *inner content* of the entry.
|
|
142
|
+
|
|
143
|
+
```html
|
|
144
|
+
@for (item of items(); track item.creationDate + '-' + item.action) {
|
|
145
|
+
<li class="audit">
|
|
146
|
+
<time>{{ item.creationDate | localeDate }}</time>
|
|
147
|
+
<div class="content"><ng-container [yuvAuditRenderer]="item" /></div>
|
|
148
|
+
<span class="version">v{{ item.version }}</span>
|
|
149
|
+
<div class="creator">{{ item.createdBy.title }}</div>
|
|
150
|
+
</li>
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Resolution order inside `AuditRendererService.getAuditRenderer(action, subaction)`:
|
|
155
|
+
|
|
156
|
+
1. `(action, subaction)` — if `subaction` is provided and a renderer is registered for the exact pair.
|
|
157
|
+
2. `(action)` — action-only registration.
|
|
158
|
+
3. `DefaultAuditRendererComponent` — built-in fallback that translates the well-known audit labels (`yuv.audit.label.*`) for actions 100/200/300/400 and custom action 10000.
|
|
159
|
+
|
|
160
|
+
### Registering a custom audit renderer
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
import { inject, Injectable } from '@angular/core';
|
|
164
|
+
import { AuditRendererService } from '@yuuvis/client-framework/renderer';
|
|
165
|
+
import { CreatedAuditRendererComponent } from './created-audit.renderer';
|
|
166
|
+
import { UpdatedAuditRendererComponent } from './updated-audit.renderer';
|
|
167
|
+
|
|
168
|
+
@Injectable({ providedIn: 'root' })
|
|
169
|
+
export class MyAppAuditSetup {
|
|
170
|
+
#audit = inject(AuditRendererService);
|
|
171
|
+
|
|
172
|
+
init(): void {
|
|
173
|
+
// Override every CREATE_METADATA (action 100) entry
|
|
174
|
+
this.#audit.registerAuditRenderer(CreatedAuditRendererComponent, 100);
|
|
175
|
+
|
|
176
|
+
// Override one specific (action, subaction) pair
|
|
177
|
+
this.#audit.registerAuditRenderer(UpdatedAuditRendererComponent, 300, 42);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Writing a custom audit renderer
|
|
183
|
+
|
|
184
|
+
Extend `AbstractAuditRendererComponent`. The directive sets one input: `auditEntry: AuditEntry`.
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
188
|
+
import { AbstractAuditRendererComponent } from '@yuuvis/client-framework/renderer';
|
|
189
|
+
|
|
190
|
+
@Component({
|
|
191
|
+
selector: 'app-created-audit',
|
|
192
|
+
standalone: true,
|
|
193
|
+
template: `
|
|
194
|
+
<span class="title">📄 Document created</span>
|
|
195
|
+
<small class="meta">action {{ auditEntry().action }}</small>
|
|
196
|
+
`,
|
|
197
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
198
|
+
})
|
|
199
|
+
export class CreatedAuditRendererComponent extends AbstractAuditRendererComponent {}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The base class exposes:
|
|
203
|
+
|
|
204
|
+
- `auditEntry = input.required<AuditEntry>()` — the full entry, including `action`, `subaction`, `detail`, `creationDate`, `createdBy`, `version`.
|
|
205
|
+
|
|
206
|
+
If you want to extend (rather than replace) the default labelling, you can compose `DefaultAuditRendererComponent` inside your own template, or read `auditEntry().detail` directly — its format is action-specific (the default renderer parses `[a,b]`-style payloads for tag/restore actions).
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Conventions
|
|
211
|
+
|
|
212
|
+
- Both directives, both services, and both abstract base classes are tree-shakable per sub-library — import only what you need.
|
|
213
|
+
- Renderers are looked up at directive instantiation time. Registering after the view exists is fine but only affects later input changes.
|
|
214
|
+
- All built-in renderers use OnPush and are standalone — follow the same in custom renderers.
|
|
215
|
+
- `RendererService` integrates with `SystemService` to fall back to the property's internal field type; custom renderers do not need to replicate this — register against the field-type key (`registerRendererByType`) to opt in.
|
|
@@ -14,14 +14,9 @@ declare class ObjectAuditComponent {
|
|
|
14
14
|
arrowNext: any;
|
|
15
15
|
};
|
|
16
16
|
auditsRes: _angular_core.WritableSignal<AuditQueryResult | undefined>;
|
|
17
|
-
|
|
17
|
+
items: _angular_core.Signal<AuditEntry[]>;
|
|
18
18
|
error: _angular_core.WritableSignal<boolean>;
|
|
19
19
|
busy: _angular_core.WritableSignal<boolean>;
|
|
20
|
-
searchActions: {
|
|
21
|
-
label: string;
|
|
22
|
-
actions: string[];
|
|
23
|
-
}[];
|
|
24
|
-
auditLabels: Record<string, string>;
|
|
25
20
|
dmsObject: _angular_core.InputSignal<DmsObject | undefined>;
|
|
26
21
|
/**
|
|
27
22
|
* A list of audits that should not be shown. Use the audit codes (like 100, 301, etc.).
|
|
@@ -42,9 +37,6 @@ declare class ObjectAuditComponent {
|
|
|
42
37
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectAuditComponent, never>;
|
|
43
38
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ObjectAuditComponent, "yuv-object-audit", never, { "dmsObject": { "alias": "dmsObject"; "required": false; "isSignal": true; }; "skipActions": { "alias": "skipActions"; "required": false; "isSignal": true; }; "allActions": { "alias": "allActions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
44
39
|
}
|
|
45
|
-
interface ResolvedAuditEntry extends AuditEntry {
|
|
46
|
-
label: string;
|
|
47
|
-
}
|
|
48
40
|
|
|
49
41
|
interface HeaderData {
|
|
50
42
|
title: RendererDirectiveInput;
|
|
@@ -47,7 +47,7 @@ declare class ObjectRelationshipComponent {
|
|
|
47
47
|
* Display mode for the relationship view.
|
|
48
48
|
*/
|
|
49
49
|
mode: _angular_core.ModelSignal<"list" | "graph">;
|
|
50
|
-
empty: _angular_core.Signal<boolean
|
|
50
|
+
empty: _angular_core.Signal<boolean>;
|
|
51
51
|
/**
|
|
52
52
|
* ID of the object to display relations for.
|
|
53
53
|
*/
|
|
@@ -1,7 +1,67 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentRef, Type } from '@angular/core';
|
|
3
|
+
import { AuditEntry, SchemaResponseFieldDefinition, TranslateService, ResolvedObjectConfigItem, RendererType } from '@yuuvis/client-core';
|
|
3
4
|
import * as dist_libs_yuuvis_client_core_types_yuuvis_client_core from 'dist/libs/yuuvis/client-core/types/yuuvis-client-core';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Abstract class to be extended by audit-entry renderers. The renderer controls the
|
|
8
|
+
* inner content of an audit timeline entry; the surrounding framing (date column,
|
|
9
|
+
* timeline line, version badge, creator) stays with the host component.
|
|
10
|
+
*/
|
|
11
|
+
declare abstract class AbstractAuditRendererComponent {
|
|
12
|
+
auditEntry: i0.InputSignal<AuditEntry>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractAuditRendererComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractAuditRendererComponent, "yuv-abstract-audit-renderer", never, { "auditEntry": { "alias": "auditEntry"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ResolvedAuditLabel {
|
|
18
|
+
label: string;
|
|
19
|
+
more?: string;
|
|
20
|
+
}
|
|
21
|
+
declare class DefaultAuditRendererComponent extends AbstractAuditRendererComponent {
|
|
22
|
+
#private;
|
|
23
|
+
protected resolved: i0.Signal<ResolvedAuditLabel>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultAuditRendererComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DefaultAuditRendererComponent, "yuv-default-audit-renderer", never, {}, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Attribute directive that renders an `AuditEntry` using the component registered with
|
|
30
|
+
* `AuditRendererService` for the entry's `action` (and optionally `subaction`). Falls
|
|
31
|
+
* back to `DefaultAuditRendererComponent` when no override is registered.
|
|
32
|
+
*/
|
|
33
|
+
declare class AuditRendererDirective {
|
|
34
|
+
#private;
|
|
35
|
+
component: ComponentRef<AbstractAuditRendererComponent>;
|
|
36
|
+
yuvAuditRenderer: i0.InputSignal<AuditEntry>;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditRendererDirective, never>;
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AuditRendererDirective, "[yuvAuditRenderer]", never, { "yuvAuditRenderer": { "alias": "yuvAuditRenderer"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Service for managing audit-entry renderers. Renderers are components that render the
|
|
43
|
+
* inner content of an audit entry in the timeline view of `ObjectAuditComponent`.
|
|
44
|
+
*
|
|
45
|
+
* Register a renderer for an `action` to override the default rendering of all audit
|
|
46
|
+
* entries with that action, or for an `action` + `subaction` pair to override a specific
|
|
47
|
+
* variant. Lookup prefers the subaction-specific renderer over the action-only renderer;
|
|
48
|
+
* if neither is registered, `DefaultAuditRendererComponent` is used.
|
|
49
|
+
*/
|
|
50
|
+
declare class AuditRendererService {
|
|
51
|
+
#private;
|
|
52
|
+
/**
|
|
53
|
+
* Register a renderer for a specific audit `action`. Pass `subaction` to scope the
|
|
54
|
+
* renderer to a particular (action, subaction) pair.
|
|
55
|
+
*/
|
|
56
|
+
registerAuditRenderer(cmp: Type<AbstractAuditRendererComponent>, action: number, subaction?: number): void;
|
|
57
|
+
/**
|
|
58
|
+
* Resolve the renderer for an audit entry. Tries `(action, subaction)` first, falls
|
|
59
|
+
* back to `(action)`, then to `DefaultAuditRendererComponent`.
|
|
60
|
+
*/
|
|
61
|
+
getAuditRenderer(action: number, subaction?: number): Type<AbstractAuditRendererComponent>;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditRendererService, never>;
|
|
63
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuditRendererService>;
|
|
64
|
+
}
|
|
5
65
|
|
|
6
66
|
/**
|
|
7
67
|
* Abstract class to be extended by property renderers
|
|
@@ -131,5 +191,5 @@ declare class RendererDirective {
|
|
|
131
191
|
static ɵdir: i0.ɵɵDirectiveDeclaration<RendererDirective, "[yuvRenderer]", never, { "yuvRenderer": { "alias": "yuvRenderer"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
132
192
|
}
|
|
133
193
|
|
|
134
|
-
export { AbstractRendererComponent, BooleanRendererComponent, DateTimeRendererComponent, DecimalRendererComponent, FileSizeRendererComponent, IconRendererComponent, IntegerRendererComponent, OrganizationRendererComponent, RendererDirective, RendererService, StringRendererComponent, TableRendererComponent, UnknownRendererComponent };
|
|
194
|
+
export { AbstractAuditRendererComponent, AbstractRendererComponent, AuditRendererDirective, AuditRendererService, BooleanRendererComponent, DateTimeRendererComponent, DecimalRendererComponent, DefaultAuditRendererComponent, FileSizeRendererComponent, IconRendererComponent, IntegerRendererComponent, OrganizationRendererComponent, RendererDirective, RendererService, StringRendererComponent, TableRendererComponent, UnknownRendererComponent };
|
|
135
195
|
export type { RendererComponent, RendererDirectiveInput };
|