@smallwebco/tinypivot-react 1.0.29 → 1.0.31
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/dist/index.cjs +919 -542
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +917 -540
- package/dist/index.js.map +1 -1
- package/dist/style.css +299 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ColumnStats, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, LicenseInfo, ExportOptions, PivotExportData, SelectionBounds, PaginationOptions } from '@smallwebco/tinypivot-core';
|
|
2
|
+
import { ColumnStats, NumericRange, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, LicenseInfo, ExportOptions, PivotExportData, SelectionBounds, PaginationOptions } from '@smallwebco/tinypivot-core';
|
|
3
3
|
export { 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';
|
|
@@ -56,11 +56,15 @@ interface ColumnFilterProps {
|
|
|
56
56
|
stats: ColumnStats;
|
|
57
57
|
selectedValues: string[];
|
|
58
58
|
sortDirection: 'asc' | 'desc' | null;
|
|
59
|
+
/** Current numeric range filter (if any) */
|
|
60
|
+
numericRange?: NumericRange | null;
|
|
59
61
|
onFilter: (values: string[]) => void;
|
|
60
62
|
onSort: (direction: 'asc' | 'desc' | null) => void;
|
|
61
63
|
onClose: () => void;
|
|
64
|
+
/** Called when a numeric range filter is applied */
|
|
65
|
+
onRangeFilter?: (range: NumericRange | null) => void;
|
|
62
66
|
}
|
|
63
|
-
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, onFilter, onSort, onClose, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, numericRange, onFilter, onSort, onClose, onRangeFilter, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
64
68
|
|
|
65
69
|
interface PivotConfigProps {
|
|
66
70
|
availableFields: FieldStats[];
|
|
@@ -152,6 +156,8 @@ declare function useExcelGrid<T extends Record<string, unknown>>(options: ExcelG
|
|
|
152
156
|
clearAllFilters: () => void;
|
|
153
157
|
toggleSort: (columnId: string) => void;
|
|
154
158
|
getSortDirection: (columnId: string) => 'asc' | 'desc' | null;
|
|
159
|
+
setNumericRangeFilter: (columnId: string, range: NumericRange | null) => void;
|
|
160
|
+
getNumericRangeFilter: (columnId: string) => NumericRange | null;
|
|
155
161
|
};
|
|
156
162
|
|
|
157
163
|
interface UsePivotTableReturn {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ColumnStats, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, LicenseInfo, ExportOptions, PivotExportData, SelectionBounds, PaginationOptions } from '@smallwebco/tinypivot-core';
|
|
2
|
+
import { ColumnStats, NumericRange, FieldStats, PivotValueField, CalculatedField, AggregationFunction, PivotResult, LicenseInfo, ExportOptions, PivotExportData, SelectionBounds, PaginationOptions } from '@smallwebco/tinypivot-core';
|
|
3
3
|
export { 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';
|
|
@@ -56,11 +56,15 @@ interface ColumnFilterProps {
|
|
|
56
56
|
stats: ColumnStats;
|
|
57
57
|
selectedValues: string[];
|
|
58
58
|
sortDirection: 'asc' | 'desc' | null;
|
|
59
|
+
/** Current numeric range filter (if any) */
|
|
60
|
+
numericRange?: NumericRange | null;
|
|
59
61
|
onFilter: (values: string[]) => void;
|
|
60
62
|
onSort: (direction: 'asc' | 'desc' | null) => void;
|
|
61
63
|
onClose: () => void;
|
|
64
|
+
/** Called when a numeric range filter is applied */
|
|
65
|
+
onRangeFilter?: (range: NumericRange | null) => void;
|
|
62
66
|
}
|
|
63
|
-
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, onFilter, onSort, onClose, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare function ColumnFilter({ columnName, stats, selectedValues, sortDirection, numericRange, onFilter, onSort, onClose, onRangeFilter, }: ColumnFilterProps): react_jsx_runtime.JSX.Element;
|
|
64
68
|
|
|
65
69
|
interface PivotConfigProps {
|
|
66
70
|
availableFields: FieldStats[];
|
|
@@ -152,6 +156,8 @@ declare function useExcelGrid<T extends Record<string, unknown>>(options: ExcelG
|
|
|
152
156
|
clearAllFilters: () => void;
|
|
153
157
|
toggleSort: (columnId: string) => void;
|
|
154
158
|
getSortDirection: (columnId: string) => 'asc' | 'desc' | null;
|
|
159
|
+
setNumericRangeFilter: (columnId: string, range: NumericRange | null) => void;
|
|
160
|
+
getNumericRangeFilter: (columnId: string) => NumericRange | null;
|
|
155
161
|
};
|
|
156
162
|
|
|
157
163
|
interface UsePivotTableReturn {
|