@pagamio/frontend-commons-lib 0.8.212 → 0.8.214

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 (105) hide show
  1. package/lib/api/TanstackQueryProvider.d.ts +146 -0
  2. package/lib/api/TanstackQueryProvider.js +140 -0
  3. package/lib/api/index.d.ts +2 -0
  4. package/lib/api/index.js +2 -0
  5. package/lib/api/tanstackQuery.d.ts +249 -0
  6. package/lib/api/tanstackQuery.js +299 -0
  7. package/lib/components/layout/Sidebar.js +50 -16
  8. package/lib/components/ui/Sheet.d.ts +1 -1
  9. package/lib/context/SidebarContext.d.ts +20 -0
  10. package/lib/dashboard-visuals-v2/DashboardWrapperV2.d.ts +81 -0
  11. package/lib/dashboard-visuals-v2/DashboardWrapperV2.js +217 -0
  12. package/lib/dashboard-visuals-v2/cards/CardGrid.d.ts +22 -0
  13. package/lib/dashboard-visuals-v2/cards/CardGrid.js +27 -0
  14. package/lib/dashboard-visuals-v2/cards/InfoCard.d.ts +7 -0
  15. package/lib/dashboard-visuals-v2/cards/InfoCard.js +26 -0
  16. package/lib/dashboard-visuals-v2/cards/MetricCard.d.ts +7 -0
  17. package/lib/dashboard-visuals-v2/cards/MetricCard.js +37 -0
  18. package/lib/dashboard-visuals-v2/cards/StatCard.d.ts +7 -0
  19. package/lib/dashboard-visuals-v2/cards/StatCard.js +92 -0
  20. package/lib/dashboard-visuals-v2/cards/TopItemsCard.d.ts +7 -0
  21. package/lib/dashboard-visuals-v2/cards/TopItemsCard.js +34 -0
  22. package/lib/dashboard-visuals-v2/cards/TransactionListCard.d.ts +7 -0
  23. package/lib/dashboard-visuals-v2/cards/TransactionListCard.js +24 -0
  24. package/lib/dashboard-visuals-v2/cards/index.d.ts +9 -0
  25. package/lib/dashboard-visuals-v2/cards/index.js +9 -0
  26. package/lib/dashboard-visuals-v2/charts/AreaChart.d.ts +7 -0
  27. package/lib/dashboard-visuals-v2/charts/AreaChart.js +124 -0
  28. package/lib/dashboard-visuals-v2/charts/BarChart.d.ts +7 -0
  29. package/lib/dashboard-visuals-v2/charts/BarChart.js +106 -0
  30. package/lib/dashboard-visuals-v2/charts/BaseChart.d.ts +61 -0
  31. package/lib/dashboard-visuals-v2/charts/BaseChart.js +173 -0
  32. package/lib/dashboard-visuals-v2/charts/DonutChart.d.ts +7 -0
  33. package/lib/dashboard-visuals-v2/charts/DonutChart.js +108 -0
  34. package/lib/dashboard-visuals-v2/charts/HeatmapChart.d.ts +7 -0
  35. package/lib/dashboard-visuals-v2/charts/HeatmapChart.js +101 -0
  36. package/lib/dashboard-visuals-v2/charts/LineChart.d.ts +7 -0
  37. package/lib/dashboard-visuals-v2/charts/LineChart.js +109 -0
  38. package/lib/dashboard-visuals-v2/charts/MixedChart.d.ts +7 -0
  39. package/lib/dashboard-visuals-v2/charts/MixedChart.js +106 -0
  40. package/lib/dashboard-visuals-v2/charts/PieChart.d.ts +7 -0
  41. package/lib/dashboard-visuals-v2/charts/PieChart.js +10 -0
  42. package/lib/dashboard-visuals-v2/charts/RadialChart.d.ts +7 -0
  43. package/lib/dashboard-visuals-v2/charts/RadialChart.js +72 -0
  44. package/lib/dashboard-visuals-v2/charts/index.d.ts +12 -0
  45. package/lib/dashboard-visuals-v2/charts/index.js +12 -0
  46. package/lib/dashboard-visuals-v2/components/DataFetchingVisual.d.ts +0 -0
  47. package/lib/dashboard-visuals-v2/components/DataFetchingVisual.js +1 -0
  48. package/lib/dashboard-visuals-v2/components/index.d.ts +0 -0
  49. package/lib/dashboard-visuals-v2/components/index.js +1 -0
  50. package/lib/dashboard-visuals-v2/hooks/index.d.ts +4 -0
  51. package/lib/dashboard-visuals-v2/hooks/index.js +4 -0
  52. package/lib/dashboard-visuals-v2/hooks/useChartData.d.ts +72 -0
  53. package/lib/dashboard-visuals-v2/hooks/useChartData.js +122 -0
  54. package/lib/dashboard-visuals-v2/index.d.ts +10 -0
  55. package/lib/dashboard-visuals-v2/index.js +16 -0
  56. package/lib/dashboard-visuals-v2/types/card.types.d.ts +237 -0
  57. package/lib/dashboard-visuals-v2/types/card.types.js +30 -0
  58. package/lib/dashboard-visuals-v2/types/chart.types.d.ts +308 -0
  59. package/lib/dashboard-visuals-v2/types/chart.types.js +25 -0
  60. package/lib/dashboard-visuals-v2/types/index.d.ts +6 -0
  61. package/lib/dashboard-visuals-v2/types/index.js +6 -0
  62. package/lib/dashboard-visuals-v2/utils/index.d.ts +0 -0
  63. package/lib/dashboard-visuals-v2/utils/index.js +1 -0
  64. package/lib/dashboard-visuals-v2/utils/propsTransformer.d.ts +0 -0
  65. package/lib/dashboard-visuals-v2/utils/propsTransformer.js +1 -0
  66. package/lib/dashboard-visuals-v2/visualRegistry.d.ts +59 -0
  67. package/lib/dashboard-visuals-v2/visualRegistry.js +110 -0
  68. package/lib/data-table-v2/DataTable.d.ts +7 -0
  69. package/lib/data-table-v2/DataTable.js +206 -0
  70. package/lib/data-table-v2/components/DataTableBody.d.ts +19 -0
  71. package/lib/data-table-v2/components/DataTableBody.js +20 -0
  72. package/lib/data-table-v2/components/DataTableEmpty.d.ts +17 -0
  73. package/lib/data-table-v2/components/DataTableEmpty.js +13 -0
  74. package/lib/data-table-v2/components/DataTableError.d.ts +16 -0
  75. package/lib/data-table-v2/components/DataTableError.js +14 -0
  76. package/lib/data-table-v2/components/DataTableHeader.d.ts +15 -0
  77. package/lib/data-table-v2/components/DataTableHeader.js +31 -0
  78. package/lib/data-table-v2/components/DataTableLoading.d.ts +14 -0
  79. package/lib/data-table-v2/components/DataTableLoading.js +19 -0
  80. package/lib/data-table-v2/components/DataTablePagination.d.ts +36 -0
  81. package/lib/data-table-v2/components/DataTablePagination.js +20 -0
  82. package/lib/data-table-v2/components/DataTableRowActions.d.ts +13 -0
  83. package/lib/data-table-v2/components/DataTableRowActions.js +57 -0
  84. package/lib/data-table-v2/components/DataTableSearch.d.ts +19 -0
  85. package/lib/data-table-v2/components/DataTableSearch.js +33 -0
  86. package/lib/data-table-v2/components/DataTableToolbar.d.ts +54 -0
  87. package/lib/data-table-v2/components/DataTableToolbar.js +28 -0
  88. package/lib/data-table-v2/components/index.d.ts +12 -0
  89. package/lib/data-table-v2/components/index.js +12 -0
  90. package/lib/data-table-v2/hooks/index.d.ts +4 -0
  91. package/lib/data-table-v2/hooks/index.js +4 -0
  92. package/lib/data-table-v2/hooks/useTableData.d.ts +118 -0
  93. package/lib/data-table-v2/hooks/useTableData.js +210 -0
  94. package/lib/data-table-v2/index.d.ts +9 -0
  95. package/lib/data-table-v2/index.js +12 -0
  96. package/lib/data-table-v2/types/index.d.ts +296 -0
  97. package/lib/data-table-v2/types/index.js +1 -0
  98. package/lib/data-table-v2/utils/export.d.ts +26 -0
  99. package/lib/data-table-v2/utils/export.js +92 -0
  100. package/lib/data-table-v2/utils/index.d.ts +4 -0
  101. package/lib/data-table-v2/utils/index.js +4 -0
  102. package/lib/index.d.ts +4 -0
  103. package/lib/index.js +23 -0
  104. package/lib/styles.css +219 -0
  105. package/package.json +7 -1
@@ -0,0 +1,296 @@
1
+ /**
2
+ * @fileoverview DataTable V2 Types - TanStack Table based
3
+ */
4
+ import type { ColumnFiltersState, PaginationState, Row, SortingState, VisibilityState } from '@tanstack/react-table';
5
+ import type { ReactNode } from 'react';
6
+ /**
7
+ * Base column definition extending TanStack's ColumnDef
8
+ */
9
+ export interface DataTableColumn<TData> {
10
+ /** Unique column identifier */
11
+ id: string;
12
+ /** Column header text or component */
13
+ header?: string | ReactNode | ((props: {
14
+ column: unknown;
15
+ }) => ReactNode);
16
+ /** Data accessor key */
17
+ accessorKey?: keyof TData;
18
+ /** Custom accessor function */
19
+ accessorFn?: (row: TData) => unknown;
20
+ /** Custom cell renderer */
21
+ cell?: (props: {
22
+ row: Row<TData>;
23
+ getValue: () => unknown;
24
+ }) => ReactNode;
25
+ /** Enable sorting for this column */
26
+ enableSorting?: boolean;
27
+ /** Enable filtering for this column */
28
+ enableFiltering?: boolean;
29
+ /** Enable column hiding */
30
+ enableHiding?: boolean;
31
+ /** Column width (CSS value) */
32
+ size?: number;
33
+ /** Minimum column width */
34
+ minSize?: number;
35
+ /** Maximum column width */
36
+ maxSize?: number;
37
+ /** Column alignment */
38
+ align?: 'left' | 'center' | 'right';
39
+ /** Whether column is pinned */
40
+ pinned?: 'left' | 'right' | false;
41
+ /** Custom filter function */
42
+ filterFn?: 'includesString' | 'equalsString' | 'arrIncludes' | 'arrIncludesAll' | 'arrIncludesSome' | 'equals' | 'weakEquals' | 'inNumberRange' | ((row: Row<TData>, columnId: string, filterValue: unknown) => boolean);
43
+ /** Aggregation function for grouped data */
44
+ aggregationFn?: 'sum' | 'min' | 'max' | 'extent' | 'mean' | 'median' | 'unique' | 'uniqueCount' | 'count';
45
+ /** Footer content */
46
+ footer?: string | ReactNode | ((props: {
47
+ column: unknown;
48
+ }) => ReactNode);
49
+ }
50
+ /**
51
+ * Row selection options
52
+ */
53
+ export interface RowSelectionOptions<TData> {
54
+ /** Enable row selection */
55
+ enabled?: boolean;
56
+ /** Selection mode */
57
+ mode?: 'single' | 'multiple';
58
+ /** Enable select all */
59
+ enableSelectAll?: boolean;
60
+ /** Callback when selection changes */
61
+ onSelectionChange?: (selectedRows: TData[]) => void;
62
+ /** Get row ID for selection tracking */
63
+ getRowId?: (row: TData, index: number) => string;
64
+ /** Pre-selected row IDs */
65
+ selectedRowIds?: Record<string, boolean>;
66
+ }
67
+ /**
68
+ * Pagination options
69
+ */
70
+ export interface PaginationOptions {
71
+ /** Enable pagination */
72
+ enabled?: boolean;
73
+ /** Items per page */
74
+ pageSize?: number;
75
+ /** Page size options */
76
+ pageSizeOptions?: number[];
77
+ /** Current page index (0-based) */
78
+ pageIndex?: number;
79
+ /** Total row count (for server-side pagination) */
80
+ totalRows?: number;
81
+ /** Show page size selector */
82
+ showPageSizeSelector?: boolean;
83
+ /** Show page info (e.g., "1-10 of 100") */
84
+ showPageInfo?: boolean;
85
+ /** Callback when pagination changes */
86
+ onPaginationChange?: (pagination: PaginationState) => void;
87
+ /** Server-side pagination */
88
+ serverSide?: boolean;
89
+ }
90
+ /**
91
+ * Sorting options
92
+ */
93
+ export interface SortingOptions {
94
+ /** Enable sorting */
95
+ enabled?: boolean;
96
+ /** Initial sorting state */
97
+ initialSorting?: SortingState;
98
+ /** Allow multi-column sorting */
99
+ enableMultiSort?: boolean;
100
+ /** Callback when sorting changes */
101
+ onSortingChange?: (sorting: SortingState) => void;
102
+ /** Server-side sorting */
103
+ serverSide?: boolean;
104
+ }
105
+ /**
106
+ * Filtering options
107
+ */
108
+ export interface FilteringOptions {
109
+ /** Enable filtering */
110
+ enabled?: boolean;
111
+ /** Enable global filter/search */
112
+ enableGlobalFilter?: boolean;
113
+ /** Enable column filters */
114
+ enableColumnFilters?: boolean;
115
+ /** Initial filter state */
116
+ initialFilters?: ColumnFiltersState;
117
+ /** Global filter placeholder */
118
+ globalFilterPlaceholder?: string;
119
+ /** Callback when filters change */
120
+ onFiltersChange?: (filters: ColumnFiltersState) => void;
121
+ /** Debounce time for filter input (ms) */
122
+ filterDebounceMs?: number;
123
+ /** Server-side filtering */
124
+ serverSide?: boolean;
125
+ }
126
+ /**
127
+ * Column visibility options
128
+ */
129
+ export interface ColumnVisibilityOptions {
130
+ /** Enable column visibility toggle */
131
+ enabled?: boolean;
132
+ /** Initial visibility state */
133
+ initialVisibility?: VisibilityState;
134
+ /** Columns that cannot be hidden */
135
+ alwaysVisible?: string[];
136
+ /** Callback when visibility changes */
137
+ onVisibilityChange?: (visibility: VisibilityState) => void;
138
+ }
139
+ /**
140
+ * Export options
141
+ */
142
+ export interface ExportOptions {
143
+ /** Enable export functionality */
144
+ enabled?: boolean;
145
+ /** Export formats to enable */
146
+ formats?: ('csv' | 'excel' | 'json' | 'pdf')[];
147
+ /** Export filename (without extension) */
148
+ filename?: string;
149
+ /** Columns to include in export (by ID) */
150
+ includeColumns?: string[];
151
+ /** Columns to exclude from export (by ID) */
152
+ excludeColumns?: string[];
153
+ /** Custom export handler */
154
+ onExport?: (format: string, data: unknown[]) => void;
155
+ }
156
+ /**
157
+ * Row actions configuration
158
+ */
159
+ export interface RowAction<TData> {
160
+ /** Action identifier */
161
+ id: string;
162
+ /** Action label */
163
+ label: string;
164
+ /** Action icon */
165
+ icon?: ReactNode;
166
+ /** Action handler */
167
+ onClick: (row: TData) => void;
168
+ /** Whether action is disabled */
169
+ disabled?: boolean | ((row: TData) => boolean);
170
+ /** Whether action is hidden */
171
+ hidden?: boolean | ((row: TData) => boolean);
172
+ /** Action variant for styling */
173
+ variant?: 'default' | 'primary' | 'danger';
174
+ }
175
+ /**
176
+ * Bulk actions configuration
177
+ */
178
+ export interface BulkAction<TData> {
179
+ /** Action identifier */
180
+ id: string;
181
+ /** Action label */
182
+ label: string;
183
+ /** Action icon */
184
+ icon?: ReactNode;
185
+ /** Action handler with selected rows */
186
+ onClick: (selectedRows: TData[]) => void;
187
+ /** Whether action is disabled */
188
+ disabled?: boolean;
189
+ /** Action variant */
190
+ variant?: 'default' | 'primary' | 'danger';
191
+ }
192
+ /**
193
+ * Main DataTable props
194
+ */
195
+ export interface DataTableProps<TData> {
196
+ /** Table data */
197
+ data: TData[];
198
+ /** Column definitions */
199
+ columns: DataTableColumn<TData>[];
200
+ /** Row selection options */
201
+ rowSelection?: RowSelectionOptions<TData>;
202
+ /** Pagination options */
203
+ pagination?: PaginationOptions;
204
+ /** Sorting options */
205
+ sorting?: SortingOptions;
206
+ /** Filtering options */
207
+ filtering?: FilteringOptions;
208
+ /** Column visibility options */
209
+ columnVisibility?: ColumnVisibilityOptions;
210
+ /** Export options */
211
+ export?: ExportOptions;
212
+ /** Row actions */
213
+ rowActions?: RowAction<TData>[];
214
+ /** Bulk actions */
215
+ bulkActions?: BulkAction<TData>[];
216
+ /** Loading state */
217
+ loading?: boolean;
218
+ /** Error state */
219
+ error?: Error | string | null;
220
+ /** Empty state message */
221
+ emptyMessage?: string | ReactNode;
222
+ /** Table title */
223
+ title?: string;
224
+ /** Table description */
225
+ description?: string;
226
+ /** Enable striped rows */
227
+ striped?: boolean;
228
+ /** Enable hover highlight */
229
+ hoverable?: boolean;
230
+ /** Enable bordered cells */
231
+ bordered?: boolean;
232
+ /** Compact mode (smaller padding) */
233
+ compact?: boolean;
234
+ /** Sticky header */
235
+ stickyHeader?: boolean;
236
+ /** Maximum height (enables vertical scroll) */
237
+ maxHeight?: string | number;
238
+ /** Row click handler */
239
+ onRowClick?: (row: TData) => void;
240
+ /** Row double-click handler */
241
+ onRowDoubleClick?: (row: TData) => void;
242
+ /** Get row ID */
243
+ getRowId?: (row: TData, index: number) => string;
244
+ /** Custom row className */
245
+ rowClassName?: string | ((row: TData, index: number) => string);
246
+ /** Wrapper className */
247
+ className?: string;
248
+ /** Sub-component classNames */
249
+ classNames?: DataTableClassNames;
250
+ /** Custom header content */
251
+ headerContent?: ReactNode;
252
+ /** Custom footer content */
253
+ footerContent?: ReactNode;
254
+ /** Data fetching/refresh handler */
255
+ onRefresh?: () => void;
256
+ }
257
+ /**
258
+ * Custom classNames for DataTable sub-components
259
+ */
260
+ export interface DataTableClassNames {
261
+ wrapper?: string;
262
+ header?: string;
263
+ toolbar?: string;
264
+ table?: string;
265
+ thead?: string;
266
+ tbody?: string;
267
+ tfoot?: string;
268
+ tr?: string;
269
+ th?: string;
270
+ td?: string;
271
+ pagination?: string;
272
+ search?: string;
273
+ filters?: string;
274
+ empty?: string;
275
+ loading?: string;
276
+ error?: string;
277
+ }
278
+ /**
279
+ * Server-side data response format
280
+ */
281
+ export interface DataTableServerResponse<TData> {
282
+ data: TData[];
283
+ total: number;
284
+ page?: number;
285
+ pageSize?: number;
286
+ }
287
+ /**
288
+ * Server-side request parameters
289
+ */
290
+ export interface DataTableServerRequest {
291
+ page: number;
292
+ pageSize: number;
293
+ sorting?: SortingState;
294
+ filters?: ColumnFiltersState;
295
+ globalFilter?: string;
296
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @fileoverview DataTable V2 Export Utilities
3
+ */
4
+ import type { Row } from '@tanstack/react-table';
5
+ export interface ExportConfig {
6
+ filename?: string;
7
+ includeColumns?: string[];
8
+ excludeColumns?: string[];
9
+ dateFormat?: string;
10
+ }
11
+ /**
12
+ * Export data to CSV format
13
+ */
14
+ export declare function exportToCSV<TData>(rows: Row<TData>[], columns: string[], config?: ExportConfig): string;
15
+ /**
16
+ * Export data to JSON format
17
+ */
18
+ export declare function exportToJSON<TData>(rows: Row<TData>[], columns: string[]): string;
19
+ /**
20
+ * Download file to user's device
21
+ */
22
+ export declare function downloadFile(content: string, filename: string, mimeType: string): void;
23
+ /**
24
+ * Export handler factory
25
+ */
26
+ export declare function createExportHandler<TData>(getRows: () => Row<TData>[], getColumns: () => string[], config?: ExportConfig): (format: "csv" | "json" | "excel" | "pdf") => void;
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Export data to CSV format
3
+ */
4
+ export function exportToCSV(rows, columns, config = {}) {
5
+ const { dateFormat = 'YYYY-MM-DD' } = config;
6
+ const headers = columns.join(',');
7
+ const csvRows = rows.map((row) => columns
8
+ .map((col) => {
9
+ const value = row.getValue(col);
10
+ return formatCSVValue(value, dateFormat);
11
+ })
12
+ .join(','));
13
+ return [headers, ...csvRows].join('\n');
14
+ }
15
+ /**
16
+ * Export data to JSON format
17
+ */
18
+ export function exportToJSON(rows, columns) {
19
+ const data = rows.map((row) => {
20
+ const rowData = {};
21
+ columns.forEach((col) => {
22
+ rowData[col] = row.getValue(col);
23
+ });
24
+ return rowData;
25
+ });
26
+ return JSON.stringify(data, null, 2);
27
+ }
28
+ /**
29
+ * Format value for CSV export
30
+ */
31
+ function formatCSVValue(value, dateFormat) {
32
+ void dateFormat;
33
+ if (value === null || value === undefined) {
34
+ return '';
35
+ }
36
+ if (value instanceof Date) {
37
+ return value.toISOString().split('T')[0];
38
+ }
39
+ if (typeof value === 'object') {
40
+ return JSON.stringify(value);
41
+ }
42
+ const stringValue = String(value);
43
+ // Escape quotes and wrap in quotes if contains special characters
44
+ if (stringValue.includes(',') || stringValue.includes('"') || stringValue.includes('\n')) {
45
+ return `"${stringValue.replace(/"/g, '""')}"`;
46
+ }
47
+ return stringValue;
48
+ }
49
+ /**
50
+ * Download file to user's device
51
+ */
52
+ export function downloadFile(content, filename, mimeType) {
53
+ const blob = new Blob([content], { type: mimeType });
54
+ const url = URL.createObjectURL(blob);
55
+ const link = document.createElement('a');
56
+ link.href = url;
57
+ link.download = filename;
58
+ document.body.appendChild(link);
59
+ link.click();
60
+ document.body.removeChild(link);
61
+ URL.revokeObjectURL(url);
62
+ }
63
+ /**
64
+ * Export handler factory
65
+ */
66
+ export function createExportHandler(getRows, getColumns, config = {}) {
67
+ return (format) => {
68
+ const rows = getRows();
69
+ const columns = getColumns();
70
+ const filename = config.filename ?? `export-${Date.now()}`;
71
+ switch (format) {
72
+ case 'csv': {
73
+ const csv = exportToCSV(rows, columns, config);
74
+ downloadFile(csv, `${filename}.csv`, 'text/csv;charset=utf-8;');
75
+ break;
76
+ }
77
+ case 'json': {
78
+ const json = exportToJSON(rows, columns);
79
+ downloadFile(json, `${filename}.json`, 'application/json');
80
+ break;
81
+ }
82
+ case 'excel':
83
+ console.warn('Excel export requires additional library (xlsx). Using CSV fallback.');
84
+ const csv = exportToCSV(rows, columns, config);
85
+ downloadFile(csv, `${filename}.csv`, 'text/csv;charset=utf-8;');
86
+ break;
87
+ case 'pdf':
88
+ console.warn('PDF export requires additional library (jspdf). Not implemented.');
89
+ break;
90
+ }
91
+ };
92
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @fileoverview DataTable V2 Utilities
3
+ */
4
+ export { exportToCSV, exportToJSON, downloadFile, createExportHandler, type ExportConfig } from './export';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @fileoverview DataTable V2 Utilities
3
+ */
4
+ export { exportToCSV, exportToJSON, downloadFile, createExportHandler } from './export';
package/lib/index.d.ts CHANGED
@@ -20,3 +20,7 @@ export * from './rbac';
20
20
  export { useImageUpload } from './shared/hooks/useImageUpload';
21
21
  export type { UseImageUploadProps, UploadResponse } from './shared/hooks/useImageUpload';
22
22
  export * from './feedback';
23
+ export { BaseChart, BarChart, LineChart, AreaChart, DonutChart, PieChart, HeatmapChart, RadialChart, MixedChart, StatCard, MetricCard, InfoCard, CardGrid, StatCardGrid, MetricCardGrid, TransactionListCard, TopItemsCard, visualRegistryV2, VisualType, getVisualComponent, isRegisteredVisual, getRegisteredVisualTypes, registerVisual, DashboardWrapperV2, useChartData, useChartQueryData, } from './dashboard-visuals-v2';
24
+ export type { BaseChartProps, BarChartProps, LineChartProps, AreaChartProps, DonutChartProps, PieChartProps, HeatmapChartProps, RadialChartProps, MixedChartProps, ChartQueryProps, ChartDataPoint, ChartSeries, StatCardProps, MetricCardProps, InfoCardProps, CardGridProps, TransactionListCardProps, TopItemsCardProps, DashboardWrapperV2Props, } from './dashboard-visuals-v2';
25
+ export { DataTable, DataTableHeader, DataTableBody, DataTablePagination, DataTableSearch, DataTableToolbar, DataTableEmpty, DataTableLoading, DataTableError, DataTableRowActions, useTableData, usePaginatedTableData, exportToCSV, exportToJSON, downloadFile, createExportHandler, } from './data-table-v2';
26
+ export type { DataTableProps, DataTableColumn, DataTableClassNames, RowSelectionOptions, PaginationOptions, SortingOptions, FilteringOptions, ColumnVisibilityOptions, ExportOptions, RowAction, BulkAction, DataTableServerResponse, DataTableServerRequest, UseTableDataOptions, UsePaginatedTableDataOptions, UseTableDataResult, UsePaginatedTableDataResult, } from './data-table-v2';
package/lib/index.js CHANGED
@@ -30,3 +30,26 @@ export * from './rbac';
30
30
  export { useImageUpload } from './shared/hooks/useImageUpload';
31
31
  // Feedback System
32
32
  export * from './feedback';
33
+ // ============================================
34
+ // V2 Components (ApexCharts + TanStack Table)
35
+ // ============================================
36
+ // Dashboard Visuals V2 - ApexCharts based
37
+ export {
38
+ // Charts
39
+ BaseChart, BarChart, LineChart, AreaChart, DonutChart, PieChart, HeatmapChart, RadialChart, MixedChart,
40
+ // Cards
41
+ StatCard, MetricCard, InfoCard, CardGrid, StatCardGrid, MetricCardGrid, TransactionListCard, TopItemsCard,
42
+ // Registry
43
+ visualRegistryV2, VisualType, getVisualComponent, isRegisteredVisual, getRegisteredVisualTypes, registerVisual,
44
+ // Wrapper
45
+ DashboardWrapperV2,
46
+ // Hooks
47
+ useChartData, useChartQueryData, } from './dashboard-visuals-v2';
48
+ // DataTable V2 - TanStack Table based
49
+ export { DataTable,
50
+ // Sub-components
51
+ DataTableHeader, DataTableBody, DataTablePagination, DataTableSearch, DataTableToolbar, DataTableEmpty, DataTableLoading, DataTableError, DataTableRowActions,
52
+ // Hooks (TanStack Query)
53
+ useTableData, usePaginatedTableData,
54
+ // Utils
55
+ exportToCSV, exportToJSON, downloadFile, createExportHandler, } from './data-table-v2';