@yuuvis/client-framework 2.18.0 → 2.20.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/breadcrumb/index.d.ts +2 -0
- package/breadcrumb/lib/breadcrumb/breadcrumb.component.d.ts +94 -0
- package/breadcrumb/lib/models/breadcrumb-item.model.d.ts +14 -0
- package/breadcrumb/lib/models/index.d.ts +1 -0
- package/common/lib/components/confirm/confirm.component.d.ts +1 -0
- package/common/lib/components/confirm/confirm.interface.d.ts +2 -0
- package/fesm2022/yuuvis-client-framework-breadcrumb.mjs +117 -0
- package/fesm2022/yuuvis-client-framework-breadcrumb.mjs.map +1 -0
- package/fesm2022/yuuvis-client-framework-common.mjs +24 -10
- package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +2 -2
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-list.mjs +365 -121
- package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +28 -26
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs +6 -5
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-versions.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-object-versions.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-query-list.mjs +462 -127
- package/fesm2022/yuuvis-client-framework-query-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-renderer.mjs +14 -16
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-sort.mjs +26 -15
- package/fesm2022/yuuvis-client-framework-sort.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +709 -182
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/lib/assets/i18n/ar.json +217 -0
- package/lib/assets/i18n/de.json +7 -3
- package/lib/assets/i18n/en.json +7 -3
- package/list/lib/list.component.d.ts +256 -44
- package/object-details/lib/object-details-header/object-details-header.component.d.ts +5 -2
- package/object-details/lib/object-details-shell/object-details-shell.component.d.ts +5 -2
- package/object-details/lib/object-details.component.d.ts +3 -1
- package/object-relationship/lib/object-relationship.component.d.ts +5 -2
- package/package.json +8 -4
- package/query-list/lib/query-list.component.d.ts +381 -86
- package/tile-list/lib/tile-list/tile-list.component.d.ts +527 -72
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { DmsObject,
|
|
2
|
+
import { DmsObject, SearchQuery, SearchResultItem } from '@yuuvis/client-core';
|
|
3
3
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
4
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
5
5
|
import { Action } from '@yuuvis/client-framework/actions';
|
|
@@ -11,171 +11,626 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
type InnerTileData = TileData & {
|
|
12
12
|
actions: any;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Query-driven tile list that renders `DmsObject` search results as rich, configurable
|
|
16
|
+
* tiles based on `ObjectConfig` definitions.
|
|
17
|
+
*
|
|
18
|
+
* The component wraps `yuv-query-list` and adds DMS-specific concerns: it resolves the
|
|
19
|
+
* `ObjectConfigRecord` for each result item (via `ObjectConfigService`), maps raw
|
|
20
|
+
* `SearchResultItem` data to the `TileData` view model, and supports per-object-type
|
|
21
|
+
* flavors, inline actions, context menus, and keyboard shortcuts for copy/cut.
|
|
22
|
+
*
|
|
23
|
+
* **Key Features:**
|
|
24
|
+
* - Automatic object config resolution (title, description, icon, meta, aside, actions)
|
|
25
|
+
* - Per-tile action buttons rendered from the resolved `ObjectConfigRecord`
|
|
26
|
+
* - Optional `ObjectFlavor` overlay to switch the visual representation of specific SOTs
|
|
27
|
+
* - Server-side pagination forwarded from the inner `yuv-query-list`
|
|
28
|
+
* - Multi-selection with Shift/Ctrl modifier keys and mouse drag-to-select
|
|
29
|
+
* - Programmatic pre-selection by object ID (`preselect` input, `selectById()` method)
|
|
30
|
+
* - Per-item CSS highlight styles via the `highlights` input
|
|
31
|
+
* - Optimistic list updates without a full re-fetch (`updateListItems`, `updateTileList`, `dropItems`)
|
|
32
|
+
* - Keyboard shortcuts: **Ctrl+C** emits `tileCopy`, **Ctrl+X** emits `tileCut`
|
|
33
|
+
* - Optional custom context menu via projected `TileActionsMenuComponent`
|
|
34
|
+
* - Isolated tile config bucket so multiple instances can have different column layouts
|
|
35
|
+
*
|
|
36
|
+
* **Content Projection Slots:**
|
|
37
|
+
* - `TileActionsMenuComponent` — optional; project a `<yuv-tile-actions-menu>` to attach
|
|
38
|
+
* a context menu to every tile's action trigger.
|
|
39
|
+
* - `#empty` — optional template reference; shown when the query returns no results.
|
|
40
|
+
*
|
|
41
|
+
* **Basic usage:**
|
|
42
|
+
* ```html
|
|
43
|
+
* <yuv-tile-list [query]="query" (itemSelect)="onSelect($event)" />
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* **Multi-select with custom bucket and highlights:**
|
|
47
|
+
* ```html
|
|
48
|
+
* <yuv-tile-list
|
|
49
|
+
* bucket="my-feature"
|
|
50
|
+
* [query]="query"
|
|
51
|
+
* [multiselect]="true"
|
|
52
|
+
* [highlights]="highlights"
|
|
53
|
+
* (selectionChange)="onSelectionChange($event)"
|
|
54
|
+
* />
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* **With context menu:**
|
|
58
|
+
* ```html
|
|
59
|
+
* <yuv-tile-list [query]="query" (ctxMenu)="onCtxMenu($event)">
|
|
60
|
+
* <yuv-tile-actions-menu>
|
|
61
|
+
* <button mat-menu-item (click)="openDetails()">Open</button>
|
|
62
|
+
* </yuv-tile-actions-menu>
|
|
63
|
+
* </yuv-tile-list>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
14
66
|
export declare class TileListComponent implements OnInit {
|
|
15
67
|
#private;
|
|
68
|
+
/**
|
|
69
|
+
* Optional projected `TileActionsMenuComponent` instance.
|
|
70
|
+
*
|
|
71
|
+
* When present, its `matMenu()` is wired as the context menu for every tile's
|
|
72
|
+
* action trigger button. The menu closes automatically whenever the user selects
|
|
73
|
+
* a menu item (managed by `#closeMenuEffect`).
|
|
74
|
+
*
|
|
75
|
+
* Project it into the component:
|
|
76
|
+
* ```html
|
|
77
|
+
* <yuv-tile-list ...>
|
|
78
|
+
* <yuv-tile-actions-menu>
|
|
79
|
+
* <button mat-menu-item>Open</button>
|
|
80
|
+
* </yuv-tile-actions-menu>
|
|
81
|
+
* </yuv-tile-list>
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
16
84
|
menuComponent: import("@angular/core").Signal<TileActionsMenuComponent | undefined>;
|
|
17
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Optional projected element shown when the query returns an empty result set.
|
|
87
|
+
*
|
|
88
|
+
* Reference the element with the `#empty` template variable:
|
|
89
|
+
* ```html
|
|
90
|
+
* <yuv-tile-list ...>
|
|
91
|
+
* <div #empty>No items found.</div>
|
|
92
|
+
* </yuv-tile-list>
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
18
95
|
emptyContent: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
96
|
+
/**
|
|
97
|
+
* Reference to the inner `QueryListComponent` instance.
|
|
98
|
+
*
|
|
99
|
+
* Used internally to delegate imperative operations (select, multiSelect, refresh, …).
|
|
100
|
+
* Prefer the public API methods on this component over accessing `list()` directly from
|
|
101
|
+
* the parent, as the inner list's API may change independently.
|
|
102
|
+
*/
|
|
19
103
|
list: import("@angular/core").Signal<QueryListComponent<TileData>>;
|
|
20
|
-
menuTriggers: import("@angular/core").Signal<readonly MatMenuTrigger[]>;
|
|
21
|
-
transformer: (res: SearchResultItem[]) => {
|
|
22
|
-
actions: Action[];
|
|
23
|
-
id: string;
|
|
24
|
-
objectTypeId: string;
|
|
25
|
-
icon?: ResolvedObjectConfigItem;
|
|
26
|
-
title: ResolvedObjectConfigItem;
|
|
27
|
-
description?: ResolvedObjectConfigItem;
|
|
28
|
-
meta?: ResolvedObjectConfigItem;
|
|
29
|
-
aside?: ResolvedObjectConfigItem;
|
|
30
|
-
badges?: import("@yuuvis/client-core").ObjectConfigBadge[];
|
|
31
|
-
instanceData?: Record<string, unknown>;
|
|
32
|
-
dmsObject: DmsObject;
|
|
33
|
-
}[];
|
|
34
|
-
onCopy(event: Event): void;
|
|
35
|
-
onCut(event: Event): void;
|
|
36
|
-
private oc?;
|
|
37
|
-
private _selection;
|
|
38
|
-
private _lastSelection?;
|
|
39
|
-
selectedTile: import("@angular/core").WritableSignal<TileData[]>;
|
|
40
104
|
/**
|
|
41
|
-
*
|
|
105
|
+
* All `MatMenuTrigger` instances rendered inside the tile list.
|
|
106
|
+
*
|
|
107
|
+
* Used by `#closeMenuEffect` to close every open context/action menu when the user
|
|
108
|
+
* selects a menu item, ensuring only one menu is open at a time.
|
|
42
109
|
*/
|
|
43
|
-
|
|
110
|
+
menuTriggers: import("@angular/core").Signal<readonly MatMenuTrigger[]>;
|
|
44
111
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
112
|
+
* Namespace key for storing and retrieving this instance's tile configuration.
|
|
113
|
+
*
|
|
114
|
+
* Tile column/field layout is persisted globally via `ObjectConfigService`. Providing
|
|
115
|
+
* a bucket isolates this instance's configuration from the global default, so two
|
|
116
|
+
* tile lists with different purposes (e.g. inbox vs. archive) can each remember their
|
|
117
|
+
* own preferred layout independently.
|
|
118
|
+
*
|
|
119
|
+
* Use a unique, stable string — e.g. `"my-app.inbox-list"`. If omitted, the global
|
|
120
|
+
* default configuration is used.
|
|
49
121
|
*/
|
|
50
122
|
bucket: import("@angular/core").InputSignal<string | undefined>;
|
|
51
123
|
/**
|
|
52
|
-
*
|
|
124
|
+
* Number of result items to request per page from the search service.
|
|
125
|
+
*
|
|
126
|
+
* Forwarded to the inner `QueryListComponent`. When the total result count exceeds
|
|
127
|
+
* this value, pagination controls appear. Reducing this number improves initial load
|
|
128
|
+
* time; increasing it reduces the need for pagination.
|
|
129
|
+
*
|
|
130
|
+
* @default SearchService.DEFAULT_QUERY_SIZE
|
|
53
131
|
*/
|
|
54
132
|
pageSize: import("@angular/core").InputSignal<number>;
|
|
55
133
|
/**
|
|
56
|
-
*
|
|
134
|
+
* Enables multi-selection mode.
|
|
135
|
+
*
|
|
136
|
+
* When `true`, the user can hold **Shift** to range-select or **Ctrl** to toggle
|
|
137
|
+
* individual tiles, and mouse drag-to-select becomes available. `selectionChange`
|
|
138
|
+
* then emits the full selection array; `itemSelect` still emits only the most
|
|
139
|
+
* recently added single tile.
|
|
140
|
+
*
|
|
57
141
|
* @default false
|
|
58
142
|
*/
|
|
59
143
|
multiselect: import("@angular/core").InputSignal<boolean>;
|
|
60
144
|
/**
|
|
61
|
-
*
|
|
145
|
+
* Renders tiles in a compact, reduced-height style.
|
|
146
|
+
*
|
|
147
|
+
* Drives the `[class.dense]` host binding. Use this when vertical space is limited
|
|
148
|
+
* or when many items need to be visible at once without scrolling.
|
|
149
|
+
*
|
|
62
150
|
* @default false
|
|
63
151
|
*/
|
|
64
152
|
dense: import("@angular/core").InputSignal<boolean>;
|
|
65
153
|
/**
|
|
66
|
-
*
|
|
154
|
+
* Extended configuration options for the tile list.
|
|
155
|
+
*
|
|
156
|
+
* See `TileListConfigOptions` for the full set of options, including:
|
|
157
|
+
* - `actionContext` — passed to `ActionsService.getActionById()` when resolving inline
|
|
158
|
+
* tile actions, so actions can behave differently per context.
|
|
159
|
+
* - `configTypes` — virtual config type overrides that let you map specific
|
|
160
|
+
* object-type / SOT combinations to a different `ObjectConfigRecord` entry.
|
|
67
161
|
*/
|
|
68
162
|
options: import("@angular/core").InputSignal<TileListConfigOptions | undefined>;
|
|
69
163
|
/**
|
|
70
|
-
*
|
|
164
|
+
* Object flavor to overlay on matching tiles.
|
|
165
|
+
*
|
|
166
|
+
* An `ObjectFlavor` defines an alternative visual representation for objects that carry
|
|
167
|
+
* a specific SOT. When set, tiles whose `DmsObject.sots` array includes
|
|
168
|
+
* `flavor.sot` are rendered using the config entry identified by `flavor.id` instead
|
|
169
|
+
* of their own object-type config.
|
|
170
|
+
*
|
|
171
|
+
* Changes are applied reactively via `#flavorEffect` and re-evaluated against the
|
|
172
|
+
* last raw result set via `applyFlavor()`.
|
|
71
173
|
*/
|
|
72
174
|
flavor: import("@angular/core").InputSignal<ObjectFlavor | undefined>;
|
|
73
175
|
/**
|
|
74
|
-
* The
|
|
176
|
+
* The search query to execute.
|
|
177
|
+
*
|
|
178
|
+
* Accepts a structured `SearchQuery` object or a raw CMIS query string. The query is
|
|
179
|
+
* re-executed reactively every time this input changes. The result set must include the
|
|
180
|
+
* `system:objectTypeId` field — tiles without a resolved object type will throw at
|
|
181
|
+
* mapping time.
|
|
75
182
|
*/
|
|
76
|
-
|
|
183
|
+
query: import("@angular/core").InputSignal<string | SearchQuery | null | undefined>;
|
|
77
184
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
185
|
+
* Object IDs to select as soon as the list finishes loading.
|
|
186
|
+
*
|
|
187
|
+
* If the list is still busy when this input is set, the IDs are stored internally and
|
|
188
|
+
* applied once the query completes (via `#preselectEffect`). Items whose IDs are not
|
|
189
|
+
* found in the current result set are silently ignored.
|
|
190
|
+
*
|
|
191
|
+
* For programmatic selection after the list is loaded, prefer `selectById()`.
|
|
192
|
+
*
|
|
193
|
+
* @default []
|
|
80
194
|
*/
|
|
81
|
-
query: import("@angular/core").InputSignal<string | SearchQuery | null | undefined>;
|
|
82
195
|
preselect: import("@angular/core").InputSignal<string[]>;
|
|
196
|
+
/**
|
|
197
|
+
* Per-item CSS style overrides rendered as inline styles on matching tiles.
|
|
198
|
+
*
|
|
199
|
+
* Each `TileListHighlight` entry specifies an array of object IDs and a
|
|
200
|
+
* `cssStyles` record. All styles for the same ID are merged, with later entries in
|
|
201
|
+
* the array taking precedence. Used to visually call out specific items (e.g. newly
|
|
202
|
+
* created, recently modified, flagged).
|
|
203
|
+
*
|
|
204
|
+
* @default []
|
|
205
|
+
*/
|
|
83
206
|
highlights: import("@angular/core").InputSignal<TileListHighlight[] | null>;
|
|
84
|
-
highlightStyles: import("@angular/core").Signal<Record<string, Record<string, unknown>>>;
|
|
85
207
|
/**
|
|
86
|
-
*
|
|
208
|
+
* Guard function that temporarily blocks all selection changes.
|
|
209
|
+
*
|
|
210
|
+
* Forwarded to the inner `ListComponent`. As long as the returned predicate evaluates
|
|
211
|
+
* to `true`, any attempt to change the selection is silently ignored. Useful when the
|
|
212
|
+
* parent has unsaved changes tied to the current selection.
|
|
213
|
+
*
|
|
214
|
+
* @default () => false (never prevents)
|
|
87
215
|
*/
|
|
88
216
|
preventChangeUntil: import("@angular/core").InputSignal<() => boolean>;
|
|
89
217
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
218
|
+
* Automatically selects an item when the list is first rendered.
|
|
219
|
+
*
|
|
220
|
+
* Follows the same priority as `ListComponent.autoSelect`: first non-disabled item
|
|
221
|
+
* with the `selected` attribute, then index 0. Accepts any truthy string so it can
|
|
222
|
+
* be set as a plain HTML attribute: `<yuv-tile-list autoSelect>`.
|
|
223
|
+
*
|
|
93
224
|
* @default false
|
|
94
225
|
*/
|
|
95
226
|
autoSelect: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
|
227
|
+
/**
|
|
228
|
+
* Suppresses the component's built-in context menu handling.
|
|
229
|
+
*
|
|
230
|
+
* When `true`, right-clicking a tile does not call `event.preventDefault()`, does not
|
|
231
|
+
* auto-select the right-clicked tile, and does not emit `ctxMenu`. Use this when the
|
|
232
|
+
* parent wants to handle `contextmenu` events itself.
|
|
233
|
+
*
|
|
234
|
+
* @default false
|
|
235
|
+
*/
|
|
96
236
|
disableCustomContextMenu: import("@angular/core").InputSignal<boolean>;
|
|
97
237
|
/**
|
|
98
|
-
*
|
|
238
|
+
* Emits the `TileData` of the most recently selected tile.
|
|
239
|
+
*
|
|
240
|
+
* In single-select mode this fires for every selection change. In multi-select mode
|
|
241
|
+
* it fires only when exactly one tile ends up selected (i.e. a plain click with no
|
|
242
|
+
* modifier keys). For the full multi-selection result, listen to `selectionChange`.
|
|
99
243
|
*/
|
|
100
244
|
itemSelect: import("@angular/core").OutputEmitterRef<TileData>;
|
|
245
|
+
/**
|
|
246
|
+
* Emits the currently selected tiles when the user presses **Ctrl+C**.
|
|
247
|
+
*
|
|
248
|
+
* The parent is responsible for handling the actual copy operation (e.g. writing to
|
|
249
|
+
* the clipboard or storing the objects for a subsequent paste action). The default
|
|
250
|
+
* browser copy behavior is suppressed.
|
|
251
|
+
*/
|
|
101
252
|
tileCopy: import("@angular/core").OutputEmitterRef<TileData[]>;
|
|
253
|
+
/**
|
|
254
|
+
* Emits the currently selected tiles when the user presses **Ctrl+X**.
|
|
255
|
+
*
|
|
256
|
+
* The parent is responsible for handling the cut operation. The default browser cut
|
|
257
|
+
* behavior is suppressed. Typically used together with `dropItems()` on a target list
|
|
258
|
+
* to implement a move-via-clipboard interaction.
|
|
259
|
+
*/
|
|
102
260
|
tileCut: import("@angular/core").OutputEmitterRef<TileData[]>;
|
|
261
|
+
/**
|
|
262
|
+
* Mirrors the inner `QueryListComponent.busy` signal as an output event.
|
|
263
|
+
*
|
|
264
|
+
* Emits `true` when a query request starts and `false` when it completes (or errors).
|
|
265
|
+
* Useful when the parent needs to react to loading state changes without holding a
|
|
266
|
+
* `@ViewChild` reference to this component.
|
|
267
|
+
*/
|
|
103
268
|
busy: import("@angular/core").OutputEmitterRef<boolean>;
|
|
269
|
+
/**
|
|
270
|
+
* Emits once per query execution when the search result arrives.
|
|
271
|
+
*
|
|
272
|
+
* Provides the server-side total item count and the raw `SearchResultItem[]` for the
|
|
273
|
+
* current page. Forwarded directly from the inner `QueryListComponent`.
|
|
274
|
+
*/
|
|
104
275
|
queryResult: import("@angular/core").OutputEmitterRef<{
|
|
105
276
|
totalCount: number;
|
|
106
277
|
items: SearchResultItem[];
|
|
107
278
|
}>;
|
|
108
279
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
280
|
+
* Emits the full current selection as `TileData[]` on every selection change.
|
|
281
|
+
*
|
|
282
|
+
* Unlike `itemSelect` — which emits a single tile — this output always reflects the
|
|
283
|
+
* complete selection. In single-select mode the array contains at most one element.
|
|
284
|
+
* Emits an empty array when the selection is cleared.
|
|
112
285
|
*/
|
|
113
286
|
selectionChange: import("@angular/core").OutputEmitterRef<TileData[]>;
|
|
114
287
|
/**
|
|
115
|
-
*
|
|
288
|
+
* Emits the `TileData` of a tile when it is double-clicked.
|
|
289
|
+
*
|
|
290
|
+
* The primary single-click selection is handled separately via `itemSelect`. Use this
|
|
291
|
+
* output to trigger a secondary action such as opening a detail view or navigating
|
|
292
|
+
* to a route.
|
|
116
293
|
*/
|
|
117
294
|
itemDblClick: import("@angular/core").OutputEmitterRef<TileData>;
|
|
295
|
+
/**
|
|
296
|
+
* Emits when the user right-clicks a tile and `disableCustomContextMenu` is `false`.
|
|
297
|
+
*
|
|
298
|
+
* Provides the originating mouse event (for positioning a custom menu overlay) and
|
|
299
|
+
* the current selection as an array of object IDs. The right-clicked tile is
|
|
300
|
+
* auto-selected before the event fires if it was not already part of the selection.
|
|
301
|
+
*/
|
|
118
302
|
ctxMenu: import("@angular/core").OutputEmitterRef<{
|
|
119
303
|
event: MouseEvent | PointerEvent;
|
|
120
304
|
selection: any;
|
|
121
305
|
}>;
|
|
306
|
+
/**
|
|
307
|
+
* The `MatMenu` instance resolved from the projected `TileActionsMenuComponent`.
|
|
308
|
+
*
|
|
309
|
+
* `null` when no `TileActionsMenuComponent` is projected. Used in the template to
|
|
310
|
+
* conditionally bind `[matMenuTriggerFor]` on tile action buttons.
|
|
311
|
+
*/
|
|
312
|
+
menu: import("@angular/core").Signal<import("@angular/material/menu").MatMenu | null>;
|
|
313
|
+
/**
|
|
314
|
+
* The full `TileData` objects for all currently selected tiles.
|
|
315
|
+
*
|
|
316
|
+
* Updated on every selection change alongside `selection`. Prefer this signal when
|
|
317
|
+
* the parent needs rich tile data (fields, DMS object reference, actions) rather than
|
|
318
|
+
* just IDs.
|
|
319
|
+
*/
|
|
320
|
+
selectedTile: import("@angular/core").WritableSignal<TileData[]>;
|
|
321
|
+
/**
|
|
322
|
+
* Object IDs of the currently selected tiles.
|
|
323
|
+
*
|
|
324
|
+
* A flat `string[]` signal — convenient for ID comparisons, permission checks, or
|
|
325
|
+
* passing to services that work with IDs. For the full tile data, use `selectedTile`.
|
|
326
|
+
*/
|
|
327
|
+
selection: import("@angular/core").WritableSignal<string[]>;
|
|
328
|
+
/**
|
|
329
|
+
* The `ObjectFlavor` currently applied to matching tiles, or `undefined` if none.
|
|
330
|
+
*
|
|
331
|
+
* Toggled by `applyFlavor()`: calling it with the same flavor a second time clears it
|
|
332
|
+
* (acts as a toggle). Persisted across query refreshes until explicitly changed.
|
|
333
|
+
*/
|
|
334
|
+
appliedFlavor?: ObjectFlavor;
|
|
335
|
+
/**
|
|
336
|
+
* Computed map of per-object-ID inline CSS styles derived from the `highlights` input.
|
|
337
|
+
*
|
|
338
|
+
* Merges all `TileListHighlight` entries that reference the same ID so the template
|
|
339
|
+
* only needs a single lookup: `highlightStyles()[item.id]`. Returns an empty object
|
|
340
|
+
* for IDs with no highlight rules.
|
|
341
|
+
*/
|
|
342
|
+
highlightStyles: import("@angular/core").Signal<Record<string, Record<string, unknown>>>;
|
|
343
|
+
/**
|
|
344
|
+
* The `TileData` view models currently rendered in the list.
|
|
345
|
+
*
|
|
346
|
+
* Populated by `onQueryResult()` after each successful search response and also
|
|
347
|
+
* prepended by `dropItems()`. The template iterates over this signal directly.
|
|
348
|
+
* Read this from the parent to access displayed tile data without an extra query.
|
|
349
|
+
*/
|
|
122
350
|
items: import("@angular/core").WritableSignal<TileData[]>;
|
|
351
|
+
/**
|
|
352
|
+
* Indicates whether at least one search has been executed successfully.
|
|
353
|
+
*
|
|
354
|
+
* Remains `false` until the first `onQueryResult()` call. Use this in the template
|
|
355
|
+
* to distinguish between "initial loading" (show a spinner) and "empty result"
|
|
356
|
+
* (show the empty-state slot) without relying on `items().length` alone.
|
|
357
|
+
*/
|
|
123
358
|
searchExecuted: import("@angular/core").WritableSignal<boolean>;
|
|
359
|
+
private objectConfig?;
|
|
360
|
+
private _selection;
|
|
361
|
+
private _lastSelection?;
|
|
124
362
|
constructor();
|
|
363
|
+
ngOnInit(): void;
|
|
364
|
+
/**
|
|
365
|
+
* Host **Ctrl+C** handler — emits the current selection via `tileCopy`.
|
|
366
|
+
*
|
|
367
|
+
* Suppresses the default browser copy behavior. Fires only when at least one tile
|
|
368
|
+
* is selected. Bound via the `host` metadata as `(keydown.control.c)`.
|
|
369
|
+
*
|
|
370
|
+
* @param event The keyboard event (used to call `preventDefault`).
|
|
371
|
+
*/
|
|
372
|
+
onCopy(event: Event): void;
|
|
373
|
+
/**
|
|
374
|
+
* Host **Ctrl+X** handler — emits the current selection via `tileCut`.
|
|
375
|
+
*
|
|
376
|
+
* Suppresses the default browser cut behavior. Fires only when at least one tile
|
|
377
|
+
* is selected. Bound via the `host` metadata as `(keydown.control.x)`.
|
|
378
|
+
*
|
|
379
|
+
* @param event The keyboard event (used to call `preventDefault`).
|
|
380
|
+
*/
|
|
381
|
+
onCut(event: Event): void;
|
|
382
|
+
/**
|
|
383
|
+
* Handles a double-click event forwarded from the inner `QueryListComponent`.
|
|
384
|
+
*
|
|
385
|
+
* If the double-clicked tile is not already the sole selected item, it is selected
|
|
386
|
+
* first (without modifier keys) so that `itemDblClick` always fires in the context
|
|
387
|
+
* of a known selection state. Then `itemDblClick` is emitted with the tile's data.
|
|
388
|
+
*
|
|
389
|
+
* Called from the template via `(itemDoubleClick)`. Not intended for external callers.
|
|
390
|
+
*
|
|
391
|
+
* @param index Zero-based index of the double-clicked tile in the current `items` array.
|
|
392
|
+
*/
|
|
125
393
|
onItemDoubleClick(index: number): void;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Handles the query result emitted by the inner `QueryListComponent`.
|
|
396
|
+
*
|
|
397
|
+
* Marks the component as having executed at least one search (`searchExecuted`),
|
|
398
|
+
* updates the `items` signal with the freshly mapped `TileData` view models, and
|
|
399
|
+
* re-emits the raw result via `queryResult` so the parent can update counters or
|
|
400
|
+
* analytics without a separate query.
|
|
401
|
+
*
|
|
402
|
+
* Called from the template via `(queryResult)`. Not intended for external callers.
|
|
403
|
+
*
|
|
404
|
+
* @param result The search result object containing `totalCount` and `items`.
|
|
405
|
+
*/
|
|
406
|
+
onQueryResult(result: {
|
|
132
407
|
totalCount: number;
|
|
133
408
|
items: SearchResultItem[];
|
|
134
409
|
}): void;
|
|
410
|
+
/**
|
|
411
|
+
* Handles the committed selection emitted by the inner list.
|
|
412
|
+
*
|
|
413
|
+
* For a single-item selection the full `#select()` path is taken so that `itemSelect`
|
|
414
|
+
* is also emitted. For multi-item selections only `#updateSelectionState()` runs to
|
|
415
|
+
* keep `selectionChange` and the internal state in sync without the single-item emit.
|
|
416
|
+
*
|
|
417
|
+
* Called from the template via `(itemSelect)` on `yuv-query-list`.
|
|
418
|
+
* Not intended for external callers.
|
|
419
|
+
*
|
|
420
|
+
* @param sel Array of zero-based indices representing the new selection.
|
|
421
|
+
*/
|
|
135
422
|
onListItemsSelect(sel: number[]): void;
|
|
423
|
+
/**
|
|
424
|
+
* Handles live drag-selection changes forwarded from the inner `QueryListComponent`.
|
|
425
|
+
*
|
|
426
|
+
* Fires continuously while the user drags across tiles, updating the selection state
|
|
427
|
+
* in real time so the visual highlight tracks the gesture. Does not emit `itemSelect`
|
|
428
|
+
* (that fires only on the final committed selection via `onListItemsSelect`).
|
|
429
|
+
*
|
|
430
|
+
* Called from the template via `(dragSelectChange)`. Not intended for external callers.
|
|
431
|
+
*
|
|
432
|
+
* @param sel Current array of zero-based indices covered by the drag gesture.
|
|
433
|
+
*/
|
|
136
434
|
onDragSelectChange(sel: number[]): void;
|
|
435
|
+
/**
|
|
436
|
+
* Transformer function passed to the inner `QueryListComponent`.
|
|
437
|
+
*
|
|
438
|
+
* Maps raw `SearchResultItem[]` to the `InnerTileData` view model by:
|
|
439
|
+
* 1. Storing the raw items in `#rawResultItems` so `applyFlavor()` can re-map them
|
|
440
|
+
* without a new server request.
|
|
441
|
+
* 2. Calling `#mapToTileData()` to resolve `ObjectConfig` fields (title, icon, …).
|
|
442
|
+
* 3. Resolving each tile's action IDs to full `Action` objects via `ActionsService`,
|
|
443
|
+
* filtering out any IDs that are not registered.
|
|
444
|
+
*
|
|
445
|
+
* Re-runs automatically whenever the query result or the `ObjectConfigRecord` changes
|
|
446
|
+
* (the latter is triggered by calling `list().runTransformerAgain()` from
|
|
447
|
+
* `#getObjectConfig()`).
|
|
448
|
+
*/
|
|
449
|
+
transformer: (res: SearchResultItem[]) => InnerTileData[];
|
|
450
|
+
/**
|
|
451
|
+
* Handles a right-click (contextmenu) event on a tile.
|
|
452
|
+
*
|
|
453
|
+
* Suppresses the browser's native context menu. If the clicked tile is not already
|
|
454
|
+
* part of the selection, it is selected first. After a short delay (to allow the
|
|
455
|
+
* selection state to propagate), `ctxMenu` is emitted with the originating event and
|
|
456
|
+
* the current selection so the parent can position and populate a custom menu.
|
|
457
|
+
*
|
|
458
|
+
* The delay is intentional: it gives Angular change detection a tick to apply the
|
|
459
|
+
* selection update before the parent reads `selection()` in the `ctxMenu` handler.
|
|
460
|
+
*
|
|
461
|
+
* No-ops when `disableCustomContextMenu` is `true`.
|
|
462
|
+
*
|
|
463
|
+
* Called from the template via `(contextmenu)` on each tile. Not intended for
|
|
464
|
+
* external callers.
|
|
465
|
+
*
|
|
466
|
+
* @param event The originating mouse event (used to suppress default and for positioning).
|
|
467
|
+
* @param index Zero-based index of the right-clicked tile.
|
|
468
|
+
*/
|
|
469
|
+
contextMenuHandler(event: MouseEvent, index: number): void;
|
|
470
|
+
/**
|
|
471
|
+
* Executes a tile inline action against the appropriate set of DMS objects.
|
|
472
|
+
*
|
|
473
|
+
* Resolves the target objects from the DMS service: if the tile whose action button
|
|
474
|
+
* was clicked is part of the current selection, the action runs against all selected
|
|
475
|
+
* objects (batch action); otherwise it runs against only that single tile's object.
|
|
476
|
+
*
|
|
477
|
+
* Suppresses the click event to prevent the tile's own selection handler from firing.
|
|
478
|
+
* Called from the template via the tile action buttons. Not intended for external callers.
|
|
479
|
+
*
|
|
480
|
+
* @param tileData The tile whose action button was clicked.
|
|
481
|
+
* @param action The resolved `Action` to execute.
|
|
482
|
+
* @param event The originating click event (stopped to prevent tile selection).
|
|
483
|
+
*/
|
|
484
|
+
executeAction(tileData: InnerTileData, action: Action, event: Event): void;
|
|
485
|
+
/**
|
|
486
|
+
* Selects tiles by their object IDs.
|
|
487
|
+
*
|
|
488
|
+
* Looks up each ID in the current `items` array and selects the matching indices
|
|
489
|
+
* in the inner list. If the list is still loading when this is called, the IDs are
|
|
490
|
+
* stored and applied automatically once the query completes (via `#preselectEffect`).
|
|
491
|
+
*
|
|
492
|
+
* IDs not found in the current result set are silently ignored. The first found item
|
|
493
|
+
* also receives keyboard focus via `setActiveItem()`.
|
|
494
|
+
*
|
|
495
|
+
* @param ids Array of object IDs (`system:objectId`) to select.
|
|
496
|
+
*/
|
|
497
|
+
selectById(ids: string[]): void;
|
|
498
|
+
/**
|
|
499
|
+
* Programmatically replaces the entire selection with the given indices.
|
|
500
|
+
*
|
|
501
|
+
* Only effective when `multiselect` is `true`. Delegates to the inner
|
|
502
|
+
* `QueryListComponent`. Out-of-range indices are silently discarded.
|
|
503
|
+
*
|
|
504
|
+
* @param index Array of zero-based item indices to select.
|
|
505
|
+
*/
|
|
506
|
+
multiSelect(index: number[]): void;
|
|
507
|
+
/**
|
|
508
|
+
* Selects the tile at the given zero-based index.
|
|
509
|
+
*
|
|
510
|
+
* Delegates to the inner `QueryListComponent`. Clamps the index to the valid range.
|
|
511
|
+
* Use `selectById()` when you have object IDs rather than positional indices.
|
|
512
|
+
*
|
|
513
|
+
* @param index Zero-based index of the tile to select.
|
|
514
|
+
*/
|
|
515
|
+
select(index: number): void;
|
|
516
|
+
/**
|
|
517
|
+
* Re-executes the current query without changing the page or query parameters.
|
|
518
|
+
*
|
|
519
|
+
* If pagination is active, re-fetches the same page. Use this to reflect server-side
|
|
520
|
+
* changes (e.g. after a create/delete operation) without navigating away.
|
|
521
|
+
*/
|
|
137
522
|
refresh(): void;
|
|
523
|
+
/**
|
|
524
|
+
* Prepends `DmsObject` instances to the top of the tile list as temporary drop-in items.
|
|
525
|
+
*
|
|
526
|
+
* The objects are mapped through the same `ObjectConfig` resolution pipeline as regular
|
|
527
|
+
* query results, including action resolution. The existing selection is shifted so that
|
|
528
|
+
* currently selected tiles remain selected after the prepend.
|
|
529
|
+
*
|
|
530
|
+
* Use this for optimistic UI: show newly created or pasted objects immediately before
|
|
531
|
+
* the server index reflects them in the query results.
|
|
532
|
+
*
|
|
533
|
+
* Drop-in items are cleared automatically when the user navigates to a different page.
|
|
534
|
+
*
|
|
535
|
+
* @param objects `DmsObject` instances to prepend to the visible list.
|
|
536
|
+
*/
|
|
138
537
|
dropItems(objects: DmsObject[]): void;
|
|
538
|
+
/**
|
|
539
|
+
* Toggles an `ObjectFlavor` on or off and re-maps the current result set.
|
|
540
|
+
*
|
|
541
|
+
* If the given flavor is already the active `appliedFlavor`, it is cleared (toggle
|
|
542
|
+
* off). Otherwise the flavor is applied and all tiles whose `DmsObject.sots` includes
|
|
543
|
+
* `flavor.sot` are re-rendered using the config entry for `flavor.id`.
|
|
544
|
+
*
|
|
545
|
+
* Re-mapping runs against the last raw `SearchResultItem[]` (`#rawResultItems`) so
|
|
546
|
+
* no server round-trip is needed. Called automatically by `#flavorEffect` when the
|
|
547
|
+
* `flavor` input changes.
|
|
548
|
+
*
|
|
549
|
+
* @param flavor The `ObjectFlavor` to apply or remove.
|
|
550
|
+
*/
|
|
139
551
|
applyFlavor(flavor: ObjectFlavor): void;
|
|
140
552
|
/**
|
|
141
|
-
*
|
|
553
|
+
* Applies per-index optimistic overrides to the displayed tile data.
|
|
554
|
+
*
|
|
555
|
+
* Delegates to the inner `QueryListComponent.updateListItems()`. Each entry patches
|
|
556
|
+
* the tile at the given `index` with a new `TileData` value. Overrides accumulate
|
|
557
|
+
* until the user navigates to a different page, at which point the fresh server
|
|
558
|
+
* response replaces all local data.
|
|
142
559
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
560
|
+
* For DMS-object-based updates, prefer `updateTileList()` which resolves indices
|
|
561
|
+
* from object IDs automatically.
|
|
145
562
|
*
|
|
146
|
-
* @param
|
|
147
|
-
* @param value The new value for the item.
|
|
563
|
+
* @param updates Array of `{ index, value }` pairs describing which tiles to patch.
|
|
148
564
|
*/
|
|
149
565
|
updateListItems(updates: {
|
|
150
566
|
index: number;
|
|
151
567
|
value: TileData;
|
|
152
568
|
}[]): void;
|
|
153
569
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
570
|
+
* Optimistically updates tiles in the list that correspond to the given `DmsObject` instances.
|
|
571
|
+
*
|
|
572
|
+
* For each provided object, finds its matching tile by `id` in the current `items`
|
|
573
|
+
* array, re-maps it through `#mapToTileData()` to get a fresh `TileData` view model,
|
|
574
|
+
* and applies it via `updateListItems()`. Tiles not currently visible in the list are
|
|
575
|
+
* silently skipped.
|
|
576
|
+
*
|
|
577
|
+
* This is the preferred way to reflect server-confirmed changes (e.g. rename, metadata
|
|
578
|
+
* edit) without issuing a full query refresh. Updates are scoped to the current page
|
|
579
|
+
* and are discarded on the next page navigation.
|
|
580
|
+
*
|
|
581
|
+
* @param listItems Updated `DmsObject` instances to apply to the list.
|
|
159
582
|
*/
|
|
160
583
|
updateTileList(listItems: DmsObject[]): void;
|
|
161
584
|
/**
|
|
162
|
-
* Clears the current selection.
|
|
163
|
-
*
|
|
585
|
+
* Clears the current selection and resets all internal selection state.
|
|
586
|
+
*
|
|
587
|
+
* Resets `_selection`, `_lastSelection`, the `selection` signal, and `selectedTile`
|
|
588
|
+
* to empty. Also delegates to the inner list's `clear()` to sync the visual state.
|
|
589
|
+
* If the selection is already empty, the method is a no-op.
|
|
590
|
+
*
|
|
591
|
+
* @param silent When `true`, skips emitting `selectionChange`. Use this when the
|
|
592
|
+
* parent needs to reset state programmatically without triggering
|
|
593
|
+
* downstream reactions.
|
|
164
594
|
*/
|
|
165
595
|
clearSelection(silent?: boolean): void;
|
|
166
596
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
597
|
+
* Advances the selection to the next tile in the list.
|
|
598
|
+
*
|
|
599
|
+
* Moves from the last selected index forward by one. Wraps around to index 0
|
|
600
|
+
* when the last tile is currently selected. Does nothing if no tile is selected
|
|
601
|
+
* (`_lastSelection` is `undefined`).
|
|
602
|
+
*
|
|
603
|
+
* Useful for implementing keyboard-driven "next item" navigation from a parent
|
|
604
|
+
* detail panel without giving focus back to the list.
|
|
169
605
|
*/
|
|
170
606
|
selectNext(): void;
|
|
171
607
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
608
|
+
* Moves the selection to the previous tile in the list.
|
|
609
|
+
*
|
|
610
|
+
* Moves from the last selected index backward by one. Wraps around to the last tile
|
|
611
|
+
* when index 0 is currently selected. Does nothing if no tile is selected
|
|
612
|
+
* (`_lastSelection` is `undefined`).
|
|
613
|
+
*
|
|
614
|
+
* Useful for implementing keyboard-driven "previous item" navigation from a parent
|
|
615
|
+
* detail panel without giving focus back to the list.
|
|
174
616
|
*/
|
|
175
617
|
selectPrev(): void;
|
|
176
|
-
|
|
618
|
+
/**
|
|
619
|
+
* Handles a click on a projected `TileActionsMenuComponent` menu item.
|
|
620
|
+
*
|
|
621
|
+
* If the tile that owns the clicked menu item is part of the current selection,
|
|
622
|
+
* the click event is stopped from propagating so the tile's own `(click)` handler
|
|
623
|
+
* does not deselect other tiles. If the tile is not selected, the event is allowed
|
|
624
|
+
* to propagate normally so the tile gets selected as a side effect.
|
|
625
|
+
*
|
|
626
|
+
* Called from the template via the `TileActionsMenuComponent` item click binding.
|
|
627
|
+
* Not intended for external callers.
|
|
628
|
+
*
|
|
629
|
+
* @param tileData The tile that owns the clicked menu item.
|
|
630
|
+
* @param event The originating click event.
|
|
631
|
+
*/
|
|
632
|
+
menuItemClicked(tileData: TileData, event: Event): void;
|
|
177
633
|
private _selectionToTileData;
|
|
178
|
-
ngOnInit(): void;
|
|
179
634
|
static ɵfac: i0.ɵɵFactoryDeclaration<TileListComponent, never>;
|
|
180
635
|
static ɵcmp: i0.ɵɵ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>;
|
|
181
636
|
}
|