@bento-core/table 1.0.1-ccdihub.85 → 1.0.1-ccdihub.86
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/CPIModal.js +6 -7
- package/dist/body/components/CPIView.js +4 -2
- package/package.json +2 -3
- package/src/TableView.js +2 -0
- package/src/body/CustomTblBody.js +2 -0
- package/src/body/DisplayBodyCell.js +4 -0
- package/src/body/components/CPIModal.js +8 -9
- package/src/body/components/CPIView.js +2 -0
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;
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactRouterDom = require("react-router-dom");
|
|
9
8
|
var _core = require("@material-ui/core");
|
|
10
9
|
var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
|
|
11
10
|
var _styles = require("@material-ui/core/styles");
|
|
@@ -63,7 +62,8 @@ const CPIModal = _ref => {
|
|
|
63
62
|
open,
|
|
64
63
|
onClose,
|
|
65
64
|
row,
|
|
66
|
-
themeConfig = {}
|
|
65
|
+
themeConfig = {},
|
|
66
|
+
navigation
|
|
67
67
|
} = _ref;
|
|
68
68
|
const [sortBy, setSortBy] = (0, _react.useState)('associated_id');
|
|
69
69
|
const [sortOrder, setSortOrder] = (0, _react.useState)('asc');
|
|
@@ -333,17 +333,16 @@ const CPIModal = _ref => {
|
|
|
333
333
|
})), /*#__PURE__*/_react.default.createElement(_ReduxAddFile.default, _extends({}, wrapperConfig.items[1], {
|
|
334
334
|
buttonStyle: addSelectedFilesButton,
|
|
335
335
|
rowID: row.id
|
|
336
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
style: goToCartButton
|
|
336
|
+
})), /*#__PURE__*/_react.default.createElement(_core.Button, {
|
|
337
|
+
style: goToCartButton,
|
|
338
|
+
onClick: () => navigation('/fileCentricCart')
|
|
340
339
|
}, "GO TO CART", /*#__PURE__*/_react.default.createElement("img", {
|
|
341
340
|
src: _Cart_Icon.default,
|
|
342
341
|
alt: "cart",
|
|
343
342
|
style: {
|
|
344
343
|
paddingLeft: '30px'
|
|
345
344
|
}
|
|
346
|
-
})))
|
|
345
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
347
346
|
className: "footer",
|
|
348
347
|
style: footer
|
|
349
348
|
}, "To learn more about CPI click\xA0", /*#__PURE__*/_react.default.createElement("a", {
|
|
@@ -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",
|
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.86",
|
|
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",
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
"@bento-core/tool-tip": "^1.0.0",
|
|
35
35
|
"@bento-core/util": "^1.0.1-ccdihub.1",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
|
-
"graphql-tag": "^2.12.6"
|
|
38
|
-
"react-router-dom": "^5.1.2"
|
|
37
|
+
"graphql-tag": "^2.12.6"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {},
|
|
41
40
|
"description": ""
|
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
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { NavLink } from 'react-router-dom';
|
|
3
2
|
import {
|
|
4
3
|
Box,
|
|
5
4
|
Checkbox,
|
|
@@ -69,6 +68,7 @@ const CPIModal = ({
|
|
|
69
68
|
onClose,
|
|
70
69
|
row,
|
|
71
70
|
themeConfig = {},
|
|
71
|
+
navigation,
|
|
72
72
|
}) => {
|
|
73
73
|
const [sortBy, setSortBy] = useState('associated_id');
|
|
74
74
|
const [sortOrder, setSortOrder] = useState('asc');
|
|
@@ -384,14 +384,13 @@ const CPIModal = ({
|
|
|
384
384
|
buttonStyle={addSelectedFilesButton}
|
|
385
385
|
rowID={row.id}
|
|
386
386
|
/>
|
|
387
|
-
<
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
</NavLink>
|
|
387
|
+
<Button
|
|
388
|
+
style={goToCartButton}
|
|
389
|
+
onClick={() => navigation('/fileCentricCart')}
|
|
390
|
+
>
|
|
391
|
+
GO TO CART
|
|
392
|
+
<img src={cartIcon} alt="cart" style={{ paddingLeft: '30px' }} />
|
|
393
|
+
</Button>
|
|
395
394
|
</div>
|
|
396
395
|
<div className="footer" style={footer}>
|
|
397
396
|
To learn more about CPI click
|
|
@@ -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
|