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.
- package/dist/index.cjs +59 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +40 -39
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.d.cts +1 -1
- package/dist/mui4Theme.d.ts +1 -1
- package/dist/mui5Theme.d.cts +1 -1
- package/dist/mui5Theme.d.ts +1 -1
- package/dist/{types-C_rX6bDQ.d.ts → types-C_rP1nwr.d.ts} +9 -4
- package/dist/{types-B8KLTUz2.d.cts → types-CkiMjwT9.d.cts} +9 -4
- package/package.json +1 -1
package/dist/mui4Theme.d.cts
CHANGED
|
@@ -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-
|
|
3
|
+
import { P as PartialTableTheme } from './types-CkiMjwT9.cjs';
|
|
4
4
|
import '@emotion/react';
|
|
5
5
|
import './exporter-u6SatTo6.cjs';
|
|
6
6
|
|
package/dist/mui4Theme.d.ts
CHANGED
|
@@ -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-
|
|
3
|
+
import { P as PartialTableTheme } from './types-C_rP1nwr.js';
|
|
4
4
|
import '@emotion/react';
|
|
5
5
|
import './exporter-u6SatTo6.js';
|
|
6
6
|
|
package/dist/mui5Theme.d.cts
CHANGED
|
@@ -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-
|
|
3
|
+
import { P as PartialTableTheme } from './types-CkiMjwT9.cjs';
|
|
4
4
|
import '@emotion/react';
|
|
5
5
|
import './exporter-u6SatTo6.cjs';
|
|
6
6
|
|
package/dist/mui5Theme.d.ts
CHANGED
|
@@ -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-
|
|
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
|
|
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?:
|
|
71
|
+
row?: CSSInterpolation | FunctionWithDeps<(item: TItem, index: number) => CSSInterpolation | CSSInterpolation[]>;
|
|
71
72
|
headerCell?: Interpolation<Theme>;
|
|
72
73
|
footerCell?: Interpolation<Theme>;
|
|
73
|
-
cell?:
|
|
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<(
|
|
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
|
|
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?:
|
|
71
|
+
row?: CSSInterpolation | FunctionWithDeps<(item: TItem, index: number) => CSSInterpolation | CSSInterpolation[]>;
|
|
71
72
|
headerCell?: Interpolation<Theme>;
|
|
72
73
|
footerCell?: Interpolation<Theme>;
|
|
73
|
-
cell?:
|
|
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<(
|
|
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. */
|