@bento-core/table 1.0.1-ccdihub.86 → 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.
@@ -5,6 +5,7 @@ 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");
8
9
  var _core = require("@material-ui/core");
9
10
  var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
10
11
  var _styles = require("@material-ui/core/styles");
@@ -62,8 +63,7 @@ const CPIModal = _ref => {
62
63
  open,
63
64
  onClose,
64
65
  row,
65
- themeConfig = {},
66
- navigation
66
+ themeConfig = {}
67
67
  } = _ref;
68
68
  const [sortBy, setSortBy] = (0, _react.useState)('associated_id');
69
69
  const [sortOrder, setSortOrder] = (0, _react.useState)('asc');
@@ -333,16 +333,17 @@ 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(_core.Button, {
337
- style: goToCartButton,
338
- onClick: () => navigation('/fileCentricCart')
336
+ })), /*#__PURE__*/_react.default.createElement(_reactRouterDom.NavLink, {
337
+ to: "/fileCentricCart"
338
+ }, /*#__PURE__*/_react.default.createElement(_core.Button, {
339
+ style: goToCartButton
339
340
  }, "GO TO CART", /*#__PURE__*/_react.default.createElement("img", {
340
341
  src: _Cart_Icon.default,
341
342
  alt: "cart",
342
343
  style: {
343
344
  paddingLeft: '30px'
344
345
  }
345
- }))), /*#__PURE__*/_react.default.createElement("div", {
346
+ })))), /*#__PURE__*/_react.default.createElement("div", {
346
347
  className: "footer",
347
348
  style: footer
348
349
  }, "To learn more about CPI click\xA0", /*#__PURE__*/_react.default.createElement("a", {
@@ -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 => "#".concat(rootPath, "/").concat(row[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.86",
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",
@@ -34,7 +34,8 @@
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"
37
+ "graphql-tag": "^2.12.6",
38
+ "react-router-dom": "^5.1.2"
38
39
  },
39
40
  "devDependencies": {},
40
41
  "description": ""
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from 'react';
2
+ import { NavLink } from 'react-router-dom';
2
3
  import {
3
4
  Box,
4
5
  Checkbox,
@@ -68,7 +69,6 @@ const CPIModal = ({
68
69
  onClose,
69
70
  row,
70
71
  themeConfig = {},
71
- navigation,
72
72
  }) => {
73
73
  const [sortBy, setSortBy] = useState('associated_id');
74
74
  const [sortOrder, setSortOrder] = useState('asc');
@@ -384,13 +384,14 @@ const CPIModal = ({
384
384
  buttonStyle={addSelectedFilesButton}
385
385
  rowID={row.id}
386
386
  />
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>
387
+ <NavLink to="/fileCentricCart">
388
+ <Button
389
+ style={goToCartButton}
390
+ >
391
+ GO TO CART
392
+ <img src={cartIcon} alt="cart" style={{ paddingLeft: '30px' }} />
393
+ </Button>
394
+ </NavLink>
394
395
  </div>
395
396
  <div className="footer" style={footer}>
396
397
  To learn more about CPI click&nbsp;
@@ -12,7 +12,7 @@ const CustomLinkView = ({
12
12
  row,
13
13
  }) => {
14
14
  const { rootPath, pathParams } = column?.linkAttr;
15
- const url = pathParams.map((attr) => `#${rootPath}/`.concat(row[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>