bkui-vue 0.0.2-beta.28 → 0.0.2-beta.29
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 +1 -1
- package/dist/index.esm.js +3 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +3 -1
- package/lib/table/table.less +3 -1
- package/lib/table/table.variable.css +3 -1
- 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("../loading"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("lodash"),require("../exception"),require("../popover"),require("../icon/"),require("../button"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../virtual-render","../loading","../checkbox","../icon","../pagination","../directives","lodash","../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("../loading"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("lodash"),require("../exception"),require("../popover"),require("../icon/"),require("../button")):t(e["../shared"],e.vue,e["vue-types"],e["../config-provider"],e["../virtual-render"],e["../loading"],e["../checkbox"],e["../icon"],e["../pagination"],e["../directives"],e.lodash,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,l,a,u,c,s,d,f,p,v)=>(()=>{var h={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),l=n(8725),a=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,g=v-a+(h-u)/1e4;if(g<0&&void 0===e.clockseq&&(f=f+1&16383),(g<0||v>a)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,u=h,r=f;var m=(1e4*(268435455&(v+=122192928e5))+h)%4294967296;s[c++]=m>>>24&255,s[c++]=m>>>16&255,s[c++]=m>>>8&255,s[c++]=255&m;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||l(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 l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},4976:e=>{"use strict";e.exports=v},5800:e=>{"use strict";e.exports=l},2717:e=>{"use strict";e.exports=o},4061:e=>{"use strict";e.exports=c},9911:e=>{"use strict";e.exports=d},6870:e=>{"use strict";e.exports=a},7685:e=>{"use strict";e.exports=p},4870:e=>{"use strict";e.exports=i},5801:e=>{"use strict";e.exports=u},5537:e=>{"use strict";e.exports=f},4212:t=>{"use strict";t.exports=e},3511:e=>{"use strict";e.exports=r},467:e=>{"use strict";e.exports=s},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=n}},g={};function m(e){var t=g[e];if(void 0!==t)return t.exports;var n=g[e]={exports:{}};return h[e](n,n.exports,m),n.exports}m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return(()=>{"use strict";m.r(y),m.d(y,{BkTable:()=>Gt,BkTableColumn:()=>re,default:()=>qt});var e,t,n,o=m(4212),r=m(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 l(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 a(e,t,n){return(t=l(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="__$table_row_index",f="__$uuid",p="__row_expand",v="__row_selection",h="__row_selection_all",g="__row_selection_indeterminate",b="__row_source_data",C="__row_skip_config",w="__col_$uuid",_="__col_source_data",T="__sort_type",O=42;!function(e){e.DEF1="def1",e.DEF2="def2"}(u||(u={}));var x,E=(a(e={},u.DEF1,"#FAFBFD"),a(e,u.DEF2,"#F0F1F5"),e),S={large:78,medium:60,small:42},N="InitColumns",k="BKTableCahce";!function(e){e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom"}(x||(x={}));var L,A,R,P,j=[x.ASC,x.DESC,x.NULL,x.CUSTOM],V=80,H=m(210);!function(e){e.CURRENT="current",e.ALL="all"}(L||(L={})),function(e){e.STATIC="static",e.AUTO="auto"}(A||(A={})),(0,H.toType)("showOverflowTooltipMode",{default:A.AUTO}),function(e){e.SELECTION="selection",e.INDEX="index",e.EXPAND="expand",e.NONE="none"}(R||(R={})),function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.NONE=""}(P||(P={}));var I,M,W,D=(0,H.toType)("columnType",{default:R.NONE}),F=(0,H.toType)("columnType",{default:P.NONE});!function(e){e.FULL="full",e.FUZZY="fuzzy"}(I||(I={})),(0,H.toType)("full",{default:I.FULL}),function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(M||(M={})),(0,H.toType)("columnSize",{default:M.SMALL}),function(e){e.LEFT="left",e.RIGHT="right"}(W||(W={}));var z,U,K=(0,H.string)(),B=(0,H.toType)("IOverflowTooltipPropType",{}).def(!1),G=((0,H.toType)("IOverflowTooltipType",{}).def({content:"",disabled:!1,watchCellResize:!0,mode:A.AUTO}),(0,H.toType)("ISortPropShape",{}).def(!1)),q=(0,H.toType)("IFilterPropShape",{}).def(!1);!function(e){e.MULTI="multi",e.SINGLE="single",e.DISABLED="disabled"}(z||(z={})),function(e){e.DEBOUNCE="debounce",e.THROTTLE="throttle"}(U||(U={}));var X=(0,H.toType)("IColumnType",{}).def({width:"100%",label:function(){return""}}),$=(0,H.toType)("ITableSettingPropType",{}).def(!1),Y=(0,H.toType)("LabelFunctionStringType",{}),Z=(0,H.toType)("RenderFunctionStringType",{}),J=(0,H.toType)("SpanFunctionStringType",{}),Q=(0,H.toType)("RowClassFunctionStringType",{}),ee=(0,H.toType)("RowHeightFunctionNumberType",{}),te=((0,H.toType)("FunctionNumberType",{}),function(e){return(0,H.toType)("StringNumberType",{}).def(e)}),ne=((0,H.toType)("IColumnPropType",{}).def({label:void 0,minWidth:V}),{data:o.PropTypes.arrayOf(o.PropTypes.any).def([]),columns:o.PropTypes.arrayOf(X).def([]),activeColumn:o.PropTypes.oneOfType([o.PropTypes.number.def(-1),o.PropTypes.arrayOf(o.PropTypes.number.def(-1))]),columnPick:(0,H.toType)("columnPick",{}).def(z.DISABLED),height:te("auto"),stripe:o.PropTypes.bool.def(!1),minHeight:te(84),maxHeight:te("auto"),rowHeight:ee.def(O),headHeight:o.PropTypes.number.def(O),showHead:o.PropTypes.bool.def(!0),thead:(0,H.toType)("ITheadType",{}).def({color:u.DEF1,height:O,isShow:!0}),virtualEnabled:o.PropTypes.bool.def(!1),border:o.PropTypes.oneOfType([o.PropTypes.arrayOf((0,H.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),emptyText:o.PropTypes.string,settings:$,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(""),isSelectedFn:o.PropTypes.func.def(void 0),rowKey:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.func]).def(d),showOverflowTooltip:B,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,H.toType)("ResizerWay",{default:U.DEBOUNCE}),observerResize:o.PropTypes.bool.def(!0),align:F,headerAlign:F,prependStyle:o.PropTypes.style().def({})}),oe={label:Y,field:Y,render:Z,width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),minWidth:te(V),columnKey:o.PropTypes.string.def(""),showOverflowTooltip:B,type:D,resizable:o.PropTypes.bool.def(!0),fixed:o.PropTypes.oneOfType([o.PropTypes.bool,K]).def(!1),sort:G,filter:q,colspan:J.def(1),rowspan:J.def(1),align:F,className:Q,prop:Y,index:o.PropTypes.number.def(void 0)};const re=(0,r.defineComponent)({name:"TableColumn",props:oe,setup:function(e){return{initColumns:(0,r.inject)(N,(function(e){}),!1),bkTableCache:(0,r.inject)(k,{queueStack:function(e,t){return null==t?void 0:t()}}),column:(0,r.reactive)(Object.assign(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,l;if(Array.isArray(t))e(t);else{var a=!0;if("TableColumn"===(null===(o=t.type)||void 0===o?void 0:o.name)){a=Object.hasOwnProperty.call(t.props||{},"key");var u=Object.assign(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===(l=t.children)||void 0===l?void 0:l.length)&&a&&e(t.children)}}))}(t),e.initColumns(n)}))},updateColumnDefineByIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object.assign(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 ie=m(2717),le=m(3511),ae=m.n(le);function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,l(o.key),o)}}function se(e,t,n){return t&&ce(e.prototype,t),n&&ce(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var de,fe,pe,ve,he=function(){function e(){ue(this,e),this.storage=void 0,this.storage={}}return se(e,[{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])}}]),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"}(pe||(pe={})),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"}(ve||(ve={}));var ge=function(e,t,n,o,r){return!0},me=function(e){return!0},ye=function(e){return!0},be=(a(de={},ve.COLUMN_PICK,(function(e){return!0})),a(de,ve.COLUMN_FILTER,(function(e){return!0})),a(de,ve.COLUMN_SORT,(function(e){return!0})),a(de,ve.COLUMN_FILTER_SAVE,(function(e){return!0})),a(de,ve.ROW_CLICK,ge),a(de,ve.ROW_DBL_CLICK,ge),a(de,ve.ROW_EXPAND_CLICK,(function(e){return!0})),a(de,ve.ROW_SELECT,(function(e){return!0})),a(de,ve.ROW_SELECT_ALL,(function(e){return!0})),a(de,ve.ROW_SELECT_CHANGE,(function(e){return!0})),a(de,ve.PAGE_LIMIT_CHANGE,me),a(de,ve.PAGE_VALUE_CHANGE,me),a(de,ve.SETTING_CHANGE,(function(e){return!0})),a(de,ve.SCROLL_BOTTOM,(function(e){return!0})),a(de,ve.CELL_CLICK,ye),a(de,ve.CELL_DBL_CLICK,ye),a(de,ve.ROW_MOUSE_ENTER,ge),a(de,ve.ROW_MOUSE_LEAVE,ge),de);function Ce(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 we(e,t){if(e){if("string"==typeof e)return Ce(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)?Ce(e,t):void 0}}function _e(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||we(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.")}()}a(fe={},ve.NATIVE_CLICK,ge),a(fe,ve.NATIVE_DBL_CLICK,ge);var Te=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{}};const Oe=function(e,t){var n=(0,r.ref)(0),o=(0,r.ref)(0),i=(0,r.reactive)({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});i=Te(e.pagination,i);var l=(0,r.ref)(null),a=(0,r.reactive)([]),u=function(e,t,n){"function"==typeof t&&e.sort((function(e,o){return t(e,o,n[T])}))},c=function(e,r,i){var l,c=t.slice();(null!==(l=null==i?void 0:i.sort)&&void 0!==l?l:{}).sortScope===L.ALL&&u(c,r,i),a.length=0,a.push.apply(a,_e(c.slice(n.value,o.value))),function(e,n){if("function"==typeof n){var o=e.filter((function(e,o){return n(e,o,t)}));e.length=0,e.push.apply(e,_e(o))}}(a,e),u(a,r,i)};return{pageData:a,localPagination:l,resolvePageData:c,watchEffectFn:function(r,a,u){i=Te(e.pagination,i),e.pagination&&(l.value=e.remotePagination?i:Object.assign(Object.assign({},i),{count:t.length})),function(){if(!e.pagination||e.remotePagination)return n.value=0,void(o.value=t.length);n.value=(i.current-1)*i.limit,o.value=i.current*i.limit}(),c(r,a,u)}}};var xe=m(4870),Ee=m.n(xe);var Se=m(8022),Ne=m(5800),ke=m.n(Ne),Le=m(6870),Ae=m(5801),Re=m.n(Ae),Pe=m(4061),je=m(467),Ve=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,Ie=void 0!==m.g&&m.g.Math===Math?m.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Me="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Ie):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},We=["top","right","bottom","left","width","height","size","weight"],De="undefined"!=typeof MutationObserver,Fe=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&&a()}function l(){Me(i)}function a(){var e=Date.now();if(n){if(e-r<2)return;o=!0}else n=!0,o=!1,setTimeout(l,t);r=e}return a}(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),De?(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;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}(),ze=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||Ie},Ke=$e(0,0,0,0);function Be(e){return parseFloat(e)||0}function Ge(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Be(e["border-"+n+"-width"])}),0)}var qe="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?qe(e)?function(e){var t=e.getBBox();return $e(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Ke;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]=Be(i)}return t}(o),i=r.left+r.right,l=r.top+r.bottom,a=Be(o.width),u=Be(o.height);if("border-box"===o.boxSizing&&(Math.round(a+i)!==t&&(a-=Ge(o,"left","right")+i),Math.round(u+l)!==n&&(u-=Ge(o,"top","bottom")+l)),!function(e){return e===Ue(e).document.documentElement}(e)){var c=Math.round(a+i)-t,s=Math.round(u+l)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(s)&&(u-=s)}return $e(r.left,r.top,a,u)}(e):Ke}function $e(e,t,n,o){return{x:e,y:t,width:n,height:o}}var Ye=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=$e(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}(),Ze=function(e,t){var n,o,r,i,l,a,u,c=(o=(n=t).x,r=n.y,i=n.width,l=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),ze(u,{x:o,y:r,width:i,height:l,top:r,right:o+i,bottom:l+r,left:o}),u);ze(this,{target:e,contentRect:c})},Je=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Ve,"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 Ye(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 Ze(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}(),Qe="undefined"!=typeof WeakMap?new WeakMap:new Ve,et=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=Fe.getInstance(),o=new Je(t,n,this);Qe.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){et.prototype[e]=function(){var t;return(t=Qe.get(this))[e].apply(t,arguments)}}));const tt=void 0!==Ie.ResizeObserver?Ie.ResizeObserver:et;var nt=void 0,ot=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,[nt].concat(_e(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},rt=function(e){return/^\d+$/.test("".concat(e))?[parseInt("".concat(e),10)]:[]},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},lt=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["resizeWidth","calcWidth","width"];return null!==(n=null!==(t=e[o[0]])&&void 0!==t?t:e[o[1]])&&void 0!==n?n:e[o[2]]},at=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:V,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=(e.getBoundingClientRect()||{}).width-o,i=r,l=[],a=function(e,t){var n=e.minWidth,o=void 0===n?void 0:n;if(void 0===o)return t<V?V:t;var i=t;return/^\d+\.?\d*$/.test("".concat(o))&&(i=Number(o)),/^\d+\.?\d*%$/.test("".concat(o))&&(i=Number(o)*r/100),/^\d+\.?\d*px$/i.test("".concat(o))&&(i=Number("".concat(o).replace(/px/i,""))),i},u=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=a(e,t),r=t<o?o:t;Object.assign(e,{calcWidth:r}),n&&(i-=r)<0&&(i=0)};if(t.forEach((function(e,t){if(!e.isHidden){var o=String(lt(e,["resizeWidth","width"])),r=!0;if(/^\d+\.?\d*(px)?$/.test(o)){var a=Number(o.replace("px",""));u(e,a),r=!1}if(/^\d+\.?\d*%$/.test(o)){var c=n;if(i>0){var s=Number(o.replace("%",""));c=i*s/100}u(e,c),r=!1}r&&l.push(t)}})),l.length>0){var c=n;i>0?l.forEach((function(e,n){c=i/(l.length-n),u(t[e],c,!1);var o=t[e].calcWidth;i-=o})):l.forEach((function(e){var n=a(t[e],V);Object.assign(t[e],{calcWidth:n})}))}},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,je.debounce)(r,n):(0,je.throttle)(r,n),l=new tt((function(){Reflect.apply(i,nt,[])}));return o&&"function"==typeof t&&t(),{start:function(){l.observe(e)},disconnect:function(){l.unobserve(e),l.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},Object.assign({},r))},st=function(e,t,n){return"index"===n.type?e[d]+1:(0,je.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,nt,n),n):[]},ft=function(e,t,n){var o=pt(e,t,n);return null!==o?o:(0,Se.v4)()},pt=function(e,t,n){return"string"==typeof t.rowKey?t.rowKey===d?"__ROW_INDEX_".concat(n):(0,je.get)(e,t.rowKey):"function"==typeof t.rowKey?Reflect.apply(t.rowKey,nt,[e]):null},vt=function(e,t,n){var o;return o=t,e.some((function(e){return e.field===ot(o,["field","type"],[o])}))&&n.length&&!n.includes(ot(t,["field","type"],[t]))},ht=function(e,t,n,o,r){return"function"==typeof e[r]?Reflect.apply(e[r],nt,[{column:e,colIndex:t,row:n,rowIndex:o}]):"number"==typeof e[r]?e[r]:1},gt=function(e,t,n,o){return{colspan:ht(e,t,n,o,"colspan"),rowspan:ht(e,t,n,o,"rowspan")}},mt=function(e,t){var n,o,r=e.field,i=function(t){return st(t,r,e)},l="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===x.NULL?function(){return!0}:function(e,n){return l(e,n)*(t===x.DESC?-1:1)}},yt=function(e){var t,n=(a(t={},x.NULL,0),a(t,x.ASC,1),a(t,x.DESC,2),t);return void 0===n[e]?x.NULL:Object.keys(n)[(n[e]+1)%3]},bt=function(e){return"string"==typeof e?{value:e}:"boolean"==typeof e&&e?{value:x.NULL}:"object"===i(e)&&null!==e?i(e.sortFn)?Object.assign({value:"custom"},e):e:null},Ct=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})},wt=function(e){return(0,r.unref)(e[b]||e)},_t=function(e){return(0,r.unref)(e[_]||e)};const Tt=(0,r.defineComponent)({name:"TableCell",props:{column:X,row:o.PropTypes.any.def({}),parentSetting:B,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,H.toType)("ResizerWay",{default:U.DEBOUNCE})},setup:function(e,t){var n=this,l=t.slots,a=(0,r.ref)(),u=(0,r.ref)(!1),c=(0,r.computed)((function(){return{textAlign:e.column.textAlign}})),s=(/boolean|object/.test(i(e.column.showOverflowTooltip))&&null!==e.column.showOverflowTooltip?e.column:{showOverflowTooltip:e.parentSetting}).showOverflowTooltip,d=void 0!==s&&s,f=null,p=function(){var t,o=!0,r=e.resizerWay,l=a.value.innerText,u="auto",c=!0;return"boolean"==typeof d&&(o=!d),"object"===i(d)&&(o=d.disabled,r=d.resizerWay||"debounce",l=d.content||a.value.innerText,"function"==typeof d.content&&(l=d.content(e.column,e.row)),c=d.watchCellResize,u=d.mode||"auto"),"function"==typeof o&&(o=Reflect.apply(o,n,[e.column,e.row])),e.isHead&&(o=!1,u="auto",l=null===(t=v())||void 0===t?void 0:t.innerHTML,e.headExplain&&(u="static",l=e.headExplain)),e.column.explain&&(o=!1,u="static","object"===i(e.column.explain)&&(l=ot(e.column.explain,"content",[e.column,e.row]))),{disabled:o,content:l,mode:u,resizerWay:r,watchCellResize:c}},v=function(){var t,n;return e.isHead?null===(n=null===(t=a.value)||void 0===t?void 0:t.querySelector)||void 0===n?void 0:n.call(t,".head-text"):a.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 l=(0,r.ref)(p());null===f&&(f=(0,Pe.bkEllipsisInstance)(e,{disabled:l.value.disabled,content:l.value.content,mode:l.value.mode}))}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 l=ut(a.value,(function(){h()}),60,!0,o);l.start(),(0,r.onBeforeUnmount)((function(){l.disconnect(),l=null}))}})),(0,r.onBeforeUnmount)((function(){null==f||f.destroyInstance(a.value)}));var g=e.headExplain||e.column.explain;return function(){var t;return(0,r.createVNode)("div",{class:["cell",e.column.type,g?"explain":""],style:c.value,ref:a,title:e.title},[null===(t=l.default)||void 0===t?void 0:t.call(l)])}}}),Ot=(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 xt=se((function e(t,n){ue(this,e),this.props=null,this.ctx=null,this.props=t,this.ctx=n})),Et=m(9911),St=m.n(Et);const Nt=(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,ie.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)(St(),{scene:"part",type:o.value,description:n.value},null)}}});var kt=m(5537),Lt=m.n(kt);const At=(0,r.defineComponent)({name:"HeadFilter",props:{column:X,height:o.PropTypes.number.def(O)},emits:["change","filterSave"],setup:function(e,t){var n=t.emit,i=(0,ie.usePrefix)().resolveClassName,l=(0,ie.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});(0,r.watch)((function(){return c.value}),(function(){d.checked=s.value}),{immediate:!0,deep:!0});var f=(0,r.computed)((function(){var t;return(0,o.classes)((a(t={},i("table-head-action"),!0),a(t,"column-filter",!0),a(t,"--row-height","".concat(e.height,"px")),a(t,"active",d.checked.length),a(t,"opened",d.isOpen),t))})),p=(0,o.classes)(a({},i("table-head-filter"),!0)),v=(0,r.ref)(null),h=function(e){d.isOpen=e,e&&setTimeout((function(){v.value.reset()}))},g="light ".concat(i("table-head-filter")),m=(0,r.computed)((function(){var e=c.value.list;return void 0===e?[]:e})),y="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,ot(u,"field",[u,t]),u);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)},b=function(){C(!0),n("filterSave",_e(d.checked)),d.isOpen=!1},C=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_(O,l.value.confirm).disabled||e){if("custom"===c.value)return n("change",_e(d.checked),null),void(d.isOpen=!1);c.value.checked=d.checked,n("change",_e(d.checked),y)}},w=function(){d.checked.length&&(d.checked.length=0,d.isOpen=!1,(0,r.nextTick)((function(){return n("change",d.checked,y)})))},_=function(e,t){return{disabled:"disabled"===e||!1===e,text:"string"==typeof e?e:t}},T=c.value,O=T.btnSave,x=T.btnReset,E=function(){var e=_(x,l.value.reset),t=e.disabled,n=e.text;return t?"":(0,r.createVNode)("span",{class:["btn-filter-reset",d.checked.length?"":"disable"],onClick:w},[n])},S=function(e){return e.data.length?e.data.map((function(e){return(0,r.createVNode)("div",{class:"list-item"},[(0,r.createVNode)(ke(),{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,_e(Array.from(o))),C()}(t,e)}},{default:function(){return["".concat(e.text)]}})])})):(0,r.createVNode)("div",{class:"list-item is-empty"},[l.value.emptyText])};return function(){return(0,r.createVNode)(Lt(),(0,r.mergeProps)({trigger:"click",isShow:d.isOpen,placement:"bottom-start",renderType:o.RenderType.SHOWN,arrow:!1,offset:0},{theme:g},{onAfterShow:function(){return h(!0)},onAfterHidden:function(){return h(!1)}}),{default:function(){return(0,r.createVNode)(Le.Funnel,{class:f.value},null)},content:function(){return(0,r.createVNode)("div",{class:p},[(0,r.createVNode)(Ne.BkCheckboxGroup,{class:"content-list"},{default:function(){return[(0,r.createVNode)(ae(),{lineHeight:32,list:m.value,throttleDelay:0,scrollEvent:!0,ref:v,className:"content-items"},{default:S})]}}),(0,r.createVNode)("div",{class:"content-footer"},[(e=_(O,l.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:b},[n])),(0,r.createVNode)("span",{class:"btn-filter-split"},null),E()])]);var e,t,n}})}}});var Rt=m(7685);const Pt=(0,r.defineComponent)({name:"HeadSort",props:{column:X,defaultSort:o.PropTypes.oneOf(j).def(x.NULL),active:o.PropTypes.bool},emits:["change"],setup:function(e,t){var n,o,i=t.emit,l=(0,ie.usePrefix)().resolveClassName,a=(null===(o=null===(n=e.column)||void 0===n?void 0:n.sort)||void 0===o?void 0:o.value)||e.defaultSort||x.NULL,u=(0,r.ref)(a);(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,l,a=[],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)&&(a.push(o.value),a.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return a}}(t,n)||we(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===x.NULL&&(r=yt(n)),u.value===n&&(r=x.NULL);var l=mt(e.column,r),a=bt(e.column.sort);"custom"!==(null==a?void 0:a.value)?i("change",l,r):i("change",null!==(o=null==a?void 0:a.sortFn)&&void 0!==o?o:l,r)};return function(){return(0,r.createVNode)("span",{class:l("head-cell-sort")},[(0,r.createVNode)(Rt.AngleDownFill,{class:["sort-action","sort-asc",u.value===x.ASC?"active":""],style:"align-items: flex-end;",onClick:function(e){return c(e,x.ASC)}},null),(0,r.createVNode)(Rt.AngleUpFill,{class:["sort-action","sort-desc",u.value===x.DESC?"active":""],style:"align-items: flex-start;",onClick:function(e){return c(e,x.DESC)}},null)])}}});var jt=m(4976),Vt=m.n(jt);function Ht(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}const It=(0,r.defineComponent)({name:"Settings",props:{settings:$,columns:o.PropTypes.arrayOf(X).def([]),rowHeight:ee.def(O)},emits:["change"],setup:function(e,t){var n=t.emit,o=t.slots,i=(0,ie.usePrefix)().resolveClassName,l=(0,ie.useLocale)("table"),a=function(e){return[{value:"small",label:e.value.setting.lineHeight.small,height:S.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:S.medium},{value:"large",label:e.value.setting.lineHeight.large,height:S.large}]}(l),u=function(e,t){return ot(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(Object.assign({},e),{field:e.field||e.type})})),checked:[],limit:0,size:"small",sizeList:a,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"),g="light ".concat(h),m=(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)(m)}),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},_=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(_e(i),_e(o)))}else{var l;(l=v.value).splice.apply(l,[0,v.value.length].concat(_e(o)))}},T=(0,r.computed)((function(){var e;return(null!==(e=d.value.limit)&&void 0!==e?e:0)>0})),O=d.value.sizeList||a,x=(0,r.computed)((function(){return T.value&&(d.value.limit?d.value.limit:0)<=v.value.length})),E=function(e,t){return e.disabled||x.value&&!v.value.includes(u(e,t))},N=function(e){return{"line-size":!0,"is-medium":"medium"===f.value,active:e.value===f.value}},k={marginRight:"12px"},L=(0,r.computed)((function(){return v.value.length>0&&!m.value.every((function(e,t){return v.value.includes(ot(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&&m.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(_e(d.value.checked)))}),{immediate:!0,deep:!0}),function(){return e.settings?(0,r.createVNode)(Lt(),(0,r.mergeProps)({trigger:"manual",isShow:s.value,placement:"bottom-end",arrow:!0},{theme:g}),{default:function(){return(0,r.createVNode)("span",{class:"table-head-settings",onClick:w},[(0,r.createVNode)(Rt.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"},[l.value.setting.title]),(0,r.createVNode)(Rt.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"},[l.value.setting.fields.title]),T.value?(0,r.createVNode)("span",{class:"limit"},[l.value.setting.fields.subtitle(d.value.limit)]):""]),T.value?"":(0,r.createVNode)("span",{class:"check-all",onClick:_},[(0,r.createVNode)(ke(),{label:l.value.setting.fields.selectAll,indeterminate:Boolean(L.value),modelValue:v.value.length>0},{default:function(){return[l.value.setting.fields.selectAll]}})])]),(0,r.createVNode)(Ne.BkCheckboxGroup,{class:"setting-body-fields",modelValue:v.value,"onUpdate:modelValue":function(e){return v.value=e}},Ht(e=m.value.map((function(e,t){var n;return(0,r.createVNode)("div",{class:"field-item"},[(0,r.createVNode)(ke(),{checked:v.value.includes(u(e,t)),label:u(e,t),disabled:E(e,t)},Ht(n=ot(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"},[l.value.setting.lineHeight.title,(0,r.createTextVNode)(":"),O.map((function(e){return(0,r.createVNode)("span",{class:N(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)(Vt(),{theme:"primary",style:k,onClick:b},{default:function(){return[l.value.setting.options.ok]}}),(0,r.createVNode)(Vt(),{style:k,onClick:C},{default:function(){return[l.value.setting.options.cancel]}})])])}}):""}}}),Mt=function(e,t,n){var o=function(e){return"right"===e.fixed?"right":"left"},i={left:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t.filter((function(e){return!e.isHidden&&e.fixed&&"right"!==e.fixed})).reduce((function(t,n,o){return e&&0===o?t:t+lt(n)}),0)},right:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t.filter((function(e){return!e.isHidden&&"right"===e.fixed})).reduce((function(t,n,o){return e&&0===o?t:t+lt(n)}),n?6:0)}},l=(0,r.computed)((function(){var e={left:!1,right:!1};return t.filter((function(e){return!e.isHidden&&e.fixed})).map((function(t){var n=o(t),r=e[n];return e[n]=!0,{isExist:r,colPos:n,column:t}}))}));return{fixedWrapperClass:(0,(0,ie.usePrefix)().resolveClassName)("table-fixed"),resolveFixedColumnStyle:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.fixed||e.isHidden)return{};var r={left:0,right:n?6:-1},i=o(e);return r[i]=function(e,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=n[w],l="right"===e?-1:1,a=t.filter((function(e){return!e.isHidden})),u=a.length,c="right"===e?u*l:1,s=0;;){c+=-1*l;var d=a[Math.abs(c)],f=o(d),p=d[w];if(f===e&&i!==p&&(s+=lt(d)),i===p)break}return s+r}(i,e,r[i]),a({},i,"".concat(r[i],"px"))},fixedColumns:l,resolveColumnStyle:function(t){return{width:"".concat(i[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}}}};function Wt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}var Dt=function(){function e(t,n,o,i,l,u){var c=this;ue(this,e),this.getRowHeight=function(e,t){var n=c.setting,o=n.size;return null!=n.height?ot(c.setting,"height",["tbody",e,t,o]):ot(c.props,"rowHeight",["tbody",e,t])},this.getColumnClass=function(e,t){var n;return a(n={},"".concat(c.uuid,"-column-").concat(t),!0),a(n,"column_fixed",!!e.fixed),a(n,"column_fixed_left",!!e.fixed),a(n,"column_fixed_right","right"===e.fixed),a(n,"".concat(e.className),!0),n},this.getHeadColumnClass=function(e,t){return Object.assign(Object.assign({},c.getColumnClass(e,t)),{active:c.isColActive(t)})},this.props=t,this.context=n,this.reactiveProp=o,this.colgroups=i,this.plugins=new xt(t,n),this.uuid=(0,Se.v4)(),this.events=new Map,this.styleRef=l,this.t=u,this.activeSortIndex=(0,r.ref)(-1)}return se(e,[{key:"propActiveCols",get:function(){return this.reactiveProp.activeColumns}},{key:"renderTableHeadSchema",value:function(){var e,t,n=this,o=ct(this.props).isShow;return void 0===o||o?[this.props.settings?(0,r.createVNode)(It,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:function(e){var t,o=e.checked,r=void 0===o?[]:o,i=e.size,l=e.height;n.reactiveProp.setting.size=i,n.reactiveProp.setting.height=l;var a=(null===(t=n.props.settings)||void 0===t?void 0:t.fields)||[];r.length&&n.colgroups.forEach((function(e){e.isHidden=vt(a,e,r)})),n.emitEvent(pe.ON_SETTING_CHANGE,[e])}},{default:function(){return[null===(t=(e=n.context.slots).setting)||void 0===t?void 0:t.call(e)]}}):"",(0,r.createVNode)("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]:null}},{key:"renderTableBodySchema",value:function(e){var t,n,o,i=this,l=(0,r.computed)((function(){return void 0===i.props.emptyText?i.t.value.emptyText:i.props.emptyText}));return e.length?(0,r.createVNode)("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(e)]):null!==(o=null===(n=(t=this.context.slots).empty)||void 0===n?void 0:n.call(t))&&void 0!==o?o:(0,r.createVNode)(Nt,{filterList:e,list:this.props.data,emptyText:l.value},null)}},{key:"renderTableFooter",value:function(e){var t=this;return(0,r.createVNode)(Re(),(0,r.mergeProps)(e,{modelValue:e.current,onLimitChange:function(e){return t.handlePageLimitChange(e)},onChange:function(e){return t.handlePageChange(e)}}),null)}},{key:"on",value:function(e,t){return this.events.has(e)||this.events.set(e,[]),this.events.get(e).push(t),this}},{key:"destroy",value:function(){this.events.clear(),this.events=null}},{key:"emitEvent",value:function(e,t){var n=this;this.events.has(e)&&this.events.get(e).forEach((function(e){"function"==typeof e&&Reflect.apply(e,n,t)}))}},{key:"handlePageLimitChange",value:function(e){Object.assign(this.props.pagination,{limit:e}),this.context.emit(ve.PAGE_LIMIT_CHANGE,e)}},{key:"handlePageChange",value:function(e){Object.assign(this.props.pagination,{current:e,value:e}),this.context.emit(ve.PAGE_VALUE_CHANGE,e)}},{key:"setColumnActive",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.propActiveCols.find((function(t){return t.index===e}));Object.assign(n,{active:!n.active}),t&&this.propActiveCols.filter((function(t){return t.index!==e&&t.active})).forEach((function(e){Object.assign(e,{active:!1})}))}},{key:"handleColumnHeadClick",value:function(e,t){if("disabled"!==this.props.columnPick&&(this.setColumnActive(e,"single"===this.props.columnPick),this.context.emit(ve.COLUMN_PICK,this.propActiveCols)),t.sort&&!t.filter){var n=ot(t,["field","type"],[t,e]),o=yt(this.reactiveProp.defaultSort[n]);Object.assign(this.reactiveProp.defaultSort,a({},n,o));var r=mt(t,o);this.activeSortIndex.value=e,this.emitEvent(pe.ON_SORT_BY_CLICK,[{sortFn:r,column:t,index:e,type:o}])}}},{key:"getSortCell",value:function(e,t){var n=this,o=ot(e,["field","type"],[e,t]),i=this.reactiveProp.defaultSort[o]||e.sort.value||x.NULL;return(0,r.createVNode)(Pt,{column:e,defaultSort:i,active:this.activeSortIndex.value===t,onChange:function(r,i){Object.assign(n.reactiveProp.defaultSort,a({},o,i)),n.activeSortIndex.value=t,n.emitEvent(pe.ON_SORT_BY_CLICK,[{sortFn:r,column:e,index:t,type:i}])}},null)}},{key:"getFilterCell",value:function(e,t){var n=this;return(0,r.createVNode)(At,{column:e,height:this.props.headHeight,onChange:function(o,r){n.emitEvent(pe.ON_FILTER_CLICK,[{filterFn:function(e,t){return r(o,e,t)},checked:o,column:e,index:t}])},onFilterSave:function(t){n.context.emit(ve.COLUMN_FILTER_SAVE,{column:e,values:t})}},null)}},{key:"renderHeader",value:function(){var e=this,t=ct(this.props),n=t.cellFn,o={"--row-height":"".concat(ot(t,"height",["thead"]),"px"),backgroundColor:this.props.thead.color},i=function(t,o){if("selection"===t.type){var i=e.reactiveProp.rowActions.get(h);return e.renderCheckboxColumn(a({},v,!!i),0,!0)}var l=[];t.sort&&l.push(e.getSortCell(t,o)),t.filter&&l.push(e.getFilterCell(t,o));var u=function(e,t){return"function"==typeof n?n(e,t):"function"==typeof e.renderHead?e.renderHead(e,t):ot(e,"label",[e,t])}(t,o);l.unshift((0,r.createVNode)("span",{class:"head-text"},[u]));var c="string"==typeof u?u:void 0,s={"has-sort":!!t.sort,"has-filter":!!t.filter};return(0,r.createVNode)(Tt,{class:s,title:c,observerResize:e.props.observerResize,resizerWay:e.props.resizerWay,isHead:!0,headExplain:ot(t.explain,"head",[t])},Wt(l)?l:{default:function(){return[l]}})},l=Mt(this.props,this.colgroups).resolveFixedColumnStyle,c=function(){if(e.styleRef.value.hasScrollY){var t={width:"".concat(8,"px"),right:"-1px"};return(0,r.createVNode)("th",{style:t,class:"column_fixed"},null)}};return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("thead",{style:o},[(0,r.createVNode)(Ot,null,{default:function(){return[(0,r.createVNode)("tr",null,[e.filterColGroups.map((function(t,n){var o,c,s,d=Object.assign({},l(t,e.styleRef.value.hasScrollY),{backgroundColor:E[null!==(c=null===(o=e.props.thead)||void 0===o?void 0:o.color)&&void 0!==c?c:u.DEF1]});return(0,r.createVNode)("th",(0,r.mergeProps)({colspan:1,rowspan:1,class:[e.getHeadColumnClass(t,n),e.getColumnCustomClass(t),t.align||e.props.headerAlign||e.props.align],style:d,onClick:function(){return e.handleColumnHeadClick(n,t)}},(s=t,Array.from(s.listeners.keys()).reduce((function(t,n){var o=n.split("_").slice(-1)[0];return Object.assign(t,a({},o,(function(t){s.listeners.get(n).forEach((function(n){return Reflect.apply(n,e,[t,s,e])}))})))}),{}))),[i(t,n)])})),c()])]}})])])}},{key:"getColumnCustomClass",value:function(e,t){var n=e.className;if(n){if("function"==typeof n)return n(t);if("string"==typeof n)return n}return""}},{key:"renderTBody",value:function(e){var t=this,n=Mt(this.props,this.colgroups).resolveFixedColumnStyle,o=e.length;return(0,r.createVNode)("tbody",null,[e.map((function(i,l){var a=[].concat(_e(dt(t.props.rowStyle,[i,l,t])),[{"--row-height":"".concat(t.getRowHeight(i,l),"px")}]),u=[].concat(_e(dt(t.props.rowClass,[i,l,t])),["hover-".concat(t.props.rowHover),l%2==1&&t.props.stripe?"stripe-row":""]);return[(0,r.createVNode)(Ot,null,{default:function(){return[(0,r.createVNode)("tr",{style:a,class:u,key:pt(i,t.props,l),onClick:function(n){return t.handleRowClick(n,i,l,e)},onDblclick:function(n){return t.handleRowDblClick(n,i,l,e)},onMouseenter:function(n){return t.handleRowEnter(n,i,l,e)},onMouseleave:function(n){return t.handleRowLeave(n,i,l,e)}},[t.filterColGroups.map((function(a,u){var c,s,d=[n(a)].concat(_e(dt(t.props.cellStyle,[a,u,i,l,t]))),f={"expand-cell":"expand"===a.type},v=gt(a,u,i,l),h=v.colspan,g=v.rowspan,m=C,y=a[w],b=null!==(s=null===(c=i[m])||void 0===c?void 0:c[y])&&void 0!==s?s:{},_=b.skipRow,T=void 0!==_&&_,O=b.skipCol;if(!(T||void 0!==O&&O)){var x,E=[t.getColumnClass(a,u),t.getColumnCustomClass(a,i),a.align||t.props.align].concat(_e(dt(t.props.cellClass,[a,u,i,l,t])),[{"expand-row":i[p],"is-last":l+g>=o}]),S=function(n,o){var r={event:n,row:wt(i),column:_t(a),cell:{getValue:function(){return t.renderCell(i,a,l,e)}},rowIndex:l,columnIndex:u};t.context.emit(o,r)};return(0,r.createVNode)("td",{class:E,style:d,colspan:h,rowspan:g,onClick:function(e){return S(e,ve.CELL_CLICK)},onDblclick:function(e){return S(e,ve.CELL_DBL_CLICK)}},[(0,r.createVNode)(Tt,{class:f,column:a,row:i,parentSetting:t.props.showOverflowTooltip,observerResize:t.props.observerResize},Wt(x=t.renderCell(i,a,l,e))?x:{default:function(){return[x]}})])}return null}))])]}}),t.renderExpandRow(i,u,l)]}))])}},{key:"renderExpandRow",value:function(e,t,n){var o,i,l,a=this;if(e[p]){var u=[].concat(_e(t),[{row_expend:!0}]),c=function(e,t,n){if(void 0!==e[f])return e[f];var o=ft(e,n,t);return void 0!==o&&void 0!==e[o]?e[o]:t}(e,n,this.props),s="".concat(c,"_expand");return(0,r.createVNode)(Ot,{key:s},{default:function(){return[(0,r.createVNode)("tr",{class:u},[(0,r.createVNode)("td",{colspan:a.filterColGroups.length,rowspan:1},[null!==(l=null===(i=(o=a.context.slots).expandRow)||void 0===i?void 0:i.call(o,wt(e)))&&void 0!==l?l:(0,r.createVNode)("div",{class:"expand-cell-ctx"},[(0,r.createTextVNode)("Expand Row")])])])]}})}}},{key:"handleRowClick",value:function(e,t,n,o){this.context.emit(ve.ROW_CLICK,e,t,n,o,this)}},{key:"handleRowDblClick",value:function(e,t,n,o){this.context.emit(ve.ROW_DBL_CLICK,e,t,n,o,this)}},{key:"handleRowEnter",value:function(e,t,n,o){this.context.emit(ve.ROW_MOUSE_ENTER,e,t,n,o,this)}},{key:"handleRowLeave",value:function(e,t,n,o){this.context.emit(ve.ROW_MOUSE_LEAVE,e,t,n,o,this)}},{key:"getExpandCell",value:function(e){return e[p]?(0,r.createVNode)(Le.DownShape,null,null):(0,r.createVNode)(Le.RightShape,null,null)}},{key:"handleRowExpandClick",value:function(e,t,n,o,r){this.emitEvent(pe.ON_ROW_EXPAND_CLICK,[{row:e,column:t,index:n,rows:o,e:r}])}},{key:"renderCellCallbackFn",value:function(e,t,n,o){var r=st(e,ot(t,"field",[t,e]),t),i=e[d],l="number"==typeof i?i:n,a=this.props.data[l];return t.render({cell:r,data:a,row:e,column:t,index:n,rows:o})}},{key:"renderCheckboxColumn",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=o&&!!this.reactiveProp.rowActions.get(g),l=Ct(this.props,{row:e,index:t,isCheckAll:o});return(0,r.createVNode)(ke(),{onChange:function(r){n.emitEvent(pe.ON_ROW_CHECK,[{row:e,index:t,isAll:o,value:r}])},disabled:!l,modelValue:e[v],indeterminate:i},null)}},{key:"renderExpandColumn",value:function(e,t,n,o){var i,l,a,u=this;return(0,r.createVNode)("span",{class:"expand-btn-action",onClick:function(r){return u.handleRowExpandClick(e,t,n,o,r)}},["function"==typeof t.render?u.renderCellCallbackFn(e,t,n,o):null!==(a=null===(l=(i=u.context.slots).expandCell)||void 0===l?void 0:l.call(i,{row:e,column:t,index:n,rows:o}))&&void 0!==a?a:u.getExpandCell(e)])}},{key:"renderCell",value:function(e,t,n,o){var l,a,u,c=this,s={expand:function(e,t,n,o){return c.renderExpandColumn(e,t,n,o)},selection:function(e,t,n,o){return c.renderCheckboxColumn(e,n)}};return null!==(a=null===(l=s[t.type])||void 0===l?void 0:l.call(s,e,t,n,o))&&void 0!==a?a:(u=st(e,ot(t,"field",[t,e]),t),"function"==typeof t.render?c.renderCellCallbackFn(e,t,n,o):"object"===i(u)?JSON.stringify((0,r.unref)(u)):u)}},{key:"isColActive",value:function(e){return"disabled"!==this.props.columnPick&&this.propActiveCols.some((function(t){return t.index===e&&t.active}))}},{key:"renderColGroup",value:function(){var e=this;return(0,r.createVNode)("colgroup",null,[(this.filterColGroups||[]).map((function(t,n){var i,l=(0,o.classes)({active:e.isColActive(n)}),a="".concat((i=lt(t),it(i,"auto"))).replace(/px$/i,"");return(0,r.createVNode)("col",{class:l,width:a},null)}))])}},{key:"filterColGroups",get:function(){return this.colgroups.filter((function(e){return!e.isHidden}))}},{key:"setting",get:function(){return this.reactiveProp.setting}}]),e}();const Ft=function(e,t){return{initColumns:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[];if(o=Array.isArray(e)?e:[e],n)o.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 r=!1;o.forEach((function(e){if(void 0!==e.index&&e.index>=0){r=!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)}})),r&&t.sort((function(e,t){return e.index-t.index}))}},getColumns:function(){var n;return(null==t?void 0:t.length)?t:(null===(n=e.columns)||void 0===n?void 0:n.length)?e.columns:[]}}};var zt=function(e){return"disabled"!==e.columnPick?"multi"===e.columnPick?Array.isArray(e.activeColumn)?e.activeColumn:rt(e.activeColumn):Array.isArray(e.activeColumn)?rt(e.activeColumn[0]):rt(e.activeColumn):[]};var Ut=function(e,n,i,l,u){var c,d=Ft(e,n).getColumns,f=(0,r.ref)(200),p=(0,r.ref)(200),v=(0,r.ref)(O),h=(0,r.ref)(!1),g=(0,r.computed)((function(){return e.pagination&&e.data.length})),m=(0,r.computed)((function(){return h.value})),y=(0,r.computed)((function(){var t,n,r;return(0,o.classes)((a(t={},(0,o.resolveClassName)("table"),!0),a(t,"has-footer",g.value),a(t,"has-scroll-y",h.value||e.virtualEnabled),t),(r=["row"],"string"==typeof(n=e.border)&&r.push(n),Array.isArray(n)&&r.push.apply(r,_e(n.filter((function(e){return s.includes(e)})))),_e(new Set(r)).map((function(e){return"bordered-".concat(e)})).join(" ")))})),b=(0,o.classes)((a(c={},(0,o.resolveClassName)("table-head"),!0),a(c,"has-settings",!!e.settings),c)),C=(0,r.computed)((function(){return d()})),w=ct(e),_=(0,r.computed)((function(){return{"--row-height":"".concat(ot(w,"height",["thead"]),"px"),"--scroll-head-left":"-".concat(l.scrollTranslateX,"px"),"--scroll-left":"".concat(l.scrollTranslateX,"px")}})),T=a({},(0,o.resolveClassName)("table-body"),!0),x=(0,r.computed)((function(){var t;return(0,o.classes)((a(t={},(0,o.resolveClassName)("table-footer"),!0),a(t,"is-hidden",!e.pagination||!e.data.length),t))})),E=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%"},S=(0,r.computed)((function(){return{minHeight:it(e.minHeight,"auto"),width:E(),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)?Number(n):/^\d+\.?\d*px$/gi.test(n)?Number(n.replace("px","")):/^\d+\.?\d*%$/gi.test(n)&&"number"==typeof t?t*Number(n.replace("%",""))/100:t},k=(0,r.reactive)({display:"","min-height":"",height:"",maxHeight:""});(0,r.onMounted)((function(){L(null==i?void 0:i.value)}));var L=function(t){var n;if(t){var o=t.parentElement.getBoundingClientRect().height;f.value=o;var r=t.querySelector(".bk-table-body-content > table");(function(){var t=N(e.height,f.value);v.value=e.showHead?N(e.headHeight,O):0;var n=N(e.minHeight,f.value),o=e.pagination&&e.data.length?e.paginationHeight:0,r=t-v.value-o,i="auto"!==e.height&&"".concat(r,"px"),l=n-v.value-o,a=N(e.maxHeight,void 0),c="number"==typeof a&&"".concat(a-v.value-o,"px");Object.assign(k,{display:!!(null==u?void 0:u.length)&&"block","min-height":"".concat(l,"px"),height:i,maxHeight:c})})(),p.value=(null!==(n=null==r?void 0:r.offsetHeight)&&void 0!==n?n:o)+v.value,A(t)}},A=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)}};return{tableClass:y,headClass:b,contentClass:T,footerClass:x,wrapperStyle:S,contentStyle:k,headStyle:_,fixHeight:p,resetTableHeight:L,updateBorderClass:A,getColumnsWidthOffsetWidth:function(){var n=0;return h.value&&(n+=6),e.border.includes(t.OUTER)&&!e.border.includes(t.NONE)&&(n+=2),n},hasFooter:g,hasScrollY:h,hasScrollYRef:m}},Kt=function(e,t){var n,o,l=(0,r.reactive)([]),u=Ft(e,t).getColumns,c=function(e){if(/^\d+/.test("".concat(e.minWidth)))return e.minWidth;var t=V;return e.sort&&(t+=18),e.filter&&(t+=28),t},s=(0,r.computed)((function(){return u()})),m=function(t){var n,o,r=(null==t?void 0:t.checked)||(null===(n=e.settings)||void 0===n?void 0:n.checked)||[],i=(null==t?void 0:t.fields)||(null===(o=e.settings)||void 0===o?void 0:o.fields)||[];l.length=0,l.push.apply(l,_e(s.value.map((function(e){var t;return Object.assign(Object.assign({},e),(a(t={calcWidth:null,resizeWidth:null,minWidth:c(e),listeners:new Map,isHidden:vt(i,e,r)},w,(0,Se.v4)()),a(t,_,e),t))}))))};"object"===i(e.settings)&&m(e.settings);var y=function(e){var t,n,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){e.MOUSE_MOVE="onMousemove",e.MOUSE_OUT="onMouseout",e.MOUSE_DOWN="onMousedown"}(n||(n={}));var i=!1,l=!1,u=!1,c=0,s=null,d=0,f=(0,r.ref)(-1e3),p=function e(t){var n;l=!1,u=!1,document.body.style.cursor="";var o=t.clientX-c,r=(null!==(n=s.resizeWidth)&&void 0!==n?n:s.calcWidth)+o,i=Number(s.minWidth);s.resizeWidth=r>i?r:i,document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",v),c=0,f.value=-1e3,s=null,t.target.closest("table").querySelectorAll("th").forEach((function(e){return e.style.setProperty("user-select","inherit")}))},v=function(e){document.body.style.setProperty("cursor",""),function(e){return(0,je.throttle)((function(){var t,n=e.clientX-c,o=(null!==(t=s.resizeWidth)&&void 0!==t?t:s.calcWidth)+n;Number(s.minWidth)<o&&(f.value=e.clientX-c+d)}),60)}(e)()},h=function e(t,n){var o,r;(0,je.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)})))},g=(a(t={},n.MOUSE_DOWN,(function(e,t){if(i){l=!0,document.body.style.setProperty("cursor","col-resize"),s=t,c=e.clientX;var n=e.target.closest("table");d=c-n.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",v)}})),a(t,n.MOUSE_MOVE,(function(e,t){l&&!u&&(u=!0);var n=e.target.closest("th");if(u&&n.style.setProperty("user-select","none"),!u){if(!n)return;var o=n.getBoundingClientRect();o.width>12&&o.right-e.pageX<8?(i=!0,h(n,"col-resize")):(h(n,""),i=!1)}})),a(t,n.MOUSE_OUT,(function(e,t){var n=e.target;u||h(n,"")})),t),m=function(e){return"".concat("HeadColumnResize","_").concat(e)},y=function(){e.forEach((function(e){!1!==e.resizable&&Object.keys(g).forEach((function(t){var n=m(t);e.listeners.has(n)||e.listeners.set(n,[]),e.listeners.get(n).push(g[t])}))}))};o&&y();var b=(0,r.computed)((function(){return{position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}}));return{registerResizeEvent:y,resetResizeEvents:function(){e.forEach((function(e){Object.keys(g).forEach((function(t){var n=m(t);e.listeners.has(n)&&(e.listeners.get(n).length=0)}))}))},dragOffsetX:f,dragOffsetXStyle:b}}(l,!0),T=y.dragOffsetXStyle,O=y.dragOffsetX,x=y.resetResizeEvents,E=y.registerResizeEvent,N=function(e,t){var n=(0,r.reactive)([]),o=Ft(e,t).getColumns;if("disabled"===e.columnPick)return{activeColumns:n};var i=(0,r.reactive)(zt(e));return(0,r.watchEffect)((function(){n=o().map((function(e,t){return{index:t,_column:e,active:i.some((function(e){return e===t}))}}));var t=zt(e);n.forEach((function(e,n){Object.assign(e,{active:t.some((function(e){return e===n}))})}))})),{activeColumns:n}}(e,t).activeColumns;(0,r.watch)((function(){return[e.settings]}),(function(){var t;((null===(t=e.settings)||void 0===t?void 0:t.checked)||[]).length&&m()}));var k=(0,je.debounce)((function(){m(),x(),E()}),120);(0,r.watch)((function(){return s}),(function(){k()}),{immediate:!0,deep:!0});var L=e.columns.reduce((function(e,t,n){var o=ot(t,["field","type"],[t,n]),r=bt(t.sort);return r?Object.assign(Object.assign({},e||{}),a({},o,null==r?void 0:r.value)):e}),null),A=(0,r.reactive)({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:N,settings:e.settings,setting:{size:null===(n=e.settings)||void 0===n?void 0:n.size,height:S[null===(o=e.settings)||void 0===o?void 0:o.size]},defaultSort:L||e.defaultSort}),R=function(e){var t;return!!A.rowActions.has(e)&&(null===(t=A.rowActions.get(e))||void 0===t?void 0:t.isExpand)},P=function(){return A.rowActions.has(h)?A.rowActions.get(h):!!e.selectionKey&&F.every((function(e){return W(e)}))},j=function(e){var t=e[f],n=(A.rowActions.get(t)||{}).isSelected;return void 0!==n&&n},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=!1,n=!1;F.forEach((function(o){var r=e(o);t||r||(t=!0),!n&&r&&(n=!0)})),A.rowActions.set(g,n&&t),A.rowActions.set(h,n&&!t)},I=function(){e.columns.some((function(e){return"selection"===e.type}))&&H((function(e){return W(e)}))},M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n="boolean"==typeof t?t:!P();A.rowActions.set(h,n),A.rowActions.set(g,!1),F.forEach((function(t,o){var r;if(Ct(e,{row:t,index:o,isCheckAll:!1})){var i=t[f],l=Object.assign({},null!==(r=A.rowActions.get(i))&&void 0!==r?r:{},{isSelected:n});A.rowActions.set(i,l)}})),H(),G(n),$(null,t,!0)},W=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return j(e)};return"function"==typeof e.isSelectedFn?Reflect.apply(e.isSelectedFn,void 0,[{row:t,data:e.data}]):"string"==typeof e.selectionKey&&e.selectionKey.length?(0,je.get)(t,e.selectionKey):n(t)},D=function(t,n,o){return W(t,(function(){var r,i=void 0===n?t[f]:n;return!(!Ct(e,{row:t,index:o,isCheckAll:!1})||!P())||!!A.rowActions.has(i)&&(null===(r=A.rowActions.get(i))||void 0===r?void 0:r.isSelected)}))},F=(0,r.reactive)([]),z=(0,r.computed)((function(){return l.some((function(e){return"function"==typeof e.rowspan||/^\d$/.test("".concat(e.rowspan))||"function"==typeof e.colspan||/^\d$/.test("".concat(e.colspan))}))})),U=(0,r.computed)((function(){return l.some((function(e){return"selection"===e.type}))})),K=(0,r.computed)((function(){return l.some((function(e){return"expand"===e.type}))})),B=(0,r.computed)((function(){return l.some((function(e){return"index"===e.type}))})),G=function(t){if(z.value||U.value||K.value||B.value){var n=null,o={};return F.forEach((function(r,i){var l=r[f];if(K.value&&Object.assign(r,a({},p,R(r[f]))),z.value){var u=q(r,l,i,o,n);n=r[f],Object.assign(r,a({},C,u))}if(B.value&&Object.assign(r,a({},d,i)),U.value){var c=Ct(e,{row:r,index:i,isCheckAll:!1});Object.assign(r,a({},v,function(e,t,n,o){var r=D(n,n[f],o);return e&&"boolean"==typeof t?t:r}(c,t,r,i)))}})),void(U.value&&"boolean"!=typeof t&&I())}},q=function(e,t,n,o,r){var i,u=0,c=null!==(i=o[r])&&void 0!==i?i:{};return o[t]||(o[t]={}),l.forEach((function(r,i){var l,s,d=gt(r,i,e,n),f=d.colspan,p=d.rowspan,v=r[w],h=null!==(s=null===(l=c[v])||void 0===l?void 0:l.skipRowLen)&&void 0!==s?s:0,g=a({},v,{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0});u>0&&(g[v].skipColLen=u,g[v].skipCol=!0,u-=1),h>1?(g[v].skipRowLen=h-1,g[v].skipRow=!0):p>1&&(g[v].skipRowLen=p,g[v].skipRow=!1),f>1&&(g[v].skipColLen=f,u=f-1),Object.assign(o[t],Object.assign({},g))})),o[t]},X=(0,je.debounce)(G,120);(0,r.watch)([z,U,K,B],(function(){X()}));var $=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.asyncData&&e.rowKey)if(o)e.data.forEach((function(t){(0,je.has)(t,e.selectionKey)&&(0,je.set)(t,e.selectionKey,!!n)}));else if((0,je.has)(t,e.selectionKey)){var r=e.data.find((function(n){return(0,je.get)(n,e.rowKey)===(0,je.get)(t,e.rowKey)}));(0,je.set)(r,e.selectionKey,!!n)}},Y=Mt(e,l,!1),Z=Y.fixedColumns,J=Y.resolveColumnStyle,Q=Y.resolveColumnClass,ee=Y.fixedWrapperClass;return{colgroups:l,dragOffsetXStyle:T,dragOffsetX:O,reactiveSchema:A,indexData:F,fixedWrapperClass:ee,fixedColumns:Z,resolveColumnStyle:J,resolveColumnClass:Q,initIndexData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=null,o={},r=e.data.map((function(e){return Object.assign(a({},f,(0,Se.v4)()),e)}));if(z.value||U.value||K.value||B.value){var i=r.map((function(r,i){var l,u=ft(r,e,i);n=u;var c=Object.assign(Object.assign({},r),(a(l={},f,r[f]||u),a(l,b,Object.assign({},r)),l));if(z.value){var s=q(r,u,i,o,n);Object.assign(c,a({},C,s))}return U.value&&Object.assign(c,a({},v,D(r,u,i))),B.value&&Object.assign(c,a({},d,i)),K.value&&Object.assign(c,a({},p,!!t&&R(u))),c}));return F.length=0,F.push.apply(F,_e(i)),void(U.value&&I())}F.length=0,F.push.apply(F,_e(r))},updateIndexData:G,setRowExpand:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=e[f],r="boolean"==typeof n?n:!R(o);A.rowActions.set(o,Object.assign({},null!==(t=A.rowActions.get(o))&&void 0!==t?t:{},{isExpand:r})),G()},setAllRowExpand:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;F.forEach((function(t){var n,o=t[f],r="boolean"==typeof e?e:!R(o);A.rowActions.set(o,Object.assign({},null!==(n=A.rowActions.get(o))&&void 0!==n?n:{},{isExpand:r}))})),G()},updateColGroups:m,clearSelection:function(){M(!1)},toggleAllSelection:M,toggleRowSelection:function(e,t){var n,o=e[f];if(o){var r="boolean"==typeof t?t:!D(e,o),i=Object.assign({},null!==(n=A.rowActions.get(o))&&void 0!==n?n:{},{isSelected:r});A.rowActions.set(o,i),t||A.rowActions.set(h,!1),H(),G(),$(e,t,!1)}},getSelection:function(){return F.filter((function(e){return D(e)}))},clearSort:function(){Array.isArray(A.defaultSort)&&A.defaultSort.splice(0),A.defaultSort=L||e.defaultSort}}};const Bt=(0,r.defineComponent)({name:"Table",props:ne,emits:be,setup:function(e,t){var n=(0,ie.useLocale)("table"),l=null,u=null,c=null,s=new he,d=(0,r.reactive)([]),f=Ft(e,d).initColumns;(0,r.provide)(N,f),(0,r.provide)(k,s);var v=(0,r.ref)(),h=(0,r.ref)(),g=(0,r.ref)(0),m=Kt(e,d),y=m.colgroups,b=m.dragOffsetXStyle,C=m.dragOffsetX,w=m.reactiveSchema,O=m.indexData,x=m.fixedColumns,E=m.resolveColumnStyle,S=m.resolveColumnClass,L=m.setRowExpand,A=m.setAllRowExpand,R=m.initIndexData,P=m.fixedWrapperClass,j=m.clearSelection,H=m.toggleAllSelection,I=m.toggleRowSelection,M=m.getSelection,W=m.clearSort,D=m.updateColGroups,F=Oe(e,O),z=F.pageData,U=F.localPagination,K=F.resolvePageData,B=F.watchEffectFn,G=Ut(e,d,v,w,z),q=G.tableClass,X=G.headClass,$=G.contentClass,Y=G.footerClass,Z=G.wrapperStyle,J=G.contentStyle,Q=G.headStyle,ee=G.hasScrollYRef,te=G.fixHeight,ne=G.updateBorderClass,oe=G.resetTableHeight,re=G.getColumnsWidthOffsetWidth,le=G.hasFooter,ue=(0,ie.usePrefix)().resolveClassName,ce=(0,r.computed)((function(){return{hasScrollY:ee.value}})),se=new Dt(e,t,w,y,ce,n),de=function(){var e=v.value.querySelector(".".concat(ue("table-body-content"))),t=e.querySelector("table");if(t){var n=t.scrollWidth,o=e.clientWidth;g.value=n-o}};(0,r.watch)((function(){return[e.data,e.pagination,e.height,e.maxHeight,e.minHeight]}),(function(){R(e.reserveExpand),B(c,l,u),(0,r.nextTick)((function(){oe(v.value),ne(v.value)}))}),{immediate:!0,deep:!0}),(0,r.watchEffect)((function(){if((null==v?void 0:v.value)instanceof HTMLElement){var e=re();at(v.value,y,20,e),de()}})),se.on(pe.ON_SORT_BY_CLICK,(function(e){var n=e.sortFn,o=e.column,i=e.index,s=e.type;"function"==typeof n&&(l=n,u=o,Object.assign(u,a({},T,s)),K(c,l,u)),t.emit(ve.COLUMN_SORT,{column:(0,r.unref)(o[_]),index:i,type:s})})).on(pe.ON_FILTER_CLICK,(function(e){var n=e.filterFn,o=e.checked,i=e.column,a=e.index;"function"==typeof n&&K(c=n,l,u),t.emit(ve.COLUMN_FILTER,{checked:o,column:(0,r.unref)(i[_]),index:a})})).on(pe.ON_SETTING_CHANGE,(function(e){var n=e.checked,o=void 0===n?[]:n,i=e.size,l=e.height,a=e.fields;(0,r.nextTick)((function(){D({checked:o,fields:a}),ne(v.value);var e=re();o.length&&at(v.value,y,V,e),t.emit(ve.SETTING_CHANGE,{checked:o,size:i,height:l,fields:a})}))})).on(pe.ON_ROW_EXPAND_CLICK,(function(e){var n=e.row,o=e.column,r=e.index,i=e.rows,l=e.e;t.emit(ve.ROW_EXPAND_CLICK,{row:wt(n),column:_t(o),index:r,rows:i,e:l}),L(n,!n[p])})).on(pe.ON_ROW_CHECK,(function(n){var o=n.row,r=n.isAll,i=n.index,l=n.value;r?(H(l),t.emit(ve.ROW_SELECT_ALL,{checked:l,data:e.data})):(I(o,l),t.emit(ve.ROW_SELECT,{row:wt(o),index:i,checked:l,data:e.data})),t.emit(ve.ROW_SELECT_CHANGE,{row:wt(o),isAll:r,index:i,checked:l,data:e.data})}));var fe=function(e){var n,r=null!==(n=w.pos.bottom)&&void 0!==n?n:0,i=e[1],l=i.translateX,a=i.translateY,u=i.pos,c=void 0===u?{}:u;w.scrollTranslateY=a,w.scrollTranslateX=l,w.pos=c;var s=c.bottom;s<=2&&r>s&&(0,o.debounce)(60,(function(){t.emit(ve.SCROLL_BOTTOM,Object.assign(Object.assign({},c),{translateX:l,translateY:a}))}),!0)(),de()};(0,r.onMounted)((function(){if(e.observerResize){var t=ut(v.value,(function(){if(v.value){"100%"!==e.height&&"auto"!==e.height||oe(v.value),ne(v.value);var t=re();at(v.value,y,20,t)}}),180,!0,e.resizerWay);t.start(),(0,r.onBeforeUnmount)((function(){t.disconnect(),t=null}))}})),(0,r.onBeforeUnmount)((function(){se.destroy()})),t.expose({setRowExpand:L,setAllRowExpand:A,clearSelection:j,toggleAllSelection:H,toggleRowSelection:I,getSelection:M,clearSort:W,scrollTo:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0};null===(t=null===(e=h.value)||void 0===e?void 0:e.scrollTo)||void 0===t||t.call(e,n)},getRoot:function(){return v.value}});var ge=(0,r.computed)((function(){return Object.assign(Object.assign({},$),{"__is-empty":!z.length})})),me=(0,r.computed)((function(){var t;return a(t={},ue("table-body-content"),!0),a(t,ue("stripe"),e.stripe),a(t,"with-virtual-render",e.virtualEnabled),t})),ye={column_drag_line:!0,"offset-x":!0},be=(0,r.computed)((function(){return Object.assign(Object.assign({},b.value),{left:"".concat(C.value-w.scrollTranslateX,"px")})})),Ce={"scroll-loading":!0,_bottom:!0},we=(0,r.computed)((function(){var t;return a(t={},ue("fixed-bottom-border"),!0),a(t,"_is-empty",!e.data.length),t})),_e={zIndex:-1,width:0,height:0,display:"none"},Te=(0,r.computed)((function(){return{"--footer-height":le.value?"".concat(e.paginationHeight,"px"):"0"}})),Se=(0,r.computed)((function(){return Object.assign({right:ee.value?"".concat(6,"px"):0,"--fix-height":"".concat(te.value,"px")},Te.value)})),Ne=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,l;if(o.value){var a="boolean"==typeof n.value?{loading:!!n.value,inline:!0,title:"",size:xe.BkLoadingSize.Normal,mode:xe.BkLoadingMode.Default,indicator:null}:n.value,u=a.loading,c=a.size,s=a.mode,d=a.title,f=a.inline,p=a.indicator;return null!==(l=null===(i=(e=t.slots).fixedBottom)||void 0===i?void 0:i.call(e))&&void 0!==l?l:(0,r.createVNode)(Ee(),{loading:u,size:c,mode:s,title:d,inline:f,indicator:p},null)}}}}(e,t).renderScrollLoading,ke=(0,r.computed)((function(){return e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}})),Le=(0,r.computed)((function(){return Object.assign({"--prepend-left":"".concat(w.scrollTranslateX,"px"),position:"sticky",top:0,zIndex:2},e.prependStyle||{})}));return function(){var n,o;return(0,r.createVNode)("div",{class:q.value,style:Z.value,ref:v},[(0,r.createVNode)("div",{class:X,style:Q.value},[se.renderTableHeadSchema()]),(0,r.createVNode)(ae(),(0,r.mergeProps)({ref:h,lineHeight:se.getRowHeight,class:ge.value,style:J,list:z},ke.value,{contentClassName:me.value,onContentScroll:fe,throttleDelay:0,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:function(){return t.slots.prepend?(0,r.createVNode)("div",{style:Le.value,class:"prepend-row"},[t.slots.prepend()]):null},default:function(e){return se.renderTableBodySchema(e.data||z)},afterSection:function(){return(0,r.createVNode)("div",{class:we.value},null)}}),(0,r.createVNode)("div",{class:P,style:Se.value},[x.value.map((function(e){var t=e.isExist,n=e.colPos,o=e.column;return t?"":(0,r.createVNode)("div",{class:S(o,w.scrollTranslateX,g.value),style:E(n)},null)})),(0,r.createVNode)("div",{class:ye,style:be.value},null),(0,r.createVNode)("div",{class:Ce},[Ne()])]),(0,r.createVNode)("div",{class:Y.value,style:Te.value},[le.value&&se.renderTableFooter(U.value)]),(0,r.createVNode)("div",{style:_e},[null===(o=(n=t.slots).default)||void 0===o?void 0:o.call(n)])])}}});var Gt=(0,o.withInstallProps)(Bt,{Column:re});const qt=Gt})(),y})()));
|
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("../loading"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("lodash"),require("../exception"),require("../popover"),require("../icon/"),require("../button"));else if("function"==typeof define&&define.amd)define(["../shared","vue","vue-types","../config-provider","../virtual-render","../loading","../checkbox","../icon","../pagination","../directives","lodash","../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("../loading"),require("../checkbox"),require("../icon"),require("../pagination"),require("../directives"),require("lodash"),require("../exception"),require("../popover"),require("../icon/"),require("../button")):t(e["../shared"],e.vue,e["vue-types"],e["../config-provider"],e["../virtual-render"],e["../loading"],e["../checkbox"],e["../icon"],e["../pagination"],e["../directives"],e.lodash,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,l,a,u,c,s,d,f,p,v)=>(()=>{var h={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),l=n(8725),a=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,g=v-a+(h-u)/1e4;if(g<0&&void 0===e.clockseq&&(f=f+1&16383),(g<0||v>a)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=v,u=h,r=f;var m=(1e4*(268435455&(v+=122192928e5))+h)%4294967296;s[c++]=m>>>24&255,s[c++]=m>>>16&255,s[c++]=m>>>8&255,s[c++]=255&m;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||l(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 l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},4976:e=>{"use strict";e.exports=v},5800:e=>{"use strict";e.exports=l},2717:e=>{"use strict";e.exports=o},4061:e=>{"use strict";e.exports=c},9911:e=>{"use strict";e.exports=d},6870:e=>{"use strict";e.exports=a},7685:e=>{"use strict";e.exports=p},4870:e=>{"use strict";e.exports=i},5801:e=>{"use strict";e.exports=u},5537:e=>{"use strict";e.exports=f},4212:t=>{"use strict";t.exports=e},3511:e=>{"use strict";e.exports=r},467:e=>{"use strict";e.exports=s},748:e=>{"use strict";e.exports=t},210:e=>{"use strict";e.exports=n}},g={};function m(e){var t=g[e];if(void 0!==t)return t.exports;var n=g[e]={exports:{}};return h[e](n,n.exports,m),n.exports}m.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return m.d(t,{a:t}),t},m.d=(e,t)=>{for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var y={};return(()=>{"use strict";m.r(y),m.d(y,{BkTable:()=>Gt,BkTableColumn:()=>re,default:()=>qt});var e,t,n,o=m(4212),r=m(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 l(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 a(e,t,n){return(t=l(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="__$table_row_index",f="__$uuid",p="__row_expand",v="__row_selection",h="__row_selection_all",g="__row_selection_indeterminate",b="__row_source_data",C="__row_skip_config",w="__col_$uuid",_="__col_source_data",T="__sort_type",O=42;!function(e){e.DEF1="def1",e.DEF2="def2"}(u||(u={}));var x,E=(a(e={},u.DEF1,"#FAFBFD"),a(e,u.DEF2,"#F0F1F5"),e),S={large:78,medium:60,small:42},N="InitColumns",k="BKTableCahce";!function(e){e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom"}(x||(x={}));var L,A,R,P,j=[x.ASC,x.DESC,x.NULL,x.CUSTOM],V=80,H=m(210);!function(e){e.CURRENT="current",e.ALL="all"}(L||(L={})),function(e){e.STATIC="static",e.AUTO="auto"}(A||(A={})),(0,H.toType)("showOverflowTooltipMode",{default:A.AUTO}),function(e){e.SELECTION="selection",e.INDEX="index",e.EXPAND="expand",e.NONE="none"}(R||(R={})),function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.NONE=""}(P||(P={}));var I,M,W,D=(0,H.toType)("columnType",{default:R.NONE}),F=(0,H.toType)("columnType",{default:P.NONE});!function(e){e.FULL="full",e.FUZZY="fuzzy"}(I||(I={})),(0,H.toType)("full",{default:I.FULL}),function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(M||(M={})),(0,H.toType)("columnSize",{default:M.SMALL}),function(e){e.LEFT="left",e.RIGHT="right"}(W||(W={}));var z,U,K=(0,H.string)(),B=(0,H.toType)("IOverflowTooltipPropType",{}).def(!1),G=((0,H.toType)("IOverflowTooltipType",{}).def({content:"",disabled:!1,watchCellResize:!0,mode:A.AUTO}),(0,H.toType)("ISortPropShape",{}).def(!1)),q=(0,H.toType)("IFilterPropShape",{}).def(!1);!function(e){e.MULTI="multi",e.SINGLE="single",e.DISABLED="disabled"}(z||(z={})),function(e){e.DEBOUNCE="debounce",e.THROTTLE="throttle"}(U||(U={}));var X=(0,H.toType)("IColumnType",{}).def({width:"100%",label:function(){return""}}),$=(0,H.toType)("ITableSettingPropType",{}).def(!1),Y=(0,H.toType)("LabelFunctionStringType",{}),Z=(0,H.toType)("RenderFunctionStringType",{}),J=(0,H.toType)("SpanFunctionStringType",{}),Q=(0,H.toType)("RowClassFunctionStringType",{}),ee=(0,H.toType)("RowHeightFunctionNumberType",{}),te=((0,H.toType)("FunctionNumberType",{}),function(e){return(0,H.toType)("StringNumberType",{}).def(e)}),ne=((0,H.toType)("IColumnPropType",{}).def({label:void 0,minWidth:V}),{data:o.PropTypes.arrayOf(o.PropTypes.any).def([]),columns:o.PropTypes.arrayOf(X).def([]),activeColumn:o.PropTypes.oneOfType([o.PropTypes.number.def(-1),o.PropTypes.arrayOf(o.PropTypes.number.def(-1))]),columnPick:(0,H.toType)("columnPick",{}).def(z.DISABLED),height:te("auto"),stripe:o.PropTypes.bool.def(!1),minHeight:te(84),maxHeight:te("auto"),rowHeight:ee.def(O),headHeight:o.PropTypes.number.def(O),showHead:o.PropTypes.bool.def(!0),thead:(0,H.toType)("ITheadType",{}).def({color:u.DEF1,height:O,isShow:!0}),virtualEnabled:o.PropTypes.bool.def(!1),border:o.PropTypes.oneOfType([o.PropTypes.arrayOf((0,H.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),emptyText:o.PropTypes.string,settings:$,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(""),isSelectedFn:o.PropTypes.func.def(void 0),rowKey:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.func]).def(d),showOverflowTooltip:B,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,H.toType)("ResizerWay",{default:U.DEBOUNCE}),observerResize:o.PropTypes.bool.def(!0),align:F,headerAlign:F,prependStyle:o.PropTypes.style().def({})}),oe={label:Y,field:Y,render:Z,width:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]),minWidth:te(V),columnKey:o.PropTypes.string.def(""),showOverflowTooltip:B,type:D,resizable:o.PropTypes.bool.def(!0),fixed:o.PropTypes.oneOfType([o.PropTypes.bool,K]).def(!1),sort:G,filter:q,colspan:J.def(1),rowspan:J.def(1),align:F,className:Q,prop:Y,index:o.PropTypes.number.def(void 0)};const re=(0,r.defineComponent)({name:"TableColumn",props:oe,setup:function(e){return{initColumns:(0,r.inject)(N,(function(e){}),!1),bkTableCache:(0,r.inject)(k,{queueStack:function(e,t){return null==t?void 0:t()}}),column:(0,r.reactive)(Object.assign(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,l;if(Array.isArray(t))e(t);else{var a=!0;if("TableColumn"===(null===(o=t.type)||void 0===o?void 0:o.name)){a=Object.hasOwnProperty.call(t.props||{},"key");var u=Object.assign(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===(l=t.children)||void 0===l?void 0:l.length)&&a&&e(t.children)}}))}(t),e.initColumns(n)}))},updateColumnDefineByIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object.assign(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 ie=m(2717),le=m(3511),ae=m.n(le);function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,l(o.key),o)}}function se(e,t,n){return t&&ce(e.prototype,t),n&&ce(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var de,fe,pe,ve,he=function(){function e(){ue(this,e),this.storage=void 0,this.storage={}}return se(e,[{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])}}]),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"}(pe||(pe={})),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"}(ve||(ve={}));var ge=function(e,t,n,o,r){return!0},me=function(e){return!0},ye=function(e){return!0},be=(a(de={},ve.COLUMN_PICK,(function(e){return!0})),a(de,ve.COLUMN_FILTER,(function(e){return!0})),a(de,ve.COLUMN_SORT,(function(e){return!0})),a(de,ve.COLUMN_FILTER_SAVE,(function(e){return!0})),a(de,ve.ROW_CLICK,ge),a(de,ve.ROW_DBL_CLICK,ge),a(de,ve.ROW_EXPAND_CLICK,(function(e){return!0})),a(de,ve.ROW_SELECT,(function(e){return!0})),a(de,ve.ROW_SELECT_ALL,(function(e){return!0})),a(de,ve.ROW_SELECT_CHANGE,(function(e){return!0})),a(de,ve.PAGE_LIMIT_CHANGE,me),a(de,ve.PAGE_VALUE_CHANGE,me),a(de,ve.SETTING_CHANGE,(function(e){return!0})),a(de,ve.SCROLL_BOTTOM,(function(e){return!0})),a(de,ve.CELL_CLICK,ye),a(de,ve.CELL_DBL_CLICK,ye),a(de,ve.ROW_MOUSE_ENTER,ge),a(de,ve.ROW_MOUSE_LEAVE,ge),de);function Ce(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 we(e,t){if(e){if("string"==typeof e)return Ce(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)?Ce(e,t):void 0}}function _e(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||we(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.")}()}a(fe={},ve.NATIVE_CLICK,ge),a(fe,ve.NATIVE_DBL_CLICK,ge);var Te=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{}};const Oe=function(e,t){var n=(0,r.ref)(0),o=(0,r.ref)(0),i=(0,r.reactive)({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});i=Te(e.pagination,i);var l=(0,r.ref)(null),a=(0,r.reactive)([]),u=function(e,t,n){"function"==typeof t&&e.sort((function(e,o){return t(e,o,n[T])}))},c=function(e,r,i){var l,c=t.slice();(null!==(l=null==i?void 0:i.sort)&&void 0!==l?l:{}).sortScope===L.ALL&&u(c,r,i),a.length=0,a.push.apply(a,_e(c.slice(n.value,o.value))),function(e,n){if("function"==typeof n){var o=e.filter((function(e,o){return n(e,o,t)}));e.length=0,e.push.apply(e,_e(o))}}(a,e),u(a,r,i)};return{pageData:a,localPagination:l,resolvePageData:c,watchEffectFn:function(r,a,u){i=Te(e.pagination,i),e.pagination&&(l.value=e.remotePagination?i:Object.assign(Object.assign({},i),{count:t.length})),function(){if(!e.pagination||e.remotePagination)return n.value=0,void(o.value=t.length);n.value=(i.current-1)*i.limit,o.value=i.current*i.limit}(),c(r,a,u)}}};var xe=m(4870),Ee=m.n(xe);var Se=m(8022),Ne=m(5800),ke=m.n(Ne),Le=m(6870),Ae=m(5801),Re=m.n(Ae),Pe=m(4061),je=m(467),Ve=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,Ie=void 0!==m.g&&m.g.Math===Math?m.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Me="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Ie):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},We=["top","right","bottom","left","width","height","size","weight"],De="undefined"!=typeof MutationObserver,Fe=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&&a()}function l(){Me(i)}function a(){var e=Date.now();if(n){if(e-r<2)return;o=!0}else n=!0,o=!1,setTimeout(l,t);r=e}return a}(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),De?(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;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}(),ze=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||Ie},Ke=$e(0,0,0,0);function Be(e){return parseFloat(e)||0}function Ge(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Be(e["border-"+n+"-width"])}),0)}var qe="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?qe(e)?function(e){var t=e.getBBox();return $e(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Ke;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]=Be(i)}return t}(o),i=r.left+r.right,l=r.top+r.bottom,a=Be(o.width),u=Be(o.height);if("border-box"===o.boxSizing&&(Math.round(a+i)!==t&&(a-=Ge(o,"left","right")+i),Math.round(u+l)!==n&&(u-=Ge(o,"top","bottom")+l)),!function(e){return e===Ue(e).document.documentElement}(e)){var c=Math.round(a+i)-t,s=Math.round(u+l)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(s)&&(u-=s)}return $e(r.left,r.top,a,u)}(e):Ke}function $e(e,t,n,o){return{x:e,y:t,width:n,height:o}}var Ye=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=$e(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}(),Ze=function(e,t){var n,o,r,i,l,a,u,c=(o=(n=t).x,r=n.y,i=n.width,l=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),ze(u,{x:o,y:r,width:i,height:l,top:r,right:o+i,bottom:l+r,left:o}),u);ze(this,{target:e,contentRect:c})},Je=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Ve,"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 Ye(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 Ze(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}(),Qe="undefined"!=typeof WeakMap?new WeakMap:new Ve,et=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=Fe.getInstance(),o=new Je(t,n,this);Qe.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){et.prototype[e]=function(){var t;return(t=Qe.get(this))[e].apply(t,arguments)}}));const tt=void 0!==Ie.ResizeObserver?Ie.ResizeObserver:et;var nt=void 0,ot=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,[nt].concat(_e(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},rt=function(e){return/^\d+$/.test("".concat(e))?[parseInt("".concat(e),10)]:[]},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},lt=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["resizeWidth","calcWidth","width"];return null!==(n=null!==(t=e[o[0]])&&void 0!==t?t:e[o[1]])&&void 0!==n?n:e[o[2]]},at=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:V,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=(e.getBoundingClientRect()||{}).width-o,i=r,l=[],a=function(e,t){var n=e.minWidth,o=void 0===n?void 0:n;if(void 0===o)return t<V?V:t;var i=t;return/^\d+\.?\d*$/.test("".concat(o))&&(i=Number(o)),/^\d+\.?\d*%$/.test("".concat(o))&&(i=Number(o)*r/100),/^\d+\.?\d*px$/i.test("".concat(o))&&(i=Number("".concat(o).replace(/px/i,""))),i},u=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=a(e,t),r=t<o?o:t;Object.assign(e,{calcWidth:r}),n&&(i-=r)<0&&(i=0)};if(t.forEach((function(e,t){if(!e.isHidden){var o=String(lt(e,["resizeWidth","width"])),r=!0;if(/^\d+\.?\d*(px)?$/.test(o)){var a=Number(o.replace("px",""));u(e,a),r=!1}if(/^\d+\.?\d*%$/.test(o)){var c=n;if(i>0){var s=Number(o.replace("%",""));c=i*s/100}u(e,c),r=!1}r&&l.push(t)}})),l.length>0){var c=n;i>0?l.forEach((function(e,n){c=i/(l.length-n),u(t[e],c,!1);var o=t[e].calcWidth;i-=o})):l.forEach((function(e){var n=a(t[e],V);Object.assign(t[e],{calcWidth:n})}))}},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,je.debounce)(r,n):(0,je.throttle)(r,n),l=new tt((function(){Reflect.apply(i,nt,[])}));return o&&"function"==typeof t&&t(),{start:function(){l.observe(e)},disconnect:function(){l.unobserve(e),l.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},Object.assign({},r))},st=function(e,t,n){return"index"===n.type?e[d]+1:(0,je.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,nt,n),n):[]},ft=function(e,t,n){var o=pt(e,t,n);return null!==o?o:(0,Se.v4)()},pt=function(e,t,n){return"string"==typeof t.rowKey?t.rowKey===d?"__ROW_INDEX_".concat(n):(0,je.get)(e,t.rowKey):"function"==typeof t.rowKey?Reflect.apply(t.rowKey,nt,[e]):null},vt=function(e,t,n){var o;return o=t,e.some((function(e){return e.field===ot(o,["field","type"],[o])}))&&n.length&&!n.includes(ot(t,["field","type"],[t]))},ht=function(e,t,n,o,r){return"function"==typeof e[r]?Reflect.apply(e[r],nt,[{column:e,colIndex:t,row:n,rowIndex:o}]):"number"==typeof e[r]?e[r]:1},gt=function(e,t,n,o){return{colspan:ht(e,t,n,o,"colspan"),rowspan:ht(e,t,n,o,"rowspan")}},mt=function(e,t){var n,o,r=e.field,i=function(t){return st(t,r,e)},l="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===x.NULL?function(){return!0}:function(e,n){return l(e,n)*(t===x.DESC?-1:1)}},yt=function(e){var t,n=(a(t={},x.NULL,0),a(t,x.ASC,1),a(t,x.DESC,2),t);return void 0===n[e]?x.NULL:Object.keys(n)[(n[e]+1)%3]},bt=function(e){return"string"==typeof e?{value:e}:"boolean"==typeof e&&e?{value:x.NULL}:"object"===i(e)&&null!==e?i(e.sortFn)?Object.assign({value:"custom"},e):e:null},Ct=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})},wt=function(e){return(0,r.unref)(e[b]||e)},_t=function(e){return(0,r.unref)(e[_]||e)};const Tt=(0,r.defineComponent)({name:"TableCell",props:{column:X,row:o.PropTypes.any.def({}),parentSetting:B,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,H.toType)("ResizerWay",{default:U.DEBOUNCE})},setup:function(e,t){var n=this,l=t.slots,a=(0,r.ref)(),u=(0,r.ref)(!1),c=(0,r.computed)((function(){return{textAlign:e.column.textAlign}})),s=(/boolean|object/.test(i(e.column.showOverflowTooltip))&&null!==e.column.showOverflowTooltip?e.column:{showOverflowTooltip:e.parentSetting}).showOverflowTooltip,d=void 0!==s&&s,f=null,p=function(){var t,o=!0,r=e.resizerWay,l=a.value.innerText,u="auto",c=!0;return"boolean"==typeof d&&(o=!d),"object"===i(d)&&(o=d.disabled,r=d.resizerWay||"debounce",l=d.content||a.value.innerText,"function"==typeof d.content&&(l=d.content(e.column,e.row)),c=d.watchCellResize,u=d.mode||"auto"),"function"==typeof o&&(o=Reflect.apply(o,n,[e.column,e.row])),e.isHead&&(o=!1,u="auto",l=null===(t=v())||void 0===t?void 0:t.innerHTML,e.headExplain&&(u="static",l=e.headExplain)),e.column.explain&&(o=!1,u="static","object"===i(e.column.explain)&&(l=ot(e.column.explain,"content",[e.column,e.row]))),{disabled:o,content:l,mode:u,resizerWay:r,watchCellResize:c}},v=function(){var t,n;return e.isHead?null===(n=null===(t=a.value)||void 0===t?void 0:t.querySelector)||void 0===n?void 0:n.call(t,".head-text"):a.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 l=(0,r.ref)(p());null===f&&(f=(0,Pe.bkEllipsisInstance)(e,{disabled:l.value.disabled,content:l.value.content,mode:l.value.mode}))}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 l=ut(a.value,(function(){h()}),60,!0,o);l.start(),(0,r.onBeforeUnmount)((function(){l.disconnect(),l=null}))}})),(0,r.onBeforeUnmount)((function(){null==f||f.destroyInstance(a.value)}));var g=e.headExplain||e.column.explain;return function(){var t;return(0,r.createVNode)("div",{class:["cell",e.column.type,g?"explain":""],style:c.value,ref:a,title:e.title},[null===(t=l.default)||void 0===t?void 0:t.call(l)])}}}),Ot=(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 xt=se((function e(t,n){ue(this,e),this.props=null,this.ctx=null,this.props=t,this.ctx=n})),Et=m(9911),St=m.n(Et);const Nt=(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,ie.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)(St(),{scene:"part",type:o.value,description:n.value},null)}}});var kt=m(5537),Lt=m.n(kt);const At=(0,r.defineComponent)({name:"HeadFilter",props:{column:X,height:o.PropTypes.number.def(O)},emits:["change","filterSave"],setup:function(e,t){var n=t.emit,i=(0,ie.usePrefix)().resolveClassName,l=(0,ie.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});(0,r.watch)((function(){return c.value}),(function(){d.checked=s.value}),{immediate:!0,deep:!0});var f=(0,r.computed)((function(){var t;return(0,o.classes)((a(t={},i("table-head-action"),!0),a(t,"column-filter",!0),a(t,"--row-height","".concat(e.height,"px")),a(t,"active",d.checked.length),a(t,"opened",d.isOpen),t))})),p=(0,o.classes)(a({},i("table-head-filter"),!0)),v=(0,r.ref)(null),h=function(e){d.isOpen=e,e&&setTimeout((function(){v.value.reset()}))},g="light ".concat(i("table-head-filter")),m=(0,r.computed)((function(){var e=c.value.list;return void 0===e?[]:e})),y="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,ot(u,"field",[u,t]),u);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)},b=function(){C(!0),n("filterSave",_e(d.checked)),d.isOpen=!1},C=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_(O,l.value.confirm).disabled||e){if("custom"===c.value)return n("change",_e(d.checked),null),void(d.isOpen=!1);c.value.checked=d.checked,n("change",_e(d.checked),y)}},w=function(){d.checked.length&&(d.checked.length=0,d.isOpen=!1,(0,r.nextTick)((function(){return n("change",d.checked,y)})))},_=function(e,t){return{disabled:"disabled"===e||!1===e,text:"string"==typeof e?e:t}},T=c.value,O=T.btnSave,x=T.btnReset,E=function(){var e=_(x,l.value.reset),t=e.disabled,n=e.text;return t?"":(0,r.createVNode)("span",{class:["btn-filter-reset",d.checked.length?"":"disable"],onClick:w},[n])},S=function(e){return e.data.length?e.data.map((function(e){return(0,r.createVNode)("div",{class:"list-item"},[(0,r.createVNode)(ke(),{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,_e(Array.from(o))),C()}(t,e)}},{default:function(){return["".concat(e.text)]}})])})):(0,r.createVNode)("div",{class:"list-item is-empty"},[l.value.emptyText])};return function(){return(0,r.createVNode)(Lt(),(0,r.mergeProps)({trigger:"click",isShow:d.isOpen,placement:"bottom-start",renderType:o.RenderType.SHOWN,arrow:!1,offset:0},{theme:g},{onAfterShow:function(){return h(!0)},onAfterHidden:function(){return h(!1)}}),{default:function(){return(0,r.createVNode)(Le.Funnel,{class:f.value},null)},content:function(){return(0,r.createVNode)("div",{class:p},[(0,r.createVNode)(Ne.BkCheckboxGroup,{class:"content-list"},{default:function(){return[(0,r.createVNode)(ae(),{lineHeight:32,list:m.value,throttleDelay:0,scrollEvent:!0,ref:v,className:"content-items"},{default:S})]}}),(0,r.createVNode)("div",{class:"content-footer"},[(e=_(O,l.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:b},[n])),(0,r.createVNode)("span",{class:"btn-filter-split"},null),E()])]);var e,t,n}})}}});var Rt=m(7685);const Pt=(0,r.defineComponent)({name:"HeadSort",props:{column:X,defaultSort:o.PropTypes.oneOf(j).def(x.NULL),active:o.PropTypes.bool},emits:["change"],setup:function(e,t){var n,o,i=t.emit,l=(0,ie.usePrefix)().resolveClassName,a=(null===(o=null===(n=e.column)||void 0===n?void 0:n.sort)||void 0===o?void 0:o.value)||e.defaultSort||x.NULL,u=(0,r.ref)(a);(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,l,a=[],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)&&(a.push(o.value),a.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw r}}return a}}(t,n)||we(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===x.NULL&&(r=yt(n)),u.value===n&&(r=x.NULL);var l=mt(e.column,r),a=bt(e.column.sort);"custom"!==(null==a?void 0:a.value)?i("change",l,r):i("change",null!==(o=null==a?void 0:a.sortFn)&&void 0!==o?o:l,r)};return function(){return(0,r.createVNode)("span",{class:l("head-cell-sort")},[(0,r.createVNode)(Rt.AngleDownFill,{class:["sort-action","sort-asc",u.value===x.ASC?"active":""],style:"align-items: flex-end;",onClick:function(e){return c(e,x.ASC)}},null),(0,r.createVNode)(Rt.AngleUpFill,{class:["sort-action","sort-desc",u.value===x.DESC?"active":""],style:"align-items: flex-start;",onClick:function(e){return c(e,x.DESC)}},null)])}}});var jt=m(4976),Vt=m.n(jt);function Ht(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}const It=(0,r.defineComponent)({name:"Settings",props:{settings:$,columns:o.PropTypes.arrayOf(X).def([]),rowHeight:ee.def(O)},emits:["change"],setup:function(e,t){var n=t.emit,o=t.slots,i=(0,ie.usePrefix)().resolveClassName,l=(0,ie.useLocale)("table"),a=function(e){return[{value:"small",label:e.value.setting.lineHeight.small,height:S.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:S.medium},{value:"large",label:e.value.setting.lineHeight.large,height:S.large}]}(l),u=function(e,t){return ot(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(Object.assign({},e),{field:e.field||e.type})})),checked:[],limit:0,size:"small",sizeList:a,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"),g="light ".concat(h),m=(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)(m)}),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},_=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(_e(i),_e(o)))}else{var l;(l=v.value).splice.apply(l,[0,v.value.length].concat(_e(o)))}},T=(0,r.computed)((function(){var e;return(null!==(e=d.value.limit)&&void 0!==e?e:0)>0})),O=d.value.sizeList||a,x=(0,r.computed)((function(){return T.value&&(d.value.limit?d.value.limit:0)<=v.value.length})),E=function(e,t){return e.disabled||x.value&&!v.value.includes(u(e,t))},N=function(e){return{"line-size":!0,"is-medium":"medium"===f.value,active:e.value===f.value}},k={marginRight:"12px"},L=(0,r.computed)((function(){return v.value.length>0&&!m.value.every((function(e,t){return v.value.includes(ot(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&&m.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(_e(d.value.checked)))}),{immediate:!0,deep:!0}),function(){return e.settings?(0,r.createVNode)(Lt(),(0,r.mergeProps)({trigger:"manual",isShow:s.value,placement:"bottom-end",arrow:!0},{theme:g}),{default:function(){return(0,r.createVNode)("span",{class:"table-head-settings",onClick:w},[(0,r.createVNode)(Rt.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"},[l.value.setting.title]),(0,r.createVNode)(Rt.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"},[l.value.setting.fields.title]),T.value?(0,r.createVNode)("span",{class:"limit"},[l.value.setting.fields.subtitle(d.value.limit)]):""]),T.value?"":(0,r.createVNode)("span",{class:"check-all",onClick:_},[(0,r.createVNode)(ke(),{label:l.value.setting.fields.selectAll,indeterminate:Boolean(L.value),modelValue:v.value.length>0},{default:function(){return[l.value.setting.fields.selectAll]}})])]),(0,r.createVNode)(Ne.BkCheckboxGroup,{class:"setting-body-fields",modelValue:v.value,"onUpdate:modelValue":function(e){return v.value=e}},Ht(e=m.value.map((function(e,t){var n;return(0,r.createVNode)("div",{class:"field-item"},[(0,r.createVNode)(ke(),{checked:v.value.includes(u(e,t)),label:u(e,t),disabled:E(e,t)},Ht(n=ot(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"},[l.value.setting.lineHeight.title,(0,r.createTextVNode)(":"),O.map((function(e){return(0,r.createVNode)("span",{class:N(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)(Vt(),{theme:"primary",style:k,onClick:b},{default:function(){return[l.value.setting.options.ok]}}),(0,r.createVNode)(Vt(),{style:k,onClick:C},{default:function(){return[l.value.setting.options.cancel]}})])])}}):""}}}),Mt=function(e,t,n){var o=function(e){return"right"===e.fixed?"right":"left"},i={left:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t.filter((function(e){return!e.isHidden&&e.fixed&&"right"!==e.fixed})).reduce((function(t,n,o){return e&&0===o?t:t+lt(n)}),0)},right:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t.filter((function(e){return!e.isHidden&&"right"===e.fixed})).reduce((function(t,n,o){return e&&0===o?t:t+lt(n)}),n?6:0)}},l=(0,r.computed)((function(){var e={left:!1,right:!1};return t.filter((function(e){return!e.isHidden&&e.fixed})).map((function(t){var n=o(t),r=e[n];return e[n]=!0,{isExist:r,colPos:n,column:t}}))}));return{fixedWrapperClass:(0,(0,ie.usePrefix)().resolveClassName)("table-fixed"),resolveFixedColumnStyle:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.fixed||e.isHidden)return{};var r={left:0,right:n?6:-1},i=o(e);return r[i]=function(e,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=n[w],l="right"===e?-1:1,a=t.filter((function(e){return!e.isHidden})),u=a.length,c="right"===e?u*l:1,s=0;;){c+=-1*l;var d=a[Math.abs(c)],f=o(d),p=d[w];if(f===e&&i!==p&&(s+=lt(d)),i===p)break}return s+r}(i,e,r[i]),a({},i,"".concat(r[i],"px"))},fixedColumns:l,resolveColumnStyle:function(t){return{width:"".concat(i[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}}}};function Wt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}var Dt=function(){function e(t,n,o,i,l,u){var c=this;ue(this,e),this.getRowHeight=function(e,t){var n=c.setting,o=n.size;return null!=n.height?ot(c.setting,"height",["tbody",e,t,o]):ot(c.props,"rowHeight",["tbody",e,t])},this.getColumnClass=function(e,t){var n;return a(n={},"".concat(c.uuid,"-column-").concat(t),!0),a(n,"column_fixed",!!e.fixed),a(n,"column_fixed_left",!!e.fixed),a(n,"column_fixed_right","right"===e.fixed),a(n,"".concat(e.className),!0),n},this.getHeadColumnClass=function(e,t){return Object.assign(Object.assign({},c.getColumnClass(e,t)),{active:c.isColActive(t)})},this.props=t,this.context=n,this.reactiveProp=o,this.colgroups=i,this.plugins=new xt(t,n),this.uuid=(0,Se.v4)(),this.events=new Map,this.styleRef=l,this.t=u,this.activeSortIndex=(0,r.ref)(-1)}return se(e,[{key:"propActiveCols",get:function(){return this.reactiveProp.activeColumns}},{key:"renderTableHeadSchema",value:function(){var e,t,n=this,o=ct(this.props).isShow;return void 0===o||o?[this.props.settings?(0,r.createVNode)(It,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:function(e){var t,o=e.checked,r=void 0===o?[]:o,i=e.size,l=e.height;n.reactiveProp.setting.size=i,n.reactiveProp.setting.height=l;var a=(null===(t=n.props.settings)||void 0===t?void 0:t.fields)||[];r.length&&n.colgroups.forEach((function(e){e.isHidden=vt(a,e,r)})),n.emitEvent(pe.ON_SETTING_CHANGE,[e])}},{default:function(){return[null===(t=(e=n.context.slots).setting)||void 0===t?void 0:t.call(e)]}}):"",(0,r.createVNode)("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]:null}},{key:"renderTableBodySchema",value:function(e){var t,n,o,i=this,l=(0,r.computed)((function(){return void 0===i.props.emptyText?i.t.value.emptyText:i.props.emptyText}));return e.length?(0,r.createVNode)("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(e)]):null!==(o=null===(n=(t=this.context.slots).empty)||void 0===n?void 0:n.call(t))&&void 0!==o?o:(0,r.createVNode)(Nt,{filterList:e,list:this.props.data,emptyText:l.value},null)}},{key:"renderTableFooter",value:function(e){var t=this;return(0,r.createVNode)(Re(),(0,r.mergeProps)({style:"width: 100%;"},e,{modelValue:e.current,onLimitChange:function(e){return t.handlePageLimitChange(e)},onChange:function(e){return t.handlePageChange(e)}}),null)}},{key:"on",value:function(e,t){return this.events.has(e)||this.events.set(e,[]),this.events.get(e).push(t),this}},{key:"destroy",value:function(){this.events.clear(),this.events=null}},{key:"emitEvent",value:function(e,t){var n=this;this.events.has(e)&&this.events.get(e).forEach((function(e){"function"==typeof e&&Reflect.apply(e,n,t)}))}},{key:"handlePageLimitChange",value:function(e){Object.assign(this.props.pagination,{limit:e}),this.context.emit(ve.PAGE_LIMIT_CHANGE,e)}},{key:"handlePageChange",value:function(e){Object.assign(this.props.pagination,{current:e,value:e}),this.context.emit(ve.PAGE_VALUE_CHANGE,e)}},{key:"setColumnActive",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.propActiveCols.find((function(t){return t.index===e}));Object.assign(n,{active:!n.active}),t&&this.propActiveCols.filter((function(t){return t.index!==e&&t.active})).forEach((function(e){Object.assign(e,{active:!1})}))}},{key:"handleColumnHeadClick",value:function(e,t){if("disabled"!==this.props.columnPick&&(this.setColumnActive(e,"single"===this.props.columnPick),this.context.emit(ve.COLUMN_PICK,this.propActiveCols)),t.sort&&!t.filter){var n=ot(t,["field","type"],[t,e]),o=yt(this.reactiveProp.defaultSort[n]);Object.assign(this.reactiveProp.defaultSort,a({},n,o));var r=mt(t,o);this.activeSortIndex.value=e,this.emitEvent(pe.ON_SORT_BY_CLICK,[{sortFn:r,column:t,index:e,type:o}])}}},{key:"getSortCell",value:function(e,t){var n=this,o=ot(e,["field","type"],[e,t]),i=this.reactiveProp.defaultSort[o]||e.sort.value||x.NULL;return(0,r.createVNode)(Pt,{column:e,defaultSort:i,active:this.activeSortIndex.value===t,onChange:function(r,i){Object.assign(n.reactiveProp.defaultSort,a({},o,i)),n.activeSortIndex.value=t,n.emitEvent(pe.ON_SORT_BY_CLICK,[{sortFn:r,column:e,index:t,type:i}])}},null)}},{key:"getFilterCell",value:function(e,t){var n=this;return(0,r.createVNode)(At,{column:e,height:this.props.headHeight,onChange:function(o,r){n.emitEvent(pe.ON_FILTER_CLICK,[{filterFn:function(e,t){return r(o,e,t)},checked:o,column:e,index:t}])},onFilterSave:function(t){n.context.emit(ve.COLUMN_FILTER_SAVE,{column:e,values:t})}},null)}},{key:"renderHeader",value:function(){var e=this,t=ct(this.props),n=t.cellFn,o={"--row-height":"".concat(ot(t,"height",["thead"]),"px"),backgroundColor:this.props.thead.color},i=function(t,o){if("selection"===t.type){var i=e.reactiveProp.rowActions.get(h);return e.renderCheckboxColumn(a({},v,!!i),0,!0)}var l=[];t.sort&&l.push(e.getSortCell(t,o)),t.filter&&l.push(e.getFilterCell(t,o));var u=function(e,t){return"function"==typeof n?n(e,t):"function"==typeof e.renderHead?e.renderHead(e,t):ot(e,"label",[e,t])}(t,o);l.unshift((0,r.createVNode)("span",{class:"head-text"},[u]));var c="string"==typeof u?u:void 0,s={"has-sort":!!t.sort,"has-filter":!!t.filter};return(0,r.createVNode)(Tt,{class:s,title:c,observerResize:e.props.observerResize,resizerWay:e.props.resizerWay,isHead:!0,headExplain:ot(t.explain,"head",[t])},Wt(l)?l:{default:function(){return[l]}})},l=Mt(this.props,this.colgroups).resolveFixedColumnStyle,c=function(){if(e.styleRef.value.hasScrollY){var t={width:"".concat(8,"px"),right:"-1px"};return(0,r.createVNode)("th",{style:t,class:"column_fixed"},null)}};return(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("thead",{style:o},[(0,r.createVNode)(Ot,null,{default:function(){return[(0,r.createVNode)("tr",null,[e.filterColGroups.map((function(t,n){var o,c,s,d=Object.assign({},l(t,e.styleRef.value.hasScrollY),{backgroundColor:E[null!==(c=null===(o=e.props.thead)||void 0===o?void 0:o.color)&&void 0!==c?c:u.DEF1]});return(0,r.createVNode)("th",(0,r.mergeProps)({colspan:1,rowspan:1,class:[e.getHeadColumnClass(t,n),e.getColumnCustomClass(t),t.align||e.props.headerAlign||e.props.align],style:d,onClick:function(){return e.handleColumnHeadClick(n,t)}},(s=t,Array.from(s.listeners.keys()).reduce((function(t,n){var o=n.split("_").slice(-1)[0];return Object.assign(t,a({},o,(function(t){s.listeners.get(n).forEach((function(n){return Reflect.apply(n,e,[t,s,e])}))})))}),{}))),[i(t,n)])})),c()])]}})])])}},{key:"getColumnCustomClass",value:function(e,t){var n=e.className;if(n){if("function"==typeof n)return n(t);if("string"==typeof n)return n}return""}},{key:"renderTBody",value:function(e){var t=this,n=Mt(this.props,this.colgroups).resolveFixedColumnStyle,o=e.length;return(0,r.createVNode)("tbody",null,[e.map((function(i,l){var a=[].concat(_e(dt(t.props.rowStyle,[i,l,t])),[{"--row-height":"".concat(t.getRowHeight(i,l),"px")}]),u=[].concat(_e(dt(t.props.rowClass,[i,l,t])),["hover-".concat(t.props.rowHover),l%2==1&&t.props.stripe?"stripe-row":""]);return[(0,r.createVNode)(Ot,null,{default:function(){return[(0,r.createVNode)("tr",{style:a,class:u,key:pt(i,t.props,l),onClick:function(n){return t.handleRowClick(n,i,l,e)},onDblclick:function(n){return t.handleRowDblClick(n,i,l,e)},onMouseenter:function(n){return t.handleRowEnter(n,i,l,e)},onMouseleave:function(n){return t.handleRowLeave(n,i,l,e)}},[t.filterColGroups.map((function(a,u){var c,s,d=[n(a)].concat(_e(dt(t.props.cellStyle,[a,u,i,l,t]))),f={"expand-cell":"expand"===a.type},v=gt(a,u,i,l),h=v.colspan,g=v.rowspan,m=C,y=a[w],b=null!==(s=null===(c=i[m])||void 0===c?void 0:c[y])&&void 0!==s?s:{},_=b.skipRow,T=void 0!==_&&_,O=b.skipCol;if(!(T||void 0!==O&&O)){var x,E=[t.getColumnClass(a,u),t.getColumnCustomClass(a,i),a.align||t.props.align].concat(_e(dt(t.props.cellClass,[a,u,i,l,t])),[{"expand-row":i[p],"is-last":l+g>=o}]),S=function(n,o){var r={event:n,row:wt(i),column:_t(a),cell:{getValue:function(){return t.renderCell(i,a,l,e)}},rowIndex:l,columnIndex:u};t.context.emit(o,r)};return(0,r.createVNode)("td",{class:E,style:d,colspan:h,rowspan:g,onClick:function(e){return S(e,ve.CELL_CLICK)},onDblclick:function(e){return S(e,ve.CELL_DBL_CLICK)}},[(0,r.createVNode)(Tt,{class:f,column:a,row:i,parentSetting:t.props.showOverflowTooltip,observerResize:t.props.observerResize},Wt(x=t.renderCell(i,a,l,e))?x:{default:function(){return[x]}})])}return null}))])]}}),t.renderExpandRow(i,u,l)]}))])}},{key:"renderExpandRow",value:function(e,t,n){var o,i,l,a=this;if(e[p]){var u=[].concat(_e(t),[{row_expend:!0}]),c=function(e,t,n){if(void 0!==e[f])return e[f];var o=ft(e,n,t);return void 0!==o&&void 0!==e[o]?e[o]:t}(e,n,this.props),s="".concat(c,"_expand");return(0,r.createVNode)(Ot,{key:s},{default:function(){return[(0,r.createVNode)("tr",{class:u},[(0,r.createVNode)("td",{colspan:a.filterColGroups.length,rowspan:1},[null!==(l=null===(i=(o=a.context.slots).expandRow)||void 0===i?void 0:i.call(o,wt(e)))&&void 0!==l?l:(0,r.createVNode)("div",{class:"expand-cell-ctx"},[(0,r.createTextVNode)("Expand Row")])])])]}})}}},{key:"handleRowClick",value:function(e,t,n,o){this.context.emit(ve.ROW_CLICK,e,t,n,o,this)}},{key:"handleRowDblClick",value:function(e,t,n,o){this.context.emit(ve.ROW_DBL_CLICK,e,t,n,o,this)}},{key:"handleRowEnter",value:function(e,t,n,o){this.context.emit(ve.ROW_MOUSE_ENTER,e,t,n,o,this)}},{key:"handleRowLeave",value:function(e,t,n,o){this.context.emit(ve.ROW_MOUSE_LEAVE,e,t,n,o,this)}},{key:"getExpandCell",value:function(e){return e[p]?(0,r.createVNode)(Le.DownShape,null,null):(0,r.createVNode)(Le.RightShape,null,null)}},{key:"handleRowExpandClick",value:function(e,t,n,o,r){this.emitEvent(pe.ON_ROW_EXPAND_CLICK,[{row:e,column:t,index:n,rows:o,e:r}])}},{key:"renderCellCallbackFn",value:function(e,t,n,o){var r=st(e,ot(t,"field",[t,e]),t),i=e[d],l="number"==typeof i?i:n,a=this.props.data[l];return t.render({cell:r,data:a,row:e,column:t,index:n,rows:o})}},{key:"renderCheckboxColumn",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=o&&!!this.reactiveProp.rowActions.get(g),l=Ct(this.props,{row:e,index:t,isCheckAll:o});return(0,r.createVNode)(ke(),{onChange:function(r){n.emitEvent(pe.ON_ROW_CHECK,[{row:e,index:t,isAll:o,value:r}])},disabled:!l,modelValue:e[v],indeterminate:i},null)}},{key:"renderExpandColumn",value:function(e,t,n,o){var i,l,a,u=this;return(0,r.createVNode)("span",{class:"expand-btn-action",onClick:function(r){return u.handleRowExpandClick(e,t,n,o,r)}},["function"==typeof t.render?u.renderCellCallbackFn(e,t,n,o):null!==(a=null===(l=(i=u.context.slots).expandCell)||void 0===l?void 0:l.call(i,{row:e,column:t,index:n,rows:o}))&&void 0!==a?a:u.getExpandCell(e)])}},{key:"renderCell",value:function(e,t,n,o){var l,a,u,c=this,s={expand:function(e,t,n,o){return c.renderExpandColumn(e,t,n,o)},selection:function(e,t,n,o){return c.renderCheckboxColumn(e,n)}};return null!==(a=null===(l=s[t.type])||void 0===l?void 0:l.call(s,e,t,n,o))&&void 0!==a?a:(u=st(e,ot(t,"field",[t,e]),t),"function"==typeof t.render?c.renderCellCallbackFn(e,t,n,o):"object"===i(u)?JSON.stringify((0,r.unref)(u)):u)}},{key:"isColActive",value:function(e){return"disabled"!==this.props.columnPick&&this.propActiveCols.some((function(t){return t.index===e&&t.active}))}},{key:"renderColGroup",value:function(){var e=this;return(0,r.createVNode)("colgroup",null,[(this.filterColGroups||[]).map((function(t,n){var i,l=(0,o.classes)({active:e.isColActive(n)}),a="".concat((i=lt(t),it(i,"auto"))).replace(/px$/i,"");return(0,r.createVNode)("col",{class:l,width:a},null)}))])}},{key:"filterColGroups",get:function(){return this.colgroups.filter((function(e){return!e.isHidden}))}},{key:"setting",get:function(){return this.reactiveProp.setting}}]),e}();const Ft=function(e,t){return{initColumns:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[];if(o=Array.isArray(e)?e:[e],n)o.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 r=!1;o.forEach((function(e){if(void 0!==e.index&&e.index>=0){r=!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)}})),r&&t.sort((function(e,t){return e.index-t.index}))}},getColumns:function(){var n;return(null==t?void 0:t.length)?t:(null===(n=e.columns)||void 0===n?void 0:n.length)?e.columns:[]}}};var zt=function(e){return"disabled"!==e.columnPick?"multi"===e.columnPick?Array.isArray(e.activeColumn)?e.activeColumn:rt(e.activeColumn):Array.isArray(e.activeColumn)?rt(e.activeColumn[0]):rt(e.activeColumn):[]};var Ut=function(e,n,i,l,u){var c,d=Ft(e,n).getColumns,f=(0,r.ref)(200),p=(0,r.ref)(200),v=(0,r.ref)(O),h=(0,r.ref)(!1),g=(0,r.computed)((function(){return e.pagination&&e.data.length})),m=(0,r.computed)((function(){return h.value})),y=(0,r.computed)((function(){var t,n,r;return(0,o.classes)((a(t={},(0,o.resolveClassName)("table"),!0),a(t,"has-footer",g.value),a(t,"has-scroll-y",h.value||e.virtualEnabled),t),(r=["row"],"string"==typeof(n=e.border)&&r.push(n),Array.isArray(n)&&r.push.apply(r,_e(n.filter((function(e){return s.includes(e)})))),_e(new Set(r)).map((function(e){return"bordered-".concat(e)})).join(" ")))})),b=(0,o.classes)((a(c={},(0,o.resolveClassName)("table-head"),!0),a(c,"has-settings",!!e.settings),c)),C=(0,r.computed)((function(){return d()})),w=ct(e),_=(0,r.computed)((function(){return{"--row-height":"".concat(ot(w,"height",["thead"]),"px"),"--scroll-head-left":"-".concat(l.scrollTranslateX,"px"),"--scroll-left":"".concat(l.scrollTranslateX,"px")}})),T=a({},(0,o.resolveClassName)("table-body"),!0),x=(0,r.computed)((function(){var t;return(0,o.classes)((a(t={},(0,o.resolveClassName)("table-footer"),!0),a(t,"is-hidden",!e.pagination||!e.data.length),t))})),E=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%"},S=(0,r.computed)((function(){return{minHeight:it(e.minHeight,"auto"),width:E(),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)?Number(n):/^\d+\.?\d*px$/gi.test(n)?Number(n.replace("px","")):/^\d+\.?\d*%$/gi.test(n)&&"number"==typeof t?t*Number(n.replace("%",""))/100:t},k=(0,r.reactive)({display:"","min-height":"",height:"",maxHeight:""});(0,r.onMounted)((function(){L(null==i?void 0:i.value)}));var L=function(t){var n;if(t){var o=t.parentElement.getBoundingClientRect().height;f.value=o;var r=t.querySelector(".bk-table-body-content > table");(function(){var t=N(e.height,f.value);v.value=e.showHead?N(e.headHeight,O):0;var n=N(e.minHeight,f.value),o=e.pagination&&e.data.length?e.paginationHeight:0,r=t-v.value-o,i="auto"!==e.height&&"".concat(r,"px"),l=n-v.value-o,a=N(e.maxHeight,void 0),c="number"==typeof a&&"".concat(a-v.value-o,"px");Object.assign(k,{display:!!(null==u?void 0:u.length)&&"block","min-height":"".concat(l,"px"),height:i,maxHeight:c})})(),p.value=(null!==(n=null==r?void 0:r.offsetHeight)&&void 0!==n?n:o)+v.value,A(t)}},A=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)}};return{tableClass:y,headClass:b,contentClass:T,footerClass:x,wrapperStyle:S,contentStyle:k,headStyle:_,fixHeight:p,resetTableHeight:L,updateBorderClass:A,getColumnsWidthOffsetWidth:function(){var n=0;return h.value&&(n+=6),e.border.includes(t.OUTER)&&!e.border.includes(t.NONE)&&(n+=2),n},hasFooter:g,hasScrollY:h,hasScrollYRef:m}},Kt=function(e,t){var n,o,l=(0,r.reactive)([]),u=Ft(e,t).getColumns,c=function(e){if(/^\d+/.test("".concat(e.minWidth)))return e.minWidth;var t=V;return e.sort&&(t+=18),e.filter&&(t+=28),t},s=(0,r.computed)((function(){return u()})),m=function(t){var n,o,r=(null==t?void 0:t.checked)||(null===(n=e.settings)||void 0===n?void 0:n.checked)||[],i=(null==t?void 0:t.fields)||(null===(o=e.settings)||void 0===o?void 0:o.fields)||[];l.length=0,l.push.apply(l,_e(s.value.map((function(e){var t;return Object.assign(Object.assign({},e),(a(t={calcWidth:null,resizeWidth:null,minWidth:c(e),listeners:new Map,isHidden:vt(i,e,r)},w,(0,Se.v4)()),a(t,_,e),t))}))))};"object"===i(e.settings)&&m(e.settings);var y=function(e){var t,n,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){e.MOUSE_MOVE="onMousemove",e.MOUSE_OUT="onMouseout",e.MOUSE_DOWN="onMousedown"}(n||(n={}));var i=!1,l=!1,u=!1,c=0,s=null,d=0,f=(0,r.ref)(-1e3),p=function e(t){var n;l=!1,u=!1,document.body.style.cursor="";var o=t.clientX-c,r=(null!==(n=s.resizeWidth)&&void 0!==n?n:s.calcWidth)+o,i=Number(s.minWidth);s.resizeWidth=r>i?r:i,document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",v),c=0,f.value=-1e3,s=null,t.target.closest("table").querySelectorAll("th").forEach((function(e){return e.style.setProperty("user-select","inherit")}))},v=function(e){document.body.style.setProperty("cursor",""),function(e){return(0,je.throttle)((function(){var t,n=e.clientX-c,o=(null!==(t=s.resizeWidth)&&void 0!==t?t:s.calcWidth)+n;Number(s.minWidth)<o&&(f.value=e.clientX-c+d)}),60)}(e)()},h=function e(t,n){var o,r;(0,je.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)})))},g=(a(t={},n.MOUSE_DOWN,(function(e,t){if(i){l=!0,document.body.style.setProperty("cursor","col-resize"),s=t,c=e.clientX;var n=e.target.closest("table");d=c-n.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",v)}})),a(t,n.MOUSE_MOVE,(function(e,t){l&&!u&&(u=!0);var n=e.target.closest("th");if(u&&n.style.setProperty("user-select","none"),!u){if(!n)return;var o=n.getBoundingClientRect();o.width>12&&o.right-e.pageX<8?(i=!0,h(n,"col-resize")):(h(n,""),i=!1)}})),a(t,n.MOUSE_OUT,(function(e,t){var n=e.target;u||h(n,"")})),t),m=function(e){return"".concat("HeadColumnResize","_").concat(e)},y=function(){e.forEach((function(e){!1!==e.resizable&&Object.keys(g).forEach((function(t){var n=m(t);e.listeners.has(n)||e.listeners.set(n,[]),e.listeners.get(n).push(g[t])}))}))};o&&y();var b=(0,r.computed)((function(){return{position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}}));return{registerResizeEvent:y,resetResizeEvents:function(){e.forEach((function(e){Object.keys(g).forEach((function(t){var n=m(t);e.listeners.has(n)&&(e.listeners.get(n).length=0)}))}))},dragOffsetX:f,dragOffsetXStyle:b}}(l,!0),T=y.dragOffsetXStyle,O=y.dragOffsetX,x=y.resetResizeEvents,E=y.registerResizeEvent,N=function(e,t){var n=(0,r.reactive)([]),o=Ft(e,t).getColumns;if("disabled"===e.columnPick)return{activeColumns:n};var i=(0,r.reactive)(zt(e));return(0,r.watchEffect)((function(){n=o().map((function(e,t){return{index:t,_column:e,active:i.some((function(e){return e===t}))}}));var t=zt(e);n.forEach((function(e,n){Object.assign(e,{active:t.some((function(e){return e===n}))})}))})),{activeColumns:n}}(e,t).activeColumns;(0,r.watch)((function(){return[e.settings]}),(function(){var t;((null===(t=e.settings)||void 0===t?void 0:t.checked)||[]).length&&m()}));var k=(0,je.debounce)((function(){m(),x(),E()}),120);(0,r.watch)((function(){return s}),(function(){k()}),{immediate:!0,deep:!0});var L=e.columns.reduce((function(e,t,n){var o=ot(t,["field","type"],[t,n]),r=bt(t.sort);return r?Object.assign(Object.assign({},e||{}),a({},o,null==r?void 0:r.value)):e}),null),A=(0,r.reactive)({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:N,settings:e.settings,setting:{size:null===(n=e.settings)||void 0===n?void 0:n.size,height:S[null===(o=e.settings)||void 0===o?void 0:o.size]},defaultSort:L||e.defaultSort}),R=function(e){var t;return!!A.rowActions.has(e)&&(null===(t=A.rowActions.get(e))||void 0===t?void 0:t.isExpand)},P=function(){return A.rowActions.has(h)?A.rowActions.get(h):!!e.selectionKey&&F.every((function(e){return W(e)}))},j=function(e){var t=e[f],n=(A.rowActions.get(t)||{}).isSelected;return void 0!==n&&n},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=!1,n=!1;F.forEach((function(o){var r=e(o);t||r||(t=!0),!n&&r&&(n=!0)})),A.rowActions.set(g,n&&t),A.rowActions.set(h,n&&!t)},I=function(){e.columns.some((function(e){return"selection"===e.type}))&&H((function(e){return W(e)}))},M=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n="boolean"==typeof t?t:!P();A.rowActions.set(h,n),A.rowActions.set(g,!1),F.forEach((function(t,o){var r;if(Ct(e,{row:t,index:o,isCheckAll:!1})){var i=t[f],l=Object.assign({},null!==(r=A.rowActions.get(i))&&void 0!==r?r:{},{isSelected:n});A.rowActions.set(i,l)}})),H(),G(n),$(null,t,!0)},W=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return j(e)};return"function"==typeof e.isSelectedFn?Reflect.apply(e.isSelectedFn,void 0,[{row:t,data:e.data}]):"string"==typeof e.selectionKey&&e.selectionKey.length?(0,je.get)(t,e.selectionKey):n(t)},D=function(t,n,o){return W(t,(function(){var r,i=void 0===n?t[f]:n;return!(!Ct(e,{row:t,index:o,isCheckAll:!1})||!P())||!!A.rowActions.has(i)&&(null===(r=A.rowActions.get(i))||void 0===r?void 0:r.isSelected)}))},F=(0,r.reactive)([]),z=(0,r.computed)((function(){return l.some((function(e){return"function"==typeof e.rowspan||/^\d$/.test("".concat(e.rowspan))||"function"==typeof e.colspan||/^\d$/.test("".concat(e.colspan))}))})),U=(0,r.computed)((function(){return l.some((function(e){return"selection"===e.type}))})),K=(0,r.computed)((function(){return l.some((function(e){return"expand"===e.type}))})),B=(0,r.computed)((function(){return l.some((function(e){return"index"===e.type}))})),G=function(t){if(z.value||U.value||K.value||B.value){var n=null,o={};return F.forEach((function(r,i){var l=r[f];if(K.value&&Object.assign(r,a({},p,R(r[f]))),z.value){var u=q(r,l,i,o,n);n=r[f],Object.assign(r,a({},C,u))}if(B.value&&Object.assign(r,a({},d,i)),U.value){var c=Ct(e,{row:r,index:i,isCheckAll:!1});Object.assign(r,a({},v,function(e,t,n,o){var r=D(n,n[f],o);return e&&"boolean"==typeof t?t:r}(c,t,r,i)))}})),void(U.value&&"boolean"!=typeof t&&I())}},q=function(e,t,n,o,r){var i,u=0,c=null!==(i=o[r])&&void 0!==i?i:{};return o[t]||(o[t]={}),l.forEach((function(r,i){var l,s,d=gt(r,i,e,n),f=d.colspan,p=d.rowspan,v=r[w],h=null!==(s=null===(l=c[v])||void 0===l?void 0:l.skipRowLen)&&void 0!==s?s:0,g=a({},v,{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0});u>0&&(g[v].skipColLen=u,g[v].skipCol=!0,u-=1),h>1?(g[v].skipRowLen=h-1,g[v].skipRow=!0):p>1&&(g[v].skipRowLen=p,g[v].skipRow=!1),f>1&&(g[v].skipColLen=f,u=f-1),Object.assign(o[t],Object.assign({},g))})),o[t]},X=(0,je.debounce)(G,120);(0,r.watch)([z,U,K,B],(function(){X()}));var $=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.asyncData&&e.rowKey)if(o)e.data.forEach((function(t){(0,je.has)(t,e.selectionKey)&&(0,je.set)(t,e.selectionKey,!!n)}));else if((0,je.has)(t,e.selectionKey)){var r=e.data.find((function(n){return(0,je.get)(n,e.rowKey)===(0,je.get)(t,e.rowKey)}));(0,je.set)(r,e.selectionKey,!!n)}},Y=Mt(e,l,!1),Z=Y.fixedColumns,J=Y.resolveColumnStyle,Q=Y.resolveColumnClass,ee=Y.fixedWrapperClass;return{colgroups:l,dragOffsetXStyle:T,dragOffsetX:O,reactiveSchema:A,indexData:F,fixedWrapperClass:ee,fixedColumns:Z,resolveColumnStyle:J,resolveColumnClass:Q,initIndexData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=null,o={},r=e.data.map((function(e){return Object.assign(a({},f,(0,Se.v4)()),e)}));if(z.value||U.value||K.value||B.value){var i=r.map((function(r,i){var l,u=ft(r,e,i);n=u;var c=Object.assign(Object.assign({},r),(a(l={},f,r[f]||u),a(l,b,Object.assign({},r)),l));if(z.value){var s=q(r,u,i,o,n);Object.assign(c,a({},C,s))}return U.value&&Object.assign(c,a({},v,D(r,u,i))),B.value&&Object.assign(c,a({},d,i)),K.value&&Object.assign(c,a({},p,!!t&&R(u))),c}));return F.length=0,F.push.apply(F,_e(i)),void(U.value&&I())}F.length=0,F.push.apply(F,_e(r))},updateIndexData:G,setRowExpand:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=e[f],r="boolean"==typeof n?n:!R(o);A.rowActions.set(o,Object.assign({},null!==(t=A.rowActions.get(o))&&void 0!==t?t:{},{isExpand:r})),G()},setAllRowExpand:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;F.forEach((function(t){var n,o=t[f],r="boolean"==typeof e?e:!R(o);A.rowActions.set(o,Object.assign({},null!==(n=A.rowActions.get(o))&&void 0!==n?n:{},{isExpand:r}))})),G()},updateColGroups:m,clearSelection:function(){M(!1)},toggleAllSelection:M,toggleRowSelection:function(e,t){var n,o=e[f];if(o){var r="boolean"==typeof t?t:!D(e,o),i=Object.assign({},null!==(n=A.rowActions.get(o))&&void 0!==n?n:{},{isSelected:r});A.rowActions.set(o,i),t||A.rowActions.set(h,!1),H(),G(),$(e,t,!1)}},getSelection:function(){return F.filter((function(e){return D(e)}))},clearSort:function(){Array.isArray(A.defaultSort)&&A.defaultSort.splice(0),A.defaultSort=L||e.defaultSort}}};const Bt=(0,r.defineComponent)({name:"Table",props:ne,emits:be,setup:function(e,t){var n=(0,ie.useLocale)("table"),l=null,u=null,c=null,s=new he,d=(0,r.reactive)([]),f=Ft(e,d).initColumns;(0,r.provide)(N,f),(0,r.provide)(k,s);var v=(0,r.ref)(),h=(0,r.ref)(),g=(0,r.ref)(0),m=Kt(e,d),y=m.colgroups,b=m.dragOffsetXStyle,C=m.dragOffsetX,w=m.reactiveSchema,O=m.indexData,x=m.fixedColumns,E=m.resolveColumnStyle,S=m.resolveColumnClass,L=m.setRowExpand,A=m.setAllRowExpand,R=m.initIndexData,P=m.fixedWrapperClass,j=m.clearSelection,H=m.toggleAllSelection,I=m.toggleRowSelection,M=m.getSelection,W=m.clearSort,D=m.updateColGroups,F=Oe(e,O),z=F.pageData,U=F.localPagination,K=F.resolvePageData,B=F.watchEffectFn,G=Ut(e,d,v,w,z),q=G.tableClass,X=G.headClass,$=G.contentClass,Y=G.footerClass,Z=G.wrapperStyle,J=G.contentStyle,Q=G.headStyle,ee=G.hasScrollYRef,te=G.fixHeight,ne=G.updateBorderClass,oe=G.resetTableHeight,re=G.getColumnsWidthOffsetWidth,le=G.hasFooter,ue=(0,ie.usePrefix)().resolveClassName,ce=(0,r.computed)((function(){return{hasScrollY:ee.value}})),se=new Dt(e,t,w,y,ce,n),de=function(){var e=v.value.querySelector(".".concat(ue("table-body-content"))),t=e.querySelector("table");if(t){var n=t.scrollWidth,o=e.clientWidth;g.value=n-o}};(0,r.watch)((function(){return[e.data,e.pagination,e.height,e.maxHeight,e.minHeight]}),(function(){R(e.reserveExpand),B(c,l,u),(0,r.nextTick)((function(){oe(v.value),ne(v.value)}))}),{immediate:!0,deep:!0}),(0,r.watchEffect)((function(){if((null==v?void 0:v.value)instanceof HTMLElement){var e=re();at(v.value,y,20,e),de()}})),se.on(pe.ON_SORT_BY_CLICK,(function(e){var n=e.sortFn,o=e.column,i=e.index,s=e.type;"function"==typeof n&&(l=n,u=o,Object.assign(u,a({},T,s)),K(c,l,u)),t.emit(ve.COLUMN_SORT,{column:(0,r.unref)(o[_]),index:i,type:s})})).on(pe.ON_FILTER_CLICK,(function(e){var n=e.filterFn,o=e.checked,i=e.column,a=e.index;"function"==typeof n&&K(c=n,l,u),t.emit(ve.COLUMN_FILTER,{checked:o,column:(0,r.unref)(i[_]),index:a})})).on(pe.ON_SETTING_CHANGE,(function(e){var n=e.checked,o=void 0===n?[]:n,i=e.size,l=e.height,a=e.fields;(0,r.nextTick)((function(){D({checked:o,fields:a}),ne(v.value);var e=re();o.length&&at(v.value,y,V,e),t.emit(ve.SETTING_CHANGE,{checked:o,size:i,height:l,fields:a})}))})).on(pe.ON_ROW_EXPAND_CLICK,(function(e){var n=e.row,o=e.column,r=e.index,i=e.rows,l=e.e;t.emit(ve.ROW_EXPAND_CLICK,{row:wt(n),column:_t(o),index:r,rows:i,e:l}),L(n,!n[p])})).on(pe.ON_ROW_CHECK,(function(n){var o=n.row,r=n.isAll,i=n.index,l=n.value;r?(H(l),t.emit(ve.ROW_SELECT_ALL,{checked:l,data:e.data})):(I(o,l),t.emit(ve.ROW_SELECT,{row:wt(o),index:i,checked:l,data:e.data})),t.emit(ve.ROW_SELECT_CHANGE,{row:wt(o),isAll:r,index:i,checked:l,data:e.data})}));var fe=function(e){var n,r=null!==(n=w.pos.bottom)&&void 0!==n?n:0,i=e[1],l=i.translateX,a=i.translateY,u=i.pos,c=void 0===u?{}:u;w.scrollTranslateY=a,w.scrollTranslateX=l,w.pos=c;var s=c.bottom;s<=2&&r>s&&(0,o.debounce)(60,(function(){t.emit(ve.SCROLL_BOTTOM,Object.assign(Object.assign({},c),{translateX:l,translateY:a}))}),!0)(),de()};(0,r.onMounted)((function(){if(e.observerResize){var t=ut(v.value,(function(){if(v.value){"100%"!==e.height&&"auto"!==e.height||oe(v.value),ne(v.value);var t=re();at(v.value,y,20,t)}}),180,!0,e.resizerWay);t.start(),(0,r.onBeforeUnmount)((function(){t.disconnect(),t=null}))}})),(0,r.onBeforeUnmount)((function(){se.destroy()})),t.expose({setRowExpand:L,setAllRowExpand:A,clearSelection:j,toggleAllSelection:H,toggleRowSelection:I,getSelection:M,clearSort:W,scrollTo:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0};null===(t=null===(e=h.value)||void 0===e?void 0:e.scrollTo)||void 0===t||t.call(e,n)},getRoot:function(){return v.value}});var ge=(0,r.computed)((function(){return Object.assign(Object.assign({},$),{"__is-empty":!z.length})})),me=(0,r.computed)((function(){var t;return a(t={},ue("table-body-content"),!0),a(t,ue("stripe"),e.stripe),a(t,"with-virtual-render",e.virtualEnabled),t})),ye={column_drag_line:!0,"offset-x":!0},be=(0,r.computed)((function(){return Object.assign(Object.assign({},b.value),{left:"".concat(C.value-w.scrollTranslateX,"px")})})),Ce={"scroll-loading":!0,_bottom:!0},we=(0,r.computed)((function(){var t;return a(t={},ue("fixed-bottom-border"),!0),a(t,"_is-empty",!e.data.length),t})),_e={zIndex:-1,width:0,height:0,display:"none"},Te=(0,r.computed)((function(){return{"--footer-height":le.value?"".concat(e.paginationHeight,"px"):"0"}})),Se=(0,r.computed)((function(){return Object.assign({right:ee.value?"".concat(6,"px"):0,"--fix-height":"".concat(te.value,"px")},Te.value)})),Ne=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,l;if(o.value){var a="boolean"==typeof n.value?{loading:!!n.value,inline:!0,title:"",size:xe.BkLoadingSize.Normal,mode:xe.BkLoadingMode.Default,indicator:null}:n.value,u=a.loading,c=a.size,s=a.mode,d=a.title,f=a.inline,p=a.indicator;return null!==(l=null===(i=(e=t.slots).fixedBottom)||void 0===i?void 0:i.call(e))&&void 0!==l?l:(0,r.createVNode)(Ee(),{loading:u,size:c,mode:s,title:d,inline:f,indicator:p},null)}}}}(e,t).renderScrollLoading,ke=(0,r.computed)((function(){return e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}})),Le=(0,r.computed)((function(){return Object.assign({"--prepend-left":"".concat(w.scrollTranslateX,"px"),position:"sticky",top:0,zIndex:2},e.prependStyle||{})}));return function(){var n,o;return(0,r.createVNode)("div",{class:q.value,style:Z.value,ref:v},[(0,r.createVNode)("div",{class:X,style:Q.value},[se.renderTableHeadSchema()]),(0,r.createVNode)(ae(),(0,r.mergeProps)({ref:h,lineHeight:se.getRowHeight,class:ge.value,style:J,list:z},ke.value,{contentClassName:me.value,onContentScroll:fe,throttleDelay:0,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:function(){return t.slots.prepend?(0,r.createVNode)("div",{style:Le.value,class:"prepend-row"},[t.slots.prepend()]):null},default:function(e){return se.renderTableBodySchema(e.data||z)},afterSection:function(){return(0,r.createVNode)("div",{class:we.value},null)}}),(0,r.createVNode)("div",{class:P,style:Se.value},[x.value.map((function(e){var t=e.isExist,n=e.colPos,o=e.column;return t?"":(0,r.createVNode)("div",{class:S(o,w.scrollTranslateX,g.value),style:E(n)},null)})),(0,r.createVNode)("div",{class:ye,style:be.value},null),(0,r.createVNode)("div",{class:Ce},[Ne()])]),(0,r.createVNode)("div",{class:Y.value,style:Te.value},[le.value&&se.renderTableFooter(U.value)]),(0,r.createVNode)("div",{style:_e},[null===(o=(n=t.slots).default)||void 0===o?void 0:o.call(n)])])}}});var Gt=(0,o.withInstallProps)(Bt,{Column:re});const qt=Gt})(),y})()));
|
package/lib/table/table.css
CHANGED
@@ -1259,7 +1259,9 @@
|
|
1259
1259
|
}
|
1260
1260
|
.bk-table .bk-table-footer {
|
1261
1261
|
height: var(--footer-height);
|
1262
|
-
|
1262
|
+
width: 100%;
|
1263
|
+
display: flex;
|
1264
|
+
align-items: center;
|
1263
1265
|
}
|
1264
1266
|
.bk-table .bk-table-footer.is-hidden {
|
1265
1267
|
display: none;
|
package/lib/table/table.less
CHANGED
@@ -1381,7 +1381,9 @@
|
|
1381
1381
|
}
|
1382
1382
|
.bk-table .bk-table-footer {
|
1383
1383
|
height: var(--footer-height);
|
1384
|
-
|
1384
|
+
width: 100%;
|
1385
|
+
display: flex;
|
1386
|
+
align-items: center;
|
1385
1387
|
}
|
1386
1388
|
.bk-table .bk-table-footer.is-hidden {
|
1387
1389
|
display: none;
|