bolt-table 0.1.20 → 0.1.22

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 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. Specified rows render as sticky at top and/or bottom. */
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,8 @@ 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;
239
241
  }
240
242
  interface ClassNamesTypes {
241
243
  /** Applied to all non-pinned column header cells. */
@@ -280,8 +282,10 @@ interface StylesTypes {
280
282
  rowSelected?: CSSProperties;
281
283
  /** CSS color string for pinned column cells and headers background. */
282
284
  pinnedBg?: string;
285
+ /** Inline styles applied to built-in context menu items (sort, filter, pin, copy, etc.). */
286
+ contextMenuItem?: CSSProperties;
283
287
  }
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;
288
+ 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, }: BoltTableProps<T>): react_jsx_runtime.JSX.Element;
285
289
 
286
290
  interface DraggableHeaderProps {
287
291
  /** Column definition for this header cell. */
@@ -324,8 +328,10 @@ interface DraggableHeaderProps {
324
328
  customContextMenuItems?: ColumnContextMenuItem[];
325
329
  /** Custom icon overrides from BoltTable's icons prop. */
326
330
  icons?: BoltTableIcons;
331
+ /** When true, hides the filter option from the context menu. */
332
+ disabledFilters?: boolean;
327
333
  }
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>;
334
+ 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
335
 
330
336
  interface ResizeOverlayHandle {
331
337
  show: (viewportX: number, columnName: string, areaRect: DOMRect, headerLeftLocal: number, minSize: number, scrollTop: number, scrollLeft: number, initialLineX: number) => void;
@@ -357,6 +363,8 @@ interface TableBodyProps {
357
363
  normalizedSelectedKeys?: string[];
358
364
  /** Returns the string key for a given row record and index */
359
365
  getRowKey?: (record: DataRecord, index: number) => string;
366
+ /** Returns the original-typed key for a given row record and index */
367
+ getRawRowKey?: (record: DataRecord, index: number) => React$1.Key;
360
368
  /** Expandable row configuration */
361
369
  expandable?: ExpandableConfig<DataRecord>;
362
370
  /** Set of currently expanded row keys */
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. Specified rows render as sticky at top and/or bottom. */
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,8 @@ 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;
239
241
  }
240
242
  interface ClassNamesTypes {
241
243
  /** Applied to all non-pinned column header cells. */
@@ -280,8 +282,10 @@ interface StylesTypes {
280
282
  rowSelected?: CSSProperties;
281
283
  /** CSS color string for pinned column cells and headers background. */
282
284
  pinnedBg?: string;
285
+ /** Inline styles applied to built-in context menu items (sort, filter, pin, copy, etc.). */
286
+ contextMenuItem?: CSSProperties;
283
287
  }
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;
288
+ 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, }: BoltTableProps<T>): react_jsx_runtime.JSX.Element;
285
289
 
286
290
  interface DraggableHeaderProps {
287
291
  /** Column definition for this header cell. */
@@ -324,8 +328,10 @@ interface DraggableHeaderProps {
324
328
  customContextMenuItems?: ColumnContextMenuItem[];
325
329
  /** Custom icon overrides from BoltTable's icons prop. */
326
330
  icons?: BoltTableIcons;
331
+ /** When true, hides the filter option from the context menu. */
332
+ disabledFilters?: boolean;
327
333
  }
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>;
334
+ 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
335
 
330
336
  interface ResizeOverlayHandle {
331
337
  show: (viewportX: number, columnName: string, areaRect: DOMRect, headerLeftLocal: number, minSize: number, scrollTop: number, scrollLeft: number, initialLineX: number) => void;
@@ -357,6 +363,8 @@ interface TableBodyProps {
357
363
  normalizedSelectedKeys?: string[];
358
364
  /** Returns the string key for a given row record and index */
359
365
  getRowKey?: (record: DataRecord, index: number) => string;
366
+ /** Returns the original-typed key for a given row record and index */
367
+ getRawRowKey?: (record: DataRecord, index: number) => React$1.Key;
360
368
  /** Expandable row configuration */
361
369
  expandable?: ExpandableConfig<DataRecord>;
362
370
  /** Set of currently expanded row keys */