@yuuvis/client-framework 3.22.1 → 3.24.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.
@@ -1 +1 @@
1
- {"version":3,"file":"yuuvis-client-framework-query-list.mjs","sources":["../../../../../libs/yuuvis/client-framework/query-list/src/lib/query-list.component.ts","../../../../../libs/yuuvis/client-framework/query-list/src/lib/query-list.component.html","../../../../../libs/yuuvis/client-framework/query-list/src/lib/query-list.module.ts","../../../../../libs/yuuvis/client-framework/query-list/src/yuuvis-client-framework-query-list.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild\n} from '@angular/core';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { SearchQuery, SearchResult, SearchResultItem, SearchService } from '@yuuvis/client-core';\nimport { ClickDoubleDirective, DragSelectDirective, DragSelectItemDirective } from '@yuuvis/client-framework/common';\nimport { ListComponent, YuvListModule } from '@yuuvis/client-framework/list';\nimport { Pagination } from '@yuuvis/client-framework/pagination';\nimport { DeviceService } from '@yuuvis/material';\n\n/**\n * Query-driven list component that executes a search query and renders the results\n * using a consumer-provided item template.\n *\n * The component is a thin orchestration layer on top of `yuv-list`: it handles the\n * full query lifecycle (executing, paginating, refreshing), exposes a typed result\n * set via the optional `transformer` input, and delegates all keyboard navigation,\n * selection, and accessibility concerns to the inner `ListComponent`.\n *\n * **Key Features:**\n * - Accepts a `SearchQuery` object or a raw CMIS query string\n * - Optional `transformer` function maps raw `SearchResultItem[]` to any custom type `T`\n * - Built-in server-side pagination via Angular Material `mat-paginator`\n * - Multi-selection with mouse drag (`DragSelectDirective`) and keyboard modifiers\n * - \"Drop-in\" items prepended to the result set for optimistic UI updates\n * - Busy state signal for loading indicators\n * - Exposes a slim imperative API (`select`, `clear`, `refresh`, `goToPage`, …)\n * so parents can drive the list programmatically\n *\n * **Content Projection Slots:**\n * - `#yuvQueryListItem` — required; `ng-template` used to render each result item.\n * Receives the (optionally transformed) item as `$implicit`.\n * - `#yuvQueryListEmpty` — optional; `ng-template` shown when the result set is empty.\n *\n * **Basic usage:**\n * ```html\n * <yuv-query-list [query]=\"query\" (itemSelect)=\"onSelect($event)\">\n * <ng-template #yuvQueryListItem let-item>\n * <span>{{ item.title }}</span>\n * </ng-template>\n * </yuv-query-list>\n * ```\n *\n * **With transformer and empty state:**\n * ```html\n * <yuv-query-list [query]=\"query\" [transformer]=\"toViewModel\" (itemSelect)=\"onSelect($event)\">\n * <ng-template #yuvQueryListItem let-item>\n * <yuv-list-tile>\n * <ng-template #titleSlot>{{ item.title }}</ng-template>\n * <ng-template #descriptionSlot>{{ item.modified }}</ng-template>\n * </yuv-list-tile>\n * </ng-template>\n * <ng-template #yuvQueryListEmpty>\n * <p>No results found.</p>\n * </ng-template>\n * </yuv-query-list>\n * ```\n *\n * ```ts\n * toViewModel = (items: SearchResultItem[]) =>\n * items.map(item => ({\n * title: item.fields.get(BaseObjectTypeField.OBJECT_ID),\n * modified: item.fields.get(BaseObjectTypeField.MODIFICATION_DATE)\n * }));\n * ```\n *\n * @typeParam T The shape of each item after the optional `transformer` is applied.\n * Defaults to `any` when no transformer is provided.\n */\n@Component({\n selector: 'yuv-query-list',\n imports: [\n CommonModule,\n YuvListModule,\n ClickDoubleDirective,\n DragSelectDirective,\n DragSelectItemDirective,\n MatPaginatorModule\n ],\n templateUrl: './query-list.component.html',\n styleUrl: './query-list.component.scss',\n host: { '[class.pagination]': '!!pagination()' },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class QueryListComponent<T = any> {\n //#region Dependencies\n\n #device = inject(DeviceService);\n #searchService = inject(SearchService);\n\n //#endregion\n\n //#region Angular stuff\n\n /**\n * Current pagination state. Set to a `Pagination` object when the last query\n * result contained multiple pages; `undefined` when all results fit on one page\n * or no query has been executed yet.\n *\n * Drives the `[class.pagination]` host binding so the template can conditionally\n * render the `mat-paginator` footer.\n */\n pagination = signal<Pagination | undefined>(undefined);\n\n /**\n * Reference to the inner `ListComponent` instance.\n *\n * Used internally to delegate imperative operations (select, clear, focus, …).\n * Can also be accessed from the parent via a `@ViewChild` on `yuv-query-list` if\n * fine-grained control over the inner list is needed, though the public API methods\n * on this component are preferred.\n */\n list = viewChild.required<ListComponent>('list');\n\n /**\n * Reference to the `#yuvQueryListItem` `ng-template` projected by the consumer.\n *\n * This template is used to render each individual item in the list. The template\n * receives the (optionally transformed) item as the `$implicit` context variable:\n * ```html\n * <ng-template #yuvQueryListItem let-item>{{ item.title }}</ng-template>\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemTemplate = contentChild<TemplateRef<any>>('yuvQueryListItem');\n\n /**\n * Reference to the optional `#yuvQueryListEmpty` `ng-template` projected by the consumer.\n *\n * When provided, this template is rendered in place of the list whenever the query\n * returns zero items. If omitted, nothing is shown for the empty state.\n * ```html\n * <ng-template #yuvQueryListEmpty>\n * <p>No results found.</p>\n * </ng-template>\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n emptyTemplate = contentChild<TemplateRef<any>>('yuvQueryListEmpty');\n\n /**\n * The search query to execute.\n *\n * Accepts either a structured `SearchQuery` object (field filters, sort orders, etc.)\n * or a raw CMIS query string. The query is re-executed reactively every time this\n * input changes. Set to `null` or `undefined` to clear the list without triggering\n * a new request.\n */\n query = input<SearchQuery | string | null>();\n\n /**\n * Property name on the (transformed) item to use as a stable unique identifier.\n *\n * When provided, the template renderer uses this property for `@for` tracking instead\n * of the item's position index, which preserves DOM nodes and component state when the\n * list is refreshed with partially overlapping results.\n *\n * If omitted, the zero-based index is used as the tracking key.\n *\n * @default null\n */\n idProperty = input<string | null>(null);\n\n /**\n * Optional mapping function applied to the raw `SearchResultItem[]` returned by the\n * search service before the results are rendered.\n *\n * Use this to project only the fields your template needs, compute derived properties,\n * or convert dates/enums to display-friendly values. The generic type parameter `T`\n * of the component is inferred from the return type of this function.\n *\n * If omitted, raw `SearchResultItem` objects are passed to the item template as-is.\n *\n * @example\n * ```ts\n * transformer = (items: SearchResultItem[]) =>\n * items.map(item => ({\n * id: item.fields.get(BaseObjectTypeField.OBJECT_ID) as string,\n * title: item.fields.get('cm:name') as string\n * }));\n * ```\n */\n transformer = input<((items: SearchResultItem[]) => T[]) | null>();\n\n /**\n * Guard function that temporarily blocks all selection changes.\n *\n * Forwarded directly to the inner `ListComponent`. As long as the returned predicate\n * evaluates to `true`, any attempt to change the selection — via click, keyboard, or\n * the programmatic API — is silently ignored. Useful when the parent has unsaved\n * changes tied to the current selection and needs to prevent the user from\n * accidentally navigating away.\n *\n * @default () => false (never prevents)\n */\n preventChangeUntil = input<() => boolean>(() => false);\n\n /**\n * Automatically selects an item when the list is first rendered.\n *\n * Forwarded to the inner `ListComponent`. The selection logic runs once after the\n * initial query result is displayed and follows this priority:\n * 1. The first non-disabled item that already carries the `selected` attribute.\n * 2. If no such item exists and `autoSelect` is `true`, the item at index 0.\n *\n * Accepts any truthy string in addition to a real boolean so it can be set as a\n * plain HTML attribute: `<yuv-query-list autoSelect>`.\n *\n * @default false\n */\n autoSelect = input<boolean, BooleanInput>(false, {\n transform: (value: BooleanInput) => coerceBooleanProperty(value)\n });\n\n /**\n * Emits the current selection as an array of zero-based item indices whenever\n * the selection changes — via click, drag, keyboard, or programmatic API calls.\n *\n * An empty array signals that the selection has been cleared.\n */\n itemSelect = output<number[]>();\n\n /**\n * Emits the live selection indices while the user is actively dragging to select.\n *\n * Fires continuously during a drag operation (before the drag is released), allowing\n * the parent to show a live preview of what will be selected. Once the drag ends,\n * `itemSelect` fires with the final committed selection.\n */\n dragSelectChange = output<number[]>();\n\n /**\n * Emits the zero-based index of an item when it is double-clicked.\n *\n * The inner list operates with `selfHandleClick` mode when double-click is active,\n * so single clicks do not immediately trigger `itemSelect`. The parent should listen\n * to both `itemSelect` (for single-click selection) and this event (for double-click\n * actions like opening a detail view).\n */\n itemDoubleClick = output<number>();\n\n /**\n * Emits once per query execution when the search result arrives, providing the total\n * count of matching items and the raw result page.\n *\n * Use this to update external counters, breadcrumbs, or analytics — without having to\n * execute a separate count query. Note that `totalCount` reflects the server-side total,\n * not just the number of items on the current page.\n */\n queryResult = output<{ totalCount: number; items: SearchResultItem[] }>();\n\n /**\n * Number of items to request per page from the search service.\n *\n * Controls the `size` parameter of each search request. When the total result count\n * exceeds this value, pagination controls are shown and the user can navigate between\n * pages via `changePage()` / `goToPage()`.\n *\n * Resolution order (see `effectivePageSize`): explicit `pageSize` input takes precedence,\n * otherwise `(query as SearchQuery).size` is used if set, otherwise\n * `SearchService.DEFAULT_QUERY_SIZE` is used.\n */\n pageSize = input<number | undefined>(undefined);\n\n /**\n * Enables mouse drag-to-select on list items.\n *\n * When `true` and `multiselect` is also `true`, the user can click and drag across\n * items to select a range without holding Shift. Powered by `DragSelectDirective`.\n * Automatically disabled on touch devices regardless of this input value.\n *\n * @default true\n */\n enableDragSelect = input<boolean>(true);\n\n /**\n * Enables multi-selection mode.\n *\n * When `true`, the user can hold **Shift** or **Ctrl** to extend or toggle the\n * selection, and drag-to-select becomes available (if `enableDragSelect` is also\n * `true`). Forwarded to the inner `ListComponent`.\n *\n * @default false\n */\n multiselect = input<boolean>(false);\n\n /**\n * Delegates visual selection and focus state rendering to the parent component.\n *\n * When `false` (default), `yuv-list` applies CSS classes for selected and active\n * states automatically. When `true`, those signals are still updated but the host\n * receives the `self-handle-selection` CSS class, allowing the parent to apply\n * its own visual treatment. Forwarded to the inner `ListComponent`.\n *\n * @default false\n */\n selfHandleSelection = input<boolean>(false);\n\n /**\n * Whether to include permission information in CMIS search results.\n * When `true`, the third parameter of `searchCmis()` is set,\n * causing the backend to return permission data alongside each item.\n *\n * @default false\n */\n includePermissions = input<boolean>(false);\n\n //#endregion\n\n //#region Properties\n\n /**\n * Whether the current device has touch input enabled.\n *\n * Sourced from `DeviceService`. Used in the template to conditionally disable\n * drag-to-select, which is not suitable for touch interactions.\n */\n isTouchDevice = this.#device.isTouchEnabled;\n\n /**\n * Number of drop-in items currently prepended to the result list.\n *\n * Derived from the internal `#dropInItems` signal. Exposed publicly so the template\n * and parent components can easily check whether any temporary items are present\n * (e.g. to show a visual indicator or adjust layout) without accessing internal state.\n */\n dropInSize = computed(() => this.#dropInItems().length);\n\n /**\n * Resolved page size used by both the `mat-paginator` and every server request.\n *\n * Falls back through three sources, in order:\n * 1. The explicit `pageSize` input, when the consumer has provided one.\n * 2. `(query as SearchQuery).size`, when the query is a `SearchQuery` object that\n * already declares its own page size — keeps server response and paginator in\n * sync when the consumer only configures the query.\n * 3. `SearchService.DEFAULT_QUERY_SIZE` as the final default.\n *\n * Used internally to avoid the bug where `mat-paginator` and the server pageination\n * use different page sizes (paginator showing e.g. \"1-25 of 43\" while `getPage()`\n * asks the server for skip=50 — landing on an empty page).\n */\n effectivePageSize = computed<number>(() => {\n const inputSize = this.pageSize();\n if (inputSize !== undefined) return inputSize;\n const query = this.query();\n if (query && typeof query !== 'string' && query.size) return query.size;\n return SearchService.DEFAULT_QUERY_SIZE;\n });\n\n /**\n * The final list of items rendered by the template.\n *\n * Computed from three sources, merged in this order:\n * 1. **Drop-in items** (`#dropInItems`) — temporary items prepended to the list,\n * e.g. newly created objects that should appear before they match the query.\n * 2. **Transformed query results** — raw `SearchResultItem[]` passed through the\n * optional `transformer` function (or cast directly to `T[]` if none is provided).\n * 3. **Optimistic updates** (`#listItemUpdates`) — per-index overrides applied on top\n * of the merged list, allowing individual items to be patched without re-fetching.\n *\n * Re-evaluates automatically whenever any of the three sources change.\n */\n resultItems = computed<T[]>(() => {\n const items = this.#items();\n const updates = this.#listItemUpdates();\n const transformer = this.transformer();\n const transformedResult = transformer ? transformer(items) : (items as unknown as T[]);\n const dropIns = this.#dropInItems();\n\n let merged: T[];\n const idProp = this.idProperty();\n\n if (dropIns.length > 0 && idProp) {\n // Deduplicate: filter out server results that already appear as drop-in items\n const dropInIds = new Set(dropIns.map((item) => (item as Record<string, unknown>)[idProp]));\n const filtered = transformedResult.filter((item) => !dropInIds.has((item as Record<string, unknown>)[idProp]));\n merged = [...dropIns, ...filtered];\n } else {\n merged = [...dropIns, ...transformedResult];\n }\n\n // apply updates to transformed result\n Object.keys(updates).forEach((index) => {\n merged[Number(index)] = updates[Number(index)];\n });\n return merged;\n });\n\n /**\n * Object IDs of the currently selected rows — the id-based source of truth for the\n * visual selection.\n *\n * The inner list tracks selection by positional index, which becomes meaningless the\n * moment a re-query reorders or replaces the rendered rows (the `@for` reuses/recreates\n * the projected item directives, so index-based visual state points at the wrong — or\n * detached — directives). When `idProperty` is set, the inner list is switched into\n * `selfHandleSelection` mode and each row's `[selected]` is bound to this set instead, so\n * Angular re-applies the correct selection by ID on every render — a multi-selection then\n * survives sort, page changes, and refreshes. Kept in sync from every committed selection\n * via `onInnerItemSelect()`.\n */\n selectedIds = signal<Set<string>>(new Set<string>());\n\n /** Whether this component drives the inner list's selection visuals via each row's id-based\n * `[selected]` binding (and thus the inner list should not write them imperatively). Enabled\n * whenever an `idProperty` is configured — the prerequisite for id-based selection. */\n idSelection = computed<boolean>(() => !!this.idProperty());\n\n /**\n * Indicates whether a search request is currently in flight.\n *\n * Set to `true` immediately before a query or page request is dispatched to the\n * search service, and back to `false` once the response (or error) arrives.\n * Bind this to a loading indicator or `BusyOverlayDirective` in the parent template:\n * ```html\n * <yuv-query-list #qList ...>...</yuv-query-list>\n * <yuv-busy-overlay [active]=\"qList.busy()\" />\n * ```\n */\n busy = signal<boolean>(false);\n\n #items = signal<SearchResultItem[]>([]);\n\n #dropInItems = signal<T[]>([]);\n\n #listItemUpdates = signal<Record<number, T>>({});\n\n //#endregion\n\n constructor() {\n effect(this.#executeQueryEffect);\n effect(this.#resyncSelectionEffect);\n }\n\n //#region UI Methods\n\n /** Resolves the tracking key for a result item in the `@for` loop. */\n trackItem(item: T, index: number): unknown {\n const prop = this.idProperty();\n return prop ? (item as Record<string, unknown>)[prop] : index;\n }\n\n /**\n * Whether the given row is part of the current selection, resolved by ID.\n *\n * Bound to each row's `[selected]` in the template so the visual selection is driven by\n * {@link selectedIds} (id-based) rather than the inner list's positional state. This is\n * what makes a multi-selection survive a re-query/reorder.\n */\n isRowSelected(item: T): boolean {\n const id = this.#idOf(item);\n return id !== undefined && this.selectedIds().has(id);\n }\n\n /**\n * Choke point for every committed selection emitted by the inner list.\n *\n * Translates the positional indices into object IDs against the currently rendered\n * `resultItems()` and stores them in {@link selectedIds}, then re-emits the original\n * indices via `itemSelect` so existing consumers are unaffected. Keeping the id set in\n * sync here (rather than in each caller) means clicks, keyboard, drag-select, and\n * programmatic selection all feed the same source of truth. A no-op passthrough when no\n * `idProperty` is configured (the inner list then owns the visual selection as before).\n */\n onInnerItemSelect(indices: number[]): void {\n if (this.idProperty()) {\n const items = this.resultItems();\n const ids = new Set<string>();\n indices.forEach((i) => {\n const id = items[i] === undefined ? undefined : this.#idOf(items[i]);\n if (id !== undefined) ids.add(id);\n });\n this.selectedIds.set(ids);\n }\n this.itemSelect.emit(indices);\n }\n\n /**\n * Handles a single click on a list item.\n *\n * Forwards the click to the inner `ListComponent` with the correct Shift/Ctrl modifier\n * flags so range- and toggle-selection work correctly. Also transfers DOM focus to the\n * list host so subsequent keyboard navigation works without an additional Tab press.\n *\n * Called from the template via `(click)` on each item wrapper. Not intended for\n * external callers — use `select()` instead.\n *\n * @param idx Zero-based index of the clicked item.\n * @param event The originating mouse event (provides `shiftKey` and `ctrlKey` flags).\n */\n onItemClick(idx: number, event: MouseEvent): void {\n this.list().select(idx, event.shiftKey, event.ctrlKey);\n this.list().focus();\n }\n\n /**\n * Handles a double-click on a list item.\n *\n * Emits the `itemDoubleClick` output with the item's index. The parent can use this\n * to trigger a secondary action (e.g. opening a detail panel or navigating to a route)\n * that is distinct from the primary single-click selection.\n *\n * When a modifier key (Ctrl/Shift/Meta) is held, the double-click is instead treated as a\n * selection gesture: while the user is rapidly building a multi-selection, two quick clicks\n * on the same row are easily coalesced by the browser into a `dblclick`. Emitting the\n * double-click action then would navigate away / open a preview and tear down the whole\n * multi-selection. So we toggle selection for that item and suppress the double-click action.\n *\n * Called from the template via `ClickDoubleDirective`. Not intended for external callers.\n *\n * @param idx Zero-based index of the double-clicked item.\n * @param event The originating mouse event; its modifier flags decide open-vs-select.\n */\n onItemDoubleClick(idx: number, event: MouseEvent): void {\n if (event.ctrlKey || event.shiftKey || event.metaKey) {\n this.list().select(idx, event.shiftKey, event.ctrlKey);\n this.list().focus();\n return;\n }\n this.itemDoubleClick.emit(idx);\n }\n\n /**\n * Handles intermediate drag-selection changes from `DragSelectDirective`.\n *\n * Fires continuously while the user is dragging across items. Updates the inner list's\n * multi-selection state in real time so items are highlighted as the drag progresses,\n * and also emits `dragSelectChange` so the parent can show a live preview.\n *\n * Called from the template via `(dragSelectChange)` on the drag-select host.\n * Not intended for external callers.\n *\n * @param sel Current array of zero-based indices covered by the drag gesture.\n */\n onDragSelectChange(sel: number[]): void {\n this.list().multiSelect(sel);\n this.dragSelectChange.emit(sel);\n }\n\n /**\n * Handles the final committed drag-selection from `DragSelectDirective`.\n *\n * Called when the user releases the mouse after a drag-to-select gesture. Transfers\n * DOM focus to the list (so keyboard navigation works immediately after) and emits\n * the final selection via `itemSelect`.\n *\n * Called from the template via `(dragSelect)` on the drag-select host.\n * Not intended for external callers.\n *\n * @param sel Final array of zero-based indices selected by the drag gesture.\n */\n onDragSelect(sel: number[]): void {\n this.list().focus();\n this.onInnerItemSelect(sel);\n }\n\n //#endregion\n\n //#region Public methods\n\n /**\n * Applies optimistic per-item overrides on top of the current query result.\n *\n * Each entry in the `updates` array patches the item at the given `index` with\n * the provided `value`. The value type must match `T` — i.e. the shape produced\n * by the `transformer` function, or `SearchResultItem` if no transformer is used.\n *\n * Overrides accumulate: calling this method multiple times merges the new entries\n * with any previously applied ones. All overrides are automatically discarded when\n * the user navigates to a different page (see `goToPage()`), since a fresh server\n * response replaces the local data.\n *\n * **Use case:** apply instant visual feedback after a user action (rename, status\n * change, etc.) without waiting for a full query refresh.\n *\n * @param updates Array of `{ index, value }` pairs describing which items to patch.\n */\n updateListItems(updates: { index: number; value: T }[]): void {\n const updatesRecord = updates.reduce(\n (acc, curr) => {\n {\n acc[curr.index] = curr.value;\n return acc;\n }\n },\n {} as Record<number, T>\n );\n this.#listItemUpdates.set({ ...this.#listItemUpdates(), ...updatesRecord });\n }\n\n /**\n * Prepends a set of temporary items to the top of the result list.\n *\n * Drop-in items appear before all query results and are visually distinguished\n * by the template (e.g. a highlighted background). They participate in selection\n * and drag-to-select exactly like regular items.\n *\n * The existing selection indices are automatically shifted by `items.length` so that\n * the currently selected query-result items remain selected after the prepend.\n *\n * **Typical use case:** when the user pastes or creates an object that does not yet\n * appear in the current query (e.g. because the index has not been updated), drop it\n * in temporarily so the user sees it immediately without a full refresh.\n *\n * Drop-in items are cleared automatically when the user navigates to a different page.\n * Call `dropItems([])` to remove them programmatically.\n *\n * @param items Items to prepend. Must be of type `T` (same as query result items).\n * @param scrollTo Whether to smooth-scroll the list back to the top after prepending.\n * Defaults to `true` so the newly dropped items are immediately visible.\n */\n dropItems(items: T[], scrollTo = true): void {\n this.#dropInItems.set(items);\n this.list().shiftSelectionBy(items.length);\n if (scrollTo) {\n this.list().scrollToTop();\n }\n }\n\n /**\n * Surgically removes specific items from the drop-in set by their stable IDs.\n *\n * Filters `#dropInItems` to drop any entry whose `idProperty` value is in `ids`,\n * leaving the remaining drop-ins (and the rest of the result list) untouched.\n * The structural shift is handled by the rendering pipeline — `resultItems`\n * recomputes automatically, and the leading `drop-in` class follows the new\n * (smaller) `dropInSize()`.\n *\n * This method intentionally does **not** mutate the inner list's selection\n * state. The caller (typically `TileListComponent.removeDropItems`) is in a\n * better position to decide whether to clear, shift, or preserve selection,\n * because it tracks selection at a higher level by stable object identity.\n *\n * Requires `idProperty` to be set — without it items cannot be identified\n * and the call is a no-op (returns 0).\n *\n * **Typical use case:** an upstream deletion (e.g. `DmsService.deleteDmsObject`)\n * removed an object that is currently rendered as a drop-in. Without removing\n * it from `#dropInItems`, the deleted tile would remain visible after `refresh()`\n * because the framework treats drop-ins as authoritative and prepends them to\n * every refreshed result set.\n *\n * @param ids Array of ID values (as resolved via `idProperty`) to remove.\n * @returns Number of items that were actually removed from the drop-in set.\n */\n removeDropItems(ids: string[]): number {\n if (ids.length === 0) return 0;\n const idProp = this.idProperty();\n if (!idProp) return 0;\n const removeSet = new Set<string>(ids);\n const before = this.#dropInItems();\n const after = before.filter((item) => !removeSet.has((item as Record<string, unknown>)[idProp] as string));\n const removedCount = before.length - after.length;\n if (removedCount === 0) return 0;\n this.#dropInItems.set(after);\n return removedCount;\n }\n\n /**\n * Programmatically replaces the entire selection with the given indices.\n *\n * Only effective when `multiselect` is `true`. Out-of-range indices are silently\n * discarded. The resulting selection is sorted ascending before being applied.\n *\n * Use this when the parent needs to restore a previously saved multi-selection\n * state, e.g. after navigation or component re-initialization.\n *\n * @param index Array of zero-based item indices to select.\n */\n multiSelect(index: number[]): void {\n this.list().multiSelect(index);\n }\n\n /**\n * Selects the item at the given zero-based index.\n *\n * Delegates to the inner `ListComponent`. The `preventChangeUntil` guard and\n * `disableSelection` state are respected. Clamps the index to the valid range.\n *\n * @param index Zero-based index of the item to select.\n */\n select(index: number): void {\n this.list().select(index);\n }\n\n /**\n * Moves keyboard focus to the item at the given index and selects it.\n *\n * Combines focus management and selection in one call, and transfers DOM focus\n * to the list host. Use this when the parent wants to programmatically drive\n * both the visual focus indicator and the selection simultaneously.\n *\n * @param index Zero-based index of the item to activate.\n */\n setActiveItem(index: number): void {\n this.list().setActiveItem(index);\n }\n\n /**\n * Clears the current selection and resets the active keyboard-focus index.\n *\n * If the selection is already empty, the method is a no-op. The `preventChangeUntil`\n * guard is respected — if the guard returns `true`, the clear is blocked.\n *\n * @param silent When `true`, skips emitting `itemSelect` after clearing. Use this\n * when the parent needs to reset state programmatically without\n * triggering downstream reactions.\n */\n clear(silent = false): void {\n this.list().clear(silent);\n }\n\n /**\n * Re-executes the current query without changing the page or query parameters.\n *\n * If pagination is active, re-fetches the same page the user is currently on.\n * If no pagination is active, re-runs the original query from scratch.\n *\n * Use this to reflect server-side changes (e.g. after a create/delete operation)\n * without navigating away from the current view.\n */\n refresh(): void {\n const query = this.query();\n if (query) {\n if (this.pagination()) {\n this.goToPage(this.pagination()!.page);\n } else this.#executeQuery(query || null);\n }\n }\n\n /**\n * Forces the `transformer` function to be re-applied to the current result set.\n *\n * Normally the transformer runs automatically whenever the underlying `#items`\n * signal changes. Use this method when the transformer itself has external\n * dependencies that changed (e.g. a locale or display-format setting) but the\n * raw search result did not — triggering a re-evaluation by creating a new array\n * reference for `#items` without fetching from the server again.\n */\n runTransformerAgain(): void {\n this.#items.set([...this.#items()]);\n }\n\n /**\n * Handles a page-change event emitted by the `mat-paginator`.\n *\n * Converts the zero-based `pageEvent.pageIndex` to the one-based page number\n * expected by `goToPage()` and delegates the request.\n *\n * Bound to `(page)` on the `mat-paginator` in the template.\n *\n * @param pageEvent The pagination event emitted by `MatPaginatorModule`.\n */\n changePage(pageEvent: PageEvent): void {\n this.#dropInItems.set([]);\n this.goToPage(pageEvent.pageIndex + 1);\n }\n\n /**\n * Fetches and displays the given page of the current query result.\n *\n * Sets `busy` to `true` for the duration of the request. On success, updates\n * the pagination state, clears all optimistic overrides (they are page-scoped),\n * and replaces `#items` with the new page's results.\n *\n * Also used internally by `refresh()` to reload the currently active page.\n *\n * @param page One-based page number to navigate to.\n */\n goToPage(page: number): void {\n const query = this.query();\n if (!query) return;\n this.busy.set(true);\n this.#searchService.getPage(query, page, this.effectivePageSize(), this.includePermissions()).subscribe({\n next: (res: SearchResult) => {\n this.#setupPagination(res);\n this.#listItemUpdates.set({});\n this.#items.set(res.items);\n this.queryResult.emit({ totalCount: res.totalNumItems, items: res.items });\n this.busy.set(false);\n },\n error: (err) => {\n // TODO: how should errors be handles in case hat loading pages fail\n this.busy.set(false);\n console.error(err);\n }\n });\n }\n\n //#endregion\n\n //#region Utilities\n\n /** Reads the configured id property off a result item, or `undefined` if not set. */\n #idOf(item: T): string | undefined {\n const prop = this.idProperty();\n if (!prop) return undefined;\n const value = (item as Record<string, unknown>)[prop];\n return value == null ? undefined : String(value);\n }\n\n /**\n * Executes a search query.\n * @param query The search query to execute.\n * This may be a SearchQuery object or a string. If it's a string, it is supposed to\n * be a CMIS query statement.\n */\n #executeQuery(query: SearchQuery | string | null): void {\n if (query && !this.busy()) {\n this.busy.set(true);\n const size = this.effectivePageSize();\n (typeof query === 'string'\n ? this.#searchService.searchCmis(query, size, this.includePermissions())\n : this.#searchService.search({ ...query, size })\n ).subscribe({\n next: (res: SearchResult) => {\n this.#setupPagination(res);\n this.#listItemUpdates.set({});\n this.#items.set(res.items);\n this.queryResult.emit({ totalCount: res.totalNumItems, items: res.items });\n this.busy.set(false);\n },\n error: (err) => {\n this.busy.set(false);\n console.error(err);\n }\n });\n }\n }\n\n #setupPagination(searchResult: SearchResult): void {\n this.pagination.set(\n searchResult.paging\n ? {\n total: searchResult.totalNumItems,\n pages: searchResult.paging.totalPages,\n page: searchResult.paging.page\n }\n : undefined\n );\n }\n\n //#endregion\n\n //#region Effects\n\n readonly #executeQueryEffect = (): void => {\n // execute the query each time it changes\n const query = this.query();\n if (query)\n untracked(() => {\n this.#executeQuery(query || null);\n });\n };\n\n /**\n * Keeps the inner list's positional selection aligned with the id-based {@link selectedIds}\n * after every re-query.\n *\n * The visual selection is driven by ID via each row's `[selected]` binding, but the inner\n * list still computes ctrl/shift range math against positional indices. After a re-query\n * reorders or replaces the rows, those indices are stale, so a subsequent ctrl/shift click\n * would operate on the wrong items. Here we re-map the surviving selected IDs to their new\n * indices and push them back into the inner list so interaction stays correct. `selectedIds`\n * is read untracked so this only runs when `resultItems` actually changes (a real re-query),\n * never on ordinary selection changes.\n */\n readonly #resyncSelectionEffect = (): void => {\n const items = this.resultItems();\n if (!this.idProperty()) return;\n const ids = untracked(() => this.selectedIds());\n if (ids.size === 0) return;\n const indices: number[] = [];\n items.forEach((item, i) => {\n const id = this.#idOf(item);\n if (id !== undefined && ids.has(id)) indices.push(i);\n });\n untracked(() => {\n try {\n this.list().multiSelect(indices);\n } catch {\n // inner list not ready yet — the next resultItems emission will reconcile\n }\n });\n };\n\n //#endregion\n}\n","<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [externalSelectionVisuals]=\"idSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"onInnerItemSelect($event)\"\n>\n @for (resultItem of resultItems(); track trackItem(resultItem, $index)) {\n <div\n yuvListItem\n yuvDragSelectItem\n [selected]=\"isRowSelected(resultItem)\"\n [class.drop-in]=\"$index < dropInSize()\"\n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: resultItem, index: $index }\" />\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\" />\n }\n</yuv-list>\n@if (pagination(); as pag) {\n <mat-paginator\n class=\"paginator\"\n [length]=\"pag.total\"\n [pageSize]=\"effectivePageSize()\"\n (page)=\"changePage($event)\"\n hidePageSize\n />\n}\n","import { NgModule } from '@angular/core';\nimport { QueryListComponent } from './query-list.component';\n\nconst cmp = [QueryListComponent];\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YuvQueryListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErJpE,MAAM,GAAG,GAAG,CAAC,kBAAkB,CAAC;MAKnB,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,OAAA,EAAA,CALlB,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAAlB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAKlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHpB,GAAG,CAAA,EAAA,CAAA,CAAA;;4FAGD,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,GAAG;AACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"yuuvis-client-framework-query-list.mjs","sources":["../../../../../libs/yuuvis/client-framework/query-list/src/lib/query-list.component.ts","../../../../../libs/yuuvis/client-framework/query-list/src/lib/query-list.component.html","../../../../../libs/yuuvis/client-framework/query-list/src/lib/query-list.module.ts","../../../../../libs/yuuvis/client-framework/query-list/src/yuuvis-client-framework-query-list.ts"],"sourcesContent":["import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatPaginator, MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { SearchQuery, SearchResult, SearchResultItem, SearchService } from '@yuuvis/client-core';\nimport { ClickDoubleDirective, DragSelectDirective, DragSelectItemDirective } from '@yuuvis/client-framework/common';\nimport { ListComponent, YuvListModule } from '@yuuvis/client-framework/list';\nimport { Pagination } from '@yuuvis/client-framework/pagination';\nimport { DeviceService } from '@yuuvis/material';\nimport { catchError, defer, EMPTY, finalize, map, Observable, Subject, switchMap } from 'rxjs';\n\n/**\n * One search the list runs: `page` is `null` for a query loaded from its first page, otherwise the\n * one-based page to load. `clearDropIns` marks a page change on the paginator: the drop-in items go\n * once its page is shown.\n */\ninterface QueryListRequest {\n query: SearchQuery | string;\n page: number | null;\n clearDropIns?: boolean;\n}\n\n/**\n * Query-driven list component that executes a search query and renders the results\n * using a consumer-provided item template.\n *\n * The component is a thin orchestration layer on top of `yuv-list`: it handles the\n * full query lifecycle (executing, paginating, refreshing), exposes a typed result\n * set via the optional `transformer` input, and delegates all keyboard navigation,\n * selection, and accessibility concerns to the inner `ListComponent`.\n *\n * **Key Features:**\n * - Accepts a `SearchQuery` object or a raw CMIS query string\n * - Optional `transformer` function maps raw `SearchResultItem[]` to any custom type `T`\n * - Built-in server-side pagination via Angular Material `mat-paginator`\n * - Multi-selection with mouse drag (`DragSelectDirective`) and keyboard modifiers\n * - \"Drop-in\" items prepended to the result set for optimistic UI updates\n * - Busy state signal for loading indicators\n * - Exposes a slim imperative API (`select`, `clear`, `refresh`, `goToPage`, …)\n * so parents can drive the list programmatically\n *\n * **Content Projection Slots:**\n * - `#yuvQueryListItem` — required; `ng-template` used to render each result item.\n * Receives the (optionally transformed) item as `$implicit`.\n * - `#yuvQueryListEmpty` — optional; `ng-template` shown when the result set is empty.\n *\n * **Basic usage:**\n * ```html\n * <yuv-query-list [query]=\"query\" (itemSelect)=\"onSelect($event)\">\n * <ng-template #yuvQueryListItem let-item>\n * <span>{{ item.title }}</span>\n * </ng-template>\n * </yuv-query-list>\n * ```\n *\n * **With transformer and empty state:**\n * ```html\n * <yuv-query-list [query]=\"query\" [transformer]=\"toViewModel\" (itemSelect)=\"onSelect($event)\">\n * <ng-template #yuvQueryListItem let-item>\n * <yuv-list-tile>\n * <ng-template #titleSlot>{{ item.title }}</ng-template>\n * <ng-template #descriptionSlot>{{ item.modified }}</ng-template>\n * </yuv-list-tile>\n * </ng-template>\n * <ng-template #yuvQueryListEmpty>\n * <p>No results found.</p>\n * </ng-template>\n * </yuv-query-list>\n * ```\n *\n * ```ts\n * toViewModel = (items: SearchResultItem[]) =>\n * items.map(item => ({\n * title: item.fields.get(BaseObjectTypeField.OBJECT_ID),\n * modified: item.fields.get(BaseObjectTypeField.MODIFICATION_DATE)\n * }));\n * ```\n *\n * @typeParam T The shape of each item after the optional `transformer` is applied.\n * Defaults to `any` when no transformer is provided.\n */\n@Component({\n selector: 'yuv-query-list',\n imports: [\n CommonModule,\n YuvListModule,\n ClickDoubleDirective,\n DragSelectDirective,\n DragSelectItemDirective,\n MatPaginatorModule\n ],\n templateUrl: './query-list.component.html',\n styleUrl: './query-list.component.scss',\n host: { '[class.pagination]': '!!pagination()' },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class QueryListComponent<T = any> {\n //#region Dependencies\n\n #device = inject(DeviceService);\n #searchService = inject(SearchService);\n\n //#endregion\n\n //#region Angular stuff\n\n /**\n * Current pagination state. Set to a `Pagination` object when the last query\n * result contained multiple pages; `undefined` when all results fit on one page\n * or no query has been executed yet.\n *\n * Drives the `[class.pagination]` host binding so the template can conditionally\n * render the `mat-paginator` footer.\n */\n pagination = signal<Pagination | undefined>(undefined);\n\n /**\n * Reference to the inner `ListComponent` instance.\n *\n * Used internally to delegate imperative operations (select, clear, focus, …).\n * Can also be accessed from the parent via a `@ViewChild` on `yuv-query-list` if\n * fine-grained control over the inner list is needed, though the public API methods\n * on this component are preferred.\n */\n list = viewChild.required<ListComponent>('list');\n\n /**\n * Reference to the `#yuvQueryListItem` `ng-template` projected by the consumer.\n *\n * This template is used to render each individual item in the list. The template\n * receives the (optionally transformed) item as the `$implicit` context variable:\n * ```html\n * <ng-template #yuvQueryListItem let-item>{{ item.title }}</ng-template>\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n itemTemplate = contentChild<TemplateRef<any>>('yuvQueryListItem');\n\n /**\n * Reference to the optional `#yuvQueryListEmpty` `ng-template` projected by the consumer.\n *\n * When provided, this template is rendered in place of the list whenever the query\n * returns zero items. If omitted, nothing is shown for the empty state.\n * ```html\n * <ng-template #yuvQueryListEmpty>\n * <p>No results found.</p>\n * </ng-template>\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n emptyTemplate = contentChild<TemplateRef<any>>('yuvQueryListEmpty');\n\n /**\n * The search query to execute.\n *\n * Accepts either a structured `SearchQuery` object (field filters, sort orders, etc.)\n * or a raw CMIS query string. The query is re-executed reactively every time this\n * input changes. Set to `null` or `undefined` to stop searching: a request still in\n * flight is cancelled, and the list keeps showing the result it has.\n */\n query = input<SearchQuery | string | null>();\n\n /**\n * Property name on the (transformed) item to use as a stable unique identifier.\n *\n * When provided, the template renderer uses this property for `@for` tracking instead\n * of the item's position index, which preserves DOM nodes and component state when the\n * list is refreshed with partially overlapping results.\n *\n * If omitted, the zero-based index is used as the tracking key.\n *\n * @default null\n */\n idProperty = input<string | null>(null);\n\n /**\n * Optional mapping function applied to the raw `SearchResultItem[]` returned by the\n * search service before the results are rendered.\n *\n * Use this to project only the fields your template needs, compute derived properties,\n * or convert dates/enums to display-friendly values. The generic type parameter `T`\n * of the component is inferred from the return type of this function.\n *\n * If omitted, raw `SearchResultItem` objects are passed to the item template as-is.\n *\n * @example\n * ```ts\n * transformer = (items: SearchResultItem[]) =>\n * items.map(item => ({\n * id: item.fields.get(BaseObjectTypeField.OBJECT_ID) as string,\n * title: item.fields.get('cm:name') as string\n * }));\n * ```\n */\n transformer = input<((items: SearchResultItem[]) => T[]) | null>();\n\n /**\n * Guard function that temporarily blocks all selection changes.\n *\n * Forwarded directly to the inner `ListComponent`. As long as the returned predicate\n * evaluates to `true`, any attempt to change the selection — via click, keyboard, or\n * the programmatic API — is silently ignored. Useful when the parent has unsaved\n * changes tied to the current selection and needs to prevent the user from\n * accidentally navigating away.\n *\n * @default () => false (never prevents)\n */\n preventChangeUntil = input<() => boolean>(() => false);\n\n /**\n * Automatically selects an item when the list is first rendered.\n *\n * Forwarded to the inner `ListComponent`. The selection logic runs once after the\n * initial query result is displayed and follows this priority:\n * 1. The first non-disabled item that already carries the `selected` attribute.\n * 2. If no such item exists and `autoSelect` is `true`, the item at index 0.\n *\n * Accepts any truthy string in addition to a real boolean so it can be set as a\n * plain HTML attribute: `<yuv-query-list autoSelect>`.\n *\n * @default false\n */\n autoSelect = input<boolean, BooleanInput>(false, {\n transform: (value: BooleanInput) => coerceBooleanProperty(value)\n });\n\n /**\n * Emits the current selection as an array of zero-based item indices whenever\n * the selection changes — via click, drag, keyboard, or programmatic API calls.\n *\n * An empty array signals that the selection has been cleared.\n */\n itemSelect = output<number[]>();\n\n /**\n * Emits the live selection indices while the user is actively dragging to select.\n *\n * Fires continuously during a drag operation (before the drag is released), allowing\n * the parent to show a live preview of what will be selected. Once the drag ends,\n * `itemSelect` fires with the final committed selection.\n */\n dragSelectChange = output<number[]>();\n\n /**\n * Emits the zero-based index of an item when it is double-clicked.\n *\n * The inner list operates with `selfHandleClick` mode when double-click is active,\n * so single clicks do not immediately trigger `itemSelect`. The parent should listen\n * to both `itemSelect` (for single-click selection) and this event (for double-click\n * actions like opening a detail view).\n */\n itemDoubleClick = output<number>();\n\n /**\n * Emits once per query execution when the search result arrives, providing the total\n * count of matching items and the raw result page.\n *\n * Use this to update external counters, breadcrumbs, or analytics — without having to\n * execute a separate count query. Note that `totalCount` reflects the server-side total,\n * not just the number of items on the current page.\n */\n queryResult = output<{ totalCount: number; items: SearchResultItem[] }>();\n\n /**\n * Number of items to request per page from the search service.\n *\n * Controls the `size` parameter of each search request. When the total result count\n * exceeds this value, pagination controls are shown and the user can navigate between\n * pages via `changePage()` / `goToPage()`.\n *\n * Resolution order (see `effectivePageSize`): explicit `pageSize` input takes precedence,\n * otherwise `(query as SearchQuery).size` is used if set, otherwise\n * `SearchService.DEFAULT_QUERY_SIZE` is used.\n */\n pageSize = input<number | undefined>(undefined);\n\n /**\n * Enables mouse drag-to-select on list items.\n *\n * When `true` and `multiselect` is also `true`, the user can click and drag across\n * items to select a range without holding Shift. Powered by `DragSelectDirective`.\n * Automatically disabled on touch devices regardless of this input value.\n *\n * @default true\n */\n enableDragSelect = input<boolean>(true);\n\n /**\n * Enables multi-selection mode.\n *\n * When `true`, the user can hold **Shift** or **Ctrl** to extend or toggle the\n * selection, and drag-to-select becomes available (if `enableDragSelect` is also\n * `true`). Forwarded to the inner `ListComponent`.\n *\n * @default false\n */\n multiselect = input<boolean>(false);\n\n /**\n * Delegates visual selection and focus state rendering to the parent component.\n *\n * When `false` (default), `yuv-list` applies CSS classes for selected and active\n * states automatically. When `true`, those signals are still updated but the host\n * receives the `self-handle-selection` CSS class, allowing the parent to apply\n * its own visual treatment. Forwarded to the inner `ListComponent`.\n *\n * @default false\n */\n selfHandleSelection = input<boolean>(false);\n\n /**\n * Whether to include permission information in CMIS search results.\n * When `true`, the third parameter of `searchCmis()` is set,\n * causing the backend to return permission data alongside each item.\n *\n * @default false\n */\n includePermissions = input<boolean>(false);\n\n //#endregion\n\n //#region Properties\n\n /**\n * Whether the current device has touch input enabled.\n *\n * Sourced from `DeviceService`. Used in the template to conditionally disable\n * drag-to-select, which is not suitable for touch interactions.\n */\n isTouchDevice = this.#device.isTouchEnabled;\n\n /**\n * Number of drop-in items currently prepended to the result list.\n *\n * Derived from the internal `#dropInItems` signal. Exposed publicly so the template\n * and parent components can easily check whether any temporary items are present\n * (e.g. to show a visual indicator or adjust layout) without accessing internal state.\n */\n dropInSize = computed(() => this.#dropInItems().length);\n\n /**\n * Resolved page size used by both the `mat-paginator` and every server request.\n *\n * Falls back through three sources, in order:\n * 1. The explicit `pageSize` input, when the consumer has provided one.\n * 2. `(query as SearchQuery).size`, when the query is a `SearchQuery` object that\n * already declares its own page size — keeps server response and paginator in\n * sync when the consumer only configures the query.\n * 3. `SearchService.DEFAULT_QUERY_SIZE` as the final default.\n *\n * Used internally to avoid the bug where `mat-paginator` and the server pageination\n * use different page sizes (paginator showing e.g. \"1-25 of 43\" while `getPage()`\n * asks the server for skip=50 — landing on an empty page).\n */\n effectivePageSize = computed<number>(() => {\n const inputSize = this.pageSize();\n if (inputSize !== undefined) return inputSize;\n const query = this.query();\n if (query && typeof query !== 'string' && query.size) return query.size;\n return SearchService.DEFAULT_QUERY_SIZE;\n });\n\n /**\n * The final list of items rendered by the template.\n *\n * Computed from three sources, merged in this order:\n * 1. **Drop-in items** (`#dropInItems`) — temporary items prepended to the list,\n * e.g. newly created objects that should appear before they match the query.\n * 2. **Transformed query results** — raw `SearchResultItem[]` passed through the\n * optional `transformer` function (or cast directly to `T[]` if none is provided).\n * 3. **Optimistic updates** (`#listItemUpdates`) — per-index overrides applied on top\n * of the merged list, allowing individual items to be patched without re-fetching.\n *\n * Re-evaluates automatically whenever any of the three sources change.\n */\n resultItems = computed<T[]>(() => {\n const items = this.#items();\n const updates = this.#listItemUpdates();\n const transformer = this.transformer();\n const transformedResult = transformer ? transformer(items) : (items as unknown as T[]);\n const dropIns = this.#dropInItems();\n\n let merged: T[];\n const idProp = this.idProperty();\n\n if (dropIns.length > 0 && idProp) {\n // Deduplicate: filter out server results that already appear as drop-in items\n const dropInIds = new Set(dropIns.map((item) => (item as Record<string, unknown>)[idProp]));\n const filtered = transformedResult.filter((item) => !dropInIds.has((item as Record<string, unknown>)[idProp]));\n merged = [...dropIns, ...filtered];\n } else {\n merged = [...dropIns, ...transformedResult];\n }\n\n // apply updates to transformed result\n Object.keys(updates).forEach((index) => {\n merged[Number(index)] = updates[Number(index)];\n });\n return merged;\n });\n\n /**\n * Object IDs of the currently selected rows — the id-based source of truth for the\n * visual selection.\n *\n * The inner list tracks selection by positional index, which becomes meaningless the\n * moment a re-query reorders or replaces the rendered rows (the `@for` reuses/recreates\n * the projected item directives, so index-based visual state points at the wrong — or\n * detached — directives). When `idProperty` is set, the inner list is switched into\n * `selfHandleSelection` mode and each row's `[selected]` is bound to this set instead, so\n * Angular re-applies the correct selection by ID on every render — a multi-selection then\n * survives sort, page changes, and refreshes. Kept in sync from every committed selection\n * via `onInnerItemSelect()`.\n */\n selectedIds = signal<Set<string>>(new Set<string>());\n\n /** Whether this component drives the inner list's selection visuals via each row's id-based\n * `[selected]` binding (and thus the inner list should not write them imperatively). Enabled\n * whenever an `idProperty` is configured — the prerequisite for id-based selection. */\n idSelection = computed<boolean>(() => !!this.idProperty());\n\n /**\n * Indicates whether a search request is currently in flight.\n *\n * `true` from the moment a query or page request is dispatched to the search service until\n * the latest request settles (response, error or cancellation). A request superseded by a\n * newer one is cancelled, and `busy` stays `true` across that switch. Derived from the request\n * in flight but still writable: a value set from outside holds until the loading state changes.\n * Bind this to a loading indicator or `BusyOverlayDirective` in the parent template:\n * ```html\n * <yuv-query-list #qList ...>...</yuv-query-list>\n * <yuv-busy-overlay [active]=\"qList.busy()\" />\n * ```\n */\n busy = linkedSignal<boolean>(() => this.#pendingRequest() !== null);\n\n // Only there while the result has several pages. TS `private` because a signal query cannot sit\n // on an ES-private field (NG1053).\n private readonly paginator = viewChild(MatPaginator);\n\n #items = signal<SearchResultItem[]>([]);\n\n #dropInItems = signal<T[]>([]);\n\n #listItemUpdates = signal<Record<number, T>>({});\n\n // Every search the list runs — new query, page change, refresh — goes through this one stream, so\n // a newer request cancels the one still in flight instead of racing it, and a late response can\n // never overwrite a newer one (see `#load`). `null` cancels without a new request (see `#cancel`).\n #requests = new Subject<QueryListRequest | null>();\n\n // The request still in flight — `busy` follows it — and the one whose result is on screen: what\n // `refresh()` re-runs.\n #pendingRequest = signal<QueryListRequest | null>(null);\n #shownRequest = signal<QueryListRequest | null>(null);\n\n //#endregion\n\n constructor() {\n effect(this.#executeQueryEffect);\n effect(this.#resyncSelectionEffect);\n this.#requests\n .pipe(\n switchMap((request) => (request ? this.#load(request) : EMPTY)),\n takeUntilDestroyed()\n )\n .subscribe(({ request, result }) => this.#showResult(request, result));\n }\n\n //#region UI Methods\n\n /** Resolves the tracking key for a result item in the `@for` loop. */\n trackItem(item: T, index: number): unknown {\n const prop = this.idProperty();\n return prop ? (item as Record<string, unknown>)[prop] : index;\n }\n\n /**\n * Whether the given row is part of the current selection, resolved by ID.\n *\n * Bound to each row's `[selected]` in the template so the visual selection is driven by\n * {@link selectedIds} (id-based) rather than the inner list's positional state. This is\n * what makes a multi-selection survive a re-query/reorder.\n */\n isRowSelected(item: T): boolean {\n const id = this.#idOf(item);\n return id !== undefined && this.selectedIds().has(id);\n }\n\n /**\n * Choke point for every committed selection emitted by the inner list.\n *\n * Translates the positional indices into object IDs against the currently rendered\n * `resultItems()` and stores them in {@link selectedIds}, then re-emits the original\n * indices via `itemSelect` so existing consumers are unaffected. Keeping the id set in\n * sync here (rather than in each caller) means clicks, keyboard, drag-select, and\n * programmatic selection all feed the same source of truth. A no-op passthrough when no\n * `idProperty` is configured (the inner list then owns the visual selection as before).\n */\n onInnerItemSelect(indices: number[]): void {\n if (this.idProperty()) {\n const items = this.resultItems();\n const ids = new Set<string>();\n indices.forEach((i) => {\n const id = items[i] === undefined ? undefined : this.#idOf(items[i]);\n if (id !== undefined) ids.add(id);\n });\n this.selectedIds.set(ids);\n }\n this.itemSelect.emit(indices);\n }\n\n /**\n * Handles a single click on a list item.\n *\n * Forwards the click to the inner `ListComponent` with the correct Shift/Ctrl modifier\n * flags so range- and toggle-selection work correctly. Also transfers DOM focus to the\n * list host so subsequent keyboard navigation works without an additional Tab press.\n *\n * Called from the template via `(click)` on each item wrapper. Not intended for\n * external callers — use `select()` instead.\n *\n * @param idx Zero-based index of the clicked item.\n * @param event The originating mouse event (provides `shiftKey` and `ctrlKey` flags).\n */\n onItemClick(idx: number, event: MouseEvent): void {\n this.list().select(idx, event.shiftKey, event.ctrlKey);\n this.list().focus();\n }\n\n /**\n * Handles a double-click on a list item.\n *\n * Emits the `itemDoubleClick` output with the item's index. The parent can use this\n * to trigger a secondary action (e.g. opening a detail panel or navigating to a route)\n * that is distinct from the primary single-click selection.\n *\n * When a modifier key (Ctrl/Shift/Meta) is held, the double-click is instead treated as a\n * selection gesture: while the user is rapidly building a multi-selection, two quick clicks\n * on the same row are easily coalesced by the browser into a `dblclick`. Emitting the\n * double-click action then would navigate away / open a preview and tear down the whole\n * multi-selection. So we toggle selection for that item and suppress the double-click action.\n *\n * Called from the template via `ClickDoubleDirective`. Not intended for external callers.\n *\n * @param idx Zero-based index of the double-clicked item.\n * @param event The originating mouse event; its modifier flags decide open-vs-select.\n */\n onItemDoubleClick(idx: number, event: MouseEvent): void {\n if (event.ctrlKey || event.shiftKey || event.metaKey) {\n this.list().select(idx, event.shiftKey, event.ctrlKey);\n this.list().focus();\n return;\n }\n this.itemDoubleClick.emit(idx);\n }\n\n /**\n * Handles intermediate drag-selection changes from `DragSelectDirective`.\n *\n * Fires continuously while the user is dragging across items. Updates the inner list's\n * multi-selection state in real time so items are highlighted as the drag progresses,\n * and also emits `dragSelectChange` so the parent can show a live preview.\n *\n * Called from the template via `(dragSelectChange)` on the drag-select host.\n * Not intended for external callers.\n *\n * @param sel Current array of zero-based indices covered by the drag gesture.\n */\n onDragSelectChange(sel: number[]): void {\n this.list().multiSelect(sel);\n this.dragSelectChange.emit(sel);\n }\n\n /**\n * Handles the final committed drag-selection from `DragSelectDirective`.\n *\n * Called when the user releases the mouse after a drag-to-select gesture. Transfers\n * DOM focus to the list (so keyboard navigation works immediately after) and emits\n * the final selection via `itemSelect`.\n *\n * Called from the template via `(dragSelect)` on the drag-select host.\n * Not intended for external callers.\n *\n * @param sel Final array of zero-based indices selected by the drag gesture.\n */\n onDragSelect(sel: number[]): void {\n this.list().focus();\n this.onInnerItemSelect(sel);\n }\n\n //#endregion\n\n //#region Public methods\n\n /**\n * Applies optimistic per-item overrides on top of the current query result.\n *\n * Each entry in the `updates` array patches the item at the given `index` with\n * the provided `value`. The value type must match `T` — i.e. the shape produced\n * by the `transformer` function, or `SearchResultItem` if no transformer is used.\n *\n * Overrides accumulate: calling this method multiple times merges the new entries\n * with any previously applied ones. All overrides are automatically discarded when\n * the user navigates to a different page (see `goToPage()`), since a fresh server\n * response replaces the local data.\n *\n * **Use case:** apply instant visual feedback after a user action (rename, status\n * change, etc.) without waiting for a full query refresh.\n *\n * @param updates Array of `{ index, value }` pairs describing which items to patch.\n */\n updateListItems(updates: { index: number; value: T }[]): void {\n const updatesRecord = updates.reduce(\n (acc, curr) => {\n {\n acc[curr.index] = curr.value;\n return acc;\n }\n },\n {} as Record<number, T>\n );\n this.#listItemUpdates.set({ ...this.#listItemUpdates(), ...updatesRecord });\n }\n\n /**\n * Prepends a set of temporary items to the top of the result list.\n *\n * Drop-in items appear before all query results and are visually distinguished\n * by the template (e.g. a highlighted background). They participate in selection\n * and drag-to-select exactly like regular items.\n *\n * The existing selection indices are automatically shifted by `items.length` so that\n * the currently selected query-result items remain selected after the prepend.\n *\n * **Typical use case:** when the user pastes or creates an object that does not yet\n * appear in the current query (e.g. because the index has not been updated), drop it\n * in temporarily so the user sees it immediately without a full refresh.\n *\n * Drop-in items are cleared automatically once a page the user navigates to is shown.\n * Call `dropItems([])` to remove them programmatically.\n *\n * @param items Items to prepend. Must be of type `T` (same as query result items).\n * @param scrollTo Whether to smooth-scroll the list back to the top after prepending.\n * Defaults to `true` so the newly dropped items are immediately visible.\n */\n dropItems(items: T[], scrollTo = true): void {\n this.#dropInItems.set(items);\n this.list().shiftSelectionBy(items.length);\n if (scrollTo) {\n this.list().scrollToTop();\n }\n }\n\n /**\n * Surgically removes specific items from the drop-in set by their stable IDs.\n *\n * Filters `#dropInItems` to drop any entry whose `idProperty` value is in `ids`,\n * leaving the remaining drop-ins (and the rest of the result list) untouched.\n * The structural shift is handled by the rendering pipeline — `resultItems`\n * recomputes automatically, and the leading `drop-in` class follows the new\n * (smaller) `dropInSize()`.\n *\n * This method intentionally does **not** mutate the inner list's selection\n * state. The caller (typically `TileListComponent.removeDropItems`) is in a\n * better position to decide whether to clear, shift, or preserve selection,\n * because it tracks selection at a higher level by stable object identity.\n *\n * Requires `idProperty` to be set — without it items cannot be identified\n * and the call is a no-op (returns 0).\n *\n * **Typical use case:** an upstream deletion (e.g. `DmsService.deleteDmsObject`)\n * removed an object that is currently rendered as a drop-in. Without removing\n * it from `#dropInItems`, the deleted tile would remain visible after `refresh()`\n * because the framework treats drop-ins as authoritative and prepends them to\n * every refreshed result set.\n *\n * @param ids Array of ID values (as resolved via `idProperty`) to remove.\n * @returns Number of items that were actually removed from the drop-in set.\n */\n removeDropItems(ids: string[]): number {\n if (ids.length === 0) return 0;\n const idProp = this.idProperty();\n if (!idProp) return 0;\n const removeSet = new Set<string>(ids);\n const before = this.#dropInItems();\n const after = before.filter((item) => !removeSet.has((item as Record<string, unknown>)[idProp] as string));\n const removedCount = before.length - after.length;\n if (removedCount === 0) return 0;\n this.#dropInItems.set(after);\n return removedCount;\n }\n\n /**\n * Programmatically replaces the entire selection with the given indices.\n *\n * Only effective when `multiselect` is `true`. Out-of-range indices are silently\n * discarded. The resulting selection is sorted ascending before being applied.\n *\n * Use this when the parent needs to restore a previously saved multi-selection\n * state, e.g. after navigation or component re-initialization.\n *\n * @param index Array of zero-based item indices to select.\n */\n multiSelect(index: number[]): void {\n this.list().multiSelect(index);\n }\n\n /**\n * Selects the item at the given zero-based index.\n *\n * Delegates to the inner `ListComponent`. The `preventChangeUntil` guard and\n * `disableSelection` state are respected. Clamps the index to the valid range.\n *\n * @param index Zero-based index of the item to select.\n */\n select(index: number): void {\n this.list().select(index);\n }\n\n /**\n * Moves keyboard focus to the item at the given index and selects it.\n *\n * Combines focus management and selection in one call, and transfers DOM focus\n * to the list host. Use this when the parent wants to programmatically drive\n * both the visual focus indicator and the selection simultaneously.\n *\n * @param index Zero-based index of the item to activate.\n */\n setActiveItem(index: number): void {\n this.list().setActiveItem(index);\n }\n\n /**\n * Clears the current selection and resets the active keyboard-focus index.\n *\n * If the selection is already empty, the method is a no-op. The `preventChangeUntil`\n * guard is respected — if the guard returns `true`, the clear is blocked.\n *\n * @param silent When `true`, skips emitting `itemSelect` after clearing. Use this\n * when the parent needs to reset state programmatically without\n * triggering downstream reactions.\n */\n clear(silent = false): void {\n this.list().clear(silent);\n }\n\n /**\n * Re-executes the current query without changing the page or query parameters.\n *\n * Re-runs what the list is about to show or is showing: a request still in flight, otherwise\n * the page the user is currently on, or the query from scratch if it has only one page. If that\n * page no longer exists — its objects were deleted — the list moves to the last page there is.\n *\n * Use this to reflect server-side changes (e.g. after a create/delete operation)\n * without navigating away from the current view.\n */\n refresh(): void {\n const query = this.query();\n if (!query) return;\n // A request in flight is re-run as it is, so a page change still clears the drop-in items. The shown\n // one only for its page: its drop-ins are gone already, and any there now were added since.\n // Not `pagination()`: after a new query failed to load, that still describes the previous query's\n // result, and its page number would be applied to the new one.\n const pending = this.#pendingRequest();\n const shown = this.#shownRequest();\n this.#request(\n pending?.query === query ? pending : { query, page: shown?.query === query ? shown.page : null }\n );\n }\n\n /**\n * Forces the `transformer` function to be re-applied to the current result set.\n *\n * Normally the transformer runs automatically whenever the underlying `#items`\n * signal changes. Use this method when the transformer itself has external\n * dependencies that changed (e.g. a locale or display-format setting) but the\n * raw search result did not — triggering a re-evaluation by creating a new array\n * reference for `#items` without fetching from the server again.\n */\n runTransformerAgain(): void {\n this.#items.set([...this.#items()]);\n }\n\n /**\n * Handles a page-change event emitted by the `mat-paginator`.\n *\n * Loads the page for the zero-based `pageEvent.pageIndex`, like `goToPage()`, and clears the\n * drop-in items once that page is shown. If it fails to load, they stay.\n *\n * Bound to `(page)` on the `mat-paginator` in the template.\n *\n * Ignored while the paginator still shows the previous query's result — a new query is loading or\n * failed to load — since its page numbers mean nothing for the current query.\n *\n * @param pageEvent The pagination event emitted by `MatPaginatorModule`.\n */\n changePage(pageEvent: PageEvent): void {\n const shown = this.#shownRequest();\n if (!shown || shown.query !== this.query()) {\n this.#syncPaginatorPage();\n return;\n }\n this.#request({ query: shown.query, page: pageEvent.pageIndex + 1, clearDropIns: true });\n }\n\n /**\n * Fetches and displays the given page of the current query result.\n *\n * Sets `busy` to `true` for the duration of the request. On success, updates\n * the pagination state, clears all optimistic overrides (they are page-scoped),\n * and replaces `#items` with the new page's results. A request still in flight — an earlier\n * page change or a new query — is cancelled. If loading the page fails, the list and the\n * paginator stay on the page that was loaded before. A page past the last one loads the last\n * page instead.\n *\n * @param page One-based page number to navigate to.\n */\n goToPage(page: number): void {\n const query = this.query();\n if (!query) return;\n this.#request({ query, page });\n }\n\n //#endregion\n\n //#region Utilities\n\n /** Reads the configured id property off a result item, or `undefined` if not set. */\n #idOf(item: T): string | undefined {\n const prop = this.idProperty();\n if (!prop) return undefined;\n const value = (item as Record<string, unknown>)[prop];\n return value == null ? undefined : String(value);\n }\n\n /** Starts `request`, cancelling any request still in flight (see `#requests`). */\n #request(request: QueryListRequest): void {\n // A copy: `#load` tells requests apart by identity, and `request` may be the one still in flight.\n const started = { ...request };\n // Before `next()`: `switchMap` cancels the superseded request first, and its `finalize` must already\n // find a newer request pending, or it would clear `busy` while this one is still loading.\n this.#pendingRequest.set(started);\n this.#requests.next(started);\n }\n\n /**\n * Cancels the request still in flight, if any; the list keeps what it shows. With no newer request\n * pending, the cancelled one's `finalize` clears `busy` and syncs the paginator.\n */\n #cancel(): void {\n this.#requests.next(null);\n }\n\n /**\n * Loads one request. A failure is logged and leaves the current result in place, and it must not\n * end `#requests` — every later search goes through that same stream.\n */\n #load(request: QueryListRequest): Observable<{ request: QueryListRequest; result: SearchResult }> {\n // `defer`: building the search can throw — e.g. a query that cannot be serialized — and a throw\n // outside the pipe would get past `catchError`.\n return defer(() => this.#search(request)).pipe(\n map((result) => ({ request, result })),\n catchError((err) => {\n console.error(err);\n return EMPTY;\n }),\n finalize(() => {\n // A superseded request leaves `busy` and the paginator to the one that replaced it.\n if (this.#pendingRequest() !== request) return;\n this.#pendingRequest.set(null);\n this.#syncPaginatorPage();\n })\n );\n }\n\n /**\n * The search call for `request`. The query may be a `SearchQuery` object or a string; a string is\n * supposed to be a CMIS query statement.\n */\n #search({ query, page }: QueryListRequest): Observable<SearchResult> {\n const size = this.effectivePageSize();\n // `getPage` writes `from` onto a query object and pages it by the object's own `size`, so it gets a copy\n // sized to this list's pages. Left on the consumer's object, `from` would open its next search — or a\n // copy made for a sort change — on a later page.\n const target = typeof query === 'string' ? query : { ...query, size };\n return this.#searchService.getPage(target, page ?? 1, size, this.includePermissions());\n }\n\n #showResult(request: QueryListRequest, result: SearchResult): void {\n const lastPage = result.paging?.totalPages ?? 1;\n if (request.page !== null && request.page > lastPage) {\n // The page is gone, e.g. `refresh()` after its objects were deleted. Showing it empty would strand\n // the user, and with a single page left there is not even a paginator to leave it with.\n this.#request({ ...request, page: lastPage > 1 ? lastPage : null });\n return;\n }\n this.#shownRequest.set(request);\n // Before `queryResult`: `TileListComponent` keeps as many leading items as there are drop-ins then.\n if (request.clearDropIns) this.#dropInItems.set([]);\n this.#setupPagination(result);\n this.#listItemUpdates.set({});\n this.#items.set(result.items);\n this.queryResult.emit({ totalCount: result.totalNumItems, items: result.items });\n }\n\n /**\n * Puts the paginator on the page that is actually loaded. It moves to the requested page as soon as\n * it is clicked, and its `[pageIndex]` binding cannot undo that when the click does not load: the\n * request failed, or a newer one replaced it and loaded the page that was bound before. The bound\n * value has not changed, so Angular does not re-apply it.\n */\n #syncPaginatorPage(): void {\n const paginator = this.paginator();\n const page = this.pagination()?.page;\n if (paginator && page) paginator.pageIndex = page - 1;\n }\n\n #setupPagination(searchResult: SearchResult): void {\n this.pagination.set(\n searchResult.paging\n ? {\n total: searchResult.totalNumItems,\n pages: searchResult.paging.totalPages,\n page: searchResult.paging.page\n }\n : undefined\n );\n }\n\n //#endregion\n\n //#region Effects\n\n readonly #executeQueryEffect = (): void => {\n // execute the query each time it changes\n const query = this.query();\n untracked(() => {\n if (query) {\n this.#request({ query, page: null });\n } else {\n this.#cancel();\n }\n });\n };\n\n /**\n * Keeps the inner list's positional selection aligned with the id-based {@link selectedIds}\n * after every re-query.\n *\n * The visual selection is driven by ID via each row's `[selected]` binding, but the inner\n * list still computes ctrl/shift range math against positional indices. After a re-query\n * reorders or replaces the rows, those indices are stale, so a subsequent ctrl/shift click\n * would operate on the wrong items. Here we re-map the surviving selected IDs to their new\n * indices and push them back into the inner list so interaction stays correct. `selectedIds`\n * is read untracked so this only runs when `resultItems` actually changes (a real re-query),\n * never on ordinary selection changes.\n */\n readonly #resyncSelectionEffect = (): void => {\n const items = this.resultItems();\n if (!this.idProperty()) return;\n const ids = untracked(() => this.selectedIds());\n if (ids.size === 0) return;\n const indices: number[] = [];\n items.forEach((item, i) => {\n const id = this.#idOf(item);\n if (id !== undefined && ids.has(id)) indices.push(i);\n });\n untracked(() => {\n try {\n this.list().multiSelect(indices);\n } catch {\n // inner list not ready yet — the next resultItems emission will reconcile\n }\n });\n };\n\n //#endregion\n}\n","<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [externalSelectionVisuals]=\"idSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"onInnerItemSelect($event)\"\n>\n @for (resultItem of resultItems(); track trackItem(resultItem, $index)) {\n <div\n yuvListItem\n yuvDragSelectItem\n [selected]=\"isRowSelected(resultItem)\"\n [class.drop-in]=\"$index < dropInSize()\"\n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\"\n >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: resultItem, index: $index }\" />\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\" />\n }\n</yuv-list>\n@if (pagination(); as pag) {\n <mat-paginator\n class=\"paginator\"\n [length]=\"pag.total\"\n [pageIndex]=\"pag.page - 1\"\n [pageSize]=\"effectivePageSize()\"\n (page)=\"changePage($event)\"\n hidePageSize\n />\n}\n","import { NgModule } from '@angular/core';\nimport { QueryListComponent } from './query-list.component';\n\nconst cmp = [QueryListComponent];\n@NgModule({\n imports: cmp,\n exports: cmp\n})\nexport class YuvQueryListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAqCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DG;AAgBH;MACa,kBAAkB,CAAA;;AAG7B,IAAA,OAAO;AACP,IAAA,cAAc;AAoVd,IAAA,MAAM;AAEN,IAAA,YAAY;AAEZ,IAAA,gBAAgB;;;;AAKhB,IAAA,SAAS;;;AAIT,IAAA,eAAe;AACf,IAAA,aAAa;;AAIb,IAAA,WAAA,GAAA;;AAvWA,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC;AAC/B,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC;;;AAMtC;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAyB,SAAS,iFAAC;AAEtD;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAgB,MAAM,CAAC;AAEhD;;;;;;;;AAQG;;AA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