@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;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AboutDialog = AboutDialog;
7
- const react_1 = __importDefault(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const Dialog_1 = __importDefault(require("@jbrowse/core/ui/Dialog"));
9
9
  const util_1 = require("@jbrowse/core/util");
10
10
  const tracks_1 = require("@jbrowse/core/util/tracks");
@@ -14,6 +14,5 @@ function AboutDialog({ config, handleClose, }) {
14
14
  const trackName = (0, tracks_1.getTrackName)(config, session);
15
15
  const { pluginManager } = (0, util_1.getEnv)(session);
16
16
  const AboutComponent = pluginManager.evaluateExtensionPoint('Core-replaceAbout', AboutDialogContents_1.default, { session, config });
17
- return (react_1.default.createElement(Dialog_1.default, { open: true, onClose: handleClose, title: trackName, maxWidth: "xl" },
18
- react_1.default.createElement(AboutComponent, { config: config })));
17
+ return ((0, jsx_runtime_1.jsx)(Dialog_1.default, { open: true, onClose: handleClose, title: trackName, maxWidth: "xl", children: (0, jsx_runtime_1.jsx)(AboutComponent, { config: config }) }));
19
18
  }
@@ -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,32 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
30
8
  const Attributes_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes"));
31
9
  const BaseCard_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard"));
32
10
  const configuration_1 = require("@jbrowse/core/configuration");
@@ -73,26 +51,17 @@ const AboutDialogContents = (0, mobx_react_1.observer)(function ({ config, }) {
73
51
  },
74
52
  }, { session, config });
75
53
  const ExtraPanel = pluginManager.evaluateExtensionPoint('Core-extraAboutPanel', null, { session, config });
76
- return (react_1.default.createElement("div", { className: classes.content },
77
- react_1.default.createElement(BaseCard_1.default, { title: "Configuration" },
78
- !hideUris ? (react_1.default.createElement("span", { className: classes.button },
79
- react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
80
- setShowRefNames(true);
81
- } }, "Show ref names"),
82
- react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => {
83
- const snap = removeAttr(structuredClone(conf), 'baseUri');
84
- (0, copy_to_clipboard_1.default)(JSON.stringify(snap, null, 2));
85
- setCopied(true);
86
- setTimeout(() => {
87
- setCopied(false);
88
- }, 1000);
89
- } }, copied ? 'Copied to clipboard!' : 'Copy config'))) : null,
90
- react_1.default.createElement(Attributes_1.default, { attributes: confPostExt, omit: ['displays', 'baseUri', 'refNames', 'formatAbout'], hideUris: hideUris })),
91
- ExtraPanel ? (react_1.default.createElement(BaseCard_1.default, { title: ExtraPanel.name },
92
- react_1.default.createElement(ExtraPanel.Component, { config: config }))) : null,
93
- react_1.default.createElement(FileInfoPanel_1.default, { config: config }),
94
- showRefNames ? (react_1.default.createElement(RefNameInfoDialog_1.default, { config: config, onClose: () => {
95
- setShowRefNames(false);
96
- } })) : null));
54
+ return ((0, jsx_runtime_1.jsxs)("div", { className: classes.content, children: [(0, jsx_runtime_1.jsxs)(BaseCard_1.default, { title: "Configuration", children: [!hideUris ? ((0, jsx_runtime_1.jsxs)("span", { className: classes.button, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "secondary", onClick: () => {
55
+ setShowRefNames(true);
56
+ }, children: "Show ref names" }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
57
+ const snap = removeAttr(structuredClone(conf), 'baseUri');
58
+ (0, copy_to_clipboard_1.default)(JSON.stringify(snap, null, 2));
59
+ setCopied(true);
60
+ setTimeout(() => {
61
+ setCopied(false);
62
+ }, 1000);
63
+ }, children: copied ? 'Copied to clipboard!' : 'Copy config' })] })) : null, (0, jsx_runtime_1.jsx)(Attributes_1.default, { attributes: confPostExt.config, omit: ['displays', 'baseUri', 'refNames', 'formatAbout', 'metadata'], hideUris: hideUris })] }), confPostExt.config.metadata ? ((0, jsx_runtime_1.jsx)(BaseCard_1.default, { title: "Metadata", children: (0, jsx_runtime_1.jsx)(Attributes_1.default, { attributes: confPostExt.config.metadata, omit: ['displays', 'baseUri', 'refNames', 'formatAbout'], hideUris: hideUris }) })) : null, ExtraPanel ? ((0, jsx_runtime_1.jsx)(BaseCard_1.default, { title: ExtraPanel.name, children: (0, jsx_runtime_1.jsx)(ExtraPanel.Component, { config: config }) })) : null, (0, jsx_runtime_1.jsx)(FileInfoPanel_1.default, { config: config }), showRefNames ? ((0, jsx_runtime_1.jsx)(RefNameInfoDialog_1.default, { config: config, onClose: () => {
64
+ setShowRefNames(false);
65
+ } })) : null] }));
97
66
  });
98
67
  exports.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,33 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
6
  exports.default = FileInfoPanel;
30
- const react_1 = __importStar(require("react"));
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
31
9
  const Attributes_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/Attributes"));
32
10
  const BaseCard_1 = __importDefault(require("@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail/BaseCard"));
33
11
  const configuration_1 = require("@jbrowse/core/configuration");
@@ -61,5 +39,5 @@ function FileInfoPanel({ config, }) {
61
39
  .replaceAll('>', '&gt;')}</pre>`,
62
40
  }
63
41
  : info || {};
64
- return (react_1.default.createElement(BaseCard_1.default, { title: "File info" }, error ? (react_1.default.createElement(ui_1.ErrorMessage, { error: error })) : info === undefined ? (react_1.default.createElement(ui_1.LoadingEllipses, { message: "Loading file data" })) : (react_1.default.createElement(Attributes_1.default, { attributes: details }))));
42
+ return ((0, jsx_runtime_1.jsx)(BaseCard_1.default, { title: "File info", children: error ? ((0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error })) : info === undefined ? ((0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { message: "Loading file data" })) : ((0, jsx_runtime_1.jsx)(Attributes_1.default, { attributes: details })) }));
65
43
  }
@@ -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,32 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importStar(require("react"));
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
30
8
  const configuration_1 = require("@jbrowse/core/configuration");
31
9
  const ui_1 = require("@jbrowse/core/ui");
32
10
  const util_1 = require("@jbrowse/core/util");
@@ -92,21 +70,18 @@ const RefNameInfoDialog = (0, mobx_react_1.observer)(function ({ config, onClose
92
70
  })
93
71
  .filter(f => !!f)
94
72
  .join('\n');
95
- return (react_1.default.createElement(ui_1.Dialog, { open: true, title: "Reference sequence names used in track", onClose: onClose, maxWidth: "xl" },
96
- react_1.default.createElement(material_1.DialogContent, { className: classes.container }, error ? (react_1.default.createElement(ui_1.ErrorMessage, { error: error })) : refNames === undefined ? (react_1.default.createElement(ui_1.LoadingEllipses, { message: "Loading refNames" })) : (react_1.default.createElement(react_1.default.Fragment, null,
97
- react_1.default.createElement(material_1.Button, { variant: "contained", onClick: () => {
98
- (0, copy_to_clipboard_1.default)(names
99
- .flatMap(([assemblyName, refNames]) => [
100
- `--- ${assemblyName} ---`,
101
- ...refNames,
102
- ])
103
- .filter(f => !!f)
104
- .join('\n'));
105
- setCopied(true);
106
- setTimeout(() => {
107
- setCopied(false);
108
- }, 1000);
109
- } }, copied ? 'Copied to clipboard!' : 'Copy ref names'),
110
- react_1.default.createElement("pre", { className: classes.refNames }, result))))));
73
+ return ((0, jsx_runtime_1.jsx)(ui_1.Dialog, { open: true, title: "Reference sequence names used in track", onClose: onClose, maxWidth: "xl", children: (0, jsx_runtime_1.jsx)(material_1.DialogContent, { className: classes.container, children: error ? ((0, jsx_runtime_1.jsx)(ui_1.ErrorMessage, { error: error })) : refNames === undefined ? ((0, jsx_runtime_1.jsx)(ui_1.LoadingEllipses, { message: "Loading refNames" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => {
74
+ (0, copy_to_clipboard_1.default)(names
75
+ .flatMap(([assemblyName, refNames]) => [
76
+ `--- ${assemblyName} ---`,
77
+ ...refNames,
78
+ ])
79
+ .filter(f => !!f)
80
+ .join('\n'));
81
+ setCopied(true);
82
+ setTimeout(() => {
83
+ setCopied(false);
84
+ }, 1000);
85
+ }, children: copied ? 'Copied to clipboard!' : 'Copy ref names' }), (0, jsx_runtime_1.jsx)("pre", { className: classes.refNames, children: result })] })) }) }));
111
86
  });
112
87
  exports.default = RefNameInfoDialog;
@@ -1,5 +1,6 @@
1
1
  import type { BaseRootModelType } from '../RootModel/BaseRootModel';
2
2
  import type PluginManager from '@jbrowse/core/PluginManager';
3
+ import type { BaseAssemblyConfigSchema } from '@jbrowse/core/assemblyManager';
3
4
  import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
4
5
  import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
5
6
  export declare function BaseSessionModel<ROOT_MODEL_TYPE extends BaseRootModelType, JB_CONFIG_SCHEMA extends AnyConfigurationSchemaType>(_pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
@@ -18,40 +19,7 @@ export declare function BaseSessionModel<ROOT_MODEL_TYPE extends BaseRootModelTy
18
19
  readonly adminMode: boolean;
19
20
  readonly textSearchManager: import("@jbrowse/core/util").TextSearchManager;
20
21
  } & {
21
- readonly assemblies: ({
22
- [x: string]: any;
23
- } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
24
- setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
25
- [x: string]: any;
26
- } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
27
- setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
28
- [x: string]: any;
29
- } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
30
- } & import("mobx-state-tree").IStateTreeNode<AnyConfigurationSchemaType>);
31
- } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
32
- aliases: {
33
- type: string;
34
- defaultValue: never[];
35
- description: string;
36
- };
37
- sequence: import("@jbrowse/core/configuration").AnyConfigurationSchemaType;
38
- refNameColors: {
39
- type: string;
40
- defaultValue: never[];
41
- description: string;
42
- };
43
- refNameAliases: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
44
- adapter: import("mobx-state-tree").IAnyModelType;
45
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
46
- cytobands: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
47
- adapter: import("mobx-state-tree").IAnyModelType;
48
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
49
- displayName: {
50
- type: string;
51
- defaultValue: string;
52
- description: string;
53
- };
54
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "name">>>)[];
22
+ readonly assemblies: Instance<BaseAssemblyConfigSchema>[];
55
23
  } & {
56
24
  setSelection(thing: unknown): void;
57
25
  clearSelection(): void;
@@ -1,5 +1,6 @@
1
1
  import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
3
+ import type { BaseConnectionConfigModel } from '@jbrowse/core/pluggableElementTypes/models/baseConnectionConfig';
3
4
  import type { IAnyStateTreeNode, Instance } from 'mobx-state-tree';
4
5
  export declare function ConnectionManagementSessionMixin(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
5
6
  connectionInstances: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
@@ -47,28 +48,7 @@ export declare function ConnectionManagementSessionMixin(pluginManager: PluginMa
47
48
  clear(): void;
48
49
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
49
50
  }, {
50
- readonly connections: ({
51
- [x: string]: any;
52
- } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
53
- setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
54
- [x: string]: any;
55
- } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
56
- setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
57
- [x: string]: any;
58
- } & import("mobx-state-tree/dist/internal").NonEmptyObject & any & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
59
- } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration").AnyConfigurationSchemaType>);
60
- } & import("mobx-state-tree").IStateTreeNode<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
61
- name: {
62
- type: string;
63
- defaultValue: string;
64
- description: string;
65
- };
66
- assemblyNames: {
67
- type: string;
68
- defaultValue: never[];
69
- description: string;
70
- };
71
- }, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "connectionId">>>)[];
51
+ readonly connections: BaseConnectionConfigModel[];
72
52
  } & {
73
53
  makeConnection(configuration: AnyConfigurationModel, initialSnapshot?: {}): ({
74
54
  name: string;