django-vue3-admin-web/node_modules/vxe-table/lib/table/module/custom/panel.min.js
2025-10-20 21:21:14 +08:00

1 line
21 KiB
JavaScript

Object.defineProperty(exports,"__esModule",{value:!0}),exports.createInternalData=createInternalData,exports.default=void 0;var _vue=require("vue"),_comp=require("../../../ui/src/comp"),_ui=require("../../../ui"),_utils=require("../../../ui/src/utils"),_dom=require("../../../ui/src/dom"),_log=require("../../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let{getI18n,getIcon,renderEmptyElement}=_ui.VxeUI;function createInternalData(){return{}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"TableCustomPanel",props:{customStore:{type:Object,default:()=>({})}},setup(M,t){var e=_xeUtils.default.uniqueId();let R=_ui.VxeUI.getComponent("VxeModal"),H=_ui.VxeUI.getComponent("VxeDrawer"),G=_ui.VxeUI.getComponent("VxeButton"),z=_ui.VxeUI.getComponent("VxeNumberInput"),P=_ui.VxeUI.getComponent("VxeRadioGroup"),$=(0,_vue.inject)("$xeTable",{}),{props:W,reactData:K,internalData:r}=$,{computeCustomOpts:X,computeColumnDragOpts:q,computeColumnOpts:de,computeIsMaxFixedColumn:j,computeResizableOpts:ce}=$.getComputeMaps(),S=(0,_vue.ref)(),Y=(0,_vue.ref)(),Z=(0,_vue.ref)(),u=(0,_vue.ref)(),d=(0,_vue.ref)(),f=(0,_vue.reactive)({dragCol:null,dragGroupField:null,dragAggFnCol:null,dragTipText:""}),T=createInternalData(),a={refElem:S,refBodyWrapperElem:Y,refCustomBodyElem:Z,refDragLineElem:u,refDragTipElem:d},i={},k=e=>{var t=M.customStore;t.activeWrapper=!0,$.customOpenEvent(e)},B=e=>{let t=M.customStore;t.activeWrapper=!1,setTimeout(()=>{t.activeBtn||t.activeWrapper||$.customCloseEvent(e)},300)},J=({$event:e})=>{K.isCustomStatus=!0,$.saveCustom(),$.closeCustom(),$.emitCustomEvent("confirm",e)},Q=({$event:e})=>{$.closeCustom(),$.emitCustomEvent("close",e)},ee=({$event:e})=>{$.cancelCustom(),$.closeCustom(),$.emitCustomEvent("cancel",e)},l=e=>{$.resetCustom(!0),$.closeCustom(),$.emitCustomEvent("reset",e)},te=({$event:t})=>{_ui.VxeUI.modal?_ui.VxeUI.modal.confirm({content:getI18n("vxe.custom.cstmConfirmRestore"),className:"vxe-table--ignore-clear",escClosable:!0}).then(e=>{"confirm"===e&&l(t)}):l(t)},o=t=>{var e=K.customColumnList,e=_xeUtils.default.findTree(e,e=>e===t);e&&e.parent&&(e=e.parent,e.children)&&e.children.length&&(e.renderVisible=e.children.every(e=>e.renderVisible),e.halfVisible=!e.renderVisible&&e.children.some(e=>e.renderVisible||e.halfVisible),o(e))},le=(e,t)=>{let l=!e.renderVisible;X.value.immediate?(_xeUtils.default.eachTree([e],e=>{e.visible=l,e.renderVisible=l,e.halfVisible=!1}),K.isCustomStatus=!0,$.handleCustom(),$.saveCustomStore("update:visible")):_xeUtils.default.eachTree([e],e=>{e.renderVisible=l,e.halfVisible=!1}),o(e),$.checkCustomStatus(),$.dispatchEvent("custom-visible-change",{column:e,checked:l},t)},me=e=>{X.value.immediate&&e.renderResizeWidth!==e.renderWidth&&(e.resizeWidth=e.renderResizeWidth,e.renderWidth=e.renderResizeWidth,K.isCustomStatus=!0,$.handleCustom(),$.saveCustomStore("update:width"))},oe=(e,t,l)=>{var o=j.value;let a=null;X.value.immediate?(e.renderFixed===t?(a="",_xeUtils.default.eachTree([e],e=>{e.fixed="",e.renderFixed=""})):o&&!e.renderFixed||(a=t,_xeUtils.default.eachTree([e],e=>{e.fixed=t,e.renderFixed=t})),K.isCustomStatus=!0,$.handleCustom(),$.saveCustomStore("update:fixed")):e.renderFixed===t?(a="",_xeUtils.default.eachTree([e],e=>{e.renderFixed=""})):o&&!e.renderFixed||(a=t,_xeUtils.default.eachTree([e],e=>{e.renderFixed=t})),null!==a&&$.dispatchEvent("custom-fixed-change",{column:e,fixed:a},l)},ae=e=>{var t=K.customStore,t=!t.isAll;$.toggleCustomAllCheckbox(),$.dispatchEvent("custom-visible-all",{checked:t},e)},c=(e,t,l,o)=>{var a,i,s,r,n=Y.value;n&&(r=Z.value)&&(a=T.prevDragToChild,i=n.getBoundingClientRect(),r=r.getBoundingClientRect(),s=u.value,t?s&&(l?(t=t.getBoundingClientRect(),s.style.display="block",s.style.left=Math.max(0,r.x-i.x)+"px",s.style.top=Math.max(1,t.y+n.scrollTop-i.y)+"px",s.style.height=t.height+"px",s.style.width=t.width+"px",s.setAttribute("drag-pos",o),s.setAttribute("drag-to-child",a?"y":"n")):s.style.display=""):s&&(s.style.display="node"),r=d.value)&&(r.style.display="block",r.style.top=Math.min(n.clientHeight+n.scrollTop-r.clientHeight,e.clientY+n.scrollTop-i.y)+"px",r.style.left=Math.min(n.clientWidth+n.scrollLeft-r.clientWidth,e.clientX+n.scrollLeft-i.x)+"px",r.setAttribute("drag-status",l?a?"sub":"normal":"disabled"))},n=()=>{var e=f.dragCol,t=q.value.tooltipMethod;let l="";l=t?""+(t({$table:$,column:e})||""):getI18n("vxe.custom.cstmDragTarget",[e&&"html"!==e.type?e.getTitle():""]),f.dragTipText=l},s=()=>{var e=d.value,t=u.value;e&&(e.style.display=""),t&&(t.style.display="")},ie=e=>{var e=e.currentTarget.parentElement.parentElement.parentElement,t=e.getAttribute("colid"),t=$.getColumnById(t);e.draggable=!0,f.dragCol=t,f.dragGroupField=null,f.dragAggFnCol=null,n(),(0,_dom.addClass)(e,"active--drag-origin")},se=e=>{e=e.currentTarget.parentElement.parentElement.parentElement;s(),e.draggable=!1,f.dragCol=null,f.dragGroupField=null,(f.dragAggFnCol=null,_dom.removeClass)(e,"active--drag-origin")},re=e=>{e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0),T.prevDragGroupField=null,T.prevDragAggFnColid=null},ne=d=>{let c=W.mouseConfig,m=K.customColumnList,v=r.collectColumn;let p=X.value.immediate;var e=d.currentTarget;let{isCrossDrag:g,isSelfToChildDrag:x,isToChildDrag:h,dragEndMethod:t}=q.value;var l=f.dragCol;let{prevDragCol:o,prevDragGroupField:a,prevDragAggFnColid:i,prevDragPos:_,prevDragToChild:b}=T,C="bottom"===_?1:0;if(a||i)$.handlePivotTableAggregatePanelDragendEvent&&$.handlePivotTableAggregatePanelDragendEvent(d);else if(o&&l&&o!==l){let n=l,u=o;Promise.resolve(!t||t({oldColumn:n,newColumn:u,dragColumn:n,dragPos:_,dragToChild:!!b,offsetIndex:C})).then(a=>{if(a){let e=-1,t=-1,l={},o=(_xeUtils.default.eachTree([n],e=>{l[e.id]=e}),!1);if(p){if(n.parentId&&u.parentId){if(!g)return;if(l[u.id]&&(o=!0,!g||!x))return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({status:"error",content:getI18n("vxe.error.treeDragChild")}))}else if(n.parentId){if(!g)return}else if(u.parentId){if(!g)return;if(l[u.id]&&(o=!0,!g||!x))return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({status:"error",content:getI18n("vxe.error.treeDragChild")}))}var i,s,r,a=_xeUtils.default.findTree(v,e=>e.id===n.id),a=(o&&g&&x?a&&({items:i,index:r}=a,(s=n.children||[]).forEach(e=>{e.parentId=n.parentId}),i.splice(r,1,...s),n.children=[]):a&&({items:i,index:r,parent:s}=a,i.splice(r,1),s||(e=r)),_xeUtils.default.findTree(v,e=>e.id===u.id));a&&({items:i,index:s,parent:r}=a,g&&h&&b?(n.parentId=u.id,u.children=(u.children||[]).concat([n])):(n.parentId=u.parentId,i.splice(s+C,0,n)),r||(t=s)),_xeUtils.default.eachTree(v,(e,t,l,o,a)=>{a||(e.renderSortNumber=t+1)})}else e=_xeUtils.default.findIndexOf(m,e=>e.id===n.id),m.splice(e,1),t=_xeUtils.default.findIndexOf(m,e=>e.id===u.id),m.splice(t+C,0,n);c&&($.clearSelected&&$.clearSelected(),$.clearCellAreas)&&($.clearCellAreas(),$.clearCopyCellArea()),$.dispatchEvent("column-dragend",{oldColumn:n,newColumn:u,dragColumn:n,dragPos:_,offsetIndex:C,_index:{newIndex:t,oldIndex:e}},d),p&&(K.customColumnList=v.slice(0),$.handleColDragSwapColumn())}}).catch(()=>{})}s(),f.dragCol=null,f.dragGroupField=null,f.dragAggFnCol=null,T.prevDragGroupField=null,T.prevDragAggFnColid=null,e.draggable=!1,e.removeAttribute("drag-pos"),(0,_dom.removeClass)(e,"active--drag-target"),(0,_dom.removeClass)(e,"active--drag-origin")},ue=e=>{var t,l=X.value.immediate,{isCrossDrag:o,isToChildDrag:a}=q.value,i=e.currentTarget,s=(0,_dom.hasControlKey)(e),r=i.getAttribute("colid"),r=$.getColumnById(r),n=f.dragCol;T.prevDragGroupField=null,T.prevDragAggFnColid=null,r&&(o||1===r.level)&&(e.preventDefault(),t=e.clientY-i.getBoundingClientRect().y<i.clientHeight/2?"top":"bottom",!n||n.id===r.id||!o&&1<r.level||!l&&1<r.level?c(e,i,!1,t):(T.prevDragToChild=!!(o&&a&&s&&l),T.prevDragCol=r,T.prevDragPos=t,c(e,i,!0,t)))},ve=()=>{var e=f.dragTipText,t=q.value;return(0,_vue.h)("div",{},[(0,_vue.h)("div",{ref:u,class:["vxe-table-custom-popup--drag-line",{"is--guides":t.showGuidesStatus}]}),(0,_vue.h)("div",{ref:d,class:"vxe-table-custom-popup--drag-tip"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--drag-tip-wrapper"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--drag-tip-status"},[(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-normal-status",getIcon().TABLE_DRAG_STATUS_ROW]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-sub-status",getIcon().TABLE_DRAG_STATUS_SUB_ROW]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-group-status",getIcon().TABLE_DRAG_STATUS_AGG_GROUP]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-values-status",getIcon().TABLE_DRAG_STATUS_AGG_VALUES]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-disabled-status",getIcon().TABLE_DRAG_DISABLED]})]),(0,_vue.h)("div",{class:"vxe-table-custom-popup--drag-tip-content"},""+(e||""))])])])};(0,_vue.nextTick)(()=>{var e=X.value.mode;R||"modal"!==e||(0,_log.errLog)("vxe.error.reqComp",["vxe-modal"]),H||"drawer"!==e||(0,_log.errLog)("vxe.error.reqComp",["vxe-drawer"]),G||(0,_log.errLog)("vxe.error.reqComp",["vxe-button"]),z||(0,_log.errLog)("vxe.error.reqComp",["vxe-number-input"]),P||(0,_log.errLog)("vxe.error.reqComp",["vxe-radio-group"])});e={xID:e,props:M,context:t,reactData:f,internalData:T,xeTable:$,getRefMaps:()=>a,getComputeMaps:()=>i,renderVN:()=>{var e=X.value;return(["modal","drawer","popup"].includes(""+e.mode)?()=>{var e=$.xeGrid,t=$.xeGantt;let l=M.customStore,{treeConfig:o,rowGroupConfig:a,aggregateConfig:i,resizable:d}=W,{isCustomStatus:s,customColumnList:r}=K,n=X.value,c=n.immediate;var u=q.value;let{mode:m,modalOptions:v,drawerOptions:p,allowVisible:g,allowSort:N,allowFixed:x,allowResizable:h,checkMethod:_,visibleMethod:b}=n,C=de.value,f=C.maxFixedSize,{minWidth:T,maxWidth:I}=ce.value;var E=Object.assign({},v),V=Object.assign({},p);let A=j.value,L=u.isCrossDrag;u=n.slots||{};let D=u.header,y=u.top,S=u.bottom,k=u.default,B=u.footer,w=[],O=l.isAll,F=l.isIndeterminate,U={$table:$,$grid:e,$gantt:t,columns:r,isAllChecked:O,isAllIndeterminate:F,isCustomStatus:s};_xeUtils.default.eachTree(r,(o,a,e,t,i)=>{if(!b||b({$table:$,column:o})){let e=0,t=0;h&&(a={$table:$,column:o,columnIndex:a,$columnIndex:a,$rowIndex:-1},T&&(e=_xeUtils.default.toNumber(_xeUtils.default.isFunction(T)?T(a):T)),I)&&(t=_xeUtils.default.toNumber(_xeUtils.default.isFunction(I)?I(a):I));var a=o.renderVisible,s=o.halfVisible,r=(0,_utils.formatText)(o.getTitle(),1),n=o.children&&o.children.length;let l=!!_&&!_({$table:$,column:o});var u=!a;w.push((0,_vue.h)("tr",{key:o.id,colid:o.id,class:["vxe-table-custom-popup--row level--"+o.level,{"is--group":n}],onDragstart:re,onDragend:ne,onDragover:ue},[g?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--visible"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":a,"is--indeterminate":s,"is--disabled":l}],title:getI18n("vxe.custom.setting.colVisible"),onClick:e=>{l||le(o,e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",s?getIcon().TABLE_CHECKBOX_INDETERMINATE:a?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})])]):(0,_vue.createCommentVNode)(),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--name"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--name"},[N?L&&c||1===o.level?(0,_vue.h)("div",Object.assign({class:["vxe-table-custom-popup--column-sort-btn",{"is--disabled":l||u}],title:getI18n("vxe.custom.setting.sortHelpTip")},l||u?{}:{onMousedown:ie,onMouseup:se}),[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})]):(0,_vue.h)("div",{class:"vxe-table-custom-popup--column-sort-placeholder"}):(0,_vue.createCommentVNode)(),"html"===o.type?(0,_vue.h)("div",{key:"1",class:"vxe-table-custom-popup--title",innerHTML:r}):(0,_vue.h)("div",{key:"0",class:"vxe-table-custom-popup--title",title:r},r)])]),h?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--resizable"},[o.children&&o.children.length||!(_xeUtils.default.isBoolean(o.resizable)?o.resizable:C.resizable||d)?(0,_vue.h)("span","-"):z?(0,_vue.h)(z,{type:"integer",immediate:!1,disabled:l||u,modelValue:o.renderResizeWidth,min:e||void 0,max:t||void 0,"onUpdate:modelValue"(e){e=Math.max(0,Number(e));o.renderResizeWidth=e},onChange(){me(o)}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)(),x?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--fixed"},[i?(0,_vue.h)("span","-"):P?(0,_vue.h)(P,{modelValue:o.renderFixed||"",type:"button",size:"mini",disabled:l||u,options:[{label:getI18n("vxe.custom.setting.fixedLeft"),value:"left",disabled:l||u||A},{label:getI18n("vxe.custom.setting.fixedUnset"),value:"",disabled:l||u},{label:getI18n("vxe.custom.setting.fixedRight"),value:"right",disabled:l||u||A}],onChange({label:e,$event:t}){oe(o,e,t)}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)()]))}});u={default:()=>(0,_vue.h)("div",{ref:Y,class:"vxe-table-custom-popup--body-wrapper"},k?$.callSlot(k,U):[(0,_vue.h)("div",{ref:Z,class:"vxe-table-custom-popup--handle-wrapper"},[y?(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-top"},$.callSlot(y,U)):renderEmptyElement($),(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-wrapper"},[(0,_vue.h)("table",{},[(0,_vue.h)("colgroup",{},[g?(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-seq"}):(0,_vue.createCommentVNode)(),(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-title"}),h?(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-width"}):(0,_vue.createCommentVNode)(),x?(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-fixed"}):(0,_vue.createCommentVNode)()]),(0,_vue.h)("thead",{},[(0,_vue.h)("tr",{},[g?(0,_vue.h)("th",{},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":O,"is--indeterminate":F}],title:getI18n("vxe.table.allTitle"),onClick:ae},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",F?getIcon().TABLE_CHECKBOX_INDETERMINATE:O?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))])]):(0,_vue.createCommentVNode)(),(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colTitle")),h?(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colResizable")):(0,_vue.createCommentVNode)(),x?(0,_vue.h)("th",{},getI18n("vxe.custom.setting."+(f?"colFixedMax":"colFixed"),[f])):(0,_vue.createCommentVNode)()])]),(0,_vue.h)(_vue.TransitionGroup,{class:"vxe-table-custom--panel-list",tag:"tbody",name:"vxe-table-custom--list"},{default:()=>w})])]),S?(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-bottom"},$.callSlot(S,U)):renderEmptyElement($),ve()]),!o&&(i||a)&&$.getPivotTableAggregatePopupPanel?(0,_vue.h)($.getPivotTableAggregatePopupPanel(),{customStore:l}):renderEmptyElement($)]),footer:()=>B?$.callSlot(B,U):(0,_vue.h)("div",{class:"vxe-table-custom-popup--footer"},[G?(0,_vue.h)(G,{content:n.resetButtonText||getI18n("vxe.custom.cstmRestore"),disabled:!s,onClick:te}):(0,_vue.createCommentVNode)(),c?G?(0,_vue.h)(G,{content:n.closeButtonText||getI18n("vxe.table.customClose"),onClick:Q}):(0,_vue.createCommentVNode)():G?(0,_vue.h)(G,{content:n.cancelButtonText||getI18n("vxe.table.customCancel"),onClick:ee}):(0,_vue.createCommentVNode)(),!c&&G?(0,_vue.h)(G,{status:"primary",content:n.confirmButtonText||getI18n("vxe.custom.cstmConfirm"),onClick:J}):(0,_vue.createCommentVNode)()])};return D&&(u.header=()=>$.callSlot(D,U)),"drawer"===m?H?(0,_vue.h)(H,{key:"drawer",className:["vxe-table-custom-drawer-wrapper","vxe-table--ignore-clear",V.className||""].join(" "),modelValue:l.visible,title:V.title||getI18n("vxe.custom.cstmTitle"),width:V.width||Math.min(880,Math.floor(.6*document.documentElement.clientWidth)),position:V.position,resize:!!V.resize,escClosable:!!V.escClosable,maskClosable:!!V.maskClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){l.visible=e}},u):(0,_vue.createCommentVNode)():R?(0,_vue.h)(R,{key:"modal",className:["vxe-table-custom-modal-wrapper","vxe-table--ignore-clear",E.className||""].join(" "),modelValue:l.visible,title:E.title||getI18n("vxe.custom.cstmTitle"),width:E.width||Math.min(880,document.documentElement.clientWidth),minWidth:E.minWidth||700,height:E.height||Math.min(680,document.documentElement.clientHeight),minHeight:E.minHeight||400,showZoom:E.showZoom,showMaximize:E.showMaximize,showMinimize:E.showMinimize,mask:E.mask,lockView:E.lockView,resize:E.resize,escClosable:!!E.escClosable,maskClosable:!!E.maskClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){l.visible=e}},u):(0,_vue.createCommentVNode)()}:()=>{var e=$.xeGrid,t=$.xeGantt,l=$.props,o=M.customStore,{treeConfig:l,rowGroupConfig:a,aggregateConfig:i}=l,{isCustomStatus:s,customColumnList:r}=K,n=X.value;let d=n.immediate;var u=q.value,c=o.maxHeight;let{checkMethod:m,visibleMethod:v,allowVisible:p,allowSort:g,allowFixed:x,trigger:h,placement:_}=n,b=j.value,C=u.isCrossDrag;var u=n.slots||{},f=u.header,T=u.top,I=u.bottom,E=u.default,u=u.footer;let V=[];var A={},D=o.isAll,y=o.isIndeterminate,e=("hover"===h&&(A.onMouseenter=k,A.onMouseleave=B),{$table:$,$grid:e,$gantt:t,columns:r,isAllChecked:D,isAllIndeterminate:y,isCustomStatus:s});return _xeUtils.default.eachTree(r,(l,e,t,o,a)=>{if(!v||v({$table:$,column:l})){var i=l.renderVisible,s=l.halfVisible,r=l.children&&l.children.length,n=(0,_utils.formatText)(l.getTitle(),1);let t=!!m&&!m({$table:$,column:l});var u=!i;V.push((0,_vue.h)("li",{key:l.id,colid:l.id,class:["vxe-table-custom--option","level--"+l.level,{"is--hidden":t||u,"is--group":r}],onDragstart:re,onDragend:ne,onDragover:ue},[p?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":i,"is--indeterminate":s,"is--disabled":t}],title:getI18n("vxe.custom.setting.colVisible"),onClick:e=>{t||le(l,e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",s?getIcon().TABLE_CHECKBOX_INDETERMINATE:i?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})]):(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-table-custom--name-option"},[g&&(C&&d||1===l.level)?(0,_vue.h)("div",{class:"vxe-table-custom--sort-option"},[(0,_vue.h)("span",Object.assign({class:["vxe-table-custom--sort-btn",{"is--disabled":t||u}],title:getI18n("vxe.custom.setting.sortHelpTip")},t||u?{}:{onMousedown:ie,onMouseup:se}),[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})])]):(0,_vue.createCommentVNode)(),"html"===l.type?(0,_vue.h)("div",{key:"1",class:"vxe-table-custom--checkbox-label",innerHTML:n}):(0,_vue.h)("div",{key:"0",class:"vxe-table-custom--checkbox-label"},n)]),!a&&x?(0,_vue.h)("div",{class:"vxe-table-custom--fixed-option"},[G?(0,_vue.h)(G,{mode:"text",icon:"left"===l.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_LEFT,status:"left"===l.renderFixed?"primary":"",disabled:t||u||b&&!l.renderFixed,title:getI18n("left"===l.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedLeft"),onClick:({$event:e})=>{oe(l,"left",e)}}):(0,_vue.createCommentVNode)(),G?(0,_vue.h)(G,{mode:"text",icon:"right"===l.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,status:"right"===l.renderFixed?"primary":"",disabled:t||u||b&&!l.renderFixed,title:getI18n("right"===l.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedRight"),onClick:({$event:e})=>{oe(l,"right",e)}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)()]))}}),(0,_vue.h)("div",{ref:S,key:"simple",class:["vxe-table-custom-wrapper","placement--"+_,{"is--active":o.visible}],style:c&&!["left","right"].includes(_||"")?{maxHeight:c+"px"}:{}},o.visible?[(0,_vue.h)("div",{ref:Y,class:"vxe-table-custom-simple--body-wrapper"},[!l&&(i||a)&&$.getPivotTableAggregateSimplePanel?(0,_vue.h)($.getPivotTableAggregateSimplePanel(),{customStore:o}):renderEmptyElement($),(0,_vue.h)("div",{ref:Z,class:"vxe-table-custom--handle-wrapper"},[(0,_vue.h)("div",{class:"vxe-table-custom--header"},f?$.callSlot(f,e):[(0,_vue.h)("ul",{class:"vxe-table-custom--panel-list"},[(0,_vue.h)("li",{class:"vxe-table-custom--option"},[p?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":D,"is--indeterminate":y}],title:getI18n("vxe.table.allTitle"),onClick:ae},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",y?getIcon().TABLE_CHECKBOX_INDETERMINATE:D?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))]):(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.table.customTitle"))])])]),(0,_vue.h)("div",{class:"vxe-table-custom--body"},[T?(0,_vue.h)("div",{class:"vxe-table-custom--panel-top"},$.callSlot(T,e)):renderEmptyElement($),E?(0,_vue.h)("div",{class:"vxe-table-custom--panel-body"},$.callSlot(E,e)):(0,_vue.h)(_vue.TransitionGroup,Object.assign({class:"vxe-table-custom--panel-list",name:"vxe-table-custom--list",tag:"ul"},A),{default:()=>V}),I?(0,_vue.h)("div",{class:"vxe-table-custom--panel-bottom"},$.callSlot(I,e)):renderEmptyElement($)]),n.showFooter?(0,_vue.h)("div",{class:"vxe-table-custom--footer"},u?$.callSlot(u,e):[(0,_vue.h)("div",{class:"vxe-table-custom--footer-buttons"},[G?(0,_vue.h)(G,{mode:"text",content:n.resetButtonText||getI18n("vxe.table.customRestore"),disabled:!s,onClick:te}):(0,_vue.createCommentVNode)(),d?G?(0,_vue.h)(G,{mode:"text",content:n.closeButtonText||getI18n("vxe.table.customClose"),onClick:Q}):(0,_vue.createCommentVNode)():G?(0,_vue.h)(G,{mode:"text",content:n.cancelButtonText||getI18n("vxe.table.customCancel"),onClick:ee}):(0,_vue.createCommentVNode)(),!d&&G?(0,_vue.h)(G,{mode:"text",status:"primary",content:n.confirmButtonText||getI18n("vxe.table.customConfirm"),onClick:J}):(0,_vue.createCommentVNode)()])]):null]),ve()])]:[])})()}};return(0,_vue.onUnmounted)(()=>{T=createInternalData()}),(0,_vue.provide)("$xeTableCustomPanel",e),e},render(){return this.renderVN()}});