react-science 21.1.0 → 22.0.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/lib/components/info-panel/InfoPanel.js +2 -2
- package/lib/components/info-panel/InfoPanel.js.map +1 -1
- package/lib/components/logger/FifoLoggerDialog.d.ts.map +1 -1
- package/lib/components/logger/FifoLoggerDialog.js +2 -2
- package/lib/components/logger/FifoLoggerDialog.js.map +1 -1
- package/lib/components/table/default_table_cell.d.ts +2 -1
- package/lib/components/table/default_table_cell.d.ts.map +1 -1
- package/lib/components/table/default_table_cell.js.map +1 -1
- package/lib/components/table/index.d.ts +2 -2
- package/lib/components/table/index.d.ts.map +1 -1
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/table/preview_table.d.ts +2 -1
- package/lib/components/table/preview_table.d.ts.map +1 -1
- package/lib/components/table/preview_table.js.map +1 -1
- package/lib/components/table/preview_table_context.d.ts +2 -2
- package/lib/components/table/reorder_rows/draggable_row_tr.d.ts +2 -1
- package/lib/components/table/reorder_rows/draggable_row_tr.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/draggable_row_tr.js.map +1 -1
- package/lib/components/table/reorder_rows/item_data.d.ts +3 -2
- package/lib/components/table/reorder_rows/item_data.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/item_data.js.map +1 -1
- package/lib/components/table/reorder_rows/item_order_context.d.ts +6 -5
- package/lib/components/table/reorder_rows/item_order_context.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/item_order_context.js.map +1 -1
- package/lib/components/table/reorder_rows/item_order_provider.d.ts +6 -5
- package/lib/components/table/reorder_rows/item_order_provider.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/item_order_provider.js +1 -4
- package/lib/components/table/reorder_rows/item_order_provider.js.map +1 -1
- package/lib/components/table/table_body.d.ts +2 -1
- package/lib/components/table/table_body.d.ts.map +1 -1
- package/lib/components/table/table_body.js +1 -2
- package/lib/components/table/table_body.js.map +1 -1
- package/lib/components/table/table_features.d.ts +15 -0
- package/lib/components/table/table_features.d.ts.map +1 -0
- package/lib/components/table/table_features.js +15 -0
- package/lib/components/table/table_features.js.map +1 -0
- package/lib/components/table/table_header.d.ts +2 -1
- package/lib/components/table/table_header.d.ts.map +1 -1
- package/lib/components/table/table_header.js.map +1 -1
- package/lib/components/table/table_header_cell.d.ts +3 -2
- package/lib/components/table/table_header_cell.d.ts.map +1 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/table/table_header_cell.js.map +1 -1
- package/lib/components/table/table_root.d.ts +3 -2
- package/lib/components/table/table_root.d.ts.map +1 -1
- package/lib/components/table/table_root.js +4 -4
- package/lib/components/table/table_root.js.map +1 -1
- package/lib/components/table/table_row.d.ts +5 -4
- package/lib/components/table/table_row.d.ts.map +1 -1
- package/lib/components/table/table_row.js.map +1 -1
- package/lib/components/table/table_row_cell.d.ts +2 -1
- package/lib/components/table/table_row_cell.d.ts.map +1 -1
- package/lib/components/table/table_row_cell.js.map +1 -1
- package/lib/components/table/table_scroll_container.d.ts +6 -5
- package/lib/components/table/table_scroll_container.d.ts.map +1 -1
- package/lib/components/table/table_scroll_container.js.map +1 -1
- package/lib/components/table/table_utils.d.ts +18 -5
- package/lib/components/table/table_utils.d.ts.map +1 -1
- package/lib/components/table/table_utils.js.map +1 -1
- package/lib/components/table/use_table_columns.d.ts +2 -2
- package/lib/components/table/use_table_columns.d.ts.map +1 -1
- package/lib/components/table/use_table_columns.js.map +1 -1
- package/lib/components/table/use_table_scroll.d.ts +2 -1
- package/lib/components/table/use_table_scroll.d.ts.map +1 -1
- package/lib/components/table/use_table_scroll.js.map +1 -1
- package/package.json +17 -17
- package/src/components/info-panel/InfoPanel.tsx +2 -2
- package/src/components/logger/FifoLoggerDialog.tsx +29 -28
- package/src/components/table/default_table_cell.tsx +3 -1
- package/src/components/table/index.ts +12 -3
- package/src/components/table/preview_table.tsx +2 -1
- package/src/components/table/preview_table_context.ts +1 -1
- package/src/components/table/reorder_rows/draggable_row_tr.tsx +2 -1
- package/src/components/table/reorder_rows/item_data.ts +5 -3
- package/src/components/table/reorder_rows/item_order_context.ts +2 -3
- package/src/components/table/reorder_rows/item_order_provider.tsx +13 -11
- package/src/components/table/table_body.tsx +16 -20
- package/src/components/table/table_features.ts +28 -0
- package/src/components/table/table_header.tsx +2 -1
- package/src/components/table/table_header_cell.tsx +9 -9
- package/src/components/table/table_root.tsx +15 -26
- package/src/components/table/table_row.tsx +7 -4
- package/src/components/table/table_row_cell.tsx +2 -1
- package/src/components/table/table_scroll_container.tsx +8 -5
- package/src/components/table/table_utils.ts +7 -4
- package/src/components/table/use_table_columns.ts +4 -4
- package/src/components/table/use_table_scroll.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_root.js","sourceRoot":"","sources":["../../../src/components/table/table_root.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,MAAM,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"table_root.js","sourceRoot":"","sources":["../../../src/components/table/table_root.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAOzD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAA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,IACV,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,YAAY,EACrB,gBAAgB,EAAE,gBAAgB,GAClC,CACH,EACD,KAAC,SAAS,IACR,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,mBAAmB,EAChC,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,MAAM,GACrC,IACc,GACF,GACA,GACa,GAChB,CACtB,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CACpB,KAAwB,EACxB,OAAiE;IAEjE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC9C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,iBAAiB,EAAE,CAAC;YACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CACV,4IAA4I,CAC7I,CAAC;YACJ,CAAC;YACD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;gBACzD,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CACV,+JAA+J,CAChK,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Row } from '@tanstack/react-table';
|
|
1
|
+
import type { Row, RowData } from '@tanstack/react-table';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import type { ReactScienceTableFeatures } from './table_features.js';
|
|
4
|
+
export interface TableRowTrProps<RowType extends RowData> {
|
|
5
|
+
row: Row<ReactScienceTableFeatures, RowType>;
|
|
5
6
|
trProps: JSX.IntrinsicElements['tr'];
|
|
6
7
|
}
|
|
7
|
-
export declare function TableRowTr<RowType>(props: TableRowTrProps<RowType>): JSX.Element;
|
|
8
|
+
export declare function TableRowTr<RowType extends RowData>(props: TableRowTrProps<RowType>): JSX.Element;
|
|
8
9
|
//# sourceMappingURL=table_row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_row.d.ts","sourceRoot":"","sources":["../../../src/components/table/table_row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"table_row.d.ts","sourceRoot":"","sources":["../../../src/components/table/table_row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,MAAM,WAAW,eAAe,CAAC,OAAO,SAAS,OAAO;IACtD,GAAG,EAAE,GAAG,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC7C,OAAO,EAAE,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;CACtC;AAED,wBAAgB,UAAU,CAAC,OAAO,SAAS,OAAO,EAChD,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,eAMhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_row.js","sourceRoot":"","sources":["../../../src/components/table/table_row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"table_row.js","sourceRoot":"","sources":["../../../src/components/table/table_row.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAQxE,MAAM,UAAU,UAAU,CACxB,KAA+B;IAE/B,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,WAAW,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;IACtD,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IACvC,OAAO,aAAI,GAAG,EAAE,WAAW,KAAM,OAAO,GAAI,CAAC;AAC/C,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Cell, RowData } from '@tanstack/react-table';
|
|
2
2
|
import type { CSSProperties } from 'react';
|
|
3
|
+
import type { ReactScienceTableFeatures } from './table_features.js';
|
|
3
4
|
import type { GetTdProps } from './table_utils.js';
|
|
4
5
|
interface TableRowCellProps<TData extends RowData> {
|
|
5
|
-
cell: Cell<TData, unknown>;
|
|
6
|
+
cell: Cell<ReactScienceTableFeatures, TData, unknown>;
|
|
6
7
|
tdStyle: CSSProperties | undefined;
|
|
7
8
|
getTdProps: GetTdProps<TData> | undefined;
|
|
8
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_row_cell.d.ts","sourceRoot":"","sources":["../../../src/components/table/table_row_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,UAAU,iBAAiB,CAAC,KAAK,SAAS,OAAO;IAC/C,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"table_row_cell.d.ts","sourceRoot":"","sources":["../../../src/components/table/table_row_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,UAAU,iBAAiB,CAAC,KAAK,SAAS,OAAO;IAC/C,IAAI,EAAE,IAAI,CAAC,yBAAyB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACtD,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,YAAY,CAAC,KAAK,SAAS,OAAO,EAChD,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,+BAahC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_row_cell.js","sourceRoot":"","sources":["../../../src/components/table/table_row_cell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"table_row_cell.js","sourceRoot":"","sources":["../../../src/components/table/table_row_cell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAYnD,MAAM,UAAU,YAAY,CAC1B,KAA+B;IAE/B,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE5C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC;IACxD,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,CAAC;IAEhE,OAAO,CACL,gBAAQ,OAAO,EAAE,KAAK,EAAE,KAAK,YAC1B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GACvD,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { RowData, Table as TanstackTable } from '@tanstack/react-table';
|
|
1
2
|
import type { Virtualizer } from '@tanstack/react-virtual';
|
|
2
|
-
import type { Table as TanstackTable } from '@tanstack/table-core';
|
|
3
3
|
import type { ReactNode, RefObject } from 'react';
|
|
4
|
+
import type { ReactScienceTableFeatures } from './table_features.js';
|
|
4
5
|
import type { TableProps } from './table_root.js';
|
|
5
|
-
interface ScrollContainerProps {
|
|
6
|
+
interface ScrollContainerProps<TData extends RowData> {
|
|
6
7
|
/**
|
|
7
8
|
* Whether the table rows are virtualized.
|
|
8
9
|
*/
|
|
@@ -14,7 +15,7 @@ interface ScrollContainerProps {
|
|
|
14
15
|
/**
|
|
15
16
|
* The tanstack table.
|
|
16
17
|
*/
|
|
17
|
-
table: TanstackTable<
|
|
18
|
+
table: TanstackTable<ReactScienceTableFeatures, TData>;
|
|
18
19
|
/**
|
|
19
20
|
* A ref to the effective scroll container.
|
|
20
21
|
*/
|
|
@@ -24,10 +25,10 @@ interface ScrollContainerProps {
|
|
|
24
25
|
* It is set by the ScrollContainer component if the table is virtualized.
|
|
25
26
|
* It is an external ref when the table is not virtualized.
|
|
26
27
|
*/
|
|
27
|
-
scrollToRowRef?: TableProps<
|
|
28
|
+
scrollToRowRef?: TableProps<TData>['scrollToRowRef'];
|
|
28
29
|
isReorderingEnabled: boolean;
|
|
29
30
|
children: ReactNode;
|
|
30
31
|
}
|
|
31
|
-
export declare function ScrollContainer(props: ScrollContainerProps): import("react").JSX.Element;
|
|
32
|
+
export declare function ScrollContainer<TData extends RowData>(props: ScrollContainerProps<TData>): import("react").JSX.Element;
|
|
32
33
|
export {};
|
|
33
34
|
//# sourceMappingURL=table_scroll_container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_scroll_container.d.ts","sourceRoot":"","sources":["../../../src/components/table/table_scroll_container.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"table_scroll_container.d.ts","sourceRoot":"","sources":["../../../src/components/table/table_scroll_container.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQlD,UAAU,oBAAoB,CAAC,KAAK,SAAS,OAAO;IAClD;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAClD;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IACvD;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACrC;;;;OAIG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACrD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,KAAK,SAAS,OAAO,EACnD,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,+BAiCnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_scroll_container.js","sourceRoot":"","sources":["../../../src/components/table/table_scroll_container.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"table_scroll_container.js","sourceRoot":"","sources":["../../../src/components/table/table_scroll_container.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAG9B,CAAC;AA6BF,MAAM,UAAU,eAAe,CAC7B,KAAkC;IAElC,MAAM,EACJ,cAAc,EACd,KAAK,EACL,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,cAAc,CAAC;QACb,cAAc;QACd,KAAK;QACL,WAAW;QACX,SAAS;QACT,cAAc;KACf,CAAC,CAAC;IACH,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,CACL,KAAC,gBAAgB,IACf,gBAAgB,EAAE,SAAS,EAC3B,mBAAmB,EAAE,mBAAmB,YAEvC,QAAQ,GACQ,CACpB,CAAC;IACJ,CAAC;IACD,OAAO,CACL,KAAC,WAAW,IAAC,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,YACnE,QAAQ,GACG,CACf,CAAC;AACJ,CAAC;AAQD,SAAS,gBAAgB,CAAC,KAAmC;IAC3D,MAAM,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAClE,cAAc,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,CAAC;IAEtD,OAAO,CACL,KAAC,YAAY,IAAC,GAAG,EAAE,gBAA6C,YAC7D,QAAQ,GACI,CAChB,CAAC;AACJ,CAAC;AAQD,SAAS,WAAW,CAAC,KAAuB;IAC1C,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACtD,cAAc,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC1C,OAAO,4BAAG,QAAQ,GAAI,CAAC;AACzB,CAAC"}
|
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
import type { Cell, ColumnDef, Row, RowData } from '@tanstack/react-table';
|
|
2
2
|
import type { ScrollToOptions } from '@tanstack/react-virtual';
|
|
3
3
|
import type { CSSProperties, ReactNode, TdHTMLAttributes } from 'react';
|
|
4
|
-
|
|
4
|
+
import type { ReactScienceTableFeatures } from './table_features.js';
|
|
5
|
+
export type TableColumnDef<TData extends RowData, TValue = unknown> = ColumnDef<ReactScienceTableFeatures, TData, TValue>;
|
|
5
6
|
type TableTdProps = TdHTMLAttributes<HTMLTableCellElement>;
|
|
6
|
-
export type GetTdProps<TData extends RowData> = (cell: Cell<TData, unknown>) => TableTdProps;
|
|
7
|
-
export declare function createTableColumnHelper<TData extends RowData>(): import("@tanstack/react-table").ColumnHelper<
|
|
7
|
+
export type GetTdProps<TData extends RowData> = (cell: Cell<ReactScienceTableFeatures, TData, unknown>) => TableTdProps;
|
|
8
|
+
export declare function createTableColumnHelper<TData extends RowData>(): import("@tanstack/react-table").ColumnHelper<{
|
|
9
|
+
columnVisibilityFeature: import("@tanstack/react-table").TableFeature;
|
|
10
|
+
rowSortingFeature: import("@tanstack/react-table").TableFeature;
|
|
11
|
+
sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
|
|
12
|
+
sortFns: {
|
|
13
|
+
alphanumeric: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
14
|
+
alphanumericCaseSensitive: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
15
|
+
basic: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
16
|
+
datetime: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
17
|
+
text: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
18
|
+
textCaseSensitive: import("@tanstack/react-table").CreatedSortFn<any, any>;
|
|
19
|
+
};
|
|
20
|
+
}, TData>;
|
|
8
21
|
export interface TableRowTrRenderProps {
|
|
9
22
|
className: string;
|
|
10
23
|
style: CSSProperties;
|
|
11
24
|
children: ReactNode;
|
|
12
25
|
'data-row-id': string;
|
|
13
26
|
}
|
|
14
|
-
export type TableRowTrRenderer<TData extends RowData> = (trProps: TableRowTrRenderProps, row: Row<TData>) => ReactNode;
|
|
27
|
+
export type TableRowTrRenderer<TData extends RowData> = (trProps: TableRowTrRenderProps, row: Row<ReactScienceTableFeatures, TData>) => ReactNode;
|
|
15
28
|
export type TableRowPreviewRenderer<TData extends RowData> = (
|
|
16
29
|
/**
|
|
17
30
|
* The row being dragged, for which to render a preview.
|
|
18
31
|
*/
|
|
19
|
-
row: Row<TData>) => ReactNode;
|
|
32
|
+
row: Row<ReactScienceTableFeatures, TData>) => ReactNode;
|
|
20
33
|
interface FlashRowOptions {
|
|
21
34
|
/**
|
|
22
35
|
* Whether to flash the row when scrolling into view.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_utils.d.ts","sourceRoot":"","sources":["../../../src/components/table/table_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAExE,MAAM,MAAM,cAAc,CAAC,KAAK,SA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AO,IAAI,CACtD,OAAO,EAAE,qBAAqB,EAC9B,GAAG,EAAE,GAAG,CAAC,yBAAyB,EAAE,KAAK,CAAC,KACvC,SAAS,CAAC;AAEf,MAAM,MAAM,uBAAuB,CAAC,KAAK,SAAS,OAAO,IAAI;AAC3D;;GAEG;AACH,GAAG,EAAE,GAAG,CAAC,yBAAyB,EAAE,KAAK,CAAC,KACvC,SAAS,CAAC;AAEf,UAAU,eAAe;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,GAC5D,eAAe,CAAC;AAClB,MAAM,MAAM,iCAAiC,GAAG,eAAe,GAC7D,eAAe,CAAC;AAElB,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,CACd,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,iCAAiC,KACxC,IAAI,CAAC;CACX;AAED,MAAM,WAAW,QAAQ;IACvB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,KAAK,IAAI,CAAC;CAC5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_utils.js","sourceRoot":"","sources":["../../../src/components/table/table_utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"table_utils.js","sourceRoot":"","sources":["../../../src/components/table/table_utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAkB3D,MAAM,UAAU,uBAAuB;IACrC,OAAO,kBAAkB,EAAoC,CAAC;AAChE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RowData } from '@tanstack/react-table';
|
|
2
2
|
import type { TableColumnDef } from './table_utils.js';
|
|
3
|
-
export declare function useTableColumns<TData extends RowData>(columnDefs: Array<TableColumnDef<TData>>):
|
|
3
|
+
export declare function useTableColumns<TData extends RowData, TValue>(columnDefs: Array<TableColumnDef<TData, TValue>>): TableColumnDef<TData, TValue>[];
|
|
4
4
|
//# sourceMappingURL=use_table_columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_table_columns.d.ts","sourceRoot":"","sources":["../../../src/components/table/use_table_columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"use_table_columns.d.ts","sourceRoot":"","sources":["../../../src/components/table/use_table_columns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,wBAAgB,eAAe,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM,EAC3D,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,mCAWjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_table_columns.js","sourceRoot":"","sources":["../../../src/components/table/use_table_columns.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,MAAM,UAAU,eAAe,CAC7B,
|
|
1
|
+
{"version":3,"file":"use_table_columns.js","sourceRoot":"","sources":["../../../src/components/table/use_table_columns.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,MAAM,UAAU,eAAe,CAC7B,UAAgD;IAEhD,OAAO,OAAO,CAAuC,GAAG,EAAE;QACxD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;YAClC,OAAO;gBACL,GAAG,SAAS;gBACZ,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,gBAAgB;gBACxC,aAAa,EAAE,SAAS,CAAC,aAAa,IAAI,KAAK;aAChD,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RowData, Table } from '@tanstack/react-table';
|
|
2
2
|
import type { Virtualizer } from '@tanstack/react-virtual';
|
|
3
3
|
import type { RefObject } from 'react';
|
|
4
|
+
import type { ReactScienceTableFeatures } from './table_features.js';
|
|
4
5
|
import type { TableProps } from './table_root.js';
|
|
5
6
|
export declare function useTableScroll<TData extends RowData>(options: {
|
|
6
7
|
/**
|
|
@@ -15,7 +16,7 @@ export declare function useTableScroll<TData extends RowData>(options: {
|
|
|
15
16
|
* A ref to the effective scroll container.
|
|
16
17
|
*/
|
|
17
18
|
scrollRef: RefObject<Element | null>;
|
|
18
|
-
table: Table<TData>;
|
|
19
|
+
table: Table<ReactScienceTableFeatures, TData>;
|
|
19
20
|
/**
|
|
20
21
|
* Tanstack virtualizer instance.
|
|
21
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_table_scroll.d.ts","sourceRoot":"","sources":["../../../src/components/table/use_table_scroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,wBAAgB,cAAc,CAAC,KAAK,SAAS,OAAO,EAAE,OAAO,EAAE;IAC7D;;OAEG;IACH,cAAc,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD;;OAEG;IACH,cAAc,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAIrC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"use_table_scroll.d.ts","sourceRoot":"","sources":["../../../src/components/table/use_table_scroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,wBAAgB,cAAc,CAAC,KAAK,SAAS,OAAO,EAAE,OAAO,EAAE;IAC7D;;OAEG;IACH,cAAc,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD;;OAEG;IACH,cAAc,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAIrC,KAAK,EAAE,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IAC/C;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;CACnD,QAmDA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_table_scroll.js","sourceRoot":"","sources":["../../../src/components/table/use_table_scroll.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,QAAQ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AAC,CAAC,EAAE,CAAC,CAAC;wBACzC,CAAC;oBACH,CAAC;gBACH,CAAC;aACF,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,cAAc,CACZ,EAAU,EACV,OAA2C;oBAE3C,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,aAAa,CAC9C,QAAQ,CAAA,mBAAmB,EAAE,IAAI,CAClC,CAAC;oBACF,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,sCAAsC;wBACtC,OAAO,CAAC,IAAI,CACV,mCAAmC,EAAE,0BAA0B,CAChE,CAAC;oBACJ,CAAC;oBACD,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;oBACjC,IAAI,OAAO,EAAE,QAAQ,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;wBACvD,aAAa,CAAC,EAAE,CAAC,CAAC;oBACpB,CAAC;gBACH,CAAC;aACF,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;AACrE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-science",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "React components to build scientific applications UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@emotion/styled": "^11.14.1",
|
|
60
60
|
"@radix-ui/react-use-controllable-state": "^1.2.6",
|
|
61
|
-
"@tanstack/react-form": "^1.33.
|
|
62
|
-
"@tanstack/react-store": "^0.11.
|
|
63
|
-
"@tanstack/react-table": "^
|
|
61
|
+
"@tanstack/react-form": "^1.33.4",
|
|
62
|
+
"@tanstack/react-store": "^0.11.1",
|
|
63
|
+
"@tanstack/react-table": "^9.1.2",
|
|
64
64
|
"@tanstack/react-virtual": "^3.14.9",
|
|
65
65
|
"@zakodium/pdnd-esm": "^1.1.0",
|
|
66
66
|
"@zakodium/utils": "^0.5.1",
|
|
67
67
|
"d3-scale-chromatic": "^3.1.0",
|
|
68
68
|
"react-d3-utils": "^3.1.2",
|
|
69
|
-
"react-dropzone": "^20.
|
|
69
|
+
"react-dropzone": "^20.1.0",
|
|
70
70
|
"react-full-screen": "^1.1.1",
|
|
71
71
|
"react-icons": "^5.7.0",
|
|
72
72
|
"react-inspector": "^9.0.0",
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
"@floating-ui/react": "^0.27.20",
|
|
82
82
|
"@playwright/experimental-ct-react": "^1.62.1",
|
|
83
83
|
"@playwright/test": "^1.62.1",
|
|
84
|
-
"@storybook/addon-docs": "^10.5.
|
|
85
|
-
"@storybook/react-vite": "^10.5.
|
|
84
|
+
"@storybook/addon-docs": "^10.5.7",
|
|
85
|
+
"@storybook/react-vite": "^10.5.7",
|
|
86
86
|
"@tanstack/react-query": "^5.101.4",
|
|
87
87
|
"@types/babel__core": "^7.20.5",
|
|
88
88
|
"@types/d3-scale-chromatic": "^3.1.0",
|
|
89
|
-
"@types/node": "^26.
|
|
89
|
+
"@types/node": "^26.2.0",
|
|
90
90
|
"@types/react": "^18.3.31",
|
|
91
91
|
"@types/react-dom": "^18.3.7",
|
|
92
92
|
"@types/tinycolor2": "^1.4.6",
|
|
@@ -99,15 +99,15 @@
|
|
|
99
99
|
"cross-env": "^10.1.0",
|
|
100
100
|
"eslint": "^9.39.5",
|
|
101
101
|
"eslint-config-zakodium": "^20.1.0",
|
|
102
|
-
"eslint-plugin-storybook": "^10.5.
|
|
102
|
+
"eslint-plugin-storybook": "^10.5.7",
|
|
103
103
|
"fifo-logger": "2.0.1",
|
|
104
104
|
"filelist-utils": "^1.11.3",
|
|
105
|
-
"immer": "^11.1.
|
|
106
|
-
"jcampconverter": "^12.5.
|
|
107
|
-
"ml-gsd": "^14.2.
|
|
108
|
-
"ml-peak-shape-generator": "^5.
|
|
105
|
+
"immer": "^11.1.16",
|
|
106
|
+
"jcampconverter": "^12.5.3",
|
|
107
|
+
"ml-gsd": "^14.2.2",
|
|
108
|
+
"ml-peak-shape-generator": "^5.5.0",
|
|
109
109
|
"ml-signal-processing": "^2.2.2",
|
|
110
|
-
"ml-spectra-processing": "^14.
|
|
110
|
+
"ml-spectra-processing": "^14.33.0",
|
|
111
111
|
"ms-spectrum": "^3.12.0",
|
|
112
112
|
"netcdfjs": "^4.0.0",
|
|
113
113
|
"postcss-styled-syntax": "^0.7.2",
|
|
@@ -120,15 +120,15 @@
|
|
|
120
120
|
"react-plot": "^3.1.2",
|
|
121
121
|
"rimraf": "^6.1.3",
|
|
122
122
|
"spc-parser": "^2.1.0",
|
|
123
|
-
"storybook": "^10.5.
|
|
123
|
+
"storybook": "^10.5.7",
|
|
124
124
|
"stylelint": "^17.14.1",
|
|
125
125
|
"stylelint-config-standard": "^40.0.0",
|
|
126
126
|
"typescript": "^6.0.3",
|
|
127
|
-
"vite": "^8.2.
|
|
127
|
+
"vite": "^8.2.1",
|
|
128
128
|
"vitest": "^4.1.10",
|
|
129
129
|
"wdf-parser": "^1.0.0"
|
|
130
130
|
},
|
|
131
131
|
"volta": {
|
|
132
|
-
"node": "24.
|
|
132
|
+
"node": "24.19.0"
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -84,7 +84,7 @@ interface InfoPanelDatum {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
const columnHelper = createTableColumnHelper<InfoPanelDatum>();
|
|
87
|
-
const columns = [
|
|
87
|
+
const columns = columnHelper.columns([
|
|
88
88
|
columnHelper.accessor('parameter', {
|
|
89
89
|
header: 'Parameter',
|
|
90
90
|
}),
|
|
@@ -92,7 +92,7 @@ const columns = [
|
|
|
92
92
|
header: 'Value',
|
|
93
93
|
cell: ({ getValue }) => valueCell(getValue()),
|
|
94
94
|
}),
|
|
95
|
-
];
|
|
95
|
+
]);
|
|
96
96
|
|
|
97
97
|
const emptyData: InfoPanelData[] = [];
|
|
98
98
|
|
|
@@ -41,34 +41,35 @@ export interface FifoLoggerDialogProps {
|
|
|
41
41
|
const columnHelper = createTableColumnHelper<LogEntry>();
|
|
42
42
|
function useColumns(unseen: number) {
|
|
43
43
|
return useMemo(
|
|
44
|
-
() =>
|
|
45
|
-
columnHelper.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
44
|
+
() =>
|
|
45
|
+
columnHelper.columns([
|
|
46
|
+
columnHelper.display({
|
|
47
|
+
header: '#',
|
|
48
|
+
cell: ({ row }) => {
|
|
49
|
+
return (
|
|
50
|
+
<RowIndexCell
|
|
51
|
+
pillColor={
|
|
52
|
+
row.index >= unseen
|
|
53
|
+
? 'transparent'
|
|
54
|
+
: rowBackgroundColor[row.original.levelLabel]
|
|
55
|
+
}
|
|
56
|
+
>
|
|
57
|
+
{String(row.index + 1)}
|
|
58
|
+
</RowIndexCell>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
columnHelper.accessor('time', {
|
|
63
|
+
header: 'Time',
|
|
64
|
+
cell: ({ getValue }) => new Date(getValue()).toLocaleTimeString(),
|
|
65
|
+
}),
|
|
66
|
+
columnHelper.accessor('levelLabel', {
|
|
67
|
+
header: 'Level',
|
|
68
|
+
}),
|
|
69
|
+
columnHelper.accessor('message', {
|
|
70
|
+
header: 'Message',
|
|
71
|
+
}),
|
|
72
|
+
]),
|
|
72
73
|
[unseen],
|
|
73
74
|
);
|
|
74
75
|
}
|
|
@@ -2,9 +2,11 @@ import type { CellContext, RowData } from '@tanstack/react-table';
|
|
|
2
2
|
|
|
3
3
|
import * as ValueRenderers from '../value-renderers/index.js';
|
|
4
4
|
|
|
5
|
+
import type { ReactScienceTableFeatures } from './table_features.js';
|
|
6
|
+
|
|
5
7
|
// TODO: support Date
|
|
6
8
|
export function defaultTableCell<TData extends RowData, TValue = unknown>(
|
|
7
|
-
context: CellContext<TData, TValue>,
|
|
9
|
+
context: CellContext<ReactScienceTableFeatures, TData, TValue>,
|
|
8
10
|
) {
|
|
9
11
|
const value = context.getValue();
|
|
10
12
|
if (typeof value === 'string') {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
CellData,
|
|
3
|
+
RowData,
|
|
4
|
+
TableFeatures as TanstackTableFeatures,
|
|
5
|
+
} from '@tanstack/react-table';
|
|
2
6
|
import type { CSSProperties } from 'react';
|
|
3
7
|
|
|
4
8
|
export * from './table_root.js';
|
|
@@ -8,8 +12,12 @@ export * from './reorder_rows/index.js';
|
|
|
8
12
|
|
|
9
13
|
declare module '@tanstack/react-table' {
|
|
10
14
|
// Declaration merging
|
|
11
|
-
|
|
12
|
-
interface ColumnMeta<
|
|
15
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
16
|
+
interface ColumnMeta<
|
|
17
|
+
TFeatures extends TanstackTableFeatures,
|
|
18
|
+
TData extends RowData,
|
|
19
|
+
TValue extends CellData = CellData,
|
|
20
|
+
> {
|
|
13
21
|
/**
|
|
14
22
|
* Merged into the `style` prop of the default-rendered `<th>` element.
|
|
15
23
|
*/
|
|
@@ -20,4 +28,5 @@ declare module '@tanstack/react-table' {
|
|
|
20
28
|
*/
|
|
21
29
|
tdStyle?: CSSProperties;
|
|
22
30
|
}
|
|
31
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
23
32
|
}
|
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
isPreviewTableContext,
|
|
5
5
|
usePreviewTableProps,
|
|
6
6
|
} from './preview_table_context.js';
|
|
7
|
+
import type { ReactScienceTableFeatures } from './table_features.js';
|
|
7
8
|
import { Table } from './table_root.js';
|
|
8
9
|
|
|
9
10
|
export function PreviewTable<TData extends RowData>(props: {
|
|
10
|
-
row: Row<TData>;
|
|
11
|
+
row: Row<ReactScienceTableFeatures, TData>;
|
|
11
12
|
}) {
|
|
12
13
|
const tablePreviewProps = usePreviewTableProps<TData>();
|
|
13
14
|
return (
|
|
@@ -11,7 +11,7 @@ export type PreviewTablePropsContextValue<TData extends RowData> = Pick<
|
|
|
11
11
|
>;
|
|
12
12
|
|
|
13
13
|
export const previewTablePropsContext =
|
|
14
|
-
createContext<PreviewTablePropsContextValue<
|
|
14
|
+
createContext<PreviewTablePropsContextValue<RowData> | null>(null);
|
|
15
15
|
|
|
16
16
|
export function usePreviewTableProps<TData extends RowData>() {
|
|
17
17
|
const value = useContext(previewTablePropsContext);
|
|
@@ -16,6 +16,7 @@ import { createPortal } from 'react-dom';
|
|
|
16
16
|
import { useFlashRowEffect } from '../flash_row/use_flash_row_effect.js';
|
|
17
17
|
import { PreviewTable } from '../preview_table.js';
|
|
18
18
|
import { useIsPreviewTable } from '../preview_table_context.js';
|
|
19
|
+
import type { ReactScienceTableFeatures } from '../table_features.js';
|
|
19
20
|
import type {
|
|
20
21
|
TableRowPreviewRenderer,
|
|
21
22
|
TableRowTrRenderProps,
|
|
@@ -35,7 +36,7 @@ export interface TableDraggableRowTrProps<TData extends RowData> {
|
|
|
35
36
|
/**
|
|
36
37
|
* Row data.
|
|
37
38
|
*/
|
|
38
|
-
row: Row<TData>;
|
|
39
|
+
row: Row<ReactScienceTableFeatures, TData>;
|
|
39
40
|
/**
|
|
40
41
|
* Preview of the row being dragged.
|
|
41
42
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { Row } from '@tanstack/react-table';
|
|
1
|
+
import type { Row, RowData } from '@tanstack/react-table';
|
|
2
2
|
import type { Edge } from '@zakodium/pdnd-esm';
|
|
3
3
|
|
|
4
|
+
import type { ReactScienceTableFeatures } from '../table_features.js';
|
|
5
|
+
|
|
4
6
|
const itemKey = Symbol('table-item-data');
|
|
5
7
|
export interface ItemData {
|
|
6
8
|
[itemKey]: true;
|
|
@@ -11,8 +13,8 @@ export interface ItemData {
|
|
|
11
13
|
[key: symbol]: unknown;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export function getItemData<RowType>(
|
|
15
|
-
row: Row<RowType>,
|
|
16
|
+
export function getItemData<RowType extends RowData>(
|
|
17
|
+
row: Row<ReactScienceTableFeatures, RowType>,
|
|
16
18
|
instanceId: symbol,
|
|
17
19
|
): ItemData {
|
|
18
20
|
return {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Row } from '@tanstack/react-table';
|
|
2
1
|
import type { Edge } from '@zakodium/pdnd-esm';
|
|
3
2
|
import { createContext, useContext } from 'react';
|
|
4
3
|
|
|
@@ -8,8 +7,8 @@ export type ReorderItemCallback = (args: {
|
|
|
8
7
|
closestEdgeOfTarget: Edge | null;
|
|
9
8
|
}) => void;
|
|
10
9
|
|
|
11
|
-
export interface ItemOrderContextValue
|
|
12
|
-
items: Array<
|
|
10
|
+
export interface ItemOrderContextValue {
|
|
11
|
+
items: Array<{ id: string }>;
|
|
13
12
|
reorderItem: ReorderItemCallback;
|
|
14
13
|
instanceId: symbol;
|
|
15
14
|
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import type { Row } from '@tanstack/react-table';
|
|
1
|
+
import type { Row, RowData } from '@tanstack/react-table';
|
|
2
2
|
import { getReorderDestinationIndex, reorder } from '@zakodium/pdnd-esm';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
import { useCallback, useMemo, useState } from 'react';
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type { ReactScienceTableFeatures } from '../table_features.js';
|
|
7
|
+
|
|
8
|
+
import type {
|
|
9
|
+
ItemOrderContextValue,
|
|
10
|
+
ReorderItemCallback,
|
|
11
|
+
} from './item_order_context.js';
|
|
7
12
|
import { itemOrderContext } from './item_order_context.js';
|
|
8
13
|
|
|
9
|
-
interface ItemOrderProviderProps<T> {
|
|
10
|
-
items: Array<Row<T>>;
|
|
11
|
-
onOrderChanged: (items: Array<Row<T>>) => void;
|
|
14
|
+
interface ItemOrderProviderProps<T extends RowData> {
|
|
15
|
+
items: Array<Row<ReactScienceTableFeatures, T>>;
|
|
16
|
+
onOrderChanged: (items: Array<Row<ReactScienceTableFeatures, T>>) => void;
|
|
12
17
|
children: ReactNode;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
export function ItemOrderProvider<T =
|
|
20
|
+
export function ItemOrderProvider<T extends RowData = RowData>(
|
|
16
21
|
props: ItemOrderProviderProps<T>,
|
|
17
22
|
) {
|
|
18
23
|
// Isolated instances of this component from one another
|
|
@@ -43,13 +48,10 @@ export function ItemOrderProvider<T = unknown>(
|
|
|
43
48
|
[items, onOrderChanged],
|
|
44
49
|
);
|
|
45
50
|
|
|
46
|
-
const value = useMemo(() => {
|
|
47
|
-
// This assertion is necessary because the provider cannot contain the
|
|
48
|
-
// T type instantiated by this component.
|
|
49
|
-
const contextItems = items as Array<Row<unknown>>;
|
|
51
|
+
const value = useMemo<ItemOrderContextValue>(() => {
|
|
50
52
|
return {
|
|
51
53
|
reorderItem,
|
|
52
|
-
items
|
|
54
|
+
items,
|
|
53
55
|
instanceId,
|
|
54
56
|
};
|
|
55
57
|
}, [reorderItem, items, instanceId]);
|