@weng-lab/ui-components 1.0.0 → 1.0.2

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 +1 @@
1
- {"version":3,"file":"GenomeSearch.d.ts","sourceRoot":"","sources":["../../../../src/components/GenomeSearch/GenomeSearch.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,iBAAiB,EAAU,MAAM,SAAS,CAAC;AAiXpD,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAM7C;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"GenomeSearch.d.ts","sourceRoot":"","sources":["../../../../src/components/GenomeSearch/GenomeSearch.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAU,MAAM,SAAS,CAAC;AAmUpD,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAM7C;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type TableFallbackProps = {
2
+ message: string;
3
+ variant: "error" | "empty";
4
+ };
5
+ declare const TableFallback: ({ message, variant }: TableFallbackProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default TableFallback;
7
+ //# sourceMappingURL=EmptyFallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyFallback.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/EmptyFallback.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,sBAAsB,kBAAkB,4CAO9D,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TableProps } from './types';
2
+ declare const Table: (props: TableProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Table;
4
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,QAAA,MAAM,KAAK,GAAI,OAAO,UAAU,4CAuG/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { default as Table } from './Table';
2
+ export { Table };
3
+ export type * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,CAAA;AAChB,mBAAmB,SAAS,CAAA"}
@@ -0,0 +1,68 @@
1
+ import { DataGridProProps } from '@mui/x-data-grid-pro';
2
+ import { ReactElement, ReactNode } from 'react';
3
+ export interface TableProps extends DataGridProProps {
4
+ /**
5
+ * Rows to be consumed in the table.
6
+ *
7
+ * ```undefined``` will be given default value of ```[]```
8
+ *
9
+ * Note: Rows without an 'id' property will be given id matching their index
10
+ */
11
+ rows: DataGridProProps["rows"];
12
+ /**
13
+ * @default true
14
+ * @note Overrides MUI default
15
+ */
16
+ disableRowSelectionOnClick?: DataGridProProps["disableRowSelectionOnClick"];
17
+ /**
18
+ * @default "compact"
19
+ * @note Overrides MUI default
20
+ */
21
+ density?: DataGridProProps["density"];
22
+ /**
23
+ * @default true
24
+ * @note Overrides MUI default
25
+ */
26
+ autosizeOnMount?: boolean;
27
+ /**
28
+ * @note Table assigns a default internal ID to each row if no ID is provided in the row data.
29
+ */
30
+ getRowId?: DataGridProProps["getRowId"];
31
+ /**
32
+ * Element to be rendered instead of `DataGridPro` when `rows` has a length of `0`.
33
+ * If a string is passed will use `TableFallback` component
34
+ */
35
+ emptyTableFallback?: string | ReactElement;
36
+ /**
37
+ * If true, the toolbar is displayed.
38
+ * @default true
39
+ */
40
+ showToolbar?: DataGridProProps["showToolbar"];
41
+ /**
42
+ * Configures the height properties of the wrapper `<div>`.
43
+ *
44
+ * By default it's wrapped with:
45
+ * ```jsx
46
+ * <div style={{ display: 'flex', flexDirection: 'column' }}>
47
+ * ```
48
+ *
49
+ * Additional height properties spread onto this `<div>`
50
+ */
51
+ divHeight?: {
52
+ height?: string;
53
+ minHeight?: string;
54
+ maxHeight?: string;
55
+ };
56
+ /**
57
+ * Used for failed fetches. If true will display error fallback
58
+ * @default false
59
+ */
60
+ error?: boolean;
61
+ }
62
+ export type TableToolbarProps = {
63
+ /**
64
+ * Optional ReactNode to be used in the table toolbar. Strings and numbers will be rendered as Typography variant h6.
65
+ */
66
+ title?: ReactNode;
67
+ };
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhD,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAClD;;;;;;OAMG;IACH,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B;;;OAGG;IACH,0BAA0B,CAAC,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;IAC5E;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACtC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC3C;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IAC7C;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE;QACV,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IACD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC"}
@@ -2,6 +2,8 @@ export { RangeSlider } from './components/RangeSlider';
2
2
  export type { SliderProps } from './components/RangeSlider';
3
3
  export { DataTable } from './components/DataTable';
4
4
  export type { DataTableProps, DataTableColumn } from './components/DataTable';
5
+ export { Table } from './components/Table';
6
+ export type * from './components/Table';
5
7
  export { GenomeSearch } from './components/GenomeSearch';
6
8
  export type { GenomeSearchProps, Result, Domain, ResultType } from './components/GenomeSearch';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,mBAAmB,oBAAoB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}