@ackplus/react-tanstack-data-table 1.0.35 → 1.1.3

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 (272) hide show
  1. package/LICENSE +21 -0
  2. package/{src → dist}/index.d.ts +21 -4
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +63 -0
  5. package/{src → dist}/lib/components/droupdown/menu-dropdown.d.ts +2 -1
  6. package/dist/lib/components/droupdown/menu-dropdown.d.ts.map +1 -0
  7. package/{src → dist}/lib/components/droupdown/menu-dropdown.js +38 -7
  8. package/{src → dist}/lib/components/filters/filter-value-input.d.ts +3 -1
  9. package/dist/lib/components/filters/filter-value-input.d.ts.map +1 -0
  10. package/dist/lib/components/filters/filter-value-input.js +83 -0
  11. package/{src → dist}/lib/components/filters/index.d.ts +1 -0
  12. package/dist/lib/components/filters/index.d.ts.map +1 -0
  13. package/dist/lib/components/filters/index.js +142 -0
  14. package/{src → dist}/lib/components/headers/draggable-header.d.ts +2 -2
  15. package/dist/lib/components/headers/draggable-header.d.ts.map +1 -0
  16. package/{src → dist}/lib/components/headers/draggable-header.js +81 -17
  17. package/dist/lib/components/headers/index.d.ts +6 -0
  18. package/dist/lib/components/headers/index.d.ts.map +1 -0
  19. package/dist/lib/components/headers/index.js +21 -0
  20. package/{src → dist}/lib/components/headers/table-header.d.ts +15 -1
  21. package/dist/lib/components/headers/table-header.d.ts.map +1 -0
  22. package/{src → dist}/lib/components/headers/table-header.js +50 -17
  23. package/{src → dist}/lib/components/index.d.ts +6 -1
  24. package/dist/lib/components/index.d.ts.map +1 -0
  25. package/dist/lib/components/index.js +32 -0
  26. package/{src → dist}/lib/components/pagination/data-table-pagination.d.ts +2 -1
  27. package/dist/lib/components/pagination/data-table-pagination.d.ts.map +1 -0
  28. package/{src → dist}/lib/components/pagination/data-table-pagination.js +20 -6
  29. package/dist/lib/components/pagination/index.d.ts +5 -0
  30. package/dist/lib/components/pagination/index.d.ts.map +1 -0
  31. package/dist/lib/components/pagination/index.js +20 -0
  32. package/{src → dist}/lib/components/rows/data-table-row.d.ts +15 -2
  33. package/dist/lib/components/rows/data-table-row.d.ts.map +1 -0
  34. package/{src → dist}/lib/components/rows/data-table-row.js +58 -25
  35. package/{src → dist}/lib/components/rows/empty-data-row.d.ts +3 -3
  36. package/dist/lib/components/rows/empty-data-row.d.ts.map +1 -0
  37. package/{src → dist}/lib/components/rows/empty-data-row.js +12 -4
  38. package/dist/lib/components/rows/index.d.ts +7 -0
  39. package/dist/lib/components/rows/index.d.ts.map +1 -0
  40. package/dist/lib/components/rows/index.js +22 -0
  41. package/{src → dist}/lib/components/rows/loading-rows.d.ts +3 -1
  42. package/dist/lib/components/rows/loading-rows.d.ts.map +1 -0
  43. package/{src → dist}/lib/components/rows/loading-rows.js +27 -19
  44. package/{src → dist}/lib/components/toolbar/bulk-actions-toolbar.d.ts +4 -3
  45. package/dist/lib/components/toolbar/bulk-actions-toolbar.d.ts.map +1 -0
  46. package/dist/lib/components/toolbar/bulk-actions-toolbar.js +49 -0
  47. package/{src → dist}/lib/components/toolbar/column-filter-control.d.ts +3 -1
  48. package/dist/lib/components/toolbar/column-filter-control.d.ts.map +1 -0
  49. package/{src → dist}/lib/components/toolbar/column-filter-control.js +73 -4
  50. package/{src → dist}/lib/components/toolbar/column-pinning-control.d.ts +2 -1
  51. package/dist/lib/components/toolbar/column-pinning-control.d.ts.map +1 -0
  52. package/{src → dist}/lib/components/toolbar/column-pinning-control.js +70 -6
  53. package/{src → dist}/lib/components/toolbar/column-reset-control.d.ts +3 -1
  54. package/dist/lib/components/toolbar/column-reset-control.d.ts.map +1 -0
  55. package/{src → dist}/lib/components/toolbar/column-reset-control.js +9 -2
  56. package/{src → dist}/lib/components/toolbar/column-visibility-control.d.ts +2 -1
  57. package/dist/lib/components/toolbar/column-visibility-control.d.ts.map +1 -0
  58. package/dist/lib/components/toolbar/column-visibility-control.js +77 -0
  59. package/{src → dist}/lib/components/toolbar/data-table-toolbar.d.ts +3 -2
  60. package/dist/lib/components/toolbar/data-table-toolbar.d.ts.map +1 -0
  61. package/{src → dist}/lib/components/toolbar/data-table-toolbar.js +17 -4
  62. package/{src → dist}/lib/components/toolbar/index.d.ts +4 -0
  63. package/dist/lib/components/toolbar/index.d.ts.map +1 -0
  64. package/{src → dist}/lib/components/toolbar/index.js +6 -0
  65. package/dist/lib/components/toolbar/table-export-control.d.ts +12 -0
  66. package/dist/lib/components/toolbar/table-export-control.d.ts.map +1 -0
  67. package/dist/lib/components/toolbar/table-export-control.js +67 -0
  68. package/{src → dist}/lib/components/toolbar/table-search-control.d.ts +3 -1
  69. package/dist/lib/components/toolbar/table-search-control.d.ts.map +1 -0
  70. package/{src → dist}/lib/components/toolbar/table-search-control.js +45 -2
  71. package/{src → dist}/lib/components/toolbar/table-size-control.d.ts +3 -1
  72. package/dist/lib/components/toolbar/table-size-control.d.ts.map +1 -0
  73. package/{src → dist}/lib/components/toolbar/table-size-control.js +20 -8
  74. package/{src → dist}/lib/contexts/data-table-context.d.ts +6 -2
  75. package/dist/lib/contexts/data-table-context.d.ts.map +1 -0
  76. package/{src → dist}/lib/contexts/data-table-context.js +34 -1
  77. package/dist/lib/data-table.d.ts +5 -0
  78. package/dist/lib/data-table.d.ts.map +1 -0
  79. package/{src/lib/components/table → dist/lib}/data-table.js +427 -143
  80. package/dist/lib/features/column-filter.feature.d.ts +55 -0
  81. package/dist/lib/features/column-filter.feature.d.ts.map +1 -0
  82. package/{src → dist}/lib/features/column-filter.feature.js +116 -18
  83. package/dist/lib/features/index.d.ts +9 -0
  84. package/dist/lib/features/index.d.ts.map +1 -0
  85. package/{src → dist}/lib/features/index.js +7 -0
  86. package/{src → dist}/lib/features/selection.feature.d.ts +8 -1
  87. package/dist/lib/features/selection.feature.d.ts.map +1 -0
  88. package/{src → dist}/lib/features/selection.feature.js +76 -15
  89. package/dist/lib/icons/add-icon.d.ts +4 -0
  90. package/dist/lib/icons/add-icon.d.ts.map +1 -0
  91. package/dist/lib/icons/add-icon.js +12 -0
  92. package/dist/lib/icons/csv-icon.d.ts +4 -0
  93. package/dist/lib/icons/csv-icon.d.ts.map +1 -0
  94. package/dist/lib/icons/csv-icon.js +12 -0
  95. package/dist/lib/icons/delete-icon.d.ts +4 -0
  96. package/dist/lib/icons/delete-icon.d.ts.map +1 -0
  97. package/dist/lib/icons/delete-icon.js +12 -0
  98. package/dist/lib/icons/excel-icon.d.ts +4 -0
  99. package/dist/lib/icons/excel-icon.d.ts.map +1 -0
  100. package/dist/lib/icons/excel-icon.js +12 -0
  101. package/dist/lib/icons/index.d.ts +8 -0
  102. package/dist/lib/icons/index.d.ts.map +1 -0
  103. package/dist/lib/icons/unpin-icon.d.ts +4 -0
  104. package/dist/lib/icons/unpin-icon.d.ts.map +1 -0
  105. package/dist/lib/icons/unpin-icon.js +12 -0
  106. package/{src → dist}/lib/icons/view-comfortable-icon.d.ts +3 -1
  107. package/dist/lib/icons/view-comfortable-icon.d.ts.map +1 -0
  108. package/dist/lib/icons/view-comfortable-icon.js +12 -0
  109. package/dist/lib/icons/view-compact-icon.d.ts +4 -0
  110. package/dist/lib/icons/view-compact-icon.d.ts.map +1 -0
  111. package/dist/lib/icons/view-compact-icon.js +12 -0
  112. package/{src → dist}/lib/types/column.types.d.ts +10 -1
  113. package/dist/lib/types/column.types.d.ts.map +1 -0
  114. package/{src → dist}/lib/types/data-table-api.d.ts +2 -1
  115. package/dist/lib/types/data-table-api.d.ts.map +1 -0
  116. package/{src/lib/components/table → dist/lib/types}/data-table.types.d.ts +10 -11
  117. package/dist/lib/types/data-table.types.d.ts.map +1 -0
  118. package/{src → dist}/lib/types/export.types.d.ts +38 -0
  119. package/dist/lib/types/export.types.d.ts.map +1 -0
  120. package/dist/lib/types/export.types.js +6 -0
  121. package/{src → dist}/lib/types/index.d.ts +6 -0
  122. package/dist/lib/types/index.d.ts.map +1 -0
  123. package/dist/lib/types/index.js +32 -0
  124. package/{src → dist}/lib/types/slots.types.d.ts +50 -3
  125. package/dist/lib/types/slots.types.d.ts.map +1 -0
  126. package/{src → dist}/lib/types/table.types.d.ts +14 -0
  127. package/dist/lib/types/table.types.d.ts.map +1 -0
  128. package/{src → dist}/lib/utils/column-helpers.d.ts +10 -0
  129. package/dist/lib/utils/column-helpers.d.ts.map +1 -0
  130. package/{src → dist}/lib/utils/column-helpers.js +20 -4
  131. package/{src → dist}/lib/utils/debounced-fetch.utils.d.ts +3 -5
  132. package/dist/lib/utils/debounced-fetch.utils.d.ts.map +1 -0
  133. package/{src → dist}/lib/utils/debounced-fetch.utils.js +12 -6
  134. package/{src → dist}/lib/utils/export-utils.d.ts +13 -0
  135. package/dist/lib/utils/export-utils.d.ts.map +1 -0
  136. package/dist/lib/utils/export-utils.js +252 -0
  137. package/{src → dist}/lib/utils/index.d.ts +4 -0
  138. package/dist/lib/utils/index.d.ts.map +1 -0
  139. package/dist/lib/utils/index.js +35 -0
  140. package/{src → dist}/lib/utils/logger.d.ts +43 -0
  141. package/dist/lib/utils/logger.d.ts.map +1 -0
  142. package/{src → dist}/lib/utils/logger.js +22 -2
  143. package/{src → dist}/lib/utils/slot-helpers.d.ts +39 -1
  144. package/dist/lib/utils/slot-helpers.d.ts.map +1 -0
  145. package/{src → dist}/lib/utils/slot-helpers.js +55 -6
  146. package/{src → dist}/lib/utils/special-columns.utils.d.ts +10 -0
  147. package/dist/lib/utils/special-columns.utils.d.ts.map +1 -0
  148. package/{src → dist}/lib/utils/special-columns.utils.js +41 -5
  149. package/{src → dist}/lib/utils/styling-helpers.d.ts +20 -0
  150. package/dist/lib/utils/styling-helpers.d.ts.map +1 -0
  151. package/dist/lib/utils/styling-helpers.js +108 -0
  152. package/{src → dist}/lib/utils/table-helpers.d.ts +25 -0
  153. package/dist/lib/utils/table-helpers.d.ts.map +1 -0
  154. package/{src → dist}/lib/utils/table-helpers.js +24 -0
  155. package/package.json +36 -11
  156. package/src/index.ts +71 -0
  157. package/src/lib/components/droupdown/menu-dropdown.tsx +97 -0
  158. package/src/lib/components/filters/filter-value-input.tsx +225 -0
  159. package/src/lib/components/filters/{index.js → index.ts} +3 -6
  160. package/src/lib/components/headers/draggable-header.tsx +326 -0
  161. package/src/lib/components/headers/{index.d.ts → index.ts} +4 -0
  162. package/src/lib/components/headers/table-header.tsx +173 -0
  163. package/src/lib/components/index.ts +21 -0
  164. package/src/lib/components/pagination/data-table-pagination.tsx +99 -0
  165. package/src/lib/components/pagination/index.ts +5 -0
  166. package/src/lib/components/rows/data-table-row.tsx +208 -0
  167. package/src/lib/components/rows/empty-data-row.tsx +69 -0
  168. package/src/lib/components/rows/{index.d.ts → index.ts} +4 -0
  169. package/src/lib/components/rows/loading-rows.tsx +160 -0
  170. package/src/lib/components/toolbar/bulk-actions-toolbar.tsx +125 -0
  171. package/src/lib/components/toolbar/column-filter-control.tsx +374 -0
  172. package/src/lib/components/toolbar/column-pinning-control.tsx +275 -0
  173. package/src/lib/components/toolbar/column-reset-control.tsx +74 -0
  174. package/src/lib/components/toolbar/column-visibility-control.tsx +105 -0
  175. package/src/lib/components/toolbar/data-table-toolbar.tsx +229 -0
  176. package/src/lib/components/toolbar/index.ts +17 -0
  177. package/src/lib/components/toolbar/table-export-control.tsx +179 -0
  178. package/src/lib/components/toolbar/table-search-control.tsx +155 -0
  179. package/src/lib/components/toolbar/table-size-control.tsx +102 -0
  180. package/src/lib/contexts/data-table-context.tsx +112 -0
  181. package/src/lib/data-table.tsx +1911 -0
  182. package/src/lib/features/README.md +161 -0
  183. package/src/lib/features/column-filter.feature.ts +456 -0
  184. package/src/lib/features/index.ts +23 -0
  185. package/src/lib/features/selection.feature.ts +318 -0
  186. package/src/lib/icons/add-icon.tsx +23 -0
  187. package/src/lib/icons/csv-icon.tsx +15 -0
  188. package/src/lib/icons/delete-icon.tsx +30 -0
  189. package/src/lib/icons/excel-icon.tsx +15 -0
  190. package/src/lib/icons/unpin-icon.tsx +18 -0
  191. package/src/lib/icons/view-comfortable-icon.tsx +45 -0
  192. package/src/lib/icons/view-compact-icon.tsx +55 -0
  193. package/src/lib/types/column.types.ts +44 -0
  194. package/src/lib/types/data-table-api.ts +169 -0
  195. package/src/lib/types/data-table.types.ts +136 -0
  196. package/src/lib/types/export.types.ts +154 -0
  197. package/src/lib/types/index.ts +24 -0
  198. package/src/lib/types/slots.types.ts +332 -0
  199. package/src/lib/types/table.types.ts +90 -0
  200. package/src/lib/utils/column-helpers.ts +72 -0
  201. package/src/lib/utils/debounced-fetch.utils.ts +54 -0
  202. package/src/lib/utils/export-utils.ts +285 -0
  203. package/src/lib/utils/index.ts +27 -0
  204. package/src/lib/utils/logger.ts +203 -0
  205. package/src/lib/utils/slot-helpers.tsx +194 -0
  206. package/src/lib/utils/special-columns.utils.ts +94 -0
  207. package/src/lib/utils/styling-helpers.ts +126 -0
  208. package/src/lib/utils/table-helpers.ts +106 -0
  209. package/src/index.js +0 -27
  210. package/src/lib/components/filters/filter-value-input.js +0 -41
  211. package/src/lib/components/headers/index.js +0 -5
  212. package/src/lib/components/index.js +0 -10
  213. package/src/lib/components/pagination/index.d.ts +0 -1
  214. package/src/lib/components/pagination/index.js +0 -4
  215. package/src/lib/components/rows/index.js +0 -6
  216. package/src/lib/components/table/data-table.d.ts +0 -4
  217. package/src/lib/components/table/index.d.ts +0 -2
  218. package/src/lib/components/table/index.js +0 -5
  219. package/src/lib/components/toolbar/bulk-actions-toolbar.js +0 -30
  220. package/src/lib/components/toolbar/column-visibility-control.js +0 -31
  221. package/src/lib/components/toolbar/table-export-control.d.ts +0 -31
  222. package/src/lib/components/toolbar/table-export-control.js +0 -56
  223. package/src/lib/examples/advanced-features-example.d.ts +0 -1
  224. package/src/lib/examples/advanced-features-example.js +0 -269
  225. package/src/lib/examples/bulk-actions-test.d.ts +0 -1
  226. package/src/lib/examples/bulk-actions-test.js +0 -44
  227. package/src/lib/examples/custom-column-filter-example.d.ts +0 -1
  228. package/src/lib/examples/custom-column-filter-example.js +0 -60
  229. package/src/lib/examples/index.d.ts +0 -8
  230. package/src/lib/examples/index.js +0 -19
  231. package/src/lib/examples/selection-test-example.d.ts +0 -1
  232. package/src/lib/examples/selection-test-example.js +0 -101
  233. package/src/lib/examples/server-side-fetching-example.d.ts +0 -1
  234. package/src/lib/examples/server-side-fetching-example.js +0 -245
  235. package/src/lib/examples/server-side-test.d.ts +0 -1
  236. package/src/lib/examples/server-side-test.js +0 -9
  237. package/src/lib/examples/simple-local-example.d.ts +0 -1
  238. package/src/lib/examples/simple-local-example.js +0 -95
  239. package/src/lib/examples/simple-slots-example.d.ts +0 -1
  240. package/src/lib/examples/simple-slots-example.js +0 -115
  241. package/src/lib/features/column-filter.feature.d.ts +0 -45
  242. package/src/lib/features/index.d.ts +0 -2
  243. package/src/lib/hooks/index.d.ts +0 -1
  244. package/src/lib/hooks/index.js +0 -4
  245. package/src/lib/hooks/use-data-table-api.d.ts +0 -46
  246. package/src/lib/hooks/use-data-table-api.js +0 -690
  247. package/src/lib/icons/add-icon.d.ts +0 -2
  248. package/src/lib/icons/add-icon.js +0 -8
  249. package/src/lib/icons/csv-icon.d.ts +0 -2
  250. package/src/lib/icons/csv-icon.js +0 -8
  251. package/src/lib/icons/delete-icon.d.ts +0 -2
  252. package/src/lib/icons/delete-icon.js +0 -8
  253. package/src/lib/icons/excel-icon.d.ts +0 -2
  254. package/src/lib/icons/excel-icon.js +0 -8
  255. package/src/lib/icons/unpin-icon.d.ts +0 -2
  256. package/src/lib/icons/unpin-icon.js +0 -8
  257. package/src/lib/icons/view-comfortable-icon.js +0 -8
  258. package/src/lib/icons/view-compact-icon.d.ts +0 -2
  259. package/src/lib/icons/view-compact-icon.js +0 -8
  260. package/src/lib/types/export.types.js +0 -2
  261. package/src/lib/types/index.js +0 -8
  262. package/src/lib/utils/export-utils.js +0 -175
  263. package/src/lib/utils/index.js +0 -11
  264. package/src/lib/utils/styling-helpers.js +0 -70
  265. package/tsconfig.tsbuildinfo +0 -1
  266. /package/{src → dist}/lib/icons/index.js +0 -0
  267. /package/{src → dist}/lib/types/column.types.js +0 -0
  268. /package/{src → dist}/lib/types/data-table-api.js +0 -0
  269. /package/{src/lib/components/table → dist/lib/types}/data-table.types.js +0 -0
  270. /package/{src → dist}/lib/types/slots.types.js +0 -0
  271. /package/{src → dist}/lib/types/table.types.js +0 -0
  272. /package/src/lib/icons/{index.d.ts → index.ts} +0 -0
@@ -1,2 +0,0 @@
1
- import { SvgIconProps } from '@mui/material';
2
- export declare function AddIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddIcon = AddIcon;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- function AddIcon(props) {
7
- return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, Object.assign({}, props, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" }), (0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "9", fill: "none", stroke: "currentColor", strokeWidth: "0.5", opacity: "0.3" })] })));
8
- }
@@ -1,2 +0,0 @@
1
- import { SvgIconProps } from '@mui/material';
2
- export declare function CsvIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CsvIcon = CsvIcon;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- function CsvIcon(props) {
7
- return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, Object.assign({}, props, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("path", { d: "M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M7,12.5A0.5,0.5 0 0,1 7.5,12H8.5A0.5,0.5 0 0,1 9,12.5V13.5A0.5,0.5 0 0,1 8.5,14H7.5A0.5,0.5 0 0,1 7,13.5M10.5,12.5A0.5,0.5 0 0,1 11,12H12A0.5,0.5 0 0,1 12.5,12.5V13.5A0.5,0.5 0 0,1 12,14H11A0.5,0.5 0 0,1 10.5,13.5M14,12.5A0.5,0.5 0 0,1 14.5,12H15.5A0.5,0.5 0 0,1 16,12.5V13.5A0.5,0.5 0 0,1 15.5,14H14.5A0.5,0.5 0 0,1 14,13.5" })] })));
8
- }
@@ -1,2 +0,0 @@
1
- import { SvgIconProps } from '@mui/material';
2
- export declare function DeleteIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeleteIcon = DeleteIcon;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- function DeleteIcon(props) {
7
- return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, Object.assign({}, props, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" }), (0, jsx_runtime_1.jsx)("rect", { x: "9", y: "8", width: "2", height: "9", fill: "currentColor", opacity: "0.6" }), (0, jsx_runtime_1.jsx)("rect", { x: "13", y: "8", width: "2", height: "9", fill: "currentColor", opacity: "0.6" })] })));
8
- }
@@ -1,2 +0,0 @@
1
- import { SvgIconProps } from '@mui/material';
2
- export declare function ExcelIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExcelIcon = ExcelIcon;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- function ExcelIcon(props) {
7
- return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, Object.assign({}, props, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("path", { d: "M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" }), (0, jsx_runtime_1.jsx)("path", { d: "M11.5,15L9.75,12.5L11.5,10H10L8.75,11.5L7.5,10H6L7.75,12.5L6,15H7.5L8.75,13.5L10,15H11.5M15,10V12H17V10H15M15,14V16H17V14H15Z" })] })));
8
- }
@@ -1,2 +0,0 @@
1
- import { SvgIconProps } from '@mui/material';
2
- export declare function UnpinIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnpinIcon = UnpinIcon;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- function UnpinIcon(props) {
7
- return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, Object.assign({}, props, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("path", { d: "M2 5.27L3.28 4 20 20.72 18.73 22l-3.41-3.41V22h-1.6v-6H8v-2l2-2V9.27L2 5.27zM16 12V4h1V2H7v2h1v3.73l8 8z", opacity: "0.7" }), (0, jsx_runtime_1.jsx)("path", { d: "M14.73 12L16 10.73V4h1V2H7v2h1v3.73l2.27 2.27z" })] })));
8
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ViewComfortableIcon = ViewComfortableIcon;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- function ViewComfortableIcon(props) {
7
- return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, Object.assign({}, props, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("rect", { x: "3", y: "3", width: "18", height: "3", fill: "currentColor", rx: "1" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "8", width: "18", height: "3", fill: "currentColor", rx: "1" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "13", width: "18", height: "3", fill: "currentColor", rx: "1" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "18", width: "18", height: "3", fill: "currentColor", rx: "1" })] })));
8
- }
@@ -1,2 +0,0 @@
1
- import { SvgIconProps } from '@mui/material';
2
- export declare function ViewCompactIcon(props: SvgIconProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ViewCompactIcon = ViewCompactIcon;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- function ViewCompactIcon(props) {
7
- return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, Object.assign({}, props, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("rect", { x: "3", y: "4", width: "18", height: "2", fill: "currentColor" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "7", width: "18", height: "2", fill: "currentColor" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "10", width: "18", height: "2", fill: "currentColor" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "13", width: "18", height: "2", fill: "currentColor" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "16", width: "18", height: "2", fill: "currentColor" }), (0, jsx_runtime_1.jsx)("rect", { x: "3", y: "19", width: "18", height: "2", fill: "currentColor" })] })));
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./column.types"), exports);
5
- tslib_1.__exportStar(require("./table.types"), exports);
6
- tslib_1.__exportStar(require("./export.types"), exports);
7
- tslib_1.__exportStar(require("./data-table-api"), exports);
8
- tslib_1.__exportStar(require("./slots.types"), exports);
@@ -1,175 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exportClientData = exportClientData;
4
- exports.exportServerData = exportServerData;
5
- const tslib_1 = require("tslib");
6
- const XLSX = tslib_1.__importStar(require("xlsx"));
7
- function exportClientData(table, options) {
8
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
- const { format, filename, onProgress, onComplete, onError } = options;
10
- try {
11
- const selectedRows = table.getSelectedRows ? table.getSelectedRows() : [];
12
- const hasSelectedRows = selectedRows.length > 0;
13
- const rowsToExport = hasSelectedRows ? selectedRows : table.getFilteredRowModel().rows;
14
- const exportData = rowsToExport.map((row, index) => {
15
- onProgress === null || onProgress === void 0 ? void 0 : onProgress({
16
- processedRows: index + 1,
17
- totalRows: rowsToExport.length,
18
- percentage: Math.round(((index + 1) / rowsToExport.length) * 100),
19
- });
20
- const rowData = {};
21
- row.getVisibleCells().forEach(cell => {
22
- const columnDef = cell.column.columnDef;
23
- if (columnDef.hideInExport === true) {
24
- return;
25
- }
26
- const header = typeof columnDef.header === 'string' ? columnDef.header : cell.column.id;
27
- rowData[header] = cell.getValue() || '';
28
- });
29
- return rowData;
30
- });
31
- yield exportToFile(exportData, format, filename);
32
- onComplete === null || onComplete === void 0 ? void 0 : onComplete({
33
- success: true,
34
- filename: `${filename}.${format === 'excel' ? 'xlsx' : 'csv'}`,
35
- totalRows: exportData.length,
36
- });
37
- }
38
- catch (error) {
39
- console.error('Client export failed:', error);
40
- onError === null || onError === void 0 ? void 0 : onError({
41
- message: error instanceof Error ? error.message : 'Export failed',
42
- code: 'CLIENT_EXPORT_ERROR',
43
- });
44
- }
45
- });
46
- }
47
- function exportServerData(table, options) {
48
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
49
- const { format, filename, fetchData, currentFilters, selection, onProgress, onComplete, onError } = options;
50
- try {
51
- onProgress === null || onProgress === void 0 ? void 0 : onProgress({});
52
- const initialResponse = yield fetchData(Object.assign(Object.assign({}, currentFilters), { pagination: { pageIndex: 0, pageSize: 1 } }), selection);
53
- if (!initialResponse || !initialResponse.data || !Array.isArray(initialResponse.data)) {
54
- throw new Error('Invalid data received from server');
55
- }
56
- const totalRows = initialResponse.total || initialResponse.data.length;
57
- const CHUNK_SIZE = 1000;
58
- const needsChunking = totalRows > CHUNK_SIZE;
59
- let allData = [];
60
- if (needsChunking) {
61
- const totalPages = Math.ceil(totalRows / CHUNK_SIZE);
62
- for (let page = 1; page <= totalPages; page++) {
63
- const chunkFilters = Object.assign(Object.assign({}, currentFilters), { pagination: {
64
- pageIndex: page - 1,
65
- pageSize: CHUNK_SIZE,
66
- } });
67
- const chunkResponse = yield fetchData(chunkFilters, selection);
68
- if (!chunkResponse || !chunkResponse.data || !Array.isArray(chunkResponse.data)) {
69
- throw new Error(`Failed to fetch chunk ${page}`);
70
- }
71
- allData = [...allData, ...chunkResponse.data];
72
- if (page < totalPages) {
73
- yield new Promise(resolve => setTimeout(resolve, 100));
74
- }
75
- }
76
- }
77
- else {
78
- allData = initialResponse.data;
79
- }
80
- const visibleColumns = table.getVisibleLeafColumns().filter(col => {
81
- const columnDef = col.columnDef;
82
- return col.getIsVisible() && columnDef.hideInExport !== true;
83
- });
84
- const exportData = [];
85
- for (let index = 0; index < allData.length; index++) {
86
- const rowData = allData[index];
87
- const exportRow = {};
88
- visibleColumns.forEach(column => {
89
- var _a;
90
- const columnId = column.id;
91
- const columnDef = column.columnDef;
92
- const header = typeof columnDef.header === 'string'
93
- ? columnDef.header
94
- : columnId;
95
- let value = rowData[columnId];
96
- if (column.accessorFn && typeof column.accessorFn === 'function') {
97
- value = ((_a = (column.accessorFn(rowData, index) || '')) === null || _a === void 0 ? void 0 : _a.toString()) || '';
98
- }
99
- if (value === null || value === undefined) {
100
- value = '';
101
- }
102
- else if (typeof value === 'object') {
103
- value = JSON.stringify(value);
104
- }
105
- else {
106
- value = String(value);
107
- }
108
- exportRow[header] = value;
109
- });
110
- exportData.push(exportRow);
111
- }
112
- yield exportToFile(exportData, format, filename);
113
- onComplete === null || onComplete === void 0 ? void 0 : onComplete({
114
- success: true,
115
- filename: `${filename}.${format === 'excel' ? 'xlsx' : 'csv'}`,
116
- totalRows: exportData.length,
117
- });
118
- }
119
- catch (error) {
120
- console.error('Server export failed:', error);
121
- onError === null || onError === void 0 ? void 0 : onError({
122
- message: error instanceof Error ? error.message : 'Export failed',
123
- code: 'SERVER_EXPORT_ERROR',
124
- });
125
- }
126
- });
127
- }
128
- function exportToFile(data, format, filename) {
129
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
130
- if (data.length === 0) {
131
- throw new Error('No data to export');
132
- }
133
- if (format === 'csv') {
134
- const csv = convertToCSV(data);
135
- downloadFile(csv, `${filename}.csv`, 'text/csv');
136
- }
137
- else {
138
- const workbook = XLSX.utils.book_new();
139
- const worksheet = XLSX.utils.json_to_sheet(data);
140
- XLSX.utils.book_append_sheet(workbook, worksheet, 'Data');
141
- const excelBuffer = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
142
- const blob = new Blob([excelBuffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
143
- downloadFile(blob, `${filename}.xlsx`, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
144
- }
145
- });
146
- }
147
- function convertToCSV(data) {
148
- if (data.length === 0)
149
- return '';
150
- const headers = Object.keys(data[0]);
151
- const csvRows = [headers.join(',')];
152
- for (const row of data) {
153
- const values = headers.map(header => {
154
- const value = row[header] || '';
155
- if (typeof value === 'string' && (value.includes(',') || value.includes('"') || value.includes('\n'))) {
156
- return `"${value.replace(/"/g, '""')}"`;
157
- }
158
- return value;
159
- });
160
- csvRows.push(values.join(','));
161
- }
162
- return csvRows.join('\n');
163
- }
164
- function downloadFile(content, filename, mimeType) {
165
- const blob = content instanceof Blob ? content : new Blob([content], { type: mimeType });
166
- const url = URL.createObjectURL(blob);
167
- const link = document.createElement('a');
168
- link.href = url;
169
- link.download = filename;
170
- link.style.display = 'none';
171
- document.body.appendChild(link);
172
- link.click();
173
- document.body.removeChild(link);
174
- URL.revokeObjectURL(url);
175
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./styling-helpers"), exports);
5
- tslib_1.__exportStar(require("./table-helpers"), exports);
6
- tslib_1.__exportStar(require("./column-helpers"), exports);
7
- tslib_1.__exportStar(require("./export-utils"), exports);
8
- tslib_1.__exportStar(require("./special-columns.utils"), exports);
9
- tslib_1.__exportStar(require("./debounced-fetch.utils"), exports);
10
- tslib_1.__exportStar(require("./slot-helpers"), exports);
11
- tslib_1.__exportStar(require("./logger"), exports);
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tableRowStyles = exports.tableCellStyles = void 0;
4
- exports.getPinnedColumnStyle = getPinnedColumnStyle;
5
- exports.getColumnAlignment = getColumnAlignment;
6
- function getPinnedColumnStyle(options) {
7
- const { width = 'auto', minWidth, maxWidth, isPinned, pinnedPosition, pinnedRightPosition, isLastLeftPinnedColumn, isFirstRightPinnedColumn, zIndex = 1, disableStickyHeader = false, wrapText = false, } = options;
8
- const needsPinnedPositioning = isPinned;
9
- const shouldBeSticky = isPinned;
10
- let positionStyle = {};
11
- if (shouldBeSticky) {
12
- positionStyle = { position: 'sticky' };
13
- }
14
- else if (!disableStickyHeader) {
15
- positionStyle = { position: 'relative' };
16
- }
17
- const textWrappingStyles = wrapText
18
- ? {
19
- whiteSpace: 'normal',
20
- wordBreak: 'break-word',
21
- overflow: 'visible',
22
- }
23
- : {
24
- overflow: 'hidden',
25
- whiteSpace: 'nowrap',
26
- textOverflow: 'ellipsis',
27
- };
28
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ width }, (minWidth !== undefined && { minWidth })), (maxWidth !== undefined ? { maxWidth } : { maxWidth: width })), textWrappingStyles), positionStyle), (needsPinnedPositioning ? {
29
- left: isPinned === 'left' ? pinnedPosition : undefined,
30
- right: isPinned === 'right' ? pinnedRightPosition : undefined,
31
- zIndex,
32
- } : {})), { boxShadow: isPinned === 'left' && isLastLeftPinnedColumn
33
- ? 'inset -1px 0 0 var(--palette-TableCell-border), 2px 0 2px -4px rgba(0,0,0,.18)'
34
- : isPinned === 'right' && isFirstRightPinnedColumn
35
- ? 'inset 1px 0 0 var(--palette-TableCell-border), -1px 0 2px -4px rgba(0,0,0,.18)'
36
- : undefined }), (isPinned ? {
37
- backgroundColor: (theme) => theme.palette.background.paper,
38
- backgroundImage: (theme) => `linear-gradient(var(--row-bg, ${theme.palette.background.paper}), var(--row-bg, ${theme.palette.background.paper}))`,
39
- } : {
40
- backgroundColor: (theme) => `var(--row-bg, ${theme.palette.background.paper})`,
41
- }));
42
- }
43
- exports.tableCellStyles = {
44
- sticky: {
45
- position: 'sticky',
46
- zIndex: 10,
47
- backgroundColor: 'background.paper',
48
- },
49
- pinned: {
50
- borderRight: '1px solid',
51
- borderColor: 'divider',
52
- },
53
- };
54
- exports.tableRowStyles = {
55
- hover: {
56
- '&:hover': {
57
- backgroundColor: 'action.hover',
58
- },
59
- },
60
- striped: {
61
- '&:nth-of-type(odd)': {
62
- backgroundColor: 'action.selected',
63
- },
64
- },
65
- };
66
- function getColumnAlignment(column) {
67
- if (!column)
68
- return 'left';
69
- return column.align || 'left';
70
- }
@@ -1 +0,0 @@
1
- {"version":"5.8.3"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes