schummar-table 0.46.2 → 0.46.4

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.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { ComponentType, ReactNode, HTMLProps } from 'react';
4
- import { T as TableTheme, C as CommonFilterProps, a as TableProps, b as TableRef, F as FilterImplementation, M as MemoizedTableTheme, I as Id, c as TableItem, d as InternalTableState, P as PartialTableTheme } from './types-CJnecNQy.cjs';
5
- export { f as Column, g as FunctionWithDeps, h as InternalColumn, S as Sort, i as SortDirection, e as TableStateStorage } from './types-CJnecNQy.cjs';
3
+ import { ComponentType, ReactNode, HTMLProps, ForwardedRef } from 'react';
4
+ import { T as TableTheme, C as CommonFilterProps, a as TableProps, b as TableRef, F as FilterImplementation, M as MemoizedTableTheme, I as Id, c as TableItem, d as InternalTableState, P as PartialTableTheme } from './types-CNiUxMEp.cjs';
5
+ export { f as Column, g as FunctionWithDeps, h as InternalColumn, S as Sort, i as SortDirection, e as TableStateStorage } from './types-CNiUxMEp.cjs';
6
6
  import { Store } from 'schummar-state/react';
7
7
  import { E as ExporterEntry } from './exporter-u6SatTo6.cjs';
8
8
  import '@emotion/react';
@@ -145,7 +145,10 @@ declare function SelectFilter<TItem, TColumnValue, TFilterBy>({ options: provide
145
145
  virtual?: VirtualListProps<unknown>['virtual'];
146
146
  } & CommonFilterProps<TItem, TColumnValue, TFilterBy, Set<TFilterBy>>): JSX.Element;
147
147
 
148
- declare const Table: React.ForwardRefExoticComponent<TableProps<unknown> & React.RefAttributes<TableRef>>;
148
+ declare const Table: <T>(props: TableProps<T> & {
149
+ ref?: ForwardedRef<TableRef>;
150
+ }) => ReturnType<typeof _Table>;
151
+ declare function _Table<T>(props: TableProps<T>, ref: ForwardedRef<TableRef>): JSX.Element;
149
152
 
150
153
  declare function TextFilter<TItem, TColumnValue>({ compare, filterBy, placeholder, ...props }: {
151
154
  /** Custom comparison function. Should return true if an item value matches the current filter value.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { ComponentType, ReactNode, HTMLProps } from 'react';
4
- import { T as TableTheme, C as CommonFilterProps, a as TableProps, b as TableRef, F as FilterImplementation, M as MemoizedTableTheme, I as Id, c as TableItem, d as InternalTableState, P as PartialTableTheme } from './types-CIq7O-SN.js';
5
- export { f as Column, g as FunctionWithDeps, h as InternalColumn, S as Sort, i as SortDirection, e as TableStateStorage } from './types-CIq7O-SN.js';
3
+ import { ComponentType, ReactNode, HTMLProps, ForwardedRef } from 'react';
4
+ import { T as TableTheme, C as CommonFilterProps, a as TableProps, b as TableRef, F as FilterImplementation, M as MemoizedTableTheme, I as Id, c as TableItem, d as InternalTableState, P as PartialTableTheme } from './types-BM1Cjg67.js';
5
+ export { f as Column, g as FunctionWithDeps, h as InternalColumn, S as Sort, i as SortDirection, e as TableStateStorage } from './types-BM1Cjg67.js';
6
6
  import { Store } from 'schummar-state/react';
7
7
  import { E as ExporterEntry } from './exporter-u6SatTo6.js';
8
8
  import '@emotion/react';
@@ -145,7 +145,10 @@ declare function SelectFilter<TItem, TColumnValue, TFilterBy>({ options: provide
145
145
  virtual?: VirtualListProps<unknown>['virtual'];
146
146
  } & CommonFilterProps<TItem, TColumnValue, TFilterBy, Set<TFilterBy>>): JSX.Element;
147
147
 
148
- declare const Table: React.ForwardRefExoticComponent<TableProps<unknown> & React.RefAttributes<TableRef>>;
148
+ declare const Table: <T>(props: TableProps<T> & {
149
+ ref?: ForwardedRef<TableRef>;
150
+ }) => ReturnType<typeof _Table>;
151
+ declare function _Table<T>(props: TableProps<T>, ref: ForwardedRef<TableRef>): JSX.Element;
149
152
 
150
153
  declare function TextFilter<TItem, TColumnValue>({ compare, filterBy, placeholder, ...props }: {
151
154
  /** Custom comparison function. Should return true if an item value matches the current filter value.
package/dist/index.js CHANGED
@@ -2942,7 +2942,7 @@ function calc(props, cache) {
2942
2942
  displaySize: Array.isArray(displaySize) ? displaySize : displaySize ? [displaySize] : void 0
2943
2943
  };
2944
2944
  };
2945
- const columns = inputColumns == null ? void 0 : inputColumns.map(mapColumn);
2945
+ const columns = inputColumns == null ? void 0 : inputColumns.filter((x) => !!x).map(mapColumn);
2946
2946
  const wrapRow = props.wrapRow && cache("wrapRow", props.wrapRow);
2947
2947
  const wrapCell = props.wrapCell && cache("wrapCell", props.wrapCell);
2948
2948
  const rowAction = props.rowAction instanceof Function || Array.isArray(props.rowAction) ? cache("rowAction", props.rowAction) : props.rowAction;