simple-table-core 0.7.16 → 0.7.18
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/README.md +6 -131
- package/dist/components/SimpleTable/SimpleTable.d.ts +4 -26
- package/dist/components/SimpleTable/TableContent.d.ts +1 -1
- package/dist/components/SimpleTable/TableFooter.d.ts +4 -3
- package/dist/components/SimpleTable/TableHeader.d.ts +1 -1
- package/dist/components/SimpleTable/TableHeaderCell.d.ts +2 -0
- package/dist/consts/general-consts.d.ts +4 -0
- package/dist/hooks/useDragHandler.d.ts +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/DragHandlerProps.d.ts +5 -4
- package/dist/types/TableHeaderProps.d.ts +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,147 +1,22 @@
|
|
|
1
1
|
# Simple Table
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Links
|
|
4
|
+
|
|
5
|
+
- **Website**: [Simple Table](https://www.simple-table.com/)
|
|
6
|
+
- **Documentation**: [Simple Table Documentation](https://www.simple-table.com/docs/installation)
|
|
7
|
+
- **Examples**: [Finance Example](https://www.simple-table.com/examples/finance)
|
|
4
8
|
|
|
5
9
|
Simple Table is a powerful yet lightweight React grid component that provides a flexible, customizable, and high-performance solution for displaying and manipulating tabular data in your applications.
|
|
6
10
|
|
|
7
11
|
## Live Demo
|
|
8
12
|
|
|
9
|
-
Check out the live demo on CodeSandbox: <a href="https://codesandbox.io/p/sandbox/simple-table-pagination-example-rdjm5d?file=%2Fsrc%2FApp.tsx%3A33%2C24" target="_blank" rel="noopener noreferrer">Simple Table Pagination Example</a>
|
|
10
|
-
|
|
11
13
|
<div align="center">
|
|
12
14
|
<a href="https://github.com/petera2c/simple-table-marketing/blob/main/src/assets/simple-table-demo-fast.gif?raw=true" target="_blank" rel="noopener noreferrer">
|
|
13
15
|
<img src="https://github.com/petera2c/simple-table-marketing/blob/main/src/assets/simple-table-demo-fast.gif?raw=true" alt="Simple Table Demo" />
|
|
14
16
|
</a>
|
|
15
17
|
</div>
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- **Highly Customizable**: Fully customizable appearance with CSS variables and themes
|
|
20
|
-
- **Cell Editing**: Built-in support for editable cells with controlled state
|
|
21
|
-
- **Column Management**: Resize, reorder, pin, and hide columns with intuitive UI
|
|
22
|
-
- **Pagination**: Built-in pagination with customizable controls
|
|
23
|
-
- **Infinite Scroll**: Alternative to pagination for large datasets
|
|
24
|
-
- **Row Grouping**: Hierarchical data presentation with expandable rows
|
|
25
|
-
- **Theming**: Multiple built-in themes with ability to create custom themes
|
|
26
|
-
- **Performance Optimized**: Efficiently renders thousands of rows and columns
|
|
27
|
-
|
|
28
|
-
## Documentation
|
|
29
|
-
|
|
30
|
-
For detailed documentation, visit: [Simple Table Documentation](https://docs.simple-table.com/)
|
|
31
|
-
|
|
32
|
-
## Website
|
|
33
|
-
|
|
34
|
-
For more information, visit our website: [Simple Table](https://www.simple-table.com/)
|
|
35
|
-
|
|
36
|
-
## Installation
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
# npm
|
|
40
|
-
npm install simple-table-core
|
|
41
|
-
|
|
42
|
-
# yarn
|
|
43
|
-
yarn add simple-table-core
|
|
44
|
-
|
|
45
|
-
# pnpm
|
|
46
|
-
pnpm add simple-table-core
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Props
|
|
50
|
-
|
|
51
|
-
The Simple Table component accepts the following props:
|
|
52
|
-
|
|
53
|
-
- **defaultHeaders**: An array of `HeaderObject` defining the table headers. Each `HeaderObject` includes:
|
|
54
|
-
|
|
55
|
-
- **label**: A string representing the display name of the column header.
|
|
56
|
-
- **accessor**: A string used to access the corresponding data in each row.
|
|
57
|
-
- **width**: A number specifying the width of the column.
|
|
58
|
-
- **isEditable**: An optional boolean indicating if the column is editable.
|
|
59
|
-
- **isSortable**: An optional boolean indicating if the column is sortable.
|
|
60
|
-
- **type**: An optional string specifying the data type of the column. Can be "string", "number", "boolean", "date", or "enum".
|
|
61
|
-
- **cellRenderer**: An optional function that takes a row object and returns a `ReactNode` for custom cell rendering.
|
|
62
|
-
- **align**: Text alignment within cells - "left", "center", or "right"
|
|
63
|
-
|
|
64
|
-
- **rows**: An array of data rows to be displayed in the table. Each row object should have:
|
|
65
|
-
|
|
66
|
-
- **rowMeta**: Object containing metadata for the row
|
|
67
|
-
- **rowId**: Unique identifier for the row
|
|
68
|
-
- **isExpanded**: Optional boolean for row grouping expansion state
|
|
69
|
-
- **children**: Optional array of child rows for row grouping
|
|
70
|
-
- **rowData**: Object containing the actual data to display (keys should match header accessors)
|
|
71
|
-
|
|
72
|
-
- **theme**: Theme name to apply to the table. Options include "light", "dark", "high-contrast", etc.
|
|
73
|
-
- **height**: The height of the table. Can be a string (e.g., "500px", "calc(100vh - 100px)") or "auto".
|
|
74
|
-
- **shouldPaginate**: A boolean to enable or disable pagination. Default is `true`.
|
|
75
|
-
- **rowsPerPage**: The number of rows to display per page. Default is `10`.
|
|
76
|
-
- **columnResizing**: A boolean to enable or disable column resizing. Default is `true`.
|
|
77
|
-
- **columnReordering**: A boolean to enable or disable column dragging.
|
|
78
|
-
- **pinned**: A boolean to enable or disable column pinning.
|
|
79
|
-
- **editColumns**: A boolean to enable or disable column management.
|
|
80
|
-
- **hideFooter**: A boolean to hide or show the footer. Default is `false`.
|
|
81
|
-
- **selectableCells**: A boolean to enable or disable cell selection.
|
|
82
|
-
- **selectableColumns**: A boolean to enable selection of entire columns by clicking headers.
|
|
83
|
-
- **onCellEdit**: A function called when a cell value changes.
|
|
84
|
-
- **nextIcon**: A React element to display as the next page icon.
|
|
85
|
-
- **prevIcon**: A React element to display as the previous page icon.
|
|
86
|
-
- **sortDownIcon**: A React element to display as the sort down icon.
|
|
87
|
-
- **sortUpIcon**: A React element to display as the sort up icon.
|
|
88
|
-
|
|
89
|
-
## Customizable Styles
|
|
90
|
-
|
|
91
|
-
All styles for the Simple Table are customizable through CSS variables. You can override these variables in your own CSS to match your application's design system.
|
|
92
|
-
|
|
93
|
-
### CSS Variables
|
|
94
|
-
|
|
95
|
-
You can override the following CSS variables to customize the appearance of the table:
|
|
96
|
-
|
|
97
|
-
```css
|
|
98
|
-
/* light theme */
|
|
99
|
-
:root {
|
|
100
|
-
--st-border-radius: 4px;
|
|
101
|
-
--st-border-width: 1px;
|
|
102
|
-
--st-cell-padding: 8px;
|
|
103
|
-
--st-font-size: 0.875rem;
|
|
104
|
-
--st-font-weight-normal: 400;
|
|
105
|
-
--st-font-weight-bold: 600;
|
|
106
|
-
--st-transition-duration: 0.2s;
|
|
107
|
-
--st-transition-ease: ease;
|
|
108
|
-
--st-opacity-disabled: 0.5;
|
|
109
|
-
--st-spacing-small: 4px;
|
|
110
|
-
--st-spacing-medium: 8px;
|
|
111
|
-
--st-spacing-large: 16px;
|
|
112
|
-
--st-scrollbar-bg-color: transparent;
|
|
113
|
-
--st-scrollbar-thumb-color: var(--slate-200);
|
|
114
|
-
|
|
115
|
-
--st-border-color: var(--gray-300);
|
|
116
|
-
--st-odd-row-background-color: var(--white);
|
|
117
|
-
--st-even-row-background-color: var(--white);
|
|
118
|
-
--st-header-background-color: var(--white);
|
|
119
|
-
--st-dragging-background-color: var(--gray-200);
|
|
120
|
-
--st-selected-cell-background-color: var(--blue-200);
|
|
121
|
-
--st-selected-first-cell-background-color: var(--blue-200);
|
|
122
|
-
--st-footer-background-color: var(--white);
|
|
123
|
-
--st-cell-color: var(--gray-800);
|
|
124
|
-
--st-cell-odd-row-color: var(--gray-700);
|
|
125
|
-
--st-edit-cell-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 1px -1px rgba(0, 0, 0, 0.05);
|
|
126
|
-
--st-selected-cell-color: var(--gray-900);
|
|
127
|
-
--st-selected-first-cell-color: var(--gray-900);
|
|
128
|
-
--st-resize-handle-color: var(--blue-300);
|
|
129
|
-
--st-separator-border-color: var(--slate-100);
|
|
130
|
-
--st-last-group-row-separator-border-color: var(--slate-300);
|
|
131
|
-
--st-selected-border-top-color: var(--blue-600);
|
|
132
|
-
--st-selected-border-bottom-color: var(--blue-600);
|
|
133
|
-
--st-selected-border-left-color: var(--blue-600);
|
|
134
|
-
--st-selected-border-right-color: var(--blue-600);
|
|
135
|
-
--st-checkbox-checked-background-color: var(--blue-600);
|
|
136
|
-
--st-checkbox-checked-border-color: var(--blue-600);
|
|
137
|
-
--st-column-editor-background-color: var(--white);
|
|
138
|
-
--st-column-editor-popout-background-color: var(--white);
|
|
139
|
-
--st-button-hover-background-color: var(--gray-200);
|
|
140
|
-
--st-button-active-background-color: var(--blue-800);
|
|
141
|
-
--st-font-family: "Roboto", sans-serif;
|
|
142
|
-
--st-editable-cell-focus-border-color: var(--blue-600);
|
|
143
|
-
}
|
|
144
|
-
```
|
|
19
|
+
Any questions, support or features requests join me on Discord <a href="https://discord.gg/RvKHCfg3PC" target="_blank" rel="noopener noreferrer">https://discord.gg/RvKHCfg3PC</a>. I am happy to help and make this table even better!
|
|
145
20
|
|
|
146
21
|
## License
|
|
147
22
|
|
|
@@ -22,6 +22,8 @@ interface SimpleTableProps {
|
|
|
22
22
|
nextIcon?: ReactNode;
|
|
23
23
|
onCellEdit?: (props: CellChangeProps) => void;
|
|
24
24
|
onColumnOrderChange?: (newHeaders: HeaderObject[]) => void;
|
|
25
|
+
onNextPage?: (page: number) => void;
|
|
26
|
+
onPreviousPage?: (page: number) => void;
|
|
25
27
|
prevIcon?: ReactNode;
|
|
26
28
|
rows: Row[];
|
|
27
29
|
rowsPerPage?: number;
|
|
@@ -31,31 +33,7 @@ interface SimpleTableProps {
|
|
|
31
33
|
sortDownIcon?: ReactNode;
|
|
32
34
|
sortUpIcon?: ReactNode;
|
|
33
35
|
theme?: Theme;
|
|
36
|
+
totalPages?: number;
|
|
34
37
|
}
|
|
35
|
-
declare const _default: import("react").MemoExoticComponent<{
|
|
36
|
-
({ allowAnimations, columnEditorPosition, columnEditorText, columnResizing, defaultHeaders, editColumns, editColumnsInitOpen, columnReordering, height, hideFooter, nextIcon, onCellEdit, onColumnOrderChange, prevIcon, rows, rowsPerPage, selectableCells, selectableColumns, shouldPaginate, sortDownIcon, sortUpIcon, theme, }: SimpleTableProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
defaultProps: {
|
|
38
|
-
allowAnimations: boolean;
|
|
39
|
-
columnEditorPosition: ColumnEditorPosition;
|
|
40
|
-
columnEditorText: string;
|
|
41
|
-
columnResizing: boolean;
|
|
42
|
-
defaultHeaders: never[];
|
|
43
|
-
editColumns: boolean;
|
|
44
|
-
editColumnsInitOpen: boolean;
|
|
45
|
-
columnReordering: boolean;
|
|
46
|
-
height: string;
|
|
47
|
-
hideFooter: boolean;
|
|
48
|
-
nextIcon: import("react/jsx-runtime").JSX.Element;
|
|
49
|
-
onCellEdit: () => void;
|
|
50
|
-
prevIcon: import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
rows: never[];
|
|
52
|
-
rowsPerPage: number;
|
|
53
|
-
selectableCells: boolean;
|
|
54
|
-
selectableColumns: boolean;
|
|
55
|
-
shouldPaginate: boolean;
|
|
56
|
-
sortDownIcon: import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
sortUpIcon: import("react/jsx-runtime").JSX.Element;
|
|
58
|
-
theme: string;
|
|
59
|
-
};
|
|
60
|
-
}>;
|
|
38
|
+
declare const _default: import("react").MemoExoticComponent<({ allowAnimations, columnEditorPosition, columnEditorText, columnResizing, defaultHeaders, editColumns, editColumnsInitOpen, columnReordering, height, hideFooter, nextIcon, onCellEdit, onColumnOrderChange, onNextPage, onPreviousPage, prevIcon, rows, rowsPerPage, selectableCells, selectableColumns, shouldPaginate, sortDownIcon, sortUpIcon, theme, totalPages, }: SimpleTableProps) => import("react/jsx-runtime").JSX.Element>;
|
|
61
39
|
export default _default;
|
|
@@ -7,5 +7,5 @@ interface TableContentProps extends Omit<TableHeaderProps, OmittedTableProps>, O
|
|
|
7
7
|
pinnedLeftRef: RefObject<HTMLDivElement | null>;
|
|
8
8
|
pinnedRightRef: RefObject<HTMLDivElement | null>;
|
|
9
9
|
}
|
|
10
|
-
declare const TableContent: ({ allowAnimations, columnResizing, currentRows, columnReordering, draggedHeaderRef, editColumns, forceUpdate, getBorderClass, handleMouseDown, handleMouseOver, headersRef, hiddenColumns, hoveredHeaderRef, isSelected, isTopLeftCell, isWidthDragging, mainBodyRef, onCellEdit, onSort, onTableHeaderDragEnd, pinnedLeftRef, pinnedRightRef, scrollbarWidth, selectableColumns, setIsWidthDragging, setSelectedCells, shouldPaginate, sort, sortDownIcon, sortUpIcon, tableBodyContainerRef, }: TableContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const TableContent: ({ allowAnimations, columnResizing, currentRows, columnReordering, draggedHeaderRef, editColumns, forceUpdate, getBorderClass, handleMouseDown, handleMouseOver, headersRef, hiddenColumns, hoveredHeaderRef, isSelected, isTopLeftCell, isWidthDragging, mainBodyRef, onCellEdit, onColumnOrderChange, onSort, onTableHeaderDragEnd, pinnedLeftRef, pinnedRightRef, scrollbarWidth, selectableColumns, setIsWidthDragging, setSelectedCells, shouldPaginate, sort, sortDownIcon, sortUpIcon, tableBodyContainerRef, }: TableContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default TableContent;
|
|
@@ -4,10 +4,11 @@ interface TableFooterProps {
|
|
|
4
4
|
hideFooter?: boolean;
|
|
5
5
|
nextIcon?: ReactNode;
|
|
6
6
|
onPageChange: (page: number) => void;
|
|
7
|
+
onNextPage?: (page: number) => void;
|
|
8
|
+
onPreviousPage?: (page: number) => void;
|
|
7
9
|
prevIcon?: ReactNode;
|
|
8
|
-
rowsPerPage: number;
|
|
9
10
|
shouldPaginate?: boolean;
|
|
10
|
-
|
|
11
|
+
totalPages: number;
|
|
11
12
|
}
|
|
12
|
-
declare const TableFooter: ({ currentPage, hideFooter, nextIcon, onPageChange,
|
|
13
|
+
declare const TableFooter: ({ currentPage, hideFooter, nextIcon, onPageChange, onNextPage, onPreviousPage, prevIcon, shouldPaginate, totalPages, }: TableFooterProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
14
|
export default TableFooter;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import TableHeaderProps from "../../types/TableHeaderProps";
|
|
2
|
-
declare const TableHeader: ({ allowAnimations, centerHeaderRef, columnResizing, currentRows, columnReordering, draggedHeaderRef, forceUpdate, headerContainerRef, headersRef, hiddenColumns, hoveredHeaderRef, isWidthDragging, mainBodyRef, mainTemplateColumns, onSort, onTableHeaderDragEnd, pinnedLeftColumns, pinnedLeftHeaderRef, pinnedLeftTemplateColumns, pinnedRightColumns, pinnedRightHeaderRef, pinnedRightTemplateColumns, selectableColumns, setIsWidthDragging, setSelectedCells, sort, sortDownIcon, sortUpIcon, }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TableHeader: ({ allowAnimations, centerHeaderRef, columnResizing, currentRows, columnReordering, draggedHeaderRef, forceUpdate, headerContainerRef, headersRef, hiddenColumns, hoveredHeaderRef, isWidthDragging, mainBodyRef, mainTemplateColumns, onColumnOrderChange, onSort, onTableHeaderDragEnd, pinnedLeftColumns, pinnedLeftHeaderRef, pinnedLeftTemplateColumns, pinnedRightColumns, pinnedRightHeaderRef, pinnedRightTemplateColumns, selectableColumns, setIsWidthDragging, setSelectedCells, sort, sortDownIcon, sortUpIcon, }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TableHeader;
|
|
@@ -12,9 +12,11 @@ interface TableHeaderCellProps {
|
|
|
12
12
|
headersRef: RefObject<HeaderObject[]>;
|
|
13
13
|
hoveredHeaderRef: RefObject<HeaderObject | null>;
|
|
14
14
|
index: number;
|
|
15
|
+
onColumnOrderChange?: (newHeaders: HeaderObject[]) => void;
|
|
15
16
|
onSort: OnSortProps;
|
|
16
17
|
onTableHeaderDragEnd: (newHeaders: HeaderObject[]) => void;
|
|
17
18
|
reverse?: boolean;
|
|
19
|
+
rowHeight: number;
|
|
18
20
|
selectableColumns: boolean;
|
|
19
21
|
setIsWidthDragging: Dispatch<SetStateAction<boolean>>;
|
|
20
22
|
setSelectedCells: Dispatch<React.SetStateAction<Set<string>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DragEvent } from "react";
|
|
2
2
|
import HeaderObject from "../types/HeaderObject";
|
|
3
3
|
import DragHandlerProps from "../types/DragHandlerProps";
|
|
4
|
-
declare const useDragHandler: ({ draggedHeaderRef, headersRef, hoveredHeaderRef, onTableHeaderDragEnd, }: DragHandlerProps) => {
|
|
4
|
+
declare const useDragHandler: ({ draggedHeaderRef, headersRef, hoveredHeaderRef, onColumnOrderChange, onTableHeaderDragEnd, }: DragHandlerProps) => {
|
|
5
5
|
handleDragStart: (header: HeaderObject) => void;
|
|
6
6
|
handleDragOver: ({ event, hoveredHeader, }: {
|
|
7
7
|
event: DragEvent<HTMLDivElement>;
|
package/dist/index.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as n,Fragment as r}from"react/jsx-runtime";import{useState as t,useRef as o,useCallback as i,useEffect as a,useMemo as l,forwardRef as c,useLayoutEffect as s,createElement as d,createRef as u,memo as f,useReducer as h}from"react";var v=function(){return v=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},v.apply(this,arguments)};function g(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 m(e,n,r,t){return new(r||(r=Promise))((function(o,i){function a(e){try{c(t.next(e))}catch(e){i(e)}}function l(e){try{c(t.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,l)}c((t=t.apply(e,n||[])).next())}))}function p(e,n){var r,t,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,t&&(o=2&l[0]?t.return:l[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;switch(t=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,t=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(e,i)}catch(e){l=[6,e],t=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function w(e,n,r){if(r||2===arguments.length)for(var t,o=0,i=n.length;o<i;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"==typeof SuppressedError&&SuppressedError;var R,b=function(r){var t=r.currentPage,o=r.hideFooter,i=r.nextIcon,a=r.onPageChange,l=r.prevIcon,c=r.rowsPerPage,s=r.shouldPaginate,d=r.totalRows,u=Math.ceil(d/c),f=t>1,h=t<u,g=function(e){e>=1&&e<=u&&a(e)};return o||!s?null:e("div",v({className:"st-footer"},{children:[n("button",v({className:"st-next-prev-btn ".concat(f?"":"disabled"),onClick:function(){return g(t-1)},disabled:!f},{children:l})),n("button",v({className:"st-next-prev-btn ".concat(h?"":"disabled"),onClick:function(){return g(t+1)},disabled:!h},{children:i})),Array.from({length:u},(function(e,r){return n("button",v({onClick:function(){return g(r+1)},className:"st-page-btn ".concat(t===r+1?"active":"")},{children:r+1}),r)}))]}))},C=function(e){var r=e.className;return n("svg",v({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},y=function(e){var r=e.className;return n("svg",v({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},x=function(e){var r=e.className;return n("svg",v({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},H=function(e){var r=e.className;return n("svg",v({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},I=function(e){return e.position*(e.rowHeight+1)-1},M=function(e){return e.position*(e.rowHeight+1)},D=function(e){var n=e.accessor,r=e.rowIndex;return"cell-".concat(n,"-").concat(r)},E=function(e){var n=e.hiddenColumns,r=e.header,t=e.pinned;return n[r.accessor]?null:!t&&!r.pinned||r.pinned===t||null},S=function(r){var t=r.value,o=r.onBlur,i=r.onChange;return e("select",v({value:t.toString(),onBlur:o,onChange:function(e){var n=e.target.value;i("true"===n)}},{children:[n("option",v({value:"true"},{children:"True"})),n("option",v({value:"false"},{children:"False"}))]}))},N=function(e){var r=e.defaultValue,t=e.onBlur,i=e.onChange,a=o(null);return n("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:t,onChange:function(e){var n=e.target.value;i(n)}})},k=function(e){var r=e.defaultValue,t=e.onBlur,i=e.onChange,a=o(null);return n("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:t,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},L=function(e){var t=e.onChange,o=e.setIsEditing,i=e.value,a=function(e){null==t||t(e)},l=function(){o(!1)};return n(r,{children:"string"==typeof i||null==i?n(N,{defaultValue:i,onBlur:l,onChange:a}):"boolean"==typeof i?n(S,{onBlur:l,onChange:a,value:i}):"number"==typeof i?n(k,{defaultValue:i,onBlur:l,onChange:a}):null})},T=0,B=function(){return function(e){var n=e.callback,r=e.callbackProps,t=e.limit,o=Date.now();(0===T||o-T>=t)&&(T=o,n(r))}},O=Date.now(),W={screenX:0,screenY:0},A=function(e){var n,r,t=e.draggedHeaderRef,i=e.headersRef,l=e.hoveredHeaderRef,c=e.onTableHeaderDragEnd,s=(n=i.current,r=o(n),a((function(){r.current=n}),[n]),r.current);return{handleDragStart:function(e){t.current=e,O=Date.now()},handleDragOver:function(e){var n,r=e.event,o=e.hoveredHeader;if(r.preventDefault(),i.current){var a=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),d=r.screenX,u=r.screenY,f=Math.sqrt(Math.pow(d-W.screenX,2)+Math.pow(u-W.screenY,2));l.current=o;var h=w([],i.current,!0),v=h.findIndex((function(e){var n;return e.accessor===(null===(n=t.current)||void 0===n?void 0:n.accessor)})),g=h.findIndex((function(e){return e.accessor===o.accessor})),m=h.splice(v,1)[0];if(h.splice(g,0,m),!(a||o.accessor===(null===(n=t.current)||void 0===n?void 0:n.accessor)||null===t.current||f<10||void 0===v||void 0===g||JSON.stringify(h)===JSON.stringify(i.current))){var p=Date.now();JSON.stringify(h)===JSON.stringify(s)&&p-O<800&&f<50||(O=p,W={screenX:d,screenY:u},c(h))}}},handleDragEnd:function(){t.current=null,l.current=null}}},P=c((function(r,o){var i,l,c=r.borderClass,s=r.colIndex,d=r.draggedHeaderRef,u=r.header,f=r.headersRef,h=r.hoveredHeaderRef,g=r.isSelected,m=r.isTopLeftCell,p=r.onCellEdit,w=r.onExpandRowClick,R=r.onMouseDown,b=r.onMouseOver,C=r.onTableHeaderDragEnd,x=r.rowIndex,I=r.visibleRow,M=I.depth,E=I.row,S=t(E.rowData[u.accessor]),N=S[0],k=S[1],T=t(!1),O=T[0],W=T[1],P=A({draggedHeaderRef:d,headersRef:f,hoveredHeaderRef:h,onTableHeaderDragEnd:C}).handleDragOver,z=B(),U=Boolean(null===(l=null===(i=E.rowMeta)||void 0===i?void 0:i.children)||void 0===l?void 0:l.length),j=Boolean(null==u?void 0:u.isEditable),F=x%2==0,V="st-cell ".concat(M>0&&u.expandable?"st-cell-depth-".concat(M):""," ").concat(g?m?"st-cell-selected-first-cell ".concat(c):"st-cell-selected ".concat(c):""," ").concat(F?"st-cell-odd-row":"st-cell-even-row"," ").concat(j?"clickable":""," ").concat("right"===u.align?"right-aligned":"center"===u.align?"center-aligned":"left-aligned");return a((function(){k(E.rowData[u.accessor])}),[u.accessor,E]),O?n("div",v({className:"st-cell-editing ".concat(F?"st-cell-odd-row":"st-cell-even-row"),id:D({accessor:u.accessor,rowIndex:x+1})},{children:n(L,{onChange:function(e){k(e),null==p||p({accessor:u.accessor,newValue:e,row:E})},setIsEditing:W,value:N})})):e("div",v({className:V,id:D({accessor:u.accessor,rowIndex:x+1}),onDoubleClick:function(){return u.isEditable&&W(!0)},onMouseDown:function(){return R(x,s)},onMouseOver:function(){return b(x,s)},onDragOver:function(e){return z({callback:P,callbackProps:{event:e,hoveredHeader:u},limit:50})},ref:o},{children:[u.expandable&&U?E.rowMeta.isExpanded?n("div",v({className:"st-sort-icon-container",onClick:function(){return w(E.rowMeta.rowId)}},{children:n(H,{className:"st-sort-icon"})})):n("div",v({className:"st-sort-icon-container",onClick:function(){return w(E.rowMeta.rowId)}},{children:n(y,{className:"st-sort-icon"})})):null,n("span",v({className:"st-cell-content"},{children:u.cellRenderer?u.cellRenderer({accessor:u.accessor,colIndex:s,row:E}):N}))]}))})),z=function(e){var t=e.allowAnimations,o=e.children,i=g(e,["allowAnimations","children"]);return t?n(U,v({},i,{children:o})):n(r,{children:o})},U=function(e){var i=e.allowHorizontalAnimate,l=void 0===i||i,c=e.children,d=e.draggedHeaderRef,u=e.headersRef,f=e.isBody,h=e.mainBodyRef,v=e.pauseAnimation,g=e.rowIndex,m=o(!1),p=t({}),w=p[0],R=p[1],b=o({}),C=u.current;return s((function(){if(C){var e=function(e){var n=e.currentHeaders,r=e.draggedHeaderRef,t=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(D({accessor:e.accessor,rowIndex:t}));if(i){var a=i.getAnimations().some((function(e){return"running"===e.playState})),l=i.getBoundingClientRect();a&&(null===(n=null==r?void 0:r.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=l}}})),o}({currentHeaders:C,draggedHeaderRef:d,rowIndex:g});JSON.stringify(e)!==JSON.stringify(w)&&(b.current=w,R(e))}}),[w,C,d,f,g]),s((function(){var e=h.current,n=function(){m.current=!0},r=function(){m.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",r),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",r)}}),[d,h]),a((function(){v||m.current||Object.keys(b.current).length&&C&&C.forEach((function(e){var n=document.getElementById(D({accessor:e.accessor,rowIndex:g}));if(n){var r=b.current[e.accessor],t=w[e.accessor];if(r&&t){var o=r.left-t.left,i=l?0:r.top-t.top,a=Math.abs(o),c=Math.abs(i);(a>10||c>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(o,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[l,w,C,f,v,b,g]),n(r,{children:c})},j=function(e){var r=e.getBorderClass,t=e.handleMouseDown,o=e.handleMouseOver,i=e.headers,a=e.hiddenColumns,l=e.isSelected,c=e.isTopLeftCell,s=e.onExpandRowClick,u=e.pinned,f=e.rowIndex,h=e.visibleRow,m=g(e,["getBorderClass","handleMouseDown","handleMouseOver","headers","hiddenColumns","isSelected","isTopLeftCell","onExpandRowClick","pinned","rowIndex","visibleRow"]);return n(z,v({allowAnimations:m.allowAnimations,allowHorizontalAnimate:m.shouldPaginate,draggedHeaderRef:m.draggedHeaderRef,headersRef:m.headersRef,isBody:!0,mainBodyRef:m.mainBodyRef,pauseAnimation:m.isWidthDragging,rowIndex:f+1},{children:i.map((function(e,n){return E({hiddenColumns:a,header:e,pinned:u})?d(P,v({},m,{borderClass:r(f,n),colIndex:n,header:e,isSelected:l(f,n),isTopLeftCell:c(f,n),key:D({accessor:e.accessor,rowIndex:f+1}),onExpandRowClick:s,onMouseDown:function(){return t({rowIndex:f,colIndex:n})},onMouseOver:function(){return o(f,n)},rowIndex:f,visibleRow:h})):null}))}))},F=function(e){var r=e.getNextRowIndex,t=e.gridTemplateColumns,o=e.index,i=e.pinned,a=e.props,l=e.rowHeight,c=e.visibleRow,s=c.position,d=r();return n("div",v({className:"st-table-row",style:{gridTemplateColumns:t,top:M({position:s,rowHeight:l}),height:"".concat(l,"px")}},{children:n(j,v({pinned:i,rowIndex:d,visibleRow:c},a),o)}))},V=function(e){var r=e.lastGroupRow,t=e.position,o=e.rowHeight,i=e.templateColumns;return n("div",v({className:"st-row-separator ".concat(r?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:i,position:"absolute",top:I({position:t,rowHeight:o}),minWidth:"100%"}},{children:n("div",{style:{gridColumn:"1 / -1"}})}))},J=function(t){t.headerContainerRef;var i=t.onExpandRowClick,l=t.pinned,c=t.rowHeight,s=t.sectionRef,d=t.templateColumns,u=t.totalHeight,f=t.visibleRows,h=t.width,m=g(t,["headerContainerRef","onExpandRowClick","pinned","rowHeight","sectionRef","templateColumns","totalHeight","visibleRows","width"]),p=l?"st-table-body-pinned-".concat(l):"st-table-body-main",w=o(0);a((function(){w.current=0}));var R=function(){return w.current++};return n("div",v({className:p,ref:s,style:{position:"relative",height:"".concat(u,"px"),width:h}},{children:f.map((function(t,o){var a,s,u=Boolean(null===(s=null===(a=t.row.rowMeta)||void 0===a?void 0:a.children)||void 0===s?void 0:s.length);return e(r,{children:[n(F,{getNextRowIndex:R,gridTemplateColumns:d,index:o,pinned:l,props:v(v({},m),{onExpandRowClick:i}),rowHeight:c,visibleRow:t},o),0!==o&&n(V,{lastGroupRow:u,position:t.position,rowHeight:c,templateColumns:d})]})}))}))},X=function(r){var c,s,d,u,f,h=r.centerHeaderRef,g=r.currentRows,R=r.headerContainerRef,b=r.mainBodyRef,C=r.mainTemplateColumns,y=r.pinnedLeftColumns,x=r.pinnedLeftHeaderRef,H=r.pinnedLeftRef,I=r.pinnedLeftTemplateColumns,M=r.pinnedRightColumns,D=r.pinnedRightHeaderRef,E=r.pinnedRightRef,S=r.pinnedRightTemplateColumns,N=r.scrollbarWidth,k=r.tableBodyContainerRef;!function(e){var n=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=t(!1),l=i[0],c=i[1];a((function(){var e=null==n?void 0:n.current;if(l&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[n,l,o]),a((function(){var e=null==n?void 0:n.current,t=null==r?void 0:r.current;if(t&&e){var o=function(){if(t){var e=t.scrollHeight>t.clientHeight;c(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(t),function(){t&&i.unobserve(t)}}}),[n,r])}({headerContainerRef:R,mainSectionRef:k,scrollbarWidth:N});var L=o(null),T=o(null),B=t(g),O=B[0],W=B[1],A=t(1),P=A[0],z=A[1],U=t(!1),j=U[0],F=U[1],V=t(!0),X=V[0],q=V[1],G=t(0),Y=G[0],K=G[1],$=function(e){var n=0,r=function(e){e.forEach((function(e){n+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&r(e.rowMeta.children)}))};return r(e),n}(O),Q=41*$-1,Z=function(e){var n=function(r){return r.rowMeta.rowId===e&&r.rowMeta.children?v(v({},r),{rowMeta:v(v({},r.rowMeta),{isExpanded:!r.rowMeta.isExpanded})}):r.rowMeta.children?v(v({},r),{rowMeta:v(v({},r.rowMeta),{children:r.rowMeta.children.map(n)})}):r};W((function(e){return e.map(n)}))},_=l((function(){return function(e){var n=e.bufferRowCount,r=e.containerHeight,t=e.rowHeight,o=e.rows,i=e.scrollTop,a=[],l=0,c=Math.max(0,i-t*n),s=i+r+t*n,d=function(e,n){for(var r,o=0,i=e;o<i.length;o++){var u=i[o],f=l*t;if(f>=s)break;f+t>c&&a.push({row:u,depth:n,position:l,isLastGroupRow:Boolean(null===(r=u.rowMeta.children)||void 0===r?void 0:r.length)&&n>1}),l+=1,u.rowMeta.isExpanded&&u.rowMeta.children&&d(u.rowMeta.children,n+1)}};return d(o,0),a}({bufferRowCount:5,containerHeight:600,rowHeight:40,rows:O,scrollTop:Y})}),[O,Y]),ee=i((function(){return m(void 0,void 0,void 0,(function(){var e;return p(this,(function(n){return j||!X||(F(!0),e=g.slice(20*P,20*(P+1)),W((function(n){return w(w([],n,!0),e,!0)})),z((function(e){return e+1})),F(!1),e.length<20/3&&q(!1)),[2]}))}))}),[g,X,j,P]),ne=i((function(e){e[0].isIntersecting&&X&&!j&&ee()}),[X,j,ee]);a((function(){return L.current=new IntersectionObserver(ne,{root:null,rootMargin:"100px",threshold:0}),k.current&&L.current.observe(k.current),function(){L.current&&L.current.disconnect()}}),[ne,O,k]);var re=(null===(c=x.current)||void 0===c?void 0:c.clientWidth)?(null===(s=x.current)||void 0===s?void 0:s.clientWidth)+1:0,te=null===(d=h.current)||void 0===d?void 0:d.clientWidth,oe=(null===(u=D.current)||void 0===u?void 0:u.clientWidth)?(null===(f=D.current)||void 0===f?void 0:f.clientWidth)+1:0;return e("div",v({className:"st-table-body-container",ref:k,onScroll:function(e){var n=e.currentTarget.scrollTop;T.current&&cancelAnimationFrame(T.current),T.current=requestAnimationFrame((function(){K(n)}))}},{children:[y.length>0&&n(J,v({},r,{onExpandRowClick:Z,pinned:"left",rowHeight:40,sectionRef:H,templateColumns:I,totalHeight:Q,visibleRows:_,width:re})),n(J,v({},r,{onExpandRowClick:Z,rowHeight:40,sectionRef:b,templateColumns:C,totalHeight:Q,visibleRows:_,width:te})),M.length>0&&n(J,v({},r,{onExpandRowClick:Z,pinned:"right",rowHeight:40,sectionRef:E,templateColumns:S,totalHeight:Q,visibleRows:_,width:oe}))]}))},q={string:function(e,n,r){if(e===n)return 0;var t=e.localeCompare(n);return"ascending"===r?t:-t},number:function(e,n,r){if(e===n)return 0;var t=e-n;return"ascending"===r?t:-t},boolean:function(e,n,r){if(e===n)return 0;var t=e===n?0:e?-1:1;return"ascending"===r?t:-t},date:function(e,n,r){var t=new Date(e),o=new Date(n);if(t.getTime()===o.getTime())return 0;var i=t.getTime()-o.getTime();return"ascending"===r?i:-i},enum:function(e,n,r){return q.string(e,n,r)},default:function(e,n,r){return e===n?0:null==e?"ascending"===r?-1:1:null==n?"ascending"===r?1:-1:"string"==typeof e&&"string"==typeof n?q.string(e,n,r):"number"==typeof e&&"number"==typeof n?q.number(e,n,r):"boolean"==typeof e&&"boolean"==typeof n?q.boolean(e,n,r):q.string(String(e),String(n),r)}},G=function(e,n,r,t){switch(void 0===r&&(r="string"),r){case"string":return q.string(String(e||""),String(n||""),t);case"number":return q.number(Number(e||0),Number(n||0),t);case"boolean":return q.boolean(Boolean(e),Boolean(n),t);case"date":return q.date(String(e||""),String(n||""),t);case"enum":return q.enum(String(e||""),String(n||""),t);default:return q.default(e,n,t)}},Y=function(e,n,r){var t=r.find((function(e){return e.accessor===n.key.accessor})),o=(null==t?void 0:t.type)||"string",i=n.direction;return w([],e,!0).sort((function(e,r){var t,a,l=null===(t=null==e?void 0:e.rowData)||void 0===t?void 0:t[n.key.accessor],c=null===(a=null==r?void 0:r.rowData)||void 0===a?void 0:a[n.key.accessor];return G(l,c,o,i)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?v(v({},e),{rowMeta:v(v({},e.rowMeta),{children:Y(e.rowMeta.children,n,r)})}):e}))},K=function(e,n,r){var t=function(e,n,r){var t=r.find((function(e){return e.accessor===n.key.accessor})),o=(null==t?void 0:t.type)||"string",i=n.direction,a=[],l=new Map;return e.forEach((function(n){e.some((function(e){var r;return null===(r=e.rowMeta.children)||void 0===r?void 0:r.some((function(e){return e.rowMeta.rowId===n.rowMeta.rowId}))}))||a.push(n),n.rowMeta.children&&n.rowMeta.children.length>0&&l.set(n.rowMeta.rowId,n.rowMeta.children)})),w([],a,!0).sort((function(e,r){var t,a,l=null===(t=null==e?void 0:e.rowData)||void 0===t?void 0:t[n.key.accessor],c=null===(a=null==r?void 0:r.rowData)||void 0===a?void 0:a[n.key.accessor];return G(l,c,o,i)})).map((function(e){var t=v({},e);if(l.has(e.rowMeta.rowId)){var o=l.get(e.rowMeta.rowId)||[],i=Y(o,n,r);t.rowMeta=v(v({},t.rowMeta),{children:i})}return t}))}(n,r,e);return{sortedData:t,newSortConfig:r}},$=function(e){var n=e.event,r=e.forceUpdate,t=e.header,o=e.headersRef,i=e.index;e.reverse;var a=e.setIsWidthDragging,l=e.startWidth;a(!0),n.preventDefault();var c=n.clientX;if(t){var s=function(e){var n=Math.max(l+(e.clientX-c),40);t&&o.current&&(o.current[i].width=n,r())},d=function(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),a(!1)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",d)}},Q=c((function(r,o){var i,l=r.columnResizing,c=r.currentRows,s=r.columnReordering,d=r.draggedHeaderRef,u=r.forceUpdate,f=r.headersRef,h=r.hoveredHeaderRef,g=r.index,m=r.onSort,p=r.onTableHeaderDragEnd,w=r.reverse,R=r.selectableColumns,b=r.setIsWidthDragging,C=r.setSelectedCells,y=r.sort,x=r.sortDownIcon,H=r.sortUpIcon,I=t(!1),M=I[0],E=I[1],S=null===(i=f.current)||void 0===i?void 0:i[g],N=Boolean(null==S?void 0:S.isSortable),k="st-header-cell ".concat(S===h.current?"st-hovered":""," ").concat(M?"st-dragging":""," ").concat(N?"clickable":""," ").concat(s&&!N?"columnReordering":""," ").concat("right"===(null==S?void 0:S.align)?"right-aligned":"center"===(null==S?void 0:S.align)?"center-aligned":""),L=A({draggedHeaderRef:d,headersRef:f,hoveredHeaderRef:h,onTableHeaderDragEnd:p}),T=L.handleDragStart,O=L.handleDragEnd,W=A({draggedHeaderRef:d,headersRef:f,hoveredHeaderRef:h,onTableHeaderDragEnd:p}).handleDragOver,P=B(),z=function(e){var n=e.event,r=e.header;if(R){var t=c.length,o=Array.from({length:t},(function(e,n){return"".concat(n,"-").concat(g)})),i=function(e,n){var r=new Set,o=Math.min(e,n),i=Math.max(e,n);return Array.from({length:t}).forEach((function(e,n){Array.from({length:i-o+1}).forEach((function(e,t){r.add("".concat(n,"-").concat(o+t))}))})),r};n.shiftKey?C((function(e){var n,r=Number(null===(n=Array.from(e)[0])||void 0===n?void 0:n.split("-")[1]),t=Number(o[0].split("-")[1]);return r===t?new Set(o):r>t?i(t,r):i(r,t)})):C(new Set(o))}else r.isSortable&&m(g,r.accessor)};if(a((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!S)return null;var U=l&&n("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;P({callback:$,callbackProps:{event:e,forceUpdate:u,header:S,headersRef:f,index:g,setIsWidthDragging:b,startWidth:"object"==typeof o&&null!==o&&"current"in o?null===(n=o.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}});return e("div",v({className:k,id:D({accessor:S.accessor,rowIndex:0}),onDragOver:function(e){P({callback:W,callbackProps:{event:e,hoveredHeader:S},limit:50})},ref:o,style:{width:S.width}},{children:[w&&U,n("div",v({className:"st-header-label",draggable:s,onClick:function(e){return z({event:e,header:S})},onDragEnd:function(e){e.preventDefault(),E(!1),O()},onDragStart:function(e){s&&S&&function(e){E(!0),T(e)}(S)}},{children:null==S?void 0:S.label})),y&&y.key.accessor===S.accessor&&e("div",v({className:"st-sort-icon-container",onClick:function(e){return z({event:e,header:S})}},{children:["ascending"===y.direction&&H&&H,"descending"===y.direction&&x&&x]})),!w&&U]}))})),Z=function(e,n){a((function(){if(e.current){var r=e.current,t=function(){var e,t=null==r?void 0:r.scrollLeft;void 0!==t&&(null===(e=n.current)||void 0===e||e.scrollTo(t,0))};return r.addEventListener("scroll",t),function(){null==r||r.removeEventListener("scroll",t)}}}),[e,n])},_=function(r){var t,o,i,a=r.allowAnimations,l=r.centerHeaderRef,c=r.columnResizing,s=r.currentRows,d=r.columnReordering,f=r.draggedHeaderRef,h=r.forceUpdate,g=r.headerContainerRef,m=r.headersRef,p=r.hiddenColumns,w=r.hoveredHeaderRef,R=r.isWidthDragging,b=r.mainBodyRef,C=r.mainTemplateColumns,y=r.onSort,x=r.onTableHeaderDragEnd,H=r.pinnedLeftColumns,I=r.pinnedLeftHeaderRef,M=r.pinnedLeftTemplateColumns,D=r.pinnedRightColumns,S=r.pinnedRightHeaderRef,N=r.pinnedRightTemplateColumns,k=r.selectableColumns,L=r.setIsWidthDragging,T=r.setSelectedCells,B=r.sort,O=r.sortDownIcon,W=r.sortUpIcon;Z(b,l);return e("div",v({className:"st-header-container",ref:g},{children:[H.length>0&&n("div",v({className:"st-header-pinned-left",ref:I,style:{gridTemplateColumns:M}},{children:n(z,v({allowAnimations:a,draggedHeaderRef:f,headersRef:m,mainBodyRef:b,pauseAnimation:R,rowIndex:0},{children:null===(t=m.current)||void 0===t?void 0:t.map((function(e,r){return E({hiddenColumns:p,header:e,pinned:"left"})?n(Q,{columnResizing:c,currentRows:s,columnReordering:d,draggedHeaderRef:f,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onSort:y,onTableHeaderDragEnd:x,ref:u(),selectableColumns:k,setIsWidthDragging:L,setSelectedCells:T,sort:B,sortDownIcon:O,sortUpIcon:W},e.accessor):null}))}))})),n("div",v({className:"st-header-main",onScroll:function(e){var n,r,t=null===(n=l.current)||void 0===n?void 0:n.scrollLeft;void 0!==t&&(null===(r=b.current)||void 0===r||r.scrollTo(t,0))},ref:l,style:{gridTemplateColumns:C}},{children:n(z,v({allowAnimations:a,draggedHeaderRef:f,headersRef:m,mainBodyRef:b,pauseAnimation:R,rowIndex:0},{children:null===(o=m.current)||void 0===o?void 0:o.map((function(e,r){return E({hiddenColumns:p,header:e})?n(Q,{columnResizing:c,currentRows:s,columnReordering:d,draggedHeaderRef:f,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onSort:y,onTableHeaderDragEnd:x,ref:u(),selectableColumns:k,setIsWidthDragging:L,setSelectedCells:T,sort:B,sortDownIcon:O,sortUpIcon:W},e.accessor):null}))}))})),D.length>0&&n("div",v({className:"st-header-pinned-right",ref:S,style:{gridTemplateColumns:N}},{children:n(z,v({allowAnimations:a,draggedHeaderRef:f,headersRef:m,mainBodyRef:b,pauseAnimation:R,rowIndex:0},{children:null===(i=m.current)||void 0===i?void 0:i.map((function(e,r){return E({hiddenColumns:p,header:e,pinned:"right"})?n(Q,{columnResizing:c,currentRows:s,columnReordering:d,draggedHeaderRef:f,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onSort:y,onTableHeaderDragEnd:x,reverse:!0,ref:u(),selectableColumns:k,setIsWidthDragging:L,setSelectedCells:T,sort:B,sortDownIcon:O,sortUpIcon:W},e.accessor):null}))}))}))]}))},ee=function(e){var n=e.minWidth,r=e.width;return"number"==typeof r&&(r="".concat(r,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"minmax(".concat(n,", ").concat(r,")"):r},ne=function(r){var t=r.allowAnimations,i=r.columnResizing,a=r.currentRows,c=r.columnReordering,s=r.draggedHeaderRef,d=r.editColumns,u=r.forceUpdate,f=r.getBorderClass,h=r.handleMouseDown,g=r.handleMouseOver,m=r.headersRef,p=r.hiddenColumns,w=r.hoveredHeaderRef,R=r.isSelected,b=r.isTopLeftCell,C=r.isWidthDragging,y=r.mainBodyRef,x=r.onCellEdit,H=r.onSort,I=r.onTableHeaderDragEnd,M=r.pinnedLeftRef,D=r.pinnedRightRef,E=r.scrollbarWidth,S=r.selectableColumns,N=r.setIsWidthDragging,k=r.setSelectedCells,L=r.shouldPaginate,T=r.sort,B=r.sortDownIcon,O=r.sortUpIcon,W=r.tableBodyContainerRef,A=o(null),P=o(null),z=o(null),U=o(null),j=m.current.filter((function(e){return!e.hide&&!e.pinned})),F=m.current.filter((function(e){return"left"===e.pinned&&!0!==e.hide})),V=m.current.filter((function(e){return"right"===e.pinned&&!0!==e.hide})),J=l((function(){return"".concat(F.map((function(e){return ee(e)})).join(" "))}),[F]),q=l((function(){return"".concat(j.filter((function(e){return!0!==p[e.accessor]})).map((function(e){return ee(e)})).join(" "))}),[j,p]),G=l((function(){return"".concat(V.map((function(e){return ee(e)})).join(" "))}),[V]),Y={allowAnimations:t,centerHeaderRef:z,columnResizing:i,currentRows:a,columnReordering:c,draggedHeaderRef:s,forceUpdate:u,headerContainerRef:A,headersRef:m,hiddenColumns:p,hoveredHeaderRef:w,isWidthDragging:C,mainBodyRef:y,mainTemplateColumns:q,onSort:H,onTableHeaderDragEnd:I,pinnedLeftColumns:F,pinnedLeftHeaderRef:P,pinnedLeftTemplateColumns:J,pinnedRightColumns:V,pinnedRightHeaderRef:U,pinnedRightTemplateColumns:G,selectableColumns:S,setIsWidthDragging:N,setSelectedCells:k,sort:T,sortDownIcon:B,sortUpIcon:O,tableBodyContainerRef:W},K={allowAnimations:t,centerHeaderRef:z,currentRows:a,draggedHeaderRef:s,getBorderClass:f,handleMouseDown:h,handleMouseOver:g,headerContainerRef:A,headers:m.current,headersRef:m,hiddenColumns:p,hoveredHeaderRef:w,isSelected:R,isTopLeftCell:b,isWidthDragging:C,mainBodyRef:y,mainTemplateColumns:q,onCellEdit:x,onTableHeaderDragEnd:I,pinnedLeftColumns:F,pinnedLeftHeaderRef:P,pinnedLeftRef:M,pinnedLeftTemplateColumns:J,pinnedRightColumns:V,pinnedRightHeaderRef:U,pinnedRightRef:D,pinnedRightTemplateColumns:G,scrollbarWidth:E,shouldPaginate:L,tableBodyContainerRef:W};return e("div",v({className:"st-table-content",style:{width:d?"calc(100% - 27.5px)":"100%"}},{children:[n(_,v({},Y)),n(X,v({},K))]}))},re=function(e){var n=e.callback,r=e.ref,t=e.widthAttribute;a((function(){var e=r.current;if(e){var o=function(){n(e[t]||0)};o();var i=new ResizeObserver((function(){o()}));return i.observe(e),function(){return i.disconnect()}}}),[n,r,t])},te=function(r){var i=r.mainBodyRef,a=r.pinnedLeftRef,l=r.pinnedRightRef,c=r.tableContentWidth,s=t(0),d=s[0],u=s[1],f=t(0),h=f[0],g=f[1],m=t(0),p=m[0],w=m[1],R=o(null);return re({widthAttribute:"offsetWidth",callback:u,ref:a}),re({widthAttribute:"scrollWidth",callback:w,ref:i}),re({widthAttribute:"offsetWidth",callback:g,ref:l}),Z(i,R),!i.current||i.current.scrollWidth<=i.current.clientWidth?null:e("div",v({className:"st-horizontal-scrollbar-container",style:{width:c}},{children:[d>0&&n("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:d}}),p>0&&n("div",v({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&i.current&&i.current.scrollTo({left:n,behavior:"auto"})},ref:R},{children:n("div",{style:{width:p}})})),h>0&&n("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:h}})]}))},oe=function(r){var o=r.checked,i=void 0!==o&&o,a=r.children,l=r.onChange,c=t(i),s=c[0],d=c[1];return e("label",v({className:"st-checkbox-label"},{children:[n("input",{checked:s,className:"st-checkbox-input",onChange:function(){var e=!s;d(e),l&&l(e)},type:"checkbox"}),n("span",v({className:"st-checkbox-custom ".concat(s?"st-checked":"")},{children:s&&n("span",{className:"st-checkbox-checkmark"})})),a]}))},ie=function(e){var r=e.headers,t=e.open,o=e.position;e.setOpen;var i=e.setHiddenColumns,a=e.hiddenColumns,l="left"===o?"left":"";return n("div",v({className:"st-column-editor-popout ".concat(t?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:n("div",v({className:"st-column-editor-popout-content"},{children:r.map((function(e,r){return n(oe,v({checked:a[e.accessor],onChange:function(n){var r;return i(v(v({},a),((r={})[e.accessor]=n,r)))}},{children:e.label}),r)}))}))}))},ae=function(r){var o=r.columnEditorText,i=r.editColumns,a=r.editColumnsInitOpen,l=r.headers,c=r.position,s=void 0===c?"right":c,d=r.setHiddenColumns,u=r.hiddenColumns,f=t(a),h=f[0],g=f[1];return i?e("div",v({className:"st-column-editor ".concat(h?"open":""," ").concat(s),onClick:function(){return function(e){g(e)}(!h)}},{children:[n("div",v({className:"st-column-editor-text"},{children:o})),n(ie,{headers:l,open:h,position:s,setOpen:g,setHiddenColumns:d,hiddenColumns:u})]})):null};!function(e){e.Left="left",e.Right="right"}(R||(R={}));var le=function(r){var c=r.allowAnimations,d=void 0!==c&&c,u=r.columnEditorPosition,f=void 0===u?R.Right:u,g=r.columnEditorText,m=void 0===g?"Columns":g,p=r.columnResizing,w=void 0!==p&&p,I=r.defaultHeaders,M=r.editColumns,D=void 0!==M&&M,E=r.editColumnsInitOpen,S=void 0!==E&&E,N=r.columnReordering,k=void 0!==N&&N,L=r.height,T=r.hideFooter,B=void 0!==T&&T,O=r.nextIcon,W=void 0===O?n(y,{className:"st-next-prev-icon"}):O,A=r.onCellEdit,P=r.onColumnOrderChange,z=r.prevIcon,U=void 0===z?n(C,{className:"st-next-prev-icon"}):z,j=r.rows,F=r.rowsPerPage,V=void 0===F?10:F,J=r.selectableCells,X=void 0!==J&&J,q=r.selectableColumns,G=void 0!==q&&q,Y=r.shouldPaginate,$=void 0!==Y&&Y,Q=r.sortDownIcon,Z=void 0===Q?n(H,{className:"st-sort-icon"}):Q,_=r.sortUpIcon,ee=void 0===_?n(x,{className:"st-sort-icon"}):_,re=r.theme,oe=void 0===re?"light":re,ie=o(null),le=o(I),ce=o(null),se=o(null),de=o(null),ue=o(null),fe=o(null),he=t(!1),ve=he[0],ge=he[1],me=t(1),pe=me[0],we=me[1],Re=t(0),be=Re[0],Ce=Re[1],ye=t(0),xe=ye[0],He=ye[1],Ie=function(e){var n=e.headers,r=e.tableRows,o=t(null),i=o[0],a=o[1],c=l((function(){var e={};return n.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[n]),s=t(c),d=s[0],u=s[1],f=l((function(){return i?K(n,r,i).sortedData:r}),[r,i,n]);return{sort:i,setSort:a,updateSort:function(e,r){var t=n.find((function(e){return e.accessor===r}));t&&a((function(e){return e&&e.key.accessor===r?"ascending"===e.direction?{key:t,direction:"descending"}:null:{key:t,direction:"ascending"}}))},sortedRows:f,hiddenColumns:d,setHiddenColumns:u}}({headers:le.current,tableRows:j}),Me=Ie.sort,De=Ie.sortedRows,Ee=Ie.hiddenColumns,Se=Ie.setHiddenColumns,Ne=Ie.updateSort,ke=h((function(e){return e+1}),0)[1],Le=function(e){var n=e.selectableCells,r=e.headers,c=e.rows,s=t(new Set),d=s[0],u=s[1],f=o(!1),h=o(null),v=i((function(){var e=Array.from(d).reduce((function(e,n){var t=n.split("-").map(Number),o=t[0],i=t[1];return e[o]||(e[o]=[]),e[o][i]=c[o][r[i].accessor],e}),{}),n=Object.values(e).map((function(e){return Object.values(e).join("\t")})).join("\n");d.size>0&&navigator.clipboard.writeText(n)}),[d,c,r]);a((function(){var e=function(e){(e.ctrlKey||e.metaKey)&&"c"===e.key&&v()};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[v]);var g=i((function(e,n){return d.has("".concat(e,"-").concat(n))}),[d]),m=i((function(e,n){var r=[];return g(e-1,n)||r.push("st-selected-top-border"),g(e+1,n)||r.push("st-selected-bottom-border"),g(e,n-1)||r.push("st-selected-left-border"),g(e,n+1)||r.push("st-selected-right-border"),r.join(" ")}),[g]),p=l((function(){var e=Math.min.apply(Math,Array.from(d).map((function(e){return parseInt(e.split("-")[0])}))),n=Math.min.apply(Math,Array.from(d).map((function(e){return parseInt(e.split("-")[1])})));return function(r,t){return r===e&&t===n}}),[d]);return{selectedCells:d,handleMouseDown:function(e){var r=e.colIndex,t=e.rowIndex;n&&(f.current=!0,h.current={row:t,col:r},u(new Set(["".concat(t,"-").concat(r)])))},handleMouseOver:function(e,r){if(n&&f.current&&h.current){for(var t=new Set,o=Math.min(h.current.row,e),i=Math.max(h.current.row,e),a=Math.min(h.current.col,r),l=Math.max(h.current.col,r),c=o;c<=i;c++)for(var s=a;s<=l;s++)t.add("".concat(c,"-").concat(s));u(t)}},handleMouseUp:function(){f.current=!1,h.current=null},isSelected:g,getBorderClass:m,isTopLeftCell:p,setSelectedCells:u}}({selectableCells:X,headers:le.current,rows:De}),Te=Le.handleMouseDown,Be=Le.handleMouseOver,Oe=Le.handleMouseUp,We=Le.isSelected,Ae=Le.getBorderClass,Pe=Le.isTopLeftCell,ze=Le.setSelectedCells,Ue=l((function(){return $?De.slice((pe-1)*V,pe*V):De}),[pe,V,$,De]),je=i((function(e,n){Ne(e,n)}),[Ne]),Fe=i((function(e){le.current=e,ke(),null==P||P(e)}),[P]);return a((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||G&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||ze(new Set)};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[G,ze]),s((function(){if(fe.current){var e=fe.current.offsetWidth-fe.current.clientWidth,n=fe.current.clientWidth;Ce(e),He(n)}}),[]),s((function(){var e=function(){if(ke(),fe.current){var e=fe.current.offsetWidth-fe.current.clientWidth,n=fe.current.clientWidth;Ce(e),He(n)}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),e("div",v({className:"simple-table-root st-wrapper theme-".concat(oe),style:L?{height:L}:{}},{children:[e("div",v({className:"st-table-wrapper-container"},{children:[e("div",v({className:"st-table-wrapper",onMouseUp:Oe,onMouseLeave:Oe},{children:[n(ne,{allowAnimations:d,columnResizing:w,currentRows:Ue,draggedHeaderRef:ie,editColumns:D,columnReordering:k,forceUpdate:ke,getBorderClass:Ae,handleMouseDown:Te,handleMouseOver:Be,headers:le.current,headersRef:le,hiddenColumns:Ee,hoveredHeaderRef:ce,isSelected:We,isTopLeftCell:Pe,isWidthDragging:ve,mainBodyRef:se,onCellEdit:A,onSort:je,onTableHeaderDragEnd:Fe,pinnedLeftRef:de,pinnedRightRef:ue,scrollbarWidth:be,selectableColumns:G,setIsWidthDragging:ge,setSelectedCells:ze,shouldPaginate:$,sort:Me,sortDownIcon:Z,sortUpIcon:ee,tableBodyContainerRef:fe}),n(ae,{columnEditorText:m,editColumns:D,editColumnsInitOpen:S,headers:le.current,hiddenColumns:Ee,position:f,setHiddenColumns:Se})]})),n(te,{mainBodyRef:se,pinnedLeftRef:de,pinnedRightRef:ue,tableContentWidth:xe})]})),n(b,{currentPage:pe,hideFooter:B,nextIcon:W,onPageChange:we,prevIcon:U,rowsPerPage:V,shouldPaginate:$,totalRows:De.length})]}))};le.defaultProps={allowAnimations:!1,columnEditorPosition:R.Right,columnEditorText:"Columns",columnResizing:!1,defaultHeaders:[],editColumns:!1,editColumnsInitOpen:!1,columnReordering:!1,height:"",hideFooter:!1,nextIcon:n(y,{className:"st-next-prev-icon"}),onCellEdit:function(){},prevIcon:n(C,{className:"st-next-prev-icon"}),rows:[],rowsPerPage:10,selectableCells:!1,selectableColumns:!1,shouldPaginate:!1,sortDownIcon:n(H,{className:"st-sort-icon"}),sortUpIcon:n(x,{className:"st-sort-icon"}),theme:"light"};var ce=f(le);export{ce as SimpleTable};
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as r}from"react/jsx-runtime";import{useState as t,useRef as o,useCallback as i,useEffect as a,useMemo as l,forwardRef as c,useLayoutEffect as s,createElement as d,Fragment as u,createRef as f,memo as h,useReducer as v}from"react";var g=function(){return g=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},g.apply(this,arguments)};function m(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 p(e,n,r,t){return new(r||(r=Promise))((function(o,i){function a(e){try{c(t.next(e))}catch(e){i(e)}}function l(e){try{c(t.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,l)}c((t=t.apply(e,n||[])).next())}))}function w(e,n){var r,t,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,t&&(o=2&l[0]?t.return:l[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;switch(t=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,t=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(e,i)}catch(e){l=[6,e],t=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function R(e,n,r){if(r||2===arguments.length)for(var t,o=0,i=n.length;o<i;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"==typeof SuppressedError&&SuppressedError;var C,b=function(r){var t=r.currentPage,o=r.hideFooter,i=r.nextIcon,a=r.onPageChange,l=r.onNextPage,c=r.onPreviousPage,s=r.prevIcon,d=r.shouldPaginate,u=r.totalPages;if(o||!d)return null;var f=!(t>1)&&!c,h=!(t<u)&&!l;return e("div",g({className:"st-footer"},{children:[n("button",g({className:"st-next-prev-btn ".concat(f?"disabled":""),onClick:function(){var e=t-1;e>=1&&a(e),c&&c(e-1)},disabled:f},{children:s})),n("button",g({className:"st-next-prev-btn ".concat(h?"disabled":""),onClick:function(){var e=t+1;(e<=u||l)&&a(e),l&&l(t)},disabled:h},{children:i})),Array.from({length:u},(function(e,r){return n("button",g({onClick:function(){var e;(e=r+1)>=1&&e<=u&&(a(e),e>t&&l?l(e-1):e<t&&c&&c(e-1))},className:"st-page-btn ".concat(t===r+1?"active":"")},{children:r+1}),r)}))]}))},y=function(e){var r=e.className;return n("svg",g({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},x=function(e){var r=e.className;return n("svg",g({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},H=function(e){var r=e.className;return n("svg",g({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},M=function(e){var r=e.className;return n("svg",g({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:n("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},D=40,I=function(e){return e.position*(e.rowHeight+1)-1},E=function(e){return e.position*(e.rowHeight+1)},S=function(e){var n=e.accessor,r=e.rowIndex;return"cell-".concat(n,"-").concat(r)},k=function(e){var n=e.hiddenColumns,r=e.header,t=e.pinned;return n[r.accessor]?null:!t&&!r.pinned||r.pinned===t||null},N=function(r){var t=r.value,o=r.onBlur,i=r.onChange;return e("select",g({value:t.toString(),onBlur:o,onChange:function(e){var n=e.target.value;i("true"===n)}},{children:[n("option",g({value:"true"},{children:"True"})),n("option",g({value:"false"},{children:"False"}))]}))},L=function(e){var r=e.defaultValue,t=e.onBlur,i=e.onChange,a=o(null);return n("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:t,onChange:function(e){var n=e.target.value;i(n)}})},T=function(e){var r=e.defaultValue,t=e.onBlur,i=e.onChange,a=o(null);return n("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:t,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},O=function(e){var t=e.onChange,o=e.setIsEditing,i=e.value,a=function(e){null==t||t(e)},l=function(){o(!1)};return n(r,{children:"string"==typeof i||null==i?n(L,{defaultValue:i,onBlur:l,onChange:a}):"boolean"==typeof i?n(N,{onBlur:l,onChange:a,value:i}):"number"==typeof i?n(T,{defaultValue:i,onBlur:l,onChange:a}):null})},B=0,W=function(){return function(e){var n=e.callback,r=e.callbackProps,t=e.limit,o=Date.now();(0===B||o-B>=t)&&(B=o,n(r))}},A=Date.now(),P={screenX:0,screenY:0},z=function(e){var n,r,t=e.draggedHeaderRef,i=e.headersRef,l=e.hoveredHeaderRef,c=e.onColumnOrderChange,s=e.onTableHeaderDragEnd,d=(n=i.current,r=o(n),a((function(){r.current=n}),[n]),r.current);return{handleDragStart:function(e){t.current=e,A=Date.now()},handleDragOver:function(e){var n,r=e.event,o=e.hoveredHeader;if(r.preventDefault(),i.current){var a=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),c=r.screenX,u=r.screenY,f=Math.sqrt(Math.pow(c-P.screenX,2)+Math.pow(u-P.screenY,2));l.current=o;var h=R([],i.current,!0),v=h.findIndex((function(e){var n;return e.accessor===(null===(n=t.current)||void 0===n?void 0:n.accessor)})),g=h.findIndex((function(e){return e.accessor===o.accessor})),m=h.splice(v,1)[0];if(h.splice(g,0,m),!(a||o.accessor===(null===(n=t.current)||void 0===n?void 0:n.accessor)||null===t.current||f<10||void 0===v||void 0===g||JSON.stringify(h)===JSON.stringify(i.current))){var p=Date.now();JSON.stringify(h)===JSON.stringify(d)&&p-A<800&&f<50||(A=p,P={screenX:c,screenY:u},s(h))}}},handleDragEnd:function(){t.current=null,l.current=null,null==c||c(i.current)}}},U=c((function(r,o){var i,l,c=r.borderClass,s=r.colIndex,d=r.draggedHeaderRef,u=r.header,f=r.headersRef,h=r.hoveredHeaderRef,v=r.isSelected,m=r.isTopLeftCell,p=r.onCellEdit,w=r.onExpandRowClick,R=r.onMouseDown,C=r.onMouseOver,b=r.onTableHeaderDragEnd,y=r.rowIndex,H=r.visibleRow,D=H.depth,I=H.row,E=t(I.rowData[u.accessor]),k=E[0],N=E[1],L=t(!1),T=L[0],B=L[1],A=z({draggedHeaderRef:d,headersRef:f,hoveredHeaderRef:h,onTableHeaderDragEnd:b}).handleDragOver,P=W(),U=Boolean(null===(l=null===(i=I.rowMeta)||void 0===i?void 0:i.children)||void 0===l?void 0:l.length),j=Boolean(null==u?void 0:u.isEditable),F=y%2==0,V="st-cell ".concat(D>0&&u.expandable?"st-cell-depth-".concat(D):""," ").concat(v?m?"st-cell-selected-first-cell ".concat(c):"st-cell-selected ".concat(c):""," ").concat(F?"st-cell-odd-row":"st-cell-even-row"," ").concat(j?"clickable":""," ").concat("right"===u.align?"right-aligned":"center"===u.align?"center-aligned":"left-aligned");return a((function(){N(I.rowData[u.accessor])}),[u.accessor,I]),T?n("div",g({className:"st-cell-editing ".concat(F?"st-cell-odd-row":"st-cell-even-row"),id:S({accessor:u.accessor,rowIndex:y+1})},{children:n(O,{onChange:function(e){N(e),null==p||p({accessor:u.accessor,newValue:e,row:I})},setIsEditing:B,value:k})})):e("div",g({className:V,id:S({accessor:u.accessor,rowIndex:y+1}),onDoubleClick:function(){return u.isEditable&&B(!0)},onMouseDown:function(){return R(y,s)},onMouseOver:function(){return C(y,s)},onDragOver:function(e){return P({callback:A,callbackProps:{event:e,hoveredHeader:u},limit:50})},ref:o},{children:[u.expandable&&U?I.rowMeta.isExpanded?n("div",g({className:"st-sort-icon-container",onClick:function(){return w(I.rowMeta.rowId)}},{children:n(M,{className:"st-sort-icon"})})):n("div",g({className:"st-sort-icon-container",onClick:function(){return w(I.rowMeta.rowId)}},{children:n(x,{className:"st-sort-icon"})})):null,n("span",g({className:"st-cell-content"},{children:u.cellRenderer?u.cellRenderer({accessor:u.accessor,colIndex:s,row:I}):k}))]}))})),j=function(e){var t=e.allowAnimations,o=e.children,i=m(e,["allowAnimations","children"]);return t?n(F,g({},i,{children:o})):n(r,{children:o})},F=function(e){var i=e.allowHorizontalAnimate,l=void 0===i||i,c=e.children,d=e.draggedHeaderRef,u=e.headersRef,f=e.isBody,h=e.mainBodyRef,v=e.pauseAnimation,g=e.rowIndex,m=o(!1),p=t({}),w=p[0],R=p[1],C=o({}),b=u.current;return s((function(){if(b){var e=function(e){var n=e.currentHeaders,r=e.draggedHeaderRef,t=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(S({accessor:e.accessor,rowIndex:t}));if(i){var a=i.getAnimations().some((function(e){return"running"===e.playState})),l=i.getBoundingClientRect();a&&(null===(n=null==r?void 0:r.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=l}}})),o}({currentHeaders:b,draggedHeaderRef:d,rowIndex:g});JSON.stringify(e)!==JSON.stringify(w)&&(C.current=w,R(e))}}),[w,b,d,f,g]),s((function(){var e=h.current,n=function(){m.current=!0},r=function(){m.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",r),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",r)}}),[d,h]),a((function(){v||m.current||Object.keys(C.current).length&&b&&b.forEach((function(e){var n=document.getElementById(S({accessor:e.accessor,rowIndex:g}));if(n){var r=C.current[e.accessor],t=w[e.accessor];if(r&&t){var o=r.left-t.left,i=l?0:r.top-t.top,a=Math.abs(o),c=Math.abs(i);(a>10||c>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(o,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[l,w,b,f,v,C,g]),n(r,{children:c})},V=function(e){var r=e.getBorderClass,t=e.handleMouseDown,o=e.handleMouseOver,i=e.headers,a=e.hiddenColumns,l=e.isSelected,c=e.isTopLeftCell,s=e.onExpandRowClick,u=e.pinned,f=e.rowIndex,h=e.visibleRow,v=m(e,["getBorderClass","handleMouseDown","handleMouseOver","headers","hiddenColumns","isSelected","isTopLeftCell","onExpandRowClick","pinned","rowIndex","visibleRow"]);return n(j,g({allowAnimations:v.allowAnimations,allowHorizontalAnimate:v.shouldPaginate,draggedHeaderRef:v.draggedHeaderRef,headersRef:v.headersRef,isBody:!0,mainBodyRef:v.mainBodyRef,pauseAnimation:v.isWidthDragging,rowIndex:f+1},{children:i.map((function(e,n){return k({hiddenColumns:a,header:e,pinned:u})?d(U,g({},v,{borderClass:r(f,n),colIndex:n,header:e,isSelected:l(f,n),isTopLeftCell:c(f,n),key:S({accessor:e.accessor,rowIndex:f+1}),onExpandRowClick:s,onMouseDown:function(){return t({rowIndex:f,colIndex:n})},onMouseOver:function(){return o(f,n)},rowIndex:f,visibleRow:h})):null}))}))},J=function(e){var r=e.getNextRowIndex,t=e.gridTemplateColumns,o=e.index,i=e.pinned,a=e.props,l=e.rowHeight,c=e.visibleRow,s=c.position,d=r();return n("div",g({className:"st-table-row",style:{gridTemplateColumns:t,top:E({position:s,rowHeight:l}),height:"".concat(l,"px")}},{children:n(V,g({pinned:i,rowIndex:d,visibleRow:c},a),o)}))},X=function(e){var r=e.lastGroupRow,t=e.position,o=e.rowHeight,i=e.templateColumns;return n("div",g({className:"st-row-separator ".concat(r?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:i,position:"absolute",top:I({position:t,rowHeight:o}),minWidth:"100%"}},{children:n("div",{style:{gridColumn:"1 / -1"}})}))},K=function(r){r.headerContainerRef;var t=r.onExpandRowClick,i=r.pinned,l=r.rowHeight,c=r.sectionRef,s=r.templateColumns,d=r.totalHeight,f=r.visibleRows,h=r.width,v=m(r,["headerContainerRef","onExpandRowClick","pinned","rowHeight","sectionRef","templateColumns","totalHeight","visibleRows","width"]),p=i?"st-table-body-pinned-".concat(i):"st-table-body-main",w=o(0);a((function(){w.current=0}));var R=function(){return w.current++};return n("div",g({className:p,ref:c,style:{position:"relative",height:"".concat(d,"px"),width:h}},{children:f.map((function(r,o){var a,c,d=Boolean(null===(c=null===(a=r.row.rowMeta)||void 0===a?void 0:a.children)||void 0===c?void 0:c.length);return e(u,{children:[n(J,{getNextRowIndex:R,gridTemplateColumns:s,index:o,pinned:i,props:g(g({},v),{onExpandRowClick:t}),rowHeight:l,visibleRow:r}),0!==o&&n(X,{lastGroupRow:d,position:r.position,rowHeight:l,templateColumns:s})]},o)}))}))},q=function(r){var c,s,d,u,f,h=r.centerHeaderRef,v=r.currentRows,m=r.headerContainerRef,C=r.mainBodyRef,b=r.mainTemplateColumns,y=r.pinnedLeftColumns,x=r.pinnedLeftHeaderRef,H=r.pinnedLeftRef,M=r.pinnedLeftTemplateColumns,I=r.pinnedRightColumns,E=r.pinnedRightHeaderRef,S=r.pinnedRightRef,k=r.pinnedRightTemplateColumns,N=r.scrollbarWidth,L=r.tableBodyContainerRef;!function(e){var n=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=t(!1),l=i[0],c=i[1];a((function(){var e=null==n?void 0:n.current;if(l&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[n,l,o]),a((function(){var e=null==n?void 0:n.current,t=null==r?void 0:r.current;if(t&&e){var o=function(){if(t){var e=t.scrollHeight>t.clientHeight;c(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(t),function(){t&&i.unobserve(t)}}}),[n,r])}({headerContainerRef:m,mainSectionRef:L,scrollbarWidth:N});var T=o(null),O=o(null),B=t(v),W=B[0],A=B[1],P=t(1),z=P[0],U=P[1],j=t(!1),F=j[0],V=j[1],J=t(!0),X=J[0],q=J[1],G=t(0),Y=G[0],$=G[1];a((function(){A(v)}),[v]);var _=function(e){var n=0,r=function(e){e.forEach((function(e){n+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&r(e.rowMeta.children)}))};return r(e),n}(W),Q=41*_-1,Z=function(e){var n=function(r){return r.rowMeta.rowId===e&&r.rowMeta.children?g(g({},r),{rowMeta:g(g({},r.rowMeta),{isExpanded:!r.rowMeta.isExpanded})}):r.rowMeta.children?g(g({},r),{rowMeta:g(g({},r.rowMeta),{children:r.rowMeta.children.map(n)})}):r};A((function(e){return e.map(n)}))},ee=l((function(){return function(e){var n=e.bufferRowCount,r=e.containerHeight,t=e.rowHeight,o=e.rows,i=e.scrollTop,a=[],l=0,c=Math.max(0,i-t*n),s=i+r+t*n,d=function(e,n){for(var r,o=0,i=e;o<i.length;o++){var u=i[o],f=l*t;if(f>=s)break;f+t>c&&a.push({row:u,depth:n,position:l,isLastGroupRow:Boolean(null===(r=u.rowMeta.children)||void 0===r?void 0:r.length)&&n>1}),l+=1,u.rowMeta.isExpanded&&u.rowMeta.children&&d(u.rowMeta.children,n+1)}};return d(o,0),a}({bufferRowCount:5,containerHeight:600,rowHeight:D,rows:W,scrollTop:Y})}),[W,Y]),ne=i((function(){return p(void 0,void 0,void 0,(function(){var e;return w(this,(function(n){return F||!X||(V(!0),e=v.slice(20*z,20*(z+1)),A((function(n){return R(R([],n,!0),e,!0)})),U((function(e){return e+1})),V(!1),e.length<20/3&&q(!1)),[2]}))}))}),[v,X,F,z]),re=i((function(e){e[0].isIntersecting&&X&&!F&&ne()}),[X,F,ne]);a((function(){return T.current=new IntersectionObserver(re,{root:null,rootMargin:"100px",threshold:0}),L.current&&T.current.observe(L.current),function(){T.current&&T.current.disconnect()}}),[re,W,L]);var te=(null===(c=x.current)||void 0===c?void 0:c.clientWidth)?(null===(s=x.current)||void 0===s?void 0:s.clientWidth)+1:0,oe=null===(d=h.current)||void 0===d?void 0:d.clientWidth,ie=(null===(u=E.current)||void 0===u?void 0:u.clientWidth)?(null===(f=E.current)||void 0===f?void 0:f.clientWidth)+1:0;return e("div",g({className:"st-table-body-container",ref:L,onScroll:function(e){var n=e.currentTarget.scrollTop;O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame((function(){$(n)}))}},{children:[y.length>0&&n(K,g({},r,{onExpandRowClick:Z,pinned:"left",rowHeight:D,sectionRef:H,templateColumns:M,totalHeight:Q,visibleRows:ee,width:te})),n(K,g({},r,{onExpandRowClick:Z,rowHeight:D,sectionRef:C,templateColumns:b,totalHeight:Q,visibleRows:ee,width:oe})),I.length>0&&n(K,g({},r,{onExpandRowClick:Z,pinned:"right",rowHeight:D,sectionRef:S,templateColumns:k,totalHeight:Q,visibleRows:ee,width:ie}))]}))},G={string:function(e,n,r){if(e===n)return 0;var t=e.localeCompare(n);return"ascending"===r?t:-t},number:function(e,n,r){if(e===n)return 0;var t=e-n;return"ascending"===r?t:-t},boolean:function(e,n,r){if(e===n)return 0;var t=e===n?0:e?-1:1;return"ascending"===r?t:-t},date:function(e,n,r){var t=new Date(e),o=new Date(n);if(t.getTime()===o.getTime())return 0;var i=t.getTime()-o.getTime();return"ascending"===r?i:-i},enum:function(e,n,r){return G.string(e,n,r)},default:function(e,n,r){return e===n?0:null==e?"ascending"===r?-1:1:null==n?"ascending"===r?1:-1:"string"==typeof e&&"string"==typeof n?G.string(e,n,r):"number"==typeof e&&"number"==typeof n?G.number(e,n,r):"boolean"==typeof e&&"boolean"==typeof n?G.boolean(e,n,r):G.string(String(e),String(n),r)}},Y=function(e,n,r,t){if(void 0===r&&(r="string"),null==e||""===e)return"ascending"===t?-1:1;if(null==n||""===n)return"ascending"===t?1:-1;if("number"===r){var o=function(e){var n;if("number"==typeof e)return e;var r=String(e);if("string"==typeof r){var t=r.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(t){var o=parseFloat(t[1]),i=null===(n=t[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(r)||0},i=o(e),a=o(n);return G.number(i,a,t)}return"date"===r?G.date(String(e),String(n),t):"boolean"===r?G.boolean(Boolean(e),Boolean(n),t):"enum"===r?G.enum(String(e),String(n),t):G.string(String(e),String(n),t)},$=function(e,n,r){var t=r.find((function(e){return e.accessor===n.key.accessor})),o=(null==t?void 0:t.type)||"string",i=n.direction,a=new Map,l=new Map,c="";e.forEach((function(e){var r;if(e.rowData&&!e.rowData[n.key.accessor]&&void 0!==e.rowMeta.isExpanded){var t=(e.rowData.sector||"group_".concat(a.size)).toString();c=t,l.set(c,e),a.has(c)||a.set(c,[])}else if(c){var o=a.get(c)||[];o.push(e),a.set(c,o)}else{var i="default";a.has(i)||a.set(i,[]),null===(r=a.get(i))||void 0===r||r.push(e)}}));var s=[];return a.forEach((function(e,t){if(l.has(t)){var a=l.get(t);a.rowMeta.children&&a.rowMeta.children.length>0&&(a.rowMeta.children=_(a.rowMeta.children,n,r)),s.push(a)}var c=R([],e,!0).sort((function(e,r){if(!(null==e?void 0:e.rowData)||!(null==r?void 0:r.rowData))return 0;var t=n.key.accessor,a=e.rowData[t],l=r.rowData[t];return Y(a,l,o,i)}));s.push.apply(s,c.map((function(e){var t=g({},e);if(t.rowMeta.children&&t.rowMeta.children.length>0){var o=_(t.rowMeta.children,n,r);t.rowMeta=g(g({},t.rowMeta),{children:o})}return t})))})),s},_=function(e,n,r){var t=r.find((function(e){return e.accessor===n.key.accessor})),o=(null==t?void 0:t.type)||"string",i=n.direction;return R([],e,!0).sort((function(e,r){if(!(null==e?void 0:e.rowData)||!(null==r?void 0:r.rowData))return 0;var t=n.key.accessor,a=e.rowData[t],l=r.rowData[t];return Y(a,l,o,i)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?g(g({},e),{rowMeta:g(g({},e.rowMeta),{children:_(e.rowMeta.children,n,r)})}):e}))},Q=function(e){var n=e.event,r=e.forceUpdate,t=e.header,o=e.headersRef,i=e.index;e.reverse;var a=e.setIsWidthDragging,l=e.startWidth;a(!0),n.preventDefault();var c=n.clientX;if(t){var s=function(e){var n=Math.max(l+(e.clientX-c),40);t&&o.current&&(o.current[i].width=n,r())},d=function(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),a(!1)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",d)}},Z=c((function(r,o){var i,l=r.columnResizing,c=r.currentRows,s=r.columnReordering,d=r.draggedHeaderRef,u=r.forceUpdate,f=r.headersRef,h=r.hoveredHeaderRef,v=r.index,m=r.onColumnOrderChange,p=r.onSort,w=r.onTableHeaderDragEnd,R=r.reverse,C=r.rowHeight,b=r.selectableColumns,y=r.setIsWidthDragging,x=r.setSelectedCells,H=r.sort,M=r.sortDownIcon,D=r.sortUpIcon,I=t(!1),E=I[0],k=I[1],N=null===(i=f.current)||void 0===i?void 0:i[v],L=Boolean(null==N?void 0:N.isSortable),T="st-header-cell ".concat(N===h.current?"st-hovered":""," ").concat(E?"st-dragging":""," ").concat(L?"clickable":""," ").concat(s&&!L?"columnReordering":""," ").concat("right"===(null==N?void 0:N.align)?"right-aligned":"center"===(null==N?void 0:N.align)?"center-aligned":""),O=z({draggedHeaderRef:d,headersRef:f,hoveredHeaderRef:h,onColumnOrderChange:m,onTableHeaderDragEnd:w}),B=O.handleDragStart,A=O.handleDragEnd,P=O.handleDragOver,U=W(),j=function(e){var n=e.event,r=e.header;if(b){var t=c.length,o=Array.from({length:t},(function(e,n){return"".concat(n,"-").concat(v)})),i=function(e,n){var r=new Set,o=Math.min(e,n),i=Math.max(e,n);return Array.from({length:t}).forEach((function(e,n){Array.from({length:i-o+1}).forEach((function(e,t){r.add("".concat(n,"-").concat(o+t))}))})),r};n.shiftKey?x((function(e){var n,r=Number(null===(n=Array.from(e)[0])||void 0===n?void 0:n.split("-")[1]),t=Number(o[0].split("-")[1]);return r===t?new Set(o):r>t?i(t,r):i(r,t)})):x(new Set(o))}else r.isSortable&&p(v,r.accessor)};if(a((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!N)return null;var F=l&&n("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;U({callback:Q,callbackProps:{event:e,forceUpdate:u,header:N,headersRef:f,index:v,setIsWidthDragging:y,startWidth:"object"==typeof o&&null!==o&&"current"in o?null===(n=o.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}}),V=H&&H.key.accessor===N.accessor&&e("div",g({className:"st-sort-icon-container",onClick:function(e){return j({event:e,header:N})}},{children:["ascending"===H.direction&&D&&D,"descending"===H.direction&&M&&M]}));return e("div",g({className:T,id:S({accessor:N.accessor,rowIndex:0}),onDragOver:function(e){U({callback:P,callbackProps:{event:e,hoveredHeader:N},limit:50})},ref:o,style:{width:N.width,height:C}},{children:[R&&F,e("div",g({className:"st-header-label ".concat("right"===N.align?"right-aligned":""),draggable:s,onClick:function(e){return j({event:e,header:N})},onDragEnd:function(e){e.preventDefault(),k(!1),A()},onDragStart:function(e){s&&N&&function(e){k(!0),B(e)}(N)}},{children:["right"===N.align&&V,null==N?void 0:N.label,"right"!==N.align&&V]})),!R&&F]}))})),ee=function(e,n){a((function(){if(e.current){var r=e.current,t=function(){var e,t=null==r?void 0:r.scrollLeft;void 0!==t&&(null===(e=n.current)||void 0===e||e.scrollTo(t,0))};return r.addEventListener("scroll",t),function(){null==r||r.removeEventListener("scroll",t)}}}),[e,n])},ne=function(r){var t,o,i,a=r.allowAnimations,l=r.centerHeaderRef,c=r.columnResizing,s=r.currentRows,d=r.columnReordering,u=r.draggedHeaderRef,h=r.forceUpdate,v=r.headerContainerRef,m=r.headersRef,p=r.hiddenColumns,w=r.hoveredHeaderRef,R=r.isWidthDragging,C=r.mainBodyRef,b=r.mainTemplateColumns,y=r.onColumnOrderChange,x=r.onSort,H=r.onTableHeaderDragEnd,M=r.pinnedLeftColumns,I=r.pinnedLeftHeaderRef,E=r.pinnedLeftTemplateColumns,S=r.pinnedRightColumns,N=r.pinnedRightHeaderRef,L=r.pinnedRightTemplateColumns,T=r.selectableColumns,O=r.setIsWidthDragging,B=r.setSelectedCells,W=r.sort,A=r.sortDownIcon,P=r.sortUpIcon;ee(C,l);return e("div",g({className:"st-header-container",ref:v},{children:[M.length>0&&n("div",g({className:"st-header-pinned-left",ref:I,style:{gridTemplateColumns:E}},{children:n(j,g({allowAnimations:a,draggedHeaderRef:u,headersRef:m,mainBodyRef:C,pauseAnimation:R,rowIndex:0},{children:null===(t=m.current)||void 0===t?void 0:t.map((function(e,r){return k({hiddenColumns:p,header:e,pinned:"left"})?n(Z,{columnResizing:c,currentRows:s,columnReordering:d,draggedHeaderRef:u,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onColumnOrderChange:y,onSort:x,onTableHeaderDragEnd:H,ref:f(),rowHeight:D,selectableColumns:T,setIsWidthDragging:O,setSelectedCells:B,sort:W,sortDownIcon:A,sortUpIcon:P},e.accessor):null}))}))})),n("div",g({className:"st-header-main",onScroll:function(e){var n,r,t=null===(n=l.current)||void 0===n?void 0:n.scrollLeft;void 0!==t&&(null===(r=C.current)||void 0===r||r.scrollTo(t,0))},ref:l,style:{gridTemplateColumns:b}},{children:n(j,g({allowAnimations:a,draggedHeaderRef:u,headersRef:m,mainBodyRef:C,pauseAnimation:R,rowIndex:0},{children:null===(o=m.current)||void 0===o?void 0:o.map((function(e,r){return k({hiddenColumns:p,header:e})?n(Z,{columnResizing:c,currentRows:s,columnReordering:d,draggedHeaderRef:u,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onColumnOrderChange:y,onSort:x,onTableHeaderDragEnd:H,ref:f(),rowHeight:D,selectableColumns:T,setIsWidthDragging:O,setSelectedCells:B,sort:W,sortDownIcon:A,sortUpIcon:P},e.accessor):null}))}))})),S.length>0&&n("div",g({className:"st-header-pinned-right",ref:N,style:{gridTemplateColumns:L}},{children:n(j,g({allowAnimations:a,draggedHeaderRef:u,headersRef:m,mainBodyRef:C,pauseAnimation:R,rowIndex:0},{children:null===(i=m.current)||void 0===i?void 0:i.map((function(e,r){return k({hiddenColumns:p,header:e,pinned:"right"})?n(Z,{columnResizing:c,currentRows:s,columnReordering:d,draggedHeaderRef:u,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onColumnOrderChange:y,onSort:x,onTableHeaderDragEnd:H,reverse:!0,ref:f(),rowHeight:D,selectableColumns:T,setIsWidthDragging:O,setSelectedCells:B,sort:W,sortDownIcon:A,sortUpIcon:P},e.accessor):null}))}))}))]}))},re=function(e){var n=e.minWidth,r=e.width;return"number"==typeof r&&(r="".concat(r,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"minmax(".concat(n,", ").concat(r,")"):r},te=function(r){var t=r.allowAnimations,i=r.columnResizing,a=r.currentRows,c=r.columnReordering,s=r.draggedHeaderRef,d=r.editColumns,u=r.forceUpdate,f=r.getBorderClass,h=r.handleMouseDown,v=r.handleMouseOver,m=r.headersRef,p=r.hiddenColumns,w=r.hoveredHeaderRef,R=r.isSelected,C=r.isTopLeftCell,b=r.isWidthDragging,y=r.mainBodyRef,x=r.onCellEdit,H=r.onColumnOrderChange,M=r.onSort,D=r.onTableHeaderDragEnd,I=r.pinnedLeftRef,E=r.pinnedRightRef,S=r.scrollbarWidth,k=r.selectableColumns,N=r.setIsWidthDragging,L=r.setSelectedCells,T=r.shouldPaginate,O=r.sort,B=r.sortDownIcon,W=r.sortUpIcon,A=r.tableBodyContainerRef,P=o(null),z=o(null),U=o(null),j=o(null),F=m.current.filter((function(e){return!e.hide&&!e.pinned})),V=m.current.filter((function(e){return"left"===e.pinned&&!0!==e.hide})),J=m.current.filter((function(e){return"right"===e.pinned&&!0!==e.hide})),X=l((function(){return"".concat(V.map((function(e){return re(e)})).join(" "))}),[V]),K=l((function(){return"".concat(F.filter((function(e){return!0!==p[e.accessor]})).map((function(e){return re(e)})).join(" "))}),[F,p]),G=l((function(){return"".concat(J.map((function(e){return re(e)})).join(" "))}),[J]),Y={allowAnimations:t,centerHeaderRef:U,columnResizing:i,currentRows:a,columnReordering:c,draggedHeaderRef:s,forceUpdate:u,headerContainerRef:P,headersRef:m,hiddenColumns:p,hoveredHeaderRef:w,isWidthDragging:b,mainBodyRef:y,mainTemplateColumns:K,onColumnOrderChange:H,onSort:M,onTableHeaderDragEnd:D,pinnedLeftColumns:V,pinnedLeftHeaderRef:z,pinnedLeftTemplateColumns:X,pinnedRightColumns:J,pinnedRightHeaderRef:j,pinnedRightTemplateColumns:G,selectableColumns:k,setIsWidthDragging:N,setSelectedCells:L,sort:O,sortDownIcon:B,sortUpIcon:W,tableBodyContainerRef:A},$={allowAnimations:t,centerHeaderRef:U,currentRows:a,draggedHeaderRef:s,getBorderClass:f,handleMouseDown:h,handleMouseOver:v,headerContainerRef:P,headers:m.current,headersRef:m,hiddenColumns:p,hoveredHeaderRef:w,isSelected:R,isTopLeftCell:C,isWidthDragging:b,mainBodyRef:y,mainTemplateColumns:K,onCellEdit:x,onTableHeaderDragEnd:D,pinnedLeftColumns:V,pinnedLeftHeaderRef:z,pinnedLeftRef:I,pinnedLeftTemplateColumns:X,pinnedRightColumns:J,pinnedRightHeaderRef:j,pinnedRightRef:E,pinnedRightTemplateColumns:G,scrollbarWidth:S,shouldPaginate:T,tableBodyContainerRef:A};return e("div",g({className:"st-table-content",style:{width:d?"calc(100% - 27.5px)":"100%"}},{children:[n(ne,g({},Y)),n(q,g({},$))]}))},oe=function(e){var n=e.callback,r=e.ref,t=e.widthAttribute;a((function(){var e=r.current;if(e){var o=function(){n(e[t]||0)};o();var i=new ResizeObserver((function(){o()}));return i.observe(e),function(){return i.disconnect()}}}),[n,r,t])},ie=function(r){var i=r.mainBodyRef,a=r.pinnedLeftRef,l=r.pinnedRightRef,c=r.tableContentWidth,s=t(0),d=s[0],u=s[1],f=t(0),h=f[0],v=f[1],m=t(0),p=m[0],w=m[1],R=o(null);return oe({widthAttribute:"offsetWidth",callback:u,ref:a}),oe({widthAttribute:"scrollWidth",callback:w,ref:i}),oe({widthAttribute:"offsetWidth",callback:v,ref:l}),ee(i,R),!i.current||i.current.scrollWidth<=i.current.clientWidth?null:e("div",g({className:"st-horizontal-scrollbar-container",style:{width:c}},{children:[d>0&&n("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:d}}),p>0&&n("div",g({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&i.current&&i.current.scrollTo({left:n,behavior:"auto"})},ref:R},{children:n("div",{style:{width:p}})})),h>0&&n("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:h}})]}))},ae=function(e){var n=e.headers,r=e.tableRows,o=t(null),i=o[0],a=o[1],c=l((function(){var e={};return n.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[n]),s=t(c),d=s[0],u=s[1],f=l((function(){if(!i)return r;var e=function(e,n,r){return{sortedData:$(n,r,e),newSortConfig:r}}(n,r,i).sortedData;return e}),[r,i,n]);return{sort:i,setSort:a,updateSort:function(e,r){var t=n.find((function(e){return e.accessor===r}));t&&a((function(e){return e&&e.key.accessor===r?"ascending"===e.direction?{key:t,direction:"descending"}:null:{key:t,direction:"ascending"}}))},sortedRows:f,hiddenColumns:d,setHiddenColumns:u}},le=function(r){var o=r.checked,i=void 0!==o&&o,a=r.children,l=r.onChange,c=t(i),s=c[0],d=c[1];return e("label",g({className:"st-checkbox-label"},{children:[n("input",{checked:s,className:"st-checkbox-input",onChange:function(){var e=!s;d(e),l&&l(e)},type:"checkbox"}),n("span",g({className:"st-checkbox-custom ".concat(s?"st-checked":"")},{children:s&&n("span",{className:"st-checkbox-checkmark"})})),a]}))},ce=function(e){var r=e.headers,t=e.open,o=e.position;e.setOpen;var i=e.setHiddenColumns,a=e.hiddenColumns,l="left"===o?"left":"";return n("div",g({className:"st-column-editor-popout ".concat(t?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:n("div",g({className:"st-column-editor-popout-content"},{children:r.map((function(e,r){return n(le,g({checked:a[e.accessor],onChange:function(n){var r;return i(g(g({},a),((r={})[e.accessor]=n,r)))}},{children:e.label}),r)}))}))}))},se=function(r){var o=r.columnEditorText,i=r.editColumns,a=r.editColumnsInitOpen,l=r.headers,c=r.position,s=void 0===c?"right":c,d=r.setHiddenColumns,u=r.hiddenColumns,f=t(a),h=f[0],v=f[1];return i?e("div",g({className:"st-column-editor ".concat(h?"open":""," ").concat(s),onClick:function(){return function(e){v(e)}(!h)}},{children:[n("div",g({className:"st-column-editor-text"},{children:o})),n(ce,{headers:l,open:h,position:s,setOpen:v,setHiddenColumns:d,hiddenColumns:u})]})):null};!function(e){e.Left="left",e.Right="right"}(C||(C={}));var de=h((function(r){var c=r.allowAnimations,d=void 0!==c&&c,u=r.columnEditorPosition,f=void 0===u?C.Right:u,h=r.columnEditorText,m=void 0===h?"Columns":h,p=r.columnResizing,w=void 0!==p&&p,R=r.defaultHeaders,D=r.editColumns,I=void 0!==D&&D,E=r.editColumnsInitOpen,S=void 0!==E&&E,k=r.columnReordering,N=void 0!==k&&k,L=r.height,T=r.hideFooter,O=void 0!==T&&T,B=r.nextIcon,W=void 0===B?n(x,{className:"st-next-prev-icon"}):B,A=r.onCellEdit,P=r.onColumnOrderChange,z=r.onNextPage,U=r.onPreviousPage,j=r.prevIcon,F=void 0===j?n(y,{className:"st-next-prev-icon"}):j,V=r.rows,J=r.rowsPerPage,X=void 0===J?10:J,K=r.selectableCells,q=void 0!==K&&K,G=r.selectableColumns,Y=void 0!==G&&G,$=r.shouldPaginate,_=void 0!==$&&$,Q=r.sortDownIcon,Z=void 0===Q?n(M,{className:"st-sort-icon"}):Q,ee=r.sortUpIcon,ne=void 0===ee?n(H,{className:"st-sort-icon"}):ee,re=r.theme,oe=void 0===re?"light":re,le=r.totalPages,ce=o(null),de=o(R),ue=o(null),fe=o(null),he=o(null),ve=o(null),ge=o(null),me=t(!1),pe=me[0],we=me[1],Re=t(1),Ce=Re[0],be=Re[1],ye=t(0),xe=ye[0],He=ye[1],Me=t(0),De=Me[0],Ie=Me[1],Ee=ae({headers:de.current,tableRows:V}),Se=Ee.sort,ke=Ee.sortedRows,Ne=Ee.hiddenColumns,Le=Ee.setHiddenColumns,Te=Ee.updateSort,Oe=v((function(e){return e+1}),0)[1],Be=function(e){var n=e.selectableCells,r=e.headers,c=e.rows,s=t(new Set),d=s[0],u=s[1],f=o(!1),h=o(null),v=i((function(){var e=Array.from(d).reduce((function(e,n){var t=n.split("-").map(Number),o=t[0],i=t[1];return e[o]||(e[o]=[]),e[o][i]=c[o][r[i].accessor],e}),{}),n=Object.values(e).map((function(e){return Object.values(e).join("\t")})).join("\n");d.size>0&&navigator.clipboard.writeText(n)}),[d,c,r]);a((function(){var e=function(e){(e.ctrlKey||e.metaKey)&&"c"===e.key&&v()};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[v]);var g=i((function(e,n){return d.has("".concat(e,"-").concat(n))}),[d]),m=i((function(e,n){var r=[];return g(e-1,n)||r.push("st-selected-top-border"),g(e+1,n)||r.push("st-selected-bottom-border"),g(e,n-1)||r.push("st-selected-left-border"),g(e,n+1)||r.push("st-selected-right-border"),r.join(" ")}),[g]),p=l((function(){var e=Math.min.apply(Math,Array.from(d).map((function(e){return parseInt(e.split("-")[0])}))),n=Math.min.apply(Math,Array.from(d).map((function(e){return parseInt(e.split("-")[1])})));return function(r,t){return r===e&&t===n}}),[d]);return{selectedCells:d,handleMouseDown:function(e){var r=e.colIndex,t=e.rowIndex;n&&(f.current=!0,h.current={row:t,col:r},u(new Set(["".concat(t,"-").concat(r)])))},handleMouseOver:function(e,r){if(n&&f.current&&h.current){for(var t=new Set,o=Math.min(h.current.row,e),i=Math.max(h.current.row,e),a=Math.min(h.current.col,r),l=Math.max(h.current.col,r),c=o;c<=i;c++)for(var s=a;s<=l;s++)t.add("".concat(c,"-").concat(s));u(t)}},handleMouseUp:function(){f.current=!1,h.current=null},isSelected:g,getBorderClass:m,isTopLeftCell:p,setSelectedCells:u}}({selectableCells:q,headers:de.current,rows:ke}),We=Be.handleMouseDown,Ae=Be.handleMouseOver,Pe=Be.handleMouseUp,ze=Be.isSelected,Ue=Be.getBorderClass,je=Be.isTopLeftCell,Fe=Be.setSelectedCells,Ve=l((function(){return _?ke.slice((Ce-1)*X,Ce*X):ke}),[Ce,X,_,ke]),Je=i((function(e,n){Te(e,n)}),[Te]),Xe=i((function(e){de.current=e,Oe()}),[]);return a((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||Y&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||Fe(new Set)};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[Y,Fe]),s((function(){if(ge.current){var e=ge.current.offsetWidth-ge.current.clientWidth,n=ge.current.clientWidth;He(e),Ie(n)}}),[]),s((function(){var e=function(){if(Oe(),ge.current){var e=ge.current.offsetWidth-ge.current.clientWidth,n=ge.current.clientWidth;He(e),Ie(n)}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),e("div",g({className:"simple-table-root st-wrapper theme-".concat(oe),style:L?{height:L}:{}},{children:[e("div",g({className:"st-table-wrapper-container"},{children:[e("div",g({className:"st-table-wrapper",onMouseUp:Pe,onMouseLeave:Pe},{children:[n(te,{allowAnimations:d,columnResizing:w,currentRows:Ve,draggedHeaderRef:ce,editColumns:I,columnReordering:N,forceUpdate:Oe,getBorderClass:Ue,handleMouseDown:We,handleMouseOver:Ae,headers:de.current,headersRef:de,hiddenColumns:Ne,hoveredHeaderRef:ue,isSelected:ze,isTopLeftCell:je,isWidthDragging:pe,mainBodyRef:fe,onCellEdit:A,onColumnOrderChange:P,onSort:Je,onTableHeaderDragEnd:Xe,pinnedLeftRef:he,pinnedRightRef:ve,scrollbarWidth:xe,selectableColumns:Y,setIsWidthDragging:we,setSelectedCells:Fe,shouldPaginate:_,sort:Se,sortDownIcon:Z,sortUpIcon:ne,tableBodyContainerRef:ge}),n(se,{columnEditorText:m,editColumns:I,editColumnsInitOpen:S,headers:de.current,hiddenColumns:Ne,position:f,setHiddenColumns:Le})]})),n(ie,{mainBodyRef:fe,pinnedLeftRef:he,pinnedRightRef:ve,tableContentWidth:De})]})),n(b,{currentPage:Ce,hideFooter:O,nextIcon:W,onPageChange:be,onNextPage:z,onPreviousPage:U,prevIcon:F,shouldPaginate:_,totalPages:le||Math.ceil(ke.length/X)})]}))}));export{de as SimpleTable};
|
|
2
2
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};function r(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function o(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}l((r=r.apply(e,n||[])).next())}))}function i(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e],r=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function a(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var s,l=function(n){var r=n.currentPage,o=n.hideFooter,i=n.nextIcon,a=n.onPageChange,s=n.prevIcon,l=n.rowsPerPage,c=n.shouldPaginate,d=n.totalRows,u=Math.ceil(d/l),f=r>1,h=r<u,v=function(e){e>=1&&e<=u&&a(e)};return o||!c?null:e.jsxs("div",t({className:"st-footer"},{children:[e.jsx("button",t({className:"st-next-prev-btn ".concat(f?"":"disabled"),onClick:function(){return v(r-1)},disabled:!f},{children:s})),e.jsx("button",t({className:"st-next-prev-btn ".concat(h?"":"disabled"),onClick:function(){return v(r+1)},disabled:!h},{children:i})),Array.from({length:u},(function(n,o){return e.jsx("button",t({onClick:function(){return v(o+1)},className:"st-page-btn ".concat(r===o+1?"active":"")},{children:o+1}),o)}))]}))},c=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},d=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},u=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},f=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},h=function(e){return e.position*(e.rowHeight+1)-1},v=function(e){return e.position*(e.rowHeight+1)},m=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},g=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},p=function(n){var r=n.value,o=n.onBlur,i=n.onChange;return e.jsxs("select",t({value:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;i("true"===n)}},{children:[e.jsx("option",t({value:"true"},{children:"True"})),e.jsx("option",t({value:"false"},{children:"False"}))]}))},w=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;i(n)}})},R=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)}})},x=function(n){var t=n.onChange,r=n.setIsEditing,o=n.value,i=function(e){null==t||t(e)},a=function(){r(!1)};return e.jsx(e.Fragment,{children:"string"==typeof o||null==o?e.jsx(w,{defaultValue:o,onBlur:a,onChange:i}):"boolean"==typeof o?e.jsx(p,{onBlur:a,onChange:i,value:o}):"number"==typeof o?e.jsx(R,{defaultValue:o,onBlur:a,onChange:i}):null})},b=0,C=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===b||o-b>=r)&&(b=o,n(t))}},y=Date.now(),j={screenX:0,screenY:0},H=function(e){var t,r,o=e.draggedHeaderRef,i=e.headersRef,s=e.hoveredHeaderRef,l=e.onTableHeaderDragEnd,c=(t=i.current,r=n.useRef(t),n.useEffect((function(){r.current=t}),[t]),r.current);return{handleDragStart:function(e){o.current=e,y=Date.now()},handleDragOver:function(e){var n,t=e.event,r=e.hoveredHeader;if(t.preventDefault(),i.current){var d=t.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=t.screenX,f=t.screenY,h=Math.sqrt(Math.pow(u-j.screenX,2)+Math.pow(f-j.screenY,2));s.current=r;var v=a([],i.current,!0),m=v.findIndex((function(e){var n;return e.accessor===(null===(n=o.current)||void 0===n?void 0:n.accessor)})),g=v.findIndex((function(e){return e.accessor===r.accessor})),p=v.splice(m,1)[0];if(v.splice(g,0,p),!(d||r.accessor===(null===(n=o.current)||void 0===n?void 0:n.accessor)||null===o.current||h<10||void 0===m||void 0===g||JSON.stringify(v)===JSON.stringify(i.current))){var w=Date.now();JSON.stringify(v)===JSON.stringify(c)&&w-y<800&&h<50||(y=w,j={screenX:u,screenY:f},l(v))}}},handleDragEnd:function(){o.current=null,s.current=null}}},E=n.forwardRef((function(r,o){var i,a,s=r.borderClass,l=r.colIndex,c=r.draggedHeaderRef,u=r.header,h=r.headersRef,v=r.hoveredHeaderRef,g=r.isSelected,p=r.isTopLeftCell,w=r.onCellEdit,R=r.onExpandRowClick,b=r.onMouseDown,y=r.onMouseOver,j=r.onTableHeaderDragEnd,E=r.rowIndex,S=r.visibleRow,M=S.depth,I=S.row,D=n.useState(I.rowData[u.accessor]),k=D[0],N=D[1],L=n.useState(!1),T=L[0],B=L[1],O=H({draggedHeaderRef:c,headersRef:h,hoveredHeaderRef:v,onTableHeaderDragEnd:j}).handleDragOver,W=C(),A=Boolean(null===(a=null===(i=I.rowMeta)||void 0===i?void 0:i.children)||void 0===a?void 0:a.length),P=Boolean(null==u?void 0:u.isEditable),z=E%2==0,U="st-cell ".concat(M>0&&u.expandable?"st-cell-depth-".concat(M):""," ").concat(g?p?"st-cell-selected-first-cell ".concat(s):"st-cell-selected ".concat(s):""," ").concat(z?"st-cell-odd-row":"st-cell-even-row"," ").concat(P?"clickable":""," ").concat("right"===u.align?"right-aligned":"center"===u.align?"center-aligned":"left-aligned");return n.useEffect((function(){N(I.rowData[u.accessor])}),[u.accessor,I]),T?e.jsx("div",t({className:"st-cell-editing ".concat(z?"st-cell-odd-row":"st-cell-even-row"),id:m({accessor:u.accessor,rowIndex:E+1})},{children:e.jsx(x,{onChange:function(e){N(e),null==w||w({accessor:u.accessor,newValue:e,row:I})},setIsEditing:B,value:k})})):e.jsxs("div",t({className:U,id:m({accessor:u.accessor,rowIndex:E+1}),onDoubleClick:function(){return u.isEditable&&B(!0)},onMouseDown:function(){return b(E,l)},onMouseOver:function(){return y(E,l)},onDragOver:function(e){return W({callback:O,callbackProps:{event:e,hoveredHeader:u},limit:50})},ref:o},{children:[u.expandable&&A?I.rowMeta.isExpanded?e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return R(I.rowMeta.rowId)}},{children:e.jsx(f,{className:"st-sort-icon"})})):e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return R(I.rowMeta.rowId)}},{children:e.jsx(d,{className:"st-sort-icon"})})):null,e.jsx("span",t({className:"st-cell-content"},{children:u.cellRenderer?u.cellRenderer({accessor:u.accessor,colIndex:l,row:I}):k}))]}))})),S=function(n){var o=n.allowAnimations,i=n.children,a=r(n,["allowAnimations","children"]);return o?e.jsx(M,t({},a,{children:i})):e.jsx(e.Fragment,{children:i})},M=function(t){var r=t.allowHorizontalAnimate,o=void 0===r||r,i=t.children,a=t.draggedHeaderRef,s=t.headersRef,l=t.isBody,c=t.mainBodyRef,d=t.pauseAnimation,u=t.rowIndex,f=n.useRef(!1),h=n.useState({}),v=h[0],g=h[1],p=n.useRef({}),w=s.current;return n.useLayoutEffect((function(){if(w){var e=function(e){var n=e.currentHeaders,t=e.draggedHeaderRef,r=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var i=document.getElementById(m({accessor:e.accessor,rowIndex:r}));if(i){var a=i.getAnimations().some((function(e){return"running"===e.playState})),s=i.getBoundingClientRect();a&&(null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=s}}})),o}({currentHeaders:w,draggedHeaderRef:a,rowIndex:u});JSON.stringify(e)!==JSON.stringify(v)&&(p.current=v,g(e))}}),[v,w,a,l,u]),n.useLayoutEffect((function(){var e=c.current,n=function(){f.current=!0},t=function(){f.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",t),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",t)}}),[a,c]),n.useEffect((function(){d||f.current||Object.keys(p.current).length&&w&&w.forEach((function(e){var n=document.getElementById(m({accessor:e.accessor,rowIndex:u}));if(n){var t=p.current[e.accessor],r=v[e.accessor];if(t&&r){var i=t.left-r.left,a=o?0:t.top-r.top,s=Math.abs(i),l=Math.abs(a);(s>10||l>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(i,"px, ").concat(a,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[o,v,w,l,d,p,u]),e.jsx(e.Fragment,{children:i})},I=function(o){var i=o.getBorderClass,a=o.handleMouseDown,s=o.handleMouseOver,l=o.headers,c=o.hiddenColumns,d=o.isSelected,u=o.isTopLeftCell,f=o.onExpandRowClick,h=o.pinned,v=o.rowIndex,p=o.visibleRow,w=r(o,["getBorderClass","handleMouseDown","handleMouseOver","headers","hiddenColumns","isSelected","isTopLeftCell","onExpandRowClick","pinned","rowIndex","visibleRow"]);return e.jsx(S,t({allowAnimations:w.allowAnimations,allowHorizontalAnimate:w.shouldPaginate,draggedHeaderRef:w.draggedHeaderRef,headersRef:w.headersRef,isBody:!0,mainBodyRef:w.mainBodyRef,pauseAnimation:w.isWidthDragging,rowIndex:v+1},{children:l.map((function(e,r){return g({hiddenColumns:c,header:e,pinned:h})?n.createElement(E,t({},w,{borderClass:i(v,r),colIndex:r,header:e,isSelected:d(v,r),isTopLeftCell:u(v,r),key:m({accessor:e.accessor,rowIndex:v+1}),onExpandRowClick:f,onMouseDown:function(){return a({rowIndex:v,colIndex:r})},onMouseOver:function(){return s(v,r)},rowIndex:v,visibleRow:p})):null}))}))},D=function(n){var r=n.getNextRowIndex,o=n.gridTemplateColumns,i=n.index,a=n.pinned,s=n.props,l=n.rowHeight,c=n.visibleRow,d=c.position,u=r();return e.jsx("div",t({className:"st-table-row",style:{gridTemplateColumns:o,top:v({position:d,rowHeight:l}),height:"".concat(l,"px")}},{children:e.jsx(I,t({pinned:a,rowIndex:u,visibleRow:c},s),i)}))},k=function(n){var r=n.lastGroupRow,o=n.position,i=n.rowHeight,a=n.templateColumns;return e.jsx("div",t({className:"st-row-separator ".concat(r?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:a,position:"absolute",top:h({position:o,rowHeight:i}),minWidth:"100%"}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},N=function(o){o.headerContainerRef;var i=o.onExpandRowClick,a=o.pinned,s=o.rowHeight,l=o.sectionRef,c=o.templateColumns,d=o.totalHeight,u=o.visibleRows,f=o.width,h=r(o,["headerContainerRef","onExpandRowClick","pinned","rowHeight","sectionRef","templateColumns","totalHeight","visibleRows","width"]),v=a?"st-table-body-pinned-".concat(a):"st-table-body-main",m=n.useRef(0);n.useEffect((function(){m.current=0}));var g=function(){return m.current++};return e.jsx("div",t({className:v,ref:l,style:{position:"relative",height:"".concat(d,"px"),width:f}},{children:u.map((function(n,r){var o,l,d=Boolean(null===(l=null===(o=n.row.rowMeta)||void 0===o?void 0:o.children)||void 0===l?void 0:l.length);return e.jsxs(e.Fragment,{children:[e.jsx(D,{getNextRowIndex:g,gridTemplateColumns:c,index:r,pinned:a,props:t(t({},h),{onExpandRowClick:i}),rowHeight:s,visibleRow:n},r),0!==r&&e.jsx(k,{lastGroupRow:d,position:n.position,rowHeight:s,templateColumns:c})]})}))}))},L=function(r){var s,l,c,d,u,f=r.centerHeaderRef,h=r.currentRows,v=r.headerContainerRef,m=r.mainBodyRef,g=r.mainTemplateColumns,p=r.pinnedLeftColumns,w=r.pinnedLeftHeaderRef,R=r.pinnedLeftRef,x=r.pinnedLeftTemplateColumns,b=r.pinnedRightColumns,C=r.pinnedRightHeaderRef,y=r.pinnedRightRef,j=r.pinnedRightTemplateColumns,H=r.scrollbarWidth,E=r.tableBodyContainerRef;!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],s=i[1];n.useEffect((function(){var e=null==t?void 0:t.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[t,a,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;s(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(n),function(){n&&i.unobserve(n)}}}),[t,r])}({headerContainerRef:v,mainSectionRef:E,scrollbarWidth:H});var S=n.useRef(null),M=n.useRef(null),I=n.useState(h),D=I[0],k=I[1],L=n.useState(1),T=L[0],B=L[1],O=n.useState(!1),W=O[0],A=O[1],P=n.useState(!0),z=P[0],U=P[1],F=n.useState(0),V=F[0],q=F[1],J=function(e){var n=0,t=function(e){e.forEach((function(e){n+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&t(e.rowMeta.children)}))};return t(e),n}(D),X=41*J-1,G=function(e){var n=function(r){return r.rowMeta.rowId===e&&r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{isExpanded:!r.rowMeta.isExpanded})}):r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{children:r.rowMeta.children.map(n)})}):r};k((function(e){return e.map(n)}))},Y=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.containerHeight,r=e.rowHeight,o=e.rows,i=e.scrollTop,a=[],s=0,l=Math.max(0,i-r*n),c=i+t+r*n,d=function(e,n){for(var t,o=0,i=e;o<i.length;o++){var u=i[o],f=s*r;if(f>=c)break;f+r>l&&a.push({row:u,depth:n,position:s,isLastGroupRow:Boolean(null===(t=u.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),s+=1,u.rowMeta.isExpanded&&u.rowMeta.children&&d(u.rowMeta.children,n+1)}};return d(o,0),a}({bufferRowCount:5,containerHeight:600,rowHeight:40,rows:D,scrollTop:V})}),[D,V]),K=n.useCallback((function(){return o(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){return W||!z||(A(!0),e=h.slice(20*T,20*(T+1)),k((function(n){return a(a([],n,!0),e,!0)})),B((function(e){return e+1})),A(!1),e.length<20/3&&U(!1)),[2]}))}))}),[h,z,W,T]),_=n.useCallback((function(e){e[0].isIntersecting&&z&&!W&&K()}),[z,W,K]);n.useEffect((function(){return S.current=new IntersectionObserver(_,{root:null,rootMargin:"100px",threshold:0}),E.current&&S.current.observe(E.current),function(){S.current&&S.current.disconnect()}}),[_,D,E]);var $=(null===(s=w.current)||void 0===s?void 0:s.clientWidth)?(null===(l=w.current)||void 0===l?void 0:l.clientWidth)+1:0,Q=null===(c=f.current)||void 0===c?void 0:c.clientWidth,Z=(null===(d=C.current)||void 0===d?void 0:d.clientWidth)?(null===(u=C.current)||void 0===u?void 0:u.clientWidth)+1:0;return e.jsxs("div",t({className:"st-table-body-container",ref:E,onScroll:function(e){var n=e.currentTarget.scrollTop;M.current&&cancelAnimationFrame(M.current),M.current=requestAnimationFrame((function(){q(n)}))}},{children:[p.length>0&&e.jsx(N,t({},r,{onExpandRowClick:G,pinned:"left",rowHeight:40,sectionRef:R,templateColumns:x,totalHeight:X,visibleRows:Y,width:$})),e.jsx(N,t({},r,{onExpandRowClick:G,rowHeight:40,sectionRef:m,templateColumns:g,totalHeight:X,visibleRows:Y,width:Q})),b.length>0&&e.jsx(N,t({},r,{onExpandRowClick:G,pinned:"right",rowHeight:40,sectionRef:y,templateColumns:j,totalHeight:X,visibleRows:Y,width:Z}))]}))},T={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return T.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?T.string(e,n,t):"number"==typeof e&&"number"==typeof n?T.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?T.boolean(e,n,t):T.string(String(e),String(n),t)}},B=function(e,n,t,r){switch(void 0===t&&(t="string"),t){case"string":return T.string(String(e||""),String(n||""),r);case"number":return T.number(Number(e||0),Number(n||0),r);case"boolean":return T.boolean(Boolean(e),Boolean(n),r);case"date":return T.date(String(e||""),String(n||""),r);case"enum":return T.enum(String(e||""),String(n||""),r);default:return T.default(e,n,r)}},O=function(e,n,r){var o=r.find((function(e){return e.accessor===n.key.accessor})),i=(null==o?void 0:o.type)||"string",s=n.direction;return a([],e,!0).sort((function(e,t){var r,o,a=null===(r=null==e?void 0:e.rowData)||void 0===r?void 0:r[n.key.accessor],l=null===(o=null==t?void 0:t.rowData)||void 0===o?void 0:o[n.key.accessor];return B(a,l,i,s)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?t(t({},e),{rowMeta:t(t({},e.rowMeta),{children:O(e.rowMeta.children,n,r)})}):e}))},W=function(e,n,r){var o=function(e,n,r){var o=r.find((function(e){return e.accessor===n.key.accessor})),i=(null==o?void 0:o.type)||"string",s=n.direction,l=[],c=new Map;return e.forEach((function(n){e.some((function(e){var t;return null===(t=e.rowMeta.children)||void 0===t?void 0:t.some((function(e){return e.rowMeta.rowId===n.rowMeta.rowId}))}))||l.push(n),n.rowMeta.children&&n.rowMeta.children.length>0&&c.set(n.rowMeta.rowId,n.rowMeta.children)})),a([],l,!0).sort((function(e,t){var r,o,a=null===(r=null==e?void 0:e.rowData)||void 0===r?void 0:r[n.key.accessor],l=null===(o=null==t?void 0:t.rowData)||void 0===o?void 0:o[n.key.accessor];return B(a,l,i,s)})).map((function(e){var o=t({},e);if(c.has(e.rowMeta.rowId)){var i=c.get(e.rowMeta.rowId)||[],a=O(i,n,r);o.rowMeta=t(t({},o.rowMeta),{children:a})}return o}))}(n,r,e);return{sortedData:o,newSortConfig:r}},A=function(e){var n=e.event,t=e.forceUpdate,r=e.header,o=e.headersRef,i=e.index;e.reverse;var a=e.setIsWidthDragging,s=e.startWidth;a(!0),n.preventDefault();var l=n.clientX;if(r){var c=function(e){var n=Math.max(s+(e.clientX-l),40);r&&o.current&&(o.current[i].width=n,t())},d=function(){document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),a(!1)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",d)}},P=n.forwardRef((function(r,o){var i,a=r.columnResizing,s=r.currentRows,l=r.columnReordering,c=r.draggedHeaderRef,d=r.forceUpdate,u=r.headersRef,f=r.hoveredHeaderRef,h=r.index,v=r.onSort,g=r.onTableHeaderDragEnd,p=r.reverse,w=r.selectableColumns,R=r.setIsWidthDragging,x=r.setSelectedCells,b=r.sort,y=r.sortDownIcon,j=r.sortUpIcon,E=n.useState(!1),S=E[0],M=E[1],I=null===(i=u.current)||void 0===i?void 0:i[h],D=Boolean(null==I?void 0:I.isSortable),k="st-header-cell ".concat(I===f.current?"st-hovered":""," ").concat(S?"st-dragging":""," ").concat(D?"clickable":""," ").concat(l&&!D?"columnReordering":""," ").concat("right"===(null==I?void 0:I.align)?"right-aligned":"center"===(null==I?void 0:I.align)?"center-aligned":""),N=H({draggedHeaderRef:c,headersRef:u,hoveredHeaderRef:f,onTableHeaderDragEnd:g}),L=N.handleDragStart,T=N.handleDragEnd,B=H({draggedHeaderRef:c,headersRef:u,hoveredHeaderRef:f,onTableHeaderDragEnd:g}).handleDragOver,O=C(),W=function(e){var n=e.event,t=e.header;if(w){var r=s.length,o=Array.from({length:r},(function(e,n){return"".concat(n,"-").concat(h)})),i=function(e,n){var t=new Set,o=Math.min(e,n),i=Math.max(e,n);return Array.from({length:r}).forEach((function(e,n){Array.from({length:i-o+1}).forEach((function(e,r){t.add("".concat(n,"-").concat(o+r))}))})),t};n.shiftKey?x((function(e){var n,t=Number(null===(n=Array.from(e)[0])||void 0===n?void 0:n.split("-")[1]),r=Number(o[0].split("-")[1]);return t===r?new Set(o):t>r?i(r,t):i(t,r)})):x(new Set(o))}else t.isSortable&&v(h,t.accessor)};if(n.useEffect((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!I)return null;var P=a&&e.jsx("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;O({callback:A,callbackProps:{event:e,forceUpdate:d,header:I,headersRef:u,index:h,setIsWidthDragging:R,startWidth:"object"==typeof o&&null!==o&&"current"in o?null===(n=o.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}});return e.jsxs("div",t({className:k,id:m({accessor:I.accessor,rowIndex:0}),onDragOver:function(e){O({callback:B,callbackProps:{event:e,hoveredHeader:I},limit:50})},ref:o,style:{width:I.width}},{children:[p&&P,e.jsx("div",t({className:"st-header-label",draggable:l,onClick:function(e){return W({event:e,header:I})},onDragEnd:function(e){e.preventDefault(),M(!1),T()},onDragStart:function(e){l&&I&&function(e){M(!0),L(e)}(I)}},{children:null==I?void 0:I.label})),b&&b.key.accessor===I.accessor&&e.jsxs("div",t({className:"st-sort-icon-container",onClick:function(e){return W({event:e,header:I})}},{children:["ascending"===b.direction&&j&&j,"descending"===b.direction&&y&&y]})),!p&&P]}))})),z=function(e,t){n.useEffect((function(){if(e.current){var n=e.current,r=function(){var e,r=null==n?void 0:n.scrollLeft;void 0!==r&&(null===(e=t.current)||void 0===e||e.scrollTo(r,0))};return n.addEventListener("scroll",r),function(){null==n||n.removeEventListener("scroll",r)}}}),[e,t])},U=function(r){var o,i,a,s=r.allowAnimations,l=r.centerHeaderRef,c=r.columnResizing,d=r.currentRows,u=r.columnReordering,f=r.draggedHeaderRef,h=r.forceUpdate,v=r.headerContainerRef,m=r.headersRef,p=r.hiddenColumns,w=r.hoveredHeaderRef,R=r.isWidthDragging,x=r.mainBodyRef,b=r.mainTemplateColumns,C=r.onSort,y=r.onTableHeaderDragEnd,j=r.pinnedLeftColumns,H=r.pinnedLeftHeaderRef,E=r.pinnedLeftTemplateColumns,M=r.pinnedRightColumns,I=r.pinnedRightHeaderRef,D=r.pinnedRightTemplateColumns,k=r.selectableColumns,N=r.setIsWidthDragging,L=r.setSelectedCells,T=r.sort,B=r.sortDownIcon,O=r.sortUpIcon;z(x,l);return e.jsxs("div",t({className:"st-header-container",ref:v},{children:[j.length>0&&e.jsx("div",t({className:"st-header-pinned-left",ref:H,style:{gridTemplateColumns:E}},{children:e.jsx(S,t({allowAnimations:s,draggedHeaderRef:f,headersRef:m,mainBodyRef:x,pauseAnimation:R,rowIndex:0},{children:null===(o=m.current)||void 0===o?void 0:o.map((function(t,r){return g({hiddenColumns:p,header:t,pinned:"left"})?e.jsx(P,{columnResizing:c,currentRows:d,columnReordering:u,draggedHeaderRef:f,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onSort:C,onTableHeaderDragEnd:y,ref:n.createRef(),selectableColumns:k,setIsWidthDragging:N,setSelectedCells:L,sort:T,sortDownIcon:B,sortUpIcon:O},t.accessor):null}))}))})),e.jsx("div",t({className:"st-header-main",onScroll:function(e){var n,t,r=null===(n=l.current)||void 0===n?void 0:n.scrollLeft;void 0!==r&&(null===(t=x.current)||void 0===t||t.scrollTo(r,0))},ref:l,style:{gridTemplateColumns:b}},{children:e.jsx(S,t({allowAnimations:s,draggedHeaderRef:f,headersRef:m,mainBodyRef:x,pauseAnimation:R,rowIndex:0},{children:null===(i=m.current)||void 0===i?void 0:i.map((function(t,r){return g({hiddenColumns:p,header:t})?e.jsx(P,{columnResizing:c,currentRows:d,columnReordering:u,draggedHeaderRef:f,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onSort:C,onTableHeaderDragEnd:y,ref:n.createRef(),selectableColumns:k,setIsWidthDragging:N,setSelectedCells:L,sort:T,sortDownIcon:B,sortUpIcon:O},t.accessor):null}))}))})),M.length>0&&e.jsx("div",t({className:"st-header-pinned-right",ref:I,style:{gridTemplateColumns:D}},{children:e.jsx(S,t({allowAnimations:s,draggedHeaderRef:f,headersRef:m,mainBodyRef:x,pauseAnimation:R,rowIndex:0},{children:null===(a=m.current)||void 0===a?void 0:a.map((function(t,r){return g({hiddenColumns:p,header:t,pinned:"right"})?e.jsx(P,{columnResizing:c,currentRows:d,columnReordering:u,draggedHeaderRef:f,forceUpdate:h,headersRef:m,hoveredHeaderRef:w,index:r,onSort:C,onTableHeaderDragEnd:y,reverse:!0,ref:n.createRef(),selectableColumns:k,setIsWidthDragging:N,setSelectedCells:L,sort:T,sortDownIcon:B,sortUpIcon:O},t.accessor):null}))}))}))]}))},F=function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"minmax(".concat(n,", ").concat(t,")"):t},V=function(r){var o=r.allowAnimations,i=r.columnResizing,a=r.currentRows,s=r.columnReordering,l=r.draggedHeaderRef,c=r.editColumns,d=r.forceUpdate,u=r.getBorderClass,f=r.handleMouseDown,h=r.handleMouseOver,v=r.headersRef,m=r.hiddenColumns,g=r.hoveredHeaderRef,p=r.isSelected,w=r.isTopLeftCell,R=r.isWidthDragging,x=r.mainBodyRef,b=r.onCellEdit,C=r.onSort,y=r.onTableHeaderDragEnd,j=r.pinnedLeftRef,H=r.pinnedRightRef,E=r.scrollbarWidth,S=r.selectableColumns,M=r.setIsWidthDragging,I=r.setSelectedCells,D=r.shouldPaginate,k=r.sort,N=r.sortDownIcon,T=r.sortUpIcon,B=r.tableBodyContainerRef,O=n.useRef(null),W=n.useRef(null),A=n.useRef(null),P=n.useRef(null),z=v.current.filter((function(e){return!e.hide&&!e.pinned})),V=v.current.filter((function(e){return"left"===e.pinned&&!0!==e.hide})),q=v.current.filter((function(e){return"right"===e.pinned&&!0!==e.hide})),J=n.useMemo((function(){return"".concat(V.map((function(e){return F(e)})).join(" "))}),[V]),X=n.useMemo((function(){return"".concat(z.filter((function(e){return!0!==m[e.accessor]})).map((function(e){return F(e)})).join(" "))}),[z,m]),G=n.useMemo((function(){return"".concat(q.map((function(e){return F(e)})).join(" "))}),[q]),Y={allowAnimations:o,centerHeaderRef:A,columnResizing:i,currentRows:a,columnReordering:s,draggedHeaderRef:l,forceUpdate:d,headerContainerRef:O,headersRef:v,hiddenColumns:m,hoveredHeaderRef:g,isWidthDragging:R,mainBodyRef:x,mainTemplateColumns:X,onSort:C,onTableHeaderDragEnd:y,pinnedLeftColumns:V,pinnedLeftHeaderRef:W,pinnedLeftTemplateColumns:J,pinnedRightColumns:q,pinnedRightHeaderRef:P,pinnedRightTemplateColumns:G,selectableColumns:S,setIsWidthDragging:M,setSelectedCells:I,sort:k,sortDownIcon:N,sortUpIcon:T,tableBodyContainerRef:B},K={allowAnimations:o,centerHeaderRef:A,currentRows:a,draggedHeaderRef:l,getBorderClass:u,handleMouseDown:f,handleMouseOver:h,headerContainerRef:O,headers:v.current,headersRef:v,hiddenColumns:m,hoveredHeaderRef:g,isSelected:p,isTopLeftCell:w,isWidthDragging:R,mainBodyRef:x,mainTemplateColumns:X,onCellEdit:b,onTableHeaderDragEnd:y,pinnedLeftColumns:V,pinnedLeftHeaderRef:W,pinnedLeftRef:j,pinnedLeftTemplateColumns:J,pinnedRightColumns:q,pinnedRightHeaderRef:P,pinnedRightRef:H,pinnedRightTemplateColumns:G,scrollbarWidth:E,shouldPaginate:D,tableBodyContainerRef:B};return e.jsxs("div",t({className:"st-table-content",style:{width:c?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(U,t({},Y)),e.jsx(L,t({},K))]}))},q=function(e){var t=e.callback,r=e.ref,o=e.widthAttribute;n.useEffect((function(){var e=r.current;if(e){var n=function(){t(e[o]||0)};n();var i=new ResizeObserver((function(){n()}));return i.observe(e),function(){return i.disconnect()}}}),[t,r,o])},J=function(r){var o=r.mainBodyRef,i=r.pinnedLeftRef,a=r.pinnedRightRef,s=r.tableContentWidth,l=n.useState(0),c=l[0],d=l[1],u=n.useState(0),f=u[0],h=u[1],v=n.useState(0),m=v[0],g=v[1],p=n.useRef(null);return q({widthAttribute:"offsetWidth",callback:d,ref:i}),q({widthAttribute:"scrollWidth",callback:g,ref:o}),q({widthAttribute:"offsetWidth",callback:h,ref:a}),z(o,p),!o.current||o.current.scrollWidth<=o.current.clientWidth?null:e.jsxs("div",t({className:"st-horizontal-scrollbar-container",style:{width:s}},{children:[c>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:c}}),m>0&&e.jsx("div",t({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&o.current&&o.current.scrollTo({left:n,behavior:"auto"})},ref:p},{children:e.jsx("div",{style:{width:m}})})),f>0&&e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:f}})]}))},X=function(r){var o=r.checked,i=void 0!==o&&o,a=r.children,s=r.onChange,l=n.useState(i),c=l[0],d=l[1];return e.jsxs("label",t({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:c,className:"st-checkbox-input",onChange:function(){var e=!c;d(e),s&&s(e)},type:"checkbox"}),e.jsx("span",t({className:"st-checkbox-custom ".concat(c?"st-checked":"")},{children:c&&e.jsx("span",{className:"st-checkbox-checkmark"})})),a]}))},G=function(n){var r=n.headers,o=n.open,i=n.position;n.setOpen;var a=n.setHiddenColumns,s=n.hiddenColumns,l="left"===i?"left":"";return e.jsx("div",t({className:"st-column-editor-popout ".concat(o?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",t({className:"st-column-editor-popout-content"},{children:r.map((function(n,r){return e.jsx(X,t({checked:s[n.accessor],onChange:function(e){var r;return a(t(t({},s),((r={})[n.accessor]=e,r)))}},{children:n.label}),r)}))}))}))},Y=function(r){var o=r.columnEditorText,i=r.editColumns,a=r.editColumnsInitOpen,s=r.headers,l=r.position,c=void 0===l?"right":l,d=r.setHiddenColumns,u=r.hiddenColumns,f=n.useState(a),h=f[0],v=f[1];return i?e.jsxs("div",t({className:"st-column-editor ".concat(h?"open":""," ").concat(c),onClick:function(){return function(e){v(e)}(!h)}},{children:[e.jsx("div",t({className:"st-column-editor-text"},{children:o})),e.jsx(G,{headers:s,open:h,position:c,setOpen:v,setHiddenColumns:d,hiddenColumns:u})]})):null};!function(e){e.Left="left",e.Right="right"}(s||(s={}));var K=function(r){var o=r.allowAnimations,i=void 0!==o&&o,a=r.columnEditorPosition,h=void 0===a?s.Right:a,v=r.columnEditorText,m=void 0===v?"Columns":v,g=r.columnResizing,p=void 0!==g&&g,w=r.defaultHeaders,R=r.editColumns,x=void 0!==R&&R,b=r.editColumnsInitOpen,C=void 0!==b&&b,y=r.columnReordering,j=void 0!==y&&y,H=r.height,E=r.hideFooter,S=void 0!==E&&E,M=r.nextIcon,I=void 0===M?e.jsx(d,{className:"st-next-prev-icon"}):M,D=r.onCellEdit,k=r.onColumnOrderChange,N=r.prevIcon,L=void 0===N?e.jsx(c,{className:"st-next-prev-icon"}):N,T=r.rows,B=r.rowsPerPage,O=void 0===B?10:B,A=r.selectableCells,P=void 0!==A&&A,z=r.selectableColumns,U=void 0!==z&&z,F=r.shouldPaginate,q=void 0!==F&&F,X=r.sortDownIcon,G=void 0===X?e.jsx(f,{className:"st-sort-icon"}):X,K=r.sortUpIcon,_=void 0===K?e.jsx(u,{className:"st-sort-icon"}):K,$=r.theme,Q=void 0===$?"light":$,Z=n.useRef(null),ee=n.useRef(w),ne=n.useRef(null),te=n.useRef(null),re=n.useRef(null),oe=n.useRef(null),ie=n.useRef(null),ae=n.useState(!1),se=ae[0],le=ae[1],ce=n.useState(1),de=ce[0],ue=ce[1],fe=n.useState(0),he=fe[0],ve=fe[1],me=n.useState(0),ge=me[0],pe=me[1],we=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),i=o[0],a=o[1],s=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),l=n.useState(s),c=l[0],d=l[1],u=n.useMemo((function(){return i?W(t,r,i).sortedData:r}),[r,i,t]);return{sort:i,setSort:a,updateSort:function(e,n){var r=t.find((function(e){return e.accessor===n}));r&&a((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:r,direction:"descending"}:null:{key:r,direction:"ascending"}}))},sortedRows:u,hiddenColumns:c,setHiddenColumns:d}}({headers:ee.current,tableRows:T}),Re=we.sort,xe=we.sortedRows,be=we.hiddenColumns,Ce=we.setHiddenColumns,ye=we.updateSort,je=n.useReducer((function(e){return e+1}),0)[1],He=function(e){var t=e.selectableCells,r=e.headers,o=e.rows,i=n.useState(new Set),a=i[0],s=i[1],l=n.useRef(!1),c=n.useRef(null),d=n.useCallback((function(){var e=Array.from(a).reduce((function(e,n){var t=n.split("-").map(Number),i=t[0],a=t[1];return e[i]||(e[i]=[]),e[i][a]=o[i][r[a].accessor],e}),{}),n=Object.values(e).map((function(e){return Object.values(e).join("\t")})).join("\n");a.size>0&&navigator.clipboard.writeText(n)}),[a,o,r]);n.useEffect((function(){var e=function(e){(e.ctrlKey||e.metaKey)&&"c"===e.key&&d()};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[d]);var u=n.useCallback((function(e,n){return a.has("".concat(e,"-").concat(n))}),[a]),f=n.useCallback((function(e,n){var t=[];return u(e-1,n)||t.push("st-selected-top-border"),u(e+1,n)||t.push("st-selected-bottom-border"),u(e,n-1)||t.push("st-selected-left-border"),u(e,n+1)||t.push("st-selected-right-border"),t.join(" ")}),[u]),h=n.useMemo((function(){var e=Math.min.apply(Math,Array.from(a).map((function(e){return parseInt(e.split("-")[0])}))),n=Math.min.apply(Math,Array.from(a).map((function(e){return parseInt(e.split("-")[1])})));return function(t,r){return t===e&&r===n}}),[a]);return{selectedCells:a,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex;t&&(l.current=!0,c.current={row:r,col:n},s(new Set(["".concat(r,"-").concat(n)])))},handleMouseOver:function(e,n){if(t&&l.current&&c.current){for(var r=new Set,o=Math.min(c.current.row,e),i=Math.max(c.current.row,e),a=Math.min(c.current.col,n),d=Math.max(c.current.col,n),u=o;u<=i;u++)for(var f=a;f<=d;f++)r.add("".concat(u,"-").concat(f));s(r)}},handleMouseUp:function(){l.current=!1,c.current=null},isSelected:u,getBorderClass:f,isTopLeftCell:h,setSelectedCells:s}}({selectableCells:P,headers:ee.current,rows:xe}),Ee=He.handleMouseDown,Se=He.handleMouseOver,Me=He.handleMouseUp,Ie=He.isSelected,De=He.getBorderClass,ke=He.isTopLeftCell,Ne=He.setSelectedCells,Le=n.useMemo((function(){return q?xe.slice((de-1)*O,de*O):xe}),[de,O,q,xe]),Te=n.useCallback((function(e,n){ye(e,n)}),[ye]),Be=n.useCallback((function(e){ee.current=e,je(),null==k||k(e)}),[k]);return n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||U&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||Ne(new Set)};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[U,Ne]),n.useLayoutEffect((function(){if(ie.current){var e=ie.current.offsetWidth-ie.current.clientWidth,n=ie.current.clientWidth;ve(e),pe(n)}}),[]),n.useLayoutEffect((function(){var e=function(){if(je(),ie.current){var e=ie.current.offsetWidth-ie.current.clientWidth,n=ie.current.clientWidth;ve(e),pe(n)}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),e.jsxs("div",t({className:"simple-table-root st-wrapper theme-".concat(Q),style:H?{height:H}:{}},{children:[e.jsxs("div",t({className:"st-table-wrapper-container"},{children:[e.jsxs("div",t({className:"st-table-wrapper",onMouseUp:Me,onMouseLeave:Me},{children:[e.jsx(V,{allowAnimations:i,columnResizing:p,currentRows:Le,draggedHeaderRef:Z,editColumns:x,columnReordering:j,forceUpdate:je,getBorderClass:De,handleMouseDown:Ee,handleMouseOver:Se,headers:ee.current,headersRef:ee,hiddenColumns:be,hoveredHeaderRef:ne,isSelected:Ie,isTopLeftCell:ke,isWidthDragging:se,mainBodyRef:te,onCellEdit:D,onSort:Te,onTableHeaderDragEnd:Be,pinnedLeftRef:re,pinnedRightRef:oe,scrollbarWidth:he,selectableColumns:U,setIsWidthDragging:le,setSelectedCells:Ne,shouldPaginate:q,sort:Re,sortDownIcon:G,sortUpIcon:_,tableBodyContainerRef:ie}),e.jsx(Y,{columnEditorText:m,editColumns:x,editColumnsInitOpen:C,headers:ee.current,hiddenColumns:be,position:h,setHiddenColumns:Ce})]})),e.jsx(J,{mainBodyRef:te,pinnedLeftRef:re,pinnedRightRef:oe,tableContentWidth:ge})]})),e.jsx(l,{currentPage:de,hideFooter:S,nextIcon:I,onPageChange:ue,prevIcon:L,rowsPerPage:O,shouldPaginate:q,totalRows:xe.length})]}))};K.defaultProps={allowAnimations:!1,columnEditorPosition:s.Right,columnEditorText:"Columns",columnResizing:!1,defaultHeaders:[],editColumns:!1,editColumnsInitOpen:!1,columnReordering:!1,height:"",hideFooter:!1,nextIcon:e.jsx(d,{className:"st-next-prev-icon"}),onCellEdit:function(){},prevIcon:e.jsx(c,{className:"st-next-prev-icon"}),rows:[],rowsPerPage:10,selectableCells:!1,selectableColumns:!1,shouldPaginate:!1,sortDownIcon:e.jsx(f,{className:"st-sort-icon"}),sortUpIcon:e.jsx(u,{className:"st-sort-icon"}),theme:"light"};var _=n.memo(K);exports.SimpleTable=_;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=function(){return t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};function r(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function o(e,n,t,r){return new(t||(t=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,s)}l((r=r.apply(e,n||[])).next())}))}function a(e,n){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=n.call(e,a)}catch(e){s=[6,e],r=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function i(e,n,t){if(t||2===arguments.length)for(var r,o=0,a=n.length;o<a;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var s,l=function(n){var r=n.currentPage,o=n.hideFooter,a=n.nextIcon,i=n.onPageChange,s=n.onNextPage,l=n.onPreviousPage,c=n.prevIcon,d=n.shouldPaginate,u=n.totalPages;if(o||!d)return null;var f=!(r>1)&&!l,h=!(r<u)&&!s;return e.jsxs("div",t({className:"st-footer"},{children:[e.jsx("button",t({className:"st-next-prev-btn ".concat(f?"disabled":""),onClick:function(){var e=r-1;e>=1&&i(e),l&&l(e-1)},disabled:f},{children:c})),e.jsx("button",t({className:"st-next-prev-btn ".concat(h?"disabled":""),onClick:function(){var e=r+1;(e<=u||s)&&i(e),s&&s(r)},disabled:h},{children:a})),Array.from({length:u},(function(n,o){return e.jsx("button",t({onClick:function(){var e;(e=o+1)>=1&&e<=u&&(i(e),e>r&&s?s(e-1):e<r&&l&&l(e-1))},className:"st-page-btn ".concat(r===o+1?"active":"")},{children:o+1}),o)}))]}))},c=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},d=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},u=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},f=function(n){var r=n.className;return e.jsx("svg",t({className:r,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},h=40,g=function(e){return e.position*(e.rowHeight+1)-1},v=function(e){return e.position*(e.rowHeight+1)},m=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},p=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},w=function(n){var r=n.value,o=n.onBlur,a=n.onChange;return e.jsxs("select",t({value:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;a("true"===n)}},{children:[e.jsx("option",t({value:"true"},{children:"True"})),e.jsx("option",t({value:"false"},{children:"False"}))]}))},R=function(t){var r=t.defaultValue,o=t.onBlur,a=t.onChange,i=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;a(n)}})},x=function(t){var r=t.defaultValue,o=t.onBlur,a=t.onChange,i=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&a(n)}})},C=function(n){var t=n.onChange,r=n.setIsEditing,o=n.value,a=function(e){null==t||t(e)},i=function(){r(!1)};return e.jsx(e.Fragment,{children:"string"==typeof o||null==o?e.jsx(R,{defaultValue:o,onBlur:i,onChange:a}):"boolean"==typeof o?e.jsx(w,{onBlur:i,onChange:a,value:o}):"number"==typeof o?e.jsx(x,{defaultValue:o,onBlur:i,onChange:a}):null})},b=0,y=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===b||o-b>=r)&&(b=o,n(t))}},j=Date.now(),H={screenX:0,screenY:0},S=function(e){var t,r,o=e.draggedHeaderRef,a=e.headersRef,s=e.hoveredHeaderRef,l=e.onColumnOrderChange,c=e.onTableHeaderDragEnd,d=(t=a.current,r=n.useRef(t),n.useEffect((function(){r.current=t}),[t]),r.current);return{handleDragStart:function(e){o.current=e,j=Date.now()},handleDragOver:function(e){var n,t=e.event,r=e.hoveredHeader;if(t.preventDefault(),a.current){var l=t.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=t.screenX,f=t.screenY,h=Math.sqrt(Math.pow(u-H.screenX,2)+Math.pow(f-H.screenY,2));s.current=r;var g=i([],a.current,!0),v=g.findIndex((function(e){var n;return e.accessor===(null===(n=o.current)||void 0===n?void 0:n.accessor)})),m=g.findIndex((function(e){return e.accessor===r.accessor})),p=g.splice(v,1)[0];if(g.splice(m,0,p),!(l||r.accessor===(null===(n=o.current)||void 0===n?void 0:n.accessor)||null===o.current||h<10||void 0===v||void 0===m||JSON.stringify(g)===JSON.stringify(a.current))){var w=Date.now();JSON.stringify(g)===JSON.stringify(d)&&w-j<800&&h<50||(j=w,H={screenX:u,screenY:f},c(g))}}},handleDragEnd:function(){o.current=null,s.current=null,null==l||l(a.current)}}},M=n.forwardRef((function(r,o){var a,i,s=r.borderClass,l=r.colIndex,c=r.draggedHeaderRef,u=r.header,h=r.headersRef,g=r.hoveredHeaderRef,v=r.isSelected,p=r.isTopLeftCell,w=r.onCellEdit,R=r.onExpandRowClick,x=r.onMouseDown,b=r.onMouseOver,j=r.onTableHeaderDragEnd,H=r.rowIndex,M=r.visibleRow,E=M.depth,D=M.row,I=n.useState(D.rowData[u.accessor]),k=I[0],L=I[1],N=n.useState(!1),T=N[0],O=N[1],B=S({draggedHeaderRef:c,headersRef:h,hoveredHeaderRef:g,onTableHeaderDragEnd:j}).handleDragOver,W=y(),A=Boolean(null===(i=null===(a=D.rowMeta)||void 0===a?void 0:a.children)||void 0===i?void 0:i.length),P=Boolean(null==u?void 0:u.isEditable),z=H%2==0,U="st-cell ".concat(E>0&&u.expandable?"st-cell-depth-".concat(E):""," ").concat(v?p?"st-cell-selected-first-cell ".concat(s):"st-cell-selected ".concat(s):""," ").concat(z?"st-cell-odd-row":"st-cell-even-row"," ").concat(P?"clickable":""," ").concat("right"===u.align?"right-aligned":"center"===u.align?"center-aligned":"left-aligned");return n.useEffect((function(){L(D.rowData[u.accessor])}),[u.accessor,D]),T?e.jsx("div",t({className:"st-cell-editing ".concat(z?"st-cell-odd-row":"st-cell-even-row"),id:m({accessor:u.accessor,rowIndex:H+1})},{children:e.jsx(C,{onChange:function(e){L(e),null==w||w({accessor:u.accessor,newValue:e,row:D})},setIsEditing:O,value:k})})):e.jsxs("div",t({className:U,id:m({accessor:u.accessor,rowIndex:H+1}),onDoubleClick:function(){return u.isEditable&&O(!0)},onMouseDown:function(){return x(H,l)},onMouseOver:function(){return b(H,l)},onDragOver:function(e){return W({callback:B,callbackProps:{event:e,hoveredHeader:u},limit:50})},ref:o},{children:[u.expandable&&A?D.rowMeta.isExpanded?e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return R(D.rowMeta.rowId)}},{children:e.jsx(f,{className:"st-sort-icon"})})):e.jsx("div",t({className:"st-sort-icon-container",onClick:function(){return R(D.rowMeta.rowId)}},{children:e.jsx(d,{className:"st-sort-icon"})})):null,e.jsx("span",t({className:"st-cell-content"},{children:u.cellRenderer?u.cellRenderer({accessor:u.accessor,colIndex:l,row:D}):k}))]}))})),E=function(n){var o=n.allowAnimations,a=n.children,i=r(n,["allowAnimations","children"]);return o?e.jsx(D,t({},i,{children:a})):e.jsx(e.Fragment,{children:a})},D=function(t){var r=t.allowHorizontalAnimate,o=void 0===r||r,a=t.children,i=t.draggedHeaderRef,s=t.headersRef,l=t.isBody,c=t.mainBodyRef,d=t.pauseAnimation,u=t.rowIndex,f=n.useRef(!1),h=n.useState({}),g=h[0],v=h[1],p=n.useRef({}),w=s.current;return n.useLayoutEffect((function(){if(w){var e=function(e){var n=e.currentHeaders,t=e.draggedHeaderRef,r=e.rowIndex,o={};return n.forEach((function(e){var n;if(e){var a=document.getElementById(m({accessor:e.accessor,rowIndex:r}));if(a){var i=a.getAnimations().some((function(e){return"running"===e.playState})),s=a.getBoundingClientRect();i&&(null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.accessor)!==e.accessor?o[e.accessor]=!1:o[e.accessor]=s}}})),o}({currentHeaders:w,draggedHeaderRef:i,rowIndex:u});JSON.stringify(e)!==JSON.stringify(g)&&(p.current=g,v(e))}}),[g,w,i,l,u]),n.useLayoutEffect((function(){var e=c.current,n=function(){f.current=!0},t=function(){f.current=!1};return null==e||e.addEventListener("scroll",n),null==e||e.addEventListener("scrollend",t),function(){null==e||e.removeEventListener("scroll",n),null==e||e.removeEventListener("scrollend",t)}}),[i,c]),n.useEffect((function(){d||f.current||Object.keys(p.current).length&&w&&w.forEach((function(e){var n=document.getElementById(m({accessor:e.accessor,rowIndex:u}));if(n){var t=p.current[e.accessor],r=g[e.accessor];if(t&&r){var a=t.left-r.left,i=o?0:t.top-r.top,s=Math.abs(a),l=Math.abs(i);(s>10||l>10)&&requestAnimationFrame((function(){n.style.transform="translate(".concat(a,"px, ").concat(i,"px)"),n.style.transition="transform 0s",requestAnimationFrame((function(){n.style.transform="",n.style.transition="transform ".concat(400,"ms ease-out")}))}))}}}))}),[o,g,w,l,d,p,u]),e.jsx(e.Fragment,{children:a})},I=function(o){var a=o.getBorderClass,i=o.handleMouseDown,s=o.handleMouseOver,l=o.headers,c=o.hiddenColumns,d=o.isSelected,u=o.isTopLeftCell,f=o.onExpandRowClick,h=o.pinned,g=o.rowIndex,v=o.visibleRow,w=r(o,["getBorderClass","handleMouseDown","handleMouseOver","headers","hiddenColumns","isSelected","isTopLeftCell","onExpandRowClick","pinned","rowIndex","visibleRow"]);return e.jsx(E,t({allowAnimations:w.allowAnimations,allowHorizontalAnimate:w.shouldPaginate,draggedHeaderRef:w.draggedHeaderRef,headersRef:w.headersRef,isBody:!0,mainBodyRef:w.mainBodyRef,pauseAnimation:w.isWidthDragging,rowIndex:g+1},{children:l.map((function(e,r){return p({hiddenColumns:c,header:e,pinned:h})?n.createElement(M,t({},w,{borderClass:a(g,r),colIndex:r,header:e,isSelected:d(g,r),isTopLeftCell:u(g,r),key:m({accessor:e.accessor,rowIndex:g+1}),onExpandRowClick:f,onMouseDown:function(){return i({rowIndex:g,colIndex:r})},onMouseOver:function(){return s(g,r)},rowIndex:g,visibleRow:v})):null}))}))},k=function(n){var r=n.getNextRowIndex,o=n.gridTemplateColumns,a=n.index,i=n.pinned,s=n.props,l=n.rowHeight,c=n.visibleRow,d=c.position,u=r();return e.jsx("div",t({className:"st-table-row",style:{gridTemplateColumns:o,top:v({position:d,rowHeight:l}),height:"".concat(l,"px")}},{children:e.jsx(I,t({pinned:i,rowIndex:u,visibleRow:c},s),a)}))},L=function(n){var r=n.lastGroupRow,o=n.position,a=n.rowHeight,i=n.templateColumns;return e.jsx("div",t({className:"st-row-separator ".concat(r?"st-last-group-row":""),style:{display:"grid",gridTemplateColumns:i,position:"absolute",top:g({position:o,rowHeight:a}),minWidth:"100%"}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},N=function(o){o.headerContainerRef;var a=o.onExpandRowClick,i=o.pinned,s=o.rowHeight,l=o.sectionRef,c=o.templateColumns,d=o.totalHeight,u=o.visibleRows,f=o.width,h=r(o,["headerContainerRef","onExpandRowClick","pinned","rowHeight","sectionRef","templateColumns","totalHeight","visibleRows","width"]),g=i?"st-table-body-pinned-".concat(i):"st-table-body-main",v=n.useRef(0);n.useEffect((function(){v.current=0}));var m=function(){return v.current++};return e.jsx("div",t({className:g,ref:l,style:{position:"relative",height:"".concat(d,"px"),width:f}},{children:u.map((function(r,o){var l,d,u=Boolean(null===(d=null===(l=r.row.rowMeta)||void 0===l?void 0:l.children)||void 0===d?void 0:d.length);return e.jsxs(n.Fragment,{children:[e.jsx(k,{getNextRowIndex:m,gridTemplateColumns:c,index:o,pinned:i,props:t(t({},h),{onExpandRowClick:a}),rowHeight:s,visibleRow:r}),0!==o&&e.jsx(L,{lastGroupRow:u,position:r.position,rowHeight:s,templateColumns:c})]},o)}))}))},T=function(r){var s,l,c,d,u,f=r.centerHeaderRef,g=r.currentRows,v=r.headerContainerRef,m=r.mainBodyRef,p=r.mainTemplateColumns,w=r.pinnedLeftColumns,R=r.pinnedLeftHeaderRef,x=r.pinnedLeftRef,C=r.pinnedLeftTemplateColumns,b=r.pinnedRightColumns,y=r.pinnedRightHeaderRef,j=r.pinnedRightRef,H=r.pinnedRightTemplateColumns,S=r.scrollbarWidth,M=r.tableBodyContainerRef;!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,a=n.useState(!1),i=a[0],s=a[1];n.useEffect((function(){var e=null==t?void 0:t.current;if(i&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[t,i,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;s(e)}};o();var a=new ResizeObserver((function(){o()}));return a.observe(n),function(){n&&a.unobserve(n)}}}),[t,r])}({headerContainerRef:v,mainSectionRef:M,scrollbarWidth:S});var E=n.useRef(null),D=n.useRef(null),I=n.useState(g),k=I[0],L=I[1],T=n.useState(1),O=T[0],B=T[1],W=n.useState(!1),A=W[0],P=W[1],z=n.useState(!0),U=z[0],F=z[1],V=n.useState(0),q=V[0],J=V[1];n.useEffect((function(){L(g)}),[g]);var X=function(e){var n=0,t=function(e){e.forEach((function(e){n+=1,e.rowMeta.isExpanded&&e.rowMeta.children&&t(e.rowMeta.children)}))};return t(e),n}(k),K=41*X-1,G=function(e){var n=function(r){return r.rowMeta.rowId===e&&r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{isExpanded:!r.rowMeta.isExpanded})}):r.rowMeta.children?t(t({},r),{rowMeta:t(t({},r.rowMeta),{children:r.rowMeta.children.map(n)})}):r};L((function(e){return e.map(n)}))},Y=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.containerHeight,r=e.rowHeight,o=e.rows,a=e.scrollTop,i=[],s=0,l=Math.max(0,a-r*n),c=a+t+r*n,d=function(e,n){for(var t,o=0,a=e;o<a.length;o++){var u=a[o],f=s*r;if(f>=c)break;f+r>l&&i.push({row:u,depth:n,position:s,isLastGroupRow:Boolean(null===(t=u.rowMeta.children)||void 0===t?void 0:t.length)&&n>1}),s+=1,u.rowMeta.isExpanded&&u.rowMeta.children&&d(u.rowMeta.children,n+1)}};return d(o,0),i}({bufferRowCount:5,containerHeight:600,rowHeight:h,rows:k,scrollTop:q})}),[k,q]),_=n.useCallback((function(){return o(void 0,void 0,void 0,(function(){var e;return a(this,(function(n){return A||!U||(P(!0),e=g.slice(20*O,20*(O+1)),L((function(n){return i(i([],n,!0),e,!0)})),B((function(e){return e+1})),P(!1),e.length<20/3&&F(!1)),[2]}))}))}),[g,U,A,O]),$=n.useCallback((function(e){e[0].isIntersecting&&U&&!A&&_()}),[U,A,_]);n.useEffect((function(){return E.current=new IntersectionObserver($,{root:null,rootMargin:"100px",threshold:0}),M.current&&E.current.observe(M.current),function(){E.current&&E.current.disconnect()}}),[$,k,M]);var Q=(null===(s=R.current)||void 0===s?void 0:s.clientWidth)?(null===(l=R.current)||void 0===l?void 0:l.clientWidth)+1:0,Z=null===(c=f.current)||void 0===c?void 0:c.clientWidth,ee=(null===(d=y.current)||void 0===d?void 0:d.clientWidth)?(null===(u=y.current)||void 0===u?void 0:u.clientWidth)+1:0;return e.jsxs("div",t({className:"st-table-body-container",ref:M,onScroll:function(e){var n=e.currentTarget.scrollTop;D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame((function(){J(n)}))}},{children:[w.length>0&&e.jsx(N,t({},r,{onExpandRowClick:G,pinned:"left",rowHeight:h,sectionRef:x,templateColumns:C,totalHeight:K,visibleRows:Y,width:Q})),e.jsx(N,t({},r,{onExpandRowClick:G,rowHeight:h,sectionRef:m,templateColumns:p,totalHeight:K,visibleRows:Y,width:Z})),b.length>0&&e.jsx(N,t({},r,{onExpandRowClick:G,pinned:"right",rowHeight:h,sectionRef:j,templateColumns:H,totalHeight:K,visibleRows:Y,width:ee}))]}))},O={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var a=r.getTime()-o.getTime();return"ascending"===t?a:-a},enum:function(e,n,t){return O.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?O.string(e,n,t):"number"==typeof e&&"number"==typeof n?O.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?O.boolean(e,n,t):O.string(String(e),String(n),t)}},B=function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),a=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===a?o*=1e12:"B"===a?o*=1e9:"M"===a?o*=1e6:"K"===a&&(o*=1e3),o}}return parseFloat(t)||0},a=o(e),i=o(n);return O.number(a,i,r)}return"date"===t?O.date(String(e),String(n),r):"boolean"===t?O.boolean(Boolean(e),Boolean(n),r):"enum"===t?O.enum(String(e),String(n),r):O.string(String(e),String(n),r)},W=function(e,n,r){var o=r.find((function(e){return e.accessor===n.key.accessor})),a=(null==o?void 0:o.type)||"string",s=n.direction,l=new Map,c=new Map,d="";e.forEach((function(e){var t;if(e.rowData&&!e.rowData[n.key.accessor]&&void 0!==e.rowMeta.isExpanded){var r=(e.rowData.sector||"group_".concat(l.size)).toString();d=r,c.set(d,e),l.has(d)||l.set(d,[])}else if(d){var o=l.get(d)||[];o.push(e),l.set(d,o)}else{var a="default";l.has(a)||l.set(a,[]),null===(t=l.get(a))||void 0===t||t.push(e)}}));var u=[];return l.forEach((function(e,o){if(c.has(o)){var l=c.get(o);l.rowMeta.children&&l.rowMeta.children.length>0&&(l.rowMeta.children=A(l.rowMeta.children,n,r)),u.push(l)}var d=i([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],i=t.rowData[r];return B(o,i,a,s)}));u.push.apply(u,d.map((function(e){var o=t({},e);if(o.rowMeta.children&&o.rowMeta.children.length>0){var a=A(o.rowMeta.children,n,r);o.rowMeta=t(t({},o.rowMeta),{children:a})}return o})))})),u},A=function(e,n,r){var o=r.find((function(e){return e.accessor===n.key.accessor})),a=(null==o?void 0:o.type)||"string",s=n.direction;return i([],e,!0).sort((function(e,t){if(!(null==e?void 0:e.rowData)||!(null==t?void 0:t.rowData))return 0;var r=n.key.accessor,o=e.rowData[r],i=t.rowData[r];return B(o,i,a,s)})).map((function(e){return e.rowMeta.children&&e.rowMeta.children.length>0?t(t({},e),{rowMeta:t(t({},e.rowMeta),{children:A(e.rowMeta.children,n,r)})}):e}))},P=function(e){var n=e.event,t=e.forceUpdate,r=e.header,o=e.headersRef,a=e.index;e.reverse;var i=e.setIsWidthDragging,s=e.startWidth;i(!0),n.preventDefault();var l=n.clientX;if(r){var c=function(e){var n=Math.max(s+(e.clientX-l),40);r&&o.current&&(o.current[a].width=n,t())},d=function(){document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),i(!1)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",d)}},z=n.forwardRef((function(r,o){var a,i=r.columnResizing,s=r.currentRows,l=r.columnReordering,c=r.draggedHeaderRef,d=r.forceUpdate,u=r.headersRef,f=r.hoveredHeaderRef,h=r.index,g=r.onColumnOrderChange,v=r.onSort,p=r.onTableHeaderDragEnd,w=r.reverse,R=r.rowHeight,x=r.selectableColumns,C=r.setIsWidthDragging,b=r.setSelectedCells,j=r.sort,H=r.sortDownIcon,M=r.sortUpIcon,E=n.useState(!1),D=E[0],I=E[1],k=null===(a=u.current)||void 0===a?void 0:a[h],L=Boolean(null==k?void 0:k.isSortable),N="st-header-cell ".concat(k===f.current?"st-hovered":""," ").concat(D?"st-dragging":""," ").concat(L?"clickable":""," ").concat(l&&!L?"columnReordering":""," ").concat("right"===(null==k?void 0:k.align)?"right-aligned":"center"===(null==k?void 0:k.align)?"center-aligned":""),T=S({draggedHeaderRef:c,headersRef:u,hoveredHeaderRef:f,onColumnOrderChange:g,onTableHeaderDragEnd:p}),O=T.handleDragStart,B=T.handleDragEnd,W=T.handleDragOver,A=y(),z=function(e){var n=e.event,t=e.header;if(x){var r=s.length,o=Array.from({length:r},(function(e,n){return"".concat(n,"-").concat(h)})),a=function(e,n){var t=new Set,o=Math.min(e,n),a=Math.max(e,n);return Array.from({length:r}).forEach((function(e,n){Array.from({length:a-o+1}).forEach((function(e,r){t.add("".concat(n,"-").concat(o+r))}))})),t};n.shiftKey?b((function(e){var n,t=Number(null===(n=Array.from(e)[0])||void 0===n?void 0:n.split("-")[1]),r=Number(o[0].split("-")[1]);return t===r?new Set(o):t>r?a(r,t):a(t,r)})):b(new Set(o))}else t.isSortable&&v(h,t.accessor)};if(n.useEffect((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!k)return null;var U=i&&e.jsx("div",{className:"st-header-resize-handle",onMouseDown:function(e){var n;A({callback:P,callbackProps:{event:e,forceUpdate:d,header:k,headersRef:u,index:h,setIsWidthDragging:C,startWidth:"object"==typeof o&&null!==o&&"current"in o?null===(n=o.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}}),F=j&&j.key.accessor===k.accessor&&e.jsxs("div",t({className:"st-sort-icon-container",onClick:function(e){return z({event:e,header:k})}},{children:["ascending"===j.direction&&M&&M,"descending"===j.direction&&H&&H]}));return e.jsxs("div",t({className:N,id:m({accessor:k.accessor,rowIndex:0}),onDragOver:function(e){A({callback:W,callbackProps:{event:e,hoveredHeader:k},limit:50})},ref:o,style:{width:k.width,height:R}},{children:[w&&U,e.jsxs("div",t({className:"st-header-label ".concat("right"===k.align?"right-aligned":""),draggable:l,onClick:function(e){return z({event:e,header:k})},onDragEnd:function(e){e.preventDefault(),I(!1),B()},onDragStart:function(e){l&&k&&function(e){I(!0),O(e)}(k)}},{children:["right"===k.align&&F,null==k?void 0:k.label,"right"!==k.align&&F]})),!w&&U]}))})),U=function(e,t){n.useEffect((function(){if(e.current){var n=e.current,r=function(){var e,r=null==n?void 0:n.scrollLeft;void 0!==r&&(null===(e=t.current)||void 0===e||e.scrollTo(r,0))};return n.addEventListener("scroll",r),function(){null==n||n.removeEventListener("scroll",r)}}}),[e,t])},F=function(r){var o,a,i,s=r.allowAnimations,l=r.centerHeaderRef,c=r.columnResizing,d=r.currentRows,u=r.columnReordering,f=r.draggedHeaderRef,g=r.forceUpdate,v=r.headerContainerRef,m=r.headersRef,w=r.hiddenColumns,R=r.hoveredHeaderRef,x=r.isWidthDragging,C=r.mainBodyRef,b=r.mainTemplateColumns,y=r.onColumnOrderChange,j=r.onSort,H=r.onTableHeaderDragEnd,S=r.pinnedLeftColumns,M=r.pinnedLeftHeaderRef,D=r.pinnedLeftTemplateColumns,I=r.pinnedRightColumns,k=r.pinnedRightHeaderRef,L=r.pinnedRightTemplateColumns,N=r.selectableColumns,T=r.setIsWidthDragging,O=r.setSelectedCells,B=r.sort,W=r.sortDownIcon,A=r.sortUpIcon;U(C,l);return e.jsxs("div",t({className:"st-header-container",ref:v},{children:[S.length>0&&e.jsx("div",t({className:"st-header-pinned-left",ref:M,style:{gridTemplateColumns:D}},{children:e.jsx(E,t({allowAnimations:s,draggedHeaderRef:f,headersRef:m,mainBodyRef:C,pauseAnimation:x,rowIndex:0},{children:null===(o=m.current)||void 0===o?void 0:o.map((function(t,r){return p({hiddenColumns:w,header:t,pinned:"left"})?e.jsx(z,{columnResizing:c,currentRows:d,columnReordering:u,draggedHeaderRef:f,forceUpdate:g,headersRef:m,hoveredHeaderRef:R,index:r,onColumnOrderChange:y,onSort:j,onTableHeaderDragEnd:H,ref:n.createRef(),rowHeight:h,selectableColumns:N,setIsWidthDragging:T,setSelectedCells:O,sort:B,sortDownIcon:W,sortUpIcon:A},t.accessor):null}))}))})),e.jsx("div",t({className:"st-header-main",onScroll:function(e){var n,t,r=null===(n=l.current)||void 0===n?void 0:n.scrollLeft;void 0!==r&&(null===(t=C.current)||void 0===t||t.scrollTo(r,0))},ref:l,style:{gridTemplateColumns:b}},{children:e.jsx(E,t({allowAnimations:s,draggedHeaderRef:f,headersRef:m,mainBodyRef:C,pauseAnimation:x,rowIndex:0},{children:null===(a=m.current)||void 0===a?void 0:a.map((function(t,r){return p({hiddenColumns:w,header:t})?e.jsx(z,{columnResizing:c,currentRows:d,columnReordering:u,draggedHeaderRef:f,forceUpdate:g,headersRef:m,hoveredHeaderRef:R,index:r,onColumnOrderChange:y,onSort:j,onTableHeaderDragEnd:H,ref:n.createRef(),rowHeight:h,selectableColumns:N,setIsWidthDragging:T,setSelectedCells:O,sort:B,sortDownIcon:W,sortUpIcon:A},t.accessor):null}))}))})),I.length>0&&e.jsx("div",t({className:"st-header-pinned-right",ref:k,style:{gridTemplateColumns:L}},{children:e.jsx(E,t({allowAnimations:s,draggedHeaderRef:f,headersRef:m,mainBodyRef:C,pauseAnimation:x,rowIndex:0},{children:null===(i=m.current)||void 0===i?void 0:i.map((function(t,r){return p({hiddenColumns:w,header:t,pinned:"right"})?e.jsx(z,{columnResizing:c,currentRows:d,columnReordering:u,draggedHeaderRef:f,forceUpdate:g,headersRef:m,hoveredHeaderRef:R,index:r,onColumnOrderChange:y,onSort:j,onTableHeaderDragEnd:H,reverse:!0,ref:n.createRef(),rowHeight:h,selectableColumns:N,setIsWidthDragging:T,setSelectedCells:O,sort:B,sortDownIcon:W,sortUpIcon:A},t.accessor):null}))}))}))]}))},V=function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"minmax(".concat(n,", ").concat(t,")"):t},q=function(r){var o=r.allowAnimations,a=r.columnResizing,i=r.currentRows,s=r.columnReordering,l=r.draggedHeaderRef,c=r.editColumns,d=r.forceUpdate,u=r.getBorderClass,f=r.handleMouseDown,h=r.handleMouseOver,g=r.headersRef,v=r.hiddenColumns,m=r.hoveredHeaderRef,p=r.isSelected,w=r.isTopLeftCell,R=r.isWidthDragging,x=r.mainBodyRef,C=r.onCellEdit,b=r.onColumnOrderChange,y=r.onSort,j=r.onTableHeaderDragEnd,H=r.pinnedLeftRef,S=r.pinnedRightRef,M=r.scrollbarWidth,E=r.selectableColumns,D=r.setIsWidthDragging,I=r.setSelectedCells,k=r.shouldPaginate,L=r.sort,N=r.sortDownIcon,O=r.sortUpIcon,B=r.tableBodyContainerRef,W=n.useRef(null),A=n.useRef(null),P=n.useRef(null),z=n.useRef(null),U=g.current.filter((function(e){return!e.hide&&!e.pinned})),q=g.current.filter((function(e){return"left"===e.pinned&&!0!==e.hide})),J=g.current.filter((function(e){return"right"===e.pinned&&!0!==e.hide})),X=n.useMemo((function(){return"".concat(q.map((function(e){return V(e)})).join(" "))}),[q]),K=n.useMemo((function(){return"".concat(U.filter((function(e){return!0!==v[e.accessor]})).map((function(e){return V(e)})).join(" "))}),[U,v]),G=n.useMemo((function(){return"".concat(J.map((function(e){return V(e)})).join(" "))}),[J]),Y={allowAnimations:o,centerHeaderRef:P,columnResizing:a,currentRows:i,columnReordering:s,draggedHeaderRef:l,forceUpdate:d,headerContainerRef:W,headersRef:g,hiddenColumns:v,hoveredHeaderRef:m,isWidthDragging:R,mainBodyRef:x,mainTemplateColumns:K,onColumnOrderChange:b,onSort:y,onTableHeaderDragEnd:j,pinnedLeftColumns:q,pinnedLeftHeaderRef:A,pinnedLeftTemplateColumns:X,pinnedRightColumns:J,pinnedRightHeaderRef:z,pinnedRightTemplateColumns:G,selectableColumns:E,setIsWidthDragging:D,setSelectedCells:I,sort:L,sortDownIcon:N,sortUpIcon:O,tableBodyContainerRef:B},_={allowAnimations:o,centerHeaderRef:P,currentRows:i,draggedHeaderRef:l,getBorderClass:u,handleMouseDown:f,handleMouseOver:h,headerContainerRef:W,headers:g.current,headersRef:g,hiddenColumns:v,hoveredHeaderRef:m,isSelected:p,isTopLeftCell:w,isWidthDragging:R,mainBodyRef:x,mainTemplateColumns:K,onCellEdit:C,onTableHeaderDragEnd:j,pinnedLeftColumns:q,pinnedLeftHeaderRef:A,pinnedLeftRef:H,pinnedLeftTemplateColumns:X,pinnedRightColumns:J,pinnedRightHeaderRef:z,pinnedRightRef:S,pinnedRightTemplateColumns:G,scrollbarWidth:M,shouldPaginate:k,tableBodyContainerRef:B};return e.jsxs("div",t({className:"st-table-content",style:{width:c?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(F,t({},Y)),e.jsx(T,t({},_))]}))},J=function(e){var t=e.callback,r=e.ref,o=e.widthAttribute;n.useEffect((function(){var e=r.current;if(e){var n=function(){t(e[o]||0)};n();var a=new ResizeObserver((function(){n()}));return a.observe(e),function(){return a.disconnect()}}}),[t,r,o])},X=function(r){var o=r.mainBodyRef,a=r.pinnedLeftRef,i=r.pinnedRightRef,s=r.tableContentWidth,l=n.useState(0),c=l[0],d=l[1],u=n.useState(0),f=u[0],h=u[1],g=n.useState(0),v=g[0],m=g[1],p=n.useRef(null);return J({widthAttribute:"offsetWidth",callback:d,ref:a}),J({widthAttribute:"scrollWidth",callback:m,ref:o}),J({widthAttribute:"offsetWidth",callback:h,ref:i}),U(o,p),!o.current||o.current.scrollWidth<=o.current.clientWidth?null:e.jsxs("div",t({className:"st-horizontal-scrollbar-container",style:{width:s}},{children:[c>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:c}}),v>0&&e.jsx("div",t({className:"st-horizontal-scrollbar-middle",onScroll:function(e){var n=e.target.scrollLeft;void 0!==n&&o.current&&o.current.scrollTo({left:n,behavior:"auto"})},ref:p},{children:e.jsx("div",{style:{width:v}})})),f>0&&e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:f}})]}))},K=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),a=o[0],i=o[1],s=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),l=n.useState(s),c=l[0],d=l[1],u=n.useMemo((function(){if(!a)return r;var e=function(e,n,t){return{sortedData:W(n,t,e),newSortConfig:t}}(t,r,a).sortedData;return e}),[r,a,t]);return{sort:a,setSort:i,updateSort:function(e,n){var r=t.find((function(e){return e.accessor===n}));r&&i((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:r,direction:"descending"}:null:{key:r,direction:"ascending"}}))},sortedRows:u,hiddenColumns:c,setHiddenColumns:d}},G=function(r){var o=r.checked,a=void 0!==o&&o,i=r.children,s=r.onChange,l=n.useState(a),c=l[0],d=l[1];return e.jsxs("label",t({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:c,className:"st-checkbox-input",onChange:function(){var e=!c;d(e),s&&s(e)},type:"checkbox"}),e.jsx("span",t({className:"st-checkbox-custom ".concat(c?"st-checked":"")},{children:c&&e.jsx("span",{className:"st-checkbox-checkmark"})})),i]}))},Y=function(n){var r=n.headers,o=n.open,a=n.position;n.setOpen;var i=n.setHiddenColumns,s=n.hiddenColumns,l="left"===a?"left":"";return e.jsx("div",t({className:"st-column-editor-popout ".concat(o?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",t({className:"st-column-editor-popout-content"},{children:r.map((function(n,r){return e.jsx(G,t({checked:s[n.accessor],onChange:function(e){var r;return i(t(t({},s),((r={})[n.accessor]=e,r)))}},{children:n.label}),r)}))}))}))},_=function(r){var o=r.columnEditorText,a=r.editColumns,i=r.editColumnsInitOpen,s=r.headers,l=r.position,c=void 0===l?"right":l,d=r.setHiddenColumns,u=r.hiddenColumns,f=n.useState(i),h=f[0],g=f[1];return a?e.jsxs("div",t({className:"st-column-editor ".concat(h?"open":""," ").concat(c),onClick:function(){return function(e){g(e)}(!h)}},{children:[e.jsx("div",t({className:"st-column-editor-text"},{children:o})),e.jsx(Y,{headers:s,open:h,position:c,setOpen:g,setHiddenColumns:d,hiddenColumns:u})]})):null};!function(e){e.Left="left",e.Right="right"}(s||(s={}));var $=n.memo((function(r){var o=r.allowAnimations,a=void 0!==o&&o,i=r.columnEditorPosition,h=void 0===i?s.Right:i,g=r.columnEditorText,v=void 0===g?"Columns":g,m=r.columnResizing,p=void 0!==m&&m,w=r.defaultHeaders,R=r.editColumns,x=void 0!==R&&R,C=r.editColumnsInitOpen,b=void 0!==C&&C,y=r.columnReordering,j=void 0!==y&&y,H=r.height,S=r.hideFooter,M=void 0!==S&&S,E=r.nextIcon,D=void 0===E?e.jsx(d,{className:"st-next-prev-icon"}):E,I=r.onCellEdit,k=r.onColumnOrderChange,L=r.onNextPage,N=r.onPreviousPage,T=r.prevIcon,O=void 0===T?e.jsx(c,{className:"st-next-prev-icon"}):T,B=r.rows,W=r.rowsPerPage,A=void 0===W?10:W,P=r.selectableCells,z=void 0!==P&&P,U=r.selectableColumns,F=void 0!==U&&U,V=r.shouldPaginate,J=void 0!==V&&V,G=r.sortDownIcon,Y=void 0===G?e.jsx(f,{className:"st-sort-icon"}):G,$=r.sortUpIcon,Q=void 0===$?e.jsx(u,{className:"st-sort-icon"}):$,Z=r.theme,ee=void 0===Z?"light":Z,ne=r.totalPages,te=n.useRef(null),re=n.useRef(w),oe=n.useRef(null),ae=n.useRef(null),ie=n.useRef(null),se=n.useRef(null),le=n.useRef(null),ce=n.useState(!1),de=ce[0],ue=ce[1],fe=n.useState(1),he=fe[0],ge=fe[1],ve=n.useState(0),me=ve[0],pe=ve[1],we=n.useState(0),Re=we[0],xe=we[1],Ce=K({headers:re.current,tableRows:B}),be=Ce.sort,ye=Ce.sortedRows,je=Ce.hiddenColumns,He=Ce.setHiddenColumns,Se=Ce.updateSort,Me=n.useReducer((function(e){return e+1}),0)[1],Ee=function(e){var t=e.selectableCells,r=e.headers,o=e.rows,a=n.useState(new Set),i=a[0],s=a[1],l=n.useRef(!1),c=n.useRef(null),d=n.useCallback((function(){var e=Array.from(i).reduce((function(e,n){var t=n.split("-").map(Number),a=t[0],i=t[1];return e[a]||(e[a]=[]),e[a][i]=o[a][r[i].accessor],e}),{}),n=Object.values(e).map((function(e){return Object.values(e).join("\t")})).join("\n");i.size>0&&navigator.clipboard.writeText(n)}),[i,o,r]);n.useEffect((function(){var e=function(e){(e.ctrlKey||e.metaKey)&&"c"===e.key&&d()};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[d]);var u=n.useCallback((function(e,n){return i.has("".concat(e,"-").concat(n))}),[i]),f=n.useCallback((function(e,n){var t=[];return u(e-1,n)||t.push("st-selected-top-border"),u(e+1,n)||t.push("st-selected-bottom-border"),u(e,n-1)||t.push("st-selected-left-border"),u(e,n+1)||t.push("st-selected-right-border"),t.join(" ")}),[u]),h=n.useMemo((function(){var e=Math.min.apply(Math,Array.from(i).map((function(e){return parseInt(e.split("-")[0])}))),n=Math.min.apply(Math,Array.from(i).map((function(e){return parseInt(e.split("-")[1])})));return function(t,r){return t===e&&r===n}}),[i]);return{selectedCells:i,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex;t&&(l.current=!0,c.current={row:r,col:n},s(new Set(["".concat(r,"-").concat(n)])))},handleMouseOver:function(e,n){if(t&&l.current&&c.current){for(var r=new Set,o=Math.min(c.current.row,e),a=Math.max(c.current.row,e),i=Math.min(c.current.col,n),d=Math.max(c.current.col,n),u=o;u<=a;u++)for(var f=i;f<=d;f++)r.add("".concat(u,"-").concat(f));s(r)}},handleMouseUp:function(){l.current=!1,c.current=null},isSelected:u,getBorderClass:f,isTopLeftCell:h,setSelectedCells:s}}({selectableCells:z,headers:re.current,rows:ye}),De=Ee.handleMouseDown,Ie=Ee.handleMouseOver,ke=Ee.handleMouseUp,Le=Ee.isSelected,Ne=Ee.getBorderClass,Te=Ee.isTopLeftCell,Oe=Ee.setSelectedCells,Be=n.useMemo((function(){return J?ye.slice((he-1)*A,he*A):ye}),[he,A,J,ye]),We=n.useCallback((function(e,n){Se(e,n)}),[Se]),Ae=n.useCallback((function(e){re.current=e,Me()}),[]);return n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||F&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||Oe(new Set)};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[F,Oe]),n.useLayoutEffect((function(){if(le.current){var e=le.current.offsetWidth-le.current.clientWidth,n=le.current.clientWidth;pe(e),xe(n)}}),[]),n.useLayoutEffect((function(){var e=function(){if(Me(),le.current){var e=le.current.offsetWidth-le.current.clientWidth,n=le.current.clientWidth;pe(e),xe(n)}};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),e.jsxs("div",t({className:"simple-table-root st-wrapper theme-".concat(ee),style:H?{height:H}:{}},{children:[e.jsxs("div",t({className:"st-table-wrapper-container"},{children:[e.jsxs("div",t({className:"st-table-wrapper",onMouseUp:ke,onMouseLeave:ke},{children:[e.jsx(q,{allowAnimations:a,columnResizing:p,currentRows:Be,draggedHeaderRef:te,editColumns:x,columnReordering:j,forceUpdate:Me,getBorderClass:Ne,handleMouseDown:De,handleMouseOver:Ie,headers:re.current,headersRef:re,hiddenColumns:je,hoveredHeaderRef:oe,isSelected:Le,isTopLeftCell:Te,isWidthDragging:de,mainBodyRef:ae,onCellEdit:I,onColumnOrderChange:k,onSort:We,onTableHeaderDragEnd:Ae,pinnedLeftRef:ie,pinnedRightRef:se,scrollbarWidth:me,selectableColumns:F,setIsWidthDragging:ue,setSelectedCells:Oe,shouldPaginate:J,sort:be,sortDownIcon:Y,sortUpIcon:Q,tableBodyContainerRef:le}),e.jsx(_,{columnEditorText:v,editColumns:x,editColumnsInitOpen:b,headers:re.current,hiddenColumns:je,position:h,setHiddenColumns:He})]})),e.jsx(X,{mainBodyRef:ae,pinnedLeftRef:ie,pinnedRightRef:se,tableContentWidth:Re})]})),e.jsx(l,{currentPage:he,hideFooter:M,nextIcon:D,onPageChange:ge,onNextPage:L,onPreviousPage:N,prevIcon:O,shouldPaginate:J,totalPages:ne||Math.ceil(ye.length/A)})]}))}));exports.SimpleTable=$;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:1rem;--st-font-weight-normal:400;--st-font-weight-bold:700;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:#0000;--st-scrollbar-thumb-color:var(--st-slate-200);--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-gray-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-white);--st-header-background-color:var(--st-white);--st-dragging-background-color:var(--st-gray-200);--st-selected-cell-background-color:var(--st-blue-200);--st-selected-first-cell-background-color:var(--st-blue-200);--st-footer-background-color:var(--st-white);--st-cell-color:var(--st-gray-800);--st-cell-odd-row-color:var(--st-gray-700);--st-edit-cell-shadow:0 1px 2px 0 #0000000d,0 1px 1px -1px #0000000d;--st-selected-cell-color:var(--st-gray-900);--st-selected-first-cell-color:var(--st-gray-900);--st-resize-handle-color:var(--st-blue-300);--st-separator-border-color:var(--st-slate-100);--st-last-group-row-separator-border-color:var(--st-slate-300);--st-selected-border-top-color:var(--st-blue-600);--st-selected-border-bottom-color:var(--st-blue-600);--st-selected-border-left-color:var(--st-blue-600);--st-selected-border-right-color:var(--st-blue-600);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-gray-200);--st-button-active-background-color:var(--st-blue-800);--st-font-family:"Roboto",sans-serif;--st-editable-cell-focus-border-color:var(--st-blue-600)}.theme-dark{--st-border-radius:6px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-slate-800);--st-scrollbar-thumb-color:var(--st-slate-600);--st-border-color:var(--st-slate-800);--st-odd-row-background-color:var(--st-slate-800);--st-even-row-background-color:var(--st-slate-900);--st-header-background-color:var(--st-slate-700);--st-dragging-background-color:var(--st-blue-800);--st-selected-cell-background-color:var(--st-blue-700);--st-selected-first-cell-background-color:var(--st-amber-700);--st-footer-background-color:var(--st-slate-900);--st-cell-color:var(--st-white);--st-cell-odd-row-color:var(--st-slate-300);--st-edit-cell-shadow:0 1px 3px 0 var(--st-white/0.1),0 1px 2px -1px var(--st-white/0.1);--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-slate-600);--st-separator-border-color:var(--st-slate-500);--st-last-group-row-separator-border-color:var(--st-slate-700);--st-selected-border-top-color:var(--st-blue-700);--st-selected-border-bottom-color:var(--st-blue-700);--st-selected-border-left-color:var(--st-blue-700);--st-selected-border-right-color:var(--st-blue-700);--st-checkbox-checked-background-color:var(--st-blue-700);--st-checkbox-checked-border-color:var(--st-blue-700);--st-column-editor-background-color:var(--st-slate-800);--st-column-editor-popout-background-color:var(--st-slate-800);--st-button-hover-background-color:var(--st-slate-600);--st-button-active-background-color:var(--st-slate-700);--st-font-family:"Open Sans",sans-serif;--st-editable-cell-focus-border-color:var(--st-slate-600)}.theme-high-contrast{--st-border-radius:0;--st-border-width:2px;--st-cell-padding:12px;--st-font-size:1rem;--st-font-weight-normal:500;--st-font-weight-bold:800;--st-transition-duration:0s;--st-transition-ease:ease;--st-opacity-disabled:0.7;--st-spacing-small:8px;--st-spacing-medium:12px;--st-spacing-large:24px;--st-scrollbar-bg-color:var(--st-slate-950);--st-scrollbar-thumb-color:var(--st-slate-200);--st-border-color:var(--st-slate-900);--st-odd-row-background-color:var(--st-slate-50);--st-even-row-background-color:var(--st-slate-900);--st-header-background-color:var(--st-slate-900);--st-dragging-background-color:var(--st-yellow-500);--st-selected-cell-background-color:var(--st-slate-900);--st-selected-first-cell-background-color:var(--st-red-500);--st-footer-background-color:var(--st-slate-900);--st-cell-color:var(--st-white);--st-cell-odd-row-color:var(--st-slate-900);--st-edit-cell-shadow:none;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-white);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-900);--st-selected-border-top-color:var(--st-orange-600);--st-selected-border-bottom-color:var(--st-orange-600);--st-selected-border-left-color:var(--st-orange-600);--st-selected-border-right-color:var(--st-orange-600);--st-checkbox-checked-background-color:var(--st-slate-50);--st-checkbox-checked-border-color:var(--st-slate-50);--st-column-editor-background-color:var(--st-slate-900);--st-column-editor-popout-background-color:var(--st-slate-900);--st-button-hover-background-color:var(--st-slate-50);--st-button-active-background-color:var(--st-slate-900);--st-font-family:"Arial",sans-serif;--st-editable-cell-focus-border-color:var(--st-orange-600)}.theme-pastel{--st-border-radius:8px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.9rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-purple-100);--st-scrollbar-thumb-color:var(--st-purple-300);--st-border-color:var(--st-purple-200);--st-odd-row-background-color:var(--st-purple-50);--st-even-row-background-color:var(--st-blue-50);--st-header-background-color:var(--st-blue-50);--st-dragging-background-color:var(--st-cyan-50);--st-selected-cell-background-color:var(--st-orange-50);--st-selected-first-cell-background-color:var(--st-amber-50);--st-footer-background-color:var(--st-purple-50);--st-cell-color:var(--st-slate-600);--st-cell-odd-row-color:var(--st-slate-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-slate-600);--st-selected-first-cell-color:var(--st-slate-600);--st-resize-handle-color:var(--st-purple-200);--st-separator-border-color:var(--st-purple-200);--st-last-group-row-separator-border-color:var(--st-purple-500);--st-selected-border-top-color:var(--st-amber-500);--st-selected-border-bottom-color:var(--st-amber-500);--st-selected-border-left-color:var(--st-amber-500);--st-selected-border-right-color:var(--st-amber-500);--st-checkbox-checked-background-color:var(--st-purple-200);--st-checkbox-checked-border-color:var(--st-purple-200);--st-column-editor-background-color:var(--st-purple-50);--st-column-editor-popout-background-color:var(--st-purple-50);--st-button-hover-background-color:var(--st-purple-100);--st-button-active-background-color:var(--st-purple-200);--st-font-family:"Comic Sans MS",cursive,sans-serif;--st-editable-cell-focus-border-color:var(--st-purple-300)}.theme-vibrant{--st-border-radius:12px;--st-border-width:2px;--st-cell-padding:12px;--st-font-size:1rem;--st-font-weight-normal:500;--st-font-weight-bold:700;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:8px;--st-spacing-medium:12px;--st-spacing-large:24px;--st-scrollbar-bg-color:var(--st-orange-200);--st-scrollbar-thumb-color:var(--st-orange-300);--st-border-color:var(--st-orange-500);--st-odd-row-background-color:var(--st-orange-100);--st-even-row-background-color:var(--st-orange-200);--st-header-background-color:var(--st-orange-300);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-amber-300);--st-footer-background-color:var(--st-orange-50);--st-cell-color:var(--st-orange-900);--st-cell-odd-row-color:var(--st-orange-800);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.2),0 1px 2px -1px var(--st-black/0.2);--st-selected-cell-color:var(--st-orange-900);--st-selected-first-cell-color:var(--st-orange-900);--st-resize-handle-color:var(--st-orange-400);--st-separator-border-color:var(--st-orange-200);--st-last-group-row-separator-border-color:var(--st-orange-500);--st-selected-border-top-color:var(--st-orange-700);--st-selected-border-bottom-color:var(--st-orange-700);--st-selected-border-left-color:var(--st-orange-700);--st-selected-border-right-color:var(--st-orange-700);--st-checkbox-checked-background-color:var(--st-orange-500);--st-checkbox-checked-border-color:var(--st-orange-500);--st-column-editor-background-color:var(--st-orange-100);--st-column-editor-popout-background-color:var(--st-orange-100);--st-button-hover-background-color:var(--st-orange-300);--st-button-active-background-color:var(--st-orange-400);--st-font-family:"Lobster",cursive;--st-editable-cell-focus-border-color:var(--st-orange-600)}.theme-solarized-light{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-yellow-100);--st-scrollbar-thumb-color:var(--st-yellow-300);--st-border-color:var(--st-yellow-300);--st-odd-row-background-color:var(--st-yellow-50);--st-even-row-background-color:var(--st-yellow-200);--st-header-background-color:var(--st-yellow-200);--st-dragging-background-color:var(--st-yellow-300);--st-selected-cell-background-color:var(--st-slate-400);--st-selected-first-cell-background-color:var(--st-amber-600);--st-footer-background-color:var(--st-yellow-50);--st-cell-color:var(--st-slate-600);--st-cell-odd-row-color:var(--st-slate-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-slate-600);--st-selected-first-cell-color:var(--st-slate-600);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-yellow-300);--st-last-group-row-separator-border-color:var(--st-yellow-500);--st-selected-border-top-color:var(--st-yellow-600);--st-selected-border-bottom-color:var(--st-yellow-600);--st-selected-border-left-color:var(--st-yellow-600);--st-selected-border-right-color:var(--st-yellow-600);--st-checkbox-checked-background-color:var(--st-slate-400);--st-checkbox-checked-border-color:var(--st-slate-400);--st-column-editor-background-color:var(--st-yellow-200);--st-column-editor-popout-background-color:var(--st-yellow-200);--st-button-hover-background-color:var(--st-yellow-200);--st-button-active-background-color:var(--st-slate-400);--st-font-family:"Georgia",serif;--st-editable-cell-focus-border-color:var(--st-yellow-400)}.theme-solarized-dark{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-slate-800);--st-scrollbar-thumb-color:var(--st-slate-600);--st-border-color:var(--st-slate-800);--st-odd-row-background-color:var(--st-slate-900);--st-even-row-background-color:var(--st-slate-800);--st-header-background-color:var(--st-slate-800);--st-dragging-background-color:var(--st-slate-800);--st-selected-cell-background-color:var(--st-slate-600);--st-selected-first-cell-background-color:var(--st-amber-600);--st-footer-background-color:var(--st-slate-900);--st-cell-color:var(--st-slate-300);--st-cell-odd-row-color:var(--st-slate-400);--st-edit-cell-shadow:0 1px 3px 0 var(--st-white/0.1),0 1px 2px -1px var(--st-white/0.1);--st-selected-cell-color:var(--st-slate-300);--st-selected-first-cell-color:var(--st-slate-300);--st-resize-handle-color:var(--st-slate-600);--st-separator-border-color:var(--st-slate-400);--st-last-group-row-separator-border-color:var(--st-slate-600);--st-selected-border-top-color:var(--st-blue-800);--st-selected-border-bottom-color:var(--st-blue-800);--st-selected-border-left-color:var(--st-blue-800);--st-selected-border-right-color:var(--st-blue-800);--st-checkbox-checked-background-color:var(--st-slate-600);--st-checkbox-checked-border-color:var(--st-slate-600);--st-column-editor-background-color:var(--st-slate-800);--st-column-editor-popout-background-color:var(--st-slate-800);--st-button-hover-background-color:var(--st-slate-600);--st-button-active-background-color:var(--st-slate-800);--st-font-family:"Courier New",monospace;--st-editable-cell-focus-border-color:var(--st-blue-800)}.theme-ocean{--st-border-radius:6px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.9rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-cyan-100);--st-scrollbar-thumb-color:var(--st-cyan-300);--st-border-color:var(--st-cyan-700);--st-odd-row-background-color:var(--st-cyan-50);--st-even-row-background-color:var(--st-cyan-100);--st-header-background-color:var(--st-cyan-100);--st-dragging-background-color:var(--st-cyan-300);--st-selected-cell-background-color:var(--st-cyan-700);--st-selected-first-cell-background-color:var(--st-slate-900);--st-footer-background-color:var(--st-cyan-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-cyan-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-cyan-300);--st-separator-border-color:var(--st-cyan-200);--st-last-group-row-separator-border-color:var(--st-cyan-500);--st-selected-border-top-color:var(--st-blue-700);--st-selected-border-bottom-color:var(--st-blue-700);--st-selected-border-left-color:var(--st-blue-700);--st-selected-border-right-color:var(--st-blue-700);--st-checkbox-checked-background-color:var(--st-cyan-700);--st-checkbox-checked-border-color:var(--st-cyan-700);--st-column-editor-background-color:var(--st-cyan-100);--st-column-editor-popout-background-color:var(--st-cyan-100);--st-button-hover-background-color:var(--st-cyan-300);--st-button-active-background-color:var(--st-cyan-700);--st-font-family:"Verdana",sans-serif;--st-editable-cell-focus-border-color:var(--st-cyan-500)}.theme-forest{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-green-100);--st-scrollbar-thumb-color:var(--st-green-400);--st-border-color:var(--st-green-800);--st-odd-row-background-color:var(--st-green-50);--st-even-row-background-color:var(--st-green-100);--st-header-background-color:var(--st-green-100);--st-dragging-background-color:var(--st-green-400);--st-selected-cell-background-color:var(--st-green-700);--st-selected-first-cell-background-color:var(--st-green-900);--st-footer-background-color:var(--st-green-50);--st-cell-color:var(--st-green-900);--st-cell-odd-row-color:var(--st-green-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-green-900);--st-selected-first-cell-color:var(--st-green-900);--st-resize-handle-color:var(--st-green-400);--st-separator-border-color:var(--st-green-200);--st-last-group-row-separator-border-color:var(--st-green-500);--st-selected-border-top-color:var(--st-green-600);--st-selected-border-bottom-color:var(--st-green-600);--st-selected-border-left-color:var(--st-green-600);--st-selected-border-right-color:var(--st-green-600);--st-checkbox-checked-background-color:var(--st-green-700);--st-checkbox-checked-border-color:var(--st-green-700);--st-column-editor-background-color:var(--st-green-100);--st-column-editor-popout-background-color:var(--st-green-100);--st-button-hover-background-color:var(--st-green-400);--st-button-active-background-color:var(--st-green-700);--st-font-family:"Tahoma",sans-serif;--st-editable-cell-focus-border-color:var(--st-green-600)}.theme-desert{--st-border-radius:8px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.9rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-amber-100);--st-scrollbar-thumb-color:var(--st-amber-300);--st-border-color:var(--st-amber-600);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-header-background-color:var(--st-amber-100);--st-dragging-background-color:var(--st-amber-300);--st-selected-cell-background-color:var(--st-amber-600);--st-selected-first-cell-background-color:var(--st-amber-800);--st-footer-background-color:var(--st-amber-50);--st-cell-color:var(--st-amber-800);--st-cell-odd-row-color:var(--st-amber-600);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-amber-800);--st-selected-first-cell-color:var(--st-amber-800);--st-resize-handle-color:var(--st-amber-300);--st-separator-border-color:var(--st-amber-200);--st-last-group-row-separator-border-color:var(--st-amber-500);--st-selected-border-top-color:var(--st-amber-700);--st-selected-border-bottom-color:var(--st-amber-700);--st-selected-border-left-color:var(--st-amber-700);--st-selected-border-right-color:var(--st-amber-700);--st-checkbox-checked-background-color:var(--st-amber-600);--st-checkbox-checked-border-color:var(--st-amber-600);--st-column-editor-background-color:var(--st-amber-100);--st-column-editor-popout-background-color:var(--st-amber-100);--st-button-hover-background-color:var(--st-amber-300);--st-button-active-background-color:var(--st-amber-600);--st-font-family:"Times New Roman",serif;--st-editable-cell-focus-border-color:var(--st-amber-700)}.theme-bubblegum{--st-border-radius:16px;--st-border-width:2px;--st-cell-padding:12px;--st-font-size:1rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:8px;--st-spacing-medium:12px;--st-spacing-large:24px;--st-scrollbar-bg-color:var(--st-pink-50);--st-scrollbar-thumb-color:var(--st-pink-300);--st-border-color:var(--st-pink-500);--st-odd-row-background-color:var(--st-pink-50);--st-even-row-background-color:var(--st-pink-100);--st-header-background-color:var(--st-pink-200);--st-dragging-background-color:var(--st-pink-300);--st-selected-cell-background-color:var(--st-pink-400);--st-selected-first-cell-background-color:var(--st-pink-600);--st-footer-background-color:var(--st-pink-50);--st-cell-color:var(--st-pink-900);--st-cell-odd-row-color:var(--st-pink-800);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-pink-900);--st-selected-first-cell-color:var(--st-pink-900);--st-resize-handle-color:var(--st-pink-400);--st-separator-border-color:var(--st-pink-200);--st-last-group-row-separator-border-color:var(--st-pink-500);--st-selected-border-top-color:var(--st-pink-700);--st-selected-border-bottom-color:var(--st-pink-700);--st-selected-border-left-color:var(--st-pink-700);--st-selected-border-right-color:var(--st-pink-700);--st-checkbox-checked-background-color:var(--st-pink-500);--st-checkbox-checked-border-color:var(--st-pink-500);--st-column-editor-background-color:var(--st-pink-100);--st-column-editor-popout-background-color:var(--st-pink-100);--st-button-hover-background-color:var(--st-pink-300);--st-button-active-background-color:var(--st-pink-400);--st-font-family:"Pacifico",cursive;--st-editable-cell-focus-border-color:var(--st-pink-600)}.theme-90s{--st-border-radius:0;--st-border-width:2px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:700;--st-transition-duration:0.1s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-gray-200);--st-scrollbar-thumb-color:var(--st-gray-400);--st-border-color:var(--st-gray-500);--st-odd-row-background-color:var(--st-gray-100);--st-even-row-background-color:var(--st-gray-200);--st-header-background-color:var(--st-gray-300);--st-dragging-background-color:var(--st-gray-400);--st-selected-cell-background-color:var(--st-gray-500);--st-selected-first-cell-background-color:var(--st-gray-600);--st-footer-background-color:var(--st-gray-100);--st-cell-color:var(--st-gray-900);--st-cell-odd-row-color:var(--st-gray-800);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-gray-900);--st-selected-first-cell-color:var(--st-gray-900);--st-resize-handle-color:var(--st-gray-400);--st-separator-border-color:var(--st-gray-200);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-top-color:var(--st-gray-700);--st-selected-border-bottom-color:var(--st-gray-700);--st-selected-border-left-color:var(--st-gray-700);--st-selected-border-right-color:var(--st-gray-700);--st-checkbox-checked-background-color:var(--st-gray-500);--st-checkbox-checked-border-color:var(--st-gray-500);--st-column-editor-background-color:var(--st-gray-200);--st-column-editor-popout-background-color:var(--st-gray-200);--st-button-hover-background-color:var(--st-gray-300);--st-button-active-background-color:var(--st-gray-400);--st-font-family:"Courier New",monospace;--st-editable-cell-focus-border-color:var(--st-gray-600)}.simple-table-root,.st-cell,.st-column-editor,.st-column-editor-popout,.st-footer,.st-header-cell,.st-header-container,.st-horizontal-scrollbar-container,.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-middle,.st-horizontal-scrollbar-right,.st-table-body-container,.st-table-body-main,.st-table-body-pinned-left,.st-table-body-pinned-right,.st-table-content,.st-table-wrapper,.st-table-wrapper-container,.st-wrapper{box-sizing:border-box;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--st-font-family,sans-serif)}.st-wrapper{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);max-height:100dvh;overflow:hidden;position:relative}.st-table-wrapper-container{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.st-table-wrapper{display:flex;flex:1;min-height:0;position:relative;width:100%}.st-table-content{display:flex;flex-direction:column}.st-header-container{display:flex}.st-header-container.st-header-scroll-padding:after{background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{overflow:auto;scrollbar-width:none;width:100%}.st-header-main::-webkit-scrollbar{display:none}.st-table-body-container{display:flex;height:max-content;overflow:auto;width:100%}.st-table-body-main,.st-table-body-pinned-left,.st-table-body-pinned-right{display:grid;height:max-content}.st-table-body-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-table-body-main{overflow:auto;scrollbar-width:none}.st-table-body-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-table-row{display:grid;position:absolute;transform:translateZ(0);transition:background .2s ease;width:100%}.st-header-cell{align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);border-top:var(--st-border-width) solid #0000;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0;z-index:1}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:grab}.st-cell,.st-header-cell{align-items:center;color:var(--st-slate-800);display:flex;gap:var(--st-spacing-small);overflow:hidden}.st-cell.right-aligned,.st-header-cell.right-aligned{justify-content:flex-end;text-align:right}.st-cell.right-aligned>.st-cell-content,.st-header-cell.right-aligned>.st-header-label{text-align:right}.st-cell.center-aligned,.st-header-cell.center-aligned{justify-content:center;text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-cell-content,.st-header-label{box-sizing:border-box;color:var(--st-cell-color);flex:1;height:100%;overflow:hidden;padding:var(--st-cell-padding);text-align:left;text-overflow:ellipsis;user-select:none;white-space:nowrap;width:100%}.st-cell{border:var(--st-border-width) solid #0000;position:relative}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-sort-icon-container{align-items:center;display:flex;justify-content:center;margin-left:4px}.st-sort-icon{fill:var(--st-slate-500)}.st-header-resize-handle{background-color:var(--st-resize-handle-color);cursor:col-resize;height:12px;right:0;top:0;width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);grid-column:1/-1;height:1px}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-cell-even-row{background-color:var(--st-even-row-background-color)}.st-cell-odd-row:not(.st-cell-selected){background-color:var(--st-odd-row-background-color);color:var(--st-cell-odd-row-color)}.st-cell:not(.st-cell-odd-row):not(.st-cell-selected){color:var(--st-cell-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color);color:var(--st-selected-first-cell-color)}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-top-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-bottom-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-left-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-right-color)}.st-horizontal-scrollbar-container{align-items:center;border-top:var(--st-border-width) solid var(--st-border-color);display:flex;flex-shrink:0}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{background-color:var(--st-scrollbar-bg-color);height:100%}.st-horizontal-scrollbar-middle{overflow:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{align-items:center;display:flex}.st-next-prev-btn{fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);box-shadow:var(--st-edit-cell-shadow-color);box-sizing:border-box;font-size:var(--st-font-size);height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{background:var(--st-footer-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{border-left:var(--st-border-width) solid var(--st-border-color);display:flex;flex-direction:column;gap:var(--st-spacing-small);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small)}.st-column-editor-popout.open{width:200px}.st-column-editor-popout.left{transform:translateX(-100%)}.st-column-editor-popout.open.left{transform:translateX(0)}.st-checkbox-label{align-items:center;cursor:pointer;display:flex;gap:var(--st-spacing-medium)}.st-checkbox-input{display:none}.st-checkbox-custom{align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:flex;height:24px;justify-content:center;transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:24px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{border:solid #fff;border-width:0 2px 2px 0;height:11px;transform:rotate(45deg);width:6px}@keyframes slide-in-left{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-right{0%{transform:translateX(100%)}to{transform:translateX(0)}}.st-group-header{align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:flex;font-weight:var(--st-font-weight-bold);height:40px;transition:background-color var(--st-transition-duration) var(--st-transition-ease);user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{align-items:center;display:flex;gap:var(--st-spacing-medium)}.st-group-toggle-icon{align-items:center;display:flex;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{transform:rotate(0deg);transition:transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{transform:rotate(-90deg);transition:transform var(--st-transition-duration) var(--st-transition-ease)}
|
|
1
|
+
.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:1rem;--st-font-weight-normal:400;--st-font-weight-bold:700;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:#0000;--st-scrollbar-thumb-color:var(--st-slate-200);--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-gray-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-white);--st-header-background-color:var(--st-white);--st-dragging-background-color:var(--st-gray-200);--st-selected-cell-background-color:var(--st-blue-200);--st-selected-first-cell-background-color:var(--st-blue-200);--st-footer-background-color:var(--st-white);--st-cell-color:var(--st-gray-800);--st-cell-odd-row-color:var(--st-gray-700);--st-edit-cell-shadow:0 1px 2px 0 #0000000d,0 1px 1px -1px #0000000d;--st-selected-cell-color:var(--st-gray-900);--st-selected-first-cell-color:var(--st-gray-900);--st-resize-handle-color:var(--st-blue-300);--st-separator-border-color:var(--st-slate-100);--st-last-group-row-separator-border-color:var(--st-slate-300);--st-selected-border-top-color:var(--st-blue-600);--st-selected-border-bottom-color:var(--st-blue-600);--st-selected-border-left-color:var(--st-blue-600);--st-selected-border-right-color:var(--st-blue-600);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-gray-200);--st-button-active-background-color:var(--st-blue-800);--st-font-family:"Roboto",sans-serif;--st-editable-cell-focus-border-color:var(--st-blue-600)}.theme-dark{--st-border-radius:6px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-slate-800);--st-scrollbar-thumb-color:var(--st-slate-600);--st-border-color:var(--st-slate-800);--st-odd-row-background-color:var(--st-slate-800);--st-even-row-background-color:var(--st-slate-900);--st-header-background-color:var(--st-slate-700);--st-dragging-background-color:var(--st-blue-800);--st-selected-cell-background-color:var(--st-blue-700);--st-selected-first-cell-background-color:var(--st-amber-700);--st-footer-background-color:var(--st-slate-900);--st-cell-color:var(--st-white);--st-cell-odd-row-color:var(--st-slate-300);--st-edit-cell-shadow:0 1px 3px 0 var(--st-white/0.1),0 1px 2px -1px var(--st-white/0.1);--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-slate-600);--st-separator-border-color:var(--st-slate-500);--st-last-group-row-separator-border-color:var(--st-slate-700);--st-selected-border-top-color:var(--st-blue-700);--st-selected-border-bottom-color:var(--st-blue-700);--st-selected-border-left-color:var(--st-blue-700);--st-selected-border-right-color:var(--st-blue-700);--st-checkbox-checked-background-color:var(--st-blue-700);--st-checkbox-checked-border-color:var(--st-blue-700);--st-column-editor-background-color:var(--st-slate-800);--st-column-editor-popout-background-color:var(--st-slate-800);--st-button-hover-background-color:var(--st-slate-600);--st-button-active-background-color:var(--st-slate-700);--st-font-family:"Open Sans",sans-serif;--st-editable-cell-focus-border-color:var(--st-slate-600)}.theme-high-contrast{--st-border-radius:0;--st-border-width:2px;--st-cell-padding:12px;--st-font-size:1rem;--st-font-weight-normal:500;--st-font-weight-bold:800;--st-transition-duration:0s;--st-transition-ease:ease;--st-opacity-disabled:0.7;--st-spacing-small:8px;--st-spacing-medium:12px;--st-spacing-large:24px;--st-scrollbar-bg-color:var(--st-slate-950);--st-scrollbar-thumb-color:var(--st-slate-200);--st-border-color:var(--st-slate-900);--st-odd-row-background-color:var(--st-slate-50);--st-even-row-background-color:var(--st-slate-900);--st-header-background-color:var(--st-slate-900);--st-dragging-background-color:var(--st-yellow-500);--st-selected-cell-background-color:var(--st-slate-900);--st-selected-first-cell-background-color:var(--st-red-500);--st-footer-background-color:var(--st-slate-900);--st-cell-color:var(--st-white);--st-cell-odd-row-color:var(--st-slate-900);--st-edit-cell-shadow:none;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-white);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-900);--st-selected-border-top-color:var(--st-orange-600);--st-selected-border-bottom-color:var(--st-orange-600);--st-selected-border-left-color:var(--st-orange-600);--st-selected-border-right-color:var(--st-orange-600);--st-checkbox-checked-background-color:var(--st-slate-50);--st-checkbox-checked-border-color:var(--st-slate-50);--st-column-editor-background-color:var(--st-slate-900);--st-column-editor-popout-background-color:var(--st-slate-900);--st-button-hover-background-color:var(--st-slate-50);--st-button-active-background-color:var(--st-slate-900);--st-font-family:"Arial",sans-serif;--st-editable-cell-focus-border-color:var(--st-orange-600)}.theme-pastel{--st-border-radius:8px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.9rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-purple-100);--st-scrollbar-thumb-color:var(--st-purple-300);--st-border-color:var(--st-purple-200);--st-odd-row-background-color:var(--st-purple-50);--st-even-row-background-color:var(--st-blue-50);--st-header-background-color:var(--st-blue-50);--st-dragging-background-color:var(--st-cyan-50);--st-selected-cell-background-color:var(--st-orange-50);--st-selected-first-cell-background-color:var(--st-amber-50);--st-footer-background-color:var(--st-purple-50);--st-cell-color:var(--st-slate-600);--st-cell-odd-row-color:var(--st-slate-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-slate-600);--st-selected-first-cell-color:var(--st-slate-600);--st-resize-handle-color:var(--st-purple-200);--st-separator-border-color:var(--st-purple-200);--st-last-group-row-separator-border-color:var(--st-purple-500);--st-selected-border-top-color:var(--st-amber-500);--st-selected-border-bottom-color:var(--st-amber-500);--st-selected-border-left-color:var(--st-amber-500);--st-selected-border-right-color:var(--st-amber-500);--st-checkbox-checked-background-color:var(--st-purple-200);--st-checkbox-checked-border-color:var(--st-purple-200);--st-column-editor-background-color:var(--st-purple-50);--st-column-editor-popout-background-color:var(--st-purple-50);--st-button-hover-background-color:var(--st-purple-100);--st-button-active-background-color:var(--st-purple-200);--st-font-family:"Comic Sans MS",cursive,sans-serif;--st-editable-cell-focus-border-color:var(--st-purple-300)}.theme-vibrant{--st-border-radius:12px;--st-border-width:2px;--st-cell-padding:12px;--st-font-size:1rem;--st-font-weight-normal:500;--st-font-weight-bold:700;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:8px;--st-spacing-medium:12px;--st-spacing-large:24px;--st-scrollbar-bg-color:var(--st-orange-200);--st-scrollbar-thumb-color:var(--st-orange-300);--st-border-color:var(--st-orange-500);--st-odd-row-background-color:var(--st-orange-100);--st-even-row-background-color:var(--st-orange-200);--st-header-background-color:var(--st-orange-300);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-amber-300);--st-footer-background-color:var(--st-orange-50);--st-cell-color:var(--st-orange-900);--st-cell-odd-row-color:var(--st-orange-800);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.2),0 1px 2px -1px var(--st-black/0.2);--st-selected-cell-color:var(--st-orange-900);--st-selected-first-cell-color:var(--st-orange-900);--st-resize-handle-color:var(--st-orange-400);--st-separator-border-color:var(--st-orange-200);--st-last-group-row-separator-border-color:var(--st-orange-500);--st-selected-border-top-color:var(--st-orange-700);--st-selected-border-bottom-color:var(--st-orange-700);--st-selected-border-left-color:var(--st-orange-700);--st-selected-border-right-color:var(--st-orange-700);--st-checkbox-checked-background-color:var(--st-orange-500);--st-checkbox-checked-border-color:var(--st-orange-500);--st-column-editor-background-color:var(--st-orange-100);--st-column-editor-popout-background-color:var(--st-orange-100);--st-button-hover-background-color:var(--st-orange-300);--st-button-active-background-color:var(--st-orange-400);--st-font-family:"Lobster",cursive;--st-editable-cell-focus-border-color:var(--st-orange-600)}.theme-solarized-light{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-yellow-100);--st-scrollbar-thumb-color:var(--st-yellow-300);--st-border-color:var(--st-yellow-300);--st-odd-row-background-color:var(--st-yellow-50);--st-even-row-background-color:var(--st-yellow-200);--st-header-background-color:var(--st-yellow-200);--st-dragging-background-color:var(--st-yellow-300);--st-selected-cell-background-color:var(--st-slate-400);--st-selected-first-cell-background-color:var(--st-amber-600);--st-footer-background-color:var(--st-yellow-50);--st-cell-color:var(--st-slate-600);--st-cell-odd-row-color:var(--st-slate-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-slate-600);--st-selected-first-cell-color:var(--st-slate-600);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-yellow-300);--st-last-group-row-separator-border-color:var(--st-yellow-500);--st-selected-border-top-color:var(--st-yellow-600);--st-selected-border-bottom-color:var(--st-yellow-600);--st-selected-border-left-color:var(--st-yellow-600);--st-selected-border-right-color:var(--st-yellow-600);--st-checkbox-checked-background-color:var(--st-slate-400);--st-checkbox-checked-border-color:var(--st-slate-400);--st-column-editor-background-color:var(--st-yellow-200);--st-column-editor-popout-background-color:var(--st-yellow-200);--st-button-hover-background-color:var(--st-yellow-200);--st-button-active-background-color:var(--st-slate-400);--st-font-family:"Georgia",serif;--st-editable-cell-focus-border-color:var(--st-yellow-400)}.theme-solarized-dark{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-slate-800);--st-scrollbar-thumb-color:var(--st-slate-600);--st-border-color:var(--st-slate-800);--st-odd-row-background-color:var(--st-slate-900);--st-even-row-background-color:var(--st-slate-800);--st-header-background-color:var(--st-slate-800);--st-dragging-background-color:var(--st-slate-800);--st-selected-cell-background-color:var(--st-slate-600);--st-selected-first-cell-background-color:var(--st-amber-600);--st-footer-background-color:var(--st-slate-900);--st-cell-color:var(--st-slate-300);--st-cell-odd-row-color:var(--st-slate-400);--st-edit-cell-shadow:0 1px 3px 0 var(--st-white/0.1),0 1px 2px -1px var(--st-white/0.1);--st-selected-cell-color:var(--st-slate-300);--st-selected-first-cell-color:var(--st-slate-300);--st-resize-handle-color:var(--st-slate-600);--st-separator-border-color:var(--st-slate-400);--st-last-group-row-separator-border-color:var(--st-slate-600);--st-selected-border-top-color:var(--st-blue-800);--st-selected-border-bottom-color:var(--st-blue-800);--st-selected-border-left-color:var(--st-blue-800);--st-selected-border-right-color:var(--st-blue-800);--st-checkbox-checked-background-color:var(--st-slate-600);--st-checkbox-checked-border-color:var(--st-slate-600);--st-column-editor-background-color:var(--st-slate-800);--st-column-editor-popout-background-color:var(--st-slate-800);--st-button-hover-background-color:var(--st-slate-600);--st-button-active-background-color:var(--st-slate-800);--st-font-family:"Courier New",monospace;--st-editable-cell-focus-border-color:var(--st-blue-800)}.theme-ocean{--st-border-radius:6px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.9rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-cyan-100);--st-scrollbar-thumb-color:var(--st-cyan-300);--st-border-color:var(--st-cyan-700);--st-odd-row-background-color:var(--st-cyan-50);--st-even-row-background-color:var(--st-cyan-100);--st-header-background-color:var(--st-cyan-100);--st-dragging-background-color:var(--st-cyan-300);--st-selected-cell-background-color:var(--st-cyan-700);--st-selected-first-cell-background-color:var(--st-slate-900);--st-footer-background-color:var(--st-cyan-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-cyan-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-cyan-300);--st-separator-border-color:var(--st-cyan-200);--st-last-group-row-separator-border-color:var(--st-cyan-500);--st-selected-border-top-color:var(--st-blue-700);--st-selected-border-bottom-color:var(--st-blue-700);--st-selected-border-left-color:var(--st-blue-700);--st-selected-border-right-color:var(--st-blue-700);--st-checkbox-checked-background-color:var(--st-cyan-700);--st-checkbox-checked-border-color:var(--st-cyan-700);--st-column-editor-background-color:var(--st-cyan-100);--st-column-editor-popout-background-color:var(--st-cyan-100);--st-button-hover-background-color:var(--st-cyan-300);--st-button-active-background-color:var(--st-cyan-700);--st-font-family:"Verdana",sans-serif;--st-editable-cell-focus-border-color:var(--st-cyan-500)}.theme-forest{--st-border-radius:4px;--st-border-width:1px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-green-100);--st-scrollbar-thumb-color:var(--st-green-400);--st-border-color:var(--st-green-800);--st-odd-row-background-color:var(--st-green-50);--st-even-row-background-color:var(--st-green-100);--st-header-background-color:var(--st-green-100);--st-dragging-background-color:var(--st-green-400);--st-selected-cell-background-color:var(--st-green-700);--st-selected-first-cell-background-color:var(--st-green-900);--st-footer-background-color:var(--st-green-50);--st-cell-color:var(--st-green-900);--st-cell-odd-row-color:var(--st-green-700);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-green-900);--st-selected-first-cell-color:var(--st-green-900);--st-resize-handle-color:var(--st-green-400);--st-separator-border-color:var(--st-green-200);--st-last-group-row-separator-border-color:var(--st-green-500);--st-selected-border-top-color:var(--st-green-600);--st-selected-border-bottom-color:var(--st-green-600);--st-selected-border-left-color:var(--st-green-600);--st-selected-border-right-color:var(--st-green-600);--st-checkbox-checked-background-color:var(--st-green-700);--st-checkbox-checked-border-color:var(--st-green-700);--st-column-editor-background-color:var(--st-green-100);--st-column-editor-popout-background-color:var(--st-green-100);--st-button-hover-background-color:var(--st-green-400);--st-button-active-background-color:var(--st-green-700);--st-font-family:"Tahoma",sans-serif;--st-editable-cell-focus-border-color:var(--st-green-600)}.theme-desert{--st-border-radius:8px;--st-border-width:1px;--st-cell-padding:10px;--st-font-size:0.9rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:6px;--st-spacing-medium:10px;--st-spacing-large:20px;--st-scrollbar-bg-color:var(--st-amber-100);--st-scrollbar-thumb-color:var(--st-amber-300);--st-border-color:var(--st-amber-600);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-header-background-color:var(--st-amber-100);--st-dragging-background-color:var(--st-amber-300);--st-selected-cell-background-color:var(--st-amber-600);--st-selected-first-cell-background-color:var(--st-amber-800);--st-footer-background-color:var(--st-amber-50);--st-cell-color:var(--st-amber-800);--st-cell-odd-row-color:var(--st-amber-600);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-amber-800);--st-selected-first-cell-color:var(--st-amber-800);--st-resize-handle-color:var(--st-amber-300);--st-separator-border-color:var(--st-amber-200);--st-last-group-row-separator-border-color:var(--st-amber-500);--st-selected-border-top-color:var(--st-amber-700);--st-selected-border-bottom-color:var(--st-amber-700);--st-selected-border-left-color:var(--st-amber-700);--st-selected-border-right-color:var(--st-amber-700);--st-checkbox-checked-background-color:var(--st-amber-600);--st-checkbox-checked-border-color:var(--st-amber-600);--st-column-editor-background-color:var(--st-amber-100);--st-column-editor-popout-background-color:var(--st-amber-100);--st-button-hover-background-color:var(--st-amber-300);--st-button-active-background-color:var(--st-amber-600);--st-font-family:"Times New Roman",serif;--st-editable-cell-focus-border-color:var(--st-amber-700)}.theme-bubblegum{--st-border-radius:16px;--st-border-width:2px;--st-cell-padding:12px;--st-font-size:1rem;--st-font-weight-normal:400;--st-font-weight-bold:600;--st-transition-duration:0.3s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:8px;--st-spacing-medium:12px;--st-spacing-large:24px;--st-scrollbar-bg-color:var(--st-pink-50);--st-scrollbar-thumb-color:var(--st-pink-300);--st-border-color:var(--st-pink-500);--st-odd-row-background-color:var(--st-pink-50);--st-even-row-background-color:var(--st-pink-100);--st-header-background-color:var(--st-pink-200);--st-dragging-background-color:var(--st-pink-300);--st-selected-cell-background-color:var(--st-pink-400);--st-selected-first-cell-background-color:var(--st-pink-600);--st-footer-background-color:var(--st-pink-50);--st-cell-color:var(--st-pink-900);--st-cell-odd-row-color:var(--st-pink-800);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-pink-900);--st-selected-first-cell-color:var(--st-pink-900);--st-resize-handle-color:var(--st-pink-400);--st-separator-border-color:var(--st-pink-200);--st-last-group-row-separator-border-color:var(--st-pink-500);--st-selected-border-top-color:var(--st-pink-700);--st-selected-border-bottom-color:var(--st-pink-700);--st-selected-border-left-color:var(--st-pink-700);--st-selected-border-right-color:var(--st-pink-700);--st-checkbox-checked-background-color:var(--st-pink-500);--st-checkbox-checked-border-color:var(--st-pink-500);--st-column-editor-background-color:var(--st-pink-100);--st-column-editor-popout-background-color:var(--st-pink-100);--st-button-hover-background-color:var(--st-pink-300);--st-button-active-background-color:var(--st-pink-400);--st-font-family:"Pacifico",cursive;--st-editable-cell-focus-border-color:var(--st-pink-600)}.theme-90s{--st-border-radius:0;--st-border-width:2px;--st-cell-padding:8px;--st-font-size:0.875rem;--st-font-weight-normal:400;--st-font-weight-bold:700;--st-transition-duration:0.1s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-spacing-small:4px;--st-spacing-medium:8px;--st-spacing-large:16px;--st-scrollbar-bg-color:var(--st-gray-200);--st-scrollbar-thumb-color:var(--st-gray-400);--st-border-color:var(--st-gray-500);--st-odd-row-background-color:var(--st-gray-100);--st-even-row-background-color:var(--st-gray-200);--st-header-background-color:var(--st-gray-300);--st-dragging-background-color:var(--st-gray-400);--st-selected-cell-background-color:var(--st-gray-500);--st-selected-first-cell-background-color:var(--st-gray-600);--st-footer-background-color:var(--st-gray-100);--st-cell-color:var(--st-gray-900);--st-cell-odd-row-color:var(--st-gray-800);--st-edit-cell-shadow:0 1px 3px 0 var(--st-black/0.1),0 1px 2px -1px var(--st-black/0.1);--st-selected-cell-color:var(--st-gray-900);--st-selected-first-cell-color:var(--st-gray-900);--st-resize-handle-color:var(--st-gray-400);--st-separator-border-color:var(--st-gray-200);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-top-color:var(--st-gray-700);--st-selected-border-bottom-color:var(--st-gray-700);--st-selected-border-left-color:var(--st-gray-700);--st-selected-border-right-color:var(--st-gray-700);--st-checkbox-checked-background-color:var(--st-gray-500);--st-checkbox-checked-border-color:var(--st-gray-500);--st-column-editor-background-color:var(--st-gray-200);--st-column-editor-popout-background-color:var(--st-gray-200);--st-button-hover-background-color:var(--st-gray-300);--st-button-active-background-color:var(--st-gray-400);--st-font-family:"Courier New",monospace;--st-editable-cell-focus-border-color:var(--st-gray-600)}.simple-table-root,.st-cell,.st-column-editor,.st-column-editor-popout,.st-footer,.st-header-cell,.st-header-container,.st-horizontal-scrollbar-container,.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-middle,.st-horizontal-scrollbar-right,.st-table-body-container,.st-table-body-main,.st-table-body-pinned-left,.st-table-body-pinned-right,.st-table-content,.st-table-wrapper,.st-table-wrapper-container,.st-wrapper{box-sizing:border-box;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--st-font-family,sans-serif)}.st-wrapper{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);max-height:100dvh;overflow:hidden;position:relative}.st-table-wrapper-container{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.st-table-wrapper{display:flex;flex:1;min-height:0;position:relative;width:100%}.st-table-content{display:flex;flex-direction:column}.st-header-container{display:flex}.st-header-container.st-header-scroll-padding:after{background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{overflow:auto;scrollbar-width:none;width:100%}.st-header-main::-webkit-scrollbar{display:none}.st-table-body-container{display:flex;height:max-content;overflow:auto;width:100%}.st-table-body-main,.st-table-body-pinned-left,.st-table-body-pinned-right{display:grid;height:max-content}.st-table-body-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-table-body-main{overflow:auto;scrollbar-width:none}.st-table-body-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-table-row{display:grid;position:absolute;transform:translateZ(0);transition:background .2s ease;width:100%}.st-header-cell{align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);border-top:var(--st-border-width) solid #0000;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0;z-index:1}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:grab}.st-cell,.st-header-cell{align-items:center;color:var(--st-slate-800);display:flex;gap:var(--st-spacing-small);overflow:hidden}.st-cell.right-aligned,.st-header-cell.right-aligned{justify-content:flex-end;text-align:right}.st-cell.right-aligned>.st-cell-content,.st-header-cell.right-aligned>.st-header-label{text-align:right}.st-cell.center-aligned,.st-header-cell.center-aligned{justify-content:center;text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-width))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-header-label{align-items:center;display:flex}.st-header-label.right-aligned{justify-content:flex-end;text-align:right}.st-cell-content,.st-header-label{box-sizing:border-box;color:var(--st-cell-color);flex:1;height:100%;overflow:hidden;padding:var(--st-cell-padding);text-align:left;text-overflow:ellipsis;user-select:none;white-space:nowrap;width:100%}.st-cell{border:var(--st-border-width) solid #0000;position:relative}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-sort-icon-container{align-items:center;display:flex;justify-content:center;margin-left:4px}.st-sort-icon{fill:var(--st-slate-500)}.st-header-resize-handle{background-color:var(--st-resize-handle-color);cursor:col-resize;height:12px;right:0;top:0;width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);grid-column:1/-1;height:1px}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-cell-even-row{background-color:var(--st-even-row-background-color)}.st-cell-odd-row:not(.st-cell-selected){background-color:var(--st-odd-row-background-color);color:var(--st-cell-odd-row-color)}.st-cell:not(.st-cell-odd-row):not(.st-cell-selected){color:var(--st-cell-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color);color:var(--st-selected-first-cell-color)}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-top-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-bottom-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-left-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-right-color)}.st-horizontal-scrollbar-container{align-items:center;border-top:var(--st-border-width) solid var(--st-border-color);display:flex;flex-shrink:0}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{background-color:var(--st-scrollbar-bg-color);height:100%}.st-horizontal-scrollbar-middle{overflow:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{align-items:center;display:flex}.st-next-prev-btn{fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);box-shadow:var(--st-edit-cell-shadow-color);box-sizing:border-box;font-size:var(--st-font-size);height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{background:var(--st-footer-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{border-left:var(--st-border-width) solid var(--st-border-color);display:flex;flex-direction:column;gap:var(--st-spacing-small);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small)}.st-column-editor-popout.open{width:200px}.st-column-editor-popout.left{transform:translateX(-100%)}.st-column-editor-popout.open.left{transform:translateX(0)}.st-checkbox-label{align-items:center;cursor:pointer;display:flex;gap:var(--st-spacing-medium)}.st-checkbox-input{display:none}.st-checkbox-custom{align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:flex;height:24px;justify-content:center;transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:24px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{border:solid #fff;border-width:0 2px 2px 0;height:11px;transform:rotate(45deg);width:6px}@keyframes slide-in-left{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-right{0%{transform:translateX(100%)}to{transform:translateX(0)}}.st-group-header{align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:flex;font-weight:var(--st-font-weight-bold);height:40px;transition:background-color var(--st-transition-duration) var(--st-transition-ease);user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{align-items:center;display:flex;gap:var(--st-spacing-medium)}.st-group-toggle-icon{align-items:center;display:flex;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{transform:rotate(0deg);transition:transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{transform:rotate(-90deg);transition:transform var(--st-transition-duration) var(--st-transition-ease)}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { RefObject } from "react";
|
|
2
2
|
import HeaderObject from "./HeaderObject";
|
|
3
3
|
type useDragHandlerProps = {
|
|
4
|
-
draggedHeaderRef:
|
|
5
|
-
headersRef:
|
|
6
|
-
hoveredHeaderRef:
|
|
4
|
+
draggedHeaderRef: RefObject<HeaderObject | null>;
|
|
5
|
+
headersRef: RefObject<HeaderObject[]>;
|
|
6
|
+
hoveredHeaderRef: RefObject<HeaderObject | null>;
|
|
7
|
+
onColumnOrderChange?: (newHeaders: HeaderObject[]) => void;
|
|
7
8
|
onTableHeaderDragEnd: (newHeaders: HeaderObject[]) => void;
|
|
8
9
|
};
|
|
9
10
|
export default useDragHandlerProps;
|
|
@@ -5,11 +5,13 @@ import SortConfig from "./SortConfig";
|
|
|
5
5
|
import Row from "./Row";
|
|
6
6
|
import SharedTableProps from "./SharedTableProps";
|
|
7
7
|
import OnSortProps from "./OnSortProps";
|
|
8
|
+
import HeaderObject from "./HeaderObject";
|
|
8
9
|
interface TableHeaderProps extends SharedTableProps {
|
|
9
10
|
columnResizing: boolean;
|
|
10
11
|
currentRows: Row[];
|
|
11
12
|
columnReordering: boolean;
|
|
12
13
|
forceUpdate: () => void;
|
|
14
|
+
onColumnOrderChange?: (newHeaders: HeaderObject[]) => void;
|
|
13
15
|
onSort: OnSortProps;
|
|
14
16
|
selectableColumns: boolean;
|
|
15
17
|
setIsWidthDragging: Dispatch<SetStateAction<boolean>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-table-core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.18",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"require": "./dist/index.js",
|
|
11
11
|
"types": "./dist/index.d.ts"
|
|
12
12
|
},
|
|
13
|
-
"./
|
|
13
|
+
"./styles.css": "./dist/styles.css"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"files": [
|