@bsol-oss/react-datatable5 12.0.0-beta.13 → 12.0.0-beta.15
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/index.js +11 -7
- package/dist/index.mjs +11 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3558,6 +3558,8 @@ const TableDataDisplay = ({ colorPalette, emptyComponent, }) => {
|
|
|
3558
3558
|
overflow: "auto",
|
|
3559
3559
|
paddingX: "2",
|
|
3560
3560
|
py: "1",
|
|
3561
|
+
color: { base: "colorPalette.900", _dark: "colorPalette.100" },
|
|
3562
|
+
bgColor: { base: "colorPalette.100", _dark: "colorPalette.900" },
|
|
3561
3563
|
borderBottomColor: { base: "colorPalette.200", _dark: "colorPalette.800" },
|
|
3562
3564
|
borderBottomWidth: "1px",
|
|
3563
3565
|
...{ colorPalette },
|
|
@@ -3565,20 +3567,22 @@ const TableDataDisplay = ({ colorPalette, emptyComponent, }) => {
|
|
|
3565
3567
|
if (data.length <= 0) {
|
|
3566
3568
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: emptyComponent });
|
|
3567
3569
|
}
|
|
3568
|
-
return (jsxRuntime.jsxs(react.Grid, { templateColumns: `${columnWidths}`, overflow: "auto", borderWidth: "1px", borderColor: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: [jsxRuntime.jsx(react.Grid, { templateColumns: `${columnWidths}`, column: `1/span ${columns.length}`, bg: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: columnHeaders.map((header) => {
|
|
3570
|
+
return (jsxRuntime.jsxs(react.Grid, { templateColumns: `${columnWidths}`, overflow: "auto", borderWidth: "1px", color: { base: "colorPalette.900", _dark: "colorPalette.100" }, borderColor: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: [jsxRuntime.jsx(react.Grid, { templateColumns: `${columnWidths}`, column: `1/span ${columns.length}`, bg: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: columnHeaders.map((header) => {
|
|
3569
3571
|
return (jsxRuntime.jsx(react.Box, { flex: "1 0 0%", paddingX: "2", py: "1", overflow: "auto", textOverflow: "ellipsis", children: translate.t(`column_header.${header}`) }));
|
|
3570
3572
|
}) }), data.map((record) => {
|
|
3571
3573
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: columnHeaders.map((header) => {
|
|
3574
|
+
const { cell } = columnsMap[header];
|
|
3575
|
+
const value = record[header];
|
|
3572
3576
|
if (!!record === false) {
|
|
3573
3577
|
return (jsxRuntime.jsx(react.Box, { ...cellProps, children: translate.t(`column_cell.placeholder`) }));
|
|
3574
3578
|
}
|
|
3575
|
-
if (
|
|
3576
|
-
return (jsxRuntime.jsx(react.Box, { ...cellProps, children:
|
|
3579
|
+
if (cell) {
|
|
3580
|
+
return (jsxRuntime.jsx(react.Box, { ...cellProps, children: cell({ row: { original: record } }) }));
|
|
3577
3581
|
}
|
|
3578
|
-
if (typeof
|
|
3579
|
-
return (jsxRuntime.jsx(react.Box, { ...cellProps, children: jsxRuntime.jsx(RecordDisplay, { object:
|
|
3582
|
+
if (typeof value === "object") {
|
|
3583
|
+
return (jsxRuntime.jsx(react.Box, { ...cellProps, children: jsxRuntime.jsx(RecordDisplay, { object: value }) }));
|
|
3580
3584
|
}
|
|
3581
|
-
return jsxRuntime.jsx(react.Box, { ...cellProps, children:
|
|
3585
|
+
return jsxRuntime.jsx(react.Box, { ...cellProps, children: value });
|
|
3582
3586
|
}) }));
|
|
3583
3587
|
})] }));
|
|
3584
3588
|
};
|
|
@@ -5104,7 +5108,7 @@ const FormBody = () => {
|
|
|
5104
5108
|
setValidatedData(undefined);
|
|
5105
5109
|
const data = await getUpdatedData();
|
|
5106
5110
|
methods.reset(data);
|
|
5107
|
-
}, formNoValidate: true, children: translate.t("
|
|
5111
|
+
}, formNoValidate: true, children: translate.t("submit_again") }) })] }));
|
|
5108
5112
|
}
|
|
5109
5113
|
if (isConfirming) {
|
|
5110
5114
|
return (jsxRuntime.jsxs(react.Flex, { flexFlow: "column", gap: "2", children: [jsxRuntime.jsx(react.Grid, { gap: 4, gridTemplateColumns: "repeat(12, 1fr)", gridTemplateRows: `repeat(${rowNumber ?? "auto-fit"}, auto)`, children: ordered.map((column) => {
|
package/dist/index.mjs
CHANGED
|
@@ -3538,6 +3538,8 @@ const TableDataDisplay = ({ colorPalette, emptyComponent, }) => {
|
|
|
3538
3538
|
overflow: "auto",
|
|
3539
3539
|
paddingX: "2",
|
|
3540
3540
|
py: "1",
|
|
3541
|
+
color: { base: "colorPalette.900", _dark: "colorPalette.100" },
|
|
3542
|
+
bgColor: { base: "colorPalette.100", _dark: "colorPalette.900" },
|
|
3541
3543
|
borderBottomColor: { base: "colorPalette.200", _dark: "colorPalette.800" },
|
|
3542
3544
|
borderBottomWidth: "1px",
|
|
3543
3545
|
...{ colorPalette },
|
|
@@ -3545,20 +3547,22 @@ const TableDataDisplay = ({ colorPalette, emptyComponent, }) => {
|
|
|
3545
3547
|
if (data.length <= 0) {
|
|
3546
3548
|
return jsx(Fragment, { children: emptyComponent });
|
|
3547
3549
|
}
|
|
3548
|
-
return (jsxs(Grid, { templateColumns: `${columnWidths}`, overflow: "auto", borderWidth: "1px", borderColor: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: [jsx(Grid, { templateColumns: `${columnWidths}`, column: `1/span ${columns.length}`, bg: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: columnHeaders.map((header) => {
|
|
3550
|
+
return (jsxs(Grid, { templateColumns: `${columnWidths}`, overflow: "auto", borderWidth: "1px", color: { base: "colorPalette.900", _dark: "colorPalette.100" }, borderColor: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: [jsx(Grid, { templateColumns: `${columnWidths}`, column: `1/span ${columns.length}`, bg: { base: "colorPalette.200", _dark: "colorPalette.800" }, colorPalette, children: columnHeaders.map((header) => {
|
|
3549
3551
|
return (jsx(Box, { flex: "1 0 0%", paddingX: "2", py: "1", overflow: "auto", textOverflow: "ellipsis", children: translate.t(`column_header.${header}`) }));
|
|
3550
3552
|
}) }), data.map((record) => {
|
|
3551
3553
|
return (jsx(Fragment, { children: columnHeaders.map((header) => {
|
|
3554
|
+
const { cell } = columnsMap[header];
|
|
3555
|
+
const value = record[header];
|
|
3552
3556
|
if (!!record === false) {
|
|
3553
3557
|
return (jsx(Box, { ...cellProps, children: translate.t(`column_cell.placeholder`) }));
|
|
3554
3558
|
}
|
|
3555
|
-
if (
|
|
3556
|
-
return (jsx(Box, { ...cellProps, children:
|
|
3559
|
+
if (cell) {
|
|
3560
|
+
return (jsx(Box, { ...cellProps, children: cell({ row: { original: record } }) }));
|
|
3557
3561
|
}
|
|
3558
|
-
if (typeof
|
|
3559
|
-
return (jsx(Box, { ...cellProps, children: jsx(RecordDisplay, { object:
|
|
3562
|
+
if (typeof value === "object") {
|
|
3563
|
+
return (jsx(Box, { ...cellProps, children: jsx(RecordDisplay, { object: value }) }));
|
|
3560
3564
|
}
|
|
3561
|
-
return jsx(Box, { ...cellProps, children:
|
|
3565
|
+
return jsx(Box, { ...cellProps, children: value });
|
|
3562
3566
|
}) }));
|
|
3563
3567
|
})] }));
|
|
3564
3568
|
};
|
|
@@ -5084,7 +5088,7 @@ const FormBody = () => {
|
|
|
5084
5088
|
setValidatedData(undefined);
|
|
5085
5089
|
const data = await getUpdatedData();
|
|
5086
5090
|
methods.reset(data);
|
|
5087
|
-
}, formNoValidate: true, children: translate.t("
|
|
5091
|
+
}, formNoValidate: true, children: translate.t("submit_again") }) })] }));
|
|
5088
5092
|
}
|
|
5089
5093
|
if (isConfirming) {
|
|
5090
5094
|
return (jsxs(Flex, { flexFlow: "column", gap: "2", children: [jsx(Grid, { gap: 4, gridTemplateColumns: "repeat(12, 1fr)", gridTemplateRows: `repeat(${rowNumber ?? "auto-fit"}, auto)`, children: ordered.map((column) => {
|