@wandelbots/wandelbots-js-react-components 2.32.0-pr.feature-robot-precondition-list.372.5bce944 → 2.32.0-pr.feature-robot-precondition-list.372.8bd8d01

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.
@@ -0,0 +1,61 @@
1
+ import { type DataGridProps, type GridColDef, type GridRowParams } from "@mui/x-data-grid";
2
+ export interface WandelbotsDataGridProps<T = Record<string, unknown>> {
3
+ /**
4
+ * Array of data items to display in the grid
5
+ */
6
+ data: T[];
7
+ /**
8
+ * Column definitions for the DataGrid
9
+ */
10
+ columns: GridColDef[];
11
+ /**
12
+ * Function to transform data items into DataGrid rows
13
+ * Should return an object with an 'id' field and other fields matching column definitions
14
+ */
15
+ getRowData: (item: T) => Record<string, unknown> & {
16
+ id: string | number;
17
+ };
18
+ /**
19
+ * Callback when a row is clicked
20
+ */
21
+ onRowClick?: (item: T, params: GridRowParams) => void;
22
+ /**
23
+ * Currently selected item (for highlighting)
24
+ */
25
+ selectedItem?: T | null;
26
+ /**
27
+ * Function to get the ID of an item (used for selection highlighting)
28
+ */
29
+ getItemId?: (item: T) => string | number;
30
+ /**
31
+ * Title displayed in the toolbar
32
+ */
33
+ title?: string;
34
+ /**
35
+ * Show item count in title
36
+ * @default true
37
+ */
38
+ showCount?: boolean;
39
+ /**
40
+ * Placeholder text for the search input
41
+ * @default "Search"
42
+ */
43
+ searchPlaceholder?: string;
44
+ /**
45
+ * Additional DataGrid props to pass through
46
+ */
47
+ dataGridProps?: Partial<DataGridProps>;
48
+ /**
49
+ * Custom toolbar component to replace the default one
50
+ */
51
+ CustomToolbar?: React.ComponentType;
52
+ /**
53
+ * Select the first item by default
54
+ * @default false
55
+ */
56
+ selectFirstByDefault?: boolean;
57
+ }
58
+ export declare const WandelbotsDataGrid: (<T>({ data, columns, getRowData, onRowClick, selectedItem, getItemId, title, showCount, searchPlaceholder, dataGridProps, CustomToolbar, selectFirstByDefault, }: WandelbotsDataGridProps<T>) => import("react/jsx-runtime").JSX.Element) & {
59
+ displayName: string;
60
+ };
61
+ //# sourceMappingURL=DataGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../src/components/DataGrid.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,UAAU,EACf,KAAK,aAAa,EAOnB,MAAM,kBAAkB,CAAA;AAKzB,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,CAAC,EAAE,CAAA;IAET;;OAEG;IACH,OAAO,EAAE,UAAU,EAAE,CAAA;IAErB;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAE1E;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;IAErD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,CAAA;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAEtC;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAEnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,eAAO,MAAM,kBAAkB,IAE1B,CAAC,gKAaC,uBAAuB,CAAC,CAAC,CAAC;;CA6VhC,CAAA"}