UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

2 lines (1 loc) 25.3 kB
this.primevue=this.primevue||{},this.primevue.picklist=function(e,t,i,o,l,n,s,r,a,d,c,p,u){"use strict";function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(e),v=m(t),g=m(i),f=m(o),b=m(l),k=m(n),y=m(s),$=m(r),I=m(a),w=m(d),D=m(c),L={name:"PickList",extends:h.default,emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],props:{modelValue:{type:Array,default:()=>[[],[]]},selection:{type:Array,default:()=>[[],[]]},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||p.UniqueComponentId()},selection(e){this.d_selection=e},breakpoint(e){this.destroyMedia(),this.initMedia()}},updated(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount(){this.destroyStyle(),this.destroyMedia()},mounted(){this.id=this.id||p.UniqueComponentId(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey(e,t){return this.dataKey?p.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions(e,t){return this.ptm(t,{context:{active:this.isSelected(e),focused:this.id===this.focusedOptionId}})},isSelected(e,t){return-1!=p.ObjectUtils.findIndexInList(e,this.d_selection[t])},onListFocus(e,t){const i=p.DomHandler.findSingle(this.$refs[t].$el,"li.p-picklist-item.p-highlight"),o=p.ObjectUtils.findIndexInList(i,this.$refs[t].$el.children);this.focused[t]=!0;const l=-1!==this.focusedOptionIndex?this.focusedOptionIndex:i?o:-1;this.changeFocusedOptionIndex(l,t),this.$emit("focus",e)},onListBlur(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown(e,t){this.focused[t]=!0,this.focusedOptionIndex=e},moveUp(e,t){if(this.d_selection&&this.d_selection[t]){let i=[...this.modelValue[t]],o=this.d_selection[t];for(let e=0;e<o.length;e++){let t=o[e],l=p.ObjectUtils.findIndexInList(t,i);if(0===l)break;{let e=i[l],t=i[l-1];i[l-1]=e,i[l]=t}}let l=[...this.modelValue];l[t]=i,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop(e,t){if(this.d_selection){let i=[...this.modelValue[t]],o=this.d_selection[t];for(let e=0;e<o.length;e++){let t=o[e],l=p.ObjectUtils.findIndexInList(t,i);if(0===l)break;{let e=i.splice(l,1)[0];i.unshift(e)}}let l=[...this.modelValue];l[t]=i,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown(e,t){if(this.d_selection){let i=[...this.modelValue[t]],o=this.d_selection[t];for(let e=o.length-1;e>=0;e--){let t=o[e],l=p.ObjectUtils.findIndexInList(t,i);if(l===i.length-1)break;{let e=i[l],t=i[l+1];i[l+1]=e,i[l]=t}}let l=[...this.modelValue];l[t]=i,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom(e,t){if(this.d_selection){let i=[...this.modelValue[t]],o=this.d_selection[t];for(let e=o.length-1;e>=0;e--){let t=o[e],l=p.ObjectUtils.findIndexInList(t,i);if(l===i.length-1)break;{let e=i.splice(l,1)[0];i.push(e)}}let l=[...this.modelValue];l[t]=i,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget(e){let t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,i=[...this.modelValue[0]],o=[...this.modelValue[1]];if(t){for(let e=0;e<t.length;e++){let l=t[e];-1==p.ObjectUtils.findIndexInList(l,o)&&o.push(i.splice(p.ObjectUtils.findIndexInList(l,i),1)[0])}let l=[...this.modelValue];l[0]=i,l[1]=o,this.$emit("update:modelValue",l),this.$emit("move-to-target",{originalEvent:e,items:t}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget(e){if(this.modelValue[0]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-target",{originalEvent:e,items:t}),i=[...i,...t],t=[];let o=[...this.modelValue];o[0]=t,o[1]=i,this.$emit("update:modelValue",o),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource(e){let t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,i=[...this.modelValue[0]],o=[...this.modelValue[1]];if(t){for(let e=0;e<t.length;e++){let l=t[e];-1==p.ObjectUtils.findIndexInList(l,i)&&i.push(o.splice(p.ObjectUtils.findIndexInList(l,o),1)[0])}let l=[...this.modelValue];l[0]=i,l[1]=o,this.$emit("update:modelValue",l),this.$emit("move-to-source",{originalEvent:e,items:t}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource(e){if(this.modelValue[1]){let t=[...this.modelValue[0]],i=[...this.modelValue[1]];this.$emit("move-all-to-source",{originalEvent:e,items:i}),t=[...t,...i],i=[];let o=[...this.modelValue];o[0]=t,o[1]=i,this.$emit("update:modelValue",o),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick(e,t,i,o){const l=0===o?"sourceList":"targetList";this.itemTouched=!1;const n=this.d_selection[o],s=p.ObjectUtils.findIndexInList(t,this.d_selection),r=-1!=s,a=!this.itemTouched&&this.metaKeySelection,d=p.DomHandler.find(this.$refs[l].$el,".p-picklist-item")[i].getAttribute("id");let c;if(this.focusedOptionIndex=d,a){let i=e.metaKey||e.ctrlKey;r&&i?c=n.filter(((e,t)=>t!==s)):(c=i&&n?[...n]:[],c.push(t))}else r?c=n.filter(((e,t)=>t!==s)):(c=n?[...n]:[],c.push(t));let u=[...this.d_selection];u[o]=c,this.d_selection=u,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick(e,t,i){0===i?this.moveToTarget(e):1===i&&this.moveToSource(e)},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=[...this.modelValue],this.$emit("update:selection",this.d_selection))}},onArrowDownKey(e,t){const i=this.findNextOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(i,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey(e,t){const i=this.findPrevOptionIndex(this.focusedOptionIndex,t);this.changeFocusedOptionIndex(i,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey(e,t){const i=p.DomHandler.find(this.$refs[t].$el,"li.p-picklist-item"),o=p.DomHandler.findSingle(this.$refs[t].$el,`li.p-picklist-item[id=${this.focusedOptionIndex}]`),l=[...i].findIndex((e=>e===o)),n="sourceList"===t?0:1;this.onItemClick(e,this.modelValue[n][l],l,n),e.preventDefault()},onSpaceKey(e,t){if(e.preventDefault(),e.shiftKey){const e="sourceList"===t?0:1,i=p.DomHandler.find(this.$refs[t].$el,"li.p-picklist-item"),o=p.ObjectUtils.findIndexInList(this.d_selection[e][0],[...this.modelValue[e]]),l=p.DomHandler.findSingle(this.$refs[t].$el,`li.p-picklist-item[id=${this.focusedOptionIndex}]`),n=[...i].findIndex((e=>e===l));this.d_selection[e]=[...this.modelValue[e]].slice(Math.min(o,n),Math.max(o,n)+1),this.$emit("update:selection",this.d_selection)}else this.onEnterKey(e,t)},onHomeKey(e,t){if(e.ctrlKey&&e.shiftKey){const e="sourceList"===t?0:1,i=p.DomHandler.find(this.$refs[t].$el,"li.p-picklist-item"),o=p.DomHandler.findSingle(this.$refs[t].$el,`li.p-picklist-item[id=${this.focusedOptionIndex}]`),l=[...i].findIndex((e=>e===o));this.d_selection[e]=[...this.modelValue[e]].slice(0,l+1),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey(e,t){const i=p.DomHandler.find(this.$refs[t].$el,"li.p-picklist-item");if(e.ctrlKey&&e.shiftKey){const e="sourceList"===t?0:1,o=p.DomHandler.findSingle(this.$refs[t].$el,`li.p-picklist-item[id=${this.focusedOptionIndex}]`),l=[...i].findIndex((e=>e===o));this.d_selection[e]=[...this.modelValue[e]].slice(l,i.length),this.$emit("update:selection",this.d_selection)}else this.changeFocusedOptionIndex(i.length-1,t);e.preventDefault()},findNextOptionIndex(e,t){const i=[...p.DomHandler.find(this.$refs[t].$el,"li.p-picklist-item")].findIndex((t=>t.id===e));return i>-1?i+1:0},findPrevOptionIndex(e,t){const i=[...p.DomHandler.find(this.$refs[t].$el,"li.p-picklist-item")].findIndex((t=>t.id===e));return i>-1?i-1:0},changeFocusedOptionIndex(e,t){const i=p.DomHandler.find(this.$refs[t].$el,"li.p-picklist-item");let o=e>=i.length?i.length-1:e<0?0:e;this.focusedOptionIndex=i[o].getAttribute("id"),this.scrollInView(i[o].getAttribute("id"),t)},scrollInView(e,t){const i=p.DomHandler.findSingle(this.$refs[t].$el,`li[id="${e}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll(e){const t=p.DomHandler.find(e,".p-picklist-item.p-highlight");if(t&&t.length)switch(this.reorderDirection){case"up":p.DomHandler.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":p.DomHandler.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia(){this.media=window.matchMedia(`(max-width: ${this.breakpoint})`),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia(){this.unbindMediaChangeListener()},bindMediaChangeListener(){this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=e=>{this.viewChanged=e.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-picklist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[${this.attributeSelector}] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled(e){return p.ObjectUtils.isEmpty(this[e])},moveSourceDisabled(){return p.ObjectUtils.isEmpty(this.targetList)},itemClass(e,t,i){return["p-picklist-item",{"p-highlight":this.isSelected(e,i),"p-focus":t===this.focusedOptionId}]}},computed:{idSource(){return`${this.id}_source`},idTarget(){return`${this.id}_target`},focusedOptionId(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},containerClass(){return["p-picklist p-component",{"p-picklist-striped":this.stripedRows}]},sourceList(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:()=>p.UniqueComponentId(),moveUpAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:v.default,AngleRightIcon:I.default,AngleLeftIcon:$.default,AngleDownIcon:y.default,AngleUpIcon:w.default,AngleDoubleRightIcon:b.default,AngleDoubleLeftIcon:f.default,AngleDoubleDownIcon:g.default,AngleDoubleUpIcon:k.default},directives:{ripple:D.default}};const C=["id","onClick","onDblclick","onMousedown","aria-selected"],T=["id","onClick","onDblclick","onMousedown","aria-selected"];return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===i&&o.firstChild?o.insertBefore(l,o.firstChild):o.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-picklist {\n display: flex;\n}\n.p-picklist-buttons {\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n.p-picklist-list-wrapper {\n flex: 1 1 50%;\n}\n.p-picklist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-picklist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-picklist-item.p-picklist-flip-enter-active.p-picklist-flip-enter-to,\n.p-picklist-item.p-picklist-flip-leave-active.p-picklist-flip-leave-to {\n transition: none !important;\n}\n"),L.render=function(e,t,i,o,l,n){const s=u.resolveComponent("AngleUpIcon"),r=u.resolveComponent("PLButton"),a=u.resolveComponent("AngleDoubleUpIcon"),d=u.resolveComponent("AngleDownIcon"),c=u.resolveComponent("AngleDoubleDownIcon"),p=u.resolveDirective("ripple");return u.openBlock(),u.createElementBlock("div",u.mergeProps({class:n.containerClass},e.ptm("root")),[i.showSourceControls?(u.openBlock(),u.createElementBlock("div",u.mergeProps({key:0,class:"p-picklist-buttons p-picklist-source-controls"},e.ptm("sourceControls")),[u.renderSlot(e.$slots,"sourcecontrolsstart"),u.createVNode(r,u.mergeProps({"aria-label":n.moveUpAriaLabel,disabled:n.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=e=>n.moveUp(e,0))},i.moveUpButtonProps,{pt:e.ptm("sourceMoveUpButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"moveupicon",{},(()=>[u.createVNode(s,u.normalizeProps(u.guardReactiveProps(e.ptm("sourceMoveUpButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveTopAriaLabel,disabled:n.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=e=>n.moveTop(e,0))},i.moveTopButtonProps,{pt:e.ptm("sourceMoveTopButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movetopicon",{},(()=>[u.createVNode(a,u.normalizeProps(u.guardReactiveProps(e.ptm("sourceMoveTopButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveDownAriaLabel,disabled:n.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=e=>n.moveDown(e,0))},i.moveDownButtonProps,{pt:e.ptm("sourceMoveDownButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movedownicon",{},(()=>[u.createVNode(d,u.normalizeProps(u.guardReactiveProps(e.ptm("sourceMoveDownButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveBottomAriaLabel,disabled:n.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=e=>n.moveBottom(e,0))},i.moveBottomButtonProps,{pt:e.ptm("sourceMoveBottomButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movebottomicon",{},(()=>[u.createVNode(c,u.normalizeProps(u.guardReactiveProps(e.ptm("sourceMoveBottomButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.renderSlot(e.$slots,"sourcecontrolsend")],16)):u.createCommentVNode("",!0),u.createElementVNode("div",u.mergeProps({class:"p-picklist-list-wrapper p-picklist-source-wrapper"},e.ptm("sourceWrapper")),[e.$slots.sourceheader?(u.openBlock(),u.createElementBlock("div",u.mergeProps({key:0,class:"p-picklist-header"},e.ptm("sourceHeader")),[u.renderSlot(e.$slots,"sourceheader")],16)):u.createCommentVNode("",!0),u.createVNode(u.TransitionGroup,u.mergeProps({ref:"sourceList",id:n.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-source",style:i.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":l.focused.sourceList?n.focusedOptionId:void 0,tabindex:n.sourceList&&n.sourceList.length>0?i.tabindex:-1,onFocus:t[5]||(t[5]=e=>n.onListFocus(e,"sourceList")),onBlur:t[6]||(t[6]=e=>n.onListBlur(e,"sourceList")),onKeydown:t[7]||(t[7]=e=>n.onItemKeyDown(e,"sourceList"))},{...i.sourceListProps,...e.ptm("sourceList")}),{default:u.withCtx((()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.sourceList,((i,o)=>u.withDirectives((u.openBlock(),u.createElementBlock("li",u.mergeProps({key:n.getItemKey(i,o),id:n.idSource+"_"+o,class:n.itemClass(i,`${n.idSource}_${o}`,0),onClick:e=>n.onItemClick(e,i,o,0),onDblclick:e=>n.onItemDblClick(e,i,0),onTouchend:t[4]||(t[4]=(...e)=>n.onItemTouchEnd&&n.onItemTouchEnd(...e)),onMousedown:e=>n.onOptionMouseDown(o,"sourceList"),role:"option","aria-selected":n.isSelected(i,0)},n.getPTOptions(i,"item")),[u.renderSlot(e.$slots,"item",{item:i,index:o})],16,C)),[[p]]))),128))])),_:3},16,["id","style","aria-activedescendant","tabindex"])],16),u.createElementVNode("div",u.mergeProps({class:"p-picklist-buttons p-picklist-transfer-buttons"},e.ptm("buttons")),[u.renderSlot(e.$slots,"movecontrolsstart"),u.createVNode(r,u.mergeProps({"aria-label":n.moveToTargetAriaLabel,type:"button",onClick:n.moveToTarget,disabled:n.moveDisabled(0)},i.moveToTargetProps,{pt:e.ptm("moveToTargetButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movetotargeticon",{viewChanged:l.viewChanged},(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(l.viewChanged?"AngleDownIcon":"AngleRightIcon"),u.normalizeProps(u.guardReactiveProps(e.ptm("moveToTargetButton").icon)),null,16))]))])),_:3},16,["aria-label","onClick","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveAllToTargetAriaLabel,type:"button",onClick:n.moveAllToTarget,disabled:n.moveAllDisabled("sourceList")},i.moveAllToTargetProps,{pt:e.ptm("moveAllToTargetButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movealltotargeticon",{viewChanged:l.viewChanged},(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(l.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),u.normalizeProps(u.guardReactiveProps(e.ptm("moveAllToTargetButton").icon)),null,16))]))])),_:3},16,["aria-label","onClick","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveToSourceAriaLabel,type:"button",onClick:n.moveToSource,disabled:n.moveDisabled(1)},i.moveToSourceProps,{pt:e.ptm("moveToSourceButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movetosourceicon",{viewChanged:l.viewChanged},(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(l.viewChanged?"AngleUpIcon":"AngleLeftIcon"),u.normalizeProps(u.guardReactiveProps(e.ptm("moveToSourceButton").icon)),null,16))]))])),_:3},16,["aria-label","onClick","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveAllToSourceAriaLabel,type:"button",onClick:n.moveAllToSource,disabled:n.moveSourceDisabled("targetList")},i.moveAllToSourceProps,{pt:e.ptm("moveAllToSourceButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movealltosourceicon",{viewChanged:l.viewChanged},(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(l.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),u.normalizeProps(u.guardReactiveProps(e.ptm("moveAllToSourceButton").icon)),null,16))]))])),_:3},16,["aria-label","onClick","disabled","pt"]),u.renderSlot(e.$slots,"movecontrolsend")],16),u.createElementVNode("div",u.mergeProps({class:"p-picklist-list-wrapper p-picklist-target-wrapper"},e.ptm("targetWrapper")),[e.$slots.targetheader?(u.openBlock(),u.createElementBlock("div",u.mergeProps({key:0,class:"p-picklist-header"},e.ptm("targetHeader")),[u.renderSlot(e.$slots,"targetheader")],16)):u.createCommentVNode("",!0),u.createVNode(u.TransitionGroup,u.mergeProps({ref:"targetList",id:n.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:"p-picklist-list p-picklist-target",style:i.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":l.focused.targetList?n.focusedOptionId:void 0,tabindex:n.targetList&&n.targetList.length>0?i.tabindex:-1,onFocus:t[10]||(t[10]=e=>n.onListFocus(e,"targetList")),onBlur:t[11]||(t[11]=e=>n.onListBlur(e,"targetList")),onKeydown:t[12]||(t[12]=e=>n.onItemKeyDown(e,"targetList"))},{...i.targetListProps,...e.ptm("targetList")}),{default:u.withCtx((()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.targetList,((i,o)=>u.withDirectives((u.openBlock(),u.createElementBlock("li",u.mergeProps({key:n.getItemKey(i,o),id:n.idTarget+"_"+o,class:n.itemClass(i,`${n.idTarget}_${o}`,1),onClick:e=>n.onItemClick(e,i,o,1),onDblclick:e=>n.onItemDblClick(e,i,1),onKeydown:t[8]||(t[8]=e=>n.onItemKeyDown(e,"targetList")),onMousedown:e=>n.onOptionMouseDown(o,"targetList"),onTouchend:t[9]||(t[9]=(...e)=>n.onItemTouchEnd&&n.onItemTouchEnd(...e)),role:"option","aria-selected":n.isSelected(i,1)},n.getPTOptions(i,"item")),[u.renderSlot(e.$slots,"item",{item:i,index:o})],16,T)),[[p]]))),128))])),_:3},16,["id","style","aria-activedescendant","tabindex"])],16),i.showTargetControls?(u.openBlock(),u.createElementBlock("div",u.mergeProps({key:1,class:"p-picklist-buttons p-picklist-target-controls"},e.ptm("targetControls")),[u.renderSlot(e.$slots,"targetcontrolsstart"),u.createVNode(r,u.mergeProps({"aria-label":n.moveUpAriaLabel,disabled:n.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=e=>n.moveUp(e,1))},i.moveUpButtonProps,{pt:e.ptm("targetMoveUpButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"moveupicon",{},(()=>[u.createVNode(s,u.normalizeProps(u.guardReactiveProps(e.ptm("targetMoveUpButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveTopAriaLabel,disabled:n.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=e=>n.moveTop(e,1))},i.moveTopButtonProps,{pt:e.ptm("targetMoveTopButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movetopicon",{},(()=>[u.createVNode(a,u.normalizeProps(u.guardReactiveProps(e.ptm("targetMoveTopButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveDownAriaLabel,disabled:n.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=e=>n.moveDown(e,1))},i.moveDownButtonProps,{pt:e.ptm("targetMoveDownButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movedownicon",{},(()=>[u.createVNode(d,u.normalizeProps(u.guardReactiveProps(e.ptm("targetMoveDownButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.createVNode(r,u.mergeProps({"aria-label":n.moveBottomAriaLabel,disabled:n.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=e=>n.moveBottom(e,1))},i.moveBottomButtonProps,{pt:e.ptm("targetMoveBottomButton")}),{icon:u.withCtx((()=>[u.renderSlot(e.$slots,"movebottomicon",{},(()=>[u.createVNode(c,u.normalizeProps(u.guardReactiveProps(e.ptm("targetMoveBottomButton").icon)),null,16)]))])),_:3},16,["aria-label","disabled","pt"]),u.renderSlot(e.$slots,"targetcontrolsend")],16)):u.createCommentVNode("",!0)],16)},L}(primevue.basecomponent,primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleleft,primevue.icons.angledoubleright,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleleft,primevue.icons.angleright,primevue.icons.angleup,primevue.ripple,primevue.utils,Vue);