@stereopt/data-table 0.1.14 → 0.2.0
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 +2740 -184
- package/dist/index.d.cts +11 -10
- package/dist/index.d.ts +11 -10
- package/dist/index.js +2743 -184
- package/package.json +13 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ColumnDef } from '@tanstack/react-table';
|
|
3
3
|
|
|
4
|
-
type Filter<TData> = {
|
|
5
|
-
column: keyof TData;
|
|
6
|
-
type: "select" | "date";
|
|
7
|
-
};
|
|
8
|
-
|
|
9
4
|
type Search<TData> = {
|
|
10
5
|
filterFields: (keyof TData)[];
|
|
11
6
|
placeholder: string;
|
|
12
7
|
};
|
|
8
|
+
type Filter<TData> = {
|
|
9
|
+
column: keyof TData;
|
|
10
|
+
type: "select" | "date";
|
|
11
|
+
};
|
|
13
12
|
type Filters<TData> = Filter<TData>[];
|
|
14
13
|
type ColumnVisibility<TData> = {
|
|
15
14
|
[K in keyof TData]?: boolean;
|
|
16
15
|
} & Record<string, boolean>;
|
|
16
|
+
type DataTableConfig<TData> = {
|
|
17
|
+
search?: Search<TData>;
|
|
18
|
+
filters?: Filters<TData>;
|
|
19
|
+
columnVisibility?: ColumnVisibility<TData>;
|
|
20
|
+
};
|
|
21
|
+
|
|
17
22
|
interface DataTableProps<TData, TValue> {
|
|
18
23
|
columns: ColumnDef<TData, TValue>[];
|
|
19
24
|
data: TData[];
|
|
20
|
-
config?:
|
|
21
|
-
search?: Search<TData>;
|
|
22
|
-
filters?: Filters<TData>;
|
|
23
|
-
columnVisibility?: ColumnVisibility<TData>;
|
|
24
|
-
};
|
|
25
|
+
config?: DataTableConfig<TData>;
|
|
25
26
|
}
|
|
26
27
|
declare function DataTable<TData, TValue>({ columns, data, config, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
27
28
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ColumnDef } from '@tanstack/react-table';
|
|
3
3
|
|
|
4
|
-
type Filter<TData> = {
|
|
5
|
-
column: keyof TData;
|
|
6
|
-
type: "select" | "date";
|
|
7
|
-
};
|
|
8
|
-
|
|
9
4
|
type Search<TData> = {
|
|
10
5
|
filterFields: (keyof TData)[];
|
|
11
6
|
placeholder: string;
|
|
12
7
|
};
|
|
8
|
+
type Filter<TData> = {
|
|
9
|
+
column: keyof TData;
|
|
10
|
+
type: "select" | "date";
|
|
11
|
+
};
|
|
13
12
|
type Filters<TData> = Filter<TData>[];
|
|
14
13
|
type ColumnVisibility<TData> = {
|
|
15
14
|
[K in keyof TData]?: boolean;
|
|
16
15
|
} & Record<string, boolean>;
|
|
16
|
+
type DataTableConfig<TData> = {
|
|
17
|
+
search?: Search<TData>;
|
|
18
|
+
filters?: Filters<TData>;
|
|
19
|
+
columnVisibility?: ColumnVisibility<TData>;
|
|
20
|
+
};
|
|
21
|
+
|
|
17
22
|
interface DataTableProps<TData, TValue> {
|
|
18
23
|
columns: ColumnDef<TData, TValue>[];
|
|
19
24
|
data: TData[];
|
|
20
|
-
config?:
|
|
21
|
-
search?: Search<TData>;
|
|
22
|
-
filters?: Filters<TData>;
|
|
23
|
-
columnVisibility?: ColumnVisibility<TData>;
|
|
24
|
-
};
|
|
25
|
+
config?: DataTableConfig<TData>;
|
|
25
26
|
}
|
|
26
27
|
declare function DataTable<TData, TValue>({ columns, data, config, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
27
28
|
|