@bento-core/paginated-table 1.0.0 → 1.0.1-ccdihub.1
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.
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.ToolTipView = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _toolTip = _interopRequireDefault(require("@bento-core/tool-tip"));
|
|
8
9
|
var _core = require("@material-ui/core");
|
|
9
10
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
10
11
|
var _WrapperService = require("../../WrapperService");
|
|
@@ -12,6 +13,34 @@ var _AddToCartDialogView = _interopRequireDefault(require("../AddToCartDialog/Ad
|
|
|
12
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
const ToolTipView = props => {
|
|
17
|
+
const {
|
|
18
|
+
section,
|
|
19
|
+
tooltipCofig,
|
|
20
|
+
classes
|
|
21
|
+
} = props;
|
|
22
|
+
const {
|
|
23
|
+
icon,
|
|
24
|
+
src,
|
|
25
|
+
alt,
|
|
26
|
+
arrow = false,
|
|
27
|
+
tooltipText,
|
|
28
|
+
placement
|
|
29
|
+
} = tooltipCofig;
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_toolTip.default, {
|
|
31
|
+
placement: placement,
|
|
32
|
+
title: tooltipText || "".concat(tooltipCofig[section]),
|
|
33
|
+
arrow: arrow,
|
|
34
|
+
classes: {
|
|
35
|
+
tooltip: classes.customTooltip,
|
|
36
|
+
arrow: classes.customArrow
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
39
|
+
src: icon || src,
|
|
40
|
+
alt: alt
|
|
41
|
+
}));
|
|
42
|
+
};
|
|
43
|
+
exports.ToolTipView = ToolTipView;
|
|
15
44
|
const AddAllFilesComponent = props => {
|
|
16
45
|
const {
|
|
17
46
|
title,
|
|
@@ -23,7 +52,8 @@ const AddAllFilesComponent = props => {
|
|
|
23
52
|
addFiles,
|
|
24
53
|
setAlterDisplay,
|
|
25
54
|
setOpenSnackbar,
|
|
26
|
-
client
|
|
55
|
+
client,
|
|
56
|
+
tooltipCofig
|
|
27
57
|
} = props;
|
|
28
58
|
/**
|
|
29
59
|
* conditionally display dialog view
|
|
@@ -78,7 +108,7 @@ const AddAllFilesComponent = props => {
|
|
|
78
108
|
onClick: addAllFiles,
|
|
79
109
|
className: (0, _clsx.default)(clsName, "".concat(clsName, "_").concat(section)),
|
|
80
110
|
disableRipple: true
|
|
81
|
-
}, title), /*#__PURE__*/_react.default.createElement(_AddToCartDialogView.default, {
|
|
111
|
+
}, title), tooltipCofig && /*#__PURE__*/_react.default.createElement(ToolTipView, props), /*#__PURE__*/_react.default.createElement(_AddToCartDialogView.default, {
|
|
82
112
|
open: openAddDialog,
|
|
83
113
|
onYesClick: addFilesToCart,
|
|
84
114
|
onNoClick: toggleOpen
|
package/package.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/paginated-table",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "1.0.1-ccdihub.1",
|
|
5
4
|
"main": "dist/index.js",
|
|
6
5
|
"scripts": {
|
|
7
6
|
"build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
|
|
8
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
8
|
"lint": "eslint src"
|
|
10
9
|
},
|
|
11
|
-
"repository":
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/CBIIT/bento-frontend.git"
|
|
13
|
+
},
|
|
12
14
|
"publishConfig": {
|
|
13
15
|
"access": "public"
|
|
14
16
|
},
|
|
15
17
|
"dependencies": {
|
|
16
18
|
"@bento-core/cart": "^1.0.0",
|
|
17
|
-
"@bento-core/table": "
|
|
19
|
+
"@bento-core/table": "1.0.1-ccdihub.0",
|
|
18
20
|
"@bento-core/tool-tip": "^1.0.0",
|
|
19
21
|
"@bento-core/util": "^1.0.0"
|
|
20
22
|
},
|
|
@@ -28,5 +30,9 @@
|
|
|
28
30
|
},
|
|
29
31
|
"author": "CTOS Bento Team",
|
|
30
32
|
"license": "ISC",
|
|
31
|
-
"
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/CBIIT/bento-frontend/issues"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/CBIIT/bento-frontend#readme",
|
|
37
|
+
"description": ""
|
|
32
38
|
}
|
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
+
import ToolTip from '@bento-core/tool-tip';
|
|
2
3
|
import { Button } from '@material-ui/core';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
5
|
import { getFilesID } from '../../WrapperService';
|
|
5
6
|
import AddToCartDialogView from '../AddToCartDialog/AddToCartDialogView';
|
|
6
7
|
|
|
8
|
+
export const ToolTipView = (props) => {
|
|
9
|
+
const {
|
|
10
|
+
section,
|
|
11
|
+
tooltipCofig,
|
|
12
|
+
classes,
|
|
13
|
+
} = props;
|
|
14
|
+
const {
|
|
15
|
+
icon,
|
|
16
|
+
src,
|
|
17
|
+
alt,
|
|
18
|
+
arrow = false,
|
|
19
|
+
tooltipText,
|
|
20
|
+
placement,
|
|
21
|
+
} = tooltipCofig;
|
|
22
|
+
return (
|
|
23
|
+
<ToolTip
|
|
24
|
+
placement={placement}
|
|
25
|
+
title={tooltipText || `${tooltipCofig[section]}`}
|
|
26
|
+
arrow={arrow}
|
|
27
|
+
classes={{
|
|
28
|
+
tooltip: classes.customTooltip,
|
|
29
|
+
arrow: classes.customArrow,
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<img src={icon || src} alt={alt} />
|
|
33
|
+
</ToolTip>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
7
37
|
const AddAllFilesComponent = (props) => {
|
|
8
38
|
const {
|
|
9
39
|
title,
|
|
@@ -16,6 +46,7 @@ const AddAllFilesComponent = (props) => {
|
|
|
16
46
|
setAlterDisplay,
|
|
17
47
|
setOpenSnackbar,
|
|
18
48
|
client,
|
|
49
|
+
tooltipCofig,
|
|
19
50
|
} = props;
|
|
20
51
|
/**
|
|
21
52
|
* conditionally display dialog view
|
|
@@ -76,6 +107,7 @@ const AddAllFilesComponent = (props) => {
|
|
|
76
107
|
>
|
|
77
108
|
{title}
|
|
78
109
|
</Button>
|
|
110
|
+
{tooltipCofig && (<ToolTipView {...props} />)}
|
|
79
111
|
<AddToCartDialogView
|
|
80
112
|
open={openAddDialog}
|
|
81
113
|
onYesClick={addFilesToCart}
|