bkui-vue 0.0.2-table-refactor.1 → 0.0.2-table-refactor.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +44 -44
- package/dist/index.esm.js +11009 -10922
- package/dist/index.umd.js +45 -45
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/dialog/dialog.css +2 -0
- package/lib/dialog/dialog.variable.css +2 -0
- package/lib/info-box/info-box.css +2 -0
- package/lib/info-box/info-box.less +2 -1
- package/lib/info-box/info-box.variable.css +2 -0
- package/lib/modal/modal.css +2 -0
- package/lib/modal/modal.variable.css +2 -0
- package/lib/select/common.d.ts +1 -0
- package/lib/select/index.d.ts +26 -3
- package/lib/select/index.js +1 -1
- package/lib/select/select.d.ts +12 -1
- package/lib/table/const.d.ts +8 -2
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/use-fixed-column.d.ts +5 -6
- package/lib/table/table.css +1 -0
- package/lib/table/table.less +1 -0
- package/lib/table/table.variable.css +1 -0
- package/lib/table/use-attributes.d.ts +2 -2
- package/lib/table/use-render.d.ts +1 -1
- package/lib/tag-input/tag-input.css +3 -0
- package/lib/tag-input/tag-input.less +4 -0
- package/lib/tag-input/tag-input.variable.css +3 -0
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/v-virtual-render.d.ts +18 -1
- package/lib/virtual-render/virtual-render.d.ts +4 -4
- package/package.json +1 -1
package/lib/table/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../virtual-render"),require("lodash"),require("../loading"),require("./preset"),require("./components"),require("./directives"),require("./plugins"),require("./config-provider"),require("./hooks"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("../exception"),require("../popover"),require("../icon/"),require("../button"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../virtual-render","lodash","../loading","./preset","./components","./directives","./plugins","./config-provider","./hooks","../checkbox","../icon","../pagination","../directives","../exception","../popover","../icon/","../button"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../virtual-render"),require("lodash"),require("../loading"),require("./preset"),require("./components"),require("./directives"),require("./plugins"),require("./config-provider"),require("./hooks"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("../exception"),require("../popover"),require("../icon/"),require("../button")):t(e["../shared"],e.vue,e["vue-types"],e["../config-provider"],e["../virtual-render"],e.lodash,e["../loading"],e["./preset"],e["./components"],e["./directives"],e["./plugins"],e["./config-provider"],e["./hooks"],e["../checkbox"],e["../icon"],e["../pagination"],e["../directives"],e["../exception"],e["../popover"],e["../icon/"],e["../button"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n,o,r,i,a,l,u,c,s,d,f,p,v,h,m,g,y,b,C)=>(()=>{var w={6064:(e,t,n)=>{"use strict";n(9887);var o=n(4689);n.o(o,"useLocale")&&n.d(t,{useLocale:function(){return o.useLocale}});var r=n(7257);n.o(r,"useLocale")&&n.d(t,{useLocale:function(){return r.useLocale}}),n(368);var i=n(7623);n.o(i,"useLocale")&&n.d(t,{useLocale:function(){return i.useLocale}});var a=n(5737);n.o(a,"useLocale")&&n.d(t,{useLocale:function(){return a.useLocale}})},8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),a=n(8725),l=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,s=t||[],d=(e=e||{}).node||o,f=void 0!==e.clockseq?e.clockseq:r;if(null==d||null==f){var p=i();null==d&&(d=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:u+1,m=v-l+(h-u)/1e4;if(m<0&&void 0===e.clockseq&&(f=f+1&16383),(m<0||v>l)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=v,u=h,r=f;var g=(1e4*(268435455&(v+=122192928e5))+h)%4294967296;s[c++]=g>>>24&255,s[c++]=g>>>16&255,s[c++]=g>>>8&255,s[c++]=255&g;var y=v/4294967296*1e4&268435455;s[c++]=y>>>8&255,s[c++]=255&y,s[c++]=y>>>24&15|16,s[c++]=y>>>16&255,s[c++]=f>>>8|128,s[c++]=255&f;for(var b=0;b<6;++b)s[c+b]=d[b];return t||a(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||o)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var l=0;l<16;++l)t[i+l]=a[l];return t||r(a)}},4976:e=>{"use strict";e.exports=C},5800:e=>{"use strict";e.exports=p},2717:e=>{"use strict";e.exports=o},4061:e=>{"use strict";e.exports=m},9911:e=>{"use strict";e.exports=g},6870:e=>{"use strict";e.exports=v},7685:e=>{"use strict";e.exports=b},4870:e=>{"use strict";e.exports=a},5801:e=>{"use strict";e.exports=h},5537:e=>{"use strict";e.exports=y},4212:t=>{"use strict";t.exports=e},3511:e=>{"use strict";e.exports=r},4689:e=>{"use strict";e.exports=u},7623:e=>{"use strict";e.exports=d},7257:e=>{"use strict";e.exports=c},5737:e=>{"use strict";e.exports=f},368:e=>{"use strict";e.exports=s},9887:e=>{"use strict";e.exports=l},467:e=>{"use strict";e.exports=i},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=n}},T={};function O(e){var t=T[e];if(void 0!==t)return t.exports;var n=T[e]={exports:{}};return w[e](n,n.exports,O),n.exports}O.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return O.d(t,{a:t}),t},O.d=(e,t)=>{for(var n in t)O.o(t,n)&&!O.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},O.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),O.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),O.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var _={};return(()=>{"use strict";O.r(_),O.d(_,{BkTable:()=>Ut,BkTableColumn:()=>ve,default:()=>qt});var e,t,n,o=O(4212),r=O(748);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function l(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal"}(t||(t={})),function(e){e.HIGHLIGHT="highlight",e.AUTO="auto"}(n||(n={}));var u,c=[n.AUTO,n.HIGHLIGHT],s=[t.NONE,t.ROW,t.COL,t.OUTER,t.HORIZONTAL],d="row_index",f="row_id",p="row_expand",v="row_selection",h="row_selection_indeterminate",m="row_skip_config",g="col_$uuid",y="col_min_width",b="col_sort_active",C="col_sort_type",w="col_sort_fn",T="col_sort_scope",S="col_filter_fn",x="col_is_drag",E="width",N="calcWidth",L="resizeWidth",A="listeners",R="isHidden",k=42;!function(e){e.DEF1="def1",e.DEF2="def2"}(u||(u={}));var P,V=(l(e={},u.DEF1,"#FAFBFD"),l(e,u.DEF2,"#F0F1F5"),e),I={large:78,medium:60,small:42},D="InitColumns",H="BKTableCahce";!function(e){e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom"}(P||(P={}));var j,M,F,z,W=[P.ASC,P.DESC,P.NULL,P.CUSTOM],B=80,U={},q=O(210);!function(e){e.CURRENT="current",e.ALL="all"}(j||(j={})),function(e){e.STATIC="static",e.AUTO="auto"}(M||(M={})),(0,q.toType)("showOverflowTooltipMode",{default:M.AUTO}),function(e){e.SELECTION="selection",e.INDEX="index",e.EXPAND="expand",e.NONE="none"}(F||(F={})),function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.NONE=""}(z||(z={}));var G,K,$,X=(0,q.toType)("columnType",{default:F.NONE}),Y=(0,q.toType)("columnType",{default:z.NONE});!function(e){e.FULL="full",e.FUZZY="fuzzy"}(G||(G={})),(0,q.toType)("full",{default:G.FULL}),function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(K||(K={})),(0,q.toType)("columnSize",{default:K.SMALL}),function(e){e.LEFT="left",e.RIGHT="right"}($||($={}));var Z,J,Q=(0,q.string)(),ee=(0,q.toType)("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),te=(0,q.toType)("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),ne=(0,q.toType)("IFilterPropShape",{default:!1,type:[Boolean,Object]});!function(e){e.MULTI="multi",e.SINGLE="single",e.DISABLED="disabled"}(Z||(Z={})),function(e){e.DEBOUNCE="debounce",e.THROTTLE="throttle"}(J||(J={}));var oe,re=(0,q.toType)("IColumnType",{default:{width:"100%",label:""},type:[Object]}),ie=(0,q.toType)("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),ae=(0,q.toType)("LabelFunctionStringType",{}),le=(0,q.toType)("RenderFunctionStringType",{}),ue=(0,q.toType)("SpanFunctionStringType",{}),ce=(0,q.toType)("RowClassFunctionStringType",{}),se=(0,q.toType)("RowHeightFunctionNumberType",{}),de=((0,q.toType)("FunctionNumberType",{}),function(e){return(0,q.toType)("StringNumberType",{}).def(e)});(0,q.toType)("IColumnPropType",{default:{label:void 0,minWidth:B},type:[Object]}),function(e){e.interdependent="interdependent",e.independent="independent"}(oe||(oe={}));var fe={data:o.PropTypes.arrayOf(o.PropTypes.any).def([]),columns:o.PropTypes.arrayOf(re).def([]),activeColumn:o.PropTypes.oneOfType([o.PropTypes.number.def(-1),o.PropTypes.arrayOf(o.PropTypes.number.def(-1))]),columnPick:(0,q.toType)("columnPick",{}).def(Z.DISABLED),height:de("auto"),stripe:o.PropTypes.bool.def(!1),minHeight:de(84),maxHeight:de("auto"),rowHeight:se.def(k),headHeight:o.PropTypes.number.def(k),showHead:o.PropTypes.bool.def(!0),thead:(0,q.toType)("ITheadType",{}).def({color:u.DEF1,height:k,isShow:!0}),virtualEnabled:o.PropTypes.bool.def(!1),border:o.PropTypes.oneOfType([o.PropTypes.arrayOf((0,q.toType)("boderType",{})),o.PropTypes.string]).def([t.ROW]),pagination:o.PropTypes.oneOfType([o.PropTypes.bool.def(!1),o.PropTypes.object.def({})]).def(!1),paginationHeight:o.PropTypes.number.def(60),remotePagination:o.PropTypes.bool.def(!1),acrossAll:o.PropTypes.bool.def(!1),emptyText:o.PropTypes.string,emptyCellText:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.func.def((function(){return""}))]).def(""),settings:ie,rowClass:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),rowStyle:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),cellStyle:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),cellClass:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),scrollLoading:o.PropTypes.oneOfType([o.PropTypes.object,o.PropTypes.bool]).def(void 0),reserveExpand:o.PropTypes.bool.def(!1),selectionKey:o.PropTypes.string.def(""),checked:o.PropTypes.array.def([]),isSelectedFn:o.PropTypes.func.def(void 0),rowKey:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.func]).def(d),showOverflowTooltip:ee,asyncData:o.PropTypes.bool.def(!1),rowHover:o.PropTypes.oneOf(c).def(n.HIGHLIGHT),defaultSort:o.PropTypes.shape({}).def({}),isRowSelectEnable:o.PropTypes.oneOfType([o.PropTypes.func.def((function(){return!0})),o.PropTypes.bool.def(!0)]).def(!0),resizerWay:(0,q.toType)("ResizerWay",{default:J.DEBOUNCE}),observerResize:o.PropTypes.bool.def(!0),align:Y,headerAlign:Y,prependStyle:o.PropTypes.style().def({}),colSortBehavior:(0,q.toType)("IColSortBehavior",{default:oe.independent}),isFlex:o.PropTypes.bool.def(!0)},pe={label:ae,field:ae,render:le,width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),minWidth:de(B),columnKey:o.PropTypes.string.def(""),showOverflowTooltip:ee,type:X,resizable:o.PropTypes.bool.def(!0),fixed:o.PropTypes.oneOfType([o.PropTypes.bool,Q]).def(!1),sort:te,filter:ne,colspan:ue.def(1),rowspan:ue.def(1),align:Y,className:ce,prop:ae,index:o.PropTypes.number.def(void 0)};const ve=(0,r.defineComponent)({name:"TableColumn",props:pe,setup:function(e){return{initColumns:(0,r.inject)(D,(function(e){}),!1),bkTableCache:(0,r.inject)(H,{queueStack:function(e,t){return null==t?void 0:t()}}),column:(0,r.reactive)(Object.assign({},e,{field:e.prop||e.field}))}},unmounted:function(){this.updateColumnDefine(!0)},mounted:function(){this.updateColumnDefine()},methods:{updateColumnDefine:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];void 0===this.$props.index||"number"!=typeof this.$props.index?this.updateColumnDefineByParent():this.updateColumnDefineByIndex(e)},updateColumnDefineByParent:function(){var e=this;"function"==typeof this.bkTableCache.queueStack&&this.bkTableCache.queueStack("Bk_COlumn_Update_Define",(function(){var t=e._.parent.vnode.children.default()||[],n=[];!function e(t){Array.isArray(t)&&t.forEach((function(t){var o,i,a;if(Array.isArray(t))e(t);else{var l=!0;if("TableColumn"===(null===(o=t.type)||void 0===o?void 0:o.name)){l=Object.hasOwnProperty.call(t.props||{},"key");var u=Object.assign({},t.props,{field:t.props.prop||t.props.field,render:null===(i=t.children)||void 0===i?void 0:i.default});n.push((0,r.unref)(u))}(null===(a=t.children)||void 0===a?void 0:a.length)&&l&&e(t.children)}}))}(t),e.initColumns(n)}))},updateColumnDefineByIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object.assign({},this.$props,{field:this.$props.prop||this.$props.field,render:this.$slots.default});this.initColumns((0,r.unref)(t),e)}},render:function(){var e,t;return(0,r.createVNode)(r.Fragment,null,[null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e,{row:{}})])}});var he=O(2717),me=O(3511),ge=O.n(me);function ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}var be,Ce,we,Te,Oe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.storage=void 0,this.storage={}}var t,n;return t=e,n=[{key:"queueStack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this.storage[e]&&clearTimeout(this.storage[e]),this.storage[e]=setTimeout((function(){return t()}))}},{key:"clearQueueStack",value:function(e){this.storage[e]&&clearTimeout(this.storage[e])}}],n&&ye(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();!function(e){e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck"}(we||(we={})),function(e){e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick"}(Te||(Te={}));var _e=function(e,t,n,o,r){return!0},Se=function(e){return!0},xe=function(e){return!0},Ee=(l(be={},Te.COLUMN_PICK,(function(e){return!0})),l(be,Te.COLUMN_FILTER,(function(e){return!0})),l(be,Te.COLUMN_SORT,(function(e){return!0})),l(be,Te.COLUMN_FILTER_SAVE,(function(e){return!0})),l(be,Te.ROW_CLICK,_e),l(be,Te.ROW_DBL_CLICK,_e),l(be,Te.ROW_EXPAND_CLICK,(function(e){return!0})),l(be,Te.ROW_SELECT,(function(e){return!0})),l(be,Te.ROW_SELECT_ALL,(function(e){return!0})),l(be,Te.ROW_SELECT_CHANGE,(function(e){return!0})),l(be,Te.PAGE_LIMIT_CHANGE,Se),l(be,Te.PAGE_VALUE_CHANGE,Se),l(be,Te.SETTING_CHANGE,(function(e){return!0})),l(be,Te.SCROLL_BOTTOM,(function(e){return!0})),l(be,Te.CELL_CLICK,xe),l(be,Te.CELL_DBL_CLICK,xe),l(be,Te.ROW_MOUSE_ENTER,_e),l(be,Te.ROW_MOUSE_LEAVE,_e),be),Ne=(l(Ce={},Te.NATIVE_CLICK,_e),l(Ce,Te.NATIVE_DBL_CLICK,_e),O(467));const Le=function(e,t,n){var o=t.formatData,i=t.isHiddenColumn,a=t.getColumnId,u=t.getColumnOrderWidth,c=function(e){return"right"===e.fixed?"right":"left"},s={left:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return o.columns.filter((function(e){return!i(e)&&e.fixed&&"right"!==e.fixed})).reduce((function(t,n,o){return e&&0===o?t:t+u(n)}),0)},right:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return o.columns.filter((function(e){return!i(e)&&"right"===e.fixed})).reduce((function(t,n,o){return e&&0===o?t:t+u(n)}),n?6:0)}},d=(0,r.computed)((function(){var e={left:!1,right:!1};return o.columns.filter((function(e){return!i(e)&&e.fixed})).map((function(t){var n=c(t),o=e[n];return e[n]=!0,{isExist:o,colPos:n,column:t}}))}));return{fixedWrapperClass:(0,(0,he.usePrefix)().resolveClassName)("table-fixed"),resolveFixedColumnStyle:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.fixed||i(e))return{};var n={left:0,right:t?6:-1},r=c(e);return n[r]=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=a(t),l="right"===e?-1:1,s=o.columns.filter((function(e){return!i(e)})),d=s.length,f="right"===e?d*l:1,p=0;;){f+=-1*l;var v=s[Math.abs(f)],h=c(v),m=a(v);if(h===e&&r!==m&&(p+=u(v)),r===m)break}return p+n}(r,e,n[r]),l({},r,"".concat(n[r],"px"))},fixedColumns:d,resolveColumnStyle:function(t){return{width:"".concat(s[t](!1),"px"),backgroundColor:e.thead.color,bottom:"0px"}},resolveColumnClass:function(e,t,n){return{column_fixed:!!e.fixed,column_fixed_left:"right"!==e.fixed,column_fixed_right:"right"===e.fixed,shadow:"right"===e.fixed?n-t>2:t>0}}}};var Ae=O(4870),Re=O.n(Ae);function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Pe(e,t){if(e){if("string"==typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,t):void 0}}function Ve(e){return function(e){if(Array.isArray(e))return ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ie=O(8022);var De=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n<o.length;n++){var r=o[n];e.call(t,r[1],r[0])}},t}()}(),He="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,je=void 0!==O.g&&O.g.Math===Math?O.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Me="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(je):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},Fe=["top","right","bottom","left","width","height","size","weight"],ze="undefined"!=typeof MutationObserver,We=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,o=!1,r=0;function i(){n&&(n=!1,e()),o&&l()}function a(){Me(i)}function l(){var e=Date.now();if(n){if(e-r<2)return;o=!0}else n=!0,o=!1,setTimeout(a,t);r=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){He&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ze?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){He&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Fe.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Be=function(e,t){for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},Ue=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||je},qe=Ye(0,0,0,0);function Ge(e){return parseFloat(e)||0}function Ke(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Ge(e["border-"+n+"-width"])}),0)}var $e="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof Ue(e).SVGGraphicsElement}:function(e){return e instanceof Ue(e).SVGElement&&"function"==typeof e.getBBox};function Xe(e){return He?$e(e)?function(e){var t=e.getBBox();return Ye(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return qe;var o=Ue(e).getComputedStyle(e),r=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var r=o[n],i=e["padding-"+r];t[r]=Ge(i)}return t}(o),i=r.left+r.right,a=r.top+r.bottom,l=Ge(o.width),u=Ge(o.height);if("border-box"===o.boxSizing&&(Math.round(l+i)!==t&&(l-=Ke(o,"left","right")+i),Math.round(u+a)!==n&&(u-=Ke(o,"top","bottom")+a)),!function(e){return e===Ue(e).document.documentElement}(e)){var c=Math.round(l+i)-t,s=Math.round(u+a)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(s)&&(u-=s)}return Ye(r.left,r.top,l,u)}(e):qe}function Ye(e,t,n,o){return{x:e,y:t,width:n,height:o}}var Ze=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ye(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Xe(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Je=function(e,t){var n,o,r,i,a,l,u,c=(o=(n=t).x,r=n.y,i=n.width,a=n.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(l.prototype),Be(u,{x:o,y:r,width:i,height:a,top:r,right:o+i,bottom:a+r,left:o}),u);Be(this,{target:e,contentRect:c})},Qe=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new De,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Ue(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Ze(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Ue(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new Je(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),et="undefined"!=typeof WeakMap?new WeakMap:new De,tt=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=We.getInstance(),o=new Qe(t,n,this);et.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){tt.prototype[e]=function(){var t;return(t=et.get(this))[e].apply(t,arguments)}}));const nt=void 0!==je.ResizeObserver?je.ResizeObserver:tt;var ot=void 0,rt=function e(t,n,o){var r;if(null!=t)return"string"==typeof n?Object.prototype.hasOwnProperty.call(t,n)?"function"==typeof t[n]?(r=t[n]).call.apply(r,[ot].concat(Ve(o))):t[n]:void 0:Array.isArray(n)?n.map((function(n){return e(t,n,o)})).filter((function(e){return void 0!==e})).at(0):void 0},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"100%",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o="";return o=/^auto|null|undefined$/gi.test("".concat(e))?t:/^\d+\.?\d+$/.test("".concat(e))?"".concat(e,"px"):e,n&&(o="calc(".concat(o," - ").concat(n,")")),o},at=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=function(){"function"==typeof t&&t()},i="debounce"===(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"throttle")?(0,Ne.debounce)(r,n):(0,Ne.throttle)(r,n),a=new nt((function(){Reflect.apply(i,ot,[])}));return o&&"function"==typeof t&&t(),{start:function(){a.observe(e)},disconnect:function(){a.unobserve(e),a.disconnect()}}},lt=function(e){var t=e.showHead,n=e.headHeight,o=e.thead,r=void 0===o?{}:o;return Object.assign({},{isShow:t,height:n},r)},ut=function(e,t){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e?e:(0,Ne.get)(e,t)},ct=function e(t,n){return Array.isArray(t)?t:"string"==typeof t||"object"===i(t)?[t]:"function"==typeof t?e(Reflect.apply(t,ot,n),n):[]},st=function(e,t,n){return"string"==typeof t.rowKey?t.rowKey===d?"__ROW_INDEX_".concat(n):(0,Ne.get)(e,t.rowKey):"function"==typeof t.rowKey?Reflect.apply(t.rowKey,ot,[e]):null},dt=function(e,t,n){var o;return o=t,e.some((function(e){return e.field===rt(o,["field","type"],[o])}))&&n.length&&!n.includes(rt(t,["field","type"],[t]))},ft=function(e,t,n,o,r){return"function"==typeof e[r]?Reflect.apply(e[r],ot,[{column:e,colIndex:t,row:n,rowIndex:o}]):"number"==typeof e[r]?e[r]:1},pt=function(e,t,n,o){return{colspan:ft(e,t,n,o,"colspan"),rowspan:ft(e,t,n,o,"rowspan")}},vt=function(e,t){var n,o,r=e.field,i=function(e){return ut(e,r)},a="function"==typeof(null===(n=e.sort)||void 0===n?void 0:n.sortFn)?null===(o=e.sort)||void 0===o?void 0:o.sortFn:function(e,t){var n=i(e)||"",o=i(t)||"";return"number"==typeof n&&"number"==typeof o?n-o:String.prototype.localeCompare.call(n,o)};return t===P.NULL?function(e,t){return!0}:function(e,n){return a(e,n)*(t===P.DESC?-1:1)}},ht=function(e){var t,n=(l(t={},P.NULL,0),l(t,P.ASC,1),l(t,P.DESC,2),t);return void 0===n[e]?P.NULL:Object.keys(n)[(n[e]+1)%3]},mt=function(e){return"string"==typeof e?{value:e}:"boolean"==typeof e&&e?{value:P.NULL}:"object"===i(e)&&null!==e?i(e.sortFn)?Object.assign({value:"custom"},e):e:null};const gt=function(e){var t,n,o=e.settings.size,a=I[o]||I.small,u=(0,r.reactive)({data:Ve(e.data),dataSchema:new WeakMap,columns:Ve(e.columns),columnSchema:new WeakMap,settings:{size:o,height:a},layout:{hasScrollY:!1,bottom:0,translateX:0,translateY:0}}),c=function(e){var t=(0,r.ref)(0),n=(0,r.ref)(0),o=(0,r.computed)((function(){return e.data})),a=(0,r.reactive)({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});a=function(e,t){if(e){if("object"===i(e)){var n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Object.assign(Object.assign(Object.assign({},t),e),{current:n})}return t}return{}}(e.pagination,a);var l=(0,r.ref)(null),u=function(){if(!e.pagination||e.remotePagination)return t.value=0,void(n.value=o.value.length);t.value=(a.current-1)*a.limit,n.value=a.current*a.limit},c=(0,r.reactive)([]),s=function(e,t,n,o,r){"function"==typeof t&&e.sort((function(e,i){return t(e,i,o,n,r)}))},d=function(e,t){if("function"==typeof t){var n=e.filter((function(e,n){return t(e,n,o.value)}));e.length=0,e.push.apply(e,Ve(n))}return e},f=function(e,r,i,a,l){var u=o.value.slice();c.length=0,c.push.apply(c,Ve(u.slice(t.value,n.value))),d(c,e),s(c,r,i,a,l)};return e.pagination&&(l.value=e.remotePagination?a:Object.assign(Object.assign({},a),{count:o.value.length})),u(),f(),{pageData:c,indexData:o,localPagination:l,resolvePageData:f,resetStartEndIndex:u,multiFilter:function(e){var t=o.value.slice(),n=e.reduce((function(e,t){return d(e,t)}),t);c.length=0,c.push.apply(c,Ve(n))},sort:s}}(e),s=c.pageData,O=c.localPagination,_=c.resolvePageData,k=c.multiFilter,V=c.sort,D=c.resetStartEndIndex,H=(null===(t=e.settings)||void 0===t?void 0:t.checked)||[],j=(null===(n=e.settings)||void 0===n?void 0:n.fields)||[],M=function(e){return $(e,S)},F=function(){return e.acrossAll?u.data.every((function(e){return ee(e,v)})):s.every((function(e){return ee(e,v)}))},z=function(){return e.acrossAll?u.data.some((function(e){return ee(e,v)})):s.some((function(e){return ee(e,v)}))},W=[L,N,E],q=function(e){var t,n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=null!==(t=u.columnSchema.get(e))&&void 0!==t?t:{};return null!==(o=null!==(n=i[r[0]])&&void 0!==n?n:i[r[1]])&&void 0!==o?o:i[r[2]]},G=function(e){var t,n;return null!==(n=null===(t=u.columnSchema.get(e))||void 0===t?void 0:t[R])&&void 0!==n&&n},K=function(e,t,n){var o=u.columnSchema.get(e);o&&Object.prototype.hasOwnProperty.call(o,t)&&(o[t]=n)},$=function(e,t){var n;return null===(n=u.columnSchema.get(e))||void 0===n?void 0:n[t]},X=(0,r.computed)((function(){return u.columns.some((function(e){return"function"==typeof e.rowspan||/^\d$/.test("".concat(e.rowspan))||"function"==typeof e.colspan||/^\d$/.test("".concat(e.colspan))}))})),Y=function(){var e=F();Z(U,v,e),Z(U,h,!e&&z())},Z=function(e,t,n){var o=u.dataSchema.get(e);o&&Object.prototype.hasOwnProperty.call(o,t)&&(o[t]=n)},J=function(e,t){Z(e,v,t),Y()},Q=function(e,t){Z(e,p,t)},ee=function(e,t){var n;return null===(n=u.dataSchema.get(e))||void 0===n?void 0:n[t]},te=function(t){var n,o=null!=t?t:!F();e.acrossAll?u.data.forEach((function(e){return J(e,o)})):(s.forEach((function(e){return J(e,o)})),u.dataSchema.set(U,(l(n={},v,o),l(n,h,!1),n)))};return{formatColumns:function(t){var n;u.columns.length=0,(n=u.columns).push.apply(n,Ve(t)),(t||[]).forEach((function(t){if(!u.columnSchema.has(t)){var n,o=function(e,t){var n,o,r=null!==(o=mt(null!==(n=e.sort)&&void 0!==n?n:t.defaultSort))&&void 0!==o?o:{};return{type:r.value,fn:r.sortFn,scope:r.sortScope,active:!1}}(t,e),r=o.type,i=o.fn,a=o.scope,c=o.active;u.columnSchema.set(t,(l(n={},N,void 0),l(n,L,void 0),l(n,y,function(e){if(/^\d+/.test("".concat(e.minWidth)))return e.minWidth;var t=B;return e.sort&&(t+=18),e.filter&&(t+=28),t}(t)),l(n,A,new Map),l(n,E,t.width),l(n,R,dt(j,t,H)),l(n,C,r),l(n,w,i),l(n,S,void 0),l(n,"col_filter_scope",void 0),l(n,T,a),l(n,b,c),l(n,x,!1),l(n,g,(0,Ie.v4)()),n))}}))},formatDataSchema:function(t){var n,o;u.data.length=0,(n=u.data).push.apply(n,Ve(t));var r={};(t||[]).forEach((function(t,n){var o,i=function(e,t,n){var o=function(e,t,n){var o=st(e,t,n);return null!==o?o:(0,Ie.v4)()}(e,n,t);return void 0!==o&&void 0!==e[o]?e[o]:t}(t,(0,Ie.v4)(),e),a=function(e,t,n,o,r){var i;if(!X.value)return{};var a=0,c=null!==(i=o.null)&&void 0!==i?i:{};return o[t]||(o[t]={}),u.columns.forEach((function(r,i){var u,s,d=pt(r,i,e,n),f=d.colspan,p=d.rowspan,v=$(r,g),h=null!==(s=null===(u=c[v])||void 0===u?void 0:u.skipRowLen)&&void 0!==s?s:0,m=l({},v,{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0});a>0&&(m[v].skipColLen=a,m[v].skipCol=!0,a-=1),h>1?(m[v].skipRowLen=h-1,m[v].skipRow=!0):p>1&&(m[v].skipRowLen=p,m[v].skipRow=!1),f>1&&(m[v].skipColLen=f,a=f-1),Object.assign(o[t],m)})),o[t]}(t,i,n,r);u.dataSchema.has(t)||u.dataSchema.set(t,(l(o={},p,!1),l(o,v,function(t){return!!e.isRowSelectEnable&&("function"==typeof e.isSelectedFn?e.isSelectedFn({row:t}):!!Array.isArray(e.checked)&&e.checked.some((function(e){return"string"==typeof e?function(e,t){return(0,Ne.get)(e,t)}(t,e)===e:e===t})))}(t)),l(o,f,i),l(o,m,a),l(o,d,n+1),l(o,h,!1),o));var c=u.dataSchema.get(t);i=c[f],c[m]=a,c[d]=n+1})),u.dataSchema.set(U,(l(o={},v,!1),l(o,h,!1),o))},setRowSelection:J,setRowExpand:Q,setRowIndex:function(e,t){Z(e,d,t)},setColumnAttribute:K,setColumnAttributeBySettings:function(e,t){var n=t||e.checked||[],o=e.fields||[];u.columns.forEach((function(e){K(e,R,dt(o,e,n))}))},setColumnSortActive:function(t,n){e.colSortBehavior===oe.independent&&u.columns.forEach((function(e){K(e,b,!1)})),K(t,b,n)},setRowSelectionAll:function(e){te(e)},setRowIndeterminate:Y,setAllColumnAttribute:function(e,t){var n=Array.isArray(e)?e:[e],o=Array.isArray(t)?t:[t];u.columns.forEach((function(e){n.forEach((function(t,n){K(e,t,o[n])}))}))},getColumnAttribute:$,getColumnId:function(e){var t;return null===(t=u.columnSchema.get(e))||void 0===t?void 0:t[g]},getColumnOrderWidth:q,getRowSelection:function(){return u.data.filter((function(e){return ee(e,v)}))},resolveColumnWidth:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=(e.getBoundingClientRect()||{}).width-n,r=o,i=[],a=function(e,t){var n=$(e,y);if(void 0===n)return t<B?B:t;var r=t;return/^\d+\.?\d*$/.test("".concat(n))&&(r=Number(n)),/^\d+\.?\d*%$/.test("".concat(n))&&(r=Number(n)*o/100),/^\d+\.?\d*px$/i.test("".concat(n))&&(r=Number("".concat(n).replace(/px/i,""))),r},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=a(e,t),i=t<o?o:t;Object.assign(e,{calcWidth:i}),n&&(r-=i)<0&&(r=0)};if(u.columns.forEach((function(e,n){if(!G(e)){var o=String(q(e,["resizeWidth","width"])),a=!0;if(/^\d+\.?\d*(px)?$/.test(o)){var u=Number(o.replace("px",""));l(e,u),a=!1}if(/^\d+\.?\d*%$/.test(o)){var c=t;if(r>0){var s=Number(o.replace("%",""));c=r*s/100}l(e,c),a=!1}a&&i.push(n)}})),i.length>0){var c=t;r>0?i.forEach((function(e,t){c=r/(i.length-t),l(u.columns[e],c,!1);var n=$(u.columns[e],N);r-=n})):i.forEach((function(e){var t=a(u.columns[e],B);K(u.columns[e],N,t)}))}},isActiveColumn:function(e){var t,n;return null!==(n=null===(t=u.columnSchema.get(e))||void 0===t?void 0:t[R])&&void 0!==n&&n},isHiddenColumn:G,resolvePageData:_,resetStartEndIndex:D,toggleAllSelection:te,setAllRowExpand:function(e){u.data.forEach((function(t){return Q(t,null==e||e)}))},clearSelection:function(){u.data.forEach((function(e){return J(e,!1)}))},clearColumnSort:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u.columns.forEach((function(e){K(e,b,!1),K(e,S,void 0)})),e&&_()},toggleRowSelection:function(e){J(e,!ee(e,v))},getRowAttribute:ee,filter:function(){var e=u.columns.filter((function(e){return!G(e)&&"function"==typeof M(e)})).map((function(e){return M(e)}));k(e)},sortData:function(e){var t=$(e,w),n=$(e,C),o=$(e,T);n!==P.NULL?V(s,t,e,n,o):_()},isCheckedAll:F,hasCheckedRow:z,pageData:s,localPagination:O,formatData:u}},yt=function(e,t){var n,o=(0,r.reactive)(null!==(n=e.columns)&&void 0!==n?n:[]),i=function(){return o};return{initColumns:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];if(r=Array.isArray(e)?e:[e],n)r.forEach((function(e){var o=t.findIndex((function(t){return t.label===e.label&&t.field===e.field}));n&&o>=0&&t.splice(o,1)}));else{var i=!1;r.forEach((function(e){if(void 0!==e.index&&e.index>=0){i=!0;var n=t.findIndex((function(t){return t.label===e.label&&t.field===e.field}));n>=0&&t.splice(n,1),t.push(e)}else{var o=t.findIndex((function(t){return t.label===e.label&&t.field===e.field}));o>=0?t.splice(o,1,e):t.push(e)}})),i&&t.sort((function(e,t){return e.index-t.index}))}o.length=0,o.push.apply(o,Ve(r))},getColumns:i,getActiveColumn:function(){var t;if(e.colSortBehavior===oe.independent){var n=[P.ASC,P.DESC];return null===(t=i().filter((function(e){var t;return n.includes(null===(t=e.sort)||void 0===t?void 0:t.value)})))||void 0===t?void 0:t[0]}return null}}};var bt=function(e,n,i,a,u){var c,d=yt(e,n).getColumns,f=(0,r.ref)(420),p=(0,r.ref)(420),v=(0,r.ref)(420),h=(0,r.ref)(k),m=(0,r.ref)(!1),g=(0,r.computed)((function(){return e.pagination&&e.data.length})),y=(0,r.computed)((function(){return m.value})),b=(0,r.computed)((function(){var t,n,r;return(0,o.classes)((l(t={},(0,o.resolveClassName)("table"),!0),l(t,"has-footer",g.value),l(t,"has-scroll-y",m.value||e.virtualEnabled),l(t,(0,o.resolveClassName)("table-flex"),e.isFlex),t),(r=["row"],"string"==typeof(n=e.border)&&r.push(n),Array.isArray(n)&&r.push.apply(r,Ve(n.filter((function(e){return s.includes(e)})))),Ve(new Set(r)).map((function(e){return"bordered-".concat(e)})).join(" ")))})),C=(0,o.classes)((l(c={},(0,o.resolveClassName)("table-head"),!0),l(c,"has-settings",!!e.settings),c)),w=(0,r.computed)((function(){return d()})),T=lt(e),O=(0,r.computed)((function(){return{"--row-height":"".concat(rt(T,"height",["thead"]),"px"),"--scroll-head-left":"-".concat(a.formatData.layout.translateX,"px"),"--scroll-left":"".concat(a.formatData.layout.translateX,"px")}})),_=l({},(0,o.resolveClassName)("table-body"),!0),S=(0,r.computed)((function(){var t;return(0,o.classes)((l(t={},(0,o.resolveClassName)("table-footer"),!0),l(t,"is-hidden",!e.pagination||!e.data.length),t))})),x=function(){if(w.value.every((function(e){return/^\d+\.?\d*(px)?$/gi.test("".concat(e.width))}))){var e=w.value.reduce((function(e,t){return e+Number("".concat(t.width).replace(/px/gi,""))}),0),t=m.value?6:0;return"".concat(e+t,"px")}return"100%"},E=(0,r.computed)((function(){return{minHeight:it(e.minHeight,"auto"),width:x()||"100%",maxWidth:"100%",height:"number"===e.height?"".concat(e.height,"px"):"string"==typeof e.height?e.height:""}})),N=function(e,t){var n=String(e);return/^\d+\.?\d*$/.test(n)?parseFloat(n):/^\d+\.?\d*px$/gi.test(n)?parseFloat(n.replace("px","")):/^\d+\.?\d*%$/gi.test(n)?"number"==typeof t?t*parseFloat(n.replace("%",""))/100:n:null!=t?t:e},L=(0,r.reactive)({display:"",minHeight:"",height:"",maxHeight:""}),A=function(t){var n,r,i;if(e.showHead){if(!t)return null!==(n=N(e.headHeight,k))&&void 0!==n?n:0;var a=(0,o.resolveClassName)("table-head"),l=t.querySelector(a);return null!==(i=null!==(r=null==l?void 0:l.offsetHeight)&&void 0!==r?r:N(e.headHeight,k))&&void 0!==i?i:0}return 0},R=function(e,t,n){if(/%$/.test("".concat(e)))return"calc(".concat(e," - ").concat(t+n,"px)");if("number"==typeof e){var o=e-t-n;return"".concat(o>0?o:0,"px")}return e};(0,r.onMounted)((function(){P(null==i?void 0:i.value)}));var P=function(t){var n,r;if(t){var i=A(t),a=".".concat((0,o.resolveClassName)("table-body-content")," > table"),l=".".concat((0,o.resolveClassName)("table-body")),c=t.querySelector(l),s=t.querySelector(a);!function(t){var n=N(e.height);h.value=A(t);var o=N(e.minHeight,f.value),r=e.pagination&&e.data.length?e.paginationHeight:0,i=R(n,h.value,r),a=o-h.value-r,l=function(t,n){return/^\d+\.?\d*$/.test(t)?"".concat(t,"px"):(o=N(e.maxHeight),R(o,h.value,r));var o}(n);L.display=!!(null==u?void 0:u.length)&&"block",L.minHeight="".concat(a,"px"),L.height=i,L.maxHeight=l}(t),v.value=(null!==(n=null==c?void 0:c.offsetHeight)&&void 0!==n?n:420)+i,p.value=(null!==(r=null==s?void 0:s.offsetHeight)&&void 0!==r?r:420)+i,V(t)}},V=function(t){if(t){var n=e.virtualEnabled?".".concat((0,o.resolveClassName)("virtual-section")):".".concat((0,o.resolveClassName)("table-body-content")),r=t.querySelector(".".concat((0,o.resolveClassName)("table-body")));m.value=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e){var o=e.querySelector(t);if(o)return o.offsetHeight>e.offsetHeight-n}return!1}(r,n,0)}},I=(0,r.computed)((function(){return Object.assign(Object.assign({},_),{"__is-empty":!a.pageData.length})})),D=(0,r.computed)((function(){var t;return l(t={},(0,o.resolveClassName)("table-body-content"),!0),l(t,(0,o.resolveClassName)("stripe"),e.stripe),l(t,"with-virtual-render",e.virtualEnabled),t})),H=(0,r.computed)((function(){var t;return l(t={},(0,o.resolveClassName)("fixed-bottom-border"),!0),l(t,"_is-empty",!e.data.length),t})),j=(0,r.computed)((function(){return{"--footer-height":g.value?"".concat(e.paginationHeight,"px"):"0"}})),M=(0,r.computed)((function(){return Object.assign({right:y.value?"".concat(6,"px"):0,"--fix-height":"".concat(p.value,"px"),"--fix-max-height":"".concat(v.value,"px")},j.value)})),F=(0,r.computed)((function(){return e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}})),z=(0,r.computed)((function(){return Object.assign({"--prepend-left":"".concat(a.formatData.layout.translateX,"px"),position:"sticky",top:0,zIndex:2},e.prependStyle||{})}));return{tableClass:b,headClass:C,contentClass:_,footerClass:S,wrapperStyle:E,contentStyle:L,headStyle:O,fixHeight:p,maxFixHeight:v,resetTableHeight:P,updateBorderClass:V,getColumnsWidthOffsetWidth:function(){var n=0;return m.value&&(n+=6),e.border.includes(t.OUTER)&&!e.border.includes(t.NONE)&&(n+=2),n},hasFooter:g,hasScrollY:m,hasScrollYRef:y,tableBodyClass:I,tableBodyContentClass:D,resizeColumnClass:{column_drag_line:!0,"offset-x":!0},loadingRowClass:{"scroll-loading":!0,_bottom:!0},fixedBottomBorder:H,columnGhostStyle:{zIndex:-1,width:0,height:0,display:"none"},fixedContainerStyle:M,scrollClass:F,prependStyle:z,footerStyle:j}},Ct=O(6064),wt=O(5800),Tt=O.n(wt),Ot=O(6870),_t=O(5801),St=O.n(_t),xt=O(4061);const Et=(0,r.defineComponent)({name:"TableCell",props:{column:re,row:o.PropTypes.any.def({}),parentSetting:ee,title:o.PropTypes.string.def(void 0),observerResize:o.PropTypes.bool.def(!0),isHead:o.PropTypes.bool.def(!1),headExplain:o.PropTypes.string,resizerWay:(0,q.toType)("ResizerWay",{default:J.DEBOUNCE})},setup:function(e,t){var n=this,a=t.slots,l=(0,r.ref)(),u=(0,r.ref)(!1),c=(0,r.computed)((function(){return{textAlign:e.column.textAlign}})),s=function(){if(/boolean|object/.test(i(e.column.showOverflowTooltip))&&null!==e.column.showOverflowTooltip){var t={showOverflowTooltip:{content:"",disabled:!e.column.showOverflowTooltip,mode:void 0,resizerWay:void 0,watchCellResize:void 0,popoverOption:{}}};return null!==e.parentSetting&&"object"===i(e.parentSetting)&&(Object.assign(t.showOverflowTooltip,e.parentSetting),Object.assign(t.showOverflowTooltip,{disabled:!e.column.showOverflowTooltip}),"object"===i(e.column.showOverflowTooltip)&&Object.assign(t.showOverflowTooltip,e.column.showOverflowTooltip)),t}return{showOverflowTooltip:e.parentSetting}}().showOverflowTooltip,d=void 0!==s&&s,f=null,p=function(){var t,o=!0,r=e.resizerWay,a=l.value.innerText,u={},c="auto",s=!0;return"boolean"==typeof d&&(o=!d),"object"===i(d)&&(o=d.disabled,u=d.popoverOption,r=d.resizerWay||"debounce",a=d.content||l.value.innerText,"function"==typeof d.content&&(a=d.content(e.column,e.row)),s=d.watchCellResize,c=d.mode||"auto"),"function"==typeof o&&(o=Reflect.apply(o,n,[e.column,e.row])),e.isHead&&(o=!1,c="auto",a=null===(t=v())||void 0===t?void 0:t.innerHTML,e.headExplain&&(c="static",a=e.headExplain)),e.column.explain&&(o=!1,c="static","object"===i(e.column.explain)&&(a=rt(e.column.explain,"content",[e.column,e.row]))),{disabled:o,content:a,mode:c,resizerWay:r,watchCellResize:s,popoverOption:u}},v=function(){var t,n;return e.isHead?null===(n=null===(t=l.value)||void 0===t?void 0:t.querySelector)||void 0===n?void 0:n.call(t,".head-text"):l.value},h=function(){var e=v();if(e&&(0,o.isElement)(e)){var t=p(),n=t.mode,i=t.disabled;if(u.value=!i,"auto"===n&&(u.value=(0,o.hasOverflowEllipsis)(e)),"static"===n&&(u.value=!0),u.value){var a=(0,r.ref)(p());null===f&&(f=(0,xt.bkEllipsisInstance)(e,{disabled:a.value.disabled,content:a.value.content,mode:a.value.mode,popoverOption:a.value.popoverOption}))}else null==f||f.destroyInstance(e),f=null}};(0,r.onMounted)((function(){var t=p(),n=t.disabled,o=t.resizerWay,i=t.watchCellResize;if(!n&&(h(),!1!==i&&e.observerResize)){var a=at(l.value,(function(){h()}),60,!0,o);a.start(),(0,r.onBeforeUnmount)((function(){a.disconnect(),a=null}))}})),(0,r.onBeforeUnmount)((function(){null==f||f.destroyInstance(l.value)}));var m=e.headExplain||e.column.explain;return function(){var t;return(0,r.createVNode)("div",{class:["cell",e.column.type,m?"explain":""],style:c.value,ref:l,title:e.title},[null===(t=a.default)||void 0===t?void 0:t.call(a)])}}}),Nt=(0,r.defineComponent)({name:"TableRow",render:function(){var e,t;return(0,r.createVNode)(r.Fragment,null,[null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)])}});var Lt=O(9911),At=O.n(Lt);const Rt=(0,r.defineComponent)({name:"BodyEmpty",props:{list:o.PropTypes.array.def([]),filterList:o.PropTypes.array.def([]),emptyText:o.PropTypes.string},emits:["change"],setup:function(e){var t=(0,he.useLocale)("table"),n=(0,r.computed)((function(){return void 0===e.emptyText?t.value.emptyText:e.emptyText})),o=(0,r.computed)((function(){return 0===e.list.length?"empty":"search-empty"}));return function(){return(0,r.createVNode)(At(),{scene:"part",type:o.value,description:n.value},null)}}});var kt=O(5537),Pt=O.n(kt);const Vt=(0,r.defineComponent)({name:"HeadFilter",props:{column:re,height:o.PropTypes.number.def(k)},emits:["change","filterSave"],setup:function(e,t){var n=t.emit,i=(0,he.usePrefix)().resolveClassName,a=(0,he.useLocale)("table"),u=e.column,c=(0,r.toRefs)(e.column).filter,s=(0,r.computed)((function(){var e,t;return null!==(t=null===(e=c.value)||void 0===e?void 0:e.checked)&&void 0!==t?t:[]})),d=(0,r.reactive)({isOpen:!1,checked:s.value}),f=(0,r.computed)((function(){var e,t;return null!==(t=null===(e=c.value)||void 0===e?void 0:e.maxHeight)&&void 0!==t?t:630}));(0,r.watch)((function(){return c.value}),(function(){d.checked=s.value}),{immediate:!0,deep:!0});var p=(0,r.computed)((function(){var t;return(0,o.classes)((l(t={},i("table-head-action"),!0),l(t,"column-filter",!0),l(t,"--row-height","".concat(e.height,"px")),l(t,"active",d.checked.length),l(t,"opened",d.isOpen),t))})),v=(0,o.classes)(l({},i("table-head-filter"),!0)),h=(0,r.ref)(null),m=function(e){d.isOpen=e,e&&setTimeout((function(){h.value.reset()}))},g="light ".concat(i("table-head-filter")),y=(0,r.computed)((function(){var e=c.value.list;return void 0===e?[]:e})),b="function"==typeof c.value.filterFn?function(t,n,o,r){return c.value.filterFn(t,n,e.column,o,r)}:function(e,t){return!e.length||function(e,t){var n=c.value.match,o=ut(t,rt(u,"field",[u,t]));return"full"===n?e.includes(o):e.some((function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ig";return new RegExp("".concat(e).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t)}(e,"img").test(o)}))}(e,t)},C=function(){w(!0),n("filterSave",d.checked),d.isOpen=!1},w=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(O(S,a.value.confirm).disabled||e){if("custom"===c.value)return n("change",d.checked,null),void(d.isOpen=!1);c.value.checked=d.checked,n("change",d.checked,b)}},T=function(){d.checked.length&&(d.checked.length=0,d.isOpen=!1,(0,r.nextTick)((function(){return n("change",d.checked,b)})))},O=function(e,t){return{disabled:"disabled"===e||!1===e,text:"string"==typeof e?e:t}},_=c.value,S=_.btnSave,x=_.btnReset,E=function(){var e=O(x,a.value.reset),t=e.disabled,n=e.text;return t?"":(0,r.createVNode)("span",{class:["btn-filter-reset",d.checked.length?"":"disable"],onClick:T},[n])},N=function(e){return e.data.length?e.data.map((function(e){return(0,r.createVNode)("div",{class:"list-item"},[(0,r.createVNode)(Tt(),{label:e.value,key:e.$index,immediateEmitChange:!1,checked:d.checked.includes(e.value),modelValue:d.checked.includes(e.value),onChange:function(t){return function(e,t){var n,o=new Set(d.checked);e?o.add(t.value):o.delete(t.value),d.checked.length=0,(n=d.checked).push.apply(n,Ve(Array.from(o))),w()}(t,e)}},{default:function(){return["".concat(e.text)]}})])})):(0,r.createVNode)("div",{class:"list-item is-empty"},[a.value.emptyText])};return function(){return(0,r.createVNode)(Pt(),(0,r.mergeProps)({trigger:"click",isShow:d.isOpen,placement:"bottom-start",renderType:o.RenderType.SHOWN,arrow:!1,offset:0},{theme:g},{onAfterShow:function(){return m(!0)},onAfterHidden:function(){return m(!1)}}),{default:function(){return(0,r.createVNode)(Ot.Funnel,{class:p.value},null)},content:function(){return(0,r.createVNode)("div",{class:v},[(0,r.createVNode)(wt.BkCheckboxGroup,{class:"content-list"},{default:function(){return[(0,r.createVNode)(ge(),{maxHeight:f.value,lineHeight:32,list:y.value,throttleDelay:0,scrollEvent:!0,ref:h,className:"content-items"},{default:N})]}}),(0,r.createVNode)("div",{class:"content-footer"},[(e=O(S,a.value.confirm),t=e.disabled,n=e.text,t?(0,r.createVNode)("span",{class:"btn-filter-save disabled"},[n]):(0,r.createVNode)("span",{class:"btn-filter-save",onClick:C},[n])),(0,r.createVNode)("span",{class:"btn-filter-split"},null),E()])]);var e,t,n}})}}});var It=O(7685);const Dt=(0,r.defineComponent)({name:"HeadSort",props:{column:re,defaultSort:o.PropTypes.oneOf(W).def(P.NULL),active:o.PropTypes.bool},emits:["change"],setup:function(e,t){var n,o,i=t.emit,a=(0,he.usePrefix)().resolveClassName,l=(null===(o=null===(n=e.column)||void 0===n?void 0:n.sort)||void 0===o?void 0:o.value)||e.defaultSort||P.NULL,u=(0,r.ref)(l);(0,r.watch)((function(){return[e.defaultSort]}),(function(e){var t,n,o=(t=e,n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(t,n)||Pe(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];u.value=o}));var c=function(t,n){var o;t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault();var r=n;n===P.NULL&&(r=ht(n)),u.value===n&&(r=P.NULL);var a=vt(e.column,r),l=mt(e.column.sort);"custom"!==(null==l?void 0:l.value)?i("change",a,r):i("change",null!==(o=null==l?void 0:l.sortFn)&&void 0!==o?o:a,r)};return function(){return(0,r.createVNode)("span",{class:a("head-cell-sort")},[(0,r.createVNode)(It.AngleDownFill,{class:["sort-action","sort-asc",u.value===P.ASC?"active":""],style:"align-items: flex-end;",onClick:function(e){return c(e,P.ASC)}},null),(0,r.createVNode)(It.AngleUpFill,{class:["sort-action","sort-desc",u.value===P.DESC?"active":""],style:"align-items: flex-start;",onClick:function(e){return c(e,P.DESC)}},null)])}}});var Ht=O(4976),jt=O.n(Ht);function Mt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}const Ft=(0,r.defineComponent)({name:"Settings",props:{settings:ie,columns:o.PropTypes.arrayOf(re).def([]),rowHeight:se.def(k)},emits:["change"],setup:function(e,t){var n=t.emit,o=t.slots,i=(0,he.usePrefix)().resolveClassName,a=(0,he.useLocale)("table"),l=function(e){return[{value:"small",label:e.value.setting.lineHeight.small,height:I.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:I.medium},{value:"large",label:e.value.setting.lineHeight.large,height:I.large}]}(a),u=function(e,t){return rt(e,["id","field","type"],[e,t])},c=(0,r.ref)(!1),s=(0,r.ref)(!1),d=(0,r.computed)((function(){return"boolean"==typeof e.settings?{fields:e.columns.map((function(e){return Object.assign({},e,{field:e.field||e.type})})),checked:[],limit:0,size:I.small,sizeList:l,showLineHeight:!0}:e.settings})),f=(0,r.ref)(d.value.size||"small"),p=(0,r.ref)(e.rowHeight),v=(0,r.ref)(d.value.checked||[]),h=i("table-settings"),m="light ".concat(h),g=(0,r.computed)((function(){return d.value.fields||e.columns||[]})),y={checkAll:c.value,activeSize:f.value,activeHeight:p.value,checkedFields:d.value.checked||[]},b=function(){Object.assign(y,{checkAll:c.value,activeSize:f.value,activeHeight:p.value,checkedFields:v.value}),n("change",{checked:v.value,size:f.value,height:p.value,fields:(0,r.unref)(g)}),s.value=!1},C=function(){c.value=y.checkAll,f.value=y.activeSize,p.value=y.activeHeight,v.value=y.checkedFields,s.value=!1},w=function(){s.value=!0},T=function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),c.value=!c.value;var n=d.value.fields||e.columns||[],o=n.filter((function(e,t){return e.disabled&&v.value.includes(u(e,t))})).map((function(e,t){return u(e,t)}));if(c.value){var r,i=n.filter((function(e){return!e.disabled})).map((function(e,t){return u(e,t)}));(r=v.value).splice.apply(r,[0,v.value.length].concat(Ve(i),Ve(o)))}else{var a;(a=v.value).splice.apply(a,[0,v.value.length].concat(Ve(o)))}},O=(0,r.computed)((function(){var e;return(null!==(e=d.value.limit)&&void 0!==e?e:0)>0})),_=d.value.sizeList||l,S=(0,r.computed)((function(){return O.value&&(d.value.limit?d.value.limit:0)<=v.value.length})),x=function(e,t){return e.disabled||S.value&&!v.value.includes(u(e,t))},E=function(e){return{"line-size":!0,"is-medium":"medium"===f.value,active:e.value===f.value}},N={marginRight:"12px"},L=(0,r.computed)((function(){return v.value.length>0&&!g.value.every((function(e,t){return v.value.includes(rt(e,"field",[e,t]))}))})),A=(0,r.computed)((function(){return"boolean"!=typeof d.value.showLineHeight||d.value.showLineHeight}));return(0,r.watch)((function(){return[v.value]}),(function(){v.value.length||(c.value=!1),v.value.length&&g.value.every((function(e,t){return v.value.includes(u(e,t))}))&&(c.value=!0)}),{immediate:!0,deep:!0}),(0,r.watch)((function(){return[e.settings.checked]}),(function(){var e;(e=v.value).splice.apply(e,[0,v.value.length].concat(Ve(d.value.checked)))}),{immediate:!0,deep:!0}),function(){return e.settings?(0,r.createVNode)(Pt(),(0,r.mergeProps)({trigger:"manual",isShow:s.value,placement:"bottom-end",arrow:!0},{theme:m}),{default:function(){return(0,r.createVNode)("span",{class:"table-head-settings",onClick:w},[(0,r.createVNode)(It.CogShape,{style:"color: #c4c6cc;"},null)])},content:function(){var e,t;return(0,r.createVNode)("div",{class:"setting-content"},[(0,r.createVNode)("div",{class:"setting-head"},[(0,r.createVNode)("span",{class:"head-title"},[a.value.setting.title]),(0,r.createVNode)(It.CloseLine,{class:"icon-close-action",onClick:C},null)]),(0,r.createVNode)("div",{class:"setting-body"},[(0,r.createVNode)("div",{class:"setting-body-title"},[(0,r.createVNode)("div",null,[(0,r.createVNode)("span",{class:"field-setting-label"},[a.value.setting.fields.title]),O.value?(0,r.createVNode)("span",{class:"limit"},[a.value.setting.fields.subtitle(d.value.limit)]):""]),O.value?"":(0,r.createVNode)("span",{class:"check-all",onClick:T},[(0,r.createVNode)(Tt(),{label:a.value.setting.fields.selectAll,indeterminate:Boolean(L.value),modelValue:v.value.length>0},{default:function(){return[a.value.setting.fields.selectAll]}})])]),(0,r.createVNode)(wt.BkCheckboxGroup,{class:"setting-body-fields",modelValue:v.value,"onUpdate:modelValue":function(e){return v.value=e}},Mt(e=g.value.map((function(e,t){var n;return(0,r.createVNode)("div",{class:"field-item"},[(0,r.createVNode)(Tt(),{checked:v.value.includes(u(e,t)),label:u(e,t),disabled:x(e,t)},Mt(n=rt(e,["name","label"],[e,t]))?n:{default:function(){return[n]}})])})))?e:{default:function(){return[e]}}),null===(t=o.default)||void 0===t?void 0:t.call(o),A.value?(0,r.createVNode)("div",{class:"setting-body-line-height"},[a.value.setting.lineHeight.title,(0,r.createTextVNode)(":"),_.map((function(e){return(0,r.createVNode)("span",{class:E(e),onClick:function(){return function(e){f.value=e.value,p.value=e.height}(e)}},[e.label])}))]):""]),(0,r.createVNode)("div",{class:"setting-footer"},[(0,r.createVNode)(jt(),{theme:"primary",style:N,onClick:b},{default:function(){return[a.value.setting.options.ok]}}),(0,r.createVNode)(jt(),{style:N,onClick:C},{default:function(){return[a.value.setting.options.cancel]}})])])}}):""}}});function zt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}const Wt=function(e,t,n,a){var c=(0,Ct.useLocale)("table"),s=(0,Ie.v4)(),b=(0,r.computed)((function(){return n.formatData})),T=(0,r.computed)((function(){return b.value.columns})),O=(0,r.computed)((function(){return b.value.settings})),_=(0,r.computed)((function(){return T.value.filter((function(e){return!n.getColumnAttribute(e,R)}))})),E=function(t,n){var o=O.value,r=o.size;return null!=o.height?rt(O.value,"height",["tbody",t,n,r]):rt(e,"rowHeight",["tbody",t,n])},N=function(e,t,o,r){return"index"===e.type?t(n.getRowAttribute(o,d),n.getRowAttribute(r,d)):t(o,r)},L=function(e,t){var n=e.className;if(n){if("function"==typeof n)return n(t);if("string"==typeof n)return n}return""},k=function(o){var i=Le(e,n).resolveFixedColumnStyle,a=o.length;return(0,r.createVNode)("tbody",null,[o.map((function(l,u){var c=[].concat(Ve(ct(e.rowStyle,[l,u])),[{"--row-height":"".concat(E(l,u),"px")}]),s=[].concat(Ve(ct(e.rowClass,[l,u])),["hover-".concat(e.rowHover),u%2==1&&e.stripe?"stripe-row":""]);return[(0,r.createVNode)(Nt,null,{default:function(){return[(0,r.createVNode)("tr",{style:c,class:s,key:st(l,e,u),onClick:function(e){return H(e,l,u,o)},onDblclick:function(e){return j(e,l,u,o)},onMouseenter:function(e){return M(e,l,u,o)},onMouseleave:function(e){return F(e,l,u,o)}},[_.value.map((function(c,s){var d,f=[i(c)].concat(Ve(ct(e.cellStyle,[c,s,l,u]))),v={"expand-cell":"expand"===c.type},h=pt(c,s,l,u),y=h.colspan,b=h.rowspan,C=n.getRowAttribute(l,m),w=n.getColumnAttribute(c,g),T=null!==(d=null==C?void 0:C[w])&&void 0!==d?d:{},O=T.skipRow,_=void 0!==O&&O,S=T.skipCol;if(!(_||void 0!==S&&S)){var x,E=[I(c,s),L(c,l),c.align||e.align].concat(Ve(ct(e.cellClass,[c,s,l,u])),[{"expand-row":n.getRowAttribute(l,p),"is-last":u+b>=a}]),N=function(e,n){var r={event:e,row:l,column:c,cell:{getValue:function(){return B(l,c,u,o)}},rowIndex:u,columnIndex:s};t.emit(n,r)};return(0,r.createVNode)("td",{class:E,style:f,colspan:y,rowspan:b,onClick:function(e){return N(e,Te.CELL_CLICK)},onDblclick:function(e){return N(e,Te.CELL_DBL_CLICK)}},[(0,r.createVNode)(Et,{class:v,column:c,row:l,parentSetting:e.showOverflowTooltip,observerResize:e.observerResize},zt(x=B(l,c,u,o))?x:{default:function(){return[x]}})])}return null}))])]}}),P(l,s,u)]}))])},P=function(e,o,i){var a,l,u;if(n.getRowAttribute(e,p)){var c=[].concat(Ve(o),[{row_expend:!0}]),s=n.getRowAttribute(e,f),d="".concat(s,"_expand");return(0,r.createVNode)(Nt,{key:d},{default:function(){return[(0,r.createVNode)("tr",{class:c},[(0,r.createVNode)("td",{colspan:_.value.length,rowspan:1},[null!==(u=null===(l=(a=t.slots).expandRow)||void 0===l?void 0:l.call(a,e))&&void 0!==u?u:(0,r.createVNode)("div",{class:"expand-cell-ctx"},[(0,r.createTextVNode)("Expand Row")])])])]}})}},I=function(e,t){var n;return l(n={},"".concat(s,"-column-").concat(t),!0),l(n,"column_fixed",!!e.fixed),l(n,"column_fixed_left",!!e.fixed),l(n,"column_fixed_right","right"===e.fixed),l(n,"".concat(e.className),!0),n},D=function(e,t){return Object.assign({},I(e,t))},H=function(e,n,o,r){t.emit(Te.ROW_CLICK,e,n,o,r)},j=function(e,n,o,r){t.emit(Te.ROW_DBL_CLICK,e,n,o,r)},M=function(e,n,o,r){t.emit(Te.ROW_MOUSE_ENTER,e,n,o,r)},F=function(e,n,o,r){t.emit(Te.ROW_MOUSE_LEAVE,e,n,o,r)},z=function(e,t,n,o){var r=ut(e,rt(t,"field",[t,e])),i=e;return t.render({cell:r,data:i,row:e,column:t,index:n,rows:o})},W=function(o,i){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.getRowAttribute(o,h),u=n.getRowAttribute(o,v),c=function(e,t){var n=t.row,o=t.index,r=t.isCheckAll;return"boolean"==typeof e.isRowSelectEnable?!1!==e.isRowSelectEnable:"function"!=typeof e.isRowSelectEnable||e.isRowSelectEnable({row:n,index:o,isCheckAll:r})}(e,{row:o,index:i,isCheckAll:a});return(0,r.createVNode)(Tt(),{onChange:function(r){if(a)return n.setRowSelectionAll(r),void t.emit(Te.ROW_SELECT_ALL,{checked:r,data:e.data});n.setRowSelection(o,r),t.emit(Te.ROW_SELECT,{row:o,index:i,checked:r,data:e.data})},disabled:!c,modelValue:u,indeterminate:l},null)},B=function(o,a,l,u){var c,s,f={expand:function(e,o,i,a){return function(e,o,i,a){var l,u,c;return(0,r.createVNode)("span",{class:"expand-btn-action",onClick:function(r){return function(e,o,r,i,a){n.setRowExpand(e,!n.getRowAttribute(e,p)),t.emit(Te.ROW_EXPAND_CLICK,{row:e,column:o,index:r,rows:i,e:a})}(e,o,i,a,r)}},["function"==typeof o.render?z(e,o,i,a):null!==(c=null===(u=(l=t.slots).expandCell)||void 0===u?void 0:u.call(l,{row:e,column:o,index:i,rows:a}))&&void 0!==c?c:function(e){return n.getRowAttribute(e,p)?(0,r.createVNode)(Ot.DownShape,null,null):(0,r.createVNode)(Ot.RightShape,null,null)}(e)])}(e,o,i,a)},selection:function(e,t,n,o){return W(e,n)}};return null!==(s=null===(c=f[a.type])||void 0===c?void 0:c.call(f,o,a,l,u))&&void 0!==s?s:function(){if("index"===rt(a,"type",[a,o]))return n.getRowAttribute(o,d);var t=rt(a,"field",[a,o]),c=ut(o,t);if("function"==typeof a.render)return z(o,a,l,u);if("boolean"==typeof c)return String(c);if(!c&&"number"!=typeof c){var s=e.emptyCellText;if(s)return"function"==typeof s?s(o,a,l,u):s}return"object"===i(c)?JSON.stringify((0,r.unref)(c)):c}()},q=function(){return(0,r.createVNode)("colgroup",null,[(_.value||[]).map((function(e,t){var i,a=(0,o.classes)({}),l="".concat((i=n.getColumnOrderWidth(e),it(i,"auto"))).replace(/px$/i,""),u=n.getColumnAttribute(e,y);return(0,r.createVNode)("col",{class:a,width:l,style:{minWidth:it(u,"auto")}},null)}))])};return{renderTableHeadSchema:function(){var o,i,c,s,d,f,p,v,h=lt(e).isShow;return void 0===h||h?[e.settings?(0,r.createVNode)(Ft,{class:"table-head-settings",settings:e.settings,columns:T.value,rowHeight:e.rowHeight,onChange:function(o){var r=o.checked,i=void 0===r?[]:r,a=o.size,l=o.height,u=o.fields;n.formatData.settings.size=a,n.formatData.settings.height=l,i.length&&n.setColumnAttributeBySettings(e.settings,i),t.emit(Te.SETTING_CHANGE,{checked:i,size:a,height:l,fields:u})}},{default:function(){return[null===(i=(o=t.slots).setting)||void 0===i?void 0:i.call(o)]}}):"",(0,r.createVNode)("table",{cellpadding:0,cellspacing:0},[q(),(c=lt(e),s=c.cellFn,d={"--row-height":"".concat(rt(c,"height",["thead"]),"px"),backgroundColor:e.thead.color},f=function(o,i){if("selection"===o.type)return W(U,null,!0);var a=[];o.sort&&a.push(function(e,o){var i=n.getColumnAttribute(e,C);return(0,r.createVNode)(Dt,{column:e,defaultSort:i,onChange:function(r,i){n.setColumnAttribute(e,C,i),n.setColumnAttribute(e,w,(function(t,n){return N(e,r,t,n)})),n.sortData(e),t.emit(Te.COLUMN_SORT,{column:e,index:o,type:i})}},null)}(o,i)),o.filter&&a.push(function(o,i){return(0,r.createVNode)(Vt,{column:o,height:e.headHeight,onChange:function(e,a){n.setColumnAttribute(o,S,(function(t,n){return a(e,t,n)})),n.filter(),t.emit(Te.COLUMN_FILTER,{checked:e,column:(0,r.unref)(o),index:i})},onFilterSave:function(e){t.emit(Te.COLUMN_FILTER_SAVE,{column:o,values:e})}},null)}(o,i));var l=function(e,t){return"function"==typeof s?s(e,t):"function"==typeof e.renderHead?e.renderHead(e,t):rt(e,"label",[e,t])}(o,i);a.unshift((0,r.createVNode)("span",{class:"head-text"},[l]));var u="string"==typeof l?l:void 0,c={"has-sort":!!o.sort,"has-filter":!!o.filter};return(0,r.createVNode)(Et,{class:c,title:u,observerResize:e.observerResize,resizerWay:e.resizerWay,isHead:!0,column:o,parentSetting:e.showOverflowTooltip,headExplain:rt(o.explain,"head",[o])},zt(a)?a:{default:function(){return[a]}})},p=Le(e,n).resolveFixedColumnStyle,v=function(){if(a.value.hasScrollY){var e={width:"".concat(8,"px"),right:"-1px"};return(0,r.createVNode)("th",{style:e,class:"column_fixed"},null)}},(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("thead",{style:d},[(0,r.createVNode)(Nt,null,{default:function(){return[(0,r.createVNode)("tr",null,[_.value.map((function(o,i){var c,s,d,v,h=Object.assign({},p(o,a.value.hasScrollY),{"--background-color":V[null!==(s=null===(c=e.thead)||void 0===c?void 0:c.color)&&void 0!==s?s:u.DEF1]});return(0,r.createVNode)("th",(0,r.mergeProps)({colspan:1,rowspan:1,class:[D(o,i),L(o),o.align||e.headerAlign||e.align],style:h,onClick:function(){return function(e,o){if(!n.getColumnAttribute(o,x)&&o.sort&&!o.filter){var i=n.getColumnAttribute(o,C),a=ht(i);n.setColumnAttribute(o,C,a),n.setColumnAttribute(o,w,(function(e,t){return N(o,vt(o,a),e,t)})),n.sortData(o),t.emit(Te.COLUMN_SORT,{column:(0,r.unref)(o),index:e,type:a})}}(i,o)}},(d=o,(v=n.getColumnAttribute(d,A))?Array.from(null==v?void 0:v.keys()).reduce((function(e,t){var n=t.split("_").slice(-1)[0];return Object.assign(e,l({},n,(function(e){v.get(t).forEach((function(t){return Reflect.apply(t,void 0,[e,d])}))})))}),{}):{})),[f(o,i)])})),v()])]}})])]))])]:null},renderTableBodySchema:function(n){var o,i,a,l=(0,r.computed)((function(){return void 0===e.emptyText?c.value.emptyText:e.emptyText}));return n.length?(0,r.createVNode)("table",{cellpadding:0,cellspacing:0,"data-table-uuid":s},[q(),k(n)]):null!==(a=null===(i=(o=t.slots).empty)||void 0===i?void 0:i.call(o))&&void 0!==a?a:(0,r.createVNode)(Rt,{filterList:n,list:e.data,emptyText:l.value},null)},renderTableFooter:function(n){return(0,r.createVNode)(St(),(0,r.mergeProps)({style:"width: 100%;"},n,{modelValue:n.current,onLimitChange:function(n){return function(n){Object.assign(e.pagination,{limit:n}),t.emit(Te.PAGE_LIMIT_CHANGE,n)}(n)},onChange:function(n){return function(n){Object.assign(e.pagination,{current:n,value:n}),t.emit(Te.PAGE_VALUE_CHANGE,n)}(n)}}),null)}}},Bt=(0,r.defineComponent)({name:"Table",props:fe,emits:Ee,setup:function(e,t){var n=(0,r.ref)(),a=(0,r.ref)(),u=(0,r.ref)(),c=(0,r.ref)(0),s=new Oe,d=(0,r.reactive)([]),f=yt(e,d),p=f.initColumns,v=(0,f.getColumns)(),h=gt(e),m=function(e){var t,n,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,a=e.formatData,u=e.getColumnAttribute,c=e.getColumnOrderWidth,s=e.setColumnAttribute,d=function(e){return u(e,A)};!function(e){e.MOUSE_MOVE="onMousemove",e.MOUSE_OUT="onMouseout",e.MOUSE_DOWN="onMousedown"}(n||(n={}));var f=!1,p=!1,v=!1,h=0,m=null,g=0,b=(0,r.ref)(-1e3),C=[L,N],w=function(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault()},T=function t(n){var o;w(n),p=!1,v=!1,document.body.style.cursor="";var r=n.clientX-h,a=c(m,C)+r,l=c(m,[y]);s(m,L,a>l?a:l),setTimeout((function(){return e.setAllColumnAttribute(x,!1)})),document.removeEventListener("mouseup",t),document.removeEventListener("mousemove",_),h=0,b.value=-1e3,m=null;var u=null===(o=i.value)||void 0===o?void 0:o.querySelector("table");null==u||u.querySelectorAll("th").forEach((function(e){return e.style.setProperty("user-select","inherit")}))},O=function(e){return(0,Ne.throttle)((function(){var t=e.clientX-h,n=c(m,C)+t;c(m,[y])<n&&(b.value=e.clientX-h+g)}),60)},_=function(e){document.body.style.setProperty("cursor",""),O(e)(),w(e)},S=function e(t,n){var o,r;(0,Ne.isElement)(t)&&(null===(o=t.style)||void 0===o||o.setProperty("cursor",n),(null===(r=t.childNodes)||void 0===r?void 0:r.length)>0&&t.childNodes.forEach((function(t){return e(t,n)})))},E=(l(t={},n.MOUSE_DOWN,(function(t,n){if(f){p=!0;var o=t.target.closest("th");e.setColumnAttribute(n,x,!0),e.setColumnAttribute(n,N,o.scrollWidth),document.body.style.setProperty("cursor","col-resize"),m=n,h=t.clientX;var r=t.target.closest("table");g=h-r.getBoundingClientRect().left,O(t)(),document.addEventListener("mouseup",T),document.addEventListener("mousemove",_)}})),l(t,n.MOUSE_MOVE,(function(e,t){p&&!v&&(v=!0);var n=e.target.closest("th");if(v&&(n.style.setProperty("user-select","none"),n.classList.remove("col-resize-hover")),!v){if(!n)return void n.classList.remove("col-resize-hover");var o=n.getBoundingClientRect();o.width>12&&o.right-e.pageX<8?(f=!0,S(n,"col-resize"),n.classList.add("col-resize-hover")):(S(n,""),n.classList.remove("col-resize-hover"),f=!1)}})),l(t,n.MOUSE_OUT,(function(e,t){var n=e.target.closest("th");v||(S(n,""),n.classList.remove("col-resize-hover"))})),t),R=function(e){return"".concat("HeadColumnResize","_").concat(e)},k=function(){a.columns.forEach((function(e){if(!1!==e.resizable){var t=d(e);Object.keys(E).forEach((function(e){var n=R(e);(null==t?void 0:t.has(n))||t.set(n,[]),t.get(n).push(E[e])}))}}))};o&&k();var P={position:"absolute",top:0,bottom:0,left:0,width:"1px",backgroundColor:"#3785FF",transform:"translateX(-50%)"},V=(0,r.computed)((function(){return e.formatData.layout})),I=(0,r.computed)((function(){return Object.assign(Object.assign({},P),{transform:"translate(".concat(b.value-V.value.translateX+3,"px, ").concat(V.value.translateY,"px)")})})),D=(0,r.computed)((function(){return Object.assign(Object.assign({},P),{width:"6px",transform:"translateX(".concat(b.value-V.value.translateX,"px)")})}));return{registerResizeEvent:k,resetResizeEvents:function(){a.columns.forEach((function(e){var t=d(e);Object.keys(E).forEach((function(e){var n=R(e);(null==t?void 0:t.has(n))&&(t.get(n).length=0)}))}))},dragOffsetX:b,dragOffsetXStyle:P,resizeColumnStyle:I,resizeHeadColStyle:D}}(h,!1,a),g=m.resizeColumnStyle,b=m.resizeHeadColStyle,C=m.registerResizeEvent;(0,r.provide)(D,p),(0,r.provide)(H,s);var w=bt(e,v,n,h,h.pageData),T=w.tableClass,O=w.headClass,_=w.footerClass,S=w.wrapperStyle,E=w.contentStyle,R=w.headStyle,k=w.hasScrollYRef,P=w.hasFooter,V=w.footerStyle,I=w.tableBodyClass,j=w.fixedBottomBorder,M=w.resizeColumnClass,F=w.tableBodyContentClass,z=w.loadingRowClass,W=w.columnGhostStyle,B=w.fixedContainerStyle,U=w.scrollClass,q=w.prependStyle,G=function(e,t){var n=(0,r.toRef)(e,"scrollLoading"),o=(0,r.computed)((function(){return null!==n.value&&("boolean"==typeof n.value&&n.value||"object"===i(n.value))}));return{renderScrollLoading:function(){var e,i,a;if(o.value){var l="boolean"==typeof n.value?{loading:!!n.value,inline:!0,title:"",size:Ae.BkLoadingSize.Normal,mode:Ae.BkLoadingMode.Default,indicator:null}:n.value,u=l.loading,c=l.size,s=l.mode,d=l.title,f=l.inline,p=l.indicator;return null!==(a=null===(i=(e=t.slots).fixedBottom)||void 0===i?void 0:i.call(e))&&void 0!==a?a:(0,r.createVNode)(Re(),{loading:u,size:c,mode:s,title:d,inline:f,indicator:p},null)}}}}(e,t).renderScrollLoading,K=Le(e,h),$=K.fixedWrapperClass,X=K.fixedColumns,Y=K.resolveColumnStyle,Z=K.resolveColumnClass,J=(0,he.usePrefix)().resolveClassName,Q=(0,r.computed)((function(){return{hasScrollY:k.value}})),ee=Wt(e,t,h,Q),te=ee.renderTableBodySchema,ne=ee.renderTableFooter,oe=ee.renderTableHeadSchema;(0,r.watch)((function(){return[e.data,v]}),(function(){h.formatDataSchema(e.data),h.resetStartEndIndex(),h.resolvePageData(),h.formatColumns(v),C()}),{immediate:!0,deep:!0});var re=function(e){var r,i=null!==(r=h.formatData.layout.bottom)&&void 0!==r?r:0,a=e[1],l=a.translateX,u=a.translateY,s=a.pos,d=void 0===s?{}:s;h.formatData.layout.translateY=u,h.formatData.layout.translateX=l,Object.assign(h.formatData.layout,d||{});var f=d.bottom;f<=2&&i>f&&(0,o.debounce)(60,(function(){t.emit(Te.SCROLL_BOTTOM,Object.assign(Object.assign({},d),{translateX:l,translateY:u}))}),!0)(),function(){var e=n.value.querySelector(".".concat(J("table-body-content"))),t=e.querySelector("table");if(t){var o=t.scrollWidth,r=e.clientWidth;c.value=o-r}}()};return t.expose({setRowExpand:h.setRowExpand,setAllRowExpand:h.setAllRowExpand,clearSelection:h.clearSelection,toggleAllSelection:h.toggleAllSelection,toggleRowSelection:h.toggleRowSelection,getSelection:h.getRowSelection,clearSort:h.clearColumnSort,scrollTo:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0};null===(t=null===(e=u.value)||void 0===e?void 0:e.scrollTo)||void 0===t||t.call(e,n)},getRoot:function(){return n.value}}),function(){var o,i;return(0,r.createVNode)("div",{class:T.value,style:S.value,ref:n},[(0,r.createVNode)("div",{class:O,style:R.value,ref:a},[oe(),(0,r.createVNode)("div",{class:"col-resize-drag",style:b.value},null)]),(0,r.createVNode)(ge(),(0,r.mergeProps)({ref:u,lineHeight:h.formatData.settings.height,height:E.height,class:I.value,wrapperStyle:E,list:h.pageData},U.value,{contentClassName:F.value,onContentScroll:re,throttleDelay:0,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:function(){return t.slots.prepend?(0,r.createVNode)("div",{style:q.value,class:"prepend-row"},[t.slots.prepend()]):null},default:function(e){return te(e.data)},afterSection:function(){return[(0,r.createVNode)("div",{class:j.value},null),(0,r.createVNode)("div",{class:M,style:g.value},null)]}}),(0,r.createVNode)("div",{class:$,style:B.value},[X.value.map((function(e){var t=e.isExist,n=e.colPos,o=e.column;return t?"":(0,r.createVNode)("div",{class:Z(o,h.formatData.layout.translateX,c.value),style:Y(n)},null)})),(0,r.createVNode)("div",{class:z},[G()])]),(0,r.createVNode)("div",{class:_.value,style:V.value},[P.value&&ne(h.localPagination.value)]),(0,r.createVNode)("div",{style:W},[null===(i=(o=t.slots).default)||void 0===i?void 0:i.call(o)])])}}});var Ut=(0,o.withInstallProps)(Bt,{Column:ve});const qt=Ut})(),_})()));
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../virtual-render"),require("lodash"),require("../loading"),require("./preset"),require("./components"),require("./directives"),require("./plugins"),require("./config-provider"),require("./hooks"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("../exception"),require("../popover"),require("../icon/"),require("../button"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../virtual-render","lodash","../loading","./preset","./components","./directives","./plugins","./config-provider","./hooks","../checkbox","../icon","../pagination","../directives","../exception","../popover","../icon/","../button"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("vue-types"),require("../config-provider"),require("../virtual-render"),require("lodash"),require("../loading"),require("./preset"),require("./components"),require("./directives"),require("./plugins"),require("./config-provider"),require("./hooks"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("../exception"),require("../popover"),require("../icon/"),require("../button")):t(e["../shared"],e.vue,e["vue-types"],e["../config-provider"],e["../virtual-render"],e.lodash,e["../loading"],e["./preset"],e["./components"],e["./directives"],e["./plugins"],e["./config-provider"],e["./hooks"],e["../checkbox"],e["../icon"],e["../pagination"],e["../directives"],e["../exception"],e["../popover"],e["../icon/"],e["../button"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n,o,r,i,a,l,u,c,s,d,f,p,v,h,m,g,y,b,C)=>(()=>{var w={6064:(e,t,n)=>{"use strict";n(9887);var o=n(4689);n.o(o,"useLocale")&&n.d(t,{useLocale:function(){return o.useLocale}});var r=n(7257);n.o(r,"useLocale")&&n.d(t,{useLocale:function(){return r.useLocale}}),n(368);var i=n(7623);n.o(i,"useLocale")&&n.d(t,{useLocale:function(){return i.useLocale}});var a=n(5737);n.o(a,"useLocale")&&n.d(t,{useLocale:function(){return a.useLocale}})},8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),a=n(8725),l=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,s=t||[],d=(e=e||{}).node||o,f=void 0!==e.clockseq?e.clockseq:r;if(null==d||null==f){var p=i();null==d&&(d=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=r=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:u+1,m=v-l+(h-u)/1e4;if(m<0&&void 0===e.clockseq&&(f=f+1&16383),(m<0||v>l)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=v,u=h,r=f;var g=(1e4*(268435455&(v+=122192928e5))+h)%4294967296;s[c++]=g>>>24&255,s[c++]=g>>>16&255,s[c++]=g>>>8&255,s[c++]=255&g;var y=v/4294967296*1e4&268435455;s[c++]=y>>>8&255,s[c++]=255&y,s[c++]=y>>>24&15|16,s[c++]=y>>>16&255,s[c++]=f>>>8|128,s[c++]=255&f;for(var b=0;b<6;++b)s[c+b]=d[b];return t||a(s)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||o)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var l=0;l<16;++l)t[i+l]=a[l];return t||r(a)}},4976:e=>{"use strict";e.exports=C},5800:e=>{"use strict";e.exports=p},2717:e=>{"use strict";e.exports=o},4061:e=>{"use strict";e.exports=m},9911:e=>{"use strict";e.exports=g},6870:e=>{"use strict";e.exports=v},7685:e=>{"use strict";e.exports=b},4870:e=>{"use strict";e.exports=a},5801:e=>{"use strict";e.exports=h},5537:e=>{"use strict";e.exports=y},4212:t=>{"use strict";t.exports=e},3511:e=>{"use strict";e.exports=r},4689:e=>{"use strict";e.exports=u},7623:e=>{"use strict";e.exports=d},7257:e=>{"use strict";e.exports=c},5737:e=>{"use strict";e.exports=f},368:e=>{"use strict";e.exports=s},9887:e=>{"use strict";e.exports=l},467:e=>{"use strict";e.exports=i},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=n}},T={};function O(e){var t=T[e];if(void 0!==t)return t.exports;var n=T[e]={exports:{}};return w[e](n,n.exports,O),n.exports}O.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return O.d(t,{a:t}),t},O.d=(e,t)=>{for(var n in t)O.o(t,n)&&!O.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},O.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),O.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),O.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var _={};return(()=>{"use strict";O.r(_),O.d(_,{BkTable:()=>Ut,BkTableColumn:()=>me,default:()=>Gt});var e,t,n,o=O(4212),r=O(748);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function l(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal"}(t||(t={})),function(e){e.HIGHLIGHT="highlight",e.AUTO="auto"}(n||(n={}));var u,c=[n.AUTO,n.HIGHLIGHT],s=[t.NONE,t.ROW,t.COL,t.OUTER,t.HORIZONTAL],d="row_index",f="row_id",p="row_expand",v="row_selection",h="row_selection_indeterminate",m="row_span",g="col_$uuid",y="col_min_width",b="col_sort_active",C="col_sort_type",w="col_sort_fn",T="col_sort_scope",S="col_filter_fn",x="col_is_drag",E="col_span",N="width",L="calcWidth",A="resizeWidth",k="listeners",R="isHidden",P=42;!function(e){e.DEF1="def1",e.DEF2="def2"}(u||(u={}));var V,I=(l(e={},u.DEF1,"#FAFBFD"),l(e,u.DEF2,"#F0F1F5"),e),j={large:78,medium:60,small:42},D="InitColumns",H="BKTableCahce";!function(e){e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom"}(V||(V={}));var M,F,z,W,q=[V.ASC,V.DESC,V.NULL,V.CUSTOM],B=80,U={},G={},K=O(210);!function(e){e.CURRENT="current",e.ALL="all"}(M||(M={})),function(e){e.STATIC="static",e.AUTO="auto"}(F||(F={})),(0,K.toType)("showOverflowTooltipMode",{default:F.AUTO}),function(e){e.SELECTION="selection",e.INDEX="index",e.EXPAND="expand",e.NONE="none"}(z||(z={})),function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.NONE=""}(W||(W={}));var X,$,Y,Z=(0,K.toType)("columnType",{default:z.NONE}),J=(0,K.toType)("columnType",{default:W.NONE});!function(e){e.FULL="full",e.FUZZY="fuzzy"}(X||(X={})),(0,K.toType)("full",{default:X.FULL}),function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}($||($={})),(0,K.toType)("columnSize",{default:$.SMALL}),function(e){e.LEFT="left",e.RIGHT="right"}(Y||(Y={}));var Q,ee,te=(0,K.string)(),ne=(0,K.toType)("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),oe=(0,K.toType)("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),re=(0,K.toType)("IFilterPropShape",{default:!1,type:[Boolean,Object]});!function(e){e.MULTI="multi",e.SINGLE="single",e.DISABLED="disabled"}(Q||(Q={})),function(e){e.DEBOUNCE="debounce",e.THROTTLE="throttle"}(ee||(ee={}));var ie,ae=(0,K.toType)("IColumnType",{default:{width:"100%",label:""},type:[Object]}),le=(0,K.toType)("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),ue=(0,K.toType)("LabelFunctionStringType",{}),ce=(0,K.toType)("RenderFunctionStringType",{}),se=(0,K.toType)("SpanFunctionStringType",{}),de=(0,K.toType)("RowClassFunctionStringType",{}),fe=(0,K.toType)("RowHeightFunctionNumberType",{}),pe=((0,K.toType)("FunctionNumberType",{}),function(e){return(0,K.toType)("StringNumberType",{}).def(e)});(0,K.toType)("IColumnPropType",{default:{label:void 0,minWidth:B},type:[Object]}),function(e){e.interdependent="interdependent",e.independent="independent"}(ie||(ie={}));var ve={data:o.PropTypes.arrayOf(o.PropTypes.any).def([]),columns:o.PropTypes.arrayOf(ae).def([]),activeColumn:o.PropTypes.oneOfType([o.PropTypes.number.def(-1),o.PropTypes.arrayOf(o.PropTypes.number.def(-1))]),columnPick:(0,K.toType)("columnPick",{}).def(Q.DISABLED),height:pe("auto"),stripe:o.PropTypes.bool.def(!1),minHeight:pe(84),maxHeight:pe("auto"),rowHeight:fe.def(P),headHeight:o.PropTypes.number.def(P),showHead:o.PropTypes.bool.def(!0),thead:(0,K.toType)("ITheadType",{}).def({color:u.DEF1,height:P,isShow:!0}),virtualEnabled:o.PropTypes.bool.def(!1),border:o.PropTypes.oneOfType([o.PropTypes.arrayOf((0,K.toType)("boderType",{})),o.PropTypes.string]).def([t.ROW]),pagination:o.PropTypes.oneOfType([o.PropTypes.bool.def(!1),o.PropTypes.object.def({})]).def(!1),paginationHeight:o.PropTypes.number.def(60),remotePagination:o.PropTypes.bool.def(!1),acrossAll:o.PropTypes.bool.def(!1),emptyText:o.PropTypes.string,emptyCellText:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.func.def((function(){return""}))]).def(""),settings:le,rowClass:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),rowStyle:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),cellStyle:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),cellClass:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.object,o.PropTypes.func]).def({}),scrollLoading:o.PropTypes.oneOfType([o.PropTypes.object,o.PropTypes.bool]).def(void 0),reserveExpand:o.PropTypes.bool.def(!1),selectionKey:o.PropTypes.string.def(""),checked:o.PropTypes.array.def([]),isSelectedFn:o.PropTypes.func.def(void 0),rowKey:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.func]).def(d),showOverflowTooltip:ne,asyncData:o.PropTypes.bool.def(!1),rowHover:o.PropTypes.oneOf(c).def(n.HIGHLIGHT),defaultSort:o.PropTypes.shape({}).def({}),isRowSelectEnable:o.PropTypes.oneOfType([o.PropTypes.func.def((function(){return!0})),o.PropTypes.bool.def(!0)]).def(!0),resizerWay:(0,K.toType)("ResizerWay",{default:ee.DEBOUNCE}),observerResize:o.PropTypes.bool.def(!0),align:J,headerAlign:J,prependStyle:o.PropTypes.style().def({}),colSortBehavior:(0,K.toType)("IColSortBehavior",{default:ie.independent}),isFlex:o.PropTypes.bool.def(!0)},he={label:ue,field:ue,render:ce,width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),minWidth:pe(B),columnKey:o.PropTypes.string.def(""),showOverflowTooltip:ne,type:Z,resizable:o.PropTypes.bool.def(!0),fixed:o.PropTypes.oneOfType([o.PropTypes.bool,te]).def(!1),sort:oe,filter:re,colspan:se.def(1),rowspan:se.def(1),align:J,className:de,prop:ue,index:o.PropTypes.number.def(void 0)};const me=(0,r.defineComponent)({name:"TableColumn",props:he,setup:function(e){return{initColumns:(0,r.inject)(D,(function(e){}),!1),bkTableCache:(0,r.inject)(H,{queueStack:function(e,t){return null==t?void 0:t()}}),column:(0,r.reactive)(Object.assign({},e,{field:e.prop||e.field}))}},unmounted:function(){this.updateColumnDefine(!0)},mounted:function(){this.updateColumnDefine()},methods:{updateColumnDefine:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];void 0===this.$props.index||"number"!=typeof this.$props.index?this.updateColumnDefineByParent():this.updateColumnDefineByIndex(e)},updateColumnDefineByParent:function(){var e=this;"function"==typeof this.bkTableCache.queueStack&&this.bkTableCache.queueStack("Bk_COlumn_Update_Define",(function(){var t=e._.parent.vnode.children.default()||[],n=[];!function e(t){Array.isArray(t)&&t.forEach((function(t){var o,i,a;if(Array.isArray(t))e(t);else{var l=!0;if("TableColumn"===(null===(o=t.type)||void 0===o?void 0:o.name)){l=Object.hasOwnProperty.call(t.props||{},"key");var u=Object.assign({},t.props,{field:t.props.prop||t.props.field,render:null===(i=t.children)||void 0===i?void 0:i.default});n.push((0,r.unref)(u))}(null===(a=t.children)||void 0===a?void 0:a.length)&&l&&e(t.children)}}))}(t),e.initColumns(n)}))},updateColumnDefineByIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object.assign({},this.$props,{field:this.$props.prop||this.$props.field,render:this.$slots.default});this.initColumns((0,r.unref)(t),e)}},render:function(){var e,t;return(0,r.createVNode)(r.Fragment,null,[null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e,{row:{}})])}});var ge=O(2717),ye=O(3511),be=O.n(ye);function Ce(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}var we,Te,Oe,_e,Se=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.storage=void 0,this.storage={}}var t,n;return t=e,n=[{key:"queueStack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this.storage[e]&&clearTimeout(this.storage[e]),this.storage[e]=setTimeout((function(){return t()}))}},{key:"clearQueueStack",value:function(e){this.storage[e]&&clearTimeout(this.storage[e])}}],n&&Ce(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();!function(e){e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck"}(Oe||(Oe={})),function(e){e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick"}(_e||(_e={}));var xe=function(e,t,n,o,r){return!0},Ee=function(e){return!0},Ne=function(e){return!0},Le=(l(we={},_e.COLUMN_PICK,(function(e){return!0})),l(we,_e.COLUMN_FILTER,(function(e){return!0})),l(we,_e.COLUMN_SORT,(function(e){return!0})),l(we,_e.COLUMN_FILTER_SAVE,(function(e){return!0})),l(we,_e.ROW_CLICK,xe),l(we,_e.ROW_DBL_CLICK,xe),l(we,_e.ROW_EXPAND_CLICK,(function(e){return!0})),l(we,_e.ROW_SELECT,(function(e){return!0})),l(we,_e.ROW_SELECT_ALL,(function(e){return!0})),l(we,_e.ROW_SELECT_CHANGE,(function(e){return!0})),l(we,_e.PAGE_LIMIT_CHANGE,Ee),l(we,_e.PAGE_VALUE_CHANGE,Ee),l(we,_e.SETTING_CHANGE,(function(e){return!0})),l(we,_e.SCROLL_BOTTOM,(function(e){return!0})),l(we,_e.CELL_CLICK,Ne),l(we,_e.CELL_DBL_CLICK,Ne),l(we,_e.ROW_MOUSE_ENTER,xe),l(we,_e.ROW_MOUSE_LEAVE,xe),we),Ae=(l(Te={},_e.NATIVE_CLICK,xe),l(Te,_e.NATIVE_DBL_CLICK,xe),O(467));function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Re(e,t){if(e){if("string"==typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,t):void 0}}function Pe(e){return function(e){if(Array.isArray(e))return ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Ve=function(e,t,n){var o=t.formatData,i=t.isHiddenColumn,a=t.getColumnId,u=t.getColumnOrderWidth,c=function(e,t,n){return{column_fixed:!!e.fixed,column_fixed_left:"right"!==e.fixed,column_fixed_right:"right"===e.fixed,shadow:"right"===e.fixed?n-t>2:t>0}},s=function(e){var o,r,i,a=u(e);if(/^\d+/.test("".concat(a)))return a;var l=t.getColumnId(e),c='[data-id="'.concat(l,'"]'),s=null!==(r=null===(o=null==n?void 0:n.value)||void 0===o?void 0:o.querySelector(c))&&void 0!==r?r:{offsetWidth:0};return null!==(i=null==s?void 0:s.offsetWidth)&&void 0!==i?i:0},d=function(e){return"right"===e.fixed?"right":"left"},f={left:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return o.columns.filter((function(e){return!i(e)&&e.fixed&&"right"!==e.fixed})).reduce((function(t,n,o){var r=s(n);return e&&0===o?t:t+r}),0)},right:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return o.columns.filter((function(e){return!i(e)&&"right"===e.fixed})).reduce((function(t,n,o){return e&&0===o?t:t+s(n)}),0)}},p=function(t){return{width:"".concat(f[t](!1),"px"),backgroundColor:e.thead.color,bottom:"0px"}},v=(0,r.reactive)([]);return{fixedWrapperClass:(0,(0,ge.usePrefix)().resolveClassName)("table-fixed"),resolveFixedColumnStyle:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.fixed||i(e))return{};var n={left:0,right:t?6:-1},r=d(e);return n[r]=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=a(t),l="right"===e?-1:1,c=o.columns.filter((function(e){return!i(e)})),s=c.length,f="right"===e?s*l:1,p=0;;){f+=-1*l;var v=c[Math.abs(f)],h=d(v),m=a(v);if(h===e&&r!==m&&(p+=u(v)),r===m)break}return p+n}(r,e,n[r]),l({},r,"".concat(n[r],"px"))},resolveFixedColumns:function(e){var n={left:!1,right:!1},r=o.columns.filter((function(e){return!i(e)&&e.fixed})).map((function(o){var r=d(o),i=n[r];return n[r]=!0,{isExist:i,colPos:r,column:o,className:c(o,t.formatData.layout.translateX,e),style:p(r)}}));v.length=0,v.push.apply(v,Pe(r))},fixedColumns:v,resolveColumnStyle:p,resolveColumnClass:c,updateFixClass:function(e){v.forEach((function(n){var o=c(n.column,t.formatData.layout.translateX,e);Object.assign(n.className,o)}))}}};var Ie=O(4870),je=O.n(Ie);var De=O(8022);var He=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n<o.length;n++){var r=o[n];e.call(t,r[1],r[0])}},t}()}(),Me="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Fe=void 0!==O.g&&O.g.Math===Math?O.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),ze="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Fe):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},We=["top","right","bottom","left","width","height","size","weight"],qe="undefined"!=typeof MutationObserver,Be=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,o=!1,r=0;function i(){n&&(n=!1,e()),o&&l()}function a(){ze(i)}function l(){var e=Date.now();if(n){if(e-r<2)return;o=!0}else n=!0,o=!1,setTimeout(a,t);r=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Me&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),qe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Me&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;We.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Ue=function(e,t){for(var n=0,o=Object.keys(t);n<o.length;n++){var r=o[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},Ge=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Fe},Ke=Je(0,0,0,0);function Xe(e){return parseFloat(e)||0}function $e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Xe(e["border-"+n+"-width"])}),0)}var Ye="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof Ge(e).SVGGraphicsElement}:function(e){return e instanceof Ge(e).SVGElement&&"function"==typeof e.getBBox};function Ze(e){return Me?Ye(e)?function(e){var t=e.getBBox();return Je(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Ke;var o=Ge(e).getComputedStyle(e),r=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var r=o[n],i=e["padding-"+r];t[r]=Xe(i)}return t}(o),i=r.left+r.right,a=r.top+r.bottom,l=Xe(o.width),u=Xe(o.height);if("border-box"===o.boxSizing&&(Math.round(l+i)!==t&&(l-=$e(o,"left","right")+i),Math.round(u+a)!==n&&(u-=$e(o,"top","bottom")+a)),!function(e){return e===Ge(e).document.documentElement}(e)){var c=Math.round(l+i)-t,s=Math.round(u+a)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(s)&&(u-=s)}return Je(r.left,r.top,l,u)}(e):Ke}function Je(e,t,n,o){return{x:e,y:t,width:n,height:o}}var Qe=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Je(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Ze(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),et=function(e,t){var n,o,r,i,a,l,u,c=(o=(n=t).x,r=n.y,i=n.width,a=n.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(l.prototype),Ue(u,{x:o,y:r,width:i,height:a,top:r,right:o+i,bottom:a+r,left:o}),u);Ue(this,{target:e,contentRect:c})},tt=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new He,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Ge(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Qe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Ge(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new et(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),nt="undefined"!=typeof WeakMap?new WeakMap:new He,ot=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Be.getInstance(),o=new tt(t,n,this);nt.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){ot.prototype[e]=function(){var t;return(t=nt.get(this))[e].apply(t,arguments)}}));const rt=void 0!==Fe.ResizeObserver?Fe.ResizeObserver:ot;var it=void 0,at=function e(t,n,o){var r;if(null!=t)return"string"==typeof n?Object.prototype.hasOwnProperty.call(t,n)?"function"==typeof t[n]?(r=t[n]).call.apply(r,[it].concat(Pe(o))):t[n]:void 0:Array.isArray(n)?n.map((function(n){return e(t,n,o)})).filter((function(e){return void 0!==e})).at(0):void 0},lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"100%",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o="";return o=/^auto|null|undefined$/gi.test("".concat(e))?t:/^\d+\.?\d+$/.test("".concat(e))?"".concat(e,"px"):e,n&&(o="calc(".concat(o," - ").concat(n,")")),o},ut=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=function(){"function"==typeof t&&t()},i="debounce"===(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"throttle")?(0,Ae.debounce)(r,n):(0,Ae.throttle)(r,n),a=new rt((function(){Reflect.apply(i,it,[])}));return o&&"function"==typeof t&&t(),{start:function(){a.observe(e)},disconnect:function(){a.unobserve(e),a.disconnect()}}},ct=function(e){var t=e.showHead,n=e.headHeight,o=e.thead,r=void 0===o?{}:o;return Object.assign({},{isShow:t,height:n},r)},st=function(e,t){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e?e:(0,Ae.get)(e,t)},dt=function e(t,n){return Array.isArray(t)?t:"string"==typeof t||"object"===i(t)?[t]:"function"==typeof t?e(Reflect.apply(t,it,n),n):[]},ft=function(e,t,n){return"string"==typeof t.rowKey?t.rowKey===d?"__ROW_INDEX_".concat(n):(0,Ae.get)(e,t.rowKey):"function"==typeof t.rowKey?Reflect.apply(t.rowKey,it,[e]):null},pt=function(e,t,n){var o;return o=t,e.some((function(e){return e.field===at(o,["field","type"],[o])}))&&n.length&&!n.includes(at(t,["field","type"],[t]))},vt=function(e,t,n,o,r){return"function"==typeof e[r]?Reflect.apply(e[r],it,[{column:e,colIndex:t,row:n,rowIndex:o}]):"number"==typeof e[r]?e[r]:1},ht=function(e,t){var n,o,r=e.field,i=function(e){return st(e,r)},a="function"==typeof(null===(n=e.sort)||void 0===n?void 0:n.sortFn)?null===(o=e.sort)||void 0===o?void 0:o.sortFn:function(e,t){var n=i(e)||"",o=i(t)||"";return"number"==typeof n&&"number"==typeof o?n-o:String.prototype.localeCompare.call(n,o)};return t===V.NULL?function(e,t){return!0}:function(e,n){return a(e,n)*(t===V.DESC?-1:1)}},mt=function(e){var t,n=(l(t={},V.NULL,0),l(t,V.ASC,1),l(t,V.DESC,2),t);return void 0===n[e]?V.NULL:Object.keys(n)[(n[e]+1)%3]},gt=function(e){return"string"==typeof e?{value:e}:"boolean"==typeof e&&e?{value:V.NULL}:"object"===i(e)&&null!==e?i(e.sortFn)?Object.assign({value:"custom"},e):e:null};const yt=function(e){var t,n,o=e.settings.size,a=j[o]||j.small,u=(0,r.reactive)({data:Pe(e.data),dataSchema:new WeakMap,columns:Pe(e.columns),columnSchema:new WeakMap,settings:{size:o,height:a},layout:{hasScrollY:!1,bottom:0,translateX:0,translateY:0}}),c=function(e){var t=(0,r.ref)(0),n=(0,r.ref)(0),o=(0,r.ref)(null),a=(0,r.computed)((function(){return e.data})),l=(0,r.reactive)({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]}),u=function(){e.pagination&&(o.value=e.remotePagination?l:Object.assign(Object.assign({},l),{count:a.value.length}))};(0,r.watch)((function(){return[e.pagination]}),(function(){l=function(e,t){if(e){if("object"===i(e)){var n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Object.assign(Object.assign(Object.assign({},t),e),{current:n})}return t}return{}}(e.pagination,l),u()}),{immediate:!0,deep:!0});var c=function(){if(!e.pagination||e.remotePagination)return t.value=0,void(n.value=a.value.length);t.value=(l.current-1)*l.limit,n.value=l.current*l.limit},s=(0,r.reactive)([]),d=function(e,t,n,o,r){"function"==typeof t&&e.sort((function(e,i){return t(e,i,o,n,r)}))},f=function(e,t){if("function"==typeof t){var n=e.filter((function(e,n){return t(e,n,a.value)}));e.length=0,e.push.apply(e,Pe(n))}return e},p=function(e,o,r,i,l){var c=a.value.slice();s.length=0,s.push.apply(s,Pe(c.slice(t.value,n.value))),f(s,e),d(s,o,r,i,l),u()};return c(),p(),{pageData:s,indexData:a,localPagination:o,resolvePageData:p,resetStartEndIndex:c,multiFilter:function(e){var t=a.value.slice(),n=e.reduce((function(e,t){return f(e,t)}),t);s.length=0,s.push.apply(s,Pe(n))},sort:d}}(e),s=c.pageData,O=c.localPagination,_=c.resolvePageData,P=c.multiFilter,I=c.sort,D=c.resetStartEndIndex,H=(null===(t=e.settings)||void 0===t?void 0:t.checked)||[],M=(null===(n=e.settings)||void 0===n?void 0:n.fields)||[],F=function(e){return Y(e,S)},z=function(){return e.acrossAll?u.data.every((function(e){return ne(e,v)})):s.every((function(e){return ne(e,v)}))},W=function(){return e.acrossAll?u.data.some((function(e){return ne(e,v)})):s.some((function(e){return ne(e,v)}))},q=[A,L,N],K=function(e){var t,n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,i=null!==(t=u.columnSchema.get(e))&&void 0!==t?t:{};return null!==(o=null!==(n=i[r[0]])&&void 0!==n?n:i[r[1]])&&void 0!==o?o:i[r[2]]},X=function(e){var t,n;return null!==(n=null===(t=u.columnSchema.get(e))||void 0===t?void 0:t[R])&&void 0!==n&&n},$=function(e,t,n){var o=u.columnSchema.get(e);o&&Object.prototype.hasOwnProperty.call(o,t)&&(o[t]=n)},Y=function(e,t){var n;return null===(n=u.columnSchema.get(e))||void 0===n?void 0:n[t]},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rowspan","colspan"];return u.columns.some((function(t){return e.some((function(e){return"function"==typeof t[e]||/^\d$/.test("".concat(t[e]))}))}))},J=function(){var e=z();Q(U,v,e),Q(U,h,!e&&W())},Q=function(e,t,n){var o=u.dataSchema.get(e);o&&Object.prototype.hasOwnProperty.call(o,t)&&(o[t]=n)},ee=function(e,t){Q(e,v,t),J()},te=function(e,t){Q(e,p,t)},ne=function(e,t){var n;return null===(n=u.dataSchema.get(e))||void 0===n?void 0:n[t]},oe=function(t){var n,o=null!=t?t:!z();e.acrossAll?u.data.forEach((function(e){return ee(e,o)})):(s.forEach((function(e){return ee(e,o)})),u.dataSchema.set(U,(l(n={},v,o),l(n,h,!1),n)))};return{formatColumns:function(t){var n;u.columns.length=0,(n=u.columns).push.apply(n,Pe(t));var o=0,r=Z(["colspan"]);(t||[]).forEach((function(t,n){var i=r?function(e,t,n){var o=n,r=vt(e,t,null,null,"colspan"),i={skipCol:!1,skipColLen:0};return o>0&&(i.skipColLen=o,i.skipCol=!0,o-=1),r>1&&(i.skipColLen=r,o=r-1),Object.assign(Object.assign({},i),{skipColumnNum:o})}(t,n,o):{skipCol:!1,skipColumnNum:0,skipColLen:0},a=i.skipCol,c=i.skipColumnNum,s=i.skipColLen;if(o=c,!u.columnSchema.has(t)){var d,f=function(e,t){var n,o,r=null!==(o=gt(null!==(n=e.sort)&&void 0!==n?n:t.defaultSort))&&void 0!==o?o:{};return{type:r.value,fn:r.sortFn,scope:r.sortScope,active:!1}}(t,e),p=f.type,v=f.fn,h=f.scope,m=f.active;u.columnSchema.set(t,(l(d={},L,void 0),l(d,A,void 0),l(d,y,function(e){if(/^\d+/.test("".concat(e.minWidth)))return e.minWidth;var t=B;return e.sort&&(t+=18),e.filter&&(t+=28),t}(t)),l(d,k,new Map),l(d,N,t.width),l(d,R,pt(M,t,H)),l(d,C,p),l(d,w,v),l(d,S,void 0),l(d,"col_filter_scope",void 0),l(d,T,h),l(d,b,m),l(d,x,!1),l(d,E,{skipCol:a,skipColumnNum:c,skipColLen:s}),l(d,g,(0,De.v4)()),d))}Object.assign(u.columnSchema.get(t),l({},E,{skipCol:a,skipColumnNum:c,skipColLen:s}))}))},formatDataSchema:function(t){var n,o;u.data.length=0,(n=u.data).push.apply(n,Pe(t)),(t||[]).forEach((function(t,n){var o,r=function(e,t,n){var o=function(e,t,n){var o=ft(e,t,n);return null!==o?o:(0,De.v4)()}(e,n,t);return void 0!==o&&void 0!==e[o]?e[o]:t}(t,(0,De.v4)(),e);u.dataSchema.has(t)||u.dataSchema.set(t,(l(o={},p,!1),l(o,v,function(t){return!!e.isRowSelectEnable&&("function"==typeof e.isSelectedFn?e.isSelectedFn({row:t}):!!Array.isArray(e.checked)&&e.checked.some((function(e){return"string"==typeof e?function(e,t){return(0,Ae.get)(e,t)}(t,e)===e:e===t})))}(t)),l(o,f,r),l(o,d,n+1),l(o,h,!1),o));var i=u.dataSchema.get(t);r=i[f],i[d]=n+1})),u.dataSchema.set(U,(l(o={},v,!1),l(o,h,!1),o)),u.dataSchema.set(G,l({},m,Z(["rowspan"])))},setRowSelection:ee,setRowExpand:te,setRowIndex:function(e,t){Q(e,d,t)},setColumnAttribute:$,setColumnAttributeBySettings:function(e,t){var n=t||e.checked||[],o=e.fields||[];u.columns.forEach((function(e){$(e,R,pt(o,e,n))}))},setColumnSortActive:function(t,n){e.colSortBehavior===ie.independent&&u.columns.forEach((function(e){$(e,b,!1)})),$(t,b,n)},setRowSelectionAll:function(e){oe(e)},setRowIndeterminate:J,setAllColumnAttribute:function(e,t){var n=Array.isArray(e)?e:[e],o=Array.isArray(t)?t:[t];u.columns.forEach((function(e){n.forEach((function(t,n){$(e,t,o[n])}))}))},getColumnAttribute:Y,getColumnId:function(e){var t;return null===(t=u.columnSchema.get(e))||void 0===t?void 0:t[g]},getColumnOrderWidth:K,getRowSelection:function(){return u.data.filter((function(e){return ne(e,v)}))},resolveColumnWidth:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=(e.getBoundingClientRect()||{}).width-n,r=o,i=[],a=function(e,t){var n=Y(e,y);if(void 0===n)return t<B?B:t;var r=t;return/^\d+\.?\d*$/.test("".concat(n))&&(r=Number(n)),/^\d+\.?\d*%$/.test("".concat(n))&&(r=Number(n)*o/100),/^\d+\.?\d*px$/i.test("".concat(n))&&(r=Number("".concat(n).replace(/px/i,""))),r},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=a(e,t),i=t<o?o:t;Object.assign(e,{calcWidth:i}),n&&(r-=i)<0&&(r=0)};if(u.columns.forEach((function(e,n){if(!X(e)){var o=String(K(e,["resizeWidth","width"])),a=!0;if(/^\d+\.?\d*(px)?$/.test(o)){var u=Number(o.replace("px",""));l(e,u),a=!1}if(/^\d+\.?\d*%$/.test(o)){var c=t;if(r>0){var s=Number(o.replace("%",""));c=r*s/100}l(e,c),a=!1}a&&i.push(n)}})),i.length>0){var c=t;r>0?i.forEach((function(e,t){c=r/(i.length-t),l(u.columns[e],c,!1);var n=Y(u.columns[e],L);r-=n})):i.forEach((function(e){var t=a(u.columns[e],B);$(u.columns[e],L,t)}))}},isActiveColumn:function(e){var t,n;return null!==(n=null===(t=u.columnSchema.get(e))||void 0===t?void 0:t[R])&&void 0!==n&&n},isHiddenColumn:X,resolvePageData:_,resetStartEndIndex:D,toggleAllSelection:oe,setAllRowExpand:function(e){u.data.forEach((function(t){return te(t,null==e||e)}))},clearSelection:function(){u.data.forEach((function(e){return ee(e,!1)}))},clearColumnSort:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u.columns.forEach((function(e){$(e,b,!1),$(e,S,void 0)})),e&&_()},toggleRowSelection:function(e){ee(e,!ne(e,v))},getRowAttribute:ne,filter:function(){var e=u.columns.filter((function(e){return!X(e)&&"function"==typeof F(e)})).map((function(e){return F(e)}));P(e)},sortData:function(e){var t=Y(e,w),n=Y(e,C),o=Y(e,T);n!==V.NULL?I(s,t,e,n,o):_()},isCheckedAll:z,hasCheckedRow:W,pageData:s,localPagination:O,formatData:u}},bt=function(e,t){var n,o=(0,r.reactive)(null!==(n=e.columns)&&void 0!==n?n:[]),i=function(){return o};return{initColumns:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[];if(r=Array.isArray(e)?e:[e],n)r.forEach((function(e){var o=t.findIndex((function(t){return t.label===e.label&&t.field===e.field}));n&&o>=0&&t.splice(o,1)}));else{var i=!1;r.forEach((function(e){if(void 0!==e.index&&e.index>=0){i=!0;var n=t.findIndex((function(t){return t.label===e.label&&t.field===e.field}));n>=0&&t.splice(n,1),t.push(e)}else{var o=t.findIndex((function(t){return t.label===e.label&&t.field===e.field}));o>=0?t.splice(o,1,e):t.push(e)}})),i&&t.sort((function(e,t){return e.index-t.index}))}o.length=0,o.push.apply(o,Pe(r))},getColumns:i,getActiveColumn:function(){var t;if(e.colSortBehavior===ie.independent){var n=[V.ASC,V.DESC];return null===(t=i().filter((function(e){var t;return n.includes(null===(t=e.sort)||void 0===t?void 0:t.value)})))||void 0===t?void 0:t[0]}return null}}};var Ct=function(e,n,i,a,u){var c,d=bt(e,n).getColumns,f=(0,r.ref)(420),p=(0,r.ref)(420),v=(0,r.ref)(P),h=(0,r.ref)(!1),m=(0,r.computed)((function(){return e.pagination&&e.data.length})),g=(0,r.computed)((function(){return h.value})),y=(0,r.computed)((function(){var t,n,r;return(0,o.classes)((l(t={},(0,o.resolveClassName)("table"),!0),l(t,"has-footer",m.value),l(t,"has-scroll-y",h.value||e.virtualEnabled),l(t,(0,o.resolveClassName)("table-flex"),e.isFlex),t),(r=["row"],"string"==typeof(n=e.border)&&r.push(n),Array.isArray(n)&&r.push.apply(r,Pe(n.filter((function(e){return s.includes(e)})))),Pe(new Set(r)).map((function(e){return"bordered-".concat(e)})).join(" ")))})),b=(0,o.classes)((l(c={},(0,o.resolveClassName)("table-head"),!0),l(c,"has-settings",!!e.settings),c)),C=(0,r.computed)((function(){return d()})),w=ct(e),T=(0,r.computed)((function(){return{"--row-height":"".concat(at(w,"height",["thead"]),"px"),"--scroll-head-left":"-".concat(a.formatData.layout.translateX,"px"),"--scroll-left":"".concat(a.formatData.layout.translateX,"px")}})),O=l({},(0,o.resolveClassName)("table-body"),!0),_=(0,r.computed)((function(){var t;return(0,o.classes)((l(t={},(0,o.resolveClassName)("table-footer"),!0),l(t,"is-hidden",!e.pagination||!e.data.length),t))})),S=function(){if(C.value.every((function(e){return/^\d+\.?\d*(px)?$/gi.test("".concat(e.width))}))){var e=C.value.reduce((function(e,t){return e+Number("".concat(t.width).replace(/px/gi,""))}),0),t=h.value?6:0;return"".concat(e+t,"px")}return"100%"},x=(0,r.computed)((function(){return{minHeight:lt(e.minHeight,"auto"),width:S()||"100%",maxWidth:"100%",height:"number"===e.height?"".concat(e.height,"px"):"string"==typeof e.height?e.height:""}})),E=function(e,t){var n=String(e);return/^\d+\.?\d*$/.test(n)?parseFloat(n):/^\d+\.?\d*px$/gi.test(n)?parseFloat(n.replace("px","")):/^\d+\.?\d*%$/gi.test(n)?"number"==typeof t?t*parseFloat(n.replace("%",""))/100:n:null!=t?t:e},N=(0,r.reactive)({display:"",minHeight:"",height:"",maxHeight:""}),L=function(t){var n,r,i;if(e.showHead){if(!t)return null!==(n=E(e.headHeight,P))&&void 0!==n?n:0;var a=(0,o.resolveClassName)("table-head"),l=t.querySelector(a);return null!==(i=null!==(r=null==l?void 0:l.offsetHeight)&&void 0!==r?r:E(e.headHeight,P))&&void 0!==i?i:0}return 0},A=function(e,t,n){if(/%$/.test("".concat(e)))return"calc(".concat(e," - ").concat(t+n,"px)");if("number"==typeof e){var o=e-t-n;return"".concat(o>0?o:0,"px")}return e};(0,r.onMounted)((function(){k(null==i?void 0:i.value)}));var k=function(t){var n,r;if(t){var i=L(t),a=".".concat((0,o.resolveClassName)("table-body-content")," > table"),l=".".concat((0,o.resolveClassName)("table-body")),c=t.querySelector(l),s=t.querySelector(a);!function(t){var n=E(e.height);v.value=L(t);var o=e.pagination&&e.data.length?e.paginationHeight:0,r=A(n,v.value,o),i=function(t,n){return/^\d+\.?\d*$/.test(t)?"".concat(t,"px"):(r=E(e.maxHeight),A(r,v.value,o));var r}(n);N.display=!!(null==u?void 0:u.length)&&"block",N.minHeight=r,N.height=r,N.maxHeight=i}(t),p.value=(null!==(n=null==c?void 0:c.offsetHeight)&&void 0!==n?n:420)+i,f.value=(null!==(r=null==s?void 0:s.offsetHeight)&&void 0!==r?r:420)+i,R(t)}},R=function(t){if(t){var n=e.virtualEnabled?".".concat((0,o.resolveClassName)("virtual-section")):".".concat((0,o.resolveClassName)("table-body-content")),r=t.querySelector(".".concat((0,o.resolveClassName)("table-body")));h.value=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e){var o=e.querySelector(t);if(o)return o.offsetHeight>e.offsetHeight-n}return!1}(r,n,0)}},V=(0,r.computed)((function(){return Object.assign(Object.assign({},O),{"__is-empty":!a.pageData.length})})),I=(0,r.computed)((function(){var t;return l(t={},(0,o.resolveClassName)("table-body-content"),!0),l(t,(0,o.resolveClassName)("stripe"),e.stripe),l(t,"with-virtual-render",e.virtualEnabled),t})),j=(0,r.computed)((function(){var t;return l(t={},(0,o.resolveClassName)("fixed-bottom-border"),!0),l(t,"_is-empty",!e.data.length),t})),D=(0,r.computed)((function(){return{"--footer-height":m.value?"".concat(e.paginationHeight,"px"):"0"}})),H=(0,r.computed)((function(){return Object.assign({right:g.value?"".concat(6,"px"):0,"--fix-height":"".concat(f.value,"px"),"--fix-max-height":"".concat(p.value,"px")},D.value)})),M=(0,r.computed)((function(){return e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}})),F=(0,r.computed)((function(){return Object.assign({"--prepend-left":"".concat(a.formatData.layout.translateX,"px"),position:"sticky",top:0,zIndex:2},e.prependStyle||{})}));return{tableClass:y,headClass:b,contentClass:O,footerClass:_,wrapperStyle:x,contentStyle:N,headStyle:T,fixHeight:f,maxFixHeight:p,resetTableHeight:k,updateBorderClass:R,getColumnsWidthOffsetWidth:function(){var n=0;return h.value&&(n+=6),e.border.includes(t.OUTER)&&!e.border.includes(t.NONE)&&(n+=2),n},hasFooter:m,hasScrollY:h,hasScrollYRef:g,tableBodyClass:V,tableBodyContentClass:I,resizeColumnClass:{column_drag_line:!0,"offset-x":!0},loadingRowClass:{"scroll-loading":!0,_bottom:!0},fixedBottomBorder:j,columnGhostStyle:{zIndex:-1,width:0,height:0,display:"none"},fixedContainerStyle:H,scrollClass:M,prependStyle:F,footerStyle:D}},wt=O(6064),Tt=O(5800),Ot=O.n(Tt),_t=O(6870),St=O(5801),xt=O.n(St),Et=O(4061);const Nt=(0,r.defineComponent)({name:"TableCell",props:{column:ae,row:o.PropTypes.any.def({}),parentSetting:ne,title:o.PropTypes.string.def(void 0),observerResize:o.PropTypes.bool.def(!0),isHead:o.PropTypes.bool.def(!1),headExplain:o.PropTypes.string,resizerWay:(0,K.toType)("ResizerWay",{default:ee.DEBOUNCE})},setup:function(e,t){var n=this,a=t.slots,l=(0,r.ref)(),u=(0,r.ref)(!1),c=(0,r.computed)((function(){return{textAlign:e.column.textAlign}})),s=function(){if(/boolean|object/.test(i(e.column.showOverflowTooltip))&&null!==e.column.showOverflowTooltip){var t={showOverflowTooltip:{content:"",disabled:!e.column.showOverflowTooltip,mode:void 0,resizerWay:void 0,watchCellResize:void 0,popoverOption:{}}};return null!==e.parentSetting&&"object"===i(e.parentSetting)&&(Object.assign(t.showOverflowTooltip,e.parentSetting),Object.assign(t.showOverflowTooltip,{disabled:!e.column.showOverflowTooltip}),"object"===i(e.column.showOverflowTooltip)&&Object.assign(t.showOverflowTooltip,e.column.showOverflowTooltip)),t}return{showOverflowTooltip:e.parentSetting}}().showOverflowTooltip,d=void 0!==s&&s,f=null,p=function(){var t,o=!0,r=e.resizerWay,a=l.value.innerText,u={},c="auto",s=!0;return"boolean"==typeof d&&(o=!d),"object"===i(d)&&(o=d.disabled,u=d.popoverOption,r=d.resizerWay||"debounce",a=d.content||l.value.innerText,"function"==typeof d.content&&(a=d.content(e.column,e.row)),s=d.watchCellResize,c=d.mode||"auto"),"function"==typeof o&&(o=Reflect.apply(o,n,[e.column,e.row])),e.isHead&&(o=!1,c="auto",a=null===(t=v())||void 0===t?void 0:t.innerHTML,e.headExplain&&(c="static",a=e.headExplain)),e.column.explain&&(o=!1,c="static","object"===i(e.column.explain)&&(a=at(e.column.explain,"content",[e.column,e.row]))),{disabled:o,content:a,mode:c,resizerWay:r,watchCellResize:s,popoverOption:u}},v=function(){var t,n;return e.isHead?null===(n=null===(t=l.value)||void 0===t?void 0:t.querySelector)||void 0===n?void 0:n.call(t,".head-text"):l.value},h=function(){var e=v();if(e&&(0,o.isElement)(e)){var t=p(),n=t.mode,i=t.disabled;if(u.value=!i,"auto"===n&&(u.value=(0,o.hasOverflowEllipsis)(e)),"static"===n&&(u.value=!0),u.value){var a=(0,r.ref)(p());null===f&&(f=(0,Et.bkEllipsisInstance)(e,{disabled:a.value.disabled,content:a.value.content,mode:a.value.mode,popoverOption:a.value.popoverOption}))}else null==f||f.destroyInstance(e),f=null}};(0,r.onMounted)((function(){var t=p(),n=t.disabled,o=t.resizerWay,i=t.watchCellResize;if(!n&&(h(),!1!==i&&e.observerResize)){var a=ut(l.value,(function(){h()}),60,!0,o);a.start(),(0,r.onBeforeUnmount)((function(){a.disconnect(),a=null}))}})),(0,r.onBeforeUnmount)((function(){null==f||f.destroyInstance(l.value)}));var m=e.headExplain||e.column.explain;return function(){var t;return(0,r.createVNode)("div",{class:["cell",e.column.type,m?"explain":""],style:c.value,ref:l,title:e.title},[null===(t=a.default)||void 0===t?void 0:t.call(a)])}}}),Lt=(0,r.defineComponent)({name:"TableRow",render:function(){var e,t;return(0,r.createVNode)(r.Fragment,null,[null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)])}});var At=O(9911),kt=O.n(At);const Rt=(0,r.defineComponent)({name:"BodyEmpty",props:{list:o.PropTypes.array.def([]),filterList:o.PropTypes.array.def([]),emptyText:o.PropTypes.string},emits:["change"],setup:function(e){var t=(0,ge.useLocale)("table"),n=(0,r.computed)((function(){return void 0===e.emptyText?t.value.emptyText:e.emptyText})),o=(0,r.computed)((function(){return 0===e.list.length?"empty":"search-empty"}));return function(){return(0,r.createVNode)(kt(),{scene:"part",type:o.value,description:n.value},null)}}});var Pt=O(5537),Vt=O.n(Pt);const It=(0,r.defineComponent)({name:"HeadFilter",props:{column:ae,height:o.PropTypes.number.def(P)},emits:["change","filterSave"],setup:function(e,t){var n=t.emit,i=(0,ge.usePrefix)().resolveClassName,a=(0,ge.useLocale)("table"),u=e.column,c=(0,r.toRefs)(e.column).filter,s=(0,r.computed)((function(){var e,t;return null!==(t=null===(e=c.value)||void 0===e?void 0:e.checked)&&void 0!==t?t:[]})),d=(0,r.reactive)({isOpen:!1,checked:s.value}),f=(0,r.computed)((function(){var e,t;return null!==(t=null===(e=c.value)||void 0===e?void 0:e.maxHeight)&&void 0!==t?t:630}));(0,r.watch)((function(){return c.value}),(function(){d.checked=s.value}),{immediate:!0,deep:!0});var p=(0,r.computed)((function(){var t;return(0,o.classes)((l(t={},i("table-head-action"),!0),l(t,"column-filter",!0),l(t,"--row-height","".concat(e.height,"px")),l(t,"active",d.checked.length),l(t,"opened",d.isOpen),t))})),v=(0,o.classes)(l({},i("table-head-filter"),!0)),h=(0,r.ref)(null),m=function(e){d.isOpen=e,e&&setTimeout((function(){h.value.reset()}))},g="light ".concat(i("table-head-filter")),y=(0,r.computed)((function(){var e=c.value.list;return void 0===e?[]:e})),b="function"==typeof c.value.filterFn?function(t,n,o,r){return c.value.filterFn(t,n,e.column,o,r)}:function(e,t){return!e.length||function(e,t){var n=c.value.match,o=st(t,at(u,"field",[u,t]));return"full"===n?e.includes(o):e.some((function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ig";return new RegExp("".concat(e).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t)}(e,"img").test(o)}))}(e,t)},C=function(){w(!0),n("filterSave",d.checked),d.isOpen=!1},w=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(O(S,a.value.confirm).disabled||e){if("custom"===c.value)return n("change",d.checked,null),void(d.isOpen=!1);c.value.checked=d.checked,n("change",d.checked,b)}},T=function(){d.checked.length&&(d.checked.length=0,d.isOpen=!1,(0,r.nextTick)((function(){return n("change",d.checked,b)})))},O=function(e,t){return{disabled:"disabled"===e||!1===e,text:"string"==typeof e?e:t}},_=c.value,S=_.btnSave,x=_.btnReset,E=function(){var e=O(x,a.value.reset),t=e.disabled,n=e.text;return t?"":(0,r.createVNode)("span",{class:["btn-filter-reset",d.checked.length?"":"disable"],onClick:T},[n])},N=function(e){return e.data.length?e.data.map((function(e){return(0,r.createVNode)("div",{class:"list-item"},[(0,r.createVNode)(Ot(),{label:e.value,key:e.$index,immediateEmitChange:!1,checked:d.checked.includes(e.value),modelValue:d.checked.includes(e.value),onChange:function(t){return function(e,t){var n,o=new Set(d.checked);e?o.add(t.value):o.delete(t.value),d.checked.length=0,(n=d.checked).push.apply(n,Pe(Array.from(o))),w()}(t,e)}},{default:function(){return["".concat(e.text)]}})])})):(0,r.createVNode)("div",{class:"list-item is-empty"},[a.value.emptyText])};return function(){return(0,r.createVNode)(Vt(),(0,r.mergeProps)({trigger:"click",isShow:d.isOpen,placement:"bottom-start",renderType:o.RenderType.SHOWN,arrow:!1,offset:0},{theme:g},{onAfterShow:function(){return m(!0)},onAfterHidden:function(){return m(!1)}}),{default:function(){return(0,r.createVNode)(_t.Funnel,{class:p.value},null)},content:function(){return(0,r.createVNode)("div",{class:v},[(0,r.createVNode)(Tt.BkCheckboxGroup,{class:"content-list"},{default:function(){return[(0,r.createVNode)(be(),{maxHeight:f.value,lineHeight:32,list:y.value,throttleDelay:0,scrollEvent:!0,ref:h,className:"content-items"},{default:N})]}}),(0,r.createVNode)("div",{class:"content-footer"},[(e=O(S,a.value.confirm),t=e.disabled,n=e.text,t?(0,r.createVNode)("span",{class:"btn-filter-save disabled"},[n]):(0,r.createVNode)("span",{class:"btn-filter-save",onClick:C},[n])),(0,r.createVNode)("span",{class:"btn-filter-split"},null),E()])]);var e,t,n}})}}});var jt=O(7685);const Dt=(0,r.defineComponent)({name:"HeadSort",props:{column:ae,defaultSort:o.PropTypes.oneOf(q).def(V.NULL),active:o.PropTypes.bool},emits:["change"],setup:function(e,t){var n,o,i=t.emit,a=(0,ge.usePrefix)().resolveClassName,l=(null===(o=null===(n=e.column)||void 0===n?void 0:n.sort)||void 0===o?void 0:o.value)||e.defaultSort||V.NULL,u=(0,r.ref)(l);(0,r.watch)((function(){return[e.defaultSort]}),(function(e){var t,n,o=(t=e,n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return l}}(t,n)||Re(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];u.value=o}));var c=function(t,n){var o;t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault();var r=n;n===V.NULL&&(r=mt(n)),u.value===n&&(r=V.NULL);var a=ht(e.column,r),l=gt(e.column.sort);"custom"!==(null==l?void 0:l.value)?i("change",a,r):i("change",null!==(o=null==l?void 0:l.sortFn)&&void 0!==o?o:a,r)};return function(){return(0,r.createVNode)("span",{class:a("head-cell-sort")},[(0,r.createVNode)(jt.AngleDownFill,{class:["sort-action","sort-asc",u.value===V.ASC?"active":""],style:"align-items: flex-end;",onClick:function(e){return c(e,V.ASC)}},null),(0,r.createVNode)(jt.AngleUpFill,{class:["sort-action","sort-desc",u.value===V.DESC?"active":""],style:"align-items: flex-start;",onClick:function(e){return c(e,V.DESC)}},null)])}}});var Ht=O(4976),Mt=O.n(Ht);function Ft(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}const zt=(0,r.defineComponent)({name:"Settings",props:{settings:le,columns:o.PropTypes.arrayOf(ae).def([]),rowHeight:fe.def(P)},emits:["change"],setup:function(e,t){var n=t.emit,o=t.slots,i=(0,ge.usePrefix)().resolveClassName,a=(0,ge.useLocale)("table"),l=function(e){return[{value:"small",label:e.value.setting.lineHeight.small,height:j.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:j.medium},{value:"large",label:e.value.setting.lineHeight.large,height:j.large}]}(a),u=function(e,t){return at(e,["id","field","type"],[e,t])},c=(0,r.ref)(!1),s=(0,r.ref)(!1),d=(0,r.computed)((function(){return"boolean"==typeof e.settings?{fields:e.columns.map((function(e){return Object.assign({},e,{field:e.field||e.type})})),checked:[],limit:0,size:j.small,sizeList:l,showLineHeight:!0}:e.settings})),f=(0,r.ref)(d.value.size||"small"),p=(0,r.ref)(e.rowHeight),v=(0,r.ref)(d.value.checked||[]),h=i("table-settings"),m="light ".concat(h),g=(0,r.computed)((function(){return d.value.fields||e.columns||[]})),y={checkAll:c.value,activeSize:f.value,activeHeight:p.value,checkedFields:d.value.checked||[]},b=function(){Object.assign(y,{checkAll:c.value,activeSize:f.value,activeHeight:p.value,checkedFields:v.value}),n("change",{checked:v.value,size:f.value,height:p.value,fields:(0,r.unref)(g)}),s.value=!1},C=function(){c.value=y.checkAll,f.value=y.activeSize,p.value=y.activeHeight,v.value=y.checkedFields,s.value=!1},w=function(){s.value=!0},T=function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),c.value=!c.value;var n=d.value.fields||e.columns||[],o=n.filter((function(e,t){return e.disabled&&v.value.includes(u(e,t))})).map((function(e,t){return u(e,t)}));if(c.value){var r,i=n.filter((function(e){return!e.disabled})).map((function(e,t){return u(e,t)}));(r=v.value).splice.apply(r,[0,v.value.length].concat(Pe(i),Pe(o)))}else{var a;(a=v.value).splice.apply(a,[0,v.value.length].concat(Pe(o)))}},O=(0,r.computed)((function(){var e;return(null!==(e=d.value.limit)&&void 0!==e?e:0)>0})),_=d.value.sizeList||l,S=(0,r.computed)((function(){return O.value&&(d.value.limit?d.value.limit:0)<=v.value.length})),x=function(e,t){return e.disabled||S.value&&!v.value.includes(u(e,t))},E=function(e){return{"line-size":!0,"is-medium":"medium"===f.value,active:e.value===f.value}},N={marginRight:"12px"},L=(0,r.computed)((function(){return v.value.length>0&&!g.value.every((function(e,t){return v.value.includes(at(e,"field",[e,t]))}))})),A=(0,r.computed)((function(){return"boolean"!=typeof d.value.showLineHeight||d.value.showLineHeight}));return(0,r.watch)((function(){return[v.value]}),(function(){v.value.length||(c.value=!1),v.value.length&&g.value.every((function(e,t){return v.value.includes(u(e,t))}))&&(c.value=!0)}),{immediate:!0,deep:!0}),(0,r.watch)((function(){return[e.settings.checked]}),(function(){var e;(e=v.value).splice.apply(e,[0,v.value.length].concat(Pe(d.value.checked)))}),{immediate:!0,deep:!0}),function(){return e.settings?(0,r.createVNode)(Vt(),(0,r.mergeProps)({trigger:"manual",isShow:s.value,placement:"bottom-end",arrow:!0},{theme:m}),{default:function(){return(0,r.createVNode)("span",{class:"table-head-settings",onClick:w},[(0,r.createVNode)(jt.CogShape,{style:"color: #c4c6cc;"},null)])},content:function(){var e,t;return(0,r.createVNode)("div",{class:"setting-content"},[(0,r.createVNode)("div",{class:"setting-head"},[(0,r.createVNode)("span",{class:"head-title"},[a.value.setting.title]),(0,r.createVNode)(jt.CloseLine,{class:"icon-close-action",onClick:C},null)]),(0,r.createVNode)("div",{class:"setting-body"},[(0,r.createVNode)("div",{class:"setting-body-title"},[(0,r.createVNode)("div",null,[(0,r.createVNode)("span",{class:"field-setting-label"},[a.value.setting.fields.title]),O.value?(0,r.createVNode)("span",{class:"limit"},[a.value.setting.fields.subtitle(d.value.limit)]):""]),O.value?"":(0,r.createVNode)("span",{class:"check-all",onClick:T},[(0,r.createVNode)(Ot(),{label:a.value.setting.fields.selectAll,indeterminate:Boolean(L.value),modelValue:v.value.length>0},{default:function(){return[a.value.setting.fields.selectAll]}})])]),(0,r.createVNode)(Tt.BkCheckboxGroup,{class:"setting-body-fields",modelValue:v.value,"onUpdate:modelValue":function(e){return v.value=e}},Ft(e=g.value.map((function(e,t){var n;return(0,r.createVNode)("div",{class:"field-item"},[(0,r.createVNode)(Ot(),{checked:v.value.includes(u(e,t)),label:u(e,t),disabled:x(e,t)},Ft(n=at(e,["name","label"],[e,t]))?n:{default:function(){return[n]}})])})))?e:{default:function(){return[e]}}),null===(t=o.default)||void 0===t?void 0:t.call(o),A.value?(0,r.createVNode)("div",{class:"setting-body-line-height"},[a.value.setting.lineHeight.title,(0,r.createTextVNode)(":"),_.map((function(e){return(0,r.createVNode)("span",{class:E(e),onClick:function(){return function(e){f.value=e.value,p.value=e.height}(e)}},[e.label])}))]):""]),(0,r.createVNode)("div",{class:"setting-footer"},[(0,r.createVNode)(Mt(),{theme:"primary",style:N,onClick:b},{default:function(){return[a.value.setting.options.ok]}}),(0,r.createVNode)(Mt(),{style:N,onClick:C},{default:function(){return[a.value.setting.options.cancel]}})])])}}):""}}});function Wt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}const qt=function(e,t,n,a,c){var s=(0,wt.useLocale)("table"),g=(0,De.v4)(),b=(0,r.computed)((function(){return n.formatData})),T=(0,r.computed)((function(){return b.value.columns})),O=(0,r.computed)((function(){return b.value.settings})),_=(0,r.computed)((function(){return T.value.filter((function(e){return!n.getColumnAttribute(e,R)}))})),N=function(t,n){var o=O.value,r=o.size;return null!=o.height?at(O.value,"height",["tbody",t,n,r]):at(e,"rowHeight",["tbody",t,n])},L=function(e,t,o,r){return"index"===e.type?t(n.getRowAttribute(o,d),n.getRowAttribute(r,d)):t(o,r)},A=function(){var o=ct(e),i=o.cellFn,s={"--row-height":"".concat(at(o,"height",["thead"]),"px"),backgroundColor:e.thead.color},d=function(o,a){if("selection"===o.type)return X(U,null,!0);var l=[];o.sort&&l.push(function(e,o){var i=n.getColumnAttribute(e,C);return(0,r.createVNode)(Dt,{column:e,defaultSort:i,onChange:function(r,i){n.setColumnAttribute(e,C,i),n.setColumnAttribute(e,w,(function(t,n){return L(e,r,t,n)})),n.sortData(e),t.emit(_e.COLUMN_SORT,{column:e,index:o,type:i})}},null)}(o,a)),o.filter&&l.push(function(o,i){return(0,r.createVNode)(It,{column:o,height:e.headHeight,onChange:function(e,a){n.setColumnAttribute(o,S,(function(t,n){return a(e,t,n)})),n.filter(),t.emit(_e.COLUMN_FILTER,{checked:e,column:(0,r.unref)(o),index:i})},onFilterSave:function(e){t.emit(_e.COLUMN_FILTER_SAVE,{column:o,values:e})}},null)}(o,a));var u=function(e,t){return"function"==typeof i?i(e,t):"function"==typeof e.renderHead?e.renderHead(e,t):at(e,"label",[e,t])}(o,a);l.unshift((0,r.createVNode)("span",{class:"head-text"},[u]));var c="string"==typeof u?u:void 0,s={"has-sort":!!o.sort,"has-filter":!!o.filter};return(0,r.createVNode)(Nt,{class:s,title:c,observerResize:e.observerResize,resizerWay:e.resizerWay,isHead:!0,column:o,parentSetting:e.showOverflowTooltip,headExplain:at(o.explain,"head",[o])},Wt(l)?l:{default:function(){return[l]}})},f=Ve(e,n,c).resolveFixedColumnStyle,p=function(){if(a.value.hasScrollY){var e={width:"".concat(8,"px"),right:"-1px"};return(0,r.createVNode)("th",{style:e,class:"column_fixed"},null)}};return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("thead",{style:s},[(0,r.createVNode)(Lt,null,{default:function(){return[(0,r.createVNode)("tr",null,[_.value.map((function(o,i){var c,s,p,v,h=Object.assign({},f(o,a.value.hasScrollY),{"--background-color":I[null!==(s=null===(c=e.thead)||void 0===c?void 0:c.color)&&void 0!==s?s:u.DEF1]});return(0,r.createVNode)("th",(0,r.mergeProps)({colspan:1,rowspan:1,"data-id":n.getColumnId(o),class:[F(o,i),P(o),o.align||e.headerAlign||e.align],style:h,onClick:function(){return function(e,o){if(!n.getColumnAttribute(o,x)&&o.sort&&!o.filter){var i=n.getColumnAttribute(o,C),a=mt(i);n.setColumnAttribute(o,C,a),n.setColumnAttribute(o,w,(function(e,t){return L(o,ht(o,a),e,t)})),n.sortData(o),t.emit(_e.COLUMN_SORT,{column:(0,r.unref)(o),index:e,type:a})}}(i,o)}},(p=o,(v=n.getColumnAttribute(p,k))?Array.from(null==v?void 0:v.keys()).reduce((function(e,t){var n=t.split("_").slice(-1)[0];return Object.assign(e,l({},n,(function(e){v.get(t).forEach((function(t){return Reflect.apply(t,void 0,[e,p])}))})))}),{}):{})),[d(o,i)])})),p()])]}})])])},P=function(e,t){var n=e.className;if(n){if("function"==typeof n)return n(t);if("string"==typeof n)return n}return""},V=function(e){var t={},o=new WeakMap,i=n.getRowAttribute(G,m);return(0,r.createVNode)("tbody",null,[e.map((function(n,r){var a=D(n,r,t,e,o,i);return t=n,a}))])},j=Ve(e,n,c).resolveFixedColumnStyle,D=function(o,i,a,l,u,c){var s=l.length,d=[].concat(Pe(dt(e.rowStyle,[o,i])),[{"--row-height":"".concat(N(o,i),"px")}]),f=[].concat(Pe(dt(e.rowClass,[o,i])),["hover-".concat(e.rowHover),i%2==1&&e.stripe?"stripe-row":""]);return[(0,r.createVNode)(Lt,null,{default:function(){return[(0,r.createVNode)("tr",{style:d,class:f,key:ft(o,e,i),onClick:function(e){return z(e,o,i,l)},onDblclick:function(e){return W(e,o,i,l)},onMouseenter:function(e){return q(e,o,i,l)},onMouseleave:function(e){return B(e,o,i,l)}},[_.value.map((function(d,f){var v=[j(d)].concat(Pe(dt(e.cellStyle,[d,f,o,i]))),h=function(e,t,n,o){return{colspan:vt(e,t,n,o,"colspan"),rowspan:vt(e,t,n,o,"rowspan")}}(d,f,o,i),m=h.colspan,g=h.rowspan,y=n.getColumnAttribute(d,E).skipCol,b=c?function(e,t,n,o,r){var i,a;r.has(e)||r.set(e,new WeakMap),r.get(e).has(o)||r.get(e).set(o,{skipRowLen:0,skipRow:!1});var l=(null!==(a=null===(i=r.get(n))||void 0===i?void 0:i.get(o))&&void 0!==a?a:{}).skipRowLen,u=void 0===l?0:l,c=!1,s=vt(o,null,e,t,"rowspan");return u>1?(u-=1,c=!0):s>1&&(u=s,c=!1),Object.assign(r.get(e).get(o),{skipRowLen:u,skipRow:c}),{skipRowLen:u,skipRow:c}}(o,f,a,d,u):{skipRow:!1},C=b.skipRow,w={"expand-cell":"expand"===d.type};if(!C&&!y){var T,O=[M(d,f),P(d,o),d.align||e.align].concat(Pe(dt(e.cellClass,[d,f,o,i])),[{"expand-row":n.getRowAttribute(o,p),"is-last":i+g>=s}]),_=function(e,n){var r={event:e,row:o,column:d,cell:{getValue:function(){return $(o,d,i,l)}},rowIndex:i,columnIndex:f};t.emit(n,r)};return(0,r.createVNode)("td",{class:O,style:v,colspan:m,rowspan:g,onClick:function(e){return _(e,_e.CELL_CLICK)},onDblclick:function(e){return _(e,_e.CELL_DBL_CLICK)}},[(0,r.createVNode)(Nt,{class:w,column:d,row:o,parentSetting:e.showOverflowTooltip,observerResize:e.observerResize},Wt(T=$(o,d,i,l))?T:{default:function(){return[T]}})])}return null}))])]}}),H(o,f,i)]},H=function(e,o,i){var a,l,u;if(n.getRowAttribute(e,p)){var c=[].concat(Pe(o),[{row_expend:!0}]),s=n.getRowAttribute(e,f),d="".concat(s,"_expand");return(0,r.createVNode)(Lt,{key:d},{default:function(){return[(0,r.createVNode)("tr",{class:c},[(0,r.createVNode)("td",{colspan:_.value.length,rowspan:1},[null!==(u=null===(l=(a=t.slots).expandRow)||void 0===l?void 0:l.call(a,e))&&void 0!==u?u:(0,r.createVNode)("div",{class:"expand-cell-ctx"},[(0,r.createTextVNode)("Expand Row")])])])]}})}},M=function(e,t){var n;return Object.assign((l(n={},"".concat(g,"-column-").concat(t),!1),l(n,"column_fixed",!!e.fixed),l(n,"column_fixed_left",!!e.fixed),l(n,"column_fixed_right","right"===e.fixed),n),e.className?l({},"".concat(e.className),!0):{})},F=function(e,t){return Object.assign({},M(e,t))},z=function(e,n,o,r){t.emit(_e.ROW_CLICK,e,n,o,r)},W=function(e,n,o,r){t.emit(_e.ROW_DBL_CLICK,e,n,o,r)},q=function(e,n,o,r){t.emit(_e.ROW_MOUSE_ENTER,e,n,o,r)},B=function(e,n,o,r){t.emit(_e.ROW_MOUSE_LEAVE,e,n,o,r)},K=function(e,t,n,o){var r=st(e,at(t,"field",[t,e])),i=e;return t.render({cell:r,data:i,row:e,column:t,index:n,rows:o})},X=function(o,i){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.getRowAttribute(o,h),u=n.getRowAttribute(o,v),c=function(e,t){var n=t.row,o=t.index,r=t.isCheckAll;return"boolean"==typeof e.isRowSelectEnable?!1!==e.isRowSelectEnable:"function"!=typeof e.isRowSelectEnable||e.isRowSelectEnable({row:n,index:o,isCheckAll:r})}(e,{row:o,index:i,isCheckAll:a});return(0,r.createVNode)(Ot(),{onChange:function(r){if(a)return n.setRowSelectionAll(r),void t.emit(_e.ROW_SELECT_ALL,{checked:r,data:e.data});n.setRowSelection(o,r),t.emit(_e.ROW_SELECT,{row:o,index:i,checked:r,data:e.data})},disabled:!c,modelValue:u,indeterminate:l},null)},$=function(o,a,l,u){var c,s,f={expand:function(e,o,i,a){return function(e,o,i,a){var l,u,c;return(0,r.createVNode)("span",{class:"expand-btn-action",onClick:function(r){return function(e,o,r,i,a){n.setRowExpand(e,!n.getRowAttribute(e,p)),t.emit(_e.ROW_EXPAND_CLICK,{row:e,column:o,index:r,rows:i,e:a})}(e,o,i,a,r)}},["function"==typeof o.render?K(e,o,i,a):null!==(c=null===(u=(l=t.slots).expandCell)||void 0===u?void 0:u.call(l,{row:e,column:o,index:i,rows:a}))&&void 0!==c?c:function(e){return n.getRowAttribute(e,p)?(0,r.createVNode)(_t.DownShape,null,null):(0,r.createVNode)(_t.RightShape,null,null)}(e)])}(e,o,i,a)},selection:function(e,t,n,o){return X(e,n)}};return null!==(s=null===(c=f[a.type])||void 0===c?void 0:c.call(f,o,a,l,u))&&void 0!==s?s:function(){if("index"===at(a,"type",[a,o]))return n.getRowAttribute(o,d);var t=at(a,"field",[a,o]),c=st(o,t);if("function"==typeof a.render)return K(o,a,l,u);if("boolean"==typeof c)return String(c);if(!c&&"number"!=typeof c){var s=e.emptyCellText;if(s)return"function"==typeof s?s(o,a,l,u):s}return"object"===i(c)?JSON.stringify((0,r.unref)(c)):c}()},Y=function(){return(0,r.createVNode)("colgroup",null,[(_.value||[]).map((function(e,t){var i,a=(0,o.classes)({}),l="".concat((i=n.getColumnOrderWidth(e),lt(i,"auto"))).replace(/px$/i,""),u=n.getColumnAttribute(e,y);return(0,r.createVNode)("col",{class:a,width:l,style:{minWidth:lt(u,"auto")}},null)}))])};return{renderTableHeadSchema:function(){var o,i,a=ct(e).isShow;return void 0===a||a?[e.settings?(0,r.createVNode)(zt,{class:"table-head-settings",settings:e.settings,columns:T.value,rowHeight:e.rowHeight,onChange:function(o){var r=o.checked,i=void 0===r?[]:r,a=o.size,l=o.height,u=o.fields;n.formatData.settings.size=a,n.formatData.settings.height=l,i.length&&n.setColumnAttributeBySettings(e.settings,i),t.emit(_e.SETTING_CHANGE,{checked:i,size:a,height:l,fields:u})}},{default:function(){return[null===(i=(o=t.slots).setting)||void 0===i?void 0:i.call(o)]}}):"",(0,r.createVNode)("table",{cellpadding:0,cellspacing:0},[Y(),A()])]:null},renderTableBodySchema:function(n){var o,i,a,l=(0,r.computed)((function(){return void 0===e.emptyText?s.value.emptyText:e.emptyText}));return n.length?(0,r.createVNode)("table",{cellpadding:0,cellspacing:0,"data-table-uuid":g},[Y(),V(n)]):null!==(a=null===(i=(o=t.slots).empty)||void 0===i?void 0:i.call(o))&&void 0!==a?a:(0,r.createVNode)(Rt,{filterList:n,list:e.data,emptyText:l.value},null)},renderTableFooter:function(n){return(0,r.createVNode)(xt(),(0,r.mergeProps)({style:"width: 100%;"},n,{modelValue:n.current,onLimitChange:function(n){return function(n){Object.assign(e.pagination,{limit:n}),t.emit(_e.PAGE_LIMIT_CHANGE,n)}(n)},onChange:function(n){return function(n){Object.assign(e.pagination,{current:n,value:n}),t.emit(_e.PAGE_VALUE_CHANGE,n)}(n)}}),null)}}},Bt=(0,r.defineComponent)({name:"Table",props:ve,emits:Le,setup:function(e,t){var n=(0,r.ref)(),a=(0,r.ref)(),u=(0,r.ref)(),c=(0,r.ref)(0),s=new Se,d=(0,r.reactive)([]),f=bt(e,d),p=f.initColumns,v=(0,f.getColumns)(),h=yt(e),m=function(e){var t,n,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,a=e.formatData,u=e.getColumnAttribute,c=e.getColumnOrderWidth,s=e.setColumnAttribute,d=function(e){return u(e,k)};!function(e){e.MOUSE_MOVE="onMousemove",e.MOUSE_OUT="onMouseout",e.MOUSE_DOWN="onMousedown"}(n||(n={}));var f=!1,p=!1,v=!1,h=0,m=null,g=0,b=(0,r.ref)(-1e3),C=[A,L],w=function(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault()},T=function t(n){var o;w(n),p=!1,v=!1,document.body.style.cursor="";var r=n.clientX-h,a=c(m,C)+r,l=c(m,[y]);s(m,A,a>l?a:l),setTimeout((function(){return e.setAllColumnAttribute(x,!1)})),document.removeEventListener("mouseup",t),document.removeEventListener("mousemove",_),h=0,b.value=-1e3,m=null;var u=null===(o=i.value)||void 0===o?void 0:o.querySelector("table");null==u||u.querySelectorAll("th").forEach((function(e){return e.style.setProperty("user-select","inherit")}))},O=function(e){return(0,Ae.throttle)((function(){var t=e.clientX-h,n=c(m,C)+t;c(m,[y])<n&&(b.value=e.clientX-h+g)}),60)},_=function(e){document.body.style.setProperty("cursor",""),O(e)(),w(e)},S=function e(t,n){var o,r;(0,Ae.isElement)(t)&&(null===(o=t.style)||void 0===o||o.setProperty("cursor",n),(null===(r=t.childNodes)||void 0===r?void 0:r.length)>0&&t.childNodes.forEach((function(t){return e(t,n)})))},E=(l(t={},n.MOUSE_DOWN,(function(t,n){if(f){p=!0;var o=t.target.closest("th");e.setColumnAttribute(n,x,!0),e.setColumnAttribute(n,L,o.scrollWidth),document.body.style.setProperty("cursor","col-resize"),m=n,h=t.clientX;var r=t.target.closest("table");g=h-r.getBoundingClientRect().left,O(t)(),document.addEventListener("mouseup",T),document.addEventListener("mousemove",_)}})),l(t,n.MOUSE_MOVE,(function(e,t){p&&!v&&(v=!0);var n=e.target.closest("th");if(v&&(n.style.setProperty("user-select","none"),n.classList.remove("col-resize-hover")),!v){if(!n)return void n.classList.remove("col-resize-hover");var o=n.getBoundingClientRect();o.width>12&&o.right-e.pageX<8?(f=!0,S(n,"col-resize"),n.classList.add("col-resize-hover")):(S(n,""),n.classList.remove("col-resize-hover"),f=!1)}})),l(t,n.MOUSE_OUT,(function(e,t){var n=e.target.closest("th");v||(S(n,""),n.classList.remove("col-resize-hover"))})),t),N=function(e){return"".concat("HeadColumnResize","_").concat(e)},R=function(){a.columns.forEach((function(e){if(!1!==e.resizable){var t=d(e);Object.keys(E).forEach((function(e){var n=N(e);(null==t?void 0:t.has(n))||t.set(n,[]),t.get(n).push(E[e])}))}}))};o&&R();var P={position:"absolute",top:0,bottom:0,left:0,width:"1px",backgroundColor:"#3785FF",transform:"translateX(-50%)"},V=(0,r.computed)((function(){return e.formatData.layout})),I=(0,r.computed)((function(){return Object.assign(Object.assign({},P),{transform:"translate(".concat(b.value-V.value.translateX+3,"px, ").concat(V.value.translateY,"px)")})})),j=(0,r.computed)((function(){return Object.assign(Object.assign({},P),{width:"6px",transform:"translateX(".concat(b.value-V.value.translateX,"px)")})}));return{registerResizeEvent:R,resetResizeEvents:function(){a.columns.forEach((function(e){var t=d(e);Object.keys(E).forEach((function(e){var n=N(e);(null==t?void 0:t.has(n))&&(t.get(n).length=0)}))}))},dragOffsetX:b,dragOffsetXStyle:P,resizeColumnStyle:I,resizeHeadColStyle:j}}(h,!1,a),g=m.resizeColumnStyle,b=m.resizeHeadColStyle,C=m.registerResizeEvent;(0,r.provide)(D,p),(0,r.provide)(H,s);var w=Ct(e,v,n,h,h.pageData),T=w.tableClass,O=w.headClass,_=w.footerClass,S=w.wrapperStyle,E=w.contentStyle,N=w.headStyle,R=w.hasScrollYRef,P=w.hasFooter,V=w.footerStyle,I=w.tableBodyClass,j=w.fixedBottomBorder,M=w.resizeColumnClass,F=w.tableBodyContentClass,z=w.loadingRowClass,W=w.columnGhostStyle,q=w.fixedContainerStyle,B=w.scrollClass,U=w.prependStyle,G=function(e,t){var n=(0,r.toRef)(e,"scrollLoading"),o=(0,r.computed)((function(){return null!==n.value&&("boolean"==typeof n.value&&n.value||"object"===i(n.value))}));return{renderScrollLoading:function(){var e,i,a;if(o.value){var l="boolean"==typeof n.value?{loading:!!n.value,inline:!0,title:"",size:Ie.BkLoadingSize.Normal,mode:Ie.BkLoadingMode.Default,indicator:null}:n.value,u=l.loading,c=l.size,s=l.mode,d=l.title,f=l.inline,p=l.indicator;return null!==(a=null===(i=(e=t.slots).fixedBottom)||void 0===i?void 0:i.call(e))&&void 0!==a?a:(0,r.createVNode)(je(),{loading:u,size:c,mode:s,title:d,inline:f,indicator:p},null)}}}}(e,t).renderScrollLoading,K=Ve(e,h,a),X=K.fixedWrapperClass,$=K.fixedColumns,Y=K.resolveFixedColumns,Z=K.updateFixClass,J=(0,ge.usePrefix)().resolveClassName,Q=(0,r.computed)((function(){return{hasScrollY:R.value}})),ee=qt(e,t,h,Q,a),te=ee.renderTableBodySchema,ne=ee.renderTableFooter,oe=ee.renderTableHeadSchema,re=function(){var e=n.value.querySelector(".".concat(J("table-body-content"))),t=e.querySelector("table");if(t){var o=t.scrollWidth,r=e.clientWidth;c.value=o-r}};(0,r.watch)((function(){return[e.data,v]}),(function(){h.formatColumns(v),h.formatDataSchema(e.data),h.resetStartEndIndex(),h.resolvePageData(),C(),(0,r.nextTick)((function(){re(),Y(c.value)}))}),{immediate:!0,deep:!0});var ie=function(e){var n,r=null!==(n=h.formatData.layout.bottom)&&void 0!==n?n:0,i=e[1],a=i.translateX,l=i.translateY,u=i.pos,s=void 0===u?{}:u;h.formatData.layout.translateY=l,h.formatData.layout.translateX=a,Object.assign(h.formatData.layout,s||{});var d=s.bottom;d<=2&&r>d&&(0,o.debounce)(60,(function(){t.emit(_e.SCROLL_BOTTOM,Object.assign(Object.assign({},s),{translateX:a,translateY:l}))}),!0)(),re(),Z(c.value)};return t.expose({setRowExpand:h.setRowExpand,setAllRowExpand:h.setAllRowExpand,clearSelection:h.clearSelection,toggleAllSelection:h.toggleAllSelection,toggleRowSelection:h.toggleRowSelection,getSelection:h.getRowSelection,clearSort:h.clearColumnSort,scrollTo:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0};null===(t=null===(e=u.value)||void 0===e?void 0:e.scrollTo)||void 0===t||t.call(e,n)},getRoot:function(){return n.value}}),function(){var o,i;return(0,r.createVNode)("div",{class:T.value,style:S.value,ref:n},[(0,r.createVNode)("div",{class:O,style:N.value,ref:a},[oe(),(0,r.createVNode)("div",{class:"col-resize-drag",style:b.value},null)]),(0,r.createVNode)(be(),(0,r.mergeProps)({ref:u,lineHeight:h.formatData.settings.height,height:E.height,class:I.value,wrapperStyle:E,list:h.pageData},B.value,{contentClassName:F.value,onContentScroll:ie,throttleDelay:120,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:function(){return t.slots.prepend?(0,r.createVNode)("div",{style:U.value,class:"prepend-row"},[t.slots.prepend()]):null},default:function(e){return te(e.data)},afterSection:function(){return[(0,r.createVNode)("div",{class:j.value},null),(0,r.createVNode)("div",{class:M,style:g.value},null)]}}),(0,r.createVNode)("div",{class:X,style:q.value},[$.map((function(e){var t=e.isExist,n=e.className,o=e.style;return t?"":(0,r.createVNode)("div",{class:n,style:o},null)})),(0,r.createVNode)("div",{class:z},[G()])]),(0,r.createVNode)("div",{class:_.value,style:V.value},[P.value&&ne(h.localPagination.value)]),(0,r.createVNode)("div",{style:W},[null===(i=(o=t.slots).default)||void 0===i?void 0:i.call(o)])])}}});var Ut=(0,o.withInstallProps)(Bt,{Column:me});const Gt=Ut})(),_})()));
|
@@ -1,18 +1,16 @@
|
|
1
|
+
import { Ref } from 'vue';
|
1
2
|
import { Column, TablePropTypes } from '../props';
|
2
3
|
import { ITableResponse } from '../use-attributes';
|
3
4
|
/**
|
4
5
|
* 固定列Hooks
|
5
6
|
*/
|
6
|
-
declare const _default: (props: TablePropTypes, tableResp: ITableResponse,
|
7
|
+
declare const _default: (props: TablePropTypes, tableResp: ITableResponse, head?: Ref<HTMLElement>) => {
|
7
8
|
fixedWrapperClass: string;
|
8
9
|
resolveFixedColumnStyle: (column: Column, hasScrollY?: boolean) => {
|
9
10
|
[x: string]: string;
|
10
11
|
};
|
11
|
-
|
12
|
-
|
13
|
-
colPos: string;
|
14
|
-
column: Column;
|
15
|
-
}[]>;
|
12
|
+
resolveFixedColumns: (tableOffsetRight: any) => void;
|
13
|
+
fixedColumns: any[];
|
16
14
|
resolveColumnStyle: (colPos: string) => {
|
17
15
|
width: string;
|
18
16
|
backgroundColor: string;
|
@@ -24,5 +22,6 @@ declare const _default: (props: TablePropTypes, tableResp: ITableResponse, hasSc
|
|
24
22
|
column_fixed_right: boolean;
|
25
23
|
shadow: boolean;
|
26
24
|
};
|
25
|
+
updateFixClass: (tableOffsetRight: any) => void;
|
27
26
|
};
|
28
27
|
export default _default;
|
package/lib/table/table.css
CHANGED
package/lib/table/table.less
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { IEmptyObject } from './const';
|
2
2
|
import { Column, Settings, SortScope, TablePropTypes } from './props';
|
3
3
|
export type ITableFormatData = {
|
4
4
|
data: any[];
|
@@ -38,7 +38,7 @@ export type ITableResponse = {
|
|
38
38
|
clearSelection: () => void;
|
39
39
|
clearColumnSort: (reset?: boolean) => void;
|
40
40
|
setColumnSortActive: (column: Column, active: boolean) => void;
|
41
|
-
getRowAttribute: (row: any |
|
41
|
+
getRowAttribute: (row: any | IEmptyObject, attrName: string) => any;
|
42
42
|
getRowSelection: () => any[];
|
43
43
|
resolveColumnWidth: (root: HTMLElement, autoWidth?: any, offsetWidth?: any) => void;
|
44
44
|
filter: () => void;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { SetupContext } from 'vue';
|
2
2
|
import { TablePropTypes } from './props';
|
3
3
|
import { ITableResponse } from './use-attributes';
|
4
|
-
declare const _default: (props: TablePropTypes, context: SetupContext<any>, tableResp: ITableResponse, styleRef: any) => {
|
4
|
+
declare const _default: (props: TablePropTypes, context: SetupContext<any>, tableResp: ITableResponse, styleRef: any, head: any) => {
|
5
5
|
renderTableHeadSchema: () => (string | JSX.Element)[];
|
6
6
|
renderTableBodySchema: (rows: any[]) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
7
7
|
[key: string]: any;
|
@@ -191,6 +191,9 @@
|
|
191
191
|
border-radius: 2px;
|
192
192
|
box-sizing: border-box;
|
193
193
|
}
|
194
|
+
.bk-tag-input .bk-tag-input-trigger .tag-list .text:hover {
|
195
|
+
background-color: #dcdee5;
|
196
|
+
}
|
194
197
|
.bk-tag-input .bk-tag-input-trigger .tag-list .tag-input {
|
195
198
|
width: 10px;
|
196
199
|
height: 22px;
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","lodash"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("lodash")):t(e["../shared"],e.vue,e["../config-provider"],e.lodash);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o,r)=>(()=>{"use strict";var n={2717:e=>{e.exports=o},4212:t=>{t.exports=e},467:e=>{e.exports=r},748:e=>{e.exports=t}},l={};function i(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{i.r(s),i.d(s,{default:()=>m});var e=i(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function o(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,o):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n=i(748),l=i(2717),a={onContentScroll:Function},u=Object.assign({list:e.PropTypes.array.def([]),enabled:e.PropTypes.bool.def(!0),scrollEvent:e.PropTypes.bool.def(!1),lineHeight:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.func]).def(30),minHeight:e.PropTypes.number.def(30),maxHeight:e.PropTypes.number,height:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),width:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),className:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentClassName:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentStyle:e.PropTypes.object.def({}),scrollXName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-x")),scrollYName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-y")),groupItemCount:e.PropTypes.number.def(1),preloadItemCount:e.PropTypes.number.def(1),renderAs:e.PropTypes.string.def("div"),contentAs:e.PropTypes.string.def("div"),scrollOffsetTop:e.PropTypes.number.def(0),scrollPosition:e.PropTypes.string.def("content"),abosuteHeight:e.PropTypes.oneOfType([e.PropTypes.string.def("auto"),e.PropTypes.number]).def("auto"),throttleDelay:e.PropTypes.number.def(60),rowKey:e.PropTypes.string.def(void 0),keepAlive:e.PropTypes.bool.def(!1),autoReset:e.PropTypes.bool.def(!0),wrapperStyle:e.PropTypes.any.def({})},a);function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(l=n.key,i=void 0,i=function(e,t){if("object"!==r(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(l),"symbol"===r(i)?i:String(i)),n)}var l,i}var p=i(467);function f(e,t,o,r){for(var n=0,l=0,i=0,s=0;n<e;n++){if(l+(s=r(n,[n*o,(n+1)*o,"virtual"]))>t){i=t-l;break}l+=s}return{startIndex:n,height:l,diffHeight:i}}function d(e,t,o,r,n){if(r){var l=r.scrollTop,i=r.scrollLeft,s=o.scrollTop,a=o.count,u=o.groupItemCount,c=o.startIndex,p=o.endIndex,d=o.scrollLeft,v=r.offsetHeight,y=0,h=0,g=0;if("number"==typeof e&&(y=Math.floor(l/e),h=Math.ceil(v/e)+y,g=l%e),"function"==typeof e){var m=f(a,l,u,e);y=m.startIndex>0?m.startIndex:0,g=m.diffHeight,h=f(a,v,u,e).startIndex+y+1}if(l!==s||y!==c||h!==p||d!==i){var b=r.scrollHeight-r.offsetHeight-r.scrollTop;"function"==typeof t&&t(n,y,h,l,g,i,{bottom:b>=0?b:0})}}}var v=function(){function e(t,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.binding=t,this.wrapper=o.parentNode;var r=t.value.throttleDelay;this.delay=r}var t,o;return t=e,(o=[{key:"render",value:function(e){var t=this.binding.value,o=t.lineHeight,r=void 0===o?30:o,n=t.handleScrollCallback,l=t.pagination,i=void 0===l?{}:l;if(t.onlyScroll){var s=this.wrapper.scrollTop,a=this.wrapper.scrollLeft,u=this.wrapper.scrollHeight-this.wrapper.offsetHeight-this.wrapper.scrollTop;n(e,null,null,s,s,a,{bottom:u>=0?u:0})}else{var c=i.startIndex,p=i.endIndex,f=i.groupItemCount,v=i.count;d(r,n,{scrollTop:i.scrollTop,startIndex:c,endIndex:p,groupItemCount:f,count:v,scrollLeft:i.scrollLeft},this.wrapper,e)}}},{key:"executeThrottledRender",value:function(e){(0,p.throttle)(this.render.bind(this),this.delay)(e)}},{key:"setBinding",value:function(e){this.binding=e}}])&&c(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),e}(),y=null;const h={mounted:function(e,t){var o=e.parentNode;y=new v(t,e),o.addEventListener("scroll",y.executeThrottledRender.bind(y))},updated:function(e,t){null==y||y.setBinding(t)},unbind:function(e){if(e){var t=e.parentNode;if(!t||!y)return;t.removeEventListener("scroll",y.executeThrottledRender)}}},g=(0,n.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:h},props:u,emits:["content-scroll"],slots:Object,setup:function(e,t){var i=this,s=e.renderAs,a=e.contentAs,u=function(e){return"string"==typeof e?[e]:"object"!==r(e)||Array.isArray(e)?e:[e]};if(!e.enabled){var c=function(e,t){var o=e.renderAs,r=e.contentAs,l=(0,n.resolveDirective)("bkVirtualRender"),i={lineHeight:e.lineHeight,handleScrollCallback:function(e,o,r,n,l,i,s){t.emit("content-scroll",[e,{translateY:l,translateX:i,pos:s}])},pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent},s=(0,n.ref)(null),a=(0,n.computed)((function(){var t,o="number"==typeof e.height?"".concat(e.height,"px"):e.height;return Object.assign({height:o,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block",maxHeight:null!==(t=e.maxHeight)&&void 0!==t?t:o},e.wrapperStyle)}));return t.expose({scrollTo:function(e){var t=e.left,o=void 0===t?0:t,r=e.top,n=void 0===r?0:r;s.value.scrollTo(o,n)}}),{rendAsTag:function(){var u,c,p,f,d,v,y,h,g,m,b,T;return(0,n.h)(o,{class:e.className,style:a.value,ref:s},[null!==(p=null===(c=(u=t.slots).beforeContent)||void 0===c?void 0:c.call(u))&&void 0!==p?p:"",(0,n.withDirectives)((0,n.h)(r,{class:e.contentClassName,style:e.contentStyle},[null!==(v=null===(d=(f=t.slots).default)||void 0===d?void 0:d.call(f,{data:e.list}))&&void 0!==v?v:""]),[[l,i]]),null!==(g=null===(h=(y=t.slots).afterContent)||void 0===h?void 0:h.call(y))&&void 0!==g?g:"",null!==(T=null===(b=(m=t.slots).afterSection)||void 0===b?void 0:b.call(m))&&void 0!==T?T:""])}}}(e,t);return c.rendAsTag}var p=(0,n.ref)(null),f=(0,n.reactive)({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),v=function(e,o,r,n,l,i,s){f.startIndex=o,f.endIndex=r,f.scrollTop=n,f.translateY=l,f.translateX=i,f.scrollLeft=i,f.pos=s,t.emit("content-scroll",[e,f])};(0,n.onMounted)((function(){(0,n.nextTick)((function(){m(e.list),b()}))})),(0,n.watch)((function(){return[e.lineHeight,e.list]}),(function(){var t;t={left:f.scrollLeft,top:f.scrollTop},y(),b(),e.keepAlive&&A(t)}),{deep:!0});var y=function(){m(e.list)},h=(0,n.ref)(0),g=(0,n.ref)(0),m=function(t){if(h.value=Math.ceil((t||[]).length/e.groupItemCount),f.count=h.value,f.startIndex=0,f.endIndex=0,f.translateY=0,f.scrollTop=0,"string"==typeof e.abosuteHeight&&"auto"===e.abosuteHeight)if("function"==typeof e.lineHeight){g.value=0;for(var o=0,r=0;r<h.value;r++){var n=e.lineHeight.call(i,r,t.slice(r*e.groupItemCount,e.groupItemCount));o+="number"==typeof n?n:0}g.value=o}else g.value=e.lineHeight*h.value,console.log("innerHeight",e.lineHeight,g.value);else g.value=e.abosuteHeight},b=function(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},r=null===(t=p.value)||void 0===t?void 0:t.parentNode;d(e.lineHeight,v,f,r,null),o&&p.value&&e.autoReset&&A(o)},T=(0,n.computed)((function(){return void 0!==e.rowKey?e.list:(e.list||[]).map((function(e,t){return Object.assign(Object.assign({},e),{$index:t})}))})),P=(0,n.computed)((function(){return T.value.slice(f.startIndex*e.groupItemCount,(f.endIndex+e.preloadItemCount)*e.groupItemCount)})),x=(0,n.computed)((function(){return"content"===e.scrollPosition?{top:"".concat(f.scrollTop+e.scrollOffsetTop,"px"),transform:"translateY(-".concat(f.translateY,"px)")}:{}})),w=(0,n.computed)((function(){var t,o="number"==typeof e.height?"".concat(e.height,"px"):e.height;return Object.assign(Object.assign({height:o,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block",maxHeight:null!==(t=e.maxHeight)&&void 0!==t?t:o},"container"===e.scrollPosition?x.value:{}),e.wrapperStyle)})),I=(0,n.computed)((function(){var t="number"==typeof e.abosuteHeight&&0===e.abosuteHeight;return{height:"".concat(g.value<e.minHeight?e.minHeight:g.value,"px"),display:t?"none":"block"}})),H=(0,l.usePrefix)().resolveClassName,S=(0,n.computed)((function(){return[H("virtual-render"),e.scrollXName,e.scrollYName].concat(o(u(e.className)),["container"===e.scrollPosition?H("virtual-content"):""])})),j=(0,n.computed)((function(){return["content"===e.scrollPosition?H("virtual-content"):""].concat(o(u(e.contentClassName)))})),C=(0,n.resolveDirective)("bkVirtualRender"),O=(0,n.computed)((function(){return{lineHeight:e.lineHeight,handleScrollCallback:v,pagination:f,throttleDelay:e.throttleDelay}})),A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},t=e.left,o=e.top;p.value.scrollTo(t,o)};return t.expose({reset:function(){y(),b()},scrollTo:A}),function(){var o,r,l,i,u,c,f,d,v,y,h,g;return(0,n.h)(s||"div",{ref:p,class:S.value,style:w.value},[null!==(l=null===(r=(o=t.slots).beforeContent)||void 0===r?void 0:r.call(o))&&void 0!==l?l:"",(0,n.withDirectives)((0,n.h)(a||"div",{class:j.value,style:Object.assign(Object.assign({},x.value),e.contentStyle)},[null!==(c=null===(u=(i=t.slots).default)||void 0===u?void 0:u.call(i,{data:P.value}))&&void 0!==c?c:""]),[[C,O.value]]),null!==(v=null===(d=(f=t.slots).afterContent)||void 0===d?void 0:d.call(f))&&void 0!==v?v:"",(0,n.h)("div",{class:[H("virtual-section")],style:I.value}),null!==(g=null===(h=(y=t.slots).afterSection)||void 0===h?void 0:h.call(y))&&void 0!==g?g:""])}}}),m=(0,e.withInstall)(g)})(),s})()));
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","lodash"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("lodash")):t(e["../shared"],e.vue,e["../config-provider"],e.lodash);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n,o)=>(()=>{"use strict";var r={2717:e=>{e.exports=n},4212:t=>{t.exports=e},467:e=>{e.exports=o},748:e=>{e.exports=t}},l={};function i(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{i.r(a),i.d(a,{default:()=>m});var e=i(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function n(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var r=i(748),l=i(2717),s={onContentScroll:Function},u=Object.assign({list:e.PropTypes.array.def([]),enabled:e.PropTypes.bool.def(!0),scrollEvent:e.PropTypes.bool.def(!1),lineHeight:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.func]).def(30),minHeight:e.PropTypes.number.def(30),maxHeight:e.PropTypes.number,height:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),width:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),className:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentClassName:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentStyle:e.PropTypes.object.def({}),scrollXName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-x")),scrollYName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-y")),groupItemCount:e.PropTypes.number.def(1),preloadItemCount:e.PropTypes.number.def(1),renderAs:e.PropTypes.string.def("div"),contentAs:e.PropTypes.string.def("div"),scrollOffsetTop:e.PropTypes.number.def(0),scrollPosition:e.PropTypes.string.def("content"),abosuteHeight:e.PropTypes.oneOfType([e.PropTypes.string.def("auto"),e.PropTypes.number]).def("auto"),throttleDelay:e.PropTypes.number.def(60),rowKey:e.PropTypes.string.def(void 0),keepAlive:e.PropTypes.bool.def(!1),autoReset:e.PropTypes.bool.def(!0),wrapperStyle:e.PropTypes.any.def({})},s);function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(l=r.key,i=void 0,i=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(l),"symbol"===o(i)?i:String(i)),r)}var l,i}var p=i(467);function d(e,t,n,o){for(var r=0,l=0,i=0,a=0;r<e;r++){if(l+(a=o(r,[r*n,(r+1)*n,"virtual"]))>t){i=t-l;break}l+=a}return{startIndex:r,height:l,diffHeight:i}}function f(e,t,n,o,r,l){if(o){var i=o.scrollTop,a=o.scrollLeft,s=n.scrollTop,u=n.count,c=n.groupItemCount,p=n.startIndex,f=n.endIndex,v=n.scrollLeft,y=/^\d+(\.\d*)?$/.test(l)?l:o.offsetHeight,h=0,g=0,m=0;if("number"==typeof e&&(h=Math.floor(i/e),g=Math.ceil(y/e)+h,m=i%e),"function"==typeof e){var b=d(u,i,c,e);h=b.startIndex>0?b.startIndex:0,m=b.diffHeight,g=d(u,y,c,e).startIndex+h+1}if(i!==s||h!==p||g!==f||v!==a){var T=o.scrollHeight-o.offsetHeight-o.scrollTop;"function"==typeof t&&t(r,h,g,i,m,a,{bottom:T>=0?T:0})}return{targetStartIndex:h,targetEndIndex:g,elScrollTop:i,translateY:m,elScrollLeft:a}}}var v=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.binding=t,this.wrapper=n;var o=t.value.throttleDelay;this.delay=o}var t,n;return t=e,(n=[{key:"render",value:function(e){var t=this.binding.value,n=t.lineHeight,o=void 0===n?30:n,r=t.handleScrollCallback,l=t.pagination,i=void 0===l?{}:l;if(t.onlyScroll){var a=this.wrapper.scrollTop,s=this.wrapper.scrollLeft,u=this.wrapper.scrollHeight-this.wrapper.offsetHeight-this.wrapper.scrollTop;r(e,null,null,a,a,s,{bottom:u>=0?u:0})}else{var c=i.startIndex,p=i.endIndex,d=i.groupItemCount,v=i.count,y=i.scrollTop,h=i.scrollLeft,g=this.binding.height;f(o,r,{scrollTop:y,startIndex:c,endIndex:p,groupItemCount:d,count:v,scrollLeft:h},this.wrapper,e,g)}}},{key:"executeThrottledRender",value:function(e){(0,p.throttle)(this.render.bind(this),this.delay)(e)}},{key:"install",value:function(){var e;null===(e=this.wrapper)||void 0===e||e.addEventListener("scroll",this.executeThrottledRender.bind(this))}},{key:"uninstall",value:function(){var e,t;null===(t=null===(e=this.wrapper)||void 0===e?void 0:e.removeListener)||void 0===t||t.call(e,"scroll",this.executeThrottledRender.bind(this))}},{key:"setBinding",value:function(e){this.binding=e}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),y=null;const h={mounted:function(e,t){var n=e.parentNode;y=new v(t,e),n.addEventListener("scroll",y.executeThrottledRender.bind(y))},updated:function(e,t){null==y||y.setBinding(t)},unbind:function(e){if(e){var t=e.parentNode;if(!t||!y)return;t.removeEventListener("scroll",y.executeThrottledRender)}}},g=(0,r.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:h},props:u,emits:["content-scroll"],slots:Object,setup:function(e,t){var i=this,a=e.renderAs,s=e.contentAs,u=function(e){return"string"==typeof e?[e]:"object"!==o(e)||Array.isArray(e)?e:[e]};if(!e.enabled){var c=function(e,t){var n=e.renderAs,o=e.contentAs,l=function(e,n,o,r,l,i,a){t.emit("content-scroll",[e,{translateY:l,translateX:i,pos:a}])},i=null,a=(0,r.computed)((function(){return{lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent}})),s=(0,r.ref)(null),u=(0,r.computed)((function(){var t,n="number"==typeof e.height?"".concat(e.height,"px"):e.height;return Object.assign({height:n,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block",maxHeight:null!==(t=e.maxHeight)&&void 0!==t?t:n},e.wrapperStyle)}));return t.expose({scrollTo:function(e){var t=e.left,n=void 0===t?0:t,o=e.top,r=void 0===o?0:o;s.value.scrollTo(n,r)}}),(0,r.onMounted)((function(){(i=new v(a,s.value)).install()})),(0,r.onUnmounted)((function(){null==i||i.uninstall()})),{rendAsTag:function(){var l,i,a,c,p,d,f,v,y,h,g,m;return(0,r.h)(n,{class:e.className,style:u.value,ref:s},[null!==(a=null===(i=(l=t.slots).beforeContent)||void 0===i?void 0:i.call(l))&&void 0!==a?a:"",(0,r.h)(o,{class:e.contentClassName,style:e.contentStyle},[null!==(d=null===(p=(c=t.slots).default)||void 0===p?void 0:p.call(c,{data:e.list}))&&void 0!==d?d:""]),null!==(y=null===(v=(f=t.slots).afterContent)||void 0===v?void 0:v.call(f))&&void 0!==y?y:"",null!==(m=null===(g=(h=t.slots).afterSection)||void 0===g?void 0:g.call(h))&&void 0!==m?m:""])}}}(e,t);return c.rendAsTag}var p=(0,r.computed)((function(){return{lineHeight:e.lineHeight,handleScrollCallback:g,pagination:h,throttleDelay:e.throttleDelay}})),d=(0,r.ref)(null),y=null,h=(0,r.reactive)({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),g=function(e,n,o,r,l,i,a){h.startIndex=n,h.endIndex=o,h.scrollTop=r,h.translateY=l,h.translateX=i,h.scrollLeft=i,Object.assign(h.pos,a||{}),e&&t.emit("content-scroll",[e,h])};(0,r.onMounted)((function(){(y=new v(p,d.value)).install()})),(0,r.onUnmounted)((function(){null==y||y.uninstall()}));var m=(0,r.computed)((function(){return/^\d+(\.\d*)?(px)?$/.test("".concat(e.height))?Number("".concat(e.height).replace(/px$/,"")):e.height}));(0,r.watch)((function(){return[e.lineHeight,e.height,e.list]}),(function(){null==y||y.setBinding(p),b(),(0,r.nextTick)((function(){w()}))}),{deep:!0});var b=function(){x(e.list)},T=(0,r.ref)(0),P=(0,r.ref)(0),x=function(t){if(T.value=Math.ceil((t||[]).length/e.groupItemCount),h.count=T.value,"string"==typeof e.abosuteHeight&&"auto"===e.abosuteHeight)if("function"==typeof e.lineHeight){P.value=0;for(var n=0,o=0;o<T.value;o++){var r=e.lineHeight.call(i,o,t.slice(o*e.groupItemCount,e.groupItemCount));n+="number"==typeof r?r:0}P.value=n}else P.value=e.lineHeight*T.value;else P.value=e.abosuteHeight},w=function(){var t=d.value,n=f(e.lineHeight,g,h,t,null,m.value),o=n.targetStartIndex,r=n.targetEndIndex,l=n.elScrollTop,i=n.translateY,a=n.elScrollLeft;g(null,o,r,l,i,a,{})},S=(0,r.computed)((function(){return void 0!==e.rowKey?e.list:(e.list||[]).map((function(e,t){return Object.assign(Object.assign({},e),{$index:t})}))})),I=(0,r.computed)((function(){return S.value.slice(h.startIndex*e.groupItemCount,(h.endIndex+e.preloadItemCount)*e.groupItemCount)})),H=(0,r.computed)((function(){return"content"===e.scrollPosition?{top:"".concat(h.scrollTop+e.scrollOffsetTop,"px"),transform:"translateY(-".concat(h.translateY,"px)")}:{}})),j=(0,r.computed)((function(){var t,n="number"==typeof e.height?"".concat(e.height,"px"):e.height;return Object.assign(Object.assign({height:n,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block",maxHeight:null!==(t=e.maxHeight)&&void 0!==t?t:n},"container"===e.scrollPosition?H.value:{}),e.wrapperStyle)})),O=(0,r.computed)((function(){var t="number"==typeof e.abosuteHeight&&0===e.abosuteHeight;return{height:"".concat(P.value<e.minHeight?e.minHeight:P.value,"px"),display:t?"none":"block"}})),C=(0,l.usePrefix)().resolveClassName,A=(0,r.computed)((function(){return[C("virtual-render"),e.scrollXName,e.scrollYName].concat(n(u(e.className)),["container"===e.scrollPosition?C("virtual-content"):""])})),k=(0,r.computed)((function(){return["content"===e.scrollPosition?C("virtual-content"):""].concat(n(u(e.contentClassName)))}));return t.expose({reset:function(){b(),w()},scrollTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},t=e.left,n=e.top;d.value.scrollTo(t,n)}}),function(){var n,o,l,i,u,c,p,f,v,y,h,g;return(0,r.h)(a||"div",{ref:d,class:A.value,style:j.value},[null!==(l=null===(o=(n=t.slots).beforeContent)||void 0===o?void 0:o.call(n))&&void 0!==l?l:"",(0,r.h)(s||"div",{class:k.value,style:Object.assign(Object.assign({},H.value),e.contentStyle)},[null!==(c=null===(u=(i=t.slots).default)||void 0===u?void 0:u.call(i,{data:I.value}))&&void 0!==c?c:""]),null!==(v=null===(f=(p=t.slots).afterContent)||void 0===f?void 0:f.call(p))&&void 0!==v?v:"",(0,r.h)("div",{class:[C("virtual-section")],style:O.value}),null!==(g=null===(h=(y=t.slots).afterSection)||void 0===h?void 0:h.call(y))&&void 0!==g?g:""])}}}),m=(0,e.withInstall)(g)})(),a})()));
|
@@ -1,4 +1,21 @@
|
|
1
|
-
export declare function computedVirtualIndex(lineHeight: any, callback: any, pagination: any, el: any, event: any):
|
1
|
+
export declare function computedVirtualIndex(lineHeight: any, callback: any, pagination: any, el: any, event: any, height: any): {
|
2
|
+
targetStartIndex: number;
|
3
|
+
targetEndIndex: number;
|
4
|
+
elScrollTop: any;
|
5
|
+
translateY: number;
|
6
|
+
elScrollLeft: any;
|
7
|
+
};
|
8
|
+
export declare class VisibleRender {
|
9
|
+
private binding;
|
10
|
+
private wrapper;
|
11
|
+
private delay;
|
12
|
+
constructor(binding: any, el: any);
|
13
|
+
render(e: any): void;
|
14
|
+
executeThrottledRender(e: any): void;
|
15
|
+
install(): void;
|
16
|
+
uninstall(): void;
|
17
|
+
setBinding(binding: any): void;
|
18
|
+
}
|
2
19
|
declare const _default: {
|
3
20
|
mounted(el: any, binding: any): void;
|
4
21
|
updated(_el: any, binding: any): void;
|