primevue 3.12.2 → 3.12.3

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.
Files changed (79) hide show
  1. package/accordion/Accordion.d.ts +8 -0
  2. package/accordion/Accordion.vue +15 -5
  3. package/accordion/accordion.cjs.js +15 -5
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.esm.js +15 -5
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +15 -5
  8. package/accordion/accordion.min.js +1 -1
  9. package/calendar/Calendar.vue +3 -0
  10. package/calendar/calendar.cjs.js +3 -0
  11. package/calendar/calendar.cjs.min.js +1 -1
  12. package/calendar/calendar.esm.js +3 -0
  13. package/calendar/calendar.esm.min.js +1 -1
  14. package/calendar/calendar.js +3 -0
  15. package/calendar/calendar.min.js +1 -1
  16. package/chips/Chips.vue +1 -1
  17. package/chips/chips.cjs.js +1 -1
  18. package/chips/chips.cjs.min.js +1 -1
  19. package/chips/chips.esm.js +1 -1
  20. package/chips/chips.esm.min.js +1 -1
  21. package/chips/chips.js +1 -1
  22. package/chips/chips.min.js +1 -1
  23. package/confirmpopup/ConfirmPopup.vue +2 -1
  24. package/confirmpopup/confirmpopup.cjs.js +2 -1
  25. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  26. package/confirmpopup/confirmpopup.esm.js +2 -1
  27. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  28. package/confirmpopup/confirmpopup.js +2 -1
  29. package/confirmpopup/confirmpopup.min.js +1 -1
  30. package/core/core.js +13 -1
  31. package/core/core.min.js +1 -1
  32. package/dataview/DataView.d.ts +4 -0
  33. package/dataview/DataView.vue +8 -1
  34. package/dataview/dataview.cjs.js +11 -2
  35. package/dataview/dataview.cjs.min.js +1 -1
  36. package/dataview/dataview.esm.js +11 -2
  37. package/dataview/dataview.esm.min.js +1 -1
  38. package/dataview/dataview.js +11 -2
  39. package/dataview/dataview.min.js +1 -1
  40. package/orderlist/OrderList.vue +4 -4
  41. package/orderlist/orderlist.cjs.js +4 -4
  42. package/orderlist/orderlist.cjs.min.js +1 -1
  43. package/orderlist/orderlist.esm.js +4 -4
  44. package/orderlist/orderlist.esm.min.js +1 -1
  45. package/orderlist/orderlist.js +4 -4
  46. package/orderlist/orderlist.min.js +1 -1
  47. package/package.json +1 -1
  48. package/password/Password.vue +1 -1
  49. package/password/password.cjs.js +1 -1
  50. package/password/password.esm.js +1 -1
  51. package/password/password.js +1 -1
  52. package/rating/Rating.vue +1 -1
  53. package/rating/rating.cjs.js +1 -1
  54. package/rating/rating.cjs.min.js +1 -1
  55. package/rating/rating.esm.js +1 -1
  56. package/rating/rating.esm.min.js +1 -1
  57. package/rating/rating.js +1 -1
  58. package/rating/rating.min.js +1 -1
  59. package/resources/primevue.css +5 -3
  60. package/resources/primevue.min.css +1 -1
  61. package/scrolltop/ScrollTop.vue +1 -1
  62. package/scrolltop/scrolltop.cjs.js +1 -1
  63. package/scrolltop/scrolltop.esm.js +1 -1
  64. package/scrolltop/scrolltop.js +1 -1
  65. package/styleclass/styleclass.cjs.js +11 -2
  66. package/styleclass/styleclass.cjs.min.js +1 -1
  67. package/styleclass/styleclass.esm.js +11 -2
  68. package/styleclass/styleclass.esm.min.js +1 -1
  69. package/styleclass/styleclass.js +11 -2
  70. package/styleclass/styleclass.min.js +1 -1
  71. package/tooltip/tooltip.cjs.js +13 -1
  72. package/tooltip/tooltip.cjs.min.js +1 -1
  73. package/tooltip/tooltip.esm.js +13 -1
  74. package/tooltip/tooltip.esm.min.js +1 -1
  75. package/tooltip/tooltip.js +13 -1
  76. package/tooltip/tooltip.min.js +1 -1
  77. package/vetur-attributes.json +13 -1
  78. package/vetur-tags.json +5 -2
  79. package/web-types.json +32 -2
@@ -72,7 +72,7 @@ var script = {
72
72
 
73
73
  default:
74
74
  if (this.separator) {
75
- if (this.separator === ',' && event.which === 188) {
75
+ if (this.separator === ',' && (event.which === 188 || event.which === 110)) {
76
76
  this.addItem(event, inputValue, true);
77
77
  }
78
78
  }
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),t={name:"Chips",inheritAttrs:!1,emits:["update:modelValue","add","remove"],props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:String,default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},class:null,style:null},data:()=>({inputValue:null,focused:!1}),methods:{onWrapperClick(){this.$refs.input.focus()},onInput(e){this.inputValue=e.target.value},onFocus(){this.focused=!0},onBlur(e){this.focused=!1,this.addOnBlur&&this.addItem(e,e.target.value,!1)},onKeyDown(e){const t=e.target.value;switch(e.which){case 8:0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,this.modelValue.length-1);break;case 13:t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;default:this.separator&&","===this.separator&&188===e.which&&this.addItem(e,t,!0)}},onPaste(e){if(this.separator){let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.modelValue||[],l=t.split(this.separator);l=l.filter((e=>this.allowDuplicate||-1===n.indexOf(e))),n=[...n,...l],this.updateModel(e,n,!0)}}},updateModel(e,t,n){this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",n&&e.preventDefault()},addItem(e,t,n){if(t&&t.trim().length){let l=this.modelValue?[...this.modelValue]:[];(this.allowDuplicate||-1===l.indexOf(t))&&(l.push(t),this.updateModel(e,l,n))}},removeItem(e,t){if(this.$attrs.disabled)return;let n=[...this.modelValue];const l=n.splice(t,1);this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:l})}},computed:{maxedOut(){return this.max&&this.modelValue&&this.max===this.modelValue.length},containerClass(){return["p-chips p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.modelValue&&this.modelValue.length||this.inputValue&&this.inputValue.length,"p-inputwrapper-focus":this.focused}]}}};const n={class:"p-chips-token-label"},l={class:"p-chips-input-token"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-chips {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-chips-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-chips-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-token-icon {\n cursor: pointer;\n}\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-chips {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),t.render=function(t,i,a,s,o,p){return e.openBlock(),e.createBlock("div",{class:p.containerClass,style:a.style},[e.createVNode("ul",{class:["p-inputtext p-chips-multiple-container",{"p-disabled":t.$attrs.disabled,"p-focus":o.focused}],onClick:i[6]||(i[6]=e=>p.onWrapperClick())},[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.modelValue,((l,i)=>(e.openBlock(),e.createBlock("li",{key:`${i}_${l}`,class:"p-chips-token"},[e.renderSlot(t.$slots,"chip",{value:l},(()=>[e.createVNode("span",n,e.toDisplayString(l),1)])),e.createVNode("span",{class:"p-chips-token-icon pi pi-times-circle",onClick:e=>p.removeItem(e,i)},null,8,["onClick"])])))),128)),e.createVNode("li",l,[e.createVNode("input",e.mergeProps({ref:"input",type:"text"},t.$attrs,{onFocus:i[1]||(i[1]=(...e)=>p.onFocus&&p.onFocus(...e)),onBlur:i[2]||(i[2]=e=>p.onBlur(e)),onInput:i[3]||(i[3]=(...e)=>p.onInput&&p.onInput(...e)),onKeydown:i[4]||(i[4]=e=>p.onKeyDown(e)),onPaste:i[5]||(i[5]=e=>p.onPaste(e)),disabled:t.$attrs.disabled||p.maxedOut}),null,16,["disabled"])])],2)],6)},module.exports=t;
1
+ "use strict";var e=require("vue"),t={name:"Chips",inheritAttrs:!1,emits:["update:modelValue","add","remove"],props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:String,default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},class:null,style:null},data:()=>({inputValue:null,focused:!1}),methods:{onWrapperClick(){this.$refs.input.focus()},onInput(e){this.inputValue=e.target.value},onFocus(){this.focused=!0},onBlur(e){this.focused=!1,this.addOnBlur&&this.addItem(e,e.target.value,!1)},onKeyDown(e){const t=e.target.value;switch(e.which){case 8:0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,this.modelValue.length-1);break;case 13:t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;default:this.separator&&(","!==this.separator||188!==e.which&&110!==e.which||this.addItem(e,t,!0))}},onPaste(e){if(this.separator){let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.modelValue||[],l=t.split(this.separator);l=l.filter((e=>this.allowDuplicate||-1===n.indexOf(e))),n=[...n,...l],this.updateModel(e,n,!0)}}},updateModel(e,t,n){this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",n&&e.preventDefault()},addItem(e,t,n){if(t&&t.trim().length){let l=this.modelValue?[...this.modelValue]:[];(this.allowDuplicate||-1===l.indexOf(t))&&(l.push(t),this.updateModel(e,l,n))}},removeItem(e,t){if(this.$attrs.disabled)return;let n=[...this.modelValue];const l=n.splice(t,1);this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:l})}},computed:{maxedOut(){return this.max&&this.modelValue&&this.max===this.modelValue.length},containerClass(){return["p-chips p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.modelValue&&this.modelValue.length||this.inputValue&&this.inputValue.length,"p-inputwrapper-focus":this.focused}]}}};const n={class:"p-chips-token-label"},l={class:"p-chips-input-token"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-chips {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-chips-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-chips-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-token-icon {\n cursor: pointer;\n}\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-chips {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),t.render=function(t,i,a,s,o,p){return e.openBlock(),e.createBlock("div",{class:p.containerClass,style:a.style},[e.createVNode("ul",{class:["p-inputtext p-chips-multiple-container",{"p-disabled":t.$attrs.disabled,"p-focus":o.focused}],onClick:i[6]||(i[6]=e=>p.onWrapperClick())},[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.modelValue,((l,i)=>(e.openBlock(),e.createBlock("li",{key:`${i}_${l}`,class:"p-chips-token"},[e.renderSlot(t.$slots,"chip",{value:l},(()=>[e.createVNode("span",n,e.toDisplayString(l),1)])),e.createVNode("span",{class:"p-chips-token-icon pi pi-times-circle",onClick:e=>p.removeItem(e,i)},null,8,["onClick"])])))),128)),e.createVNode("li",l,[e.createVNode("input",e.mergeProps({ref:"input",type:"text"},t.$attrs,{onFocus:i[1]||(i[1]=(...e)=>p.onFocus&&p.onFocus(...e)),onBlur:i[2]||(i[2]=e=>p.onBlur(e)),onInput:i[3]||(i[3]=(...e)=>p.onInput&&p.onInput(...e)),onKeydown:i[4]||(i[4]=e=>p.onKeyDown(e)),onPaste:i[5]||(i[5]=e=>p.onPaste(e)),disabled:t.$attrs.disabled||p.maxedOut}),null,16,["disabled"])])],2)],6)},module.exports=t;
@@ -70,7 +70,7 @@ var script = {
70
70
 
71
71
  default:
72
72
  if (this.separator) {
73
- if (this.separator === ',' && event.which === 188) {
73
+ if (this.separator === ',' && (event.which === 188 || event.which === 110)) {
74
74
  this.addItem(event, inputValue, true);
75
75
  }
76
76
  }
@@ -1 +1 @@
1
- import{openBlock as e,createBlock as t,createVNode as n,Fragment as l,renderList as i,renderSlot as a,toDisplayString as s,mergeProps as o}from"vue";var p={name:"Chips",inheritAttrs:!1,emits:["update:modelValue","add","remove"],props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:String,default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},class:null,style:null},data:()=>({inputValue:null,focused:!1}),methods:{onWrapperClick(){this.$refs.input.focus()},onInput(e){this.inputValue=e.target.value},onFocus(){this.focused=!0},onBlur(e){this.focused=!1,this.addOnBlur&&this.addItem(e,e.target.value,!1)},onKeyDown(e){const t=e.target.value;switch(e.which){case 8:0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,this.modelValue.length-1);break;case 13:t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;default:this.separator&&","===this.separator&&188===e.which&&this.addItem(e,t,!0)}},onPaste(e){if(this.separator){let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.modelValue||[],l=t.split(this.separator);l=l.filter((e=>this.allowDuplicate||-1===n.indexOf(e))),n=[...n,...l],this.updateModel(e,n,!0)}}},updateModel(e,t,n){this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",n&&e.preventDefault()},addItem(e,t,n){if(t&&t.trim().length){let l=this.modelValue?[...this.modelValue]:[];(this.allowDuplicate||-1===l.indexOf(t))&&(l.push(t),this.updateModel(e,l,n))}},removeItem(e,t){if(this.$attrs.disabled)return;let n=[...this.modelValue];const l=n.splice(t,1);this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:l})}},computed:{maxedOut(){return this.max&&this.modelValue&&this.max===this.modelValue.length},containerClass(){return["p-chips p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.modelValue&&this.modelValue.length||this.inputValue&&this.inputValue.length,"p-inputwrapper-focus":this.focused}]}}};const d={class:"p-chips-token-label"},u={class:"p-chips-input-token"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-chips {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-chips-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-chips-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-token-icon {\n cursor: pointer;\n}\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-chips {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),p.render=function(p,r,c,h,m,f){return e(),t("div",{class:f.containerClass,style:c.style},[n("ul",{class:["p-inputtext p-chips-multiple-container",{"p-disabled":p.$attrs.disabled,"p-focus":m.focused}],onClick:r[6]||(r[6]=e=>f.onWrapperClick())},[(e(!0),t(l,null,i(c.modelValue,((l,i)=>(e(),t("li",{key:`${i}_${l}`,class:"p-chips-token"},[a(p.$slots,"chip",{value:l},(()=>[n("span",d,s(l),1)])),n("span",{class:"p-chips-token-icon pi pi-times-circle",onClick:e=>f.removeItem(e,i)},null,8,["onClick"])])))),128)),n("li",u,[n("input",o({ref:"input",type:"text"},p.$attrs,{onFocus:r[1]||(r[1]=(...e)=>f.onFocus&&f.onFocus(...e)),onBlur:r[2]||(r[2]=e=>f.onBlur(e)),onInput:r[3]||(r[3]=(...e)=>f.onInput&&f.onInput(...e)),onKeydown:r[4]||(r[4]=e=>f.onKeyDown(e)),onPaste:r[5]||(r[5]=e=>f.onPaste(e)),disabled:p.$attrs.disabled||f.maxedOut}),null,16,["disabled"])])],2)],6)};export default p;
1
+ import{openBlock as e,createBlock as t,createVNode as n,Fragment as l,renderList as i,renderSlot as a,toDisplayString as s,mergeProps as o}from"vue";var p={name:"Chips",inheritAttrs:!1,emits:["update:modelValue","add","remove"],props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:String,default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},class:null,style:null},data:()=>({inputValue:null,focused:!1}),methods:{onWrapperClick(){this.$refs.input.focus()},onInput(e){this.inputValue=e.target.value},onFocus(){this.focused=!0},onBlur(e){this.focused=!1,this.addOnBlur&&this.addItem(e,e.target.value,!1)},onKeyDown(e){const t=e.target.value;switch(e.which){case 8:0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,this.modelValue.length-1);break;case 13:t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;default:this.separator&&(","!==this.separator||188!==e.which&&110!==e.which||this.addItem(e,t,!0))}},onPaste(e){if(this.separator){let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.modelValue||[],l=t.split(this.separator);l=l.filter((e=>this.allowDuplicate||-1===n.indexOf(e))),n=[...n,...l],this.updateModel(e,n,!0)}}},updateModel(e,t,n){this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",n&&e.preventDefault()},addItem(e,t,n){if(t&&t.trim().length){let l=this.modelValue?[...this.modelValue]:[];(this.allowDuplicate||-1===l.indexOf(t))&&(l.push(t),this.updateModel(e,l,n))}},removeItem(e,t){if(this.$attrs.disabled)return;let n=[...this.modelValue];const l=n.splice(t,1);this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:l})}},computed:{maxedOut(){return this.max&&this.modelValue&&this.max===this.modelValue.length},containerClass(){return["p-chips p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.modelValue&&this.modelValue.length||this.inputValue&&this.inputValue.length,"p-inputwrapper-focus":this.focused}]}}};const d={class:"p-chips-token-label"},u={class:"p-chips-input-token"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&l.firstChild?l.insertBefore(i,l.firstChild):l.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("\n.p-chips {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-chips-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-chips-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-token-icon {\n cursor: pointer;\n}\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-chips {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),p.render=function(p,r,h,c,m,f){return e(),t("div",{class:f.containerClass,style:h.style},[n("ul",{class:["p-inputtext p-chips-multiple-container",{"p-disabled":p.$attrs.disabled,"p-focus":m.focused}],onClick:r[6]||(r[6]=e=>f.onWrapperClick())},[(e(!0),t(l,null,i(h.modelValue,((l,i)=>(e(),t("li",{key:`${i}_${l}`,class:"p-chips-token"},[a(p.$slots,"chip",{value:l},(()=>[n("span",d,s(l),1)])),n("span",{class:"p-chips-token-icon pi pi-times-circle",onClick:e=>f.removeItem(e,i)},null,8,["onClick"])])))),128)),n("li",u,[n("input",o({ref:"input",type:"text"},p.$attrs,{onFocus:r[1]||(r[1]=(...e)=>f.onFocus&&f.onFocus(...e)),onBlur:r[2]||(r[2]=e=>f.onBlur(e)),onInput:r[3]||(r[3]=(...e)=>f.onInput&&f.onInput(...e)),onKeydown:r[4]||(r[4]=e=>f.onKeyDown(e)),onPaste:r[5]||(r[5]=e=>f.onPaste(e)),disabled:p.$attrs.disabled||f.maxedOut}),null,16,["disabled"])])],2)],6)};export default p;
package/chips/chips.js CHANGED
@@ -72,7 +72,7 @@ this.primevue.chips = (function (vue) {
72
72
 
73
73
  default:
74
74
  if (this.separator) {
75
- if (this.separator === ',' && event.which === 188) {
75
+ if (this.separator === ',' && (event.which === 188 || event.which === 110)) {
76
76
  this.addItem(event, inputValue, true);
77
77
  }
78
78
  }
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.chips=function(e){"use strict";var t={name:"Chips",inheritAttrs:!1,emits:["update:modelValue","add","remove"],props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:String,default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},class:null,style:null},data:()=>({inputValue:null,focused:!1}),methods:{onWrapperClick(){this.$refs.input.focus()},onInput(e){this.inputValue=e.target.value},onFocus(){this.focused=!0},onBlur(e){this.focused=!1,this.addOnBlur&&this.addItem(e,e.target.value,!1)},onKeyDown(e){const t=e.target.value;switch(e.which){case 8:0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,this.modelValue.length-1);break;case 13:t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;default:this.separator&&","===this.separator&&188===e.which&&this.addItem(e,t,!0)}},onPaste(e){if(this.separator){let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.modelValue||[],i=t.split(this.separator);i=i.filter((e=>this.allowDuplicate||-1===n.indexOf(e))),n=[...n,...i],this.updateModel(e,n,!0)}}},updateModel(e,t,n){this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",n&&e.preventDefault()},addItem(e,t,n){if(t&&t.trim().length){let i=this.modelValue?[...this.modelValue]:[];(this.allowDuplicate||-1===i.indexOf(t))&&(i.push(t),this.updateModel(e,i,n))}},removeItem(e,t){if(this.$attrs.disabled)return;let n=[...this.modelValue];const i=n.splice(t,1);this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:i})}},computed:{maxedOut(){return this.max&&this.modelValue&&this.max===this.modelValue.length},containerClass(){return["p-chips p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.modelValue&&this.modelValue.length||this.inputValue&&this.inputValue.length,"p-inputwrapper-focus":this.focused}]}}};const n={class:"p-chips-token-label"},i={class:"p-chips-input-token"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-chips {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-chips-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-chips-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-token-icon {\n cursor: pointer;\n}\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-chips {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),t.render=function(t,l,a,s,o,p){return e.openBlock(),e.createBlock("div",{class:p.containerClass,style:a.style},[e.createVNode("ul",{class:["p-inputtext p-chips-multiple-container",{"p-disabled":t.$attrs.disabled,"p-focus":o.focused}],onClick:l[6]||(l[6]=e=>p.onWrapperClick())},[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.modelValue,((i,l)=>(e.openBlock(),e.createBlock("li",{key:`${l}_${i}`,class:"p-chips-token"},[e.renderSlot(t.$slots,"chip",{value:i},(()=>[e.createVNode("span",n,e.toDisplayString(i),1)])),e.createVNode("span",{class:"p-chips-token-icon pi pi-times-circle",onClick:e=>p.removeItem(e,l)},null,8,["onClick"])])))),128)),e.createVNode("li",i,[e.createVNode("input",e.mergeProps({ref:"input",type:"text"},t.$attrs,{onFocus:l[1]||(l[1]=(...e)=>p.onFocus&&p.onFocus(...e)),onBlur:l[2]||(l[2]=e=>p.onBlur(e)),onInput:l[3]||(l[3]=(...e)=>p.onInput&&p.onInput(...e)),onKeydown:l[4]||(l[4]=e=>p.onKeyDown(e)),onPaste:l[5]||(l[5]=e=>p.onPaste(e)),disabled:t.$attrs.disabled||p.maxedOut}),null,16,["disabled"])])],2)],6)},t}(Vue);
1
+ this.primevue=this.primevue||{},this.primevue.chips=function(e){"use strict";var t={name:"Chips",inheritAttrs:!1,emits:["update:modelValue","add","remove"],props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:String,default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},class:null,style:null},data:()=>({inputValue:null,focused:!1}),methods:{onWrapperClick(){this.$refs.input.focus()},onInput(e){this.inputValue=e.target.value},onFocus(){this.focused=!0},onBlur(e){this.focused=!1,this.addOnBlur&&this.addItem(e,e.target.value,!1)},onKeyDown(e){const t=e.target.value;switch(e.which){case 8:0===t.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,this.modelValue.length-1);break;case 13:t&&t.trim().length&&!this.maxedOut&&this.addItem(e,t,!0);break;default:this.separator&&(","!==this.separator||188!==e.which&&110!==e.which||this.addItem(e,t,!0))}},onPaste(e){if(this.separator){let t=(e.clipboardData||window.clipboardData).getData("Text");if(t){let n=this.modelValue||[],i=t.split(this.separator);i=i.filter((e=>this.allowDuplicate||-1===n.indexOf(e))),n=[...n,...i],this.updateModel(e,n,!0)}}},updateModel(e,t,n){this.$emit("update:modelValue",t),this.$emit("add",{originalEvent:e,value:t}),this.$refs.input.value="",this.inputValue="",n&&e.preventDefault()},addItem(e,t,n){if(t&&t.trim().length){let i=this.modelValue?[...this.modelValue]:[];(this.allowDuplicate||-1===i.indexOf(t))&&(i.push(t),this.updateModel(e,i,n))}},removeItem(e,t){if(this.$attrs.disabled)return;let n=[...this.modelValue];const i=n.splice(t,1);this.$emit("update:modelValue",n),this.$emit("remove",{originalEvent:e,value:i})}},computed:{maxedOut(){return this.max&&this.modelValue&&this.max===this.modelValue.length},containerClass(){return["p-chips p-component p-inputwrapper",this.class,{"p-inputwrapper-filled":this.modelValue&&this.modelValue.length||this.inputValue&&this.inputValue.length,"p-inputwrapper-focus":this.focused}]}}};const n={class:"p-chips-token-label"},i={class:"p-chips-input-token"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-chips {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.p-chips-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-chips-input-token {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n.p-chips-token-icon {\n cursor: pointer;\n}\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n.p-fluid .p-chips {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),t.render=function(t,l,a,s,o,p){return e.openBlock(),e.createBlock("div",{class:p.containerClass,style:a.style},[e.createVNode("ul",{class:["p-inputtext p-chips-multiple-container",{"p-disabled":t.$attrs.disabled,"p-focus":o.focused}],onClick:l[6]||(l[6]=e=>p.onWrapperClick())},[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.modelValue,((i,l)=>(e.openBlock(),e.createBlock("li",{key:`${l}_${i}`,class:"p-chips-token"},[e.renderSlot(t.$slots,"chip",{value:i},(()=>[e.createVNode("span",n,e.toDisplayString(i),1)])),e.createVNode("span",{class:"p-chips-token-icon pi pi-times-circle",onClick:e=>p.removeItem(e,l)},null,8,["onClick"])])))),128)),e.createVNode("li",i,[e.createVNode("input",e.mergeProps({ref:"input",type:"text"},t.$attrs,{onFocus:l[1]||(l[1]=(...e)=>p.onFocus&&p.onFocus(...e)),onBlur:l[2]||(l[2]=e=>p.onBlur(e)),onInput:l[3]||(l[3]=(...e)=>p.onInput&&p.onInput(...e)),onKeydown:l[4]||(l[4]=e=>p.onKeyDown(e)),onPaste:l[5]||(l[5]=e=>p.onPaste(e)),disabled:t.$attrs.disabled||p.maxedOut}),null,16,["disabled"])])],2)],6)},t}(Vue);
@@ -97,7 +97,6 @@ export default {
97
97
  this.visible = false;
98
98
  },
99
99
  onEnter(el) {
100
- this.alignOverlay();
101
100
  this.bindOutsideClickListener();
102
101
  this.bindScrollListener();
103
102
  this.bindResizeListener();
@@ -133,6 +132,8 @@ export default {
133
132
  this.outsideClickListener = (event) => {
134
133
  if (this.visible && this.container && !this.container.contains(event.target) && !this.isTargetClicked(event)) {
135
134
  this.visible = false;
135
+ } else {
136
+ this.alignOverlay();
136
137
  }
137
138
  };
138
139
  document.addEventListener('click', this.outsideClickListener);
@@ -85,7 +85,6 @@ var script = {
85
85
  this.visible = false;
86
86
  },
87
87
  onEnter(el) {
88
- this.alignOverlay();
89
88
  this.bindOutsideClickListener();
90
89
  this.bindScrollListener();
91
90
  this.bindResizeListener();
@@ -121,6 +120,8 @@ var script = {
121
120
  this.outsideClickListener = (event) => {
122
121
  if (this.visible && this.container && !this.container.contains(event.target) && !this.isTargetClicked(event)) {
123
122
  this.visible = false;
123
+ } else {
124
+ this.alignOverlay();
124
125
  }
125
126
  };
126
127
  document.addEventListener('click', this.outsideClickListener);
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/confirmationeventbus"),t=require("primevue/utils"),i=require("primevue/overlayeventbus"),n=require("primevue/button"),r=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),c=o(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),l.render=function(e,t,i,n,o,s){const c=r.resolveComponent("CPButton");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:r.withCtx((()=>[o.visible?(r.openBlock(),r.createBlock("div",r.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.$slots.message),{key:1,message:o.confirmation},null,8,["message"])):(r.openBlock(),r.createBlock("div",a,[r.createVNode("i",{class:s.iconClass},null,2),r.createVNode("span",p,r.toDisplayString(o.confirmation.message),1)])),r.createVNode("div",u,[r.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),r.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):r.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},module.exports=l;
1
+ "use strict";var e=require("primevue/confirmationeventbus"),t=require("primevue/utils"),i=require("primevue/overlayeventbus"),n=require("primevue/button"),r=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),c=o(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)?this.visible=!1:this.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),l.render=function(e,t,i,n,o,s){const c=r.resolveComponent("CPButton");return r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:r.withCtx((()=>[o.visible?(r.openBlock(),r.createBlock("div",r.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.$slots.message),{key:1,message:o.confirmation},null,8,["message"])):(r.openBlock(),r.createBlock("div",a,[r.createVNode("i",{class:s.iconClass},null,2),r.createVNode("span",p,r.toDisplayString(o.confirmation.message),1)])),r.createVNode("div",u,[r.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),r.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):r.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},module.exports=l;
@@ -77,7 +77,6 @@ var script = {
77
77
  this.visible = false;
78
78
  },
79
79
  onEnter(el) {
80
- this.alignOverlay();
81
80
  this.bindOutsideClickListener();
82
81
  this.bindScrollListener();
83
82
  this.bindResizeListener();
@@ -113,6 +112,8 @@ var script = {
113
112
  this.outsideClickListener = (event) => {
114
113
  if (this.visible && this.container && !this.container.contains(event.target) && !this.isTargetClicked(event)) {
115
114
  this.visible = false;
115
+ } else {
116
+ this.alignOverlay();
116
117
  }
117
118
  };
118
119
  document.addEventListener('click', this.outsideClickListener);
@@ -1 +1 @@
1
- import e from"primevue/confirmationeventbus";import{ZIndexUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as n}from"primevue/utils";import r from"primevue/overlayeventbus";import o from"primevue/button";import{resolveComponent as s,openBlock as c,createBlock as l,Teleport as a,createVNode as p,Transition as u,withCtx as f,mergeProps as m,toDisplayString as h,resolveDynamicComponent as d,createCommentVNode as b}from"vue";var v={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},e.on("confirm",this.confirmListener),e.on("close",this.closeListener)},beforeUnmount(){e.off("confirm",this.confirmListener),e.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.clear(e)},alignOverlay(){i.absolutePosition(this.container,this.target);const e=i.getOffset(this.container),t=i.getOffset(this.target);let n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<t.top&&i.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new n(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef(e){this.container=e},onOverlayClick(e){r.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o}};const L={key:0,class:"p-confirm-popup-content"},g={class:"p-confirm-popup-message"},C={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),v.render=function(e,t,i,n,r,o){const v=s("CPButton");return c(),l(a,{to:"body"},[p(u,{name:"p-confirm-popup",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:f((()=>[r.visible?(c(),l("div",m({key:0,class:o.containerClass,ref:o.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[e.$slots.message?(c(),l(d(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(c(),l("div",L,[p("i",{class:o.iconClass},null,2),p("span",g,h(r.confirmation.message),1)])),p("div",C,[p(v,{label:o.rejectLabel,icon:o.rejectIcon,class:o.rejectClass,onClick:t[1]||(t[1]=e=>o.reject())},null,8,["label","icon","class"]),p(v,{label:o.acceptLabel,icon:o.acceptIcon,class:o.acceptClass,onClick:t[2]||(t[2]=e=>o.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):b("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])};export default v;
1
+ import e from"primevue/confirmationeventbus";import{ZIndexUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as n}from"primevue/utils";import r from"primevue/overlayeventbus";import o from"primevue/button";import{resolveComponent as s,openBlock as c,createBlock as l,Teleport as a,createVNode as p,Transition as u,withCtx as f,mergeProps as m,toDisplayString as h,resolveDynamicComponent as d,createCommentVNode as b}from"vue";var v={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},e.on("confirm",this.confirmListener),e.on("close",this.closeListener)},beforeUnmount(){e.off("confirm",this.confirmListener),e.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.clear(e)},alignOverlay(){i.absolutePosition(this.container,this.target);const e=i.getOffset(this.container),t=i.getOffset(this.target);let n=0;e.left<t.left&&(n=t.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<t.top&&i.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)?this.visible=!1:this.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new n(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef(e){this.container=e},onOverlayClick(e){r.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:o}};const L={key:0,class:"p-confirm-popup-content"},g={class:"p-confirm-popup-message"},C={class:"p-confirm-popup-footer"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),v.render=function(e,t,i,n,r,o){const v=s("CPButton");return c(),l(a,{to:"body"},[p(u,{name:"p-confirm-popup",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:f((()=>[r.visible?(c(),l("div",m({key:0,class:o.containerClass,ref:o.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[e.$slots.message?(c(),l(d(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(c(),l("div",L,[p("i",{class:o.iconClass},null,2),p("span",g,h(r.confirmation.message),1)])),p("div",C,[p(v,{label:o.rejectLabel,icon:o.rejectIcon,class:o.rejectClass,onClick:t[1]||(t[1]=e=>o.reject())},null,8,["label","icon","class"]),p(v,{label:o.acceptLabel,icon:o.acceptIcon,class:o.acceptClass,onClick:t[2]||(t[2]=e=>o.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):b("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])};export default v;
@@ -81,7 +81,6 @@ this.primevue.confirmpopup = (function (ConfirmationEventBus, utils, OverlayEven
81
81
  this.visible = false;
82
82
  },
83
83
  onEnter(el) {
84
- this.alignOverlay();
85
84
  this.bindOutsideClickListener();
86
85
  this.bindScrollListener();
87
86
  this.bindResizeListener();
@@ -117,6 +116,8 @@ this.primevue.confirmpopup = (function (ConfirmationEventBus, utils, OverlayEven
117
116
  this.outsideClickListener = (event) => {
118
117
  if (this.visible && this.container && !this.container.contains(event.target) && !this.isTargetClicked(event)) {
119
118
  this.visible = false;
119
+ } else {
120
+ this.alignOverlay();
120
121
  }
121
122
  };
122
123
  document.addEventListener('click', this.outsideClickListener);
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,i,n,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(e),c=r(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&(this.visible=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:r(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),l.render=function(e,t,i,n,r,s){const c=o.resolveComponent("CPButton");return o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.createVNode(o.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:o.withCtx((()=>[r.visible?(o.openBlock(),o.createBlock("div",o.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(o.openBlock(),o.createBlock("div",a,[o.createVNode("i",{class:s.iconClass},null,2),o.createVNode("span",p,o.toDisplayString(r.confirmation.message),1)])),o.createVNode("div",u,[o.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),o.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):o.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},l}(primevue.confirmationeventbus,primevue.utils,primevue.overlayeventbus,primevue.button,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.confirmpopup=function(e,t,i,n,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(e),c=r(i),l={name:"ConfirmPopup",inheritAttrs:!1,props:{group:String},data:()=>({visible:!1,confirmation:null}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,confirmListener:null,closeListener:null,mounted(){this.confirmListener=e=>{e&&e.group===this.group&&(this.confirmation=e,this.target=e.target,this.visible=!0)},this.closeListener=()=>{this.visible=!1,this.confirmation=null},s.default.on("confirm",this.confirmListener),s.default.on("close",this.closeListener)},beforeUnmount(){s.default.off("confirm",this.confirmListener),s.default.off("close",this.closeListener),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindResizeListener(),this.container&&(t.ZIndexUtils.clear(this.container),this.container=null),this.target=null,this.confirmation=null},methods:{accept(){this.confirmation.accept&&this.confirmation.accept(),this.visible=!1},reject(){this.confirmation.reject&&this.confirmation.reject(),this.visible=!1},onEnter(e){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),t.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay)},onLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener()},onAfterLeave(e){t.ZIndexUtils.clear(e)},alignOverlay(){t.DomHandler.absolutePosition(this.container,this.target);const e=t.DomHandler.getOffset(this.container),i=t.DomHandler.getOffset(this.target);let n=0;e.left<i.left&&(n=i.left-e.left),this.container.style.setProperty("--overlayArrowLeft",`${n}px`),e.top<i.top&&t.DomHandler.addClass(this.container,"p-confirm-popup-flipped")},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)?this.visible=!1:this.alignOverlay()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new t.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&(this.visible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&(this.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(e){return this.target&&(this.target===e.target||this.target.contains(e.target))},containerRef(e){this.container=e},onOverlayClick(e){c.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-confirm-popup p-component",{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},message(){return this.confirmation?this.confirmation.message:null},iconClass(){return["p-confirm-popup-icon",this.confirmation?this.confirmation.icon:null]},acceptLabel(){return this.confirmation?this.confirmation.acceptLabel||this.$primevue.config.locale.accept:null},rejectLabel(){return this.confirmation?this.confirmation.rejectLabel||this.$primevue.config.locale.reject:null},acceptIcon(){return this.confirmation?this.confirmation.acceptIcon:null},rejectIcon(){return this.confirmation?this.confirmation.rejectIcon:null},acceptClass(){return["p-confirm-popup-accept p-button-sm",this.confirmation?this.confirmation.acceptClass:null]},rejectClass(){return["p-confirm-popup-reject p-button-sm",this.confirmation?this.confirmation.rejectClass||"p-button-text":null]}},components:{CPButton:r(n).default}};const a={key:0,class:"p-confirm-popup-content"},p={class:"p-confirm-popup-message"},u={class:"p-confirm-popup-footer"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('\n.p-confirm-popup {\n position: absolute;\n margin-top: 10px;\n top: 0;\n left: 0;\n}\n.p-confirm-popup-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n}\n\n/* Animation */\n.p-confirm-popup-enter-from {\n opacity: 0;\n -webkit-transform: scaleY(0.8);\n transform: scaleY(0.8);\n}\n.p-confirm-popup-leave-to {\n opacity: 0;\n}\n.p-confirm-popup-enter-active {\n -webkit-transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1), -webkit-transform .12s cubic-bezier(0, 0, 0.2, 1);\n}\n.p-confirm-popup-leave-active {\n -webkit-transition: opacity .1s linear;\n transition: opacity .1s linear;\n}\n.p-confirm-popup:after, .p-confirm-popup:before {\n\tbottom: 100%;\n\tleft: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.p-confirm-popup:after {\n\tborder-width: 8px;\n\tmargin-left: -8px;\n}\n.p-confirm-popup:before {\n\tborder-width: 10px;\n\tmargin-left: -10px;\n}\n.p-confirm-popup-flipped:after, .p-confirm-popup-flipped:before {\n bottom: auto;\n top: 100%;\n}\n.p-confirm-popup.p-confirm-popup-flipped:after {\n border-bottom-color: transparent;\n}\n.p-confirm-popup.p-confirm-popup-flipped:before {\n border-bottom-color: transparent\n}\n.p-confirm-popup .p-confirm-popup-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n'),l.render=function(e,t,i,n,r,s){const c=o.resolveComponent("CPButton");return o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.createVNode(o.Transition,{name:"p-confirm-popup",onEnter:s.onEnter,onLeave:s.onLeave,onAfterLeave:s.onAfterLeave},{default:o.withCtx((()=>[r.visible?(o.openBlock(),o.createBlock("div",o.mergeProps({key:0,class:s.containerClass,ref:s.containerRef},e.$attrs,{onClick:t[3]||(t[3]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))}),[e.$slots.message?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.$slots.message),{key:1,message:r.confirmation},null,8,["message"])):(o.openBlock(),o.createBlock("div",a,[o.createVNode("i",{class:s.iconClass},null,2),o.createVNode("span",p,o.toDisplayString(r.confirmation.message),1)])),o.createVNode("div",u,[o.createVNode(c,{label:s.rejectLabel,icon:s.rejectIcon,class:s.rejectClass,onClick:t[1]||(t[1]=e=>s.reject())},null,8,["label","icon","class"]),o.createVNode(c,{label:s.acceptLabel,icon:s.acceptIcon,class:s.acceptClass,onClick:t[2]||(t[2]=e=>s.accept()),autofocus:""},null,8,["label","icon","class"])])],16)):o.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])])},l}(primevue.confirmationeventbus,primevue.utils,primevue.overlayeventbus,primevue.button,Vue);
package/core/core.js CHANGED
@@ -1707,7 +1707,15 @@ this.primevue.tooltip = (function (utils) {
1707
1707
 
1708
1708
  let tooltipText = document.createElement('div');
1709
1709
  tooltipText.className = 'p-tooltip-text';
1710
- tooltipText.innerHTML = el.$_ptooltipValue;
1710
+
1711
+
1712
+ if (el.$_ptooltipEscape) {
1713
+ tooltipText.innerHTML = el.$_ptooltipValue;
1714
+ }
1715
+ else {
1716
+ tooltipText.innerHTML = '';
1717
+ tooltipText.appendChild(document.createTextNode(el.$_ptooltipValue));
1718
+ }
1711
1719
 
1712
1720
  container.appendChild(tooltipText);
1713
1721
  document.body.appendChild(container);
@@ -1885,11 +1893,13 @@ this.primevue.tooltip = (function (utils) {
1885
1893
  else if (typeof options.value === 'string') {
1886
1894
  target.$_ptooltipValue = options.value;
1887
1895
  target.$_ptooltipDisabled = false;
1896
+ target.$_ptooltipEscape = false;
1888
1897
  target.$_ptooltipClass = null;
1889
1898
  }
1890
1899
  else {
1891
1900
  target.$_ptooltipValue = options.value.value;
1892
1901
  target.$_ptooltipDisabled = options.value.disabled || false;
1902
+ target.$_ptooltipEscape = options.value.escape || false;
1893
1903
  target.$_ptooltipClass = options.value.class;
1894
1904
  }
1895
1905
 
@@ -1916,11 +1926,13 @@ this.primevue.tooltip = (function (utils) {
1916
1926
  if (typeof options.value === 'string') {
1917
1927
  target.$_ptooltipValue = options.value;
1918
1928
  target.$_ptooltipDisabled = false;
1929
+ target.$_ptooltipEscape = false;
1919
1930
  target.$_ptooltipClass = null;
1920
1931
  }
1921
1932
  else {
1922
1933
  target.$_ptooltipValue = options.value.value;
1923
1934
  target.$_ptooltipDisabled = options.value.disabled || false;
1935
+ target.$_ptooltipEscape = options.value.escape || false;
1924
1936
  target.$_ptooltipClass = options.value.class;
1925
1937
  }
1926
1938
  }
package/core/core.min.js CHANGED
@@ -6,7 +6,7 @@ this.primevue=this.primevue||{},this.primevue.config=function(e,t,a){"use strict
6
6
 
7
7
  this.primevue=this.primevue||{},this.primevue.ripple=function(e){"use strict";function t(e){let t=r(e);t&&(!function(e){e.removeEventListener("mousedown",n)}(e),t.removeEventListener("animationend",i),t.remove())}function n(t){let n=t.currentTarget,i=r(n);if(!i||"none"===getComputedStyle(i,null).display)return;if(e.DomHandler.removeClass(i,"p-ink-active"),!e.DomHandler.getHeight(i)&&!e.DomHandler.getWidth(i)){let t=Math.max(e.DomHandler.getOuterWidth(n),e.DomHandler.getOuterHeight(n));i.style.height=t+"px",i.style.width=t+"px"}let l=e.DomHandler.getOffset(n),o=t.pageX-l.left+document.body.scrollTop-e.DomHandler.getWidth(i)/2,a=t.pageY-l.top+document.body.scrollLeft-e.DomHandler.getHeight(i)/2;i.style.top=a+"px",i.style.left=o+"px",e.DomHandler.addClass(i,"p-ink-active")}function i(t){e.DomHandler.removeClass(t.currentTarget,"p-ink-active")}function r(e){for(let t=0;t<e.children.length;t++)if("string"==typeof e.children[t].className&&-1!==e.children[t].className.indexOf("p-ink"))return e.children[t];return null}return{mounted(e,t){t.instance.$primevue&&t.instance.$primevue.config&&t.instance.$primevue.config.ripple&&(function(e){let t=document.createElement("span");t.className="p-ink",e.appendChild(t),t.addEventListener("animationend",i)}(e),function(e){e.addEventListener("mousedown",n)}(e))},unmounted(e){t(e)}}}(primevue.utils);
8
8
 
9
- this.primevue=this.primevue||{},this.primevue.tooltip=function(e){"use strict";function t(e){r(e.currentTarget)}function o(e){p(e.currentTarget)}function l(e){r(e.currentTarget)}function n(e){p(e.currentTarget)}function i(e){p(e.currentTarget)}function r(t){if(t.$_ptooltipDisabled)return;let o=function(t){const o=e.UniqueComponentId()+"_tooltip";t.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let n=document.createElement("div");n.className="p-tooltip-arrow",l.appendChild(n);let i=document.createElement("div");return i.className="p-tooltip-text",i.innerHTML=t.$_ptooltipValue,l.appendChild(i),document.body.appendChild(l),l.style.display="inline-block",l}(t);!function(e){const t=e.$_ptooltipModifiers;t.top?(f(e),g(e)&&(m(e),g(e)&&f(e))):t.left?(c(e),g(e)&&(s(e),g(e)&&(f(e),g(e)&&(m(e),g(e)&&c(e))))):t.bottom?(m(e),g(e)&&(f(e),g(e)&&m(e))):(s(e),g(e)&&(c(e),g(e)&&(f(e),g(e)&&(m(e),g(e)&&s(e)))))}(t),e.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){e.DomHandler.isAndroid()||p(t),this.removeEventListener("resize",o)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new e.ConnectedOverlayScrollHandler(t,(function(){p(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),e.ZIndexUtils.set("tooltip",o,t.$_ptooltipZIndex)}function p(t){u(t),function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()}(t),e.ZIndexUtils.clear(t)}function d(e){return document.getElementById(e.$_ptooltipId)}function u(e){if(e){let t=d(e);t&&t.parentElement&&document.body.removeChild(t),e.$_ptooltipId=null}}function a(t){let o=t.getBoundingClientRect();return{left:o.left+e.DomHandler.getWindowScrollLeft(),top:o.top+e.DomHandler.getWindowScrollTop()}}function s(t){v(t,"right");let o=d(t),l=a(t),n=l.left+e.DomHandler.getOuterWidth(t),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function c(t){v(t,"left");let o=d(t),l=a(t),n=l.left-e.DomHandler.getOuterWidth(o),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function f(t){v(t,"top");let o=d(t),l=a(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top-e.DomHandler.getOuterHeight(o);o.style.left=n+"px",o.style.top=i+"px"}function m(t){v(t,"bottom");let o=d(t),l=a(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top+e.DomHandler.getOuterHeight(t);o.style.left=n+"px",o.style.top=i+"px"}function v(e,t){let o=d(e);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${t} ${e.$_ptooltipClass||""}`}function g(t){let o=d(t),l=o.getBoundingClientRect(),n=l.top,i=l.left,r=e.DomHandler.getOuterWidth(o),p=e.DomHandler.getOuterHeight(o),u=e.DomHandler.getViewport();return i+r>u.width||i<0||n<0||n+p>u.height}function H(t){return e.DomHandler.hasClass(t,"p-inputwrapper")?e.DomHandler.findSingle(t,"input"):t}function $(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&"object"==typeof e.arg?Object.entries(e.arg).reduce(((e,[t,o])=>("event"!==t&&"position"!==t||(e[o]=!0),e)),{}):{}}return{beforeMount(e,r){let p=H(e);p.$_ptooltipModifiers=$(r),r.value&&("string"==typeof r.value?(p.$_ptooltipValue=r.value,p.$_ptooltipDisabled=!1,p.$_ptooltipClass=null):(p.$_ptooltipValue=r.value.value,p.$_ptooltipDisabled=r.value.disabled||!1,p.$_ptooltipClass=r.value.class),p.$_ptooltipZIndex=r.instance.$primevue&&r.instance.$primevue.config&&r.instance.$primevue.config.zIndex.tooltip,function(e){e.$_ptooltipModifiers.focus?(e.addEventListener("focus",l),e.addEventListener("blur",n)):(e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",o),e.addEventListener("click",i))}(p))},unmounted(r){let p=H(r);u(p),function(e){e.$_ptooltipModifiers.focus?(e.removeEventListener("focus",l),e.removeEventListener("blur",n)):(e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",o),e.removeEventListener("click",i))}(p),p.$_ptooltipScrollHandler&&(p.$_ptooltipScrollHandler.destroy(),p.$_ptooltipScrollHandler=null),e.ZIndexUtils.clear(r)},updated(e,t){let o=H(e);o.$_ptooltipModifiers=$(t),t.value&&("string"==typeof t.value?(o.$_ptooltipValue=t.value,o.$_ptooltipDisabled=!1,o.$_ptooltipClass=null):(o.$_ptooltipValue=t.value.value,o.$_ptooltipDisabled=t.value.disabled||!1,o.$_ptooltipClass=t.value.class))}}}(primevue.utils);
9
+ this.primevue=this.primevue||{},this.primevue.tooltip=function(e){"use strict";function t(e){r(e.currentTarget)}function o(e){p(e.currentTarget)}function l(e){r(e.currentTarget)}function n(e){p(e.currentTarget)}function i(e){p(e.currentTarget)}function r(t){if(t.$_ptooltipDisabled)return;let o=function(t){const o=e.UniqueComponentId()+"_tooltip";t.$_ptooltipId=o;let l=document.createElement("div");l.id=o;let n=document.createElement("div");n.className="p-tooltip-arrow",l.appendChild(n);let i=document.createElement("div");i.className="p-tooltip-text",t.$_ptooltipEscape?i.innerHTML=t.$_ptooltipValue:(i.innerHTML="",i.appendChild(document.createTextNode(t.$_ptooltipValue)));return l.appendChild(i),document.body.appendChild(l),l.style.display="inline-block",l}(t);!function(e){const t=e.$_ptooltipModifiers;t.top?(f(e),g(e)&&(m(e),g(e)&&f(e))):t.left?(c(e),g(e)&&(s(e),g(e)&&(f(e),g(e)&&(m(e),g(e)&&c(e))))):t.bottom?(m(e),g(e)&&(f(e),g(e)&&m(e))):(s(e),g(e)&&(c(e),g(e)&&(f(e),g(e)&&(m(e),g(e)&&s(e)))))}(t),e.DomHandler.fadeIn(o,250),window.addEventListener("resize",(function o(){e.DomHandler.isAndroid()||p(t),this.removeEventListener("resize",o)})),function(t){t.$_ptooltipScrollHandler||(t.$_ptooltipScrollHandler=new e.ConnectedOverlayScrollHandler(t,(function(){p(t)}))),t.$_ptooltipScrollHandler.bindScrollListener()}(t),e.ZIndexUtils.set("tooltip",o,t.$_ptooltipZIndex)}function p(t){a(t),function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()}(t),e.ZIndexUtils.clear(t)}function d(e){return document.getElementById(e.$_ptooltipId)}function a(e){if(e){let t=d(e);t&&t.parentElement&&document.body.removeChild(t),e.$_ptooltipId=null}}function u(t){let o=t.getBoundingClientRect();return{left:o.left+e.DomHandler.getWindowScrollLeft(),top:o.top+e.DomHandler.getWindowScrollTop()}}function s(t){v(t,"right");let o=d(t),l=u(t),n=l.left+e.DomHandler.getOuterWidth(t),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function c(t){v(t,"left");let o=d(t),l=u(t),n=l.left-e.DomHandler.getOuterWidth(o),i=l.top+(e.DomHandler.getOuterHeight(t)-e.DomHandler.getOuterHeight(o))/2;o.style.left=n+"px",o.style.top=i+"px"}function f(t){v(t,"top");let o=d(t),l=u(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top-e.DomHandler.getOuterHeight(o);o.style.left=n+"px",o.style.top=i+"px"}function m(t){v(t,"bottom");let o=d(t),l=u(t),n=l.left+(e.DomHandler.getOuterWidth(t)-e.DomHandler.getOuterWidth(o))/2,i=l.top+e.DomHandler.getOuterHeight(t);o.style.left=n+"px",o.style.top=i+"px"}function v(e,t){let o=d(e);o.style.left="-999px",o.style.top="-999px",o.className=`p-tooltip p-component p-tooltip-${t} ${e.$_ptooltipClass||""}`}function g(t){let o=d(t),l=o.getBoundingClientRect(),n=l.top,i=l.left,r=e.DomHandler.getOuterWidth(o),p=e.DomHandler.getOuterHeight(o),a=e.DomHandler.getViewport();return i+r>a.width||i<0||n<0||n+p>a.height}function $(t){return e.DomHandler.hasClass(t,"p-inputwrapper")?e.DomHandler.findSingle(t,"input"):t}function _(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&"object"==typeof e.arg?Object.entries(e.arg).reduce(((e,[t,o])=>("event"!==t&&"position"!==t||(e[o]=!0),e)),{}):{}}return{beforeMount(e,r){let p=$(e);p.$_ptooltipModifiers=_(r),r.value&&("string"==typeof r.value?(p.$_ptooltipValue=r.value,p.$_ptooltipDisabled=!1,p.$_ptooltipEscape=!1,p.$_ptooltipClass=null):(p.$_ptooltipValue=r.value.value,p.$_ptooltipDisabled=r.value.disabled||!1,p.$_ptooltipEscape=r.value.escape||!1,p.$_ptooltipClass=r.value.class),p.$_ptooltipZIndex=r.instance.$primevue&&r.instance.$primevue.config&&r.instance.$primevue.config.zIndex.tooltip,function(e){e.$_ptooltipModifiers.focus?(e.addEventListener("focus",l),e.addEventListener("blur",n)):(e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",o),e.addEventListener("click",i))}(p))},unmounted(r){let p=$(r);a(p),function(e){e.$_ptooltipModifiers.focus?(e.removeEventListener("focus",l),e.removeEventListener("blur",n)):(e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",o),e.removeEventListener("click",i))}(p),p.$_ptooltipScrollHandler&&(p.$_ptooltipScrollHandler.destroy(),p.$_ptooltipScrollHandler=null),e.ZIndexUtils.clear(r)},updated(e,t){let o=$(e);o.$_ptooltipModifiers=_(t),t.value&&("string"==typeof t.value?(o.$_ptooltipValue=t.value,o.$_ptooltipDisabled=!1,o.$_ptooltipEscape=!1,o.$_ptooltipClass=null):(o.$_ptooltipValue=t.value.value,o.$_ptooltipDisabled=t.value.disabled||!1,o.$_ptooltipEscape=t.value.escape||!1,o.$_ptooltipClass=t.value.class))}}}(primevue.utils);
10
10
 
11
11
  this.primevue=this.primevue||{},this.primevue.virtualscroller=function(t){"use strict";var s={name:"VirtualScroller",emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1}},data(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,mounted(){this.init(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},watch:{numToleratedItems(t){this.d_numToleratedItems=t},loading(t){this.d_loading=t},items(t,s){s&&s.length===(t||[]).length||this.init()},orientation(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0}},methods:{init(){this.setSize(),this.calculateOptions(),this.setSpacerSize()},isVertical(){return"vertical"===this.orientation},isHorizontal(){return"horizontal"===this.orientation},isBoth(){return"both"===this.orientation},scrollTo(t){this.element&&this.element.scrollTo(t)},scrollToIndex(t,s="auto"){const e=this.isBoth(),i=this.isHorizontal(),o=this.first,{numToleratedItems:l}=this.calculateNumItems(),n=this.itemSize,r=this.getContentPosition(),a=(t=0,s)=>t<=s?0:t,h=(t,s,e)=>t*s+e,c=(t=0,e=0)=>this.scrollTo({left:t,top:e,behavior:s});if(e){const s={rows:a(t[0],l[0]),cols:a(t[1],l[1])};s.rows===o.rows&&s.cols===o.cols||(c(h(s.cols,n[1],r.left),h(s.rows,n[0],r.top)),this.first=s)}else{const s=a(t,l);s!==o&&(i?c(h(s,n,r.left),0):c(0,h(s,n,r.top)),this.first=s)}},scrollInView(t,s,e="auto"){if(s){const i=this.isBoth(),o=this.isHorizontal(),{first:l,viewport:n}=this.getRenderedRange(),r=(t=0,s=0)=>this.scrollTo({left:t,top:s,behavior:e}),a="to-end"===s;if("to-start"===s){if(i)n.first.rows-l.rows>t[0]?r(n.first.cols*this.itemSize[1],(n.first.rows-1)*this.itemSize[0]):n.first.cols-l.cols>t[1]&&r((n.first.cols-1)*this.itemSize[1],n.first.rows*this.itemSize[0]);else if(n.first-l>t){const t=(n.first-1)*this.itemSize;o?r(t,0):r(0,t)}}else if(a)if(i)n.last.rows-l.rows<=t[0]+1?r(n.first.cols*this.itemSize[1],(n.first.rows+1)*this.itemSize[0]):n.last.cols-l.cols<=t[1]+1&&r((n.first.cols+1)*this.itemSize[1],n.first.rows*this.itemSize[0]);else if(n.last-l<=t+1){const t=(n.first+1)*this.itemSize;o?r(t,0):r(0,t)}}else this.scrollToIndex(t,e)},getRenderedRange(){const t=(t,s)=>Math.floor(t/(s||t));let s=this.first,e=0;if(this.element){const i=this.isBoth(),o=this.isHorizontal(),l=this.element.scrollTop,n=this.element.scrollLeft;if(i)s={rows:t(l,this.itemSize[0]),cols:t(n,this.itemSize[1])},e={rows:s.rows+this.numItemsInViewport.rows,cols:s.cols+this.numItemsInViewport.cols};else{s=t(o?n:l,this.itemSize),e=s+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:s,last:e}}},calculateNumItems(){const t=this.isBoth(),s=this.isHorizontal(),e=this.itemSize,i=this.getContentPosition(),o=this.element?this.element.offsetWidth-i.left:0,l=this.element?this.element.offsetHeight-i.top:0,n=(t,s)=>Math.ceil(t/(s||t)),r=t=>Math.ceil(t/2),a=t?{rows:n(l,e[0]),cols:n(o,e[1])}:n(s?o:l,e);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions(){const t=this.isBoth(),s=this.first,{numItemsInViewport:e,numToleratedItems:i}=this.calculateNumItems(),o=(t,s,e,i)=>this.getLast(t+s+(t<e?2:3)*e,i),l=t?{rows:o(s.rows,e.rows,i[0]),cols:o(s.cols,e.cols,i[1],!0)}:o(s,e,i);this.last=l,this.numItemsInViewport=e,this.d_numToleratedItems=i,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=t?Array.from({length:e.rows}).map((()=>Array.from({length:e.cols}))):Array.from({length:e})),this.lazy&&this.$emit("lazy-load",{first:s,last:l})},getLast(t=0,s){return this.items?Math.min(s?(this.columns||this.items[0]).length:this.items.length,t):0},getContentPosition(){if(this.content){const t=getComputedStyle(this.content),s=parseInt(t.paddingLeft,10)+Math.max(parseInt(t.left,10),0),e=parseInt(t.paddingRight,10)+Math.max(parseInt(t.right,10),0),i=parseInt(t.paddingTop,10)+Math.max(parseInt(t.top,10),0),o=parseInt(t.paddingBottom,10)+Math.max(parseInt(t.bottom,10),0);return{left:s,right:e,top:i,bottom:o,x:s+e,y:i+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize(){if(this.element){const t=this.isBoth(),s=this.isHorizontal(),e=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||e.offsetWidth}px`,o=this.scrollHeight||`${this.element.offsetHeight||e.offsetHeight}px`,l=(t,s)=>this.element.style[t]=s;t||s?(l("height",o),l("width",i)):l("height",o)}},setSpacerSize(){const t=this.items;if(t){const s=this.isBoth(),e=this.isHorizontal(),i=this.getContentPosition(),o=(t,s,e,i=0)=>this.spacerStyle={...this.spacerStyle,[`${t}`]:(s||[]).length*e+i+"px"};s?(o("height",t,this.itemSize[0],i.y),o("width",this.columns||t[1],this.itemSize[1],i.x)):e?o("width",this.columns||t,this.itemSize,i.x):o("height",t,this.itemSize,i.y)}},setContentPosition(t){if(this.content){const s=this.isBoth(),e=this.isHorizontal(),i=t?t.first:this.first,o=(t,s)=>t*s,l=(t=0,s=0)=>{this.contentStyle={...this.contentStyle,transform:`translate3d(${t}px, ${s}px, 0)`}};if(s)l(o(i.cols,this.itemSize[1]),o(i.rows,this.itemSize[0]));else{const t=o(i,this.itemSize);e?l(t,0):l(0,t)}}},onScrollPositionChange(t){const s=t.target,e=this.isBoth(),i=this.isHorizontal(),o=this.getContentPosition(),l=(t,s)=>t?t>s?t-s:t:0,n=(t,s)=>Math.floor(t/(s||t)),r=(t,s,e,i,o,l)=>t<=o?o:l?e-i-o:s+o-1,a=(t,s,e,i,o,l,n)=>t<=l?0:Math.max(0,n?t<s?e:t-l:t>s?e:t-2*l),h=(t,s,e,i,o,l)=>{let n=s+i+2*o;return t>=o&&(n+=o+1),this.getLast(n,l)},c=l(s.scrollTop,o.top),m=l(s.scrollLeft,o.left);let d=0,u=this.last,p=!1;if(e){const t=this.lastScrollPos.top<=c,s=this.lastScrollPos.left<=m,e={rows:n(c,this.itemSize[0]),cols:n(m,this.itemSize[1])},i={rows:r(e.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],t),cols:r(e.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],s)};d={rows:a(e.rows,i.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],t),cols:a(e.cols,i.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],s)},u={rows:h(e.rows,d.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:h(e.cols,d.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=d.rows!==this.first.rows&&u.rows!==this.last.rows||d.cols!==this.first.cols&&u.cols!==this.last.cols,this.lastScrollPos={top:c,left:m}}else{const t=i?m:c,s=this.lastScrollPos<=t,e=n(t,this.itemSize);d=a(e,r(e,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,s),this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,s),u=h(e,d,this.last,this.numItemsInViewport,this.d_numToleratedItems),p=d!==this.first&&u!==this.last,this.lastScrollPos=t}return{first:d,last:u,isRangeChanged:p}},onScrollChange(t){const{first:s,last:e,isRangeChanged:i}=this.onScrollPositionChange(t);if(i){const t={first:s,last:e};this.setContentPosition(t),this.first=s,this.last=e,this.$emit("scroll-index-change",t),this.lazy&&this.$emit("lazy-load",t)}},onScroll(t){if(this.$emit("scroll",t),this.delay){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:s}=this.onScrollPositionChange(t);s&&(this.d_loading=!0)}this.scrollTimeout=setTimeout((()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&!this.lazy&&(this.d_loading=!1)}),this.delay)}else this.onScrollChange(t)},getOptions(t){const s=(this.items||[]).length,e=this.isBoth()?this.first.rows+t:this.first+t;return{index:e,count:s,first:0===e,last:e===s-1,even:e%2==0,odd:e%2!=0}},getLoaderOptions(t,s){let e=this.loaderArr.length;return{index:t,count:e,first:0===t,last:t===e-1,even:t%2==0,odd:t%2!=0,...s}},elementRef(t){this.element=t},contentRef(t){this.content=t}},computed:{containerClass(){return["p-virtualscroller",{"p-both-scroll":this.isBoth(),"p-horizontal-scroll":this.isHorizontal()},this.class]},contentClass(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems(){const t=this.items;return t&&!this.d_loading?this.isBoth()?t.slice(this.first.rows,this.last.rows).map((t=>this.columns?t:t.slice(this.first.cols,this.last.cols))):this.isHorizontal()&&this.columns?t:t.slice(this.first,this.last):[]},loadedRows(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns(){if(this.columns){const t=this.isBoth(),s=this.isHorizontal();if(t||s)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}}};const e={key:1,class:"p-virtualscroller-loading-icon pi pi-spinner pi-spin"};return function(t,s){void 0===s&&(s={});var e=s.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===e&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.p-virtualscroller {\n position: relative;\n overflow: auto;\n contain: strict;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n will-change: scroll-position;\n outline: 0 none;\n}\n.p-virtualscroller-content {\n position: absolute;\n top: 0;\n left: 0;\n contain: content;\n min-height: 100%;\n min-width: 100%;\n will-change: transform;\n}\n.p-virtualscroller-spacer {\n position: absolute;\n top: 0;\n left: 0;\n height: 1px;\n width: 1px;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n pointer-events: none;\n}\n.p-virtualscroller .p-virtualscroller-loader {\n position: sticky;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.p-virtualscroller-loader.p-component-overlay {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n"),s.render=function(s,i,o,l,n,r){return o.disabled?(t.openBlock(),t.createBlock(t.Fragment,{key:1},[t.renderSlot(s.$slots,"default"),t.renderSlot(s.$slots,"content",{items:o.items,rows:o.items,columns:r.loadedColumns})],64)):(t.openBlock(),t.createBlock("div",{key:0,ref:r.elementRef,class:r.containerClass,tabindex:0,style:o.style,onScroll:i[1]||(i[1]=(...t)=>r.onScroll&&r.onScroll(...t))},[t.renderSlot(s.$slots,"content",{styleClass:r.contentClass,items:r.loadedItems,getItemOptions:r.getOptions,loading:n.d_loading,getLoaderOptions:r.getLoaderOptions,itemSize:o.itemSize,rows:r.loadedRows,columns:r.loadedColumns,contentRef:r.contentRef,spacerStyle:n.spacerStyle,contentStyle:n.contentStyle,vertical:r.isVertical(),horizontal:r.isHorizontal(),both:r.isBoth()},(()=>[t.createVNode("div",{ref:r.contentRef,class:r.contentClass,style:n.contentStyle},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(r.loadedItems,((e,i)=>t.renderSlot(s.$slots,"item",{key:i,item:e,options:r.getOptions(i)}))),128))],6)])),o.showSpacer?(t.openBlock(),t.createBlock("div",{key:0,class:"p-virtualscroller-spacer",style:n.spacerStyle},null,4)):t.createCommentVNode("",!0),!o.loaderDisabled&&o.showLoader&&n.d_loading?(t.openBlock(),t.createBlock("div",{key:1,class:r.loaderClass},[s.$slots&&s.$slots.loader?(t.openBlock(!0),t.createBlock(t.Fragment,{key:0},t.renderList(n.loaderArr,((e,i)=>t.renderSlot(s.$slots,"loader",{key:i,options:r.getLoaderOptions(i,r.isBoth()&&{numCols:s.d_numItemsInViewport.cols})}))),128)):(t.openBlock(),t.createBlock("i",e))],2)):t.createCommentVNode("",!0)],38))},s}(Vue);
12
12
 
@@ -113,6 +113,10 @@ export interface DataViewProps {
113
113
  * Defines if data is loaded and interacted with in lazy manner.
114
114
  */
115
115
  lazy?: boolean | undefined;
116
+ /**
117
+ * Name of the data that uniquely identifies the a record in the data.
118
+ */
119
+ dataKey: string | undefined;
116
120
  }
117
121
 
118
122
  export interface DataViewSlots {
@@ -14,7 +14,7 @@
14
14
  </DVPaginator>
15
15
  <div class="p-dataview-content">
16
16
  <div class="p-grid p-nogutter grid grid-nogutter">
17
- <template v-for="(item,index) of items">
17
+ <template v-for="(item,index) of items" :key="getKey(item, index)">
18
18
  <slot v-if="$slots.list && layout === 'list'" name="list" :data="item" :index="index"></slot>
19
19
  <slot v-if="$slots.grid && layout === 'grid'" name="grid" :data="item" :index="index"></slot>
20
20
  </template>
@@ -106,6 +106,10 @@ export default {
106
106
  lazy: {
107
107
  type: Boolean,
108
108
  default: false
109
+ },
110
+ dataKey: {
111
+ type: String,
112
+ default: null
109
113
  }
110
114
  },
111
115
  data() {
@@ -129,6 +133,9 @@ export default {
129
133
  }
130
134
  },
131
135
  methods: {
136
+ getKey(item, index) {
137
+ return this.dataKey ? ObjectUtils.resolveFieldData(item, this.dataKey) : index;
138
+ },
132
139
  onPage(event) {
133
140
  this.d_first = event.first;
134
141
  this.d_rows = event.rows;
@@ -71,6 +71,10 @@ var script = {
71
71
  lazy: {
72
72
  type: Boolean,
73
73
  default: false
74
+ },
75
+ dataKey: {
76
+ type: String,
77
+ default: null
74
78
  }
75
79
  },
76
80
  data() {
@@ -94,6 +98,9 @@ var script = {
94
98
  }
95
99
  },
96
100
  methods: {
101
+ getKey(item, index) {
102
+ return this.dataKey ? utils.ObjectUtils.resolveFieldData(item, this.dataKey) : index;
103
+ },
97
104
  onPage(event) {
98
105
  this.d_first = event.first;
99
106
  this.d_rows = event.rows;
@@ -246,7 +253,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
246
253
  vue.createVNode("div", _hoisted_2, [
247
254
  vue.createVNode("div", _hoisted_3, [
248
255
  (vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($options.items, (item, index) => {
249
- return (vue.openBlock(), vue.createBlock(vue.Fragment, null, [
256
+ return (vue.openBlock(), vue.createBlock(vue.Fragment, {
257
+ key: $options.getKey(item, index)
258
+ }, [
250
259
  (_ctx.$slots.list && $props.layout === 'list')
251
260
  ? vue.renderSlot(_ctx.$slots, "list", {
252
261
  key: 0,
@@ -262,7 +271,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
262
271
  })
263
272
  : vue.createCommentVNode("", true)
264
273
  ], 64))
265
- }), 256)),
274
+ }), 128)),
266
275
  ($options.empty)
267
276
  ? (vue.openBlock(), vue.createBlock("div", _hoisted_4, [
268
277
  vue.createVNode("div", _hoisted_5, [
@@ -1 +1 @@
1
- "use strict";var t=require("primevue/utils"),e=require("primevue/paginator"),a=require("vue");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r={name:"DataView",emits:["update:first","update:rows","page"],props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(t){this.d_first=t},rows(t){this.d_rows=t},sortField(){this.resetPage()},sortOrder(){this.resetPage()}},methods:{onPage(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort(){if(this.value){const e=[...this.value];return e.sort(((e,a)=>{let o=t.ObjectUtils.resolveFieldData(e,this.sortField),r=t.ObjectUtils.resolveFieldData(a,this.sortField),s=null;return s=null==o&&null!=r?-1:null!=o&&null==r?1:null==o&&null==r?0:"string"==typeof o&&"string"==typeof r?o.localeCompare(r,void 0,{numeric:!0}):o<r?-1:o>r?1:0,this.sortOrder*s})),e}return null},resetPage(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{containerClass(){return["p-dataview p-component",{"p-dataview-list":"list"===this.layout,"p-dataview-grid":"grid"===this.layout}]},getTotalRecords(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty(){return!this.value||0===this.value.length},paginatorTop(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items(){if(this.value&&this.value.length){let t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){const e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:o(e).default}};const s={key:0,class:"p-dataview-header"},i={class:"p-dataview-content"},l={class:"p-grid p-nogutter grid grid-nogutter"},n={key:0,class:"p-col col"},p={class:"p-dataview-emptymessage"},d={key:3,class:"p-dataview-footer"};r.render=function(t,e,o,r,g,u){const c=a.resolveComponent("DVPaginator");return a.openBlock(),a.createBlock("div",{class:u.containerClass},[t.$slots.header?(a.openBlock(),a.createBlock("div",s,[a.renderSlot(t.$slots,"header")])):a.createCommentVNode("",!0),u.paginatorTop?(a.openBlock(),a.createBlock(c,{key:1,rows:g.d_rows,first:g.d_first,totalRecords:u.getTotalRecords,pageLinkSize:o.pageLinkSize,template:o.paginatorTemplate,rowsPerPageOptions:o.rowsPerPageOptions,currentPageReportTemplate:o.currentPageReportTemplate,class:{"p-paginator-top":u.paginatorTop},alwaysShow:o.alwaysShowPaginator,onPage:e[1]||(e[1]=t=>u.onPage(t))},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):a.createCommentVNode("",!0),a.createVNode("div",i,[a.createVNode("div",l,[(a.openBlock(!0),a.createBlock(a.Fragment,null,a.renderList(u.items,((e,r)=>(a.openBlock(),a.createBlock(a.Fragment,null,[t.$slots.list&&"list"===o.layout?a.renderSlot(t.$slots,"list",{key:0,data:e,index:r}):a.createCommentVNode("",!0),t.$slots.grid&&"grid"===o.layout?a.renderSlot(t.$slots,"grid",{key:1,data:e,index:r}):a.createCommentVNode("",!0)],64)))),256)),u.empty?(a.openBlock(),a.createBlock("div",n,[a.createVNode("div",p,[a.renderSlot(t.$slots,"empty")])])):a.createCommentVNode("",!0)])]),u.paginatorBottom?(a.openBlock(),a.createBlock(c,{key:2,rows:g.d_rows,first:g.d_first,totalRecords:u.getTotalRecords,pageLinkSize:o.pageLinkSize,template:o.paginatorTemplate,rowsPerPageOptions:o.rowsPerPageOptions,currentPageReportTemplate:o.currentPageReportTemplate,class:{"p-paginator-bottom":u.paginatorBottom},alwaysShow:o.alwaysShowPaginator,onPage:e[2]||(e[2]=t=>u.onPage(t))},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):a.createCommentVNode("",!0),t.$slots.footer?(a.openBlock(),a.createBlock("div",d,[a.renderSlot(t.$slots,"footer")])):a.createCommentVNode("",!0)],2)},module.exports=r;
1
+ "use strict";var t=require("primevue/utils"),e=require("primevue/paginator"),a=require("vue");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o={name:"DataView",emits:["update:first","update:rows","page"],props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(t){this.d_first=t},rows(t){this.d_rows=t},sortField(){this.resetPage()},sortOrder(){this.resetPage()}},methods:{getKey(e,a){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):a},onPage(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort(){if(this.value){const e=[...this.value];return e.sort(((e,a)=>{let r=t.ObjectUtils.resolveFieldData(e,this.sortField),o=t.ObjectUtils.resolveFieldData(a,this.sortField),s=null;return s=null==r&&null!=o?-1:null!=r&&null==o?1:null==r&&null==o?0:"string"==typeof r&&"string"==typeof o?r.localeCompare(o,void 0,{numeric:!0}):r<o?-1:r>o?1:0,this.sortOrder*s})),e}return null},resetPage(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{containerClass(){return["p-dataview p-component",{"p-dataview-list":"list"===this.layout,"p-dataview-grid":"grid"===this.layout}]},getTotalRecords(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty(){return!this.value||0===this.value.length},paginatorTop(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items(){if(this.value&&this.value.length){let t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){const e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:r(e).default}};const s={key:0,class:"p-dataview-header"},i={class:"p-dataview-content"},l={class:"p-grid p-nogutter grid grid-nogutter"},n={key:0,class:"p-col col"},p={class:"p-dataview-emptymessage"},d={key:3,class:"p-dataview-footer"};o.render=function(t,e,r,o,g,u){const c=a.resolveComponent("DVPaginator");return a.openBlock(),a.createBlock("div",{class:u.containerClass},[t.$slots.header?(a.openBlock(),a.createBlock("div",s,[a.renderSlot(t.$slots,"header")])):a.createCommentVNode("",!0),u.paginatorTop?(a.openBlock(),a.createBlock(c,{key:1,rows:g.d_rows,first:g.d_first,totalRecords:u.getTotalRecords,pageLinkSize:r.pageLinkSize,template:r.paginatorTemplate,rowsPerPageOptions:r.rowsPerPageOptions,currentPageReportTemplate:r.currentPageReportTemplate,class:{"p-paginator-top":u.paginatorTop},alwaysShow:r.alwaysShowPaginator,onPage:e[1]||(e[1]=t=>u.onPage(t))},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):a.createCommentVNode("",!0),a.createVNode("div",i,[a.createVNode("div",l,[(a.openBlock(!0),a.createBlock(a.Fragment,null,a.renderList(u.items,((e,o)=>(a.openBlock(),a.createBlock(a.Fragment,{key:u.getKey(e,o)},[t.$slots.list&&"list"===r.layout?a.renderSlot(t.$slots,"list",{key:0,data:e,index:o}):a.createCommentVNode("",!0),t.$slots.grid&&"grid"===r.layout?a.renderSlot(t.$slots,"grid",{key:1,data:e,index:o}):a.createCommentVNode("",!0)],64)))),128)),u.empty?(a.openBlock(),a.createBlock("div",n,[a.createVNode("div",p,[a.renderSlot(t.$slots,"empty")])])):a.createCommentVNode("",!0)])]),u.paginatorBottom?(a.openBlock(),a.createBlock(c,{key:2,rows:g.d_rows,first:g.d_first,totalRecords:u.getTotalRecords,pageLinkSize:r.pageLinkSize,template:r.paginatorTemplate,rowsPerPageOptions:r.rowsPerPageOptions,currentPageReportTemplate:r.currentPageReportTemplate,class:{"p-paginator-bottom":u.paginatorBottom},alwaysShow:r.alwaysShowPaginator,onPage:e[2]||(e[2]=t=>u.onPage(t))},a.createSlots({_:2},[t.$slots.paginatorstart?{name:"start",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:a.withCtx((()=>[a.renderSlot(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):a.createCommentVNode("",!0),t.$slots.footer?(a.openBlock(),a.createBlock("div",d,[a.renderSlot(t.$slots,"footer")])):a.createCommentVNode("",!0)],2)},module.exports=o;
@@ -65,6 +65,10 @@ var script = {
65
65
  lazy: {
66
66
  type: Boolean,
67
67
  default: false
68
+ },
69
+ dataKey: {
70
+ type: String,
71
+ default: null
68
72
  }
69
73
  },
70
74
  data() {
@@ -88,6 +92,9 @@ var script = {
88
92
  }
89
93
  },
90
94
  methods: {
95
+ getKey(item, index) {
96
+ return this.dataKey ? ObjectUtils.resolveFieldData(item, this.dataKey) : index;
97
+ },
91
98
  onPage(event) {
92
99
  this.d_first = event.first;
93
100
  this.d_rows = event.rows;
@@ -240,7 +247,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
240
247
  createVNode("div", _hoisted_2, [
241
248
  createVNode("div", _hoisted_3, [
242
249
  (openBlock(true), createBlock(Fragment, null, renderList($options.items, (item, index) => {
243
- return (openBlock(), createBlock(Fragment, null, [
250
+ return (openBlock(), createBlock(Fragment, {
251
+ key: $options.getKey(item, index)
252
+ }, [
244
253
  (_ctx.$slots.list && $props.layout === 'list')
245
254
  ? renderSlot(_ctx.$slots, "list", {
246
255
  key: 0,
@@ -256,7 +265,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
256
265
  })
257
266
  : createCommentVNode("", true)
258
267
  ], 64))
259
- }), 256)),
268
+ }), 128)),
260
269
  ($options.empty)
261
270
  ? (openBlock(), createBlock("div", _hoisted_4, [
262
271
  createVNode("div", _hoisted_5, [
@@ -1 +1 @@
1
- import{ObjectUtils as t}from"primevue/utils";import e from"primevue/paginator";import{resolveComponent as a,openBlock as s,createBlock as r,renderSlot as o,createCommentVNode as i,createSlots as l,withCtx as n,createVNode as p,Fragment as d,renderList as g}from"vue";var u={name:"DataView",emits:["update:first","update:rows","page"],props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(t){this.d_first=t},rows(t){this.d_rows=t},sortField(){this.resetPage()},sortOrder(){this.resetPage()}},methods:{onPage(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort(){if(this.value){const e=[...this.value];return e.sort(((e,a)=>{let s=t.resolveFieldData(e,this.sortField),r=t.resolveFieldData(a,this.sortField),o=null;return o=null==s&&null!=r?-1:null!=s&&null==r?1:null==s&&null==r?0:"string"==typeof s&&"string"==typeof r?s.localeCompare(r,void 0,{numeric:!0}):s<r?-1:s>r?1:0,this.sortOrder*o})),e}return null},resetPage(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{containerClass(){return["p-dataview p-component",{"p-dataview-list":"list"===this.layout,"p-dataview-grid":"grid"===this.layout}]},getTotalRecords(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty(){return!this.value||0===this.value.length},paginatorTop(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items(){if(this.value&&this.value.length){let t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){const e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:e}};const h={key:0,class:"p-dataview-header"},m={class:"p-dataview-content"},f={class:"p-grid p-nogutter grid grid-nogutter"},w={key:0,class:"p-col col"},P={class:"p-dataview-emptymessage"},c={key:3,class:"p-dataview-footer"};u.render=function(t,e,u,y,v,$){const k=a("DVPaginator");return s(),r("div",{class:$.containerClass},[t.$slots.header?(s(),r("div",h,[o(t.$slots,"header")])):i("",!0),$.paginatorTop?(s(),r(k,{key:1,rows:v.d_rows,first:v.d_first,totalRecords:$.getTotalRecords,pageLinkSize:u.pageLinkSize,template:u.paginatorTemplate,rowsPerPageOptions:u.rowsPerPageOptions,currentPageReportTemplate:u.currentPageReportTemplate,class:{"p-paginator-top":$.paginatorTop},alwaysShow:u.alwaysShowPaginator,onPage:e[1]||(e[1]=t=>$.onPage(t))},l({_:2},[t.$slots.paginatorstart?{name:"start",fn:n((()=>[o(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:n((()=>[o(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):i("",!0),p("div",m,[p("div",f,[(s(!0),r(d,null,g($.items,((e,a)=>(s(),r(d,null,[t.$slots.list&&"list"===u.layout?o(t.$slots,"list",{key:0,data:e,index:a}):i("",!0),t.$slots.grid&&"grid"===u.layout?o(t.$slots,"grid",{key:1,data:e,index:a}):i("",!0)],64)))),256)),$.empty?(s(),r("div",w,[p("div",P,[o(t.$slots,"empty")])])):i("",!0)])]),$.paginatorBottom?(s(),r(k,{key:2,rows:v.d_rows,first:v.d_first,totalRecords:$.getTotalRecords,pageLinkSize:u.pageLinkSize,template:u.paginatorTemplate,rowsPerPageOptions:u.rowsPerPageOptions,currentPageReportTemplate:u.currentPageReportTemplate,class:{"p-paginator-bottom":$.paginatorBottom},alwaysShow:u.alwaysShowPaginator,onPage:e[2]||(e[2]=t=>$.onPage(t))},l({_:2},[t.$slots.paginatorstart?{name:"start",fn:n((()=>[o(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:n((()=>[o(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):i("",!0),t.$slots.footer?(s(),r("div",c,[o(t.$slots,"footer")])):i("",!0)],2)};export default u;
1
+ import{ObjectUtils as t}from"primevue/utils";import e from"primevue/paginator";import{resolveComponent as a,openBlock as r,createBlock as s,renderSlot as o,createCommentVNode as i,createSlots as l,withCtx as n,createVNode as p,Fragment as d,renderList as g}from"vue";var u={name:"DataView",emits:["update:first","update:rows","page"],props:{value:{type:Array,default:null},layout:{type:String,default:"list"},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},lazy:{type:Boolean,default:!1},dataKey:{type:String,default:null}},data(){return{d_first:this.first,d_rows:this.rows}},watch:{first(t){this.d_first=t},rows(t){this.d_rows=t},sortField(){this.resetPage()},sortOrder(){this.resetPage()}},methods:{getKey(e,a){return this.dataKey?t.resolveFieldData(e,this.dataKey):a},onPage(t){this.d_first=t.first,this.d_rows=t.rows,this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},sort(){if(this.value){const e=[...this.value];return e.sort(((e,a)=>{let r=t.resolveFieldData(e,this.sortField),s=t.resolveFieldData(a,this.sortField),o=null;return o=null==r&&null!=s?-1:null!=r&&null==s?1:null==r&&null==s?0:"string"==typeof r&&"string"==typeof s?r.localeCompare(s,void 0,{numeric:!0}):r<s?-1:r>s?1:0,this.sortOrder*o})),e}return null},resetPage(){this.d_first=0,this.$emit("update:first",this.d_first)}},computed:{containerClass(){return["p-dataview p-component",{"p-dataview-list":"list"===this.layout,"p-dataview-grid":"grid"===this.layout}]},getTotalRecords(){return this.totalRecords?this.totalRecords:this.value?this.value.length:0},empty(){return!this.value||0===this.value.length},paginatorTop(){return this.paginator&&("bottom"!==this.paginatorPosition||"both"===this.paginatorPosition)},paginatorBottom(){return this.paginator&&("top"!==this.paginatorPosition||"both"===this.paginatorPosition)},items(){if(this.value&&this.value.length){let t=this.value;if(t&&t.length&&this.sortField&&(t=this.sort()),this.paginator){const e=this.lazy?0:this.d_first;return t.slice(e,e+this.d_rows)}return t}return null}},components:{DVPaginator:e}};const h={key:0,class:"p-dataview-header"},m={class:"p-dataview-content"},f={class:"p-grid p-nogutter grid grid-nogutter"},y={key:0,class:"p-col col"},w={class:"p-dataview-emptymessage"},P={key:3,class:"p-dataview-footer"};u.render=function(t,e,u,c,v,$){const k=a("DVPaginator");return r(),s("div",{class:$.containerClass},[t.$slots.header?(r(),s("div",h,[o(t.$slots,"header")])):i("",!0),$.paginatorTop?(r(),s(k,{key:1,rows:v.d_rows,first:v.d_first,totalRecords:$.getTotalRecords,pageLinkSize:u.pageLinkSize,template:u.paginatorTemplate,rowsPerPageOptions:u.rowsPerPageOptions,currentPageReportTemplate:u.currentPageReportTemplate,class:{"p-paginator-top":$.paginatorTop},alwaysShow:u.alwaysShowPaginator,onPage:e[1]||(e[1]=t=>$.onPage(t))},l({_:2},[t.$slots.paginatorstart?{name:"start",fn:n((()=>[o(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:n((()=>[o(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):i("",!0),p("div",m,[p("div",f,[(r(!0),s(d,null,g($.items,((e,a)=>(r(),s(d,{key:$.getKey(e,a)},[t.$slots.list&&"list"===u.layout?o(t.$slots,"list",{key:0,data:e,index:a}):i("",!0),t.$slots.grid&&"grid"===u.layout?o(t.$slots,"grid",{key:1,data:e,index:a}):i("",!0)],64)))),128)),$.empty?(r(),s("div",y,[p("div",w,[o(t.$slots,"empty")])])):i("",!0)])]),$.paginatorBottom?(r(),s(k,{key:2,rows:v.d_rows,first:v.d_first,totalRecords:$.getTotalRecords,pageLinkSize:u.pageLinkSize,template:u.paginatorTemplate,rowsPerPageOptions:u.rowsPerPageOptions,currentPageReportTemplate:u.currentPageReportTemplate,class:{"p-paginator-bottom":$.paginatorBottom},alwaysShow:u.alwaysShowPaginator,onPage:e[2]||(e[2]=t=>$.onPage(t))},l({_:2},[t.$slots.paginatorstart?{name:"start",fn:n((()=>[o(t.$slots,"paginatorstart")]))}:void 0,t.$slots.paginatorend?{name:"end",fn:n((()=>[o(t.$slots,"paginatorend")]))}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow"])):i("",!0),t.$slots.footer?(r(),s("div",P,[o(t.$slots,"footer")])):i("",!0)],2)};export default u;