@itera-web/react-ui-baselist 2.3.1 → 2.4.0

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/es/BaseList.d.ts CHANGED
@@ -10,7 +10,8 @@ export interface IBaseListProps {
10
10
  searchParamList?: any[];
11
11
  openRowSelection?: boolean;
12
12
  rowSelectionType?: 'checkbox' | 'radio';
13
- scroll?: object;
13
+ scrollX?: string | number;
14
+ scrollY?: string | number;
14
15
  functionControlHide?: boolean;
15
16
  topPagination?: boolean;
16
17
  bottomPagination?: boolean;
@@ -9,6 +9,7 @@ export interface RcColumn<T> {
9
9
  fixed?: 'left' | 'right';
10
10
  wrap?: boolean;
11
11
  render?: (value: any, record: T, index: number) => React.ReactNode;
12
+ children?: RcColumn<T>[];
12
13
  }
13
14
  export interface DataTableProps<T> {
14
15
  columns: RcColumn<T>[];
@@ -20,7 +21,9 @@ export interface DataTableProps<T> {
20
21
  density?: 'compact' | 'normal' | 'loose';
21
22
  border?: boolean;
22
23
  drag?: boolean;
23
- scroll?: object;
24
+ scrollX?: string | number;
25
+ scrollY?: string | number;
26
+ className?: string;
24
27
  }
25
28
  export declare const ListBody: React.MemoExoticComponent<React.ForwardRefExoticComponent<DataTableProps<{
26
29
  id?: string;
package/es/index.js CHANGED
@@ -1 +1 @@
1
- import*as e from"lodash";import*as n from"react";import*as r from"uuid";import*as t from"@itera-web/hooks-setstate";import*as o from"@itera-web/react-ui-conditionalrender";import*as l from"@itera-web/react-ui-functioncontrol";import*as a from"@itera-web/react-ui-pagination-push";import*as i from"@itera-web/react-ui-searchform";import*as c from"@itera-web/react-ui-spin";import*as d from"@itera-web/utils-cn";import*as s from"@itera-web/utils-locale-toggle";import*as b from"rc-table";import*as p from"@itera-web/react-ui-checkbox";import*as f from"@itera-web/react-ui-empty";import*as u from"@itera-web/react-ui-radio";import*as x from"react-resizable";import*as h from"styled-components";var g={d:(e,n)=>{for(var r in n)g.o(n,r)&&!g.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},m={};g.d(m,{D:()=>ne,Y:()=>V});const v=(e=>{var n={};return g.d(n,e),n})({default:()=>e.default});const w=(e=>{var n={};return g.d(n,e),n})({createElement:()=>n.createElement,default:()=>n.default,forwardRef:()=>n.forwardRef,memo:()=>n.memo,useCallback:()=>n.useCallback,useEffect:()=>n.useEffect,useImperativeHandle:()=>n.useImperativeHandle,useMemo:()=>n.useMemo,useRef:()=>n.useRef,useState:()=>n.useState});const y=(e=>{var n={};return g.d(n,e),n})({v4:()=>r.v4});const k=(e=>{var n={};return g.d(n,e),n})({useSetState:()=>t.useSetState});const z=(e=>{var n={};return g.d(n,e),n})({ConditionalRender:()=>o.ConditionalRender});const S=(e=>{var n={};return g.d(n,e),n})({FunctionControl:()=>l.FunctionControl});const R=(e=>{var n={};return g.d(n,e),n})({Pagination:()=>a.Pagination});const C=(e=>{var n={};return g.d(n,e),n})({SearchForm:()=>i.SearchForm});const I=(e=>{var n={};return g.d(n,e),n})({Spin:()=>c.Spin});const E=(e=>{var n={};return g.d(n,e),n})({cn:()=>d.cn});const N=(e=>{var n={};return g.d(n,e),n})({Intl:()=>s.Intl});var O=function(e){var n=e.className;return w.createElement("svg",{className:n,fill:"none",height:"18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"18",xmlns:"http://www.w3.org/2000/svg"},w.createElement("line",{x1:"18",x2:"6",y1:"6",y2:"18"}),w.createElement("line",{x1:"6",x2:"18",y1:"6",y2:"18"}))};const P=(e=>{var n={};return g.d(n,e),n})({default:()=>b.default});const j=(e=>{var n={};return g.d(n,e),n})({Checkbox:()=>p.Checkbox});const M=(e=>{var n={};return g.d(n,e),n})({Empty:()=>f.Empty});const H=(e=>{var n={};return g.d(n,e),n})({RadioGroup:()=>u.RadioGroup,RadioGroupItem:()=>u.RadioGroupItem});const D=(e=>{var n={};return g.d(n,e),n})({Resizable:()=>x.Resizable});var A=function(e){var n=e.className;return w.createElement("svg",{className:n,height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},w.createElement("circle",{cx:"9",cy:"12",r:"1"}),w.createElement("circle",{cx:"9",cy:"5",r:"1"}),w.createElement("circle",{cx:"9",cy:"19",r:"1"}),w.createElement("circle",{cx:"15",cy:"12",r:"1"}),w.createElement("circle",{cx:"15",cy:"5",r:"1"}),w.createElement("circle",{cx:"15",cy:"19",r:"1"}))},B=function(){return B=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},B.apply(this,arguments)},T=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r},L=w.default.forwardRef(function(e,n){var r=e.width,t=e.drag,o=e.onResizeStart,l=e.onResizeStop,a=e.children,i=T(e,["width","drag","onResizeStart","onResizeStop","children"]);return r&&t?w.default.createElement(D.Resizable,{draggableOpts:{enableUserSelectHack:!1},handle:w.default.createElement("span",{className:"rc-table-resize-handle",onClick:function(e){return e.stopPropagation()}},w.default.createElement(A,null)),height:0,onResizeStart:o,onResizeStop:l,width:r},w.default.createElement("th",B({ref:n},i),a)):w.default.createElement("th",B({ref:n},i),a)}),Z=(0,w.memo)(L);const F=(e=>{var n={};return g.d(n,e),n})({default:()=>h.default});var G,W=function(e,n){return Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,e},Y=F.default.div(G||(G=W(["\n .rc-table {\n position: relative;\n box-sizing: border-box;\n color: var(--font-3-color, #666);\n border-collapse: collapse;\n overflow: hidden;\n font-size: 14px;\n height: 100%;\n }\n\n .rc-table-rtl {\n direction: rtl;\n }\n\n .rc-table table {\n width: 100%;\n border-spacing: 0;\n }\n\n .rc-table th,\n .rc-table td {\n position: relative;\n box-sizing: border-box;\n padding: var(--rc-table-padding, 16px 8px);\n white-space: normal;\n word-break: break-word;\n border-top: 0;\n border-left: 0;\n border-bottom: 1px solid var(--rc-table-header-color, red);\n border-right: 1px solid var(--border-color, red);\n transition: box-shadow 0.3s;\n }\n\n .rc-table th {\n border-right: 1px solid var(--rc-table-header-color, red);\n }\n\n .rc-table-rtl.rc-table th,\n .rc-table-rtl.rc-table td {\n border-right: 0;\n border-left: 1px solid var(--border-color, red);\n }\n\n .rc-table-fixed-column-gapped .rc-table-cell-fix-left-last::after,\n .rc-table-fixed-column-gapped .rc-table-cell-fix-right-first::after {\n display: none !important;\n }\n\n .rc-table-cell {\n background: var(--primary-section-color, #f4f4f4);\n }\n\n .rc-table-cell-fix-left,\n .rc-table-cell-fix-right {\n z-index: 2;\n }\n\n .rc-table-cell-fix-right:last-child:not(.rc-table-cell-fix-sticky) {\n border-right-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-right:last-child {\n border-right-color: var(--border-color, red);\n }\n\n .rc-table-rtl .rc-table-cell-fix-left:last-child {\n border-left-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-left-first {\n box-shadow: 1px 0 0 var(--border-color, red);\n }\n\n .rc-table-cell-fix-left-first::after,\n .rc-table-cell-fix-left-last::after {\n position: absolute;\n top: 0;\n right: 1px;\n bottom: -1px;\n width: 20px;\n transform: translateX(100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell-fix-left-all::after {\n display: none;\n }\n\n .rc-table-cell-fix-right-first,\n .rc-table-cell-fix-right-last {\n box-shadow: -1px 0 0 var(--border-color, red);\n }\n\n .rc-table-rtl .rc-table-cell-fix-right-first,\n .rc-table-rtl .rc-table-cell-fix-right-last {\n box-shadow: none;\n }\n\n .rc-table-cell-fix-right-first::after,\n .rc-table-cell-fix-right-last::after {\n position: absolute;\n top: 0;\n bottom: -1px;\n left: 1px;\n width: 20px;\n transform: translateX(-100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last {\n overflow: visible;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last\n .rc-table-cell-content {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-row-hover {\n background: var(--primary-section-color, #f7f7f7);\n }\n\n .rc-table-ping-left .rc-table-cell-fix-left-first::after,\n .rc-table-ping-left .rc-table-cell-fix-left-last::after {\n box-shadow: inset 10px 0 8px -8px var(--rc-table-sticky-color, green);\n }\n\n .rc-table-ping-right .rc-table-cell-fix-right-first::after,\n .rc-table-ping-right .rc-table-cell-fix-right-last::after {\n box-shadow: inset -10px 0 8px -8px var(--rc-table-sticky-color, green);\n }\n\n .rc-table-expand-icon-col {\n width: 60px;\n }\n\n .rc-table-row-expand-icon-cell {\n text-align: center;\n }\n\n .rc-table thead th {\n text-align: center;\n background: var(--rc-table-header-color, #f7f7f7);\n }\n\n .rc-table thead .rc-table-cell-scrollbar::after {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -1px;\n width: 1px;\n background: var(--rc-table-header-color, #f7f7f7);\n content: '';\n }\n\n .rc-table-rtl.rc-table thead .rc-table-cell-scrollbar::after {\n right: -1px;\n left: auto;\n }\n\n .rc-table-header {\n border: 1px solid var(--rc-table-header-color, red);\n border-right: 0;\n border-bottom: 0;\n flex-shrink: 0;\n }\n\n .rc-table-placeholder {\n text-align: center;\n }\n\n .rc-table tbody tr td {\n background: var(--primary-section-color, #fff);\n }\n\n .rc-table tbody tr th {\n background: var(--primary-section-color, #f7f7f7);\n }\n\n th.rc-table-measure-cell {\n padding-top: 0;\n padding-bottom: 0;\n border-top: 0;\n border-bottom: 0;\n }\n\n .rc-table-measure-cell-content {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n pointer-events: none;\n }\n\n .rc-table-content {\n border-top: 1px solid var(--rc-table-header-color, red);\n border-right: 0;\n border-bottom: 0;\n border-left: 1px solid var(--border-color, red);\n border-radius: 5px 0 0 0;\n }\n\n .rc-table-body {\n border: 0;\n scrollbar-width: thin;\n overflow: auto !important;\n flex-grow: 1;\n }\n\n .rc-table-body::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n .rc-table-fixed-column .rc-table-body::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n border-right: 1px solid var(--border-color, red);\n content: '';\n }\n\n .rc-table-expanded-row .rc-table-cell {\n box-shadow: inset 0 8px 8px -8px var(--border-color, green);\n }\n\n .rc-table-expanded-row-fixed {\n box-sizing: border-box;\n margin: -16px -10px -16px -8px;\n padding: var(--rc-table-padding, 16px 8px);\n }\n\n .rc-table-expanded-row-fixed::after {\n position: absolute;\n top: 0;\n right: 1px;\n bottom: 0;\n width: 0;\n border-right: 1px solid var(--border-color, red);\n content: '';\n }\n\n .rc-table-row-expand-icon {\n display: inline-block;\n width: 16px;\n height: 16px;\n color: var(--font-3-color, #aaa);\n line-height: 16px;\n text-align: center;\n vertical-align: middle;\n border: 1px solid currentColor;\n cursor: pointer;\n }\n\n .rc-table-row-expand-icon.rc-table-row-expanded::after {\n content: '-';\n }\n\n .rc-table-row-expand-icon.rc-table-row-collapsed::after {\n content: '+';\n }\n\n .rc-table-row-expand-icon.rc-table-row-spaced {\n visibility: hidden;\n }\n\n .rc-table-title {\n padding: var(--rc-table-padding, 16px 8px);\n border: 1px solid var(--border-color, red);\n border-bottom: 0;\n }\n\n .rc-table-caption {\n padding: var(--rc-table-padding, 16px 8px);\n border-right: 1px solid var(--border-color, red);\n border-bottom: 1px solid var(--border-color, red);\n }\n\n .rc-table-footer {\n padding: var(--rc-table-padding, 16px 8px);\n border: 1px solid var(--border-color, red);\n border-top: 0;\n }\n\n .rc-table tfoot td {\n background: var(--primary-section-color, #f7f7f7);\n }\n\n .rc-table-summary {\n border-top: 1px solid var(--border-color, var(--border-color, red));\n border-left: 1px solid var(--border-color, red);\n }\n\n .rc-table-sticky-holder {\n position: sticky;\n z-index: 2;\n }\n\n .rc-table-sticky-scroll {\n position: sticky;\n bottom: 0;\n z-index: 2;\n display: flex;\n align-items: center;\n border-top: 1px solid var(--border-color, red);\n opacity: 0.6;\n transition: transform 0.1s ease-in 0s;\n }\n\n .rc-table-sticky-scroll:hover {\n transform: scaleY(1.2);\n transform-origin: center bottom;\n }\n\n .rc-table-sticky-scroll-bar {\n height: 8px;\n background-color: #bbb;\n border-radius: 4px;\n }\n\n .rc-table-sticky-scroll-bar:hover {\n background-color: #999;\n }\n\n .rc-table-sticky-scroll-bar-active {\n background-color: #999;\n }\n\n .rc-table-select-col {\n position: relative;\n }\n\n .rc-table-select-col::after {\n position: absolute;\n content: '';\n right: -2px;\n top: 0;\n display: block;\n width: 2px;\n background-color: var(--primary-section-color, red);\n height: 100%;\n }\n\n .rc-table-container {\n max-height: 100%;\n display: flex;\n flex-direction: column;\n border: 1px solid var(--border-color, red);\n }\n\n .react-resizable {\n position: relative;\n }\n .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n }\n .react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n }\n .react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n }\n .react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n }\n .react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n }\n .react-resizable-handle-w,\n .react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n }\n .react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n }\n .react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n }\n .react-resizable-handle-n,\n .react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n }\n .react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n }\n .react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n }\n .rc-table-resize-handle {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 0;\n top: 0;\n width: 14px;\n height: 100%;\n cursor: col-resize;\n }\n"],["\n .rc-table {\n position: relative;\n box-sizing: border-box;\n color: var(--font-3-color, #666);\n border-collapse: collapse;\n overflow: hidden;\n font-size: 14px;\n height: 100%;\n }\n\n .rc-table-rtl {\n direction: rtl;\n }\n\n .rc-table table {\n width: 100%;\n border-spacing: 0;\n }\n\n .rc-table th,\n .rc-table td {\n position: relative;\n box-sizing: border-box;\n padding: var(--rc-table-padding, 16px 8px);\n white-space: normal;\n word-break: break-word;\n border-top: 0;\n border-left: 0;\n border-bottom: 1px solid var(--rc-table-header-color, red);\n border-right: 1px solid var(--border-color, red);\n transition: box-shadow 0.3s;\n }\n\n .rc-table th {\n border-right: 1px solid var(--rc-table-header-color, red);\n }\n\n .rc-table-rtl.rc-table th,\n .rc-table-rtl.rc-table td {\n border-right: 0;\n border-left: 1px solid var(--border-color, red);\n }\n\n .rc-table-fixed-column-gapped .rc-table-cell-fix-left-last::after,\n .rc-table-fixed-column-gapped .rc-table-cell-fix-right-first::after {\n display: none !important;\n }\n\n .rc-table-cell {\n background: var(--primary-section-color, #f4f4f4);\n }\n\n .rc-table-cell-fix-left,\n .rc-table-cell-fix-right {\n z-index: 2;\n }\n\n .rc-table-cell-fix-right:last-child:not(.rc-table-cell-fix-sticky) {\n border-right-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-right:last-child {\n border-right-color: var(--border-color, red);\n }\n\n .rc-table-rtl .rc-table-cell-fix-left:last-child {\n border-left-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-left-first {\n box-shadow: 1px 0 0 var(--border-color, red);\n }\n\n .rc-table-cell-fix-left-first::after,\n .rc-table-cell-fix-left-last::after {\n position: absolute;\n top: 0;\n right: 1px;\n bottom: -1px;\n width: 20px;\n transform: translateX(100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell-fix-left-all::after {\n display: none;\n }\n\n .rc-table-cell-fix-right-first,\n .rc-table-cell-fix-right-last {\n box-shadow: -1px 0 0 var(--border-color, red);\n }\n\n .rc-table-rtl .rc-table-cell-fix-right-first,\n .rc-table-rtl .rc-table-cell-fix-right-last {\n box-shadow: none;\n }\n\n .rc-table-cell-fix-right-first::after,\n .rc-table-cell-fix-right-last::after {\n position: absolute;\n top: 0;\n bottom: -1px;\n left: 1px;\n width: 20px;\n transform: translateX(-100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last {\n overflow: visible;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last\n .rc-table-cell-content {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-row-hover {\n background: var(--primary-section-color, #f7f7f7);\n }\n\n .rc-table-ping-left .rc-table-cell-fix-left-first::after,\n .rc-table-ping-left .rc-table-cell-fix-left-last::after {\n box-shadow: inset 10px 0 8px -8px var(--rc-table-sticky-color, green);\n }\n\n .rc-table-ping-right .rc-table-cell-fix-right-first::after,\n .rc-table-ping-right .rc-table-cell-fix-right-last::after {\n box-shadow: inset -10px 0 8px -8px var(--rc-table-sticky-color, green);\n }\n\n .rc-table-expand-icon-col {\n width: 60px;\n }\n\n .rc-table-row-expand-icon-cell {\n text-align: center;\n }\n\n .rc-table thead th {\n text-align: center;\n background: var(--rc-table-header-color, #f7f7f7);\n }\n\n .rc-table thead .rc-table-cell-scrollbar::after {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -1px;\n width: 1px;\n background: var(--rc-table-header-color, #f7f7f7);\n content: '';\n }\n\n .rc-table-rtl.rc-table thead .rc-table-cell-scrollbar::after {\n right: -1px;\n left: auto;\n }\n\n .rc-table-header {\n border: 1px solid var(--rc-table-header-color, red);\n border-right: 0;\n border-bottom: 0;\n flex-shrink: 0;\n }\n\n .rc-table-placeholder {\n text-align: center;\n }\n\n .rc-table tbody tr td {\n background: var(--primary-section-color, #fff);\n }\n\n .rc-table tbody tr th {\n background: var(--primary-section-color, #f7f7f7);\n }\n\n th.rc-table-measure-cell {\n padding-top: 0;\n padding-bottom: 0;\n border-top: 0;\n border-bottom: 0;\n }\n\n .rc-table-measure-cell-content {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n pointer-events: none;\n }\n\n .rc-table-content {\n border-top: 1px solid var(--rc-table-header-color, red);\n border-right: 0;\n border-bottom: 0;\n border-left: 1px solid var(--border-color, red);\n border-radius: 5px 0 0 0;\n }\n\n .rc-table-body {\n border: 0;\n scrollbar-width: thin;\n overflow: auto !important;\n flex-grow: 1;\n }\n\n .rc-table-body::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n .rc-table-fixed-column .rc-table-body::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n border-right: 1px solid var(--border-color, red);\n content: '';\n }\n\n .rc-table-expanded-row .rc-table-cell {\n box-shadow: inset 0 8px 8px -8px var(--border-color, green);\n }\n\n .rc-table-expanded-row-fixed {\n box-sizing: border-box;\n margin: -16px -10px -16px -8px;\n padding: var(--rc-table-padding, 16px 8px);\n }\n\n .rc-table-expanded-row-fixed::after {\n position: absolute;\n top: 0;\n right: 1px;\n bottom: 0;\n width: 0;\n border-right: 1px solid var(--border-color, red);\n content: '';\n }\n\n .rc-table-row-expand-icon {\n display: inline-block;\n width: 16px;\n height: 16px;\n color: var(--font-3-color, #aaa);\n line-height: 16px;\n text-align: center;\n vertical-align: middle;\n border: 1px solid currentColor;\n cursor: pointer;\n }\n\n .rc-table-row-expand-icon.rc-table-row-expanded::after {\n content: '-';\n }\n\n .rc-table-row-expand-icon.rc-table-row-collapsed::after {\n content: '+';\n }\n\n .rc-table-row-expand-icon.rc-table-row-spaced {\n visibility: hidden;\n }\n\n .rc-table-title {\n padding: var(--rc-table-padding, 16px 8px);\n border: 1px solid var(--border-color, red);\n border-bottom: 0;\n }\n\n .rc-table-caption {\n padding: var(--rc-table-padding, 16px 8px);\n border-right: 1px solid var(--border-color, red);\n border-bottom: 1px solid var(--border-color, red);\n }\n\n .rc-table-footer {\n padding: var(--rc-table-padding, 16px 8px);\n border: 1px solid var(--border-color, red);\n border-top: 0;\n }\n\n .rc-table tfoot td {\n background: var(--primary-section-color, #f7f7f7);\n }\n\n .rc-table-summary {\n border-top: 1px solid var(--border-color, var(--border-color, red));\n border-left: 1px solid var(--border-color, red);\n }\n\n .rc-table-sticky-holder {\n position: sticky;\n z-index: 2;\n }\n\n .rc-table-sticky-scroll {\n position: sticky;\n bottom: 0;\n z-index: 2;\n display: flex;\n align-items: center;\n border-top: 1px solid var(--border-color, red);\n opacity: 0.6;\n transition: transform 0.1s ease-in 0s;\n }\n\n .rc-table-sticky-scroll:hover {\n transform: scaleY(1.2);\n transform-origin: center bottom;\n }\n\n .rc-table-sticky-scroll-bar {\n height: 8px;\n background-color: #bbb;\n border-radius: 4px;\n }\n\n .rc-table-sticky-scroll-bar:hover {\n background-color: #999;\n }\n\n .rc-table-sticky-scroll-bar-active {\n background-color: #999;\n }\n\n .rc-table-select-col {\n position: relative;\n }\n\n .rc-table-select-col::after {\n position: absolute;\n content: '';\n right: -2px;\n top: 0;\n display: block;\n width: 2px;\n background-color: var(--primary-section-color, red);\n height: 100%;\n }\n\n .rc-table-container {\n max-height: 100%;\n display: flex;\n flex-direction: column;\n border: 1px solid var(--border-color, red);\n }\n\n .react-resizable {\n position: relative;\n }\n .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n }\n .react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n }\n .react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n }\n .react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n }\n .react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n }\n .react-resizable-handle-w,\n .react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n }\n .react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n }\n .react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n }\n .react-resizable-handle-n,\n .react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n }\n .react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n }\n .react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n }\n .rc-table-resize-handle {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 0;\n top: 0;\n width: 14px;\n height: 100%;\n cursor: col-resize;\n }\n"]))),X=(0,w.memo)(Y),K=function(){return K=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},K.apply(this,arguments)},Q=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r},_=function(e,n,r){if(r||2===arguments.length)for(var t,o=0,l=n.length;o<l;o++)!t&&o in n||(t||(t=Array.prototype.slice.call(n,0,o)),t[o]=n[o]);return e.concat(t||Array.prototype.slice.call(n))};function J(e,n){var r=e.columns,t=e.data,o=e.openRowSelection,l=e.selectedRowKeys,a=e.onRowChange,i=e.rowSelectionType,c=void 0===i?"checkbox":i,d=e.density,s=void 0===d?"normal":d,b=e.border,p=void 0!==b&&b,f=e.scroll,u=void 0===f?{x:"100%"}:f,x=e.drag,h=Q(e,["columns","data","openRowSelection","selectedRowKeys","onRowChange","rowSelectionType","density","border","scroll","drag"]),g=(0,w.useState)(r),m=g[0],v=g[1],y=(0,w.useRef)(null),k=(0,w.useRef)([]),z=(0,w.useRef)(null),S=(0,w.useRef)(!1),R=(0,w.useRef)(0),C=(0,w.useMemo)(function(){var e="10px 6px";switch(s){case"loose":e="16px 8px";break;case"compact":e="6px 2px"}return e},[s]),I=(0,w.useMemo)(function(){var e=[];o&&e.push({key:"__select__",width:48,fixed:"left",align:"center",className:"rc-table-select-col",title:"radio"===c?null:w.default.createElement(j.Checkbox,{checked:(null==l?void 0:l.length)===t.length||(null==l?void 0:l.length)>0&&"indeterminate",onCheckedChange:function(e){var n=e?t.map(function(e){return e.id}):[];null==a||a(n,t.filter(function(e){return n.includes(e.id)}))}}),render:function(e,n){var r=null==l?void 0:l.includes(n.id);return"radio"===c?w.default.createElement(H.RadioGroup,{onValueChange:function(e){var n=t.find(function(n){return n.id===e});null==a||a([e],n?[n]:[])},value:null==l?void 0:l[0]},w.default.createElement(H.RadioGroupItem,{checked:r,value:n.id})):w.default.createElement(j.Checkbox,{checked:r,onCheckedChange:function(e){var r=e?_(_([],l||[],!0),[n.id],!1):(l||[]).filter(function(e){return e!==n.id});null==a||a(r,t.filter(function(e){return r.includes(e.id)}))}})}});var n=function(e){return function(n,r){var t,o=r.size;S.current=!1,k.current&&(null===(t=k.current)||void 0===t||t.forEach(function(e){e.style.userSelect=""})),z.current&&(z.current.style.left="0px",z.current.style.display="none"),R.current=n.clientX-R.current,v(function(n){var r=_([],n,!0);return r[e]=K(K({},r[e]),{width:o.width+R.current}),r})}};return e.push.apply(e,m.map(function(e,r){return{key:e.key,title:e.title,dataIndex:e.key,width:e.width,align:e.align||"left",fixed:e.fixed,ellipsis:!e.wrap,render:e.render,onHeaderCell:function(){return{width:e.width,drag:x,onResizeStart:function(e){var n;if(S.current=!0,k.current&&(null===(n=k.current)||void 0===n||n.forEach(function(e){e.style.userSelect="none"})),z.current){var r=y.current.nativeElement.getBoundingClientRect().left;z.current.style.left=e.clientX-r+"px",z.current.style.display="inherit"}R.current=e.clientX},onResizeStop:n(r),ref:function(e){k.current[r]=e}}}}})),e},[m,o,l,t]);return(0,w.useImperativeHandle)(n,function(){return{rcTable:function(){return y.current}}}),(0,w.useEffect)(function(){var e=function(e){if(z.current&&S.current){var n=y.current.nativeElement.getBoundingClientRect().left;z.current.style.left="".concat(e.clientX-n,"px")}};return window.addEventListener("mousemove",e),function(){window.removeEventListener("mousemove",e)}},[]),w.default.createElement(X,{className:"h-full relative",style:{"--border-color":p?"":"#ffffff01","--primary-section-color":"","--rc-table-padding":C}},w.default.createElement(P.default,K({className:"rc-table",columns:I,components:{header:{cell:Z}},data:t,emptyText:w.default.createElement(M.Empty,null),ref:y,rowKey:function(e,n){var r;return null!==(r=e.id)&&void 0!==r?r:n},scroll:u,sticky:!0},h)),w.default.createElement("div",{className:"absolute h-full w-[1px] top-0 z-10 bg-primary hidden",ref:z}))}var V=(0,w.memo)((0,w.forwardRef)(J)),U=function(){return U=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},U.apply(this,arguments)},q=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r},$=function(e,n,r){if(r||2===arguments.length)for(var t,o=0,l=n.length;o<l;o++)!t&&o in n||(t||(t=Array.prototype.slice.call(n,0,o)),t[o]=n[o]);return e.concat(t||Array.prototype.slice.call(n))},ee=function(e,n){var r=e.serviceFunc,t=void 0===r?function(e,n){}:r,o=e.functionControlTableTitle,l=void 0===o?"查询表格":o,a=e.columns,i=void 0===a?[]:a,c=e.optionButtonGroup,d=void 0===c?[]:c,s=e.searchParamList,b=void 0===s?[]:s,p=e.functionControlHide,f=void 0!==p&&p,u=e.topPagination,x=void 0!==u&&u,h=e.bottomPagination,g=void 0===h||h,m=e.isShowRowTitleName,P=void 0===m?"":m,j=e.noSearch,M=void 0!==j&&j,H=e.className,D=e.openRowSelection,A=void 0!==D&&D,B=e.rowSelectionType,T=void 0===B?"checkbox":B,L=e.locales,Z=void 0===L?"zh_CN":L,F=e.onRowChangeCallback,G=void 0===F?function(){}:F,W=e.border,Y=void 0!==W&&W,X=e.drag,K=void 0!==X&&X,Q=e.listClassName,_=void 0===Q?"":Q,J=e.scroll,ee=void 0===J?{}:J,ne=q(e,["serviceFunc","functionControlTableTitle","columns","optionButtonGroup","searchParamList","functionControlHide","topPagination","bottomPagination","isShowRowTitleName","noSearch","className","openRowSelection","rowSelectionType","locales","onRowChangeCallback","border","drag","listClassName","scroll"]),re=(0,w.useRef)(),te=(0,w.useRef)(),oe=(0,k.useSetState)({isHideFormItem:!0,tableDensity:"normal",loading:!1,dataSource:[],selectedRows:[],selectedRowKeys:[],isShowRowTitleName:P,Condition:{},current:1,pageSize:10,total:1}),le=oe[0],ae=oe[1],ie=oe[2];function ce(e){ae({tableDensity:e})}function de(){ae({isHideFormItem:!le.isHideFormItem})}var se=function(e){var n,r,t=e||(null===(r=null===(n=null==re?void 0:re.current)||void 0===n?void 0:n.searchForm)||void 0===r?void 0:r.getValues());for(var o in t)void 0===t[o]&&delete t[o];ae({current:1,Condition:t},be)},be=function(e){void 0===e&&(e={}),ae({loading:!0});var n=e.current||le.current,r=e.pageSize||le.pageSize,o=e.Condition||le.Condition,l=U(U({},o),{page:n,limit:r});setTimeout(function(){return ae({loading:!1})},5e3),null==t||t(l,function(e){var n,r=e.dataSource,t=void 0===r?[]:r,o=e.total,a=void 0===o?0:o;ae({loading:!1});var i=null===(n=null==t?void 0:t.map)||void 0===n?void 0:n.call(t,function(e,n){return U(U({},e||{}),{rowKey:(null==e?void 0:e.id)||(0,y.v4)(),index:(l.page-1)*l.limit+(n+1)})});ae({dataSource:i,total:a})})},pe=function(){var e;return null===(e=re.current)||void 0===e?void 0:e.onReset()},fe=function(e,n){ae({current:e,pageSize:n},be)},ue=function(e,n){return ae({current:e,pageSize:n},be)},xe=(0,w.useCallback)(function(e,n){var r,t,o=(null===(r=v.default.cloneDeep(le.selectedRows||[]))||void 0===r?void 0:r.concat(n))||[],l=null===(t=e.map(function(e){return null==o?void 0:o.find(function(n){return String(n.id)==String(e)})}))||void 0===t?void 0:t.filter(Boolean);ae({selectedRowKeys:e,selectedRows:l}),G(e,l)},[le]),he=(0,w.useCallback)(function(e){var n,r,t=null===(n=le.selectedRowKeys)||void 0===n?void 0:n.filter(function(n){return String(n)!==String(e)}),o=null===(r=le.selectedRows)||void 0===r?void 0:r.filter(function(n){return n.id!==e});xe(t,o)},[le]),ge=function(e){var n,r=String(e).split(","),t=null===(n=le.selectedRows)||void 0===n?void 0:n.filter(function(e){return!r.includes(String(e.id))}),o=null==t?void 0:t.map(function(e){return String(e.id)});ae({selectedRowKeys:o,selectedRows:t})},me=(0,w.useMemo)(function(){var e;return null===(e=v.default.cloneDeep(i))||void 0===e?void 0:e.map(function(e){return U(U({},e),{header:N.Intl.v(e.header)})})},[Z,i]);return(0,w.useImperativeHandle)(n,function(){return{state:function(){return ie()},onSearch:se,onChangeRowSelection:ge,onRowChange:xe,setState:ae,rcTable:function(){return te.current}}},[le]),(0,w.useEffect)(function(){!M&&se()},[]),w.default.createElement(I.Spin,{size:"large",spinning:le.loading},w.default.createElement("div",{className:(0,E.cn)("relative flex flex-col h-full",H)},w.default.createElement(z.ConditionalRender,{conditional:(null==b?void 0:b.length)>0},function(){return w.default.createElement(C.SearchForm,{defaultValues:Object.assign.apply(Object,$([{}],b.map(function(e){var n,r;return(n={})[e.key]=null!==(r=e.defaultValue)&&void 0!==r?r:"",n}),!1)),loading:le.loading,locales:Z,noSearch:!0,onSearch:function(){return se()},ref:re,searchParamList:b})}),w.default.createElement(z.ConditionalRender,{conditional:0!==le.total&&x},function(){return w.default.createElement("div",{className:"flex justify-end box-border w-full h-[60px] p-[10px_20px] rounded-b-lg bg-section"},w.default.createElement(R.Pagination,{current:le.current,onChange:fe,onShowSizeChange:ue,pageSize:le.pageSize,total:le.total}))}),w.default.createElement(z.ConditionalRender,{conditional:!f},function(){return w.default.createElement("div",{className:"min-h-[45px] mt-5 overflow-hidden rounded-t-lg flex-shrink-0 FunctionControl"},w.default.createElement(S.FunctionControl,{dataSource:le.dataSource,functionControlHide:f,functionControlTableTitle:l,isHideFormItem:le.isHideFormItem,isHideText:(null==b?void 0:b.length)>0,locales:Z,onChangeIsHideFormItem:de,onChangeListSize:ce,onResetForm:pe,onSearch:function(){return se()},optionButtonGroup:d,tableDensity:le.tableDensity}))}),w.default.createElement("div",{className:(0,E.cn)("flex flex-col grow box-border p-[15px] overflow-hidden bg-section ListBodyBox",_)},w.default.createElement(z.ConditionalRender,{conditional:le.isShowRowTitleName},function(){var e;return w.default.createElement("div",{className:"flex flex-wrap gap-3 max-h-[100px] overflow-y-auto"},null===(e=le.selectedRows)||void 0===e?void 0:e.map(function(e,n){return w.default.createElement("div",{className:"flex gap-1 items-center mb-[5px] p-[2px_5px] h-auto rounded-[8px] text-white bg-primary",key:e.id||n},w.default.createElement("span",{className:"text-white"},e[le.isShowRowTitleName]),w.default.createElement("span",{className:"text-white cursor-pointer text-[16px]",onClick:function(){return he(e.id)}},w.default.createElement(O,{className:"hover:text-red-400 transition-colors duration-200"})))}))}),w.default.createElement(V,U({border:Y,columns:me||[],data:le.dataSource,density:le.tableDensity,drag:K,onRowChange:xe,openRowSelection:A,ref:te,rowSelectionType:T,scroll:ee,selectedRowKeys:le.selectedRowKeys},ne))),w.default.createElement(z.ConditionalRender,{conditional:0!==le.total&&g},function(){return w.default.createElement("div",{className:"flex justify-end box-border w-full h-[60px] p-[10px_20px] rounded-b-lg bg-section Pagination"},w.default.createElement(R.Pagination,{current:le.current,onChange:fe,onShowSizeChange:ue,pageSize:le.pageSize,total:le.total}))})))},ne=(0,w.memo)((0,w.forwardRef)(ee)),re=m.D,te=m.Y;export{re as BaseList,te as ListBody};
1
+ import*as e from"lodash";import*as n from"react";import*as r from"uuid";import*as t from"@itera-web/hooks-setstate";import*as l from"@itera-web/react-ui-conditionalrender";import*as o from"@itera-web/react-ui-functioncontrol";import*as a from"@itera-web/react-ui-pagination-push";import*as i from"@itera-web/react-ui-searchform";import*as c from"@itera-web/react-ui-spin";import*as d from"@itera-web/utils-cn";import*as s from"@itera-web/utils-locale-toggle";import*as b from"rc-table";import*as u from"@itera-web/react-ui-checkbox";import*as f from"@itera-web/react-ui-empty";import*as p from"@itera-web/react-ui-radio";import*as h from"react-resizable";import*as x from"styled-components";var g={d:(e,n)=>{for(var r in n)g.o(n,r)&&!g.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},m={};g.d(m,{D:()=>ne,Y:()=>V});const v=(e=>{var n={};return g.d(n,e),n})({default:()=>e.default});const w=(e=>{var n={};return g.d(n,e),n})({createElement:()=>n.createElement,default:()=>n.default,forwardRef:()=>n.forwardRef,memo:()=>n.memo,useCallback:()=>n.useCallback,useEffect:()=>n.useEffect,useImperativeHandle:()=>n.useImperativeHandle,useMemo:()=>n.useMemo,useRef:()=>n.useRef,useState:()=>n.useState});const y=(e=>{var n={};return g.d(n,e),n})({v4:()=>r.v4});const k=(e=>{var n={};return g.d(n,e),n})({useSetState:()=>t.useSetState});const z=(e=>{var n={};return g.d(n,e),n})({ConditionalRender:()=>l.ConditionalRender});const S=(e=>{var n={};return g.d(n,e),n})({FunctionControl:()=>o.FunctionControl});const R=(e=>{var n={};return g.d(n,e),n})({Pagination:()=>a.Pagination});const C=(e=>{var n={};return g.d(n,e),n})({SearchForm:()=>i.SearchForm});const I=(e=>{var n={};return g.d(n,e),n})({Spin:()=>c.Spin});const E=(e=>{var n={};return g.d(n,e),n})({cn:()=>d.cn});const N=(e=>{var n={};return g.d(n,e),n})({Intl:()=>s.Intl});var O=function(e){var n=e.className;return w.createElement("svg",{className:n,fill:"none",height:"18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"18",xmlns:"http://www.w3.org/2000/svg"},w.createElement("line",{x1:"18",x2:"6",y1:"6",y2:"18"}),w.createElement("line",{x1:"6",x2:"18",y1:"6",y2:"18"}))};const j=(e=>{var n={};return g.d(n,e),n})({default:()=>b.default});const P=(e=>{var n={};return g.d(n,e),n})({Checkbox:()=>u.Checkbox});const M=(e=>{var n={};return g.d(n,e),n})({Empty:()=>f.Empty});const H=(e=>{var n={};return g.d(n,e),n})({RadioGroup:()=>p.RadioGroup,RadioGroupItem:()=>p.RadioGroupItem});const D=(e=>{var n={};return g.d(n,e),n})({Resizable:()=>h.Resizable});var B=function(e){var n=e.className;return w.createElement("svg",{className:n,height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},w.createElement("circle",{cx:"9",cy:"12",r:"1"}),w.createElement("circle",{cx:"9",cy:"5",r:"1"}),w.createElement("circle",{cx:"9",cy:"19",r:"1"}),w.createElement("circle",{cx:"15",cy:"12",r:"1"}),w.createElement("circle",{cx:"15",cy:"5",r:"1"}),w.createElement("circle",{cx:"15",cy:"19",r:"1"}))},A=function(){return A=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var l in n=arguments[r])Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);return e},A.apply(this,arguments)},T=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(t=Object.getOwnPropertySymbols(e);l<t.length;l++)n.indexOf(t[l])<0&&Object.prototype.propertyIsEnumerable.call(e,t[l])&&(r[t[l]]=e[t[l]])}return r},L=w.default.forwardRef(function(e,n){var r=e.width,t=e.drag,l=e.onResizeStart,o=e.onResizeStop,a=e.children,i=T(e,["width","drag","onResizeStart","onResizeStop","children"]);return r&&t?w.default.createElement(D.Resizable,{draggableOpts:{enableUserSelectHack:!1},handle:w.default.createElement("span",{className:"rc-table-resize-handle",onClick:function(e){return e.stopPropagation()}},w.default.createElement(B,null)),height:0,onResizeStart:l,onResizeStop:o,width:r},w.default.createElement("th",A({ref:n},i),a)):w.default.createElement("th",A({ref:n},i),a)}),Z=(0,w.memo)(L);const F=(e=>{var n={};return g.d(n,e),n})({default:()=>x.default});var G,X=function(e,n){return Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,e},Y=F.default.div(G||(G=X(["\n .rc-table-tbody-virtual {\n border-left: 1px solid var(--border-color);\n }\n\n .rc-table-tbody-virtual * {\n box-sizing: border-box;\n }\n\n .rc-table-tbody-virtual .rc-table-row {\n display: flex;\n box-sizing: border-box;\n width: 100%;\n }\n\n .rc-table-tbody-virtual .rc-table-row-extra .rc-table-cell {\n background: rgba(200, 200, 255) !important;\n }\n\n .rc-table-tbody-virtual .rc-table-cell {\n flex: 0 0 var(--virtual-width);\n width: var(--virtual-width);\n padding: 8px 16px;\n border-right: 1px solid var(--border-color);\n border-bottom: 1px solid var(--border-color);\n }\n\n .rc-table {\n position: relative;\n box-sizing: border-box;\n color: var(--font-3-color);\n font-size: 14px;\n line-height: 1.5;\n max-height: 100%;\n }\n\n .rc-table-container {\n max-height: 100%;\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--border-color);\n }\n\n .rc-table-rtl {\n direction: rtl;\n }\n\n .rc-table table {\n width: 100%;\n border-spacing: 0;\n }\n\n .rc-table-body {\n border-left: 1px solid var(--border-color);\n border-bottom: 1px solid var(--border-color);\n max-height: 100%;\n flex: 1;\n }\n\n .rc-table th,\n .rc-table td {\n position: relative;\n box-sizing: border-box;\n padding: var(--rc-table-padding);\n white-space: normal;\n border-bottom: 1px solid var(--border-color);\n transition: box-shadow 0.3s;\n }\n\n .rc-table-rtl.rc-table th,\n .rc-table-rtl.rc-table td {\n border-right: 0;\n border-left: 1px solid var(--border-color);\n }\n\n .rc-table-cell:not(\n .rc-table-ping-left .rc-table-cell-fix-left-last,\n .rc-table-ping-right .rc-table-cell-fix-right-first\n )::after {\n content: '';\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n background-color: var(--border-color);\n }\n\n .rc-table-fixed-column-gapped .rc-table-cell-fix-left-last::after,\n .rc-table-fixed-column-gapped .rc-table-cell-fix-right-first::after {\n display: none !important;\n }\n\n .rc-table-cell {\n background: #f4f4f4;\n }\n\n .rc-table-cell-fix-left,\n .rc-table-cell-fix-right {\n z-index: 2;\n }\n\n .rc-table-cell-fix-right:last-child:not(.rc-table-cell-fix-sticky) {\n border-right-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-right:last-child {\n border-right-color: var(--border-color);\n }\n\n .rc-table-rtl .rc-table-cell-fix-left:last-child {\n border-left-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-left-first {\n box-shadow: 1px 0 0 var(--border-color);\n }\n\n .rc-table-cell-fix-left-first::after,\n .rc-table-cell-fix-left-last::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: -1px;\n width: 20px;\n transform: translateX(100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell-fix-left-all::after {\n display: none;\n }\n\n .rc-table-cell-fix-right-first,\n .rc-table-cell-fix-right-last {\n box-shadow: -1px 0 0 var(--border-color);\n }\n\n .rc-table-rtl .rc-table-cell-fix-right-first,\n .rc-table-rtl .rc-table-cell-fix-right-last {\n box-shadow: none;\n }\n\n .rc-table-cell-fix-right-first::after,\n .rc-table-cell-fix-right-last::after {\n position: absolute;\n top: 0;\n bottom: -1px;\n left: 0;\n width: 20px;\n transform: translateX(-100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last {\n overflow: visible;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last\n .rc-table-cell-content {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-row-hover {\n background: var(--primary-bg-color);\n }\n\n .rc-table-ping-left .rc-table-cell-fix-left-first::after,\n .rc-table-ping-left .rc-table-cell-fix-left-last::after {\n box-shadow: inset 10px 0 8px -8px var(--rc-table-sticky-color);\n }\n\n .rc-table-ping-right .rc-table-cell-fix-right-first::after,\n .rc-table-ping-right .rc-table-cell-fix-right-last::after {\n box-shadow: inset -10px 0 8px -8px var(--rc-table-sticky-color);\n }\n\n .rc-table-expand-icon-col {\n width: 60px;\n }\n\n .rc-table-row-expand-icon-cell {\n text-align: center;\n }\n\n .rc-table thead th {\n text-align: center;\n background: var(--rc-table-header-color);\n }\n\n .rc-table thead .rc-table-cell-scrollbar::after {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -1px;\n width: 1px;\n background: var(--rc-table-header-color);\n content: '';\n }\n\n .rc-table-rtl.rc-table thead .rc-table-cell-scrollbar::after {\n right: -1px;\n left: auto;\n }\n\n .rc-table-header {\n border: 1px solid var(--border-color);\n border-right: 0;\n border-bottom: 0;\n }\n\n .rc-table-placeholder {\n text-align: center;\n }\n\n .rc-table tbody tr td {\n background: var(--primary-section-color);\n }\n\n .rc-table tbody tr th {\n background: var(--primary-section-color);\n }\n\n th.rc-table-measure-cell {\n padding-top: 0;\n padding-bottom: 0;\n border-top: 0;\n border-bottom: 0;\n }\n\n .rc-table-measure-cell-content {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n pointer-events: none;\n }\n\n .rc-table-content {\n border: 1px solid var(--border-color);\n border-right: 0;\n border-bottom: 0;\n border-radius: 5px 0 0 0;\n }\n\n //.rc-table-fixed-column .rc-table-body::after {\n // position: absolute;\n // top: 0;\n // right: 0;\n // bottom: 0;\n // z-index: 1;\n // border-right: 1px solid var(--border-color);\n // content: '';\n //}\n\n .rc-table-expanded-row .rc-table-cell {\n box-shadow: inset 0 8px 8px -8px var(--rc-table-sticky-color);\n }\n\n .rc-table-expanded-row-fixed {\n box-sizing: border-box;\n margin: -16px -10px -16px -8px;\n padding: 16px 8px;\n }\n\n //.rc-table-expanded-row-fixed::after {\n // position: absolute;\n // top: 0;\n // right: 1px;\n // bottom: 0;\n // width: 0;\n // border-right: 1px solid var(--border-color);\n // content: '';\n //}\n\n .rc-table-row-expand-icon {\n display: inline-block;\n width: 16px;\n height: 16px;\n color: #aaa;\n line-height: 16px;\n text-align: center;\n vertical-align: middle;\n border: 1px solid currentColor;\n cursor: pointer;\n }\n\n .rc-table-row-expand-icon.rc-table-row-expanded::after {\n content: '-';\n }\n\n .rc-table-row-expand-icon.rc-table-row-collapsed::after {\n content: '+';\n }\n\n .rc-table-row-expand-icon.rc-table-row-spaced {\n visibility: hidden;\n }\n\n .rc-table-title {\n padding: 16px 8px;\n border: 1px solid var(--border-color);\n border-bottom: 0;\n }\n\n .rc-table-caption {\n padding: 16px 8px;\n border-right: 1px solid var(--border-color);\n border-bottom: 1px solid var(--border-color);\n }\n\n .rc-table-footer {\n padding: 16px 8px;\n border: 1px solid var(--border-color);\n border-top: 0;\n }\n\n .rc-table tfoot td {\n background: var(--primary-section-color);\n }\n\n .rc-table-summary {\n border-top: 1px solid var(--border-color);\n border-left: 1px solid var(--border-color);\n }\n\n .rc-table-sticky-holder {\n position: sticky;\n z-index: 2;\n }\n\n .rc-table-sticky-scroll {\n position: sticky;\n bottom: 0;\n z-index: 2;\n display: flex;\n align-items: center;\n opacity: 0.6;\n transition: transform 0.1s ease-in 0s;\n }\n\n .rc-table-sticky-scroll:hover {\n transform-origin: center bottom;\n }\n\n .rc-table-sticky-scroll-bar {\n height: 8px;\n background-color: var(--primary-section-color);\n border-radius: 4px;\n }\n\n .rc-table-sticky-scroll-bar:hover {\n background-color: var(--scrollbar-color);\n }\n\n .rc-table-sticky-scroll-bar-active {\n background-color: var(--scrollbar-color-hover);\n }\n\n .rc-table .rc-table-tbody .rc-table-row-selected td {\n background-color: var(--primary-bg-color);\n }\n\n .react-resizable {\n position: relative;\n }\n\n .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n }\n\n .react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n }\n\n .react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n }\n\n .react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n }\n\n .react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n }\n\n .react-resizable-handle-w,\n .react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n }\n\n .react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n }\n\n .react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n }\n\n .react-resizable-handle-n,\n .react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n }\n\n .react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n }\n\n .react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n }\n\n .rc-table-resize-handle {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 2px;\n top: 0;\n width: 14px;\n height: 100%;\n cursor: col-resize;\n }\n"],["\n .rc-table-tbody-virtual {\n border-left: 1px solid var(--border-color);\n }\n\n .rc-table-tbody-virtual * {\n box-sizing: border-box;\n }\n\n .rc-table-tbody-virtual .rc-table-row {\n display: flex;\n box-sizing: border-box;\n width: 100%;\n }\n\n .rc-table-tbody-virtual .rc-table-row-extra .rc-table-cell {\n background: rgba(200, 200, 255) !important;\n }\n\n .rc-table-tbody-virtual .rc-table-cell {\n flex: 0 0 var(--virtual-width);\n width: var(--virtual-width);\n padding: 8px 16px;\n border-right: 1px solid var(--border-color);\n border-bottom: 1px solid var(--border-color);\n }\n\n .rc-table {\n position: relative;\n box-sizing: border-box;\n color: var(--font-3-color);\n font-size: 14px;\n line-height: 1.5;\n max-height: 100%;\n }\n\n .rc-table-container {\n max-height: 100%;\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--border-color);\n }\n\n .rc-table-rtl {\n direction: rtl;\n }\n\n .rc-table table {\n width: 100%;\n border-spacing: 0;\n }\n\n .rc-table-body {\n border-left: 1px solid var(--border-color);\n border-bottom: 1px solid var(--border-color);\n max-height: 100%;\n flex: 1;\n }\n\n .rc-table th,\n .rc-table td {\n position: relative;\n box-sizing: border-box;\n padding: var(--rc-table-padding);\n white-space: normal;\n border-bottom: 1px solid var(--border-color);\n transition: box-shadow 0.3s;\n }\n\n .rc-table-rtl.rc-table th,\n .rc-table-rtl.rc-table td {\n border-right: 0;\n border-left: 1px solid var(--border-color);\n }\n\n .rc-table-cell:not(\n .rc-table-ping-left .rc-table-cell-fix-left-last,\n .rc-table-ping-right .rc-table-cell-fix-right-first\n )::after {\n content: '';\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 0;\n top: 0;\n width: 1px;\n height: 100%;\n background-color: var(--border-color);\n }\n\n .rc-table-fixed-column-gapped .rc-table-cell-fix-left-last::after,\n .rc-table-fixed-column-gapped .rc-table-cell-fix-right-first::after {\n display: none !important;\n }\n\n .rc-table-cell {\n background: #f4f4f4;\n }\n\n .rc-table-cell-fix-left,\n .rc-table-cell-fix-right {\n z-index: 2;\n }\n\n .rc-table-cell-fix-right:last-child:not(.rc-table-cell-fix-sticky) {\n border-right-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-right:last-child {\n border-right-color: var(--border-color);\n }\n\n .rc-table-rtl .rc-table-cell-fix-left:last-child {\n border-left-color: transparent;\n }\n\n .rc-table-rtl .rc-table-cell-fix-left-first {\n box-shadow: 1px 0 0 var(--border-color);\n }\n\n .rc-table-cell-fix-left-first::after,\n .rc-table-cell-fix-left-last::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: -1px;\n width: 20px;\n transform: translateX(100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell-fix-left-all::after {\n display: none;\n }\n\n .rc-table-cell-fix-right-first,\n .rc-table-cell-fix-right-last {\n box-shadow: -1px 0 0 var(--border-color);\n }\n\n .rc-table-rtl .rc-table-cell-fix-right-first,\n .rc-table-rtl .rc-table-cell-fix-right-last {\n box-shadow: none;\n }\n\n .rc-table-cell-fix-right-first::after,\n .rc-table-cell-fix-right-last::after {\n position: absolute;\n top: 0;\n bottom: -1px;\n left: 0;\n width: 20px;\n transform: translateX(-100%);\n transition: box-shadow 0.3s;\n content: '';\n pointer-events: none;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last {\n overflow: visible;\n }\n\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-first .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-left-last .rc-table-cell-content,\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-first\n .rc-table-cell.rc-table-cell-ellipsis.rc-table-cell-fix-right-last\n .rc-table-cell-content {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .rc-table-cell.rc-table-cell-row-hover {\n background: var(--primary-bg-color);\n }\n\n .rc-table-ping-left .rc-table-cell-fix-left-first::after,\n .rc-table-ping-left .rc-table-cell-fix-left-last::after {\n box-shadow: inset 10px 0 8px -8px var(--rc-table-sticky-color);\n }\n\n .rc-table-ping-right .rc-table-cell-fix-right-first::after,\n .rc-table-ping-right .rc-table-cell-fix-right-last::after {\n box-shadow: inset -10px 0 8px -8px var(--rc-table-sticky-color);\n }\n\n .rc-table-expand-icon-col {\n width: 60px;\n }\n\n .rc-table-row-expand-icon-cell {\n text-align: center;\n }\n\n .rc-table thead th {\n text-align: center;\n background: var(--rc-table-header-color);\n }\n\n .rc-table thead .rc-table-cell-scrollbar::after {\n position: absolute;\n top: 0;\n bottom: 0;\n left: -1px;\n width: 1px;\n background: var(--rc-table-header-color);\n content: '';\n }\n\n .rc-table-rtl.rc-table thead .rc-table-cell-scrollbar::after {\n right: -1px;\n left: auto;\n }\n\n .rc-table-header {\n border: 1px solid var(--border-color);\n border-right: 0;\n border-bottom: 0;\n }\n\n .rc-table-placeholder {\n text-align: center;\n }\n\n .rc-table tbody tr td {\n background: var(--primary-section-color);\n }\n\n .rc-table tbody tr th {\n background: var(--primary-section-color);\n }\n\n th.rc-table-measure-cell {\n padding-top: 0;\n padding-bottom: 0;\n border-top: 0;\n border-bottom: 0;\n }\n\n .rc-table-measure-cell-content {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n pointer-events: none;\n }\n\n .rc-table-content {\n border: 1px solid var(--border-color);\n border-right: 0;\n border-bottom: 0;\n border-radius: 5px 0 0 0;\n }\n\n //.rc-table-fixed-column .rc-table-body::after {\n // position: absolute;\n // top: 0;\n // right: 0;\n // bottom: 0;\n // z-index: 1;\n // border-right: 1px solid var(--border-color);\n // content: '';\n //}\n\n .rc-table-expanded-row .rc-table-cell {\n box-shadow: inset 0 8px 8px -8px var(--rc-table-sticky-color);\n }\n\n .rc-table-expanded-row-fixed {\n box-sizing: border-box;\n margin: -16px -10px -16px -8px;\n padding: 16px 8px;\n }\n\n //.rc-table-expanded-row-fixed::after {\n // position: absolute;\n // top: 0;\n // right: 1px;\n // bottom: 0;\n // width: 0;\n // border-right: 1px solid var(--border-color);\n // content: '';\n //}\n\n .rc-table-row-expand-icon {\n display: inline-block;\n width: 16px;\n height: 16px;\n color: #aaa;\n line-height: 16px;\n text-align: center;\n vertical-align: middle;\n border: 1px solid currentColor;\n cursor: pointer;\n }\n\n .rc-table-row-expand-icon.rc-table-row-expanded::after {\n content: '-';\n }\n\n .rc-table-row-expand-icon.rc-table-row-collapsed::after {\n content: '+';\n }\n\n .rc-table-row-expand-icon.rc-table-row-spaced {\n visibility: hidden;\n }\n\n .rc-table-title {\n padding: 16px 8px;\n border: 1px solid var(--border-color);\n border-bottom: 0;\n }\n\n .rc-table-caption {\n padding: 16px 8px;\n border-right: 1px solid var(--border-color);\n border-bottom: 1px solid var(--border-color);\n }\n\n .rc-table-footer {\n padding: 16px 8px;\n border: 1px solid var(--border-color);\n border-top: 0;\n }\n\n .rc-table tfoot td {\n background: var(--primary-section-color);\n }\n\n .rc-table-summary {\n border-top: 1px solid var(--border-color);\n border-left: 1px solid var(--border-color);\n }\n\n .rc-table-sticky-holder {\n position: sticky;\n z-index: 2;\n }\n\n .rc-table-sticky-scroll {\n position: sticky;\n bottom: 0;\n z-index: 2;\n display: flex;\n align-items: center;\n opacity: 0.6;\n transition: transform 0.1s ease-in 0s;\n }\n\n .rc-table-sticky-scroll:hover {\n transform-origin: center bottom;\n }\n\n .rc-table-sticky-scroll-bar {\n height: 8px;\n background-color: var(--primary-section-color);\n border-radius: 4px;\n }\n\n .rc-table-sticky-scroll-bar:hover {\n background-color: var(--scrollbar-color);\n }\n\n .rc-table-sticky-scroll-bar-active {\n background-color: var(--scrollbar-color-hover);\n }\n\n .rc-table .rc-table-tbody .rc-table-row-selected td {\n background-color: var(--primary-bg-color);\n }\n\n .react-resizable {\n position: relative;\n }\n\n .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n }\n\n .react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n }\n\n .react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n }\n\n .react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n }\n\n .react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n }\n\n .react-resizable-handle-w,\n .react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n }\n\n .react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n }\n\n .react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n }\n\n .react-resizable-handle-n,\n .react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n }\n\n .react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n }\n\n .react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n }\n\n .rc-table-resize-handle {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 2px;\n top: 0;\n width: 14px;\n height: 100%;\n cursor: col-resize;\n }\n"]))),W=(0,w.memo)(Y),K=function(){return K=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var l in n=arguments[r])Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);return e},K.apply(this,arguments)},Q=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(t=Object.getOwnPropertySymbols(e);l<t.length;l++)n.indexOf(t[l])<0&&Object.prototype.propertyIsEnumerable.call(e,t[l])&&(r[t[l]]=e[t[l]])}return r},_=function(e,n,r){if(r||2===arguments.length)for(var t,l=0,o=n.length;l<o;l++)!t&&l in n||(t||(t=Array.prototype.slice.call(n,0,l)),t[l]=n[l]);return e.concat(t||Array.prototype.slice.call(n))};function J(e,n){var r=e.columns,t=e.data,l=e.openRowSelection,o=e.selectedRowKeys,a=e.onRowChange,i=e.rowSelectionType,c=void 0===i?"checkbox":i,d=e.density,s=void 0===d?"normal":d,b=e.border,u=void 0!==b&&b,f=e.scrollX,p=void 0===f?"100%":f,h=e.scrollY,x=e.drag,g=e.className,m=Q(e,["columns","data","openRowSelection","selectedRowKeys","onRowChange","rowSelectionType","density","border","scrollX","scrollY","drag","className"]),v=(0,w.useState)(null),y=v[0],k=v[1],z=(0,w.useState)(function(){return T(r)}),S=z[0],R=z[1],C=(0,w.useRef)(null),I=(0,w.useRef)(null),E=(0,w.useRef)({}),N=(0,w.useRef)(null),O=(0,w.useRef)(!1),D=(0,w.useRef)(0),B=(0,w.useMemo)(function(){var e="10px 6px";switch(s){case"loose":e="16px 8px";break;case"compact":e="6px 2px"}return e},[s]),A=(0,w.useMemo)(function(){var e=[];function n(e,r,t){return e.map(function(e){if(e.key===r)return K(K({},e),{width:t});if(e.children){var l=n(e.children,r,t);return K(K({},e),{children:l,width:l.reduce(function(e,n){return e+(n.width||0)},0)})}return e})}l&&e.push({key:"__select__",width:48,fixed:"left",align:"center",className:"rc-table-select-col",title:"radio"===c?null:w.default.createElement(P.Checkbox,{checked:(null==o?void 0:o.length)===t.length||(null==o?void 0:o.length)>0&&"indeterminate",onCheckedChange:function(e){var n=e?t.map(function(e){return e.id}):[];null==a||a(n,t.filter(function(e){return n.includes(e.id)}))}}),render:function(e,n){var r=null==o?void 0:o.includes(n.id);return"radio"===c?w.default.createElement(H.RadioGroup,{onValueChange:function(e){var n=t.find(function(n){return n.id===e});null==a||a([e],n?[n]:[])},value:null==o?void 0:o[0]},w.default.createElement(H.RadioGroupItem,{checked:r,value:n.id})):w.default.createElement(P.Checkbox,{checked:r,onCheckedChange:function(e){var r=e?_(_([],o||[],!0),[n.id],!1):(o||[]).filter(function(e){return e!==n.id});null==a||a(r,t.filter(function(e){return r.includes(e.id)}))}})}});var r=function(e){return function(e){if(O.current=!0,E.current&&Object.values(E.current).forEach(function(e){e&&(e.style.userSelect="none")}),N.current){var n=I.current.nativeElement.getBoundingClientRect().left;N.current.style.left=e.clientX-n+"px",N.current.style.display="inherit"}D.current=e.clientX}},i=function(e){return function(r,t){var l=t.size;O.current=!1,E.current&&Object.values(E.current).forEach(function(e){e&&(e.style.userSelect="")}),N.current&&(N.current.style.left="0px",N.current.style.display="none"),D.current=r.clientX-D.current,R(function(r){return n(r,e,l.width+D.current)})}};return e.push.apply(e,function e(n){return n.map(function(n){var t,l=!n.children||0===n.children.length;return{key:n.key,title:n.title,dataIndex:null!==(t=n.dataIndex)&&void 0!==t?t:n.key,width:n.width,align:n.align||"left",fixed:n.fixed,ellipsis:!n.wrap,render:n.render,children:n.children?e(n.children):void 0,onHeaderCell:l?function(){return{width:n.width,drag:x,onResizeStart:r(n.key),onResizeStop:i(n.key),ref:function(e){E.current[n.key]=e}}}:void 0}})}(S)),e},[S,l,o,t]);function T(e){return e.map(function(e){if(e.children&&e.children.length){var n=T(e.children);return K(K({},e),{width:n.reduce(function(e,n){return e+(n.width||0)},0),children:n})}return e})}return(0,w.useImperativeHandle)(n,function(){return{rcTable:function(){return I.current}}}),(0,w.useEffect)(function(){R(T(r))},[r]),(0,w.useEffect)(function(){var e,n=function(e){if(N.current&&O.current){var n=I.current.nativeElement.getBoundingClientRect().left;N.current.style.left="".concat(e.clientX-n,"px")}},r=null===(e=I.current)||void 0===e?void 0:e.nativeElement,t=document.querySelector(".ListBodyBox"),l=r.querySelector(".rc-table-container > .rc-table-header"),o=r.querySelector(".rc-table-container > .rc-table-body");function a(){var e=o.getBoundingClientRect(),n=l.getBoundingClientRect(),r=t.getBoundingClientRect();k(e.bottom>r.bottom-48?r.height-n.height-48:null)}var i=new ResizeObserver(a);return t&&i.observe(t),o&&i.observe(o),a(),window.addEventListener("mousemove",n),function(){window.removeEventListener("mousemove",n),i.disconnect()}},[]),w.default.createElement(W,{className:"flex-1 relative",ref:C,style:{"--border-color":u?"":"#ffffff01","--primary-section-color":"","--rc-table-padding":B}},w.default.createElement(j.default,K({className:g,columns:A,components:{header:{cell:Z}},data:t,emptyText:w.default.createElement(M.Empty,null),ref:I,rowClassName:function(e,n){var r;return o.includes(String(null!==(r=e.id)&&void 0!==r?r:n))?"rc-table-row-selected":""},rowKey:function(e,n){var r;return null!==(r=e.id)&&void 0!==r?r:n},scroll:{x:p,y:h||y},sticky:!0},m)),w.default.createElement("div",{className:"absolute h-full w-[1px] top-0 z-10 bg-primary hidden",ref:N}))}var V=(0,w.memo)((0,w.forwardRef)(J)),q=function(){return q=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var l in n=arguments[r])Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);return e},q.apply(this,arguments)},U=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(t=Object.getOwnPropertySymbols(e);l<t.length;l++)n.indexOf(t[l])<0&&Object.prototype.propertyIsEnumerable.call(e,t[l])&&(r[t[l]]=e[t[l]])}return r},$=function(e,n,r){if(r||2===arguments.length)for(var t,l=0,o=n.length;l<o;l++)!t&&l in n||(t||(t=Array.prototype.slice.call(n,0,l)),t[l]=n[l]);return e.concat(t||Array.prototype.slice.call(n))},ee=function(e,n){var r=e.serviceFunc,t=void 0===r?function(e,n){}:r,l=e.functionControlTableTitle,o=void 0===l?"查询表格":l,a=e.columns,i=void 0===a?[]:a,c=e.optionButtonGroup,d=void 0===c?[]:c,s=e.searchParamList,b=void 0===s?[]:s,u=e.functionControlHide,f=void 0!==u&&u,p=e.topPagination,h=void 0!==p&&p,x=e.bottomPagination,g=void 0===x||x,m=e.isShowRowTitleName,j=void 0===m?"":m,P=e.noSearch,M=void 0!==P&&P,H=e.className,D=e.openRowSelection,B=void 0!==D&&D,A=e.rowSelectionType,T=void 0===A?"checkbox":A,L=e.locales,Z=void 0===L?"zh_CN":L,F=e.onRowChangeCallback,G=void 0===F?function(){}:F,X=e.border,Y=void 0!==X&&X,W=e.drag,K=void 0!==W&&W,Q=e.listClassName,_=void 0===Q?"":Q,J=e.scrollX,ee=e.scrollY,ne=U(e,["serviceFunc","functionControlTableTitle","columns","optionButtonGroup","searchParamList","functionControlHide","topPagination","bottomPagination","isShowRowTitleName","noSearch","className","openRowSelection","rowSelectionType","locales","onRowChangeCallback","border","drag","listClassName","scrollX","scrollY"]),re=(0,w.useRef)(),te=(0,w.useRef)(),le=(0,k.useSetState)({isHideFormItem:!0,tableDensity:"normal",loading:!1,dataSource:[],selectedRows:[],selectedRowKeys:[],isShowRowTitleName:j,Condition:{},current:1,pageSize:10,total:1}),oe=le[0],ae=le[1],ie=le[2];function ce(e){ae({tableDensity:e})}function de(){ae({isHideFormItem:!oe.isHideFormItem})}var se=function(e){var n,r,t=e||(null===(r=null===(n=null==re?void 0:re.current)||void 0===n?void 0:n.searchForm)||void 0===r?void 0:r.getValues());for(var l in t)void 0===t[l]&&delete t[l];ae({current:1,Condition:t},be)},be=function(e){void 0===e&&(e={}),ae({loading:!0});var n=e.current||oe.current,r=e.pageSize||oe.pageSize,l=e.Condition||oe.Condition,o=q(q({},l),{page:n,limit:r});setTimeout(function(){return ae({loading:!1})},5e3),null==t||t(o,function(e){var n,r=e.dataSource,t=void 0===r?[]:r,l=e.total,a=void 0===l?0:l;ae({loading:!1});var i=null===(n=null==t?void 0:t.map)||void 0===n?void 0:n.call(t,function(e,n){return q(q({},e||{}),{rowKey:(null==e?void 0:e.id)||(0,y.v4)(),index:(o.page-1)*o.limit+(n+1)})});ae({dataSource:i,total:a})})},ue=function(){var e;return null===(e=re.current)||void 0===e?void 0:e.onReset()},fe=function(e,n){ae({current:e,pageSize:n},be)},pe=function(e,n){return ae({current:e,pageSize:n},be)},he=(0,w.useCallback)(function(e,n){var r,t,l=(null===(r=v.default.cloneDeep(oe.selectedRows||[]))||void 0===r?void 0:r.concat(n))||[],o=null===(t=e.map(function(e){return null==l?void 0:l.find(function(n){return String(n.id)==String(e)})}))||void 0===t?void 0:t.filter(Boolean);ae({selectedRowKeys:e,selectedRows:o}),G(e,o)},[oe]),xe=(0,w.useCallback)(function(e){var n,r,t=null===(n=oe.selectedRowKeys)||void 0===n?void 0:n.filter(function(n){return String(n)!==String(e)}),l=null===(r=oe.selectedRows)||void 0===r?void 0:r.filter(function(n){return n.id!==e});he(t,l)},[oe]),ge=function(e){var n,r=String(e).split(","),t=null===(n=oe.selectedRows)||void 0===n?void 0:n.filter(function(e){return!r.includes(String(e.id))}),l=null==t?void 0:t.map(function(e){return String(e.id)});ae({selectedRowKeys:l,selectedRows:t})},me=(0,w.useMemo)(function(){var e;return null===(e=v.default.cloneDeep(i))||void 0===e?void 0:e.map(function(e){return q(q({},e),{header:N.Intl.v(e.header)})})},[Z,i]);return(0,w.useImperativeHandle)(n,function(){return{state:function(){return ie()},onSearch:se,onChangeRowSelection:ge,onRowChange:he,setState:ae,rcTable:function(){return te.current}}},[oe]),(0,w.useEffect)(function(){!M&&se()},[]),w.default.createElement(I.Spin,{size:"large",spinning:oe.loading},w.default.createElement("div",{className:(0,E.cn)("relative flex flex-col h-full",H)},w.default.createElement(z.ConditionalRender,{conditional:(null==b?void 0:b.length)>0},function(){return w.default.createElement(C.SearchForm,{defaultValues:Object.assign.apply(Object,$([{}],b.map(function(e){var n,r;return(n={})[e.key]=null!==(r=e.defaultValue)&&void 0!==r?r:"",n}),!1)),loading:oe.loading,locales:Z,noSearch:!0,onSearch:function(){return se()},ref:re,searchParamList:b})}),w.default.createElement(z.ConditionalRender,{conditional:0!==oe.total&&h},function(){return w.default.createElement("div",{className:"flex justify-end box-border w-full h-[60px] p-[10px_20px] rounded-b-lg bg-section"},w.default.createElement(R.Pagination,{current:oe.current,onChange:fe,onShowSizeChange:pe,pageSize:oe.pageSize,total:oe.total}))}),w.default.createElement(z.ConditionalRender,{conditional:!f},function(){return w.default.createElement("div",{className:"min-h-[45px] mt-5 overflow-hidden rounded-t-lg shrink-0 FunctionControl"},w.default.createElement(S.FunctionControl,{dataSource:oe.dataSource,functionControlHide:f,functionControlTableTitle:o,isHideFormItem:oe.isHideFormItem,isHideText:(null==b?void 0:b.length)>0,locales:Z,onChangeIsHideFormItem:de,onChangeListSize:ce,onResetForm:ue,onSearch:function(){return se()},optionButtonGroup:d,tableDensity:oe.tableDensity}))}),w.default.createElement("div",{className:"flex flex-col flex-1 box-border p-[15px] overflow-hidden bg-section min-h-0 ListBodyBox"},w.default.createElement(z.ConditionalRender,{conditional:oe.isShowRowTitleName},function(){var e;return w.default.createElement("div",{className:"flex flex-wrap gap-3 shrink-0 max-h-[100px] overflow-y-auto"},null===(e=oe.selectedRows)||void 0===e?void 0:e.map(function(e,n){return w.default.createElement("div",{className:"flex gap-1 items-center mb-[5px] p-[2px_5px] h-auto rounded-[8px] text-white bg-primary",key:e.id||n},w.default.createElement("span",{className:"text-white"},e[oe.isShowRowTitleName]),w.default.createElement("span",{className:"text-white cursor-pointer text-[16px]",onClick:function(){return xe(e.id)}},w.default.createElement(O,{className:"hover:text-red-400 transition-colors duration-200"})))}))}),w.default.createElement(V,q({border:Y,className:(0,E.cn)("flex-1",_),columns:me||[],data:oe.dataSource,density:oe.tableDensity,drag:K,onRowChange:he,openRowSelection:B,ref:te,rowSelectionType:T,scrollX:J,scrollY:ee,selectedRowKeys:oe.selectedRowKeys},ne))),w.default.createElement(z.ConditionalRender,{conditional:0!==oe.total&&g},function(){return w.default.createElement("div",{className:"flex shrink-0 justify-end box-border w-full h-[60px] p-[10px_20px] rounded-b-lg bg-section Pagination"},w.default.createElement(R.Pagination,{current:oe.current,onChange:fe,onShowSizeChange:pe,pageSize:oe.pageSize,total:oe.total}))})))},ne=(0,w.memo)((0,w.forwardRef)(ee)),re=m.D,te=m.Y;export{re as BaseList,te as ListBody};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@itera-web/react-ui-baselist",
3
3
  "description": "查询表格",
4
- "version": "2.3.1",
4
+ "version": "2.4.0",
5
5
  "main": "es/index.js",
6
6
  "types": "es/index.d.ts",
7
7
  "publishConfig": {
@@ -37,5 +37,5 @@
37
37
  "devDependencies": {
38
38
  "@itera-web/cli": "^1.1.54"
39
39
  },
40
- "gitHead": "1ab46dede6f6c68214405ffb858e262a8f925aef"
40
+ "gitHead": "0ee08194d784677b7f6d2fe9ec505c1226feb7f9"
41
41
  }