@bento-core/table 1.0.1-ccdihub.85 → 1.0.1-ccdihub.87
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/TableView.js +4 -2
- package/dist/body/CustomTblBody.js +4 -2
- package/dist/body/DisplayBodyCell.js +8 -4
- package/dist/body/components/CPIView.js +4 -2
- package/dist/body/components/CustomLinkView.js +1 -1
- package/package.json +1 -1
- package/src/TableView.js +2 -0
- package/src/body/CustomTblBody.js +2 -0
- package/src/body/DisplayBodyCell.js +4 -0
- package/src/body/components/CPIView.js +2 -0
- package/src/body/components/CustomLinkView.js +1 -1
package/dist/TableView.js
CHANGED
|
@@ -71,7 +71,8 @@ const TableView = _ref => {
|
|
|
71
71
|
onSortByColumn,
|
|
72
72
|
onColumnViewChange,
|
|
73
73
|
themeConfig = {},
|
|
74
|
-
queryVariables
|
|
74
|
+
queryVariables,
|
|
75
|
+
navigation
|
|
75
76
|
} = _ref;
|
|
76
77
|
(0, _react.useEffect)(() => {
|
|
77
78
|
const tableContainer = document.getElementById('tableContainer');
|
|
@@ -122,7 +123,8 @@ const TableView = _ref => {
|
|
|
122
123
|
customTheme: themeConfig.tblBody,
|
|
123
124
|
rows: tableRows,
|
|
124
125
|
table: table,
|
|
125
|
-
onRowSelectChange: onRowSelectChange
|
|
126
|
+
onRowSelectChange: onRowSelectChange,
|
|
127
|
+
navigation: navigation
|
|
126
128
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
127
129
|
id: "addScrollContainer",
|
|
128
130
|
style: addScrollContainerStyle
|
|
@@ -26,7 +26,8 @@ const CustomTableBody = _ref => {
|
|
|
26
26
|
rows = [],
|
|
27
27
|
table,
|
|
28
28
|
onRowSelectChange,
|
|
29
|
-
customTheme = {}
|
|
29
|
+
customTheme = {},
|
|
30
|
+
navigation
|
|
30
31
|
} = _ref;
|
|
31
32
|
const {
|
|
32
33
|
columns
|
|
@@ -52,7 +53,8 @@ const CustomTableBody = _ref => {
|
|
|
52
53
|
return /*#__PURE__*/_react.default.createElement(_DisplayBodyCell.default, {
|
|
53
54
|
column: column,
|
|
54
55
|
row: row,
|
|
55
|
-
themeConfig: themeConfig
|
|
56
|
+
themeConfig: themeConfig,
|
|
57
|
+
navigation: navigation
|
|
56
58
|
});
|
|
57
59
|
})))));
|
|
58
60
|
};
|
|
@@ -41,7 +41,8 @@ const ViewCell = _ref2 => {
|
|
|
41
41
|
let {
|
|
42
42
|
column,
|
|
43
43
|
row,
|
|
44
|
-
themeConfig
|
|
44
|
+
themeConfig,
|
|
45
|
+
navigation
|
|
45
46
|
} = _ref2;
|
|
46
47
|
const {
|
|
47
48
|
cellType
|
|
@@ -66,7 +67,8 @@ const ViewCell = _ref2 => {
|
|
|
66
67
|
return /*#__PURE__*/_react.default.createElement(_CPIView.default, {
|
|
67
68
|
row: row,
|
|
68
69
|
column: column,
|
|
69
|
-
themeConfig: themeConfig
|
|
70
|
+
themeConfig: themeConfig,
|
|
71
|
+
navigation: navigation
|
|
70
72
|
});
|
|
71
73
|
default:
|
|
72
74
|
return /*#__PURE__*/_react.default.createElement(_core.Typography, null, row[column.dataField]);
|
|
@@ -76,14 +78,16 @@ const DisplayCell = _ref3 => {
|
|
|
76
78
|
let {
|
|
77
79
|
row,
|
|
78
80
|
column,
|
|
79
|
-
themeConfig
|
|
81
|
+
themeConfig,
|
|
82
|
+
navigation
|
|
80
83
|
} = _ref3;
|
|
81
84
|
return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
82
85
|
className: column.dataField
|
|
83
86
|
}, /*#__PURE__*/_react.default.createElement(ViewCell, {
|
|
84
87
|
row: row,
|
|
85
88
|
column: column,
|
|
86
|
-
themeConfig: themeConfig
|
|
89
|
+
themeConfig: themeConfig,
|
|
90
|
+
navigation: navigation
|
|
87
91
|
}));
|
|
88
92
|
};
|
|
89
93
|
var _default = DisplayCell;
|
|
@@ -20,7 +20,8 @@ const CPIView = _ref => {
|
|
|
20
20
|
let {
|
|
21
21
|
column,
|
|
22
22
|
row,
|
|
23
|
-
themeConfig
|
|
23
|
+
themeConfig,
|
|
24
|
+
navigation
|
|
24
25
|
} = _ref;
|
|
25
26
|
const useStyles = (0, _core.makeStyles)(() => ({
|
|
26
27
|
arrow: {
|
|
@@ -70,7 +71,8 @@ const CPIView = _ref => {
|
|
|
70
71
|
row: row,
|
|
71
72
|
open: modalOpen,
|
|
72
73
|
onClose: handleModalClose,
|
|
73
|
-
themeConfig: themeConfig
|
|
74
|
+
themeConfig: themeConfig,
|
|
75
|
+
navigation: navigation
|
|
74
76
|
}), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
75
77
|
interactive: true,
|
|
76
78
|
placement: "top",
|
|
@@ -20,7 +20,7 @@ const CustomLinkView = _ref => {
|
|
|
20
20
|
rootPath,
|
|
21
21
|
pathParams
|
|
22
22
|
} = column === null || column === void 0 ? void 0 : column.linkAttr;
|
|
23
|
-
const url = pathParams.map(attr => "
|
|
23
|
+
const url = pathParams.map(attr => "".concat(rootPath, "/").concat(row[attr]));
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement(_core.Link, {
|
|
25
25
|
href: url,
|
|
26
26
|
className: _Types.cellTypes.LINK
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/table",
|
|
3
|
-
"version": "1.0.1-ccdihub.
|
|
3
|
+
"version": "1.0.1-ccdihub.87",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
|
package/src/TableView.js
CHANGED
|
@@ -64,6 +64,7 @@ const TableView = ({
|
|
|
64
64
|
onColumnViewChange,
|
|
65
65
|
themeConfig = {},
|
|
66
66
|
queryVariables,
|
|
67
|
+
navigation,
|
|
67
68
|
}) => {
|
|
68
69
|
useEffect(() => {
|
|
69
70
|
const tableContainer = document.getElementById('tableContainer');
|
|
@@ -120,6 +121,7 @@ const TableView = ({
|
|
|
120
121
|
rows={tableRows}
|
|
121
122
|
table={table}
|
|
122
123
|
onRowSelectChange={onRowSelectChange}
|
|
124
|
+
navigation={navigation}
|
|
123
125
|
/>
|
|
124
126
|
</Table>
|
|
125
127
|
</CustomTableContainer>
|
|
@@ -22,6 +22,7 @@ const CustomTableBody = ({
|
|
|
22
22
|
table,
|
|
23
23
|
onRowSelectChange,
|
|
24
24
|
customTheme = {},
|
|
25
|
+
navigation,
|
|
25
26
|
}) => {
|
|
26
27
|
const { columns } = table;
|
|
27
28
|
const displayColunms = columns.filter((col) => col.display);
|
|
@@ -51,6 +52,7 @@ const CustomTableBody = ({
|
|
|
51
52
|
column={column}
|
|
52
53
|
row={row}
|
|
53
54
|
themeConfig={themeConfig}
|
|
55
|
+
navigation={navigation}
|
|
54
56
|
/>
|
|
55
57
|
);
|
|
56
58
|
})
|
|
@@ -31,6 +31,7 @@ const ViewCell = ({
|
|
|
31
31
|
column,
|
|
32
32
|
row,
|
|
33
33
|
themeConfig,
|
|
34
|
+
navigation,
|
|
34
35
|
}) => {
|
|
35
36
|
const { cellType } = column;
|
|
36
37
|
switch (cellType) {
|
|
@@ -61,6 +62,7 @@ const ViewCell = ({
|
|
|
61
62
|
row={row}
|
|
62
63
|
column={column}
|
|
63
64
|
themeConfig={themeConfig}
|
|
65
|
+
navigation={navigation}
|
|
64
66
|
/>
|
|
65
67
|
);
|
|
66
68
|
default:
|
|
@@ -76,12 +78,14 @@ const DisplayCell = ({
|
|
|
76
78
|
row,
|
|
77
79
|
column,
|
|
78
80
|
themeConfig,
|
|
81
|
+
navigation,
|
|
79
82
|
}) => (
|
|
80
83
|
<TableCell className={column.dataField}>
|
|
81
84
|
<ViewCell
|
|
82
85
|
row={row}
|
|
83
86
|
column={column}
|
|
84
87
|
themeConfig={themeConfig}
|
|
88
|
+
navigation={navigation}
|
|
85
89
|
/>
|
|
86
90
|
</TableCell>
|
|
87
91
|
);
|
|
@@ -16,6 +16,7 @@ const CPIView = ({
|
|
|
16
16
|
column,
|
|
17
17
|
row,
|
|
18
18
|
themeConfig,
|
|
19
|
+
navigation,
|
|
19
20
|
}) => {
|
|
20
21
|
const useStyles = makeStyles(() => ({
|
|
21
22
|
arrow: {
|
|
@@ -77,6 +78,7 @@ const CPIView = ({
|
|
|
77
78
|
open={modalOpen}
|
|
78
79
|
onClose={handleModalClose}
|
|
79
80
|
themeConfig={themeConfig}
|
|
81
|
+
navigation={navigation}
|
|
80
82
|
/>
|
|
81
83
|
<Tooltip
|
|
82
84
|
interactive
|
|
@@ -12,7 +12,7 @@ const CustomLinkView = ({
|
|
|
12
12
|
row,
|
|
13
13
|
}) => {
|
|
14
14
|
const { rootPath, pathParams } = column?.linkAttr;
|
|
15
|
-
const url = pathParams.map((attr) =>
|
|
15
|
+
const url = pathParams.map((attr) => `${rootPath}/`.concat(row[attr]));
|
|
16
16
|
return (
|
|
17
17
|
<Link href={url} className={cellTypes.LINK}>
|
|
18
18
|
<Typography>
|