@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.
@@ -246,6 +246,20 @@ class ListComponent {
246
246
  focus() {
247
247
  this.#elRef.nativeElement.focus();
248
248
  }
249
+ scrollToTop() {
250
+ this.#elRef.nativeElement.scrollTo({ top: 0, behavior: 'smooth' });
251
+ }
252
+ /**
253
+ * Shift the current selection by the given offset. Used for dynamically
254
+ * adding items to the list without losing the current selection.
255
+ * @param offset Number of items to shift the selection by.
256
+ */
257
+ shiftSelectionBy(offset) {
258
+ if (this.#keyManager?.activeItemIndex)
259
+ this.#keyManager.setActiveItem(this.#keyManager.activeItemIndex + offset);
260
+ this.#selection = this.#selection.map((i) => i + offset);
261
+ this.items().forEach((item, i) => item.selectedInput.set(this.#selection.includes(i)));
262
+ }
249
263
  /**
250
264
  * Select multiple items by their indices.
251
265
  */
@@ -1 +1 @@
1
- {"version":3,"file":"yuuvis-client-framework-list.mjs","sources":["../../../../../libs/yuuvis/client-framework/list/src/lib/list-item.directive.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list.component.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list-tile/list-tile.component.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list-tile/list-tile.component.html","../../../../../libs/yuuvis/client-framework/list/src/lib/list.module.ts","../../../../../libs/yuuvis/client-framework/list/src/yuuvis-client-framework-list.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { AfterViewInit, Directive, ElementRef, HostListener, inject, input, Input, linkedSignal } from '@angular/core';\nimport { Utils } from '@yuuvis/client-core';\n\n/**\n * Directive for list items. It is used in the `yuvList` component\n * to keep track of active and selected items. Every element with this\n * directive will be treated as a list item and can be selected and focused.\n * \n *```html\n * <yuv-list (itemSelect)=\"itemSelected($event)\">\n * <div yuvListItem>Entry #1</div>\n * <div yuvListItem>Entry #2</div>\n * </yuv-list>\n * ```\n */\n@Directive({\n selector: '[yuvListItem]',\n standalone: true,\n host: {\n '[attr.aria-current]': 'activeInput()',\n '[attr.aria-selected]': 'selectedInput()'\n }\n})\nexport class ListItemDirective implements Highlightable, AfterViewInit {\n #elRef = inject(ElementRef);\n\n onClick?: (evt: MouseEvent) => void;\n\n // TO SATISFY THE HIGHLIGHTABLE INTERFACE\n @Input() disabled?: boolean | undefined;\n\n /**\n * Whether the item is active or not. \n */\n active = input<boolean>(false);\n /**\n * Whether the item is selected or not. \n */\n selected = input<boolean>(false);\n\n selectedInput = linkedSignal({\n source: this.selected,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n activeInput = linkedSignal({\n source: this.active,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n focusableChildren: Element[] = [];\n focusedIndex = -1;\n\n @HostListener('click', ['$event']) onHostClick(evt: MouseEvent) {\n if (!this.disabled && this.onClick) {\n this.#elRef.nativeElement.parentElement.focus();\n this.onClick(evt);\n }\n }\n\n setActiveStyles(): void {\n this.activeInput.set(true);\n this.#scrollIntoView();\n }\n\n setInactiveStyles(): void {\n this.activeInput.set(false);\n }\n\n focusNext() {\n \n }\n\n focusPrevious() {\n }\n\n #scrollIntoView() {\n const el = this.#elRef.nativeElement as HTMLElement;\n const { bottom, top, left, right } = el.getBoundingClientRect();\n const containerRect = this.#elRef.nativeElement.parentElement.getBoundingClientRect();\n\n const offsetY =\n top <= containerRect.top\n ? containerRect.top - top > 0\n ? (containerRect.top - top) * -1\n : 0\n : bottom - containerRect.bottom > 0\n ? bottom - containerRect.bottom\n : 0;\n const offsetX =\n left <= containerRect.left\n ? containerRect.left - left > 0\n ? (containerRect.left - left) * -1\n : 0\n : right - containerRect.right > 0\n ? right - containerRect.right\n : 0;\n\n if (offsetX || offsetY) (this.#elRef.nativeElement.parentElement as HTMLElement).scrollBy(offsetX, offsetY);\n }\n\n ngAfterViewInit(): void {\n // get all focusable elements and set tabindex to -1\n this.focusableChildren = Utils.getFocusableChildren(this.#elRef.nativeElement);\n this.focusableChildren.forEach((el) => el.setAttribute('tabindex', '-1'));\n }\n}\n","import { A11yModule, ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n HostAttributeToken,\n HostListener,\n OnDestroy,\n ViewEncapsulation,\n contentChildren,\n effect,\n inject,\n input,\n output,\n untracked,\n AfterContentInit\n} from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\n/**\n * Component rendering a simple list of items. It supports keyboard\n * navigation and takes care of accessibility. To create a list just wrap\n * `yuvListItem` elements into this component:\n *\n * ```html\n * <yuv-list (itemSelect)=\"itemSelected($event)\">\n * <div yuvListItem>Entry #1</div>\n * <div yuvListItem>Entry #2</div>\n * </yuv-list>\n * ```\n */\n@Component({\n selector: 'yuv-list',\n standalone: true,\n imports: [CommonModule, A11yModule],\n template: '<ng-content></ng-content>',\n styleUrl: './list.component.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'listbox',\n tabindex: '0',\n '[class.self-handle-selection]': 'selfHandleSelection()'\n }\n})\nexport class ListComponent implements AfterContentInit, OnDestroy {\n\n #dir = inject(Directionality);\n #elRef = inject(ElementRef);\n\n @HostListener('keydown', ['$event']) onKeydown(event: KeyboardEvent) {\n if (this.disableSelection()) return;\n if (event.code === 'Escape') {\n this.clear();\n }\n\n if (event.code === 'Space' || (this.selectOnEnter && event.code === 'Enter')) {\n // prevent default behavior of space in scroll environments\n if (this.#preventEmit()) return;\n event.preventDefault();\n const aii: number = this.#keyManager.activeItemIndex !== null ? this.#keyManager.activeItemIndex : -1;\n if (aii >= 0) {\n this.#select(aii);\n this.#emitSelection();\n }\n } else this.#keyManager?.onKeydown(event);\n }\n\n @HostListener('focus') onFocus() {\n // set timeout to check if the focus is coming from an item being clicked\n setTimeout(() => {\n // if there already is an active item, we do not want to set the focus again\n if (this.#keyManager.activeItemIndex === -1 && this.items().length > 0) {\n const indexToFocus = this.#selection.length > 0 ? this.#selection[0] : 0;\n this.#keyManager.setActiveItem(indexToFocus);\n this.itemFocus.emit(indexToFocus);\n this.#updateActiveItemState();\n }\n }, 300);\n }\n\n items = contentChildren(ListItemDirective);\n #itemsEffect = effect(() => {\n const items = this.items();\n if (this.#keyManager) this.#keyManager.destroy();\n untracked(() => {\n this.#keyManager = this.horizontal\n ? new ActiveDescendantKeyManager(items).withWrap().withHorizontalOrientation(this.#dir.value)\n : new ActiveDescendantKeyManager(items).withWrap();\n\n this.#keyManager.change.subscribe((activeIndex) => {\n if (activeIndex !== null) {\n this.#updateActiveItemState();\n this.itemFocus.emit(activeIndex);\n }\n });\n\n if (!this.selfHandleClick()) {\n items.forEach((item, index) => {\n item.onClick = (evt: MouseEvent) => {\n this.select(index, evt.shiftKey, evt.ctrlKey);\n };\n item.activeInput.set(false);\n });\n }\n if (this.#lastSelection !== undefined && this.#lastSelection <= items.length) {\n this.select(this.#lastSelection);\n }\n });\n });\n\n #keyManager!: ActiveDescendantKeyManager<ListItemDirective>;\n #selection: number[] = [];\n #lastSelection?: number;\n\n /**\n * Function that returns `true` if selection changes should be prevented.\n * This can be used to temporarily block selection changes, e.g. while\n * there is a pending change inside another component that refers to the\n * current selection.\n */\n preventChangeUntil = input<() => boolean>(() => false);\n /**\n * If `true`, multiple items can be selected at once.\n * @default false\n */\n multiselect = input<boolean>(false);\n /**\n * If `true`, the component will handle selection itself. This means that\n * the parent component will be responsible for styling the selected and\n * focused items. If `false`, the component will take care of visualizing\n * the selection and focus states.\n * @default false\n */\n selfHandleSelection = input<boolean>(false);\n /**\n * By default the list handles click events on its items to select them.\n * If this input is set to `true`, the parent component has to handle\n * click events itself and call the `select()` method accordingly.\n *\n * If you for example use the `ClickDoubleDirective` on the list items,\n * you have to set this input to `true` to prevent the list from\n * selecting items on single click.\n * @default false\n */\n selfHandleClick = input<boolean>(false);\n /**\n * If `true`, the list will select an item automatically on initialization.\n * First, list will search for an item item that has the \"selected\"-attribute\n * and is not disabled. If no such item exists, the first item will be selected.\n * @default false\n */\n autoSelect = input<boolean, BooleanInput>(false, { transform: (value: BooleanInput) => coerceBooleanProperty(value) });\n /**\n * Emits the selected items indices.\n */\n itemSelect = output<number[]>();\n /**\n * Emits the index of the item that has focus.\n * @type {output<number>}\n */\n itemFocus = output<number>();\n\n selectOnEnter: boolean = (inject(new HostAttributeToken('selectOnEnter'), { optional: true }) || 'false') === 'true';\n horizontal: boolean = (inject(new HostAttributeToken('horizontal'), { optional: true }) || 'false') === 'true';\n\n /**\n * If `true`, the list will not allow selection of items.\n * This is useful for lists that are used for display purposes only.\n */\n disableSelection = input<boolean>(false);\n\n focus() {\n this.#elRef.nativeElement.focus();\n }\n\n /**\n * Select multiple items by their indices.\n */\n multiSelect(index: number[]): void {\n if (this.#preventEmit()) return;\n if (!this.multiselect() || this.disableSelection()) return;\n this.#selection = index.filter((i) => i >= 0 && i < this.items().length);\n this.#selection.sort();\n\n this.items().forEach((item: ListItemDirective, i: number) => item.selectedInput.set(this.#selection.includes(i)));\n this.#emitSelection();\n }\n\n /**\n * Selects a single item by its index.\n * @param index Index of the item to select.\n * @param shiftKey If `true`, selection will be extended from the last selected item to the given index.\n * @param ctrlKey If `true`, the item at the given index will be toggled in the selection.\n */\n select(index: number, shiftKey = false, ctrlKey = false) {\n if (this.#preventEmit()) return;\n if (this.disableSelection() || index < 0) return;\n if (index >= this.items().length) index = this.items().length - 1;\n \n this.#select(index, shiftKey, ctrlKey);\n if (this.#keyManager) this.#keyManager.setActiveItem(index);\n this.#emitSelection();\n }\n\n #preventEmit() {\n const preventUntilIsTrue = this.preventChangeUntil();\n return preventUntilIsTrue();\n }\n\n /**\n * Clear the current selection.\n * @param silent If `true`, the `itemSelect` event will not be emitted.\n */\n clear(silent = false) {\n if (this.#preventEmit()) return;\n if (this.#selection.length !== 0) {\n this.#select(-1);\n this.#keyManager.setActiveItem(-1);\n if (!silent) this.#emitSelection();\n }\n }\n\n #select(index: number, shiftKey = false, ctrlKey = false) {\n if (index === -1) this.#selection = [];\n else {\n if (this.multiselect()) {\n this.#selection = this.#selection.filter((i) => i !== index);\n if (ctrlKey) {\n this.#selection.push(index);\n } else if (shiftKey) {\n if (this.#lastSelection) {\n for (let i = this.#lastSelection < index ? this.#lastSelection : index; i < (this.#lastSelection > index ? this.#lastSelection : index); i++) {\n this.#selection.push(i);\n }\n } else {\n this.#selection = [index];\n }\n } else {\n this.#selection = [index];\n }\n } else this.#selection = [index];\n }\n this.#lastSelection = this.#selection.length === 0 ? undefined : index;\n this.#selection.sort();\n\n this.items().forEach((item: ListItemDirective, i: number) => item.selectedInput.set(this.#selection.includes(i)));\n }\n\n #updateActiveItemState() {\n const activeIndex = this.#keyManager.activeItemIndex;\n this.items().forEach((item: ListItemDirective, i: number) => {\n item.activeInput.set(i === activeIndex);\n });\n }\n\n #emitSelection() {\n this.itemSelect.emit(this.#selection);\n }\n\n #preselectItem() {\n const items = this.items();\n const autoSelect = this.autoSelect();\n let itemIndexToSelect = -1;\n\n // If the list has no items, do nothing.\n if (items.length < 1) return;\n\n // Find the first item that has the \"selected\"-attribute and is not disabled\n itemIndexToSelect = items.findIndex((item) => item.selected() && !item.disabled);\n\n // If no valid item index is given, but autoSelect is true, select the first item\n if (itemIndexToSelect === -1 && autoSelect) {\n itemIndexToSelect = 0;\n }\n\n // If there is a valid item index, select that item, otherwise do nothing\n if (itemIndexToSelect !== -1) {\n this.select(itemIndexToSelect);\n }\n }\n\n ngAfterContentInit(): void {\n this.#preselectItem();\n }\n\n ngOnDestroy(): void {\n this.#keyManager?.destroy();\n }\n}\n","import { Component, contentChild, TemplateRef, viewChild } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ListItemDirective } from '../list-item.directive';\n\n@Component({\n selector: 'yuv-list-tile',\n imports: [CommonModule],\n templateUrl: './list-tile.component.html',\n styleUrl: './list-tile.component.scss',\n // hostDirectives: [ListItemDirective]\n})\nexport class ListTileComponent {\n iconSlot = contentChild<TemplateRef<any>>('iconSlot', {\n descendants: true\n });\n titleSlot = contentChild<TemplateRef<any>>('titleSlot');\n descriptionSlot = contentChild<TemplateRef<any>>('descriptionSlot');\n asideSlot = contentChild<TemplateRef<any>>('asideSlot');\n actionsSlot = contentChild<TemplateRef<any>>('actionsSlot', {\n descendants: true\n });\n badgesSlot = contentChild<TemplateRef<any>>('badgesSlot');\n metaSlot = contentChild<TemplateRef<any>>('metaSlot');\n extensionSlot = contentChild<TemplateRef<any>>('extensionSlot');\n}\n","<ng-content></ng-content>\n<div class=\"tile\">\n <div data-slot=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconSlot() || null\"></ng-container>\n </div>\n <div class=\"slots\"> \n <div data-slot=\"title-description\">\n <div data-slot=\"title\">\n <ng-container *ngTemplateOutlet=\"titleSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"description\">\n <ng-container *ngTemplateOutlet=\"descriptionSlot() || null\"></ng-container>\n </div>\n </div>\n <div data-slot=\"actions\">\n <ng-container *ngTemplateOutlet=\"actionsSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"aside\">\n <ng-container *ngTemplateOutlet=\"asideSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"meta\">\n <ng-container *ngTemplateOutlet=\"metaSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"badges\">\n <ng-container *ngTemplateOutlet=\"badgesSlot() || null\"></ng-container>\n </div>\n <div class=\"extension\">\n <ng-container *ngTemplateOutlet=\"extensionSlot() || null\"></ng-container>\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\nimport { ListComponent } from './list.component';\nimport { ListTileComponent } from './list-tile/list-tile.component';\n\n@NgModule({\n imports: [ListComponent, ListItemDirective, ListTileComponent],\n exports: [ListComponent, ListItemDirective, ListTileComponent]\n})\nexport class YuvListModule {}\n","/**\n * Generated bundle index. Do not edit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A,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAKX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,8nCAAA,EAAA,MAAA,EAAA,CAAA,kwGAAA,CAAA,EAAA;;;MEGZ,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAb,aAAa,EAAA,OAAA,EAAA,CAHd,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACnD,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;gHAElD,aAAa,EAAA,OAAA,EAAA,CAHd,aAAa,EAAqB,iBAAiB,CAAA,EAAA,CAAA,CAAA;;4FAGlD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,iBAAiB;AAC9D,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"yuuvis-client-framework-list.mjs","sources":["../../../../../libs/yuuvis/client-framework/list/src/lib/list-item.directive.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list.component.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list-tile/list-tile.component.ts","../../../../../libs/yuuvis/client-framework/list/src/lib/list-tile/list-tile.component.html","../../../../../libs/yuuvis/client-framework/list/src/lib/list.module.ts","../../../../../libs/yuuvis/client-framework/list/src/yuuvis-client-framework-list.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { AfterViewInit, Directive, ElementRef, HostListener, inject, input, Input, linkedSignal } from '@angular/core';\nimport { Utils } from '@yuuvis/client-core';\n\n/**\n * Directive for list items. It is used in the `yuvList` component\n * to keep track of active and selected items. Every element with this\n * directive will be treated as a list item and can be selected and focused.\n * \n *```html\n * <yuv-list (itemSelect)=\"itemSelected($event)\">\n * <div yuvListItem>Entry #1</div>\n * <div yuvListItem>Entry #2</div>\n * </yuv-list>\n * ```\n */\n@Directive({\n selector: '[yuvListItem]',\n standalone: true,\n host: {\n '[attr.aria-current]': 'activeInput()',\n '[attr.aria-selected]': 'selectedInput()'\n }\n})\nexport class ListItemDirective implements Highlightable, AfterViewInit {\n #elRef = inject(ElementRef);\n\n onClick?: (evt: MouseEvent) => void;\n\n // TO SATISFY THE HIGHLIGHTABLE INTERFACE\n @Input() disabled?: boolean | undefined;\n\n /**\n * Whether the item is active or not. \n */\n active = input<boolean>(false);\n /**\n * Whether the item is selected or not. \n */\n selected = input<boolean>(false);\n\n selectedInput = linkedSignal({\n source: this.selected,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n activeInput = linkedSignal({\n source: this.active,\n computation: (newOptions: any, previous: any) => (newOptions !== previous ? newOptions : previous)\n });\n\n focusableChildren: Element[] = [];\n focusedIndex = -1;\n\n @HostListener('click', ['$event']) onHostClick(evt: MouseEvent) {\n if (!this.disabled && this.onClick) {\n this.#elRef.nativeElement.parentElement.focus();\n this.onClick(evt);\n }\n }\n\n setActiveStyles(): void {\n this.activeInput.set(true);\n this.#scrollIntoView();\n }\n\n setInactiveStyles(): void {\n this.activeInput.set(false);\n }\n\n focusNext() {\n \n }\n\n focusPrevious() {\n }\n\n #scrollIntoView() {\n const el = this.#elRef.nativeElement as HTMLElement;\n const { bottom, top, left, right } = el.getBoundingClientRect();\n const containerRect = this.#elRef.nativeElement.parentElement.getBoundingClientRect();\n\n const offsetY =\n top <= containerRect.top\n ? containerRect.top - top > 0\n ? (containerRect.top - top) * -1\n : 0\n : bottom - containerRect.bottom > 0\n ? bottom - containerRect.bottom\n : 0;\n const offsetX =\n left <= containerRect.left\n ? containerRect.left - left > 0\n ? (containerRect.left - left) * -1\n : 0\n : right - containerRect.right > 0\n ? right - containerRect.right\n : 0;\n\n if (offsetX || offsetY) (this.#elRef.nativeElement.parentElement as HTMLElement).scrollBy(offsetX, offsetY);\n }\n\n ngAfterViewInit(): void {\n // get all focusable elements and set tabindex to -1\n this.focusableChildren = Utils.getFocusableChildren(this.#elRef.nativeElement);\n this.focusableChildren.forEach((el) => el.setAttribute('tabindex', '-1'));\n }\n}\n","import { A11yModule, ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n HostAttributeToken,\n HostListener,\n OnDestroy,\n ViewEncapsulation,\n contentChildren,\n effect,\n inject,\n input,\n output,\n untracked,\n AfterContentInit\n} from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\n/**\n * Component rendering a simple list of items. It supports keyboard\n * navigation and takes care of accessibility. To create a list just wrap\n * `yuvListItem` elements into this component:\n *\n * ```html\n * <yuv-list (itemSelect)=\"itemSelected($event)\">\n * <div yuvListItem>Entry #1</div>\n * <div yuvListItem>Entry #2</div>\n * </yuv-list>\n * ```\n */\n@Component({\n selector: 'yuv-list',\n standalone: true,\n imports: [CommonModule, A11yModule],\n template: '<ng-content></ng-content>',\n styleUrl: './list.component.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'listbox',\n tabindex: '0',\n '[class.self-handle-selection]': 'selfHandleSelection()'\n }\n})\nexport class ListComponent implements AfterContentInit, OnDestroy {\n #dir = inject(Directionality);\n #elRef = inject(ElementRef);\n\n @HostListener('keydown', ['$event']) onKeydown(event: KeyboardEvent) {\n if (this.disableSelection()) return;\n if (event.code === 'Escape') {\n this.clear();\n }\n\n if (event.code === 'Space' || (this.selectOnEnter && event.code === 'Enter')) {\n // prevent default behavior of space in scroll environments\n if (this.#preventEmit()) return;\n event.preventDefault();\n const aii: number = this.#keyManager.activeItemIndex !== null ? this.#keyManager.activeItemIndex : -1;\n if (aii >= 0) {\n this.#select(aii);\n this.#emitSelection();\n }\n } else this.#keyManager?.onKeydown(event);\n }\n\n @HostListener('focus') onFocus() {\n // set timeout to check if the focus is coming from an item being clicked\n setTimeout(() => {\n // if there already is an active item, we do not want to set the focus again\n if (this.#keyManager.activeItemIndex === -1 && this.items().length > 0) {\n const indexToFocus = this.#selection.length > 0 ? this.#selection[0] : 0;\n this.#keyManager.setActiveItem(indexToFocus);\n this.itemFocus.emit(indexToFocus);\n this.#updateActiveItemState();\n }\n }, 300);\n }\n\n items = contentChildren(ListItemDirective);\n #itemsEffect = effect(() => {\n const items = this.items();\n if (this.#keyManager) this.#keyManager.destroy();\n untracked(() => {\n this.#keyManager = this.horizontal\n ? new ActiveDescendantKeyManager(items).withWrap().withHorizontalOrientation(this.#dir.value)\n : new ActiveDescendantKeyManager(items).withWrap();\n\n this.#keyManager.change.subscribe((activeIndex) => {\n if (activeIndex !== null) {\n this.#updateActiveItemState();\n this.itemFocus.emit(activeIndex);\n }\n });\n\n if (!this.selfHandleClick()) {\n items.forEach((item, index) => {\n item.onClick = (evt: MouseEvent) => {\n this.select(index, evt.shiftKey, evt.ctrlKey);\n };\n item.activeInput.set(false);\n });\n }\n if (this.#lastSelection !== undefined && this.#lastSelection <= items.length) {\n this.select(this.#lastSelection);\n }\n });\n });\n\n #keyManager!: ActiveDescendantKeyManager<ListItemDirective>;\n #selection: number[] = [];\n #lastSelection?: number;\n\n /**\n * Function that returns `true` if selection changes should be prevented.\n * This can be used to temporarily block selection changes, e.g. while\n * there is a pending change inside another component that refers to the\n * current selection.\n */\n preventChangeUntil = input<() => boolean>(() => false);\n /**\n * If `true`, multiple items can be selected at once.\n * @default false\n */\n multiselect = input<boolean>(false);\n /**\n * If `true`, the component will handle selection itself. This means that\n * the parent component will be responsible for styling the selected and\n * focused items. If `false`, the component will take care of visualizing\n * the selection and focus states.\n * @default false\n */\n selfHandleSelection = input<boolean>(false);\n /**\n * By default the list handles click events on its items to select them.\n * If this input is set to `true`, the parent component has to handle\n * click events itself and call the `select()` method accordingly.\n *\n * If you for example use the `ClickDoubleDirective` on the list items,\n * you have to set this input to `true` to prevent the list from\n * selecting items on single click.\n * @default false\n */\n selfHandleClick = input<boolean>(false);\n /**\n * If `true`, the list will select an item automatically on initialization.\n * First, list will search for an item item that has the \"selected\"-attribute\n * and is not disabled. If no such item exists, the first item will be selected.\n * @default false\n */\n autoSelect = input<boolean, BooleanInput>(false, { transform: (value: BooleanInput) => coerceBooleanProperty(value) });\n /**\n * Emits the selected items indices.\n */\n itemSelect = output<number[]>();\n /**\n * Emits the index of the item that has focus.\n * @type {output<number>}\n */\n itemFocus = output<number>();\n\n selectOnEnter: boolean = (inject(new HostAttributeToken('selectOnEnter'), { optional: true }) || 'false') === 'true';\n horizontal: boolean = (inject(new HostAttributeToken('horizontal'), { optional: true }) || 'false') === 'true';\n\n /**\n * If `true`, the list will not allow selection of items.\n * This is useful for lists that are used for display purposes only.\n */\n disableSelection = input<boolean>(false);\n\n focus() {\n this.#elRef.nativeElement.focus();\n }\n\n scrollToTop() {\n this.#elRef.nativeElement.scrollTo({ top: 0, behavior: 'smooth' });\n }\n\n /**\n * Shift the current selection by the given offset. Used for dynamically\n * adding items to the list without losing the current selection.\n * @param offset Number of items to shift the selection by. \n */\n shiftSelectionBy(offset: number): void {\n if (this.#keyManager?.activeItemIndex) this.#keyManager.setActiveItem(this.#keyManager.activeItemIndex + offset);\n this.#selection = this.#selection.map((i) => i + offset);\n this.items().forEach((item: ListItemDirective, i: number) => item.selectedInput.set(this.#selection.includes(i)));\n }\n\n /**\n * Select multiple items by their indices.\n */\n multiSelect(index: number[]): void {\n if (this.#preventEmit()) return;\n if (!this.multiselect() || this.disableSelection()) return;\n this.#selection = index.filter((i) => i >= 0 && i < this.items().length);\n this.#selection.sort();\n\n this.items().forEach((item: ListItemDirective, i: number) => item.selectedInput.set(this.#selection.includes(i)));\n this.#emitSelection();\n }\n\n /**\n * Selects a single item by its index.\n * @param index Index of the item to select.\n * @param shiftKey If `true`, selection will be extended from the last selected item to the given index.\n * @param ctrlKey If `true`, the item at the given index will be toggled in the selection.\n */\n select(index: number, shiftKey = false, ctrlKey = false) {\n if (this.#preventEmit()) return;\n if (this.disableSelection() || index < 0) return;\n if (index >= this.items().length) index = this.items().length - 1;\n\n this.#select(index, shiftKey, ctrlKey);\n if (this.#keyManager) this.#keyManager.setActiveItem(index);\n this.#emitSelection();\n }\n\n #preventEmit() {\n const preventUntilIsTrue = this.preventChangeUntil();\n return preventUntilIsTrue();\n }\n\n /**\n * Clear the current selection.\n * @param silent If `true`, the `itemSelect` event will not be emitted.\n */\n clear(silent = false) {\n if (this.#preventEmit()) return;\n if (this.#selection.length !== 0) {\n this.#select(-1);\n this.#keyManager.setActiveItem(-1);\n if (!silent) this.#emitSelection();\n }\n }\n\n #select(index: number, shiftKey = false, ctrlKey = false) {\n if (index === -1) this.#selection = [];\n else {\n if (this.multiselect()) {\n this.#selection = this.#selection.filter((i) => i !== index);\n if (ctrlKey) {\n this.#selection.push(index);\n } else if (shiftKey) {\n if (this.#lastSelection) {\n for (let i = this.#lastSelection < index ? this.#lastSelection : index; i < (this.#lastSelection > index ? this.#lastSelection : index); i++) {\n this.#selection.push(i);\n }\n } else {\n this.#selection = [index];\n }\n } else {\n this.#selection = [index];\n }\n } else this.#selection = [index];\n }\n this.#lastSelection = this.#selection.length === 0 ? undefined : index;\n this.#selection.sort();\n\n this.items().forEach((item: ListItemDirective, i: number) => item.selectedInput.set(this.#selection.includes(i)));\n }\n\n #updateActiveItemState() {\n const activeIndex = this.#keyManager.activeItemIndex;\n this.items().forEach((item: ListItemDirective, i: number) => {\n item.activeInput.set(i === activeIndex);\n });\n }\n\n #emitSelection() {\n this.itemSelect.emit(this.#selection);\n }\n\n #preselectItem() {\n const items = this.items();\n const autoSelect = this.autoSelect();\n let itemIndexToSelect = -1;\n\n // If the list has no items, do nothing.\n if (items.length < 1) return;\n\n // Find the first item that has the \"selected\"-attribute and is not disabled\n itemIndexToSelect = items.findIndex((item) => item.selected() && !item.disabled);\n\n // If no valid item index is given, but autoSelect is true, select the first item\n if (itemIndexToSelect === -1 && autoSelect) {\n itemIndexToSelect = 0;\n }\n\n // If there is a valid item index, select that item, otherwise do nothing\n if (itemIndexToSelect !== -1) {\n this.select(itemIndexToSelect);\n }\n }\n\n ngAfterContentInit(): void {\n this.#preselectItem();\n }\n\n ngOnDestroy(): void {\n this.#keyManager?.destroy();\n }\n}\n","import { Component, contentChild, TemplateRef, viewChild } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ListItemDirective } from '../list-item.directive';\n\n@Component({\n selector: 'yuv-list-tile',\n imports: [CommonModule],\n templateUrl: './list-tile.component.html',\n styleUrl: './list-tile.component.scss',\n // hostDirectives: [ListItemDirective]\n})\nexport class ListTileComponent {\n iconSlot = contentChild<TemplateRef<any>>('iconSlot', {\n descendants: true\n });\n titleSlot = contentChild<TemplateRef<any>>('titleSlot');\n descriptionSlot = contentChild<TemplateRef<any>>('descriptionSlot');\n asideSlot = contentChild<TemplateRef<any>>('asideSlot');\n actionsSlot = contentChild<TemplateRef<any>>('actionsSlot', {\n descendants: true\n });\n badgesSlot = contentChild<TemplateRef<any>>('badgesSlot');\n metaSlot = contentChild<TemplateRef<any>>('metaSlot');\n extensionSlot = contentChild<TemplateRef<any>>('extensionSlot');\n}\n","<ng-content></ng-content>\n<div class=\"tile\">\n <div data-slot=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconSlot() || null\"></ng-container>\n </div>\n <div class=\"slots\"> \n <div data-slot=\"title-description\">\n <div data-slot=\"title\">\n <ng-container *ngTemplateOutlet=\"titleSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"description\">\n <ng-container *ngTemplateOutlet=\"descriptionSlot() || null\"></ng-container>\n </div>\n </div>\n <div data-slot=\"actions\">\n <ng-container *ngTemplateOutlet=\"actionsSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"aside\">\n <ng-container *ngTemplateOutlet=\"asideSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"meta\">\n <ng-container *ngTemplateOutlet=\"metaSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"badges\">\n <ng-container *ngTemplateOutlet=\"badgesSlot() || null\"></ng-container>\n </div>\n <div class=\"extension\">\n <ng-container *ngTemplateOutlet=\"extensionSlot() || null\"></ng-container>\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ListItemDirective } from './list-item.directive';\nimport { ListComponent } from './list.component';\nimport { ListTileComponent } from './list-tile/list-tile.component';\n\n@NgModule({\n imports: [ListComponent, ListItemDirective, ListTileComponent],\n exports: [ListComponent, ListItemDirective, ListTileComponent]\n})\nexport class YuvListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAIA;;;;;;;;;;;AAWG;MASU,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;AASE,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC;AAO3B;;AAEG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAU,KAAK,CAAC;AAC9B;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;QAEhC,IAAa,CAAA,aAAA,GAAG,YAAY,CAAC;YAC3B,MAAM,EAAE,IAAI,CAAC,QAAQ;YACrB,WAAW,EAAE,CAAC,UAAe,EAAE,QAAa,MAAM,UAAU,KAAK,QAAQ,GAAG,UAAU,GAAG,QAAQ;AAClG,SAAA,CAAC;QAEF,IAAW,CAAA,WAAA,GAAG,YAAY,CAAC;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,WAAW,EAAE,CAAC,UAAe,EAAE,QAAa,MAAM,UAAU,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AAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAKX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,8nCAAA,EAAA,MAAA,EAAA,CAAA,kwGAAA,CAAA,EAAA;;;MEGZ,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAb,aAAa,EAAA,OAAA,EAAA,CAHd,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACnD,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;gHAElD,aAAa,EAAA,OAAA,EAAA,CAHd,aAAa,EAAqB,iBAAiB,CAAA,EAAA,CAAA,CAAA;;4FAGlD,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,iBAAiB;AAC9D,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -66,6 +66,11 @@ class QueryListComponent {
66
66
  * The query to execute (SearchQuery object or CMIS query string).
67
67
  */
68
68
  this.query = input();
69
+ /**
70
+ * Optional property name to use as unique identifier for items.
71
+ * If not provided, the index of the item in the result set will be used.
72
+ */
73
+ this.idProperty = input(null);
69
74
  /**
70
75
  * Optional transformer function to map SearchResultItem to a custom format.
71
76
  */
@@ -86,7 +91,6 @@ class QueryListComponent {
86
91
  this.autoSelect = input(false, { transform: (value) => coerceBooleanProperty(value) });
87
92
  /**
88
93
  * Event emitted when items are selected. Emits an array of selected item indices.
89
- *
90
94
  */
91
95
  this.itemSelect = output();
92
96
  /**
@@ -102,14 +106,24 @@ class QueryListComponent {
102
106
  */
103
107
  this.queryResult = output();
104
108
  this.#items = signal([]);
109
+ this.#dropInItems = signal([]);
110
+ this.dropInSize = computed(() => this.#dropInItems().length);
105
111
  /**
106
112
  * The list of result items after applying the optional transformer.
107
113
  */
108
114
  this.resultItems = computed(() => {
109
115
  const items = this.#items();
116
+ const updates = this.#listItemUpdates();
110
117
  const transformer = this.transformer();
111
- return transformer ? transformer(items) : items;
118
+ const transformedResult = transformer ? transformer(items) : items;
119
+ const result = [...this.#dropInItems(), ...transformedResult];
120
+ // apply updates to transformed result
121
+ Object.keys(updates).forEach((index) => {
122
+ result[Number(index)] = updates[Number(index)];
123
+ });
124
+ return result;
112
125
  });
126
+ this.#listItemUpdates = signal({});
113
127
  /**
114
128
  * Number of items to fetch per page when executing the query.
115
129
  * @default SearchService.DEFAULT_QUERY_SIZE
@@ -150,6 +164,8 @@ class QueryListComponent {
150
164
  #device;
151
165
  #searchService;
152
166
  #items;
167
+ #dropInItems;
168
+ #listItemUpdates;
153
169
  #executeQueryEffect;
154
170
  onItemClick(idx, event) {
155
171
  this.list().select(idx, event.shiftKey, event.ctrlKey);
@@ -166,6 +182,49 @@ class QueryListComponent {
166
182
  this.list().focus();
167
183
  this.itemSelect.emit(sel);
168
184
  }
185
+ /**
186
+ * Updates an item in the list at the specified index with the provided value.
187
+ * The value should match the type returned by the transformer function, if provided.
188
+ * If you did not provide a transformer, the value should be of type SearchResultItem.
189
+ *
190
+ * Use this method for optimistic updates of list items. The updates be removed
191
+ * when the user navigates to another search result page.
192
+ *
193
+ * @param index Index of the item to update.
194
+ * @param value The new value for the item.
195
+ */
196
+ updateListItems(updates) {
197
+ const updatesRecord = updates.reduce((acc, curr) => {
198
+ {
199
+ acc[curr.index] = curr.value;
200
+ return acc;
201
+ }
202
+ }, {});
203
+ this.#listItemUpdates.set({ ...this.#listItemUpdates(), ...updatesRecord });
204
+ }
205
+ /**
206
+ * Optional array of items to be shown in addition to the query results.
207
+ * These items will be prepended to the list of query results and visually
208
+ * highlighted. They will also be affected by selection and drag-selection.
209
+ *
210
+ * Use this input to "drop in" items, for example when creating features
211
+ * like pasting items into a list where they would otherwise not appear due
212
+ * to the current query/filter.
213
+ *
214
+ * Changing the page of the query will remove the drop-in items again, as
215
+ * they are meant to be temporary.
216
+ *
217
+ * @param items The items to drop into the list.
218
+ * @param scrollTo If `true`, the list will scroll to the top after dropping
219
+ * in the items. Default is `true`.
220
+ */
221
+ dropItems(items, scrollTo = true) {
222
+ this.#dropInItems.set(items);
223
+ this.list().shiftSelectionBy(items.length);
224
+ if (scrollTo) {
225
+ this.list().scrollToTop();
226
+ }
227
+ }
169
228
  /**
170
229
  * Selects multiple items in the list.
171
230
  */
@@ -205,6 +264,11 @@ class QueryListComponent {
205
264
  .subscribe({
206
265
  next: (res) => {
207
266
  this.#setupPagination(res);
267
+ // changing the page, reset any list item updates as they should only be used for
268
+ // optimistic updates on the current page. Moving between pages would trigger a new
269
+ // query anyway (will get the recent data).
270
+ this.#listItemUpdates.set({});
271
+ this.#dropInItems.set([]);
208
272
  this.#items.set(res.items);
209
273
  this.busy.set(false);
210
274
  },
@@ -252,11 +316,11 @@ class QueryListComponent {
252
316
  : undefined;
253
317
  }
254
318
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: QueryListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
255
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: QueryListComponent, isStandalone: true, selector: "yuv-query-list", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, transformer: { classPropertyName: "transformer", publicName: "transformer", isSignal: true, isRequired: false, transformFunction: null }, preventChangeUntil: { classPropertyName: "preventChangeUntil", publicName: "preventChangeUntil", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, enableDragSelect: { classPropertyName: "enableDragSelect", publicName: "enableDragSelect", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, selfHandleSelection: { classPropertyName: "selfHandleSelection", publicName: "selfHandleSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", dragSelectChange: "dragSelectChange", itemDoubleClick: "itemDoubleClick", queryResult: "queryResult" }, host: { properties: { "class.pagination": "this.pagination" } }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ["yuvQueryListItem"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["yuvQueryListEmpty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"itemSelect.emit($event)\"\n>\n @for (i of resultItems(); track $index) {\n <div yuvListItem yuvDragSelectItem \n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\" >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: i, index: $index }\"></ng-container>\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\"></ng-container>\n }\n</yuv-list>\n@if (pagination) {\n <mat-paginator class=\"paginator\" [length]=\"pagination.total\" [pageSize]=\"pageSize()\" (page)=\"changePage($event)\" hidePageSize> </mat-paginator>\n}\n", styles: [":host{--paging-background: var(--ymt-surface);display:flex;flex-direction:column;max-height:100%}:host yuv-list{flex:1;overflow-y:auto}:host mat-paginator{flex:0 0 auto;font:inherit;border-block-start:1px solid var(--ymt-outline-variant);background-color:var(--paging-background)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: YuvListModule }, { kind: "component", type: i2.ListComponent, selector: "yuv-list", inputs: ["preventChangeUntil", "multiselect", "selfHandleSelection", "selfHandleClick", "autoSelect", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: i2.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: ClickDoubleDirective, selector: "[click.single],[click.double]", inputs: ["debounceTime"], outputs: ["click.double", "click.single"] }, { kind: "directive", type: DragSelectDirective, selector: "[yuvDragSelect]", inputs: ["yuvDragSelect"], outputs: ["dragSelectChange", "dragSelect"] }, { kind: "directive", type: DragSelectItemDirective, selector: "[yuvDragSelectItem]" }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }] }); }
319
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: QueryListComponent, isStandalone: true, selector: "yuv-query-list", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, idProperty: { classPropertyName: "idProperty", publicName: "idProperty", isSignal: true, isRequired: false, transformFunction: null }, transformer: { classPropertyName: "transformer", publicName: "transformer", isSignal: true, isRequired: false, transformFunction: null }, preventChangeUntil: { classPropertyName: "preventChangeUntil", publicName: "preventChangeUntil", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, enableDragSelect: { classPropertyName: "enableDragSelect", publicName: "enableDragSelect", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, selfHandleSelection: { classPropertyName: "selfHandleSelection", publicName: "selfHandleSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", dragSelectChange: "dragSelectChange", itemDoubleClick: "itemDoubleClick", queryResult: "queryResult" }, host: { properties: { "class.pagination": "this.pagination" } }, queries: [{ propertyName: "itemTemplate", first: true, predicate: ["yuvQueryListItem"], descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["yuvQueryListEmpty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"itemSelect.emit($event)\"\n>\n @for (i of resultItems(); track idProperty() || $index) {\n <div yuvListItem yuvDragSelectItem [class.drop-in]=\"$index < dropInSize()\"\n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\" >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: i, index: $index }\"></ng-container>\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\"></ng-container>\n }\n</yuv-list>\n@if (pagination) {\n <mat-paginator class=\"paginator\" [length]=\"pagination.total\" [pageSize]=\"pageSize()\" (page)=\"changePage($event)\" hidePageSize> </mat-paginator>\n}\n", styles: [":host{--paging-background: var(--ymt-surface);display:flex;flex-direction:column;max-height:100%}:host [yuvListItem].drop-in{outline:1px dashed rgb(from var(--ymt-primary) r g b/.9);outline-offset:-2px;overflow:hidden}:host yuv-list{flex:1;overflow-y:auto}:host mat-paginator{flex:0 0 auto;font:inherit;border-block-start:1px solid var(--ymt-outline-variant);background-color:var(--paging-background)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: YuvListModule }, { kind: "component", type: i2.ListComponent, selector: "yuv-list", inputs: ["preventChangeUntil", "multiselect", "selfHandleSelection", "selfHandleClick", "autoSelect", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: i2.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: ClickDoubleDirective, selector: "[click.single],[click.double]", inputs: ["debounceTime"], outputs: ["click.double", "click.single"] }, { kind: "directive", type: DragSelectDirective, selector: "[yuvDragSelect]", inputs: ["yuvDragSelect"], outputs: ["dragSelectChange", "dragSelect"] }, { kind: "directive", type: DragSelectItemDirective, selector: "[yuvDragSelectItem]" }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }] }); }
256
320
  }
257
321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: QueryListComponent, decorators: [{
258
322
  type: Component,
259
- args: [{ selector: 'yuv-query-list', imports: [CommonModule, YuvListModule, ClickDoubleDirective, DragSelectDirective, DragSelectItemDirective, MatPaginatorModule], template: "<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"itemSelect.emit($event)\"\n>\n @for (i of resultItems(); track $index) {\n <div yuvListItem yuvDragSelectItem \n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\" >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: i, index: $index }\"></ng-container>\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\"></ng-container>\n }\n</yuv-list>\n@if (pagination) {\n <mat-paginator class=\"paginator\" [length]=\"pagination.total\" [pageSize]=\"pageSize()\" (page)=\"changePage($event)\" hidePageSize> </mat-paginator>\n}\n", styles: [":host{--paging-background: var(--ymt-surface);display:flex;flex-direction:column;max-height:100%}:host yuv-list{flex:1;overflow-y:auto}:host mat-paginator{flex:0 0 auto;font:inherit;border-block-start:1px solid var(--ymt-outline-variant);background-color:var(--paging-background)}\n"] }]
323
+ args: [{ selector: 'yuv-query-list', imports: [CommonModule, YuvListModule, ClickDoubleDirective, DragSelectDirective, DragSelectItemDirective, MatPaginatorModule], template: "<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"itemSelect.emit($event)\"\n>\n @for (i of resultItems(); track idProperty() || $index) {\n <div yuvListItem yuvDragSelectItem [class.drop-in]=\"$index < dropInSize()\"\n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\" >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: i, index: $index }\"></ng-container>\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\"></ng-container>\n }\n</yuv-list>\n@if (pagination) {\n <mat-paginator class=\"paginator\" [length]=\"pagination.total\" [pageSize]=\"pageSize()\" (page)=\"changePage($event)\" hidePageSize> </mat-paginator>\n}\n", styles: [":host{--paging-background: var(--ymt-surface);display:flex;flex-direction:column;max-height:100%}:host [yuvListItem].drop-in{outline:1px dashed rgb(from var(--ymt-primary) r g b/.9);outline-offset:-2px;overflow:hidden}:host yuv-list{flex:1;overflow-y:auto}:host mat-paginator{flex:0 0 auto;font:inherit;border-block-start:1px solid var(--ymt-outline-variant);background-color:var(--paging-background)}\n"] }]
260
324
  }], propDecorators: { pagination: [{
261
325
  type: HostBinding,
262
326
  args: ['class.pagination']
@@ -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 { Component, computed, contentChild, effect, HostBinding, inject, input, output, signal, TemplateRef, untracked, viewChild } 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 * Component to display a list of items based on a search query. \n * It will execute the query and render the results using the provided item template.\n * \n * The component supports pagination, multi-selection, and drag selection.\n * \n * If you don't provide a transformer function, the raw SearchResultItem objects will be \n * used as items and passed to the template. The transformer function allows you to map\n * the SearchResultItem objects to a custom format before rendering. \n *\n * Example usage:\n * ```html\n * <yuv-query-list [transformer]=\"transformResult\" [query]=\"query\" (itemSelect)=\"onItemSelect($event)\">\n \n <!-- template used to render result item -->\n <ng-template #yuvQueryListItem let-item>\n <yuv-list-tile>\n <ng-template #titleSlot>{{ item.id }}</ng-template>\n <ng-template #descriptionSlot>{{ item.modified }}</ng-template>\n </yuv-list-tile>\n </ng-template>\n\n <!-- Content to display when the list is empty -->\n <ng-template #yuvQueryListEmpty>\n <div>No documents found.</div>\n </ng-template>\n\n </yuv-query-list>\n * ```\n *\n * ```ts\n * @Component({...})\n * export class TestQueryListComponent {\n * query = 'SELECT * FROM system:document';\n * \n * transformResult = (items: SearchResultItem[]) =>\n * items.map((item) => ({\n * id: item.fields.get(BaseObjectTypeField.OBJECT_ID),\n * modified: item.fields.get(BaseObjectTypeField.MODIFICATION_DATE)\n * }));\n * } * \n * ```\n */\n@Component({\n selector: 'yuv-query-list',\n imports: [CommonModule, YuvListModule, ClickDoubleDirective, DragSelectDirective, DragSelectItemDirective, MatPaginatorModule],\n templateUrl: './query-list.component.html',\n styleUrl: './query-list.component.scss'\n})\nexport class QueryListComponent {\n #device = inject(DeviceService);\n #searchService = inject(SearchService);\n list = viewChild.required<ListComponent>('list');\n itemTemplate = contentChild<TemplateRef<any>>('yuvQueryListItem');\n emptyTemplate = contentChild<TemplateRef<any>>('yuvQueryListEmpty');\n\n isTouchDevice = this.#device.isTouchEnabled;\n /**\n * The query to execute (SearchQuery object or CMIS query string).\n */\n query = input<SearchQuery | string | null>();\n\n /**\n * Optional transformer function to map SearchResultItem to a custom format.\n */\n transformer = input<((items: SearchResultItem[]) => unknown[]) | null>();\n /**\n * Function that returns `true` if selection changes should be prevented.\n * This can be used to temporarily block selection changes, e.g. while\n * there is a pending change inside another component that refers to the\n * current selection.\n */\n preventChangeUntil = input<() => boolean>(() => false);\n /**\n * If `true`, the list will select an item automatically on initialization.\n * First, list will search for an item item that has the \"selected\"-attribute\n * and is not disabled. If no such item exists, the first item will be selected.\n * @default false\n */\n autoSelect = input<boolean, BooleanInput>(false, { transform: (value: BooleanInput) => coerceBooleanProperty(value) });\n\n /**\n * Event emitted when items are selected. Emits an array of selected item indices.\n *\n */\n itemSelect = output<number[]>();\n /**\n * Event emitted during drag selection, providing the current selection of item indices.\n */\n dragSelectChange = output<number[]>();\n /**\n * Event emitted when an item is double-clicked, providing the index of the item.\n */\n itemDoubleClick = output<number>();\n /**\n * Event emitted when the query result is available, providing total count of items.\n */\n queryResult = output<{ totalCount: number }>();\n\n #items = signal<SearchResultItem[]>([]);\n /**\n * The list of result items after applying the optional transformer.\n */\n resultItems = computed(() => {\n const items = this.#items();\n const transformer = this.transformer();\n return transformer ? transformer(items) : items;\n });\n\n /**\n * Number of items to fetch per page when executing the query.\n * @default SearchService.DEFAULT_QUERY_SIZE\n */\n pageSize = input<number>(SearchService.DEFAULT_QUERY_SIZE);\n\n /**\n * Enables or disables drag selection of items. If `true`, users can select multiple items by dragging the mouse.\n * @default true\n */\n enableDragSelect = input<boolean>(true);\n\n /**\n * Sets up the ability to select multiple tiles\n * @default false\n */\n multiselect = input<boolean>(false);\n /**\n * If `true`, the component will handle selection itself. This means that\n * the parent component will be responsible for styling the selected and\n * focused items. If `false`, the component will take care of visualizing\n * the selection and focus states.\n * @default false\n */\n selfHandleSelection = input<boolean>(false);\n\n /**\n * Indicator signal whether a query is currently being executed.\n * You could use this to show a loading indicator in the UI.\n */\n busy = signal<boolean>(false);\n\n // state of pagination\n @HostBinding('class.pagination') pagination?: Pagination;\n\n #executeQueryEffect = effect(() => {\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 onItemClick(idx: number, event: MouseEvent) {\n this.list().select(idx, event.shiftKey, event.ctrlKey);\n this.list().focus();\n }\n\n onItemDoubleClick(idx: number, event: MouseEvent) {\n this.itemDoubleClick.emit(idx);\n }\n\n onDragSelectChange(sel: number[]) {\n this.list().multiSelect(sel);\n this.dragSelectChange.emit(sel);\n }\n\n onDragSelect(sel: number[]) {\n this.list().focus();\n this.itemSelect.emit(sel);\n }\n\n /**\n * Selects multiple items in the list.\n */\n multiSelect(index: number[]): void {\n this.list().multiSelect(index);\n }\n\n /**\n * Clear the current selection.\n * @param silent If `true`, the `itemSelect` event will not be emitted.\n */\n clear(silent = false) {\n this.list().clear(silent);\n }\n\n /**\n * Refreshes the list by re-executing the current query/page.\n */\n refresh() {\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 changePage(pe: PageEvent) {\n this.goToPage(pe.pageIndex + 1);\n }\n\n goToPage(page: number) {\n const query = this.query();\n if (!query) return;\n this.busy.set(true);\n this.#searchService\n .getPage(query, page, this.pageSize())\n\n .subscribe({\n next: (res: SearchResult) => {\n this.#setupPagination(res);\n this.#items.set(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 /**\n * Executes a search query.\n * @param query The search query to execute. 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) {\n if (query && !this.busy()) {\n // reset items to avoid old data being shown while new stuff is loaded\n this.#items.set([]);\n this.busy.set(true);\n\n (typeof query === 'string'\n ? this.#searchService.searchCmis(query as string, this.pageSize())\n : this.#searchService.search(query as SearchQuery)\n ).subscribe({\n next: (res: SearchResult) => {\n this.#setupPagination(res);\n this.#items.set(res.items);\n this.queryResult.emit({ totalCount: res.totalNumItems });\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) {\n this.pagination = undefined;\n this.pagination = searchResult.paging\n ? {\n total: searchResult.totalNumItems,\n pages: searchResult.paging.totalPages,\n page: searchResult.paging.page\n }\n : undefined;\n }\n}\n","<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"itemSelect.emit($event)\"\n>\n @for (i of resultItems(); track $index) {\n <div yuvListItem yuvDragSelectItem \n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\" >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: i, index: $index }\"></ng-container>\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\"></ng-container>\n }\n</yuv-list>\n@if (pagination) {\n <mat-paginator class=\"paginator\" [length]=\"pagination.total\" [pageSize]=\"pageSize()\" (page)=\"changePage($event)\" hidePageSize> </mat-paginator>\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":";;;;;;;;;;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;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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 { Component, computed, contentChild, effect, HostBinding, inject, input, output, signal, TemplateRef, untracked, viewChild } 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 * Component to display a list of items based on a search query. \n * It will execute the query and render the results using the provided item template.\n * \n * The component supports pagination, multi-selection, and drag selection.\n * \n * If you don't provide a transformer function, the raw SearchResultItem objects will be \n * used as items and passed to the template. The transformer function allows you to map\n * the SearchResultItem objects to a custom format before rendering. \n *\n * Example usage:\n * ```html\n * <yuv-query-list [transformer]=\"transformResult\" [query]=\"query\" (itemSelect)=\"onItemSelect($event)\">\n \n <!-- template used to render result item -->\n <ng-template #yuvQueryListItem let-item>\n <yuv-list-tile>\n <ng-template #titleSlot>{{ item.id }}</ng-template>\n <ng-template #descriptionSlot>{{ item.modified }}</ng-template>\n </yuv-list-tile>\n </ng-template>\n\n <!-- Content to display when the list is empty -->\n <ng-template #yuvQueryListEmpty>\n <div>No documents found.</div>\n </ng-template>\n\n </yuv-query-list>\n * ```\n *\n * ```ts\n * @Component({...})\n * export class TestQueryListComponent {\n * query = 'SELECT * FROM system:document';\n * \n * transformResult = (items: SearchResultItem[]) =>\n * items.map((item) => ({\n * id: item.fields.get(BaseObjectTypeField.OBJECT_ID),\n * modified: item.fields.get(BaseObjectTypeField.MODIFICATION_DATE)\n * }));\n * } * \n * ```\n */\n@Component({\n selector: 'yuv-query-list',\n imports: [CommonModule, YuvListModule, ClickDoubleDirective, DragSelectDirective, DragSelectItemDirective, MatPaginatorModule],\n templateUrl: './query-list.component.html',\n styleUrl: './query-list.component.scss'\n})\nexport class QueryListComponent {\n #device = inject(DeviceService);\n #searchService = inject(SearchService);\n list = viewChild.required<ListComponent>('list');\n itemTemplate = contentChild<TemplateRef<any>>('yuvQueryListItem');\n emptyTemplate = contentChild<TemplateRef<any>>('yuvQueryListEmpty');\n\n isTouchDevice = this.#device.isTouchEnabled;\n\n /**\n * The query to execute (SearchQuery object or CMIS query string).\n */\n query = input<SearchQuery | string | null>();\n /**\n * Optional property name to use as unique identifier for items.\n * If not provided, the index of the item in the result set will be used.\n */\n idProperty = input<string | null>(null);\n\n /**\n * Optional transformer function to map SearchResultItem to a custom format.\n */\n transformer = input<((items: SearchResultItem[]) => unknown[]) | null>();\n /**\n * Function that returns `true` if selection changes should be prevented.\n * This can be used to temporarily block selection changes, e.g. while\n * there is a pending change inside another component that refers to the\n * current selection.\n */\n preventChangeUntil = input<() => boolean>(() => false);\n /**\n * If `true`, the list will select an item automatically on initialization.\n * First, list will search for an item item that has the \"selected\"-attribute\n * and is not disabled. If no such item exists, the first item will be selected.\n * @default false\n */\n autoSelect = input<boolean, BooleanInput>(false, { transform: (value: BooleanInput) => coerceBooleanProperty(value) });\n\n /**\n * Event emitted when items are selected. Emits an array of selected item indices.\n */\n itemSelect = output<number[]>();\n /**\n * Event emitted during drag selection, providing the current selection of item indices.\n */\n dragSelectChange = output<number[]>();\n /**\n * Event emitted when an item is double-clicked, providing the index of the item.\n */\n itemDoubleClick = output<number>();\n /**\n * Event emitted when the query result is available, providing total count of items.\n */\n queryResult = output<{ totalCount: number }>();\n\n #items = signal<SearchResultItem[]>([]);\n #dropInItems = signal<Record<string, unknown>[]>([]);\n dropInSize = computed(() => this.#dropInItems().length);\n\n /**\n * The list of result items after applying the optional transformer.\n */\n resultItems = computed(() => {\n const items = this.#items();\n const updates = this.#listItemUpdates();\n const transformer = this.transformer();\n const transformedResult = transformer ? transformer(items) : items;\n const result = [...this.#dropInItems(), ...transformedResult];\n // apply updates to transformed result\n Object.keys(updates).forEach((index) => {\n result[Number(index)] = updates[Number(index)];\n });\n return result;\n });\n\n #listItemUpdates = signal<Record<number, unknown>>({});\n\n /**\n * Number of items to fetch per page when executing the query.\n * @default SearchService.DEFAULT_QUERY_SIZE\n */\n pageSize = input<number>(SearchService.DEFAULT_QUERY_SIZE);\n\n /**\n * Enables or disables drag selection of items. If `true`, users can select multiple items by dragging the mouse.\n * @default true\n */\n enableDragSelect = input<boolean>(true);\n\n /**\n * Sets up the ability to select multiple tiles\n * @default false\n */\n multiselect = input<boolean>(false);\n /**\n * If `true`, the component will handle selection itself. This means that\n * the parent component will be responsible for styling the selected and\n * focused items. If `false`, the component will take care of visualizing\n * the selection and focus states.\n * @default false\n */\n selfHandleSelection = input<boolean>(false);\n\n /**\n * Indicator signal whether a query is currently being executed.\n * You could use this to show a loading indicator in the UI.\n */\n busy = signal<boolean>(false);\n\n // state of pagination\n @HostBinding('class.pagination') pagination?: Pagination;\n\n #executeQueryEffect = effect(() => {\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 onItemClick(idx: number, event: MouseEvent) {\n this.list().select(idx, event.shiftKey, event.ctrlKey);\n this.list().focus();\n }\n\n onItemDoubleClick(idx: number, event: MouseEvent) {\n this.itemDoubleClick.emit(idx);\n }\n\n onDragSelectChange(sel: number[]) {\n this.list().multiSelect(sel);\n this.dragSelectChange.emit(sel);\n }\n\n onDragSelect(sel: number[]) {\n this.list().focus();\n this.itemSelect.emit(sel);\n }\n\n /**\n * Updates an item in the list at the specified index with the provided value.\n * The value should match the type returned by the transformer function, if provided.\n * If you did not provide a transformer, the value should be of type SearchResultItem.\n *\n * Use this method for optimistic updates of list items. The updates be removed\n * when the user navigates to another search result page.\n *\n * @param index Index of the item to update.\n * @param value The new value for the item.\n */\n updateListItems(updates: { index: number; value: unknown }[]) {\n const updatesRecord = updates.reduce(\n (acc, curr) => {\n {\n acc[curr.index] = curr.value;\n return acc;\n }\n },\n {} as Record<number, unknown>\n );\n this.#listItemUpdates.set({ ...this.#listItemUpdates(), ...updatesRecord });\n }\n\n /**\n * Optional array of items to be shown in addition to the query results.\n * These items will be prepended to the list of query results and visually\n * highlighted. They will also be affected by selection and drag-selection.\n *\n * Use this input to \"drop in\" items, for example when creating features\n * like pasting items into a list where they would otherwise not appear due\n * to the current query/filter.\n *\n * Changing the page of the query will remove the drop-in items again, as\n * they are meant to be temporary.\n * \n * @param items The items to drop into the list.\n * @param scrollTo If `true`, the list will scroll to the top after dropping \n * in the items. Default is `true`.\n */\n dropItems(items: Record<string, unknown>[], scrollTo = true) {\n this.#dropInItems.set(items);\n this.list().shiftSelectionBy(items.length);\n if (scrollTo) {\n this.list().scrollToTop();\n }\n }\n\n /**\n * Selects multiple items in the list.\n */\n multiSelect(index: number[]): void {\n this.list().multiSelect(index);\n }\n\n /**\n * Clear the current selection.\n * @param silent If `true`, the `itemSelect` event will not be emitted.\n */\n clear(silent = false) {\n this.list().clear(silent);\n }\n\n /**\n * Refreshes the list by re-executing the current query/page.\n */\n refresh() {\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 changePage(pe: PageEvent) {\n this.goToPage(pe.pageIndex + 1);\n }\n\n goToPage(page: number) {\n const query = this.query();\n if (!query) return;\n this.busy.set(true);\n this.#searchService\n .getPage(query, page, this.pageSize())\n\n .subscribe({\n next: (res: SearchResult) => {\n this.#setupPagination(res);\n // changing the page, reset any list item updates as they should only be used for\n // optimistic updates on the current page. Moving between pages would trigger a new\n // query anyway (will get the recent data).\n this.#listItemUpdates.set({});\n this.#dropInItems.set([]);\n\n this.#items.set(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 /**\n * Executes a search query.\n * @param query The search query to execute. 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) {\n if (query && !this.busy()) {\n // reset items to avoid old data being shown while new stuff is loaded\n this.#items.set([]);\n this.busy.set(true);\n\n (typeof query === 'string'\n ? this.#searchService.searchCmis(query as string, this.pageSize())\n : this.#searchService.search(query as SearchQuery)\n ).subscribe({\n next: (res: SearchResult) => {\n this.#setupPagination(res);\n this.#items.set(res.items);\n this.queryResult.emit({ totalCount: res.totalNumItems });\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) {\n this.pagination = undefined;\n this.pagination = searchResult.paging\n ? {\n total: searchResult.totalNumItems,\n pages: searchResult.paging.totalPages,\n page: searchResult.paging.page\n }\n : undefined;\n }\n}\n","<yuv-list\n #list\n [multiselect]=\"multiselect()\"\n [autoSelect]=\"autoSelect()\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [selfHandleClick]=\"true\"\n [selfHandleSelection]=\"selfHandleSelection()\"\n [yuvDragSelect]=\"{ disabled: !enableDragSelect() || !multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n (itemSelect)=\"itemSelect.emit($event)\"\n>\n @for (i of resultItems(); track idProperty() || $index) {\n <div yuvListItem yuvDragSelectItem [class.drop-in]=\"$index < dropInSize()\"\n (click.single)=\"onItemClick($index, $event)\"\n (click.double)=\"onItemDoubleClick($index, $event)\" >\n <ng-container *ngTemplateOutlet=\"itemTemplate() || null; context: { $implicit: i, index: $index }\"></ng-container>\n </div>\n } @empty {\n <ng-container *ngTemplateOutlet=\"emptyTemplate() || null\"></ng-container>\n }\n</yuv-list>\n@if (pagination) {\n <mat-paginator class=\"paginator\" [length]=\"pagination.total\" [pageSize]=\"pageSize()\" (page)=\"changePage($event)\" hidePageSize> </mat-paginator>\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":";;;;;;;;;;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CG;MAOU,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;AAOE,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC;AAC/B,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC;AACtC,QAAA,IAAA,CAAA,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAgB,MAAM,CAAC;AAChD,QAAA,IAAA,CAAA,YAAY,GAAG,YAAY,CAAmB,kBAAkB,CAAC;AACjE,QAAA,IAAA,CAAA,aAAa,GAAG,YAAY,CAAmB,mBAAmB,CAAC;AAEnE,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc;AAE3C;;AAEG;QACH,IAAK,CAAA,KAAA,GAAG,KAAK,EAA+B;AAC5C;;;AAGG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAgB,IAAI,CAAC;AAEvC;;AAEG;QACH,IAAW,CAA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ACZ,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, viewChild, ChangeDetectionStrategy, Component, Injectable, inject, ViewContainerRef, effect, Directive, DestroyRef, ElementRef, contentChild, computed, untracked, signal, HostListener } from '@angular/core';
2
+ import { input, output, viewChild, ChangeDetectionStrategy, Component, Injectable, inject, ViewContainerRef, effect, Directive, DestroyRef, ElementRef, contentChild, computed, viewChildren, untracked, signal, HostListener } from '@angular/core';
3
3
  import * as i1$1 from '@yuuvis/client-core';
4
4
  import { ObjectConfigService, DmsService, DmsObject, SearchService, BaseObjectTypeField, TranslateModule, SystemService, ContentStreamField, Utils, Sort } from '@yuuvis/client-core';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -159,6 +159,7 @@ class TileListComponent {
159
159
  });
160
160
  this.emptyContent = contentChild('empty');
161
161
  this.list = viewChild.required('list');
162
+ this.menuTriggers = viewChildren(MatMenuTrigger);
162
163
  this.transformer = (res) => {
163
164
  this.#rawResultItems = res;
164
165
  const mappedItems = this.#mapToTileData(res.map((i) => new DmsObject(i)));
@@ -220,8 +221,18 @@ class TileListComponent {
220
221
  if (f)
221
222
  this.applyFlavor(f);
222
223
  });
224
+ this.#closeMenuEffect = effect((onCleanup) => {
225
+ const menuComponent = this.menuComponent();
226
+ if (!menuComponent)
227
+ return;
228
+ const closeMenu$ = menuComponent.itemSelect.subscribe(() => {
229
+ this.menuTriggers().forEach((trigger) => trigger.closeMenu());
230
+ });
231
+ onCleanup(() => closeMenu$.unsubscribe());
232
+ });
223
233
  /**
224
234
  * The search query to be executed. This may be a SearchQuery object or a CMIS query statement.
235
+ * Ensure that the query includes the object type ID field to allow proper tile rendering.
225
236
  */
226
237
  this.query = input();
227
238
  this.#preselect = signal([]);
@@ -291,6 +302,7 @@ class TileListComponent {
291
302
  }
292
303
  #busyEffect;
293
304
  #flavorEffect;
305
+ #closeMenuEffect;
294
306
  #preselect;
295
307
  #preselectEffect;
296
308
  #rawResultItems;
@@ -351,6 +363,40 @@ class TileListComponent {
351
363
  if (this.#rawResultItems)
352
364
  this.items.set(this.#mapToTileData(this.#rawResultItems.map((i) => new DmsObject(i))));
353
365
  }
366
+ /**
367
+ * Updates an item in the list at the specified index with the provided value.
368
+ *
369
+ * Use this method for optimistic updates of list items. The updates be removed
370
+ * when the user navigates to another search result page.
371
+ *
372
+ * @param index Index of the item to update.
373
+ * @param value The new value for the item.
374
+ */
375
+ updateListItems(updates) {
376
+ this.list().updateListItems(updates);
377
+ }
378
+ /**
379
+ * Updates the tile list with the provided DmsObjects. Only tiles that are
380
+ * already present in the list will be updated. The update is based on
381
+ * the object ID and will be gone when the user navigates to another search
382
+ * result page. Use this method for optimistic updates.
383
+ * @param listItems The DmsObjects to update the tiles with.
384
+ */
385
+ updateTileList(listItems) {
386
+ const updates = [];
387
+ listItems.forEach((item) => {
388
+ const idx = this.items().findIndex((listItem) => listItem.id === item.id);
389
+ if (idx >= 0 && this.oc) {
390
+ const mappedTileData = this.#mapToTileData([item]);
391
+ updates.push({ index: idx, value: mappedTileData[0] });
392
+ }
393
+ });
394
+ this.updateListItems(updates);
395
+ }
396
+ /**
397
+ * Clears the current selection.
398
+ * @param silent If true, the selectionChange event will not be emitted.
399
+ */
354
400
  clearSelection(silent = false) {
355
401
  if (this._selection.length) {
356
402
  this.list().clear(silent);
@@ -359,6 +405,10 @@ class TileListComponent {
359
405
  this.selectionChange.emit([]);
360
406
  }
361
407
  }
408
+ /**
409
+ * Selects the next item in the list. If the last item is already selected,
410
+ * it wraps around to the first item. Does nothing if no item is currently selected.
411
+ */
362
412
  selectNext() {
363
413
  if (this._lastSelection) {
364
414
  let i = this._lastSelection + 1;
@@ -367,6 +417,10 @@ class TileListComponent {
367
417
  this.#select(i);
368
418
  }
369
419
  }
420
+ /**
421
+ * Selects the previous item in the list. If the first item is already selected,
422
+ * it wraps around to the last item. Does nothing if no item is currently selected.
423
+ */
370
424
  selectPrev() {
371
425
  if (this._lastSelection) {
372
426
  let i = this._lastSelection - 1;
@@ -422,6 +476,9 @@ class TileListComponent {
422
476
  #mapToTileData(objects) {
423
477
  return objects.map((dmsObject) => {
424
478
  const sots = dmsObject.sots || [];
479
+ if (!dmsObject.objectTypeId) {
480
+ throw new Error(`DmsObject with id '${dmsObject.id}' is missing objectTypeId. Please make sure that your query includes the object type ID field.`);
481
+ }
425
482
  let oc = this.oc[dmsObject.objectTypeId];
426
483
  // check if result oitem matches virtual config type
427
484
  const cfgTypes = this.options()?.configTypes || [];
@@ -489,15 +546,6 @@ class TileListComponent {
489
546
  }
490
547
  return item;
491
548
  }
492
- updateTileList(listItems) {
493
- listItems.forEach((item) => {
494
- const idx = this.items().findIndex((listItem) => listItem.id === item.id);
495
- if (idx >= 0 && this.oc) {
496
- const mappedTileData = this.#mapToTileData([item]);
497
- this.items()[idx] = mappedTileData[0];
498
- }
499
- });
500
- }
501
549
  ngOnInit() {
502
550
  this._busy = this.list().busy;
503
551
  this.#objectConfigService
@@ -512,7 +560,7 @@ class TileListComponent {
512
560
  });
513
561
  }
514
562
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TileListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
515
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TileListComponent, isStandalone: true, selector: "yuv-tile-list", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, flavor: { classPropertyName: "flavor", publicName: "flavor", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, preselect: { classPropertyName: "preselect", publicName: "preselect", isSignal: true, isRequired: false, transformFunction: null }, highlights: { classPropertyName: "highlights", publicName: "highlights", isSignal: true, isRequired: false, transformFunction: null }, preventChangeUntil: { classPropertyName: "preventChangeUntil", publicName: "preventChangeUntil", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null }, disableCustomContextMenu: { classPropertyName: "disableCustomContextMenu", publicName: "disableCustomContextMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", tileCopy: "tileCopy", tileCut: "tileCut", busy: "busy", queryResult: "queryResult", selectionChange: "selectionChange", itemDblClick: "itemDblClick", ctxMenu: "ctxMenu" }, host: { listeners: { "keydown.control.c": "onCopy($event)", "keydown.control.x": "onCut($event)" }, properties: { "class.dense": "dense()" } }, providers: [], queries: [{ propertyName: "menuComponent", first: true, predicate: TileActionsMenuComponent, descendants: true, isSignal: true }, { propertyName: "emptyContent", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "<yuv-query-list\n #list\n [query]=\"query()\"\n [transformer]=\"transformer\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [autoSelect]=\"autoSelect()\"\n [pageSize]=\"pageSize()\"\n [multiselect]=\"multiselect()\"\n (itemDoubleClick)=\"onItemDoubleClick($event)\"\n (itemSelect)=\"onListItemsSelect($event)\"\n (queryResult)=\"onQueryResult($event)\"\n>\n\n <ng-template #yuvQueryListItem let-item let-index=\"index\">\n <yuv-list-tile\n [class.dense]=\"dense()\"\n (contextmenu)=\"contextMenuHandler($event, index)\"\n >\n <ng-template #iconSlot><ng-container *yuvRenderer=\"item.icon\"></ng-container></ng-template>\n <ng-template #titleSlot><ng-container *yuvRenderer=\"item.title\"></ng-container></ng-template>\n <ng-template #descriptionSlot><ng-container *yuvRenderer=\"item.description\"></ng-container></ng-template>\n <ng-template #metaSlot><ng-container *yuvRenderer=\"item.meta\"></ng-container></ng-template>\n <ng-template #asideSlot><ng-container *yuvRenderer=\"item.aside\"></ng-container></ng-template>\n <ng-template #actionsSlot>\n @for (a of item.actions; track a.id) {\n <button ymt-icon-button [icon-button-size]=\"'small'\" [matTooltip]=\"a.label\" (click)=\"executeAction(item, a, $event)\">\n <mat-icon inert=\"true\">{{ a.icon }}</mat-icon>\n </button>\n }\n\n @if (menu()) {\n <button ymt-icon-button [icon-button-size]=\"'small'\" [matMenuTriggerFor]=\"menu()\">\n <mat-icon inert=\"true\">more_vert</mat-icon>\n </button>\n }\n <ng-content select=\"yuv-tile-actions-menu, [yuv-tile-actions-menu]\"></ng-content>\n </ng-template>\n <ng-template #extensionSlot> <ng-container *yuvTileExtension=\"{ typeId: item.objectTypeId, data: item.instanceData }\"></ng-container> </ng-template>\n <ng-template #badgesSlot>{{ item.badges }}</ng-template>\n </yuv-list-tile>\n </ng-template>\n\n <ng-template #yuvQueryListEmpty>\n <div class=\"empyt-list\">\n @if (searchExecuted && emptyContent()) {\n <ng-content></ng-content>\n }\n </div>\n </ng-template>\n <div class=\"offset\" (click)=\"clearSelection()\"></div>\n</yuv-query-list>\n", styles: [":host{--paging-background: var(--ymt-surface);display:flex;flex-direction:column}:host yuv-query-list{flex:1;overflow-y:auto;display:flex;flex-flow:column;height:100%}:host yuv-query-list .offset{flex:1 1 auto}:host .empyt-list{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: YuvListModule }, { kind: "component", type: i1.ListTileComponent, selector: "yuv-list-tile" }, { kind: "ngmodule", type: YuvQueryListModule }, { kind: "component", type: i2.QueryListComponent, selector: "yuv-query-list", inputs: ["query", "transformer", "preventChangeUntil", "autoSelect", "pageSize", "enableDragSelect", "multiselect", "selfHandleSelection"], outputs: ["itemSelect", "dragSelectChange", "itemDoubleClick", "queryResult"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }, { kind: "directive", type: TileExtensionDirective, selector: "[yuvTileExtension]", inputs: ["yuvTileExtension"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] }); }
563
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TileListComponent, isStandalone: true, selector: "yuv-tile-list", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, flavor: { classPropertyName: "flavor", publicName: "flavor", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, preselect: { classPropertyName: "preselect", publicName: "preselect", isSignal: true, isRequired: false, transformFunction: null }, highlights: { classPropertyName: "highlights", publicName: "highlights", isSignal: true, isRequired: false, transformFunction: null }, preventChangeUntil: { classPropertyName: "preventChangeUntil", publicName: "preventChangeUntil", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null }, disableCustomContextMenu: { classPropertyName: "disableCustomContextMenu", publicName: "disableCustomContextMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", tileCopy: "tileCopy", tileCut: "tileCut", busy: "busy", queryResult: "queryResult", selectionChange: "selectionChange", itemDblClick: "itemDblClick", ctxMenu: "ctxMenu" }, host: { listeners: { "keydown.control.c": "onCopy($event)", "keydown.control.x": "onCut($event)" }, properties: { "class.dense": "dense()" } }, providers: [], queries: [{ propertyName: "menuComponent", first: true, predicate: TileActionsMenuComponent, descendants: true, isSignal: true }, { propertyName: "emptyContent", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "menuTriggers", predicate: MatMenuTrigger, descendants: true, isSignal: true }], ngImport: i0, template: "<yuv-query-list\n #list\n [query]=\"query()\"\n [transformer]=\"transformer\"\n [preventChangeUntil]=\"preventChangeUntil()\"\n [autoSelect]=\"autoSelect()\"\n [pageSize]=\"pageSize()\"\n [multiselect]=\"multiselect()\"\n (itemDoubleClick)=\"onItemDoubleClick($event)\"\n (itemSelect)=\"onListItemsSelect($event)\"\n (queryResult)=\"onQueryResult($event)\"\n>\n\n <ng-template #yuvQueryListItem let-item let-index=\"index\">\n <yuv-list-tile\n [class.dense]=\"dense()\"\n (contextmenu)=\"contextMenuHandler($event, index)\"\n >\n <ng-template #iconSlot><ng-container *yuvRenderer=\"item.icon\"></ng-container></ng-template>\n <ng-template #titleSlot><ng-container *yuvRenderer=\"item.title\"></ng-container></ng-template>\n <ng-template #descriptionSlot><ng-container *yuvRenderer=\"item.description\"></ng-container></ng-template>\n <ng-template #metaSlot><ng-container *yuvRenderer=\"item.meta\"></ng-container></ng-template>\n <ng-template #asideSlot><ng-container *yuvRenderer=\"item.aside\"></ng-container></ng-template>\n <ng-template #actionsSlot>\n @for (a of item.actions; track a.id) {\n <button ymt-icon-button [icon-button-size]=\"'small'\" [matTooltip]=\"a.label\" (click)=\"executeAction(item, a, $event)\">\n <mat-icon inert=\"true\">{{ a.icon }}</mat-icon>\n </button>\n }\n\n @if (menu()) {\n <button ymt-icon-button [icon-button-size]=\"'small'\" [matMenuTriggerFor]=\"menu()\">\n <mat-icon inert=\"true\">more_vert</mat-icon>\n </button>\n }\n <ng-content select=\"yuv-tile-actions-menu, [yuv-tile-actions-menu]\"></ng-content>\n </ng-template>\n <ng-template #extensionSlot> <ng-container *yuvTileExtension=\"{ typeId: item.objectTypeId, data: item.instanceData }\"></ng-container> </ng-template>\n <ng-template #badgesSlot>{{ item.badges }}</ng-template>\n </yuv-list-tile>\n </ng-template>\n\n <ng-template #yuvQueryListEmpty>\n <div class=\"empyt-list\">\n @if (searchExecuted && emptyContent()) {\n <ng-content></ng-content>\n }\n </div>\n </ng-template>\n <div class=\"offset\" (click)=\"clearSelection()\"></div>\n</yuv-query-list>\n", styles: [":host{--paging-background: var(--ymt-surface);display:flex;flex-direction:column}:host yuv-query-list{flex:1;overflow-y:auto;display:flex;flex-flow:column;height:100%}:host yuv-query-list .offset{flex:1 1 auto}:host .empyt-list{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: YuvListModule }, { kind: "component", type: i1.ListTileComponent, selector: "yuv-list-tile" }, { kind: "ngmodule", type: YuvQueryListModule }, { kind: "component", type: i2.QueryListComponent, selector: "yuv-query-list", inputs: ["query", "idProperty", "transformer", "preventChangeUntil", "autoSelect", "pageSize", "enableDragSelect", "multiselect", "selfHandleSelection"], outputs: ["itemSelect", "dragSelectChange", "itemDoubleClick", "queryResult"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }, { kind: "directive", type: TileExtensionDirective, selector: "[yuvTileExtension]", inputs: ["yuvTileExtension"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] }); }
516
564
  }
517
565
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TileListComponent, decorators: [{
518
566
  type: Component,