@ackplus/react-tanstack-data-table 1.0.19-beta-0.6 → 1.0.19-beta-0.7

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 (154) hide show
  1. package/package.json +3 -11
  2. package/LICENSE +0 -21
  3. package/README.md +0 -599
  4. package/index.d.ts.map +0 -1
  5. package/index.js +0 -42
  6. package/lib/components/droupdown/menu-dropdown.d.ts.map +0 -1
  7. package/lib/components/droupdown/menu-dropdown.js +0 -47
  8. package/lib/components/export-progress-dialog.d.ts.map +0 -1
  9. package/lib/components/export-progress-dialog.js +0 -30
  10. package/lib/components/filters/filter-value-input.d.ts.map +0 -1
  11. package/lib/components/filters/filter-value-input.js +0 -64
  12. package/lib/components/filters/index.d.ts.map +0 -1
  13. package/lib/components/filters/index.js +0 -125
  14. package/lib/components/headers/draggable-header.d.ts.map +0 -1
  15. package/lib/components/headers/draggable-header.js +0 -226
  16. package/lib/components/headers/index.d.ts.map +0 -1
  17. package/lib/components/headers/index.js +0 -5
  18. package/lib/components/headers/table-header.d.ts.map +0 -1
  19. package/lib/components/headers/table-header.js +0 -59
  20. package/lib/components/index.d.ts.map +0 -1
  21. package/lib/components/index.js +0 -18
  22. package/lib/components/pagination/data-table-pagination.d.ts.map +0 -1
  23. package/lib/components/pagination/data-table-pagination.js +0 -24
  24. package/lib/components/pagination/index.d.ts.map +0 -1
  25. package/lib/components/pagination/index.js +0 -4
  26. package/lib/components/rows/data-table-row.d.ts.map +0 -1
  27. package/lib/components/rows/data-table-row.js +0 -42
  28. package/lib/components/rows/empty-data-row.d.ts.map +0 -1
  29. package/lib/components/rows/empty-data-row.js +0 -8
  30. package/lib/components/rows/index.d.ts.map +0 -1
  31. package/lib/components/rows/index.js +0 -6
  32. package/lib/components/rows/loading-rows.d.ts.map +0 -1
  33. package/lib/components/rows/loading-rows.js +0 -46
  34. package/lib/components/table/data-table.d.ts.map +0 -1
  35. package/lib/components/table/data-table.js +0 -663
  36. package/lib/components/table/data-table.types.d.ts.map +0 -1
  37. package/lib/components/table/data-table.types.js +0 -6
  38. package/lib/components/table/index.d.ts.map +0 -1
  39. package/lib/components/table/index.js +0 -5
  40. package/lib/components/toolbar/bulk-actions-toolbar.d.ts.map +0 -1
  41. package/lib/components/toolbar/bulk-actions-toolbar.js +0 -31
  42. package/lib/components/toolbar/column-custom-filter-control.d.ts.map +0 -1
  43. package/lib/components/toolbar/column-custom-filter-control.js +0 -149
  44. package/lib/components/toolbar/column-custum-filter-control.d.ts.map +0 -1
  45. package/lib/components/toolbar/column-custum-filter-control.js +0 -150
  46. package/lib/components/toolbar/column-pinning-control.d.ts.map +0 -1
  47. package/lib/components/toolbar/column-pinning-control.js +0 -103
  48. package/lib/components/toolbar/column-reset-control.d.ts.map +0 -1
  49. package/lib/components/toolbar/column-reset-control.js +0 -13
  50. package/lib/components/toolbar/column-visibility-control.d.ts.map +0 -1
  51. package/lib/components/toolbar/column-visibility-control.js +0 -27
  52. package/lib/components/toolbar/data-table-toolbar.d.ts.map +0 -1
  53. package/lib/components/toolbar/data-table-toolbar.js +0 -23
  54. package/lib/components/toolbar/index.d.ts.map +0 -1
  55. package/lib/components/toolbar/index.js +0 -13
  56. package/lib/components/toolbar/table-export-control.d.ts.map +0 -1
  57. package/lib/components/toolbar/table-export-control.js +0 -94
  58. package/lib/components/toolbar/table-search-control.d.ts.map +0 -1
  59. package/lib/components/toolbar/table-search-control.js +0 -61
  60. package/lib/components/toolbar/table-size-control.d.ts.map +0 -1
  61. package/lib/components/toolbar/table-size-control.js +0 -33
  62. package/lib/contexts/data-table-context.d.ts.map +0 -1
  63. package/lib/contexts/data-table-context.js +0 -50
  64. package/lib/examples/advanced-features-example.d.ts.map +0 -1
  65. package/lib/examples/advanced-features-example.js +0 -282
  66. package/lib/examples/basic-example.d.ts.map +0 -1
  67. package/lib/examples/basic-example.js +0 -323
  68. package/lib/examples/bulk-actions-test.d.ts.map +0 -1
  69. package/lib/examples/bulk-actions-test.js +0 -47
  70. package/lib/examples/crud-api-example.d.ts.map +0 -1
  71. package/lib/examples/crud-api-example.js +0 -321
  72. package/lib/examples/custom-column-filter-example.d.ts.map +0 -1
  73. package/lib/examples/custom-column-filter-example.js +0 -60
  74. package/lib/examples/custom-selection-example.d.ts.map +0 -1
  75. package/lib/examples/custom-selection-example.js +0 -184
  76. package/lib/examples/export-callbacks-example.d.ts.map +0 -1
  77. package/lib/examples/export-callbacks-example.js +0 -155
  78. package/lib/examples/improved-export-example.d.ts.map +0 -1
  79. package/lib/examples/improved-export-example.js +0 -153
  80. package/lib/examples/improved-server-selection-example.d.ts.map +0 -1
  81. package/lib/examples/improved-server-selection-example.js +0 -118
  82. package/lib/examples/index.d.ts.map +0 -1
  83. package/lib/examples/index.js +0 -5
  84. package/lib/examples/selection-test-example.d.ts.map +0 -1
  85. package/lib/examples/selection-test-example.js +0 -111
  86. package/lib/examples/simple-local-example.d.ts.map +0 -1
  87. package/lib/examples/simple-local-example.js +0 -101
  88. package/lib/examples/simple-server-selection-example.d.ts.map +0 -1
  89. package/lib/examples/simple-server-selection-example.js +0 -178
  90. package/lib/examples/virtualized-example.d.ts.map +0 -1
  91. package/lib/examples/virtualized-example.js +0 -119
  92. package/lib/features/custom-column-filter.feature.d.ts.map +0 -1
  93. package/lib/features/custom-column-filter.feature.js +0 -306
  94. package/lib/features/custom-selection.feature.d.ts.map +0 -1
  95. package/lib/features/custom-selection.feature.js +0 -224
  96. package/lib/features/index.d.ts.map +0 -1
  97. package/lib/features/index.js +0 -9
  98. package/lib/hooks/index.d.ts.map +0 -1
  99. package/lib/hooks/index.js +0 -6
  100. package/lib/hooks/use-data-table-api.d.ts.map +0 -1
  101. package/lib/hooks/use-data-table-api.js +0 -673
  102. package/lib/hooks/use-table-state.d.ts.map +0 -1
  103. package/lib/hooks/use-table-state.js +0 -74
  104. package/lib/icons/add-icon.d.ts.map +0 -1
  105. package/lib/icons/add-icon.js +0 -5
  106. package/lib/icons/csv-icon.d.ts.map +0 -1
  107. package/lib/icons/csv-icon.js +0 -5
  108. package/lib/icons/delete-icon.d.ts.map +0 -1
  109. package/lib/icons/delete-icon.js +0 -5
  110. package/lib/icons/excel-icon.d.ts.map +0 -1
  111. package/lib/icons/excel-icon.js +0 -5
  112. package/lib/icons/index.d.ts.map +0 -1
  113. package/lib/icons/index.js +0 -7
  114. package/lib/icons/unpin-icon.d.ts.map +0 -1
  115. package/lib/icons/unpin-icon.js +0 -5
  116. package/lib/icons/view-comfortable-icon.d.ts.map +0 -1
  117. package/lib/icons/view-comfortable-icon.js +0 -5
  118. package/lib/icons/view-compact-icon.d.ts.map +0 -1
  119. package/lib/icons/view-compact-icon.js +0 -5
  120. package/lib/types/column.types.d.ts.map +0 -1
  121. package/lib/types/column.types.js +0 -2
  122. package/lib/types/data-table-api.d.ts.map +0 -1
  123. package/lib/types/data-table-api.js +0 -1
  124. package/lib/types/export.types.d.ts.map +0 -1
  125. package/lib/types/export.types.js +0 -5
  126. package/lib/types/hooks.types.d.ts.map +0 -1
  127. package/lib/types/hooks.types.js +0 -1
  128. package/lib/types/index.d.ts.map +0 -1
  129. package/lib/types/index.js +0 -14
  130. package/lib/types/slots.types.d.ts.map +0 -1
  131. package/lib/types/slots.types.js +0 -1
  132. package/lib/types/table.types.d.ts.map +0 -1
  133. package/lib/types/table.types.js +0 -1
  134. package/lib/utils/column-helpers.d.ts.map +0 -1
  135. package/lib/utils/column-helpers.js +0 -46
  136. package/lib/utils/debounced-fetch.utils.d.ts.map +0 -1
  137. package/lib/utils/debounced-fetch.utils.js +0 -51
  138. package/lib/utils/export-utils.d.ts.map +0 -1
  139. package/lib/utils/export-utils.js +0 -181
  140. package/lib/utils/index.d.ts.map +0 -1
  141. package/lib/utils/index.js +0 -17
  142. package/lib/utils/selection-helpers.d.ts.map +0 -1
  143. package/lib/utils/selection-helpers.js +0 -162
  144. package/lib/utils/slot-helpers.d.ts.map +0 -1
  145. package/lib/utils/slot-helpers.js +0 -27
  146. package/lib/utils/special-columns.utils.d.ts.map +0 -1
  147. package/lib/utils/special-columns.utils.js +0 -77
  148. package/lib/utils/styling-helpers.d.ts.map +0 -1
  149. package/lib/utils/styling-helpers.js +0 -97
  150. package/lib/utils/table-helpers.d.ts.map +0 -1
  151. package/lib/utils/table-helpers.js +0 -72
  152. package/lib/utils/value-helpers.d.ts.map +0 -1
  153. package/lib/utils/value-helpers.js +0 -48
  154. package/tsconfig.lib.tsbuildinfo +0 -1
@@ -1,42 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
3
- * DataTableRow Component
4
- *
5
- * Renders individual table rows with support for:
6
- * - Column pinning
7
- * - Row expansion
8
- * - Hover effects
9
- * - Striped styling
10
- */
11
- import { TableRow, TableCell, Collapse } from '@mui/material';
12
- import { flexRender } from '@tanstack/react-table';
13
- import { getPinnedColumnStyle, getColumnAlignment } from '../../utils';
14
- import { getSlotComponent } from '../../utils/slot-helpers';
15
- /**
16
- * Individual table row component with cell rendering and expansion support
17
- */
18
- export function DataTableRow({ row, enableHover = true, enableStripes = false, isOdd = false, renderSubComponent, disableStickyHeader = false, slots, slotProps, }) {
19
- const CellSlot = getSlotComponent(slots, 'cell', TableCell);
20
- const ExpandedRowSlot = getSlotComponent(slots, 'expandedRow', TableRow);
21
- const TableRowSlot = getSlotComponent(slots, 'row', TableRow);
22
- return (_jsxs(_Fragment, { children: [_jsx(TableRowSlot, { hover: enableHover, sx: {
23
- backgroundColor: enableStripes && isOdd ? 'action.hover' : 'transparent',
24
- }, children: row.getVisibleCells().map(cell => {
25
- const isPinned = cell.column.getIsPinned();
26
- const pinnedPosition = isPinned ? cell.column.getStart('left') : undefined;
27
- const pinnedRightPosition = isPinned === 'right' ? cell.column.getAfter('right') : undefined;
28
- const alignment = getColumnAlignment(cell.column.columnDef);
29
- return (_jsx(CellSlot, { align: alignment, sx: {
30
- ...getPinnedColumnStyle({
31
- width: cell.column.getSize() || 'auto',
32
- isPinned,
33
- pinnedPosition,
34
- pinnedRightPosition,
35
- zIndex: isPinned ? 9 : 1,
36
- disableStickyHeader,
37
- isLastLeftPinnedColumn: isPinned === 'left' && cell.column.getIsLastColumn('left'),
38
- isFirstRightPinnedColumn: isPinned === 'right' && cell.column.getIsFirstColumn('right'),
39
- }),
40
- }, ...slotProps?.cell, children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id));
41
- }) }), row.getIsExpanded() && renderSubComponent ? (_jsx(ExpandedRowSlot, { children: _jsx(CellSlot, { colSpan: row.getVisibleCells().length + 1, sx: { py: 0 }, children: _jsx(Collapse, { in: row.getIsExpanded(), timeout: "auto", unmountOnExit: true, children: renderSubComponent(row) }) }) })) : null] }));
42
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"empty-data-row.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/rows/empty-data-row.tsx"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,2CAgBpK"}
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TableCell, TableRow } from '@mui/material';
3
- import { getSlotComponent } from '../../utils/slot-helpers';
4
- export function EmptyDataRow({ colSpan, message, slots, slotProps }) {
5
- const EmptyRowSlot = getSlotComponent(slots, 'emptyRow', TableRow);
6
- const EmptyCellSlot = getSlotComponent(slots, 'cell', TableCell);
7
- return (_jsx(EmptyRowSlot, { children: _jsx(EmptyCellSlot, { colSpan: colSpan, align: "center", sx: { py: 4 }, ...slotProps?.emptyCell, children: message }) }));
8
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/rows/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Row components for DataTable
3
- */
4
- export * from './data-table-row';
5
- export * from './empty-data-row';
6
- export * from './loading-rows';
@@ -1 +0,0 @@
1
- {"version":3,"file":"loading-rows.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/rows/loading-rows.tsx"],"names":[],"mappings":"AAQA,wBAAgB,WAAW,CAAC,EACxB,QAAY,EACZ,KAAK,EACL,SAAS,GACZ,EAAE;IACC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACnC,2CA+FA"}
@@ -1,46 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { TableCell, TableRow } from '@mui/material';
3
- import { Skeleton } from '@mui/material';
4
- import { useDataTableContext } from '../../contexts/data-table-context';
5
- import { getPinnedColumnStyle } from '../../utils';
6
- import { getSlotComponent } from '../../utils/slot-helpers';
7
- export function LoadingRows({ rowCount = 5, slots, slotProps, }) {
8
- const { table } = useDataTableContext();
9
- const visibleColumns = table.getVisibleLeafColumns();
10
- const CellSlot = getSlotComponent(slots, 'cell', TableCell);
11
- const TableRowSlot = getSlotComponent(slots, 'row', TableRow);
12
- return (_jsx(_Fragment, { children: Array.from({ length: rowCount }, (_, rowIndex) => (_jsx(TableRowSlot, { ...slotProps?.row, children: visibleColumns.map((column, colIndex) => {
13
- const isPinned = column.getIsPinned();
14
- const pinnedPosition = isPinned ? column.getStart('left') : undefined;
15
- const pinnedRightPosition = isPinned === 'right' ? column.getAfter('right') : undefined;
16
- // Determine skeleton type based on column meta or content
17
- const columnMeta = column.columnDef?.meta;
18
- const isDateColumn = columnMeta?.type === 'date';
19
- const isBooleanColumn = columnMeta?.type === 'boolean';
20
- const isNumberColumn = columnMeta?.type === 'number';
21
- const isSelectionColumn = column.id === 'select';
22
- return (_jsx(CellSlot, { sx: getPinnedColumnStyle({
23
- width: column.getSize() || 'auto',
24
- isPinned,
25
- pinnedPosition,
26
- pinnedRightPosition,
27
- zIndex: isPinned ? 9 : 1,
28
- isLastLeftPinnedColumn: isPinned === 'left' && column.getIsLastColumn('left'),
29
- isFirstRightPinnedColumn: isPinned === 'right' && column.getIsFirstColumn('right'),
30
- }), ...slotProps?.cell, children: (() => {
31
- if (isSelectionColumn) {
32
- return (_jsx(Skeleton, { variant: "rectangular", width: 20, height: 20 }));
33
- }
34
- if (isBooleanColumn) {
35
- return (_jsx(Skeleton, { variant: "circular", width: 20, height: 20 }));
36
- }
37
- if (isDateColumn) {
38
- return (_jsx(Skeleton, { variant: "text", width: "80%", height: 20, animation: "wave" }));
39
- }
40
- if (isNumberColumn) {
41
- return (_jsx(Skeleton, { variant: "text", width: "60%", height: 20, animation: "wave" }));
42
- }
43
- return (_jsx(Skeleton, { variant: "text", width: `${Math.random() * 40 + 60}%`, height: 20, animation: "wave" }));
44
- })() }, `skeleton-${column.id || colIndex}-${rowIndex}`));
45
- }) }, `skeleton-row-${rowIndex}`))) }));
46
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/table/data-table.tsx"],"names":[],"mappings":"AA2CA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AA+B1D;;GAEG;AACH,eAAO,MAAM,SAAS,mHAw5BpB,CAAC"}