@jbrowse/product-core 2.18.0 → 3.0.0

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.
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
2
  export declare function AboutDialog({ config, handleClose, }: {
4
3
  config: AnyConfigurationModel;
5
4
  handleClose: () => void;
6
- }): React.JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Dialog from '@jbrowse/core/ui/Dialog';
3
3
  import { getEnv, getSession } from '@jbrowse/core/util';
4
4
  import { getTrackName } from '@jbrowse/core/util/tracks';
@@ -8,6 +8,5 @@ export function AboutDialog({ config, handleClose, }) {
8
8
  const trackName = getTrackName(config, session);
9
9
  const { pluginManager } = getEnv(session);
10
10
  const AboutComponent = pluginManager.evaluateExtensionPoint('Core-replaceAbout', AboutContents, { session, config });
11
- return (React.createElement(Dialog, { open: true, onClose: handleClose, title: trackName, maxWidth: "xl" },
12
- React.createElement(AboutComponent, { config: config })));
11
+ return (_jsx(Dialog, { open: true, onClose: handleClose, title: trackName, maxWidth: "xl", children: _jsx(AboutComponent, { config: config }) }));
13
12
  }
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
2
  declare const AboutDialogContents: ({ config, }: {
4
3
  config: AnyConfigurationModel;
5
- }) => React.JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
6
5
  export default AboutDialogContents;
@@ -1,4 +1,5 @@
1
- import React, { useState } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import Attributes from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes';
3
4
  import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
4
5
  import { getConf, readConfObject } from '@jbrowse/core/configuration';
@@ -45,26 +46,17 @@ const AboutDialogContents = observer(function ({ config, }) {
45
46
  },
46
47
  }, { session, config });
47
48
  const ExtraPanel = pluginManager.evaluateExtensionPoint('Core-extraAboutPanel', null, { session, config });
48
- return (React.createElement("div", { className: classes.content },
49
- React.createElement(BaseCard, { title: "Configuration" },
50
- !hideUris ? (React.createElement("span", { className: classes.button },
51
- React.createElement(Button, { variant: "contained", color: "secondary", onClick: () => {
52
- setShowRefNames(true);
53
- } }, "Show ref names"),
54
- React.createElement(Button, { variant: "contained", onClick: () => {
55
- const snap = removeAttr(structuredClone(conf), 'baseUri');
56
- copy(JSON.stringify(snap, null, 2));
57
- setCopied(true);
58
- setTimeout(() => {
59
- setCopied(false);
60
- }, 1000);
61
- } }, copied ? 'Copied to clipboard!' : 'Copy config'))) : null,
62
- React.createElement(Attributes, { attributes: confPostExt, omit: ['displays', 'baseUri', 'refNames', 'formatAbout'], hideUris: hideUris })),
63
- ExtraPanel ? (React.createElement(BaseCard, { title: ExtraPanel.name },
64
- React.createElement(ExtraPanel.Component, { config: config }))) : null,
65
- React.createElement(FileInfoPanel, { config: config }),
66
- showRefNames ? (React.createElement(RefNameInfoDialog, { config: config, onClose: () => {
67
- setShowRefNames(false);
68
- } })) : null));
49
+ return (_jsxs("div", { className: classes.content, children: [_jsxs(BaseCard, { title: "Configuration", children: [!hideUris ? (_jsxs("span", { className: classes.button, children: [_jsx(Button, { variant: "contained", color: "secondary", onClick: () => {
50
+ setShowRefNames(true);
51
+ }, children: "Show ref names" }), _jsx(Button, { variant: "contained", onClick: () => {
52
+ const snap = removeAttr(structuredClone(conf), 'baseUri');
53
+ copy(JSON.stringify(snap, null, 2));
54
+ setCopied(true);
55
+ setTimeout(() => {
56
+ setCopied(false);
57
+ }, 1000);
58
+ }, children: copied ? 'Copied to clipboard!' : 'Copy config' })] })) : null, _jsx(Attributes, { attributes: confPostExt.config, omit: ['displays', 'baseUri', 'refNames', 'formatAbout', 'metadata'], hideUris: hideUris })] }), confPostExt.config.metadata ? (_jsx(BaseCard, { title: "Metadata", children: _jsx(Attributes, { attributes: confPostExt.config.metadata, omit: ['displays', 'baseUri', 'refNames', 'formatAbout'], hideUris: hideUris }) })) : null, ExtraPanel ? (_jsx(BaseCard, { title: ExtraPanel.name, children: _jsx(ExtraPanel.Component, { config: config }) })) : null, _jsx(FileInfoPanel, { config: config }), showRefNames ? (_jsx(RefNameInfoDialog, { config: config, onClose: () => {
59
+ setShowRefNames(false);
60
+ } })) : null] }));
69
61
  });
70
62
  export default AboutDialogContents;
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
2
  export default function FileInfoPanel({ config, }: {
4
3
  config: AnyConfigurationModel;
5
- }): React.JSX.Element;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
2
3
  import Attributes from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes';
3
4
  import BaseCard from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard';
4
5
  import { readConfObject } from '@jbrowse/core/configuration';
@@ -32,5 +33,5 @@ export default function FileInfoPanel({ config, }) {
32
33
  .replaceAll('>', '&gt;')}</pre>`,
33
34
  }
34
35
  : info || {};
35
- return (React.createElement(BaseCard, { title: "File info" }, error ? (React.createElement(ErrorMessage, { error: error })) : info === undefined ? (React.createElement(LoadingEllipses, { message: "Loading file data" })) : (React.createElement(Attributes, { attributes: details }))));
36
+ return (_jsx(BaseCard, { title: "File info", children: error ? (_jsx(ErrorMessage, { error: error })) : info === undefined ? (_jsx(LoadingEllipses, { message: "Loading file data" })) : (_jsx(Attributes, { attributes: details })) }));
36
37
  }
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
2
  declare const RefNameInfoDialog: ({ config, onClose, }: {
4
3
  config: AnyConfigurationModel;
5
4
  onClose: () => void;
6
- }) => React.JSX.Element;
5
+ }) => import("react/jsx-runtime").JSX.Element;
7
6
  export default RefNameInfoDialog;
@@ -1,4 +1,5 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
2
3
  import { readConfObject } from '@jbrowse/core/configuration';
3
4
  import { Dialog, ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
4
5
  import { getSession } from '@jbrowse/core/util';
@@ -64,21 +65,18 @@ const RefNameInfoDialog = observer(function ({ config, onClose, }) {
64
65
  })
65
66
  .filter(f => !!f)
66
67
  .join('\n');
67
- return (React.createElement(Dialog, { open: true, title: "Reference sequence names used in track", onClose: onClose, maxWidth: "xl" },
68
- React.createElement(DialogContent, { className: classes.container }, error ? (React.createElement(ErrorMessage, { error: error })) : refNames === undefined ? (React.createElement(LoadingEllipses, { message: "Loading refNames" })) : (React.createElement(React.Fragment, null,
69
- React.createElement(Button, { variant: "contained", onClick: () => {
70
- copy(names
71
- .flatMap(([assemblyName, refNames]) => [
72
- `--- ${assemblyName} ---`,
73
- ...refNames,
74
- ])
75
- .filter(f => !!f)
76
- .join('\n'));
77
- setCopied(true);
78
- setTimeout(() => {
79
- setCopied(false);
80
- }, 1000);
81
- } }, copied ? 'Copied to clipboard!' : 'Copy ref names'),
82
- React.createElement("pre", { className: classes.refNames }, result))))));
68
+ return (_jsx(Dialog, { open: true, title: "Reference sequence names used in track", onClose: onClose, maxWidth: "xl", children: _jsx(DialogContent, { className: classes.container, children: error ? (_jsx(ErrorMessage, { error: error })) : refNames === undefined ? (_jsx(LoadingEllipses, { message: "Loading refNames" })) : (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "contained", onClick: () => {
69
+ copy(names
70
+ .flatMap(([assemblyName, refNames]) => [
71
+ `--- ${assemblyName} ---`,
72
+ ...refNames,
73
+ ])
74
+ .filter(f => !!f)
75
+ .join('\n'));
76
+ setCopied(true);
77
+ setTimeout(() => {
78
+ setCopied(false);
79
+ }, 1000);
80
+ }, children: copied ? 'Copied to clipboard!' : 'Copy ref names' }), _jsx("pre", { className: classes.refNames, children: result })] })) }) }));
83
81
  });
84
82
  export default RefNameInfoDialog;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/product-core",
3
- "version": "2.18.0",
3
+ "version": "3.0.0",
4
4
  "sideEffects": false,
5
5
  "description": "JBrowse 2 code shared between products but not used by plugins",
6
6
  "keywords": [
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@babel/runtime": "^7.16.3",
46
- "@jbrowse/core": "^2.18.0",
46
+ "@jbrowse/core": "^3.0.0",
47
47
  "@mui/icons-material": "^6.0.0",
48
48
  "@mui/material": "^6.0.0",
49
49
  "copy-to-clipboard": "^3.3.1",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
65
+ "gitHead": "2c6897f1fa732b1db5b094d1dca197e333e95319"
66
66
  }