@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.41.1 → 0.5.0-beta.42.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/components/ui/data-table/data-table-filter.cjs +2 -0
- package/dist/components/ui/data-table/data-table-filter.cjs.map +1 -0
- package/dist/components/ui/data-table/data-table-filter.js +178 -0
- package/dist/components/ui/data-table/data-table-filter.js.map +1 -0
- package/dist/components/ui/data-table/data-table.cjs +1 -1
- package/dist/components/ui/data-table/data-table.cjs.map +1 -1
- package/dist/components/ui/data-table/data-table.js +244 -195
- package/dist/components/ui/data-table/data-table.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +425 -423
- package/dist/index.js.map +1 -1
- package/dist/index.tailwind.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1096,7 +1096,7 @@ export declare interface DataAppShellProps {
|
|
|
1096
1096
|
className?: string;
|
|
1097
1097
|
}
|
|
1098
1098
|
|
|
1099
|
-
export declare function DataTable<TData, TValue>({ columns, data, toolbar, enableSorting, enableColumnVisibility, children, columnOrder: controlledColumnOrder, onColumnOrderChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, columnLabels: controlledColumnLabels, onColumnLabelChange, enablePagination, defaultPageSize, pagination: controlledPagination, onPaginationChange, enableColumnReorder, density, className, variant, containerClassName, }: DataTableProps<TData, TValue>): JSX.Element;
|
|
1099
|
+
export declare function DataTable<TData, TValue>({ columns, data, toolbar, enableSorting, enableColumnVisibility, children, columnOrder: controlledColumnOrder, onColumnOrderChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, columnLabels: controlledColumnLabels, onColumnLabelChange, enablePagination, defaultPageSize, pagination: controlledPagination, onPaginationChange, enableColumnReorder, enableFiltering, filters: controlledFilters, onFiltersChange, filterConfig, manualFiltering, density, className, variant, containerClassName, }: DataTableProps<TData, TValue>): JSX.Element;
|
|
1100
1100
|
|
|
1101
1101
|
export declare function DataTableColumnToggle({ className }: DataTableColumnToggleProps): JSX.Element | null;
|
|
1102
1102
|
|
|
@@ -1104,6 +1104,16 @@ export declare interface DataTableColumnToggleProps {
|
|
|
1104
1104
|
className?: string;
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
1107
|
+
export declare function DataTableFilter({ className }: DataTableFilterProps): JSX.Element | null;
|
|
1108
|
+
|
|
1109
|
+
export declare namespace DataTableFilter {
|
|
1110
|
+
var displayName: string;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
export declare interface DataTableFilterProps {
|
|
1114
|
+
className?: string;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1107
1117
|
export declare function DataTablePagination({ pageSizeOptions, className, }: DataTablePaginationProps): JSX.Element | null;
|
|
1108
1118
|
|
|
1109
1119
|
export declare interface DataTablePaginationProps {
|
|
@@ -1129,6 +1139,12 @@ export declare interface DataTableProps<TData, TValue> {
|
|
|
1129
1139
|
pagination?: PaginationState;
|
|
1130
1140
|
onPaginationChange?: (pagination: PaginationState) => void;
|
|
1131
1141
|
enableColumnReorder?: boolean;
|
|
1142
|
+
enableFiltering?: boolean;
|
|
1143
|
+
filters?: FilterCondition[];
|
|
1144
|
+
onFiltersChange?: (filters: FilterCondition[]) => void;
|
|
1145
|
+
filterConfig?: FilterColumnConfig[];
|
|
1146
|
+
/** When true, filtering is handled externally — onFiltersChange fires but rows are not filtered client-side. */
|
|
1147
|
+
manualFiltering?: boolean;
|
|
1132
1148
|
density?: "compact" | "default" | "relaxed";
|
|
1133
1149
|
children?: React_2.ReactNode;
|
|
1134
1150
|
className?: string;
|
|
@@ -1281,6 +1297,22 @@ declare const fieldVariants: (props?: ({
|
|
|
1281
1297
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
1282
1298
|
} & ClassProp) | undefined) => string;
|
|
1283
1299
|
|
|
1300
|
+
export declare interface FilterColumnConfig {
|
|
1301
|
+
columnId: string;
|
|
1302
|
+
label?: string;
|
|
1303
|
+
operators?: FilterOperator[];
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
export declare interface FilterCondition {
|
|
1307
|
+
/** Stable unique key for React reconciliation. */
|
|
1308
|
+
id: string;
|
|
1309
|
+
columnId: string;
|
|
1310
|
+
operator: FilterOperator;
|
|
1311
|
+
value: string;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
export declare type FilterOperator = "contains" | "equals" | "not_equals" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
|
|
1315
|
+
|
|
1284
1316
|
export declare const getAttachmentLabel: (data: AttachmentData) => string;
|
|
1285
1317
|
|
|
1286
1318
|
export declare const getMediaCategory: (data: AttachmentData) => AttachmentMediaCategory;
|
|
@@ -2740,6 +2772,10 @@ declare interface TableContextValue<TData> {
|
|
|
2740
2772
|
table: Table_2<TData>;
|
|
2741
2773
|
columnLabels: Record<string, string>;
|
|
2742
2774
|
setColumnLabel: (columnId: string, label: string) => void;
|
|
2775
|
+
filters: FilterCondition[];
|
|
2776
|
+
setFilters: (filters: FilterCondition[]) => void;
|
|
2777
|
+
filterConfig: FilterColumnConfig[];
|
|
2778
|
+
enableFiltering: boolean;
|
|
2743
2779
|
}
|
|
2744
2780
|
|
|
2745
2781
|
export declare function TableFooter({ className, ...props }: React_2.ComponentProps<"tfoot">): JSX.Element;
|