{"version":3,"file":"primeng-orderlist.js","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} from 'primeng/utils';\nimport {RippleModule} from 'primeng/ripple';\n\n@Component({\n selector: 'p-orderList',\n template: `\n
\n
\n \n \n \n \n
\n
\n
\n
{{header}}
\n
\n
\n
\n \n \n
\n
\n \n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./orderlist.css']\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;\n\n @Input() controlsPosition: string = 'left';\n\n @Input() ariaFilterLabel: string;\n\n @Input() filterMatchMode: string = \"contains\";\n\n @Output() selectionChange: EventEmitter = new EventEmitter();\n\n @Input() trackBy: Function = (index: number, item: any) => item;\n\n @Output() onReorder: EventEmitter = new EventEmitter();\n\n @Output() onSelectionChange: EventEmitter = new EventEmitter();\n\n @Output() onFilterEvent: EventEmitter = new EventEmitter();\n\n @ViewChild('listelement') listViewChild: ElementRef;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n public itemTemplate: TemplateRef;\n\n _selection: any[];\n\n movedUp: boolean;\n\n movedDown: boolean;\n\n itemTouched: boolean;\n\n draggedItemIndex: number;\n\n dragOverItemIndex: number;\n\n dragging: boolean;\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 ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'item':\n this.itemTemplate = 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(event) {\n this.itemTouched = true;\n }\n\n isSelected(item: any) {\n return ObjectUtils.findIndexInList(item, this.selection) != -1;\n }\n\n moveUp(event) {\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 this.movedUp = true;\n this.onReorder.emit(event);\n }\n }\n\n moveTop(event) {\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 this.onReorder.emit(event);\n this.listViewChild.nativeElement.scrollTop = 0;\n }\n }\n\n moveDown(event) {\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 this.movedDown = true;\n this.onReorder.emit(event);\n }\n }\n\n moveBottom(event) {\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 this.onReorder.emit(event);\n this.listViewChild.nativeElement.scrollTop = this.listViewChild.nativeElement.scrollHeight;\n }\n }\n\n onDragStart(event: DragEvent, index: number) {\n event.dataTransfer.setData('text', 'b'); // For firefox\n ( event.target).blur();\n this.dragging = true;\n this.draggedItemIndex = index;\n }\n\n onDragOver(event: DragEvent, index: number) {\n if (this.dragging && this.draggedItemIndex !== index && this.draggedItemIndex + 1 !== index) {\n this.dragOverItemIndex = index;\n event.preventDefault();\n }\n }\n\n onDragLeave(event: DragEvent) {\n this.dragOverItemIndex = null;\n }\n\n onDrop(event: DragEvent, index: number) {\n let dropIndex = (this.draggedItemIndex > index) ? index : (index === 0) ? 0 : index - 1;\n ObjectUtils.reorderArray(this.value, this.draggedItemIndex, dropIndex);\n this.dragOverItemIndex = null;\n this.onReorder.emit(event);\n event.preventDefault();\n }\n\n onDragEnd(event: DragEvent) {\n this.dragging = false;\n }\n\n onListMouseMove(event: MouseEvent) {\n if (this.dragging) {\n let offsetY = this.listViewChild.nativeElement.getBoundingClientRect().top + document.body.scrollTop;\n let bottomDiff = (offsetY + this.listViewChild.nativeElement.clientHeight) - event.pageY;\n let topDiff = (event.pageY - offsetY);\n if (bottomDiff < 25 && bottomDiff > 0)\n this.listViewChild.nativeElement.scrollTop += 15;\n else if (topDiff < 25 && topDiff > 0)\n this.listViewChild.nativeElement.scrollTop -= 15;\n }\n }\n\n onItemKeydown(event: KeyboardEvent, item, index: Number) {\n let listItem = 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\n@NgModule({\n imports: [CommonModule,ButtonModule,SharedModule,RippleModule],\n exports: [OrderList,SharedModule],\n declarations: [OrderList]\n})\nexport class OrderListModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAkDa,SAAS;IAgElB,YAAmB,EAAc,EAAS,EAAqB,EAAS,aAA4B;QAAjF,OAAE,GAAF,EAAE,CAAY;QAAS,OAAE,GAAF,EAAE,CAAmB;QAAS,kBAAa,GAAb,aAAa,CAAe;QA9C3F,qBAAgB,GAAY,IAAI,CAAC;QAIjC,qBAAgB,GAAW,MAAM,CAAC;QAIlC,oBAAe,GAAW,UAAU,CAAC;QAEpC,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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