@bento-core/table 1.0.1-ccdihub.9 → 1.0.1-ccdihub.91
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/DefaultThemConfig.js +1 -1
- package/dist/ExtendedView.js +25 -14
- package/dist/TableView.js +79 -7
- package/dist/body/CustomTblBody.js +5 -2
- package/dist/body/DisplayBodyCell.js +17 -3
- package/dist/body/components/CPIModal.js +363 -0
- package/dist/body/components/CPIView.js +117 -0
- package/dist/body/components/ModalStyle.js +121 -0
- package/dist/body/components/assets/CPI_icon.svg +22 -0
- package/dist/body/components/assets/Cart_Icon.svg +3 -0
- package/dist/body/components/assets/Question_Icon.svg +4 -0
- package/dist/header/ActionHeaderCell.js +2 -1
- package/dist/header/CustomCell.js +11 -3
- package/dist/header/CustomTblHeader.js +4 -1
- package/dist/header/components/CheckBoxView.js +3 -2
- package/dist/index.js +6 -0
- package/dist/pagination/CustomPagination.js +11 -2
- package/dist/toolbar/DownloadButtonView.js +173 -7
- package/dist/toolbar/ManageColumnView.js +115 -25
- package/dist/toolbar/assets/Hidden_Column.svg +4 -0
- package/dist/toolbar/assets/View_Columns.svg +6 -0
- package/dist/util/Dataformat.js +41 -1
- package/dist/util/Types.js +22 -2
- package/dist/util/downloadTable.js +196 -0
- package/dist/wrapper/WrapperService.js +36 -0
- package/dist/wrapper/components/AddFiles.js +63 -0
- package/dist/wrapper/components/AddToCartDialog/AddToCartDialogAlertView.js +35 -0
- package/dist/wrapper/components/AddToCartDialog/AddToCartDialogController.js +36 -0
- package/dist/wrapper/components/AddToCartDialog/AddToCartDialogView.js +43 -0
- package/dist/wrapper/components/CPIFilesView/CPIFilesView.js +178 -0
- package/dist/wrapper/components/ReduxAddFile.js +27 -0
- package/dist/wrapper/components/Snackbar/Snackbar.js +40 -0
- package/dist/wrapper/components/Snackbar/SnackbarRedux.js +16 -0
- package/dist/wrapper/components/Snackbar/SuccessOutlined.js +17 -0
- package/dist/wrapper/components/TextFieldView.js +37 -0
- package/dist/wrapper/components/TooltipView.js +40 -0
- package/package.json +11 -1
- package/src/DefaultThemConfig.js +1 -1
- package/src/ExtendedView.js +36 -21
- package/src/TableView.js +124 -52
- package/src/body/CustomTblBody.js +3 -0
- package/src/body/DisplayBodyCell.js +16 -0
- package/src/body/components/CPIModal.js +414 -0
- package/src/body/components/CPIView.js +135 -0
- package/src/body/components/ModalStyle.js +115 -0
- package/src/body/components/assets/CPI_icon.svg +22 -0
- package/src/body/components/assets/Cart_Icon.svg +3 -0
- package/src/body/components/assets/Question_Icon.svg +4 -0
- package/src/header/ActionHeaderCell.js +1 -1
- package/src/header/CustomCell.js +13 -0
- package/src/header/CustomTblHeader.js +1 -0
- package/src/header/components/CheckBoxView.js +2 -1
- package/src/index.js +1 -0
- package/src/pagination/CustomPagination.js +4 -1
- package/src/toolbar/DownloadButtonView.js +181 -10
- package/src/toolbar/ManageColumnView.js +114 -27
- package/src/toolbar/assets/Hidden_Column.svg +4 -0
- package/src/toolbar/assets/View_Columns.svg +6 -0
- package/src/util/Dataformat.js +25 -0
- package/src/util/Types.js +15 -0
- package/src/util/downloadTable.js +138 -0
- package/src/wrapper/WrapperService.js +25 -0
- package/src/wrapper/components/AddFiles.js +62 -0
- package/src/wrapper/components/AddToCartDialog/AddToCartDialogAlertView.js +37 -0
- package/src/wrapper/components/AddToCartDialog/AddToCartDialogController.js +32 -0
- package/src/wrapper/components/AddToCartDialog/AddToCartDialogView.js +57 -0
- package/src/wrapper/components/CPIFilesView/CPIFilesView.js +190 -0
- package/src/wrapper/components/ReduxAddFile.js +20 -0
- package/src/wrapper/components/Snackbar/Snackbar.js +43 -0
- package/src/wrapper/components/Snackbar/SnackbarRedux.js +11 -0
- package/src/wrapper/components/Snackbar/SuccessOutlined.js +10 -0
- package/src/wrapper/components/TextFieldView.js +32 -0
- package/src/wrapper/components/TooltipView.js +35 -0
|
@@ -7,34 +7,84 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("@material-ui/core");
|
|
9
9
|
var _icons = require("@material-ui/icons");
|
|
10
|
+
var _KeyboardArrowDownOutlined = _interopRequireDefault(require("@material-ui/icons/KeyboardArrowDownOutlined"));
|
|
10
11
|
var _Types = require("../util/Types");
|
|
12
|
+
var _View_Columns = _interopRequireDefault(require("./assets/View_Columns.svg"));
|
|
13
|
+
var _Hidden_Column = _interopRequireDefault(require("./assets/Hidden_Column.svg"));
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
15
|
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); }
|
|
12
16
|
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; }
|
|
13
17
|
const ManageColumnView = _ref => {
|
|
14
18
|
let {
|
|
15
19
|
table,
|
|
16
20
|
onColumnViewChange,
|
|
21
|
+
onAllColumnViewChange,
|
|
17
22
|
manageViewColumns
|
|
18
23
|
} = _ref;
|
|
19
24
|
if (!manageViewColumns) {
|
|
20
25
|
return null;
|
|
21
26
|
}
|
|
27
|
+
const {
|
|
28
|
+
columns
|
|
29
|
+
} = table;
|
|
22
30
|
const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
31
|
+
const [selectAll, setSelectAll] = (0, _react.useState)(false);
|
|
32
|
+
const viewColumns = columns.filter(col => col.role === _Types.cellTypes.DISPLAY);
|
|
23
33
|
const handleClick = event => {
|
|
24
34
|
setAnchorEl(event.currentTarget);
|
|
25
35
|
};
|
|
26
36
|
const handleClose = () => setAnchorEl(null);
|
|
37
|
+
const handleSelectAll = () => {
|
|
38
|
+
const state = selectAll;
|
|
39
|
+
setSelectAll(!selectAll);
|
|
40
|
+
onAllColumnViewChange(!state);
|
|
41
|
+
};
|
|
42
|
+
const columnDropdown = {
|
|
43
|
+
width: '48px',
|
|
44
|
+
height: '36px',
|
|
45
|
+
paddingLeft: '5px',
|
|
46
|
+
border: '0.75px solid #606060',
|
|
47
|
+
borderRadius: '5px',
|
|
48
|
+
display: 'inline-flex',
|
|
49
|
+
position: 'relative',
|
|
50
|
+
marginTop: '2px',
|
|
51
|
+
marginRight: '7px'
|
|
52
|
+
};
|
|
53
|
+
const displayColumnStyle = {
|
|
54
|
+
position: 'relative',
|
|
55
|
+
right: '20px',
|
|
56
|
+
bottom: '15px',
|
|
57
|
+
scale: '0.5'
|
|
58
|
+
};
|
|
59
|
+
const viewColumnsStyle = {
|
|
60
|
+
marginTop: '6px',
|
|
61
|
+
height: '24px',
|
|
62
|
+
right: '37px'
|
|
63
|
+
};
|
|
64
|
+
const arrowdownIcon = {
|
|
65
|
+
fill: '#606060'
|
|
66
|
+
};
|
|
27
67
|
const open = Boolean(anchorEl);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
+
style: columnDropdown
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
71
|
+
title: "Columns may be hidden"
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
73
|
+
src: _Hidden_Column.default,
|
|
74
|
+
alt: "hiddenColumnsIcon",
|
|
75
|
+
style: displayColumnStyle
|
|
76
|
+
})), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
33
77
|
title: manageViewColumns.title
|
|
34
78
|
}, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
35
79
|
variant: "contained",
|
|
36
|
-
onClick: handleClick
|
|
37
|
-
|
|
80
|
+
onClick: handleClick,
|
|
81
|
+
style: viewColumnsStyle
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
83
|
+
src: _View_Columns.default,
|
|
84
|
+
alt: "viewColumnsIcon"
|
|
85
|
+
}), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, {
|
|
86
|
+
style: arrowdownIcon
|
|
87
|
+
}))), /*#__PURE__*/_react.default.createElement(_core.Popover, {
|
|
38
88
|
open: open,
|
|
39
89
|
anchorEl: anchorEl,
|
|
40
90
|
onClose: handleClose,
|
|
@@ -47,31 +97,71 @@ const ManageColumnView = _ref => {
|
|
|
47
97
|
className: "viewColumnText"
|
|
48
98
|
}, manageViewColumns.title), /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
49
99
|
onClick: handleClose,
|
|
50
|
-
className: "closeIcon"
|
|
100
|
+
className: "closeIcon",
|
|
101
|
+
style: {
|
|
102
|
+
float: 'right'
|
|
103
|
+
}
|
|
51
104
|
}, /*#__PURE__*/_react.default.createElement(_icons.Close, null)), /*#__PURE__*/_react.default.createElement(_core.List, {
|
|
52
105
|
className: "viewColumnList"
|
|
53
106
|
}, viewColumns.map(column => /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
54
107
|
width: 1,
|
|
55
108
|
className: "viewColumnListItem"
|
|
56
|
-
}, /*#__PURE__*/_react.default.createElement(_core.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
110
|
+
control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
111
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
|
|
112
|
+
style: {
|
|
113
|
+
fontSize: 18
|
|
114
|
+
},
|
|
115
|
+
className: "checkBoxIcon"
|
|
116
|
+
}),
|
|
117
|
+
onClick: () => onColumnViewChange(column),
|
|
118
|
+
checked: column.display,
|
|
119
|
+
checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
|
|
120
|
+
style: {
|
|
121
|
+
fontSize: 18,
|
|
122
|
+
color: column.hideable ? 'rgba(11, 53, 86, 1)' : 'rgba(11, 53, 86, 0.38)'
|
|
123
|
+
},
|
|
124
|
+
className: "checkBoxIcon"
|
|
125
|
+
}),
|
|
126
|
+
disableRipple: true,
|
|
127
|
+
color: "secondary",
|
|
128
|
+
className: "checkBox",
|
|
129
|
+
disabled: !column.hideable
|
|
62
130
|
}),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
131
|
+
disabled: !column.hideable,
|
|
132
|
+
label: column.header
|
|
133
|
+
}))), /*#__PURE__*/_react.default.createElement(_core.Divider, {
|
|
134
|
+
style: {
|
|
135
|
+
color: '#375F9A',
|
|
136
|
+
marginTop: '5px',
|
|
137
|
+
marginBottom: '5px'
|
|
138
|
+
}
|
|
139
|
+
}), /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
140
|
+
width: 1,
|
|
141
|
+
className: "viewColumnListItem"
|
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
143
|
+
control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
144
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
|
|
145
|
+
style: {
|
|
146
|
+
fontSize: 18
|
|
147
|
+
},
|
|
148
|
+
className: "checkBoxIcon"
|
|
149
|
+
}),
|
|
150
|
+
onClick: () => handleSelectAll(),
|
|
151
|
+
checked: selectAll,
|
|
152
|
+
checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
|
|
153
|
+
style: {
|
|
154
|
+
fontSize: 18,
|
|
155
|
+
color: 'rgba(11, 53, 86, 1)'
|
|
156
|
+
},
|
|
157
|
+
className: "checkBoxIcon"
|
|
158
|
+
}),
|
|
159
|
+
disableRipple: true,
|
|
160
|
+
color: "secondary",
|
|
161
|
+
className: "checkBox"
|
|
70
162
|
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
className: "checkBox"
|
|
74
|
-
}), /*#__PURE__*/_react.default.createElement(_core.Typography, null, column.header))))));
|
|
163
|
+
label: selectAll ? 'Deselect All' : 'Select All'
|
|
164
|
+
})))));
|
|
75
165
|
};
|
|
76
166
|
const styles = () => ({
|
|
77
167
|
root: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="10" y="0.928786" width="12.2783" height="12.2783" rx="2.5" transform="rotate(45 10 0.928786)" fill="#FFEB13" stroke="black"/>
|
|
3
|
+
<path d="M9.99994 7.14529C9.74072 7.14529 9.52354 7.06575 9.3484 6.90667C9.18026 6.74068 9.09619 6.53664 9.09619 6.29457C9.09619 6.05249 9.18026 5.85192 9.3484 5.69284C9.52354 5.52684 9.74072 5.44385 9.99994 5.44385C10.2592 5.44385 10.4728 5.52684 10.641 5.69284C10.8161 5.85192 10.9037 6.05249 10.9037 6.29457C10.9037 6.53664 10.8161 6.74068 10.641 6.90667C10.4728 7.06575 10.2592 7.14529 9.99994 7.14529ZM10.725 7.83001V13.5776H9.25382V7.83001H10.725Z" fill="black"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2.88892 1.40607H17.1116C17.6636 1.40633 18.1116 1.85394 18.1116 2.40607V15.5936C18.1116 16.1457 17.6636 16.5933 17.1116 16.5936H2.88892C2.33663 16.5936 1.88892 16.1459 1.88892 15.5936V2.40607C1.88892 1.85378 2.33663 1.40607 2.88892 1.40607Z" fill="white" stroke="#606060" stroke-width="2"/>
|
|
3
|
+
<line x1="1.79956" y1="6.08969" x2="19.1106" y2="6.08969" stroke="#606060" stroke-width="2"/>
|
|
4
|
+
<line x1="13.2661" y1="7.09055" x2="13.2661" y2="17.5941" stroke="#606060" stroke-width="2"/>
|
|
5
|
+
<line x1="7.6936" y1="7.0903" x2="7.6936" y2="17.5939" stroke="#606060" stroke-width="2"/>
|
|
6
|
+
</svg>
|
package/dist/util/Dataformat.js
CHANGED
|
@@ -4,6 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.formatBytes = formatBytes;
|
|
7
|
+
exports.formatColumnValues = void 0;
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
13
|
/* eslint-disable import/prefer-default-export */
|
|
8
14
|
function formatBytes(bytes) {
|
|
9
15
|
let decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
@@ -12,4 +18,38 @@ function formatBytes(bytes) {
|
|
|
12
18
|
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
13
19
|
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
14
20
|
return "".concat(parseFloat((bytes / 1024 ** i).toFixed(dm)), " ").concat(sizes[i]);
|
|
15
|
-
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* convert zero (0) value to custom val
|
|
25
|
+
* @param {*} columns
|
|
26
|
+
* @param {*} data
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
const formatColumnValues = (columns, data) => {
|
|
30
|
+
const formatColumns = columns.filter(_ref => {
|
|
31
|
+
let {
|
|
32
|
+
columnDefaultValues
|
|
33
|
+
} = _ref;
|
|
34
|
+
return columnDefaultValues;
|
|
35
|
+
});
|
|
36
|
+
if (formatColumns.length > 0) {
|
|
37
|
+
const formatCoumnData = [...data].reduce((acc, item) => {
|
|
38
|
+
const updateRow = _objectSpread({}, item);
|
|
39
|
+
formatColumns.forEach(col => {
|
|
40
|
+
const {
|
|
41
|
+
columnDefaultValues,
|
|
42
|
+
dataField
|
|
43
|
+
} = col;
|
|
44
|
+
if (columnDefaultValues[item[dataField]]) {
|
|
45
|
+
updateRow[dataField] = columnDefaultValues[item[dataField]];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
acc.push(updateRow);
|
|
49
|
+
return acc;
|
|
50
|
+
}, []);
|
|
51
|
+
return formatCoumnData;
|
|
52
|
+
}
|
|
53
|
+
return data;
|
|
54
|
+
};
|
|
55
|
+
exports.formatColumnValues = formatColumnValues;
|
package/dist/util/Types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.headerTypes = exports.dataFormatTypes = exports.cellTypes = exports.actionCellTypes = exports.LINK = exports.FORMAT_DATA_CELLS = exports.FORMAT_DATA = exports.FORMAT_BYTES = exports.DISPLAY = exports.DELETE = exports.DEFAULT = exports.ComponentTypes = exports.CUSTOM_ELEM = exports.CHECKBOX = void 0;
|
|
6
|
+
exports.notIncludedCellStyle = exports.headerTypes = exports.dataFormatTypes = exports.cellTypes = exports.cellStyles = exports.actionCellTypes = exports.TRANSFORM = exports.STUDY_DOWNLOAD = exports.LINK = exports.FORMAT_DATA_CELLS = exports.FORMAT_DATA = exports.FORMAT_BYTES = exports.EXPAND = exports.DISPLAY = exports.DELETE = exports.DEFAULT = exports.DBGAP = exports.ComponentTypes = exports.CUSTOM_ELEM = exports.CPI = exports.CHECKBOX = void 0;
|
|
7
7
|
const CHECKBOX = 'CHECKBOX';
|
|
8
8
|
exports.CHECKBOX = CHECKBOX;
|
|
9
9
|
const DELETE = 'DELETE';
|
|
@@ -18,8 +18,18 @@ const DEFAULT = 'DEFAULT';
|
|
|
18
18
|
exports.DEFAULT = DEFAULT;
|
|
19
19
|
const FORMAT_DATA = 'FORMAT_DATA';
|
|
20
20
|
exports.FORMAT_DATA = FORMAT_DATA;
|
|
21
|
+
const CPI = 'CPI';
|
|
22
|
+
exports.CPI = CPI;
|
|
21
23
|
const FORMAT_BYTES = 'FORMAT_BYTES';
|
|
22
24
|
exports.FORMAT_BYTES = FORMAT_BYTES;
|
|
25
|
+
const TRANSFORM = 'TRANSFORM';
|
|
26
|
+
exports.TRANSFORM = TRANSFORM;
|
|
27
|
+
const STUDY_DOWNLOAD = 'STUDY_DOWNLOAD';
|
|
28
|
+
exports.STUDY_DOWNLOAD = STUDY_DOWNLOAD;
|
|
29
|
+
const EXPAND = 'EXPAND';
|
|
30
|
+
exports.EXPAND = EXPAND;
|
|
31
|
+
const DBGAP = 'DBGAP';
|
|
32
|
+
exports.DBGAP = DBGAP;
|
|
23
33
|
const cellTypes = {
|
|
24
34
|
CUSTOM_ELEM,
|
|
25
35
|
LINK,
|
|
@@ -27,11 +37,21 @@ const cellTypes = {
|
|
|
27
37
|
CHECKBOX,
|
|
28
38
|
DELETE,
|
|
29
39
|
DEFAULT,
|
|
30
|
-
FORMAT_DATA
|
|
40
|
+
FORMAT_DATA,
|
|
41
|
+
CPI
|
|
31
42
|
};
|
|
32
43
|
exports.cellTypes = cellTypes;
|
|
44
|
+
const cellStyles = {
|
|
45
|
+
TRANSFORM,
|
|
46
|
+
EXPAND,
|
|
47
|
+
DBGAP,
|
|
48
|
+
STUDY_DOWNLOAD
|
|
49
|
+
};
|
|
50
|
+
exports.cellStyles = cellStyles;
|
|
33
51
|
const actionCellTypes = [CHECKBOX, DELETE];
|
|
34
52
|
exports.actionCellTypes = actionCellTypes;
|
|
53
|
+
const notIncludedCellStyle = [STUDY_DOWNLOAD];
|
|
54
|
+
exports.notIncludedCellStyle = notIncludedCellStyle;
|
|
35
55
|
const FORMAT_DATA_CELLS = [FORMAT_BYTES];
|
|
36
56
|
exports.FORMAT_DATA_CELLS = FORMAT_DATA_CELLS;
|
|
37
57
|
const dataFormatTypes = {
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.convertToCSV = convertToCSV;
|
|
7
|
+
exports.createFileName = createFileName;
|
|
8
|
+
exports.downloadCSV = downloadCSV;
|
|
9
|
+
exports.downloadJson = downloadJson;
|
|
10
|
+
var _Dataformat = require("./Dataformat");
|
|
11
|
+
var _Types = require("./Types");
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
+
function createFileName(fileName, type) {
|
|
18
|
+
const date = new Date();
|
|
19
|
+
const yyyy = date.getFullYear();
|
|
20
|
+
let dd = date.getDate();
|
|
21
|
+
let mm = date.getMonth() + 1;
|
|
22
|
+
if (dd < 10) {
|
|
23
|
+
dd = "0".concat(dd);
|
|
24
|
+
}
|
|
25
|
+
if (mm < 10) {
|
|
26
|
+
mm = "0".concat(mm);
|
|
27
|
+
}
|
|
28
|
+
const todaysDate = "".concat(yyyy, "-").concat(mm, "-").concat(dd);
|
|
29
|
+
let hours = date.getHours();
|
|
30
|
+
let minutes = date.getMinutes();
|
|
31
|
+
let seconds = date.getSeconds();
|
|
32
|
+
if (hours < 10) {
|
|
33
|
+
hours = "0".concat(hours);
|
|
34
|
+
}
|
|
35
|
+
if (minutes < 10) {
|
|
36
|
+
minutes = "0".concat(minutes);
|
|
37
|
+
}
|
|
38
|
+
if (seconds < 10) {
|
|
39
|
+
seconds = "0".concat(seconds);
|
|
40
|
+
}
|
|
41
|
+
if (type === 'csv') {
|
|
42
|
+
return "".concat(fileName, " ").concat(todaysDate, " ").concat(hours, "-").concat(minutes, "-").concat(seconds, '.csv');
|
|
43
|
+
}
|
|
44
|
+
return "".concat(fileName, " ").concat(todaysDate, " ").concat(hours, "-").concat(minutes, "-").concat(seconds, '.json');
|
|
45
|
+
}
|
|
46
|
+
function convertToCSV(jsonse, keysToInclude, header) {
|
|
47
|
+
const objArray = jsonse;
|
|
48
|
+
// To Do empty object just print headers
|
|
49
|
+
const array = typeof objArray !== 'object' ? JSON.parse(objArray) : objArray;
|
|
50
|
+
let str = header.join(',');
|
|
51
|
+
array.map((entry, index) => {
|
|
52
|
+
let line = '';
|
|
53
|
+
keysToInclude.map(keyName => {
|
|
54
|
+
if (line !== '') line += ',';
|
|
55
|
+
if (keyName === 'file_size') {
|
|
56
|
+
line += entry[keyName] !== null ? "\"".concat((0, _Dataformat.formatBytes)(entry[keyName]), "\"") : ' ';
|
|
57
|
+
} else if (keyName === 'age_at_diagnosis' || keyName === 'participant_age_at_collection') {
|
|
58
|
+
if (entry[keyName] === -999) {
|
|
59
|
+
line += 'Not Reported';
|
|
60
|
+
} else {
|
|
61
|
+
line += entry[keyName] !== null ? "\"".concat(entry[keyName], "\"") : ' ';
|
|
62
|
+
}
|
|
63
|
+
} else if (keyName === 'last_known_survival_status' || keyName === 'sample_id' || keyName === 'data_category') {
|
|
64
|
+
if (!entry[keyName] || entry[keyName] === '[]') {
|
|
65
|
+
line += '';
|
|
66
|
+
} else if (entry[keyName].toString().charAt(0) === '[' && entry[keyName].toString().charAt(entry[keyName].toString().length - 1) === ']') {
|
|
67
|
+
line += "\"".concat(entry[keyName].toString().substring(1, entry[keyName].length - 1), "\"");
|
|
68
|
+
} else {
|
|
69
|
+
line += "\"".concat(entry[keyName], "\"");
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
line += entry[keyName] !== null ? "\"".concat(entry[keyName], "\"") : ' ';
|
|
73
|
+
}
|
|
74
|
+
return line;
|
|
75
|
+
});
|
|
76
|
+
if (index === 0) {
|
|
77
|
+
// str = header.join(',');
|
|
78
|
+
str += "\r\n".concat(line, "\r\n");
|
|
79
|
+
} else {
|
|
80
|
+
str += "".concat(line, "\r\n");
|
|
81
|
+
}
|
|
82
|
+
return str;
|
|
83
|
+
});
|
|
84
|
+
return str;
|
|
85
|
+
}
|
|
86
|
+
function downloadCSV(tableData, table, downloadFileName) {
|
|
87
|
+
const {
|
|
88
|
+
columns = []
|
|
89
|
+
} = table;
|
|
90
|
+
const filterColumns = columns.filter(_ref => {
|
|
91
|
+
let {
|
|
92
|
+
cellType
|
|
93
|
+
} = _ref;
|
|
94
|
+
return !_Types.actionCellTypes.includes(cellType);
|
|
95
|
+
}).filter(_ref2 => {
|
|
96
|
+
let {
|
|
97
|
+
cellStyle
|
|
98
|
+
} = _ref2;
|
|
99
|
+
return !_Types.notIncludedCellStyle.includes(cellStyle);
|
|
100
|
+
}).filter(_ref3 => {
|
|
101
|
+
let {
|
|
102
|
+
display
|
|
103
|
+
} = _ref3;
|
|
104
|
+
return display;
|
|
105
|
+
});
|
|
106
|
+
const formatDataVal = (0, _Dataformat.formatColumnValues)(filterColumns, tableData);
|
|
107
|
+
const jsonse = JSON.stringify(formatDataVal);
|
|
108
|
+
const keysToInclude = filterColumns.filter(_ref4 => {
|
|
109
|
+
let {
|
|
110
|
+
dataField
|
|
111
|
+
} = _ref4;
|
|
112
|
+
return dataField;
|
|
113
|
+
}).map(_ref5 => {
|
|
114
|
+
let {
|
|
115
|
+
dataField
|
|
116
|
+
} = _ref5;
|
|
117
|
+
return dataField;
|
|
118
|
+
});
|
|
119
|
+
const headers = filterColumns.filter(_ref6 => {
|
|
120
|
+
let {
|
|
121
|
+
dataField
|
|
122
|
+
} = _ref6;
|
|
123
|
+
return dataField;
|
|
124
|
+
}).map(_ref7 => {
|
|
125
|
+
let {
|
|
126
|
+
header,
|
|
127
|
+
downloadHeader
|
|
128
|
+
} = _ref7;
|
|
129
|
+
return downloadHeader || header;
|
|
130
|
+
});
|
|
131
|
+
const csv = convertToCSV(jsonse, keysToInclude, headers);
|
|
132
|
+
const exportData = new Blob([csv], {
|
|
133
|
+
type: 'text/csv'
|
|
134
|
+
});
|
|
135
|
+
const JsonURL = window.URL.createObjectURL(exportData);
|
|
136
|
+
let tempLink = '';
|
|
137
|
+
tempLink = document.createElement('a');
|
|
138
|
+
tempLink.setAttribute('href', JsonURL);
|
|
139
|
+
tempLink.setAttribute('download', createFileName(downloadFileName || '', 'csv'));
|
|
140
|
+
document.body.appendChild(tempLink);
|
|
141
|
+
tempLink.click();
|
|
142
|
+
document.body.removeChild(tempLink);
|
|
143
|
+
}
|
|
144
|
+
function downloadJson(tableData, table, downloadFileName) {
|
|
145
|
+
const {
|
|
146
|
+
columns = []
|
|
147
|
+
} = table;
|
|
148
|
+
const toDelete = columns.filter(e => !e.display);
|
|
149
|
+
const filterColumns = columns.filter(_ref8 => {
|
|
150
|
+
let {
|
|
151
|
+
cellType
|
|
152
|
+
} = _ref8;
|
|
153
|
+
return !_Types.actionCellTypes.includes(cellType);
|
|
154
|
+
}).filter(_ref9 => {
|
|
155
|
+
let {
|
|
156
|
+
display
|
|
157
|
+
} = _ref9;
|
|
158
|
+
return display;
|
|
159
|
+
});
|
|
160
|
+
let formatDataVal = (0, _Dataformat.formatColumnValues)(filterColumns, tableData);
|
|
161
|
+
formatDataVal = formatDataVal.map(entry => {
|
|
162
|
+
let survivalStatus = entry.last_known_survival_status;
|
|
163
|
+
let sampleId = entry.sample_id;
|
|
164
|
+
let dataCategory = entry.data_category;
|
|
165
|
+
const toReturn = _objectSpread({}, entry);
|
|
166
|
+
if (survivalStatus && survivalStatus.toString().charAt(0) === '[' && survivalStatus.toString().charAt(survivalStatus.toString().length - 1) === ']') {
|
|
167
|
+
survivalStatus = survivalStatus.toString().substring(1, survivalStatus.length - 1);
|
|
168
|
+
toReturn['Last Known Survival Status'] = survivalStatus;
|
|
169
|
+
}
|
|
170
|
+
if (sampleId && sampleId.toString().charAt(0) === '[' && sampleId.toString().charAt(sampleId.toString().length - 1) === ']') {
|
|
171
|
+
sampleId = sampleId.toString().substring(1, sampleId.length - 1);
|
|
172
|
+
toReturn['Sample Id'] = sampleId;
|
|
173
|
+
}
|
|
174
|
+
if (dataCategory && dataCategory.toString().charAt(0) === '[' && dataCategory.toString().charAt(dataCategory.toString().length - 1) === ']') {
|
|
175
|
+
dataCategory = dataCategory.toString().substring(1, dataCategory.length - 1);
|
|
176
|
+
toReturn['Data Category'] = dataCategory;
|
|
177
|
+
}
|
|
178
|
+
toDelete.forEach(column => delete toReturn[column.dataField]);
|
|
179
|
+
return toReturn;
|
|
180
|
+
});
|
|
181
|
+
filterColumns.forEach(column => {
|
|
182
|
+
formatDataVal = JSON.parse(JSON.stringify(formatDataVal).split("\"".concat(column.dataField, "\":")).join("\"".concat(column.header, "\":")));
|
|
183
|
+
});
|
|
184
|
+
const jsonse = JSON.stringify(formatDataVal);
|
|
185
|
+
const exportData = new Blob([jsonse], {
|
|
186
|
+
type: 'application/json'
|
|
187
|
+
});
|
|
188
|
+
const JsonURL = window.URL.createObjectURL(exportData);
|
|
189
|
+
let tempLink = '';
|
|
190
|
+
tempLink = document.createElement('a');
|
|
191
|
+
tempLink.setAttribute('href', JsonURL);
|
|
192
|
+
tempLink.setAttribute('download', createFileName(downloadFileName || '', 'json'));
|
|
193
|
+
document.body.appendChild(tempLink);
|
|
194
|
+
tempLink.click();
|
|
195
|
+
document.body.removeChild(tempLink);
|
|
196
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getQueryVariables = exports.getFilesID = void 0;
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
|
+
/**
|
|
13
|
+
* query varibales to fetch all the selected files id
|
|
14
|
+
*/
|
|
15
|
+
const getQueryVariables = variables => {
|
|
16
|
+
const queryVariables = _objectSpread({}, variables);
|
|
17
|
+
queryVariables.first = 200000;
|
|
18
|
+
return queryVariables;
|
|
19
|
+
};
|
|
20
|
+
exports.getQueryVariables = getQueryVariables;
|
|
21
|
+
const getFilesID = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
client,
|
|
24
|
+
variables,
|
|
25
|
+
query
|
|
26
|
+
} = _ref;
|
|
27
|
+
const queryVariables = getQueryVariables(variables);
|
|
28
|
+
return async function getFileIDs() {
|
|
29
|
+
const fetchResult = await client.query({
|
|
30
|
+
query,
|
|
31
|
+
variables: queryVariables
|
|
32
|
+
}).then(response => response.data);
|
|
33
|
+
return fetchResult;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
exports.getFilesID = getFilesID;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.btnTypes = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _client = require("@apollo/client");
|
|
9
|
+
var _CPIFilesView = _interopRequireDefault(require("./CPIFilesView/CPIFilesView"));
|
|
10
|
+
var _Snackbar = _interopRequireDefault(require("./Snackbar/Snackbar"));
|
|
11
|
+
var _AddToCartDialogAlertView = _interopRequireDefault(require("./AddToCartDialog/AddToCartDialogAlertView"));
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
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
|
+
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; }
|
|
15
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
|
+
const btnTypes = {
|
|
17
|
+
ADD_ALL_FILES: 'ADD_ALL_FILES',
|
|
18
|
+
ADD_SELECTED_FILES: 'ADD_SELECTED_FILES',
|
|
19
|
+
DOWNLOAD_MANIFEST: 'DOWNLOAD_MANIFEST'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* customize button based on configuration
|
|
23
|
+
* refer config table (wrapper component config)
|
|
24
|
+
*/
|
|
25
|
+
exports.btnTypes = btnTypes;
|
|
26
|
+
const AddFilesView = props => {
|
|
27
|
+
const {
|
|
28
|
+
count,
|
|
29
|
+
alertMessage,
|
|
30
|
+
cartFiles,
|
|
31
|
+
buttonStyle
|
|
32
|
+
} = props;
|
|
33
|
+
/**
|
|
34
|
+
* snackbar state
|
|
35
|
+
*/
|
|
36
|
+
const [openSnackbar, setOpenSnackbar] = (0, _react.useState)(false);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* conditionally display max file Alter/Error dialog view
|
|
40
|
+
*/
|
|
41
|
+
const [displayAlter, setAlterDisplay] = (0, _react.useState)(false);
|
|
42
|
+
/**
|
|
43
|
+
* acess bento app client via ApolloProvider
|
|
44
|
+
*/
|
|
45
|
+
const client = (0, _client.useApolloClient)();
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_CPIFilesView.default, _extends({}, props, {
|
|
47
|
+
client: client,
|
|
48
|
+
setAlterDisplay: setAlterDisplay,
|
|
49
|
+
setOpenSnackbar: setOpenSnackbar,
|
|
50
|
+
cartFiles: cartFiles,
|
|
51
|
+
buttonStyle: buttonStyle
|
|
52
|
+
})), /*#__PURE__*/_react.default.createElement(_Snackbar.default, {
|
|
53
|
+
open: openSnackbar,
|
|
54
|
+
count: count,
|
|
55
|
+
onClose: () => setOpenSnackbar(false)
|
|
56
|
+
}), displayAlter && /*#__PURE__*/_react.default.createElement(_AddToCartDialogAlertView.default, {
|
|
57
|
+
alertMessage: alertMessage,
|
|
58
|
+
open: displayAlter,
|
|
59
|
+
onClose: () => setAlterDisplay(false)
|
|
60
|
+
}));
|
|
61
|
+
};
|
|
62
|
+
var _default = AddFilesView;
|
|
63
|
+
exports.default = _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _core = require("@material-ui/core");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function AddToCartDialogAlertView(props) {
|
|
11
|
+
const {
|
|
12
|
+
open,
|
|
13
|
+
onClose,
|
|
14
|
+
alertMessage
|
|
15
|
+
} = props;
|
|
16
|
+
const closeAlertModelTimer = 4000;
|
|
17
|
+
const AlertDialog = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.Dialog, {
|
|
18
|
+
open: open,
|
|
19
|
+
"aria-labelledby": "alert-dialog-title",
|
|
20
|
+
"aria-describedby": "alert-dialog-description"
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement(_core.DialogContent, {
|
|
22
|
+
className: "alter-content"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement(_core.DialogContentText, {
|
|
24
|
+
id: "alert-dialog-description"
|
|
25
|
+
}, alertMessage))));
|
|
26
|
+
if (open) {
|
|
27
|
+
// close the Dialog after 3 seconds.
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
onClose();
|
|
30
|
+
}, closeAlertModelTimer);
|
|
31
|
+
}
|
|
32
|
+
return AlertDialog;
|
|
33
|
+
}
|
|
34
|
+
var _default = AddToCartDialogAlertView;
|
|
35
|
+
exports.default = _default;
|