primevue 3.12.1 → 3.12.2
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.
- package/column/Column.d.ts +15 -3
- package/config/PrimeVue.d.ts +8 -0
- package/confirmationservice/ConfirmationService.d.ts +8 -1
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +1 -1
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +1 -1
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +1 -1
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/core/core.js +18 -2
- package/core/core.min.js +3 -3
- package/datatable/BodyCell.vue +11 -2
- package/datatable/DataTable.vue +7 -4
- package/datatable/RowCheckbox.vue +1 -1
- package/datatable/TableBody.vue +7 -1
- package/datatable/datatable.cjs.js +31 -10
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +31 -10
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +31 -10
- package/datatable/datatable.min.js +1 -1
- package/deferredcontent/DeferredContent.vue +2 -2
- package/deferredcontent/deferredcontent.cjs.js +2 -2
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +2 -2
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +2 -2
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/fileupload/FileUpload.vue +1 -0
- package/fileupload/fileupload.cjs.js +1 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +1 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +1 -0
- package/fileupload/fileupload.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +1 -1
- package/menu/Menu.vue +1 -1
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/multiselect/MultiSelect.vue +8 -5
- package/multiselect/multiselect.cjs.js +8 -5
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +8 -5
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +8 -5
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +1 -1
- package/slider/Slider.vue +10 -2
- package/slider/slider.cjs.js +9 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +9 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +9 -1
- package/slider/slider.min.js +1 -1
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/tooltip/tooltip.cjs.js +16 -0
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +16 -0
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +16 -0
- package/tooltip/tooltip.min.js +1 -1
- package/web-types.json +1 -1
package/column/Column.d.ts
CHANGED
|
@@ -269,6 +269,10 @@ export interface ColumnSlots {
|
|
|
269
269
|
* Whether the row is frozen.
|
|
270
270
|
*/
|
|
271
271
|
frozenRow: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Callback function
|
|
274
|
+
*/
|
|
275
|
+
editorInitCallback: () => void;
|
|
272
276
|
}) => VNode[];
|
|
273
277
|
/**
|
|
274
278
|
* Custom header template.
|
|
@@ -280,7 +284,7 @@ export interface ColumnSlots {
|
|
|
280
284
|
*/
|
|
281
285
|
column: Column;
|
|
282
286
|
}) => VNode[];
|
|
283
|
-
|
|
287
|
+
/**
|
|
284
288
|
* Custom footer template.
|
|
285
289
|
* @param {Object} scope - footer slot's params.
|
|
286
290
|
*/
|
|
@@ -315,8 +319,16 @@ export interface ColumnSlots {
|
|
|
315
319
|
* Whether the row is frozen.
|
|
316
320
|
*/
|
|
317
321
|
frozenRow: boolean;
|
|
322
|
+
/**
|
|
323
|
+
* Callback function
|
|
324
|
+
*/
|
|
325
|
+
editorSaveCallback: () => void;
|
|
326
|
+
/**
|
|
327
|
+
* Callback function
|
|
328
|
+
*/
|
|
329
|
+
editorCancelCallback: () => void;
|
|
318
330
|
}) => VNode[];
|
|
319
|
-
|
|
331
|
+
/**
|
|
320
332
|
* Custom filter template.
|
|
321
333
|
* @param {Object} scope - filter slot's params.
|
|
322
334
|
*/
|
|
@@ -354,7 +366,7 @@ export interface ColumnSlots {
|
|
|
354
366
|
*/
|
|
355
367
|
filterCallback: () => void;
|
|
356
368
|
}) => VNode[];
|
|
357
|
-
|
|
369
|
+
/**
|
|
358
370
|
* Custom filter footer template.
|
|
359
371
|
* @param {Object} scope - filter footer slot's params.
|
|
360
372
|
*/
|
package/config/PrimeVue.d.ts
CHANGED
|
@@ -4,8 +4,15 @@ import { ConfirmationOptions } from '../confirmationoptions';
|
|
|
4
4
|
declare const plugin: Plugin;
|
|
5
5
|
export default plugin;
|
|
6
6
|
|
|
7
|
-
interface ConfirmationServiceMethods {
|
|
7
|
+
export interface ConfirmationServiceMethods {
|
|
8
|
+
/**
|
|
9
|
+
* Displays the dialog using the confirmation object options.
|
|
10
|
+
* @param {ConfirmationOptions} options - Confirmation Object
|
|
11
|
+
*/
|
|
8
12
|
require(options: ConfirmationOptions): void;
|
|
13
|
+
/**
|
|
14
|
+
* Hides the dialog without invoking accept or reject callbacks.
|
|
15
|
+
*/
|
|
9
16
|
close(): void;
|
|
10
17
|
}
|
|
11
18
|
|
|
@@ -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(){return this.target&&(this.target===
|
|
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 +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(){return this.target&&(this.target===
|
|
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;
|
|
@@ -160,7 +160,7 @@ this.primevue.confirmpopup = (function (ConfirmationEventBus, utils, OverlayEven
|
|
|
160
160
|
this.resizeListener = null;
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
|
-
isTargetClicked() {
|
|
163
|
+
isTargetClicked(event) {
|
|
164
164
|
return this.target && (this.target === event.target || this.target.contains(event.target));
|
|
165
165
|
},
|
|
166
166
|
containerRef(el) {
|
|
@@ -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(){return this.target&&(this.target===
|
|
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);
|
package/core/core.js
CHANGED
|
@@ -1734,6 +1734,10 @@ this.primevue.tooltip = (function (utils) {
|
|
|
1734
1734
|
alignTop(el);
|
|
1735
1735
|
if (isOutOfBounds(el)) {
|
|
1736
1736
|
alignBottom(el);
|
|
1737
|
+
|
|
1738
|
+
if (isOutOfBounds(el)) {
|
|
1739
|
+
alignTop(el);
|
|
1740
|
+
}
|
|
1737
1741
|
}
|
|
1738
1742
|
}
|
|
1739
1743
|
else if (modifiers.left) {
|
|
@@ -1746,6 +1750,10 @@ this.primevue.tooltip = (function (utils) {
|
|
|
1746
1750
|
|
|
1747
1751
|
if (isOutOfBounds(el)) {
|
|
1748
1752
|
alignBottom(el);
|
|
1753
|
+
|
|
1754
|
+
if (isOutOfBounds(el)) {
|
|
1755
|
+
alignLeft(el);
|
|
1756
|
+
}
|
|
1749
1757
|
}
|
|
1750
1758
|
}
|
|
1751
1759
|
}
|
|
@@ -1754,6 +1762,10 @@ this.primevue.tooltip = (function (utils) {
|
|
|
1754
1762
|
alignBottom(el);
|
|
1755
1763
|
if (isOutOfBounds(el)) {
|
|
1756
1764
|
alignTop(el);
|
|
1765
|
+
|
|
1766
|
+
if (isOutOfBounds(el)) {
|
|
1767
|
+
alignBottom(el);
|
|
1768
|
+
}
|
|
1757
1769
|
}
|
|
1758
1770
|
}
|
|
1759
1771
|
else {
|
|
@@ -1766,6 +1778,10 @@ this.primevue.tooltip = (function (utils) {
|
|
|
1766
1778
|
|
|
1767
1779
|
if (isOutOfBounds(el)) {
|
|
1768
1780
|
alignBottom(el);
|
|
1781
|
+
|
|
1782
|
+
if (isOutOfBounds(el)) {
|
|
1783
|
+
alignRight(el);
|
|
1784
|
+
}
|
|
1769
1785
|
}
|
|
1770
1786
|
}
|
|
1771
1787
|
}
|
|
@@ -7321,7 +7337,7 @@ this.primevue.menu = (function (utils, OverlayEventBus, Ripple, vue) {
|
|
|
7321
7337
|
this.resizeListener = null;
|
|
7322
7338
|
}
|
|
7323
7339
|
},
|
|
7324
|
-
isTargetClicked() {
|
|
7340
|
+
isTargetClicked(event) {
|
|
7325
7341
|
return this.target && (this.target === event.target || this.target.contains(event.target));
|
|
7326
7342
|
},
|
|
7327
7343
|
visible(item) {
|
|
@@ -7966,7 +7982,7 @@ this.primevue.tieredmenu = (function (utils, OverlayEventBus, Ripple, vue) {
|
|
|
7966
7982
|
this.resizeListener = null;
|
|
7967
7983
|
}
|
|
7968
7984
|
},
|
|
7969
|
-
isTargetClicked() {
|
|
7985
|
+
isTargetClicked(event) {
|
|
7970
7986
|
return this.target && (this.target === event.target || this.target.contains(event.target));
|
|
7971
7987
|
},
|
|
7972
7988
|
onLeafClick() {
|
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)):t.left?(c(e),g(e)&&(s(e),g(e)&&(f(e),g(e)&&m(e)))):t.bottom?(m(e),g(e)&&f(e)):(s(e),g(e)&&(c(e),g(e)&&(f(e),g(e)&&m(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");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);
|
|
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
|
|
|
@@ -40,7 +40,7 @@ this.primevue=this.primevue||{},this.primevue.paginator=function(e,t,n,a){"use s
|
|
|
40
40
|
|
|
41
41
|
this.primevue=this.primevue||{},this.primevue.tree=function(e,t,n){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"TreeNode",emits:["node-toggle","node-click","checkbox-change"],props:{node:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},templates:{type:null,default:null}},nodeTouched:!1,methods:{toggle(){this.$emit("node-toggle",this.node)},label:e=>"function"==typeof e.label?e.label():e.label,onChildNodeToggle(e){this.$emit("node-toggle",e)},onClick(t){e.DomHandler.hasClass(t.target,"p-tree-toggler")||e.DomHandler.hasClass(t.target.parentElement,"p-tree-toggler")||(this.isCheckboxSelectionMode()?this.toggleCheckbox():this.$emit("node-click",{originalEvent:t,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1)},onChildNodeClick(e){this.$emit("node-click",e)},onTouchEnd(){this.nodeTouched=!0},onKeyDown(e){const t=e.target.parentElement;switch(e.which){case 40:var n=t.children[1];if(n)this.focusNode(n.children[0]);else{const e=t.nextElementSibling;if(e)this.focusNode(e);else{let e=this.findNextSiblingOfAncestor(t);e&&this.focusNode(e)}}e.preventDefault();break;case 38:if(t.previousElementSibling)this.focusNode(this.findLastVisibleDescendant(t.previousElementSibling));else{let e=this.getParentNodeElement(t);e&&this.focusNode(e)}e.preventDefault();break;case 37:case 39:this.$emit("node-toggle",this.node),e.preventDefault();break;case 13:this.onClick(e),e.preventDefault()}},toggleCheckbox(){let e=this.selectionKeys?{...this.selectionKeys}:{};const t=!this.checked;this.propagateDown(this.node,t,e),this.$emit("checkbox-change",{node:this.node,check:t,selectionKeys:e})},propagateDown(e,t,n){if(t?n[e.key]={checked:!0,partialChecked:!1}:delete n[e.key],e.children&&e.children.length)for(let l of e.children)this.propagateDown(l,t,n)},propagateUp(e){let t=e.check,n={...e.selectionKeys},l=0,i=!1;for(let e of this.node.children)n[e.key]&&n[e.key].checked?l++:n[e.key]&&n[e.key].partialChecked&&(i=!0);t&&l===this.node.children.length?n[this.node.key]={checked:!0,partialChecked:!1}:(t||delete n[this.node.key],i||l>0&&l!==this.node.children.length?n[this.node.key]={checked:!1,partialChecked:!0}:delete n[this.node.key]),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:n})},onChildCheckboxChange(e){this.$emit("checkbox-change",e)},findNextSiblingOfAncestor(e){let t=this.getParentNodeElement(e);return t?t.nextElementSibling?t.nextElementSibling:this.findNextSiblingOfAncestor(t):null},findLastVisibleDescendant(e){const t=e.children[1];if(t){const e=t.children[t.children.length-1];return this.findLastVisibleDescendant(e)}return e},getParentNodeElement(t){const n=t.parentElement.parentElement;return e.DomHandler.hasClass(n,"p-treenode")?n:null},focusNode(e){e.children[0].focus()},isCheckboxSelectionMode(){return"checkbox"===this.selectionMode}},computed:{hasChildren(){return this.node.children&&this.node.children.length>0},expanded(){return this.expandedKeys&&!0===this.expandedKeys[this.node.key]},leaf(){return!1!==this.node.leaf&&!(this.node.children&&this.node.children.length)},selectable(){return!1!==this.node.selectable&&null!=this.selectionMode},selected(){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[this.node.key]},containerClass(){return["p-treenode",{"p-treenode-leaf":this.leaf}]},contentClass(){return["p-treenode-content",this.node.styleClass,{"p-treenode-selectable":this.selectable,"p-highlight":this.checkboxMode?this.checked:this.selected}]},icon(){return["p-treenode-icon",this.node.icon]},toggleIcon(){return["p-tree-toggler-icon pi pi-fw",{"pi-chevron-down":this.expanded,"pi-chevron-right":!this.expanded}]},checkboxClass(){return["p-checkbox-box",{"p-highlight":this.checked,"p-indeterminate":this.partialChecked}]},checkboxIcon(){return["p-checkbox-icon",{"pi pi-check":this.checked,"pi pi-minus":this.partialChecked}]},checkboxMode(){return"checkbox"===this.selectionMode&&!1!==this.node.selectable},checked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].checked)},partialChecked(){return!!this.selectionKeys&&(this.selectionKeys[this.node.key]&&this.selectionKeys[this.node.key].partialChecked)}},directives:{ripple:l(t).default}};const o={key:0,class:"p-checkbox p-component"},s={class:"p-treenode-label"},c={key:0,class:"p-treenode-children",role:"group"};i.render=function(e,t,l,i,d,r){const a=n.resolveComponent("TreeNode",!0),h=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("li",{class:r.containerClass},[n.createVNode("div",{class:r.contentClass,tabindex:"0",role:"treeitem","aria-expanded":r.expanded,onClick:t[2]||(t[2]=(...e)=>r.onClick&&r.onClick(...e)),onKeydown:t[3]||(t[3]=(...e)=>r.onKeyDown&&r.onKeyDown(...e)),onTouchend:t[4]||(t[4]=(...e)=>r.onTouchEnd&&r.onTouchEnd(...e)),style:l.node.style},[n.withDirectives(n.createVNode("button",{type:"button",class:"p-tree-toggler p-link",onClick:t[1]||(t[1]=(...e)=>r.toggle&&r.toggle(...e)),tabindex:"-1"},[n.createVNode("span",{class:r.toggleIcon},null,2)],512),[[h]]),r.checkboxMode?(n.openBlock(),n.createBlock("div",o,[n.createVNode("div",{class:r.checkboxClass,role:"checkbox","aria-checked":r.checked},[n.createVNode("span",{class:r.checkboxIcon},null,2)],10,["aria-checked"])])):n.createCommentVNode("",!0),n.createVNode("span",{class:r.icon},null,2),n.createVNode("span",s,[l.templates[l.node.type]||l.templates.default?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(l.templates[l.node.type]||l.templates.default),{key:0,node:l.node},null,8,["node"])):(n.openBlock(),n.createBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(r.label(l.node)),1)],64))])],46,["aria-expanded"]),r.hasChildren&&r.expanded?(n.openBlock(),n.createBlock("ul",c,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(l.node.children,(e=>(n.openBlock(),n.createBlock(a,{key:e.key,node:e,templates:l.templates,expandedKeys:l.expandedKeys,onNodeToggle:r.onChildNodeToggle,onNodeClick:r.onChildNodeClick,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,onCheckboxChange:r.propagateUp},null,8,["node","templates","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange"])))),128))])):n.createCommentVNode("",!0)],2)};var d={name:"Tree",emits:["node-expand","node-collapse","update:expandedKeys","update:selectionKeys","node-select","node-unselect"],props:{value:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},metaKeySelection:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner"},filter:{type:Boolean,default:!1},filterBy:{type:String,default:"label"},filterMode:{type:String,default:"lenient"},filterPlaceholder:{type:String,default:null},filterLocale:{type:String,default:void 0},scrollHeight:{type:String,default:null}},data(){return{d_expandedKeys:this.expandedKeys||{},filterValue:null}},watch:{expandedKeys(e){this.d_expandedKeys=e}},methods:{onNodeToggle(e){const t=e.key;this.d_expandedKeys[t]?(delete this.d_expandedKeys[t],this.$emit("node-collapse",e)):(this.d_expandedKeys[t]=!0,this.$emit("node-expand",e)),this.d_expandedKeys={...this.d_expandedKeys},this.$emit("update:expandedKeys",this.d_expandedKeys)},onNodeClick(e){if(null!=this.selectionMode&&!1!==e.node.selectable){const t=!e.nodeTouched&&this.metaKeySelection?this.handleSelectionWithMetaKey(e):this.handleSelectionWithoutMetaKey(e);this.$emit("update:selectionKeys",t)}},onCheckboxChange(e){this.$emit("update:selectionKeys",e.selectionKeys),e.check?this.$emit("node-select",e.node):this.$emit("node-unselect",e.node)},handleSelectionWithMetaKey(e){const t=e.originalEvent,n=e.node,l=t.metaKey||t.ctrlKey;let i;return this.isNodeSelected(n)&&l?(this.isSingleSelectionMode()?i={}:(i={...this.selectionKeys},delete i[n.key]),this.$emit("node-unselect",n)):(this.isSingleSelectionMode()?i={}:this.isMultipleSelectionMode()&&(i=l&&this.selectionKeys?{...this.selectionKeys}:{}),i[n.key]=!0,this.$emit("node-select",n)),i},handleSelectionWithoutMetaKey(e){const t=e.node,n=this.isNodeSelected(t);let l;return this.isSingleSelectionMode()?n?(l={},this.$emit("node-unselect",t)):(l={},l[t.key]=!0,this.$emit("node-select",t)):n?(l={...this.selectionKeys},delete l[t.key],this.$emit("node-unselect",t)):(l=this.selectionKeys?{...this.selectionKeys}:{},l[t.key]=!0,this.$emit("node-select",t)),l},isSingleSelectionMode(){return"single"===this.selectionMode},isMultipleSelectionMode(){return"multiple"===this.selectionMode},isNodeSelected(e){return!(!this.selectionMode||!this.selectionKeys)&&!0===this.selectionKeys[e.key]},isChecked(e){return!!this.selectionKeys&&(this.selectionKeys[e.key]&&this.selectionKeys[e.key].checked)},isNodeLeaf:e=>!1!==e.leaf&&!(e.children&&e.children.length),onFilterKeydown(e){13===e.which&&e.preventDefault()},findFilteredNodes(e,t){if(e){let n=!1;if(e.children){let l=[...e.children];e.children=[];for(let i of l){let l={...i};this.isFilterMatched(l,t)&&(n=!0,e.children.push(l))}}if(n)return!0}},isFilterMatched(t,{searchFields:n,filterText:l,strict:i}){let o=!1;for(let i of n){String(e.ObjectUtils.resolveFieldData(t,i)).toLocaleLowerCase(this.filterLocale).indexOf(l)>-1&&(o=!0)}return(!o||i&&!this.isNodeLeaf(t))&&(o=this.findFilteredNodes(t,{searchFields:n,filterText:l,strict:i})||o),o}},computed:{containerClass(){return["p-tree p-component",{"p-tree-selectable":null!=this.selectionMode,"p-tree-loading":this.loading,"p-tree-flex-scrollable":"flex"===this.scrollHeight}]},loadingIconClass(){return["p-tree-loading-icon pi-spin",this.loadingIcon]},filteredValue(){let e=[];const t=this.filterBy.split(","),n=this.filterValue.trim().toLocaleLowerCase(this.filterLocale),l="strict"===this.filterMode;for(let i of this.value){let o={...i},s={searchFields:t,filterText:n,strict:l};(l&&(this.findFilteredNodes(o,s)||this.isFilterMatched(o,s))||!l&&(this.isFilterMatched(o,s)||this.findFilteredNodes(o,s)))&&e.push(o)}return e},valueToRender(){return this.filterValue&&this.filterValue.trim().length>0?this.filteredValue:this.value}},components:{TreeNode:i}};const r={key:0,class:"p-tree-loading-overlay p-component-overlay"},a={key:1,class:"p-tree-filter-container"},h=n.createVNode("span",{class:"p-tree-filter-icon pi pi-search"},null,-1),p={class:"p-tree-container",role:"tree"};return 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-tree-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n overflow: auto;\n}\n.p-treenode-children {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-tree-wrapper {\n overflow: auto;\n}\n.p-treenode-selectable {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-tree-toggler {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\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-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-treenode-leaf > .p-treenode-content .p-tree-toggler {\n visibility: hidden;\n}\n.p-treenode-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.p-tree-filter {\n width: 100%;\n}\n.p-tree-filter-container {\n position: relative;\n display: block;\n width: 100%;\n}\n.p-tree-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-tree-loading {\n position: relative;\n min-height: 4rem;\n}\n.p-tree .p-tree-loading-overlay {\n position: absolute;\n z-index: 1;\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.p-tree-flex-scrollable {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 100%;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-tree-flex-scrollable .p-tree-wrapper {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n"),d.render=function(e,t,l,i,o,s){const c=n.resolveComponent("TreeNode");return n.openBlock(),n.createBlock("div",{class:s.containerClass},[l.loading?(n.openBlock(),n.createBlock("div",r,[n.createVNode("i",{class:s.loadingIconClass},null,2)])):n.createCommentVNode("",!0),l.filter?(n.openBlock(),n.createBlock("div",a,[n.withDirectives(n.createVNode("input",{type:"text",autocomplete:"off",class:"p-tree-filter p-inputtext p-component",placeholder:l.filterPlaceholder,onKeydown:t[1]||(t[1]=(...e)=>s.onFilterKeydown&&s.onFilterKeydown(...e)),"onUpdate:modelValue":t[2]||(t[2]=e=>o.filterValue=e)},null,40,["placeholder"]),[[n.vModelText,o.filterValue]]),h])):n.createCommentVNode("",!0),n.createVNode("div",{class:"p-tree-wrapper",style:{maxHeight:l.scrollHeight}},[n.createVNode("ul",p,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(s.valueToRender,(t=>(n.openBlock(),n.createBlock(c,{key:t.key,node:t,templates:e.$slots,expandedKeys:o.d_expandedKeys,onNodeToggle:s.onNodeToggle,onNodeClick:s.onNodeClick,selectionMode:l.selectionMode,selectionKeys:l.selectionKeys,onCheckboxChange:s.onCheckboxChange},null,8,["node","templates","expandedKeys","onNodeToggle","onNodeClick","selectionMode","selectionKeys","onCheckboxChange"])))),128))])],4)],2)},d}(primevue.utils,primevue.ripple,Vue);
|
|
42
42
|
|
|
43
|
-
this.primevue=this.primevue||{},this.primevue.menu=function(e,t,i,n){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),r={name:"Menuitem",inheritAttrs:!1,emits:["click"],props:{item:null,template:null,exact:null},methods:{onClick(e,t){this.$emit("click",{originalEvent:e,item:this.item,navigate:t})},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},visible(){return"function"==typeof this.item.visible?this.item.visible():!1!==this.item.visible},disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label(){return"function"==typeof this.item.label?this.item.label():this.item.label}},computed:{containerClass(){return["p-menuitem",this.item.class]}},directives:{ripple:l(i).default}};const o={class:"p-menuitem-text"},a={class:"p-menuitem-text"};r.render=function(e,t,i,l,s,r){const c=n.resolveComponent("router-link"),d=n.resolveDirective("ripple");return r.visible()?(n.openBlock(),n.createBlock("li",{key:0,class:r.containerClass,role:"none",style:i.item.style},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:i.item},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[i.item.to&&!r.disabled(i.item)?(n.openBlock(),n.createBlock(c,{key:0,to:i.item.to,custom:""},{default:n.withCtx((({navigate:e,href:t,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:t,onClick:t=>r.onClick(t,e),class:r.linkClass(i.item,{isActive:l,isExactActive:s}),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",i.item.icon]},null,2),n.createVNode("span",o,n.toDisplayString(r.label()),1)],10,["href","onClick"]),[[d]])])),_:1},8,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:i.item.url,class:r.linkClass(i.item),onClick:t[1]||(t[1]=(...e)=>r.onClick&&r.onClick(...e)),target:i.item.target,role:"menuitem",tabindex:r.disabled(i.item)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",i.item.icon]},null,2),n.createVNode("span",a,n.toDisplayString(r.label()),1)],10,["href","target","tabindex"])),[[d]])],64))],6)):n.createCommentVNode("",!0)};var c={name:"Menu",emits:["show","hide"],inheritAttrs:!1,props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0}},data:()=>({overlayVisible:!1}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;t.disabled||(t.command&&t.command(e),t.to&&e.navigate&&e.navigate(e.originalEvent),this.hide())},toggle(e){this.overlayVisible?this.hide():this.show(e)},show(e){this.overlayVisible=!0,this.target=e.currentTarget},hide(){this.overlayVisible=!1,this.target=null},onEnter(t){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=e.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===
|
|
43
|
+
this.primevue=this.primevue||{},this.primevue.menu=function(e,t,i,n){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),r={name:"Menuitem",inheritAttrs:!1,emits:["click"],props:{item:null,template:null,exact:null},methods:{onClick(e,t){this.$emit("click",{originalEvent:e,item:this.item,navigate:t})},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},visible(){return"function"==typeof this.item.visible?this.item.visible():!1!==this.item.visible},disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label(){return"function"==typeof this.item.label?this.item.label():this.item.label}},computed:{containerClass(){return["p-menuitem",this.item.class]}},directives:{ripple:l(i).default}};const o={class:"p-menuitem-text"},a={class:"p-menuitem-text"};r.render=function(e,t,i,l,s,r){const c=n.resolveComponent("router-link"),d=n.resolveDirective("ripple");return r.visible()?(n.openBlock(),n.createBlock("li",{key:0,class:r.containerClass,role:"none",style:i.item.style},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:i.item},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[i.item.to&&!r.disabled(i.item)?(n.openBlock(),n.createBlock(c,{key:0,to:i.item.to,custom:""},{default:n.withCtx((({navigate:e,href:t,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:t,onClick:t=>r.onClick(t,e),class:r.linkClass(i.item,{isActive:l,isExactActive:s}),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",i.item.icon]},null,2),n.createVNode("span",o,n.toDisplayString(r.label()),1)],10,["href","onClick"]),[[d]])])),_:1},8,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:i.item.url,class:r.linkClass(i.item),onClick:t[1]||(t[1]=(...e)=>r.onClick&&r.onClick(...e)),target:i.item.target,role:"menuitem",tabindex:r.disabled(i.item)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",i.item.icon]},null,2),n.createVNode("span",a,n.toDisplayString(r.label()),1)],10,["href","target","tabindex"])),[[d]])],64))],6)):n.createCommentVNode("",!0)};var c={name:"Menu",emits:["show","hide"],inheritAttrs:!1,props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0}},data:()=>({overlayVisible:!1}),target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;t.disabled||(t.command&&t.command(e),t.to&&e.navigate&&e.navigate(e.originalEvent),this.hide())},toggle(e){this.overlayVisible?this.hide():this.show(e)},show(e){this.overlayVisible=!0,this.target=e.currentTarget},hide(){this.overlayVisible=!1,this.target=null},onEnter(t){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu),this.$emit("show")},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=e.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&this.hide()},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))},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,label:e=>"function"==typeof e.label?e.label():e.label,containerRef(e){this.container=e},onOverlayClick(e){s.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-menu p-component",{"p-menu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{Menuitem:r}};const d={class:"p-menu-list p-reset",role:"menu"},m={key:0,class:"p-submenu-header"};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],l=document.createElement("style");l.type="text/css","top"===i&&n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-menu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-menu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menu .p-menuitem-link {\n cursor: pointer;\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 text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menu .p-menuitem-text {\n line-height: 1;\n}\n"),c.render=function(e,t,i,l,s,r){const o=n.resolveComponent("Menuitem");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo,disabled:!i.popup},[n.createVNode(n.Transition,{name:"p-connected-overlay",onEnter:r.onEnter,onLeave:r.onLeave,onAfterLeave:r.onAfterLeave},{default:n.withCtx((()=>[!i.popup||s.overlayVisible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:r.containerRef,class:r.containerClass},e.$attrs,{onClick:t[1]||(t[1]=(...e)=>r.onOverlayClick&&r.onOverlayClick(...e))}),[n.createVNode("ul",d,[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((t,l)=>(n.openBlock(),n.createBlock(n.Fragment,{key:r.label(t)+l.toString()},[t.items&&r.visible(t)&&!t.separator?(n.openBlock(),n.createBlock(n.Fragment,{key:0},[t.items?(n.openBlock(),n.createBlock("li",m,[n.renderSlot(e.$slots,"item",{item:t},(()=>[n.createTextVNode(n.toDisplayString(r.label(t)),1)]))])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(t.items,((t,s)=>(n.openBlock(),n.createBlock(n.Fragment,{key:t.label+l+s},[r.visible(t)&&!t.separator?(n.openBlock(),n.createBlock(o,{key:0,item:t,onClick:r.itemClick,template:e.$slots.item,exact:i.exact},null,8,["item","onClick","template","exact"])):r.visible(t)&&t.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",t.class],style:t.style,key:"separator"+l+s,role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],64)):r.visible(t)&&t.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",t.class],style:t.style,key:"separator"+l.toString(),role:"separator"},null,6)):(n.openBlock(),n.createBlock(o,{key:r.label(t)+l.toString(),item:t,onClick:r.itemClick,template:e.$slots.item,exact:i.exact},null,8,["item","onClick","template","exact"]))],64)))),128))])],16)):n.createCommentVNode("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"])},c}(primevue.utils,primevue.overlayeventbus,primevue.ripple,Vue);
|
|
44
44
|
|
|
45
|
-
this.primevue=this.primevue||{},this.primevue.tieredmenu=function(e,t,i,n){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),o={name:"TieredMenuSub",emits:["leaf-click","keydown-item"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&i&&i(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let i=e.currentTarget.parentElement;switch(e.which){case 40:var n=this.findNextItem(i);n&&n.children[0].focus(),e.preventDefault();break;case 38:var l=this.findPrevItem(i);l&&l.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.activeItem=t,setTimeout((()=>{i.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:i})},onChildItemKeyDown(e){37===e.originalEvent.which&&(this.activeItem=null,e.element.parentElement.previousElementSibling.focus())},findNextItem(t){let i=t.nextElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findNextItem(i):i:null},findPrevItem(t){let i=t.previousElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findPrevItem(i):i:null},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},computed:{containerClass(){return{"p-submenu-list":!this.root}}},directives:{ripple:l(i).default}};const r={class:"p-menuitem-text"},a={class:"p-menuitem-text"},c={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,l,s,o){const d=n.resolveComponent("router-link"),u=n.resolveComponent("TieredMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{ref:"element",class:o.containerClass,role:"'menubar' : 'menu'","aria-orientation":"horizontal"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:o.label(e)+t.toString()},[o.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,class:o.getItemClass(e),style:e.style,onMouseenter:t=>o.onItemMouseEnter(t,e),role:"none"},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!o.disabled(e)?(n.openBlock(),n.createBlock(d,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:i=>o.onItemClick(i,e,t),class:o.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",r,n.toDisplayString(o.label(e)),1)],42,["href","onClick","onKeydown"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:o.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===s.activeItem,onClick:t=>o.onItemClick(t,e),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem",tabindex:o.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",a,n.toDisplayString(o.label(e)),1),e.items?(n.openBlock(),n.createBlock("span",c)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[m]])],64)),o.visible(e)&&e.items?(n.openBlock(),n.createBlock(u,{model:e.items,key:o.label(e)+"_sub_",template:i.template,onLeafClick:o.onLeafClick,onKeydownItem:o.onChildItemKeyDown,parentActive:e===s.activeItem,exact:i.exact},null,8,["model","template","onLeafClick","onKeydownItem","parentActive","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),o.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],2)};var d={name:"TieredMenu",inheritAttrs:!1,props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0}},target:null,container:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;t.command&&(t.command(e),e.originalEvent.preventDefault()),this.hide()},toggle(e){this.visible?this.hide():this.show(e)},show(e){this.visible=!0,this.target=e.currentTarget},hide(){this.visible=!1},onEnter(t){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=e.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked(){return this.target&&(this.target===event.target||this.target.contains(event.target))},onLeafClick(){this.popup&&this.hide()},containerRef(e){this.container=e},onOverlayClick(e){s.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-tieredmenu p-component",{"p-tieredmenu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{TieredMenuSub:o}};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],l=document.createElement("style");l.type="text/css","top"===i&&n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tieredmenu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-tieredmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-tieredmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-tieredmenu .p-menuitem-link {\n cursor: pointer;\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 text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-tieredmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-tieredmenu .p-menuitem {\n position: relative;\n}\n.p-tieredmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-tieredmenu .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n"),d.render=function(e,t,i,l,s,o){const r=n.resolveComponent("TieredMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo,disabled:!i.popup},[n.createVNode(n.Transition,{name:"p-connected-overlay",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:n.withCtx((()=>[!i.popup||s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:o.containerRef,class:o.containerClass},e.$attrs,{onClick:t[1]||(t[1]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[n.createVNode(r,{model:i.model,root:!0,popup:i.popup,onLeafClick:o.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","popup","onLeafClick","template","exact"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"])},d}(primevue.utils,primevue.overlayeventbus,primevue.ripple,Vue);
|
|
45
|
+
this.primevue=this.primevue||{},this.primevue.tieredmenu=function(e,t,i,n){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(t),o={name:"TieredMenuSub",emits:["leaf-click","keydown-item"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,i){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&i&&i(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let i=e.currentTarget.parentElement;switch(e.which){case 40:var n=this.findNextItem(i);n&&n.children[0].focus(),e.preventDefault();break;case 38:var l=this.findPrevItem(i);l&&l.children[0].focus(),e.preventDefault();break;case 39:t.items&&(this.activeItem=t,setTimeout((()=>{i.children[1].children[0].children[0].focus()}),50)),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:i})},onChildItemKeyDown(e){37===e.originalEvent.which&&(this.activeItem=null,e.element.parentElement.previousElementSibling.focus())},findNextItem(t){let i=t.nextElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findNextItem(i):i:null},findPrevItem(t){let i=t.previousElementSibling;return i?e.DomHandler.hasClass(i,"p-disabled")||!e.DomHandler.hasClass(i,"p-menuitem")?this.findPrevItem(i):i:null},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},computed:{containerClass(){return{"p-submenu-list":!this.root}}},directives:{ripple:l(i).default}};const r={class:"p-menuitem-text"},a={class:"p-menuitem-text"},c={key:0,class:"p-submenu-icon pi pi-angle-right"};o.render=function(e,t,i,l,s,o){const d=n.resolveComponent("router-link"),u=n.resolveComponent("TieredMenuSub",!0),m=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{ref:"element",class:o.containerClass,role:"'menubar' : 'menu'","aria-orientation":"horizontal"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:o.label(e)+t.toString()},[o.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,class:o.getItemClass(e),style:e.style,onMouseenter:t=>o.onItemMouseEnter(t,e),role:"none"},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!o.disabled(e)?(n.openBlock(),n.createBlock(d,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:i=>o.onItemClick(i,e,t),class:o.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",r,n.toDisplayString(o.label(e)),1)],42,["href","onClick","onKeydown"]),[[m]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:o.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===s.activeItem,onClick:t=>o.onItemClick(t,e),onKeydown:t=>o.onItemKeyDown(t,e),role:"menuitem",tabindex:o.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",a,n.toDisplayString(o.label(e)),1),e.items?(n.openBlock(),n.createBlock("span",c)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[m]])],64)),o.visible(e)&&e.items?(n.openBlock(),n.createBlock(u,{model:e.items,key:o.label(e)+"_sub_",template:i.template,onLeafClick:o.onLeafClick,onKeydownItem:o.onChildItemKeyDown,parentActive:e===s.activeItem,exact:i.exact},null,8,["model","template","onLeafClick","onKeydownItem","parentActive","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),o.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],2)};var d={name:"TieredMenu",inheritAttrs:!1,props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:String,default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},exact:{type:Boolean,default:!0}},target:null,container:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,data:()=>({visible:!1}),beforeUnmount(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&e.ZIndexUtils.clear(this.container),this.container=null},methods:{itemClick(e){const t=e.item;t.command&&(t.command(e),e.originalEvent.preventDefault()),this.hide()},toggle(e){this.visible?this.hide():this.show(e)},show(e){this.visible=!0,this.target=e.currentTarget},hide(){this.visible=!1},onEnter(t){this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&e.ZIndexUtils.set("menu",t,this.baseZIndex+this.$primevue.config.zIndex.menu)},onLeave(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener()},onAfterLeave(t){this.autoZIndex&&e.ZIndexUtils.clear(t)},alignOverlay(){e.DomHandler.absolutePosition(this.container,this.target),this.container.style.minWidth=e.DomHandler.getOuterWidth(this.target)+"px"},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.visible&&this.container&&!this.container.contains(e.target)&&!this.isTargetClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.target,(()=>{this.visible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.visible&&this.hide()},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))},onLeafClick(){this.popup&&this.hide()},containerRef(e){this.container=e},onOverlayClick(e){s.default.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{containerClass(){return["p-tieredmenu p-component",{"p-tieredmenu-overlay":this.popup,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]}},components:{TieredMenuSub:o}};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],l=document.createElement("style");l.type="text/css","top"===i&&n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-tieredmenu-overlay {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-tieredmenu ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-tieredmenu .p-submenu-list {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-tieredmenu .p-menuitem-link {\n cursor: pointer;\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 text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-tieredmenu .p-menuitem-text {\n line-height: 1;\n}\n.p-tieredmenu .p-menuitem {\n position: relative;\n}\n.p-tieredmenu .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-tieredmenu .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n"),d.render=function(e,t,i,l,s,o){const r=n.resolveComponent("TieredMenuSub");return n.openBlock(),n.createBlock(n.Teleport,{to:i.appendTo,disabled:!i.popup},[n.createVNode(n.Transition,{name:"p-connected-overlay",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},{default:n.withCtx((()=>[!i.popup||s.visible?(n.openBlock(),n.createBlock("div",n.mergeProps({key:0,ref:o.containerRef,class:o.containerClass},e.$attrs,{onClick:t[1]||(t[1]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))}),[n.createVNode(r,{model:i.model,root:!0,popup:i.popup,onLeafClick:o.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","popup","onLeafClick","template","exact"])],16)):n.createCommentVNode("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"])},d}(primevue.utils,primevue.overlayeventbus,primevue.ripple,Vue);
|
|
46
46
|
|
package/datatable/BodyCell.vue
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
</td>
|
|
5
5
|
<td v-else :style="containerStyle" :class="containerClass" @click="onClick" @keydown="onKeyDown" role="cell">
|
|
6
6
|
<span v-if="responsiveLayout === 'stack'" class="p-column-title">{{columnProp('header')}}</span>
|
|
7
|
-
<component :is="column.children.body" :data="rowData" :column="column" :field="field" :index="rowIndex" :frozenRow="frozenRow" v-if="column.children && column.children.body && !d_editing" />
|
|
8
|
-
<component :is="column.children.editor" :data="editingRowData" :column="column" :field="field" :index="rowIndex" :frozenRow="frozenRow" v-else-if="column.children && column.children.editor && d_editing" />
|
|
7
|
+
<component :is="column.children.body" :data="rowData" :column="column" :field="field" :index="rowIndex" :frozenRow="frozenRow" :editorInitCallback="editorInitCallback" v-if="column.children && column.children.body && !d_editing" />
|
|
8
|
+
<component :is="column.children.editor" :data="editingRowData" :column="column" :field="field" :index="rowIndex" :frozenRow="frozenRow" :editorSaveCallback="editorSaveCallback" :editorCancelCallback="editorCancelCallback" v-else-if="column.children && column.children.editor && d_editing" />
|
|
9
9
|
<component :is="column.children.body" :data="editingRowData" :column="column" :field="field" :index="rowIndex" :frozenRow="frozenRow" v-else-if="column.children && column.children.body && !column.children.editor && d_editing" />
|
|
10
10
|
<template v-else-if="columnProp('selectionMode')">
|
|
11
11
|
<DTRadioButton :value="rowData" :checked="selected" @change="toggleRowWithRadio($event, rowIndex)" v-if="columnProp('selectionMode') === 'single'" />
|
|
@@ -326,6 +326,15 @@ export default {
|
|
|
326
326
|
onRowEditCancel(event) {
|
|
327
327
|
this.$emit('row-edit-cancel', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
328
328
|
},
|
|
329
|
+
editorInitCallback(event) {
|
|
330
|
+
this.$emit('row-edit-init', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
331
|
+
},
|
|
332
|
+
editorSaveCallback(event) {
|
|
333
|
+
this.$emit('row-edit-save', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
334
|
+
},
|
|
335
|
+
editorCancelCallback(event) {
|
|
336
|
+
this.$emit('row-edit-cancel', {originalEvent: event, data: this.rowData, newData: this.editingRowData, field: this.field, index: this.rowIndex});
|
|
337
|
+
},
|
|
329
338
|
updateStickyPosition() {
|
|
330
339
|
if (this.columnProp('frozen')) {
|
|
331
340
|
let align = this.columnProp('alignFrozen');
|
package/datatable/DataTable.vue
CHANGED
|
@@ -1154,7 +1154,7 @@ export default {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
`
|
|
1156
1156
|
});
|
|
1157
|
-
|
|
1157
|
+
|
|
1158
1158
|
this.styleElement.innerHTML = innerHTML;
|
|
1159
1159
|
},
|
|
1160
1160
|
bindColumnResizeEvents() {
|
|
@@ -1625,16 +1625,19 @@ export default {
|
|
|
1625
1625
|
},
|
|
1626
1626
|
onEditingMetaChange(event) {
|
|
1627
1627
|
let { data, field, index, editing } = event;
|
|
1628
|
-
let
|
|
1628
|
+
let editingMeta = { ...this.d_editingMeta };
|
|
1629
|
+
let meta = editingMeta[index];
|
|
1629
1630
|
|
|
1630
1631
|
if (editing) {
|
|
1631
|
-
!meta && (meta =
|
|
1632
|
+
!meta && (meta = editingMeta[index] = { data: { ...data }, fields: [] });
|
|
1632
1633
|
meta['fields'].push(field);
|
|
1633
1634
|
}
|
|
1634
1635
|
else if (meta) {
|
|
1635
1636
|
const fields = meta['fields'].filter(f => f !== field);
|
|
1636
|
-
!fields.length ? (delete
|
|
1637
|
+
!fields.length ? (delete editingMeta[index]) : (meta['fields'] = fields);
|
|
1637
1638
|
}
|
|
1639
|
+
|
|
1640
|
+
this.d_editingMeta = editingMeta;
|
|
1638
1641
|
},
|
|
1639
1642
|
clearEditingMetaData() {
|
|
1640
1643
|
if (this.editMode) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="['p-checkbox p-component', {'p-checkbox-focused': focused}]" @click="onClick">
|
|
2
|
+
<div :class="['p-checkbox p-component', {'p-checkbox-focused': focused}]" @click.stop.prevent="onClick">
|
|
3
3
|
<div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]"
|
|
4
4
|
role="checkbox" :aria-checked="checked" :tabindex="$attrs.disabled ? null : '0'" @keydown.space.prevent="onClick" @focus="onFocus($event)" @blur="onBlur($event)">
|
|
5
5
|
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
|
package/datatable/TableBody.vue
CHANGED
|
@@ -505,7 +505,13 @@ export default {
|
|
|
505
505
|
},
|
|
506
506
|
computed: {
|
|
507
507
|
columnsLength() {
|
|
508
|
-
|
|
508
|
+
let hiddenColLength = 0;
|
|
509
|
+
|
|
510
|
+
this.columns.forEach(column => {
|
|
511
|
+
if(this.columnProp(column, 'hidden')) hiddenColLength++;
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
return this.columns ? this.columns.length - hiddenColLength : 0;
|
|
509
515
|
},
|
|
510
516
|
rowGroupHeaderStyle() {
|
|
511
517
|
if (this.scrollable) {
|