@smallwebco/tinypivot-react 1.0.66 → 1.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.cjs +980 -693
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -3
- package/dist/index.d.ts +25 -3
- package/dist/index.js +935 -648
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _smallwebco_tinypivot_core from '@smallwebco/tinypivot-core';
|
|
2
|
-
import { AIAnalystConfig, AIDataLoadedEvent, AIConversationUpdateEvent, AIQueryExecutedEvent, AIErrorEvent, ColumnStats, NumericRange, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, AIConversation, AITableSchema, AIDataSource, PivotExportData, ExportOptions, SelectionBounds, PaginationOptions, LicenseInfo } from '@smallwebco/tinypivot-core';
|
|
2
|
+
import { AIAnalystConfig, AIDataLoadedEvent, AIConversationUpdateEvent, AIQueryExecutedEvent, AIErrorEvent, ColumnStats, NumericRange, DateRange, NumberFormat, DateFormat, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, AIConversation, AITableSchema, AIDataSource, PivotExportData, ExportOptions, SelectionBounds, PaginationOptions, LicenseInfo } from '@smallwebco/tinypivot-core';
|
|
3
3
|
export { AIAnalystConfig, AIColumnSchema, AIConversation, AIConversationUpdateEvent, AIDataLoadedEvent, AIDataSource, AIErrorEvent, AIMessage, AIMessageMetadata, AIQueryExecutedEvent, AITableSchema, AggregationFunction, CellClickEvent, ColumnStats, CopyEvent, DataGridProps, ExportEvent, ExportOptions, FieldStats, FilterEvent, GridOptions, LicenseInfo, LicenseType, PaginationOptions, PivotCell, PivotConfig as PivotConfigType, PivotField, PivotResult, PivotTableProps, PivotValueField, RowSelectionChangeEvent, SelectionBounds, SelectionChangeEvent, SortEvent, formatCellValue, getAggregationLabel, getColumnUniqueValues } from '@smallwebco/tinypivot-core';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default from 'react';
|
|
@@ -39,13 +39,21 @@ interface ColumnFilterProps {
|
|
|
39
39
|
sortDirection: 'asc' | 'desc' | null;
|
|
40
40
|
/** Current numeric range filter (if any) */
|
|
41
41
|
numericRange?: NumericRange | null;
|
|
42
|
+
/** Current date range filter (if any) */
|
|
43
|
+
dateRange?: DateRange | null;
|
|
44
|
+
/** Number display format */
|
|
45
|
+
numberFormat?: NumberFormat;
|
|
46
|
+
/** Date display format */
|
|
47
|
+
dateFormat?: DateFormat;
|
|
42
48
|
onFilter: (values: string[]) => void;
|
|
43
49
|
onSort: (direction: 'asc' | 'desc' | null) => void;
|
|
44
50
|
onClose: () => void;
|
|
45
51
|
/** Called when a numeric range filter is applied */
|
|
46
52
|
onRangeFilter?: (range: NumericRange | null) => void;
|
|
53
|
+
/** Called when a date range filter is applied */
|
|
54
|
+
onDateRangeFilter?: (range: DateRange | null) => void;
|
|
47
55
|
}
|
|
48
|
-
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, numericRange, onFilter, onSort, onClose, onRangeFilter, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
56
|
+
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, numericRange, dateRange, numberFormat, dateFormat, onFilter, onSort, onClose, onRangeFilter, onDateRangeFilter, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
49
57
|
|
|
50
58
|
interface DataGridProps {
|
|
51
59
|
data: Record<string, unknown>[];
|
|
@@ -67,6 +75,10 @@ interface DataGridProps {
|
|
|
67
75
|
initialHeight?: number;
|
|
68
76
|
minHeight?: number;
|
|
69
77
|
maxHeight?: number;
|
|
78
|
+
/** Number display format */
|
|
79
|
+
numberFormat?: NumberFormat;
|
|
80
|
+
/** Date display format */
|
|
81
|
+
dateFormat?: DateFormat;
|
|
70
82
|
/** AI Data Analyst configuration (Pro feature, disabled by default) */
|
|
71
83
|
aiAnalyst?: AIAnalystConfig;
|
|
72
84
|
onCellClick?: (payload: {
|
|
@@ -95,7 +107,7 @@ interface DataGridProps {
|
|
|
95
107
|
onAIQueryExecuted?: (payload: AIQueryExecutedEvent) => void;
|
|
96
108
|
onAIError?: (payload: AIErrorEvent) => void;
|
|
97
109
|
}
|
|
98
|
-
declare function DataGrid({ data, loading, fontSize: initialFontSize, showPivot, enableExport, enableSearch, enablePagination, pageSize, enableColumnResize, enableClipboard, theme, stripedRows, exportFilename, enableVerticalResize, initialHeight, minHeight, maxHeight, aiAnalyst, onCellClick, onExport, onCopy, onAIDataLoaded, onAIConversationUpdate, onAIQueryExecuted, onAIError, }: DataGridProps): react_jsx_runtime.JSX.Element;
|
|
110
|
+
declare function DataGrid({ data, loading, fontSize: initialFontSize, showPivot, enableExport, enableSearch, enablePagination, pageSize, enableColumnResize, enableClipboard, theme, stripedRows, exportFilename, enableVerticalResize, initialHeight, minHeight, maxHeight, numberFormat, dateFormat, aiAnalyst, onCellClick, onExport, onCopy, onAIDataLoaded, onAIConversationUpdate, onAIQueryExecuted, onAIError, }: DataGridProps): react_jsx_runtime.JSX.Element;
|
|
99
111
|
|
|
100
112
|
interface PivotConfigProps {
|
|
101
113
|
availableFields: FieldStats[];
|
|
@@ -212,12 +224,20 @@ declare function useExcelGrid<T extends Record<string, unknown>>(options: ExcelG
|
|
|
212
224
|
column: string;
|
|
213
225
|
type: "range";
|
|
214
226
|
range: NumericRange;
|
|
227
|
+
dateRange: DateRange | null;
|
|
228
|
+
values: string[];
|
|
229
|
+
} | {
|
|
230
|
+
column: string;
|
|
231
|
+
type: "dateRange";
|
|
232
|
+
range: NumericRange | null;
|
|
233
|
+
dateRange: DateRange;
|
|
215
234
|
values: string[];
|
|
216
235
|
} | {
|
|
217
236
|
column: string;
|
|
218
237
|
type: "values";
|
|
219
238
|
values: string[];
|
|
220
239
|
range: NumericRange | null;
|
|
240
|
+
dateRange: DateRange | null;
|
|
221
241
|
})[];
|
|
222
242
|
getColumnStats: (columnKey: string) => ColumnStats;
|
|
223
243
|
clearStatsCache: () => void;
|
|
@@ -229,6 +249,8 @@ declare function useExcelGrid<T extends Record<string, unknown>>(options: ExcelG
|
|
|
229
249
|
getSortDirection: (columnId: string) => 'asc' | 'desc' | null;
|
|
230
250
|
setNumericRangeFilter: (columnId: string, range: NumericRange | null) => void;
|
|
231
251
|
getNumericRangeFilter: (columnId: string) => NumericRange | null;
|
|
252
|
+
setDateRangeFilter: (columnId: string, range: DateRange | null) => void;
|
|
253
|
+
getDateRangeFilter: (columnId: string) => DateRange | null;
|
|
232
254
|
};
|
|
233
255
|
|
|
234
256
|
declare function exportToCSV<T extends Record<string, unknown>>(data: T[], columns: string[], options?: ExportOptions): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _smallwebco_tinypivot_core from '@smallwebco/tinypivot-core';
|
|
2
|
-
import { AIAnalystConfig, AIDataLoadedEvent, AIConversationUpdateEvent, AIQueryExecutedEvent, AIErrorEvent, ColumnStats, NumericRange, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, AIConversation, AITableSchema, AIDataSource, PivotExportData, ExportOptions, SelectionBounds, PaginationOptions, LicenseInfo } from '@smallwebco/tinypivot-core';
|
|
2
|
+
import { AIAnalystConfig, AIDataLoadedEvent, AIConversationUpdateEvent, AIQueryExecutedEvent, AIErrorEvent, ColumnStats, NumericRange, DateRange, NumberFormat, DateFormat, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, AIConversation, AITableSchema, AIDataSource, PivotExportData, ExportOptions, SelectionBounds, PaginationOptions, LicenseInfo } from '@smallwebco/tinypivot-core';
|
|
3
3
|
export { AIAnalystConfig, AIColumnSchema, AIConversation, AIConversationUpdateEvent, AIDataLoadedEvent, AIDataSource, AIErrorEvent, AIMessage, AIMessageMetadata, AIQueryExecutedEvent, AITableSchema, AggregationFunction, CellClickEvent, ColumnStats, CopyEvent, DataGridProps, ExportEvent, ExportOptions, FieldStats, FilterEvent, GridOptions, LicenseInfo, LicenseType, PaginationOptions, PivotCell, PivotConfig as PivotConfigType, PivotField, PivotResult, PivotTableProps, PivotValueField, RowSelectionChangeEvent, SelectionBounds, SelectionChangeEvent, SortEvent, formatCellValue, getAggregationLabel, getColumnUniqueValues } from '@smallwebco/tinypivot-core';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default from 'react';
|
|
@@ -39,13 +39,21 @@ interface ColumnFilterProps {
|
|
|
39
39
|
sortDirection: 'asc' | 'desc' | null;
|
|
40
40
|
/** Current numeric range filter (if any) */
|
|
41
41
|
numericRange?: NumericRange | null;
|
|
42
|
+
/** Current date range filter (if any) */
|
|
43
|
+
dateRange?: DateRange | null;
|
|
44
|
+
/** Number display format */
|
|
45
|
+
numberFormat?: NumberFormat;
|
|
46
|
+
/** Date display format */
|
|
47
|
+
dateFormat?: DateFormat;
|
|
42
48
|
onFilter: (values: string[]) => void;
|
|
43
49
|
onSort: (direction: 'asc' | 'desc' | null) => void;
|
|
44
50
|
onClose: () => void;
|
|
45
51
|
/** Called when a numeric range filter is applied */
|
|
46
52
|
onRangeFilter?: (range: NumericRange | null) => void;
|
|
53
|
+
/** Called when a date range filter is applied */
|
|
54
|
+
onDateRangeFilter?: (range: DateRange | null) => void;
|
|
47
55
|
}
|
|
48
|
-
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, numericRange, onFilter, onSort, onClose, onRangeFilter, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
56
|
+
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, numericRange, dateRange, numberFormat, dateFormat, onFilter, onSort, onClose, onRangeFilter, onDateRangeFilter, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
49
57
|
|
|
50
58
|
interface DataGridProps {
|
|
51
59
|
data: Record<string, unknown>[];
|
|
@@ -67,6 +75,10 @@ interface DataGridProps {
|
|
|
67
75
|
initialHeight?: number;
|
|
68
76
|
minHeight?: number;
|
|
69
77
|
maxHeight?: number;
|
|
78
|
+
/** Number display format */
|
|
79
|
+
numberFormat?: NumberFormat;
|
|
80
|
+
/** Date display format */
|
|
81
|
+
dateFormat?: DateFormat;
|
|
70
82
|
/** AI Data Analyst configuration (Pro feature, disabled by default) */
|
|
71
83
|
aiAnalyst?: AIAnalystConfig;
|
|
72
84
|
onCellClick?: (payload: {
|
|
@@ -95,7 +107,7 @@ interface DataGridProps {
|
|
|
95
107
|
onAIQueryExecuted?: (payload: AIQueryExecutedEvent) => void;
|
|
96
108
|
onAIError?: (payload: AIErrorEvent) => void;
|
|
97
109
|
}
|
|
98
|
-
declare function DataGrid({ data, loading, fontSize: initialFontSize, showPivot, enableExport, enableSearch, enablePagination, pageSize, enableColumnResize, enableClipboard, theme, stripedRows, exportFilename, enableVerticalResize, initialHeight, minHeight, maxHeight, aiAnalyst, onCellClick, onExport, onCopy, onAIDataLoaded, onAIConversationUpdate, onAIQueryExecuted, onAIError, }: DataGridProps): react_jsx_runtime.JSX.Element;
|
|
110
|
+
declare function DataGrid({ data, loading, fontSize: initialFontSize, showPivot, enableExport, enableSearch, enablePagination, pageSize, enableColumnResize, enableClipboard, theme, stripedRows, exportFilename, enableVerticalResize, initialHeight, minHeight, maxHeight, numberFormat, dateFormat, aiAnalyst, onCellClick, onExport, onCopy, onAIDataLoaded, onAIConversationUpdate, onAIQueryExecuted, onAIError, }: DataGridProps): react_jsx_runtime.JSX.Element;
|
|
99
111
|
|
|
100
112
|
interface PivotConfigProps {
|
|
101
113
|
availableFields: FieldStats[];
|
|
@@ -212,12 +224,20 @@ declare function useExcelGrid<T extends Record<string, unknown>>(options: ExcelG
|
|
|
212
224
|
column: string;
|
|
213
225
|
type: "range";
|
|
214
226
|
range: NumericRange;
|
|
227
|
+
dateRange: DateRange | null;
|
|
228
|
+
values: string[];
|
|
229
|
+
} | {
|
|
230
|
+
column: string;
|
|
231
|
+
type: "dateRange";
|
|
232
|
+
range: NumericRange | null;
|
|
233
|
+
dateRange: DateRange;
|
|
215
234
|
values: string[];
|
|
216
235
|
} | {
|
|
217
236
|
column: string;
|
|
218
237
|
type: "values";
|
|
219
238
|
values: string[];
|
|
220
239
|
range: NumericRange | null;
|
|
240
|
+
dateRange: DateRange | null;
|
|
221
241
|
})[];
|
|
222
242
|
getColumnStats: (columnKey: string) => ColumnStats;
|
|
223
243
|
clearStatsCache: () => void;
|
|
@@ -229,6 +249,8 @@ declare function useExcelGrid<T extends Record<string, unknown>>(options: ExcelG
|
|
|
229
249
|
getSortDirection: (columnId: string) => 'asc' | 'desc' | null;
|
|
230
250
|
setNumericRangeFilter: (columnId: string, range: NumericRange | null) => void;
|
|
231
251
|
getNumericRangeFilter: (columnId: string) => NumericRange | null;
|
|
252
|
+
setDateRangeFilter: (columnId: string, range: DateRange | null) => void;
|
|
253
|
+
getDateRangeFilter: (columnId: string) => DateRange | null;
|
|
232
254
|
};
|
|
233
255
|
|
|
234
256
|
declare function exportToCSV<T extends Record<string, unknown>>(data: T[], columns: string[], options?: ExportOptions): void;
|