1 | {"version":3,"file":"primeng-orderlist.mjs","sources":["../../src/app/components/orderlist/orderlist.ts","../../src/app/components/orderlist/primeng-orderlist.ts"],"sourcesContent":["import {NgModule,Component,ElementRef,AfterViewChecked,AfterContentInit,Input,Output,ContentChildren,QueryList,TemplateRef,EventEmitter,ViewChild,ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ButtonModule} from 'primeng/button';\nimport {SharedModule,PrimeTemplate,FilterService} from 'primeng/api';\nimport {DomHandler} from 'primeng/dom';\nimport {ObjectUtils, UniqueComponentId} from 'primeng/utils';\nimport {RippleModule} from 'primeng/ripple';\nimport {CdkDragDrop, DragDropModule, moveItemInArray} from '@angular/cdk/drag-drop';\n\n@Component({\n selector: 'p-orderList',\n template: `\n <div [ngClass]=\"{'p-orderlist p-component': true, 'p-orderlist-controls-left': controlsPosition === 'left',\n 'p-orderlist-controls-right': controlsPosition === 'right'}\" [ngStyle]=\"style\" [class]=\"styleClass\">\n <div class=\"p-orderlist-controls\">\n <button type=\"button\" pButton pRipple icon=\"pi pi-angle-up\" (click)=\"moveUp()\"></button>\n <button type=\"button\" pButton pRipple icon=\"pi pi-angle-double-up\" (click)=\"moveTop()\"></button>\n <button type=\"button\" pButton pRipple icon=\"pi pi-angle-down\" (click)=\"moveDown()\"></button>\n <button type=\"button\" pButton pRipple icon=\"pi pi-angle-double-down\" (click)=\"moveBottom()\"></button>\n </div>\n <div class=\"p-orderlist-list-container\">\n <div class=\"p-orderlist-header\" *ngIf=\"header || headerTemplate\">\n <div class=\"p-orderlist-title\" *ngIf=\"!headerTemplate\">{{header}}</div>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </div>\n <div class=\"p-orderlist-filter-container\" *ngIf=\"filterBy\">\n <div class=\"p-orderlist-filter\">\n <input type=\"text\" role=\"textbox\" (keyup)=\"onFilterKeyup($event)\" class=\"p-orderlist-filter-input p-inputtext p-component\" [attr.placeholder]=\"filterPlaceholder\" [attr.aria-label]=\"ariaFilterLabel\">\n <span class=\"p-orderlist-filter-icon pi pi-search\"></span>\n </div>\n </div>\n <ul #listelement cdkDropList (cdkDropListDropped)=\"onDrop($event)\" class=\"p-orderlist-list\" [ngStyle]=\"listStyle\">\n <ng-template ngFor [ngForTrackBy]=\"trackBy\" let-item [ngForOf]=\"value\" let-i=\"index\" let-l=\"last\">\n <li class=\"p-orderlist-item\" tabindex=\"0\" [ngClass]=\"{'p-highlight':isSelected(item)}\" cdkDrag pRipple [cdkDragData]=\"item\" [cdkDragDisabled]=\"!dragdrop\"\n (click)=\"onItemClick($event,item,i)\" (touchend)=\"onItemTouchEnd()\" (keydown)=\"onItemKeydown($event,item,i)\"\n *ngIf=\"isItemVisible(item)\" role=\"option\" [attr.aria-selected]=\"isSelected(item)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {$implicit: item, index: i}\"></ng-container>\n </li>\n </ng-template>\n <ng-container *ngIf=\"isEmpty() && (emptyMessageTemplate || emptyFilterMessageTemplate)\">\n <li *ngIf=\"!filterValue || !emptyFilterMessageTemplate\" class=\"p-orderlist-empty-message\">\n <ng-container *ngTemplateOutlet=\"emptyMessageTemplate\"></ng-container>\n </li>\n <li *ngIf=\"filterValue\" class=\"p-orderlist-empty-message\">\n <ng-container *ngTemplateOutlet=\"emptyFilterMessageTemplate\"></ng-container>\n </li>\n </ng-container>\n </ul>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./orderlist.css'],\n host: {\n 'class': 'p-element'\n }\n})\nexport class OrderList implements AfterViewChecked,AfterContentInit {\n\n @Input() header: string;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() listStyle: any;\n\n @Input() responsive: boolean;\n\n @Input() filterBy: string;\n\n @Input() filterPlaceholder: string;\n\n @Input() filterLocale: string;\n\n @Input() metaKeySelection: boolean = true;\n\n @Input() dragdrop: boolean = false;\n\n @Input() controlsPosition: string = 'left';\n\n @Input() ariaFilterLabel: string;\n\n @Input() filterMatchMode: string = \"contains\";\n\n @Input() breakpoint: string = \"960px\";\n\n @Output() selectionChange: EventEmitter<any> = new EventEmitter();\n\n @Input() trackBy: Function = (index: number, item: any) => item;\n\n @Output() onReorder: EventEmitter<any> = new EventEmitter();\n\n @Output() onSelectionChange: EventEmitter<any> = new EventEmitter();\n\n @Output() onFilterEvent: EventEmitter<any> = new EventEmitter();\n\n @ViewChild('listelement') listViewChild: ElementRef;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<any>;\n\n public itemTemplate: TemplateRef<any>;\n\n public headerTemplate: TemplateRef<any>;\n\n public emptyMessageTemplate: TemplateRef<any>;\n\n public emptyFilterMessageTemplate: TemplateRef<any>;\n\n _selection: any[];\n\n movedUp: boolean;\n\n movedDown: boolean;\n\n itemTouched: boolean;\n\n styleElement: any;\n\n id: string = UniqueComponentId();\n\n public filterValue: string;\n\n public visibleOptions: any[];\n\n public _value: any[];\n\n constructor(public el: ElementRef, public cd: ChangeDetectorRef, public filterService: FilterService) {}\n\n get selection(): any[] {\n return this._selection;\n }\n\n @Input() set selection(val:any[]) {\n this._selection = val;\n }\n\n ngOnInit() {\n if (this.responsive) {\n this.createStyle();\n }\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'item':\n this.itemTemplate = item.template;\n break;\n\n case 'empty':\n this.emptyMessageTemplate = item.template;\n break;\n\n case 'emptyfilter':\n this.emptyFilterMessageTemplate = item.template;\n break;\n\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n default:\n this.itemTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewChecked() {\n if (this.movedUp||this.movedDown) {\n let listItems = DomHandler.find(this.listViewChild.nativeElement, 'li.p-highlight');\n let listItem;\n\n if (listItems.length > 0) {\n if (this.movedUp)\n listItem = listItems[0];\n else\n listItem = listItems[listItems.length - 1];\n\n DomHandler.scrollInView(this.listViewChild.nativeElement, listItem);\n }\n this.movedUp = false;\n this.movedDown = false;\n }\n }\n\n get value(): any[] {\n return this._value;\n }\n\n @Input() set value(val:any[]) {\n this._value = val;\n if (this.filterValue) {\n this.filter();\n }\n }\n\n onItemClick(event, item, index) {\n this.itemTouched = false;\n let selectedIndex = ObjectUtils.findIndexInList(item, this.selection);\n let selected = (selectedIndex != -1);\n let metaSelection = this.itemTouched ? false : this.metaKeySelection;\n\n if (metaSelection) {\n let metaKey = (event.metaKey||event.ctrlKey||event.shiftKey);\n\n if (selected && metaKey) {\n this._selection = this._selection.filter((val, index) => index !== selectedIndex);\n }\n else {\n this._selection = (metaKey) ? this._selection ? [...this._selection] : [] : [];\n ObjectUtils.insertIntoOrderedArray(item, index, this._selection, this.value);\n }\n }\n else {\n if (selected) {\n this._selection = this._selection.filter((val, index) => index !== selectedIndex);\n }\n else {\n this._selection = this._selection ? [...this._selection] : [];\n ObjectUtils.insertIntoOrderedArray(item, index, this._selection, this.value);\n }\n }\n\n //binding\n this.selectionChange.emit(this._selection);\n\n //event\n this.onSelectionChange.emit({originalEvent:event, value: this._selection});\n }\n\n onFilterKeyup(event) {\n this.filterValue = event.target.value.trim().toLocaleLowerCase(this.filterLocale);\n this.filter();\n\n this.onFilterEvent.emit({\n originalEvent: event,\n value: this.visibleOptions\n });\n }\n\n filter() {\n let searchFields: string[] = this.filterBy.split(',');\n this.visibleOptions = this.filterService.filter(this.value, searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);\n }\n\n isItemVisible(item: any): boolean {\n if (this.filterValue && this.filterValue.trim().length) {\n for (let i = 0; i < this.visibleOptions.length; i++) {\n if (item == this.visibleOptions[i]) {\n return true;\n }\n }\n }\n else {\n return true;\n }\n }\n\n onItemTouchEnd() {\n this.itemTouched = true;\n }\n\n isSelected(item: any) {\n return ObjectUtils.findIndexInList(item, this.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 if (this.selection) {\n for (let i = 0; i < this.selection.length; i++) {\n let selectedItem = this.selection[i];\n let selectedItemIndex: number = ObjectUtils.findIndexInList(selectedItem, this.value);\n\n if (selectedItemIndex != 0) {\n let movedItem = this.value[selectedItemIndex];\n let temp = this.value[selectedItemIndex-1];\n this.value[selectedItemIndex-1] = movedItem;\n this.value[selectedItemIndex] = temp;\n }\n else {\n break;\n }\n }\n\n if (this.dragdrop && this.filterValue)\n this.filter();\n\n this.movedUp = true;\n this.onReorder.emit(this.selection);\n }\n }\n\n moveTop() {\n if (this.selection) {\n for (let i = this.selection.length - 1; i >= 0; i--) {\n let selectedItem = this.selection[i];\n let selectedItemIndex: number = ObjectUtils.findIndexInList(selectedItem, this.value);\n\n if (selectedItemIndex != 0) {\n let movedItem = this.value.splice(selectedItemIndex,1)[0];\n this.value.unshift(movedItem);\n }\n else {\n break;\n }\n }\n\n if (this.dragdrop && this.filterValue)\n this.filter();\n\n this.onReorder.emit(this.selection);\n this.listViewChild.nativeElement.scrollTop = 0;\n }\n }\n\n moveDown() {\n if (this.selection) {\n for (let i = this.selection.length - 1; i >= 0; i--) {\n let selectedItem = this.selection[i];\n let selectedItemIndex: number = ObjectUtils.findIndexInList(selectedItem, this.value);\n\n if (selectedItemIndex != (this.value.length - 1)) {\n let movedItem = this.value[selectedItemIndex];\n let temp = this.value[selectedItemIndex+1];\n this.value[selectedItemIndex+1] = movedItem;\n this.value[selectedItemIndex] = temp;\n }\n else {\n break;\n }\n }\n\n if (this.dragdrop && this.filterValue)\n this.filter();\n\n this.movedDown = true;\n this.onReorder.emit(this.selection);\n }\n }\n\n moveBottom() {\n if (this.selection) {\n for (let i = 0; i < this.selection.length; i++) {\n let selectedItem = this.selection[i];\n let selectedItemIndex: number = ObjectUtils.findIndexInList(selectedItem, this.value);\n\n if (selectedItemIndex != (this.value.length - 1)) {\n let movedItem = this.value.splice(selectedItemIndex,1)[0];\n this.value.push(movedItem);\n }\n else {\n break;\n }\n }\n\n if (this.dragdrop && this.filterValue)\n this.filter();\n\n this.onReorder.emit(this.selection);\n this.listViewChild.nativeElement.scrollTop = this.listViewChild.nativeElement.scrollHeight;\n }\n }\n\n onDrop(event: CdkDragDrop<string[]>) {\n let previousIndex = event.previousIndex;\n let currentIndex = event.currentIndex;\n\n if (previousIndex !== currentIndex) {\n\n if (this.visibleOptions) {\n if (this.filterValue) {\n previousIndex = ObjectUtils.findIndexInList(event.item.data, this.value);\n currentIndex = ObjectUtils.findIndexInList(this.visibleOptions[currentIndex], this.value);\n }\n\n moveItemInArray(this.visibleOptions, event.previousIndex, event.currentIndex);\n }\n\n moveItemInArray(this.value, previousIndex, currentIndex);\n this.onReorder.emit([event.item.data]);\n }\n }\n\n onItemKeydown(event: KeyboardEvent, item, index: Number) {\n let listItem = <HTMLLIElement> event.currentTarget;\n\n switch(event.which) {\n //down\n case 40:\n var nextItem = this.findNextItem(listItem);\n if (nextItem) {\n nextItem.focus();\n }\n\n event.preventDefault();\n break;\n\n //up\n case 38:\n var prevItem = this.findPrevItem(listItem);\n if (prevItem) {\n prevItem.focus();\n }\n\n event.preventDefault();\n break;\n\n //enter\n case 13:\n this.onItemClick(event, item, index);\n event.preventDefault();\n break;\n }\n }\n\n findNextItem(item) {\n let nextItem = item.nextElementSibling;\n\n if (nextItem)\n return !DomHandler.hasClass(nextItem, 'p-orderlist-item') || DomHandler.isHidden(nextItem) ? this.findNextItem(nextItem) : nextItem;\n else\n return null;\n }\n\n findPrevItem(item) {\n let prevItem = item.previousElementSibling;\n\n if (prevItem)\n return !DomHandler.hasClass(prevItem, 'p-orderlist-item') || DomHandler.isHidden(prevItem) ? this.findPrevItem(prevItem) : prevItem;\n else\n return null;\n }\n\n createStyle() {\n if (!this.styleElement) {\n this.el.nativeElement.children[0].setAttribute(this.id, '');\n this.styleElement = document.createElement('style');\n this.styleElement.type = 'text/css';\n document.head.appendChild(this.styleElement);\n\n let innerHTML = `\n @media screen and (max-width: ${this.breakpoint}) {\n .p-orderlist[${this.id}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.id}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.id}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.id}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n }\n `;\n\n this.styleElement.innerHTML = innerHTML;\n }\n }\n\n destroyStyle() {\n if (this.styleElement) {\n document.head.removeChild(this.styleElement);\n this.styleElement = null;``\n }\n }\n\n ngOnDestroy() {\n this.destroyStyle();\n }\n}\n\n@NgModule({\n imports: [CommonModule,ButtonModule,SharedModule,RippleModule,DragDropModule],\n exports: [OrderList,SharedModule,DragDropModule],\n declarations: [OrderList]\n})\nexport class OrderListModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA0Da,SAAS;IAsElB,YAAmB,EAAc,EAAS,EAAqB,EAAS,aAA4B;QAAjF,OAAE,GAAF,EAAE,CAAY;QAAS,OAAE,GAAF,EAAE,CAAmB;QAAS,kBAAa,GAAb,aAAa,CAAe;QApD3F,qBAAgB,GAAY,IAAI,CAAC;QAEjC,aAAQ,GAAY,KAAK,CAAC;QAE1B,qBAAgB,GAAW,MAAM,CAAC;QAIlC,oBAAe,GAAW,UAAU,CAAC;QAErC,eAAU,GAAW,OAAO,CAAC;QAE5B,oBAAe,GAAsB,IAAI,YAAY,EAAE,CAAC;QAEzD,YAAO,GAAa,CAAC,KAAa,EAAE,IAAS,KAAK,IAAI,CAAC;QAEtD,cAAS,GAAsB,IAAI,YAAY,EAAE,CAAC;QAElD,sBAAiB,GAAsB,IAAI,YAAY,EAAE,CAAC;QAE1D,kBAAa,GAAsB,IAAI,YAAY,EAAE,CAAC;QAwBhE,OAAE,GAAW,iBAAiB,EAAE,CAAC;KAQuE;IAExG,IAAI,SAAS;QACT,OAAO,IAAI,CAA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