es-grid-template 1.8.71 → 1.8.72

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.
Files changed (235) hide show
  1. package/es/grid-component/TempTable.js +2 -1
  2. package/es/group-component/ColumnsChoose.d.ts +13 -0
  3. package/es/group-component/ColumnsChoose.js +211 -0
  4. package/es/group-component/ColumnsGroup/ColumnsGroup.d.ts +12 -0
  5. package/es/group-component/ColumnsGroup/ColumnsGroup.js +230 -0
  6. package/es/group-component/ColumnsGroup/index.d.ts +1 -0
  7. package/es/group-component/ColumnsGroup/index.js +1 -0
  8. package/es/group-component/ContextMenu.d.ts +19 -0
  9. package/es/group-component/ContextMenu.js +74 -0
  10. package/es/group-component/InternalTable.d.ts +8 -0
  11. package/es/group-component/InternalTable.js +224 -0
  12. package/es/group-component/TableContainer.d.ts +49 -0
  13. package/es/group-component/TableContainer.js +375 -0
  14. package/es/group-component/TableContainerEdit.d.ts +48 -0
  15. package/es/group-component/TableContainerEdit.js +2068 -0
  16. package/es/group-component/body/EditableCell.d.ts +16 -0
  17. package/es/group-component/body/EditableCell.js +1066 -0
  18. package/es/group-component/body/TableBody.d.ts +14 -0
  19. package/es/group-component/body/TableBody.js +82 -0
  20. package/es/group-component/body/TableBodyCell.d.ts +12 -0
  21. package/es/group-component/body/TableBodyCell.js +587 -0
  22. package/es/group-component/body/TableBodyCellEdit.d.ts +17 -0
  23. package/es/group-component/body/TableBodyCellEdit.js +1398 -0
  24. package/es/group-component/body/TableBodyCellEmpty.d.ts +12 -0
  25. package/es/group-component/body/TableBodyCellEmpty.js +149 -0
  26. package/es/group-component/body/TableBodyRow.d.ts +21 -0
  27. package/es/group-component/body/TableBodyRow.js +199 -0
  28. package/es/group-component/body/TableBodyRowGroupCell.d.ts +12 -0
  29. package/es/group-component/body/TableBodyRowGroupCell.js +567 -0
  30. package/es/group-component/components/ControlCheckbox.d.ts +13 -0
  31. package/es/group-component/components/ControlCheckbox.js +84 -0
  32. package/es/group-component/components/EditForm/EditForm.d.ts +27 -0
  33. package/es/group-component/components/EditForm/EditForm.js +394 -0
  34. package/es/group-component/components/EditForm/index.d.ts +1 -0
  35. package/es/group-component/components/EditForm/index.js +1 -0
  36. package/es/group-component/components/InputControl/InputControl.d.ts +27 -0
  37. package/es/group-component/components/InputControl/InputControl.js +118 -0
  38. package/es/group-component/components/InputControl/index.d.ts +1 -0
  39. package/es/group-component/components/InputControl/index.js +1 -0
  40. package/es/group-component/components/async-select/index.d.ts +11 -0
  41. package/es/group-component/components/async-select/index.js +38 -0
  42. package/es/group-component/components/async-table-select/index.d.ts +11 -0
  43. package/es/group-component/components/async-table-select/index.js +40 -0
  44. package/es/group-component/components/checkbox-control/index.d.ts +13 -0
  45. package/es/group-component/components/checkbox-control/index.js +40 -0
  46. package/es/group-component/components/checkbox-filter/CheckboxFilter.d.ts +18 -0
  47. package/es/group-component/components/checkbox-filter/CheckboxFilter.js +258 -0
  48. package/es/group-component/components/checkbox-filter/FilterSearch.d.ts +12 -0
  49. package/es/group-component/components/checkbox-filter/FilterSearch.js +36 -0
  50. package/es/group-component/components/command/Command.d.ts +10 -0
  51. package/es/group-component/components/command/Command.js +35 -0
  52. package/es/group-component/components/number/index.d.ts +12 -0
  53. package/es/group-component/components/number/index.js +42 -0
  54. package/es/group-component/components/number-range/index.d.ts +13 -0
  55. package/es/group-component/components/number-range/index.js +79 -0
  56. package/es/group-component/features/operator.d.ts +24 -0
  57. package/es/group-component/features/operator.js +62 -0
  58. package/es/group-component/footer/TableFooter.d.ts +7 -0
  59. package/es/group-component/footer/TableFooter.js +34 -0
  60. package/es/group-component/footer/TableFooterCell.d.ts +7 -0
  61. package/es/group-component/footer/TableFooterCell.js +66 -0
  62. package/es/group-component/footer/TableFooterRow.d.ts +8 -0
  63. package/es/group-component/footer/TableFooterRow.js +30 -0
  64. package/es/group-component/header/TableHead.d.ts +15 -0
  65. package/es/group-component/header/TableHead.js +98 -0
  66. package/es/group-component/header/TableHeadCell.d.ts +15 -0
  67. package/es/group-component/header/TableHeadCell.js +310 -0
  68. package/es/group-component/header/TableHeadCell2.d.ts +17 -0
  69. package/es/group-component/header/TableHeadCell2.js +321 -0
  70. package/es/group-component/header/TableHeadGroupCell.d.ts +17 -0
  71. package/es/group-component/header/TableHeadGroupCell.js +94 -0
  72. package/es/group-component/header/TableHeadRow.d.ts +15 -0
  73. package/es/group-component/header/TableHeadRow.js +52 -0
  74. package/es/group-component/header/renderFilter.d.ts +20 -0
  75. package/es/group-component/header/renderFilter.js +291 -0
  76. package/es/group-component/hook/convert.d.ts +1 -0
  77. package/es/group-component/hook/convert.js +28 -0
  78. package/es/group-component/hook/useColumns.d.ts +28 -0
  79. package/es/group-component/hook/useColumns.js +306 -0
  80. package/es/group-component/hook/useFilterOperator.d.ts +7 -0
  81. package/es/group-component/hook/useFilterOperator.js +33 -0
  82. package/es/group-component/hook/utils.d.ts +220 -0
  83. package/es/group-component/hook/utils.js +2340 -0
  84. package/es/group-component/index.d.ts +2 -0
  85. package/es/group-component/index.js +2 -0
  86. package/es/group-component/style.d.ts +22 -0
  87. package/es/group-component/style.js +48 -0
  88. package/es/group-component/style.scss +1438 -0
  89. package/es/group-component/table/Grid.d.ts +33 -0
  90. package/es/group-component/table/Grid.js +438 -0
  91. package/es/group-component/table/TableWrapper.d.ts +33 -0
  92. package/es/group-component/table/TableWrapper.js +250 -0
  93. package/es/group-component/useContext.d.ts +100 -0
  94. package/es/group-component/useContext.js +21 -0
  95. package/es/table-component/InternalTable.js +6 -1
  96. package/es/table-component/TableContainer.js +4 -2
  97. package/es/table-component/body/TableBodyCell.js +49 -40
  98. package/es/table-component/body/TableBodyRow.js +4 -1
  99. package/es/table-component/hook/utils.d.ts +1 -0
  100. package/es/table-component/hook/utils.js +15 -7
  101. package/es/table-component/style.js +1 -1
  102. package/es/table-component/table/Grid.js +3 -0
  103. package/es/table-component/useContext.d.ts +5 -0
  104. package/es/table-virtuoso/InternalTable.js +2 -2
  105. package/es/table-virtuoso/body/TableBodyCell.js +2 -7
  106. package/es/table-virtuoso/body/TableBodyCellRowGroup.d.ts +14 -0
  107. package/es/table-virtuoso/body/TableBodyCellRowGroup.js +196 -0
  108. package/es/table-virtuoso/body/TableBodyRow.d.ts +1 -1
  109. package/es/table-virtuoso/body/TableBodyRow.js +43 -1
  110. package/es/table-virtuoso/hook/utils.d.ts +1 -0
  111. package/es/table-virtuoso/hook/utils.js +29 -0
  112. package/es/table-virtuoso/style.js +3 -1
  113. package/es/table-virtuoso/table/Grid.js +2 -2
  114. package/es/table-virtuoso/table/TableWrapper.d.ts +7 -1
  115. package/es/table-virtuoso/table/TableWrapper.js +24 -5
  116. package/es/table-virtuoso/useContext.d.ts +6 -3
  117. package/es/table-virtuoso/useContext.js +18 -0
  118. package/lib/grid-component/TempTable.js +2 -1
  119. package/lib/group-component/ColumnsChoose.d.ts +13 -0
  120. package/lib/group-component/ColumnsChoose.js +221 -0
  121. package/lib/group-component/ColumnsGroup/ColumnsGroup.d.ts +12 -0
  122. package/lib/group-component/ColumnsGroup/ColumnsGroup.js +241 -0
  123. package/lib/group-component/ColumnsGroup/index.d.ts +1 -0
  124. package/lib/group-component/ColumnsGroup/index.js +16 -0
  125. package/lib/group-component/ContextMenu.d.ts +19 -0
  126. package/lib/group-component/ContextMenu.js +83 -0
  127. package/lib/group-component/InternalTable.d.ts +8 -0
  128. package/lib/group-component/InternalTable.js +233 -0
  129. package/lib/group-component/TableContainer.d.ts +49 -0
  130. package/lib/group-component/TableContainer.js +382 -0
  131. package/lib/group-component/TableContainerEdit.d.ts +48 -0
  132. package/lib/group-component/TableContainerEdit.js +2075 -0
  133. package/lib/group-component/body/EditableCell.d.ts +16 -0
  134. package/lib/group-component/body/EditableCell.js +1075 -0
  135. package/lib/group-component/body/TableBody.d.ts +14 -0
  136. package/lib/group-component/body/TableBody.js +91 -0
  137. package/lib/group-component/body/TableBodyCell.d.ts +12 -0
  138. package/lib/group-component/body/TableBodyCell.js +595 -0
  139. package/lib/group-component/body/TableBodyCellEdit.d.ts +17 -0
  140. package/lib/group-component/body/TableBodyCellEdit.js +1405 -0
  141. package/lib/group-component/body/TableBodyCellEmpty.d.ts +12 -0
  142. package/lib/group-component/body/TableBodyCellEmpty.js +156 -0
  143. package/lib/group-component/body/TableBodyRow.d.ts +21 -0
  144. package/lib/group-component/body/TableBodyRow.js +206 -0
  145. package/lib/group-component/body/TableBodyRowGroupCell.d.ts +12 -0
  146. package/lib/group-component/body/TableBodyRowGroupCell.js +575 -0
  147. package/lib/group-component/components/ControlCheckbox.d.ts +13 -0
  148. package/lib/group-component/components/ControlCheckbox.js +92 -0
  149. package/lib/group-component/components/EditForm/EditForm.d.ts +27 -0
  150. package/lib/group-component/components/EditForm/EditForm.js +404 -0
  151. package/lib/group-component/components/EditForm/index.d.ts +1 -0
  152. package/lib/group-component/components/EditForm/index.js +16 -0
  153. package/lib/group-component/components/InputControl/InputControl.d.ts +27 -0
  154. package/lib/group-component/components/InputControl/InputControl.js +127 -0
  155. package/lib/group-component/components/InputControl/index.d.ts +1 -0
  156. package/lib/group-component/components/InputControl/index.js +16 -0
  157. package/lib/group-component/components/async-select/index.d.ts +11 -0
  158. package/lib/group-component/components/async-select/index.js +47 -0
  159. package/lib/group-component/components/async-table-select/index.d.ts +11 -0
  160. package/lib/group-component/components/async-table-select/index.js +49 -0
  161. package/lib/group-component/components/checkbox-control/index.d.ts +13 -0
  162. package/lib/group-component/components/checkbox-control/index.js +48 -0
  163. package/lib/group-component/components/checkbox-filter/CheckboxFilter.d.ts +18 -0
  164. package/lib/group-component/components/checkbox-filter/CheckboxFilter.js +267 -0
  165. package/lib/group-component/components/checkbox-filter/FilterSearch.d.ts +12 -0
  166. package/lib/group-component/components/checkbox-filter/FilterSearch.js +44 -0
  167. package/lib/group-component/components/command/Command.d.ts +10 -0
  168. package/lib/group-component/components/command/Command.js +44 -0
  169. package/lib/group-component/components/number/index.d.ts +12 -0
  170. package/lib/group-component/components/number/index.js +50 -0
  171. package/lib/group-component/components/number-range/index.d.ts +13 -0
  172. package/lib/group-component/components/number-range/index.js +87 -0
  173. package/lib/group-component/features/operator.d.ts +24 -0
  174. package/lib/group-component/features/operator.js +67 -0
  175. package/lib/group-component/footer/TableFooter.d.ts +7 -0
  176. package/lib/group-component/footer/TableFooter.js +44 -0
  177. package/lib/group-component/footer/TableFooterCell.d.ts +7 -0
  178. package/lib/group-component/footer/TableFooterCell.js +75 -0
  179. package/lib/group-component/footer/TableFooterRow.d.ts +8 -0
  180. package/lib/group-component/footer/TableFooterRow.js +37 -0
  181. package/lib/group-component/header/TableHead.d.ts +15 -0
  182. package/lib/group-component/header/TableHead.js +107 -0
  183. package/lib/group-component/header/TableHeadCell.d.ts +15 -0
  184. package/lib/group-component/header/TableHeadCell.js +319 -0
  185. package/lib/group-component/header/TableHeadCell2.d.ts +17 -0
  186. package/lib/group-component/header/TableHeadCell2.js +330 -0
  187. package/lib/group-component/header/TableHeadGroupCell.d.ts +17 -0
  188. package/lib/group-component/header/TableHeadGroupCell.js +103 -0
  189. package/lib/group-component/header/TableHeadRow.d.ts +15 -0
  190. package/lib/group-component/header/TableHeadRow.js +59 -0
  191. package/lib/group-component/header/renderFilter.d.ts +20 -0
  192. package/lib/group-component/header/renderFilter.js +301 -0
  193. package/lib/group-component/hook/convert.d.ts +1 -0
  194. package/lib/group-component/hook/convert.js +34 -0
  195. package/lib/group-component/hook/useColumns.d.ts +28 -0
  196. package/lib/group-component/hook/useColumns.js +318 -0
  197. package/lib/group-component/hook/useFilterOperator.d.ts +7 -0
  198. package/lib/group-component/hook/useFilterOperator.js +40 -0
  199. package/lib/group-component/hook/utils.d.ts +220 -0
  200. package/lib/group-component/hook/utils.js +2468 -0
  201. package/lib/group-component/index.d.ts +2 -0
  202. package/lib/group-component/index.js +9 -0
  203. package/lib/group-component/style.d.ts +22 -0
  204. package/lib/group-component/style.js +55 -0
  205. package/lib/group-component/style.scss +1438 -0
  206. package/lib/group-component/table/Grid.d.ts +33 -0
  207. package/lib/group-component/table/Grid.js +443 -0
  208. package/lib/group-component/table/TableWrapper.d.ts +33 -0
  209. package/lib/group-component/table/TableWrapper.js +259 -0
  210. package/lib/group-component/useContext.d.ts +100 -0
  211. package/lib/group-component/useContext.js +27 -0
  212. package/lib/table-component/InternalTable.js +6 -1
  213. package/lib/table-component/TableContainer.js +4 -2
  214. package/lib/table-component/body/TableBodyCell.js +49 -40
  215. package/lib/table-component/body/TableBodyRow.js +4 -1
  216. package/lib/table-component/hook/utils.d.ts +1 -0
  217. package/lib/table-component/hook/utils.js +16 -7
  218. package/lib/table-component/style.js +1 -1
  219. package/lib/table-component/table/Grid.js +3 -0
  220. package/lib/table-component/useContext.d.ts +5 -0
  221. package/lib/table-virtuoso/InternalTable.js +2 -2
  222. package/lib/table-virtuoso/body/TableBodyCell.js +2 -7
  223. package/lib/table-virtuoso/body/TableBodyCellRowGroup.d.ts +14 -0
  224. package/lib/table-virtuoso/body/TableBodyCellRowGroup.js +203 -0
  225. package/lib/table-virtuoso/body/TableBodyRow.d.ts +1 -1
  226. package/lib/table-virtuoso/body/TableBodyRow.js +43 -1
  227. package/lib/table-virtuoso/hook/utils.d.ts +1 -0
  228. package/lib/table-virtuoso/hook/utils.js +32 -1
  229. package/lib/table-virtuoso/style.js +3 -1
  230. package/lib/table-virtuoso/table/Grid.js +2 -2
  231. package/lib/table-virtuoso/table/TableWrapper.d.ts +7 -1
  232. package/lib/table-virtuoso/table/TableWrapper.js +24 -5
  233. package/lib/table-virtuoso/useContext.d.ts +6 -3
  234. package/lib/table-virtuoso/useContext.js +18 -0
  235. package/package.json +1 -1
@@ -0,0 +1,250 @@
1
+ import classNames from "classnames";
2
+ import TableHead from "../header/TableHead";
3
+ import TableBody from "../body/TableBody";
4
+ import TableFooter from "../footer/TableFooter";
5
+ import ComponentSpinner from "../../grid-component/LoadingSpinner";
6
+ import { Tooltip } from "react-tooltip";
7
+ import ContextMenu from "../ContextMenu";
8
+ import React, { useContext } from "react";
9
+ import { TableContext } from "../useContext";
10
+ const TableWrapper = props => {
11
+ const {
12
+ id,
13
+ prefix,
14
+ tableContainerRef,
15
+ height,
16
+ minHeight,
17
+ summary,
18
+ table,
19
+ loading,
20
+ commandClick,
21
+ editAble,
22
+ contextMenuItems: propContextMenuItems,
23
+ contextMenuHidden,
24
+ showEmptyText,
25
+ contextMenuClick,
26
+ contextMenuOpen,
27
+ next,
28
+ dataSource,
29
+ pagination,
30
+ infiniteScroll,
31
+ columnVirtualizer,
32
+ fixedLeftColumns,
33
+ fixedRightColumns,
34
+ virtualPaddingLeft,
35
+ virtualPaddingRight
36
+ } = props;
37
+ const menuRef = React.useRef(null);
38
+ const loadingRef = React.useRef(false);
39
+ const hasMoreRef = React.useRef(true);
40
+ const {
41
+ windowSize
42
+ } = useContext(TableContext);
43
+ const {
44
+ currentPage,
45
+ pageSize,
46
+ total
47
+ } = pagination ?? {};
48
+ const [menuVisible, setMenuVisible] = React.useState(false);
49
+ const [selectedRowData, setSelectedRowData] = React.useState(null);
50
+ const [position, setPosition] = React.useState({
51
+ x: 0,
52
+ y: 0,
53
+ viewportWidth: windowSize.innerWidth,
54
+ viewportHeight: windowSize.innerHeight
55
+ });
56
+ const contextMenuItems = React.useMemo(() => {
57
+ if (typeof contextMenuHidden === 'function' && propContextMenuItems && selectedRowData) {
58
+ const hiddenItems = contextMenuHidden({
59
+ rowInfo: {
60
+ rowData: selectedRowData
61
+ }
62
+ });
63
+ return propContextMenuItems.filter(item => !hiddenItems.includes(item?.key));
64
+ }
65
+ if (contextMenuHidden && typeof contextMenuHidden !== 'function' && propContextMenuItems) {
66
+ return propContextMenuItems.filter(item => !contextMenuHidden.includes(item?.key));
67
+ }
68
+ return propContextMenuItems;
69
+ }, [propContextMenuItems, contextMenuHidden, selectedRowData]);
70
+ const loadData = page => {
71
+ if (!hasMoreRef.current || loadingRef.current || loading) return;
72
+ loadingRef.current = true;
73
+ setTimeout(() => {
74
+ next?.();
75
+ if (page * pageSize >= total) {
76
+ hasMoreRef.current = false;
77
+ }
78
+ loadingRef.current = false;
79
+ }, 10);
80
+ };
81
+ const handleNext = () => {
82
+ loadData(currentPage + 1);
83
+ };
84
+ const handleScroll = e => {
85
+ if (infiniteScroll) {
86
+ if (loadingRef.current || loading || dataSource?.length === 0) {
87
+ e.stopPropagation();
88
+ e.preventDefault();
89
+ return;
90
+ }
91
+ const {
92
+ scrollHeight: tbScrollHeight,
93
+ scrollTop,
94
+ clientHeight
95
+ } = e.currentTarget;
96
+ const isEnd = scrollTop + clientHeight >= tbScrollHeight - 50;
97
+ if (isEnd && !loadingRef.current && hasMoreRef.current && dataSource?.length > 0) {
98
+ handleNext();
99
+ }
100
+ }
101
+ if (e.target.scrollLeft >= 0 && e.target.scrollLeft + e.target.clientWidth < e.target.scrollWidth) {
102
+ e.target.classList.add('ui-rc-table-ping-right');
103
+ } else {
104
+ e.target.classList.remove('ui-rc-table-ping-right');
105
+ }
106
+ if ((e.target.scrollLeft ?? 0) > 0) {
107
+ e.target.classList.add('ui-rc-table-ping-left');
108
+ } else {
109
+ e.target.classList.remove('ui-rc-table-ping-left');
110
+ }
111
+ };
112
+ const onContextMenu = data => event => {
113
+ event.preventDefault(); // Ngăn chặn menu mặc định của trình duyệt
114
+
115
+ setSelectedRowData(data);
116
+ contextMenuOpen?.({
117
+ rowInfo: {
118
+ rowData: data
119
+ },
120
+ event
121
+ });
122
+ setMenuVisible(true);
123
+
124
+ // Đợi DOM cập nhật và lấy kích thước menu
125
+ setTimeout(() => {
126
+ const menuElement = menuRef.current; // Lấy menu từ DOM
127
+ const menuWidth = menuElement?.offsetWidth || 200; // Mặc định 200px nếu chưa render
128
+ const menuHeight = menuElement?.offsetHeight; // Mặc định 450px nếu chưa render
129
+
130
+ // Điều chỉnh vị trí menu
131
+ let x = event.clientX;
132
+ let y = event.clientY;
133
+ if (x + menuWidth > windowSize.innerWidth) {
134
+ x = x - menuWidth - 10; // Cách cạnh phải 10px
135
+ }
136
+ if (y + menuHeight > windowSize.innerHeight) {
137
+ if (y < menuHeight) {
138
+ y = 10;
139
+ } else {
140
+ y = y - 10 - menuHeight; // Cách cạnh dưới 10px
141
+ }
142
+ }
143
+ setPosition(prevState => ({
144
+ ...prevState,
145
+ x,
146
+ y
147
+ }));
148
+ }, 100);
149
+ if (!menuVisible) {
150
+ document.addEventListener(`click`, function onClickOutside(e) {
151
+ const element = e.target;
152
+ const menuContainer = document.querySelector('.popup-context-menu');
153
+ const isInsideContainer = element.closest('.popup-context-menu') && menuContainer;
154
+ if (isInsideContainer) {
155
+ return;
156
+ }
157
+ setMenuVisible(false);
158
+ setPosition(prevState => ({
159
+ ...prevState,
160
+ x: undefined,
161
+ y: undefined
162
+ }));
163
+ document.removeEventListener(`click`, onClickOutside);
164
+ });
165
+ }
166
+ };
167
+ return /*#__PURE__*/React.createElement("div", {
168
+ style: {
169
+ position: 'relative'
170
+ },
171
+ className: classNames(`${prefix}-grid-container`, {
172
+ 'ui-rc-table-ping-right': tableContainerRef && (tableContainerRef.current?.scrollLeft ?? 0) >= 0 && (tableContainerRef.current?.scrollLeft ?? 0) + (tableContainerRef.current?.clientWidth ?? 0) < (tableContainerRef.current?.scrollWidth ?? 0),
173
+ 'ui-rc-table-ping-left': tableContainerRef && (tableContainerRef.current?.scrollLeft ?? 0) > 0
174
+ })
175
+ }, /*#__PURE__*/React.createElement("div", {
176
+ // id={id}
177
+ ref: tableContainerRef,
178
+ style: {
179
+ overflow: 'auto',
180
+ //our scrollable table container
181
+ position: 'relative',
182
+ //needed for sticky header
183
+ maxHeight: height,
184
+ //should be a fixed height
185
+ minHeight: minHeight ? height : undefined //should be a fixed height
186
+ }
187
+ // onScroll={infiniteScroll ? handleScroll : undefined}
188
+ ,
189
+ onScroll: handleScroll
190
+ }, /*#__PURE__*/React.createElement("div", {
191
+ style: {
192
+ display: 'grid',
193
+ minWidth: table.getTotalSize()
194
+ }
195
+ }, /*#__PURE__*/React.createElement(TableHead, {
196
+ tableContainerRef: tableContainerRef,
197
+ table: table,
198
+ columnVirtualizer: columnVirtualizer,
199
+ virtualPaddingLeft: virtualPaddingLeft,
200
+ virtualPaddingRight: virtualPaddingRight,
201
+ fixedLeftColumns: fixedLeftColumns,
202
+ fixedRightColumns: fixedRightColumns
203
+ }), /*#__PURE__*/React.createElement(TableBody, {
204
+ tableId: id,
205
+ table: table,
206
+ tableContainerRef: tableContainerRef,
207
+ commandClick: commandClick,
208
+ editAble: editAble,
209
+ contextMenuItems: contextMenuItems,
210
+ showEmptyText: showEmptyText,
211
+ onContextMenu: onContextMenu,
212
+ columnVirtualizer: columnVirtualizer,
213
+ virtualPaddingLeft: virtualPaddingLeft,
214
+ virtualPaddingRight: virtualPaddingRight,
215
+ fixedLeftColumns: fixedLeftColumns,
216
+ fixedRightColumns: fixedRightColumns
217
+ }), summary && /*#__PURE__*/React.createElement(TableFooter
218
+ // columnVirtualizer={columnVirtualizer}
219
+ , {
220
+ table: table
221
+ // virtualPaddingLeft={virtualPaddingLeft}
222
+ // virtualPaddingRight={virtualPaddingRight}
223
+ // fixedLeftColumns={fixedLeftColumns}
224
+ // fixedRightColumns={fixedRightColumns}
225
+ }))), loading && /*#__PURE__*/React.createElement("div", {
226
+ className: "spinner-loading"
227
+ }, /*#__PURE__*/React.createElement(ComponentSpinner, null)), /*#__PURE__*/React.createElement(Tooltip, {
228
+ id: `${id}-tooltip-content`,
229
+ style: {
230
+ zIndex: 1999,
231
+ maxWidth: 450
232
+ },
233
+ delayShow: 100
234
+ }), /*#__PURE__*/React.createElement(Tooltip, {
235
+ id: `${id}-tooltip-error`,
236
+ style: {
237
+ zIndex: 1999,
238
+ maxWidth: 450
239
+ }
240
+ }), menuVisible && /*#__PURE__*/React.createElement(ContextMenu, {
241
+ open: menuVisible,
242
+ pos: position,
243
+ setOpen: setMenuVisible,
244
+ menuRef: menuRef,
245
+ contextMenuItems: contextMenuItems,
246
+ contextMenuClick: contextMenuClick,
247
+ rowData: selectedRowData
248
+ }));
249
+ };
250
+ export default TableWrapper;
@@ -0,0 +1,100 @@
1
+ import type { Dispatch, SetStateAction } from 'react';
2
+ import type { ColumnTable, ExpandableConfig, IFormat, IWrapSettings, Locale, PaginationConfig, RangeState, RecordDoubleClickEventArgs, RowClassName, SelectionSettings, SourceFilter } from "./../grid-component/type";
3
+ import type { SubmitHandler } from "react-hook-form";
4
+ import type { ExpandedState, Row, Table } from '@tanstack/react-table';
5
+ export type IPositionCell = {
6
+ rowId: string;
7
+ colId: string;
8
+ } | undefined;
9
+ export interface IContext<T> {
10
+ t?: any;
11
+ prefix: string;
12
+ id: string;
13
+ rowKey: string;
14
+ originData: any[];
15
+ dataSource: any[];
16
+ format?: IFormat;
17
+ expandable?: ExpandableConfig<T>;
18
+ wrapSettings?: IWrapSettings;
19
+ setExpanded: Dispatch<SetStateAction<ExpandedState>>;
20
+ expanded: ExpandedState;
21
+ recordDoubleClick?: (args: RecordDoubleClickEventArgs<T>) => void;
22
+ selectionSettings?: SelectionSettings;
23
+ isSelectionChange?: {
24
+ isChange: boolean;
25
+ type: string;
26
+ rowData: T;
27
+ rowsData: T[];
28
+ };
29
+ setIsSelectionChange: Dispatch<SetStateAction<{
30
+ isChange: boolean;
31
+ type: string;
32
+ rowData: T;
33
+ rowsData: T[];
34
+ }>>;
35
+ setSorterChange: Dispatch<SetStateAction<boolean>>;
36
+ setFilterChange: Dispatch<SetStateAction<boolean>>;
37
+ onContextMenu?: (data: T) => (event: any) => void;
38
+ locale?: Locale;
39
+ windowSize: {
40
+ innerHeight: number;
41
+ innerWidth: number;
42
+ };
43
+ control?: any;
44
+ errors?: any;
45
+ handleSubmit?: any;
46
+ onSubmit?: SubmitHandler<any>;
47
+ getValues?: any;
48
+ reset?: any;
49
+ setValue?: any;
50
+ handleCellChange?: (args: ContextCellChange) => void;
51
+ handleCellChangeAndAddRow?: (args: ContextCellChange) => void;
52
+ editingKey?: string;
53
+ setEditingKey?: Dispatch<SetStateAction<string>>;
54
+ rangeState?: RangeState;
55
+ setRangeState?: Dispatch<SetStateAction<RangeState | undefined>>;
56
+ rangePasteState?: RangeState;
57
+ setRangePasteState?: Dispatch<SetStateAction<RangeState | undefined>>;
58
+ startCell?: IPositionCell;
59
+ setStartCell?: Dispatch<SetStateAction<IPositionCell | undefined>>;
60
+ endCell?: IPositionCell;
61
+ setEndCell?: Dispatch<SetStateAction<IPositionCell | undefined>>;
62
+ startPasteCell?: IPositionCell;
63
+ setStartPasteCell?: Dispatch<SetStateAction<IPositionCell | undefined>>;
64
+ endPasteCell?: IPositionCell;
65
+ setEndPasteCell?: Dispatch<SetStateAction<IPositionCell | undefined>>;
66
+ isSelecting?: boolean;
67
+ setIsSelecting?: Dispatch<SetStateAction<boolean>>;
68
+ isPasting?: boolean;
69
+ setIsPasting?: Dispatch<SetStateAction<boolean>>;
70
+ focusedCell?: IPositionCell;
71
+ setFocusedCell?: Dispatch<SetStateAction<IPositionCell | undefined>>;
72
+ triggerPaste?: (pastedRows: T[], pastedColumnsArray: string[], newData: T[], copyRows: T[]) => void;
73
+ handleDeleteContent?: () => void;
74
+ handleAddMulti?: (item: any, n: number, id?: string) => void;
75
+ dataErrors?: any[];
76
+ isDataTree: boolean;
77
+ handleCellClick?: (rowNumber: number, record: T, column: ColumnTable, rowId: string, cellValue: any) => void;
78
+ pagination?: false | PaginationConfig;
79
+ rowClassName?: string | RowClassName<T>;
80
+ table?: Table<T>;
81
+ rowEditable?: (rowData: T) => boolean;
82
+ onRowStyles?: Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'> | ((data: T, row: Row<T>) => Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'>);
83
+ onRowHeaderStyles?: Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'> | (() => Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'>);
84
+ onRowFooterStyles?: Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'> | (() => Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'>);
85
+ dataSourceFilter?: SourceFilter[];
86
+ groupColumns?: string[];
87
+ }
88
+ export declare const TableContext: import("react").Context<IContext<any>>;
89
+ export type ContextCellChange = {
90
+ key: string;
91
+ record: any;
92
+ field: string;
93
+ option: any;
94
+ indexRow: number;
95
+ indexCol: number;
96
+ newState?: any;
97
+ prevState?: any;
98
+ type: 'enter' | 'blur' | 'outClick';
99
+ addNewRow?: boolean;
100
+ };
@@ -0,0 +1,21 @@
1
+ import { createContext } from 'react';
2
+ export const TableContext = /*#__PURE__*/createContext({
3
+ prefix: 'ui-rc',
4
+ id: '',
5
+ isDataTree: false,
6
+ rowKey: 'rowId',
7
+ dataSource: [],
8
+ originData: [],
9
+ expanded: {},
10
+ windowSize: {
11
+ innerHeight: 0,
12
+ innerWidth: 0
13
+ },
14
+ // triggerFilter: () => { },
15
+
16
+ setIsSelectionChange: () => {},
17
+ setSorterChange: () => {},
18
+ setFilterChange: () => {},
19
+ setExpanded: () => {},
20
+ handleCellClick: () => {}
21
+ });
@@ -30,6 +30,7 @@ const InternalTable = props => {
30
30
  selectionSettings,
31
31
  expandable,
32
32
  onChooseColumns,
33
+ onExpandClick,
33
34
  // contextMenuClick,
34
35
  // contextMenuOpen,
35
36
  height,
@@ -105,6 +106,9 @@ const InternalTable = props => {
105
106
  value: undefined
106
107
  });
107
108
  React.useEffect(() => {
109
+ if (onExpandClick) {
110
+ return;
111
+ }
108
112
  if (defaultExpandAllRows) {
109
113
  const allKeys = findAllChildrenKeys2(convertData, rowKey, 'children');
110
114
  setExpanded(convertToObjTrue(allKeys));
@@ -113,7 +117,7 @@ const InternalTable = props => {
113
117
  setExpanded(convertToObjTrue(defaultExpandedRowKeys ?? []));
114
118
  }
115
119
  }
116
- }, [defaultExpandAllRows, convertData, defaultExpandedRowKeys]);
120
+ }, [defaultExpandAllRows, convertData, defaultExpandedRowKeys, onExpandClick]);
117
121
 
118
122
  // ========================= Keys =========================
119
123
 
@@ -181,6 +185,7 @@ const InternalTable = props => {
181
185
  selectionSettings: selectionSettings,
182
186
  mergedSelectedKeys: mergedSelectedKeys,
183
187
  expandable: expandable,
188
+ onExpandClick: onExpandClick,
184
189
  setColumns: setColumns
185
190
  })));
186
191
  };
@@ -69,7 +69,8 @@ const TableContainer = props => {
69
69
  onRowFooterStyles,
70
70
  onRowHeaderStyles,
71
71
  title,
72
- dataSourceFilter
72
+ dataSourceFilter,
73
+ onExpandClick
73
74
  } = props;
74
75
  const tableContainerRef = React.useRef(null);
75
76
  const containerRef = React.useRef(null);
@@ -272,7 +273,8 @@ const TableContainer = props => {
272
273
  onRowHeaderStyles,
273
274
  table,
274
275
  pagination,
275
- dataSourceFilter
276
+ dataSourceFilter,
277
+ onExpandClick
276
278
  }
277
279
  }, /*#__PURE__*/React.createElement(TableWrapper, {
278
280
  contextMenuItems: contextMenuItems,
@@ -78,7 +78,8 @@ const renderSelection = args => {
78
78
  expandIconColumnIndex,
79
79
  isDataTree,
80
80
  expanded,
81
- setExpanded
81
+ setExpanded,
82
+ onExpandClick
82
83
  } = args;
83
84
  const {
84
85
  selectionSettings,
@@ -96,20 +97,33 @@ const renderSelection = args => {
96
97
  }
97
98
  }, /*#__PURE__*/React.createElement("div", null, cell.row.getCanExpand() ? /*#__PURE__*/React.createElement("button", {
98
99
  // onClick: row.getToggleExpandedHandler(),
99
- onClick: () => {
100
+ onClick: e => {
101
+ e.stopPropagation();
100
102
  const keys = Object.keys(expanded);
101
103
  // @ts-ignore
102
104
  const tmp = {
103
105
  ...expanded
104
106
  };
107
+
108
+ // collapse
105
109
  if (keys.includes(cell.row.id)) {
106
110
  delete tmp[cell.row.id];
107
111
  setExpanded(tmp);
108
112
  } else {
113
+ // collapse
109
114
  setExpanded(old => ({
110
115
  ...old,
111
116
  [cell.row.id]: true
112
117
  }));
118
+ const expandedKeys = {
119
+ ...tmp,
120
+ [cell.row.id]: true
121
+ };
122
+ onExpandClick?.({
123
+ expandedKeys: Object.keys(expandedKeys),
124
+ key: cell.row.id,
125
+ rowData: cell.row.original
126
+ });
113
127
  }
114
128
  },
115
129
  style: {
@@ -161,7 +175,8 @@ const TableBodyCell = props => {
161
175
  isSelectionChange,
162
176
  selectionSettings,
163
177
  wrapSettings,
164
- pagination
178
+ pagination,
179
+ onExpandClick
165
180
  // dataSource
166
181
  } = React.useContext(TableContext);
167
182
  const expandIconColumnIndex = expandable?.expandIconColumnIndex ?? 0;
@@ -226,20 +241,33 @@ const TableBodyCell = props => {
226
241
  }
227
242
  }, /*#__PURE__*/React.createElement("div", null, cell.row.getCanExpand() ? /*#__PURE__*/React.createElement("button", {
228
243
  // onClick: row.getToggleExpandedHandler(),
229
- onClick: () => {
244
+ onClick: e => {
245
+ e.stopPropagation();
230
246
  const keys = Object.keys(expanded);
231
247
  // @ts-ignore
232
248
  const tmp = {
233
249
  ...expanded
234
250
  };
251
+
252
+ // collapse
235
253
  if (keys.includes(cell.row.id)) {
236
254
  delete tmp[cell.row.id];
237
255
  setExpanded(tmp);
238
256
  } else {
257
+ // expand
239
258
  setExpanded(old => ({
240
259
  ...old,
241
260
  [cell.row.id]: true
242
261
  }));
262
+ const expandedKeys = {
263
+ ...tmp,
264
+ [cell.row.id]: true
265
+ };
266
+ onExpandClick?.({
267
+ expandedKeys: Object.keys(expandedKeys),
268
+ key: cell.row.id,
269
+ rowData: record
270
+ });
243
271
  }
244
272
  },
245
273
  style: {
@@ -311,7 +339,8 @@ const TableBodyCell = props => {
311
339
  isDataTree,
312
340
  setExpanded,
313
341
  expandIconColumnIndex,
314
- isSelectionChange
342
+ isSelectionChange,
343
+ onExpandClick
315
344
  })));
316
345
  }
317
346
  return /*#__PURE__*/React.createElement("div", {
@@ -396,41 +425,8 @@ const TableBodyCell = props => {
396
425
  selectionSettings
397
426
  });
398
427
  cell.row.getToggleSelectedHandler()(e);
399
-
400
- // if (cell.row.getIsSelected()) { // nếu đã chọn
401
-
402
- // const aaa = isSelectionChange?.rowsData.filter((it) => it.id !== cell.row.id)
403
-
404
- // setIsSelectionChange({
405
- // isChange: true,
406
- // type: 'rowSelected',
407
- // rowData: cell.row.original,
408
- // rowsData: aaa ?? []
409
- // })
410
-
411
- // } else {
412
-
413
- // const { rowsData } = isSelectionChange ?? {}
414
-
415
- // const abc = rowsData && rowsData.length > 0 ? [...rowsData] : []
416
-
417
- // abc.push(cell.row)
418
-
419
- // setIsSelectionChange({
420
- // isChange: true,
421
- // type: 'rowSelected',
422
- // rowData: cell.row.original,
423
- // rowsData: abc
424
- // })
425
- // }
426
428
  }
427
- }
428
-
429
- // onKeyUp={() => {
430
-
431
- // }}
432
- ,
433
-
429
+ },
434
430
  onClick: e => {
435
431
  const selection = window.getSelection();
436
432
  const text = selection ? selection.toString() : "";
@@ -459,20 +455,33 @@ const TableBodyCell = props => {
459
455
  }
460
456
  }, /*#__PURE__*/React.createElement("div", null, cell.row.getCanExpand() ? /*#__PURE__*/React.createElement("button", {
461
457
  // onClick: row.getToggleExpandedHandler(),
462
- onClick: () => {
458
+ onClick: e => {
459
+ e.stopPropagation();
463
460
  const keys = Object.keys(expanded);
464
461
  // @ts-ignore
465
462
  const tmp = {
466
463
  ...expanded
467
464
  };
465
+
466
+ // collapse
468
467
  if (keys.includes(cell.row.id)) {
469
468
  delete tmp[cell.row.id];
470
469
  setExpanded(tmp);
471
470
  } else {
471
+ // expand
472
472
  setExpanded(old => ({
473
473
  ...old,
474
474
  [cell.row.id]: true
475
475
  }));
476
+ const expandedKeys = {
477
+ ...tmp,
478
+ [cell.row.id]: true
479
+ };
480
+ onExpandClick?.({
481
+ expandedKeys: Object.keys(expandedKeys),
482
+ key: cell.row.id,
483
+ rowData: record
484
+ });
476
485
  }
477
486
  },
478
487
  style: {
@@ -51,7 +51,8 @@ const TableBodyRow = ({
51
51
  "data-row-key": row.id,
52
52
  className: classNames(`${prefix}-grid-row ${rowClass ?? ''}`, {
53
53
  [`${prefix}-grid-row-selected`]: row.getIsSelected(),
54
- [`${prefix}-grid-row-focus`]: row.id === focusedCell?.rowId && !editAble
54
+ [`${prefix}-grid-row-focus`]: row.id === focusedCell?.rowId && !editAble,
55
+ [`${prefix}-grid-row-parent`]: row.subRows && row.subRows.length > 0 || Array.isArray(row.originalSubRows)
55
56
  }),
56
57
  style: {
57
58
  // display: 'flex',
@@ -63,6 +64,8 @@ const TableBodyRow = ({
63
64
  gridTemplateColumns: `${templateColumns.map(n => `${n}fr`).join(" ")}`,
64
65
  height: isEditing ? virtualRow.size : undefined,
65
66
  minHeight: isEditing ? undefined : virtualRow.size,
67
+ // backgroundColor: Array.isArray(row.originalSubRows) ? '#f5f5f5' : undefined,
68
+ // fontWeight: Array.isArray(row.originalSubRows) ? '500' : undefined,
66
69
  ...rowStyles
67
70
  },
68
71
  onDoubleClick: e => {
@@ -138,6 +138,7 @@ export declare const convertToObjTrue: (arr: any) => {
138
138
  export declare const getDiffent2Array: (a: any[], b: any[]) => any[];
139
139
  export declare function findFirst(items: Column<any>[]): Column<any, unknown>;
140
140
  export declare function isTreeArray(arr: any[]): boolean;
141
+ export declare function isTreeArray2(arr: any[]): boolean;
141
142
  export declare function updateColumnWidthsRecursive(columns: any[], sizing: Record<string, number>): any[];
142
143
  export declare function updateWidthsByOther(source: any[], target: any[]): any[];
143
144
  export declare function findAllChildrenKeys2<RecordType>(data: readonly RecordType[], rowKey: any, childrenColumnName: string): Key[];
@@ -1967,24 +1967,32 @@ export const convertToObj = arr => {
1967
1967
  return Object.fromEntries(arr.map(key => [key, false]));
1968
1968
  };
1969
1969
  export const convertToObjTrue = arr => {
1970
- // const result = Object.keys(obj).reduce((acc: any, key) => {
1971
- // acc[key] = false;
1972
- // return acc;
1973
- // }, {});
1974
-
1975
- // return result
1976
-
1977
1970
  return Object.fromEntries(arr.map(key => [key, true]));
1978
1971
  };
1979
1972
  export const getDiffent2Array = (a, b) => {
1980
1973
  return [...a.filter(x => !b.includes(x)), ...b.filter(x => !a.includes(x))];
1981
1974
  };
1982
1975
  export function findFirst(items) {
1976
+ // const leftItem = items.find(item => item.getIsPinned() === 'left')
1983
1977
  const leftItem = items.find(item => item.getIsPinned() === 'left');
1984
1978
  if (leftItem) return leftItem;
1985
1979
  return null;
1986
1980
  }
1987
1981
  export function isTreeArray(arr) {
1982
+ if (!Array.isArray(arr) || arr.length === 0) {
1983
+ return false;
1984
+ }
1985
+ for (const item of arr) {
1986
+ if (!item) {
1987
+ return false;
1988
+ }
1989
+ if (item.children) {
1990
+ return true;
1991
+ }
1992
+ }
1993
+ return false;
1994
+ }
1995
+ export function isTreeArray2(arr) {
1988
1996
  if (!Array.isArray(arr) || arr.length === 0) {
1989
1997
  return false;
1990
1998
  }
@@ -45,4 +45,4 @@ const colorDark = "#e6e4f3e6 ";
45
45
  export const GridStyle = styled.div.withConfig({
46
46
  displayName: "GridStyle",
47
47
  componentId: "es-grid-template__sc-hdqm5k-0"
48
- })(["&.", "-grid{color:", ";font-size:13px;background-color:", ";table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";border-right:0;&::after{position:absolute;top:0px;right:0;z-index:1;height:100%;border-right:1px solid ", ";content:\"\";pointer-events:none;}.", "-grid-tbody{.", "-grid-row{}}}&.", "-grid-light{.", "-grid-container{.", "-grid-thead{background-color:", ";font-weight:500;.", "-grid-cell{font-weight:inherit;color:", ";background-color:inherit;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-ellipsis{.ui-rc-table-column-title,.", "-grid-cell-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}&.ui-rc-grid-cell-wrap{.ui-rc-table-column-title,.", "-grid-cell-text-wrap{white-space:normal;word-break:break-word;overflow:hidden;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "-grid-filter-column{display:flex;justify-content:space-between;width:100%;align-items:center;position:relative;z-index:3;}.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;z-index:3;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";}}.", "-grid-tfoot{.", "-grid-footer-row{border-bottom-width:1px;border-bottom-color:", ";border-bottom-style:solid;border-top-width:1px;border-top-color:", ";border-top-style:solid;background-color:#fafafa;}.", "-grid-cell{background-color:inherit;border-inline-end:1px solid ", ";}}}}&.", "-grid-dark{background-color:", ";color:", ";.", "-grid-container{border-color:", ";&::after{border-right-color:", ";}}}}"], props => props.$prefix, color, BgColor, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => props.$prefix, props => `${props.$theme.color ? props.$theme.color : color}`, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, tableBorderColor, props => props.$prefix, BgColorDark, colorDark, props => props.$prefix, tableBorderColorDark, tableBorderColorDark);
48
+ })(["&.", "-grid{color:", ";font-size:13px;background-color:", ";table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";border-right:0;&::after{position:absolute;top:0px;right:0;z-index:1;height:100%;border-right:1px solid ", ";content:\"\";pointer-events:none;}.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";&.", "-grid-row-parent{background-color:#f5f5f5;font-weight:500;}}}}&.", "-grid-light{.", "-grid-container{.", "-grid-thead{background-color:", ";font-weight:500;.", "-grid-cell{font-weight:inherit;color:", ";background-color:inherit;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-ellipsis{.ui-rc-table-column-title,.", "-grid-cell-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}&.ui-rc-grid-cell-wrap{.ui-rc-table-column-title,.", "-grid-cell-text-wrap{white-space:normal;word-break:break-word;overflow:hidden;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "-grid-filter-column{display:flex;justify-content:space-between;width:100%;align-items:center;position:relative;z-index:3;}.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;z-index:3;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{}}.", "-grid-tfoot{.", "-grid-footer-row{border-bottom-width:1px;border-bottom-color:", ";border-bottom-style:solid;border-top-width:1px;border-top-color:", ";border-top-style:solid;background-color:#fafafa;}.", "-grid-cell{background-color:inherit;border-inline-end:1px solid ", ";}}}}&.", "-grid-dark{background-color:", ";color:", ";.", "-grid-container{border-color:", ";&::after{border-right-color:", ";}}}}"], props => props.$prefix, color, BgColor, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => props.$prefix, props => `${props.$theme.color ? props.$theme.color : color}`, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, tableBorderColor, props => props.$prefix, BgColorDark, colorDark, props => props.$prefix, tableBorderColorDark, tableBorderColorDark);