@yuuvis/client-framework 3.17.1 → 3.18.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.
@@ -92,6 +92,7 @@
92
92
  "yuv.object-metadata.tabs.indexdata.title": "Metadaten",
93
93
  "yuv.object-flavor.apply-flavor.button.apply": "Anwenden",
94
94
  "yuv.object-flavor.apply-flavor.button.cancel": "Abbrechen",
95
+ "yuv.object-flavor.apply-flavor.error": "Der Typ konnte nicht hinzugefügt werden.",
95
96
  "yuv.object-flavor.apply-flavor.headline": "Typ '{{name}}' hinzufügen",
96
97
  "yuv.object-flavor.button.add": "Typ hinzufügen",
97
98
  "yuv.object-flavor.button.clear-selection": "Auswahl aufheben",
@@ -92,6 +92,7 @@
92
92
  "yuv.object-metadata.tabs.indexdata.title": "Metadata",
93
93
  "yuv.object-flavor.apply-flavor.button.apply": "Apply",
94
94
  "yuv.object-flavor.apply-flavor.button.cancel": "Cancel",
95
+ "yuv.object-flavor.apply-flavor.error": "The type could not be added.",
95
96
  "yuv.object-flavor.apply-flavor.headline": "Add type '{{name}}'",
96
97
  "yuv.object-flavor.button.add": "Add type",
97
98
  "yuv.object-flavor.button.clear-selection": "Unselect",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuuvis/client-framework",
3
- "version": "3.17.1",
3
+ "version": "3.18.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.19",
9
9
  "@angular/core": "^21.2.19",
10
10
  "angular-gridster2": "^21.0.1",
11
- "@yuuvis/client-core": "^3.17.1",
12
- "@yuuvis/client-shell-core": "^3.17.1",
13
- "@yuuvis/client-components": "^3.17.1",
11
+ "@yuuvis/client-core": "^3.18.0",
12
+ "@yuuvis/client-shell-core": "^3.18.0",
13
+ "@yuuvis/client-components": "^3.18.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.14",
19
19
  "@ngrx/signals": "^21.1.0",
20
- "@yuuvis/material": "^3.17.1",
20
+ "@yuuvis/material": "^3.18.0",
21
21
  "@yuuvis/media-viewer": "^4.0.0",
22
22
  "angular-split": "^20.0.0",
23
23
  "vis-network": "^10.0.2",
@@ -1,6 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Signal } from '@angular/core';
3
- import { DmsObject, YuvUser, LockState } from '@yuuvis/client-core';
3
+ import { DmsObject, YuvUser, LockState, VirtualObjectType } from '@yuuvis/client-core';
4
4
  import { Severity } from '@yuuvis/material/badge';
5
5
 
6
6
  type BadgeSeverity = Severity;
@@ -14,6 +14,23 @@ interface BadgeRule {
14
14
  op: 'isSet' | 'equals' | 'tagPresent';
15
15
  value?: unknown;
16
16
  }
17
+ /**
18
+ * Restricts the object types a badge may be configured for. Mirrors
19
+ * `ActionSupport`: an entry matches when the object type id is listed in
20
+ * `types` or `sots`, or matches `pattern`.
21
+ *
22
+ * This scopes *configurability* (which types offer the badge in selection UIs
23
+ * such as the tile config), not rendering — whether a badge actually shows on
24
+ * a given object stays governed by {@link Badge.applies} / {@link Badge.rule}.
25
+ */
26
+ interface BadgeSupport {
27
+ /** Object types the badge can be configured for (e.g. `system:document`). */
28
+ types?: string[];
29
+ /** Secondary object types the badge can be configured for. */
30
+ sots?: string[];
31
+ /** Pattern matched against the object type id. */
32
+ pattern?: string;
33
+ }
17
34
  interface Badge {
18
35
  id: string;
19
36
  labelKey: string;
@@ -29,6 +46,12 @@ interface Badge {
29
46
  * the id filter. Variants are hidden from selection UIs.
30
47
  */
31
48
  variantOf?: string;
49
+ /**
50
+ * Object types this badge may be configured for. When omitted, the badge is
51
+ * offered for every type. Variants inherit the support of their parent badge
52
+ * and are hidden from selection UIs anyway.
53
+ */
54
+ supports?: BadgeSupport;
32
55
  applies?: (dmsObject: DmsObject, ctx: BadgeContext) => boolean;
33
56
  rule?: BadgeRule;
34
57
  }
@@ -53,10 +76,15 @@ declare class BadgeSelectComponent {
53
76
  #private;
54
77
  selectedBadgeIds: _angular_core.InputSignal<string[]>;
55
78
  bucket: _angular_core.InputSignal<string | undefined>;
79
+ /**
80
+ * Type currently being configured. Badges that declare `supports` are only
81
+ * offered for the types they support. Omitting it offers every badge.
82
+ */
83
+ objectType: _angular_core.InputSignal<VirtualObjectType | undefined>;
56
84
  badgeSelect: _angular_core.OutputEmitterRef<Badge>;
57
85
  readonly badges: Signal<Badge[]>;
58
86
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BadgeSelectComponent, never>;
59
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BadgeSelectComponent, "yuv-tile-badge-select", never, { "selectedBadgeIds": { "alias": "selectedBadgeIds"; "required": false; "isSignal": true; }; "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; }, { "badgeSelect": "badgeSelect"; }, never, never, true, never>;
87
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BadgeSelectComponent, "yuv-tile-badge-select", never, { "selectedBadgeIds": { "alias": "selectedBadgeIds"; "required": false; "isSignal": true; }; "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; "objectType": { "alias": "objectType"; "required": false; "isSignal": true; }; }, { "badgeSelect": "badgeSelect"; }, never, never, true, never>;
60
88
  }
61
89
 
62
90
  /**
@@ -84,6 +112,10 @@ declare const LOCK_SELF_BADGE: Badge;
84
112
  * @remarks
85
113
  * - `severity` is set to `'danger'` to visually emphasize the retention constraint.
86
114
  * - `priority` is `20`, which controls the display order relative to other badges.
115
+ * - `supports` limits the badge to documents, so selection UIs such as the tile
116
+ * config do not offer it for folder types. It only scopes configurability -
117
+ * `applies` still governs rendering, so an object under retention keeps its
118
+ * badge regardless.
87
119
  */ declare const RETENTION_BADGE: Badge;
88
120
 
89
121
  declare class BadgeRegistryService {
@@ -196,6 +228,21 @@ declare class TileBadgesComponent {
196
228
  * @returns `true` if the rule matches; otherwise `false`.
197
229
  */
198
230
  declare function evaluateRule(rule: BadgeRule, dmsObject: DmsObject): boolean;
231
+ /**
232
+ * Checks whether a badge may be configured for the given object type.
233
+ *
234
+ * A badge without {@link Badge.supports} is unrestricted and matches every
235
+ * type. Otherwise the type's `objectType` and its `sots` are matched against
236
+ * the badge's `types` / `sots` lists and its `pattern`; a single hit is enough.
237
+ *
238
+ * Called without an object type (no type context available) the badge is kept,
239
+ * so callers that do not know the type never lose badges.
240
+ *
241
+ * @param badge Badge to check.
242
+ * @param objectType Type the selection UI is currently configuring.
243
+ * @returns `true` if the badge may be offered for that type; otherwise `false`.
244
+ */
245
+ declare function badgeSupportsType(badge: Badge, objectType?: VirtualObjectType): boolean;
199
246
 
200
- export { BadgeChipComponent, BadgeRegistryService, BadgeSelectComponent, LOCK_BADGE, LOCK_SELF_BADGE, RETENTION_BADGE, TileBadgesComponent, evaluateRule };
201
- export type { Badge, BadgeContext, BadgeRule, BadgeSeverity };
247
+ export { BadgeChipComponent, BadgeRegistryService, BadgeSelectComponent, LOCK_BADGE, LOCK_SELF_BADGE, RETENTION_BADGE, TileBadgesComponent, badgeSupportsType, evaluateRule };
248
+ export type { Badge, BadgeContext, BadgeRule, BadgeSeverity, BadgeSupport };