@veritone-ce/design-system 1.12.14 → 1.12.16
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/assets/theme.js +314 -261
- package/dist/components/Box/__tests__/Box.test.js +15 -9
- package/dist/components/Box/index.js +16 -17
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.js +34 -29
- package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.js +25 -14
- package/dist/components/Breadcrumbs/breadcrumbs.theme.js +16 -9
- package/dist/components/Breadcrumbs/index.js +50 -27
- package/dist/components/Button/Button.stories.js +89 -37
- package/dist/components/Button/Indicator.js +32 -17
- package/dist/components/Button/__tests__/Button.test.js +58 -33
- package/dist/components/Button/button.theme.js +121 -102
- package/dist/components/Button/index.js +44 -34
- package/dist/components/Button/useButtonProps.js +17 -15
- package/dist/components/Checkbox/Checkbox.stories.js +46 -16
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +14 -9
- package/dist/components/Checkbox/checkbox.theme.js +23 -16
- package/dist/components/Checkbox/index.js +22 -17
- package/dist/components/CustomSlider/CustomSlider.stories.js +43 -24
- package/dist/components/CustomSlider/index.js +73 -55
- package/dist/components/Drawer/__tests__/Drawer.test.js +15 -9
- package/dist/components/Drawer/index.js +16 -17
- package/dist/components/FileUploader/FileUploader.stories.js +23 -24
- package/dist/components/FileUploader/__tests__/FileUploader.test.js +210 -220
- package/dist/components/FileUploader/index.js +211 -151
- package/dist/components/FileUploader/useUploadFile.js +69 -81
- package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.js +18 -9
- package/dist/components/FormControlLabel/index.js +16 -17
- package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.js +19 -20
- package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.js +14 -9
- package/dist/components/HomeOutlinedIcon/index.js +16 -17
- package/dist/components/IconGroups/IconGroups.stories.js +19 -20
- package/dist/components/IconGroups/__tests__/IconGroups.test.js +14 -9
- package/dist/components/IconGroups/index.js +17 -17
- package/dist/components/IconListItem/__tests__/IconListItem.test.js +14 -9
- package/dist/components/IconListItem/index.js +19 -17
- package/dist/components/Input/Input.stories.js +111 -51
- package/dist/components/Input/__tests__/Input.test.js +13 -9
- package/dist/components/Input/index.js +22 -19
- package/dist/components/Input/input.theme.js +104 -97
- package/dist/components/LinearProgress/LinearProgress.stories.js +42 -28
- package/dist/components/LinearProgress/__tests__/LinearProgress.test.js +39 -17
- package/dist/components/LinearProgress/index.js +71 -21
- package/dist/components/LinearProgress/linearProgress.theme.js +19 -12
- package/dist/components/Link/__tests__/Link.test.js +14 -9
- package/dist/components/Link/index.js +16 -17
- package/dist/components/List/__tests__/List.test.js +14 -9
- package/dist/components/List/index.js +16 -17
- package/dist/components/ListItem/__tests__/ListItem.test.js +14 -9
- package/dist/components/ListItem/index.js +16 -17
- package/dist/components/ListItemButton/__tests__/ListItemButton.test.js +14 -9
- package/dist/components/ListItemButton/index.js +16 -17
- package/dist/components/ListItemText/__tests__/ListItemText.test.js +14 -9
- package/dist/components/ListItemText/index.js +16 -17
- package/dist/components/MenuFlyout/MenuFlyout.stories.js +54 -32
- package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.js +41 -23
- package/dist/components/MenuFlyout/constants.js +12 -3
- package/dist/components/MenuFlyout/index.js +47 -26
- package/dist/components/MenuFlyout/menuFlyout.theme.js +46 -38
- package/dist/components/Modal/Modal.stories.js +190 -95
- package/dist/components/Modal/__tests__/Modal.test.js +16 -9
- package/dist/components/Modal/index.js +30 -17
- package/dist/components/Modal/modal.theme.js +30 -23
- package/dist/components/ModelGridView/ModelGridView.stories.js +40 -43
- package/dist/components/ModelGridView/__tests__/ModelGridView.test.js +47 -42
- package/dist/components/ModelGridView/index.js +258 -150
- package/dist/components/Panel/Panel.stories.js +61 -44
- package/dist/components/Panel/__tests__/Panel.test.js +73 -43
- package/dist/components/Panel/index.js +116 -78
- package/dist/components/ProgressIndicator/DefaultProgress.js +28 -20
- package/dist/components/ProgressIndicator/MLProgress.js +30 -24
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.js +41 -38
- package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.js +31 -17
- package/dist/components/ProgressIndicator/index.js +26 -18
- package/dist/components/RadioButton/RadioButton.stories.js +37 -28
- package/dist/components/RadioButton/RadioButton.theme.js +59 -52
- package/dist/components/RadioButton/__tests__/RadioButton.test.js +13 -9
- package/dist/components/RadioButton/index.js +37 -28
- package/dist/components/RadioGroup/__tests__/RadioGroup.test.js +14 -9
- package/dist/components/RadioGroup/index.js +16 -17
- package/dist/components/Select/Select.stories.js +82 -33
- package/dist/components/Select/__tests__/Select.test.js +39 -18
- package/dist/components/Select/index.js +99 -49
- package/dist/components/Select/select.theme.js +58 -51
- package/dist/components/StatusChip/StatusChip.stories.js +57 -43
- package/dist/components/StatusChip/__tests__/StatusChip.test.js +44 -27
- package/dist/components/StatusChip/constants.js +12 -3
- package/dist/components/StatusChip/index.js +28 -22
- package/dist/components/StatusChip/statusChip.theme.js +41 -22
- package/dist/components/Step/__tests__/Step.test.js +14 -9
- package/dist/components/Step/index.js +16 -17
- package/dist/components/StepLabel/__tests__/StepLabel.test.js +14 -9
- package/dist/components/StepLabel/index.js +16 -17
- package/dist/components/Stepper/Stepper.stories.js +37 -21
- package/dist/components/Stepper/__tests__/Stepper.test.js +14 -9
- package/dist/components/Stepper/index.js +15 -5
- package/dist/components/Stepper/stepper.theme.js +52 -45
- package/dist/components/Tabs/Badge.js +29 -10
- package/dist/components/Tabs/Tabs.stories.js +52 -33
- package/dist/components/Tabs/__tests__/Tabs.test.js +41 -14
- package/dist/components/Tabs/index.js +27 -18
- package/dist/components/Tabs/tabs.theme.js +34 -27
- package/dist/components/ThemeProvider/__tests__/Button.test.js +14 -9
- package/dist/components/ThemeProvider/index.js +19 -6
- package/dist/components/Toast/Toast.stories.js +103 -37
- package/dist/components/Toast/__tests__/Toast.test.js +47 -29
- package/dist/components/Toast/index.js +58 -38
- package/dist/components/Typography/Typography.stories.js +20 -20
- package/dist/components/Typography/__tests__/Typography.test.js +15 -9
- package/dist/components/Typography/index.js +16 -17
- package/dist/components/UtilityRail/UtilityRail.stories.js +22 -21
- package/dist/components/UtilityRail/__tests__/UtilityRail.test.js +17 -10
- package/dist/components/UtilityRail/index.js +75 -53
- package/dist/components/UtilityRail/mock.js +32 -32
- package/dist/index.js +223 -31
- package/dist/react-app-env.d.js +2 -0
- package/dist/reportWebVitals.js +26 -11
- package/dist/setupTests.js +3 -5
- package/dist/utils/tests/helpers.js +31 -20
- package/package.json +9 -4
- package/dist/assets/theme.d.ts +0 -59
- package/dist/components/Box/__tests__/Box.test.d.ts +0 -1
- package/dist/components/Box/index.d.ts +0 -6
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
- package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.d.ts +0 -1
- package/dist/components/Breadcrumbs/breadcrumbs.theme.d.ts +0 -11
- package/dist/components/Breadcrumbs/index.d.ts +0 -15
- package/dist/components/Button/Button.stories.d.ts +0 -7
- package/dist/components/Button/Indicator.d.ts +0 -2
- package/dist/components/Button/__tests__/Button.test.d.ts +0 -1
- package/dist/components/Button/button.theme.d.ts +0 -4
- package/dist/components/Button/index.d.ts +0 -10
- package/dist/components/Button/useButtonProps.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/components/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
- package/dist/components/Checkbox/checkbox.theme.d.ts +0 -18
- package/dist/components/Checkbox/index.d.ts +0 -7
- package/dist/components/CustomSlider/CustomSlider.stories.d.ts +0 -5
- package/dist/components/CustomSlider/index.d.ts +0 -12
- package/dist/components/Drawer/__tests__/Drawer.test.d.ts +0 -1
- package/dist/components/Drawer/index.d.ts +0 -6
- package/dist/components/FileUploader/FileUploader.stories.d.ts +0 -15
- package/dist/components/FileUploader/__tests__/FileUploader.test.d.ts +0 -1
- package/dist/components/FileUploader/index.d.ts +0 -21
- package/dist/components/FileUploader/useUploadFile.d.ts +0 -5
- package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.d.ts +0 -1
- package/dist/components/FormControlLabel/index.d.ts +0 -6
- package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.d.ts +0 -7
- package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.d.ts +0 -1
- package/dist/components/HomeOutlinedIcon/index.d.ts +0 -5
- package/dist/components/IconGroups/IconGroups.stories.d.ts +0 -7
- package/dist/components/IconGroups/__tests__/IconGroups.test.d.ts +0 -1
- package/dist/components/IconGroups/index.d.ts +0 -5
- package/dist/components/IconListItem/__tests__/IconListItem.test.d.ts +0 -1
- package/dist/components/IconListItem/index.d.ts +0 -7
- package/dist/components/Input/Input.stories.d.ts +0 -11
- package/dist/components/Input/__tests__/Input.test.d.ts +0 -1
- package/dist/components/Input/index.d.ts +0 -6
- package/dist/components/Input/input.theme.d.ts +0 -3
- package/dist/components/LinearProgress/LinearProgress.stories.d.ts +0 -14
- package/dist/components/LinearProgress/__tests__/LinearProgress.test.d.ts +0 -1
- package/dist/components/LinearProgress/index.d.ts +0 -27
- package/dist/components/LinearProgress/linearProgress.theme.d.ts +0 -14
- package/dist/components/Link/__tests__/Link.test.d.ts +0 -1
- package/dist/components/Link/index.d.ts +0 -6
- package/dist/components/List/__tests__/List.test.d.ts +0 -1
- package/dist/components/List/index.d.ts +0 -6
- package/dist/components/ListItem/__tests__/ListItem.test.d.ts +0 -1
- package/dist/components/ListItem/index.d.ts +0 -6
- package/dist/components/ListItemButton/__tests__/ListItemButton.test.d.ts +0 -1
- package/dist/components/ListItemButton/index.d.ts +0 -6
- package/dist/components/ListItemText/__tests__/ListItemText.test.d.ts +0 -1
- package/dist/components/ListItemText/index.d.ts +0 -6
- package/dist/components/MenuFlyout/MenuFlyout.stories.d.ts +0 -31
- package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.d.ts +0 -1
- package/dist/components/MenuFlyout/constants.d.ts +0 -3
- package/dist/components/MenuFlyout/index.d.ts +0 -15
- package/dist/components/MenuFlyout/menuFlyout.theme.d.ts +0 -41
- package/dist/components/Modal/Modal.stories.d.ts +0 -15
- package/dist/components/Modal/__tests__/Modal.test.d.ts +0 -1
- package/dist/components/Modal/index.d.ts +0 -11
- package/dist/components/Modal/modal.theme.d.ts +0 -3
- package/dist/components/ModelGridView/ModelGridView.stories.d.ts +0 -5
- package/dist/components/ModelGridView/__tests__/ModelGridView.test.d.ts +0 -1
- package/dist/components/ModelGridView/index.d.ts +0 -13
- package/dist/components/Panel/Panel.stories.d.ts +0 -14
- package/dist/components/Panel/__tests__/Panel.test.d.ts +0 -1
- package/dist/components/Panel/index.d.ts +0 -11
- package/dist/components/ProgressIndicator/DefaultProgress.d.ts +0 -3
- package/dist/components/ProgressIndicator/MLProgress.d.ts +0 -3
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.d.ts +0 -7
- package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.d.ts +0 -1
- package/dist/components/ProgressIndicator/index.d.ts +0 -11
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -10
- package/dist/components/RadioButton/RadioButton.theme.d.ts +0 -4
- package/dist/components/RadioButton/__tests__/RadioButton.test.d.ts +0 -1
- package/dist/components/RadioButton/index.d.ts +0 -7
- package/dist/components/RadioGroup/__tests__/RadioGroup.test.d.ts +0 -1
- package/dist/components/RadioGroup/index.d.ts +0 -6
- package/dist/components/Select/Select.stories.d.ts +0 -5
- package/dist/components/Select/__tests__/Select.test.d.ts +0 -1
- package/dist/components/Select/index.d.ts +0 -15
- package/dist/components/Select/select.theme.d.ts +0 -53
- package/dist/components/StatusChip/StatusChip.stories.d.ts +0 -51
- package/dist/components/StatusChip/__tests__/StatusChip.test.d.ts +0 -1
- package/dist/components/StatusChip/constants.d.ts +0 -3
- package/dist/components/StatusChip/index.d.ts +0 -28
- package/dist/components/StatusChip/statusChip.theme.d.ts +0 -4
- package/dist/components/Step/__tests__/Step.test.d.ts +0 -1
- package/dist/components/Step/index.d.ts +0 -6
- package/dist/components/StepLabel/__tests__/StepLabel.test.d.ts +0 -1
- package/dist/components/StepLabel/index.d.ts +0 -6
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -21
- package/dist/components/Stepper/__tests__/Stepper.test.d.ts +0 -1
- package/dist/components/Stepper/index.d.ts +0 -13
- package/dist/components/Stepper/stepper.theme.d.ts +0 -50
- package/dist/components/Tabs/Badge.d.ts +0 -7
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -6
- package/dist/components/Tabs/__tests__/Tabs.test.d.ts +0 -1
- package/dist/components/Tabs/index.d.ts +0 -14
- package/dist/components/Tabs/tabs.theme.d.ts +0 -4
- package/dist/components/ThemeProvider/__tests__/Button.test.d.ts +0 -1
- package/dist/components/ThemeProvider/index.d.ts +0 -3
- package/dist/components/Toast/Toast.stories.d.ts +0 -14
- package/dist/components/Toast/__tests__/Toast.test.d.ts +0 -1
- package/dist/components/Toast/index.d.ts +0 -23
- package/dist/components/Typography/Typography.stories.d.ts +0 -20
- package/dist/components/Typography/__tests__/Typography.test.d.ts +0 -1
- package/dist/components/Typography/index.d.ts +0 -6
- package/dist/components/UtilityRail/UtilityRail.stories.d.ts +0 -8
- package/dist/components/UtilityRail/__tests__/UtilityRail.test.d.ts +0 -1
- package/dist/components/UtilityRail/index.d.ts +0 -11
- package/dist/components/UtilityRail/mock.d.ts +0 -2
- package/dist/index.d.ts +0 -31
- package/dist/reportWebVitals.d.ts +0 -3
- package/dist/setupTests.d.ts +0 -1
- package/dist/utils/tests/helpers.d.ts +0 -6
|
@@ -1,159 +1,267 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
var _utils = require("@mui/utils");
|
|
10
|
+
var _MoreVert = _interopRequireDefault(require("@mui/icons-material/MoreVert"));
|
|
11
|
+
var _EditOutlined = _interopRequireDefault(require("@mui/icons-material/EditOutlined"));
|
|
12
|
+
var _ArticleRounded = _interopRequireDefault(require("@mui/icons-material/ArticleRounded"));
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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; }
|
|
8
17
|
function descendingComparator(a, b, orderBy) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
if (b[orderBy] < a[orderBy]) {
|
|
19
|
+
return -1;
|
|
20
|
+
}
|
|
21
|
+
if (b[orderBy] > a[orderBy]) {
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
return 0;
|
|
16
25
|
}
|
|
26
|
+
|
|
17
27
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
28
|
function getComparator(order, orderBy) {
|
|
19
|
-
|
|
20
|
-
? (a, b) => descendingComparator(a, b, orderBy)
|
|
21
|
-
: (a, b) => -descendingComparator(a, b, orderBy);
|
|
29
|
+
return order === 'desc' ? (a, b) => descendingComparator(a, b, orderBy) : (a, b) => -descendingComparator(a, b, orderBy);
|
|
22
30
|
}
|
|
23
|
-
const headCells = [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
id: 'deployed',
|
|
52
|
-
numeric: false,
|
|
53
|
-
disablePadding: true,
|
|
54
|
-
label: 'Deployed'
|
|
55
|
-
}
|
|
56
|
-
];
|
|
31
|
+
const headCells = [{
|
|
32
|
+
id: 'modelName',
|
|
33
|
+
numeric: false,
|
|
34
|
+
disablePadding: false,
|
|
35
|
+
label: 'Model Name',
|
|
36
|
+
sortable: true
|
|
37
|
+
}, {
|
|
38
|
+
id: 'lastModified',
|
|
39
|
+
numeric: false,
|
|
40
|
+
disablePadding: false,
|
|
41
|
+
label: 'Last Modified',
|
|
42
|
+
sortable: true
|
|
43
|
+
}, {
|
|
44
|
+
id: 'consentForm',
|
|
45
|
+
numeric: false,
|
|
46
|
+
disablePadding: true,
|
|
47
|
+
label: 'Consent Form'
|
|
48
|
+
}, {
|
|
49
|
+
id: 'versions',
|
|
50
|
+
numeric: false,
|
|
51
|
+
disablePadding: true,
|
|
52
|
+
label: 'Versions'
|
|
53
|
+
}, {
|
|
54
|
+
id: 'deployed',
|
|
55
|
+
numeric: false,
|
|
56
|
+
disablePadding: true,
|
|
57
|
+
label: 'Deployed'
|
|
58
|
+
}];
|
|
57
59
|
function EnhancedTableHead(props) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
60
|
+
const {
|
|
61
|
+
order,
|
|
62
|
+
orderBy,
|
|
63
|
+
onRequestSort
|
|
64
|
+
} = props;
|
|
65
|
+
const createSortHandler = property => event => {
|
|
66
|
+
onRequestSort(event, property);
|
|
67
|
+
};
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableHead, {
|
|
69
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.TableRow, {
|
|
70
|
+
sx: {
|
|
71
|
+
'& .MuiTableCell-root': {
|
|
72
|
+
borderBottomColor: theme => theme.palette.text.disabled,
|
|
73
|
+
padding: '14.25px 16px',
|
|
74
|
+
'&.MuiTableCell-paddingNone': {
|
|
75
|
+
padding: 0
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
children: [headCells.map(headCell => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.TableCell, {
|
|
80
|
+
padding: headCell.disablePadding ? 'none' : 'normal',
|
|
81
|
+
sortDirection: orderBy === headCell.id ? order : false,
|
|
82
|
+
children: [headCell.label, headCell.sortable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableSortLabel, {
|
|
83
|
+
active: orderBy === headCell.id,
|
|
84
|
+
direction: orderBy === headCell.id ? order : 'desc',
|
|
85
|
+
onClick: createSortHandler(headCell.id),
|
|
86
|
+
sx: {
|
|
87
|
+
'& .MuiSvgIcon-root': {
|
|
88
|
+
opacity: 1,
|
|
89
|
+
fill: '#1B1D1F',
|
|
90
|
+
':hover': {
|
|
91
|
+
opacity: 1,
|
|
92
|
+
fill: '#1B1D1F'
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
children: orderBy === headCell.id ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
97
|
+
component: "span",
|
|
98
|
+
sx: _utils.visuallyHidden,
|
|
99
|
+
children: order === 'desc' ? 'sorted descending' : 'sorted ascending'
|
|
100
|
+
}) : null
|
|
101
|
+
})]
|
|
102
|
+
}, headCell.id)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {})]
|
|
103
|
+
})
|
|
104
|
+
});
|
|
82
105
|
}
|
|
83
|
-
const ModelGridView = ({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
const ModelGridView = ({
|
|
107
|
+
rows
|
|
108
|
+
}) => {
|
|
109
|
+
const [order, setOrder] = React.useState('desc');
|
|
110
|
+
const [orderBy, setOrderBy] = React.useState('lastModified');
|
|
111
|
+
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
112
|
+
const open = Boolean(anchorEl);
|
|
113
|
+
const menuOptions = [{
|
|
114
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EditOutlined.default, {}),
|
|
115
|
+
label: 'Edit Model'
|
|
116
|
+
}, {
|
|
117
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArticleRounded.default, {}),
|
|
118
|
+
label: 'View Conset Form'
|
|
119
|
+
}];
|
|
120
|
+
const handleClick = event => {
|
|
121
|
+
setAnchorEl(event.currentTarget);
|
|
122
|
+
};
|
|
123
|
+
const handleClose = () => {
|
|
124
|
+
setAnchorEl(null);
|
|
125
|
+
};
|
|
126
|
+
const handleRequestSort = (event, property) => {
|
|
127
|
+
const isAsc = orderBy === property && order === 'asc';
|
|
128
|
+
setOrder(isAsc ? 'desc' : 'asc');
|
|
129
|
+
setOrderBy(property);
|
|
130
|
+
};
|
|
131
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
132
|
+
sx: {
|
|
133
|
+
width: '100%'
|
|
134
|
+
},
|
|
135
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Paper, {
|
|
136
|
+
sx: {
|
|
137
|
+
width: '100%',
|
|
138
|
+
mb: 2,
|
|
139
|
+
boxShadow: 'none'
|
|
140
|
+
},
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableContainer, {
|
|
142
|
+
sx: {
|
|
143
|
+
'& .MuiTableCell-root': {
|
|
144
|
+
lineHeight: '21px',
|
|
145
|
+
fontWeight: 400
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Table, {
|
|
149
|
+
sx: {
|
|
150
|
+
minWidth: 750
|
|
151
|
+
},
|
|
152
|
+
"aria-labelledby": "tableTitle",
|
|
153
|
+
size: 'medium',
|
|
154
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(EnhancedTableHead, {
|
|
155
|
+
order: order,
|
|
156
|
+
orderBy: orderBy,
|
|
157
|
+
onRequestSort: handleRequestSort
|
|
158
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableBody, {
|
|
159
|
+
children: rows.slice().sort(getComparator(order, orderBy)).map((row, index) => {
|
|
160
|
+
const labelId = `enhanced-table-checkbox-${index}`;
|
|
161
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.TableRow, {
|
|
162
|
+
tabIndex: -1,
|
|
163
|
+
sx: {
|
|
164
|
+
'& .MuiTableCell-root': {
|
|
165
|
+
borderBottomColor: theme => theme.palette.misc.altBackground,
|
|
166
|
+
padding: '17px 16px',
|
|
167
|
+
'&.MuiTableCell-paddingNone': {
|
|
168
|
+
padding: 0
|
|
107
169
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {
|
|
173
|
+
component: "th",
|
|
174
|
+
id: labelId,
|
|
175
|
+
scope: "row",
|
|
176
|
+
padding: "none",
|
|
177
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Link, {
|
|
178
|
+
href: "#",
|
|
179
|
+
underline: "always",
|
|
180
|
+
sx: {
|
|
181
|
+
'&.MuiLink-underlineAlways': {
|
|
182
|
+
color: theme => theme.palette.button.main,
|
|
183
|
+
textDecorationColor: theme => theme.palette.button.main
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
children: row.modelName
|
|
187
|
+
})
|
|
188
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {
|
|
189
|
+
align: "left",
|
|
190
|
+
children: row.lastModified
|
|
191
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {
|
|
192
|
+
align: "left",
|
|
193
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
194
|
+
sx: {
|
|
195
|
+
display: 'flex',
|
|
196
|
+
flexDirection: 'row',
|
|
197
|
+
justifyContent: 'center',
|
|
198
|
+
alignItems: 'center',
|
|
199
|
+
backgroundColor: theme => theme.palette.success.main,
|
|
200
|
+
color: theme => theme.palette.common.white,
|
|
201
|
+
width: '82px',
|
|
202
|
+
height: '18px',
|
|
203
|
+
borderRadius: '2px',
|
|
204
|
+
fontStyle: 'normal',
|
|
205
|
+
fontWeight: 800,
|
|
206
|
+
fontSize: '9px',
|
|
207
|
+
lineHeight: '12px',
|
|
208
|
+
textTransform: 'uppercase'
|
|
209
|
+
},
|
|
210
|
+
children: row.consentForm
|
|
211
|
+
})
|
|
212
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {
|
|
213
|
+
align: "left",
|
|
214
|
+
children: row.versions
|
|
215
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {
|
|
216
|
+
align: "left",
|
|
217
|
+
children: row.deployed === 0 ? '--' : row.deployed
|
|
218
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.TableCell, {
|
|
219
|
+
align: "right",
|
|
220
|
+
padding: "none",
|
|
221
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
222
|
+
"aria-label": "more",
|
|
223
|
+
id: "long-button",
|
|
224
|
+
"aria-controls": open ? 'long-menu' : undefined,
|
|
225
|
+
"aria-expanded": open ? 'true' : undefined,
|
|
226
|
+
"aria-haspopup": "true",
|
|
227
|
+
onClick: handleClick,
|
|
228
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MoreVert.default, {})
|
|
229
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Menu, {
|
|
230
|
+
id: "long-menu",
|
|
231
|
+
MenuListProps: {
|
|
232
|
+
'aria-labelledby': 'long-button'
|
|
233
|
+
},
|
|
234
|
+
anchorEl: anchorEl,
|
|
235
|
+
open: open,
|
|
236
|
+
onClose: handleClose,
|
|
237
|
+
PaperProps: {
|
|
238
|
+
style: {
|
|
239
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.25)',
|
|
240
|
+
borderRadius: 0
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
children: menuOptions.map(option => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.MenuItem, {
|
|
244
|
+
onClick: handleClose,
|
|
245
|
+
sx: {
|
|
246
|
+
fontSize: '14px',
|
|
247
|
+
lineHeight: '20px',
|
|
248
|
+
height: '46px',
|
|
249
|
+
gap: '13px',
|
|
250
|
+
'& .MuiSvgIcon-root': {
|
|
251
|
+
color: theme => theme.palette.text.tertiary
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
children: [option.icon, option.label]
|
|
255
|
+
}, option.label))
|
|
256
|
+
})]
|
|
257
|
+
})]
|
|
258
|
+
}, row.modelName);
|
|
259
|
+
})
|
|
260
|
+
})]
|
|
261
|
+
})
|
|
262
|
+
})
|
|
263
|
+
})
|
|
264
|
+
});
|
|
158
265
|
};
|
|
159
|
-
|
|
266
|
+
var _default = ModelGridView;
|
|
267
|
+
exports.default = _default;
|
|
@@ -1,46 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Small = exports.Medium = exports.Big = void 0;
|
|
7
|
+
var _ = _interopRequireDefault(require("."));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
var _default = {
|
|
11
|
+
title: 'Components/Panel',
|
|
12
|
+
component: _.default,
|
|
13
|
+
argTypes: {
|
|
14
|
+
title: {
|
|
15
|
+
defaultValue: 'Panel',
|
|
16
|
+
control: {
|
|
17
|
+
type: 'text'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
isOpen: {
|
|
21
|
+
control: {
|
|
22
|
+
type: 'boolean'
|
|
23
|
+
},
|
|
24
|
+
defaultValue: true
|
|
25
|
+
},
|
|
26
|
+
handleClose: {
|
|
27
|
+
control: false
|
|
28
|
+
},
|
|
29
|
+
'data-testid': {
|
|
30
|
+
control: false
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
control: false
|
|
33
34
|
}
|
|
35
|
+
}
|
|
34
36
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
37
|
+
exports.default = _default;
|
|
38
|
+
const Big = ({
|
|
39
|
+
...args
|
|
40
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
41
|
+
title: "Big Panel",
|
|
42
|
+
isOpen: true,
|
|
43
|
+
...args
|
|
44
|
+
});
|
|
45
|
+
exports.Big = Big;
|
|
46
|
+
const Medium = ({
|
|
47
|
+
...args
|
|
48
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
49
|
+
title: "Medium Panel",
|
|
50
|
+
isOpen: true,
|
|
51
|
+
size: "medium",
|
|
52
|
+
...args
|
|
53
|
+
});
|
|
54
|
+
exports.Medium = Medium;
|
|
55
|
+
const Small = ({
|
|
56
|
+
...args
|
|
57
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
58
|
+
title: "Small Panel",
|
|
59
|
+
size: "small",
|
|
60
|
+
isOpen: true,
|
|
61
|
+
...args
|
|
62
|
+
});
|
|
63
|
+
exports.Small = Small;
|