UNPKG

primeng

Version:

PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,

1 lines 62.6 kB
{"version":3,"file":"primeng-orderlist.mjs","sources":["../../src/orderlist/style/orderliststyle.ts","../../src/orderlist/orderlist.ts","../../src/orderlist/primeng-orderlist.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style } from '@primeuix/styles/orderlist';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = /*css*/ `\n ${style}\n\n /* For PrimeNG */\n .p-orderlist-controls-right .p-orderlist-controls {\n order: 2;\n }\n`;\n\nconst classes = {\n root: ({ instance }) => ['p-orderlist p-component', { 'p-orderlist-controls-left': instance.controlsPosition() === 'left', 'p-orderlist-controls-right': instance.controlsPosition() === 'right' }],\n controls: 'p-orderlist-controls'\n};\n\n@Injectable()\nexport class OrderListStyle extends BaseStyle {\n name = 'orderlist';\n\n style = theme;\n\n classes = classes;\n}\n\n/**\n *\n * OrderList is used to maneged the order of a collection.\n *\n * [Live Demo](https://primeng.dev/orderlist)\n *\n * @module orderliststyle\n *\n */\n\nexport enum OrderListClasses {\n /**\n * Class name of the root element\n */\n root = 'p-orderlist',\n /**\n * Class name of the controls element\n */\n controls = 'p-orderlist-controls'\n}\n\nexport interface OrderListStyle extends BaseStyle {}\n","import { CdkDragDrop, DragDropModule } from '@angular/cdk/drag-drop';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n model,\n NgModule,\n numberAttribute,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { findIndexInList, setAttribute, uuid } from '@primeuix/utils';\nimport { FilterMatchModeType, FilterService } from 'primeng/api';\nimport { BaseComponent, PARENT_INSTANCE } from 'primeng/basecomponent';\nimport { Bind } from 'primeng/bind';\nimport { ButtonDirective } from 'primeng/button';\nimport type { ButtonDirectiveOptions } from 'primeng/types/button';\nimport { AngleDoubleDown as AngleDoubleDownIcon } from '@primeicons/angular/angle-double-down';\nimport { AngleDoubleUp as AngleDoubleUpIcon } from '@primeicons/angular/angle-double-up';\nimport { AngleDown as AngleDownIcon } from '@primeicons/angular/angle-down';\nimport { AngleUp as AngleUpIcon } from '@primeicons/angular/angle-up';\nimport { Listbox, ListboxChangeEvent } from 'primeng/listbox';\nimport type { CSSProperties } from 'primeng/types/shared';\nimport type { OrderListControlsPosition } from 'primeng/types/orderlist';\nimport { OrderListFilterEvent, OrderListFilterOptions, OrderListFilterTemplateContext, OrderListItemTemplateContext, OrderListPassThrough, OrderListSelectionChangeEvent } from 'primeng/types/orderlist';\nimport { OrderListStyle } from './style/orderliststyle';\n\nconst ORDERLIST_INSTANCE = new InjectionToken<OrderList>('ORDERLIST_INSTANCE');\n\n/**\n * OrderList is used to manage the order of a collection.\n * @group Components\n */\n@Component({\n selector: 'p-orderlist, p-order-list',\n standalone: true,\n imports: [NgTemplateOutlet, ButtonDirective, DragDropModule, AngleDoubleDownIcon, AngleDoubleUpIcon, AngleUpIcon, AngleDownIcon, Listbox, FormsModule, Bind],\n template: `\n <div [pBind]=\"ptm('controls')\" [class]=\"cx('controls')\">\n <button [pButton]=\"upButtonProps()\" [disabled]=\"$moveDisabled()\" [attr.aria-label]=\"moveUpAriaLabel()\" (click)=\"moveUp()\" [pButtonPT]=\"ptm('pcMoveUpButton')\" [pButtonUnstyled]=\"unstyled()\" hostName=\"orderlist\">\n @if (!moveUpIconTemplate()) {\n <svg data-p-icon=\"angle-up\" [pBind]=\"ptm('pcMoveUpButton')['icon']\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"moveUpIconTemplate()\" />\n }\n </button>\n <button [pButton]=\"topButtonProps()\" [disabled]=\"$moveDisabled()\" [attr.aria-label]=\"moveTopAriaLabel()\" (click)=\"moveTop()\" [pButtonPT]=\"ptm('pcMoveTopButton')\" [pButtonUnstyled]=\"unstyled()\" hostName=\"orderlist\">\n @if (!moveTopIconTemplate()) {\n <svg data-p-icon=\"angle-double-up\" [pBind]=\"ptm('pcMoveTopButton')['icon']\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"moveTopIconTemplate()\" />\n }\n </button>\n <button [pButton]=\"downButtonProps()\" [disabled]=\"$moveDisabled()\" [attr.aria-label]=\"moveDownAriaLabel()\" (click)=\"moveDown()\" [pButtonPT]=\"ptm('pcMoveDownButton')\" [pButtonUnstyled]=\"unstyled()\" hostName=\"orderlist\">\n @if (!moveDownIconTemplate()) {\n <svg data-p-icon=\"angle-down\" [pBind]=\"ptm('pcMoveDownButton')['icon']\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"moveDownIconTemplate()\" />\n }\n </button>\n <button [pButton]=\"bottomButtonProps()\" [disabled]=\"$moveDisabled()\" [attr.aria-label]=\"moveBottomAriaLabel()\" (click)=\"moveBottom()\" [pButtonPT]=\"ptm('pcMoveBottomButton')\" [pButtonUnstyled]=\"unstyled()\" hostName=\"orderlist\">\n @if (!moveBottomIconTemplate()) {\n <svg data-p-icon=\"angle-double-down\" [pBind]=\"ptm('pcMoveBottomButton')['icon']\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"moveBottomIconTemplate()\" />\n }\n </button>\n </div>\n <p-listbox\n [pt]=\"ptm('pcListbox')\"\n #listelement\n [multiple]=\"true\"\n [options]=\"value()\"\n [(ngModel)]=\"d_selection\"\n [optionLabel]=\"$optionLabel()\"\n [id]=\"id + '_list'\"\n [listStyle]=\"listStyle()\"\n [striped]=\"stripedRows()\"\n [tabindex]=\"tabindex()\"\n (onFocus)=\"onListFocus($event)\"\n (onBlur)=\"onListBlur($event)\"\n (onChange)=\"onChangeSelection($event)\"\n [ariaLabel]=\"ariaLabel()\"\n [disabled]=\"disabled()\"\n [metaKeySelection]=\"metaKeySelection()\"\n [scrollHeight]=\"scrollHeight()\"\n [autoOptionFocus]=\"autoOptionFocus()\"\n [filter]=\"filterBy()\"\n [filterBy]=\"filterBy()\"\n [filterLocale]=\"filterLocale()\"\n [filterPlaceHolder]=\"filterPlaceholder()\"\n [dragdrop]=\"dragdrop()\"\n (onDrop)=\"onDrop($event)\"\n hostName=\"orderlist\"\n [unstyled]=\"unstyled()\"\n >\n @if (headerTemplate() || _headerText()) {\n <ng-template #header>\n @if (headerTemplate()) {\n <ng-template *ngTemplateOutlet=\"headerTemplate()\" />\n } @else {\n <span>{{ _headerText() }}</span>\n }\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template #item let-option let-selected=\"selected\" let-index=\"index\">\n <ng-template *ngTemplateOutlet=\"itemTemplate(); context: { $implicit: option, selected: selected, index: index }\" />\n </ng-template>\n }\n @if (emptyMessageTemplate()) {\n <ng-template #empty>\n <ng-template *ngTemplateOutlet=\"emptyMessageTemplate()\" />\n </ng-template>\n }\n @if (emptyFilterMessageTemplate()) {\n <ng-template #emptyfilter>\n <ng-template *ngTemplateOutlet=\"emptyFilterMessageTemplate()\" />\n </ng-template>\n }\n @if (filterIconTemplate()) {\n <ng-template #filtericon>\n <ng-template *ngTemplateOutlet=\"filterIconTemplate()\" />\n </ng-template>\n }\n @if (filterTemplate()) {\n <ng-template #filter let-options=\"options\">\n <ng-template *ngTemplateOutlet=\"filterTemplate(); context: { options: options }\" />\n </ng-template>\n }\n </p-listbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [OrderListStyle, { provide: ORDERLIST_INSTANCE, useExisting: OrderList }, { provide: PARENT_INSTANCE, useExisting: OrderList }],\n host: {\n '[class]': \"cx('root')\"\n },\n hostDirectives: [Bind]\n})\nexport class OrderList extends BaseComponent<OrderListPassThrough> {\n componentName = 'OrderList';\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n $pcOrderList: OrderList | undefined = inject(ORDERLIST_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n onAfterViewChecked() {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n /**\n * Text for the caption.\n * @group Props\n */\n header = input<string>();\n\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n tabindex = input(undefined, { transform: numberAttribute });\n\n /**\n * Defines a string that labels the input for accessibility.\n * @group Props\n */\n ariaLabel = input<string>();\n\n /**\n * Specifies one or more IDs in the DOM that labels the input field.\n * @group Props\n */\n ariaLabelledBy = input<string>();\n\n /**\n * Inline style of the list element.\n * @group Props\n */\n listStyle = input<CSSProperties>();\n\n /**\n * A boolean value that indicates whether the component should be responsive.\n * @group Props\n */\n responsive = input(false, { transform: booleanAttribute });\n\n /**\n * When specified displays an input field to filter the items on keyup and decides which fields to search against.\n * @group Props\n */\n filterBy = input<string>();\n\n /**\n * Placeholder of the filter input.\n * @group Props\n */\n filterPlaceholder = input<string>();\n\n /**\n * Locale to use in filtering. The default locale is the host environment's current locale.\n * @group Props\n */\n filterLocale = input<string>();\n\n /**\n * When true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.\n * @group Props\n */\n metaKeySelection = input(false, { transform: booleanAttribute });\n\n /**\n * Whether to enable dragdrop based reordering.\n * @group Props\n */\n dragdrop = input(false, { transform: booleanAttribute });\n\n /**\n * Defines the location of the buttons with respect to the list.\n * @group Props\n */\n controlsPosition = input<OrderListControlsPosition>('left');\n\n /**\n * Defines a string that labels the filter input.\n * @group Props\n */\n ariaFilterLabel = input<string>();\n\n /**\n * Defines how the items are filtered.\n * @group Props\n */\n filterMatchMode = input<FilterMatchModeType>('contains');\n\n /**\n * Indicates the width of the screen at which the component should change its behavior.\n * @group Props\n */\n breakpoint = input('960px');\n\n /**\n * Whether to displays rows with alternating colors.\n * @group Props\n */\n stripedRows = input(false, { transform: booleanAttribute });\n\n /**\n * When present, it specifies that the component should be disabled.\n * @group Props\n */\n disabled = input(false, { transform: booleanAttribute });\n\n /**\n * Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity.\n * @group Props\n */\n trackBy = input<Function>((index: number, item: any) => item);\n\n /**\n * Height of the viewport, a scrollbar is defined if height of list exceeds this value.\n * @group Props\n */\n scrollHeight = input('14rem');\n\n /**\n * Whether to focus on the first visible or selected element.\n * @group Props\n */\n autoOptionFocus = input(true, { transform: booleanAttribute });\n\n /**\n * Name of the field that uniquely identifies the record in the data.\n * @group Props\n */\n dataKey = input<string>();\n\n /**\n * A list of values that are currently selected.\n * @group Props\n */\n selection = model<any[]>([]);\n\n /**\n * Array of values to be displayed in the component.\n * It represents the data source for the list of items.\n * @group Props\n */\n value = model<any[] | undefined>();\n\n /**\n * Configuration object forwarded to the Button component.\n * @group Props\n */\n buttonProps = input<ButtonDirectiveOptions>({ severity: 'secondary' });\n\n /**\n * Configuration object forwarded to the move up button inside the component.\n * @group Props\n */\n moveUpButtonProps = input<ButtonDirectiveOptions>();\n\n /**\n * Configuration object forwarded to the move top button inside the component.\n * @group Props\n */\n moveTopButtonProps = input<ButtonDirectiveOptions>();\n\n /**\n * Configuration object forwarded to the move down button inside the component.\n * @group Props\n */\n moveDownButtonProps = input<ButtonDirectiveOptions>();\n\n /**\n * Configuration object forwarded to the move bottom button inside the component.\n * @group Props\n */\n moveBottomButtonProps = input<ButtonDirectiveOptions>();\n\n /**\n * Callback to invoke when list is reordered.\n * @param {*} any - list instance.\n * @group Emits\n */\n onReorder = output<any>();\n\n /**\n * Callback to invoke when selection changes.\n * @param {OrderListSelectionChangeEvent} event - Custom change event.\n * @group Emits\n */\n onSelectionChange = output<OrderListSelectionChangeEvent>();\n\n /**\n * Callback to invoke when filtering occurs.\n * @param {OrderListFilterEvent} event - Custom filter event.\n * @group Emits\n */\n onFilterEvent = output<OrderListFilterEvent>();\n\n /**\n * Callback to invoke when the list is focused\n * @param {Event} event - Browser event.\n * @group Emits\n */\n onFocus = output<Event>();\n\n /**\n * Callback to invoke when the list is blurred\n * @param {Event} event - Browser event.\n * @group Emits\n */\n onBlur = output<Event>();\n\n listViewChild = viewChild.required<Listbox>('listelement');\n\n filterViewChild = viewChild<ElementRef>('filter');\n\n /**\n * Custom item template.\n * @param {OrderListItemTemplateContext} context - item context.\n * @see {@link OrderListItemTemplateContext}\n * @group Templates\n */\n itemTemplate = contentChild<TemplateRef<OrderListItemTemplateContext>>('item', { descendants: false });\n\n /**\n * Custom empty template.\n * @group Templates\n */\n emptyMessageTemplate = contentChild<TemplateRef<void>>('empty', { descendants: false });\n\n /**\n * Custom empty filter template.\n * @group Templates\n */\n emptyFilterMessageTemplate = contentChild<TemplateRef<void>>('emptyfilter', { descendants: false });\n\n /**\n * Custom filter template.\n * @param {OrderListFilterTemplateContext} context - filter context.\n * @see {@link OrderListFilterTemplateContext}\n * @group Templates\n */\n filterTemplate = contentChild<TemplateRef<OrderListFilterTemplateContext>>('filter', { descendants: false });\n\n /**\n * Custom header template.\n * @group Templates\n */\n headerTemplate = contentChild<TemplateRef<void>>('header', { descendants: false });\n\n /**\n * Custom move up icon template.\n * @group Templates\n */\n moveUpIconTemplate = contentChild<TemplateRef<void>>('moveupicon', { descendants: false });\n\n /**\n * Custom move top icon template.\n * @group Templates\n */\n moveTopIconTemplate = contentChild<TemplateRef<void>>('movetopicon', { descendants: false });\n\n /**\n * Custom move down icon template.\n * @group Templates\n */\n moveDownIconTemplate = contentChild<TemplateRef<void>>('movedownicon', { descendants: false });\n\n /**\n * Custom move bottom icon template.\n * @group Templates\n */\n moveBottomIconTemplate = contentChild<TemplateRef<void>>('movebottomicon', { descendants: false });\n\n /**\n * Custom filter icon template.\n * @group Templates\n */\n filterIconTemplate = contentChild<TemplateRef<void>>('filtericon', { descendants: false });\n\n private translation = toSignal(this.config.translationObserver, { initialValue: this.config.translation });\n\n moveUpAriaLabel = computed(() => this.translation()?.aria?.moveUp);\n\n moveTopAriaLabel = computed(() => this.translation()?.aria?.moveTop);\n\n moveDownAriaLabel = computed(() => this.translation()?.aria?.moveDown);\n\n moveBottomAriaLabel = computed(() => this.translation()?.aria?.moveBottom);\n\n upButtonProps = computed(() => ({ ...this.buttonProps(), ...this.moveUpButtonProps() }));\n\n topButtonProps = computed(() => ({ ...this.buttonProps(), ...this.moveTopButtonProps() }));\n\n downButtonProps = computed(() => ({ ...this.buttonProps(), ...this.moveDownButtonProps() }));\n\n bottomButtonProps = computed(() => ({ ...this.buttonProps(), ...this.moveBottomButtonProps() }));\n\n _headerText = computed(() => this.header());\n\n $optionLabel = computed(() => this.dataKey() ?? 'name');\n\n $moveDisabled = computed(() => this.disabled() || !this.selection()?.length);\n\n _componentStyle = inject(OrderListStyle);\n\n filterOptions: OrderListFilterOptions | undefined;\n\n d_selection: any[] = [];\n\n movedUp: boolean | undefined;\n\n movedDown: boolean | undefined;\n\n itemTouched: boolean | undefined;\n\n styleElement: any;\n\n id: string = uuid('pn_id_');\n\n filterValue = signal<string | null>(null);\n\n visibleOptions = signal<any[] | null>(null);\n\n filterService = inject(FilterService);\n\n constructor() {\n super();\n\n effect(() => {\n this.d_selection = this.selection();\n });\n\n effect(() => {\n const val = this.value();\n untracked(() => {\n if (this.filterValue()) {\n this.filter();\n } else if (this.dragdrop()) {\n this.visibleOptions.set([...(val || [])]);\n }\n });\n });\n }\n\n onInit() {\n if (this.responsive()) {\n this.createStyle();\n }\n\n if (this.filterBy()) {\n this.filterOptions = {\n filter: (value) => this.onFilterKeyup(value),\n reset: () => this.resetFilter()\n };\n }\n\n // Initialize visibleOptions for drag&drop if enabled and value exists\n if (this.dragdrop() && this.value() && !this.visibleOptions()) {\n this.visibleOptions.set([...this.value()!]);\n }\n }\n\n onChangeSelection(e: ListboxChangeEvent) {\n this.d_selection = e.value;\n this.selection.set(e.value);\n this.onSelectionChange.emit({ originalEvent: e.originalEvent, value: e.value });\n }\n\n onFilterKeyup(event: KeyboardEvent) {\n this.filterValue.set(((<HTMLInputElement>event.target).value.trim() as any).toLocaleLowerCase(this.filterLocale()));\n this.filter();\n\n this.onFilterEvent.emit({\n originalEvent: event,\n value: this.visibleOptions() as any[]\n });\n }\n\n filter() {\n let searchFields: string[] = (this.filterBy() as string).split(',');\n this.visibleOptions.set(this.filterService.filter(this.value() as any[], searchFields, this.filterValue(), this.filterMatchMode(), this.filterLocale()));\n }\n\n /**\n * Callback to invoke on filter reset.\n * @group Method\n */\n public resetFilter() {\n this.filterValue.set('');\n const filterEl = this.filterViewChild();\n if (filterEl) {\n (<HTMLInputElement>filterEl.nativeElement).value = '';\n }\n }\n\n isItemVisible(item: any): boolean | undefined {\n if (this.filterValue() && this.filterValue()!.trim().length) {\n for (let i = 0; i < (this.visibleOptions() as any[]).length; i++) {\n if (item == (this.visibleOptions() as any[])[i]) {\n return true;\n }\n }\n } else {\n return true;\n }\n }\n\n isSelected(item: any) {\n return findIndexInList(item, this.d_selection) !== -1;\n }\n\n isEmpty() {\n return this.filterValue() ? !this.visibleOptions() || this.visibleOptions()!.length === 0 : !this.value() || this.value()!.length === 0;\n }\n\n moveUp() {\n const sel = this.selection();\n const val = this.value();\n if (sel && val instanceof Array) {\n // Sort selection by their current index to process them from top to bottom\n const sortedSelection = this.sortByIndexInList(sel, val);\n\n for (let selectedItem of sortedSelection) {\n let selectedItemIndex: number = findIndexInList(selectedItem, val);\n // Move up only when the slot above is free. If the item directly above is\n // also selected it is already pinned, so swapping would just reshuffle the\n // selected items among themselves at the top boundary.\n if (selectedItemIndex > 0 && !this.isSelected(val[selectedItemIndex - 1])) {\n let movedItem = val[selectedItemIndex];\n let temp = val[selectedItemIndex - 1];\n val[selectedItemIndex - 1] = movedItem;\n val[selectedItemIndex] = temp;\n }\n // Don't break - continue with other items even if one can't move\n }\n\n this.value.set([...val]);\n this.movedUp = true;\n this.onReorder.emit(sel);\n this.scrollInViewSelection('up');\n }\n }\n\n moveTop() {\n const sel = this.selection();\n const val = this.value();\n if (sel && val instanceof Array) {\n // Process from the bottom-most selected item upwards so unshift preserves the\n // original relative order of the selected items once they reach the top.\n const sortedSelection = this.sortByIndexInList(sel, val);\n\n for (let i = sortedSelection.length - 1; i >= 0; i--) {\n let selectedItemIndex: number = findIndexInList(sortedSelection[i], val);\n\n if (selectedItemIndex > 0) {\n let movedItem = val.splice(selectedItemIndex, 1)[0];\n val.unshift(movedItem);\n }\n }\n\n this.value.set([...val]);\n this.onReorder.emit(sel);\n setTimeout(() => {\n this.listViewChild().scrollInView(0);\n });\n }\n }\n\n moveDown() {\n const sel = this.selection();\n const val = this.value();\n if (sel && val instanceof Array) {\n const sortedSelection = this.sortByIndexInList(sel, val).reverse();\n\n for (let selectedItem of sortedSelection) {\n let selectedItemIndex: number = findIndexInList(selectedItem, val);\n // Move down only when the slot below is free. If the item directly below is\n // also selected it is already pinned, so swapping would just reshuffle the\n // selected items among themselves at the bottom boundary.\n if (selectedItemIndex < val.length - 1 && !this.isSelected(val[selectedItemIndex + 1])) {\n let movedItem = val[selectedItemIndex];\n let temp = val[selectedItemIndex + 1];\n val[selectedItemIndex + 1] = movedItem;\n val[selectedItemIndex] = temp;\n }\n }\n\n this.value.set([...val]);\n this.movedDown = true;\n this.onReorder.emit(sel);\n this.scrollInViewSelection('down');\n }\n }\n\n moveBottom() {\n const sel = this.selection();\n const val = this.value();\n if (sel && val instanceof Array) {\n // Process from the top-most selected item downwards so push preserves the original\n // relative order of the selected items once they reach the bottom.\n const sortedSelection = this.sortByIndexInList(sel, val);\n\n for (let i = 0; i < sortedSelection.length; i++) {\n let selectedItemIndex: number = findIndexInList(sortedSelection[i], val);\n\n if (selectedItemIndex !== val.length - 1) {\n let movedItem = val.splice(selectedItemIndex, 1)[0];\n val.push(movedItem);\n }\n }\n\n this.value.set([...val]);\n this.onReorder.emit(sel);\n const bottomIndex = val.length ? val.length - 1 : 0;\n setTimeout(() => {\n this.listViewChild()?.scrollInView(bottomIndex);\n });\n }\n }\n\n onDrop(event: CdkDragDrop<string[]>) {\n if (event.previousIndex === event.currentIndex) {\n return;\n }\n\n const val = this.value();\n const sel = this.selection();\n const originalValue = [...(val || [])];\n const isMultiSelection = sel && sel.length > 1 && findIndexInList(event.item.data, sel) !== -1;\n\n // Listbox already performed single-item moveItemInArray in its drop() handler\n // and updated its _options. For single-item drag, adopt its result directly.\n if (!isMultiSelection) {\n const reordered = this.listViewChild()._options();\n this.value.set([...reordered]);\n this.onReorder.emit([event.item.data]);\n return;\n }\n\n // Multi-selection: undo Listbox's single-item move and reorder all selected items\n if (val) {\n val.length = 0;\n val.push(...originalValue);\n }\n\n // Map CDK drop index to real index when filtering\n let currentIndex = event.currentIndex;\n const listboxFilterValue = this.listViewChild()._filterValue?.();\n if (listboxFilterValue && this.filterBy()) {\n const filterFields = (this.filterBy() as string).split(',');\n const filtered = this.filterService.filter(originalValue, filterFields, listboxFilterValue, this.filterMatchMode(), this.filterLocale());\n currentIndex = findIndexInList(filtered[event.currentIndex], originalValue);\n }\n\n let itemsToMove = this.sortByIndexInList([...sel], val || []);\n\n // CDK's currentIndex is relative to the list with the dragged item removed.\n // When dragging downward, add 1 to convert to an insertion point in the original array.\n const draggedIndex = findIndexInList(event.item.data, val || []);\n const insertionPoint = draggedIndex < currentIndex ? currentIndex + 1 : currentIndex;\n\n let itemsBefore = 0;\n for (const item of itemsToMove) {\n const itemIndex = findIndexInList(item, val || []);\n if (itemIndex !== -1 && itemIndex < insertionPoint) {\n itemsBefore++;\n }\n }\n\n for (let i = itemsToMove.length - 1; i >= 0; i--) {\n const itemIndex = findIndexInList(itemsToMove[i], val || []);\n if (itemIndex !== -1) {\n val?.splice(itemIndex, 1);\n }\n }\n\n const targetIndex = Math.max(0, insertionPoint - itemsBefore);\n for (let i = 0; i < itemsToMove.length; i++) {\n val?.splice(targetIndex + i, 0, itemsToMove[i]);\n }\n this.value.set([...(val || [])]);\n this.onReorder.emit(itemsToMove);\n }\n\n /**\n * Scrolls the list so the moved selection stays visible. For an upward move the topmost\n * selected item is revealed, for a downward move the bottommost one, mirroring the behavior\n * of moveTop/moveBottom.\n */\n private scrollInViewSelection(direction: 'up' | 'down') {\n const val = this.value();\n const sel = this.selection();\n if (!val?.length || !sel?.length) {\n return;\n }\n\n const indexes = sel.map((item) => findIndexInList(item, val)).filter((index) => index !== -1);\n if (!indexes.length) {\n return;\n }\n\n const targetIndex = direction === 'up' ? Math.min(...indexes) : Math.max(...indexes);\n setTimeout(() => {\n this.listViewChild()?.scrollInView(targetIndex);\n });\n }\n\n // Helper method to sort items by their index in a list (without mutating the input)\n private sortByIndexInList(items: any[], list: any[]): any[] {\n return [...items].sort((a, b) => {\n const indexA = findIndexInList(a, list);\n const indexB = findIndexInList(b, list);\n return indexA - indexB;\n });\n }\n\n onListFocus(event: any) {\n this.onFocus.emit(event);\n }\n\n onListBlur(event: any) {\n this.onBlur.emit(event);\n }\n\n getVisibleOptions() {\n const vo = this.visibleOptions();\n const val = this.value();\n return vo && vo.length > 0 ? vo : val && val.length > 0 ? val : null;\n }\n\n createStyle() {\n if (isPlatformBrowser(this.platformId)) {\n if (!this.styleElement) {\n this.renderer.setAttribute(this.el.nativeElement.children[0], this.id, '');\n this.styleElement = this.renderer.createElement('style');\n this.renderer.setAttribute(this.styleElement, 'type', 'text/css');\n setAttribute(this.styleElement, 'nonce', this.config?.csp()?.nonce);\n this.renderer.appendChild(this.document.head, this.styleElement);\n\n let innerHTML = `\n @media screen and (max-width: ${this.breakpoint()}) {\n .p-orderlist[${this.$attrSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.$attrSelector}] .p-orderlist-controls {\n padding: var(--px-content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.$attrSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--px-inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.$attrSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n }\n `;\n this.renderer.setProperty(this.styleElement, 'innerHTML', innerHTML);\n setAttribute(this.styleElement, 'nonce', this.config?.csp()?.nonce);\n }\n }\n }\n\n destroyStyle() {\n if (isPlatformBrowser(this.platformId)) {\n if (this.styleElement) {\n this.renderer.removeChild(this.document, this.styleElement);\n this.styleElement = null;\n ``;\n }\n }\n }\n\n onDestroy() {\n this.destroyStyle();\n }\n}\n\n@NgModule({\n imports: [OrderList],\n exports: [OrderList]\n})\nexport class OrderListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["AngleDoubleDownIcon","AngleDoubleUpIcon","AngleUpIcon","AngleDownIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChB,KAAK;;;;;;CAMV;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,yBAAyB,EAAE,EAAE,2BAA2B,EAAE,QAAQ,CAAC,gBAAgB,EAAE,KAAK,MAAM,EAAE,4BAA4B,EAAE,QAAQ,CAAC,gBAAgB,EAAE,KAAK,OAAO,EAAE,CAAC;AACnM,IAAA,QAAQ,EAAE;CACb;AAGK,MAAO,cAAe,SAAQ,SAAS,CAAA;IACzC,IAAI,GAAG,WAAW;IAElB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAd,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;AASD;;;;;;;;AAQG;IAES;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AACxB;;AAEG;AACH,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,aAAoB;AACpB;;AAEG;AACH,IAAA,gBAAA,CAAA,UAAA,CAAA,GAAA,sBAAiC;AACrC,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;ACI5B,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAAY,oBAAoB,CAAC;AAE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