@cccsaurora/howler-ui 2.19.0-dev.1316 → 2.19.0-dev.1320

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.
@@ -83,7 +83,7 @@ const ContextMenu = ({ items, onOpen, onClose, Component = Box, id, children })
83
83
  sx: {
84
84
  minWidth: '250px',
85
85
  paddingY: '0 !important',
86
- '& > :first-child': {
86
+ '& > .first': {
87
87
  borderTopLeftRadius: theme.shape.borderRadius,
88
88
  borderTopRightRadius: theme.shape.borderRadius
89
89
  },
@@ -92,15 +92,19 @@ const ContextMenu = ({ items, onOpen, onClose, Component = Box, id, children })
92
92
  borderBottomRightRadius: theme.shape.borderRadius
93
93
  }
94
94
  }
95
- }, anchorOrigin: { vertical: 'top', horizontal: 'left' }, onClick: handleClose, children: items.map(entry => {
95
+ }, anchorOrigin: { vertical: 'top', horizontal: 'left' }, onClick: handleClose, children: items.map((entry, index) => {
96
+ let className = '';
97
+ if (index === 0) {
98
+ className = 'first';
99
+ }
96
100
  if (entry.kind === 'divider') {
97
- return _jsx(Divider, { sx: { my: '0 !important' } }, entry.id);
101
+ return _jsx(Divider, { className: className, sx: { my: '0 !important' } }, entry.id);
98
102
  }
99
103
  if (entry.kind === 'item') {
100
104
  if (entry.to) {
101
- return (_jsxs(MenuItem, { component: Link, to: entry.to, disabled: entry.disabled, children: [entry.icon && _jsx(ListItemIcon, { children: entry.icon }), _jsx(ListItemText, { children: entry.label })] }, entry.id));
105
+ return (_jsxs(MenuItem, { className: className, component: Link, to: entry.to, disabled: entry.disabled, children: [entry.icon && _jsx(ListItemIcon, { children: entry.icon }), _jsx(ListItemText, { children: entry.label })] }, entry.id));
102
106
  }
103
- return (_jsxs(MenuItem, { disabled: entry.disabled, onClick: entry.onClick, children: [entry.icon && _jsx(ListItemIcon, { children: entry.icon }), _jsx(ListItemText, { children: entry.label })] }, entry.id));
107
+ return (_jsxs(MenuItem, { className: className, disabled: entry.disabled, onClick: entry.onClick, children: [entry.icon && _jsx(ListItemIcon, { children: entry.icon }), _jsx(ListItemText, { children: entry.label })] }, entry.id));
104
108
  }
105
109
  const { id: entryId, icon, label, disabled, items: subItems } = entry;
106
110
  return (_jsxs(MenuItem, { id: `${entryId}-menu-item`, sx: { position: 'relative' }, onMouseEnter: ev => setShow(_show => ({ ..._show, [entryId]: ev.target })), onMouseLeave: () => setShow(_show => ({ ..._show, [entryId]: null })), disabled: disabled, children: [icon && _jsx(ListItemIcon, { children: icon }), _jsx(ListItemText, { sx: { flex: 1 }, children: label }), !disabled && _jsx(KeyboardArrowRight, { fontSize: "small", sx: { color: 'text.secondary', mr: -1 } }), _jsx(Fade, { in: !!show[entryId], unmountOnExit: true, children: _jsx(Paper, { id: `${entryId}-submenu`, sx: calculateSubMenuStyles(show[entryId]), elevation: 2, children: _jsx(MenuList, { sx: { p: 0, borderTopLeftRadius: 0 }, dense: true, role: "group", children: subItems.map(subItem => (_jsx(MenuItem, { onClick: subItem.onClick, disabled: subItem.disabled, children: _jsx(ListItemText, { children: subItem.label }) }, subItem.key))) }) }) })] }, entryId));
@@ -17,6 +17,6 @@ const HitOverview = ({ content, hit }) => {
17
17
  : hit
18
18
  ? `/overviews/view?analytic=${encodeURIComponent(hit?.howler.analytic)}${hit?.howler.detection && '&detection=' + encodeURIComponent(hit?.howler.detection)}`
19
19
  : null, [hit, matchingOverview]);
20
- return (_jsxs(Box, { sx: { position: 'relative', height: '100%', overflow: 'auto' }, children: [link && (_jsx(IconButton, { component: Link, to: link, sx: theme => ({ position: 'absolute', right: theme.spacing(1), top: theme.spacing(1) }), children: _jsx(InsertLink, {}) })), matchingOverview || content ? (_jsx(ErrorBoundary, { children: _jsx(HandlebarsMarkdown, { md: content ?? matchingOverview.content, object: hit, disableLinks: true }) })) : (_jsx(Skeleton, { variant: "rounded", height: "40vh" }))] }));
20
+ return (_jsxs(Box, { className: "no-margin-first-child", sx: { position: 'relative', height: '100%', overflow: 'auto' }, children: [matchingOverview || content ? (_jsx(ErrorBoundary, { children: _jsx(HandlebarsMarkdown, { md: content ?? matchingOverview.content, object: hit, disableLinks: true }) })) : (_jsx(Skeleton, { variant: "rounded", height: "40vh" })), link && (_jsx(IconButton, { component: Link, to: link, sx: theme => ({ position: 'absolute', right: theme.spacing(1), top: theme.spacing(1) }), children: _jsx(InsertLink, {}) }))] }));
21
21
  };
22
22
  export default memo(HitOverview);
@@ -17,10 +17,7 @@ const CaseOverview = ({ case: _case, updateCase }) => {
17
17
  if (!_case) {
18
18
  return _jsx(Skeleton, { height: 370 });
19
19
  }
20
- return (_jsxs(Card, { children: [_jsx(CardHeader, { title: _case.title, subheader: _case.summary }), _jsxs(Stack, { children: [_jsx(Divider, {}), _jsx(LinearProgress, { sx: { opacity: +loading } })] }), _jsx(CardContent, { sx: { position: 'relative' }, children: _jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(Box, { flex: 1, sx: {
21
- '& > :first-child': {
22
- marginTop: '0 !important'
23
- },
20
+ return (_jsxs(Card, { children: [_jsx(CardHeader, { title: _case.title, subheader: _case.summary }), _jsxs(Stack, { children: [_jsx(Divider, {}), _jsx(LinearProgress, { sx: { opacity: +loading } })] }), _jsx(CardContent, { children: _jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(Box, { flex: 1, className: "no-margin-first-child", sx: {
24
21
  '& > h1,h2,h3,h4,h5': {
25
22
  fontSize: theme.typography.h5.fontSize
26
23
  }
@@ -220,7 +220,6 @@ const OverviewViewer = () => {
220
220
  pt: 1,
221
221
  mt: -1,
222
222
  '& > *': { width: '100%' },
223
- '& > div > :first-child': { mt: 0 },
224
223
  backgroundColor: activeTheme.palette.background.default,
225
224
  color: activeTheme.palette.text.primary
226
225
  }, children: _jsx(HitOverview, { content: content || startingTemplate, hit: exampleHit }) }) })] }))] })] }));
package/index.css CHANGED
@@ -19,3 +19,7 @@ body {
19
19
  code {
20
20
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
21
21
  }
22
+
23
+ .no-margin-first-child > :first-child {
24
+ margin-top: 0 !important;
25
+ }
package/package.json CHANGED
@@ -56,8 +56,8 @@
56
56
  "react-markdown": "^10.1.0",
57
57
  "react-pluggable": "^0.4.3",
58
58
  "react-resize-detector": "^9.1.1",
59
- "react-router": "6.30.4",
60
- "react-router-dom": "6.30.4",
59
+ "react-router": "7.18.1",
60
+ "react-router-dom": "7.18.1",
61
61
  "react-syntax-highlighter": "^15.6.6",
62
62
  "rehype-raw": "^7.0.0",
63
63
  "remark": "^15.0.1",
@@ -93,7 +93,7 @@
93
93
  "url": "https://github.com/CybercentreCanada/howler"
94
94
  },
95
95
  "type": "module",
96
- "version": "2.19.0-dev.1316",
96
+ "version": "2.19.0-dev.1320",
97
97
  "exports": {
98
98
  "./i18n": "./i18n.js",
99
99
  "./index.css": "./index.css",