"use strict";var React=require("react"),stringUtil=require("./stringUtil-b879c63f.js"),TablePanel=require("./TablePanel-f273a6be.js");function _interopNamespace(a){if(a&&a.__esModule)return a;var i=Object.create(null);return a&&Object.keys(a).forEach(function(e){var r;"default"!==e&&(r=Object.getOwnPropertyDescriptor(a,e),Object.defineProperty(i,e,r.get?r:{enumerable:!0,get:function(){return a[e]}}))}),i.default=a,Object.freeze(i)}require("@loadable/component"),require("@tanem/react-nprogress"),require("dayjs"),require("sql-formatter-fork"),require("axios"),require("superstruct"),require("lodash"),require("chroma-js"),require("localforage"),require("classnames"),require("react-draggable"),require("react-rnd"),require("react-is"),require("react-dom"),require("react-virtualized"),require("ahooks"),require("rc-menu"),require("mobx"),require("react-beautiful-dnd"),require("ali-oss"),require("minio"),require("lz-string"),require("spark-md5"),require("js-cookie"),require("is-email"),require("is-uuid"),require("is-url"),require("@syncpoint/wkx"),require("buffer"),require("@turf/turf"),require("@mapbox/polylabel"),require("turf-multipolygon"),require("turf-polygon"),require("gcoord"),require("eventemitter2"),require("anymatch"),require("crypto"),require("uuid"),require("perfect-scrollbar"),require("./useMount-acf70fb8.js"),require("./ChartPreview-74932cf5.js"),require("react-use"),require("dom-to-image"),require("html2canvas"),require("mobx-react"),require("./isNil-d865ba2c.js"),require("./index-5f4653c0.js"),require("./orderBy-ca546141.js"),require("./Slider-4b8f21cf.js"),require("./index-aac847a9.js"),require("./index-0ae70468.js"),require("./index-3da33ef5.js"),require("./index-4de5f821.js"),require("./index-66c2803f.js"),require("./index-835dadf6.js"),require("./index-6e78ba84.js"),require("./index-00075699.js"),require("./index-65eb6586.js"),require("./Toggle-1c946740.js"),require("./DataGroupby-c4fe30c6.js"),require("./useDataValue-aa99bd38.js"),require("simple-statistics"),require("echarts"),require("styled-components"),require("./CustomIconManager-11452cca.js"),require("react-dropzone"),require("./ColorList-1879d519.js"),require("./trim-53433306.js"),require("echarts-wordcloud"),require("ali-react-table"),require("./previleges-638c5a11.js"),require("./VirtualizedTable-66492ec7.js"),require("ali-react-table-fork"),require("./useAutoScroll-3acdcdbf.js");var React__namespace=_interopNamespace(React),prefixCls="dm-table-load-panel",filterArray=[stringUtil.FieldDbType.json,stringUtil.FieldDbType.array],TableLoadPanel=function(e){var a=e.data,r=e.height,i=e.width,t=e.emptyContent,e=e.onLoaded,u=React__namespace.useCallback(function(e,r){return-1===filterArray.indexOf(a.types[r])},[a.types]),l=React__namespace.useMemo(function(){return stringUtil.filter_1(a.columns,u)},[a.columns,u]),o=React__namespace.useMemo(function(){return stringUtil.map_1(a.values,function(e){return stringUtil.filter_1(e,u)})},[a.values,u]),c=React__namespace.useMemo(function(){return stringUtil.map_1(o,function(a,e){var i={};return stringUtil.forEach_1(l,function(e,r){i[e]=a[r]}),i.key=e,i})},[o,l]),n=React__namespace.useMemo(function(){return stringUtil.map_1(l,function(e){return{code:e,name:e,width:120,ellipsis:!0,className:"".concat(prefixCls,"-table-column")}})},[l]),s=React__namespace.useMemo(function(){return{height:r,width:i,overflow:"auto","--header-bgcolor":"var(--dmc-primary-panel-7)","--header-cell-border-top":"1px solid var(--dmc-border-1)","--cell-border-bottom":"1px solid var(--dmc-border-1)","--header-cell-border-left":"1px solid var(--dmc-border-1)","--header-cell-border-right":"1px solid var(--dmc-border-1)","--cell-border-left":"1px solid var(--dmc-border-1)","--cell-border-right":"1px solid var(--dmc-border-1)","--cell-border-top":"1px solid var(--dmc-border-1)","--header-cell-border-bottom":"1px solid var(--dmc-border-1)"}},[r,i]);return React__namespace.createElement("div",{className:"".concat(prefixCls,"-table ").concat(prefixCls,"-default")},React__namespace.createElement("div",{className:"".concat(prefixCls,"-table-wrap")},React__namespace.createElement(TablePanel.TablePanel,{height:r,dataSource:c,columns:n,emptyContent:t,outBorderType:stringUtil.TableBorder.around,innerBorderType:stringUtil.TableBorder.horizonVertical,style:s,onLoaded:e})))};TableLoadPanel.whyDidYouRender=!0,TableLoadPanel.displayName="TableLoadPanel",exports.default=TableLoadPanel;
