@cccsaurora/howler-ui 2.17.0-dev.559 → 2.17.0-dev.560

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.
@@ -12,6 +12,6 @@ const HitLinks = ({ hit, analytic, dossiers = [] }) => {
12
12
  .slice(0, 3)
13
13
  .map(l => (_jsx(Grid, { item: true, children: _jsx(RelatedLink, { compact: true, ...l }) }, l.href))), dossiers.flatMap(_dossier => (_dossier.pivots ?? []).map((_pivot, index) => (
14
14
  // eslint-disable-next-line react/no-array-index-key
15
- _jsx(Grid, { item: true, children: _jsx(PivotLink, { pivot: _pivot, hit: hit, compact: true }) }, _dossier.dossier_id + index)))), analytic?.notebooks?.length > 0 && (_jsx(Grid, { item: true, children: _jsx(HitNotebooks, { analytic: analytic, hit: hit }) }))] })));
15
+ _jsx(Grid, { item: true, children: _jsx(PivotLink, { pivot: _pivot, hit: hit, compact: true }) }, _dossier.dossier_id + index)))), analytic?.notebooks?.length > 0 && (_jsx(Grid, { item: true, children: _jsx(HitNotebooks, { analytic: analytic, hit: hit, compact: true }) }))] })));
16
16
  };
17
17
  export default HitLinks;
@@ -4,5 +4,6 @@ declare const _default: import("react").NamedExoticComponent<{
4
4
  analytic: Analytic;
5
5
  selectedNotebook?: string;
6
6
  hit?: Hit;
7
+ compact?: boolean;
7
8
  }>;
8
9
  export default _default;
@@ -20,7 +20,7 @@ const FETCH_OPTIONS = {
20
20
  },
21
21
  mode: 'cors'
22
22
  };
23
- const HitNotebooks = ({ analytic, selectedNotebook, hit }) => {
23
+ const HitNotebooks = ({ analytic, selectedNotebook, hit, compact }) => {
24
24
  const { t } = useTranslation();
25
25
  const { config } = useContext(ApiConfigContext);
26
26
  const { showErrorMessage } = useMySnackbar();
@@ -124,14 +124,18 @@ const HitNotebooks = ({ analytic, selectedNotebook, hit }) => {
124
124
  MenuProps: {
125
125
  style: { zIndex: 35001 }
126
126
  }
127
- }, defaultValue: selectedNotebook ? analytic?.notebooks.find(n => n.name === selectedNotebook).value : '', children: [_jsx(MenuItem, { disabled: true, value: "", children: _jsx("em", { children: t('hit.notebook.select') }) }), analytic?.notebooks.sort(safeStringPropertyCompare('detection')).map(e => (_jsx(MenuItem, { value: e.value, children: _jsxs(Stack, { direction: 'row', sx: { width: '100%' }, children: [e.name, e.detection && (_jsxs(_Fragment, { children: [_jsx(Box, { flex: 1 }), _jsx(Chip, { label: e.detection, size: "small" })] }))] }) }, e.value)))] }), _jsx(Button, { variant: "outlined", disabled: loadedNotebook.name === '' || envs.length === 0, color: "success", onClick: () => checkJupyhub(), children: t('hit.notebook.goTo') })] })] }) })) }), _jsx(HowlerCard, { variant: "elevation", onClick: handleToggle, sx: [
127
+ }, defaultValue: selectedNotebook ? analytic?.notebooks.find(n => n.name === selectedNotebook).value : '', children: [_jsx(MenuItem, { disabled: true, value: "", children: _jsx("em", { children: t('hit.notebook.select') }) }), analytic?.notebooks.sort(safeStringPropertyCompare('detection')).map(e => (_jsx(MenuItem, { value: e.value, children: _jsxs(Stack, { direction: 'row', sx: { width: '100%' }, children: [e.name, e.detection && (_jsxs(_Fragment, { children: [_jsx(Box, { flex: 1 }), _jsx(Chip, { label: e.detection, size: "small" })] }))] }) }, e.value)))] }), _jsx(Button, { variant: "outlined", disabled: loadedNotebook.name === '' || envs.length === 0, color: "success", onClick: () => checkJupyhub(), children: t('hit.notebook.goTo') })] })] }) })) }), _jsx(HowlerCard, { variant: compact ? 'outlined' : 'elevation', onClick: handleToggle, sx: [
128
128
  theme => ({
129
129
  cursor: 'pointer',
130
130
  backgroundColor: 'transparent',
131
131
  transition: theme.transitions.create(['border-color']),
132
- '&:hover': { borderColor: 'primary.main' }
132
+ '&:hover': { borderColor: 'primary.main', '& a': { textDecoration: 'underline' } },
133
+ '& > div': {
134
+ height: '100%'
135
+ },
136
+ '& a': { textDecoration: 'none', color: 'text.primary' }
133
137
  }),
134
- { border: 'thin solid', borderColor: 'transparent' }
138
+ !compact && { border: 'thin solid', borderColor: 'transparent' }
135
139
  ], children: _jsxs(Stack, { direction: "row", p: 1, spacing: 1, alignItems: "center", children: [_jsx(Avatar, { variant: "rounded", src: '/images/jupyter_notebook_file_icon.png', sx: [
136
140
  theme => ({
137
141
  width: theme.spacing(3),
package/package.json CHANGED
@@ -101,7 +101,7 @@
101
101
  "internal-slot": "1.0.7"
102
102
  },
103
103
  "type": "module",
104
- "version": "2.17.0-dev.559",
104
+ "version": "2.17.0-dev.560",
105
105
  "exports": {
106
106
  "./i18n": "./i18n.js",
107
107
  "./index.css": "./index.css",