@yuuvis/client-framework 2.8.2 → 2.9.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.
@@ -58,6 +58,11 @@ export declare class QueryListComponent {
58
58
  * The query to execute (SearchQuery object or CMIS query string).
59
59
  */
60
60
  query: import("@angular/core").InputSignal<string | SearchQuery | null | undefined>;
61
+ /**
62
+ * Optional property name to use as unique identifier for items.
63
+ * If not provided, the index of the item in the result set will be used.
64
+ */
65
+ idProperty: import("@angular/core").InputSignal<string | null>;
61
66
  /**
62
67
  * Optional transformer function to map SearchResultItem to a custom format.
63
68
  */
@@ -78,7 +83,6 @@ export declare class QueryListComponent {
78
83
  autoSelect: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
79
84
  /**
80
85
  * Event emitted when items are selected. Emits an array of selected item indices.
81
- *
82
86
  */
83
87
  itemSelect: import("@angular/core").OutputEmitterRef<number[]>;
84
88
  /**
@@ -95,6 +99,7 @@ export declare class QueryListComponent {
95
99
  queryResult: import("@angular/core").OutputEmitterRef<{
96
100
  totalCount: number;
97
101
  }>;
102
+ dropInSize: import("@angular/core").Signal<number>;
98
103
  /**
99
104
  * The list of result items after applying the optional transformer.
100
105
  */
@@ -132,6 +137,38 @@ export declare class QueryListComponent {
132
137
  onItemDoubleClick(idx: number, event: MouseEvent): void;
133
138
  onDragSelectChange(sel: number[]): void;
134
139
  onDragSelect(sel: number[]): void;
140
+ /**
141
+ * Updates an item in the list at the specified index with the provided value.
142
+ * The value should match the type returned by the transformer function, if provided.
143
+ * If you did not provide a transformer, the value should be of type SearchResultItem.
144
+ *
145
+ * Use this method for optimistic updates of list items. The updates be removed
146
+ * when the user navigates to another search result page.
147
+ *
148
+ * @param index Index of the item to update.
149
+ * @param value The new value for the item.
150
+ */
151
+ updateListItems(updates: {
152
+ index: number;
153
+ value: unknown;
154
+ }[]): void;
155
+ /**
156
+ * Optional array of items to be shown in addition to the query results.
157
+ * These items will be prepended to the list of query results and visually
158
+ * highlighted. They will also be affected by selection and drag-selection.
159
+ *
160
+ * Use this input to "drop in" items, for example when creating features
161
+ * like pasting items into a list where they would otherwise not appear due
162
+ * to the current query/filter.
163
+ *
164
+ * Changing the page of the query will remove the drop-in items again, as
165
+ * they are meant to be temporary.
166
+ *
167
+ * @param items The items to drop into the list.
168
+ * @param scrollTo If `true`, the list will scroll to the top after dropping
169
+ * in the items. Default is `true`.
170
+ */
171
+ dropItems(items: Record<string, unknown>[], scrollTo?: boolean): void;
135
172
  /**
136
173
  * Selects multiple items in the list.
137
174
  */
@@ -148,5 +185,5 @@ export declare class QueryListComponent {
148
185
  changePage(pe: PageEvent): void;
149
186
  goToPage(page: number): void;
150
187
  static ɵfac: i0.ɵɵFactoryDeclaration<QueryListComponent, never>;
151
- static ɵcmp: i0.ɵɵComponentDeclaration<QueryListComponent, "yuv-query-list", never, { "query": { "alias": "query"; "required": false; "isSignal": true; }; "transformer": { "alias": "transformer"; "required": false; "isSignal": true; }; "preventChangeUntil": { "alias": "preventChangeUntil"; "required": false; "isSignal": true; }; "autoSelect": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "enableDragSelect": { "alias": "enableDragSelect"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "selfHandleSelection": { "alias": "selfHandleSelection"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; "dragSelectChange": "dragSelectChange"; "itemDoubleClick": "itemDoubleClick"; "queryResult": "queryResult"; }, ["itemTemplate", "emptyTemplate"], never, true, never>;
188
+ static ɵcmp: i0.ɵɵComponentDeclaration<QueryListComponent, "yuv-query-list", never, { "query": { "alias": "query"; "required": false; "isSignal": true; }; "idProperty": { "alias": "idProperty"; "required": false; "isSignal": true; }; "transformer": { "alias": "transformer"; "required": false; "isSignal": true; }; "preventChangeUntil": { "alias": "preventChangeUntil"; "required": false; "isSignal": true; }; "autoSelect": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "enableDragSelect": { "alias": "enableDragSelect"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "selfHandleSelection": { "alias": "selfHandleSelection"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; "dragSelectChange": "dragSelectChange"; "itemDoubleClick": "itemDoubleClick"; "queryResult": "queryResult"; }, ["itemTemplate", "emptyTemplate"], never, true, never>;
152
189
  }
@@ -1,5 +1,6 @@
1
1
  import { ElementRef, OnInit, Signal } from '@angular/core';
2
2
  import { DmsObject, ResolvedObjectConfigItem, SearchQuery, SearchResultItem } from '@yuuvis/client-core';
3
+ import { MatMenuTrigger } from '@angular/material/menu';
3
4
  import { Action } from '@yuuvis/client-framework/actions';
4
5
  import { QueryListComponent } from '@yuuvis/client-framework/query-list';
5
6
  import { ObjectFlavor } from '@yuuvis/client-shell-core';
@@ -16,6 +17,7 @@ export declare class TileListComponent implements OnInit {
16
17
  menu: Signal<import("@angular/material/menu").MatMenu | null>;
17
18
  emptyContent: Signal<ElementRef<any> | undefined>;
18
19
  list: Signal<QueryListComponent>;
20
+ menuTriggers: Signal<readonly MatMenuTrigger[]>;
19
21
  transformer: (res: SearchResultItem[]) => {
20
22
  actions: Action[];
21
23
  id: string;
@@ -75,6 +77,7 @@ export declare class TileListComponent implements OnInit {
75
77
  appliedFlavor?: ObjectFlavor;
76
78
  /**
77
79
  * The search query to be executed. This may be a SearchQuery object or a CMIS query statement.
80
+ * Ensure that the query includes the object type ID field to allow proper tile rendering.
78
81
  */
79
82
  query: import("@angular/core").InputSignal<string | SearchQuery | null | undefined>;
80
83
  preselect: import("@angular/core").InputSignal<string[]>;
@@ -129,11 +132,43 @@ export declare class TileListComponent implements OnInit {
129
132
  onListItemsSelect(sel: number[]): void;
130
133
  refresh(): void;
131
134
  applyFlavor(flavor: ObjectFlavor): void;
135
+ /**
136
+ * Updates an item in the list at the specified index with the provided value.
137
+ *
138
+ * Use this method for optimistic updates of list items. The updates be removed
139
+ * when the user navigates to another search result page.
140
+ *
141
+ * @param index Index of the item to update.
142
+ * @param value The new value for the item.
143
+ */
144
+ updateListItems(updates: {
145
+ index: number;
146
+ value: TileData;
147
+ }[]): void;
148
+ /**
149
+ * Updates the tile list with the provided DmsObjects. Only tiles that are
150
+ * already present in the list will be updated. The update is based on
151
+ * the object ID and will be gone when the user navigates to another search
152
+ * result page. Use this method for optimistic updates.
153
+ * @param listItems The DmsObjects to update the tiles with.
154
+ */
155
+ updateTileList(listItems: DmsObject[]): void;
156
+ /**
157
+ * Clears the current selection.
158
+ * @param silent If true, the selectionChange event will not be emitted.
159
+ */
132
160
  clearSelection(silent?: boolean): void;
161
+ /**
162
+ * Selects the next item in the list. If the last item is already selected,
163
+ * it wraps around to the first item. Does nothing if no item is currently selected.
164
+ */
133
165
  selectNext(): void;
166
+ /**
167
+ * Selects the previous item in the list. If the first item is already selected,
168
+ * it wraps around to the last item. Does nothing if no item is currently selected.
169
+ */
134
170
  selectPrev(): void;
135
171
  private _selectionToTileData;
136
- updateTileList(listItems: DmsObject[]): void;
137
172
  ngOnInit(): void;
138
173
  static ɵfac: i0.ɵɵFactoryDeclaration<TileListComponent, never>;
139
174
  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>;