@cccsaurora/howler-ui 2.19.0-dev.1318 → 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.
- package/commons/components/app/hooks/useAppConfigs.d.ts +1 -1
- package/components/elements/ContextMenu.js +9 -5
- package/components/elements/hit/HitOverview.js +1 -1
- package/components/routes/cases/detail/CaseOverview.js +1 -4
- package/components/routes/overviews/OverviewViewer.js +0 -1
- package/index.css +4 -0
- package/package.json +3 -3
|
@@ -23,7 +23,7 @@ export declare function useAppConfigs(): {
|
|
|
23
23
|
hideNestedIcons?: boolean;
|
|
24
24
|
};
|
|
25
25
|
appName: string;
|
|
26
|
-
appLink?: import("react-router
|
|
26
|
+
appLink?: import("react-router").To;
|
|
27
27
|
appIconDark: import("react").ReactElement<any>;
|
|
28
28
|
appIconLight: import("react").ReactElement<any>;
|
|
29
29
|
bannerDark?: import("react").ReactElement<any>;
|
|
@@ -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
|
-
'& >
|
|
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: [
|
|
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, {
|
|
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
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": "
|
|
60
|
-
"react-router-dom": "7.
|
|
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.
|
|
96
|
+
"version": "2.19.0-dev.1320",
|
|
97
97
|
"exports": {
|
|
98
98
|
"./i18n": "./i18n.js",
|
|
99
99
|
"./index.css": "./index.css",
|