"use strict";var React=require("react"),stringUtil=require("./stringUtil-dea69be9.js"),TablePanel=require("./TablePanel-a78f5d84.js");function _interopNamespace(i){if(i&&i.__esModule)return i;var a=Object.create(null);return i&&Object.keys(i).forEach(function(e){var r;"default"!==e&&(r=Object.getOwnPropertyDescriptor(i,e),Object.defineProperty(a,e,r.get?r:{enumerable:!0,get:function(){return i[e]}}))}),a.default=i,Object.freeze(a)}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-1cf8cee2.js"),require("./ChartPreview-5dd746cf.js"),require("react-use"),require("dom-to-image"),require("html2canvas"),require("mobx-react"),require("./isNil-cac51af7.js"),require("./index-f9735b5c.js"),require("./orderBy-f3ba2335.js"),require("./Slider-c65c18fd.js"),require("./index-d515b10c.js"),require("./index-26d890c3.js"),require("./index-c4d5e8db.js"),require("./index-783b2292.js"),require("./index-7f2f0889.js"),require("./index-2e4fdc28.js"),require("./index-57821f6b.js"),require("./index-5a10dd9f.js"),require("./index-9eefe55c.js"),require("./Toggle-c1a11b5a.js"),require("./DataGroupby-9089d428.js"),require("./useDataValue-9ef54772.js"),require("simple-statistics"),require("echarts"),require("styled-components"),require("./CustomIconManager-229f4aee.js"),require("react-dropzone"),require("./ColorList-8b42cca0.js"),require("./trim-77ee23fd.js"),require("echarts-wordcloud"),require("ali-react-table"),require("./previleges-520277f6.js"),require("./VirtualizedTable-cb04fd37.js"),require("ali-react-table-fork"),require("./useAutoScroll-44b8c03d.js");var React__namespace=_interopNamespace(React),prefixCls="dm-table-load-panel",filterArray=[stringUtil.FieldDbType.json,stringUtil.FieldDbType.array],TableLoadPanel=function(e){var i=e.data,r=e.height,a=e.width,t=e.emptyContent,e=e.onLoaded,u=React__namespace.useCallback(function(e,r){return-1===filterArray.indexOf(i.types[r])},[i.types]),l=React__namespace.useMemo(function(){return stringUtil.filter_1(i.columns,u)},[i.columns,u]),o=React__namespace.useMemo(function(){return stringUtil.map_1(i.values,function(e){return stringUtil.filter_1(e,u)})},[i.values,u]),c=React__namespace.useMemo(function(){return stringUtil.map_1(o,function(i,e){var a={};return stringUtil.forEach_1(l,function(e,r){a[e]=i[r]}),a.key=e,a})},[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:a,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,a]);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;
