bolt-table 0.1.21 → 0.1.23
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.d.mts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +279 -310
- package/dist/index.mjs +279 -310
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -210,8 +210,8 @@ interface BoltTableProps<T extends DataRecord = DataRecord> {
|
|
|
210
210
|
readonly expandable?: ExpandableConfig<T>;
|
|
211
211
|
/** Row selection configuration. Prepends a checkbox/radio column when provided. */
|
|
212
212
|
readonly rowSelection?: RowSelectionConfig<T>;
|
|
213
|
-
/** Row pinning configuration.
|
|
214
|
-
readonly rowPinning?: RowPinningConfig;
|
|
213
|
+
/** Row pinning configuration. Pass `true` for internal state management, or an object for controlled mode. */
|
|
214
|
+
readonly rowPinning?: RowPinningConfig | boolean;
|
|
215
215
|
/** Called when the user pins or unpins a row via the cell context menu. */
|
|
216
216
|
readonly onRowPin?: (rowKey: React$1.Key, pinned: 'top' | 'bottom' | false) => void;
|
|
217
217
|
/** Called when the user scrolls near the bottom of the table. Use for infinite scroll. */
|
|
@@ -236,6 +236,12 @@ interface BoltTableProps<T extends DataRecord = DataRecord> {
|
|
|
236
236
|
readonly rowClassName?: (record: T, index: number) => string;
|
|
237
237
|
/** Returns inline CSS styles for a given row based on its record and index. Useful for dynamic per-row styling. */
|
|
238
238
|
readonly rowStyle?: (record: T, index: number) => React$1.CSSProperties;
|
|
239
|
+
/** When true, removes the filter option from all header column context menus. */
|
|
240
|
+
readonly disabledFilters?: boolean;
|
|
241
|
+
/** Called after a cell value is copied to the clipboard via the context menu. */
|
|
242
|
+
readonly onCopy?: (text: string, columnKey: string, record: T, rowIndex: number) => void;
|
|
243
|
+
/** When true, pinned rows remain visible even after navigating to a different page. */
|
|
244
|
+
readonly keepPinnedRowsAcrossPages?: boolean;
|
|
239
245
|
}
|
|
240
246
|
interface ClassNamesTypes {
|
|
241
247
|
/** Applied to all non-pinned column header cells. */
|
|
@@ -280,8 +286,10 @@ interface StylesTypes {
|
|
|
280
286
|
rowSelected?: CSSProperties;
|
|
281
287
|
/** CSS color string for pinned column cells and headers background. */
|
|
282
288
|
pinnedBg?: string;
|
|
289
|
+
/** Inline styles applied to built-in context menu items (sort, filter, pin, copy, etc.). */
|
|
290
|
+
contextMenuItem?: CSSProperties;
|
|
283
291
|
}
|
|
284
|
-
declare function BoltTable<T extends DataRecord = DataRecord>({ columns: rawInitialColumns, data: rawData, rowHeight, expandedRowHeight, maxExpandedRowHeight, accentColor, className, classNames, styles, gripIcon, hideGripIcon, icons, pagination, onPaginationChange, onColumnResize, onColumnOrderChange, onColumnPin, onColumnHide, rowSelection, rowPinning, onRowPin, expandable, rowKey, onEndReached, onEndReachedThreshold, isLoading, onSortChange, onFilterChange, columnContextMenuItems, autoHeight, layoutLoading, emptyRenderer, rowClassName, rowStyle, }: BoltTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
292
|
+
declare function BoltTable<T extends DataRecord = DataRecord>({ columns: rawInitialColumns, data: rawData, rowHeight, expandedRowHeight, maxExpandedRowHeight, accentColor, className, classNames, styles, gripIcon, hideGripIcon, icons, pagination, onPaginationChange, onColumnResize, onColumnOrderChange, onColumnPin, onColumnHide, rowSelection, rowPinning, onRowPin, expandable, rowKey, onEndReached, onEndReachedThreshold, isLoading, onSortChange, onFilterChange, columnContextMenuItems, autoHeight, layoutLoading, emptyRenderer, rowClassName, rowStyle, disabledFilters, onCopy, keepPinnedRowsAcrossPages, }: BoltTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
285
293
|
|
|
286
294
|
interface DraggableHeaderProps {
|
|
287
295
|
/** Column definition for this header cell. */
|
|
@@ -324,8 +332,10 @@ interface DraggableHeaderProps {
|
|
|
324
332
|
customContextMenuItems?: ColumnContextMenuItem[];
|
|
325
333
|
/** Custom icon overrides from BoltTable's icons prop. */
|
|
326
334
|
icons?: BoltTableIcons;
|
|
335
|
+
/** When true, hides the filter option from the context menu. */
|
|
336
|
+
disabledFilters?: boolean;
|
|
327
337
|
}
|
|
328
|
-
declare const DraggableHeader: React$1.MemoExoticComponent<({ column, visualIndex, accentColor, onResizeStart, styles, classNames, hideGripIcon, gripIcon, stickyOffset, onTogglePin, onToggleHide, isLastColumn, sortDirection, onSort, filterValue, onFilter, onClearFilter, customContextMenuItems, icons, onColumnDragStart, }: DraggableHeaderProps) => react_jsx_runtime.JSX.Element>;
|
|
338
|
+
declare const DraggableHeader: React$1.MemoExoticComponent<({ column, visualIndex, accentColor, onResizeStart, styles, classNames, hideGripIcon, gripIcon, stickyOffset, onTogglePin, onToggleHide, isLastColumn, sortDirection, onSort, filterValue, onFilter, onClearFilter, customContextMenuItems, icons, onColumnDragStart, disabledFilters, }: DraggableHeaderProps) => react_jsx_runtime.JSX.Element>;
|
|
329
339
|
|
|
330
340
|
interface ResizeOverlayHandle {
|
|
331
341
|
show: (viewportX: number, columnName: string, areaRect: DOMRect, headerLeftLocal: number, minSize: number, scrollTop: number, scrollLeft: number, initialLineX: number) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -210,8 +210,8 @@ interface BoltTableProps<T extends DataRecord = DataRecord> {
|
|
|
210
210
|
readonly expandable?: ExpandableConfig<T>;
|
|
211
211
|
/** Row selection configuration. Prepends a checkbox/radio column when provided. */
|
|
212
212
|
readonly rowSelection?: RowSelectionConfig<T>;
|
|
213
|
-
/** Row pinning configuration.
|
|
214
|
-
readonly rowPinning?: RowPinningConfig;
|
|
213
|
+
/** Row pinning configuration. Pass `true` for internal state management, or an object for controlled mode. */
|
|
214
|
+
readonly rowPinning?: RowPinningConfig | boolean;
|
|
215
215
|
/** Called when the user pins or unpins a row via the cell context menu. */
|
|
216
216
|
readonly onRowPin?: (rowKey: React$1.Key, pinned: 'top' | 'bottom' | false) => void;
|
|
217
217
|
/** Called when the user scrolls near the bottom of the table. Use for infinite scroll. */
|
|
@@ -236,6 +236,12 @@ interface BoltTableProps<T extends DataRecord = DataRecord> {
|
|
|
236
236
|
readonly rowClassName?: (record: T, index: number) => string;
|
|
237
237
|
/** Returns inline CSS styles for a given row based on its record and index. Useful for dynamic per-row styling. */
|
|
238
238
|
readonly rowStyle?: (record: T, index: number) => React$1.CSSProperties;
|
|
239
|
+
/** When true, removes the filter option from all header column context menus. */
|
|
240
|
+
readonly disabledFilters?: boolean;
|
|
241
|
+
/** Called after a cell value is copied to the clipboard via the context menu. */
|
|
242
|
+
readonly onCopy?: (text: string, columnKey: string, record: T, rowIndex: number) => void;
|
|
243
|
+
/** When true, pinned rows remain visible even after navigating to a different page. */
|
|
244
|
+
readonly keepPinnedRowsAcrossPages?: boolean;
|
|
239
245
|
}
|
|
240
246
|
interface ClassNamesTypes {
|
|
241
247
|
/** Applied to all non-pinned column header cells. */
|
|
@@ -280,8 +286,10 @@ interface StylesTypes {
|
|
|
280
286
|
rowSelected?: CSSProperties;
|
|
281
287
|
/** CSS color string for pinned column cells and headers background. */
|
|
282
288
|
pinnedBg?: string;
|
|
289
|
+
/** Inline styles applied to built-in context menu items (sort, filter, pin, copy, etc.). */
|
|
290
|
+
contextMenuItem?: CSSProperties;
|
|
283
291
|
}
|
|
284
|
-
declare function BoltTable<T extends DataRecord = DataRecord>({ columns: rawInitialColumns, data: rawData, rowHeight, expandedRowHeight, maxExpandedRowHeight, accentColor, className, classNames, styles, gripIcon, hideGripIcon, icons, pagination, onPaginationChange, onColumnResize, onColumnOrderChange, onColumnPin, onColumnHide, rowSelection, rowPinning, onRowPin, expandable, rowKey, onEndReached, onEndReachedThreshold, isLoading, onSortChange, onFilterChange, columnContextMenuItems, autoHeight, layoutLoading, emptyRenderer, rowClassName, rowStyle, }: BoltTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
292
|
+
declare function BoltTable<T extends DataRecord = DataRecord>({ columns: rawInitialColumns, data: rawData, rowHeight, expandedRowHeight, maxExpandedRowHeight, accentColor, className, classNames, styles, gripIcon, hideGripIcon, icons, pagination, onPaginationChange, onColumnResize, onColumnOrderChange, onColumnPin, onColumnHide, rowSelection, rowPinning, onRowPin, expandable, rowKey, onEndReached, onEndReachedThreshold, isLoading, onSortChange, onFilterChange, columnContextMenuItems, autoHeight, layoutLoading, emptyRenderer, rowClassName, rowStyle, disabledFilters, onCopy, keepPinnedRowsAcrossPages, }: BoltTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
285
293
|
|
|
286
294
|
interface DraggableHeaderProps {
|
|
287
295
|
/** Column definition for this header cell. */
|
|
@@ -324,8 +332,10 @@ interface DraggableHeaderProps {
|
|
|
324
332
|
customContextMenuItems?: ColumnContextMenuItem[];
|
|
325
333
|
/** Custom icon overrides from BoltTable's icons prop. */
|
|
326
334
|
icons?: BoltTableIcons;
|
|
335
|
+
/** When true, hides the filter option from the context menu. */
|
|
336
|
+
disabledFilters?: boolean;
|
|
327
337
|
}
|
|
328
|
-
declare const DraggableHeader: React$1.MemoExoticComponent<({ column, visualIndex, accentColor, onResizeStart, styles, classNames, hideGripIcon, gripIcon, stickyOffset, onTogglePin, onToggleHide, isLastColumn, sortDirection, onSort, filterValue, onFilter, onClearFilter, customContextMenuItems, icons, onColumnDragStart, }: DraggableHeaderProps) => react_jsx_runtime.JSX.Element>;
|
|
338
|
+
declare const DraggableHeader: React$1.MemoExoticComponent<({ column, visualIndex, accentColor, onResizeStart, styles, classNames, hideGripIcon, gripIcon, stickyOffset, onTogglePin, onToggleHide, isLastColumn, sortDirection, onSort, filterValue, onFilter, onClearFilter, customContextMenuItems, icons, onColumnDragStart, disabledFilters, }: DraggableHeaderProps) => react_jsx_runtime.JSX.Element>;
|
|
329
339
|
|
|
330
340
|
interface ResizeOverlayHandle {
|
|
331
341
|
show: (viewportX: number, columnName: string, areaRect: DOMRect, headerLeftLocal: number, minSize: number, scrollTop: number, scrollLeft: number, initialLineX: number) => void;
|