@jbrowse/product-core 2.7.2 → 2.9.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.
- package/dist/RootModel/FormatDetails.d.ts +10 -1
- package/dist/RootModel/FormatDetails.js +11 -2
- package/dist/Session/SessionTracks.d.ts +5 -0
- package/dist/Session/Tracks.d.ts +5 -0
- package/dist/ui/AboutDialogContents.js +14 -1
- package/esm/RootModel/FormatDetails.d.ts +10 -1
- package/esm/RootModel/FormatDetails.js +11 -2
- package/esm/Session/SessionTracks.d.ts +5 -0
- package/esm/Session/Tracks.d.ts +5 -0
- package/esm/ui/AboutDialogContents.js +14 -1
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* #config FormatDetails
|
|
3
|
-
* generally exists on the config.json or
|
|
3
|
+
* generally exists on the tracks in the config.json or as a 'session' config as
|
|
4
|
+
* configuration.formatDetails
|
|
4
5
|
*/
|
|
5
6
|
export declare function FormatDetailsConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
7
|
/**
|
|
@@ -29,4 +30,12 @@ export declare function FormatDetailsConfigSchemaFactory(): import("@jbrowse/cor
|
|
|
29
30
|
defaultValue: number;
|
|
30
31
|
description: string;
|
|
31
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* #slot configuration.formatDetails.maxDepth
|
|
35
|
+
*/
|
|
36
|
+
maxDepth: {
|
|
37
|
+
type: string;
|
|
38
|
+
defaultValue: number;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
32
41
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
@@ -4,7 +4,8 @@ exports.FormatDetailsConfigSchemaFactory = void 0;
|
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
5
|
/**
|
|
6
6
|
* #config FormatDetails
|
|
7
|
-
* generally exists on the config.json or
|
|
7
|
+
* generally exists on the tracks in the config.json or as a 'session' config as
|
|
8
|
+
* configuration.formatDetails
|
|
8
9
|
*/
|
|
9
10
|
function FormatDetailsConfigSchemaFactory() {
|
|
10
11
|
return (0, configuration_1.ConfigurationSchema)('FormatDetails', {
|
|
@@ -32,7 +33,15 @@ function FormatDetailsConfigSchemaFactory() {
|
|
|
32
33
|
depth: {
|
|
33
34
|
type: 'number',
|
|
34
35
|
defaultValue: 2,
|
|
35
|
-
description: 'depth to iterate on subfeatures',
|
|
36
|
+
description: 'depth to iterate the formatDetails->subfeatures callback on subfeatures (used for example to only apply the callback to the first layer of subfeatures)',
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* #slot configuration.formatDetails.maxDepth
|
|
40
|
+
*/
|
|
41
|
+
maxDepth: {
|
|
42
|
+
type: 'number',
|
|
43
|
+
defaultValue: 10000,
|
|
44
|
+
description: 'hide subfeatures greater than a certain depth',
|
|
36
45
|
},
|
|
37
46
|
});
|
|
38
47
|
}
|
|
@@ -1850,6 +1850,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
|
|
|
1850
1850
|
defaultValue: number;
|
|
1851
1851
|
description: string;
|
|
1852
1852
|
};
|
|
1853
|
+
maxDepth: {
|
|
1854
|
+
type: string;
|
|
1855
|
+
defaultValue: number;
|
|
1856
|
+
description: string;
|
|
1857
|
+
};
|
|
1853
1858
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
1854
1859
|
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
1855
1860
|
config: {
|
package/dist/Session/Tracks.d.ts
CHANGED
|
@@ -1832,6 +1832,11 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
|
|
|
1832
1832
|
defaultValue: number;
|
|
1833
1833
|
description: string;
|
|
1834
1834
|
};
|
|
1835
|
+
maxDepth: {
|
|
1836
|
+
type: string;
|
|
1837
|
+
defaultValue: number;
|
|
1838
|
+
description: string;
|
|
1839
|
+
};
|
|
1835
1840
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
1836
1841
|
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
1837
1842
|
config: {
|
|
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const react_1 = __importStar(require("react"));
|
|
30
|
+
const clone_1 = __importDefault(require("clone"));
|
|
30
31
|
const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
|
|
31
32
|
const material_1 = require("@mui/material");
|
|
32
33
|
const mui_1 = require("tss-react/mui");
|
|
@@ -39,6 +40,17 @@ const useStyles = (0, mui_1.makeStyles)()({
|
|
|
39
40
|
minWidth: 800,
|
|
40
41
|
},
|
|
41
42
|
});
|
|
43
|
+
function removeAttr(obj, attr) {
|
|
44
|
+
for (const prop in obj) {
|
|
45
|
+
if (prop === attr) {
|
|
46
|
+
delete obj[prop];
|
|
47
|
+
}
|
|
48
|
+
else if (typeof obj[prop] === 'object') {
|
|
49
|
+
removeAttr(obj[prop], attr);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
42
54
|
function AboutContents({ config, }) {
|
|
43
55
|
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
44
56
|
const conf = (0, configuration_1.readConfObject)(config);
|
|
@@ -58,7 +70,8 @@ function AboutContents({ config, }) {
|
|
|
58
70
|
return (react_1.default.createElement("div", { className: classes.content },
|
|
59
71
|
react_1.default.createElement(BaseFeatureDetail_1.BaseCard, { title: "Configuration" },
|
|
60
72
|
!hideUris ? (react_1.default.createElement(material_1.Button, { variant: "contained", style: { float: 'right' }, onClick: () => {
|
|
61
|
-
(0,
|
|
73
|
+
const snap = removeAttr((0, clone_1.default)(conf), 'baseUri');
|
|
74
|
+
(0, copy_to_clipboard_1.default)(JSON.stringify(snap, null, 2));
|
|
62
75
|
setCopied(true);
|
|
63
76
|
setTimeout(() => setCopied(false), 1000);
|
|
64
77
|
} }, copied ? 'Copied to clipboard!' : 'Copy config')) : null,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* #config FormatDetails
|
|
3
|
-
* generally exists on the config.json or
|
|
3
|
+
* generally exists on the tracks in the config.json or as a 'session' config as
|
|
4
|
+
* configuration.formatDetails
|
|
4
5
|
*/
|
|
5
6
|
export declare function FormatDetailsConfigSchemaFactory(): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
7
|
/**
|
|
@@ -29,4 +30,12 @@ export declare function FormatDetailsConfigSchemaFactory(): import("@jbrowse/cor
|
|
|
29
30
|
defaultValue: number;
|
|
30
31
|
description: string;
|
|
31
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* #slot configuration.formatDetails.maxDepth
|
|
35
|
+
*/
|
|
36
|
+
maxDepth: {
|
|
37
|
+
type: string;
|
|
38
|
+
defaultValue: number;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
32
41
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
/**
|
|
3
3
|
* #config FormatDetails
|
|
4
|
-
* generally exists on the config.json or
|
|
4
|
+
* generally exists on the tracks in the config.json or as a 'session' config as
|
|
5
|
+
* configuration.formatDetails
|
|
5
6
|
*/
|
|
6
7
|
export function FormatDetailsConfigSchemaFactory() {
|
|
7
8
|
return ConfigurationSchema('FormatDetails', {
|
|
@@ -29,7 +30,15 @@ export function FormatDetailsConfigSchemaFactory() {
|
|
|
29
30
|
depth: {
|
|
30
31
|
type: 'number',
|
|
31
32
|
defaultValue: 2,
|
|
32
|
-
description: 'depth to iterate on subfeatures',
|
|
33
|
+
description: 'depth to iterate the formatDetails->subfeatures callback on subfeatures (used for example to only apply the callback to the first layer of subfeatures)',
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* #slot configuration.formatDetails.maxDepth
|
|
37
|
+
*/
|
|
38
|
+
maxDepth: {
|
|
39
|
+
type: 'number',
|
|
40
|
+
defaultValue: 10000,
|
|
41
|
+
description: 'hide subfeatures greater than a certain depth',
|
|
33
42
|
},
|
|
34
43
|
});
|
|
35
44
|
}
|
|
@@ -1850,6 +1850,11 @@ export declare function SessionTracksManagerSessionMixin(pluginManager: PluginMa
|
|
|
1850
1850
|
defaultValue: number;
|
|
1851
1851
|
description: string;
|
|
1852
1852
|
};
|
|
1853
|
+
maxDepth: {
|
|
1854
|
+
type: string;
|
|
1855
|
+
defaultValue: number;
|
|
1856
|
+
description: string;
|
|
1857
|
+
};
|
|
1853
1858
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
1854
1859
|
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
1855
1860
|
config: {
|
package/esm/Session/Tracks.d.ts
CHANGED
|
@@ -1832,6 +1832,11 @@ export declare function TracksManagerSessionMixin(pluginManager: PluginManager):
|
|
|
1832
1832
|
defaultValue: number;
|
|
1833
1833
|
description: string;
|
|
1834
1834
|
};
|
|
1835
|
+
maxDepth: {
|
|
1836
|
+
type: string;
|
|
1837
|
+
defaultValue: number;
|
|
1838
|
+
description: string;
|
|
1839
|
+
};
|
|
1835
1840
|
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
1836
1841
|
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
1837
1842
|
config: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
+
import clone from 'clone';
|
|
2
3
|
import copy from 'copy-to-clipboard';
|
|
3
4
|
import { Button } from '@mui/material';
|
|
4
5
|
import { makeStyles } from 'tss-react/mui';
|
|
@@ -11,6 +12,17 @@ const useStyles = makeStyles()({
|
|
|
11
12
|
minWidth: 800,
|
|
12
13
|
},
|
|
13
14
|
});
|
|
15
|
+
function removeAttr(obj, attr) {
|
|
16
|
+
for (const prop in obj) {
|
|
17
|
+
if (prop === attr) {
|
|
18
|
+
delete obj[prop];
|
|
19
|
+
}
|
|
20
|
+
else if (typeof obj[prop] === 'object') {
|
|
21
|
+
removeAttr(obj[prop], attr);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
14
26
|
export default function AboutContents({ config, }) {
|
|
15
27
|
const [copied, setCopied] = useState(false);
|
|
16
28
|
const conf = readConfObject(config);
|
|
@@ -30,7 +42,8 @@ export default function AboutContents({ config, }) {
|
|
|
30
42
|
return (React.createElement("div", { className: classes.content },
|
|
31
43
|
React.createElement(BaseCard, { title: "Configuration" },
|
|
32
44
|
!hideUris ? (React.createElement(Button, { variant: "contained", style: { float: 'right' }, onClick: () => {
|
|
33
|
-
|
|
45
|
+
const snap = removeAttr(clone(conf), 'baseUri');
|
|
46
|
+
copy(JSON.stringify(snap, null, 2));
|
|
34
47
|
setCopied(true);
|
|
35
48
|
setTimeout(() => setCopied(false), 1000);
|
|
36
49
|
} }, copied ? 'Copied to clipboard!' : 'Copy config')) : null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/product-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.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.
|
|
46
|
+
"@jbrowse/core": "^2.9.0",
|
|
47
47
|
"@mui/icons-material": "^5.0.0",
|
|
48
48
|
"@mui/material": "^5.10.17",
|
|
49
49
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "a50b6f67cf8c8f3c65a7b8cd858de2fcca1f2909"
|
|
67
67
|
}
|