@yuuvis/client-framework 3.21.0 → 3.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuuvis/client-framework",
3
- "version": "3.21.0",
3
+ "version": "3.22.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.21.0",
12
- "@yuuvis/client-shell-core": "^3.21.0",
13
- "@yuuvis/client-components": "^3.21.0",
11
+ "@yuuvis/client-core": "^3.22.0",
12
+ "@yuuvis/client-shell-core": "^3.22.0",
13
+ "@yuuvis/client-components": "^3.22.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.21.0",
20
+ "@yuuvis/material": "^3.22.0",
21
21
  "@yuuvis/media-viewer": "^4.1.0",
22
22
  "angular-split": "^20.0.0",
23
23
  "vis-network": "^10.0.2",
@@ -56,8 +56,14 @@ interface BaseAction {
56
56
  */
57
57
  group: string;
58
58
  /**
59
- * number of selected items supported by the action
60
- * (SelectionRange.SINGLE_SELECT, SelectionRange.MULTI_SELECT, SelectionRange.MULTI_SELECT_ONLY )
59
+ * number of selected items supported by the action. Enforced by the actions
60
+ * service: an action whose range does not match the current selection size is
61
+ * never offered, no matter what `isExecutable` returns.
62
+ *
63
+ * - `SINGLE_SELECT` — exactly one item
64
+ * - `MULTI_SELECT` — one or more items
65
+ * - `MULTI_SELECT_ONLY` — more than one item
66
+ * - `ANY` — any selection, including an empty one
61
67
  */
62
68
  range: SelectionRange;
63
69
  /**
@@ -213,11 +219,23 @@ declare class ActionsService {
213
219
  concealActions(actionIDs: string[]): void;
214
220
  /**
215
221
  * Returns all actions that are executable for the given selection.
222
+ * An action is only taken into account when its `range` matches the size of
223
+ * the current selection, so a `SelectionRange.SINGLE_SELECT` action is never
224
+ * offered for a multi selection.
216
225
  * @param selection Array of DmsObjects to check for executable actions
217
226
  * @param options options to filter the actions
218
227
  * @returns Observable of actions that are executable for the given selection
219
228
  */
220
229
  getActions(selection: DmsObject[], options?: ActionOptions): Observable<Action[]>;
230
+ /**
231
+ * Checks whether an action supports the size of the given selection based on
232
+ * its `range` property. Actions without a `range` are treated as
233
+ * `SelectionRange.ANY`.
234
+ * @param action Action to check
235
+ * @param selection Array of DmsObjects the action should be applied to
236
+ * @returns true if the action supports the size of the given selection
237
+ */
238
+ matchesSelectionRange(action: Action, selection: DmsObject[]): boolean;
221
239
  /**
222
240
  * Get all available actions. This includes the default actions and all registered actions but
223
241
  * without checking if they are executable.
@@ -481,7 +481,9 @@ declare class OrganizationComponent extends AbstractMatFormField<FormControlValu
481
481
  */
482
482
  readonly: _angular_core.InputSignal<boolean>;
483
483
  /**
484
- * Whether or not to exclude the current user from autocomplete result
484
+ * Whether or not to exclude the current user from autocomplete result. Enforced on the
485
+ * client for both organization and organization set fields, so the signed-in user cannot
486
+ * be selected even when the backend does not filter itself out.
485
487
  */
486
488
  excludeMe: _angular_core.InputSignal<boolean>;
487
489
  /**
@@ -27,6 +27,12 @@ declare class ObjectAuditComponent {
27
27
  * Whether or not to ignore admin and user separation of audit entries
28
28
  */
29
29
  allActions: _angular_core.InputSignal<boolean>;
30
+ /**
31
+ * Restrict the timeline to the given audit codes (like 100, 301, etc.). Use `[10000]` to show
32
+ * custom audit entries only. This can only narrow down the entries the current user is allowed
33
+ * to see, never widen them. An empty list means no restriction.
34
+ */
35
+ actions: _angular_core.InputSignal<number[]>;
30
36
  get objectID(): string | undefined;
31
37
  constructor();
32
38
  /**
@@ -35,7 +41,7 @@ declare class ObjectAuditComponent {
35
41
  query(): void;
36
42
  goToPage(page: number): void;
37
43
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ObjectAuditComponent, never>;
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
+ 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; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
39
45
  }
40
46
 
41
47
  interface HeaderData {
@@ -263,12 +263,22 @@ declare class TileListComponent implements OnInit {
263
263
  * Suppresses the component's built-in context menu handling.
264
264
  *
265
265
  * When `true`, right-clicking a tile does not call `event.preventDefault()`, does not
266
- * auto-select the right-clicked tile, and does not emit `ctxMenu`. Use this when the
267
- * parent wants to handle `contextmenu` events itself.
266
+ * select the right-clicked tile (see `selectOnContextMenu`), and does not emit `ctxMenu`.
267
+ * Use this when the parent wants to handle `contextmenu` events itself.
268
268
  *
269
269
  * @default false
270
270
  */
271
271
  disableCustomContextMenu: _angular_core.InputSignal<boolean>;
272
+ /**
273
+ * Selects the right-clicked tile, so a context menu the parent builds from `selection()`
274
+ * describes the row under the cursor. Off by default, so a menu meant to act on the existing
275
+ * selection keeps it. A tile already part of the selection never changes it, and selecting
276
+ * this way emits `selectionChange` but not `itemSelect` (which consumers open/navigate on).
277
+ * Ignored when `disableCustomContextMenu` is `true`. Accepts a bare HTML attribute.
278
+ *
279
+ * @default false
280
+ */
281
+ selectOnContextMenu: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
272
282
  /**
273
283
  * Emits the `TileData` of the most recently selected tile.
274
284
  *
@@ -482,13 +492,14 @@ declare class TileListComponent implements OnInit {
482
492
  * `#getObjectConfig()`).
483
493
  */
484
494
  transformer: (res: SearchResultItem[]) => InnerTileData[];
495
+ badgeIdsFor(item: TileData): string[] | undefined;
485
496
  /**
486
497
  * Handles a right-click (contextmenu) event on a tile.
487
498
  *
488
- * Suppresses the browser's native context menu. If the clicked tile is not already
489
- * part of the selection, it is selected first. After a short delay (to allow the
490
- * selection state to propagate), `ctxMenu` is emitted with the originating event and
491
- * the current selection so the parent can position and populate a custom menu.
499
+ * Suppresses the browser's native context menu. With `selectOnContextMenu` enabled, a tile
500
+ * outside the current selection becomes the selection first. After a short delay (to allow the
501
+ * selection state to propagate), `ctxMenu` is emitted with the originating event and the
502
+ * current selection so the parent can position and populate a custom menu.
492
503
  *
493
504
  * The delay is intentional: it gives Angular change detection a tick to apply the
494
505
  * selection update before the parent reads `selection()` in the `ctxMenu` handler.
@@ -499,9 +510,8 @@ declare class TileListComponent implements OnInit {
499
510
  * external callers.
500
511
  *
501
512
  * @param event The originating mouse event (used to suppress default and for positioning).
502
- * @param _index Zero-based index of the right-clicked tile.
513
+ * @param index Zero-based index of the right-clicked tile.
503
514
  */
504
- badgeIdsFor(item: TileData): string[] | undefined;
505
515
  contextMenuHandler(event: MouseEvent, index: number): void;
506
516
  /**
507
517
  * Executes a tile inline action against the appropriate set of DMS objects.
@@ -695,7 +705,7 @@ declare class TileListComponent implements OnInit {
695
705
  menuItemClicked(tileData: TileData, event: Event): void;
696
706
  private _selectionToTileData;
697
707
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TileListComponent, never>;
698
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TileListComponent, "yuv-tile-list", never, { "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "dense": { "alias": "dense"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "flavor": { "alias": "flavor"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "preselect": { "alias": "preselect"; "required": false; "isSignal": true; }; "highlights": { "alias": "highlights"; "required": false; "isSignal": true; }; "preventChangeUntil": { "alias": "preventChangeUntil"; "required": false; "isSignal": true; }; "autoSelect": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "disableCustomContextMenu": { "alias": "disableCustomContextMenu"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; "tileCopy": "tileCopy"; "tileCut": "tileCut"; "busy": "busy"; "queryResult": "queryResult"; "selectionChange": "selectionChange"; "itemDblClick": "itemDblClick"; "ctxMenu": "ctxMenu"; }, ["menuComponent", "emptyContent"], ["yuv-tile-actions-menu, [yuv-tile-actions-menu]", "*"], true, never>;
708
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TileListComponent, "yuv-tile-list", never, { "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "dense": { "alias": "dense"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "flavor": { "alias": "flavor"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "preselect": { "alias": "preselect"; "required": false; "isSignal": true; }; "highlights": { "alias": "highlights"; "required": false; "isSignal": true; }; "preventChangeUntil": { "alias": "preventChangeUntil"; "required": false; "isSignal": true; }; "autoSelect": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "disableCustomContextMenu": { "alias": "disableCustomContextMenu"; "required": false; "isSignal": true; }; "selectOnContextMenu": { "alias": "selectOnContextMenu"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; "tileCopy": "tileCopy"; "tileCut": "tileCut"; "busy": "busy"; "queryResult": "queryResult"; "selectionChange": "selectionChange"; "itemDblClick": "itemDblClick"; "ctxMenu": "ctxMenu"; }, ["menuComponent", "emptyContent"], ["yuv-tile-actions-menu, [yuv-tile-actions-menu]", "*"], true, never>;
699
709
  }
700
710
 
701
711
  declare class ActionSelectComponent {