@tcn/ui-table 2.3.4 → 2.3.6
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/cell.css +1 -1
- package/dist/components/cells/data_cell.d.ts.map +1 -1
- package/dist/components/cells/data_cell.js +4 -3
- package/dist/components/cells/data_cell.js.map +1 -1
- package/dist/components/cells/footer_cell.d.ts.map +1 -1
- package/dist/components/cells/footer_cell.js +5 -4
- package/dist/components/cells/footer_cell.js.map +1 -1
- package/dist/components/cells/header_cell.d.ts +3 -5
- package/dist/components/cells/header_cell.d.ts.map +1 -1
- package/dist/components/cells/header_cell.js +49 -37
- package/dist/components/cells/header_cell.js.map +1 -1
- package/dist/components/cells/sort_control.d.ts +8 -0
- package/dist/components/cells/sort_control.d.ts.map +1 -0
- package/dist/components/cells/sort_control.js +27 -0
- package/dist/components/cells/sort_control.js.map +1 -0
- package/dist/components/cells/sticky_row_data_cell.d.ts.map +1 -1
- package/dist/components/cells/sticky_row_data_cell.js +14 -13
- package/dist/components/cells/sticky_row_data_cell.js.map +1 -1
- package/dist/components/cells/sticky_row_fill_cell.d.ts.map +1 -1
- package/dist/components/cells/sticky_row_fill_cell.js +4 -3
- package/dist/components/cells/sticky_row_fill_cell.js.map +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +66 -64
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table_filter_panel/field_filters/string_field_filter.d.ts.map +1 -1
- package/dist/components/table_filter_panel/field_filters/string_field_filter.js +21 -20
- package/dist/components/table_filter_panel/field_filters/string_field_filter.js.map +1 -1
- package/dist/components/table_pager.d.ts.map +1 -1
- package/dist/components/table_pager.js +34 -16
- package/dist/components/table_pager.js.map +1 -1
- package/dist/table.css +1 -1
- package/package.json +4 -4
- package/src/__stories__/table.stories.tsx +232 -195
- package/src/components/cells/cell.module.css +7 -45
- package/src/components/cells/data_cell.tsx +3 -2
- package/src/components/cells/footer_cell.tsx +3 -2
- package/src/components/cells/header_cell.tsx +19 -28
- package/src/components/cells/sort_control.tsx +44 -0
- package/src/components/cells/sticky_row_data_cell.tsx +3 -2
- package/src/components/cells/sticky_row_fill_cell.tsx +3 -2
- package/src/components/table/table.module.css +24 -212
- package/src/components/table/table.tsx +35 -24
- package/src/components/table_filter_panel/field_filters/string_field_filter.tsx +1 -0
- package/src/components/table_pager.tsx +12 -2
package/dist/cell.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._table-cell_659286b[data-stick-to=start]{position:sticky;top:0;left:var(--start-offset, 0)}._table-cell_659286b[data-stick-to=end]{position:sticky;top:0;right:var(--end-offset,
|
|
1
|
+
._table-cell_659286b[data-stick-to=start]{position:sticky;top:0;left:var(--start-offset, 0)}._table-cell_659286b[data-stick-to=end]{position:sticky;top:0;right:var(--end-offset, 0)}._table-cell_659286b[data-stick-to=start]:dir(rtl){position:sticky;top:0;right:var(--start-offset, 0)}._table-cell_659286b[data-stick-to=end]:dir(rtl){position:sticky;top:0;left:var(--end-offset, 0)}._sticky-row-table-cell_fa29729{--material: #cccccc;background-color:#ccc;position:sticky;z-index:1}._sticky-row-table-cell_fa29729[data-stick-to=start]{position:sticky;top:0;left:var(--start-offset, -1px);z-index:2}._sticky-row-table-cell_fa29729[data-stick-to=end]{position:sticky;top:0;right:var(--end-offset, -1px);z-index:2}._sticky-row-table-cell_fa29729[data-stick-to=start]:dir(rtl){position:sticky;top:0;right:var(--start-offset, -1px);z-index:2}._sticky-row-table-cell_fa29729[data-stick-to=end]:dir(rtl){position:sticky;top:0;left:var(--end-offset, 0);z-index:2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/data_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"data_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/data_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,aAAa,2CAcjE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "../../cell.module-WpHnQBVu.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { TD as a } from "@tcn/ui/layouts";
|
|
4
|
+
function p({ content: e, sticky: r, width: t }) {
|
|
5
|
+
return /* @__PURE__ */ l(a, { className: i["table-cell"], "data-stick-to": r, children: /* @__PURE__ */ l(
|
|
5
6
|
"div",
|
|
6
7
|
{
|
|
7
8
|
style: {
|
|
@@ -14,6 +15,6 @@ function m({ content: e, sticky: a, width: t }) {
|
|
|
14
15
|
) });
|
|
15
16
|
}
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
p as DataCell
|
|
18
19
|
};
|
|
19
20
|
//# sourceMappingURL=data_cell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data_cell.js","sources":["../../../src/components/cells/data_cell.tsx"],"sourcesContent":["import React from 'react';\n\nimport cellStyles from './cell.module.css';\n\nexport type DataCellProps = {\n content: React.ReactNode;\n sticky?: 'start' | 'end';\n width?: number;\n};\n\nexport function DataCell({ content, sticky, width }: DataCellProps) {\n return (\n <
|
|
1
|
+
{"version":3,"file":"data_cell.js","sources":["../../../src/components/cells/data_cell.tsx"],"sourcesContent":["import React from 'react';\n\nimport cellStyles from './cell.module.css';\nimport { TD } from '@tcn/ui/layouts';\n\nexport type DataCellProps = {\n content: React.ReactNode;\n sticky?: 'start' | 'end';\n width?: number;\n};\n\nexport function DataCell({ content, sticky, width }: DataCellProps) {\n return (\n <TD className={cellStyles['table-cell']} data-stick-to={sticky}>\n <div\n style={{\n width: `${width}px`,\n minWidth: `${width}px`,\n maxWidth: `${width}px`,\n }}\n >\n {content}\n </div>\n </TD>\n );\n}\n"],"names":["DataCell","content","sticky","width","TD","cellStyles","jsx"],"mappings":";;;AAWO,SAASA,EAAS,EAAE,SAAAC,GAAS,QAAAC,GAAQ,OAAAC,KAAwB;AAClE,2BACGC,GAAA,EAAG,WAAWC,EAAW,YAAY,GAAG,iBAAeH,GACtD,UAAA,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,OAAO,GAAGH,CAAK;AAAA,QACf,UAAU,GAAGA,CAAK;AAAA,QAClB,UAAU,GAAGA,CAAK;AAAA,MAAA;AAAA,MAGnB,UAAAF;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/footer_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"footer_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/footer_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,eAAe,2CAcrE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { c as o } from "../../cell.module-WpHnQBVu.js";
|
|
3
|
+
import { TD as i } from "@tcn/ui/layouts";
|
|
4
|
+
function p({ content: l, sticky: r, width: t }) {
|
|
5
|
+
return /* @__PURE__ */ e(i, { className: o["table-cell"], "data-stick-to": r, children: /* @__PURE__ */ e(
|
|
5
6
|
"div",
|
|
6
7
|
{
|
|
7
8
|
style: {
|
|
@@ -14,6 +15,6 @@ function a({ content: l, sticky: r, width: t }) {
|
|
|
14
15
|
) });
|
|
15
16
|
}
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
p as FooterCell
|
|
18
19
|
};
|
|
19
20
|
//# sourceMappingURL=footer_cell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer_cell.js","sources":["../../../src/components/cells/footer_cell.tsx"],"sourcesContent":["import React from 'react';\n\nimport cellStyles from './cell.module.css';\n\nexport type FooterCellProps = {\n content: React.ReactNode;\n sticky?: 'start' | 'end';\n width?: number;\n};\n\nexport function FooterCell({ content, sticky, width }: FooterCellProps) {\n return (\n <
|
|
1
|
+
{"version":3,"file":"footer_cell.js","sources":["../../../src/components/cells/footer_cell.tsx"],"sourcesContent":["import React from 'react';\n\nimport cellStyles from './cell.module.css';\nimport { TD } from '@tcn/ui/layouts';\n\nexport type FooterCellProps = {\n content: React.ReactNode;\n sticky?: 'start' | 'end';\n width?: number;\n};\n\nexport function FooterCell({ content, sticky, width }: FooterCellProps) {\n return (\n <TD className={cellStyles['table-cell']} data-stick-to={sticky}>\n <div\n style={{\n width: `${width}px`,\n minWidth: `${width}px`,\n maxWidth: `${width}px`,\n }}\n >\n {content}\n </div>\n </TD>\n );\n}\n"],"names":["FooterCell","content","sticky","width","TD","cellStyles","jsx"],"mappings":";;;AAWO,SAASA,EAAW,EAAE,SAAAC,GAAS,QAAAC,GAAQ,OAAAC,KAA0B;AACtE,2BACGC,GAAA,EAAG,WAAWC,EAAW,YAAY,GAAG,iBAAeH,GACtD,UAAA,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,OAAO,GAAGH,CAAK;AAAA,QACf,UAAU,GAAGA,CAAK;AAAA,QAClB,UAAU,GAAGA,CAAK;AAAA,MAAA;AAAA,MAGnB,UAAAF;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { SortControlProps } from './sort_control.js';
|
|
3
|
+
export interface HeaderCellProps extends SortControlProps {
|
|
3
4
|
heading: React.ReactNode;
|
|
4
5
|
index: number;
|
|
5
6
|
sticky?: 'start' | 'end';
|
|
6
7
|
onResize?: (width: number) => void;
|
|
7
8
|
width?: number;
|
|
8
|
-
|
|
9
|
-
onSortModeChange?: () => void;
|
|
10
|
-
canSort?: boolean;
|
|
11
|
-
};
|
|
9
|
+
}
|
|
12
10
|
export declare function HeaderCell({ heading, sticky, onResize, width, sortMode, onSortModeChange, canSort, }: HeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
13
11
|
//# sourceMappingURL=header_cell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/header_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"header_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/header_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGvE,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,GACR,EAAE,eAAe,2CA2CjB"}
|
|
@@ -1,46 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { Box as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onSortModeChange: s,
|
|
16
|
-
canSort: c
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as x } from "react";
|
|
3
|
+
import { Box as r, HStack as h } from "@tcn/ui/stacks";
|
|
4
|
+
import { c as f } from "../../cell.module-WpHnQBVu.js";
|
|
5
|
+
import { SortControl as u } from "./sort_control.js";
|
|
6
|
+
import { TH as y } from "@tcn/ui/layouts";
|
|
7
|
+
function H({
|
|
8
|
+
heading: n,
|
|
9
|
+
sticky: l,
|
|
10
|
+
onResize: i,
|
|
11
|
+
width: o,
|
|
12
|
+
sortMode: s,
|
|
13
|
+
onSortModeChange: a,
|
|
14
|
+
canSort: d
|
|
17
15
|
}) {
|
|
18
|
-
const
|
|
19
|
-
(
|
|
20
|
-
|
|
16
|
+
const m = l != null ? 2 : 1, p = x(
|
|
17
|
+
(t) => {
|
|
18
|
+
i?.(Math.max(t, 20));
|
|
21
19
|
},
|
|
22
|
-
[
|
|
20
|
+
[i]
|
|
23
21
|
);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
22
|
+
return /* @__PURE__ */ e(
|
|
23
|
+
y,
|
|
26
24
|
{
|
|
27
|
-
className:
|
|
28
|
-
"data-stick-to":
|
|
29
|
-
style: { width: `${
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
-
|
|
25
|
+
className: f["table-cell"],
|
|
26
|
+
"data-stick-to": l,
|
|
27
|
+
style: { width: `${o}px`, zIndex: m },
|
|
28
|
+
children: /* @__PURE__ */ e(
|
|
29
|
+
r,
|
|
32
30
|
{
|
|
33
|
-
padding: "
|
|
31
|
+
padding: "0px 8px",
|
|
34
32
|
overflow: "hidden",
|
|
35
|
-
minWidth: "
|
|
33
|
+
minWidth: "24px",
|
|
36
34
|
enableResizeOnEnd: !0,
|
|
37
|
-
onWidthResize:
|
|
38
|
-
style: { width: `${
|
|
39
|
-
onClick: (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
onWidthResize: p,
|
|
36
|
+
style: { width: `${o}px`, minWidth: "20px" },
|
|
37
|
+
onClick: (t) => t.stopPropagation(),
|
|
38
|
+
children: /* @__PURE__ */ c(h, { children: [
|
|
39
|
+
/* @__PURE__ */ e(
|
|
40
|
+
r,
|
|
41
|
+
{
|
|
42
|
+
minWidth: "24px",
|
|
43
|
+
className: "ellipsis",
|
|
44
|
+
style: { alignItems: "center", display: "flex" },
|
|
45
|
+
children: n
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
u,
|
|
50
|
+
{
|
|
51
|
+
canSort: d,
|
|
52
|
+
onSortModeChange: a,
|
|
53
|
+
sortMode: s
|
|
54
|
+
}
|
|
55
|
+
)
|
|
44
56
|
] })
|
|
45
57
|
}
|
|
46
58
|
)
|
|
@@ -48,6 +60,6 @@ function j({
|
|
|
48
60
|
);
|
|
49
61
|
}
|
|
50
62
|
export {
|
|
51
|
-
|
|
63
|
+
H as HeaderCell
|
|
52
64
|
};
|
|
53
65
|
//# sourceMappingURL=header_cell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header_cell.js","sources":["../../../src/components/cells/header_cell.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { Box, HStack } from '@tcn/ui/stacks';\n\nimport
|
|
1
|
+
{"version":3,"file":"header_cell.js","sources":["../../../src/components/cells/header_cell.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { Box, HStack } from '@tcn/ui/stacks';\n\nimport cellStyles from './cell.module.css';\nimport { SortControl, type SortControlProps } from './sort_control.js';\nimport { TH } from '@tcn/ui/layouts';\n\nexport interface HeaderCellProps extends SortControlProps {\n heading: React.ReactNode;\n index: number;\n sticky?: 'start' | 'end';\n onResize?: (width: number) => void;\n width?: number;\n}\n\nexport function HeaderCell({\n heading,\n sticky,\n onResize,\n width,\n sortMode,\n onSortModeChange,\n canSort,\n}: HeaderCellProps) {\n const zIndex = sticky != null ? 2 : 1;\n\n const handleResize = useCallback(\n (newSize: number) => {\n onResize?.(Math.max(newSize, 20));\n },\n [onResize]\n );\n\n return (\n <TH\n className={cellStyles['table-cell']}\n data-stick-to={sticky}\n style={{ width: `${width}px`, zIndex }}\n >\n <Box\n padding=\"0px 8px\" // FIXME: should be on theme ideally.\n overflow=\"hidden\"\n minWidth=\"24px\"\n enableResizeOnEnd\n onWidthResize={handleResize}\n style={{ width: `${width}px`, minWidth: '20px' }}\n onClick={e => e.stopPropagation()}\n >\n <HStack>\n <Box\n minWidth=\"24px\"\n className=\"ellipsis\"\n style={{ alignItems: 'center', display: 'flex' }}\n >\n {heading}\n </Box>\n\n <SortControl\n canSort={canSort}\n onSortModeChange={onSortModeChange}\n sortMode={sortMode}\n />\n </HStack>\n </Box>\n </TH>\n );\n}\n"],"names":["HeaderCell","heading","sticky","onResize","width","sortMode","onSortModeChange","canSort","zIndex","handleResize","useCallback","newSize","jsx","TH","cellStyles","Box","e","HStack","SortControl"],"mappings":";;;;;;AAgBO,SAASA,EAAW;AAAA,EACzB,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,SAAAC;AACF,GAAoB;AAClB,QAAMC,IAASN,KAAU,OAAO,IAAI,GAE9BO,IAAeC;AAAA,IACnB,CAACC,MAAoB;AACnB,MAAAR,IAAW,KAAK,IAAIQ,GAAS,EAAE,CAAC;AAAA,IAClC;AAAA,IACA,CAACR,CAAQ;AAAA,EAAA;AAGX,SACE,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAW,YAAY;AAAA,MAClC,iBAAeZ;AAAA,MACf,OAAO,EAAE,OAAO,GAAGE,CAAK,MAAM,QAAAI,EAAA;AAAA,MAE9B,UAAA,gBAAAI;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,SAAQ;AAAA,UACR,UAAS;AAAA,UACT,UAAS;AAAA,UACT,mBAAiB;AAAA,UACjB,eAAeN;AAAA,UACf,OAAO,EAAE,OAAO,GAAGL,CAAK,MAAM,UAAU,OAAA;AAAA,UACxC,SAAS,CAAAY,MAAKA,EAAE,gBAAA;AAAA,UAEhB,4BAACC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAL;AAAA,cAACG;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,WAAU;AAAA,gBACV,OAAO,EAAE,YAAY,UAAU,SAAS,OAAA;AAAA,gBAEvC,UAAAd;AAAA,cAAA;AAAA,YAAA;AAAA,YAGH,gBAAAW;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,SAAAX;AAAA,gBACA,kBAAAD;AAAA,gBACA,UAAAD;AAAA,cAAA;AAAA,YAAA;AAAA,UACF,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type SortMode = 'asc' | 'desc' | 'none';
|
|
2
|
+
export interface SortControlProps {
|
|
3
|
+
canSort?: boolean;
|
|
4
|
+
onSortModeChange?: () => void;
|
|
5
|
+
sortMode?: SortMode;
|
|
6
|
+
}
|
|
7
|
+
export declare const SortControl: ({ canSort, onSortModeChange, sortMode, }: SortControlProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=sort_control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort_control.d.ts","sourceRoot":"","sources":["../../../src/components/cells/sort_control.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAQD,eAAO,MAAM,WAAW,GAAI,0CAIzB,gBAAgB,mDAgBlB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as e } from "react";
|
|
3
|
+
import { Box as l } from "@tcn/ui/stacks";
|
|
4
|
+
import { TwoClassSortDownIcon as s } from "@tcn/icons/two_class_sort_down_icon.js";
|
|
5
|
+
import { TwoClassSortFilledIcon as m } from "@tcn/icons/two_class_sort_filled_icon.js";
|
|
6
|
+
import { TwoClassSortUpIcon as a } from "@tcn/icons/two_class_sort_up_icon.js";
|
|
7
|
+
import { Button as p } from "@tcn/ui/actions";
|
|
8
|
+
const u = {
|
|
9
|
+
asc: s,
|
|
10
|
+
desc: a,
|
|
11
|
+
none: m
|
|
12
|
+
}, x = ({
|
|
13
|
+
canSort: t,
|
|
14
|
+
onSortModeChange: r,
|
|
15
|
+
sortMode: n = "none"
|
|
16
|
+
}) => {
|
|
17
|
+
const i = e(() => {
|
|
18
|
+
r?.();
|
|
19
|
+
}, [r]);
|
|
20
|
+
if (!t) return null;
|
|
21
|
+
const c = u[n];
|
|
22
|
+
return /* @__PURE__ */ o(l, { width: "auto", height: "auto", children: /* @__PURE__ */ o(p, { utility: !0, onClick: i, hierarchy: "tertiary", children: /* @__PURE__ */ o(c, {}) }) });
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
x as SortControl
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=sort_control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort_control.js","sources":["../../../src/components/cells/sort_control.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { Box } from '@tcn/ui/stacks';\n\nimport { TwoClassSortDownIcon } from '@tcn/icons/two_class_sort_down_icon.js';\nimport { TwoClassSortFilledIcon } from '@tcn/icons/two_class_sort_filled_icon.js';\nimport { TwoClassSortUpIcon } from '@tcn/icons/two_class_sort_up_icon.js';\nimport { Button } from '@tcn/ui/actions';\n\nexport type SortMode = 'asc' | 'desc' | 'none';\n\nexport interface SortControlProps {\n canSort?: boolean;\n onSortModeChange?: () => void;\n sortMode?: SortMode;\n}\n\nconst sortIconMap: Record<SortMode, React.ComponentType<any>> = {\n asc: TwoClassSortDownIcon,\n desc: TwoClassSortUpIcon,\n none: TwoClassSortFilledIcon,\n};\n\nexport const SortControl = ({\n canSort,\n onSortModeChange,\n sortMode = 'none',\n}: SortControlProps) => {\n const handleSortModeChange = useCallback(() => {\n onSortModeChange?.();\n }, [onSortModeChange]);\n\n if (!canSort) return null;\n\n const SortIcon = sortIconMap[sortMode];\n\n return (\n <Box width=\"auto\" height=\"auto\">\n <Button utility onClick={handleSortModeChange} hierarchy=\"tertiary\">\n <SortIcon />\n </Button>\n </Box>\n );\n};\n"],"names":["sortIconMap","TwoClassSortDownIcon","TwoClassSortUpIcon","TwoClassSortFilledIcon","SortControl","canSort","onSortModeChange","sortMode","handleSortModeChange","useCallback","SortIcon","Box","jsx","Button"],"mappings":";;;;;;;AAiBA,MAAMA,IAA0D;AAAA,EAC9D,KAAKC;AAAA,EACL,MAAMC;AAAA,EACN,MAAMC;AACR,GAEaC,IAAc,CAAC;AAAA,EAC1B,SAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,UAAAC,IAAW;AACb,MAAwB;AACtB,QAAMC,IAAuBC,EAAY,MAAM;AAC7C,IAAAH,IAAA;AAAA,EACF,GAAG,CAACA,CAAgB,CAAC;AAErB,MAAI,CAACD,EAAS,QAAO;AAErB,QAAMK,IAAWV,EAAYO,CAAQ;AAErC,2BACGI,GAAA,EAAI,OAAM,QAAO,QAAO,QACvB,UAAA,gBAAAC,EAACC,GAAA,EAAO,SAAO,IAAC,SAASL,GAAsB,WAAU,YACvD,UAAA,gBAAAI,EAACF,GAAA,CAAA,CAAS,GACZ,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky_row_data_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/sticky_row_data_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"sticky_row_data_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/sticky_row_data_cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,KAAK,EACL,GAAG,GACJ,EAAE,sBAAsB,2CAexB"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as e } from "../../cell.module-WpHnQBVu.js";
|
|
3
|
+
import { TD as c } from "@tcn/ui/layouts";
|
|
4
|
+
function s({
|
|
5
|
+
content: l,
|
|
6
|
+
sticky: o,
|
|
6
7
|
width: t,
|
|
7
|
-
top:
|
|
8
|
+
top: r
|
|
8
9
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
10
|
+
return /* @__PURE__ */ i(
|
|
11
|
+
c,
|
|
11
12
|
{
|
|
12
|
-
className:
|
|
13
|
-
"data-stick-to":
|
|
13
|
+
className: e["sticky-row-table-cell"],
|
|
14
|
+
"data-stick-to": o,
|
|
14
15
|
style: {
|
|
15
16
|
width: `${t}px`,
|
|
16
17
|
minWidth: `${t}px`,
|
|
17
18
|
maxWidth: `${t}px`,
|
|
18
|
-
top: `${
|
|
19
|
+
top: `${r}px`
|
|
19
20
|
},
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ i("div", { children: l })
|
|
21
22
|
}
|
|
22
23
|
);
|
|
23
24
|
}
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
s as StickyRowDataCell
|
|
26
27
|
};
|
|
27
28
|
//# sourceMappingURL=sticky_row_data_cell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky_row_data_cell.js","sources":["../../../src/components/cells/sticky_row_data_cell.tsx"],"sourcesContent":["import React from 'react';\nimport cellStyles from './cell.module.css';\n\nexport type StickyRowDataCellProps = {\n content: React.ReactNode;\n sticky?: 'start' | 'end';\n width?: number;\n top?: number;\n};\n\nexport function StickyRowDataCell({\n content,\n sticky,\n width,\n top,\n}: StickyRowDataCellProps) {\n return (\n <
|
|
1
|
+
{"version":3,"file":"sticky_row_data_cell.js","sources":["../../../src/components/cells/sticky_row_data_cell.tsx"],"sourcesContent":["import React from 'react';\nimport cellStyles from './cell.module.css';\nimport { TD } from '@tcn/ui/layouts';\n\nexport type StickyRowDataCellProps = {\n content: React.ReactNode;\n sticky?: 'start' | 'end';\n width?: number;\n top?: number;\n};\n\nexport function StickyRowDataCell({\n content,\n sticky,\n width,\n top,\n}: StickyRowDataCellProps) {\n return (\n <TD\n className={cellStyles['sticky-row-table-cell']}\n data-stick-to={sticky}\n style={{\n width: `${width}px`,\n minWidth: `${width}px`,\n maxWidth: `${width}px`,\n top: `${top}px`,\n }}\n >\n <div>{content}</div>\n </TD>\n );\n}\n"],"names":["StickyRowDataCell","content","sticky","width","top","jsx","TD","cellStyles"],"mappings":";;;AAWO,SAASA,EAAkB;AAAA,EAChC,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,KAAAC;AACF,GAA2B;AACzB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAW,uBAAuB;AAAA,MAC7C,iBAAeL;AAAA,MACf,OAAO;AAAA,QACL,OAAO,GAAGC,CAAK;AAAA,QACf,UAAU,GAAGA,CAAK;AAAA,QAClB,UAAU,GAAGA,CAAK;AAAA,QAClB,KAAK,GAAGC,CAAG;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAC,EAAC,SAAK,UAAAJ,EAAA,CAAQ;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky_row_fill_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/sticky_row_fill_cell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sticky_row_fill_cell.d.ts","sourceRoot":"","sources":["../../../src/components/cells/sticky_row_fill_cell.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,GAAG,EAAE,EAAE,sBAAsB,2CAQhE"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "../../cell.module-WpHnQBVu.js";
|
|
3
|
-
|
|
3
|
+
import { TD as r } from "@tcn/ui/layouts";
|
|
4
|
+
function i({ top: t }) {
|
|
4
5
|
return /* @__PURE__ */ l(
|
|
5
|
-
|
|
6
|
+
r,
|
|
6
7
|
{
|
|
7
8
|
className: o["sticky-row-table-cell"],
|
|
8
9
|
"data-stick-to": "start",
|
|
@@ -11,6 +12,6 @@ function s({ top: t }) {
|
|
|
11
12
|
);
|
|
12
13
|
}
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
+
i as StickyRowFillCell
|
|
15
16
|
};
|
|
16
17
|
//# sourceMappingURL=sticky_row_fill_cell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky_row_fill_cell.js","sources":["../../../src/components/cells/sticky_row_fill_cell.tsx"],"sourcesContent":["import React from 'react';\nimport cellStyles from './cell.module.css';\n\nexport type StyckyRowFillCellProps = {\n top?: number;\n};\n\nexport function StickyRowFillCell({ top }: StyckyRowFillCellProps) {\n return (\n <
|
|
1
|
+
{"version":3,"file":"sticky_row_fill_cell.js","sources":["../../../src/components/cells/sticky_row_fill_cell.tsx"],"sourcesContent":["import React from 'react';\nimport cellStyles from './cell.module.css';\nimport { TD } from '@tcn/ui/layouts';\n\nexport type StyckyRowFillCellProps = {\n top?: number;\n};\n\nexport function StickyRowFillCell({ top }: StyckyRowFillCellProps) {\n return (\n <TD\n className={cellStyles['sticky-row-table-cell']}\n data-stick-to=\"start\"\n style={{ top: `${top}px` }}\n ></TD>\n );\n}\n"],"names":["StickyRowFillCell","top","jsx","TD","cellStyles"],"mappings":";;;AAQO,SAASA,EAAkB,EAAE,KAAAC,KAA+B;AACjE,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAW,uBAAuB;AAAA,MAC7C,iBAAc;AAAA,MACd,OAAO,EAAE,KAAK,GAAGH,CAAG,KAAA;AAAA,IAAK;AAAA,EAAA;AAG/B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAkB,YAAY,EAAoB,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAO,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ/C,OAAO,EAAe,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAkB,YAAY,EAAoB,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAO,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ/C,OAAO,EAAe,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAWlE,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,QAAQ,GAAG;IACrC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1B,QAAQ,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACzD,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC;CACnB,CAAC;AAeF,wBAAgB,KAAK,CAAC,CAAC,EAAE,EACvB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,KAAc,EACd,MAAe,EACf,MAAM,EACN,gBAAgB,EAChB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,UAAU,CAAC,CAAC,CAAC,2CA2If"}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useSignalValue as
|
|
4
|
-
import { Box as
|
|
5
|
-
import { BodyText as
|
|
6
|
-
import { DataCell as
|
|
7
|
-
import { FooterCell as
|
|
8
|
-
import { HeaderCell as
|
|
9
|
-
import { StickyRowDataCell as
|
|
10
|
-
import { StickyRowFillCell as
|
|
11
|
-
import { TableColumn as
|
|
12
|
-
import { TablePresenter as
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import G, { useRef as P, isValidElement as W, useState as j } from "react";
|
|
3
|
+
import { useSignalValue as f, useRunnerStatus as A, Status as u } from "@tcn/state";
|
|
4
|
+
import { Box as I } from "@tcn/ui/stacks";
|
|
5
|
+
import { BodyText as V } from "@tcn/ui/typography";
|
|
6
|
+
import { DataCell as v } from "../cells/data_cell.js";
|
|
7
|
+
import { FooterCell as z } from "../cells/footer_cell.js";
|
|
8
|
+
import { HeaderCell as L } from "../cells/header_cell.js";
|
|
9
|
+
import { StickyRowDataCell as U } from "../cells/sticky_row_data_cell.js";
|
|
10
|
+
import { StickyRowFillCell as Y } from "../cells/sticky_row_fill_cell.js";
|
|
11
|
+
import { TableColumn as q } from "./table_column.js";
|
|
12
|
+
import { TablePresenter as J } from "./table_presenter.js";
|
|
13
|
+
import { TTable as K, THead as Q, TR as n, TH as X, TBody as Z, TD as N, TFoot as x } from "@tcn/ui/layouts";
|
|
14
|
+
import '../../table.css';const tt = "_table-body_b8c928c", w = { "table-body": tt }, C = 32, R = 24;
|
|
15
|
+
function T(s) {
|
|
16
|
+
return typeof s == "string" ? /* @__PURE__ */ r(V, { children: s }) : s;
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function yt({
|
|
18
19
|
dataSource: s,
|
|
19
|
-
stickyItems:
|
|
20
|
-
children:
|
|
21
|
-
width:
|
|
22
|
-
height:
|
|
23
|
-
zIndex:
|
|
24
|
-
isRowHighlighted:
|
|
25
|
-
onRowClick:
|
|
20
|
+
stickyItems: g,
|
|
21
|
+
children: $,
|
|
22
|
+
width: E = "100%",
|
|
23
|
+
height: H = "100%",
|
|
24
|
+
zIndex: D,
|
|
25
|
+
isRowHighlighted: b,
|
|
26
|
+
onRowClick: k,
|
|
26
27
|
..._
|
|
27
28
|
}) {
|
|
28
|
-
const
|
|
29
|
-
(t) =>
|
|
30
|
-
), [
|
|
31
|
-
() => new
|
|
29
|
+
const B = f(s.broadcasts.currentResults), p = f(s.broadcasts.currentPageIndex), S = P(null), F = G.Children.toArray($).filter(
|
|
30
|
+
(t) => W(t) && t.type === q
|
|
31
|
+
), [c] = j(
|
|
32
|
+
() => new J({
|
|
32
33
|
dataSource: s,
|
|
33
|
-
columns:
|
|
34
|
+
columns: F.map((t) => ({
|
|
34
35
|
fieldName: t.props.fieldName,
|
|
35
36
|
width: t.props.width ?? 100,
|
|
36
37
|
sortMode: "none",
|
|
@@ -40,96 +41,97 @@ function it({
|
|
|
40
41
|
sticky: t.props.sticky,
|
|
41
42
|
render: t.props.render
|
|
42
43
|
})),
|
|
43
|
-
scrollerRef:
|
|
44
|
+
scrollerRef: S
|
|
44
45
|
})
|
|
45
|
-
), d = c
|
|
46
|
+
), d = f(c.broadcasts.columnInfo), m = A(s.broadcasts.currentResults), M = f(c.broadcasts.showFooter), O = typeof k == "function";
|
|
46
47
|
return /* @__PURE__ */ r(
|
|
47
|
-
|
|
48
|
+
I,
|
|
48
49
|
{
|
|
49
|
-
ref:
|
|
50
|
-
zIndex:
|
|
50
|
+
ref: S,
|
|
51
|
+
zIndex: D,
|
|
51
52
|
className: w["table-body-wrapper"],
|
|
52
53
|
style: { overflow: "auto" },
|
|
53
54
|
..._,
|
|
54
55
|
children: /* @__PURE__ */ a(
|
|
55
|
-
|
|
56
|
+
K,
|
|
56
57
|
{
|
|
57
58
|
className: w["table-body"],
|
|
58
|
-
"data-is-clickable":
|
|
59
|
-
style: { width:
|
|
59
|
+
"data-is-clickable": O,
|
|
60
|
+
style: { width: E, height: H },
|
|
60
61
|
children: [
|
|
61
|
-
/* @__PURE__ */ r(
|
|
62
|
+
/* @__PURE__ */ r(Q, { children: /* @__PURE__ */ a(n, { children: [
|
|
62
63
|
d.map((t, e) => /* @__PURE__ */ r(
|
|
63
|
-
|
|
64
|
+
L,
|
|
64
65
|
{
|
|
65
66
|
index: e,
|
|
66
|
-
heading:
|
|
67
|
+
heading: T(t.heading),
|
|
67
68
|
sticky: t.sticky,
|
|
68
|
-
onResize: (o) =>
|
|
69
|
+
onResize: (o) => c.setColumnWidth(e, o),
|
|
69
70
|
width: t.width,
|
|
70
71
|
sortMode: t.sortMode,
|
|
71
|
-
onSortModeChange: () =>
|
|
72
|
+
onSortModeChange: () => c.setNextColumnSortMode(e),
|
|
72
73
|
canSort: t.canSort
|
|
73
74
|
},
|
|
74
75
|
`h-${e}`
|
|
75
76
|
)),
|
|
76
|
-
/* @__PURE__ */ r(
|
|
77
|
+
/* @__PURE__ */ r(X, { fill: !0, className: "fill" }, "fill")
|
|
77
78
|
] }) }),
|
|
78
|
-
/* @__PURE__ */ a(
|
|
79
|
-
|
|
80
|
-
d.map((o,
|
|
79
|
+
/* @__PURE__ */ a(Z, { children: [
|
|
80
|
+
g?.map((t, e) => /* @__PURE__ */ a(n, { "data-sticky-row": !0, children: [
|
|
81
|
+
d.map((o, y) => {
|
|
81
82
|
const i = o.fieldName, l = o.render, h = l ? l(t) : i ? String(t[i] ?? "") : "";
|
|
82
83
|
return /* @__PURE__ */ r(
|
|
83
|
-
|
|
84
|
+
U,
|
|
84
85
|
{
|
|
85
86
|
content: h,
|
|
86
87
|
sticky: o.sticky,
|
|
87
88
|
width: o.width,
|
|
88
|
-
top:
|
|
89
|
+
top: C + R * e
|
|
89
90
|
},
|
|
90
|
-
`${p}-${e}-${
|
|
91
|
+
`${p}-${e}-${y}`
|
|
91
92
|
);
|
|
92
93
|
}),
|
|
93
|
-
/* @__PURE__ */ r(
|
|
94
|
+
/* @__PURE__ */ r(Y, { top: C + R * e })
|
|
94
95
|
] }, `sticky-${e}`)),
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
m === u.SUCCESS && B.map((t, e) => /* @__PURE__ */ a(
|
|
97
|
+
n,
|
|
97
98
|
{
|
|
98
|
-
"data-selected":
|
|
99
|
-
|
|
99
|
+
"data-selected": b?.(t, e),
|
|
100
|
+
isSelected: b?.(t, e),
|
|
101
|
+
onClick: () => k?.(t, e),
|
|
100
102
|
children: [
|
|
101
|
-
d.map((o,
|
|
103
|
+
d.map((o, y) => {
|
|
102
104
|
const i = o.fieldName, l = o.render, h = l ? l(t) : i ? String(t[i] ?? "") : "";
|
|
103
105
|
return /* @__PURE__ */ r(
|
|
104
|
-
|
|
106
|
+
v,
|
|
105
107
|
{
|
|
106
108
|
content: h,
|
|
107
109
|
sticky: o.sticky,
|
|
108
110
|
width: o.width
|
|
109
111
|
},
|
|
110
|
-
`${p}-${e}-${
|
|
112
|
+
`${p}-${e}-${y}`
|
|
111
113
|
);
|
|
112
114
|
}),
|
|
113
|
-
/* @__PURE__ */ r(
|
|
115
|
+
/* @__PURE__ */ r(N, { fill: !0, className: "fill" }, "fill")
|
|
114
116
|
]
|
|
115
117
|
},
|
|
116
118
|
`${p}-${e}`
|
|
117
119
|
)),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/* @__PURE__ */ r(
|
|
120
|
+
m === u.PENDING && "Loading...",
|
|
121
|
+
m === u.ERROR && "Error loading data",
|
|
122
|
+
/* @__PURE__ */ r(n, { className: "fill" }, "fill")
|
|
121
123
|
] }),
|
|
122
|
-
|
|
124
|
+
M && /* @__PURE__ */ r(x, { children: /* @__PURE__ */ a(n, { children: [
|
|
123
125
|
d.map((t, e) => /* @__PURE__ */ r(
|
|
124
|
-
|
|
126
|
+
z,
|
|
125
127
|
{
|
|
126
|
-
content:
|
|
128
|
+
content: T(t.footer),
|
|
127
129
|
sticky: t.sticky,
|
|
128
130
|
width: t.width
|
|
129
131
|
},
|
|
130
132
|
`footer-${e}`
|
|
131
133
|
)),
|
|
132
|
-
/* @__PURE__ */ r(
|
|
134
|
+
/* @__PURE__ */ r(N, { fill: !0, className: "fill" }, "footer-fill")
|
|
133
135
|
] }) })
|
|
134
136
|
]
|
|
135
137
|
}
|
|
@@ -138,6 +140,6 @@ function it({
|
|
|
138
140
|
);
|
|
139
141
|
}
|
|
140
142
|
export {
|
|
141
|
-
|
|
143
|
+
yt as Table
|
|
142
144
|
};
|
|
143
145
|
//# sourceMappingURL=table.js.map
|