schummar-table 0.43.0 → 0.43.1

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.
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { P as PartialTableTheme } from './types-B8KLTUz2.cjs';
3
+ import { P as PartialTableTheme } from './types-CkiMjwT9.cjs';
4
4
  import '@emotion/react';
5
5
  import './exporter-u6SatTo6.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { P as PartialTableTheme } from './types-C_rX6bDQ.js';
3
+ import { P as PartialTableTheme } from './types-C_rP1nwr.js';
4
4
  import '@emotion/react';
5
5
  import './exporter-u6SatTo6.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { P as PartialTableTheme } from './types-B8KLTUz2.cjs';
3
+ import { P as PartialTableTheme } from './types-CkiMjwT9.cjs';
4
4
  import '@emotion/react';
5
5
  import './exporter-u6SatTo6.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { P as PartialTableTheme } from './types-C_rX6bDQ.js';
3
+ import { P as PartialTableTheme } from './types-C_rP1nwr.js';
4
4
  import '@emotion/react';
5
5
  import './exporter-u6SatTo6.js';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { Interpolation, Theme } from '@emotion/react';
2
- import React__default, { DependencyList, ReactNode, ComponentType, Ref, CSSProperties } from 'react';
2
+ import React__default, { DependencyList, CSSProperties, ReactNode, ComponentType, Ref } from 'react';
3
3
  import { a as ExportOptions } from './exporter-u6SatTo6.js';
4
4
 
5
5
  type TableStateStorage = {
@@ -26,6 +26,7 @@ type FunctionWithDeps<F extends (...args: any[]) => any> = F | [function: F, ...
26
26
  type MemoizedFunctions<T> = {
27
27
  [K in keyof T]: Exclude<T[K], [function: (...args: any[]) => any, ...deps: DependencyList]>;
28
28
  };
29
+ type CSSInterpolation = Exclude<Interpolation<Theme>, ((...args: any[]) => any) | Array<any>>;
29
30
  interface TableTheme<TItem = unknown> {
30
31
  /** Define display texts. */
31
32
  text: {
@@ -67,10 +68,10 @@ interface TableTheme<TItem = unknown> {
67
68
  };
68
69
  styles?: {
69
70
  table?: Interpolation<Theme>;
70
- row?: Exclude<Interpolation<Theme>, ((...args: any[]) => any) | Array<any>> | FunctionWithDeps<(item: TItem, index: number) => Interpolation<Theme>>;
71
+ row?: CSSInterpolation | FunctionWithDeps<(item: TItem, index: number) => CSSInterpolation | CSSInterpolation[]>;
71
72
  headerCell?: Interpolation<Theme>;
72
73
  footerCell?: Interpolation<Theme>;
73
- cell?: Exclude<Interpolation<Theme>, ((...args: any[]) => any) | Array<any>> | FunctionWithDeps<(item: TItem, index: number) => Interpolation<Theme>>;
74
+ cell?: CSSInterpolation | FunctionWithDeps<(item: TItem, index: number) => Interpolation<Theme>>;
74
75
  evenCell?: Interpolation<Theme>;
75
76
  oddCell?: Interpolation<Theme>;
76
77
  columnDivider?: Interpolation<Theme>;
@@ -184,7 +185,11 @@ interface TableProps<TItem> extends PartialTableTheme<TItem> {
184
185
  /** Set props for multiple columns at once. Will take effect if not overriden in column definition. */
185
186
  columnProps?: FunctionWithDeps<(id: Id) => Partial<Omit<Column<TItem, unknown>, 'id'>>>;
186
187
  /** Wrap each row */
187
- wrapRow?: FunctionWithDeps<(content: ReactNode, item: TItem, index: number) => ReactNode>;
188
+ wrapRow?: FunctionWithDeps<(props: {
189
+ className?: string;
190
+ style?: CSSProperties;
191
+ children?: ReactNode;
192
+ }, item: TItem, index: number) => ReactNode>;
188
193
  /** Wrap each cell */
189
194
  wrapCell?: FunctionWithDeps<(content: ReactNode, value: unknown, item: TItem, index: number) => ReactNode>;
190
195
  /** Display a cell at the start of each row. Useful for "go to details" button for example. */
@@ -1,5 +1,5 @@
1
1
  import { Interpolation, Theme } from '@emotion/react';
2
- import React__default, { DependencyList, ReactNode, ComponentType, Ref, CSSProperties } from 'react';
2
+ import React__default, { DependencyList, CSSProperties, ReactNode, ComponentType, Ref } from 'react';
3
3
  import { a as ExportOptions } from './exporter-u6SatTo6.cjs';
4
4
 
5
5
  type TableStateStorage = {
@@ -26,6 +26,7 @@ type FunctionWithDeps<F extends (...args: any[]) => any> = F | [function: F, ...
26
26
  type MemoizedFunctions<T> = {
27
27
  [K in keyof T]: Exclude<T[K], [function: (...args: any[]) => any, ...deps: DependencyList]>;
28
28
  };
29
+ type CSSInterpolation = Exclude<Interpolation<Theme>, ((...args: any[]) => any) | Array<any>>;
29
30
  interface TableTheme<TItem = unknown> {
30
31
  /** Define display texts. */
31
32
  text: {
@@ -67,10 +68,10 @@ interface TableTheme<TItem = unknown> {
67
68
  };
68
69
  styles?: {
69
70
  table?: Interpolation<Theme>;
70
- row?: Exclude<Interpolation<Theme>, ((...args: any[]) => any) | Array<any>> | FunctionWithDeps<(item: TItem, index: number) => Interpolation<Theme>>;
71
+ row?: CSSInterpolation | FunctionWithDeps<(item: TItem, index: number) => CSSInterpolation | CSSInterpolation[]>;
71
72
  headerCell?: Interpolation<Theme>;
72
73
  footerCell?: Interpolation<Theme>;
73
- cell?: Exclude<Interpolation<Theme>, ((...args: any[]) => any) | Array<any>> | FunctionWithDeps<(item: TItem, index: number) => Interpolation<Theme>>;
74
+ cell?: CSSInterpolation | FunctionWithDeps<(item: TItem, index: number) => Interpolation<Theme>>;
74
75
  evenCell?: Interpolation<Theme>;
75
76
  oddCell?: Interpolation<Theme>;
76
77
  columnDivider?: Interpolation<Theme>;
@@ -184,7 +185,11 @@ interface TableProps<TItem> extends PartialTableTheme<TItem> {
184
185
  /** Set props for multiple columns at once. Will take effect if not overriden in column definition. */
185
186
  columnProps?: FunctionWithDeps<(id: Id) => Partial<Omit<Column<TItem, unknown>, 'id'>>>;
186
187
  /** Wrap each row */
187
- wrapRow?: FunctionWithDeps<(content: ReactNode, item: TItem, index: number) => ReactNode>;
188
+ wrapRow?: FunctionWithDeps<(props: {
189
+ className?: string;
190
+ style?: CSSProperties;
191
+ children?: ReactNode;
192
+ }, item: TItem, index: number) => ReactNode>;
188
193
  /** Wrap each cell */
189
194
  wrapCell?: FunctionWithDeps<(content: ReactNode, value: unknown, item: TItem, index: number) => ReactNode>;
190
195
  /** Display a cell at the start of each row. Useful for "go to details" button for example. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schummar-table",
3
- "version": "0.43.0",
3
+ "version": "0.43.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "repository": "schummar/schummar-table",